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.

45 lines
1.3KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_cxx_have_stl.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_CXX_HAVE_STL
  8. #
  9. # DESCRIPTION
  10. #
  11. # If the compiler supports the Standard Template Library, define HAVE_STL.
  12. #
  13. # LICENSE
  14. #
  15. # Copyright (c) 2008 Todd Veldhuizen
  16. # Copyright (c) 2008 Luc Maisonobe <luc@spaceroots.org>
  17. #
  18. # Copying and distribution of this file, with or without modification, are
  19. # permitted in any medium without royalty provided the copyright notice
  20. # and this notice are preserved. This file is offered as-is, without any
  21. # warranty.
  22. #serial 7
  23. AU_ALIAS([AC_CXX_HAVE_STL], [AX_CXX_HAVE_STL])
  24. AC_DEFUN([AX_CXX_HAVE_STL],
  25. [AC_CACHE_CHECK(whether the compiler supports Standard Template Library,
  26. ax_cv_cxx_have_stl,
  27. [AC_REQUIRE([AX_CXX_NAMESPACES])
  28. AC_LANG_SAVE
  29. AC_LANG_CPLUSPLUS
  30. AC_TRY_COMPILE([#include <list>
  31. #include <deque>
  32. #ifdef HAVE_NAMESPACES
  33. using namespace std;
  34. #endif],[list<int> x; x.push_back(5);
  35. list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;],
  36. ax_cv_cxx_have_stl=yes, ax_cv_cxx_have_stl=no)
  37. AC_LANG_RESTORE
  38. ])
  39. if test "$ax_cv_cxx_have_stl" = yes; then
  40. AC_DEFINE(HAVE_STL,,[define if the compiler supports Standard Template Library])
  41. fi
  42. ])