Update m4.
authorBrian Aker <brian@tangent.org>
Wed, 31 Oct 2012 01:08:13 +0000 (21:08 -0400)
committerBrian Aker <brian@tangent.org>
Wed, 31 Oct 2012 01:08:13 +0000 (21:08 -0400)
m4/ax_pthread_timedjoin_np.m4
m4/ax_vcs_checkout.m4
man/include.am

index d6f0467ae20618adf35b6cb2d717c5895256d82b..daec6c568be55e1e8bd1602d338c6fd58346dbd7 100644 (file)
@@ -4,7 +4,7 @@
 #
 # SYNOPSIS
 #
-#   AX_PTHREAD_TIMEDJOIN_NP
+#   AX_PTHREAD_TIMEDJOIN_NP()
 #
 # DESCRIPTION
 #
 #   and this notice are preserved. This file is offered as-is, without any
 #   warranty.
 
-#serial 4
+#serial 5
 
   AC_DEFUN([AX_PTHREAD_TIMEDJOIN_NP], [
       AC_REQUIRE([AX_PTHREAD])
       AC_CACHE_CHECK([check for pthread_timedjoin_np], [ax_cv_pthread_timedjoin_np], [
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$PTHREAD_LIBS"
+        AX_SAVE_FLAGS
+        CFLAGS="$PTHREAD_CFLAGS"
+        LIBS="$PTHREAD_LIBS"
         AC_LANG_PUSH([C])
         AC_LINK_IFELSE([
           AC_LANG_PROGRAM([
-#ifndef _GNU_SOURCE 
-#define _GNU_SOURCE 
-#endif
-
-#include <stdlib.h> 
 #include <pthread.h>
+#include <stdlib.h>
             ], [
             pthread_t thread;
-            pthread_timedjoin_np(thread, NULL);
+            pthread_timedjoin_np(thread, NULL, NULL);
             ])],
           [ax_cv_pthread_timedjoin_np=yes],
           [])
 
         AC_LANG_POP
-        LDFLAGS="$save_LDFLAGS"
-
+        AX_RESTORE_FLAGS
       ])
 
       AS_IF([test "$ax_cv_pthread_timedjoin_np" = yes],[
index 020586f3c90bbc30f9461fbb3b9fe52ba0adbbbd..af4635ae28b4b2a046fd70774c85e38ed39b95ed 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 4
+#serial 5
+
+AC_DEFUN([AX_VCS_SYSTEM],[
+    AC_CACHE_CHECK([for vcs system], [ac_cv_vcs_system], [
+      AS_IF([test -d ".bzr"],[
+        ac_cv_vcs_system="bazaar"
+        ])
+      AS_IF([test -d ".svn"],[
+        ac_cv_vcs_system="svn"
+        ])
+      AS_IF([test -d ".hg"],[
+        ac_cv_vcs_system="mercurial"
+        ])
+      AS_IF([test -d ".git"],[
+        ac_cv_vcs_system="git"
+        ])
+      ],[
+      ac_cv_vcs_system="none"
+      ])
+
+    ])
 
 AC_DEFUN([AX_VCS_CHECKOUT],[
+    AC_REQUIRE([AX_VCS_SYSTEM])
     AC_CACHE_CHECK([for vcs checkout], [ac_cv_vcs_checkout], [
-      AS_IF([test -d ".bzr"],[ac_cv_vcs_checkout=yes])
-      AS_IF([test -d ".svn"],[ac_cv_vcs_checkout=yes])
-      AS_IF([test -d ".hg"], [ac_cv_vcs_checkout=yes])
-      AS_IF([test -d ".git"],[ac_cv_vcs_checkout=yes])
-      ],[
-      ac_cv_vcs_checkout=no
+      AS_IF([test "x$ac_cv_vcs_system" != "xnone"],[
+        ac_cv_vcs_checkout=yes
+        ],[
+        ac_cv_vcs_checkout=no
+        ])
       ])
 
-    AM_CONDITIONAL([MAINTAINER_MODE], [ test "$ac_cv_vcs_checkout" = "yes" ])
+    AM_CONDITIONAL([VCS_CHECKOUT], [test "$ac_cv_vcs_checkout" = "yes"])
+    AS_IF([test "x$ac_cv_vcs_checkout" = "xyes"],[
+      AC_DEFINE([VCS_CHECKOUT], [1], [Define if the code was built from VCS.])
+      ])
     ])
index 4d9fd1bf49e79dc362e77140d07444a5bb194181..2b6210221ad500d101fda72ec1cd6cfa095cb492 100644 (file)
@@ -4,7 +4,7 @@
 
 if HAVE_RECENT_SPHINX
 
-if MAINTAINER_MODE
+if VCS_CHECKOUT
 
 dist-hook: man