Download M4 Source Macro History Category Index

ac_cxx_extern_template

Synopsis

AC_CXX_EXTERN_TEMPLATE

Description

Test whether the C++ compiler supports "extern template".

Author

Patrick Mauritz <oxygene@studentenbude.ath.cx>

Last Modified

2005-07-18

M4 Source Code

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 <typename T> void foo(T); extern template void foo<int>(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
])

License

Copyright © 2005 Patrick Mauritz <oxygene@studentenbude.ath.cx>

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.