summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2011-03-08 13:49:04 +0100
committerWerner Koch <wk@gnupg.org>2011-12-01 13:58:41 +0100
commit37810e520dba6fcb9da5a13bc6fdba9076cfe0f2 (patch)
tree40fcde0395f0b2b98e13585ab7f05ad259707366
parente56e1ded234f73a3c6286fb2b3cc652d8ebabbfa (diff)
downloadlibgcrypt-37810e520dba6fcb9da5a13bc6fdba9076cfe0f2.tar.gz
Make build_revision shorter for W32 use
-rw-r--r--ChangeLog2
-rw-r--r--configure.ac10
-rw-r--r--src/libgcrypt.m413
3 files changed, 18 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d3d04de..9b55e9d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,6 +33,8 @@
2011-02-23 Werner Koch <wk@g10code.com>
+ * configure.ac (HAVE_PTHREAD): New.
+
* configure.ac (LIBGCRYPT_CONFIG_HOST): New.
* acinclude.m4 (AM_PATH_GPG_ERROR): Remove.
diff --git a/configure.ac b/configure.ac
index ab160c3c..e416ceb8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,6 +197,8 @@ LIBGCRYPT_THREAD_MODULES=""
print_egd_notice=no
have_w32_system=no
have_w32ce_system=no
+have_pthread=no
+
# Setup some stuff depending on host.
case "${host}" in
@@ -631,6 +633,14 @@ fi
AC_SUBST(PTH_CFLAGS)
AC_SUBST(PTH_LIBS)
+#
+# Check whether pthreads is available
+#
+AC_CHECK_LIB(pthread,pthread_create,have_pthread=yes)
+if test "$have_pthread" = yes; then
+ AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.])
+fi
+
# Solaris needs -lsocket and -lnsl. Unisys system includes
# gethostbyname in libsocket but needs libnsl for socket.
diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4
index 831dc0c6..6cf482fc 100644
--- a/src/libgcrypt.m4
+++ b/src/libgcrypt.m4
@@ -1,5 +1,5 @@
dnl Autoconf macros for libgcrypt
-dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc.
dnl
dnl This file is free software; as a special exception the author gives
dnl unlimited permission to copy and/or distribute it, with or without
@@ -21,7 +21,8 @@ dnl this features allows to prevent build against newer versions of libgcrypt
dnl with a changed API.
dnl
AC_DEFUN([AM_PATH_LIBGCRYPT],
-[ AC_ARG_WITH(libgcrypt-prefix,
+[ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_ARG_WITH(libgcrypt-prefix,
AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
[prefix where LIBGCRYPT is installed (optional)]),
libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
@@ -98,10 +99,9 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
ifelse([$2], , :, [$2])
- if test x"$host" != x ; then
- libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
- if test x"$libgcrypt_config_host" != xnone ; then
- if test x"$libgcrypt_config_host" != x"$host" ; then
+ libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
+ if test x"$libgcrypt_config_host" != xnone ; then
+ if test x"$libgcrypt_config_host" != x"$host" ; then
AC_MSG_WARN([[
***
*** The config script $LIBGCRYPT_CONFIG was
@@ -110,7 +110,6 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
*** You may want to use the configure option --with-libgcrypt-prefix
*** to specify a matching config script.
***]])
- fi
fi
fi
else