#
# 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],[
# (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.])
+ ])
])