summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2006-03-17 16:24:27 +0000
committerWerner Koch <wk@gnupg.org>2006-03-17 16:24:27 +0000
commit5987c62209c75e563cd6cac4056adee2a5a229df (patch)
tree3ba178ac760ae441ec266b37d03ea56e679b9669 /configure.ac
parentca292e887446ef533067fde7fcfa654bd2cad7ad (diff)
downloadlibgcrypt-5987c62209c75e563cd6cac4056adee2a5a229df.tar.gz
More changes.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac49
1 files changed, 49 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d677538d..7a7ce385 100644
--- a/configure.ac
+++ b/configure.ac
@@ -131,12 +131,14 @@ LIBGCRYPT_THREAD_MODULES=""
# Other definitions.
print_egd_notice=no
+have_w32_system=no
# Setup some stuff depending on host/target.
case "${target}" in
*-*-mingw32*)
available_random_modules="w32"
ac_cv_have_dev_random=no
+ have_w32_system=yes
AC_DEFINE(USE_ONLY_8DOT3,1,
[set this to limit filenames to the 8.3 format])
AC_DEFINE(HAVE_DRIVE_LETTERS,1,
@@ -185,6 +187,13 @@ case "${target}" in
;;
esac
+if test "$have_w32_system" = yes; then
+ AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system])
+fi
+AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
+
+
+
# A printable OS Name is sometime useful.
case "${target}" in
*-*-mingw32*)
@@ -422,6 +431,9 @@ AC_DEFINE_UNQUOTED(NAME_OF_DEV_URANDOM, "$NAME_OF_DEV_URANDOM",
#### Checks for libraries. ####
###############################
+#
+# gpg-error is required.
+#
AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION")
if test "x$GPG_ERROR_LIBS" = "x"; then
AC_MSG_ERROR([libgpg-error is needed.
@@ -431,6 +443,43 @@ fi
AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GCRYPT,
[The default error source for libgcrypt.])
+#
+# Check whether the GNU Pth library is available. We require this
+# to build the optional gcryptrnd program.
+#
+AC_ARG_WITH(pth-prefix,
+ AC_HELP_STRING([--with-pth-prefix=PFX],
+ [prefix where GNU Pth is installed (optional)]),
+ pth_config_prefix="$withval", pth_config_prefix="")
+if test x$pth_config_prefix != x ; then
+ PTH_CONFIG="$pth_config_prefix/bin/pth-config"
+fi
+AC_PATH_PROG(PTH_CONFIG, pth-config, no)
+if test "$PTH_CONFIG" = "no"; then
+ AC_MSG_WARN([[
+***
+*** To build the Libgcrypt's random humber daemon
+*** we need the support of the GNU Portable Threads Library.
+*** Download it from ftp://ftp.gnu.org/gnu/pth/
+*** On a Debian GNU/Linux system you might want to try
+*** apt-get install libpth-dev
+***]])
+ else
+ GNUPG_PTH_VERSION_CHECK([1.3.7])
+ if test $have_pth = yes; then
+ PTH_CFLAGS=`$PTH_CONFIG --cflags`
+ PTH_LIBS=`$PTH_CONFIG --ldflags`
+ PTH_LIBS="$PTH_LIBS `$PTH_CONFIG --libs`"
+ AC_DEFINE(USE_GNU_PTH, 1,
+ [Defined if the GNU Portable Thread Library should be used])
+ AC_DEFINE(HAVE_PTH, 1,
+ [Defined if the GNU Pth is available])
+ fi
+fi
+AC_SUBST(PTH_CFLAGS)
+AC_SUBST(PTH_LIBS)
+
+
# Solaris needs -lsocket and -lnsl. Unisys system includes
# gethostbyname in libsocket but needs libnsl for socket.
AC_SEARCH_LIBS(setsockopt, [socket], ,