Merge in pthread update/etc.
[m6w6/libmemcached] / m4 / pandora_shared_ptr.m4
index 70185ade52343248957868d64e6fe9c6e09b47a6..61fdf1517a33081e53a5f8fd4ab2c4fbfe6c7c99 100644 (file)
@@ -1,5 +1,5 @@
-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.
 
@@ -20,6 +20,8 @@ dnl
 AC_DEFUN([PANDORA_SHARED_PTR],[
   AC_REQUIRE([PANDORA_CHECK_CXX_STANDARD])
   AC_LANG_PUSH(C++)
+  save_CXXFLAGS="${CXXFLAGS}"
+  CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}"
   AC_CHECK_HEADERS(memory tr1/memory boost/shared_ptr.hpp)
   AC_CACHE_CHECK([the location of shared_ptr header file],
     [ac_cv_shared_ptr_h],[
@@ -52,5 +54,6 @@ shared_ptr<string> test_ptr(new string("test string"));
   AC_DEFINE_UNQUOTED([SHARED_PTR_NAMESPACE],
                      ${ac_cv_shared_ptr_namespace},
                      [The namespace in which SHARED_PTR can be found])
+  CXXFLAGS="${save_CXXFLAGS}"
   AC_LANG_POP()
 ])