Store up errno in a couple of spots.
[m6w6/libmemcached] / m4 / pandora_check_cxx_standard.m4
index d4189ea0b5ec41abd893e48d1676938712f554cf..a5f0cca38e4bca9e11671a1702fcf84a6069fdbb 100644 (file)
@@ -1,16 +1,23 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
+dnl  Copyright (C) 2009 Sun Microsystems, Inc.
+dnl This file is free software; Sun Microsystems, Inc.
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([PANDORA_CHECK_CXX_STANDARD],[
-  AC_REQUIRE([AC_CXX_COMPILE_STDCXX_0X])
+  dnl AC_REQUIRE([AC_CXX_COMPILE_STDCXX_0X])
   AS_IF([test "$GCC" = "yes"],
         [AS_IF([test "$ac_cv_cxx_compile_cxx0x_native" = "yes"],[],
                [AS_IF([test "$ac_cv_cxx_compile_cxx0x_gxx" = "yes"],
-                      [CXXFLAGS="-std=gnu++0x ${CXXFLAGS}"],
-                      [CXXFLAGS="-std=gnu++98"])
+                      [CXX_STANDARD="-std=gnu++0x"],
+                      [CXX_STANDARD="-std=gnu++98"])
                ])
         ])
+  AM_CXXFLAGS="${CXX_STANDARD} ${AM_CXXFLAGS}"
+  
+  save_CXXFLAGS="${CXXFLAGS}"
+  CXXFLAGS="${CXXFLAGS} ${CXX_STANDARD}"
   AC_CXX_HEADER_STDCXX_98
+  CXXFLAGS="${save_CXXFLAGS}"
+
+  AC_SUBST([CXX_STANDARD])
 ])