Newer
Older
AC_CHECK_HEADERS(dmalloc.h)
AC_CHECK_LIB(dmalloc, dmalloc_shutdown)
fi
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
# ud needs termcap (should insert check here)
ol_link_termcap=no
AC_CHECK_HEADERS(termcap.h ncurses.h)
if test $ol_link_termcap = no ; then
AC_CHECK_LIB(termcap, tputs, [have_termcap=yes], [have_termcap=no])
if test $have_termcap = yes ; then
AC_DEFINE(HAVE_TERMCAP)
ol_link_termcap=yes
TERMCAP_LIBS=-ltermcap
fi
fi
if test $ol_link_termcap = no ; then
AC_CHECK_LIB(ncurses, initscr, [have_ncurses=yes], [have_ncurses=no])
if test $have_ncurses = yes ; then
AC_DEFINE(HAVE_NCURSES)
ol_link_termcap=yes
TERMCAP_LIBS=-lncurses
fi
fi
if test $ol_link_termcap = no ; then
AC_DEFINE(NO_TERMCAP,1)
TERMCAP_LIBS=
fi
# FreeBSD (and others) have crypt(3) in -lcrypt
if test $ol_enable_crypt != no ; then
AC_CHECK_FUNC(crypt, [have_crypt=yes], [
AC_CHECK_LIB(crypt, crypt, [LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
have_crypt=yes], [have_crypt=no])])
if test $have_crypt = yes ; then
else
AC_MSG_WARN(could not find crypt)
if test $ol_enable_crypt = yes ; then
AC_MSG_ERROR(could not find crypt, select appropriate options or disable)
fi
AC_MSG_WARN(disabling crypt support)
ol_enable_crypt=no
fi
fi
# FreeBSD (and others) have setproctitle(3) in -lutil
if test $ol_enable_proctitle != no ; then
AC_CHECK_FUNC(setproctitle, [have_setproctitle=yes], [
AC_CHECK_LIB(util, setproctitle,
[have_setproctitle=yes
LUTIL_LIBS="$LUTIL_LIBS -lutil"],
[have_setproctitle=no
LIBOBJS="$LIBOBJS setproctitle.o"])])
if test $have_setproctitle = yes ; then
AC_DEFINE(HAVE_SETPROCTITLE,1)
fi
fi
dnl ----------------------------------------------------------------
dnl Checks for header files.
AC_HEADER_STDC
if test $ac_cv_header_stdc != yes; then
AC_MSG_WARN([could not Standard C compliant headers])
fi
AC_HEADER_DIRENT
AC_HEADER_SYS_WAIT
Kurt Zeilenga
committed
AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
if test $am_cv_sys_posix_termios = yes ; then
AC_DEFINE(HAVE_POSIX_TERMIOS,1)
fi
errno.h \
fcntl.h \
filio.h \
getopt.h \
stdarg.h \
stddef.h \
string.h \
strings.h \
sys/errno.h \
sys/ioctl.h \
sys/param.h \
sys/time.h \
sys/types.h \
syslog.h \
termios.h \
)
dnl ----------------------------------------------------------------
dnl Checks for typedefs, structures, and compiler characteristics.
Kurt Zeilenga
committed
AC_TYPE_GETGROUPS dnl requires AC_TYPE_UID_T
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
Kurt Zeilenga
committed
AM_TYPE_PTRDIFF_T
OL_TYPE_SIG_ATOMIC_T
AC_TYPE_SIZE_T
AC_STRUCT_ST_BLKSIZE
AC_HEADER_TIME
AC_STRUCT_TM
OL_C_UPPER_LOWER
AC_C_CONST
OL_C_VOLATILE
if test $cross_compiling = yes ; then
else
AC_C_BIGENDIAN
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
fi
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
if test $ac_cv_func_vprintf = yes ; then
dnl check for vsnprintf
AC_CHECK_FUNCS(vsnprintf vsprintf)
AC_FUNC_WAIT3
AC_CHECK_FUNCS( \
bcopy \
flock \
getdtablesize \
lockf \
memcpy \
memmove \
mkstemp \
select \
setpwfile \
setsid \
signal \
sigset \
strtol \
strtoul \
sysconf \
waitpid \
)
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
# these functions are required to build a thread_safe -lldap
AC_CHECK_FUNCS( \
strtok_r \
ctime_r \
gethostbyaddr_r \
gethostbyname_r \
)
if test $ac_cv_func_strtok_r = yes \
-a $ac_cv_func_ctime_r = yes \
-a $ac_cv_func_gethostbyaddr_r = yes \
-a $ac_cv_func_gethostbyname_r = yes \
; then
AC_DEFINE(LDAP_API_FEATURE_X_OPENLDAP_REENTRANT, 1)
fi
if test $ol_link_threads != no ; then
AC_DEFINE(LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE, 1)
fi
dnl We actually may need to replace more than this.
AC_REPLACE_FUNCS(getopt strdup tempnam)
dnl ----------------------------------------------------------------
# Check Configuration
OL_SYS_ERRLIST
dnl ----------------------------------------------------------------
dnl Sort out defines
if test "$ol_enable_debug" != no ; then
if test "$ol_enable_syslog" = yes ; then
AC_DEFINE(LDAP_SYSLOG,1)
fi
if test "$ol_enable_libui" = yes ; then
if test "$ol_enable_cache" = no ; then
if test "$ol_enable_dns" != no ; then
AC_DEFINE(LDAP_API_FEATURE_X_OPENLDAP_V2_DNS,LDAP_API_VENDOR_VERSION,1)
if test "$ol_enable_proctitle" != no ; then
if test "$ol_enable_referrals" != no ; then
AC_DEFINE(LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS,LDAP_API_VENDOR_VERSION,1)
if test "$ol_enable_cldap" != no ; then
AC_DEFINE(LDAP_CONNECTIONLESS,1)
fi
if test "$ol_enable_aclgroups" != no ; then
if test "$ol_enable_crypt" != no ; then
if test "$ol_enable_cleartext" != no ; then
AC_DEFINE(SLAPD_CLEARTEXT,1)
if test "$ol_enable_phonetic" != no ; then
if test "$ol_enable_rlookups" != no ; then
if test "$ol_link_ldbm" != no ; then
AC_DEFINE(SLAPD_LDBM,1)
BUILD_SLAPD=yes
BUILD_LDBM=yes
fi
if test "$ol_enable_passwd" != no ; then
AC_DEFINE(SLAPD_PASSWD,1)
BUILD_SLAPD=yes
BUILD_PASSWD=yes
fi
if test "$ol_enable_shell" != no ; then
AC_DEFINE(SLAPD_SHELL,1)
BUILD_SLAPD=yes
BUILD_SHELL=yes
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
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
dnl ----------------------------------------------------------------
AC_SUBST(BUILD_LDAPD)
AC_SUBST(BUILD_SLAPD)
AC_SUBST(BUILD_LDBM)
AC_SUBST(BUILD_PASSWD)
AC_SUBST(BUILD_SHELL)
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)
AC_SUBST(KRB_LIBS)
AC_SUBST(TERMCAP_LIBS)
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/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk:build/lib-static.mk \
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-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.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 \
,[
date > stamp-h
echo Please \"make depend\" to build dependencies
])