diff options
author | David Shaw <dshaw@jabberwocky.com> | 2005-08-05 18:30:12 +0200 |
---|---|---|
committer | David Shaw <dshaw@jabberwocky.com> | 2005-08-05 18:30:12 +0200 |
commit | 6ce02d4eb5ae9ed966402afbf6e05259073f9050 (patch) | |
tree | 388512ade90848b2a26e8a001eb6bc87693f4c31 /m4/ldap.m4 | |
parent | auto retrieve keys from PKA. Thsi allows to specify an email address (diff) | |
download | gnupg2-6ce02d4eb5ae9ed966402afbf6e05259073f9050.tar.xz gnupg2-6ce02d4eb5ae9ed966402afbf6e05259073f9050.zip |
* 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.
Diffstat (limited to 'm4/ldap.m4')
-rw-r--r-- | m4/ldap.m4 | 30 |
1 files changed, 21 insertions, 9 deletions
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 |