OL_ARG_ENABLE(x_compile,[ --enable-x-compile enable cross compiling],
no, [yes no])dnl
-
dnl General "with" options
OL_ARG_ENABLE(dmalloc,[ --enable-dmalloc enable debug malloc support], no)dnl
auto, [auto posix mach lwp yes no manual] )
OL_ARG_WITH(yielding_select,[ --with-yielding-select with implicitly yielding select],
auto, [auto yes no manual] )
+OL_ARG_WITH(tls,[ --with-tls use tls/ssl],
+ auto, [auto ssleay openssl yes no] )
dnl Server options
KRB_LIBS=
TERMCAP_LIBS=
+TLS_LIBS=
dnl ----------------------------------------------------------------
dnl Checks for programs
AC_DEFINE(HAVE_KERBEROS, 1, [define if you have Kerberos])
fi
+dnl
+dnl Check for SSL/TLS
+dnl
+ol_link_tls=no
+if test $ol_with_tls = auto -o $ol_with_tls = ssleay \
+ -o $ol_with_tls = openssl ; then
+
+ AC_CHECK_HEADERS(ssl.h)
+
+ if test $ac_cv_header_ssl_h = yes ; then
+ AC_CHECK_LIB( ssl, SSLeay_add_ssl_algorithms,
+ [have_ssleay=yes], [have_ssleay=no], [-lcrypto])
+
+ if test $have_ssleay = yes ; then
+ ol_with_tls=found
+ ol_link_tls=yes
+
+ AC_DEFINE( HAVE_SSLEAY, 1,
+ [define if you have SSLeay] )
+
+ TLS_LIBS="-lssl -lcrypto"
+ fi
+ fi
+fi
+
+if test $ol_link_tls = yes ; then
+ AC_DEFINE( HAVE_TLS, 1, [define if you have TLS] )
+fi
+
ol_link_threads=no
if test $ol_with_threads = auto -o $ol_with_threads = yes \
-o $ol_with_threads = posix ; then
getopt.h \
libutil.h \
limits.h \
+ locale.h \
malloc.h \
memory.h \
regex.h \
ol_cv_func_ctime_r=0
fi
+if test "$ac_cv_func_gethostbyname_r" = yes ; then
+ OL_FUNC_GETHOSTBYNAME_R_NARGS
+else
+ ol_cv_func_gethostbyname_r=0
+fi
+
+if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
+ OL_FUNC_GETHOSTBYADDR_R_NARGS
+else
+ ol_cv_func_gethostbyaddr_r=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 "$ol_cv_func_gethostbyname_r_nargs" -ge 5 -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
+ -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
-a "$ac_cv_func_gethostbyaddr_r" = yes \
-a "$ac_cv_func_gethostbyname_r" = yes \
; then
AC_SUBST(KRB_LIBS)
AC_SUBST(TERMCAP_LIBS)
+AC_SUBST(TLS_LIBS)
dnl ----------------------------------------------------------------
dnl final output
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 \
+tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
+tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
,[
date > stamp-h
echo Please \"make depend\" to build dependencies