diff configure.in @ 1057:c5ab972db48c HEAD

libldap checks, --without-pop3 disables pop3 server
author Timo Sirainen <tss@iki.fi>
date Thu, 30 Jan 2003 20:27:09 +0200
parents c41787e8c3f4
children 3b8fb7bf7ecc
line wrap: on
line diff
--- a/configure.in	Thu Jan 30 20:05:33 2003 +0200
+++ b/configure.in	Thu Jan 30 20:27:09 2003 +0200
@@ -88,6 +88,15 @@
 	fi,
 	want_pam=yes)
 
+AC_ARG_WITH(ldap,
+[  --with-ldap             Build with LDAP support],
+	if test x$withval = xno; then
+		want_ldap=no
+	else
+		want_ldap=yes
+	fi,
+	want_ldap=no)
+
 AC_ARG_WITH(vpopmail,
 [  --with-vpopmail         Build with vpopmail support (default)],
 	if test x$withval = xno; then
@@ -147,6 +156,16 @@
 )
 AC_SUBST(ssldir)
 
+AC_ARG_WITH(pop3d,
+[  --with-pop3d            Build POP3 server (default)],
+	if test x$withval = xno; then
+		want_pop3d=no
+	else
+		want_pop3d=yes
+	fi,
+	want_pop3d=yes)
+AM_CONDITIONAL(BUILD_POP3D, test "$want_pop3d" = "yes")
+
 dnl * gcc specific options
 if test "x$ac_cv_prog_gcc" = "xyes"; then
 	# -Wcast-qual -Wcast-align -Wconversion # too many warnings
@@ -723,6 +742,19 @@
 	])
 fi
 
+if test $want_ldap = yes; then
+	AC_CHECK_LIB(ldap, ldap_init, [
+		AC_CHECK_HEADER(ldap.h, [
+			PASSDB_LIBS="$PASSDB_LIBS -lldap"
+
+        		AC_DEFINE(USERDB_LDAP,, Build with LDAP support)
+		        AC_DEFINE(PASSDB_LDAP,, Build with LDAP support)
+			userdb="$userdb ldap"
+			passdb="$passdb ldap"
+		])
+	])
+fi
+
 if test $want_vpopmail = yes; then
 	vpopmail_home="`echo ~vpopmail`"
 	vpop_libdeps="$vpopmail_home/etc/lib_deps"
@@ -871,3 +903,4 @@
 echo "Building with password lookup modules :$passdb"
 echo "Building with SSL support ........... : $have_ssl"
 echo "Building with IPv6 support .......... : $want_ipv6"
+echo "Building with pop3 server ........... : $want_pop3d"