Pull from CVS head:
authornbk <nbk>
Fri, 12 Aug 2005 11:28:05 +0000 (11:28 +0000)
committernbk <nbk>
Fri, 12 Aug 2005 11:28:05 +0000 (11:28 +0000)
Patches stolen from revisions 1.12 and 1.14 to make the options
--with-rlm-ldap-include-dir and --with-rlm-ldap-lib-dir work.

src/modules/rlm_ldap/configure.in

index a6bfe2f..7a883ba 100644 (file)
@@ -45,7 +45,16 @@ if test x$with_[]modname != xno; then
 
        smart_try_dir=$rlm_ldap_include_dir
        AC_SMART_CHECK_INCLUDE(lber.h)
+       if test "$ac_cv_header_lber_h" != "yes"; then
+         fail="$fail lber.h"
+       fi
        AC_SMART_CHECK_INCLUDE(ldap.h)
+       if test "$ac_cv_header_ldap_h" != "yes"; then
+         fail="$fail ldap.h"
+       fi
+       if test "x$fail" = "x"; then
+         SMART_CFLAGS="$SMART_CFLAGS -I$rlm_ldap_include_dir"
+       fi
 
        AC_SMART_CHECK_LIB(sasl, sasl_encode)
        AC_SMART_CHECK_LIB(crypto, DH_new)
@@ -69,11 +78,13 @@ if test x$with_[]modname != xno; then
              fail="$fail libldap"
            else
                libldap=ldap
-           fi
+           fi
           fi
         fi
 
        if test x"$libldap" != "x"; then
+         SMART_LIBS="$SMART_LIBS -L$rlm_ldap_lib_dir"
+
          AC_SMART_CHECK_LIB("$libldap", ldap_start_tls_s)
 
          if test "x${ac_cv_lib_ldap_ldap_start_tls_s}${ac_cv_lib_ldap_r_ldap_start_tls_s}" != "x"; then