pandora_check_cxx_standard.m4 832 B

1234567891011121314151617181920212223
  1. dnl Copyright (C) 2009 Sun Microsystems, Inc.
  2. dnl This file is free software; Sun Microsystems, Inc.
  3. dnl gives unlimited permission to copy and/or distribute it,
  4. dnl with or without modifications, as long as this notice is preserved.
  5. AC_DEFUN([PANDORA_CHECK_CXX_STANDARD],[
  6. dnl AC_REQUIRE([AC_CXX_COMPILE_STDCXX_0X])
  7. AS_IF([test "$GCC" = "yes"],
  8. [AS_IF([test "$ac_cv_cxx_compile_cxx0x_native" = "yes"],[],
  9. [AS_IF([test "$ac_cv_cxx_compile_cxx0x_gxx" = "yes"],
  10. [CXX_STANDARD="-std=gnu++0x"],
  11. [CXX_STANDARD="-std=gnu++98"])
  12. ])
  13. ])
  14. AM_CXXFLAGS="${CXX_STANDARD} ${AM_CXXFLAGS}"
  15. save_CXXFLAGS="${CXXFLAGS}"
  16. CXXFLAGS="${CXXFLAGS} ${CXX_STANDARD}"
  17. AC_CXX_HEADER_STDCXX_98
  18. CXXFLAGS="${save_CXXFLAGS}"
  19. AC_SUBST([CXX_STANDARD])
  20. ])