[svn] GnuPG - r3858 - trunk/m4
svn author dshaw
cvs at cvs.gnupg.org
Fri Aug 5 18:30:18 CEST 2005
Author: dshaw
Date: 2005-08-05 18:30:12 +0200 (Fri, 05 Aug 2005)
New Revision: 3858
Modified:
trunk/m4/ChangeLog
trunk/m4/Makefile.am
trunk/m4/ldap.m4
trunk/m4/libcurl.m4
Log:
* ldap.m4: If a PATH is given to --with-ldap, bias directory
search towards the given path for includes and libraries. Noted
by Jason Harris.
* Makefile.am: Distribute tar-ustar.m4.
* libcurl.m4: If a PATH is given to --with-libcurl, look for
curl-config in that path. Bias directory search towards the given
path for includes and libraries.
Modified: trunk/m4/ChangeLog
===================================================================
--- trunk/m4/ChangeLog 2005-08-05 14:46:59 UTC (rev 3857)
+++ trunk/m4/ChangeLog 2005-08-05 16:30:12 UTC (rev 3858)
@@ -1,3 +1,15 @@
+2005-08-05 David Shaw <dshaw at jabberwocky.com>
+
+ * ldap.m4: If a PATH is given to --with-ldap, bias directory
+ search towards the given path for includes and libraries. Noted
+ by Jason Harris.
+
+ * Makefile.am: Distribute tar-ustar.m4.
+
+ * libcurl.m4: If a PATH is given to --with-libcurl, look for
+ curl-config in that path. Bias directory search towards the given
+ path for includes and libraries.
+
2005-08-04 David Shaw <dshaw at jabberwocky.com>
* tar-ustar.m4: New. Check for a tar that creates USTAR format
Modified: trunk/m4/Makefile.am
===================================================================
--- trunk/m4/Makefile.am 2005-08-05 14:46:59 UTC (rev 3857)
+++ trunk/m4/Makefile.am 2005-08-05 16:30:12 UTC (rev 3858)
@@ -1 +1 @@
-EXTRA_DIST = intmax.m4 longdouble.m4 longlong.m4 printf-posix.m4 signed.m4 size_max.m4 wchar_t.m4 wint_t.m4 xsize.m4 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 readline.m4 libcurl.m4 libusb.m4
+EXTRA_DIST = intmax.m4 longdouble.m4 longlong.m4 printf-posix.m4 signed.m4 size_max.m4 wchar_t.m4 wint_t.m4 xsize.m4 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 readline.m4 libcurl.m4 libusb.m4 tar-ustar.m4
Modified: trunk/m4/ldap.m4
===================================================================
--- trunk/m4/ldap.m4 2005-08-05 14:46:59 UTC (rev 3857)
+++ trunk/m4/ldap.m4 2005-08-05 16:30:12 UTC (rev 3858)
@@ -18,15 +18,22 @@
# If all else fails, the user can play guess-the-dependency by using
# something like ./configure LDAPLIBS="-Lfoo -lbar"
- AC_ARG_WITH(ldap,
- AC_HELP_STRING([--with-ldap=DIR],[look for the LDAP library in DIR]),
- [
- if test -d "$withval" ; then
- CPPFLAGS="${CPPFLAGS} -I$withval/include"
- LDFLAGS="${LDFLAGS} -L$withval/lib"
- fi
- ])
+AC_ARG_WITH(ldap,
+ AC_HELP_STRING([--with-ldap=DIR],[look for the LDAP library in DIR]),
+ [_ldap_with=$withval])
+if test x$_ldap_with != xno ; then
+
+ if test -d "$withval" ; then
+ LDAP_CPPFLAGS="-I$withval/include"
+ LDAP_LDFLAGS="-L$withval/lib"
+ fi
+
+ _ldap_save_cppflags=$CPPFLAGS
+ CPPFLAGS="${LDAP_CPPFLAGS} ${CPPFLAGS}"
+ _ldap_save_ldflags=$LDFLAGS
+ LDFLAGS="${LDAP_LDFLAGS} ${LDFLAGS}"
+
for MY_LDAPLIBS in ${LDAPLIBS+"$LDAPLIBS"} "-lldap" "-lldap -llber" "-lldap -llber -lresolv" "-lwldap32"; do
_ldap_save_libs=$LIBS
LIBS="$MY_LDAPLIBS $1 $LIBS"
@@ -57,7 +64,7 @@
if test "$gnupg_cv_func_ldap_init" = yes || \
test "$gnupg_cv_func_ldaplber_init" = yes ; then
- LDAPLIBS=$MY_LDAPLIBS
+ LDAPLIBS="$LDAP_LDFLAGS $MY_LDAPLIBS"
GPGKEYS_LDAP="gpgkeys_ldap$EXEEXT"
AC_CHECK_FUNCS(ldap_get_option ldap_set_option ldap_start_tls_s)
@@ -82,4 +89,9 @@
AC_SUBST(GPGKEYS_LDAP)
AC_SUBST(LDAPLIBS)
+ AC_SUBST(LDAP_CPPFLAGS)
+
+ CPPFLAGS=$_ldap_save_cppflags
+ LDFLAGS=$_ldap_save_ldflags
+fi
])dnl
Modified: trunk/m4/libcurl.m4
===================================================================
--- trunk/m4/libcurl.m4 2005-08-05 14:46:59 UTC (rev 3857)
+++ trunk/m4/libcurl.m4 2005-08-05 16:30:12 UTC (rev 3858)
@@ -1,7 +1,7 @@
# LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
# [ACTION-IF-YES], [ACTION-IF-NO])
# ----------------------------------------------------------
-# David Shaw <dshaw at jabberwocky.com> Jul-20-2005
+# David Shaw <dshaw at jabberwocky.com> Aug-5-2005
#
# Checks for libcurl. DEFAULT-ACTION is the string yes or no to
# specify whether to default to --with-libcurl or --without-libcurl.
@@ -66,12 +66,13 @@
_libcurl_try_link=yes
if test -d "$_libcurl_with" ; then
- CPPFLAGS="${CPPFLAGS} -I$withval/include"
- LDFLAGS="${LDFLAGS} -L$withval/lib"
+ LIBCURL_CPPFLAGS="-I$withval/include"
+ _libcurl_ldflags="-L$withval/lib"
+ AC_PATH_PROG([_libcurl_config],["$withval/bin/curl-config"])
+ else
+ AC_PATH_PROG([_libcurl_config],[curl-config])
fi
- AC_PATH_PROG([_libcurl_config],[curl-config])
-
if test x$_libcurl_config != "x" ; then
AC_CACHE_CHECK([for the version of libcurl],
[libcurl_cv_lib_curl_version],
@@ -127,15 +128,15 @@
# we didn't find curl-config, so let's see if the user-supplied
# link line (or failing that, "-lcurl") is enough.
- LIBCURL=${LIBCURL-"-lcurl"}
+ LIBCURL=${LIBCURL-"$_libcurl_ldflags -lcurl"}
AC_CACHE_CHECK([whether libcurl is usable],
[libcurl_cv_lib_curl_usable],
[
_libcurl_save_cppflags=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
+ CPPFLAGS="$LIBCURL_CPPFLAGS $CPPFLAGS"
_libcurl_save_libs=$LIBS
- LIBS="$LIBS $LIBCURL"
+ LIBS="$LIBCURL $LIBS"
AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <curl/curl.h>],[
/* Try and use a few common options to force a failure if we are
@@ -218,6 +219,7 @@
unset _libcurl_protocol
unset _libcurl_protocols
unset _libcurl_version
+ unset _libcurl_ldflags
fi
if test x$_libcurl_with = xno || test x$libcurl_cv_lib_curl_usable != xyes ; then
More information about the Gnupg-commits
mailing list