SHTOOL="$ac_cv_shtool"
dnl AC_SUBST(SHTOOL)dnl
-TB=`$SHTOOL echo -e %B`
-TN=`$SHTOOL echo -e %b`
+TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
+TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
-echo "Configuring $TB$OL_STRING$TN ..."
+OPENLDAP_CVS=""
+if test -d $ac_aux_dir/CVS; then
+ OPENLDAP_CVS="(from CVS sources) "
+fi
+
+echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
dnl Determine host platform
dnl we try not to use this for much
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
-AC_PROG_AWK
+LTSTATIC=""
+if test "${OPENLDAP_CVS}"; then
+ LTSTATIC="-static"
+fi
+AC_SUBST(LTSTATIC)dnl
+
OL_PROG_LN_H
AC_PROG_LN_S
-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)
-
dnl ----------------------------------------------------------------
dnl Perl
ol_link_perl=no
AC_EXEEXT
AC_OBJEXT
-AC_DEFINE_UNQUOTED( EXEEXT, "${EXEEXT}", [defined to be the EXE extension])
+AC_DEFINE_UNQUOTED(EXEEXT, "${EXEEXT}", [defined to be the EXE extension])
dnl ----------------------------------------------------------------
dnl BeOS requires -lbe -lroot -lnet
sys/syslog.h \
sys/time.h \
sys/types.h \
+ sys/ucred.h \
syslog.h \
termios.h \
unistd.h \
if test $ol_with_tls != no ; then
AC_CHECK_HEADERS(openssl/ssl.h ssl.h)
- if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
+ if test $ac_cv_header_openssl_ssl_h = yes \
+ -o $ac_cv_header_ssl_h = yes ; then
AC_CHECK_LIB(ssl, SSLeay_add_ssl_algorithms,
[have_ssleay=yes
need_rsaref=no],
AC_DEFINE(SLAPD_LMHASH, 1, [define to support LAN Manager passwords])
fi
-dnl ----------------------------------------------------------------
-dnl Tests for reentrant functions necessary to build a
-dnl thread_safe -lldap.
-AC_CHECK_FUNCS( \
- ctime_r \
- gethostbyname_r gethostbyaddr_r \
-)
-
-if test "$ac_cv_func_ctime_r" = no ; then
- ol_cv_func_ctime_r_nargs=0
-else
- OL_FUNC_CTIME_R_NARGS
-dnl OL_FUNC_CTIME_R_TYPE
-fi
-
-if test "$ac_cv_func_gethostbyname_r" = yes ; then
- OL_FUNC_GETHOSTBYNAME_R_NARGS
-else
- ol_cv_func_gethostbyname_r_nargs=0
-fi
-
-if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
- OL_FUNC_GETHOSTBYADDR_R_NARGS
-else
- ol_cv_func_gethostbyaddr_r_nargs=0
-fi
-
-if test "$ac_cv_func_ctime_r" = yes \
- -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
- -a "$ol_cv_func_ctime_r_nargs" -le 3 \
- -a "$ac_cv_func_gethostbyname_r" = yes \
- -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
- -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
- -a "$ac_cv_func_gethostbyaddr_r" = yes \
- -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
- -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
- ; then
-
- AC_DEFINE(LDAP_API_FEATURE_X_OPENLDAP_REENTRANT,1)
-fi
-
dnl ----------------------------------------------------------------
dnl Threads?
ol_link_threads=no
fi
dnl When in thread environment, use
-dnl #if defined( HAVE_REENTRANT_FUNCTIONS ) \
-dnl || defined( HAVE_FUNC_R )
+dnl #if defined( HAVE_REENTRANT_FUNCTIONS ) || defined( HAVE_FUNC_R )
dnl func_r(...);
dnl #else
dnl # if defined( HAVE_THREADS )
dnl _POSIX_THREAD_SAFE_FUNCTIONS
dnl _POSIX_THREADSAFE_FUNCTIONS
dnl
-dnl and is currently defined in lthread.h
+dnl and is currently defined in <ldap_pvt_thread.h>
dnl
-dnl HAVE_THREADS is defined by lthread.h iff -UNO_THREADS
+dnl HAVE_THREADS is defined by <ldap_pvt_thread.h> iff -UNO_THREADS
dnl
-dnl libldap/*.c should only include <lthread.h> iff
+dnl libldap/*.c should only include <ldap_pvt_thread.h> iff
dnl LDAP_R_COMPILE is defined. ie:
dnl #ifdef LDAP_R_COMPILE
-dnl # include LDAP_R_COMPILE
+dnl # include <ldap_pvt_thread.h>
dnl #endif
dnl
dnl LDAP_R_COMPILE is defined by libldap_r/Makefile.in
AC_DEFINE(LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE,1)
fi
+dnl ----------------------------------------------------------------
+dnl Tests for reentrant functions necessary to build -lldap_r
+AC_CHECK_FUNCS( \
+ ctime_r \
+ gethostbyname_r gethostbyaddr_r \
+)
+
+if test "$ac_cv_func_ctime_r" = no ; then
+ ol_cv_func_ctime_r_nargs=0
+else
+ OL_FUNC_CTIME_R_NARGS
+dnl OL_FUNC_CTIME_R_TYPE
+fi
+
+if test "$ac_cv_func_gethostbyname_r" = yes ; then
+ OL_FUNC_GETHOSTBYNAME_R_NARGS
+else
+ ol_cv_func_gethostbyname_r_nargs=0
+fi
+
+if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
+ OL_FUNC_GETHOSTBYADDR_R_NARGS
+else
+ ol_cv_func_gethostbyaddr_r_nargs=0
+fi
+
dnl ----------------------------------------------------------------
ol_link_ldbm=no
dnl SQL
ol_link_sql=no
if test $ol_enable_sql != no ; then
+ AC_CHECK_HEADERS(sql.h sqlext.h,[],[
+ AC_MSG_ERROR([could not locate SQL headers])
+ ])
+
AC_CHECK_LIB(iodbc,SQLDriverConnect,[have_iodbc=yes],[have_iodbc=no])
if test $have_iodbc = yes ; then
ol_link_sql="-liodbc"
wait4 \
write \
send \
+ sendmsg \
sendto \
)
dnl We actually may need to replace more than this.
-AC_REPLACE_FUNCS(getopt)
+AC_REPLACE_FUNCS(getopt getpeereid)
if test "$ac_cv_func_getopt" != yes; then
LIBSRCS="$LIBSRCS getopt.c"
fi
+if test "$ac_cv_func_getpeereid" != yes; then
+ LIBSRCS="$LIBSRCS getpeereid.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])