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.

26 lines
752 B

  1. dnl @synopsis AC_CXX_HAVE_STD_NAMESPACE
  2. dnl
  3. dnl If the compiler supports the std namespace, define
  4. dnl HAVE_STD_NAMESPACE.
  5. dnl
  6. dnl @category Cxx
  7. dnl @author Todd Veldhuizen
  8. dnl @author Luc Maisonobe <luc@spaceroots.org>
  9. dnl @version 2004-02-04
  10. dnl @license AllPermissive
  11. AC_DEFUN([AC_CXX_HAVE_STD_NAMESPACE],
  12. [AC_CACHE_CHECK(whether the compiler supports the std namespace,
  13. ac_cv_cxx_have_std_namespace,
  14. [AC_LANG_SAVE
  15. AC_LANG_CPLUSPLUS
  16. AC_TRY_COMPILE([#include <iostream>
  17. std::istream& is = std::cin;
  18. ],[return 0;],
  19. ac_cv_cxx_have_std_namespace=yes, ac_cv_cxx_have_std_namespace=no)
  20. AC_LANG_RESTORE
  21. ])
  22. if test "$ac_cv_cxx_have_std_namespace" = yes; then
  23. AC_DEFINE(HAVE_STD_NAMESPACE,,[define if the compiler supports the std namespace])
  24. fi
  25. ])