]> git.sur5r.net Git - openldap/commitdiff
From BOOLEAN_LDAP
authorKurt Zeilenga <kurt@openldap.org>
Wed, 16 Sep 1998 03:01:24 +0000 (03:01 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 16 Sep 1998 03:01:24 +0000 (03:01 +0000)
configure.in [new file with mode: 0644]

diff --git a/configure.in b/configure.in
new file mode 100644 (file)
index 0000000..1e84b49
--- /dev/null
@@ -0,0 +1,323 @@
+dnl 
+dnl Configure.in
+dnl
+AC_INIT(include/ldap.h)
+dnl
+dnl
+AC_PREREQ(2.10)dnl Required Autoconf version
+dnl Do not use AutoConf 2.12; it produces a configuration script
+dnl that causes an "internal 2K buffer" error on HPUX when run
+dnl with /bin/sh.  Autoconf 2.10 seems to be okay.
+AC_CONFIG_AUX_DIR(etc)
+AC_CONFIG_HEADER(include/portable.h)dnl
+dnl
+dnl Start Args
+AC_MSG_CHECKING(arguments)
+AC_PREFIX_DEFAULT(/usr/local)
+
+dnl general options
+CF_ARG_OPTION(debug,[  --enable-debug  enable debugging (yes)],[
+       LDAP_DEBUG=no],[LDAP_DEBUG=yes],yes)dnl
+CF_ARG_OPTION(cache,[  --enable-cache  enable caching (yes)],[
+       LDAP_CACHE=no],[LDAP_CACHE=yes],yes)dnl
+CF_ARG_OPTION(referrals,[  --enable-referrals  enable referrals (yes)],[
+       LDAP_REFERRALS=no],[LDAP_REFERRALS=yes],yes)dnl
+
+CF_ARG_OPTION(cldap,[  --enable-clapd  enable connectionless ldap (no)],[
+       LDAP_CLDAP=yes],[LDAP_CLDAP=no],no)dnl
+CF_ARG_OPTION(phonetic,[  --enable-phonetic    enable phonetic/soundex  (no)],[
+       LDAP_PHONETIC=yes],[LDAP_PHONETIC=no],no)dnl
+
+dnl server options
+CF_ARG_OPTION(ldapd,[  --enable-ldapd  enable building ldapd (no)],[
+       BUILD_LDAPD=yes],[BUILD_LDAPD=no],no)dnl
+CF_ARG_OPTION(slapd,[  --enable-slapd  enable building slapd (yes)],[
+       BUILD_SLAPD=no],[BUILD_SLAPD=yes],yes)dnl
+CF_ARG_OPTION(slurpd,[  --enable-slurpd        enable building slurpd (yes)],[
+       BUILD_SLURPD=no],[BUILD_SLURPD=yes],yes)dnl
+
+dnl Backend options
+CF_ARG_OPTION(ldbm,[  --enable-ldbm            enable ldbm backend (yes)],[
+       BUILD_LDBM=no],[BUILD_LDBM=yes],yes)dnl
+CF_ARG_OPTION(passwd,[  --enable-passwd        enable passwd backend (yes)],[
+       BUILD_PASSWD=no],[BUILD_PASSWD=yes],yes)dnl
+CF_ARG_OPTION(shell,[  --enable-shell  enable shell backend (yes)],[
+       BUILD_SHELL=no],[BUILD_SHELL=yes],yes)dnl
+
+AC_ARG_WITH(ndbm,[  --with-ndbm                use NDB for LDBM backend (any)],[
+       opt_ndbm=yes],[opt_ndbm=no])
+AC_ARG_WITH(gdbm,[  --with-gdbm                use GDBM for LDBM backend (any)],[
+       opt_gdbm=yes],[opt_gdbm=no])
+AC_ARG_WITH(dbhash,[  --with-dbhash            use Berkeley DB Hash for LDBM backend (any)],[
+       opt_dbhash=yes],[opt_dbhash=no])
+AC_ARG_WITH(dbbtree,[  --with-dbbtree  use Berkeley DB Btrees for LDBM backend (any)],[
+       opt_dbbtree=yes],[opt_dbbtree=no])
+
+AC_ARG_WITH(kerberos,[  --with-kerberos        use Kerberos (no)],[
+       opt_kerberos=yes],[opt_kerberos=no])
+AC_ARG_WITH(kerberos-afs,[  --with-kerberos-afs        use AFS Kerberos (no)],[
+       opt_kerberos_afs=yes],[opt_kerberos_afs=no])
+AC_ARG_WITH(threads,[  --with-threads  use threads (yes)],[
+       opt_threads=yes],[opt_threads=no])
+
+AC_MSG_RESULT(done)
+
+AC_MSG_CHECKING(LDBM preferences)
+ldbm_prefer=any
+
+if test "$opt_ndbm" = yes ; then
+       ldbm_prefer=ndbm
+fi
+if test "$opt_gdbm" = yes ; then
+       ldbm_prefer=gdbm
+fi
+if test "$opt_dbhash" = yes ; then
+       ldbm_prefer=dbhash
+fi
+if test "$opt_dbbtree" = yes ; then
+       ldbm_prefer=dbbtree
+fi
+AC_MSG_RESULT($ldbm_prefer)
+
+if test "$BUILD_SLAPD" != "yes" ; then
+       BUILD_SLURPD="no"
+       BUILD_LDBM="no"
+       BUILD_PASSWD="no"
+       BUILD_SHELL="no"
+       ldbm_prefer="none"
+fi
+
+AC_SUBST(BUILD_LDAPD)
+AC_SUBST(BUILD_SLAPD)
+AC_SUBST(BUILD_SLURPD)
+
+AC_SUBST(BUILD_LDBM)
+AC_SUBST(BUILD_PASSWD)
+AC_SUBST(BUILD_SHELL)
+
+LDAP_DEFS=
+
+if test "$LDAP_DEBUG" = "yes" ; then
+       LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG"
+fi
+if test "$LDAP_REFERRALS" = "yes" ; then
+       AC_DEFINE(LDAP_REFERRALS)
+dnl    LDAP_DEFS="$LDAP_DEFS -DLDAP_REFERRALS"
+fi
+if test "$LDAP_CACHE" = "no" ; then
+       AC_DEFINE(LDAP_NOCACHE,1)
+       LDAP_DEFS="$LDAP_DEFS -DNO_CACHE"
+fi
+if test "$LDAP_CLDAP" = "yes" ; then
+       AC_DEFINE(LDAP_CONN_LESS,1)
+       LDAP_DEFS="$LDAP_DEFS -DCLDAP"
+fi
+if test "$LDAP_PHONETIC" = "yes" ; then
+       AC_DEFINE(LDAP_PHONETIC,1)
+       LDAP_DEFS="$LDAP_DEFS -DSOUNDEX"
+fi
+
+if test "$BUILD_LDBM" = "yes" ; then
+       AC_DEFINE(LDAP_LDBM,1)
+dnl    LDAP_DEFS="$LDAP_DEFS -DLDAP_LDBM"
+fi
+if test "$BUILD_PASSWD" = "yes" ; then
+       AC_DEFINE(LDAP_PASSWD,1)
+dnl    LDAP_DEFS="$LDAP_DEFS -DLDAP_PASSWD"
+fi
+if test "$BUILD_SHELL" = "yes" ; then
+       AC_DEFINE(LDAP_SHELL,1)
+dnl    LDAP_DEFS="$LDAP_DEFS -DLDAP_SHELL"
+fi
+
+dnl End Args
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_GCC_TRADITIONAL
+
+AC_PROG_LN_S
+AC_PROG_INSTALL
+AC_PROG_RANLIB
+AC_PROG_MAKE_SET
+
+AC_PATH_PROG(SENDMAIL, sendmail, /usr/lib/sendmail,
+       $PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:etc)
+AC_PATH_PROG(EDITOR, vi, /usr/ucb/vi,
+       $PATH:/usr/ucb)
+AC_PATH_PROG(FINGER, finger, /usr/ucb/finger,
+       $PATH:/usr/ucb)
+
+ldbm_use="none"
+LIBDB=""
+
+if test "$BUILD_LDBM" = "yes" ; then
+       if test $ldbm_prefer = any -o $ldbm_prefer = dbbtree \
+                       -o $ldbm_prefer = dbhash ; then
+               AC_CHECK_FUNC(dbopen,[
+                       ldbm_use=$ldbm_prefer
+                       ldbm_prefer=found],[
+                       AC_CHECK_LIB(db,dbopen,[
+                               ldbm_use=$ldbm_prefer
+                               ldbm_prefer=found
+                               LIBDB="-ldb"
+                       ]) 
+               ])
+
+               if test $ldbm_prefer = found ; then
+                       if test $ldbm_use = dbhash ; then
+                               AC_DEFINE(LDBM_USE_DBHASH,1)
+dnl                            LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_DBHASH"
+                       else
+                               AC_DEFINE(LDBM_USE_DBBTREE,1)
+dnl                            LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_DBBTREE"
+                       fi
+               fi
+       fi
+       if test $ldbm_prefer = any -o $ldbm_prefer = gdbm ; then
+               AC_CHECK_LIB(gdbm, gdbm_open,[
+                       ldbm_use=$ldbm_prefer
+                       ldbm_prefer=found
+                       LIBDB="-lgdbm"
+                       AC_DEFINE(LDBM_USE_GDBM,1)
+dnl                    LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_GDBM"
+               ]) 
+       fi
+       if test $ldbm_prefer = any -o $ldbm_prefer = ndbm ; then
+               AC_CHECK_LIB(dbm,dbm_open,[
+                       ldbm_use=ndbm
+                       ldbm_prefer=found
+                       LIBDB="-ldbm"
+                       AC_DEFINE(LDBM_USE_NDBM,1)
+dnl                    LDAP_DEFS="$LDAP_DEFS -DLDBM_USE_NDBM"
+               ]) 
+       fi
+
+       if test $ldbm_prefer != found ; then
+               AC_MSG_ERROR(could not find suitable db for $ldbm_prefer backend)
+       fi
+
+       if test $ldbm_use = ndbm ; then
+               AC_MSG_WARN(LDBM using NDBM, functionality will be limited)
+       fi
+fi
+
+AC_SUBST(LDAP_DEFS)
+AC_SUBST(LIBDB)
+
+# ud needs termcap (should insert check here)
+LIBTERMCAP="-ltermcap"
+AC_SUBST(LIBTERMCAP)
+
+# FreeBSD has obsoleted re_comp(3) from -lc, needs -lcompat
+AC_CHECK_LIB(compat, re_comp) 
+
+# FreeBSD (and others) have crypt(3) in -lcrypt
+LIBCRYPT=
+AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT), [
+       AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"
+       AC_DEFINE(HAVE_CRYPT)])
+])
+AC_SUBST(LIBCRYPT)
+
+dnl Checks for header files.
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_CHECK_HEADERS( \
+       stddef.h        \
+       fcntl.h         \
+       limits.h        \
+       malloc.h        \
+       sgtty.h         \
+       sys/file.h      \
+       sys/ioctl.h     \
+       sys/time.h      \
+       syslog.h        \
+       termio.h        \
+       unistd.h        \
+)
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_TYPE_GETGROUPS
+AC_TYPE_MODE_T
+AC_TYPE_OFF_T
+AC_TYPE_PID_T
+AC_TYPE_SIGNAL
+AC_TYPE_SIZE_T
+AC_TYPE_UID_T
+AC_STRUCT_ST_BLKSIZE
+AC_HEADER_TIME
+AC_STRUCT_TM
+
+dnl AC_C_BIGENDIAN
+AC_C_CONST
+
+dnl Checks for library functions.
+AC_FUNC_MEMCMP
+AC_TYPE_SIGNAL
+AC_FUNC_STRFTIME
+AC_FUNC_VPRINTF
+AC_FUNC_WAIT3
+
+AC_CHECK_FUNCS(                \
+       gethostname             \
+       gettimeofday    \
+       mktime                  \
+       select                  \
+       socket                  \
+       strdup                  \
+       strerror                \
+       strstr                  \
+       strrchr                 \
+       strtod                  \
+       strtol                  \
+       strtoul                 \
+       memcpy                  \
+)
+
+AC_REPLACE_FUNCS(strdup)
+
+# Check Configuration
+CF_SYS_ERRLIST
+
+dnl need do this early
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+SYSCONFDIR=`eval echo $sysconfdir`
+AC_SUBST(SYSCONFDIR)
+
+AC_OUTPUT( \
+include/ldapconfig.h \
+include/Makefile:etc/top.mk:include/Makefile.in        \
+clients/Makefile:etc/top.mk:clients/Makefile.in:etc/dir.mk \
+clients/tools/Makefile:etc/top.mk:clients/tools/Makefile.in:etc/rules.mk \
+clients/ud/Makefile:etc/top.mk:clients/ud/Makefile.in:etc/rules.mk \
+clients/fax500/Makefile:etc/top.mk:clients/fax500/Makefile.in:etc/rules.mk \
+clients/finger/Makefile:etc/top.mk:clients/finger/Makefile.in:etc/rules.mk \
+clients/gopher/Makefile:etc/top.mk:clients/gopher/Makefile.in:etc/rules.mk \
+clients/mail500/Makefile:etc/top.mk:clients/mail500/Makefile.in:etc/rules.mk \
+clients/rcpt500/Makefile:etc/top.mk:clients/rcpt500/Makefile.in:etc/rules.mk \
+contrib/Makefile:etc/top.mk:contrib/Makefile.in:etc/dir.mk \
+contrib/saucer/Makefile:etc/top.mk:contrib/saucer/Makefile.in:etc/rules.mk \
+contrib/whois++/Makefile:etc/top.mk:contrib/whois++/Makefile.in:etc/rules.mk \
+libraries/Makefile:etc/top.mk:libraries/Makefile.in:etc/dir.mk         \
+libraries/libavl/Makefile:etc/top.mk:libraries/libavl/Makefile.in:etc/lib.mk \
+libraries/liblber/Makefile:etc/top.mk:libraries/liblber/Makefile.in:etc/lib.mk \
+libraries/libldap/Makefile:etc/top.mk:libraries/libldap/Makefile.in:etc/lib.mk \
+libraries/libldbm/Makefile:etc/top.mk:libraries/libldbm/Makefile.in:etc/lib.mk \
+libraries/libldif/Makefile:etc/top.mk:libraries/libldif/Makefile.in:etc/lib.mk \
+libraries/liblthread/Makefile:etc/top.mk:libraries/liblthread/Makefile.in:etc/lib.mk \
+servers/Makefile:etc/top.mk:servers/Makefile.in:etc/dir.mk \
+servers/ldapd/Makefile:etc/top.mk:servers/ldapd/Makefile.in:etc/srv.mk \
+servers/slapd/Makefile:etc/top.mk:servers/slapd/Makefile.in:etc/srv.mk \
+servers/slapd/back-ldbm/Makefile:etc/top.mk:servers/slapd/back-ldbm/Makefile.in:etc/srv.mk \
+servers/slapd/back-passwd/Makefile:etc/top.mk:servers/slapd/back-passwd/Makefile.in:etc/srv.mk \
+servers/slapd/back-shell/Makefile:etc/top.mk:servers/slapd/back-shell/Makefile.in:etc/srv.mk \
+servers/slapd/tools/Makefile:etc/top.mk:servers/slapd/tools/Makefile.in \
+servers/slapd/shell-backends/Makefile:etc/top.mk:servers/slapd/shell-backends/Makefile.in:etc/srv.mk \
+servers/slurpd/Makefile:etc/top.mk:servers/slurpd/Makefile.in:etc/srv.mk \
+tests/Makefile:etc/top.mk:tests/Makefile.in \
+Makefile:etc/top.mk:Makefile.in:etc/dir.mk, \
+       [date > stamp-h])