Newer
Older
dnl ----------------------------------------------------------------
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
Kurt Zeilenga
committed
AM_TYPE_PTRDIFF_T
AC_CHECK_TYPE(ssize_t, [signed int])
AC_CHECK_TYPE(caddr_t, [char *])
OL_TYPE_SOCKLEN_T
AC_STRUCT_ST_BLKSIZE
AC_HEADER_TIME
AC_STRUCT_TM
dnl AC_TYPE_GETGROUPS
OL_STRUCT_PASSWD_PW_GECOS
OL_STRUCT_PASSWD_PW_PASSWD
OL_C_VOLATILE
if test $cross_compiling = yes ; then
AC_DEFINE(CROSS_COMPILING, 1, [define if cross compiling])
else
AC_C_BIGENDIAN
fi
AC_COMPILE_CHECK_SIZEOF(short)
AC_COMPILE_CHECK_SIZEOF(int)
AC_COMPILE_CHECK_SIZEOF(long)
if test "$ac_cv_sizeof_int" -lt 4 ; then
AC_MSG_WARN([OpenLDAP requires 'int' to be 32 bits or greater.])
AC_DEFINE(LBER_INT_T,long)
else
AC_DEFINE(LBER_INT_T,int)
fi
AC_DEFINE(LBER_LEN_T,long)
AC_DEFINE(LBER_SOCKET_T,int)
AC_DEFINE(LBER_TAG_T,long)
dnl ----------------------------------------------------------------
dnl Checks for library functions.
AC_FUNC_MEMCMP
dnl AM_FUNC_MKTIME dnl checks for sys/time.h and unistd.h
dnl AM_FUNC_STRTOD
dnl Check for NT specific routines
AC_CHECK_FUNC(_spawnlp, AC_DEFINE(HAVE_SPAWNLP,1,[if you have spawnlp()]))
AC_CHECK_FUNC(_snprintf, [ac_cv_func_snprintf=yes
AC_DEFINE(snprintf, _snprintf, [define to snprintf routine])
AC_CHECK_FUNC(_vsnprintf, [ac_cv_func_vsnprintf=yes
AC_DEFINE(vsnprintf, _vsnprintf, [define to vsnprintf routine])
if test $ac_cv_func_vprintf = yes ; then
dnl check for vsnprintf
AC_CHECK_FUNCS(vsnprintf vsprintf)
endgrent \
endpwent \
getdtablesize \
Ben Collins
committed
getpass \
getpwnam \
getspnam \
gettimeofday \
initgroups \
lockf \
memcpy \
memmove \
mkstemp \
setgid \
setegid \
setuid \
seteuid \
sigaction \
write \
send \
sendto \
dnl We actually may need to replace more than this.
if test "$ac_cv_func_getopt" != yes; then
LIBSRCS="$LIBSRCS getopt.c"
fi
if test "$ac_cv_func_tempnam" != yes; then
LIBSRCS="$LIBSRCS tempnam.c"
fi
dnl ----------------------------------------------------------------
# Check Configuration
OL_SYS_ERRLIST
dnl ----------------------------------------------------------------
if test "$ol_enable_debug" != no ; then
AC_DEFINE(LDAP_DEBUG,1,
[define this to add debugging code])
if test "$ol_enable_syslog" = yes ; then
AC_DEFINE(LDAP_SYSLOG,1,
[define this to add syslog code])
fi
if test "$ol_enable_libui" = yes ; then
AC_DEFINE(LDAP_LIBUI,1,
[define this for LDAP User Interface support])
if test "$ol_enable_cache" = no ; then
AC_DEFINE(LDAP_NOCACHE,1,
[define this to remove -lldap cache support])
if test "$ol_link_kbind" != no ; then
AC_DEFINE(LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND,LDAP_VENDOR_VERSION)
fi
if test "$ol_enable_dns" != no ; then
AC_DEFINE(LDAP_API_FEATURE_X_OPENLDAP_V2_DNS,LDAP_VENDOR_VERSION)
if test "$ol_enable_proctitle" != no ; then
AC_DEFINE(LDAP_PROCTITLE,1,
[define this for LDAP process title support])
if test "$ol_enable_referrals" != no ; then
AC_DEFINE(LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS,LDAP_VENDOR_VERSION)
if test "$ol_enable_cldap" != no ; then
AC_DEFINE(LDAP_CONNECTIONLESS,1,[define to support CLDAP])
if test "$ol_enable_ldapi" != no; then
AC_DEFINE(USE_PF_LOCAL,1,[define to support PF_LOCAL transport])
fi
if test "$ol_enable_cleartext" != no ; then
AC_DEFINE(SLAPD_CLEARTEXT,1,[define to support cleartext passwords])
fi
if test "$ol_enable_crypt" != no ; then
AC_DEFINE(SLAPD_CRYPT,1,[define to support crypt(3) passwords])
if test "$ol_link_kpasswd" != no ; then
AC_DEFINE(SLAPD_KPASSWD,1,[define to support Kerberos passwords])
if test "$ol_enable_multimaster" != no ; then
AC_DEFINE(SLAPD_MULTIMASTER,1,[define to support multimaster replication])
fi
if test "$ol_enable_phonetic" != no ; then
AC_DEFINE(SLAPD_PHONETIC,1,[define to support phonetic])
if test "$ol_enable_rlookups" != no ; then
AC_DEFINE(SLAPD_RLOOKUPS,1,[define to support reverse lookups])
if test "$ol_enable_aci" != no ; then
AC_DEFINE(SLAPD_ACI_ENABLED,1,[define to support per-object ACIs])
fi
if test "$ol_link_modules" != no ; then
AC_DEFINE(SLAPD_MODULES,1,[define to support modules])
SLAPD_MODULES_LDFLAGS="-dlopen self"
if test "$ol_link_bdb2" != no ; then
AC_DEFINE(SLAPD_BDB2,1,[define to support BDB2 backend])
BUILD_SLAPD=yes
BUILD_BDB2=yes
Bastiaan Bakker
committed
if test "$ol_with_bdb2_module" != static ; then
AC_DEFINE(SLAPD_BDB2_DYNAMIC,1,
[define to support dynamic BDB2 backend])
BUILD_BDB2=mod
BUILD_BDB2_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb2/back_bdb2.la"
Bastiaan Bakker
committed
fi
fi
if test "$ol_enable_ldap" != no ; then
AC_DEFINE(SLAPD_LDAP,1,[define to support LDAP backend])
BUILD_SLAPD=yes
BUILD_LDAP=yes
Bastiaan Bakker
committed
if test "$ol_with_ldap_module" != static ; then
AC_DEFINE(SLAPD_LDAP_DYNAMIC,1,
[define to support dynamic LDAP backend])
BUILD_LDAP=mod
BUILD_LDAP_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
Bastiaan Bakker
committed
fi
fi
if test "$ol_link_ldbm" != no ; then
AC_DEFINE(SLAPD_LDBM,1,[define to support LDBM backend])
Bastiaan Bakker
committed
if test "$ol_with_ldbm_module" != static ; then
AC_DEFINE(SLAPD_LDBM_DYNAMIC,1,
[define to support dynamic LDBM backend])
BUILD_LDBM=mod
BUILD_LDBM_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
Bastiaan Bakker
committed
fi
if test "$ol_enable_passwd" != no ; then
AC_DEFINE(SLAPD_PASSWD,1,[define to support PASSWD backend])
Bastiaan Bakker
committed
if test "$ol_with_passwd_module" != static ; then
AC_DEFINE(SLAPD_PASSWD_DYNAMIC,1,
[define to support dynamic PASSWD backend])
BUILD_PASSWD=mod
BUILD_PASSWD_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
Bastiaan Bakker
committed
fi
if test "$ol_link_perl" != no ; then
AC_DEFINE(SLAPD_PERL,1,[define to support PERL backend])
BUILD_SLAPD=yes
BUILD_PERL=yes
Bastiaan Bakker
committed
if test "$ol_with_perl_module" != static ; then
AC_DEFINE(SLAPD_PERL_DYNAMIC,1,
[define to support dynamic PERL backend])
BUILD_PERL=mod
BUILD_PERL_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
Bastiaan Bakker
committed
fi
if test "$ol_enable_shell" != no ; then
AC_DEFINE(SLAPD_SHELL,1,[define to support SHELL backend])
Bastiaan Bakker
committed
if test "$ol_with_shell_module" != static ; then
AC_DEFINE(SLAPD_SHELL_DYNAMIC,1,
[define to support dynamic SHELL backend])
BUILD_SHELL=mod
BUILD_SHELL_DYNAMIC=shared
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
Bastiaan Bakker
committed
fi
if test "$ol_enable_tcl" != no ; then
AC_DEFINE(SLAPD_TCL,1,[define to support TCL backend])
BUILD_SLAPD=yes
BUILD_TCL=yes
Bastiaan Bakker
committed
if test "$ol_with_tcl_module" != static; then
AC_DEFINE(SLAPD_TCL_DYNAMIC,1,
[define to support dynamic TCL backend])
SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
Bastiaan Bakker
committed
fi
if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
$BUILD_SLAPD = yes ; then
BUILD_SLURPD=yes
fi
if test "$ol_link_isode" != no ; then
dnl ----------------------------------------------------------------
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
if test "$LINK_BINS_DYNAMIC" = yes; then
LIB_LINKAGE=DYN
LT_LIB_LINKAGE=shared
else
LIB_LINKAGE=STAT
LT_LIB_LINKAGE=static
fi
if test "$ac_cv_mingw32" = yes ; then
PLAT=NT
DYN_EXT=dll
else
PLAT=UNIX
DYN_EXT=so
fi
AC_SUBST(LIBSRCS)
AC_SUBST(PLAT)
AC_SUBST(LIB_LINKAGE)
AC_SUBST(LT_LIB_LINKAGE)
AC_SUBST(DYN_EXT)
AC_SUBST(BUILD_LDAPD)
AC_SUBST(BUILD_SLAPD)
AC_SUBST(BUILD_BDB2)
AC_SUBST(BUILD_LDAP)
AC_SUBST(BUILD_LDBM)
AC_SUBST(BUILD_PASSWD)
AC_SUBST(BUILD_TCL)
Bastiaan Bakker
committed
AC_SUBST(BUILD_BDB2_DYNAMIC)
AC_SUBST(BUILD_LDAP_DYNAMIC)
AC_SUBST(BUILD_LDBM_DYNAMIC)
AC_SUBST(BUILD_PASSWD_DYNAMIC)
AC_SUBST(BUILD_PERL_DYNAMIC)
AC_SUBST(BUILD_SHELL_DYNAMIC)
AC_SUBST(BUILD_TCL_DYNAMIC)
AC_SUBST(BUILD_SLURPD)
AC_SUBST(LDAP_LIBS)
AC_SUBST(LDAPD_LIBS)
AC_SUBST(SLAPD_LIBS)
AC_SUBST(SLURPD_LIBS)
AC_SUBST(LDBM_LIBS)
AC_SUBST(LTHREAD_LIBS)
AC_SUBST(LUTIL_LIBS)
Ben Collins
committed
AC_SUBST(MOD_TCL_LIB)
AC_SUBST(LINK_BINS_DYNAMIC)
AC_SUBST(SLAPD_MODULES_CPPFLAGS)
AC_SUBST(SLAPD_MODULES_LDFLAGS)
AC_SUBST(SLAPD_MODULES_LIST)
Ben Collins
committed
AC_SUBST(PERL_CPPFLAGS)
AC_SUBST(SLAPD_PERL_LDFLAGS)
Ben Collins
committed
AC_SUBST(MOD_PERL_LDFLAGS)
AC_SUBST(KRB4_LIBS)
AC_SUBST(KRB5_LIBS)
AC_SUBST(READLINE_LIBS)
AC_SUBST(MODULES_LIBS)
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
dnl ----------------------------------------------------------------
dnl final output
dnl
AC_OUTPUT( \
Makefile:build/top.mk:Makefile.in:build/dir.mk \
doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
clients/fax500/Makefile:build/top.mk:clients/fax500/Makefile.in:build/rules.mk \
clients/gopher/Makefile:build/top.mk:clients/gopher/Makefile.in:build/rules.mk \
clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
clients/rcpt500/Makefile:build/top.mk:clients/rcpt500/Makefile.in:build/rules.mk \
clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
include/Makefile:build/top.mk:include/Makefile.in \
libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk \
Kurt Zeilenga
committed
libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk \
libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk \
libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk \
libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk \
Kurt Zeilenga
committed
libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk \
libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk \
libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk \
Kurt Zeilenga
committed
libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk \
servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
servers/slapd/back-bdb2/Makefile:build/top.mk:servers/slapd/back-bdb2/Makefile.in:build/mod.mk \
servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
Ben Collins
committed
contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
contrib/web_ldap/Makefile:build/top.mk:contrib/web_ldap/Makefile.in:build/rules.mk \
,[
date > stamp-h
echo Please \"make depend\" to build dependencies
])