Update m4
authorBrian Aker <brian@tangent.org>
Wed, 31 Oct 2012 21:28:09 +0000 (17:28 -0400)
committerBrian Aker <brian@tangent.org>
Wed, 31 Oct 2012 21:28:09 +0000 (17:28 -0400)
bootstrap.sh
m4/ax_assert.m4
m4/ax_debug.m4
m4/ax_harden_compiler_flags.m4
m4/ax_hex_version.m4
m4/ax_prog_sphinx_build.m4
m4/ax_pthread_timedjoin_np.m4
m4/ax_uuid.m4
m4/ax_vcs_checkout.m4

index ad4751a6fad1cecde6f9cbdbd37a791d246b07a8..d822e592a33963d39b25515592c52191bfe7dc97 100755 (executable)
@@ -672,7 +672,7 @@ function make_target ()
     run_configure
   fi
 
-  if test -n "$TESTS_ENVIRONMENT" -a $VERBOSE; then
+  if [ -n "$TESTS_ENVIRONMENT" -a $VERBOSE ]; then
     echo "TESTS_ENVIRONMENT=$TESTS_ENVIRONMENT"
   fi
 
@@ -869,6 +869,10 @@ autoreconf_setup ()
     GNU_BUILD_FLAGS="$GNU_BUILD_FLAGS --verbose"
   fi
 
+  if [ -z "$ACLOCAL_PATH" ]; then
+    ACLOCAL_PATH="/usr/local/share/aclocal $ACLOCAL_PATH"
+  fi
+
   if [[ -z "$WARNINGS" ]]; then
     if [[ -n "$VCS_CHECKOUT" ]]; then
       WARNINGS="all,error"
index 25cd625f4d4e6e589e0759e99bba238b9b321d4c..d13787cd4480c2df4a9d4ec2b2d1a444b1ce986d 100644 (file)
 #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-#serial 2
+#serial 4
 
-AC_DEFUN([AX_ASSERT],[
+AC_DEFUN([AX_ASSERT],
+    [AC_PREREQ([2.63])dnl
     AC_REQUIRE([AX_DEBUG])
     AC_ARG_ENABLE([assert],
       [AS_HELP_STRING([--enable-assert],
index d2e9a480f7e3737d2c1ed6408653e7d09816a996..d83a87e9cfbfa8d559336b904b0403a6bed5f481 100644 (file)
 #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-#serial 1
+#serial 3
 
-AC_DEFUN([AX_DEBUG],[
+AC_DEFUN([AX_DEBUG],
+    [AC_PREREQ([2.63])dnl
     AC_ARG_ENABLE([debug],
       [AS_HELP_STRING([--enable-debug],
         [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],[
index af3ee7ff13fe54ffb12722b54ff8537253c4cfe0..247665caf8f5de88fea94133a343c50c7d23fa60 100644 (file)
 # AX_APPEND_COMPILE_FLAGS([-fstack-protector-all]) -- Issues on 32bit compile
 # AX_APPEND_COMPILE_FLAGS([-Wlong-long]) -- Don't turn on for compatibility issues memcached_stat_st
 
-#serial 4
-
-  AC_DEFUN([AX_HARDEN_LINKER_FLAGS], [
-      AC_REQUIRE([AX_CHECK_LINK_FLAG])
-      AC_REQUIRE([AX_VCS_CHECKOUT])
-      AC_REQUIRE([AX_DEBUG])
-      AC_REQUIRE([AX_CXX_COMPILER_VERSION])
-
-      dnl If we are inside of VCS we append -Werror, otherwise we just use it to test other flags
-      AX_HARDEN_LIB=
-      ax_append_compile_link_flags_extra=
-      AS_IF([test "x$ac_cv_vcs_checkout" = "xyes"],[
-        AX_CHECK_LINK_FLAG([-Werror],[
-          AX_HARDEN_LIB="-Werror $AX_HARDEN_LIB"
-          ])
-        ],[
-        AX_CHECK_LINK_FLAG([-Werror],[
-          ax_append_compile_link_flags_extra='-Werror'
-          ])
+#serial 5
+
+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_CXX_COMPILER_VERSION])
+
+    dnl If we are inside of VCS we append -Werror, otherwise we just use it to test other flags
+    AX_HARDEN_LIB=
+    ax_append_compile_link_flags_extra=
+    AS_IF([test "x$ac_cv_vcs_checkout" = "xyes"],
+      [AX_CHECK_LINK_FLAG([-Werror],
+        [AX_HARDEN_LIB="-Werror $AX_HARDEN_LIB"])
+      ],
+      [AX_CHECK_LINK_FLAG([-Werror],[
+        ax_append_compile_link_flags_extra='-Werror'
         ])
+      ])
 
-      AX_CHECK_LINK_FLAG([-z relro -z now],[
-        AX_HARDEN_LIB="-z relro -z now $AX_HARDEN_LIB"
-      ],,[$ax_append_compile_link_flags_extra])
+    AX_CHECK_LINK_FLAG([-z relro -z now],
+      [AX_HARDEN_LIB="-z relro -z now $AX_HARDEN_LIB"],,
+      [$ax_append_compile_link_flags_extra])
 
-      AX_CHECK_LINK_FLAG([-pie],[
-          AX_HARDEN_LIB="-pie $AX_HARDEN_LIB"
-          ],,[$ax_append_compile_link_flags_extra])
+    AX_CHECK_LINK_FLAG([-pie],
+        [AX_HARDEN_LIB="-pie $AX_HARDEN_LIB"],,
+        [$ax_append_compile_link_flags_extra])
 
-      LIB="$LIB $AX_HARDEN_LIB"
-      ])
+    LIB="$LIB $AX_HARDEN_LIB"
+    ])
 
-  AC_DEFUN([AX_HARDEN_CC_COMPILER_FLAGS], [
-      AC_REQUIRE([AX_APPEND_COMPILE_FLAGS])
-      AC_REQUIRE([AX_HARDEN_LINKER_FLAGS])
+      AC_DEFUN([AX_HARDEN_CC_COMPILER_FLAGS],
+          [AC_PREREQ([2.63])dnl
+          AC_REQUIRE([AX_APPEND_COMPILE_FLAGS])
+          AC_REQUIRE([AX_HARDEN_LINKER_FLAGS])
 
-      AC_LANG_PUSH([C])
+          AC_LANG_PUSH([C])
 
-      ac_cv_warnings_as_errors=no
-      ax_append_compile_cflags_extra=
-      AS_IF([test "$ac_cv_vcs_checkout" = "yes"],[
-        AX_APPEND_COMPILE_FLAGS([-Werror])
-        ac_cv_warnings_as_errors=yes
-        ],[
-        AX_APPEND_COMPILE_FLAGS([-Werror],[ax_append_compile_cflags_extra])
-        ])
+          ac_cv_warnings_as_errors=no
+          ax_append_compile_cflags_extra=
+          AS_IF([test "$ac_cv_vcs_checkout" = "yes"],[
+            AX_APPEND_COMPILE_FLAGS([-Werror])
+            ac_cv_warnings_as_errors=yes
+            ],[
+            AX_APPEND_COMPILE_FLAGS([-Werror],[ax_append_compile_cflags_extra])
+            ])
 
-      AX_APPEND_COMPILE_FLAGS([-g])
-      AS_IF([test "$ax_enable_debug" = "yes"], [
-        AX_APPEND_COMPILE_FLAGS([-ggdb],,[$ax_append_compile_cflags_extra])
-        AX_APPEND_COMPILE_FLAGS([-O0],,[$ax_append_compile_cflags_extra])
-        ],[
-        AX_APPEND_COMPILE_FLAGS([-O2],,[$ax_append_compile_cflags_extra])
-        ])
+          AX_APPEND_COMPILE_FLAGS([-g])
+          AS_IF([test "$ax_enable_debug" = "yes"], [
+            AX_APPEND_COMPILE_FLAGS([-ggdb],,[$ax_append_compile_cflags_extra])
+            AX_APPEND_COMPILE_FLAGS([-O0],,[$ax_append_compile_cflags_extra])
+            ],[
+            AX_APPEND_COMPILE_FLAGS([-O2],,[$ax_append_compile_cflags_extra])
+            ])
+
+  AX_APPEND_COMPILE_FLAGS([-fstack-check],,[$ax_append_compile_cflags_extra])
+AX_APPEND_COMPILE_FLAGS([-Wno-pragmas],,[$ax_append_compile_cflags_extra])
 
-      AX_APPEND_COMPILE_FLAGS([-fstack-check],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wno-pragmas],,[$ax_append_compile_cflags_extra])
-
-      AX_APPEND_COMPILE_FLAGS([-Wall],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wextra],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wunknown-pragmas],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wthis-test-should-fail],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-std=c99],,[$ax_append_compile_cflags_extra])
-      dnl Anything below this comment please keep sorted.
-      AX_APPEND_COMPILE_FLAGS([--param=ssp-buffer-size=1],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Waddress],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Warray-bounds],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wbad-function-cast],,[$ax_append_compile_cflags_extra])
-      dnl Not in use -Wc++-compat
-      AX_APPEND_COMPILE_FLAGS([-Wchar-subscripts],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wcomment],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wfloat-equal],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wformat-security],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wformat=2],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wlogical-op],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wmaybe-uninitialized],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wmissing-field-initializers],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wall],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wextra],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wunknown-pragmas],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wthis-test-should-fail],,[$ax_append_compile_cflags_extra])
+AX_APPEND_COMPILE_FLAGS([-std=c99],,[$ax_append_compile_cflags_extra])
+  dnl Anything below this comment please keep sorted.
+AX_APPEND_COMPILE_FLAGS([--param=ssp-buffer-size=1],,[$ax_append_compile_cflags_extra])
+  dnl -Wmissing-format-attribute
+  AX_APPEND_COMPILE_FLAGS([-Wno-attributes],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Waddress],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Warray-bounds],,[$ax_append_compile_cflags_extra])
+AX_APPEND_COMPILE_FLAGS([-Wbad-function-cast],,[$ax_append_compile_cflags_extra])
+  dnl Not in use -Wc++-compat
+  AX_APPEND_COMPILE_FLAGS([-Wchar-subscripts],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wcomment],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wfloat-equal],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wformat-security],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wformat=2],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wlogical-op],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wmaybe-uninitialized],,[$ax_append_compile_cflags_extra])
+AX_APPEND_COMPILE_FLAGS([-Wmissing-field-initializers],,[$ax_append_compile_cflags_extra])
+  AS_IF([test "$MINGW" = "yes"],[
+      AX_APPEND_COMPILE_FLAGS([-Wno-missing-noreturn],,[$ax_append_compile_cflags_extra])
+      ],[
       AX_APPEND_COMPILE_FLAGS([-Wmissing-noreturn],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wmissing-prototypes],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wnested-externs],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wnormalized=id],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wold-style-definition],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Woverride-init],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wpointer-arith],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wpointer-sign],,[$ax_append_compile_cflags_extra])
+      ])
+  AX_APPEND_COMPILE_FLAGS([-Wmissing-prototypes],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wnested-externs],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wnormalized=id],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wold-style-definition],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Woverride-init],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wpointer-arith],,[$ax_append_compile_cflags_extra])
+AX_APPEND_COMPILE_FLAGS([-Wpointer-sign],,[$ax_append_compile_cflags_extra])
+  AS_IF([test "$MINGW" = "yes"],[
+      AX_APPEND_COMPILE_FLAGS([-Wno-suggest-attribute=const],,[$ax_append_compile_cflags_extra])
+      AX_APPEND_COMPILE_FLAGS([-Wno-suggest-attribute=noreturn],,[$ax_append_compile_cflags_extra])
+      AX_APPEND_COMPILE_FLAGS([-Wno-suggest-attribute=pure],,[$ax_append_compile_cflags_extra])
+      AX_APPEND_COMPILE_FLAGS([-Wno-redundant-decls],,[$ax_append_compile_cflags_extra])
+      ],[
       AX_APPEND_COMPILE_FLAGS([-Wredundant-decls],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wshadow],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wshorten-64-to-32],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wsign-compare],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wstrict-overflow=1],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wstrict-prototypes],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wswitch-enum],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wundef],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wunused-result],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wunused-variable],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wwrite-strings],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-floop-parallelize-all],,[$ax_append_compile_cflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-fwrapv],,[$ax_append_compile_cflags_extra])
-      AC_LANG_POP
       ])
+  AX_APPEND_COMPILE_FLAGS([-Wshadow],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wshorten-64-to-32],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wsign-compare],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wstrict-overflow=1],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wstrict-prototypes],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wswitch-enum],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wundef],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wunused],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wunused-result],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wunused-variable],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wwrite-strings],,[$ax_append_compile_cflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-floop-parallelize-all],,[$ax_append_compile_cflags_extra])
+AX_APPEND_COMPILE_FLAGS([-fwrapv],,[$ax_append_compile_cflags_extra])
+  AC_LANG_POP
+  ])
 
-  AC_DEFUN([AX_HARDEN_CXX_COMPILER_FLAGS], [
+  AC_DEFUN([AX_HARDEN_CXX_COMPILER_FLAGS],
+      [AC_PREREQ([2.63])dnl
       AC_REQUIRE([AX_HARDEN_CC_COMPILER_FLAGS])
       AC_LANG_PUSH([C++])
 
         ])
 
       AX_APPEND_COMPILE_FLAGS([-g],,[$ax_append_compile_cxxflags_extra])
-      AS_IF([test "$ax_enable_debug" = "yes" ], [
+      AS_IF([test "$ax_enable_debug" = "yes"], [
         AX_APPEND_COMPILE_FLAGS([-O0],,[$ax_append_compile_cxxflags_extra])
         AX_APPEND_COMPILE_FLAGS([-ggdb],,[$ax_append_compile_cxxflags_extra])
         ],[
         AX_APPEND_COMPILE_FLAGS([-D_FORTIFY_SOURCE=2],,[$ax_append_compile_cxxflags_extra])
         ])
 
-      AS_IF([test "$ac_cv_vcs_checkout" = "yes" ], [
-        AX_APPEND_COMPILE_FLAGS([-Werror],,[$ax_append_compile_cxxflags_extra])
-        AX_APPEND_COMPILE_FLAGS([-fstack-check],,[$ax_append_compile_cxxflags_extra])
-        ],[
-        AX_APPEND_COMPILE_FLAGS([-Wno-pragmas],,[$ax_append_compile_cxxflags_extra])
-        ])
+  AS_IF([test "$ac_cv_vcs_checkout" = "yes"], [
+      AX_APPEND_COMPILE_FLAGS([-Werror],,[$ax_append_compile_cxxflags_extra])
+      AX_APPEND_COMPILE_FLAGS([-fstack-check],,[$ax_append_compile_cxxflags_extra])
+      ],[
+      AX_APPEND_COMPILE_FLAGS([-Wno-pragmas],,[$ax_append_compile_cxxflags_extra])
+      ])
 
-      AX_APPEND_COMPILE_FLAGS([-Wall],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wextra],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wunknown-pragmas],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wthis-test-should-fail],,[$ax_append_compile_cxxflags_extra])
-      dnl Anything below this comment please keep sorted.
-      AX_APPEND_COMPILE_FLAGS([--param=ssp-buffer-size=1],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Waddress],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Warray-bounds],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wchar-subscripts],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wcomment],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wctor-dtor-privacy],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wfloat-equal],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wformat=2],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wmaybe-uninitialized],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wmissing-field-initializers],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wall],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wextra],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wunknown-pragmas],,[$ax_append_compile_cxxflags_extra])
+AX_APPEND_COMPILE_FLAGS([-Wthis-test-should-fail],,[$ax_append_compile_cxxflags_extra])
+  dnl Anything below this comment please keep sorted.
+AX_APPEND_COMPILE_FLAGS([--param=ssp-buffer-size=1],,[$ax_append_compile_cxxflags_extra])
+  dnl -Wmissing-format-attribute
+  AX_APPEND_COMPILE_FLAGS([-Wno-attributes],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Waddress],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Warray-bounds],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wchar-subscripts],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wcomment],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wctor-dtor-privacy],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wfloat-equal],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wformat=2],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wmaybe-uninitialized],,[$ax_append_compile_cxxflags_extra])
+AX_APPEND_COMPILE_FLAGS([-Wmissing-field-initializers],,[$ax_append_compile_cxxflags_extra])
+  AS_IF([test "$MINGW" = "yes"],[
+      AX_APPEND_COMPILE_FLAGS([-Wno-missing-noreturn],,[$ax_append_compile_cxxflags_extra])
+      ],[
       AX_APPEND_COMPILE_FLAGS([-Wmissing-noreturn],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wlogical-op],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wnon-virtual-dtor],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wnormalized=id],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Woverloaded-virtual],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wpointer-arith],,[$ax_append_compile_cxxflags_extra])
+      ])
+  AX_APPEND_COMPILE_FLAGS([-Wlogical-op],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wnon-virtual-dtor],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wnormalized=id],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Woverloaded-virtual],,[$ax_append_compile_cxxflags_extra])
+AX_APPEND_COMPILE_FLAGS([-Wpointer-arith],,[$ax_append_compile_cxxflags_extra])
+  AS_IF([test "$MINGW" = "yes"],[
+      AX_APPEND_COMPILE_FLAGS([-Wno-suggest-attribute=const],,[$ax_append_compile_cxxflags_extra])
+      AX_APPEND_COMPILE_FLAGS([-Wno-suggest-attribute=noreturn],,[$ax_append_compile_cxxflags_extra])
+      AX_APPEND_COMPILE_FLAGS([-Wno-error=suggest-attribute=noreturn],,[$ax_append_compile_cxxflags_extra])
+      AX_APPEND_COMPILE_FLAGS([-Wno-redundant-decls],,[$ax_append_compile_cxxflags_extra])
+      ],[
       AX_APPEND_COMPILE_FLAGS([-Wredundant-decls],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wshadow],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wshorten-64-to-32],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wsign-compare],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wstrict-overflow=1],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wswitch-enum],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wundef],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wc++11-compat],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wunused-result],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wunused-variable],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wwrite-strings],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-Wformat-security],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-floop-parallelize-all],,[$ax_append_compile_cxxflags_extra])
-      AX_APPEND_COMPILE_FLAGS([-fwrapv],,[$ax_append_compile_cxxflags_extra])
-      AC_LANG_POP
+      ])
+  AX_APPEND_COMPILE_FLAGS([-Wshadow],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wshorten-64-to-32],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wsign-compare],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wstrict-overflow=1],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wswitch-enum],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wundef],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wc++11-compat],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wunused],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wunused-result],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wunused-variable],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wwrite-strings],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-Wformat-security],,[$ax_append_compile_cxxflags_extra])
+  AX_APPEND_COMPILE_FLAGS([-floop-parallelize-all],,[$ax_append_compile_cxxflags_extra])
+AX_APPEND_COMPILE_FLAGS([-fwrapv],,[$ax_append_compile_cxxflags_extra])
+  AC_LANG_POP
   ])
 
-  AC_DEFUN([AX_HARDEN_COMPILER_FLAGS], [
+  AC_DEFUN([AX_HARDEN_COMPILER_FLAGS],
+      [AC_PREREQ([2.63])dnl
       AC_REQUIRE([AX_HARDEN_CXX_COMPILER_FLAGS])
       AC_REQUIRE([AX_CC_OTHER_FLAGS])
       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_DEFUN([AX_CC_OTHER_FLAGS],
+      [AC_PREREQ([2.63])dnl
       AC_REQUIRE([AX_APPEND_COMPILE_FLAGS])
       AC_REQUIRE([AX_HARDEN_CC_COMPILER_FLAGS])
 
index bf1bcc1c00966654aaf9c3a2c0ff3c28e2a1f6e2..48d3a7370258e4988907657adac86bb8c33a25a0 100644 (file)
 #   and this notice are preserved. This file is offered as-is, without any
 #   warranty.
 
-#serial 2
+#serial 3
  
-AC_DEFUN([AX_HEX_VERSION],[
+AC_DEFUN([AX_HEX_VERSION],
+    [AC_PREREQ([2.63])dnl
 
     string_version_$1=`echo $2 | sed 's|[\-a-z0-9]*$||' | awk -F. '{printf "%d.%d.%d", $[]1, $[]2, $[]3}'`
     hex_version_$1=`echo $2 | sed 's|[\-a-z0-9]*$||' | awk -F. '{printf "0x%0.2d%0.3d%0.3d", $[]1, $[]2, $[]3}'`
index 713281bf1ae421d1e8cf379337c7ffc4fe4a2b11..8b69df83c01391cd3c77cf1d0d919eb4bcb4f209 100644 (file)
@@ -4,7 +4,7 @@
 #
 # SYNOPSIS
 #
-#   AX_PROG_SPHINX_BUILD
+#   AX_PROG_SPHINX_BUILD()
 #
 # DESCRIPTION
 #
 #   and this notice are preserved. This file is offered as-is, without any
 #   warranty.
 
-#serial 1
+#serial 2
 
-  AC_DEFUN([AX_PROG_SPHINX_BUILD], [
-      AC_CHECK_PROGS([PERL], [perl])
-      AC_CHECK_PROGS([DPKG_GENSYMBOLS], [dpkg-gensymbols], [:])
-      AC_CHECK_PROGS([LCOV], [lcov], [echo lcov not found])
-      AC_CHECK_PROGS([LCOV_GENHTML], [genhtml], [echo genhtml not found])
+AC_DEFUN([AX_PROG_SPHINX_BUILD],
+    [AC_PREREQ([2.63])dnl
+    AC_CHECK_PROGS([PERL], [perl])
+    AC_CHECK_PROGS([DPKG_GENSYMBOLS], [dpkg-gensymbols], [:])
+    AC_CHECK_PROGS([LCOV], [lcov], [echo lcov not found])
+    AC_CHECK_PROGS([LCOV_GENHTML], [genhtml], [echo genhtml not found])
 
-      AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build], [:])
-      AS_IF([test "x${SPHINXBUILD}" != "x:"],[
-        AC_CACHE_CHECK([if sphinx is new enough],[ac_cv_recent_sphinx],[
+    AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build], [:])
+    AS_IF([test "x${SPHINXBUILD}" != "x:"],[
+      AC_CACHE_CHECK([if sphinx is new enough],[ac_cv_recent_sphinx],[
 
-          ${SPHINXBUILD} -Q -C -b man -d conftest.d . . >/dev/null 2>&1
-          AS_IF([test $? -eq 0],[ac_cv_recent_sphinx=yes],
-            [ac_cv_recent_sphinx=no])
-          rm -rf conftest.d
-          ])
+        ${SPHINXBUILD} -Q -C -b man -d conftest.d . . >/dev/null 2>&1
+        AS_IF([test $? -eq 0],[ac_cv_recent_sphinx=yes],
+          [ac_cv_recent_sphinx=no])
+        rm -rf conftest.d
         ])
-
-      AM_CONDITIONAL(HAVE_DPKG_GENSYMBOLS,[test "x${DPKG_GENSYMBOLS}" != "x:"])
-      AM_CONDITIONAL(HAVE_SPHINX,[test "x${SPHINXBUILD}" != "x:"])
-      AM_CONDITIONAL(HAVE_RECENT_SPHINX,[test "x${ac_cv_recent_sphinx}" = "xyes"])
       ])
+
+    AM_CONDITIONAL(HAVE_DPKG_GENSYMBOLS,[test "x${DPKG_GENSYMBOLS}" != "x:"])
+    AM_CONDITIONAL(HAVE_SPHINX,[test "x${SPHINXBUILD}" != "x:"])
+    AM_CONDITIONAL(HAVE_RECENT_SPHINX,[test "x${ac_cv_recent_sphinx}" = "xyes"])
+])
index daec6c568be55e1e8bd1602d338c6fd58346dbd7..39de8fa8f041b66082fcfa3b85c7618402d5def1 100644 (file)
 #   and this notice are preserved. This file is offered as-is, without any
 #   warranty.
 
-#serial 5
+#serial 6
 
-  AC_DEFUN([AX_PTHREAD_TIMEDJOIN_NP], [
-      AC_REQUIRE([AX_PTHREAD])
-      AC_CACHE_CHECK([check for pthread_timedjoin_np], [ax_cv_pthread_timedjoin_np], [
-        AX_SAVE_FLAGS
-        CFLAGS="$PTHREAD_CFLAGS"
-        LIBS="$PTHREAD_LIBS"
-        AC_LANG_PUSH([C])
-        AC_LINK_IFELSE([
-          AC_LANG_PROGRAM([
+AC_DEFUN([AX_PTHREAD_TIMEDJOIN_NP],
+    [AC_PREREQ([2.63])dnl
+    AC_REQUIRE([AX_PTHREAD])
+    AC_CACHE_CHECK([check for pthread_timedjoin_np], [ax_cv_pthread_timedjoin_np],
+      [AX_SAVE_FLAGS
+      CFLAGS="$PTHREAD_CFLAGS"
+      LIBS="$PTHREAD_LIBS"
+      AC_LANG_PUSH([C])
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+          [
 #include <pthread.h>
 #include <stdlib.h>
-            ], [
-            pthread_t thread;
-            pthread_timedjoin_np(thread, NULL, NULL);
-            ])],
-          [ax_cv_pthread_timedjoin_np=yes],
-          [])
+          ],[
+          pthread_t thread;
+          pthread_timedjoin_np(thread, NULL, NULL);
+          ])],
+        [ax_cv_pthread_timedjoin_np=yes],[])
 
-        AC_LANG_POP
-        AX_RESTORE_FLAGS
-      ])
-
-      AS_IF([test "$ax_cv_pthread_timedjoin_np" = yes],[
-          AC_DEFINE(HAVE_PTHREAD_TIMEDJOIN_NP,[1],[Define if pthread_timedjoin_np is present in pthread.h.])],[
-          AC_DEFINE(HAVE_PTHREAD_TIMEDJOIN_NP,[0],[Define if pthread_timedjoin_np is present in pthread.h.])
-          ])
+      AC_LANG_POP
+      AX_RESTORE_FLAGS
       ])
 
+    AS_IF([test "$ax_cv_pthread_timedjoin_np" = yes],
+        [AC_DEFINE(HAVE_PTHREAD_TIMEDJOIN_NP,[1],[Define if pthread_timedjoin_np is present in pthread.h.])],
+        [AC_DEFINE(HAVE_PTHREAD_TIMEDJOIN_NP,[0],[Define if pthread_timedjoin_np is present in pthread.h.])])
+    ])
index 5f272e18e9159a46dcc5cea40ca04904290de7f6..a6b5b496ece7f7067f67a7551bb5ee2dc4e8690f 100644 (file)
@@ -1,11 +1,12 @@
+# vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 # ===========================================================================
 # https://github.com/BrianAker/ddm4
 # ===========================================================================
 #
 # SYNOPSIS
 #
-#   AX_UUID
-#   AX_UUID_GENERATE_TIME_SAFE
+#   AX_UUID()
+#   AX_UUID_GENERATE_TIME_SAFE()
 #
 # DESCRIPTION
 #
 #   and this notice are preserved. This file is offered as-is, without any
 #   warranty.
 
-#serial 4
+#serial 5
 
-AC_DEFUN([AX_UUID], [
-    AC_CHECK_HEADER([uuid/uuid.h], [
-      AC_CACHE_CHECK([check to see if -luuid is not needed], [ax_cv_libuuid_is_required], [
-        AC_LANG_PUSH([C])
-        AC_RUN_IFELSE([
-          AC_LANG_PROGRAM([#include <uuid/uuid.h>], [
+AC_DEFUN([AX_UUID],
+    [AC_PREREQ([2.63])dnl
+    AC_CHECK_HEADER([uuid/uuid.h],[
+
+      AC_CACHE_CHECK([check to see if -luuid is needed], [ax_cv_libuuid_is_required],
+        [AC_LANG_PUSH([C])
+        AC_RUN_IFELSE(
+          [AC_LANG_PROGRAM([#include <uuid/uuid.h>], [
             uuid_t out;
             uuid_generate(out);
             ])],
           [ax_cv_libuuid_is_required=no],
-          [ax_cv_libuuid_is_required=maybe],
+          [ax_cv_libuuid_is_required=yes],
           [AC_MSG_WARN([test program execution failed])])
         AC_LANG_POP
         ])
 
-      AS_IF([test "$ax_cv_libuuid_is_required" = maybe], [
-        AC_CACHE_CHECK([check to see if -luuid is needed], [ax_cv_libuuid_works], [
-          save_LIBS="$LIBS"
+      AS_IF([test "$ax_cv_libuuid_is_required" = yes],
+        [AC_CACHE_CHECK([check to see if -luuid is needed], [ax_cv_libuuid_works],
+          [AX_SAVE_FLAGS
           LIBS="-luuid $LIBS"
           AC_LANG_PUSH([C])
-          AC_RUN_IFELSE([
-            AC_LANG_PROGRAM([#include <uuid/uuid.h>], [
+          AC_RUN_IFELSE(
+            [AC_LANG_PROGRAM([#include <uuid/uuid.h>], [
               uuid_t out;
               uuid_generate(out);
               ])],
@@ -51,31 +54,34 @@ AC_DEFUN([AX_UUID], [
             [ax_cv_libuuid_works=no],
             [AC_MSG_WARN([test program execution failed])])
           AC_LANG_POP
-          LIBS="$save_LIBS"
-          ])
-        AS_IF([test "$ax_cv_libuuid_works" = yes], [
-          AC_SUBST([LIBUUID_LDFLAGS],[-luuid])])
+          AX_RESTORE_FLAGS])
         ])
 
-      AS_IF([test "$ax_cv_libuuid_is_required" = no], [UUID_UUID_H=yes])
-      AS_IF([test "$ax_cv_libuuid_works" = yes], [UUID_UUID_H=yes])
-      ])
+      AS_IF([test "$ax_cv_libuuid_is_required" = yes],
+          [AS_IF([test "$ax_cv_libuuid_works" = yes],[ax_libuuid=yes])],
+          [ax_libuuid=yes])
+      ],[ax_libuuid=no])
 
-  AS_IF([test "$UUID_UUID_H" = yes], [
-      AC_DEFINE([HAVE_UUID_UUID_H], [1], [Have uuid/uuid.h])
-      ],[
-      AC_DEFINE([HAVE_UUID_UUID_H], [0], [Have uuid/uuid.h])
-      ])
+      AS_IF([test "$ax_libuuid" = yes],
+          [AC_DEFINE([HAVE_UUID_UUID_H],[1],[Have uuid/uuid.h])
+          AS_IF([test "$ax_cv_libuuid_is_required" = yes],[ LIBUUID_LDFLAGS='-luuid' ])],
+          [AC_DEFINE([HAVE_UUID_UUID_H],[0],[Have uuid/uuid.h])
+          ])
+
+  AC_SUBST([LIBUUID_LDFLAGS])
+  AM_CONDITIONAL([HAVE_LIBUUID],[test "$ax_libuuid" = yes])
   ])
 
-  AC_DEFUN([AX_UUID_GENERATE_TIME_SAFE], [
-      AC_REQUIRE([AX_UUID])
-      AC_CACHE_CHECK([for uuid_generate_time_safe], [ax_cv_uuid_generate_time_safe], [
-        save_LIBS="$LIBS"
+  AC_DEFUN([AX_UUID_GENERATE_TIME_SAFE],
+      [AC_PREREQ([2.68])dnl
+      AC_REQUIRE([AX_UUID])dnl
+      AC_CACHE_CHECK([for uuid_generate_time_safe],
+        [ax_cv_uuid_generate_time_safe],
+        [AX_SAVE_FLAGS
         LIBS="$LIBUUID_LDFLAGS $LIBS"
         AC_LANG_PUSH([C])
         AC_RUN_IFELSE([
-          AC_LANG_PROGRAM([#include <uuid/uuid.h>], [
+          AC_LANG_PROGRAM([#include <uuid/uuid.h>],[
             uuid_t out;
             uuid_generate_time_safe(out);
             ])],
@@ -83,11 +89,10 @@ AC_DEFUN([AX_UUID], [
           [ax_cv_uuid_generate_time_safe=no],
           [AC_MSG_WARN([test program execution failed])])
         AC_LANG_POP
-        LIBS="$save_LIBS"
+        AX_RESTORE_FLAGS
         ])
 
-      AS_IF([test "$ax_cv_uuid_generate_time_safe" = yes],[
-        AC_DEFINE([HAVE_UUID_GENERATE_TIME_SAFE],[1],[Define if uuid_generate_time_safe is present in uuid/uuid.h.])],[
-        AC_DEFINE([HAVE_UUID_GENERATE_TIME_SAFE],[0],[Define if uuid_generate_time_safe is present in uuid/uuid.h.])
-        ])
+      AS_IF([test "$ax_cv_uuid_generate_time_safe" = yes],
+        [AC_DEFINE([HAVE_UUID_GENERATE_TIME_SAFE],[1],[Define if uuid_generate_time_safe is present in uuid/uuid.h.])],
+        [AC_DEFINE([HAVE_UUID_GENERATE_TIME_SAFE],[0],[Define if uuid_generate_time_safe is present in uuid/uuid.h.])])
       ])
index 9475cab774b0704a455467bc78be4fa0701992b2..9f902c0aa7563674a2620457511e0a15559bfd33 100644 (file)
 #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-#serial 5
+#serial 6
 
 AC_DEFUN([AX_VCS_SYSTEM],
-    [AC_CACHE_CHECK([for vcs system], [ac_cv_vcs_system],
+    [AC_PREREQ([2.63])dnl
+    AC_CACHE_CHECK([for vcs system], [ac_cv_vcs_system],
       [ac_cv_vcs_system="none"
       AS_IF([test -d ".bzr"],[ac_cv_vcs_system="bazaar"])
       AS_IF([test -d ".svn"],[ac_cv_vcs_system="svn"])
@@ -58,7 +59,8 @@ AC_DEFUN([AX_VCS_SYSTEM],
     ])
 
 AC_DEFUN([AX_VCS_CHECKOUT],
-    [AC_REQUIRE([AX_VCS_SYSTEM])
+    [AC_PREREQ([2.63])dnl
+    AC_REQUIRE([AX_VCS_SYSTEM])
     AC_CACHE_CHECK([for vcs checkout],[ac_cv_vcs_checkout],
       [AS_IF([test "x$ac_cv_vcs_system" != "xnone"],
         [ac_cv_vcs_checkout=yes],