summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2010-12-22 15:07:44 -0500
committerNalin Dahyabhai <nalin@redhat.com>2010-12-22 15:07:44 -0500
commit39fb24ba0c8a4d498007fdcac90c883e279716ac (patch)
tree005f94a9824eb105e5c88c3056aeef30744b29ff
parent86cad36ed2afc7bd640025015d172dfd3bac1946 (diff)
downloadslapi-nis-39fb24ba0c8a4d498007fdcac90c883e279716ac.tar.gz
slapi-nis-39fb24ba0c8a4d498007fdcac90c883e279716ac.tar.xz
slapi-nis-39fb24ba0c8a4d498007fdcac90c883e279716ac.zip
- when building with server type "dirsrv", allow fine-grained control of
which LDAP library with link against
-rw-r--r--configure.ac42
1 files changed, 38 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 843a9b1..5e17683 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,9 +31,10 @@ if test x$tcp_wrappers != xno ; then
fi
fi
AC_SUBST(LIBWRAP)
+
AC_ARG_WITH(tcp-wrappers-name,
- AS_HELP_STRING([--with-tcp-wrappers-name=nis-plugin]
- [tcp-wrappers and network service name]),
+ AS_HELP_STRING([--with-tcp-wrappers-name=service]
+ [tcp-wrappers and network service name (nis-plugin)]),
tcpwrapname=$withval,tcpwrapname=nis-plugin)
AC_DEFINE_UNQUOTED(DEFAULT_TCPWRAP_NAME,"$tcpwrapname",
[Define to the default application name to use when evaluating hosts.allow and hosts.deny.])
@@ -45,14 +46,39 @@ AC_ARG_WITH(domain,
mydomain=$withval,
mydomain=example.com)
mysuffix=`echo "$mydomain" | sed -e 's:^:dc=:g' -e 's:\.:, dc=:g'`
+
AC_ARG_WITH(server,
AS_HELP_STRING([--with-server=[[dirsrv]]],
[select a specific server implementation (dirsrv)]),
server=$withval,
server=dirsrv)
+
+AC_ARG_WITH(ldap,
+ AS_HELP_STRING([--with-ldap=IMPL],
+ [which LDAP library to use (none|mozldap|openldap)]),
+ ldapimpl=$withval,
+ ldapimpl=none)
+
case "$server" in
dirsrv)
- PKG_CHECK_MODULES(RUNTIME,mozldap nss nspr)
+ case "$ldapimpl" in
+ mozldap)
+ runtime_modules="mozldap nss nspr"
+ LDAP_CFLAGS=
+ LDAP_LIBS=
+ ;;
+ openldap)
+ runtime_modules="nss nspr"
+ LDAP_CFLAGS=
+ LDAP_LIBS="-lldap -llber"
+ ;;
+ *)
+ runtime_modules="nss nspr"
+ LDAP_CFLAGS=
+ LDAP_LIBS=
+ ;;
+ esac
+ PKG_CHECK_MODULES(RUNTIME,$runtime_modules)
saved_CFLAGS="$CFLAGS"
saved_LIBS="$LIBS"
CFLAGS="$CFLAGS $RUNTIME_CFLAGS"
@@ -68,11 +94,13 @@ dirsrv)
fi
CFLAGS="$saved_CFLAGS"
LIBS="$saved_LIBS"
- AC_DEFINE(USE_NSPR_THREADS,1,[Define to use NSPR's threading functions.])
+ AC_DEFINE(USE_NSPR_THREADS,1,[Define to use NSPR threading functions.])
;;
*)
RUNTIME_CFLAGS=
RUNTIME_LIBS=
+ LDAP_CFLAGS=
+ LDAP_LIBS="-lldap -lber"
AC_CHECK_HEADERS(slapi-plugin.h)
if test x$ac_cv_header_slapi_plugin_h = xno ; then
AC_ERROR([<slapi-plugin.h> not found])
@@ -83,7 +111,13 @@ dirsrv)
AC_CHECK_FUNC(pthread_create,,AC_CHECK_LIB(pthread,pthread_create))
LIBPTHREAD="$LIBS"
LIBS="$saved_LIBS"
+ ;;
esac
+
+AC_SUBST(RUNTIME_CFLAGS)
+AC_SUBST(RUNTIME_LIBS)
+AC_SUBST(LDAP_CFLAGS)
+AC_SUBST(LDAP_LIBS)
AC_SUBST(LIBPTHREAD)
AC_ARG_WITH(tirpc,