1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
$NetBSD: patch-am,v 1.3 2004/02/29 11:49:55 markd Exp $
--- configure.in.orig 2002-06-12 04:26:46.000000000 -0500
+++ configure.in
@@ -237,6 +237,8 @@ AC_CHECK_FUNC(unlink)
fi
fi
+dnl AC_CHECK_FUNC(unlink, , AC_CHECK_FUNC(remove, AC_DEFINE(unlink, remove)))
+
dnl Checks for configuration arguments
AC_MSG_CHECKING(whether to support direct WAIS access.)
AC_ARG_WITH(wais,
@@ -330,6 +332,11 @@ AC_ARG_WITH(regex,
AC_DEFINE(HT_POSIX_REGEX)
if test "x$withval" = "xyes"; then
AC_CHECK_LIB(rx, regexec, [ LIBS="-lrx $LIBS" ] )
+ AC_TRY_LINK([],
+ [ regexec(); ],
+ [],
+ [ AC_CHECK_LIB(rx, regexec, [ LIBS="-lrx $LIBS" ] ) ] )
+
else
AC_ADDLIB($withval)
AC_TRY_LINK([],
@@ -532,27 +539,39 @@ AC_ARG_WITH(md5,
[ case "$withval" in
no)
AC_MSG_RESULT(no)
+ MD5DIR=""
WWWMD5=""
LWWWMD5=""
LIBWWWMD5=""
+ LIBMD5DEP=""
+ LIBMD5INC=""
+ AC_CHECK_LIB(c, MD5Init, [:],
+ [ 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)
AC_SUBST(LWWWMD5)
AC_SUBST(LIBWWWMD5)
+AC_SUBST(LIBMD5INC)
+AC_SUBST(LIBMD5DEP)
AC_MSG_CHECKING(whether we include WebDAV support.)
AC_ARG_WITH(dav,
@@ -609,31 +628,9 @@ AC_SUBST(MYEXT)
-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=""
@@ -645,10 +642,35 @@ AC_ARG_WITH(ssl,
;;
*)
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
+ SSLINC="-I${withval}/include/openssl -I${withval}/include"
+ SSLLIBS="-L${withval}/lib -lssl -lcrypto -Wl,-R${withval}/lib"
+
fi
- LIBS="$LIBS $withval"
+ SAVED_LIBS="${LIBS}"
+ LIBS="${LIBS} ${SSLLIBS}"
AC_TRY_LINK([],
[ SSL_library_init(); ],
[],
@@ -663,6 +685,7 @@ AC_ARG_WITH(ssl,
[ AC_MSG_RESULT(no) ])
AC_SUBST(WWWSSL)
AC_SUBST(SSLINC)
+AC_SUBST(SSLLIBS)
AC_SUBST(LWWWSSL)
AC_SUBST(LIBWWWSSL)
AC_SUBST(WWWSSLEX)
|