Skip to content
Snippets Groups Projects
configure.in 53.4 KiB
Newer Older
dnl
dnl Copyright 1998,1999 The OpenLDAP Foundation.  All Rights Reserved.
dnl 
dnl Redistribution and use in source and binary forms are permitted only
dnl as authorized by the OpenLDAP Public License.  A copy of this
dnl license is available at http://www.OpenLDAP.org/license.html or
dnl in file LICENSE in the top-level directory of the distribution.
dnl Disable config.cache!
define([AC_CACHE_LOAD], )dnl
define([AC_CACHE_SAVE], )dnl

dnl Configure.in for OpenLDAP

OL_VERSION=`cat $ac_aux_dir/version`
if test -z "$OL_VERSION"; then
	AC_MSG_ERROR([could not determine version])
fi

dnl ----------------------------------------------------------------
dnl Determine host platform
dnl		we try not to use this for much
AC_CANONICAL_SYSTEM

AM_INIT_AUTOMAKE(OpenLDAP,[$OL_VERSION], [no defines])dnl
AC_DEFINE_UNQUOTED(OPENLDAP_PACKAGE,"$PACKAGE",Package)
AC_DEFINE_UNQUOTED(OPENLDAP_VERSION,"$VERSION",Version)
dnl We use autoconf features new to 2.13.
dnl aclocal.m4 should be built using aclocal from automake 1.4
dnl libtool 1.3.3 should be installed.
AC_PREREQ(2.13)dnl Required Autoconf version
AC_CONFIG_HEADER(include/portable.h include/ldap_features.h include/lber_types.h)dnl
dnl ----------------------------------------------------------------
dnl Start Args
AC_MSG_CHECKING(configure arguments)
AC_PREFIX_DEFAULT(/usr/local)

Kurt Zeilenga's avatar
Kurt Zeilenga committed
ldap_subdir="openldap"

AC_ARG_WITH(subdir, [  --with-subdir=DIR change default subdirectory used for installs], [
	if test "$withval" = "no"; then
		ldap_subdir=""
	elif test "$withval" != "yes"; then
		ldap_subdir="$withval"
	fi
])dnl

AC_SUBST(ldap_subdir)dnl

OL_ARG_ENABLE(debug,[  --enable-debug 	enable debugging], yes)dnl
dnl ol_enable_syslog=no
OL_ARG_ENABLE(syslog,[  --enable-syslog	enable syslog support], auto)dnl
Kurt Zeilenga's avatar
Kurt Zeilenga committed
OL_ARG_ENABLE(proctitle,[  --enable-proctitle	enable proctitle support], yes)dnl
OL_ARG_ENABLE(cache,[  --enable-cache	enable caching], yes)dnl
OL_ARG_ENABLE(dns,[  --enable-dns		enable V2 DNS  extension], no)dnl
OL_ARG_ENABLE(referrals,[  --enable-referrals	enable V2 Referrals extension], yes)dnl
OL_ARG_ENABLE(cldap,[  --enable-cldap	enable connectionless ldap], no)dnl
OL_ARG_ENABLE(x_compile,[  --enable-x-compile	enable cross compiling],
	no, [yes no])dnl

dnl General "with" options
OL_ARG_ENABLE(dmalloc,[  --enable-dmalloc	enable debug malloc support], no)dnl

OL_ARG_WITH(kerberos,[  --with-kerberos	with Kerberos support],
	auto, [auto k5 k4 afs yes no])
OL_ARG_WITH(readline,[  --with-readline  with readline support],
	auto, [auto yes no] )
OL_ARG_WITH(threads,[  --with-threads	use threads],
	auto, [auto posix mach lwp yes no manual] )
OL_ARG_WITH(tls,[  --with-tls  with TLS/SSL support],
Bart Hartgers's avatar
 
Bart Hartgers committed
	auto, [auto ssleay openssl yes no] )
OL_ARG_WITH(yielding_select,[  --with-yielding-select	with implicitly yielding select],
	auto, [auto yes no manual] )

dnl Server options

dnl LDAPD OPTIONS
AC_ARG_WITH(xxldapdoptions,[LDAPD Options:])
OL_ARG_ENABLE(ldapd,[  --enable-ldapd	enable building ldapd], no)dnl

dnl SLAPD OPTIONS
AC_ARG_WITH(xxslapdoptions,[SLAPD Options:])
OL_ARG_ENABLE(slapd,[  --enable-slapd	enable building slapd], yes)dnl
OL_ARG_ENABLE(cleartext,[    --enable-cleartext	enable cleartext passwords], yes)dnl
OL_ARG_ENABLE(crypt,[    --enable-crypt	enable crypt(3) passwords], auto)dnl
OL_ARG_ENABLE(modules,[    --enable-modules	enable dynamic module support], no)dnl
OL_ARG_ENABLE(phonetic,[    --enable-phonetic	enable phonetic/soundex], no)dnl
OL_ARG_ENABLE(rlookups,[    --enable-rlookups	enable reverse lookups], auto)dnl
OL_ARG_ENABLE(wrappers,[    --enable-wrappers	enable tcp wrapper support], no)dnl

dnl SLAPD Backend options
OL_ARG_ENABLE(bdb2,[    --enable-bdb2	enable bdb2 backend], no)dnl
OL_ARG_WITH(bdb2_module,[      --with-bdb2-module	module type], static,
	[static dynamic])
OL_ARG_ENABLE(ldap,[    --enable-ldap	enable ldap backend], no)dnl
OL_ARG_WITH(ldap_module,[      --with-ldap-module	module type], static,
	[static dynamic])
OL_ARG_ENABLE(ldbm,[    --enable-ldbm	enable ldbm backend], yes)dnl
OL_ARG_WITH(ldbm_module,[      --with-ldbm-module	module type], static,
	[static dynamic])
OL_ARG_WITH(ldbm_api,[      --with-ldbm-api	use LDBM API], auto,
	[auto db2 db mdbm gdbm ndbm manual])
OL_ARG_WITH(ldbm_type,[      --with-ldbm-type	use LDBM type], auto,
	[auto btree hash])

OL_ARG_ENABLE(passwd,[    --enable-passwd	enable passwd backend], no)dnl
OL_ARG_WITH(passwd_module,[      --with-passwd-module	module type], static,
	[static dynamic])
OL_ARG_ENABLE(perl,[    --enable-perl	enable perl backend], no)dnl
OL_ARG_WITH(perl_module,[      --with-perl-module	module type], static,
	[static dynamic])
OL_ARG_ENABLE(shell,[    --enable-shell	enable shell backend], no)dnl
OL_ARG_WITH(shell_module,[      --with-shell-module	module type], static,
	[static dynamic])
OL_ARG_ENABLE(tcl,[    --enable-tcl	enable tcl backend], no)dnl
OL_ARG_WITH(tcl_module,[      --with-tcl-module	module type], static,
	[static dynamic])

dnl SLURPD OPTIONS
AC_ARG_WITH(xxslurpdoptions,[SLURPD Options:])
OL_ARG_ENABLE(slurpd,[  --enable-slurpd	enable building slurpd], auto)dnl

AC_ARG_WITH(xxliboptions,[Library Generation & Linking Options])
AC_ENABLE_STATIC
dnl AC_DISABLE_SHARED
AC_ENABLE_SHARED
if test $ol_enable_dns = yes ; then
	if test $ol_enable_referrals = no ; then
		AC_MSG_ERROR([DNS requires --enable-referrals])
	fi
	if test $ol_enable_referrals = auto ; then
		AC_MSG_WARN([DNS requires referrals, adding --enable-referrals])
		ol_enable_referrals=yes
if test $ol_enable_slapd = no ; then
	dnl SLAPD was specificallly disabled
	if test $ol_enable_bdb2 = yes ; then
		AC_MSG_WARN([slapd disabled, ignoring --enable-bdb2 argument])
	if test $ol_enable_ldap = yes ; then
		AC_MSG_WARN([slapd disabled, ignoring --enable-ldap argument])
	if test $ol_enable_ldbm = yes ; then
		AC_MSG_WARN([slapd disabled, ignoring --enable-ldbm argument])
	fi
	if test $ol_enable_passwd = yes ; then
		AC_MSG_WARN([slapd disabled, ignoring --enable-passwd argument])
	if test $ol_enable_perl = yes ; then
		AC_MSG_WARN([slapd disabled, ignoring --enable-perl argument])
	if test $ol_enable_shell = yes ; then
		AC_MSG_WARN([slapd disabled, ignoring --enable-shell argument])
	if test $ol_enable_tcl = yes ; then
		AC_MSG_WARN([slapd disabled, ignoring --enable-tcl argument])
	if test $ol_enable_modules = yes ; then
		AC_MSG_WARN([slapd disabled, ignoring --enable-modules argument])
	if test $ol_enable_wrappers = yes ; then
		AC_MSG_WARN([slapd disabled, ignoring --enable-wrappers argument])
	fi
	if test $ol_enable_phonetic = yes ; then
		AC_MSG_WARN([slapd disabled, ignoring --enable-phonetic argument])
	fi
	if test $ol_enable_rlookups = yes ; then
		AC_MSG_WARN([slapd disabled, ignoring --enable-rlookups argument])
	fi
	if test $ol_with_ldbm_api != auto ; then
		AC_MSG_WARN([slapd disabled, ignoring --with-ldbm-api argument])
	fi
	if test $ol_with_ldbm_type != auto ; then
		AC_MSG_WARN([slapd disabled, ignoring --with-ldbm-type argument])
	if test $ol_with_bdb2_module != static ; then
		AC_MSG_WARN([slapd disabled, ignoring --with-bdb2-module argument])
	fi
	if test $ol_with_ldap_module != static ; then
		AC_MSG_WARN([slapd disabled, ignoring --with-ldap-module argument])
	fi
	if test $ol_with_ldbm_module != static ; then
		AC_MSG_WARN([slapd disabled, ignoring --with-ldbm-module argument])
	fi
Loading
Loading full blame...