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.
Kurt Zeilenga
committed
dnl Disable config.cache!
define([AC_CACHE_LOAD], )dnl
define([AC_CACHE_SAVE], )dnl
AC_INIT(build/version)dnl
Kurt Zeilenga
committed
AC_CONFIG_AUX_DIR(build)dnl
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_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(OPENLDAP_PACKAGE,"$PACKAGE",Package)
AC_DEFINE_UNQUOTED(OPENLDAP_VERSION,"$VERSION",Version)
Kurt Zeilenga
committed
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
Kurt Zeilenga
committed
AC_CONFIG_HEADER(include/portable.h include/ldap_features.h include/lber_types.h)dnl
Kurt Zeilenga
committed
dnl ----------------------------------------------------------------
dnl Start Args
AC_MSG_CHECKING(configure arguments)
AC_PREFIX_DEFAULT(/usr/local)
Kurt Zeilenga
committed
top_builddir=`pwd`
AC_SUBST(top_builddir)dnl
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
Kurt Zeilenga
committed
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
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
OL_ARG_ENABLE(dmalloc,[ --enable-dmalloc enable debug malloc support], no)dnl
OL_ARG_WITH(kerberos,[ --with-kerberos with Kerberos support],
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],
OL_ARG_WITH(yielding_select,[ --with-yielding-select with implicitly yielding select],
auto, [auto yes no manual] )
dnl Server options
dnl LDAPD OPTIONS
Kurt Zeilenga
committed
AC_ARG_WITH(xxldapdoptions,[LDAPD Options:])
OL_ARG_ENABLE(ldapd,[ --enable-ldapd enable building ldapd], no)dnl
dnl SLAPD OPTIONS
Kurt Zeilenga
committed
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
OL_ARG_ENABLE(bdb2,[ --enable-bdb2 enable bdb2 backend], no)dnl
Bastiaan Bakker
committed
OL_ARG_WITH(bdb2_module,[ --with-bdb2-module module type], static,
[static dynamic])
OL_ARG_ENABLE(ldap,[ --enable-ldap enable ldap backend], no)dnl
Bastiaan Bakker
committed
OL_ARG_WITH(ldap_module,[ --with-ldap-module module type], static,
[static dynamic])
OL_ARG_ENABLE(ldbm,[ --enable-ldbm enable ldbm backend], yes)dnl
Bastiaan Bakker
committed
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
Bastiaan Bakker
committed
OL_ARG_WITH(passwd_module,[ --with-passwd-module module type], static,
[static dynamic])
OL_ARG_ENABLE(perl,[ --enable-perl enable perl backend], no)dnl
Bastiaan Bakker
committed
OL_ARG_WITH(perl_module,[ --with-perl-module module type], static,
[static dynamic])
OL_ARG_ENABLE(shell,[ --enable-shell enable shell backend], no)dnl
Bastiaan Bakker
committed
OL_ARG_WITH(shell_module,[ --with-shell-module module type], static,
[static dynamic])
OL_ARG_ENABLE(tcl,[ --enable-tcl enable tcl backend], no)dnl
Bastiaan Bakker
committed
OL_ARG_WITH(tcl_module,[ --with-tcl-module module type], static,
[static dynamic])
Kurt Zeilenga
committed
AC_ARG_WITH(xxslurpdoptions,[SLURPD Options:])
OL_ARG_ENABLE(slurpd,[ --enable-slurpd enable building slurpd], auto)dnl
Kurt Zeilenga
committed
AC_ARG_WITH(xxliboptions,[Library Generation & Linking Options])
AC_ENABLE_STATIC
dnl AC_DISABLE_SHARED
AC_ENABLE_SHARED
Kurt Zeilenga
committed
dnl General "enable" options
# validate options
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
fi
fi
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])
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])
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])
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])
Bastiaan Bakker
committed
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...