* 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.
This commit is contained in:
David Shaw 2005-08-05 16:30:12 +00:00
parent 2ce542ad52
commit 6ce02d4eb5
4 changed files with 44 additions and 18 deletions

View File

@ -1,3 +1,15 @@
2005-08-05 David Shaw <dshaw@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@jabberwocky.com>
* tar-ustar.m4: New. Check for a tar that creates USTAR format

View File

@ -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

View File

@ -18,14 +18,21 @@ AC_DEFUN([GNUPG_CHECK_LDAP],
# 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
@ -57,7 +64,7 @@ AC_DEFUN([GNUPG_CHECK_LDAP],
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_DEFUN([GNUPG_CHECK_LDAP],
AC_SUBST(GPGKEYS_LDAP)
AC_SUBST(LDAPLIBS)
AC_SUBST(LDAP_CPPFLAGS)
CPPFLAGS=$_ldap_save_cppflags
LDFLAGS=$_ldap_save_ldflags
fi
])dnl

View File

@ -1,7 +1,7 @@
# LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
# [ACTION-IF-YES], [ACTION-IF-NO])
# ----------------------------------------------------------
# David Shaw <dshaw@jabberwocky.com> Jul-20-2005
# David Shaw <dshaw@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 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
_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 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
# 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 @@ x=CURLOPT_VERBOSE;
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