From 6ce02d4eb5ae9ed966402afbf6e05259073f9050 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Fri, 5 Aug 2005 16:30:12 +0000 Subject: * 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. --- m4/ldap.m4 | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'm4/ldap.m4') diff --git a/m4/ldap.m4 b/m4/ldap.m4 index 34c12896a..95249ac3e 100644 --- a/m4/ldap.m4 +++ b/m4/ldap.m4 @@ -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 -- cgit v1.2.3