OPENLDAP_LIBVERSION=$OL_API_LIB
AC_SUBST(OPENLDAP_LIBVERSION)dnl
+OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
+AC_SUBST(OPENLDAP_RELEASE_DATE)dnl
+
dnl We use autoconf features new to 2.13.
dnl aclocal.m4 should be built using aclocal from automake 1.4
dnl libtool 1.4.2 should be installed.
dnl Initialize vars
LDAP_LIBS=
LDIF_LIBS=
-LDBM_LIB=
LDBM_LIBS=
LTHREAD_LIBS=
LUTIL_LIBS=
fi
if test -z "${CC}"; then
- AC_CHECK_PROGS(CC,cc)
-fi
+ AC_CHECK_PROGS(CC,cc gcc,missing)
-dnl The default CFLAGS is empty NOT whatever AC_PROG_CC sets.
-dnl (for now, let autoconf sort this out)
-dnl CFLAGS=${CFLAGS-""}
+ if test "${CC}" = "missing" ; then
+ AC_MSG_ERROR([Unable to locate cc(1) or suitable replacement. Check PATH or set CC.])
+ fi
+fi
if test -z "${AR}"; then
AC_CHECK_PROGS(AR,ar gar,missing)
if test "${AR}" = "missing" ; then
- AC_MSG_ERROR([Unable to locate ar(1). Check PATH or set AR.])
+ AC_MSG_ERROR([Unable to locate ar(1) or suitable replacement. Check PATH or set AR.])
fi
fi
AC_DEFINE(HAVE_AIX_SECURITY,1,[define if you have AIX security lib])
])
+dnl ----------------------------------------------------------------
+dnl Check for IBM OS/390
+case "$target" in
+*-ibm-openedition)
+ ac_cv_func_getopt=no
+ AC_DEFINE(BOTH_STRINGS_H,1,[define to use both <string.h> and <strings.h>])
+ ;;
+esac
dnl ----------------------------------------------------------------
dnl Check for module support
# endif
], [ol_cv_inet6_addrstrlen=yes], [ol_cv_inet6_addrstrlen=no])])
- if test $ol_cv_inet6_addrstrlen = yes ; then
+
+ AC_CACHE_CHECK([struct sockaddr_storage],ol_cv_struct_sockaddr_storage,[
+ AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+],[
+ struct sockaddr_storage ss;
+], [ol_cv_struct_sockaddr_storage=yes],
+ [ol_cv_struct_sockaddr_storage=no])])
+
+ if test $ol_cv_inet6_addrstrlen = yes \
+ -a $ol_cv_struct_sockaddr_storage = yes ; then
ol_link_ipv6=yes
- elif test $ol_enable_ipv6 = yes ; then
+ elif test $ol_enable_ipv6 = yes \
+ -a $ol_cv_inet6_addrstrlen = no ; then
AC_MSG_ERROR([IPv6 support requires INET6_ADDRSTRLEN])
+ elif test $ol_enable_ipv6 = yes \
+ -a $ol_cv_struct_sockaddr_storage = no ; then
+ AC_MSG_ERROR([IPv6 support requires struct sockaddr_storage])
fi
fi
if test $ac_cv_header_pthread_h = yes ; then
OL_POSIX_THREAD_VERSION
- if test $ol_cv_pthread_version = final ; then
- AC_DEFINE(HAVE_PTHREADS_FINAL,1,
- [define if pthreads API compatible with final spec])
- elif test $ol_cv_pthread_version = draft4 ; then
- AC_DEFINE(HAVE_PTHREADS_D4,1,
- [define if pthreads API compatible with draft4 spec])
+ if test $ol_cv_pthread_version != 0 ; then
+ AC_DEFINE_UNQUOTED(HAVE_PTHREADS,$ol_cv_pthread_version,
+ [define to pthreads API spec revision])
else
AC_MSG_ERROR([unknown pthread version])
fi
OL_PTHREAD_TRY([-lpthreads],[ol_cv_pthread_lib_lpthreads])
if test $ol_link_threads != no ; then
- AC_DEFINE(HAVE_PTHREADS,1,
- [define if you have POSIX Threads])
-
LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
dnl save flags
#endif
#endif
-#if HAVE_PTHREADS_D4
+#if HAVE_PTHREADS < 6
pthread_create(&t, pthread_attr_default, task, NULL);
#else
pthread_create(&t, NULL, task, NULL);
if test $ol_enable_spasswd != no ; then
ol_link_spasswd=yes
fi
+
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $ol_link_sasl"
+ AC_CHECK_FUNC(sasl_version, [AC_DEFINE(HAVE_SASL_VERSION,1,
+ [define if your SASL library has sasl_version()])])
+ LIBS="$ac_save_LIBS"
fi
else
if test $ac_cv_func_vprintf = yes ; then
dnl check for vsnprintf
- AC_CHECK_FUNCS(vsnprintf vsprintf)
+ AC_CHECK_FUNCS(snprintf vsnprintf)
fi
AC_CHECK_FUNCS( \
endpwent \
fcntl \
flock \
+ fstat \
getdtablesize \
getgrgid \
gethostname \
if test "$ac_cv_func_getopt" != yes; then
LIBSRCS="$LIBSRCS getopt.c"
fi
+if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
+ if test "$ac_cv_func_snprintf" != yes; then
+ AC_DEFINE(snprintf, ber_pvt_snprintf, [define to snprintf routine])
+ fi
+ if test "$ac_cv_func_vsnprintf" != yes; then
+ AC_DEFINE(vsnprintf, ber_pvt_vsnprintf, [define to snprintf routine])
+ fi
+fi
dnl ----------------------------------------------------------------
# Check Configuration
AC_DEFINE(SLAPD_LDBM,1,[define to support LDBM backend])
BUILD_SLAPD=yes
BUILD_LDBM=yes
- LDBM_LIB="-lldbm"
if test "$ol_with_ldbm_module" != static ; then
AC_DEFINE(SLAPD_LDBM_DYNAMIC,1,
[define to support dynamic LDBM backend])
PLAT=UNIX
fi
+if test -z "$SLAPD_STATIC_BACKENDS"; then
+ SLAPD_NO_STATIC='#'
+else
+ SLAPD_NO_STATIC=
+fi
+
AC_SUBST(LIBSRCS)
AC_SUBST(PLAT)
AC_SUBST(BUILD_LIBS_DYNAMIC)
AC_SUBST(BUILD_TCL_DYNAMIC)
AC_SUBST(BUILD_SLURPD)
-AC_SUBST(LDBM_LIB)
-
AC_SUBST(LDAP_LIBS)
AC_SUBST(LDIF_LIBS)
AC_SUBST(SLAPD_LIBS)
AC_SUBST(SLAPD_MODULES_CPPFLAGS)
AC_SUBST(SLAPD_MODULES_LDFLAGS)
+AC_SUBST(SLAPD_NO_STATIC)
AC_SUBST(SLAPD_STATIC_BACKENDS)
AC_SUBST(SLAPD_DYNAMIC_BACKENDS)
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/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
-clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
-clients/maildap/Makefile:build/top.mk:clients/maildap/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 \