Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.2KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_cxx_extern_template.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_CXX_EXTERN_TEMPLATE
  8. #
  9. # DESCRIPTION
  10. #
  11. # Test whether the C++ compiler supports "extern template".
  12. #
  13. # LICENSE
  14. #
  15. # Copyright (c) 2008 Patrick Mauritz <oxygene@studentenbude.ath.cx>
  16. #
  17. # Copying and distribution of this file, with or without modification, are
  18. # permitted in any medium without royalty provided the copyright notice
  19. # and this notice are preserved. This file is offered as-is, without any
  20. # warranty.
  21. #serial 7
  22. AU_ALIAS([AC_CXX_EXTERN_TEMPLATE], [AX_CXX_EXTERN_TEMPLATE])
  23. AC_DEFUN([AX_CXX_EXTERN_TEMPLATE],[
  24. AC_CACHE_CHECK(whether the compiler supports extern template,
  25. ax_cv_cxx_extern_template,
  26. [AC_LANG_SAVE
  27. AC_LANG_CPLUSPLUS
  28. AC_TRY_COMPILE([template <typename T> void foo(T); extern template void foo<int>(int);],
  29. [],
  30. ax_cv_cxx_extern_template=yes, ax_cv_cxx_extern_template=no)
  31. AC_LANG_RESTORE
  32. ])
  33. if test "$ax_cv_cxx_extern_template" = yes; then
  34. AC_DEFINE(HAVE_EXTERN_TEMPLATE,,[define if the compiler supports extern template])
  35. fi
  36. ])