Update m4
authorBrian Aker <brian@tangent.org>
Sun, 4 Nov 2012 06:54:36 +0000 (01:54 -0500)
committerBrian Aker <brian@tangent.org>
Sun, 4 Nov 2012 06:54:36 +0000 (01:54 -0500)
m4/ax_compiler_vendor.m4
m4/ax_compiler_version.m4
m4/ax_endian.m4
m4/ax_harden_compiler_flags.m4
m4/ax_libevent.m4
m4/ax_pthread.m4
m4/ax_vcs_checkout.m4
m4/have_cinttypes.m4
m4/have_cstdint.m4

index 73e32ea9ef96df4a52df553bfdaf976796ef7197..13bf7dba19a0bdce207cb2aa14a32ed564676ed0 100644 (file)
@@ -4,7 +4,7 @@
 #
 # SYNOPSIS
 #
-#   AX_COMPILER_VENDOR
+#   AX_COMPILER_VENDOR()
 #
 # DESCRIPTION
 #
index da897bc23e7b2a11e805d2eeb3e02f0b95bf7175..9dce45d2e4ae4aa4e944ab82b9cdcc7eb7ae6a6c 100644 (file)
 
 #serial 4
 
-  AC_DEFUN([AX_C_COMPILER_VERSION],[
-      AC_REQUIRE([AX_COMPILER_VENDOR])
+  AC_DEFUN([AX_C_COMPILER_VERSION],
+      [AC_REQUIRE([AX_COMPILER_VENDOR])
       AC_MSG_CHECKING([C Compiler version])
 
-      ax_cv_c_compiler_version_vendor="$ax_cv_c_compiler_vendor"
+      ax_c_compiler_version_vendor="$ax_c_compiler_vendor"
 
-      AC_CHECK_DECL([__GNUC_PATCHLEVEL__],[
-        GNUCC=yes
-        ],[GNUCC=no])
+      AC_CHECK_DECL([__GNUC_PATCHLEVEL__],
+        [GNUCC=yes
+        ax_c_compiler_version_gcc="`$CC --dumpversion`"],
+        [GNUCC=no])
       AC_MSG_CHECKING([GNUCC])
       AC_MSG_RESULT([$GNUCC])
 
       AC_MSG_CHECKING([CLANG])
       AC_MSG_RESULT([$CLANG])
 
-      AC_CHECK_DECL([__MINGW32__],[
-        MINGW=yes
-        ax_cv_c_compiler_version_vendor=mingw
-        ],[MINGW=no])
+      AC_CHECK_DECL([__MINGW32__],
+          [MINGW=yes
+          ax_c_compiler_version_vendor=mingw],
+          [MINGW=no])
       AC_MSG_CHECKING([MINGW])
       AC_MSG_RESULT([$MINGW])
 
-      AS_CASE(["$ax_cv_c_compiler_version_vendor"],[
-        sun],[ax_c_compiler_version=`$CC -V 2>&1 | sed 1q`],[
-        intel],[ax_c_compiler_version=`$CC --version 2>&1 | sed 1q`],[
-        clang],[ax_c_compiler_version=`$CC --version 2>&1 | sed 1q`],[
-        gnu],[ax_c_compiler_version=`$CC --version | sed 1q`],[
-        mingw],[ax_c_compiler_version=`$CC --version | sed 1q`],[
-        ax_c_compiler_version=unknown])
+      AS_CASE(["$ax_c_compiler_version_vendor"],
+              [sun],[ax_c_compiler_version="`$CC -V 2>&1 | sed 1q`"],
+              [intel],[ax_c_compiler_version="`$CC --version 2>&1 | sed 1q`"],
+              [clang],[ax_c_compiler_version="`$CC --version 2>&1 | sed 1q`"],
+              [gnu],[ax_c_compiler_version="`$CC --version | sed 1q`"],
+              [mingw],[ax_c_compiler_version="`$CC --version | sed 1q`"],
+              [ax_c_compiler_version=unknown])
 
       AC_MSG_RESULT(["$ax_c_compiler_version"])
-      AC_SUBST([CC_VERSION_VENDOR],["$ax_cv_c_compiler_version_vendor"])
+      AC_SUBST([CC_VERSION_VENDOR],["$ax_c_compiler_version_vendor"])
       AC_SUBST([CC_VERSION],["$ax_c_compiler_version"])
+
+      AS_IF([test "$GCC" = "yes"],
+          [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#if !defined(__GNUC__) || (__GNUC__ < 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ < 2))
+# error GCC is Too Old!
+#endif
+              ]])],
+            [ac_c_gcc_recent=yes],
+            [ac_c_gcc_recent=no])])
       ])
 
-  AC_DEFUN([AX_CXX_COMPILER_VERSION],[
-      AC_REQUIRE([AX_C_COMPILER_VERSION])
+  AC_DEFUN([AX_CXX_COMPILER_VERSION],
+      [AC_REQUIRE([AX_C_COMPILER_VERSION])
       AC_MSG_CHECKING([C++ Compiler version])
 
-      AS_CASE(["$ax_cv_c_compiler_version_vendor"],[
-        sun],[ax_cxx_compiler_version=`$CC -V 2>&1 | sed 1q`],[
-        intel],[ax_cxx_compiler_version=`$CC --version 2>&1 | sed 1q`],[
-        clang],[ax_cxx_compiler_version=`$CC --version 2>&1 | sed 1q`],[
-        gnu],[ax_cxx_compiler_version=`$CC --version | sed 1q`],[
-        mingw],[ax_cxx_compiler_version=`$CC --version | sed 1q`],[
-        ax_cxx_compiler_version=unknown])
+      AS_CASE(["$ax_c_compiler_version_vendor"],
+        [sun],[ax_cxx_compiler_version="`$CC -V 2>&1 | sed 1q`"],
+        [intel],[ax_cxx_compiler_version="`$CC --version 2>&1 | sed 1q`"],
+        [clang],[ax_cxx_compiler_version="`$CC --version 2>&1 | sed 1q`"],
+        [gnu],[ax_cxx_compiler_version="`$CC --version | sed 1q`"],
+        [mingw],[ax_cxx_compiler_version="`$CC --version | sed 1q`"],
+        [ax_cxx_compiler_version=unknown])
 
       AC_MSG_RESULT(["$ax_cxx_compiler_version"])
-      AC_SUBST([CXX_VERSION_VENDOR],["$ax_cv_c_compiler_version_vendor"])
+      AC_SUBST([CXX_VERSION_VENDOR],["$ax_c_compiler_version_vendor"])
       AC_SUBST([CXX_VERSION],["$ax_cxx_compiler_version"])
       ])
index ee23fbdd975fe1219bd53b2f470e534a036814f2..0dfbcd52d48d01be9299baf6651bb5206a1df93b 100644 (file)
@@ -3,7 +3,7 @@
 #
 # SYNOPSIS
 #
-#   AX_ENDIAN
+#   AX_ENDIAN()
 #
 # DESCRIPTION
 #
index 7a1fca9be5d28b6a21f5a2b0946f9c0573668412..3be78b18274e705896f1aace0db842f66be1463e 100644 (file)
 
 AC_DEFUN([AX_APPEND_LINK_FLAGS_ERROR],
     [AC_PREREQ([2.63])dnl
-    AX_APPEND_LINK_FLAGS([$1],[LIB],[-Werror])])
+    AX_APPEND_LINK_FLAGS([$1],[LIB],[-Werror])
+    ])
 
 AC_DEFUN([AX_APPEND_COMPILE_FLAGS_ERROR],
     [AC_PREREQ([2.63])dnl
-    AX_APPEND_COMPILE_FLAGS([$1])])
+    AX_APPEND_COMPILE_FLAGS([$1],,[-Werror])
+    ])
 
 AC_DEFUN([AX_HARDEN_LINKER_FLAGS],
     [AC_PREREQ([2.63])dnl
-    AC_REQUIRE([AX_CHECK_LINK_FLAG])
-    AC_REQUIRE([AX_VCS_CHECKOUT])
-    AC_REQUIRE([AX_DEBUG])
+    AC_REQUIRE([AX_APPEND_LINK_FLAGS])
     AC_REQUIRE([AX_CXX_COMPILER_VERSION])
+    AC_REQUIRE([AX_DEBUG])
+    AC_REQUIRE([AX_VCS_CHECKOUT])
+
     AX_APPEND_LINK_FLAGS_ERROR([-z relro -z now])
     AX_APPEND_LINK_FLAGS_ERROR([-pie])
+
     AS_IF([test "x$ac_cv_vcs_checkout" = xyes],[AX_APPEND_LINK_FLAGS_ERROR([-Werror])])
     ])
 
 AC_DEFUN([AX_HARDEN_CC_COMPILER_FLAGS],
     [AC_PREREQ([2.63])dnl
-    AC_LANG_PUSH([C])dnl
-    AC_REQUIRE([AX_APPEND_COMPILE_FLAGS_ERROR])
-    AC_REQUIRE([AX_HARDEN_LINKER_FLAGS])
+    AC_REQUIRE([AX_APPEND_LINK_FLAGS])
+    AC_REQUIRE([AX_CXX_COMPILER_VERSION])
+    AC_REQUIRE([AX_DEBUG])
+    AC_REQUIRE([AX_VCS_CHECKOUT])
 
-    ac_cv_warnings_as_errors=no
-    AS_IF([test "x$ac_cv_vcs_checkout" = xyes],
-      [AX_APPEND_COMPILE_FLAGS_ERROR([-Werror])
-      ac_cv_warnings_as_errors=yes],
-      [AX_APPEND_COMPILE_FLAGS_ERROR([-Werror])])
+    AC_LANG_PUSH([C])dnl
 
-    AX_APPEND_LINK_FLAGS_ERROR([-g])
+    AX_APPEND_COMPILE_FLAGS_ERROR([-g])
     AS_IF([test "x$ax_enable_debug" = xyes],
-      [AX_APPEND_LINK_FLAGS_ERROR([-ggdb])
-      AX_APPEND_LINK_FLAGS_ERROR([-O0])],
-      [AX_APPEND_LINK_FLAGS_ERROR([-O2])])
+      [AX_APPEND_COMPILE_FLAGS_ERROR([-ggdb])
+      AX_APPEND_COMPILE_FLAGS_ERROR([-O0])],
+      [AX_APPEND_COMPILE_FLAGS_ERROR([-O2])])
 
     AX_APPEND_COMPILE_FLAGS_ERROR([-fstack-check])
     AX_APPEND_COMPILE_FLAGS_ERROR([-Wno-pragmas])
@@ -149,24 +150,27 @@ AC_DEFUN([AX_HARDEN_CC_COMPILER_FLAGS],
     AX_APPEND_COMPILE_FLAGS_ERROR([-floop-parallelize-all])
     AX_APPEND_COMPILE_FLAGS_ERROR([-fwrapv])
     AX_APPEND_COMPILE_FLAGS_ERROR([-fmudflapt])
+    AS_IF([test "x$ac_cv_vcs_checkout" = xyes], [AX_APPEND_COMPILE_FLAGS_ERROR([-Werror])])
     AC_LANG_POP([C])
-])
+  ])
 
 AC_DEFUN([AX_HARDEN_CXX_COMPILER_FLAGS],
     [AC_PREREQ([2.63])dnl
-    AC_REQUIRE([AX_HARDEN_CC_COMPILER_FLAGS])
-    AC_LANG_PUSH([C++])
+    AC_REQUIRE([AX_APPEND_LINK_FLAGS])
+    AC_REQUIRE([AX_CXX_COMPILER_VERSION])
+    AC_REQUIRE([AX_DEBUG])
+    AC_REQUIRE([AX_VCS_CHECKOUT])
 
-    AS_IF([test "x$ac_cv_warnings_as_errors" = xyes],
-      [AX_APPEND_COMPILE_FLAGS_ERROR([-Werror])],
-      [AX_APPEND_COMPILE_FLAGS_ERROR([-Werror])])
+    AC_LANG_PUSH([C++])
 
     AX_APPEND_COMPILE_FLAGS_ERROR([-g])
     AS_IF([test "x$ax_enable_debug" = xyes],
       [AX_APPEND_COMPILE_FLAGS_ERROR([-O0])
       AX_APPEND_COMPILE_FLAGS_ERROR([-ggdb])],
-      [AX_APPEND_COMPILE_FLAGS_ERROR([-O2])
-      AX_APPEND_COMPILE_FLAGS_ERROR([-D_FORTIFY_SOURCE=2])])
+      [AX_APPEND_COMPILE_FLAGS_ERROR([-O2])])
+
+    AS_IF([test "x$ac_c_gcc_recent" = xyes],
+      [AX_APPEND_COMPILE_FLAGS_ERROR([-D_FORTIFY_SOURCE=2])])
 
     AS_IF([test "x$ac_cv_vcs_checkout" = xyes],
       [AX_APPEND_COMPILE_FLAGS_ERROR([-Werror])
@@ -219,21 +223,38 @@ AC_DEFUN([AX_HARDEN_CXX_COMPILER_FLAGS],
     AX_APPEND_COMPILE_FLAGS_ERROR([-floop-parallelize-all])
     AX_APPEND_COMPILE_FLAGS_ERROR([-fwrapv])
     AX_APPEND_COMPILE_FLAGS_ERROR([-fmudflapt])
+    AS_IF([test "x$ac_cv_vcs_checkout" = xyes], [AX_APPEND_COMPILE_FLAGS_ERROR([-Werror])])
     AC_LANG_POP([C++])
   ])
 
   AC_DEFUN([AX_HARDEN_COMPILER_FLAGS],
       [AC_PREREQ([2.63])dnl
+      AC_REQUIRE([AX_APPEND_COMPILE_FLAGS])
+      AC_REQUIRE([AX_APPEND_LINK_FLAGS])
+      AC_REQUIRE([AX_CXX_COMPILER_VERSION])
+      AC_REQUIRE([AX_DEBUG])
+      AC_REQUIRE([AX_VCS_CHECKOUT])
+
+      AC_CACHE_CHECK([if all warnings into errors],[ac_cv_warnings_as_errors],
+        [AS_IF([test "x$ac_cv_vcs_checkout" = xyes],[ac_cv_warnings_as_errors=yes],
+          [ac_cv_warnings_as_errors=no])
+        ])
+
+# All of the actual checks happen via these Macros
+      AC_REQUIRE([AX_HARDEN_LINKER_FLAGS])
+      AC_REQUIRE([AX_HARDEN_CC_COMPILER_FLAGS])
       AC_REQUIRE([AX_HARDEN_CXX_COMPILER_FLAGS])
       AC_REQUIRE([AX_CC_OTHER_FLAGS])
+
       AC_REQUIRE([gl_VISIBILITY])
-      AS_IF([test -n "$CFLAG_VISIBILITY"],[ CPPFLAGS="$CPPFLAGS $CFLAG_VISIBILITY" ])
+      AS_IF([test -n "$CFLAG_VISIBILITY"],[CPPFLAGS="$CPPFLAGS $CFLAG_VISIBILITY"])
       ])
 
   AC_DEFUN([AX_CC_OTHER_FLAGS],
       [AC_PREREQ([2.63])dnl
       AC_REQUIRE([AX_APPEND_COMPILE_FLAGS_ERROR])
       AC_REQUIRE([AX_HARDEN_CC_COMPILER_FLAGS])
+
       AC_LANG_PUSH([C])
       AX_APPEND_COMPILE_FLAGS_ERROR([-pipe])
       AC_LANG_POP([C])
index ebe1f2ad4f15efae00fea31a7b04b6b016ed99da..af4d97a06a1e26b761c12c484a0902256198d1d6 100644 (file)
@@ -3,7 +3,7 @@
 #
 # SYNOPSIS
 #
-#   AX_LIBEVENT(), AX_LIBEVENT2()
+#   AX_LIBEVENT(), AX_LIBEVENT2(), AX_LIBEVENT2_EVHTTP()
 #
 # DESCRIPTION
 #
 
 #serial 2
  
-  AC_DEFUN([AX_LIBEVENT],[
-      AC_CACHE_CHECK([test for a working libevent], [ax_cv_libevent], [
-        AX_SAVE_FLAGS
-        LIBS="-levent $LIBS"
-        AC_LANG_PUSH([C])
-        AC_RUN_IFELSE([
-          AC_LANG_PROGRAM([
+AC_DEFUN([AX_LIBEVENT],
+    [AC_PREREQ([2.63])dnl
+    AC_CACHE_CHECK([test for a working libevent], [ax_cv_libevent], [
+      AX_SAVE_FLAGS
+      LIBS="-levent $LIBS"
+      AC_LANG_PUSH([C])
+      AC_RUN_IFELSE([
+        AC_LANG_PROGRAM([
 #include <sys/types.h>
 #include <sys/time.h>
 #include <stdlib.h>
 #include <event.h>
-            ], [
-            struct event_base *tmp_event= event_init();
-            event_base_free(tmp_event);
-            ])],
-          [ax_cv_libevent=yes],
-          [ax_cv_libevent=no],
-          [AC_MSG_WARN([test program execution failed])])
-        AC_LANG_POP
-        AX_RESTORE_FLAGS
-        ])
+          ], [
+          struct event_base *tmp_event= event_init();
+          event_base_free(tmp_event);
+          ])],
+        [ax_cv_libevent=yes],
+        [ax_cv_libevent=no],
+        [AC_MSG_WARN([test program execution failed])])
+      AC_LANG_POP
+      AX_RESTORE_FLAGS
+      ])
 
-      AS_IF([test "x$ax_cv_libevent" = "xyes"],[
+    AS_IF([test "x$ax_cv_libevent" = "xyes"],[
         LIBEVENT_LDFLAGS="-levent"
         AC_SUBST(LIBEVENT_LDFLAGS)
         AC_DEFINE([HAVE_LIBEVENT],[1],[Define if event_init is present in event.h.])],[
         AC_DEFINE([HAVE_LIBEVENT],[0],[Define if event_init is present in event.h.])
         ])
 
-      AM_CONDITIONAL(HAVE_LIBEVENT, test "x$ax_cv_libevent" = "xyes")
-      ])
+    AM_CONDITIONAL(HAVE_LIBEVENT, test "x$ax_cv_libevent" = "xyes")
+    ])
 
   AC_DEFUN([AX_LIBEVENT2],[
       AC_REQUIRE([AX_LIBEVENT])
@@ -64,8 +65,7 @@
 #include <sys/time.h>
 #include <stdlib.h>
 #include <event2/event.h>
-#include <event2/http.h>
-            ], [
+            ],[
             struct event_base *tmp_event= event_init();
             event_base_free(tmp_event);
             ])],
       AM_CONDITIONAL(HAVE_LIBEVENT2, test "x$ax_cv_libevent2" = "xyes")
       ])
 
+  AC_DEFUN([AX_LIBEVENT2_EVHTTP],[
+      AC_REQUIRE([AX_LIBEVENT2])
+      AC_CACHE_CHECK([test for a working libevent2 evhttp interface], [ax_cv_libevent2_evhttp], [
+        AX_SAVE_FLAGS
+        LIBS="-levent $LIBS"
+        AC_LANG_PUSH([C])
+        AC_RUN_IFELSE([
+          AC_LANG_PROGRAM([
+#include <sys/types.h>
+#include <sys/time.h>
+#include <stdlib.h>
+#include <event2/event.h>
+#include <event2/http.h>
+            ],[
+            struct event_base *libbase= event_base_new();  
+            struct evhttp *libsrvr= evhttp_new(libbase);
+            ])],
+          [ax_cv_libevent2_evhttp=yes],
+          [ax_cv_libevent2_evhttp=no],
+          [AC_MSG_WARN([test program execution failed])])
+        AC_LANG_POP
+        AX_RESTORE_FLAGS
+        ])
+
+      AS_IF([test "x$ax_cv_libevent2_evhttp" = "xyes"],[
+        LIBEVENT2_LDFLAGS="-levent"
+        AC_SUBST(LIBEVENT2_LDFLAGS)
+        AC_DEFINE([HAVE_LIBEVENT2],[1],[Define if event_init is present in event2/event.h.])],[
+        AC_DEFINE([HAVE_LIBEVENT2],[0],[Define if event_init is present in event2/event.h.])
+        ])
+
+      AM_CONDITIONAL(HAVE_LIBEVENT2_EVHTTP, test "x$ax_cv_libevent2_evhttp" = "xyes")
+      ])
index e0d54ad935627dc258cd2d93a9bf79c7e72722e8..71b932e07da39281595fac5cbcbe10690b8412f7 100644 (file)
@@ -82,7 +82,7 @@
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 18
+#serial 19
 
 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
 AC_DEFUN([AX_PTHREAD], [
index 9f902c0aa7563674a2620457511e0a15559bfd33..4b094c5603f78b0ffa6b09f6d9e12e13ffb97779 100644 (file)
@@ -56,6 +56,7 @@ AC_DEFUN([AX_VCS_SYSTEM],
       AS_IF([test -d ".hg"],[ac_cv_vcs_system="mercurial"])
       AS_IF([test -d ".git"],[ac_cv_vcs_system="git"])
       ])
+    AC_DEFINE_UNQUOTED([VCS_SYSTEM],["$ac_cv_vcs_system"],[VCS system])
     ])
 
 AC_DEFUN([AX_VCS_CHECKOUT],
@@ -68,7 +69,6 @@ AC_DEFUN([AX_VCS_CHECKOUT],
       ])
 
     AM_CONDITIONAL([IS_VCS_CHECKOUT], [test "x$ac_cv_vcs_checkout" = "xyes"])
-    AS_IF([test "x$ac_cv_vcs_checkout" = "xyes"],
-      [AC_DEFINE([VCS_CHECKOUT], [1], [Define if the code was built from VCS.])
-      ])
+    AS_IF([test "x$ac_cv_vcs_checkout" = "xyes"],[AC_DEFINE([VCS_CHECKOUT],[1],[Define if the code was built from VCS.])],
+      [AC_DEFINE([VCS_CHECKOUT],[0],[Define if the code was built from VCS.])])
     ])
index 6d03cf5d6ceae9126358269be8f4cc8b2d576570..3ba1316a4b6f3f264dba0c6bc7fa3626ddca7b43 100644 (file)
@@ -4,7 +4,7 @@
 #
 # SYNOPSIS
 #
-#   AX_CXX_CINTTYPES
+#   AX_CXX_CINTTYPES()
 #
 # DESCRIPTION
 #
@@ -48,7 +48,7 @@ AC_DEFUN([AX_CXX_CINTTYPES], [
     AC_REQUIRE([AX_CXX_CSTDINT])
 
     AC_CACHE_CHECK([for location of cinttypes], [ac_cv_cxx_cinttypes], [
-      save_CXXFLAGS="${CXXFLAGS}"
+      AX_SAVE_FLAGS
       CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}"
       AC_LANG_PUSH([C++])
 
@@ -73,7 +73,7 @@ AC_DEFUN([AX_CXX_CINTTYPES], [
         [ac_cxx_cinttypes_boost_cinttypes_hpp="<boost/cinttypes.hpp>"])
 
       AC_LANG_POP
-      CXXFLAGS="${save_CXXFLAGS}"
+      AX_RESTORE_FLAGS
 
       AS_IF([test -n "$ac_cxx_cinttypes_cinttypes"], [ac_cv_cxx_cinttypes=$ac_cxx_cinttypes_cinttypes],
           [test -n "$ac_cxx_cinttypes_tr1_cinttypes"], [ac_cv_cxx_cinttypes=$ac_cxx_cinttypes_tr1_cinttypes],
index 685d4ade4b775e7caf8bf31be9ad36b6314c33f7..11d9616f2abdddd885e0df3e8a3a7e9355795648 100644 (file)
@@ -4,7 +4,7 @@
 #
 # SYNOPSIS
 #
-#   AX_CXX_CSTDINT
+#   AX_CXX_CSTDINT()
 #
 # DESCRIPTION
 #
@@ -49,7 +49,7 @@ AC_DEFUN([AX_CXX_CSTDINT], [
 
     AC_CACHE_CHECK([for location of cstdint], [ac_cv_cxx_cstdint], [
       AC_LANG_PUSH([C++])
-      save_CXXFLAGS="${CXXFLAGS}"
+      AX_SAVE_FLAGS
       CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}"
 
       AC_COMPILE_IFELSE([
@@ -65,16 +65,14 @@ AC_DEFUN([AX_CXX_CSTDINT], [
         [ac_cxx_cstdint_boost_cstdint_hpp="<boost/cstdint.hpp>"])
 
       AC_LANG_POP
-      CXXFLAGS="${save_CXXFLAGS}"
+      AX_RESTORE_FLAGS
 
       AS_IF([test -n "$ac_cxx_cstdint_cstdint"], [ac_cv_cxx_cstdint=$ac_cxx_cstdint_cstdint],
         [test -n "$ac_cxx_cstdint_tr1_cstdint"], [ac_cv_cxx_cstdint=$ac_cxx_cstdint_tr1_cstdint],
         [test -n "$ac_cxx_cstdint_boost_cstdint_hpp"], [ac_cv_cxx_cstdint=$ac_cxx_cstdint_boost_cstdint_hpp])
       ])
 
-  AS_IF([test -n "$ac_cv_cxx_cstdint"], [
-      AC_MSG_RESULT([$ac_cv_cxx_cstdint])
-      ],[
+  AS_IF([test -n "$ac_cv_cxx_cstdint"], [AC_MSG_RESULT([$ac_cv_cxx_cstdint])], [
       ac_cv_cxx_cstdint="<stdint.h>"
       AC_MSG_WARN([Could not find a cstdint header.])
       AC_MSG_RESULT([$ac_cv_cxx_cstdint])