2004-02-29 12:49:54 +01:00
$NetBSD: patch-am,v 1.3 2004/02/29 11:49:55 markd Exp $
2002-11-19 21:54:11 +01:00
2004-02-12 21:31:35 +01:00
--- configure.in.orig 2002-06-12 04:26:46.000000000 -0500
2002-11-19 21:54:11 +01:00
+++ configure.in
@@ -237,6 +237,8 @@ AC_CHECK_FUNC(unlink)
fi
fi
2001-08-28 18:35:03 +02:00
2002-10-26 20:11:20 +02:00
+dnl AC_CHECK_FUNC(unlink, , AC_CHECK_FUNC(remove, AC_DEFINE(unlink, remove)))
+
2001-08-28 18:35:03 +02:00
dnl Checks for configuration arguments
AC_MSG_CHECKING(whether to support direct WAIS access.)
2002-10-26 20:11:20 +02:00
AC_ARG_WITH(wais,
2002-11-19 21:54:11 +01:00
@@ -330,6 +332,11 @@ AC_ARG_WITH(regex,
2001-04-20 14:33:52 +02:00
AC_DEFINE(HT_POSIX_REGEX)
if test "x$withval" = "xyes"; then
2002-11-19 21:54:11 +01:00
AC_CHECK_LIB(rx, regexec, [ LIBS="-lrx $LIBS" ] )
2001-04-20 14:33:52 +02:00
+ AC_TRY_LINK([],
+ [ regexec(); ],
+ [],
+ [ AC_CHECK_LIB(rx, regexec, [ LIBS="-lrx $LIBS" ] ) ] )
2002-11-19 21:54:11 +01:00
+
2001-04-20 14:33:52 +02:00
else
AC_ADDLIB($withval)
AC_TRY_LINK([],
2002-11-19 21:54:11 +01:00
@@ -532,27 +539,39 @@ AC_ARG_WITH(md5,
2002-10-26 20:11:20 +02:00
[ case "$withval" in
no)
AC_MSG_RESULT(no)
+ MD5DIR=""
WWWMD5=""
LWWWMD5=""
LIBWWWMD5=""
+ LIBMD5DEP=""
+ LIBMD5INC=""
2004-02-29 12:49:54 +01:00
+ AC_CHECK_LIB(c, MD5Init, [:],
2002-10-26 20:11:20 +02:00
+ [ AC_CHECK_LIB(md5, MD5Init, [ LWWWMD5="-lmd5"; LIBWWWMD5="-lmd5"], [ AC_MSG_ERROR(Could not find md5 functions. You need to compile in the md5 library.) ] ) ] )
;;
*)
AC_MSG_RESULT(yes)
AC_DEFINE(HT_MD5)
+ MD5DIR="md5"
WWWMD5="libmd5.la"
LWWWMD5="-lmd5"
LIBWWWMD5='${top_builddir}/modules/md5/libmd5.la'
+ LIBMD5INC='-I${top_srcdir}/modules/md5'
+ LIBMD5DEP="../../modules/md5/libmd5.la"
;;
esac ],
AC_MSG_RESULT(yes)
AC_DEFINE(HT_MD5)
+ MD5DIR="md5"
WWWMD5="libmd5.la"
LWWWMD5="-lmd5"
LIBWWWMD5='${top_builddir}/modules/md5/libmd5.la'
)
+AC_SUBST(MD5DIR)
AC_SUBST(WWWMD5)
2001-04-20 14:33:52 +02:00
AC_SUBST(LWWWMD5)
AC_SUBST(LIBWWWMD5)
2002-10-26 20:11:20 +02:00
+AC_SUBST(LIBMD5INC)
+AC_SUBST(LIBMD5DEP)
2001-04-20 14:33:52 +02:00
2002-11-19 21:54:11 +01:00
AC_MSG_CHECKING(whether we include WebDAV support.)
AC_ARG_WITH(dav,
@@ -609,31 +628,9 @@ AC_SUBST(MYEXT)
2001-04-20 14:33:52 +02:00
-dnl Checks for libwww and OpenSSL:
-AC_MSG_CHECKING(whether we can find OpenSSL)
-dnl find the ssl library dir (empirical)
-if test -d '/usr/local/ssl/lib'; then
- ssllib="-L/usr/local/ssl/lib -lssl -lcrypto"
-else
- ssllib="-L/usr/lib -lssl -lcrypto"
-fi
-dnl find the ssl include dir (empirical)
-if test -d '/usr/local/ssl/include'; then
- sslinc="-I/usr/local/ssl/include"
-elif test -d '/usr/local/openssl/include'; then
- sslinc="-I/usr/local/openssl/include"
-elif test -d '/usr/local/include/openssl'; then
- sslinc="-I/usr/local/include/openssl"
-elif test -d '/usr/include/ssl'; then
- sslinc="-I/usr/include/ssl"
-elif test -d '/usr/include/openssl'; then
- sslinc="-I/usr/include/openssl"
-else
- sslinc=""
-fi
+dnl Checks for OpenSSL:
+AC_MSG_CHECKING(whether to support OpenSSL.)
WWWSSL=""
-SSLINC=""
-LIBSSL=""
LWWWSSL=""
LIBWWWSSL=""
WWWSSLEX=""
2004-02-12 21:31:35 +01:00
@@ -645,10 +642,35 @@ AC_ARG_WITH(ssl,
2001-04-20 14:33:52 +02:00
;;
*)
if test "x$withval" = "xyes"; then
- withval=$ssllib
- SSLINC=$sslinc
+ dnl find the ssl library dir (empirical)
+ if test -d '/usr/local/ssl/lib'; then
+ ssllib="-L/usr/local/ssl/lib -lssl -lcrypto"
+ else
+ ssllib="-L/usr/lib -lssl -lcrypto"
+ fi
+ dnl find the ssl include dir (empirical)
+ if test -d '/usr/local/ssl/include'; then
+ sslinc="-I/usr/local/ssl/include"
+ elif test -d '/usr/local/openssl/include'; then
+ sslinc="-I/usr/local/openssl/include"
+ elif test -d '/usr/local/include/openssl'; then
+ sslinc="-I/usr/local/include/openssl"
+ elif test -d '/usr/include/ssl'; then
+ sslinc="-I/usr/include/ssl"
+ elif test -d '/usr/include/openssl'; then
+ sslinc="-I/usr/include/openssl"
+ else
+ sslinc=""
+ fi
+ SSLINC="$sslinc"
+ SSLLIBS="$ssllib"
+ else
2002-08-07 17:56:22 +02:00
+ SSLINC="-I${withval}/include/openssl -I${withval}/include"
2002-09-23 15:52:15 +02:00
+ SSLLIBS="-L${withval}/lib -lssl -lcrypto -Wl,-R${withval}/lib"
2002-11-19 21:54:11 +01:00
+
2001-04-20 14:33:52 +02:00
fi
- LIBS="$LIBS $withval"
+ SAVED_LIBS="${LIBS}"
2004-02-12 21:31:35 +01:00
+ LIBS="${LIBS} ${SSLLIBS}"
2001-04-20 14:33:52 +02:00
AC_TRY_LINK([],
[ SSL_library_init(); ],
[],
2004-02-12 21:31:35 +01:00
@@ -663,6 +685,7 @@ AC_ARG_WITH(ssl,
2001-04-20 14:33:52 +02:00
[ AC_MSG_RESULT(no) ])
AC_SUBST(WWWSSL)
AC_SUBST(SSLINC)
+AC_SUBST(SSLLIBS)
AC_SUBST(LWWWSSL)
AC_SUBST(LIBWWWSSL)
AC_SUBST(WWWSSLEX)