[patch] configure does not detect static LDAP libs on System V
David Champion
dgc at uchicago.edu
Tue Jun 11 21:38:06 CEST 2002
With static ldap libraries on a system using libnsl and libsocket (e.g.,
Solaris), ldap support will not be detected because the ldap link test
will fail. Moving the -lnsl/-lsocket tests earlier in configure.ac
(placing them before the feature tests) fixes this.
keyserver/Makefile.am then needs to import library choices from the
top-level Makefile.
At least some distributions of LDAP don't include lber.h from ldap.h, so
gpgkeys_ldap.c needs to explicitly include it.
Patch attached for all three issues.
--
-D. dgc at uchicago.edu NSIT University of Chicago
-------------- next part --------------
--- gnupg-1.0.7/configure.ac.orig Tue Jun 11 12:02:19 2002
+++ gnupg-1.0.7/configure.ac Tue Jun 11 12:03:47 2002
@@ -49,6 +49,14 @@
MODULES_IN_CIPHER=`$AWK '/^EXTRA_PROGRAMS/ { for(i=3;i<=NF;i++) print $i}' \
$srcdir/cipher/Makefile.am`
+dnl Must check for network library requirements before doing link tests
+dnl for ldap, for example. If ldap libs are static (or dynamic and without
+dnl ELF runtime link paths), then link will fail and LDAP support won't
+dnl be detected.
+AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname))
+AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
+
+
dnl
dnl Check for random module options
dnl
@@ -391,10 +399,6 @@
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(BUILD_INCLUDED_LIBINTL)
fi
-
-
-AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname))
-AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
if test "$try_dynload" = yes ; then
--- gnupg-1.0.7/keyserver/Makefile.am.orig Thu Dec 6 15:36:21 2001
+++ gnupg-1.0.7/keyserver/Makefile.am Tue Jun 11 12:23:58 2002
@@ -23,7 +23,8 @@
EXTRA_SCRIPTS = gpgkeys_mailto
# We don't need the libs the regular GPG binaries do
-LIBS=
+# Yes, actually we might...
+#LIBS=
bin_PROGRAMS = @GPGKEYS_LDAP@
bin_SCRIPTS = @GPGKEYS_MAILTO@
--- gnupg-1.0.7/keyserver/gpgkeys_ldap.c.orig Tue Jun 11 12:24:37 2002
+++ gnupg-1.0.7/keyserver/gpgkeys_ldap.c Tue Jun 11 12:22:18 2002
@@ -25,6 +25,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
+#include <lber.h>
#include <ldap.h>
#include "keyserver.h"
More information about the Gnupg-devel
mailing list