# # add_file "m4/externtemplate.m4" # # patch "m4/externtemplate.m4" # from [] # to [68df9a72ba32cce1ed7f781b19e07c36710f4f70] # ======================================================================== --- m4/externtemplate.m4 +++ m4/externtemplate.m4 68df9a72ba32cce1ed7f781b19e07c36710f4f70 @@ -0,0 +1,23 @@ +dnl @synopsis AC_CXX_EXTERN_TEMPLATE +dnl +dnl tests for the presence of the gcc c++ extension +dnl "extern template" +dnl +dnl @author Patrick Mauritz +dnl @version 2005-07-18 +dnl @license AllPermissive + +AC_DEFUN([AC_CXX_EXTERN_TEMPLATE],[ +AC_CACHE_CHECK(whether the compiler supports extern template, +ac_cv_cxx_extern_template, +[AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([template void foo(T); extern template void foo(int);], + [], + ac_cv_cxx_extern_template=yes, ac_cv_cxx_extern_template=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_extern_template" = yes; then + AC_DEFINE(HAVE_EXTERN_TEMPLATE,,[define if the compiler supports extern template]) +fi +])