monotone

monotone Mtn Source Tree

Root/m4/externtemplate.m4

1dnl @synopsis AC_CXX_EXTERN_TEMPLATE
2dnl
3dnl tests for the presence of the gcc c++ extension
4dnl "extern template"
5dnl
6dnl @author Patrick Mauritz <oxygene@studentenbude.ath.cx>
7dnl @version 2005-07-18
8dnl @license AllPermissive
9
10AC_DEFUN([AC_CXX_EXTERN_TEMPLATE],[
11AC_LANG_ASSERT([C++])
12AC_CACHE_CHECK(whether the compiler supports extern template,
13ac_cv_cxx_extern_template,
14[AC_COMPILE_IFELSE([AC_LANG_SOURCE([
15 template <typename T> void foo(T);
16 extern template void foo<int>(int);
17])],
18 [ac_cv_cxx_extern_template=yes],
19 [ac_cv_cxx_extern_template=no])
20])
21if test x$ac_cv_cxx_extern_template = xyes; then
22 AC_DEFINE(HAVE_EXTERN_TEMPLATE, 1,
23 [Define if the compiler supports "extern template".])
24fi
25])

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status