]>
Commit | Line | Data |
---|---|---|
d551412a DS |
1 | #*************************************************************************** |
2 | # _ _ ____ _ | |
3 | # Project ___| | | | _ \| | | |
4 | # / __| | | | |_) | | | |
5 | # | (__| |_| | _ <| |___ | |
6 | # \___|\___/|_| \_\_____| | |
7 | # | |
e2c81773 | 8 | # Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al. |
d551412a DS |
9 | # |
10 | # This software is licensed as described in the file COPYING, which | |
11 | # you should have received as part of this distribution. The terms | |
12 | # are also available at http://curl.haxx.se/docs/copyright.html. | |
13 | # | |
14 | # You may opt to use, copy, modify, merge, publish, distribute and/or sell | |
15 | # copies of the Software, and permit persons to whom the Software is | |
16 | # furnished to do so, under the terms of the COPYING file. | |
17 | # | |
18 | # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | |
19 | # KIND, either express or implied. | |
20 | # | |
21 | # $Id$ | |
b377e857 | 22 | #*************************************************************************** |
ae1912cb | 23 | dnl Process this file with autoconf to produce a configure script. |
7349940b | 24 | |
a147a079 | 25 | AC_PREREQ(2.57) |
7349940b | 26 | |
380ed8be | 27 | dnl We don't know the version number "statically" so we use a dash here |
d70f3374 | 28 | AC_INIT([curl], [-], [a suitable curl mailing list => http://curl.haxx.se/mail/]) |
d5ba0309 DS |
29 | |
30 | dnl configure script copyright | |
267836e8 | 31 | AC_COPYRIGHT([Copyright (c) 1998 - 2008 Daniel Stenberg, <daniel@haxx.se> |
e16c1b8e | 32 | This configure script may be copied, distributed and modified under the |
d5ba0309 DS |
33 | terms of the curl license; see COPYING for more details]) |
34 | ||
93c53424 | 35 | AC_CONFIG_SRCDIR([lib/urldata.h]) |
14240e9e | 36 | AM_CONFIG_HEADER(lib/config.h src/config.h include/curl/curlbuild.h) |
ed29552b | 37 | AM_MAINTAINER_MODE |
8f5ffd94 | 38 | |
0b57c475 | 39 | dnl SED is mandatory for configure process and libtool. |
d2661cb4 | 40 | dnl Set it now, allowing it to be changed later. |
0b57c475 | 41 | AC_PATH_PROG([SED], [sed], [not_found], |
bfaab6ed | 42 | [$PATH:/usr/bin:/usr/local/bin]) |
0b57c475 YT |
43 | if test -z "$SED" || test "$SED" = "not_found"; then |
44 | AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.]) | |
bfaab6ed | 45 | fi |
817efbc2 | 46 | AC_SUBST([SED]) |
075c5342 | 47 | |
0b57c475 | 48 | dnl GREP is mandatory for configure process and libtool. |
d2661cb4 | 49 | dnl Set it now, allowing it to be changed later. |
0b57c475 | 50 | AC_PATH_PROG([GREP], [grep], [not_found], |
bfaab6ed | 51 | [$PATH:/usr/bin:/usr/local/bin]) |
0b57c475 YT |
52 | if test -z "$GREP" || test "$GREP" = "not_found"; then |
53 | AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.]) | |
54 | fi | |
817efbc2 | 55 | AC_SUBST([GREP]) |
0b57c475 YT |
56 | |
57 | dnl EGREP is mandatory for configure process and libtool. | |
d2661cb4 | 58 | dnl Set it now, allowing it to be changed later. |
0b57c475 YT |
59 | if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then |
60 | AC_MSG_CHECKING([for egrep]) | |
61 | EGREP="$GREP -E" | |
62 | AC_MSG_RESULT([$EGREP]) | |
63 | else | |
64 | AC_PATH_PROG([EGREP], [egrep], [not_found], | |
65 | [$PATH:/usr/bin:/usr/local/bin]) | |
3fc39a6e | 66 | fi |
0b57c475 YT |
67 | if test -z "$EGREP" || test "$EGREP" = "not_found"; then |
68 | AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.]) | |
69 | fi | |
817efbc2 | 70 | AC_SUBST([EGREP]) |
3fc39a6e | 71 | |
0b57c475 YT |
72 | dnl AR is mandatory for configure process and libtool. |
73 | dnl This is target dependant, so check it as a tool. | |
74 | AC_PATH_TOOL([AR], [ar], [not_found], | |
75 | [$PATH:/usr/bin:/usr/local/bin]) | |
76 | if test -z "$AR" || test "$AR" = "not_found"; then | |
77 | AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.]) | |
3fc39a6e | 78 | fi |
817efbc2 | 79 | AC_SUBST([AR]) |
0b57c475 | 80 | |
faaaf626 | 81 | AC_SUBST(libext) |
9f7c6341 | 82 | |
7349940b | 83 | dnl figure out the libcurl version |
593170d1 | 84 | VERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h` |
8f5ffd94 | 85 | AM_INIT_AUTOMAKE(curl,$VERSION) |
075c5342 DS |
86 | AC_MSG_CHECKING([curl version]) |
87 | AC_MSG_RESULT($VERSION) | |
caf8c01e | 88 | |
1e5e0f9a DS |
89 | dnl |
90 | dnl we extract the numerical version for curl-config only | |
593170d1 | 91 | VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curlver.h` |
1e5e0f9a DS |
92 | AC_SUBST(VERSIONNUM) |
93 | ||
c503930b CB |
94 | dnl Solaris pkgadd support definitions |
95 | PKGADD_PKG="HAXXcurl" | |
96 | PKGADD_NAME="cURL - a client that groks URLs" | |
97 | PKGADD_VENDOR="curl.haxx.se" | |
98 | AC_SUBST(PKGADD_PKG) | |
99 | AC_SUBST(PKGADD_NAME) | |
100 | AC_SUBST(PKGADD_VENDOR) | |
101 | ||
cff90cf3 | 102 | dnl |
710e370c | 103 | dnl initialize all the info variables |
bebd5dbc | 104 | curl_ssl_msg="no (--with-ssl / --with-gnutls)" |
2147284c | 105 | curl_ssh_msg="no (--with-libssh2)" |
710e370c DS |
106 | curl_zlib_msg="no (--with-zlib)" |
107 | curl_krb4_msg="no (--with-krb4*)" | |
108 | curl_gss_msg="no (--with-gssapi)" | |
109 | curl_spnego_msg="no (--with-spnego)" | |
110 | curl_ares_msg="no (--enable-ares)" | |
111 | curl_ipv6_msg="no (--enable-ipv6)" | |
112 | curl_idn_msg="no (--with-libidn)" | |
113 | curl_manual_msg="no (--enable-manual)" | |
114 | curl_verbose_msg="enabled (--disable-verbose)" | |
8ed31c48 | 115 | curl_sspi_msg="no (--enable-sspi)" |
d0edb478 | 116 | curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)" |
4b60c3e9 | 117 | curl_ldaps_msg="no (--enable-ldaps)" |
c503930b | 118 | |
a0a47f27 DF |
119 | dnl |
120 | dnl Save anything in $LIBS for later | |
121 | dnl | |
122 | ALL_LIBS=$LIBS | |
123 | ||
caf8c01e DS |
124 | dnl |
125 | dnl Detect the canonical host and target build environment | |
126 | dnl | |
ae1912cb | 127 | |
c77f77a1 | 128 | AC_CANONICAL_HOST |
93c53424 | 129 | dnl Get system canonical name |
22a32389 | 130 | AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS]) |
1b1f143c | 131 | |
93c53424 DS |
132 | dnl Checks for programs. |
133 | AC_PROG_CC | |
134 | ||
14240e9e YT |
135 | dnl Our curl_off_t internal and external configure settings |
136 | CURL_CONFIGURE_CURL_OFF_T | |
137 | ||
b4fdccf8 YT |
138 | dnl This defines _ALL_SOURCE for AIX |
139 | CURL_CHECK_AIX_ALL_SOURCE | |
140 | ||
1bc49007 | 141 | dnl Our configure and build reentrant settings |
052f9dde | 142 | CURL_CONFIGURE_REENTRANT |
1bc49007 | 143 | |
d4ffc5ef | 144 | dnl check for how to do large files |
1b1f143c | 145 | AC_SYS_LARGEFILE |
d4ffc5ef | 146 | |
c84f84c7 | 147 | dnl support building of Windows DLLs |
1e8f0c57 DS |
148 | AC_LIBTOOL_WIN32_DLL |
149 | ||
23786eae | 150 | dnl skip libtool C++ and Fortran compiler checks |
d31feb8f | 151 | m4_ifdef([AC_PROG_CXX], [m4_undefine([AC_PROG_CXX])]) |
c84f84c7 | 152 | m4_defun([AC_PROG_CXX],[]) |
60588b24 DS |
153 | m4_ifdef([AC_PROG_CXXCPP], [m4_undefine([AC_PROG_CXXCPP])]) |
154 | m4_defun([AC_PROG_CXXCPP],[true]) | |
d31feb8f | 155 | m4_ifdef([AC_PROG_F77], [m4_undefine([AC_PROG_F77])]) |
c84f84c7 YT |
156 | m4_defun([AC_PROG_F77],[]) |
157 | ||
23786eae | 158 | dnl skip libtool C++ and Fortran linker checks |
d31feb8f | 159 | m4_ifdef([AC_LIBTOOL_CXX], [m4_undefine([AC_LIBTOOL_CXX])]) |
23786eae | 160 | m4_defun([AC_LIBTOOL_CXX],[]) |
60588b24 DS |
161 | m4_ifdef([AC_LIBTOOL_CXXCPP], [m4_undefine([AC_LIBTOOL_CXXCPP])]) |
162 | m4_defun([AC_LIBTOOL_CXXCPP],[true]) | |
d31feb8f | 163 | m4_ifdef([AC_LIBTOOL_F77], [m4_undefine([AC_LIBTOOL_F77])]) |
23786eae YT |
164 | m4_defun([AC_LIBTOOL_F77],[]) |
165 | ||
6cea5158 DF |
166 | dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD |
167 | AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)]) | |
74befdfb | 168 | case $host in |
6cea5158 | 169 | x86_64*linux*|amd64*freebsd*|ia64*freebsd*) |
74befdfb YT |
170 | AC_MSG_RESULT([yes]) |
171 | with_pic=yes | |
172 | ;; | |
173 | *) | |
174 | AC_MSG_RESULT([no]) | |
175 | ;; | |
176 | esac | |
177 | ||
1e8f0c57 | 178 | dnl libtool setup |
d20a0516 | 179 | AC_PROG_LIBTOOL |
93c53424 | 180 | |
fcfc6de9 | 181 | AC_MSG_CHECKING([if we need -no-undefined]) |
ecf3aee4 | 182 | case $host in |
7358db5c | 183 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) |
ecf3aee4 DS |
184 | need_no_undefined=yes |
185 | ;; | |
186 | *) | |
187 | need_no_undefined=no | |
188 | ;; | |
189 | esac | |
fcfc6de9 | 190 | AC_MSG_RESULT($need_no_undefined) |
ecf3aee4 DS |
191 | AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes) |
192 | ||
fcfc6de9 | 193 | AC_MSG_CHECKING([if we need -mimpure-text]) |
5ab9d72e | 194 | mimpure=no |
fcfc6de9 DS |
195 | case $host in |
196 | *-*-solaris2*) | |
197 | if test "$GCC" = "yes"; then | |
198 | mimpure="yes" | |
199 | fi | |
200 | ;; | |
201 | *) | |
fcfc6de9 DS |
202 | ;; |
203 | esac | |
204 | AC_MSG_RESULT($mimpure) | |
205 | AM_CONDITIONAL(MIMPURE, test x$mimpure = xyes) | |
bff96239 | 206 | AM_CONDITIONAL(STATICLIB, false) |
fcfc6de9 | 207 | |
4d815c99 DS |
208 | AC_MSG_CHECKING([if we need BUILDING_LIBCURL]) |
209 | case $host in | |
210 | *-*-mingw*) | |
211 | AC_DEFINE(BUILDING_LIBCURL, 1, [when building libcurl itself]) | |
212 | AC_MSG_RESULT(yes) | |
b29017f1 | 213 | AC_MSG_CHECKING([if we need CURL_STATICLIB]) |
0bb04082 DS |
214 | if test "X$enable_shared" = "Xno" |
215 | then | |
216 | AC_DEFINE(CURL_STATICLIB, 1, [when not building a shared library]) | |
217 | AC_MSG_RESULT(yes) | |
bff96239 | 218 | AM_CONDITIONAL(STATICLIB, true) |
b29017f1 DS |
219 | else |
220 | AC_MSG_RESULT(no) | |
0bb04082 | 221 | fi |
4d815c99 DS |
222 | ;; |
223 | *) | |
224 | AC_MSG_RESULT(no) | |
225 | ;; | |
226 | esac | |
227 | ||
9de4e5eb DF |
228 | # Determine whether all dependent libraries must be specified when linking |
229 | if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno" | |
230 | then | |
231 | REQUIRE_LIB_DEPS=no | |
232 | else | |
233 | REQUIRE_LIB_DEPS=yes | |
234 | fi | |
235 | AC_SUBST(REQUIRE_LIB_DEPS) | |
236 | ||
d1a1fcc6 DS |
237 | dnl The install stuff has already been taken care of by the automake stuff |
238 | dnl AC_PROG_INSTALL | |
ae1912cb DS |
239 | AC_PROG_MAKE_SET |
240 | ||
375cdf89 DS |
241 | dnl check if there's a way to force code inline |
242 | AC_C_INLINE | |
243 | ||
33ddeb6d YT |
244 | dnl ********************************************************************** |
245 | dnl platform/compiler/architecture specific checks/flags | |
246 | dnl ********************************************************************** | |
247 | ||
248 | case $host in | |
249 | # | |
6cea5158 | 250 | x86_64*linux*|amd64*freebsd*|ia64*freebsd*) |
33ddeb6d YT |
251 | # |
252 | dnl find out if icc is being used | |
253 | if test "z$ICC" = "z"; then | |
254 | CURL_DETECT_ICC | |
255 | fi | |
256 | # | |
257 | if test "$ICC" = "yes"; then | |
258 | dnl figure out icc version | |
d0fe681a | 259 | AC_MSG_CHECKING([icc version]) |
33ddeb6d YT |
260 | iccver=`$CC -dumpversion` |
261 | iccnhi=`echo $iccver | cut -d . -f1` | |
262 | iccnlo=`echo $iccver | cut -d . -f2` | |
263 | iccnum=`(expr $iccnhi "*" 100 + $iccnlo) 2>/dev/null` | |
264 | AC_MSG_RESULT($iccver) | |
265 | # | |
266 | if test "$iccnum" -ge "900" && test "$iccnum" -lt "1000"; then | |
267 | dnl icc 9.X specific | |
268 | CFLAGS="$CFLAGS -i-dynamic" | |
269 | fi | |
270 | # | |
271 | if test "$iccnum" -ge "1000"; then | |
272 | dnl icc 10.X or later | |
273 | CFLAGS="$CFLAGS -shared-intel" | |
274 | fi | |
275 | # | |
276 | fi | |
277 | ;; | |
278 | # | |
279 | esac | |
280 | ||
b5afd531 YT |
281 | AC_MSG_CHECKING([whether we are using the IBM C compiler]) |
282 | CURL_CHECK_DEF([__IBMC__], [], [silent]) | |
63818f84 | 283 | if test "$curl_cv_have_def___IBMC__" = "yes"; then |
b5afd531 YT |
284 | AC_MSG_RESULT([yes]) |
285 | dnl Ensure that compiler optimizations are always thread-safe. | |
286 | CFLAGS="$CFLAGS -qthreaded" | |
287 | dnl Disable type based strict aliasing optimizations, using worst | |
288 | dnl case aliasing assumptions when compiling. Type based aliasing | |
289 | dnl would restrict the lvalues that could be safely used to access | |
290 | dnl a data object. | |
291 | CFLAGS="$CFLAGS -qnoansialias" | |
292 | dnl Force compiler to stop after the compilation phase, without | |
293 | dnl generating an object code file when compilation has errors. | |
2c61e9c7 | 294 | CFLAGS="$CFLAGS -qhalt=e" |
b5afd531 YT |
295 | else |
296 | AC_MSG_RESULT([no]) | |
2c61e9c7 YT |
297 | fi |
298 | ||
a3787eff YT |
299 | AC_MSG_CHECKING([whether we are using the Intel C compiler]) |
300 | CURL_CHECK_DEF([__INTEL_COMPILER], [], [silent]) | |
301 | if test "$curl_cv_have_def___INTEL_COMPILER" = "yes"; then | |
302 | AC_MSG_RESULT([yes]) | |
f30959c6 YT |
303 | dnl On Linux this compiler uses gcc's header files, so |
304 | dnl we select ANSI C89 dialect plus GNU extensions. | |
305 | CPPFLAGS="$CPPFLAGS -std=gnu89" | |
a8323cc3 YT |
306 | if test "$curl_cv_def___INTEL_COMPILER" -gt "600"; then |
307 | dnl Show errors, warnings, and remarks | |
308 | CPPFLAGS="$CPPFLAGS -Wall" | |
309 | dnl Perform extra compile-time code checking | |
310 | CPPFLAGS="$CPPFLAGS -Wcheck" | |
311 | fi | |
3072c5b8 YT |
312 | dnl Change some warnings into errors |
313 | dnl #140: too many arguments in function call | |
314 | dnl #147: declaration is incompatible with 'previous one' | |
315 | dnl #165: too few arguments in function call | |
316 | dnl #266: function declared implicitly | |
7b3f8615 | 317 | CPPFLAGS="$CPPFLAGS -we 140,147,165,266" |
51ba2499 | 318 | dnl Disable some remarks |
18831186 | 319 | dnl #279: controlling expression is constant |
51ba2499 YT |
320 | dnl #981: operands are evaluated in unspecified order |
321 | dnl #1469: "cc" clobber ignored | |
18831186 YT |
322 | if test "$curl_cv_def___INTEL_COMPILER" -lt "910"; then |
323 | CPPFLAGS="$CPPFLAGS -wd 279" | |
324 | fi | |
51ba2499 | 325 | CPPFLAGS="$CPPFLAGS -wd 981,1469" |
7b3f8615 YT |
326 | dnl Disable use of ANSI C aliasing rules in optimizations |
327 | CFLAGS="$CFLAGS -no-ansi-alias" | |
a3787eff YT |
328 | else |
329 | AC_MSG_RESULT([no]) | |
330 | fi | |
331 | ||
3a705696 YT |
332 | AC_MSG_CHECKING([whether we are using the DEC/Compaq C compiler]) |
333 | CURL_CHECK_DEF([__DECC], [], [silent]) | |
334 | CURL_CHECK_DEF([__DECC_VER], [], [silent]) | |
63818f84 | 335 | if test "$curl_cv_have_def___DECC" = "yes" && |
3a705696 YT |
336 | test "$curl_cv_have_def___DECC_VER" = "yes"; then |
337 | AC_MSG_RESULT([yes]) | |
338 | dnl Select strict ANSI C compiler mode | |
339 | CFLAGS="$CFLAGS -std1" | |
74d77cb1 YT |
340 | dnl Turn off optimizer ANSI C aliasing rules |
341 | CFLAGS="$CFLAGS -noansi_alias" | |
71525352 YT |
342 | dnl Select a higher warning level than default level2 |
343 | CFLAGS="$CFLAGS -msg_enable level3" | |
3a705696 YT |
344 | dnl Generate warnings for missing function prototypes |
345 | CFLAGS="$CFLAGS -warnprotos" | |
3f84e373 YT |
346 | dnl Change some warnings into fatal errors |
347 | CFLAGS="$CFLAGS -msg_fatal toofewargs,toomanyargs" | |
3a705696 YT |
348 | else |
349 | AC_MSG_RESULT([no]) | |
350 | fi | |
351 | ||
2c61e9c7 YT |
352 | CURL_CHECK_COMPILER_HALT_ON_ERROR |
353 | CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE | |
354 | ||
355 | dnl ********************************************************************** | |
356 | dnl Compilation based checks should not be done before this point. | |
357 | dnl ********************************************************************** | |
358 | ||
359 | dnl ********************************************************************** | |
360 | dnl Make sure that our checks for headers windows.h winsock.h winsock2.h | |
361 | dnl and ws2tcpip.h take precedence over any other further checks which | |
362 | dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for | |
363 | dnl this specific header files. And do them before its results are used. | |
364 | dnl ********************************************************************** | |
365 | ||
366 | CURL_CHECK_HEADER_WINDOWS | |
367 | CURL_CHECK_NATIVE_WINDOWS | |
368 | case X-"$ac_cv_native_windows" in | |
369 | X-yes) | |
370 | CURL_CHECK_HEADER_WINSOCK | |
371 | CURL_CHECK_HEADER_WINSOCK2 | |
372 | CURL_CHECK_HEADER_WS2TCPIP | |
373 | CURL_CHECK_HEADER_WINLDAP | |
374 | CURL_CHECK_HEADER_WINBER | |
375 | ;; | |
376 | *) | |
377 | ac_cv_header_winsock_h="no" | |
378 | ac_cv_header_winsock2_h="no" | |
379 | ac_cv_header_ws2tcpip_h="no" | |
380 | ac_cv_header_winldap_h="no" | |
381 | ac_cv_header_winber_h="no" | |
382 | ;; | |
383 | esac | |
fef60d9d | 384 | CURL_CHECK_WIN32_LARGEFILE |
2c61e9c7 | 385 | |
fd3881ea DS |
386 | dnl ************************************************************ |
387 | dnl switch off particular protocols | |
388 | dnl | |
389 | AC_MSG_CHECKING([whether to support http]) | |
390 | AC_ARG_ENABLE(http, | |
f136f435 DS |
391 | AC_HELP_STRING([--enable-http],[Enable HTTP support]) |
392 | AC_HELP_STRING([--disable-http],[Disable HTTP support]), | |
fd3881ea DS |
393 | [ case "$enableval" in |
394 | no) | |
395 | AC_MSG_RESULT(no) | |
22a32389 | 396 | AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP]) |
67a83c1b | 397 | AC_MSG_WARN([disable HTTP disables FTP over proxy]) |
3955b313 | 398 | AC_SUBST(CURL_DISABLE_HTTP, [1]) |
fd3881ea DS |
399 | ;; |
400 | *) AC_MSG_RESULT(yes) | |
401 | ;; | |
402 | esac ], | |
403 | AC_MSG_RESULT(yes) | |
404 | ) | |
405 | AC_MSG_CHECKING([whether to support ftp]) | |
406 | AC_ARG_ENABLE(ftp, | |
f136f435 DS |
407 | AC_HELP_STRING([--enable-ftp],[Enable FTP support]) |
408 | AC_HELP_STRING([--disable-ftp],[Disable FTP support]), | |
fd3881ea DS |
409 | [ case "$enableval" in |
410 | no) | |
411 | AC_MSG_RESULT(no) | |
22a32389 | 412 | AC_DEFINE(CURL_DISABLE_FTP, 1, [to disable FTP]) |
3955b313 | 413 | AC_SUBST(CURL_DISABLE_FTP, [1]) |
fd3881ea DS |
414 | ;; |
415 | *) AC_MSG_RESULT(yes) | |
416 | ;; | |
417 | esac ], | |
418 | AC_MSG_RESULT(yes) | |
419 | ) | |
fd3881ea DS |
420 | AC_MSG_CHECKING([whether to support file]) |
421 | AC_ARG_ENABLE(file, | |
f136f435 DS |
422 | AC_HELP_STRING([--enable-file],[Enable FILE support]) |
423 | AC_HELP_STRING([--disable-file],[Disable FILE support]), | |
fd3881ea DS |
424 | [ case "$enableval" in |
425 | no) | |
426 | AC_MSG_RESULT(no) | |
22a32389 | 427 | AC_DEFINE(CURL_DISABLE_FILE, 1, [to disable FILE]) |
3955b313 | 428 | AC_SUBST(CURL_DISABLE_FILE, [1]) |
fd3881ea DS |
429 | ;; |
430 | *) AC_MSG_RESULT(yes) | |
431 | ;; | |
432 | esac ], | |
433 | AC_MSG_RESULT(yes) | |
434 | ) | |
435 | AC_MSG_CHECKING([whether to support ldap]) | |
436 | AC_ARG_ENABLE(ldap, | |
f136f435 DS |
437 | AC_HELP_STRING([--enable-ldap],[Enable LDAP support]) |
438 | AC_HELP_STRING([--disable-ldap],[Disable LDAP support]), | |
fd3881ea DS |
439 | [ case "$enableval" in |
440 | no) | |
441 | AC_MSG_RESULT(no) | |
22a32389 | 442 | AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) |
3955b313 | 443 | AC_SUBST(CURL_DISABLE_LDAP, [1]) |
fd3881ea | 444 | ;; |
a674654f YT |
445 | *) |
446 | case $host in | |
447 | *-*-cygwin*) | |
448 | # Force no ldap. config/build process is broken for cygwin | |
449 | AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) | |
450 | AC_SUBST(CURL_DISABLE_LDAP, [1]) | |
451 | AC_MSG_RESULT(no) | |
452 | ;; | |
453 | *) | |
454 | AC_MSG_RESULT(yes) | |
455 | esac | |
fd3881ea | 456 | ;; |
a674654f YT |
457 | esac ],[ |
458 | case $host in | |
459 | *-*-cygwin*) | |
460 | # Force no ldap. config/build process is broken for cygwin | |
461 | AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) | |
462 | AC_SUBST(CURL_DISABLE_LDAP, [1]) | |
463 | AC_MSG_RESULT(no) | |
464 | ;; | |
465 | *) | |
466 | AC_MSG_RESULT(yes) | |
467 | esac ] | |
fd3881ea | 468 | ) |
4b60c3e9 GK |
469 | AC_MSG_CHECKING([whether to support ldaps]) |
470 | AC_ARG_ENABLE(ldaps, | |
471 | AC_HELP_STRING([--enable-ldaps],[Enable LDAPS support]) | |
472 | AC_HELP_STRING([--disable-ldaps],[Disable LDAPS support]), | |
473 | [ case "$enableval" in | |
474 | no) | |
475 | AC_MSG_RESULT(no) | |
476 | AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) | |
477 | AC_SUBST(CURL_DISABLE_LDAPS, [1]) | |
478 | ;; | |
479 | *) if test x$CURL_DISABLE_LDAP = x1 ; then | |
480 | AC_MSG_RESULT(LDAP support needs to be enabled in order to enable LDAPS support!) | |
481 | AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) | |
482 | AC_SUBST(CURL_DISABLE_LDAPS, [1]) | |
483 | else | |
484 | AC_MSG_RESULT(yes) | |
485 | AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation]) | |
486 | curl_ldaps_msg="enabled" | |
487 | fi | |
488 | ;; | |
489 | esac ], | |
490 | AC_MSG_RESULT(no) | |
491 | AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) | |
492 | AC_SUBST(CURL_DISABLE_LDAPS, [1]) | |
493 | ) | |
494 | ||
fd3881ea DS |
495 | AC_MSG_CHECKING([whether to support dict]) |
496 | AC_ARG_ENABLE(dict, | |
f136f435 DS |
497 | AC_HELP_STRING([--enable-dict],[Enable DICT support]) |
498 | AC_HELP_STRING([--disable-dict],[Disable DICT support]), | |
fd3881ea DS |
499 | [ case "$enableval" in |
500 | no) | |
501 | AC_MSG_RESULT(no) | |
b9c60df0 | 502 | AC_DEFINE(CURL_DISABLE_DICT, 1, [to disable DICT]) |
3955b313 | 503 | AC_SUBST(CURL_DISABLE_DICT, [1]) |
fd3881ea DS |
504 | ;; |
505 | *) AC_MSG_RESULT(yes) | |
506 | ;; | |
507 | esac ], | |
508 | AC_MSG_RESULT(yes) | |
509 | ) | |
510 | AC_MSG_CHECKING([whether to support telnet]) | |
511 | AC_ARG_ENABLE(telnet, | |
f136f435 DS |
512 | AC_HELP_STRING([--enable-telnet],[Enable TELNET support]) |
513 | AC_HELP_STRING([--disable-telnet],[Disable TELNET support]), | |
fd3881ea DS |
514 | [ case "$enableval" in |
515 | no) | |
516 | AC_MSG_RESULT(no) | |
22a32389 | 517 | AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET]) |
3955b313 | 518 | AC_SUBST(CURL_DISABLE_TELNET, [1]) |
fd3881ea DS |
519 | ;; |
520 | *) AC_MSG_RESULT(yes) | |
521 | ;; | |
522 | esac ], | |
523 | AC_MSG_RESULT(yes) | |
524 | ) | |
56d9624b DS |
525 | AC_MSG_CHECKING([whether to support tftp]) |
526 | AC_ARG_ENABLE(tftp, | |
527 | AC_HELP_STRING([--enable-tftp],[Enable TFTP support]) | |
528 | AC_HELP_STRING([--disable-tftp],[Disable TFTP support]), | |
529 | [ case "$enableval" in | |
530 | no) | |
531 | AC_MSG_RESULT(no) | |
532 | AC_DEFINE(CURL_DISABLE_TFTP, 1, [to disable TFTP]) | |
533 | AC_SUBST(CURL_DISABLE_TFTP, [1]) | |
534 | ;; | |
535 | *) AC_MSG_RESULT(yes) | |
536 | ;; | |
537 | esac ], | |
538 | AC_MSG_RESULT(yes) | |
539 | ) | |
fd3881ea | 540 | |
f3663a9d DS |
541 | dnl ********************************************************************** |
542 | dnl Check for built-in manual | |
543 | dnl ********************************************************************** | |
544 | ||
545 | AC_MSG_CHECKING([whether to provide built-in manual]) | |
546 | AC_ARG_ENABLE(manual, | |
547 | AC_HELP_STRING([--enable-manual],[Enable built-in manual]) | |
548 | AC_HELP_STRING([--disable-manual],[Disable built-in manual]), | |
549 | [ case "$enableval" in | |
550 | no) | |
551 | AC_MSG_RESULT(no) | |
552 | ;; | |
553 | *) AC_MSG_RESULT(yes) | |
554 | USE_MANUAL="1" | |
555 | ;; | |
556 | esac ], | |
557 | AC_MSG_RESULT(yes) | |
558 | USE_MANUAL="1" | |
559 | ) | |
560 | dnl The actual use of the USE_MANUAL variable is done much later in this | |
561 | dnl script to allow other actions to disable it as well. | |
562 | ||
ae1912cb DS |
563 | dnl ********************************************************************** |
564 | dnl Checks for libraries. | |
565 | dnl ********************************************************************** | |
566 | ||
9f2780a2 DS |
567 | dnl gethostbyname without lib or in the nsl lib? |
568 | AC_CHECK_FUNC(gethostbyname, | |
569 | [HAVE_GETHOSTBYNAME="1" | |
570 | ], | |
571 | [ AC_CHECK_LIB(nsl, gethostbyname, | |
572 | [HAVE_GETHOSTBYNAME="1" | |
573 | LIBS="$LIBS -lnsl" | |
574 | ]) | |
575 | ]) | |
576 | ||
577 | if test "$HAVE_GETHOSTBYNAME" != "1" | |
578 | then | |
61fb8fea | 579 | dnl gethostbyname in the socket lib? |
9f2780a2 DS |
580 | AC_CHECK_LIB(socket, gethostbyname, |
581 | [HAVE_GETHOSTBYNAME="1" | |
582 | LIBS="$LIBS -lsocket" | |
583 | ]) | |
61fb8fea DS |
584 | fi |
585 | ||
9f2780a2 DS |
586 | dnl At least one system has been identified to require BOTH nsl and socket |
587 | dnl libs at the same time to link properly. | |
588 | if test "$HAVE_GETHOSTBYNAME" != "1" | |
589 | then | |
af43ce73 | 590 | AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs]) |
caf8c01e DS |
591 | my_ac_save_LIBS=$LIBS |
592 | LIBS="-lnsl -lsocket $LIBS" | |
8ad1928d YT |
593 | AC_LINK_IFELSE([ |
594 | AC_LANG_PROGRAM([[ | |
595 | ]],[[ | |
596 | gethostbyname(); | |
597 | ]]) | |
598 | ],[ | |
599 | AC_MSG_RESULT([yes]) | |
600 | HAVE_GETHOSTBYNAME="1" | |
601 | ],[ | |
602 | AC_MSG_RESULT([no]) | |
603 | LIBS=$my_ac_save_LIBS | |
604 | ]) | |
9f2780a2 | 605 | fi |
caf8c01e | 606 | |
9f2780a2 DS |
607 | if test "$HAVE_GETHOSTBYNAME" != "1" |
608 | then | |
560a82ae YT |
609 | dnl This is for winsock systems |
610 | if test "$ac_cv_header_windows_h" = "yes"; then | |
611 | if test "$ac_cv_header_winsock_h" = "yes"; then | |
512b9ac1 YT |
612 | case $host in |
613 | *-*-mingw32ce*) | |
614 | winsock_LIB="-lwinsock" | |
615 | ;; | |
616 | *) | |
617 | winsock_LIB="-lwsock32" | |
618 | ;; | |
619 | esac | |
560a82ae YT |
620 | fi |
621 | if test "$ac_cv_header_winsock2_h" = "yes"; then | |
622 | winsock_LIB="-lws2_32" | |
623 | fi | |
624 | if test ! -z "$winsock_LIB"; then | |
625 | my_ac_save_LIBS=$LIBS | |
626 | LIBS="$winsock_LIB $LIBS" | |
627 | AC_MSG_CHECKING([for gethostbyname in $winsock_LIB]) | |
8ad1928d YT |
628 | AC_LINK_IFELSE([ |
629 | AC_LANG_PROGRAM([[ | |
560a82ae YT |
630 | #ifdef HAVE_WINDOWS_H |
631 | #ifndef WIN32_LEAN_AND_MEAN | |
632 | #define WIN32_LEAN_AND_MEAN | |
633 | #endif | |
634 | #include <windows.h> | |
635 | #ifdef HAVE_WINSOCK2_H | |
636 | #include <winsock2.h> | |
637 | #else | |
638 | #ifdef HAVE_WINSOCK_H | |
639 | #include <winsock.h> | |
640 | #endif | |
641 | #endif | |
642 | #endif | |
8ad1928d | 643 | ]],[[ |
560a82ae | 644 | gethostbyname("www.dummysite.com"); |
8ad1928d YT |
645 | ]]) |
646 | ],[ | |
647 | AC_MSG_RESULT([yes]) | |
648 | HAVE_GETHOSTBYNAME="1" | |
649 | ],[ | |
650 | AC_MSG_RESULT([no]) | |
651 | winsock_LIB="" | |
652 | LIBS=$my_ac_save_LIBS | |
560a82ae YT |
653 | ]) |
654 | fi | |
655 | fi | |
684245d6 DF |
656 | fi |
657 | ||
0427e944 DF |
658 | if test "$HAVE_GETHOSTBYNAME" != "1" |
659 | then | |
660 | dnl This is for Minix 3.1 | |
661 | AC_MSG_CHECKING([for gethostbyname for Minix 3]) | |
8ad1928d YT |
662 | AC_LINK_IFELSE([ |
663 | AC_LANG_PROGRAM([[ | |
0427e944 | 664 | /* Older Minix versions may need <net/gen/netdb.h> here instead */ |
8ad1928d YT |
665 | #include <netdb.h> |
666 | ]],[[ | |
667 | gethostbyname("www.dummysite.com"); | |
668 | ]]) | |
669 | ],[ | |
670 | AC_MSG_RESULT([yes]) | |
671 | HAVE_GETHOSTBYNAME="1" | |
672 | ],[ | |
673 | AC_MSG_RESULT([no]) | |
674 | ]) | |
0427e944 DF |
675 | fi |
676 | ||
684245d6 DF |
677 | if test "$HAVE_GETHOSTBYNAME" != "1" |
678 | then | |
679 | dnl This is for eCos with a stubbed DNS implementation | |
680 | AC_MSG_CHECKING([for gethostbyname for eCos]) | |
8ad1928d YT |
681 | AC_LINK_IFELSE([ |
682 | AC_LANG_PROGRAM([[ | |
684245d6 | 683 | #include <stdio.h> |
8ad1928d YT |
684 | #include <netdb.h> |
685 | ]],[[ | |
686 | gethostbyname("www.dummysite.com"); | |
687 | ]]) | |
688 | ],[ | |
689 | AC_MSG_RESULT([yes]) | |
690 | HAVE_GETHOSTBYNAME="1" | |
691 | ],[ | |
692 | AC_MSG_RESULT([no]) | |
693 | ]) | |
9f2780a2 DS |
694 | fi |
695 | ||
b97606f0 DS |
696 | if test "$HAVE_GETHOSTBYNAME" != "1" |
697 | then | |
698 | dnl gethostbyname in the network lib - for Haiku OS | |
699 | AC_CHECK_LIB(network, gethostbyname, | |
700 | [HAVE_GETHOSTBYNAME="1" | |
701 | LIBS="$LIBS -lnetwork" | |
702 | ]) | |
703 | fi | |
704 | ||
58f4af79 DS |
705 | if test "$HAVE_GETHOSTBYNAME" != "1" |
706 | then | |
707 | dnl gethostbyname in the net lib - for BeOS | |
708 | AC_CHECK_LIB(net, gethostbyname, | |
709 | [HAVE_GETHOSTBYNAME="1" | |
710 | LIBS="$LIBS -lnet" | |
711 | ]) | |
712 | fi | |
713 | ||
714 | ||
9f2780a2 DS |
715 | if test "$HAVE_GETHOSTBYNAME" = "1"; then |
716 | AC_DEFINE(HAVE_GETHOSTBYNAME, 1, [If you have gethostbyname]) | |
717 | else | |
718 | AC_MSG_ERROR([couldn't find libraries for gethostbyname()]) | |
caf8c01e DS |
719 | fi |
720 | ||
ae1912cb | 721 | dnl resolve lib? |
22a32389 | 722 | AC_CHECK_FUNC(strcasecmp, , [ AC_CHECK_LIB(resolve, strcasecmp) ]) |
ae1912cb | 723 | |
b174aeaa DS |
724 | if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then |
725 | AC_CHECK_LIB(resolve, strcasecmp, | |
726 | [LIBS="-lresolve $LIBS"], | |
727 | , | |
728 | -lnsl) | |
729 | fi | |
4c621bc6 | 730 | ac_cv_func_strcasecmp="no" |
b174aeaa | 731 | |
ae1912cb | 732 | dnl socket lib? |
22a32389 | 733 | AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ]) |
ae1912cb | 734 | |
b380dd03 | 735 | dnl ********************************************************************** |
ed80eb5b YT |
736 | dnl In case that function clock_gettime with monotonic timer is available, |
737 | dnl check for additional required libraries. | |
b380dd03 | 738 | dnl ********************************************************************** |
ed80eb5b | 739 | CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC |
b380dd03 | 740 | |
c461254d DF |
741 | dnl ********************************************************************** |
742 | dnl The preceding library checks are all potentially useful for test | |
743 | dnl servers (for providing networking support). Save the list of required | |
744 | dnl libraries at this point for use while linking those test servers. | |
745 | dnl ********************************************************************** | |
746 | TEST_SERVER_LIBS=$LIBS | |
ae1912cb | 747 | |
c461254d | 748 | dnl ********************************************************************** |
075c5342 DS |
749 | AC_MSG_CHECKING([whether to use libgcc]) |
750 | AC_ARG_ENABLE(libgcc, | |
751 | AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]), | |
752 | [ case "$enableval" in | |
753 | yes) | |
a0a47f27 | 754 | ALL_LIBS="$ALL_LIBS -lgcc" |
075c5342 DS |
755 | AC_MSG_RESULT(yes) |
756 | ;; | |
757 | *) AC_MSG_RESULT(no) | |
758 | ;; | |
759 | esac ], | |
760 | AC_MSG_RESULT(no) | |
761 | ) | |
762 | ||
3ec605de | 763 | dnl ********************************************************************** |
d0edb478 | 764 | dnl Check for LDAP |
205f8b26 DF |
765 | dnl ********************************************************************** |
766 | ||
767 | LDAPLIBNAME="" | |
768 | AC_ARG_WITH(ldap-lib, | |
d0edb478 | 769 | AC_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]), |
205f8b26 DF |
770 | [LDAPLIBNAME="$withval"]) |
771 | ||
772 | LBERLIBNAME="" | |
773 | AC_ARG_WITH(lber-lib, | |
d0edb478 | 774 | AC_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]), |
205f8b26 DF |
775 | [LBERLIBNAME="$withval"]) |
776 | ||
777 | if test x$CURL_DISABLE_LDAP != x1 ; then | |
778 | ||
a171f60b YT |
779 | CURL_CHECK_HEADER_LBER |
780 | CURL_CHECK_HEADER_LDAP | |
781 | CURL_CHECK_HEADER_LDAPSSL | |
782 | CURL_CHECK_HEADER_LDAP_SSL | |
3337be81 | 783 | |
205f8b26 DF |
784 | if test -z "$LDAPLIBNAME" ; then |
785 | case $host in | |
d0edb478 | 786 | *-*-cygwin* | *-*-mingw* | *-*-pw32*) |
205f8b26 | 787 | dnl Windows uses a single and unique OpenLDAP DLL name |
d0edb478 | 788 | LDAPLIBNAME="wldap32" |
205f8b26 DF |
789 | LBERLIBNAME="no" |
790 | ;; | |
791 | esac | |
792 | fi | |
793 | ||
794 | if test "$LDAPLIBNAME" ; then | |
d0edb478 DS |
795 | AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [ |
796 | AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled]) | |
797 | AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) | |
798 | AC_SUBST(CURL_DISABLE_LDAP, [1])]) | |
c37cdbe2 DF |
799 | AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) |
800 | AC_SUBST(CURL_DISABLE_LDAPS, [1]) | |
205f8b26 | 801 | else |
4db954f8 YT |
802 | dnl Try to find the right ldap libraries for this system |
803 | CURL_CHECK_LIBS_LDAP | |
804 | case X-"$curl_cv_ldap_LIBS" in | |
805 | X-unknown) | |
806 | AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled]) | |
807 | AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) | |
808 | AC_SUBST(CURL_DISABLE_LDAP, [1]) | |
c37cdbe2 DF |
809 | AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) |
810 | AC_SUBST(CURL_DISABLE_LDAPS, [1]) | |
4db954f8 YT |
811 | ;; |
812 | esac | |
205f8b26 | 813 | fi |
d0edb478 DS |
814 | fi |
815 | ||
816 | if test x$CURL_DISABLE_LDAP != x1 ; then | |
205f8b26 DF |
817 | |
818 | if test "$LBERLIBNAME" ; then | |
d0edb478 | 819 | dnl If name is "no" then don't define this library at all |
205f8b26 | 820 | dnl (it's only needed if libldap.so's dependencies are broken). |
e16c1b8e | 821 | if test "$LBERLIBNAME" != "no" ; then |
d0edb478 DS |
822 | AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [ |
823 | AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled]) | |
824 | AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) | |
825 | AC_SUBST(CURL_DISABLE_LDAP, [1])]) | |
c37cdbe2 DF |
826 | AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS]) |
827 | AC_SUBST(CURL_DISABLE_LDAPS, [1]) | |
205f8b26 | 828 | fi |
d0edb478 DS |
829 | fi |
830 | fi | |
831 | ||
832 | if test x$CURL_DISABLE_LDAP != x1 ; then | |
833 | AC_CHECK_FUNCS([ldap_url_parse]) | |
834 | ||
835 | if test "$LDAPLIBNAME" = "wldap32"; then | |
4b60c3e9 | 836 | curl_ldap_msg="enabled (winldap)" |
d0edb478 DS |
837 | AC_DEFINE(CURL_LDAP_WIN, 1, [Use W$ LDAP implementation]) |
838 | case $host in | |
72e675ca | 839 | *-*-cygwin* | *-*-pw32*) |
d0edb478 DS |
840 | AC_DEFINE(CURL_LDAP_HYBRID, 1, [W$ LDAP with non-W$ compiler]) |
841 | ;; | |
842 | esac | |
843 | else | |
4b60c3e9 | 844 | curl_ldap_msg="enabled (OpenLDAP)" |
205f8b26 DF |
845 | fi |
846 | fi | |
847 | ||
d1b17779 DS |
848 | dnl ********************************************************************** |
849 | dnl Checks for IPv6 | |
850 | dnl ********************************************************************** | |
851 | ||
852 | AC_MSG_CHECKING([whether to enable ipv6]) | |
853 | AC_ARG_ENABLE(ipv6, | |
854 | AC_HELP_STRING([--enable-ipv6],[Enable ipv6 (with ipv4) support]) | |
855 | AC_HELP_STRING([--disable-ipv6],[Disable ipv6 support]), | |
856 | [ case "$enableval" in | |
857 | no) | |
858 | AC_MSG_RESULT(no) | |
859 | ipv6=no | |
860 | ;; | |
861 | *) AC_MSG_RESULT(yes) | |
862 | ipv6=yes | |
863 | ;; | |
864 | esac ], | |
865 | ||
866 | AC_TRY_RUN([ /* is AF_INET6 available? */ | |
867 | #include <sys/types.h> | |
868 | #include <sys/socket.h> | |
869 | main() | |
870 | { | |
871 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) | |
872 | exit(1); | |
873 | else | |
874 | exit(0); | |
875 | } | |
876 | ], | |
877 | AC_MSG_RESULT(yes) | |
878 | ipv6=yes, | |
879 | AC_MSG_RESULT(no) | |
880 | ipv6=no, | |
881 | AC_MSG_RESULT(no) | |
882 | ipv6=no | |
883 | )) | |
884 | ||
885 | if test "$ipv6" = "yes"; then | |
cff90cf3 | 886 | curl_ipv6_msg="enabled" |
d1b17779 DS |
887 | fi |
888 | ||
6ca45bea DS |
889 | dnl ********************************************************************** |
890 | dnl Check how non-blocking sockets are set | |
891 | dnl ********************************************************************** | |
892 | AC_ARG_ENABLE(nonblocking, | |
f136f435 DS |
893 | AC_HELP_STRING([--enable-nonblocking],[Enable detecting how to do it]) |
894 | AC_HELP_STRING([--disable-nonblocking],[Disable non-blocking socket detection]), | |
6ca45bea DS |
895 | [ |
896 | if test "$enableval" = "no" ; then | |
897 | AC_MSG_WARN([non-blocking sockets disabled]) | |
22a32389 DS |
898 | AC_DEFINE(HAVE_DISABLED_NONBLOCKING, 1, |
899 | [to disable NON-BLOCKING connections]) | |
6ca45bea DS |
900 | else |
901 | CURL_CHECK_NONBLOCKING_SOCKET | |
902 | fi | |
903 | ], | |
904 | [ | |
905 | CURL_CHECK_NONBLOCKING_SOCKET | |
906 | ]) | |
907 | ||
7f67a28c DS |
908 | dnl ********************************************************************** |
909 | dnl Check if the operating system allows programs to write to their own argv[] | |
910 | dnl ********************************************************************** | |
911 | ||
912 | AC_MSG_CHECKING([if argv can be written to]) | |
0717e469 | 913 | AC_CACHE_VAL(curl_cv_writable_argv, [ |
a139ce90 | 914 | AC_RUN_IFELSE([[ |
7f67a28c | 915 | int main(int argc, char ** argv) { |
77431568 GK |
916 | argv[0][0] = ' '; |
917 | return (argv[0][0] == ' ')?0:1; | |
7f67a28c | 918 | } |
77431568 GK |
919 | ]], |
920 | curl_cv_writable_argv=yes, | |
921 | curl_cv_writable_argv=no, | |
922 | curl_cv_writable_argv=cross) | |
0717e469 DS |
923 | ]) |
924 | case $curl_cv_writable_argv in | |
925 | yes) | |
77431568 GK |
926 | AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv]) |
927 | AC_MSG_RESULT(yes) | |
928 | ;; | |
0717e469 | 929 | no) |
77431568 GK |
930 | AC_MSG_RESULT(no) |
931 | ;; | |
0717e469 | 932 | *) |
a139ce90 DS |
933 | AC_MSG_RESULT(no) |
934 | AC_MSG_WARN([the previous check could not be made default was used]) | |
77431568 | 935 | ;; |
0717e469 | 936 | esac |
7f67a28c | 937 | |
00505c92 DS |
938 | dnl ********************************************************************** |
939 | dnl Check for the presence of Kerberos4 libraries and headers | |
940 | dnl ********************************************************************** | |
941 | ||
942 | AC_ARG_WITH(krb4-includes, | |
f136f435 DS |
943 | AC_HELP_STRING([--with-krb4-includes=DIR], |
944 | [Specify location of kerberos4 headers]),[ | |
00505c92 DS |
945 | CPPFLAGS="$CPPFLAGS -I$withval" |
946 | KRB4INC="$withval" | |
947 | want_krb4=yes | |
948 | ]) | |
949 | ||
950 | AC_ARG_WITH(krb4-libs, | |
f136f435 | 951 | AC_HELP_STRING([--with-krb4-libs=DIR],[Specify location of kerberos4 libs]),[ |
00505c92 DS |
952 | LDFLAGS="$LDFLAGS -L$withval" |
953 | KRB4LIB="$withval" | |
954 | want_krb4=yes | |
955 | ]) | |
956 | ||
957 | ||
958 | OPT_KRB4=off | |
959 | AC_ARG_WITH(krb4,dnl | |
f136f435 | 960 | AC_HELP_STRING([--with-krb4=DIR],[where to look for Kerberos4]),[ |
00505c92 | 961 | OPT_KRB4="$withval" |
5872e8dd DF |
962 | if test X"$OPT_KRB4" != Xno; then |
963 | want_krb4="yes" | |
964 | if test X"$OPT_KRB4" != Xyes; then | |
965 | LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib$libsuff" | |
966 | KRB4LIB="$OPT_KRB4/lib$libsuff" | |
967 | CPPFLAGS="$CPPFLAGS -I$OPT_KRB4/include" | |
968 | KRB4INC="$OPT_KRB4/include" | |
969 | fi | |
00505c92 | 970 | fi |
00505c92 DS |
971 | ]) |
972 | ||
973 | AC_MSG_CHECKING([if Kerberos4 support is requested]) | |
974 | ||
975 | if test "$want_krb4" = yes | |
976 | then | |
f6e2bfd4 DS |
977 | if test "$ipv6" = "yes"; then |
978 | echo krb4 is not compatible with IPv6 | |
979 | exit 1 | |
980 | fi | |
00505c92 DS |
981 | AC_MSG_RESULT(yes) |
982 | ||
983 | dnl Check for & handle argument to --with-krb4 | |
984 | ||
985 | AC_MSG_CHECKING(where to look for Kerberos4) | |
986 | if test X"$OPT_KRB4" = Xyes | |
987 | then | |
988 | AC_MSG_RESULT([defaults]) | |
989 | else | |
990 | AC_MSG_RESULT([libs in $KRB4LIB, headers in $KRB4INC]) | |
991 | fi | |
992 | ||
993 | dnl Check for DES library | |
994 | AC_CHECK_LIB(des, des_pcbc_encrypt, | |
995 | [ | |
996 | AC_CHECK_HEADERS(des.h) | |
997 | ||
998 | dnl resolv lib? | |
22a32389 | 999 | AC_CHECK_FUNC(res_search, , [AC_CHECK_LIB(resolv, res_search)]) |
00505c92 DS |
1000 | |
1001 | dnl Check for the Kerberos4 library | |
1002 | AC_CHECK_LIB(krb, krb_net_read, | |
1003 | [ | |
1004 | dnl Check for header files | |
1005 | AC_CHECK_HEADERS(krb.h) | |
1006 | ||
1007 | dnl we found the required libraries, add to LIBS | |
b55507c8 | 1008 | LIBS="-lkrb -lcom_err -ldes $LIBS" |
00505c92 DS |
1009 | |
1010 | dnl Check for function krb_get_our_ip_for_realm | |
1011 | dnl this is needed for NAT networks | |
1012 | AC_CHECK_FUNCS(krb_get_our_ip_for_realm) | |
1013 | ||
1014 | dnl add define KRB4 | |
d4629fd3 | 1015 | AC_DEFINE(HAVE_KRB4, 1, |
22a32389 | 1016 | [if you have the Kerberos4 libraries (including -ldes)]) |
00505c92 | 1017 | |
1ee7f92c DS |
1018 | dnl substitute it too! |
1019 | KRB4_ENABLED=1 | |
1020 | AC_SUBST(KRB4_ENABLED) | |
1021 | ||
cff90cf3 DS |
1022 | curl_krb4_msg="enabled" |
1023 | ||
00505c92 DS |
1024 | dnl the krb4 stuff needs a strlcpy() |
1025 | AC_CHECK_FUNCS(strlcpy) | |
1026 | ||
1027 | ]) | |
1028 | ]) | |
1029 | else | |
1030 | AC_MSG_RESULT(no) | |
1031 | fi | |
1032 | ||
09ccfcdc DS |
1033 | dnl ********************************************************************** |
1034 | dnl Check for FBopenssl(SPNEGO) libraries | |
1035 | dnl ********************************************************************** | |
1036 | ||
1037 | AC_ARG_WITH(spnego, | |
1038 | AC_HELP_STRING([--with-spnego=DIR], | |
5872e8dd DF |
1039 | [Specify location of SPNEGO library fbopenssl]), [ |
1040 | SPNEGO_ROOT="$withval" | |
1041 | if test x"$SPNEGO_ROOT" != xno; then | |
1042 | want_spnego="yes" | |
1043 | fi | |
1044 | ]) | |
1045 | ||
09ccfcdc DS |
1046 | AC_MSG_CHECKING([if SPNEGO support is requested]) |
1047 | if test x"$want_spnego" = xyes; then | |
f6413f2c DS |
1048 | |
1049 | if test X"$SPNEGO_ROOT" = Xyes; then | |
1050 | AC_MSG_ERROR([FBOpenSSL libs and/or directories were not found where specified!]) | |
1051 | AC_MSG_RESULT(no) | |
09ccfcdc | 1052 | else |
f6413f2c | 1053 | if test -z "$SPNEGO_LIB_DIR"; then |
202e54cf | 1054 | LDFLAGS="$LDFLAGS -L$SPNEGO_ROOT -lfbopenssl" |
f6413f2c DS |
1055 | else |
1056 | LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR" | |
1057 | fi | |
e16c1b8e | 1058 | |
f6413f2c | 1059 | AC_MSG_RESULT(yes) |
cff90cf3 DS |
1060 | AC_DEFINE(HAVE_SPNEGO, 1, |
1061 | [Define this if you have the SPNEGO library fbopenssl]) | |
1062 | curl_spnego_msg="enabled" | |
f6413f2c | 1063 | fi |
09ccfcdc DS |
1064 | else |
1065 | AC_MSG_RESULT(no) | |
1066 | fi | |
1067 | ||
e56ae142 DS |
1068 | dnl ********************************************************************** |
1069 | dnl Check for GSS-API libraries | |
1070 | dnl ********************************************************************** | |
1071 | ||
c1b734a3 DS |
1072 | dnl check for gss stuff in the /usr as default |
1073 | ||
1074 | GSSAPI_ROOT="/usr" | |
e56ae142 DS |
1075 | AC_ARG_WITH(gssapi-includes, |
1076 | AC_HELP_STRING([--with-gssapi-includes=DIR], | |
1077 | [Specify location of GSSAPI header]), | |
e16c1b8e | 1078 | [ GSSAPI_INCS="-I$withval" |
e56ae142 DS |
1079 | want_gss="yes" ] |
1080 | ) | |
1081 | ||
1082 | AC_ARG_WITH(gssapi-libs, | |
1083 | AC_HELP_STRING([--with-gssapi-libs=DIR], | |
77431568 | 1084 | [Specify location of GSSAPI libs]), |
2723eda1 | 1085 | [ GSSAPI_LIB_DIR="-L$withval" |
e56ae142 DS |
1086 | want_gss="yes" ] |
1087 | ) | |
1088 | ||
1089 | AC_ARG_WITH(gssapi, | |
1090 | AC_HELP_STRING([--with-gssapi=DIR], | |
5872e8dd DF |
1091 | [Where to look for GSSAPI]), [ |
1092 | GSSAPI_ROOT="$withval" | |
1093 | if test x"$GSSAPI_ROOT" != xno; then | |
e16c1b8e | 1094 | want_gss="yes" |
c1b734a3 DS |
1095 | if test x"$GSSAPI_ROOT" = xyes; then |
1096 | dnl if yes, then use default root | |
1097 | GSSAPI_ROOT="/usr" | |
1098 | fi | |
5872e8dd DF |
1099 | fi |
1100 | ]) | |
e56ae142 | 1101 | |
982ba214 | 1102 | save_CPPFLAGS="$CPPFLAGS" |
e56ae142 DS |
1103 | AC_MSG_CHECKING([if GSSAPI support is requested]) |
1104 | if test x"$want_gss" = xyes; then | |
5effe8f3 DS |
1105 | AC_MSG_RESULT(yes) |
1106 | ||
e56ae142 DS |
1107 | if test -z "$GSSAPI_INCS"; then |
1108 | if test -f "$GSSAPI_ROOT/bin/krb5-config"; then | |
f4046763 | 1109 | GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi` |
c1b734a3 | 1110 | GSSAPI_LIBS=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi` |
49111a63 | 1111 | elif test "$GSSAPI_ROOT" != "yes"; then |
533519cc | 1112 | GSSAPI_INCS="-I$GSSAPI_ROOT/include" |
c1b734a3 | 1113 | GSSAPI_LIBS="-lgssapi" |
e56ae142 | 1114 | fi |
e56ae142 | 1115 | fi |
c1b734a3 | 1116 | |
f4046763 | 1117 | CPPFLAGS="$CPPFLAGS $GSSAPI_INCS" |
c1b734a3 | 1118 | LIBS="$LIBS $GSSAPI_LIBS" |
5effe8f3 DS |
1119 | |
1120 | AC_CHECK_HEADER(gss.h, | |
1121 | [ | |
1122 | dnl found in the given dirs | |
1123 | AC_DEFINE(HAVE_GSSGNU, 1, [if you have the GNU gssapi libraries]) | |
1124 | gnu_gss=yes | |
1125 | ], | |
1126 | [ | |
d0a4b50e MM |
1127 | dnl not found, check Heimdal or MIT |
1128 | AC_CHECK_HEADERS( | |
1129 | [gssapi/gssapi.h gssapi/gssapi_generic.h gssapi/gssapi_krb5.h], | |
1130 | [], | |
1131 | [not_mit=1]) | |
1132 | if test "x$not_mit" = "x1"; then | |
1133 | dnl MIT not found, check for Heimdal | |
1134 | AC_CHECK_HEADER(gssapi.h, | |
5effe8f3 | 1135 | [ |
e16c1b8e | 1136 | dnl found |
40e1a016 | 1137 | AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries]) |
5effe8f3 DS |
1138 | ], |
1139 | [ | |
1140 | dnl no header found, disabling GSS | |
1141 | want_gss=no | |
1142 | AC_MSG_WARN(disabling GSSAPI since no header files was found) | |
1143 | ] | |
1144 | ) | |
d0a4b50e MM |
1145 | else |
1146 | dnl MIT found | |
1147 | AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries]) | |
1148 | dnl check if we have a really old MIT kerberos (<= 1.2) | |
1149 | AC_MSG_CHECKING([if gssapi headers declare GSS_C_NT_HOSTBASED_SERVICE]) | |
7ad3abfd YT |
1150 | AC_COMPILE_IFELSE([ |
1151 | AC_LANG_PROGRAM([[ | |
d0a4b50e MM |
1152 | #include <gssapi/gssapi.h> |
1153 | #include <gssapi/gssapi_generic.h> | |
1154 | #include <gssapi/gssapi_krb5.h> | |
7ad3abfd | 1155 | ]],[[ |
d0a4b50e MM |
1156 | gss_import_name( |
1157 | (OM_uint32 *)0, | |
1158 | (gss_buffer_t)0, | |
1159 | GSS_C_NT_HOSTBASED_SERVICE, | |
1160 | (gss_name_t *)0); | |
7ad3abfd YT |
1161 | ]]) |
1162 | ],[ | |
1163 | AC_MSG_RESULT([yes]) | |
1164 | ],[ | |
1165 | AC_MSG_RESULT([no]) | |
1166 | AC_DEFINE(HAVE_OLD_GSSMIT, 1, | |
1167 | [if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE]) | |
1168 | ]) | |
d0a4b50e | 1169 | fi |
5effe8f3 DS |
1170 | ] |
1171 | ) | |
1172 | else | |
1173 | AC_MSG_RESULT(no) | |
1174 | fi | |
1175 | if test x"$want_gss" = xyes; then | |
1176 | AC_DEFINE(HAVE_GSSAPI, 1, [if you have the gssapi libraries]) | |
1177 | ||
1178 | curl_gss_msg="enabled (MIT/Heimdal)" | |
1179 | ||
1180 | if test -n "$gnu_gss"; then | |
1181 | curl_gss_msg="enabled (GNU GSS)" | |
9bb51d76 MM |
1182 | LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR" |
1183 | LIBS="$LIBS -lgss" | |
5effe8f3 | 1184 | elif test -z "$GSSAPI_LIB_DIR"; then |
e56ae142 | 1185 | if test -f "$GSSAPI_ROOT/bin/krb5-config"; then |
9bb51d76 MM |
1186 | dnl krb5-config doesn't have --libs-only-L or similar, put everything |
1187 | dnl into LIBS | |
1188 | gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi` | |
1189 | LIBS="$LIBS $gss_libs" | |
49111a63 | 1190 | elif test "$GSSAPI_ROOT" != "yes"; then |
9bb51d76 MM |
1191 | LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff" |
1192 | LIBS="$LIBS -lgssapi" | |
49111a63 | 1193 | else |
9bb51d76 | 1194 | LIBS="$LIBS -lgssapi" |
e56ae142 DS |
1195 | fi |
1196 | else | |
9bb51d76 MM |
1197 | LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR" |
1198 | LIBS="$LIBS -lgssapi" | |
e56ae142 | 1199 | fi |
e56ae142 | 1200 | else |
5effe8f3 | 1201 | CPPFLAGS="$save_CPPFLAGS" |
e56ae142 | 1202 | fi |
e16c1b8e | 1203 | |
ae1912cb DS |
1204 | dnl ********************************************************************** |
1205 | dnl Check for the presence of SSL libraries and headers | |
1206 | dnl ********************************************************************** | |
1207 | ||
1208 | dnl Default to compiler & linker defaults for SSL files & libraries. | |
1209 | OPT_SSL=off | |
2c2baa93 DS |
1210 | dnl Default to no CA bundle |
1211 | ca="no" | |
ae1912cb | 1212 | AC_ARG_WITH(ssl,dnl |
d7a29388 | 1213 | AC_HELP_STRING([--with-ssl=PATH],[Where to look for OpenSSL, PATH points to the SSL installation (default: /usr/local/ssl); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) |
0abccc67 | 1214 | AC_HELP_STRING([--without-ssl], [disable OpenSSL]), |
e890113f | 1215 | OPT_SSL=$withval) |
ae1912cb | 1216 | |
bebd5dbc | 1217 | if test X"$OPT_SSL" != Xno; then |
6bd02a3a | 1218 | dnl backup the pre-ssl variables |
4ac7a087 DS |
1219 | CLEANLDFLAGS="$LDFLAGS" |
1220 | CLEANCPPFLAGS="$CPPFLAGS" | |
6bd02a3a DS |
1221 | CLEANLIBS="$LIBS" |
1222 | ||
4836154c DS |
1223 | case "$OPT_SSL" in |
1224 | yes) | |
75e5967a | 1225 | dnl --with-ssl (without path) used |
736a40fe DS |
1226 | if test x$cross_compiling != xyes; then |
1227 | dnl only do pkg-config magic when not cross-compiling | |
1228 | PKGTEST="yes" | |
1229 | fi | |
4370e92d DS |
1230 | PREFIX_OPENSSL=/usr/local/ssl |
1231 | LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff" | |
1232 | ;; | |
4398151f | 1233 | off) |
75e5967a | 1234 | dnl no --with-ssl option given, just check default places |
736a40fe DS |
1235 | if test x$cross_compiling != xyes; then |
1236 | dnl only do pkg-config magic when not cross-compiling | |
1237 | PKGTEST="yes" | |
1238 | fi | |
4370e92d DS |
1239 | PREFIX_OPENSSL= |
1240 | ;; | |
4836154c | 1241 | *) |
75e5967a DS |
1242 | dnl check the given --with-ssl spot |
1243 | PKGTEST="no" | |
4370e92d DS |
1244 | PREFIX_OPENSSL=$OPT_SSL |
1245 | LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff" | |
1246 | LDFLAGS="$LDFLAGS -L$LIB_OPENSSL" | |
1247 | CPPFLAGS="$CPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include" | |
4ac7a087 | 1248 | ;; |
4836154c DS |
1249 | esac |
1250 | ||
75e5967a DS |
1251 | if test "$PKGTEST" = "yes"; then |
1252 | ||
1253 | dnl Detect the pkg-config tool, as it may have extra info about the | |
1254 | dnl openssl installation we can use. I *believe* this is what we are | |
1255 | dnl expected to do on really recent Redhat Linux hosts. | |
1256 | ||
1257 | AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin) | |
1258 | if test "$PKGCONFIG" != "no" ; then | |
1259 | AC_MSG_CHECKING([OpenSSL options with pkg-config]) | |
1260 | ||
1261 | $PKGCONFIG --exists openssl | |
1262 | SSL_EXISTS=$? | |
1263 | ||
1264 | if test "$SSL_EXISTS" -eq "0"; then | |
1265 | SSL_LIBS=`$PKGCONFIG --libs-only-l openssl 2>/dev/null` | |
1266 | SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null` | |
1267 | SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null` | |
1268 | ||
77431568 | 1269 | LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'` |
4370e92d | 1270 | |
75e5967a DS |
1271 | dnl use the values pkg-config reported |
1272 | LIBS="$LIBS $SSL_LIBS" | |
1273 | CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS" | |
1274 | LDFLAGS="$LDFLAGS $SSL_LDFLAGS" | |
1275 | AC_MSG_RESULT([found]) | |
1276 | else | |
1277 | AC_MSG_RESULT([no]) | |
1278 | fi | |
1279 | fi | |
1280 | fi | |
1281 | ||
6abbbaad YT |
1282 | dnl This is for Msys/Mingw |
1283 | case $host in | |
1284 | *-*-msys* | *-*-mingw*) | |
1285 | AC_MSG_CHECKING([for gdi32]) | |
1286 | my_ac_save_LIBS=$LIBS | |
1287 | LIBS="-lgdi32 $LIBS" | |
1288 | AC_TRY_LINK([#include <windef.h> | |
1289 | #include <wingdi.h>], | |
1290 | [GdiFlush();], | |
1291 | [ dnl worked! | |
1292 | AC_MSG_RESULT([yes])], | |
1293 | [ dnl failed, restore LIBS | |
1294 | LIBS=$my_ac_save_LIBS | |
1295 | AC_MSG_RESULT(no)] | |
1296 | ) | |
1297 | ;; | |
1298 | esac | |
1299 | ||
4836154c DS |
1300 | AC_CHECK_LIB(crypto, CRYPTO_lock,[ |
1301 | HAVECRYPTO="yes" | |
c4f7570a | 1302 | LIBS="-lcrypto $LIBS" |
4836154c | 1303 | ],[ |
4370e92d DS |
1304 | LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL" |
1305 | CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include" | |
4836154c | 1306 | AC_CHECK_LIB(crypto, CRYPTO_add_lock,[ |
c4f7570a DF |
1307 | HAVECRYPTO="yes" |
1308 | LIBS="-lcrypto $LIBS"], [ | |
6bd02a3a DS |
1309 | LDFLAGS="$CLEANLDFLAGS" |
1310 | CPPFLAGS="$CLEANCPPFLAGS" | |
1311 | LIBS="$CLEANLIBS" | |
4836154c DS |
1312 | ]) |
1313 | ]) | |
ae1912cb | 1314 | |
ae1912cb | 1315 | |
21337f47 | 1316 | if test X"$HAVECRYPTO" = X"yes"; then |
ae1912cb DS |
1317 | dnl This is only reasonable to do if crypto actually is there: check for |
1318 | dnl SSL libs NOTE: it is important to do this AFTER the crypto lib | |
4836154c | 1319 | |
ae1912cb DS |
1320 | AC_CHECK_LIB(ssl, SSL_connect) |
1321 | ||
b32bf427 DS |
1322 | if test "$ac_cv_lib_ssl_SSL_connect" != yes; then |
1323 | dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff | |
1324 | AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use); | |
1325 | OLIBS=$LIBS | |
1326 | LIBS="$LIBS -lRSAglue -lrsaref" | |
1327 | AC_CHECK_LIB(ssl, SSL_connect) | |
1328 | if test "$ac_cv_lib_ssl_SSL_connect" != yes; then | |
1329 | dnl still no SSL_connect | |
1330 | AC_MSG_RESULT(no) | |
1331 | LIBS=$OLIBS | |
1332 | else | |
1333 | AC_MSG_RESULT(yes) | |
1334 | fi | |
b32bf427 | 1335 | |
df3ca591 | 1336 | else |
b32bf427 | 1337 | |
df3ca591 DS |
1338 | dnl Have the libraries--check for SSLeay/OpenSSL headers |
1339 | AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \ | |
1340 | openssl/pem.h openssl/ssl.h openssl/err.h, | |
bebd5dbc | 1341 | curl_ssl_msg="enabled (OpenSSL)" |
df3ca591 DS |
1342 | OPENSSL_ENABLED=1 |
1343 | AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use])) | |
1344 | ||
1345 | if test $ac_cv_header_openssl_x509_h = no; then | |
d99c20f6 DS |
1346 | dnl we don't use the "action" part of the AC_CHECK_HEADERS macro |
1347 | dnl since 'err.h' might in fact find a krb4 header with the same | |
1348 | dnl name | |
1349 | AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h) | |
1350 | ||
e16c1b8e | 1351 | if test $ac_cv_header_x509_h = yes && |
d99c20f6 DS |
1352 | test $ac_cv_header_crypto_h = yes && |
1353 | test $ac_cv_header_ssl_h = yes; then | |
1354 | dnl three matches | |
bebd5dbc | 1355 | curl_ssl_msg="enabled (OpenSSL)" |
d99c20f6 DS |
1356 | OPENSSL_ENABLED=1 |
1357 | fi | |
df3ca591 DS |
1358 | fi |
1359 | fi | |
1360 | ||
f966dad3 DS |
1361 | if test X"$OPENSSL_ENABLED" = X"1"; then |
1362 | AC_DEFINE(USE_SSLEAY, 1, [if SSL is enabled]) | |
090a7f38 DS |
1363 | |
1364 | dnl is there a pkcs12.h header present? | |
1365 | AC_CHECK_HEADERS(openssl/pkcs12.h) | |
c4f7570a DF |
1366 | else |
1367 | LIBS="$CLEANLIBS" | |
f966dad3 | 1368 | fi |
c4f7570a DF |
1369 | dnl USE_SSLEAY is the historical name for what configure calls |
1370 | dnl OPENSSL_ENABLED; the names should really be unified | |
df3ca591 | 1371 | USE_SSLEAY="$OPENSSL_ENABLED" |
df3ca591 | 1372 | AC_SUBST(USE_SSLEAY) |
df3ca591 DS |
1373 | |
1374 | if test X"$OPT_SSL" != Xoff && | |
1375 | test "$OPENSSL_ENABLED" != "1"; then | |
1376 | AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!]) | |
1ee7f92c | 1377 | fi |
df3ca591 DS |
1378 | fi |
1379 | ||
df3ca591 | 1380 | if test X"$OPENSSL_ENABLED" = X"1"; then |
e157aabd | 1381 | dnl If the ENGINE library seems to be around, check for the OpenSSL engine |
f169b750 DS |
1382 | dnl stuff, it is kind of "separated" from the main SSL check |
1383 | AC_CHECK_FUNC(ENGINE_init, | |
1384 | [ | |
1385 | AC_CHECK_HEADERS(openssl/engine.h) | |
1386 | AC_CHECK_FUNCS( ENGINE_load_builtin_engines ) | |
1387 | ]) | |
af6c3947 | 1388 | |
2c2baa93 | 1389 | dnl these can only exist if openssl exists |
d052e545 | 1390 | dnl yassl doesn't have SSL_get_shutdown |
2c2baa93 DS |
1391 | |
1392 | AC_CHECK_FUNCS( RAND_status \ | |
1393 | RAND_screen \ | |
e16bc916 | 1394 | RAND_egd \ |
d052e545 DS |
1395 | CRYPTO_cleanup_all_ex_data \ |
1396 | SSL_get_shutdown ) | |
1397 | ||
1398 | dnl Make an attempt to detect if this is actually yassl's headers and | |
1399 | dnl OpenSSL emulation layer. We still leave everything else believing | |
1400 | dnl and acting like OpenSSL. | |
2c2baa93 | 1401 | |
248f0571 | 1402 | AC_MSG_CHECKING([for yaSSL using OpenSSL compatibility mode]) |
8ad1928d YT |
1403 | AC_COMPILE_IFELSE([ |
1404 | AC_LANG_PROGRAM([[ | |
d052e545 | 1405 | #include <openssl/ssl.h> |
8ad1928d | 1406 | ]],[[ |
248f0571 YT |
1407 | #if defined(YASSL_VERSION) && defined(OPENSSL_VERSION_NUMBER) |
1408 | int dummy = SSL_ERROR_NONE; | |
1409 | #else | |
1410 | Not the yaSSL OpenSSL compatibility header. | |
1411 | #endif | |
8ad1928d YT |
1412 | ]]) |
1413 | ],[ | |
1414 | AC_MSG_RESULT([yes]) | |
1415 | AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1, | |
1416 | [Define to 1 if using yaSSL in OpenSSL compatibility mode.]) | |
1417 | curl_ssl_msg="enabled (OpenSSL emulation by yaSSL)" | |
1418 | ],[ | |
1419 | AC_MSG_RESULT([no]) | |
248f0571 | 1420 | ]) |
ae1912cb | 1421 | fi |
00505c92 | 1422 | |
df3ca591 | 1423 | if test "$OPENSSL_ENABLED" = "1"; then |
8882d1fa DS |
1424 | if test -n "$LIB_OPENSSL"; then |
1425 | dnl when the ssl shared libs were found in a path that the run-time | |
1426 | dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH | |
1427 | dnl to prevent further configure tests to fail due to this | |
1428 | ||
1429 | LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL" | |
1430 | export LD_LIBRARY_PATH | |
1431 | AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH]) | |
1432 | fi | |
1ee7f92c DS |
1433 | fi |
1434 | ||
ae1912cb DS |
1435 | fi |
1436 | ||
c518c52a DS |
1437 | dnl ********************************************************************** |
1438 | dnl Check for the presence of ZLIB libraries and headers | |
1439 | dnl ********************************************************************** | |
1440 | ||
1441 | dnl Check for & handle argument to --with-zlib. | |
1442 | ||
1443 | _cppflags=$CPPFLAGS | |
1444 | _ldflags=$LDFLAGS | |
1445 | AC_ARG_WITH(zlib, | |
1446 | AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH]) | |
1447 | AC_HELP_STRING([--without-zlib],[disable use of zlib]), | |
1448 | [OPT_ZLIB="$withval"]) | |
1449 | ||
1450 | if test "$OPT_ZLIB" = "no" ; then | |
1451 | AC_MSG_WARN([zlib disabled]) | |
1452 | else | |
1453 | if test "$OPT_ZLIB" = "yes" ; then | |
1454 | OPT_ZLIB="" | |
1455 | fi | |
1456 | ||
1457 | if test -z "$OPT_ZLIB" ; then | |
1458 | dnl check for the lib first without setting any new path, since many | |
1459 | dnl people have it in the default path | |
1460 | ||
1461 | AC_CHECK_LIB(z, inflateEnd, | |
1462 | dnl libz found, set the variable | |
1463 | [HAVE_LIBZ="1"], | |
1464 | dnl if no lib found, try /usr/local | |
1465 | [OPT_ZLIB="/usr/local"]) | |
1466 | ||
1467 | fi | |
1468 | ||
1469 | dnl Add a nonempty path to the compiler flags | |
1470 | if test -n "$OPT_ZLIB"; then | |
1471 | CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include" | |
1472 | LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff" | |
1473 | fi | |
1474 | ||
1475 | AC_CHECK_HEADER(zlib.h, | |
1476 | [ | |
1477 | dnl zlib.h was found | |
1478 | HAVE_ZLIB_H="1" | |
1479 | dnl if the lib wasn't found already, try again with the new paths | |
1480 | if test "$HAVE_LIBZ" != "1"; then | |
1481 | AC_CHECK_LIB(z, gzread, | |
1482 | [ | |
1483 | dnl the lib was found! | |
1484 | HAVE_LIBZ="1" | |
1485 | ], | |
1486 | [ CPPFLAGS=$_cppflags | |
1487 | LDFLAGS=$_ldflags]) | |
1488 | fi | |
1489 | ], | |
1490 | [ | |
1491 | dnl zlib.h was not found, restore the flags | |
1492 | CPPFLAGS=$_cppflags | |
1493 | LDFLAGS=$_ldflags] | |
1494 | ) | |
1495 | ||
1496 | if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1" | |
1497 | then | |
1498 | AC_MSG_WARN([configure found only the libz lib, not the header file!]) | |
48dd0c56 | 1499 | HAVE_LIBZ="" |
c518c52a DS |
1500 | elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1" |
1501 | then | |
1502 | AC_MSG_WARN([configure found only the libz header file, not the lib!]) | |
1503 | elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1" | |
1504 | then | |
1505 | dnl both header and lib were found! | |
1506 | AC_SUBST(HAVE_LIBZ) | |
1507 | AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file]) | |
1508 | AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available]) | |
1509 | ||
1510 | CURL_LIBS="$CURL_LIBS -lz" | |
1511 | LIBS="$LIBS -lz" | |
1512 | ||
1513 | dnl replace 'HAVE_LIBZ' in the automake makefile.ams | |
1514 | AMFIXLIB="1" | |
1515 | AC_MSG_NOTICE([found both libz and libz.h header]) | |
1516 | curl_zlib_msg="enabled" | |
1517 | fi | |
1518 | fi | |
1519 | ||
1520 | dnl set variable for use in automakefile(s) | |
1521 | AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1) | |
1522 | ||
2147284c DS |
1523 | dnl ********************************************************************** |
1524 | dnl Check for the presence of LIBSSH2 libraries and headers | |
1525 | dnl ********************************************************************** | |
1526 | ||
1527 | dnl Default to compiler & linker defaults for LIBSSH2 files & libraries. | |
1528 | OPT_LIBSSH2=off | |
1529 | AC_ARG_WITH(libssh2,dnl | |
1530 | AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the LIBSSH2 installation (default: /usr/local/lib); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]) | |
1531 | AC_HELP_STRING([--without-libssh2], [disable LIBSSH2]), | |
1532 | OPT_LIBSSH2=$withval) | |
1533 | ||
1534 | if test X"$OPT_LIBSSH2" != Xno; then | |
1535 | dnl backup the pre-libssh2 variables | |
1536 | CLEANLDFLAGS="$LDFLAGS" | |
1537 | CLEANCPPFLAGS="$CPPFLAGS" | |
1538 | CLEANLIBS="$LIBS" | |
1539 | ||
1540 | case "$OPT_LIBSSH2" in | |
1541 | yes) | |
1542 | dnl --with-libssh2 (without path) used | |
1543 | PREFIX_LIBSSH2=/usr/local/lib | |
342fa1cf | 1544 | LIB_LIBSSH2="$PREFIX_LIBSSH2$libsuff" |
2147284c DS |
1545 | ;; |
1546 | off) | |
1547 | dnl no --with-libssh2 option given, just check default places | |
1548 | PREFIX_LIBSSH2= | |
1549 | ;; | |
1550 | *) | |
b9af0d89 | 1551 | dnl use the given --with-libssh2 spot |
2147284c DS |
1552 | PREFIX_LIBSSH2=$OPT_LIBSSH2 |
1553 | LIB_LIBSSH2="$PREFIX_LIBSSH2/lib$libsuff" | |
1554 | LDFLAGS="$LDFLAGS -L$LIB_LIBSSH2" | |
b9af0d89 | 1555 | CPPFLAGS="$CPPFLAGS -I$PREFIX_LIBSSH2/include" |
2147284c DS |
1556 | ;; |
1557 | esac | |
1558 | ||
c185cdf2 | 1559 | AC_CHECK_LIB(ssh2, libssh2_channel_open_ex) |
e16c1b8e | 1560 | |
c185cdf2 DS |
1561 | AC_CHECK_HEADERS(libssh2.h, |
1562 | curl_ssh_msg="enabled (libSSH2)" | |
1563 | LIBSSH2_ENABLED=1 | |
823a0454 | 1564 | AC_DEFINE(USE_LIBSSH2, 1, [if libSSH2 is in use]) |
9b23b310 | 1565 | AC_SUBST(USE_LIBSSH2, [1]) |
823a0454 | 1566 | ) |
c185cdf2 DS |
1567 | |
1568 | if test X"$OPT_LIBSSH2" != Xoff && | |
1569 | test "$LIBSSH2_ENABLED" != "1"; then | |
1570 | AC_MSG_ERROR([libSSH2 libs and/or directories were not found where specified!]) | |
2147284c DS |
1571 | fi |
1572 | ||
1573 | if test "$LIBSSH2_ENABLED" = "1"; then | |
1574 | if test -n "$LIB_LIBSSH2"; then | |
1575 | dnl when the libssh2 shared libs were found in a path that the run-time | |
1576 | dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH | |
1577 | dnl to prevent further configure tests to fail due to this | |
1578 | ||
1579 | LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_LIBSSH2" | |
1580 | export LD_LIBRARY_PATH | |
1581 | AC_MSG_NOTICE([Added $LIB_LIBSSH2 to LD_LIBRARY_PATH]) | |
1582 | fi | |
1583 | fi | |
1584 | fi | |
1585 | ||
df3ca591 | 1586 | dnl ********************************************************************** |
e16c1b8e | 1587 | dnl Check for the random seed preferences |
df3ca591 DS |
1588 | dnl ********************************************************************** |
1589 | ||
1590 | if test X"$OPENSSL_ENABLED" = X"1"; then | |
1591 | AC_ARG_WITH(egd-socket, | |
1592 | AC_HELP_STRING([--with-egd-socket=FILE], | |
1593 | [Entropy Gathering Daemon socket pathname]), | |
1594 | [ EGD_SOCKET="$withval" ] | |
1595 | ) | |
1596 | if test -n "$EGD_SOCKET" ; then | |
1597 | AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET", | |
1598 | [your Entropy Gathering Daemon socket pathname] ) | |
1599 | fi | |
1600 | ||
1601 | dnl Check for user-specified random device | |
1602 | AC_ARG_WITH(random, | |
1603 | AC_HELP_STRING([--with-random=FILE], | |
1604 | [read randomness from FILE (default=/dev/urandom)]), | |
1605 | [ RANDOM_FILE="$withval" ], | |
1606 | [ | |
1607 | dnl Check for random device | |
1608 | AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] ) | |
1609 | ] | |
1610 | ) | |
1611 | if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then | |
1612 | AC_SUBST(RANDOM_FILE) | |
1613 | AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE", | |
1614 | [a suitable file to read random data from]) | |
1615 | fi | |
1616 | fi | |
1617 | ||
bebd5dbc DS |
1618 | dnl ---------------------------------------------------- |
1619 | dnl FIX: only check for GnuTLS if OpenSSL is not enabled | |
1620 | dnl ---------------------------------------------------- | |
1621 | ||
1622 | dnl Default to compiler & linker defaults for GnuTLS files & libraries. | |
e49a7e36 | 1623 | OPT_GNUTLS=no |
bebd5dbc DS |
1624 | |
1625 | AC_ARG_WITH(gnutls,dnl | |
1626 | AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root (default: /usr/local/)]) | |
1627 | AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]), | |
1628 | OPT_GNUTLS=$withval) | |
1629 | ||
1630 | if test "$OPENSSL_ENABLED" != "1"; then | |
1631 | ||
e49a7e36 | 1632 | if test X"$OPT_GNUTLS" != Xno; then |
bebd5dbc DS |
1633 | if test "x$OPT_GNUTLS" = "xyes"; then |
1634 | check=`libgnutls-config --version 2>/dev/null` | |
1635 | if test -n "$check"; then | |
1636 | addlib=`libgnutls-config --libs` | |
1637 | addcflags=`libgnutls-config --cflags` | |
1638 | version=`libgnutls-config --version` | |
241b2b4a | 1639 | gtlsprefix=`libgnutls-config --prefix` |
bebd5dbc DS |
1640 | fi |
1641 | else | |
313f1a1e DS |
1642 | addlib=`$OPT_GNUTLS/bin/libgnutls-config --libs` |
1643 | addcflags=`$OPT_GNUTLS/bin/libgnutls-config --cflags` | |
c2fcdf3a | 1644 | version=`$OPT_GNUTLS/bin/libgnutls-config --version 2>/dev/null` |
241b2b4a | 1645 | gtlsprefix=$OPT_GNUTLS |
c2fcdf3a DS |
1646 | if test -z "$version"; then |
1647 | version="unknown" | |
1648 | fi | |
bebd5dbc | 1649 | fi |
313f1a1e | 1650 | if test -n "$addlib"; then |
bebd5dbc | 1651 | |
b0bc2f00 | 1652 | CLEANLIBS="$LIBS" |
313f1a1e | 1653 | CLEANCPPFLAGS="$CPPFLAGS" |
e16c1b8e | 1654 | |
b0bc2f00 | 1655 | LIBS="$LIBS $addlib" |
313f1a1e DS |
1656 | if test "$addcflags" != "-I/usr/include"; then |
1657 | CPPFLAGS="$CPPFLAGS $addcflags" | |
1658 | fi | |
e16c1b8e | 1659 | |
313f1a1e | 1660 | AC_CHECK_LIB(gnutls, gnutls_check_version, |
bebd5dbc DS |
1661 | [ |
1662 | AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled]) | |
1663 | AC_SUBST(USE_GNUTLS, [1]) | |
02267eba | 1664 | GNUTLS_ENABLED=1 |
bebd5dbc | 1665 | USE_GNUTLS="yes" |
313f1a1e | 1666 | curl_ssl_msg="enabled (GnuTLS)" |
bebd5dbc DS |
1667 | ], |
1668 | [ | |
b0bc2f00 | 1669 | LIBS="$CLEANLIBS" |
bebd5dbc DS |
1670 | CPPFLAGS="$CLEANCPPFLAGS" |
1671 | ]) | |
e16c1b8e | 1672 | |
313f1a1e DS |
1673 | if test "x$USE_GNUTLS" = "xyes"; then |
1674 | AC_MSG_NOTICE([detected GnuTLS version $version]) | |
241b2b4a | 1675 | |
313f1a1e DS |
1676 | dnl when shared libs were found in a path that the run-time |
1677 | dnl linker doesn't search through, we need to add it to | |
1678 | dnl LD_LIBRARY_PATH to prevent further configure tests to fail | |
1679 | dnl due to this | |
1680 | ||
1681 | LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlsprefix/lib$libsuff" | |
1682 | export LD_LIBRARY_PATH | |
4370e92d | 1683 | AC_MSG_NOTICE([Added $gtlsprefix/lib$libsuff to LD_LIBRARY_PATH]) |
313f1a1e | 1684 | fi |
241b2b4a | 1685 | |
bebd5dbc | 1686 | fi |
313f1a1e | 1687 | |
bebd5dbc DS |
1688 | fi dnl GNUTLS not disabled |
1689 | ||
bebd5dbc | 1690 | fi dnl OPENSSL != 1 |
779ca097 | 1691 | |
7f70dbca DS |
1692 | dnl ---------------------------------------------------- |
1693 | dnl NSS. Only check if GnuTLS and OpenSSL are not enabled | |
1694 | dnl ---------------------------------------------------- | |
1695 | ||
1696 | dnl Default to compiler & linker defaults for NSS files & libraries. | |
1697 | OPT_NSS=no | |
1698 | ||
1699 | AC_ARG_WITH(nss,dnl | |
1700 | AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root (default: /usr/local/)]) | |
1701 | AC_HELP_STRING([--without-nss], [disable NSS detection]), | |
1702 | OPT_NSS=$withval) | |
1703 | ||
1704 | if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then | |
1705 | ||
1706 | if test X"$OPT_NSS" != Xno; then | |
1707 | if test "x$OPT_NSS" = "xyes"; then | |
1708 | check=`pkg-config --version 2>/dev/null` | |
1709 | if test -n "$check"; then | |
1710 | addlib=`pkg-config --libs nss` | |
1711 | addcflags=`pkg-config --cflags nss` | |
1712 | version=`pkg-config --modversion nss` | |
1713 | nssprefix=`pkg-config --variable=prefix nss` | |
1714 | fi | |
1715 | else | |
1716 | # Without pkg-config, we'll kludge in some defaults | |
1717 | addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl" | |
e16c1b8e | 1718 | addcflags="-I$OPT_NSS/include" |
7f70dbca DS |
1719 | version="unknown" |
1720 | gtlsprefix=$OPT_GNUTLS | |
1721 | fi | |
8c3f40ee DS |
1722 | |
1723 | dnl Check for functionPK11_CreateGenericObject | |
1724 | dnl this is needed for using the PEM PKCS#11 module | |
20695098 | 1725 | AC_CHECK_LIB(nss3, PK11_CreateGenericObject, |
8c3f40ee DS |
1726 | [ |
1727 | AC_DEFINE(HAVE_PK11_CREATEGENERICOBJECT, 1, [if you have the function PK11_CreateGenericObject]) | |
1728 | AC_SUBST(HAVE_PK11_CREATEGENERICOBJECT, [1]) | |
1729 | ]) | |
7f70dbca DS |
1730 | if test -n "$addlib"; then |
1731 | ||
1732 | CLEANLIBS="$LIBS" | |
1733 | CLEANCPPFLAGS="$CPPFLAGS" | |
e16c1b8e | 1734 | |
7f70dbca DS |
1735 | LIBS="$LIBS $addlib" |
1736 | if test "$addcflags" != "-I/usr/include"; then | |
1737 | CPPFLAGS="$CPPFLAGS $addcflags" | |
1738 | fi | |
e16c1b8e | 1739 | |
7f70dbca DS |
1740 | AC_CHECK_LIB(nss3, NSS_Initialize, |
1741 | [ | |
1742 | AC_DEFINE(USE_NSS, 1, [if NSS is enabled]) | |
1743 | AC_SUBST(USE_NSS, [1]) | |
1744 | USE_NSS="yes" | |
1745 | NSS_ENABLED=1 | |
1746 | curl_ssl_msg="enabled (NSS)" | |
1747 | ], | |
1748 | [ | |
1749 | LIBS="$CLEANLIBS" | |
1750 | CPPFLAGS="$CLEANCPPFLAGS" | |
1751 | ]) | |
e16c1b8e | 1752 | |
7f70dbca DS |
1753 | if test "x$USE_NSS" = "xyes"; then |
1754 | AC_MSG_NOTICE([detected NSS version $version]) | |
1755 | ||
1756 | dnl when shared libs were found in a path that the run-time | |
1757 | dnl linker doesn't search through, we need to add it to | |
1758 | dnl LD_LIBRARY_PATH to prevent further configure tests to fail | |
1759 | dnl due to this | |
1760 | ||
1761 | LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff" | |
1762 | export LD_LIBRARY_PATH | |
1763 | AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH]) | |
1764 | fi | |
1765 | ||
1766 | fi | |
1767 | ||
1768 | fi dnl NSS not disabled | |
1769 | ||
1770 | fi dnl OPENSSL != 1 -a GNUTLS_ENABLED != 1 | |
1771 | ||
1772 | if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED" = "x"; then | |
1773 | AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.]) | |
1774 | AC_MSG_WARN([Use --with-ssl, --with-gnutls or --with-nss to address this.]) | |
57d2fb41 DS |
1775 | else |
1776 | # SSL is enabled, genericly | |
1777 | AC_SUBST(SSL_ENABLED) | |
1778 | SSL_ENABLED="1" | |
7f70dbca DS |
1779 | fi |
1780 | ||
779ca097 DS |
1781 | dnl ********************************************************************** |
1782 | dnl Check for the CA bundle | |
1783 | dnl ********************************************************************** | |
1784 | ||
fb23b857 | 1785 | CURL_CHECK_CA_BUNDLE |
779ca097 | 1786 | |
c461254d DF |
1787 | dnl ********************************************************************** |
1788 | dnl Check for the presence of IDN libraries and headers | |
1789 | dnl ********************************************************************** | |
1790 | ||
cff90cf3 | 1791 | AC_MSG_CHECKING([whether to build with libidn]) |
96002646 | 1792 | AC_ARG_WITH(libidn, |
cff90cf3 DS |
1793 | AC_HELP_STRING([--with-libidn=PATH],[Enable libidn usage]) |
1794 | AC_HELP_STRING([--without-libidn],[Disable libidn usage]), | |
96002646 | 1795 | [LIBIDN="$withval"]) |
cff90cf3 DS |
1796 | |
1797 | case "$LIBIDN" in | |
1798 | no) | |
1799 | AC_MSG_RESULT(no) | |
1800 | ;; | |
1801 | *) AC_MSG_RESULT(yes) | |
19a568a9 DS |
1802 | |
1803 | idn="" | |
1804 | dnl if there is a given path, check that FIRST | |
7bb6d76d DS |
1805 | if test -n "$LIBIDN"; then |
1806 | if test "x$LIBIDN" != "xyes"; then | |
7bb6d76d DS |
1807 | oldLDFLAGS=$LDFLAGS |
1808 | oldCPPFLAGS=$CPPFLAGS | |
1809 | LDFLAGS="$LDFLAGS -L$LIBIDN/lib" | |
1810 | CPPFLAGS="$CPPFLAGS -I$LIBIDN/include" | |
1811 | idn="yes" | |
1812 | AC_CHECK_LIB(idn, idna_to_ascii_4i, , | |
1813 | idn="" | |
1814 | LDFLAGS=$oldLDFLAGS | |
1815 | CPPFLAGS=$oldCPPFLAGS) | |
1816 | fi | |
19a568a9 DS |
1817 | fi |
1818 | ||
1819 | if test "x$idn" != "xyes"; then | |
1820 | dnl check with default paths | |
8c16696f | 1821 | idn="yes" |
19a568a9 DS |
1822 | AC_CHECK_LIB(idn, idna_to_ascii_lz, , |
1823 | idn="") | |
1824 | fi | |
1825 | ||
1826 | if test "x$idn" = "xyes"; then | |
cff90cf3 | 1827 | curl_idn_msg="enabled" |
d6460aff | 1828 | AC_SUBST(IDN_ENABLED, [1]) |
4e7575fc | 1829 | dnl different versions of libidn have different setups of these: |
1239e483 | 1830 | AC_CHECK_FUNCS( idn_free idna_strerror tld_strerror) |
c6881660 | 1831 | AC_CHECK_HEADERS( idn-free.h tld.h ) |
cff90cf3 | 1832 | fi |
e16c1b8e GK |
1833 | |
1834 | ;; | |
cff90cf3 DS |
1835 | esac |
1836 | ||
b174aeaa DS |
1837 | dnl Default is to try the thread-safe versions of a few functions |
1838 | OPT_THREAD=on | |
243942a7 DS |
1839 | |
1840 | dnl detect AIX 4.3 or later | |
1841 | dnl see full docs on this reasoning in the lib/hostip.c source file | |
1842 | AC_MSG_CHECKING([AIX 4.3 or later]) | |
1843 | AC_PREPROC_IFELSE([ | |
1844 | #if defined(_AIX) && defined(_AIX43) | |
1845 | printf("just fine"); | |
1846 | #else | |
1847 | #error "this is not AIX 4.3 or later" | |
1848 | #endif | |
1849 | ], | |
1850 | [ AC_MSG_RESULT([yes]) | |
abd65e21 | 1851 | RECENTAIX=yes |
243942a7 DS |
1852 | OPT_THREAD=off ], |
1853 | [ AC_MSG_RESULT([no]) ] | |
1854 | ) | |
1855 | ||
b174aeaa | 1856 | AC_ARG_ENABLE(thread,dnl |
a53d7848 DS |
1857 | AC_HELP_STRING([--disable-thread],[don't look for thread-safe functions]) |
1858 | AC_HELP_STRING([--enable-thread],[look for thread-safe functions]), | |
1859 | [ case "$enableval" in | |
1860 | no) | |
1861 | OPT_THREAD=off | |
1862 | AC_MSG_WARN(libcurl will not get built using thread-safe functions) | |
1863 | ;; | |
1864 | *) | |
1865 | ;; | |
1866 | esac | |
1867 | ] | |
b174aeaa DS |
1868 | ) |
1869 | ||
1870 | if test X"$OPT_THREAD" = Xoff | |
1871 | then | |
fd0d560b YT |
1872 | AC_DEFINE(DISABLED_THREADSAFE, 1, |
1873 | [Set to explicitly specify we don't want to use thread-safe functions]) | |
b174aeaa | 1874 | else |
33b658a3 | 1875 | dnl if test "$ipv6" != "yes"; then |
9f2780a2 | 1876 | dnl dig around for gethostbyname_r() |
d84440d5 | 1877 | dnl the old gethostbyname_r check was done here |
b174aeaa | 1878 | |
9f2780a2 | 1879 | dnl dig around for gethostbyaddr_r() |
d84440d5 | 1880 | dnl the old gethostbyaddr_r check was here BUT COMMENTED OUT |
33b658a3 | 1881 | dnl fi |
d4731b70 | 1882 | |
61fb8fea | 1883 | dnl poke around for inet_ntoa_r() |
4e909ee8 | 1884 | dnl the old inet_ntoa_r check was done here |
d4731b70 | 1885 | |
61fb8fea | 1886 | dnl is there a localtime_r() |
d7e406e0 | 1887 | dnl the old localtime_r check was done here |
d4731b70 | 1888 | |
242be557 | 1889 | dnl is there a strerror_r() |
b93ad10f | 1890 | dnl the old strerror_r check was done here |
242be557 | 1891 | |
f425a25c | 1892 | checkfor_gmtime_r="yes" |
b174aeaa DS |
1893 | fi |
1894 | ||
abd65e21 | 1895 | dnl for recent AIX versions, we skip all the thread-safe checks above since |
0eace2fe DS |
1896 | dnl they claim a thread-safe libc using the standard API. But there are |
1897 | dnl some functions still not thread-safe. Check for these! | |
1898 | ||
1899 | dnl Let's hope this split URL remains working: | |
1900 | dnl http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \ | |
1901 | dnl genprogc/thread_quick_ref.htm | |
abd65e21 DS |
1902 | |
1903 | if test "x$RECENTAIX" = "xyes"; then | |
db302a10 DS |
1904 | |
1905 | AC_DEFINE(_THREAD_SAFE, 1, [define this if you need it to compile thread-safe code]) | |
62af3fb7 | 1906 | |
62ff567c | 1907 | dnl is there a localtime_r() |
d7e406e0 | 1908 | dnl the old localtime_r check was done here |
62ff567c DS |
1909 | |
1910 | dnl is there a strerror_r() | |
b93ad10f | 1911 | dnl the old strerror_r check was done here |
62ff567c | 1912 | |
f425a25c | 1913 | checkfor_gmtime_r="yes" |
abd65e21 DS |
1914 | fi |
1915 | ||
1916 | ||
ae1912cb DS |
1917 | dnl ********************************************************************** |
1918 | dnl Back to "normal" configuring | |
1919 | dnl ********************************************************************** | |
1920 | ||
1921 | dnl Checks for header files. | |
1922 | AC_HEADER_STDC | |
075c5342 | 1923 | |
4d95d23d | 1924 | CURL_CHECK_HEADER_MALLOC |
a6a5bba0 YT |
1925 | |
1926 | dnl Now check for the very most basic headers. Then we can use these | |
075c5342 DS |
1927 | dnl ones as default-headers when checking for the rest! |
1928 | AC_CHECK_HEADERS( | |
1929 | sys/types.h \ | |
1930 | sys/time.h \ | |
1931 | sys/select.h \ | |
1932 | sys/socket.h \ | |
a4351517 | 1933 | sys/ioctl.h \ |
aa41743e | 1934 | sys/uio.h \ |
24ac5b8a | 1935 | assert.h \ |
ae1912cb | 1936 | unistd.h \ |
8898ff9e | 1937 | stdlib.h \ |
3d66d10f | 1938 | limits.h \ |
ae1912cb DS |
1939 | arpa/inet.h \ |
1940 | net/if.h \ | |
1941 | netinet/in.h \ | |
3d29bda9 | 1942 | sys/un.h \ |
43137cf5 | 1943 | netinet/tcp.h \ |
ae1912cb | 1944 | netdb.h \ |
ae1912cb DS |
1945 | sys/sockio.h \ |
1946 | sys/stat.h \ | |
ae1912cb DS |
1947 | sys/param.h \ |
1948 | termios.h \ | |
1949 | termio.h \ | |
1950 | sgtty.h \ | |
1951 | fcntl.h \ | |
ae1912cb | 1952 | alloca.h \ |
ae1912cb DS |
1953 | time.h \ |
1954 | io.h \ | |
5900c0f7 | 1955 | pwd.h \ |
82d3ded9 | 1956 | utime.h \ |
3c49b405 | 1957 | sys/utime.h \ |
99dfdebc | 1958 | sys/poll.h \ |
bdb2beb8 | 1959 | poll.h \ |
a4e1ac79 | 1960 | sys/resource.h \ |
8e872231 | 1961 | libgen.h \ |
82d6cfa7 | 1962 | locale.h \ |
65dbee01 | 1963 | errno.h \ |
69565afa | 1964 | stdbool.h \ |
528a149d DS |
1965 | arpa/tftp.h \ |
1966 | sys/filio.h \ | |
075c5342 DS |
1967 | setjmp.h, |
1968 | dnl to do if not found | |
1969 | [], | |
1970 | dnl to do if found | |
1971 | [], | |
1972 | dnl default includes | |
1973 | [ | |
1974 | #ifdef HAVE_SYS_TYPES_H | |
1975 | #include <sys/types.h> | |
1976 | #endif | |
1977 | #ifdef HAVE_SYS_TIME_H | |
1978 | #include <sys/time.h> | |
1979 | #endif | |
1980 | #ifdef HAVE_SYS_SELECT_H | |
1981 | #include <sys/select.h> | |
1982 | #endif | |
1983 | #ifdef HAVE_SYS_SOCKET_H | |
1984 | #include <sys/socket.h> | |
1985 | #endif | |
d85c2199 DS |
1986 | #ifdef HAVE_NETINET_IN_H |
1987 | #include <netinet/in.h> | |
1988 | #endif | |
3d29bda9 DS |
1989 | #ifdef HAVE_SYS_UN_H |
1990 | #include <sys/un.h> | |
1991 | #endif | |
075c5342 | 1992 | ] |
ae1912cb DS |
1993 | ) |
1994 | ||
ae1912cb DS |
1995 | dnl Checks for typedefs, structures, and compiler characteristics. |
1996 | AC_C_CONST | |
273b2b23 | 1997 | CURL_CHECK_VARIADIC_MACROS |
ae1912cb DS |
1998 | AC_TYPE_SIZE_T |
1999 | AC_HEADER_TIME | |
32ac4ede | 2000 | CURL_CHECK_STRUCT_TIMEVAL |
67e8d229 | 2001 | CURL_VERIFY_RUNTIMELIBS |
ae1912cb | 2002 | |
78e6508e | 2003 | AC_CHECK_SIZEOF(size_t) |
95cef39d | 2004 | AC_CHECK_SIZEOF(int) |
af677c4e | 2005 | AC_CHECK_SIZEOF(long) |
a06e0779 | 2006 | CURL_CONFIGURE_LONG |
cd73a733 | 2007 | AC_CHECK_SIZEOF(time_t) |
e2c81773 | 2008 | AC_CHECK_SIZEOF(off_t) |
ae1912cb | 2009 | |
3f3d6ebe | 2010 | soname_bump=no |
243cf297 YT |
2011 | if test x"$ac_cv_native_windows" != "xyes" && |
2012 | test $ac_cv_sizeof_off_t -ne $curl_sizeof_curl_off_t; then | |
3f3d6ebe DS |
2013 | AC_MSG_WARN([This libcurl built is probably not ABI compatible with previous]) |
2014 | AC_MSG_WARN([builds! You MUST read lib/README.curl_off_t to figure it out.]) | |
2015 | soname_bump=yes | |
2016 | fi | |
2017 | ||
2018 | ||
a147a079 | 2019 | AC_CHECK_TYPE(long long, |
ceb49d37 YT |
2020 | [AC_DEFINE(HAVE_LONGLONG, 1, |
2021 | [Define to 1 if the compiler supports the 'long long' data type.])] | |
e16c1b8e | 2022 | longlong="yes" |
af677c4e DS |
2023 | ) |
2024 | ||
2025 | if test "xyes" = "x$longlong"; then | |
2026 | AC_MSG_CHECKING([if numberLL works]) | |
2027 | AC_COMPILE_IFELSE([long long val = 1000LL;], | |
2028 | [AC_DEFINE(HAVE_LL, 1, [if your compiler supports LL])] | |
2029 | AC_MSG_RESULT(yes), | |
2030 | AC_MSG_RESULT(no) | |
2031 | ) | |
2032 | fi | |
2033 | ||
ae1912cb | 2034 | |
61e2a810 | 2035 | # check for ssize_t |
a147a079 DS |
2036 | AC_CHECK_TYPE(ssize_t, , |
2037 | AC_DEFINE(ssize_t, int, [the signed version of size_t])) | |
61e2a810 | 2038 | |
69565afa YT |
2039 | # check for bool type |
2040 | AC_CHECK_TYPE([bool],[ | |
2041 | AC_DEFINE(HAVE_BOOL_T, 1, | |
2042 | [Define to 1 if bool is an available type.]) | |
2043 | ], ,[ | |
2a6a22a3 YT |
2044 | #ifdef HAVE_SYS_TYPES_H |
2045 | #include <sys/types.h> | |
2046 | #endif | |
69565afa YT |
2047 | #ifdef HAVE_STDBOOL_H |
2048 | #include <stdbool.h> | |
2049 | #endif | |
2050 | ]) | |
2051 | ||
d6ffb4c1 | 2052 | # Check for socklen_t or equivalent |
a6a5bba0 YT |
2053 | CURL_CHECK_TYPE_SOCKLEN_T |
2054 | ||
d09b4369 | 2055 | TYPE_IN_ADDR_T |
11693c0f | 2056 | |
a31ddd36 DS |
2057 | TYPE_SOCKADDR_STORAGE |
2058 | ||
73226415 YT |
2059 | TYPE_SIG_ATOMIC_T |
2060 | ||
a46f55b9 YT |
2061 | AC_TYPE_SIGNAL |
2062 | ||
9346e55d | 2063 | CURL_CHECK_FUNC_SELECT |
ad05d0a8 | 2064 | |
01fa02d0 | 2065 | CURL_CHECK_FUNC_RECV |
a9dc9005 | 2066 | CURL_CHECK_FUNC_RECVFROM |
01fa02d0 | 2067 | CURL_CHECK_FUNC_SEND |
77b3bc23 YT |
2068 | CURL_CHECK_MSG_NOSIGNAL |
2069 | ||
4e4f6c1e | 2070 | CURL_CHECK_FUNC_ALARM |
b93ad10f | 2071 | CURL_CHECK_FUNC_FDOPEN |
fce9c3a9 | 2072 | CURL_CHECK_FUNC_FTRUNCATE |
d84440d5 YT |
2073 | CURL_CHECK_FUNC_GETHOSTBYADDR_R |
2074 | CURL_CHECK_FUNC_GETHOSTBYNAME_R | |
d7e406e0 | 2075 | CURL_CHECK_FUNC_GETHOSTNAME |
0c1ae21c | 2076 | CURL_CHECK_FUNC_GETSERVBYPORT_R |
ea1362a9 | 2077 | CURL_CHECK_FUNC_GMTIME_R |
006cab3e | 2078 | CURL_CHECK_FUNC_INET_NTOA_R |
d7e406e0 | 2079 | CURL_CHECK_FUNC_LOCALTIME_R |
969903eb | 2080 | CURL_CHECK_FUNC_SIGACTION |
4c621bc6 YT |
2081 | CURL_CHECK_FUNC_STRCASECMP |
2082 | CURL_CHECK_FUNC_STRCASESTR | |
2083 | CURL_CHECK_FUNC_STRCMPI | |
fce9c3a9 | 2084 | CURL_CHECK_FUNC_STRDUP |
b93ad10f | 2085 | CURL_CHECK_FUNC_STRERROR_R |
4c621bc6 YT |
2086 | CURL_CHECK_FUNC_STRICMP |
2087 | CURL_CHECK_FUNC_STRLCAT | |
2088 | CURL_CHECK_FUNC_STRNCASECMP | |
2089 | CURL_CHECK_FUNC_STRNCMPI | |
2090 | CURL_CHECK_FUNC_STRNICMP | |
d7e406e0 | 2091 | CURL_CHECK_FUNC_STRSTR |
969903eb | 2092 | CURL_CHECK_FUNC_STRTOK_R |
ea1362a9 | 2093 | CURL_CHECK_FUNC_STRTOLL |
aa41743e | 2094 | CURL_CHECK_FUNC_WRITEV |
ea1362a9 | 2095 | |
ae1912cb DS |
2096 | dnl Checks for library functions. |
2097 | dnl AC_PROG_GCC_TRADITIONAL | |
a46f55b9 | 2098 | |
f8e916db | 2099 | dnl AC_FUNC_VPRINTF |
74e5beab DS |
2100 | case $host in |
2101 | *msdosdjgpp) | |
2102 | ac_cv_func_pipe=no | |
2103 | skipcheck_pipe=yes | |
2104 | AC_MSG_NOTICE([skip check for pipe on msdosdjgpp]) | |
2105 | ;; | |
2106 | esac | |
357389a9 YT |
2107 | |
2108 | AC_CHECK_FUNCS([basename \ | |
2109 | closesocket \ | |
2110 | fork \ | |
357389a9 YT |
2111 | geteuid \ |
2112 | gethostbyaddr \ | |
2113 | getpass_r \ | |
2114 | getppid \ | |
2115 | getprotobyname \ | |
2116 | getpwuid \ | |
2117 | getrlimit \ | |
2118 | gettimeofday \ | |
2119 | inet_addr \ | |
357389a9 YT |
2120 | inet_pton \ |
2121 | perror \ | |
2122 | pipe \ | |
2123 | poll \ | |
2124 | setlocale \ | |
2125 | setmode \ | |
2126 | setrlimit \ | |
357389a9 YT |
2127 | siginterrupt \ |
2128 | signal \ | |
2129 | sigsetjmp \ | |
2130 | socket \ | |
357389a9 YT |
2131 | uname \ |
2132 | utime | |
2133 | ],[ | |
2134 | ],[ | |
2135 | func="$ac_func" | |
2136 | eval skipcheck=\$skipcheck_$func | |
2137 | if test "x$skipcheck" != "xyes"; then | |
2138 | AC_MSG_CHECKING([deeper for $func]) | |
2139 | AC_LINK_IFELSE([ | |
2140 | AC_LANG_PROGRAM([[ | |
2141 | ]],[[ | |
2142 | $func (); | |
2143 | ]]) | |
2144 | ],[ | |
2145 | AC_MSG_RESULT([yes]) | |
2146 | eval "ac_cv_func_$func=yes" | |
2147 | AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$func])], [1], | |
2148 | [Define to 1 if you have the $func function.]) | |
2149 | ],[ | |
2150 | AC_MSG_RESULT([but still no]) | |
2151 | ]) | |
2152 | fi | |
2153 | ]) | |
2154 | ||
ae1912cb | 2155 | |
3c49b405 DS |
2156 | dnl sigsetjmp() might be a macro and no function so if it isn't found already |
2157 | dnl we make an extra check here! | |
2158 | if test "$ac_cv_func_sigsetjmp" != "yes"; then | |
2159 | AC_MSG_CHECKING([for sigsetjmp defined as macro]) | |
8ad1928d YT |
2160 | AC_LINK_IFELSE([ |
2161 | AC_LANG_PROGRAM([[ | |
2162 | #include <setjmp.h> | |
2163 | ]],[[ | |
2164 | sigjmp_buf jmpenv; | |
2165 | sigsetjmp(jmpenv, 1); | |
2166 | ]]) | |
2167 | ],[ | |
2168 | AC_MSG_RESULT([yes]) | |
2169 | AC_DEFINE(HAVE_SIGSETJMP, 1, [If you have sigsetjmp]) | |
2170 | ],[ | |
2171 | AC_MSG_RESULT([no]) | |
2172 | ]) | |
3c49b405 DS |
2173 | fi |
2174 | ||
76637759 DS |
2175 | AC_CHECK_DECL(basename, , |
2176 | AC_DEFINE(NEED_BASENAME_PROTO, 1, [If you lack a fine basename() prototype]), | |
2177 | #ifdef HAVE_STRING_H | |
2178 | #include <string.h> | |
2179 | #endif | |
2180 | #ifdef HAVE_LIBGEN_H | |
2181 | #include <libgen.h> | |
2182 | #endif | |
74e5beab DS |
2183 | #ifdef HAVE_UNISTD_H |
2184 | #include <unistd.h> | |
2185 | #endif | |
76637759 DS |
2186 | ) |
2187 | ||
b222b230 | 2188 | AC_CHECK_DECL(inet_pton, , |
84d30dff DS |
2189 | AC_DEFINE(HAVE_NO_INET_PTON_PROTO, 1, |
2190 | [Defined if no inet_pton() prototype available]), | |
b222b230 DS |
2191 | [ |
2192 | #ifdef HAVE_ARPA_INET_H | |
2193 | #include <arpa/inet.h> | |
2194 | #endif | |
2195 | ] | |
2196 | ) | |
2197 | ||
e4388643 YT |
2198 | dnl Check if the getnameinfo function is available |
2199 | dnl and get the types of five of its arguments. | |
2200 | CURL_CHECK_FUNC_GETNAMEINFO | |
2e5cccd1 | 2201 | |
bec19771 YT |
2202 | if test "$ipv6" = "yes"; then |
2203 | CURL_CHECK_WORKING_GETADDRINFO | |
2204 | CURL_CHECK_NI_WITHSCOPEID | |
2205 | fi | |
2206 | ||
c2862742 | 2207 | AC_MSG_CHECKING([if we are Mac OS X (to disable poll)]) |
0b3decee DS |
2208 | disable_poll=no |
2209 | case $host in | |
c2862742 | 2210 | *-*-darwin*) |
0b3decee DS |
2211 | disable_poll="yes"; |
2212 | ;; | |
2213 | *) | |
2214 | ;; | |
2215 | esac | |
2216 | AC_MSG_RESULT($disable_poll) | |
2217 | ||
2218 | if test "$disable_poll" = "no"; then | |
2219 | ||
2220 | dnl poll() might be badly emulated, as in Mac OS X 10.3 (and other BSDs?) and | |
2221 | dnl to find out we make an extra check here! | |
2222 | if test "$ac_cv_func_poll" = "yes"; then | |
2223 | AC_MSG_CHECKING([if poll works with NULL inputs]) | |
2224 | AC_RUN_IFELSE([ | |
a7b99fc4 DS |
2225 | #ifdef HAVE_SYS_POLL_H |
2226 | #include <sys/poll.h> | |
bdb2beb8 YT |
2227 | #elif defined(HAVE_POLL_H) |
2228 | #include <poll.h> | |
a7b99fc4 DS |
2229 | #endif |
2230 | ||
2231 | int main(void) | |
2232 | { | |
2233 | /* make this return 0 == timeout since there's nothing to read from */ | |
2234 | return poll((void *)0, 0, 10 /*ms*/); | |
2235 | } | |
2236 | ], | |
0b3decee DS |
2237 | AC_MSG_RESULT(yes) |
2238 | AC_DEFINE(HAVE_POLL_FINE, 1, [If you have a fine poll]), | |
2239 | AC_MSG_RESULT(no), | |
2240 | AC_MSG_RESULT(cross-compiling assumes yes) | |
2241 | AC_DEFINE(HAVE_POLL_FINE, 1, [If you have a fine poll]) | |
2242 | ) dnl end of AC_RUN_IFELSE | |
2243 | fi dnl poll() was found | |
2244 | fi dnl poll()-check is not disabled | |
a7b99fc4 DS |
2245 | |
2246 | ||
e16c1b8e | 2247 | AC_PATH_PROG( PERL, perl, , |
7dc36344 DS |
2248 | $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin ) |
2249 | AC_SUBST(PERL) | |
ae1912cb | 2250 | |
e16c1b8e | 2251 | AC_PATH_PROGS( NROFF, gnroff nroff, , |
ae1912cb | 2252 | $PATH:/usr/bin/:/usr/local/bin ) |
96dde76b | 2253 | AC_SUBST(NROFF) |
ae1912cb | 2254 | |
773e7e87 DS |
2255 | if test -n "$NROFF"; then |
2256 | dnl only check for nroff options if an nroff command was found | |
2257 | ||
2258 | AC_MSG_CHECKING([how to use *nroff to get plain text from man pages]) | |
2259 | MANOPT="-man" | |
37685848 DS |
2260 | mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null` |
2261 | if test -z "$mancheck"; then | |
773e7e87 DS |
2262 | MANOPT="-mandoc" |
2263 | mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null` | |
2264 | if test -z "$mancheck"; then | |
2265 | MANOPT="" | |
2266 | AC_MSG_RESULT([failed]) | |
2267 | AC_MSG_WARN([found no *nroff option to get plaintext from man pages]) | |
2268 | else | |
2269 | AC_MSG_RESULT([$MANOPT]) | |
2270 | fi | |
37685848 DS |
2271 | else |
2272 | AC_MSG_RESULT([$MANOPT]) | |
2273 | fi | |
773e7e87 DS |
2274 | AC_SUBST(MANOPT) |
2275 | fi | |
2276 | ||
2277 | if test -z "$MANOPT" | |
2278 | then | |
2279 | dnl if no nroff tool was found, or no option that could convert man pages | |
2280 | dnl was found, then disable the built-in manual stuff | |
2281 | AC_MSG_WARN([disabling built-in manual]) | |
2282 | USE_MANUAL="no"; | |
37685848 | 2283 | fi |
37685848 | 2284 | |
f3663a9d DS |
2285 | dnl ************************************************************************* |
2286 | dnl If the manual variable still is set, then we go with providing a built-in | |
2287 | dnl manual | |
2288 | ||
2289 | if test "$USE_MANUAL" = "1"; then | |
2290 | AC_DEFINE(USE_MANUAL, 1, [If you want to build curl with the built-in manual]) | |
cff90cf3 | 2291 | curl_manual_msg="enabled" |
f3663a9d DS |
2292 | fi |
2293 | ||
2294 | dnl set variable for use in automakefile(s) | |
2295 | AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1) | |
2296 | ||
4c663ba9 | 2297 | AC_MSG_CHECKING([whether to enable c-ares]) |
673ff5eb | 2298 | AC_ARG_ENABLE(ares, |
4c663ba9 DS |
2299 | AC_HELP_STRING([--enable-ares=PATH],[Enable c-ares for name lookups]) |
2300 | AC_HELP_STRING([--disable-ares],[Disable c-ares for name lookups]), | |
673ff5eb DS |
2301 | [ case "$enableval" in |
2302 | no) | |
2303 | AC_MSG_RESULT(no) | |
2304 | ;; | |
2305 | *) AC_MSG_RESULT(yes) | |
2306 | ||
2307 | if test "x$IPV6_ENABLED" = "x1"; then | |
4c663ba9 | 2308 | AC_MSG_NOTICE([c-ares may not work properly with ipv6]) |
673ff5eb DS |
2309 | fi |
2310 | ||
4c663ba9 | 2311 | AC_DEFINE(USE_ARES, 1, [Define if you want to enable c-ares support]) |
673ff5eb DS |
2312 | dnl substitute HAVE_ARES for curl-config and similar |
2313 | HAVE_ARES="1" | |
2314 | AC_SUBST(HAVE_ARES) | |
2315 | curl_ares_msg="enabled" | |
2316 | ||
f7503863 | 2317 | LIBS="-lcares $LIBS" |
673ff5eb DS |
2318 | |
2319 | dnl For backwards compatibility default to includes/lib in srcdir/ares | |
2320 | dnl If a value is specified it is assumed that the libs are in $val/lib | |
2321 | dnl and the includes are in $val/include. This is the default setup for | |
2322 | dnl ares so it should not be a problem. | |
2323 | if test "x$enableval" = "xyes" ; then | |
2324 | if test -d "$srcdir/ares"; then | |
2325 | aresembedded="yes" | |
2326 | AC_CONFIG_SUBDIRS(ares) | |
2327 | aresinc=`cd $srcdir/ares && pwd` | |
2328 | CPPFLAGS="$CPPFLAGS -I$aresinc" | |
2329 | ||
2330 | dnl the pwd= below cannot 'cd' into the ares dir to get the full | |
2331 | dnl path to it, since it may not exist yet if we build outside of | |
2332 | dnl the source tree | |
2333 | pwd=`pwd` | |
2334 | LDFLAGS="$LDFLAGS -L$pwd/ares" | |
2335 | fi | |
2336 | else | |
2337 | CPPFLAGS="$CPPFLAGS -I$enableval/include" | |
2338 | LDFLAGS="$LDFLAGS -L$enableval/lib" | |
2339 | fi | |
2340 | ||
2341 | if test -z "$aresembedded"; then | |
2342 | dnl verify that a sufficient c-ares is here if we have pointed one | |
2343 | dnl out and don't use the "embedded" ares dir (in which case we don't | |
2344 | dnl check it because it might not have been built yet) | |
2345 | AC_MSG_CHECKING([that c-ares is good and recent enough]) | |
d70f3374 | 2346 | AC_LINK_IFELSE([ |
862049c4 | 2347 | AC_LANG_PROGRAM([[ |
673ff5eb | 2348 | #include <ares.h> |
d70f3374 YT |
2349 | /* set of dummy functions in case c-ares was built with debug */ |
2350 | void curl_dofree() { } | |
2351 | void curl_sclose() { } | |
2352 | void curl_domalloc() { } | |
2353 | void curl_docalloc() { } | |
2354 | void curl_socket() { } | |
862049c4 | 2355 | ]],[[ |
d70f3374 YT |
2356 | ares_channel channel; |
2357 | ares_cancel(channel); /* added in 1.2.0 */ | |
2358 | ares_process_fd(channel, 0, 0); /* added in 1.4.0 */ | |
862049c4 | 2359 | ]]) |
d70f3374 YT |
2360 | ],[ |
2361 | AC_MSG_RESULT([yes]) | |
2362 | ],[ | |
2363 | AC_MSG_RESULT([no]) | |
2364 | AC_MSG_ERROR([c-ares library defective or too old]) | |
2365 | ]) | |
673ff5eb DS |
2366 | fi |
2367 | ;; | |
2368 | esac ], | |
2369 | AC_MSG_RESULT(no) | |
2370 | ) | |
ae1912cb | 2371 | |
710e370c DS |
2372 | dnl ************************************************************ |
2373 | dnl disable verbose text strings | |
2374 | dnl | |
2375 | AC_MSG_CHECKING([whether to enable verbose strings]) | |
2376 | AC_ARG_ENABLE(verbose, | |
2377 | AC_HELP_STRING([--enable-verbose],[Enable verbose strings]) | |
2378 | AC_HELP_STRING([--disable-verbose],[Disable verbose strings]), | |
2379 | [ case "$enableval" in | |
2380 | no) | |
2381 | AC_MSG_RESULT(no) | |
2382 | AC_DEFINE(CURL_DISABLE_VERBOSE_STRINGS, 1, [to disable verbose strings]) | |
710e370c DS |
2383 | curl_verbose_msg="no" |
2384 | ;; | |
2385 | *) AC_MSG_RESULT(yes) | |
2386 | ;; | |
2387 | esac ], | |
2388 | AC_MSG_RESULT(yes) | |
2389 | ) | |
2390 | ||
8ed31c48 DS |
2391 | dnl ************************************************************ |
2392 | dnl enable SSPI support | |
2393 | dnl | |
d8d3dc93 | 2394 | AC_MSG_CHECKING([whether to enable SSPI support (Windows native builds only)]) |
8ed31c48 DS |
2395 | AC_ARG_ENABLE(sspi, |
2396 | AC_HELP_STRING([--enable-sspi],[Enable SSPI]) | |
2397 | AC_HELP_STRING([--disable-sspi],[Disable SSPI]), | |
2398 | [ case "$enableval" in | |
2399 | yes) | |
d8d3dc93 YT |
2400 | if test "$ac_cv_native_windows" = "yes"; then |
2401 | AC_MSG_RESULT(yes) | |
2402 | AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support]) | |
9b23b310 | 2403 | AC_SUBST(USE_WINDOWS_SSPI, [1]) |
d8d3dc93 YT |
2404 | curl_sspi_msg="yes" |
2405 | else | |
2406 | AC_MSG_RESULT(no) | |
2407 | AC_MSG_WARN([--enable-sspi Ignored. Only supported on native Windows builds.]) | |
2408 | fi | |
8ed31c48 DS |
2409 | ;; |
2410 | *) | |
2411 | AC_MSG_RESULT(no) | |
2412 | ;; | |
2413 | esac ], | |
2414 | AC_MSG_RESULT(no) | |
2415 | ) | |
2416 | ||
3c49b405 DS |
2417 | dnl ************************************************************ |
2418 | dnl lame option to switch on debug options | |
2419 | dnl | |
2420 | AC_MSG_CHECKING([whether to enable debug options]) | |
2421 | AC_ARG_ENABLE(debug, | |
f136f435 DS |
2422 | AC_HELP_STRING([--enable-debug],[Enable pedantic debug options]) |
2423 | AC_HELP_STRING([--disable-debug],[Disable debug options]), | |
3c49b405 DS |
2424 | [ case "$enableval" in |
2425 | no) | |
2426 | AC_MSG_RESULT(no) | |
2427 | ;; | |
2428 | *) AC_MSG_RESULT(yes) | |
2429 | ||
f8c3b3aa | 2430 | CPPFLAGS="$CPPFLAGS -DCURLDEBUG" |
4fa58560 | 2431 | CFLAGS="$CFLAGS -g" |
455b1af2 | 2432 | |
4fa58560 DS |
2433 | dnl set compiler "debug" options to become more picky, and remove |
2434 | dnl optimize options from CFLAGS | |
2435 | CURL_CC_DEBUG_OPTS | |
3c49b405 | 2436 | ;; |
4fa58560 DS |
2437 | esac |
2438 | ], | |
3c49b405 DS |
2439 | AC_MSG_RESULT(no) |
2440 | ) | |
2441 | ||
94043b11 DS |
2442 | dnl ************************************************************ |
2443 | dnl disable cryptographic authentication | |
2444 | dnl | |
2445 | AC_MSG_CHECKING([whether to enable cryptographic authentication methods]) | |
2446 | AC_ARG_ENABLE(crypto-auth, | |
2447 | AC_HELP_STRING([--enable-crypto-auth],[Enable cryptographic authentication]) | |
2448 | AC_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]), | |
2449 | [ case "$enableval" in | |
2450 | no) | |
2451 | AC_MSG_RESULT(no) | |
2452 | AC_DEFINE(CURL_DISABLE_CRYPTO_AUTH, 1, [to disable cryptographic authentication]) | |
94043b11 DS |
2453 | ;; |
2454 | *) AC_MSG_RESULT(yes) | |
2455 | ;; | |
2456 | esac ], | |
2457 | AC_MSG_RESULT(yes) | |
2458 | ) | |
2459 | ||
ac269a8f DS |
2460 | dnl ************************************************************ |
2461 | dnl disable cookies support | |
2462 | dnl | |
2463 | AC_MSG_CHECKING([whether to enable support for cookies]) | |
2464 | AC_ARG_ENABLE(cookies, | |
2465 | AC_HELP_STRING([--enable-cookies],[Enable cookies support]) | |
2466 | AC_HELP_STRING([--disable-cookies],[Disable cookies support]), | |
2467 | [ case "$enableval" in | |
2468 | no) | |
2469 | AC_MSG_RESULT(no) | |
2470 | AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support]) | |
ac269a8f DS |
2471 | ;; |
2472 | *) AC_MSG_RESULT(yes) | |
2473 | ;; | |
2474 | esac ], | |
2475 | AC_MSG_RESULT(yes) | |
2476 | ) | |
2477 | ||
59582a9d DF |
2478 | dnl ************************************************************ |
2479 | dnl Enable hiding of internal symbols in library to reduce its size and | |
2480 | dnl speed dynamic linking of applications. This currently is only supported | |
10489879 | 2481 | dnl on gcc >= 4.0 and SunPro C. |
59582a9d DF |
2482 | dnl |
2483 | AC_MSG_CHECKING([whether to enable hidden symbols in the library]) | |
2484 | AC_ARG_ENABLE(hidden-symbols, | |
10489879 | 2485 | AC_HELP_STRING([--enable-hidden-symbols],[Hide internal symbols in library]) |
59582a9d DF |
2486 | AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibility in library]), |
2487 | [ case "$enableval" in | |
2488 | no) | |
2489 | AC_MSG_RESULT(no) | |
2490 | ;; | |
e16c1b8e | 2491 | *) |
10489879 | 2492 | AC_MSG_CHECKING([whether $CC supports it]) |
f13ac35e | 2493 | if test "$GCC" = yes ; then |
f13ac35e | 2494 | if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then |
77431568 GK |
2495 | AC_MSG_RESULT(yes) |
2496 | AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols]) | |
77431568 | 2497 | AC_DEFINE(CURL_EXTERN_SYMBOL, [__attribute__ ((visibility ("default")))], [to make a symbol visible]) |
77431568 | 2498 | CFLAGS="$CFLAGS -fvisibility=hidden" |
f13ac35e DF |
2499 | else |
2500 | AC_MSG_RESULT(no) | |
2501 | fi | |
10489879 | 2502 | |
f13ac35e | 2503 | else |
77431568 GK |
2504 | dnl Test for SunPro cc |
2505 | if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then | |
10489879 | 2506 | AC_MSG_RESULT(yes) |
77431568 | 2507 | AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols]) |
77431568 | 2508 | AC_DEFINE(CURL_EXTERN_SYMBOL, [__global], [to make a symbol visible]) |
77431568 | 2509 | CFLAGS="$CFLAGS -xldscope=hidden" |
10489879 DF |
2510 | else |
2511 | AC_MSG_RESULT(no) | |
2512 | fi | |
f13ac35e | 2513 | fi |
59582a9d DF |
2514 | ;; |
2515 | esac ], | |
2516 | AC_MSG_RESULT(no) | |
2517 | ) | |
2518 | ||
8dabd344 DS |
2519 | dnl ************************************************************ |
2520 | dnl enforce SONAME bump | |
2521 | dnl | |
2522 | ||
8dabd344 DS |
2523 | AC_MSG_CHECKING([whether to enforce SONAME bump]) |
2524 | AC_ARG_ENABLE(soname-bump, | |
2525 | AC_HELP_STRING([--enable-soname-bump],[Enable enforced SONAME bump]) | |
2526 | AC_HELP_STRING([--disable-soname-bump],[Disable enforced SONAME bump]), | |
2527 | [ case "$enableval" in | |
2528 | yes) AC_MSG_RESULT(yes) | |
2529 | soname_bump=yes | |
2530 | ;; | |
2531 | *) | |
d7d56184 | 2532 | AC_MSG_RESULT(no) |
8dabd344 DS |
2533 | ;; |
2534 | esac ], | |
3f3d6ebe | 2535 | AC_MSG_RESULT($soname_bump) |
8dabd344 DS |
2536 | ) |
2537 | AM_CONDITIONAL(SONAME_BUMP, test x$soname_bump = xyes) | |
2538 | ||
2539 | ||
59582a9d | 2540 | dnl ************************************************************ |
560a82ae | 2541 | if test ! -z "$winsock_LIB"; then |
9f3d9da1 DS |
2542 | |
2543 | dnl If ws2_32 is wanted, make sure it is the _last_ lib in LIBS (makes | |
2544 | dnl things work when built with c-ares). But we can't just move it last | |
2545 | dnl since then other stuff (SSL) won't build. So we simply append it to the | |
2546 | dnl end. | |
2547 | ||
560a82ae YT |
2548 | LIBS="$LIBS $winsock_LIB" |
2549 | TEST_SERVER_LIBS="$TEST_SERVER_LIBS $winsock_LIB" | |
9f3d9da1 DS |
2550 | |
2551 | fi | |
2552 | ||
a0a47f27 DF |
2553 | dnl |
2554 | dnl All the library dependencies put into $LIB apply to libcurl only. | |
2555 | dnl Those in $CURL_LIBS apply to the curl command-line client only. | |
c461254d | 2556 | dnl Those in $TEST_SERVER_LIBS apply to test servers only. |
a0a47f27 DF |
2557 | dnl Those in $ALL_LIBS apply to all targets, including test targets. |
2558 | dnl | |
2559 | LIBCURL_LIBS=$LIBS | |
a0a47f27 DF |
2560 | |
2561 | AC_SUBST(LIBCURL_LIBS) | |
2562 | AC_SUBST(CURL_LIBS) | |
2563 | AC_SUBST(TEST_SERVER_LIBS) | |
c461254d | 2564 | LIBS=$ALL_LIBS dnl LIBS is a magic variable that's used for every link |
a0a47f27 | 2565 | |
20705ca3 DS |
2566 | AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes) |
2567 | ||
bbc002a5 DS |
2568 | dnl |
2569 | dnl For keeping supported features and protocols also in pkg-config file | |
2570 | dnl since it is more cross-compile frient than curl-config | |
2571 | dnl | |
2572 | ||
2573 | if test "x$USE_SSLEAY" = "x1"; then | |
2574 | SUPPORT_FEATURES="$SUPPORT_FEATURES SSL" | |
2575 | elif test -n "$SSL_ENABLED"; then | |
2576 | SUPPORT_FEATURES="$SUPPORT_FEATURES SSL" | |
2577 | fi | |
2578 | if test "@KRB4_ENABLED@" = "x1"; then | |
2579 | SUPPORT_FEATURES="$SUPPORT_FEATURES KRB4" | |
2580 | fi | |
2581 | if test "x$IPV6_ENABLED" = "x1"; then | |
2582 | SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6" | |
2583 | fi | |
2584 | if test "x$HAVE_LIBZ" = "x1"; then | |
2585 | SUPPORT_FEATURES="$SUPPORT_FEATURES libz" | |
2586 | fi | |
2587 | if test "x$HAVE_ARES" = "x1"; then | |
2588 | SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS" | |
2589 | fi | |
2590 | if test "x$IDN_ENABLED" = "x1"; then | |
2591 | SUPPORT_FEATURES="$SUPPORT_FEATURES IDN" | |
2592 | fi | |
2593 | if test "x$USE_WINDOWS_SSPI" = "x1"; then | |
2594 | SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI" | |
2595 | fi | |
2596 | if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1"; then | |
2597 | SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM" | |
2598 | fi | |
2599 | ||
2600 | AC_SUBST(SUPPORT_FEATURES) | |
2601 | ||
2602 | dnl For supported protocols in pkg-config file | |
2603 | if test "x$CURL_DISABLE_HTTP" != "x1"; then | |
2604 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP" | |
2605 | if test "x$SSL_ENABLED" = "x1"; then | |
2606 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS" | |
2607 | fi | |
2608 | fi | |
2609 | if test "x$CURL_DISABLE_FTP" != "x1"; then | |
2610 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP" | |
2611 | if test "x$SSL_ENABLED" = "x1"; then | |
2612 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS" | |
2613 | fi | |
2614 | fi | |
2615 | if test "x$CURL_DISABLE_FILE" != "x1"; then | |
2616 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE" | |
2617 | fi | |
2618 | if test "x$CURL_DISABLE_TELNET" != "x1"; then | |
2619 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET" | |
2620 | fi | |
2621 | if test "x$CURL_DISABLE_LDAP" != "x1"; then | |
2622 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP" | |
2623 | fi | |
2624 | if test "x$CURL_DISABLE_LDAPS" != "x1"; then | |
2625 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS" | |
2626 | fi | |
2627 | if test "x$CURL_DISABLE_DICT" != "x1"; then | |
2628 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT" | |
2629 | fi | |
2630 | if test "x$CURL_DISABLE_TFTP" != "x1"; then | |
2631 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP" | |
2632 | fi | |
2633 | if test "x$USE_LIBSSH2" = "x1"; then | |
2634 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP" | |
2635 | SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP" | |
2636 | fi | |
2637 | ||
2638 | AC_SUBST(SUPPORT_PROTOCOLS) | |
2639 | ||
93c53424 | 2640 | AC_CONFIG_FILES([Makefile \ |
77431568 | 2641 | docs/Makefile \ |
d54cdf29 | 2642 | docs/examples/Makefile \ |
e22657ea | 2643 | docs/libcurl/Makefile \ |
77431568 GK |
2644 | include/Makefile \ |
2645 | include/curl/Makefile \ | |
2646 | src/Makefile \ | |
172f0ba1 | 2647 | lib/Makefile \ |
044ca343 | 2648 | tests/Makefile \ |
b915ca68 | 2649 | tests/data/Makefile \ |
fd8bf5f1 | 2650 | tests/server/Makefile \ |
2aa0c6c4 | 2651 | tests/libtest/Makefile \ |
77431568 GK |
2652 | packages/Makefile \ |
2653 | packages/Win32/Makefile \ | |
2654 | packages/Win32/cygwin/Makefile \ | |
2655 | packages/Linux/Makefile \ | |
2656 | packages/Linux/RPM/Makefile \ | |
2657 | packages/Linux/RPM/curl.spec \ | |
2658 | packages/Linux/RPM/curl-ssl.spec \ | |
c503930b | 2659 | packages/Solaris/Makefile \ |
d78ec593 | 2660 | packages/DOS/Makefile \ |
34f9ab10 DS |
2661 | packages/EPM/curl.list \ |
2662 | packages/EPM/Makefile \ | |
f19cade5 | 2663 | packages/vms/Makefile \ |
c7e9e60b DS |
2664 | packages/AIX/Makefile \ |
2665 | packages/AIX/RPM/Makefile \ | |
15f2647d | 2666 | packages/AIX/RPM/curl.spec \ |
df3ca591 DS |
2667 | curl-config \ |
2668 | libcurl.pc | |
93c53424 DS |
2669 | ]) |
2670 | AC_OUTPUT | |
cff90cf3 DS |
2671 | |
2672 | AC_MSG_NOTICE([Configured to build curl/libcurl: | |
2673 | ||
2674 | curl version: ${VERSION} | |
2675 | Host setup: ${host} | |
2676 | Install prefix: ${prefix} | |
2677 | Compiler: ${CC} | |
2678 | SSL support: ${curl_ssl_msg} | |
2147284c | 2679 | SSH support: ${curl_ssh_msg} |
cff90cf3 DS |
2680 | zlib support: ${curl_zlib_msg} |
2681 | krb4 support: ${curl_krb4_msg} | |
2682 | GSSAPI support: ${curl_gss_msg} | |
48975876 | 2683 | SPNEGO support: ${curl_spnego_msg} |
cff90cf3 DS |
2684 | c-ares support: ${curl_ares_msg} |
2685 | ipv6 support: ${curl_ipv6_msg} | |
96002646 | 2686 | IDN support: ${curl_idn_msg} |
e16c1b8e | 2687 | Build libcurl: Shared=${enable_shared}, Static=${enable_static} |
cff90cf3 | 2688 | Built-in manual: ${curl_manual_msg} |
710e370c | 2689 | Verbose errors: ${curl_verbose_msg} |
8ed31c48 | 2690 | SSPI support: ${curl_sspi_msg} |
86cbb232 MM |
2691 | ca cert bundle: ${ca} |
2692 | ca cert path: ${capath} | |
d0edb478 | 2693 | LDAP support: ${curl_ldap_msg} |
3f3d6ebe | 2694 | LDAPS support: ${curl_ldaps_msg} |
cff90cf3 | 2695 | ]) |
3f3d6ebe DS |
2696 | |
2697 | if test "x$soname_bump" = "xyes"; then | |
2698 | ||
2699 | cat <<EOM | |
2700 | SONAME bump: yes - WARNING: this library will be built with the SONAME | |
2701 | number bumped due to (a detected) ABI breakage. | |
2702 | See lib/README.curl_off_t for details on this. | |
2703 | EOM | |
2704 | ||
2705 | fi | |
2706 |