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.

47 lines
1.3KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_cxx_have_std.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_CXX_HAVE_STD
  8. #
  9. # DESCRIPTION
  10. #
  11. # If the compiler supports ISO C++ standard library (i.e., can include the
  12. # files iostream, map, iomanip and cmath), define HAVE_STD.
  13. #
  14. # LICENSE
  15. #
  16. # Copyright (c) 2008 Todd Veldhuizen
  17. # Copyright (c) 2008 Luc Maisonobe <luc@spaceroots.org>
  18. #
  19. # Copying and distribution of this file, with or without modification, are
  20. # permitted in any medium without royalty provided the copyright notice
  21. # and this notice are preserved. This file is offered as-is, without any
  22. # warranty.
  23. #serial 7
  24. AU_ALIAS([AC_CXX_HAVE_STD], [AX_CXX_HAVE_STD])
  25. AC_DEFUN([AX_CXX_HAVE_STD],
  26. [AC_CACHE_CHECK(whether the compiler supports ISO C++ standard library,
  27. ax_cv_cxx_have_std,
  28. [AC_REQUIRE([AX_CXX_NAMESPACES])
  29. AC_LANG_SAVE
  30. AC_LANG_CPLUSPLUS
  31. AC_TRY_COMPILE([#include <iostream>
  32. #include <map>
  33. #include <iomanip>
  34. #include <cmath>
  35. #ifdef HAVE_NAMESPACES
  36. using namespace std;
  37. #endif],[return 0;],
  38. ax_cv_cxx_have_std=yes, ax_cv_cxx_have_std=no)
  39. AC_LANG_RESTORE
  40. ])
  41. if test "$ax_cv_cxx_have_std" = yes; then
  42. AC_DEFINE(HAVE_STD,,[define if the compiler supports ISO C++ standard library])
  43. fi
  44. ])