]> git.ipfire.org Git - thirdparty/curl.git/blame - configure.ac
cookie_output: made private
[thirdparty/curl.git] / configure.ac
CommitLineData
d551412a
DS
1#***************************************************************************
2# _ _ ____ _
3# Project ___| | | | _ \| |
4# / __| | | | |_) | |
5# | (__| |_| | _ <| |___
6# \___|\___/|_| \_\_____|
7#
35e1d653 8# Copyright (C) 1998 - 2011, 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#
b377e857 21#***************************************************************************
ae1912cb 22dnl Process this file with autoconf to produce a configure script.
7349940b 23
a147a079 24AC_PREREQ(2.57)
7349940b 25
380ed8be 26dnl We don't know the version number "statically" so we use a dash here
d0dea8f8 27AC_INIT([curl], [-], [a suitable curl mailing list: http://curl.haxx.se/mail/])
d5ba0309 28
3f01d9a0
YT
29CURL_OVERRIDE_AUTOCONF
30
d5ba0309 31dnl configure script copyright
8a26a8d8 32AC_COPYRIGHT([Copyright (c) 1998 - 2011 Daniel Stenberg, <daniel@haxx.se>
e16c1b8e 33This configure script may be copied, distributed and modified under the
d5ba0309
DS
34terms of the curl license; see COPYING for more details])
35
93c53424 36AC_CONFIG_SRCDIR([lib/urldata.h])
f671d051 37AM_CONFIG_HEADER(lib/curl_config.h src/curl_config.h include/curl/curlbuild.h)
4913a08c 38AC_CONFIG_MACRO_DIR([m4])
ed29552b 39AM_MAINTAINER_MODE
8f5ffd94 40
2245ac2f 41CURL_CHECK_OPTION_DEBUG
d930280a 42CURL_CHECK_OPTION_OPTIMIZE
2245ac2f 43CURL_CHECK_OPTION_WARNINGS
d6981cb5 44CURL_CHECK_OPTION_WERROR
065047dc 45CURL_CHECK_OPTION_CURLDEBUG
22ed0f50 46CURL_CHECK_OPTION_ARES
2245ac2f 47
f49427d3 48CURL_CHECK_PATH_SEPARATOR_REQUIRED
4e4b6de5 49
f7f76e17
CJ
50#
51# save the configure arguments
52#
53CONFIGURE_OPTIONS="\"$ac_configure_args\""
54AC_SUBST(CONFIGURE_OPTIONS)
55
d6981cb5 56CURL_CFLAG_EXTRAS=""
5393f08d 57if test X"$want_werror" = Xyes; then
d6981cb5
BG
58 CURL_CFLAG_EXTRAS="-Werror"
59fi
60AC_SUBST(CURL_CFLAG_EXTRAS)
61
0b57c475 62dnl SED is mandatory for configure process and libtool.
d2661cb4 63dnl Set it now, allowing it to be changed later.
241b704e
DS
64if test -z "$SED"; then
65 dnl allow it to be overridden
66 AC_PATH_PROG([SED], [sed], [not_found],
67 [$PATH:/usr/bin:/usr/local/bin])
68 if test -z "$SED" || test "$SED" = "not_found"; then
69 AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
70 fi
bfaab6ed 71fi
817efbc2 72AC_SUBST([SED])
075c5342 73
0b57c475 74dnl GREP is mandatory for configure process and libtool.
d2661cb4 75dnl Set it now, allowing it to be changed later.
241b704e
DS
76if test -z "$GREP"; then
77 dnl allow it to be overridden
78 AC_PATH_PROG([GREP], [grep], [not_found],
79 [$PATH:/usr/bin:/usr/local/bin])
80 if test -z "$GREP" || test "$GREP" = "not_found"; then
81 AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
82 fi
0b57c475 83fi
817efbc2 84AC_SUBST([GREP])
0b57c475
YT
85
86dnl EGREP is mandatory for configure process and libtool.
d2661cb4 87dnl Set it now, allowing it to be changed later.
241b704e
DS
88if test -z "$EGREP"; then
89 dnl allow it to be overridden
90 if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
91 AC_MSG_CHECKING([for egrep])
92 EGREP="$GREP -E"
93 AC_MSG_RESULT([$EGREP])
94 else
95 AC_PATH_PROG([EGREP], [egrep], [not_found],
96 [$PATH:/usr/bin:/usr/local/bin])
97 fi
3fc39a6e 98fi
0b57c475
YT
99if test -z "$EGREP" || test "$EGREP" = "not_found"; then
100 AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.])
101fi
817efbc2 102AC_SUBST([EGREP])
3fc39a6e 103
0b57c475 104dnl AR is mandatory for configure process and libtool.
21af9bf1 105dnl This is target dependent, so check it as a tool.
241b704e
DS
106if test -z "$AR"; then
107 dnl allow it to be overridden
108 AC_PATH_TOOL([AR], [ar], [not_found],
109 [$PATH:/usr/bin:/usr/local/bin])
110 if test -z "$AR" || test "$AR" = "not_found"; then
111 AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
112 fi
3fc39a6e 113fi
817efbc2 114AC_SUBST([AR])
0b57c475 115
faaaf626 116AC_SUBST(libext)
9f7c6341 117
f9e55c99
YT
118dnl Remove non-configure distributed curlbuild.h
119if test -f ${srcdir}/include/curl/curlbuild.h; then
120 rm -f ${srcdir}/include/curl/curlbuild.h
121fi
122
7349940b 123dnl figure out the libcurl version
0355e33b 124CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
511f491c 125AM_INIT_AUTOMAKE
075c5342 126AC_MSG_CHECKING([curl version])
0355e33b 127AC_MSG_RESULT($CURLVERSION)
caf8c01e 128
ee4c1206
DS
129AC_SUBST(CURLVERSION)
130
1e5e0f9a
DS
131dnl
132dnl we extract the numerical version for curl-config only
593170d1 133VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curlver.h`
1e5e0f9a
DS
134AC_SUBST(VERSIONNUM)
135
c503930b
CB
136dnl Solaris pkgadd support definitions
137PKGADD_PKG="HAXXcurl"
138PKGADD_NAME="cURL - a client that groks URLs"
139PKGADD_VENDOR="curl.haxx.se"
140AC_SUBST(PKGADD_PKG)
141AC_SUBST(PKGADD_NAME)
142AC_SUBST(PKGADD_VENDOR)
143
cff90cf3 144dnl
710e370c 145dnl initialize all the info variables
9e60d8fd 146 curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls} )"
2147284c 147 curl_ssh_msg="no (--with-libssh2)"
710e370c
DS
148 curl_zlib_msg="no (--with-zlib)"
149 curl_krb4_msg="no (--with-krb4*)"
150 curl_gss_msg="no (--with-gssapi)"
151 curl_spnego_msg="no (--with-spnego)"
59cf93cc 152curl_tls_srp_msg="no (--enable-tls-srp)"
79dc74e8 153 curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
710e370c
DS
154 curl_ipv6_msg="no (--enable-ipv6)"
155 curl_idn_msg="no (--with-libidn)"
156 curl_manual_msg="no (--enable-manual)"
157curl_verbose_msg="enabled (--disable-verbose)"
8ed31c48 158 curl_sspi_msg="no (--enable-sspi)"
d0edb478 159 curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
4b60c3e9 160 curl_ldaps_msg="no (--enable-ldaps)"
4a8a7314 161 curl_rtsp_msg="no (--enable-rtsp)"
04cb15ae 162 curl_rtmp_msg="no (--with-librtmp)"
108d7693 163 init_ssl_msg=${curl_ssl_msg}
c503930b 164
a0a47f27
DF
165dnl
166dnl Save anything in $LIBS for later
167dnl
168ALL_LIBS=$LIBS
169
caf8c01e
DS
170dnl
171dnl Detect the canonical host and target build environment
172dnl
ae1912cb 173
c77f77a1 174AC_CANONICAL_HOST
93c53424 175dnl Get system canonical name
22a32389 176AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
1b1f143c 177
93c53424 178dnl Checks for programs.
d930280a 179CURL_CHECK_PROG_CC
93c53424 180
14240e9e
YT
181dnl Our curl_off_t internal and external configure settings
182CURL_CONFIGURE_CURL_OFF_T
183
b4fdccf8
YT
184dnl This defines _ALL_SOURCE for AIX
185CURL_CHECK_AIX_ALL_SOURCE
186
1bc49007 187dnl Our configure and build reentrant settings
1cbc93fb 188CURL_CONFIGURE_THREAD_SAFE
052f9dde 189CURL_CONFIGURE_REENTRANT
1bc49007 190
d4ffc5ef 191dnl check for how to do large files
1b1f143c 192AC_SYS_LARGEFILE
d4ffc5ef 193
c84f84c7 194dnl support building of Windows DLLs
1e8f0c57
DS
195AC_LIBTOOL_WIN32_DLL
196
6cea5158
DF
197dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD
198AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)])
74befdfb 199case $host in
6cea5158 200 x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
74befdfb
YT
201 AC_MSG_RESULT([yes])
202 with_pic=yes
203 ;;
204 *)
205 AC_MSG_RESULT([no])
206 ;;
207esac
208
19f79e5a
YT
209AC_MSG_CHECKING([if compiler is icc (to build with PIC)])
210case $CC in
211 icc | */icc)
212 AC_MSG_RESULT([yes])
213 with_pic=yes
214 ;;
215 *)
216 AC_MSG_RESULT([no])
217 ;;
218esac
219
1e8f0c57 220dnl libtool setup
d20a0516 221AC_PROG_LIBTOOL
93c53424 222
fcfc6de9 223AC_MSG_CHECKING([if we need -mimpure-text])
5ab9d72e 224mimpure=no
fcfc6de9
DS
225case $host in
226 *-*-solaris2*)
227 if test "$GCC" = "yes"; then
228 mimpure="yes"
229 fi
230 ;;
231 *)
fcfc6de9
DS
232 ;;
233esac
234AC_MSG_RESULT($mimpure)
235AM_CONDITIONAL(MIMPURE, test x$mimpure = xyes)
157e6d4e
DS
236
237dnl 'STATICLIB' is, in spite of its name, not generic but only for static-only
238dnl builds on Windows
bff96239 239AM_CONDITIONAL(STATICLIB, false)
fcfc6de9 240
4d815c99
DS
241AC_MSG_CHECKING([if we need BUILDING_LIBCURL])
242case $host in
243 *-*-mingw*)
244 AC_DEFINE(BUILDING_LIBCURL, 1, [when building libcurl itself])
245 AC_MSG_RESULT(yes)
b29017f1 246 AC_MSG_CHECKING([if we need CURL_STATICLIB])
0bb04082
DS
247 if test "X$enable_shared" = "Xno"
248 then
249 AC_DEFINE(CURL_STATICLIB, 1, [when not building a shared library])
250 AC_MSG_RESULT(yes)
bff96239 251 AM_CONDITIONAL(STATICLIB, true)
b29017f1
DS
252 else
253 AC_MSG_RESULT(no)
0bb04082 254 fi
4d815c99
DS
255 ;;
256 *)
257 AC_MSG_RESULT(no)
258 ;;
259esac
260
9de4e5eb
DF
261# Determine whether all dependent libraries must be specified when linking
262if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno"
263then
264 REQUIRE_LIB_DEPS=no
265else
266 REQUIRE_LIB_DEPS=yes
267fi
268AC_SUBST(REQUIRE_LIB_DEPS)
269
d1a1fcc6
DS
270dnl The install stuff has already been taken care of by the automake stuff
271dnl AC_PROG_INSTALL
ae1912cb
DS
272AC_PROG_MAKE_SET
273
375cdf89
DS
274dnl check if there's a way to force code inline
275AC_C_INLINE
276
33ddeb6d
YT
277dnl **********************************************************************
278dnl platform/compiler/architecture specific checks/flags
279dnl **********************************************************************
280
2245ac2f 281CURL_CHECK_COMPILER
d930280a
YT
282CURL_SET_COMPILER_BASIC_OPTS
283CURL_SET_COMPILER_DEBUG_OPTS
284CURL_SET_COMPILER_OPTIMIZE_OPTS
285CURL_SET_COMPILER_WARNING_OPTS
9f8c40ed 286
19f79e5a 287if test "$compiler_id" = "INTEL_UNIX_C"; then
1054dc5e 288 #
19f79e5a
YT
289 if test "$compiler_num" -ge "1000"; then
290 dnl icc 10.X or later
291 CFLAGS="$CFLAGS -shared-intel"
292 elif test "$compiler_num" -ge "900"; then
293 dnl icc 9.X specific
294 CFLAGS="$CFLAGS -i-dynamic"
295 fi
1054dc5e 296 #
19f79e5a 297fi
9f8c40ed 298
2c61e9c7
YT
299CURL_CHECK_COMPILER_HALT_ON_ERROR
300CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
301
065047dc
YT
302CURL_CHECK_NO_UNDEFINED
303AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
304
305CURL_CHECK_CURLDEBUG
306AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
307
910d7953
YT
308dnl Build unit tests when option --enable-debug is given.
309AM_CONDITIONAL(BUILD_UNITTESTS, test x$want_debug = xyes)
aa76dec3 310
2c61e9c7
YT
311dnl **********************************************************************
312dnl Compilation based checks should not be done before this point.
313dnl **********************************************************************
314
315dnl **********************************************************************
316dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
317dnl and ws2tcpip.h take precedence over any other further checks which
318dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
319dnl this specific header files. And do them before its results are used.
320dnl **********************************************************************
321
322CURL_CHECK_HEADER_WINDOWS
323CURL_CHECK_NATIVE_WINDOWS
324case X-"$ac_cv_native_windows" in
325 X-yes)
326 CURL_CHECK_HEADER_WINSOCK
327 CURL_CHECK_HEADER_WINSOCK2
328 CURL_CHECK_HEADER_WS2TCPIP
329 CURL_CHECK_HEADER_WINLDAP
330 CURL_CHECK_HEADER_WINBER
331 ;;
332 *)
333 ac_cv_header_winsock_h="no"
334 ac_cv_header_winsock2_h="no"
335 ac_cv_header_ws2tcpip_h="no"
336 ac_cv_header_winldap_h="no"
337 ac_cv_header_winber_h="no"
338 ;;
339esac
fef60d9d 340CURL_CHECK_WIN32_LARGEFILE
2c61e9c7 341
fd3881ea
DS
342dnl ************************************************************
343dnl switch off particular protocols
344dnl
345AC_MSG_CHECKING([whether to support http])
346AC_ARG_ENABLE(http,
f136f435
DS
347AC_HELP_STRING([--enable-http],[Enable HTTP support])
348AC_HELP_STRING([--disable-http],[Disable HTTP support]),
fd3881ea
DS
349[ case "$enableval" in
350 no)
351 AC_MSG_RESULT(no)
22a32389 352 AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP])
4a8a7314 353 AC_MSG_WARN([disable HTTP disables FTP over proxy and RTSP])
3955b313 354 AC_SUBST(CURL_DISABLE_HTTP, [1])
4a8a7314
YT
355 AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
356 AC_SUBST(CURL_DISABLE_RTSP, [1])
fd3881ea
DS
357 ;;
358 *) AC_MSG_RESULT(yes)
359 ;;
360 esac ],
361 AC_MSG_RESULT(yes)
362)
363AC_MSG_CHECKING([whether to support ftp])
364AC_ARG_ENABLE(ftp,
f136f435
DS
365AC_HELP_STRING([--enable-ftp],[Enable FTP support])
366AC_HELP_STRING([--disable-ftp],[Disable FTP support]),
fd3881ea
DS
367[ case "$enableval" in
368 no)
369 AC_MSG_RESULT(no)
22a32389 370 AC_DEFINE(CURL_DISABLE_FTP, 1, [to disable FTP])
3955b313 371 AC_SUBST(CURL_DISABLE_FTP, [1])
fd3881ea
DS
372 ;;
373 *) AC_MSG_RESULT(yes)
374 ;;
375 esac ],
376 AC_MSG_RESULT(yes)
377)
fd3881ea
DS
378AC_MSG_CHECKING([whether to support file])
379AC_ARG_ENABLE(file,
f136f435
DS
380AC_HELP_STRING([--enable-file],[Enable FILE support])
381AC_HELP_STRING([--disable-file],[Disable FILE support]),
fd3881ea
DS
382[ case "$enableval" in
383 no)
384 AC_MSG_RESULT(no)
22a32389 385 AC_DEFINE(CURL_DISABLE_FILE, 1, [to disable FILE])
3955b313 386 AC_SUBST(CURL_DISABLE_FILE, [1])
fd3881ea
DS
387 ;;
388 *) AC_MSG_RESULT(yes)
389 ;;
390 esac ],
391 AC_MSG_RESULT(yes)
392)
393AC_MSG_CHECKING([whether to support ldap])
394AC_ARG_ENABLE(ldap,
f136f435
DS
395AC_HELP_STRING([--enable-ldap],[Enable LDAP support])
396AC_HELP_STRING([--disable-ldap],[Disable LDAP support]),
fd3881ea
DS
397[ case "$enableval" in
398 no)
399 AC_MSG_RESULT(no)
22a32389 400 AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
3955b313 401 AC_SUBST(CURL_DISABLE_LDAP, [1])
fd3881ea 402 ;;
a674654f 403 *)
43d20d81 404 AC_MSG_RESULT(yes)
fd3881ea 405 ;;
a674654f 406 esac ],[
43d20d81 407 AC_MSG_RESULT(yes) ]
fd3881ea 408)
4b60c3e9
GK
409AC_MSG_CHECKING([whether to support ldaps])
410AC_ARG_ENABLE(ldaps,
411AC_HELP_STRING([--enable-ldaps],[Enable LDAPS support])
412AC_HELP_STRING([--disable-ldaps],[Disable LDAPS support]),
413[ case "$enableval" in
414 no)
415 AC_MSG_RESULT(no)
416 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
417 AC_SUBST(CURL_DISABLE_LDAPS, [1])
418 ;;
e1c2c9be
YT
419 *) if test "x$CURL_DISABLE_LDAP" = "x1" ; then
420 AC_MSG_RESULT(LDAP needs to be enabled to support LDAPS)
421 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
422 AC_SUBST(CURL_DISABLE_LDAPS, [1])
4b60c3e9 423 else
e1c2c9be
YT
424 AC_MSG_RESULT(yes)
425 AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
426 AC_SUBST(HAVE_LDAP_SSL, [1])
4b60c3e9
GK
427 fi
428 ;;
e1c2c9be
YT
429 esac ],[
430 if test "x$CURL_DISABLE_LDAP" = "x1" ; then
431 AC_MSG_RESULT(no)
432 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
433 AC_SUBST(CURL_DISABLE_LDAPS, [1])
434 else
435 AC_MSG_RESULT(yes)
436 AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
437 AC_SUBST(HAVE_LDAP_SSL, [1])
e1c2c9be 438 fi ]
4b60c3e9
GK
439)
440
bc4582b6
DS
441AC_MSG_CHECKING([whether to support rtsp])
442AC_ARG_ENABLE(rtsp,
443AC_HELP_STRING([--enable-rtsp],[Enable RTSP support])
444AC_HELP_STRING([--disable-rtsp],[Disable RTSP support]),
445[ case "$enableval" in
446 no)
447 AC_MSG_RESULT(no)
448 AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
449 AC_SUBST(CURL_DISABLE_RTSP, [1])
450 ;;
c047fe8e
DS
451 *) if test x$CURL_DISABLE_HTTP = x1 ; then
452 AC_MSG_ERROR(HTTP support needs to be enabled in order to enable RTSP support!)
453 else
454 AC_MSG_RESULT(yes)
455 curl_rtsp_msg="enabled"
456 fi
bc4582b6 457 ;;
4a8a7314
YT
458 esac ],
459 if test "x$CURL_DISABLE_HTTP" != "x1"; then
460 AC_MSG_RESULT(yes)
461 curl_rtsp_msg="enabled"
462 else
463 AC_MSG_RESULT(no)
464 fi
bc4582b6
DS
465)
466
6f8d4397 467AC_MSG_CHECKING([whether to support proxies])
f3ab5d55
DS
468AC_ARG_ENABLE(proxy,
469AC_HELP_STRING([--enable-proxy],[Enable proxy support])
470AC_HELP_STRING([--disable-proxy],[Disable proxy support]),
471[ case "$enableval" in
472 no)
473 AC_MSG_RESULT(no)
474 AC_DEFINE(CURL_DISABLE_PROXY, 1, [to disable proxies])
475 AC_SUBST(CURL_DISABLE_PROXY, [1])
476 ;;
477 *) AC_MSG_RESULT(yes)
478 ;;
479 esac ],
480 AC_MSG_RESULT(yes)
481)
482
fd3881ea
DS
483AC_MSG_CHECKING([whether to support dict])
484AC_ARG_ENABLE(dict,
f136f435
DS
485AC_HELP_STRING([--enable-dict],[Enable DICT support])
486AC_HELP_STRING([--disable-dict],[Disable DICT support]),
fd3881ea
DS
487[ case "$enableval" in
488 no)
489 AC_MSG_RESULT(no)
b9c60df0 490 AC_DEFINE(CURL_DISABLE_DICT, 1, [to disable DICT])
3955b313 491 AC_SUBST(CURL_DISABLE_DICT, [1])
fd3881ea
DS
492 ;;
493 *) AC_MSG_RESULT(yes)
494 ;;
495 esac ],
496 AC_MSG_RESULT(yes)
497)
498AC_MSG_CHECKING([whether to support telnet])
499AC_ARG_ENABLE(telnet,
f136f435
DS
500AC_HELP_STRING([--enable-telnet],[Enable TELNET support])
501AC_HELP_STRING([--disable-telnet],[Disable TELNET support]),
fd3881ea
DS
502[ case "$enableval" in
503 no)
504 AC_MSG_RESULT(no)
22a32389 505 AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET])
3955b313 506 AC_SUBST(CURL_DISABLE_TELNET, [1])
fd3881ea
DS
507 ;;
508 *) AC_MSG_RESULT(yes)
509 ;;
510 esac ],
511 AC_MSG_RESULT(yes)
512)
56d9624b
DS
513AC_MSG_CHECKING([whether to support tftp])
514AC_ARG_ENABLE(tftp,
515AC_HELP_STRING([--enable-tftp],[Enable TFTP support])
516AC_HELP_STRING([--disable-tftp],[Disable TFTP support]),
517[ case "$enableval" in
518 no)
519 AC_MSG_RESULT(no)
520 AC_DEFINE(CURL_DISABLE_TFTP, 1, [to disable TFTP])
521 AC_SUBST(CURL_DISABLE_TFTP, [1])
522 ;;
523 *) AC_MSG_RESULT(yes)
524 ;;
525 esac ],
526 AC_MSG_RESULT(yes)
527)
fd3881ea 528
92b9b468
DS
529AC_MSG_CHECKING([whether to support pop3])
530AC_ARG_ENABLE(pop3,
531AC_HELP_STRING([--enable-pop3],[Enable POP3 support])
532AC_HELP_STRING([--disable-pop3],[Disable POP3 support]),
533[ case "$enableval" in
534 no)
535 AC_MSG_RESULT(no)
536 AC_DEFINE(CURL_DISABLE_POP3, 1, [to disable POP3])
537 AC_SUBST(CURL_DISABLE_POP3, [1])
538 ;;
539 *) AC_MSG_RESULT(yes)
540 ;;
541 esac ],
542 AC_MSG_RESULT(yes)
543)
544
545
546AC_MSG_CHECKING([whether to support imap])
547AC_ARG_ENABLE(imap,
548AC_HELP_STRING([--enable-imap],[Enable IMAP support])
549AC_HELP_STRING([--disable-imap],[Disable IMAP support]),
550[ case "$enableval" in
551 no)
552 AC_MSG_RESULT(no)
553 AC_DEFINE(CURL_DISABLE_IMAP, 1, [to disable IMAP])
554 AC_SUBST(CURL_DISABLE_IMAP, [1])
555 ;;
556 *) AC_MSG_RESULT(yes)
557 ;;
558 esac ],
559 AC_MSG_RESULT(yes)
560)
561
562
563AC_MSG_CHECKING([whether to support smtp])
564AC_ARG_ENABLE(smtp,
565AC_HELP_STRING([--enable-smtp],[Enable SMTP support])
566AC_HELP_STRING([--disable-smtp],[Disable SMTP support]),
567[ case "$enableval" in
568 no)
569 AC_MSG_RESULT(no)
570 AC_DEFINE(CURL_DISABLE_SMTP, 1, [to disable SMTP])
571 AC_SUBST(CURL_DISABLE_SMTP, [1])
572 ;;
573 *) AC_MSG_RESULT(yes)
574 ;;
575 esac ],
576 AC_MSG_RESULT(yes)
577)
578
201637d4
CK
579AC_MSG_CHECKING([whether to support gopher])
580AC_ARG_ENABLE(gopher,
581AC_HELP_STRING([--enable-gopher],[Enable Gopher support])
582AC_HELP_STRING([--disable-gopher],[Disable Gopher support]),
583[ case "$enableval" in
584 no)
585 AC_MSG_RESULT(no)
586 AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable Gopher])
587 AC_SUBST(CURL_DISABLE_GOPHER, [1])
588 ;;
589 *) AC_MSG_RESULT(yes)
590 ;;
591 esac ],
592 AC_MSG_RESULT(yes)
593)
594
92b9b468 595
f3663a9d
DS
596dnl **********************************************************************
597dnl Check for built-in manual
598dnl **********************************************************************
599
600AC_MSG_CHECKING([whether to provide built-in manual])
601AC_ARG_ENABLE(manual,
602AC_HELP_STRING([--enable-manual],[Enable built-in manual])
603AC_HELP_STRING([--disable-manual],[Disable built-in manual]),
604[ case "$enableval" in
605 no)
606 AC_MSG_RESULT(no)
607 ;;
608 *) AC_MSG_RESULT(yes)
609 USE_MANUAL="1"
610 ;;
611 esac ],
612 AC_MSG_RESULT(yes)
613 USE_MANUAL="1"
614)
615dnl The actual use of the USE_MANUAL variable is done much later in this
616dnl script to allow other actions to disable it as well.
617
ae1912cb
DS
618dnl **********************************************************************
619dnl Checks for libraries.
620dnl **********************************************************************
621
9b4253fe 622CURL_CHECK_LIB_XNET
c76e5382 623
9f2780a2
DS
624dnl gethostbyname without lib or in the nsl lib?
625AC_CHECK_FUNC(gethostbyname,
626 [HAVE_GETHOSTBYNAME="1"
627 ],
628 [ AC_CHECK_LIB(nsl, gethostbyname,
629 [HAVE_GETHOSTBYNAME="1"
630 LIBS="$LIBS -lnsl"
631 ])
632 ])
633
634if test "$HAVE_GETHOSTBYNAME" != "1"
635then
61fb8fea 636 dnl gethostbyname in the socket lib?
9f2780a2
DS
637 AC_CHECK_LIB(socket, gethostbyname,
638 [HAVE_GETHOSTBYNAME="1"
639 LIBS="$LIBS -lsocket"
640 ])
61fb8fea
DS
641fi
642
9f2780a2
DS
643dnl At least one system has been identified to require BOTH nsl and socket
644dnl libs at the same time to link properly.
645if test "$HAVE_GETHOSTBYNAME" != "1"
646then
af43ce73 647 AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs])
caf8c01e
DS
648 my_ac_save_LIBS=$LIBS
649 LIBS="-lnsl -lsocket $LIBS"
8ad1928d
YT
650 AC_LINK_IFELSE([
651 AC_LANG_PROGRAM([[
652 ]],[[
653 gethostbyname();
654 ]])
655 ],[
656 AC_MSG_RESULT([yes])
657 HAVE_GETHOSTBYNAME="1"
658 ],[
659 AC_MSG_RESULT([no])
660 LIBS=$my_ac_save_LIBS
661 ])
9f2780a2 662fi
caf8c01e 663
9f2780a2
DS
664if test "$HAVE_GETHOSTBYNAME" != "1"
665then
560a82ae
YT
666 dnl This is for winsock systems
667 if test "$ac_cv_header_windows_h" = "yes"; then
668 if test "$ac_cv_header_winsock_h" = "yes"; then
512b9ac1
YT
669 case $host in
670 *-*-mingw32ce*)
671 winsock_LIB="-lwinsock"
672 ;;
673 *)
674 winsock_LIB="-lwsock32"
675 ;;
676 esac
560a82ae
YT
677 fi
678 if test "$ac_cv_header_winsock2_h" = "yes"; then
679 winsock_LIB="-lws2_32"
680 fi
681 if test ! -z "$winsock_LIB"; then
682 my_ac_save_LIBS=$LIBS
683 LIBS="$winsock_LIB $LIBS"
684 AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
8ad1928d
YT
685 AC_LINK_IFELSE([
686 AC_LANG_PROGRAM([[
560a82ae
YT
687#ifdef HAVE_WINDOWS_H
688#ifndef WIN32_LEAN_AND_MEAN
689#define WIN32_LEAN_AND_MEAN
690#endif
691#include <windows.h>
692#ifdef HAVE_WINSOCK2_H
693#include <winsock2.h>
694#else
695#ifdef HAVE_WINSOCK_H
696#include <winsock.h>
697#endif
698#endif
699#endif
8ad1928d 700 ]],[[
560a82ae 701 gethostbyname("www.dummysite.com");
8ad1928d
YT
702 ]])
703 ],[
704 AC_MSG_RESULT([yes])
705 HAVE_GETHOSTBYNAME="1"
706 ],[
707 AC_MSG_RESULT([no])
708 winsock_LIB=""
709 LIBS=$my_ac_save_LIBS
560a82ae
YT
710 ])
711 fi
712 fi
684245d6
DF
713fi
714
0427e944
DF
715if test "$HAVE_GETHOSTBYNAME" != "1"
716then
717 dnl This is for Minix 3.1
718 AC_MSG_CHECKING([for gethostbyname for Minix 3])
8ad1928d
YT
719 AC_LINK_IFELSE([
720 AC_LANG_PROGRAM([[
0427e944 721/* Older Minix versions may need <net/gen/netdb.h> here instead */
8ad1928d
YT
722#include <netdb.h>
723 ]],[[
724 gethostbyname("www.dummysite.com");
725 ]])
726 ],[
727 AC_MSG_RESULT([yes])
728 HAVE_GETHOSTBYNAME="1"
729 ],[
730 AC_MSG_RESULT([no])
731 ])
0427e944
DF
732fi
733
684245d6
DF
734if test "$HAVE_GETHOSTBYNAME" != "1"
735then
736 dnl This is for eCos with a stubbed DNS implementation
737 AC_MSG_CHECKING([for gethostbyname for eCos])
8ad1928d
YT
738 AC_LINK_IFELSE([
739 AC_LANG_PROGRAM([[
684245d6 740#include <stdio.h>
8ad1928d
YT
741#include <netdb.h>
742 ]],[[
743 gethostbyname("www.dummysite.com");
744 ]])
745 ],[
746 AC_MSG_RESULT([yes])
747 HAVE_GETHOSTBYNAME="1"
748 ],[
749 AC_MSG_RESULT([no])
750 ])
9f2780a2
DS
751fi
752
b97606f0
DS
753if test "$HAVE_GETHOSTBYNAME" != "1"
754then
755 dnl gethostbyname in the network lib - for Haiku OS
756 AC_CHECK_LIB(network, gethostbyname,
757 [HAVE_GETHOSTBYNAME="1"
758 LIBS="$LIBS -lnetwork"
759 ])
760fi
761
58f4af79
DS
762if test "$HAVE_GETHOSTBYNAME" != "1"
763then
764 dnl gethostbyname in the net lib - for BeOS
765 AC_CHECK_LIB(net, gethostbyname,
766 [HAVE_GETHOSTBYNAME="1"
767 LIBS="$LIBS -lnet"
768 ])
769fi
770
771
9b12f096 772if test "$HAVE_GETHOSTBYNAME" != "1"; then
9f2780a2 773 AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
caf8c01e
DS
774fi
775
ae1912cb 776dnl resolve lib?
22a32389 777AC_CHECK_FUNC(strcasecmp, , [ AC_CHECK_LIB(resolve, strcasecmp) ])
ae1912cb 778
b174aeaa
DS
779if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
780 AC_CHECK_LIB(resolve, strcasecmp,
781 [LIBS="-lresolve $LIBS"],
782 ,
783 -lnsl)
784fi
4c621bc6 785ac_cv_func_strcasecmp="no"
b174aeaa 786
1ff4e900 787CURL_CHECK_LIBS_CONNECT
ae1912cb 788
50a1d5ee
YT
789CURL_NETWORK_LIBS=$LIBS
790
b380dd03 791dnl **********************************************************************
ed80eb5b
YT
792dnl In case that function clock_gettime with monotonic timer is available,
793dnl check for additional required libraries.
b380dd03 794dnl **********************************************************************
ed80eb5b 795CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
b380dd03 796
c461254d
DF
797dnl **********************************************************************
798dnl The preceding library checks are all potentially useful for test
799dnl servers (for providing networking support). Save the list of required
800dnl libraries at this point for use while linking those test servers.
801dnl **********************************************************************
802TEST_SERVER_LIBS=$LIBS
ae1912cb 803
c461254d 804dnl **********************************************************************
075c5342
DS
805AC_MSG_CHECKING([whether to use libgcc])
806AC_ARG_ENABLE(libgcc,
807AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
808[ case "$enableval" in
809 yes)
a0a47f27 810 ALL_LIBS="$ALL_LIBS -lgcc"
075c5342
DS
811 AC_MSG_RESULT(yes)
812 ;;
813 *) AC_MSG_RESULT(no)
814 ;;
815 esac ],
816 AC_MSG_RESULT(no)
817)
818
3ec605de 819dnl **********************************************************************
d0edb478 820dnl Check for LDAP
205f8b26
DF
821dnl **********************************************************************
822
823LDAPLIBNAME=""
824AC_ARG_WITH(ldap-lib,
d0edb478 825AC_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]),
205f8b26
DF
826 [LDAPLIBNAME="$withval"])
827
828LBERLIBNAME=""
829AC_ARG_WITH(lber-lib,
d0edb478 830AC_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]),
205f8b26
DF
831 [LBERLIBNAME="$withval"])
832
833if test x$CURL_DISABLE_LDAP != x1 ; then
834
a171f60b
YT
835 CURL_CHECK_HEADER_LBER
836 CURL_CHECK_HEADER_LDAP
837 CURL_CHECK_HEADER_LDAPSSL
838 CURL_CHECK_HEADER_LDAP_SSL
3337be81 839
205f8b26 840 if test -z "$LDAPLIBNAME" ; then
43d20d81
YT
841 if test "$ac_cv_native_windows" = "yes"; then
842 dnl Windows uses a single and unique LDAP library name
843 LDAPLIBNAME="wldap32"
844 LBERLIBNAME="no"
845 fi
205f8b26
DF
846 fi
847
848 if test "$LDAPLIBNAME" ; then
d0edb478
DS
849 AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [
850 AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled])
851 AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
852 AC_SUBST(CURL_DISABLE_LDAP, [1])])
c37cdbe2
DF
853 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
854 AC_SUBST(CURL_DISABLE_LDAPS, [1])
205f8b26 855 else
4db954f8
YT
856 dnl Try to find the right ldap libraries for this system
857 CURL_CHECK_LIBS_LDAP
858 case X-"$curl_cv_ldap_LIBS" in
859 X-unknown)
860 AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled])
861 AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
862 AC_SUBST(CURL_DISABLE_LDAP, [1])
c37cdbe2
DF
863 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
864 AC_SUBST(CURL_DISABLE_LDAPS, [1])
4db954f8
YT
865 ;;
866 esac
205f8b26 867 fi
d0edb478
DS
868fi
869
870if test x$CURL_DISABLE_LDAP != x1 ; then
205f8b26
DF
871
872 if test "$LBERLIBNAME" ; then
d0edb478 873 dnl If name is "no" then don't define this library at all
205f8b26 874 dnl (it's only needed if libldap.so's dependencies are broken).
e16c1b8e 875 if test "$LBERLIBNAME" != "no" ; then
d0edb478
DS
876 AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [
877 AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled])
878 AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
879 AC_SUBST(CURL_DISABLE_LDAP, [1])])
c37cdbe2
DF
880 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
881 AC_SUBST(CURL_DISABLE_LDAPS, [1])
205f8b26 882 fi
d0edb478
DS
883 fi
884fi
885
886if test x$CURL_DISABLE_LDAP != x1 ; then
2e056353 887 AC_CHECK_FUNCS([ldap_url_parse ldap_init_fd])
d0edb478
DS
888
889 if test "$LDAPLIBNAME" = "wldap32"; then
4b60c3e9 890 curl_ldap_msg="enabled (winldap)"
43d20d81 891 AC_DEFINE(CURL_LDAP_WIN, 1, [Use Windows LDAP implementation])
d0edb478 892 else
4b60c3e9 893 curl_ldap_msg="enabled (OpenLDAP)"
e1c2c9be 894 if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
2e056353 895 AC_DEFINE(USE_OPENLDAP, 1, [Use OpenLDAP-specific code])
b1c1b9bb 896 AC_SUBST(USE_OPENLDAP, [1])
2e056353 897 fi
205f8b26
DF
898 fi
899fi
900
e4128f90
JC
901if test x$CURL_DISABLE_LDAPS != x1 ; then
902 curl_ldaps_msg="enabled"
903fi
904
d1b17779
DS
905dnl **********************************************************************
906dnl Checks for IPv6
907dnl **********************************************************************
908
909AC_MSG_CHECKING([whether to enable ipv6])
910AC_ARG_ENABLE(ipv6,
911AC_HELP_STRING([--enable-ipv6],[Enable ipv6 (with ipv4) support])
912AC_HELP_STRING([--disable-ipv6],[Disable ipv6 support]),
913[ case "$enableval" in
914 no)
915 AC_MSG_RESULT(no)
916 ipv6=no
917 ;;
918 *) AC_MSG_RESULT(yes)
919 ipv6=yes
920 ;;
921 esac ],
922
923 AC_TRY_RUN([ /* is AF_INET6 available? */
924#include <sys/types.h>
925#include <sys/socket.h>
926main()
927{
928 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
929 exit(1);
930 else
931 exit(0);
932}
933],
934 AC_MSG_RESULT(yes)
935 ipv6=yes,
936 AC_MSG_RESULT(no)
937 ipv6=no,
938 AC_MSG_RESULT(no)
939 ipv6=no
940))
941
942if test "$ipv6" = "yes"; then
cff90cf3 943 curl_ipv6_msg="enabled"
d1b17779
DS
944fi
945
6efde612
GK
946# Check if struct sockaddr_in6 have sin6_scope_id member
947if test "$ipv6" = yes; then
948 AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
949 AC_TRY_COMPILE([
950#include <sys/types.h>
951#include <netinet/in.h>] ,
952 struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes)
953 if test "$have_sin6_scope_id" = yes; then
1cc50d31
GK
954 AC_MSG_RESULT([yes])
955 AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member])
6efde612 956 else
1cc50d31 957 AC_MSG_RESULT([no])
6efde612
GK
958 fi
959fi
960
7f67a28c
DS
961dnl **********************************************************************
962dnl Check if the operating system allows programs to write to their own argv[]
963dnl **********************************************************************
964
965AC_MSG_CHECKING([if argv can be written to])
465865c3
YT
966AC_RUN_IFELSE([
967 AC_LANG_SOURCE([[
7f67a28c 968int main(int argc, char ** argv) {
465865c3
YT
969 argv[0][0] = ' ';
970 return (argv[0][0] == ' ')?0:1;
7f67a28c 971}
465865c3
YT
972 ]])
973],[
974 curl_cv_writable_argv=yes
975],[
976 curl_cv_writable_argv=no
977],[
978 curl_cv_writable_argv=cross
0717e469
DS
979])
980case $curl_cv_writable_argv in
981yes)
77431568
GK
982 AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv])
983 AC_MSG_RESULT(yes)
984 ;;
0717e469 985no)
77431568
GK
986 AC_MSG_RESULT(no)
987 ;;
0717e469 988*)
a139ce90
DS
989 AC_MSG_RESULT(no)
990 AC_MSG_WARN([the previous check could not be made default was used])
77431568 991 ;;
0717e469 992esac
7f67a28c 993
00505c92
DS
994dnl **********************************************************************
995dnl Check for the presence of Kerberos4 libraries and headers
996dnl **********************************************************************
997
998AC_ARG_WITH(krb4-includes,
f136f435
DS
999AC_HELP_STRING([--with-krb4-includes=DIR],
1000 [Specify location of kerberos4 headers]),[
00505c92
DS
1001 CPPFLAGS="$CPPFLAGS -I$withval"
1002 KRB4INC="$withval"
1003 want_krb4=yes
1004 ])
1005
1006AC_ARG_WITH(krb4-libs,
f136f435 1007AC_HELP_STRING([--with-krb4-libs=DIR],[Specify location of kerberos4 libs]),[
00505c92
DS
1008 LDFLAGS="$LDFLAGS -L$withval"
1009 KRB4LIB="$withval"
1010 want_krb4=yes
1011 ])
1012
1013
1014OPT_KRB4=off
1015AC_ARG_WITH(krb4,dnl
f136f435 1016AC_HELP_STRING([--with-krb4=DIR],[where to look for Kerberos4]),[
00505c92 1017 OPT_KRB4="$withval"
5872e8dd
DF
1018 if test X"$OPT_KRB4" != Xno; then
1019 want_krb4="yes"
1020 if test X"$OPT_KRB4" != Xyes; then
1021 LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib$libsuff"
1022 KRB4LIB="$OPT_KRB4/lib$libsuff"
1023 CPPFLAGS="$CPPFLAGS -I$OPT_KRB4/include"
1024 KRB4INC="$OPT_KRB4/include"
1025 fi
00505c92 1026 fi
00505c92
DS
1027 ])
1028
1029AC_MSG_CHECKING([if Kerberos4 support is requested])
1030
1031if test "$want_krb4" = yes
1032then
f6e2bfd4
DS
1033 if test "$ipv6" = "yes"; then
1034 echo krb4 is not compatible with IPv6
1035 exit 1
1036 fi
00505c92
DS
1037 AC_MSG_RESULT(yes)
1038
1039 dnl Check for & handle argument to --with-krb4
1040
1041 AC_MSG_CHECKING(where to look for Kerberos4)
1042 if test X"$OPT_KRB4" = Xyes
1043 then
1044 AC_MSG_RESULT([defaults])
1045 else
1046 AC_MSG_RESULT([libs in $KRB4LIB, headers in $KRB4INC])
1047 fi
1048
1049 dnl Check for DES library
1050 AC_CHECK_LIB(des, des_pcbc_encrypt,
1051 [
1052 AC_CHECK_HEADERS(des.h)
1053
1054 dnl resolv lib?
22a32389 1055 AC_CHECK_FUNC(res_search, , [AC_CHECK_LIB(resolv, res_search)])
00505c92
DS
1056
1057 dnl Check for the Kerberos4 library
1058 AC_CHECK_LIB(krb, krb_net_read,
1059 [
1060 dnl Check for header files
1061 AC_CHECK_HEADERS(krb.h)
1062
1063 dnl we found the required libraries, add to LIBS
b55507c8 1064 LIBS="-lkrb -lcom_err -ldes $LIBS"
00505c92
DS
1065
1066 dnl Check for function krb_get_our_ip_for_realm
1067 dnl this is needed for NAT networks
1068 AC_CHECK_FUNCS(krb_get_our_ip_for_realm)
1069
1070 dnl add define KRB4
d4629fd3 1071 AC_DEFINE(HAVE_KRB4, 1,
22a32389 1072 [if you have the Kerberos4 libraries (including -ldes)])
00505c92 1073
1ee7f92c
DS
1074 dnl substitute it too!
1075 KRB4_ENABLED=1
1076 AC_SUBST(KRB4_ENABLED)
1077
cff90cf3
DS
1078 curl_krb4_msg="enabled"
1079
00505c92
DS
1080 dnl the krb4 stuff needs a strlcpy()
1081 AC_CHECK_FUNCS(strlcpy)
1082
1083 ])
1084 ])
1085else
1086 AC_MSG_RESULT(no)
1087fi
1088
09ccfcdc
DS
1089dnl **********************************************************************
1090dnl Check for FBopenssl(SPNEGO) libraries
1091dnl **********************************************************************
1092
1093AC_ARG_WITH(spnego,
1094 AC_HELP_STRING([--with-spnego=DIR],
5872e8dd
DF
1095 [Specify location of SPNEGO library fbopenssl]), [
1096 SPNEGO_ROOT="$withval"
1097 if test x"$SPNEGO_ROOT" != xno; then
1098 want_spnego="yes"
1099 fi
1100])
1101
09ccfcdc
DS
1102AC_MSG_CHECKING([if SPNEGO support is requested])
1103if test x"$want_spnego" = xyes; then
f6413f2c
DS
1104
1105 if test X"$SPNEGO_ROOT" = Xyes; then
1106 AC_MSG_ERROR([FBOpenSSL libs and/or directories were not found where specified!])
1107 AC_MSG_RESULT(no)
09ccfcdc 1108 else
f6413f2c 1109 if test -z "$SPNEGO_LIB_DIR"; then
202e54cf 1110 LDFLAGS="$LDFLAGS -L$SPNEGO_ROOT -lfbopenssl"
f6413f2c
DS
1111 else
1112 LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR"
1113 fi
e16c1b8e 1114
f6413f2c 1115 AC_MSG_RESULT(yes)
cff90cf3
DS
1116 AC_DEFINE(HAVE_SPNEGO, 1,
1117 [Define this if you have the SPNEGO library fbopenssl])
1118 curl_spnego_msg="enabled"
f6413f2c 1119 fi
09ccfcdc
DS
1120else
1121 AC_MSG_RESULT(no)
1122fi
1123
e56ae142
DS
1124dnl **********************************************************************
1125dnl Check for GSS-API libraries
1126dnl **********************************************************************
1127
c1b734a3
DS
1128dnl check for gss stuff in the /usr as default
1129
1130GSSAPI_ROOT="/usr"
e56ae142
DS
1131AC_ARG_WITH(gssapi-includes,
1132 AC_HELP_STRING([--with-gssapi-includes=DIR],
1133 [Specify location of GSSAPI header]),
e16c1b8e 1134 [ GSSAPI_INCS="-I$withval"
e56ae142
DS
1135 want_gss="yes" ]
1136)
1137
1138AC_ARG_WITH(gssapi-libs,
1139 AC_HELP_STRING([--with-gssapi-libs=DIR],
77431568 1140 [Specify location of GSSAPI libs]),
2723eda1 1141 [ GSSAPI_LIB_DIR="-L$withval"
e56ae142
DS
1142 want_gss="yes" ]
1143)
1144
1145AC_ARG_WITH(gssapi,
1146 AC_HELP_STRING([--with-gssapi=DIR],
5872e8dd
DF
1147 [Where to look for GSSAPI]), [
1148 GSSAPI_ROOT="$withval"
1149 if test x"$GSSAPI_ROOT" != xno; then
e16c1b8e 1150 want_gss="yes"
c1b734a3
DS
1151 if test x"$GSSAPI_ROOT" = xyes; then
1152 dnl if yes, then use default root
1153 GSSAPI_ROOT="/usr"
1154 fi
5872e8dd
DF
1155 fi
1156])
e56ae142 1157
982ba214 1158save_CPPFLAGS="$CPPFLAGS"
e56ae142
DS
1159AC_MSG_CHECKING([if GSSAPI support is requested])
1160if test x"$want_gss" = xyes; then
5effe8f3
DS
1161 AC_MSG_RESULT(yes)
1162
e56ae142
DS
1163 if test -z "$GSSAPI_INCS"; then
1164 if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
f4046763 1165 GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi`
49111a63 1166 elif test "$GSSAPI_ROOT" != "yes"; then
533519cc 1167 GSSAPI_INCS="-I$GSSAPI_ROOT/include"
e56ae142 1168 fi
e56ae142 1169 fi
c1b734a3 1170
f4046763 1171 CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
5effe8f3
DS
1172
1173 AC_CHECK_HEADER(gss.h,
1174 [
1175 dnl found in the given dirs
1176 AC_DEFINE(HAVE_GSSGNU, 1, [if you have the GNU gssapi libraries])
1177 gnu_gss=yes
1178 ],
1179 [
d0a4b50e 1180 dnl not found, check Heimdal or MIT
cca192e5 1181 AC_CHECK_HEADERS([gssapi/gssapi.h], [], [not_mit=1])
d0a4b50e 1182 AC_CHECK_HEADERS(
cca192e5 1183 [gssapi/gssapi_generic.h gssapi/gssapi_krb5.h],
d0a4b50e 1184 [],
cca192e5
PH
1185 [not_mit=1],
1186 [
1187AC_INCLUDES_DEFAULT
1188#ifdef HAVE_GSSAPI_GSSAPI_H
1189#include <gssapi/gssapi.h>
1190#endif
1191 ])
d0a4b50e
MM
1192 if test "x$not_mit" = "x1"; then
1193 dnl MIT not found, check for Heimdal
1194 AC_CHECK_HEADER(gssapi.h,
5effe8f3 1195 [
e16c1b8e 1196 dnl found
40e1a016 1197 AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries])
5effe8f3
DS
1198 ],
1199 [
1200 dnl no header found, disabling GSS
1201 want_gss=no
1202 AC_MSG_WARN(disabling GSSAPI since no header files was found)
1203 ]
1204 )
d0a4b50e
MM
1205 else
1206 dnl MIT found
1207 AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries])
1208 dnl check if we have a really old MIT kerberos (<= 1.2)
1209 AC_MSG_CHECKING([if gssapi headers declare GSS_C_NT_HOSTBASED_SERVICE])
7ad3abfd
YT
1210 AC_COMPILE_IFELSE([
1211 AC_LANG_PROGRAM([[
d0a4b50e
MM
1212#include <gssapi/gssapi.h>
1213#include <gssapi/gssapi_generic.h>
1214#include <gssapi/gssapi_krb5.h>
7ad3abfd 1215 ]],[[
d0a4b50e
MM
1216 gss_import_name(
1217 (OM_uint32 *)0,
1218 (gss_buffer_t)0,
1219 GSS_C_NT_HOSTBASED_SERVICE,
1220 (gss_name_t *)0);
7ad3abfd
YT
1221 ]])
1222 ],[
1223 AC_MSG_RESULT([yes])
1224 ],[
1225 AC_MSG_RESULT([no])
1226 AC_DEFINE(HAVE_OLD_GSSMIT, 1,
1227 [if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE])
1228 ])
d0a4b50e 1229 fi
5effe8f3
DS
1230 ]
1231 )
1232else
1233 AC_MSG_RESULT(no)
1234fi
1235if test x"$want_gss" = xyes; then
1236 AC_DEFINE(HAVE_GSSAPI, 1, [if you have the gssapi libraries])
1237
1238 curl_gss_msg="enabled (MIT/Heimdal)"
1239
1240 if test -n "$gnu_gss"; then
1241 curl_gss_msg="enabled (GNU GSS)"
9bb51d76
MM
1242 LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
1243 LIBS="$LIBS -lgss"
5effe8f3 1244 elif test -z "$GSSAPI_LIB_DIR"; then
013d5a72
DS
1245 case $host in
1246 *-*-darwin*)
1247 LIBS="$LIBS -lgssapi_krb5 -lresolv"
1248 ;;
1249 *)
1250 if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
1251 dnl krb5-config doesn't have --libs-only-L or similar, put everything
1252 dnl into LIBS
1253 gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
1254 LIBS="$LIBS $gss_libs"
1255 elif test "$GSSAPI_ROOT" != "yes"; then
1256 LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
1257 LIBS="$LIBS -lgssapi"
1258 else
1259 LIBS="$LIBS -lgssapi"
1260 fi
1261 ;;
1262 esac
e56ae142 1263 else
9bb51d76
MM
1264 LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
1265 LIBS="$LIBS -lgssapi"
e56ae142 1266 fi
e56ae142 1267else
5effe8f3 1268 CPPFLAGS="$save_CPPFLAGS"
e56ae142 1269fi
e16c1b8e 1270
ae1912cb
DS
1271dnl **********************************************************************
1272dnl Check for the presence of SSL libraries and headers
1273dnl **********************************************************************
1274
1275dnl Default to compiler & linker defaults for SSL files & libraries.
1276OPT_SSL=off
2c2baa93
DS
1277dnl Default to no CA bundle
1278ca="no"
ae1912cb 1279AC_ARG_WITH(ssl,dnl
d7a29388 1280AC_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 1281AC_HELP_STRING([--without-ssl], [disable OpenSSL]),
e890113f 1282 OPT_SSL=$withval)
ae1912cb 1283
bebd5dbc 1284if test X"$OPT_SSL" != Xno; then
6bd02a3a 1285 dnl backup the pre-ssl variables
4ac7a087
DS
1286 CLEANLDFLAGS="$LDFLAGS"
1287 CLEANCPPFLAGS="$CPPFLAGS"
6bd02a3a
DS
1288 CLEANLIBS="$LIBS"
1289
4836154c
DS
1290 case "$OPT_SSL" in
1291 yes)
75e5967a 1292 dnl --with-ssl (without path) used
736a40fe
DS
1293 if test x$cross_compiling != xyes; then
1294 dnl only do pkg-config magic when not cross-compiling
1295 PKGTEST="yes"
1296 fi
4370e92d
DS
1297 PREFIX_OPENSSL=/usr/local/ssl
1298 LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
1299 ;;
4398151f 1300 off)
75e5967a 1301 dnl no --with-ssl option given, just check default places
736a40fe
DS
1302 if test x$cross_compiling != xyes; then
1303 dnl only do pkg-config magic when not cross-compiling
1304 PKGTEST="yes"
1305 fi
4370e92d
DS
1306 PREFIX_OPENSSL=
1307 ;;
4836154c 1308 *)
75e5967a
DS
1309 dnl check the given --with-ssl spot
1310 PKGTEST="no"
4370e92d 1311 PREFIX_OPENSSL=$OPT_SSL
530fde3a
KD
1312
1313 dnl Try pkg-config even when cross-compiling. Since we
1314 dnl specify PKG_CONFIG_LIBDIR we're only looking where
1315 dnl the user told us to look
383bf1e4
KD
1316 OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
1317 AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
1318 if test -e "$OPENSSL_PCDIR/openssl.pc"; then
530fde3a
KD
1319 PKGTEST="yes"
1320 fi
1321
1322 dnl in case pkg-config comes up empty, use what we got
1323 dnl via --with-ssl
4370e92d 1324 LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
b98e0aa0 1325 if test "$PREFIX_OPENSSL" != "/usr" ; then
530fde3a
KD
1326 SSL_LDFLAGS="-L$LIB_OPENSSL"
1327 SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
4b441eba 1328 fi
530fde3a 1329 SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
4ac7a087 1330 ;;
4836154c
DS
1331 esac
1332
75e5967a
DS
1333 if test "$PKGTEST" = "yes"; then
1334
383bf1e4 1335 CURL_CHECK_PKGCONFIG(openssl, [$OPENSSL_PCDIR])
75e5967a 1336
75e5967a 1337 if test "$PKGCONFIG" != "no" ; then
383bf1e4
KD
1338 SSL_LIBS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
1339 $PKGCONFIG --libs-only-l openssl 2>/dev/null`
1340
1341 SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
1342 $PKGCONFIG --libs-only-L openssl 2>/dev/null`
1343
1344 SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
1345 $PKGCONFIG --cflags-only-I openssl 2>/dev/null`
75e5967a 1346
530fde3a
KD
1347 AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
1348 AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
1349 AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])
1350
b9fdc0c2 1351 LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
75e5967a 1352
530fde3a
KD
1353 dnl use the values pkg-config reported. This is here
1354 dnl instead of below with CPPFLAGS and LDFLAGS because we only
1355 dnl learn about this via pkg-config. If we only have
1356 dnl the argument to --with-ssl we don't know what
1357 dnl additional libs may be necessary. Hope that we
1358 dnl don't need any.
b9fdc0c2 1359 LIBS="$LIBS $SSL_LIBS"
75e5967a
DS
1360 fi
1361 fi
1362
530fde3a
KD
1363 dnl finally, set flags to use SSL
1364 CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
1365 LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
1366
6abbbaad
YT
1367 dnl This is for Msys/Mingw
1368 case $host in
1369 *-*-msys* | *-*-mingw*)
1370 AC_MSG_CHECKING([for gdi32])
1371 my_ac_save_LIBS=$LIBS
1372 LIBS="-lgdi32 $LIBS"
1373 AC_TRY_LINK([#include <windef.h>
1374 #include <wingdi.h>],
1375 [GdiFlush();],
1376 [ dnl worked!
1377 AC_MSG_RESULT([yes])],
1378 [ dnl failed, restore LIBS
1379 LIBS=$my_ac_save_LIBS
1380 AC_MSG_RESULT(no)]
1381 )
1382 ;;
1383 esac
1384
4836154c
DS
1385 AC_CHECK_LIB(crypto, CRYPTO_lock,[
1386 HAVECRYPTO="yes"
c4f7570a 1387 LIBS="-lcrypto $LIBS"
4836154c 1388 ],[
4370e92d
DS
1389 LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
1390 CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
4836154c 1391 AC_CHECK_LIB(crypto, CRYPTO_add_lock,[
c4f7570a
DF
1392 HAVECRYPTO="yes"
1393 LIBS="-lcrypto $LIBS"], [
6bd02a3a
DS
1394 LDFLAGS="$CLEANLDFLAGS"
1395 CPPFLAGS="$CLEANCPPFLAGS"
1396 LIBS="$CLEANLIBS"
4836154c
DS
1397 ])
1398 ])
ae1912cb 1399
ae1912cb 1400
21337f47 1401 if test X"$HAVECRYPTO" = X"yes"; then
ae1912cb
DS
1402 dnl This is only reasonable to do if crypto actually is there: check for
1403 dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
4836154c 1404
ae1912cb
DS
1405 AC_CHECK_LIB(ssl, SSL_connect)
1406
b32bf427
DS
1407 if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
1408 dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff
1409 AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use);
1410 OLIBS=$LIBS
1411 LIBS="$LIBS -lRSAglue -lrsaref"
1412 AC_CHECK_LIB(ssl, SSL_connect)
1413 if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
1414 dnl still no SSL_connect
1415 AC_MSG_RESULT(no)
1416 LIBS=$OLIBS
1417 else
1418 AC_MSG_RESULT(yes)
1419 fi
b32bf427 1420
df3ca591 1421 else
b32bf427 1422
df3ca591
DS
1423 dnl Have the libraries--check for SSLeay/OpenSSL headers
1424 AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
1425 openssl/pem.h openssl/ssl.h openssl/err.h,
bebd5dbc 1426 curl_ssl_msg="enabled (OpenSSL)"
df3ca591
DS
1427 OPENSSL_ENABLED=1
1428 AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use]))
1429
1430 if test $ac_cv_header_openssl_x509_h = no; then
d99c20f6
DS
1431 dnl we don't use the "action" part of the AC_CHECK_HEADERS macro
1432 dnl since 'err.h' might in fact find a krb4 header with the same
1433 dnl name
1434 AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h)
1435
e16c1b8e 1436 if test $ac_cv_header_x509_h = yes &&
d99c20f6
DS
1437 test $ac_cv_header_crypto_h = yes &&
1438 test $ac_cv_header_ssl_h = yes; then
1439 dnl three matches
bebd5dbc 1440 curl_ssl_msg="enabled (OpenSSL)"
d99c20f6
DS
1441 OPENSSL_ENABLED=1
1442 fi
df3ca591
DS
1443 fi
1444 fi
1445
f966dad3
DS
1446 if test X"$OPENSSL_ENABLED" = X"1"; then
1447 AC_DEFINE(USE_SSLEAY, 1, [if SSL is enabled])
090a7f38
DS
1448
1449 dnl is there a pkcs12.h header present?
1450 AC_CHECK_HEADERS(openssl/pkcs12.h)
c4f7570a
DF
1451 else
1452 LIBS="$CLEANLIBS"
f966dad3 1453 fi
c4f7570a
DF
1454 dnl USE_SSLEAY is the historical name for what configure calls
1455 dnl OPENSSL_ENABLED; the names should really be unified
df3ca591 1456 USE_SSLEAY="$OPENSSL_ENABLED"
df3ca591 1457 AC_SUBST(USE_SSLEAY)
df3ca591
DS
1458
1459 if test X"$OPT_SSL" != Xoff &&
1460 test "$OPENSSL_ENABLED" != "1"; then
1461 AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!])
1ee7f92c 1462 fi
df3ca591
DS
1463 fi
1464
df3ca591 1465 if test X"$OPENSSL_ENABLED" = X"1"; then
e157aabd 1466 dnl If the ENGINE library seems to be around, check for the OpenSSL engine
f169b750
DS
1467 dnl stuff, it is kind of "separated" from the main SSL check
1468 AC_CHECK_FUNC(ENGINE_init,
1469 [
1470 AC_CHECK_HEADERS(openssl/engine.h)
1471 AC_CHECK_FUNCS( ENGINE_load_builtin_engines )
1472 ])
af6c3947 1473
2c2baa93 1474 dnl these can only exist if openssl exists
d052e545 1475 dnl yassl doesn't have SSL_get_shutdown
2c2baa93
DS
1476
1477 AC_CHECK_FUNCS( RAND_status \
1478 RAND_screen \
e16bc916 1479 RAND_egd \
10a11e3a 1480 ENGINE_cleanup \
d052e545
DS
1481 CRYPTO_cleanup_all_ex_data \
1482 SSL_get_shutdown )
1483
1484 dnl Make an attempt to detect if this is actually yassl's headers and
1485 dnl OpenSSL emulation layer. We still leave everything else believing
1486 dnl and acting like OpenSSL.
2c2baa93 1487
248f0571 1488 AC_MSG_CHECKING([for yaSSL using OpenSSL compatibility mode])
8ad1928d
YT
1489 AC_COMPILE_IFELSE([
1490 AC_LANG_PROGRAM([[
d052e545 1491#include <openssl/ssl.h>
8ad1928d 1492 ]],[[
248f0571
YT
1493#if defined(YASSL_VERSION) && defined(OPENSSL_VERSION_NUMBER)
1494 int dummy = SSL_ERROR_NONE;
1495#else
1496 Not the yaSSL OpenSSL compatibility header.
1497#endif
8ad1928d
YT
1498 ]])
1499 ],[
1500 AC_MSG_RESULT([yes])
1501 AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1,
1502 [Define to 1 if using yaSSL in OpenSSL compatibility mode.])
1503 curl_ssl_msg="enabled (OpenSSL emulation by yaSSL)"
1504 ],[
1505 AC_MSG_RESULT([no])
248f0571 1506 ])
ae1912cb 1507 fi
00505c92 1508
df3ca591 1509 if test "$OPENSSL_ENABLED" = "1"; then
8882d1fa
DS
1510 if test -n "$LIB_OPENSSL"; then
1511 dnl when the ssl shared libs were found in a path that the run-time
1512 dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
1513 dnl to prevent further configure tests to fail due to this
1514
1515 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
1516 export LD_LIBRARY_PATH
1517 AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
1518 fi
1ee7f92c
DS
1519 fi
1520
ae1912cb
DS
1521fi
1522
c518c52a
DS
1523dnl **********************************************************************
1524dnl Check for the presence of ZLIB libraries and headers
1525dnl **********************************************************************
1526
1527dnl Check for & handle argument to --with-zlib.
1528
1529_cppflags=$CPPFLAGS
1530_ldflags=$LDFLAGS
1531AC_ARG_WITH(zlib,
1532AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
1533AC_HELP_STRING([--without-zlib],[disable use of zlib]),
1534 [OPT_ZLIB="$withval"])
1535
1536if test "$OPT_ZLIB" = "no" ; then
1537 AC_MSG_WARN([zlib disabled])
1538else
1539 if test "$OPT_ZLIB" = "yes" ; then
1540 OPT_ZLIB=""
1541 fi
1542
1543 if test -z "$OPT_ZLIB" ; then
1544 dnl check for the lib first without setting any new path, since many
1545 dnl people have it in the default path
1546
1547 AC_CHECK_LIB(z, inflateEnd,
1548 dnl libz found, set the variable
1549 [HAVE_LIBZ="1"],
1550 dnl if no lib found, try /usr/local
1551 [OPT_ZLIB="/usr/local"])
1552
1553 fi
1554
1555 dnl Add a nonempty path to the compiler flags
1556 if test -n "$OPT_ZLIB"; then
1557 CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
1558 LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
1559 fi
1560
1561 AC_CHECK_HEADER(zlib.h,
1562 [
1563 dnl zlib.h was found
1564 HAVE_ZLIB_H="1"
1565 dnl if the lib wasn't found already, try again with the new paths
1566 if test "$HAVE_LIBZ" != "1"; then
1567 AC_CHECK_LIB(z, gzread,
1568 [
1569 dnl the lib was found!
1570 HAVE_LIBZ="1"
1571 ],
1572 [ CPPFLAGS=$_cppflags
1573 LDFLAGS=$_ldflags])
1574 fi
1575 ],
1576 [
1577 dnl zlib.h was not found, restore the flags
1578 CPPFLAGS=$_cppflags
1579 LDFLAGS=$_ldflags]
1580 )
1581
1582 if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
1583 then
1584 AC_MSG_WARN([configure found only the libz lib, not the header file!])
48dd0c56 1585 HAVE_LIBZ=""
c518c52a
DS
1586 elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
1587 then
1588 AC_MSG_WARN([configure found only the libz header file, not the lib!])
1589 elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
1590 then
1591 dnl both header and lib were found!
1592 AC_SUBST(HAVE_LIBZ)
1593 AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file])
1594 AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
1595
1596 CURL_LIBS="$CURL_LIBS -lz"
1597 LIBS="$LIBS -lz"
1598
1599 dnl replace 'HAVE_LIBZ' in the automake makefile.ams
1600 AMFIXLIB="1"
1601 AC_MSG_NOTICE([found both libz and libz.h header])
1602 curl_zlib_msg="enabled"
1603 fi
1604fi
1605
1606dnl set variable for use in automakefile(s)
1607AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1)
1608
df3ca591 1609dnl **********************************************************************
e16c1b8e 1610dnl Check for the random seed preferences
df3ca591
DS
1611dnl **********************************************************************
1612
1613if test X"$OPENSSL_ENABLED" = X"1"; then
1614 AC_ARG_WITH(egd-socket,
1615 AC_HELP_STRING([--with-egd-socket=FILE],
1616 [Entropy Gathering Daemon socket pathname]),
1617 [ EGD_SOCKET="$withval" ]
1618 )
1619 if test -n "$EGD_SOCKET" ; then
1620 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET",
1621 [your Entropy Gathering Daemon socket pathname] )
1622 fi
1623
1624 dnl Check for user-specified random device
1625 AC_ARG_WITH(random,
1626 AC_HELP_STRING([--with-random=FILE],
1627 [read randomness from FILE (default=/dev/urandom)]),
1628 [ RANDOM_FILE="$withval" ],
1629 [
a87102c7
DS
1630 if test x$cross_compiling != xyes; then
1631 dnl Check for random device
1632 AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
1633 else
1634 AC_MSG_WARN([skipped the /dev/urandom detection when cross-compiling])
1635 fi
df3ca591
DS
1636 ]
1637 )
1638 if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
1639 AC_SUBST(RANDOM_FILE)
1640 AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE",
1641 [a suitable file to read random data from])
1642 fi
1643fi
1644
2531cd94
PS
1645dnl ---
1646dnl We require OpenSSL with SRP support.
1647dnl ---
1648if test "$OPENSSL_ENABLED" = "1"; then
1649 AC_CHECK_LIB(crypto, SRP_Calc_client_key,
1650 [
1651 AC_DEFINE(HAVE_SSLEAY_SRP, 1, [if you have the function SRP_Calc_client_key])
1652 AC_SUBST(HAVE_SSLEAY_SRP, [1])
1653 ])
1654fi
1655
bebd5dbc 1656dnl ----------------------------------------------------
b9fdc0c2 1657dnl check for GnuTLS
bebd5dbc
DS
1658dnl ----------------------------------------------------
1659
1660dnl Default to compiler & linker defaults for GnuTLS files & libraries.
e49a7e36 1661OPT_GNUTLS=no
bebd5dbc
DS
1662
1663AC_ARG_WITH(gnutls,dnl
c40ae2cb 1664AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root])
bebd5dbc
DS
1665AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]),
1666 OPT_GNUTLS=$withval)
1667
1668if test "$OPENSSL_ENABLED" != "1"; then
1669
e49a7e36 1670 if test X"$OPT_GNUTLS" != Xno; then
b9fdc0c2 1671
b9fdc0c2 1672 addld=""
bebd5dbc 1673 if test "x$OPT_GNUTLS" = "xyes"; then
966cc10f 1674 dnl this is with no partiular path given
b9fdc0c2
DS
1675 CURL_CHECK_PKGCONFIG(gnutls)
1676
1677 if test "$PKGCONFIG" != "no" ; then
1678 addlib=`$PKGCONFIG --libs-only-l gnutls`
1679 addld=`$PKGCONFIG --libs-only-L gnutls`
1680 addcflags=`$PKGCONFIG --cflags-only-I gnutls`
1681 version=`$PKGCONFIG --modversion gnutls`
1682 gtlslib=`echo $addld | $SED -e 's/-L//'`
966cc10f
DS
1683 else
1684 dnl without pkg-config, we try libgnutls-config as that was how it
1685 dnl used to be done
1686 check=`libgnutls-config --version 2>/dev/null`
1687 if test -n "$check"; then
1688 addlib=`libgnutls-config --libs`
1689 addcflags=`libgnutls-config --cflags`
1690 version=`libgnutls-config --version`
1691 gtlslib=`libgnutls-config --prefix`/lib$libsuff
1692 fi
c2fcdf3a 1693 fi
f90551ff 1694 else
966cc10f
DS
1695 dnl this is with a given path, first check if there's a libgnutls-config
1696 dnl there and if not, make an educated guess
0cb6f305
DS
1697 cfg=$OPT_GNUTLS/bin/libgnutls-config
1698 check=`$cfg --version 2>/dev/null`
966cc10f 1699 if test -n "$check"; then
0cb6f305
DS
1700 addlib=`$cfg --libs`
1701 addcflags=`$cfg --cflags`
1702 version=`$cfg --version`
1703 gtlslib=`$cfg --prefix`/lib$libsuff
966cc10f
DS
1704 else
1705 dnl without pkg-config and libgnutls-config, we guess a lot!
1706 addlib=-lgnutls
1707 addld=-L$OPT_GNUTLS/lib$libsuff
1708 addcflags=-I$OPT_GNUTLS/include
1709 version="" # we just don't know
1710 gtlslib=$OPT_GNUTLS/lib$libsuff
1711 fi
b9fdc0c2
DS
1712 fi
1713
1714 if test -z "$version"; then
1715 dnl lots of efforts, still no go
1716 version="unknown"
bebd5dbc 1717 fi
b9fdc0c2 1718
313f1a1e 1719 if test -n "$addlib"; then
bebd5dbc 1720
b0bc2f00 1721 CLEANLIBS="$LIBS"
313f1a1e 1722 CLEANCPPFLAGS="$CPPFLAGS"
b9fdc0c2 1723 CLEADLDFLAGS="$LDFLAGS"
e16c1b8e 1724
b0bc2f00 1725 LIBS="$LIBS $addlib"
b9fdc0c2 1726 LDFLAGS="$LDFLAGS $addld"
313f1a1e
DS
1727 if test "$addcflags" != "-I/usr/include"; then
1728 CPPFLAGS="$CPPFLAGS $addcflags"
1729 fi
e16c1b8e 1730
313f1a1e 1731 AC_CHECK_LIB(gnutls, gnutls_check_version,
bebd5dbc
DS
1732 [
1733 AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled])
1734 AC_SUBST(USE_GNUTLS, [1])
02267eba 1735 GNUTLS_ENABLED=1
bebd5dbc 1736 USE_GNUTLS="yes"
313f1a1e 1737 curl_ssl_msg="enabled (GnuTLS)"
bebd5dbc
DS
1738 ],
1739 [
b0bc2f00 1740 LIBS="$CLEANLIBS"
bebd5dbc
DS
1741 CPPFLAGS="$CLEANCPPFLAGS"
1742 ])
e16c1b8e 1743
313f1a1e
DS
1744 if test "x$USE_GNUTLS" = "xyes"; then
1745 AC_MSG_NOTICE([detected GnuTLS version $version])
241b2b4a 1746
b9fdc0c2
DS
1747 if test -n "$gtlslib"; then
1748 dnl when shared libs were found in a path that the run-time
1749 dnl linker doesn't search through, we need to add it to
1750 dnl LD_LIBRARY_PATH to prevent further configure tests to fail
1751 dnl due to this
313f1a1e 1752
b9fdc0c2
DS
1753 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
1754 export LD_LIBRARY_PATH
1755 AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH])
1756 fi
313f1a1e 1757 fi
241b2b4a 1758
bebd5dbc 1759 fi
313f1a1e 1760
bebd5dbc
DS
1761 fi dnl GNUTLS not disabled
1762
bebd5dbc 1763fi dnl OPENSSL != 1
779ca097 1764
f3df524b
DS
1765dnl ---
1766dnl If GnuTLS is enabled, we MUST verify that it uses libgcrypt since
1767dnl curl code relies on that but recent GnuTLS versions can in fact build
1768dnl with different crypto libraries which curl right now cannot handle
1769dnl ---
1770
1771if test "$GNUTLS_ENABLED" = "1"; then
1772 AC_CHECK_LIB(gcrypt,
1773 gcry_control, ,
1774 [
1775 AC_MSG_ERROR([need GnuTLS built with gcrypt to function with GnuTLS])
1776 ])
1777fi
1778
59cf93cc
QS
1779dnl ---
1780dnl We require GnuTLS with SRP support.
1781dnl ---
1782if test "$GNUTLS_ENABLED" = "1"; then
1783 AC_CHECK_LIB(gnutls, gnutls_srp_verifier,
1784 [
1785 AC_DEFINE(HAVE_GNUTLS_SRP, 1, [if you have the function gnutls_srp_verifier])
1786 AC_SUBST(HAVE_GNUTLS_SRP, [1])
1787 ])
1788fi
1789
51427e19
HHC
1790dnl ----------------------------------------------------
1791dnl check for PolarSSL
1792dnl ----------------------------------------------------
1793
1794dnl Default to compiler & linker defaults for PolarSSL files & libraries.
1795OPT_POLARSSL=no
1796
1797_cppflags=$CPPFLAGS
1798_ldflags=$LDFLAGS
1799AC_ARG_WITH(polarssl,dnl
c40ae2cb 1800AC_HELP_STRING([--with-polarssl=PATH],[where to look for PolarSSL, PATH points to the installation root])
51427e19
HHC
1801AC_HELP_STRING([--without-polarssl], [disable PolarSSL detection]),
1802 OPT_POLARSSL=$withval)
1803
1804if test "$OPENSSL_ENABLED" != "1"; then
1805
1806 if test X"$OPT_POLARSSL" != Xno; then
1807
1808 if test "$OPT_POLARSSL" = "yes"; then
1809 OPT_POLARSSL=""
1810 fi
1811
1812 if test -z "$OPT_POLARSSL" ; then
1813 dnl check for lib first without setting any new path
1814
1815 AC_CHECK_LIB(polarssl, havege_init,
1816 dnl libpolarssl found, set the variable
1817 [
1818 AC_DEFINE(USE_POLARSSL, 1, [if PolarSSL is enabled])
1819 AC_SUBST(USE_POLARSSL, [1])
1820 POLARSSL_ENABLED=1
1821 USE_POLARSSL="yes"
1822 curl_ssl_msg="enabled (PolarSSL)"
1823 ])
1824 fi
1825
1826 if test "x$USE_POLARSSL" != "xyes"; then
1827 dnl add the path and test again
1828 addld=-L$OPT_POLARSSL/lib$libsuff
1829 addcflags=-I$OPT_POLARSSL/include
1830 polarssllib=$OPT_POLARSSL/lib$libsuff
1831
1832 LDFLAGS="$LDFLAGS $addld"
1833 if test "$addcflags" != "-I/usr/include"; then
1834 CPPFLAGS="$CPPFLAGS $addcflags"
1835 fi
1836
1837 AC_CHECK_LIB(polarssl, ssl_init,
1838 [
1839 AC_DEFINE(USE_POLARSSL, 1, [if PolarSSL is enabled])
1840 AC_SUBST(USE_POLARSSL, [1])
1841 POLARSSL_ENABLED=1
1842 USE_POLARSSL="yes"
1843 curl_ssl_msg="enabled (PolarSSL)"
1844 ],
1845 [
1846 CPPFLAGS=$_cppflags
1847 LDFLAGS=$_ldflags
1848 ])
1849 fi
1850
1851 if test "x$USE_POLARSSL" = "xyes"; then
1852 AC_MSG_NOTICE([detected PolarSSL])
1853
1854 CURL_LIBS="$CURL_LIBS -lpolarssl"
1855 LIBS="$LIBS -lpolarssl"
1856
1857 if test -n "$polarssllib"; then
1858 dnl when shared libs were found in a path that the run-time
1859 dnl linker doesn't search through, we need to add it to
1860 dnl LD_LIBRARY_PATH to prevent further configure tests to fail
1861 dnl due to this
1862
1863 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$polarssllib"
1864 export LD_LIBRARY_PATH
1865 AC_MSG_NOTICE([Added $polarssllib to LD_LIBRARY_PATH])
1866 fi
1867
51427e19
HHC
1868 fi
1869
1870 fi dnl PolarSSL not disabled
1871
1872fi dnl OPENSSL != 1
1873
9e60d8fd
TO
1874dnl ----------------------------------------------------
1875dnl check for CyaSSL
1876dnl ----------------------------------------------------
1877
1878dnl Default to compiler & linker defaults for CyaSSL files & libraries.
1879OPT_CYASSL=no
1880
1881_cppflags=$CPPFLAGS
1882_ldflags=$LDFLAGS
1883AC_ARG_WITH(cyassl,dnl
1884AC_HELP_STRING([--with-cyassl=PATH],[where to look for CyaSSL, PATH points to the installation root (default: /usr/local/cyassl)])
1885AC_HELP_STRING([--without-cyassl], [disable CyaSSL detection]),
1886 OPT_CYASSL=$withval)
1887
1888if test "$OPENSSL_ENABLED" != "1"; then
1889
1890 if test X"$OPT_CYASSL" != Xno; then
1891
1892 if test "$OPT_CYASSL" = "yes"; then
1893 OPT_CYASSL=""
1894 fi
1895
1896 if test -z "$OPT_CYASSL" ; then
1897 dnl check for lib in default first
1898
1899 trycyassldir="/usr/local/cyassl"
1900
1901 LDFLAGS="$LDFLAGS -L$trycyassldir/lib"
1902 CPPFLAGS="$CPPFLAGS -I$trycyassldir/include"
1903
1904 AC_CHECK_LIB(cyassl, InitCyaSSL,
1905 dnl libcyassl found, set the variable
1906 [
1907 AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
1908 AC_SUBST(USE_CYASSL, [1])
1909 CYASSL_ENABLED=1
1910 USE_CYASSL="yes"
1911 curl_ssl_msg="enabled (CyaSSL)"
1912 ])
1913 fi
1914
1915 if test "x$USE_CYASSL" != "xyes"; then
1916 dnl add the path and test again
1917 addld=-L$OPT_CYASSL/lib$libsuff
1918 addcflags=-I$OPT_CYASSL/include
1919 cyassllib=$OPT_CYASSL/lib$libsuff
1920
1921 LDFLAGS="$LDFLAGS $addld"
1922 if test "$addcflags" != "-I/usr/include"; then
1923 CPPFLAGS="$CPPFLAGS $addcflags"
1924 fi
1925
1926 AC_CHECK_LIB(cyassl, InitCyaSSL,
1927 [
1928 AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
1929 AC_SUBST(USE_CYASSL, [1])
1930 CYASSL_ENABLED=1
1931 USE_CYASSL="yes"
1932 curl_ssl_msg="enabled (CyaSSL)"
1933 ],
1934 [
1935 CPPFLAGS=$_cppflags
1936 LDFLAGS=$_ldflags
1937 ])
1938 fi
1939
1940 if test "x$USE_CYASSL" = "xyes"; then
1941 AC_MSG_NOTICE([detected CyaSSL])
1942
1943 CURL_LIBS="$CURL_LIBS -lcyassl -lm"
1944 LIBS="$LIBS -lcyassl -lm"
1945
1946 if test -n "$cyassllib"; then
1947 dnl when shared libs were found in a path that the run-time
1948 dnl linker doesn't search through, we need to add it to
1949 dnl LD_LIBRARY_PATH to prevent further configure tests to fail
1950 dnl due to this
1951
1952 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$cyassllib"
1953 export LD_LIBRARY_PATH
1954 AC_MSG_NOTICE([Added $cyassllib to LD_LIBRARY_PATH])
1955 fi
1956
1957 fi
1958
1959 fi dnl CyaSSL not disabled
1960
1961fi dnl OPENSSL != 1
1962
7f70dbca
DS
1963dnl ----------------------------------------------------
1964dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
1965dnl ----------------------------------------------------
1966
1967dnl Default to compiler & linker defaults for NSS files & libraries.
1968OPT_NSS=no
1969
1970AC_ARG_WITH(nss,dnl
c40ae2cb 1971AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root])
7f70dbca
DS
1972AC_HELP_STRING([--without-nss], [disable NSS detection]),
1973 OPT_NSS=$withval)
1974
1975if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
1976
1977 if test X"$OPT_NSS" != Xno; then
1978 if test "x$OPT_NSS" = "xyes"; then
b9fdc0c2
DS
1979
1980 CURL_CHECK_PKGCONFIG(nss)
1981
1982 if test "$PKGCONFIG" != "no" ; then
1983 addlib=`$PKGCONFIG --libs nss`
1984 addcflags=`$PKGCONFIG --cflags nss`
1985 version=`$PKGCONFIG --modversion nss`
1986 nssprefix=`$PKGCONFIG --variable=prefix nss`
ceda7e98
DS
1987 else
1988 dnl Without pkg-config, we check for nss-config
1989
1990 check=`nss-config --version 2>/dev/null`
1991 if test -n "$check"; then
1992 addlib=`nss-config --libs`
1993 addcflags=`nss-config --cflags`
1994 version=`nss-config --version`
1995 nssprefix=`nss-config --prefix`
1996 else
1997 addlib="-lnss3"
1998 addcflags=""
1999 version="unknown"
2000 fi
b9fdc0c2 2001 fi
43442153
KD
2002 else
2003 # Without pkg-config, we'll kludge in some defaults
2004 addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
2005 addcflags="-I$OPT_NSS/include"
2006 version="unknown"
eb16c0e1 2007 nssprefix=$OPT_NSS
7f70dbca 2008 fi
43442153 2009
8c3f40ee
DS
2010 dnl Check for functionPK11_CreateGenericObject
2011 dnl this is needed for using the PEM PKCS#11 module
20695098 2012 AC_CHECK_LIB(nss3, PK11_CreateGenericObject,
8c3f40ee
DS
2013 [
2014 AC_DEFINE(HAVE_PK11_CREATEGENERICOBJECT, 1, [if you have the function PK11_CreateGenericObject])
2015 AC_SUBST(HAVE_PK11_CREATEGENERICOBJECT, [1])
2016 ])
7f70dbca
DS
2017 if test -n "$addlib"; then
2018
2019 CLEANLIBS="$LIBS"
2020 CLEANCPPFLAGS="$CPPFLAGS"
e16c1b8e 2021
7f70dbca
DS
2022 LIBS="$LIBS $addlib"
2023 if test "$addcflags" != "-I/usr/include"; then
2024 CPPFLAGS="$CPPFLAGS $addcflags"
2025 fi
e16c1b8e 2026
7f70dbca
DS
2027 AC_CHECK_LIB(nss3, NSS_Initialize,
2028 [
2029 AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
2030 AC_SUBST(USE_NSS, [1])
2031 USE_NSS="yes"
2032 NSS_ENABLED=1
2033 curl_ssl_msg="enabled (NSS)"
2034 ],
2035 [
2036 LIBS="$CLEANLIBS"
2037 CPPFLAGS="$CLEANCPPFLAGS"
2038 ])
e16c1b8e 2039
7f70dbca
DS
2040 if test "x$USE_NSS" = "xyes"; then
2041 AC_MSG_NOTICE([detected NSS version $version])
2042
2043 dnl when shared libs were found in a path that the run-time
2044 dnl linker doesn't search through, we need to add it to
2045 dnl LD_LIBRARY_PATH to prevent further configure tests to fail
2046 dnl due to this
2047
2048 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
2049 export LD_LIBRARY_PATH
2050 AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
2051 fi
2052
2053 fi
2054
2055 fi dnl NSS not disabled
2056
2057fi dnl OPENSSL != 1 -a GNUTLS_ENABLED != 1
2058
108d7693
EH
2059OPT_AXTLS=off
2060
2061AC_ARG_WITH(axtls,dnl
68b2a981 2062AC_HELP_STRING([--with-axtls=PATH],[Where to look for axTLS, PATH points to the axTLS installation prefix (default: /usr/local). Ignored if another SSL engine is selected.])
108d7693
EH
2063AC_HELP_STRING([--without-axtls], [disable axTLS]),
2064 OPT_AXTLS=$withval)
2065
2066if test "$curl_ssl_msg" = "$init_ssl_msg"; then
2067 if test X"$OPT_AXTLS" != Xno; then
2068 dnl backup the pre-axtls variables
2069 CLEANLDFLAGS="$LDFLAGS"
2070 CLEANCPPFLAGS="$CPPFLAGS"
2071 CLEANLIBS="$LIBS"
2072
2073 case "$OPT_AXTLS" in
2074 yes)
2075 dnl --with-axtls (without path) used
68b2a981
DS
2076 PREFIX_AXTLS=/usr/local
2077 LIB_AXTLS="$PREFIX_AXTLS/lib"
2078 LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
2079 CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
108d7693
EH
2080 ;;
2081 off)
2082 dnl no --with-axtls option given, just check default places
2083 PREFIX_AXTLS=
2084 ;;
2085 *)
2086 dnl check the given --with-axtls spot
2087 PREFIX_AXTLS=$OPT_AXTLS
68b2a981 2088 LIB_AXTLS="$PREFIX_AXTLS/lib"
108d7693 2089 LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
68b2a981 2090 CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
108d7693
EH
2091 ;;
2092 esac
2093
2094 AC_CHECK_LIB(axtls, ssl_version,[
2095 LIBS="-laxtls $LIBS"
2096 AC_DEFINE(USE_AXTLS, 1, [if axTLS is enabled])
2097 AC_SUBST(USE_AXTLS, [1])
2098 AXTLS_ENABLED=1
2099 USE_AXTLS="yes"
2100 curl_ssl_msg="enabled (axTLS)"
2101
2102
2103 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_AXTLS"
2104 export LD_LIBRARY_PATH
2105 AC_MSG_NOTICE([Added $LIB_AXTLS to LD_LIBRARY_PATH])
2106 ],[
2107 LDFLAGS="$CLEANLDFLAGS"
2108 CPPFLAGS="$CLEANCPPFLAGS"
2109 LIBS="$CLEANLIBS"
2110 ])
2111 fi
2112fi
2113
9e60d8fd 2114if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED" = "x"; then
7f70dbca 2115 AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
9e60d8fd 2116 AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss or --with-axtls to address this.])
57d2fb41
DS
2117else
2118 # SSL is enabled, genericly
2119 AC_SUBST(SSL_ENABLED)
2120 SSL_ENABLED="1"
7f70dbca
DS
2121fi
2122
779ca097
DS
2123dnl **********************************************************************
2124dnl Check for the CA bundle
2125dnl **********************************************************************
2126
fb23b857 2127CURL_CHECK_CA_BUNDLE
779ca097 2128
62ed5530
DF
2129dnl **********************************************************************
2130dnl Check for the presence of LIBSSH2 libraries and headers
2131dnl **********************************************************************
2132
2133dnl Default to compiler & linker defaults for LIBSSH2 files & libraries.
2134OPT_LIBSSH2=off
2135AC_ARG_WITH(libssh2,dnl
c40ae2cb 2136AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the LIBSSH2 installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
62ed5530
DF
2137AC_HELP_STRING([--without-libssh2], [disable LIBSSH2]),
2138 OPT_LIBSSH2=$withval)
2139
2140if test X"$OPT_LIBSSH2" != Xno; then
2141 dnl backup the pre-libssh2 variables
2142 CLEANLDFLAGS="$LDFLAGS"
2143 CLEANCPPFLAGS="$CPPFLAGS"
2144 CLEANLIBS="$LIBS"
2145
2146 case "$OPT_LIBSSH2" in
2147 yes)
2148 dnl --with-libssh2 (without path) used
1951cd1e
DS
2149 CURL_CHECK_PKGCONFIG(libssh2)
2150
2151 if test "$PKGCONFIG" != "no" ; then
2152 LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2`
2153 LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
2154 CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
2155 version=`$PKGCONFIG --modversion libssh2`
2156 DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/-L//'`
2157 fi
43442153 2158
62ed5530
DF
2159 ;;
2160 off)
2161 dnl no --with-libssh2 option given, just check default places
62ed5530
DF
2162 ;;
2163 *)
2164 dnl use the given --with-libssh2 spot
1951cd1e 2165 PREFIX_SSH2=$OPT_LIBSSH2
62ed5530
DF
2166 ;;
2167 esac
2168
1951cd1e
DS
2169 dnl if given with a prefix, we set -L and -I based on that
2170 if test -n "$PREFIX_SSH2"; then
fde79589 2171 LIB_SSH2="-lssh2"
9fced16e 2172 LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
1951cd1e 2173 CPP_SSH2=-I${PREFIX_SSH2}/include
9fced16e 2174 DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
1951cd1e
DS
2175 fi
2176
2177 LDFLAGS="$LDFLAGS $LD_SSH2"
2178 CPPFLAGS="$CPPFLAGS $CPP_SSH2"
2179 LIBS="$LIBS $LIB_SSH2"
2180
62ed5530
DF
2181 AC_CHECK_LIB(ssh2, libssh2_channel_open_ex)
2182
2183 AC_CHECK_HEADERS(libssh2.h,
2184 curl_ssh_msg="enabled (libSSH2)"
2185 LIBSSH2_ENABLED=1
2186 AC_DEFINE(USE_LIBSSH2, 1, [if libSSH2 is in use])
2187 AC_SUBST(USE_LIBSSH2, [1])
2188 )
2189
2190 if test X"$OPT_LIBSSH2" != Xoff &&
2191 test "$LIBSSH2_ENABLED" != "1"; then
2192 AC_MSG_ERROR([libSSH2 libs and/or directories were not found where specified!])
2193 fi
2194
2195 if test "$LIBSSH2_ENABLED" = "1"; then
9fced16e 2196 if test -n "$DIR_SSH2"; then
62ed5530
DF
2197 dnl when the libssh2 shared libs were found in a path that the run-time
2198 dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
2199 dnl to prevent further configure tests to fail due to this
2200
2201 dnl libssh2_version is a post 1.0 addition
6be508dc 2202 dnl libssh2_init and libssh2_exit were added in 1.2.5
f8cf037e 2203 dnl libssh2_scp_send64 was added in 1.2.6
e214cd4a 2204 dnl libssh2_session_handshake was added in 1.2.8
f8cf037e 2205 AC_CHECK_FUNCS( libssh2_version libssh2_init libssh2_exit \
e214cd4a 2206 libssh2_scp_send64 libssh2_session_handshake)
62ed5530 2207
1951cd1e 2208 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
62ed5530 2209 export LD_LIBRARY_PATH
1951cd1e 2210 AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH])
62ed5530
DF
2211 fi
2212 else
2213 dnl no libssh2, revert back to clean variables
2214 LDFLAGS=$CLEANLDFLAGS
2215 CPPFLAGS=$CLEANCPPFLAGS
2216 LIBS=$CLEANLIBS
2217 fi
2218fi
2219
04cb15ae
HC
2220dnl **********************************************************************
2221dnl Check for the presence of LIBRTMP libraries and headers
2222dnl **********************************************************************
2223
2224dnl Default to compiler & linker defaults for LIBRTMP files & libraries.
2225OPT_LIBRTMP=off
2226AC_ARG_WITH(librtmp,dnl
c40ae2cb 2227AC_HELP_STRING([--with-librtmp=PATH],[Where to look for librtmp, PATH points to the LIBRTMP installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
04cb15ae
HC
2228AC_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
2229 OPT_LIBRTMP=$withval)
2230
2231if test X"$OPT_LIBRTMP" != Xno; then
2232 dnl backup the pre-librtmp variables
2233 CLEANLDFLAGS="$LDFLAGS"
2234 CLEANCPPFLAGS="$CPPFLAGS"
2235 CLEANLIBS="$LIBS"
2236
2237 case "$OPT_LIBRTMP" in
2238 yes)
2239 dnl --with-librtmp (without path) used
2240 CURL_CHECK_PKGCONFIG(librtmp)
2241
2242 if test "$PKGCONFIG" != "no" ; then
2243 LIB_RTMP=`$PKGCONFIG --libs-only-l librtmp`
2244 LD_RTMP=`$PKGCONFIG --libs-only-L librtmp`
2245 CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp`
2246 version=`$PKGCONFIG --modversion librtmp`
2247 DIR_RTMP=`echo $LD_RTMP | $SED -e 's/-L//'`
5046dd02
JC
2248 else
2249 dnl To avoid link errors, we do not allow --librtmp without
2250 dnl a pkgconfig file
2251 AC_MSG_ERROR([--librtmp was specified but could not find librtmp pkgconfig file.])
04cb15ae
HC
2252 fi
2253
2254 ;;
2255 off)
2256 dnl no --with-librtmp option given, just check default places
5fcc4332 2257 LIB_RTMP="-lrtmp"
04cb15ae
HC
2258 ;;
2259 *)
2260 dnl use the given --with-librtmp spot
2261 PREFIX_RTMP=$OPT_LIBRTMP
2262 ;;
2263 esac
2264
2265 dnl if given with a prefix, we set -L and -I based on that
2266 if test -n "$PREFIX_RTMP"; then
2267 LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff
2268 CPP_RTMP=-I${PREFIX_RTMP}/include
2269 DIR_RTMP=${PREFIX_RTMP}/lib$libsuff
2270 fi
2271
2272 LDFLAGS="$LDFLAGS $LD_RTMP"
2273 CPPFLAGS="$CPPFLAGS $CPP_RTMP"
2274 LIBS="$LIBS $LIB_RTMP"
2275
5fcc4332
DS
2276 AC_CHECK_LIB(rtmp, RTMP_Init,
2277 [
2278 AC_CHECK_HEADERS(librtmp/rtmp.h,
2279 curl_rtmp_msg="enabled (librtmp)"
2280 LIBRTMP_ENABLED=1
2281 AC_DEFINE(USE_LIBRTMP, 1, [if librtmp is in use])
2282 AC_SUBST(USE_LIBRTMP, [1])
2283 )
2284 ],
2285 dnl not found, revert back to clean variables
2286 LDFLAGS=$CLEANLDFLAGS
2287 CPPFLAGS=$CLEANCPPFLAGS
2288 LIBS=$CLEANLIBS
04cb15ae
HC
2289 )
2290
2291 if test X"$OPT_LIBRTMP" != Xoff &&
2292 test "$LIBRTMP_ENABLED" != "1"; then
2293 AC_MSG_ERROR([librtmp libs and/or directories were not found where specified!])
2294 fi
2295
04cb15ae
HC
2296fi
2297
c461254d
DF
2298dnl **********************************************************************
2299dnl Check for the presence of IDN libraries and headers
2300dnl **********************************************************************
2301
cff90cf3 2302AC_MSG_CHECKING([whether to build with libidn])
96002646 2303AC_ARG_WITH(libidn,
cff90cf3
DS
2304AC_HELP_STRING([--with-libidn=PATH],[Enable libidn usage])
2305AC_HELP_STRING([--without-libidn],[Disable libidn usage]),
96002646 2306 [LIBIDN="$withval"])
cff90cf3
DS
2307
2308case "$LIBIDN" in
2309 no)
2310 AC_MSG_RESULT(no)
2311 ;;
2312 *) AC_MSG_RESULT(yes)
19a568a9
DS
2313
2314 idn=""
2315 dnl if there is a given path, check that FIRST
7bb6d76d
DS
2316 if test -n "$LIBIDN"; then
2317 if test "x$LIBIDN" != "xyes"; then
7bb6d76d
DS
2318 oldLDFLAGS=$LDFLAGS
2319 oldCPPFLAGS=$CPPFLAGS
2320 LDFLAGS="$LDFLAGS -L$LIBIDN/lib"
2321 CPPFLAGS="$CPPFLAGS -I$LIBIDN/include"
2322 idn="yes"
2323 AC_CHECK_LIB(idn, idna_to_ascii_4i, ,
2324 idn=""
2325 LDFLAGS=$oldLDFLAGS
2326 CPPFLAGS=$oldCPPFLAGS)
2327 fi
19a568a9
DS
2328 fi
2329
2330 if test "x$idn" != "xyes"; then
2331 dnl check with default paths
8c16696f 2332 idn="yes"
19a568a9
DS
2333 AC_CHECK_LIB(idn, idna_to_ascii_lz, ,
2334 idn="")
2335 fi
2336
2337 if test "x$idn" = "xyes"; then
cff90cf3 2338 curl_idn_msg="enabled"
d6460aff 2339 AC_SUBST(IDN_ENABLED, [1])
4e7575fc 2340 dnl different versions of libidn have different setups of these:
1239e483 2341 AC_CHECK_FUNCS( idn_free idna_strerror tld_strerror)
c6881660 2342 AC_CHECK_HEADERS( idn-free.h tld.h )
cff90cf3 2343 fi
e16c1b8e
GK
2344
2345 ;;
cff90cf3
DS
2346esac
2347
0eace2fe
DS
2348
2349dnl Let's hope this split URL remains working:
2350dnl http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \
2351dnl genprogc/thread_quick_ref.htm
abd65e21 2352
abd65e21 2353
ae1912cb
DS
2354dnl **********************************************************************
2355dnl Back to "normal" configuring
2356dnl **********************************************************************
2357
2358dnl Checks for header files.
2359AC_HEADER_STDC
075c5342 2360
4d95d23d 2361CURL_CHECK_HEADER_MALLOC
9770899a 2362CURL_CHECK_HEADER_MEMORY
a6a5bba0
YT
2363
2364dnl Now check for the very most basic headers. Then we can use these
075c5342
DS
2365dnl ones as default-headers when checking for the rest!
2366AC_CHECK_HEADERS(
2367 sys/types.h \
2368 sys/time.h \
2369 sys/select.h \
2370 sys/socket.h \
a4351517 2371 sys/ioctl.h \
aa41743e 2372 sys/uio.h \
24ac5b8a 2373 assert.h \
ae1912cb 2374 unistd.h \
8898ff9e 2375 stdlib.h \
3d66d10f 2376 limits.h \
ae1912cb
DS
2377 arpa/inet.h \
2378 net/if.h \
2379 netinet/in.h \
3d29bda9 2380 sys/un.h \
43137cf5 2381 netinet/tcp.h \
ae1912cb 2382 netdb.h \
ae1912cb
DS
2383 sys/sockio.h \
2384 sys/stat.h \
ae1912cb
DS
2385 sys/param.h \
2386 termios.h \
2387 termio.h \
2388 sgtty.h \
2389 fcntl.h \
ae1912cb 2390 alloca.h \
ae1912cb
DS
2391 time.h \
2392 io.h \
5900c0f7 2393 pwd.h \
82d3ded9 2394 utime.h \
3c49b405 2395 sys/utime.h \
99dfdebc 2396 sys/poll.h \
bdb2beb8 2397 poll.h \
37eba370 2398 socket.h \
a4e1ac79 2399 sys/resource.h \
8e872231 2400 libgen.h \
82d6cfa7 2401 locale.h \
65dbee01 2402 errno.h \
69565afa 2403 stdbool.h \
528a149d
DS
2404 arpa/tftp.h \
2405 sys/filio.h \
075c5342
DS
2406 setjmp.h,
2407dnl to do if not found
2408[],
2409dnl to do if found
2410[],
2411dnl default includes
2412[
2413#ifdef HAVE_SYS_TYPES_H
2414#include <sys/types.h>
2415#endif
2416#ifdef HAVE_SYS_TIME_H
2417#include <sys/time.h>
2418#endif
2419#ifdef HAVE_SYS_SELECT_H
2420#include <sys/select.h>
2421#endif
2422#ifdef HAVE_SYS_SOCKET_H
2423#include <sys/socket.h>
2424#endif
d85c2199
DS
2425#ifdef HAVE_NETINET_IN_H
2426#include <netinet/in.h>
2427#endif
3d29bda9
DS
2428#ifdef HAVE_SYS_UN_H
2429#include <sys/un.h>
2430#endif
075c5342 2431]
ae1912cb
DS
2432)
2433
ae1912cb
DS
2434dnl Checks for typedefs, structures, and compiler characteristics.
2435AC_C_CONST
273b2b23 2436CURL_CHECK_VARIADIC_MACROS
ae1912cb
DS
2437AC_TYPE_SIZE_T
2438AC_HEADER_TIME
32ac4ede 2439CURL_CHECK_STRUCT_TIMEVAL
67e8d229 2440CURL_VERIFY_RUNTIMELIBS
ae1912cb 2441
78e6508e 2442AC_CHECK_SIZEOF(size_t)
af677c4e 2443AC_CHECK_SIZEOF(long)
80443661
YT
2444AC_CHECK_SIZEOF(int)
2445AC_CHECK_SIZEOF(short)
a06e0779 2446CURL_CONFIGURE_LONG
cd73a733 2447AC_CHECK_SIZEOF(time_t)
e2c81773 2448AC_CHECK_SIZEOF(off_t)
ae1912cb 2449
3f3d6ebe 2450soname_bump=no
243cf297
YT
2451if test x"$ac_cv_native_windows" != "xyes" &&
2452 test $ac_cv_sizeof_off_t -ne $curl_sizeof_curl_off_t; then
3f3d6ebe
DS
2453 AC_MSG_WARN([This libcurl built is probably not ABI compatible with previous])
2454 AC_MSG_WARN([builds! You MUST read lib/README.curl_off_t to figure it out.])
2455 soname_bump=yes
2456fi
2457
2458
a147a079 2459AC_CHECK_TYPE(long long,
ceb49d37
YT
2460 [AC_DEFINE(HAVE_LONGLONG, 1,
2461 [Define to 1 if the compiler supports the 'long long' data type.])]
e16c1b8e 2462 longlong="yes"
af677c4e
DS
2463)
2464
2465if test "xyes" = "x$longlong"; then
2466 AC_MSG_CHECKING([if numberLL works])
465865c3
YT
2467 AC_COMPILE_IFELSE([
2468 AC_LANG_PROGRAM([[
2469 ]],[[
2470 long long val = 1000LL;
2471 ]])
2472 ],[
2473 AC_MSG_RESULT([yes])
2474 AC_DEFINE(HAVE_LL, 1, [if your compiler supports LL])
2475 ],[
2476 AC_MSG_RESULT([no])
2477 ])
af677c4e
DS
2478fi
2479
ae1912cb 2480
61e2a810 2481# check for ssize_t
a147a079
DS
2482AC_CHECK_TYPE(ssize_t, ,
2483 AC_DEFINE(ssize_t, int, [the signed version of size_t]))
61e2a810 2484
69565afa
YT
2485# check for bool type
2486AC_CHECK_TYPE([bool],[
2487 AC_DEFINE(HAVE_BOOL_T, 1,
2488 [Define to 1 if bool is an available type.])
2489], ,[
2a6a22a3
YT
2490#ifdef HAVE_SYS_TYPES_H
2491#include <sys/types.h>
2492#endif
69565afa
YT
2493#ifdef HAVE_STDBOOL_H
2494#include <stdbool.h>
2495#endif
2496])
2497
8611631f
YT
2498CURL_CONFIGURE_CURL_SOCKLEN_T
2499
d09b4369 2500TYPE_IN_ADDR_T
11693c0f 2501
a31ddd36
DS
2502TYPE_SOCKADDR_STORAGE
2503
73226415
YT
2504TYPE_SIG_ATOMIC_T
2505
a46f55b9
YT
2506AC_TYPE_SIGNAL
2507
9346e55d 2508CURL_CHECK_FUNC_SELECT
ad05d0a8 2509
01fa02d0 2510CURL_CHECK_FUNC_RECV
a9dc9005 2511CURL_CHECK_FUNC_RECVFROM
01fa02d0 2512CURL_CHECK_FUNC_SEND
77b3bc23
YT
2513CURL_CHECK_MSG_NOSIGNAL
2514
4e4f6c1e 2515CURL_CHECK_FUNC_ALARM
6d4e6cc8 2516CURL_CHECK_FUNC_BASENAME
40b2f255 2517CURL_CHECK_FUNC_CLOSESOCKET
d6d63147 2518CURL_CHECK_FUNC_CLOSESOCKET_CAMEL
1ff4e900 2519CURL_CHECK_FUNC_CONNECT
17d2a464 2520CURL_CHECK_FUNC_FCNTL
b93ad10f 2521CURL_CHECK_FUNC_FDOPEN
33319f5d 2522CURL_CHECK_FUNC_FREEADDRINFO
9717ccb7 2523CURL_CHECK_FUNC_FREEIFADDRS
2b2ac906 2524CURL_CHECK_FUNC_FSETXATTR
fce9c3a9 2525CURL_CHECK_FUNC_FTRUNCATE
0989cd35 2526CURL_CHECK_FUNC_GETADDRINFO
c33aee16 2527CURL_CHECK_FUNC_GAI_STRERROR
9b12f096 2528CURL_CHECK_FUNC_GETHOSTBYADDR
d84440d5 2529CURL_CHECK_FUNC_GETHOSTBYADDR_R
9b12f096 2530CURL_CHECK_FUNC_GETHOSTBYNAME
d84440d5 2531CURL_CHECK_FUNC_GETHOSTBYNAME_R
d7e406e0 2532CURL_CHECK_FUNC_GETHOSTNAME
9717ccb7 2533CURL_CHECK_FUNC_GETIFADDRS
0c1ae21c 2534CURL_CHECK_FUNC_GETSERVBYPORT_R
ea1362a9 2535CURL_CHECK_FUNC_GMTIME_R
006cab3e 2536CURL_CHECK_FUNC_INET_NTOA_R
267b9423 2537CURL_CHECK_FUNC_INET_NTOP
4d437416 2538CURL_CHECK_FUNC_INET_PTON
17d2a464
YT
2539CURL_CHECK_FUNC_IOCTL
2540CURL_CHECK_FUNC_IOCTLSOCKET
2541CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL
d7e406e0 2542CURL_CHECK_FUNC_LOCALTIME_R
b64dd3c6 2543CURL_CHECK_FUNC_MEMRCHR
debe0b56 2544CURL_CHECK_FUNC_POLL
17d2a464 2545CURL_CHECK_FUNC_SETSOCKOPT
969903eb 2546CURL_CHECK_FUNC_SIGACTION
83c199bb
YT
2547CURL_CHECK_FUNC_SIGINTERRUPT
2548CURL_CHECK_FUNC_SIGNAL
2549CURL_CHECK_FUNC_SIGSETJMP
40b2f255 2550CURL_CHECK_FUNC_SOCKET
4c621bc6
YT
2551CURL_CHECK_FUNC_STRCASECMP
2552CURL_CHECK_FUNC_STRCASESTR
2553CURL_CHECK_FUNC_STRCMPI
fce9c3a9 2554CURL_CHECK_FUNC_STRDUP
b93ad10f 2555CURL_CHECK_FUNC_STRERROR_R
4c621bc6
YT
2556CURL_CHECK_FUNC_STRICMP
2557CURL_CHECK_FUNC_STRLCAT
2558CURL_CHECK_FUNC_STRNCASECMP
2559CURL_CHECK_FUNC_STRNCMPI
2560CURL_CHECK_FUNC_STRNICMP
d7e406e0 2561CURL_CHECK_FUNC_STRSTR
969903eb 2562CURL_CHECK_FUNC_STRTOK_R
ea1362a9 2563CURL_CHECK_FUNC_STRTOLL
aa41743e 2564CURL_CHECK_FUNC_WRITEV
ea1362a9 2565
74e5beab
DS
2566case $host in
2567 *msdosdjgpp)
2568 ac_cv_func_pipe=no
2569 skipcheck_pipe=yes
2570 AC_MSG_NOTICE([skip check for pipe on msdosdjgpp])
2571 ;;
2572esac
357389a9 2573
6d4e6cc8 2574AC_CHECK_FUNCS([fork \
357389a9 2575 geteuid \
357389a9
YT
2576 getpass_r \
2577 getppid \
2578 getprotobyname \
2579 getpwuid \
2580 getrlimit \
2581 gettimeofday \
2582 inet_addr \
357389a9
YT
2583 perror \
2584 pipe \
357389a9
YT
2585 setlocale \
2586 setmode \
2587 setrlimit \
357389a9
YT
2588 uname \
2589 utime
2590],[
2591],[
2592 func="$ac_func"
2593 eval skipcheck=\$skipcheck_$func
2594 if test "x$skipcheck" != "xyes"; then
2595 AC_MSG_CHECKING([deeper for $func])
2596 AC_LINK_IFELSE([
2597 AC_LANG_PROGRAM([[
2598 ]],[[
2599 $func ();
2600 ]])
2601 ],[
2602 AC_MSG_RESULT([yes])
2603 eval "ac_cv_func_$func=yes"
f32dc6b8 2604 AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$func]), [1],
357389a9
YT
2605 [Define to 1 if you have the $func function.])
2606 ],[
2607 AC_MSG_RESULT([but still no])
2608 ])
2609 fi
2610])
2611
e4388643
YT
2612dnl Check if the getnameinfo function is available
2613dnl and get the types of five of its arguments.
2614CURL_CHECK_FUNC_GETNAMEINFO
2e5cccd1 2615
bec19771 2616if test "$ipv6" = "yes"; then
0989cd35
YT
2617 if test "$ac_cv_func_getaddrinfo" = "yes"; then
2618 AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
2619 IPV6_ENABLED=1
2620 AC_SUBST(IPV6_ENABLED)
2621 fi
bec19771
YT
2622 CURL_CHECK_NI_WITHSCOPEID
2623fi
2624
17d2a464
YT
2625dnl ************************************************************
2626dnl enable non-blocking communications
2627dnl
2628CURL_CHECK_OPTION_NONBLOCKING
2629CURL_CHECK_NONBLOCKING_SOCKET
2630
2631dnl ************************************************************
2632dnl nroff tool stuff
2633dnl
a7b99fc4 2634
e16c1b8e 2635AC_PATH_PROG( PERL, perl, ,
7dc36344
DS
2636 $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
2637AC_SUBST(PERL)
ae1912cb 2638
e16c1b8e 2639AC_PATH_PROGS( NROFF, gnroff nroff, ,
ae1912cb 2640 $PATH:/usr/bin/:/usr/local/bin )
96dde76b 2641AC_SUBST(NROFF)
ae1912cb 2642
773e7e87
DS
2643if test -n "$NROFF"; then
2644 dnl only check for nroff options if an nroff command was found
2645
2646 AC_MSG_CHECKING([how to use *nroff to get plain text from man pages])
2647 MANOPT="-man"
37685848
DS
2648 mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
2649 if test -z "$mancheck"; then
773e7e87
DS
2650 MANOPT="-mandoc"
2651 mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
2652 if test -z "$mancheck"; then
2653 MANOPT=""
2654 AC_MSG_RESULT([failed])
2655 AC_MSG_WARN([found no *nroff option to get plaintext from man pages])
2656 else
2657 AC_MSG_RESULT([$MANOPT])
2658 fi
37685848
DS
2659 else
2660 AC_MSG_RESULT([$MANOPT])
2661 fi
773e7e87
DS
2662 AC_SUBST(MANOPT)
2663fi
2664
2665if test -z "$MANOPT"
2666then
2667 dnl if no nroff tool was found, or no option that could convert man pages
2668 dnl was found, then disable the built-in manual stuff
2669 AC_MSG_WARN([disabling built-in manual])
2670 USE_MANUAL="no";
37685848 2671fi
37685848 2672
f3663a9d
DS
2673dnl *************************************************************************
2674dnl If the manual variable still is set, then we go with providing a built-in
2675dnl manual
2676
2677if test "$USE_MANUAL" = "1"; then
2678 AC_DEFINE(USE_MANUAL, 1, [If you want to build curl with the built-in manual])
cff90cf3 2679 curl_manual_msg="enabled"
f3663a9d
DS
2680fi
2681
2682dnl set variable for use in automakefile(s)
2683AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
2684
22ed0f50
YT
2685CURL_CHECK_LIB_ARES
2686AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes)
cd5e6743 2687
15aeb94f
YT
2688if test "x$ac_cv_native_windows" != "xyes" &&
2689 test "x$enable_shared" = "xyes"; then
b24e8725
YT
2690 build_libhostname=yes
2691else
2692 build_libhostname=no
2693fi
cfbdbf97 2694AM_CONDITIONAL(BUILD_LIBHOSTNAME, test x$build_libhostname = xyes)
b24e8725 2695
79dc74e8
DS
2696CURL_CHECK_OPTION_THREADED_RESOLVER
2697
2698if test "x$want_thres" = xyes && test "x$want_ares" = xyes; then
2699 AC_MSG_ERROR(
2700[Options --enable-threaded-resolver and --enable-ares are mutually exclusive])
2701fi
2702
2703if test "$want_thres" = "yes"; then
2704 AC_CHECK_HEADER(pthread.h,
2705 [ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>])
2706 save_CFLAGS="$CFLAGS"
2707 CFLAGS="$CFLAGS -pthread"
2708 AC_CHECK_LIB(pthread, pthread_create,
2709 [ AC_MSG_NOTICE([using POSIX threaded DNS lookup])
2710 AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup])
2711 USE_THREADS_POSIX=1
2712 curl_res_msg="threaded"
2713 ],
2714 [ CFLAGS="$save_CFLAGS"])
2715 ])
2716fi
2717
710e370c
DS
2718dnl ************************************************************
2719dnl disable verbose text strings
2720dnl
2721AC_MSG_CHECKING([whether to enable verbose strings])
2722AC_ARG_ENABLE(verbose,
2723AC_HELP_STRING([--enable-verbose],[Enable verbose strings])
2724AC_HELP_STRING([--disable-verbose],[Disable verbose strings]),
2725[ case "$enableval" in
2726 no)
2727 AC_MSG_RESULT(no)
2728 AC_DEFINE(CURL_DISABLE_VERBOSE_STRINGS, 1, [to disable verbose strings])
710e370c
DS
2729 curl_verbose_msg="no"
2730 ;;
2731 *) AC_MSG_RESULT(yes)
2732 ;;
2733 esac ],
2734 AC_MSG_RESULT(yes)
2735)
2736
8ed31c48
DS
2737dnl ************************************************************
2738dnl enable SSPI support
2739dnl
d8d3dc93 2740AC_MSG_CHECKING([whether to enable SSPI support (Windows native builds only)])
8ed31c48
DS
2741AC_ARG_ENABLE(sspi,
2742AC_HELP_STRING([--enable-sspi],[Enable SSPI])
2743AC_HELP_STRING([--disable-sspi],[Disable SSPI]),
2744[ case "$enableval" in
2745 yes)
d8d3dc93
YT
2746 if test "$ac_cv_native_windows" = "yes"; then
2747 AC_MSG_RESULT(yes)
2748 AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
9b23b310 2749 AC_SUBST(USE_WINDOWS_SSPI, [1])
4a8a7314 2750 curl_sspi_msg="enabled"
d8d3dc93
YT
2751 else
2752 AC_MSG_RESULT(no)
2753 AC_MSG_WARN([--enable-sspi Ignored. Only supported on native Windows builds.])
2754 fi
8ed31c48
DS
2755 ;;
2756 *)
2757 AC_MSG_RESULT(no)
2758 ;;
2759 esac ],
2760 AC_MSG_RESULT(no)
2761)
2762
94043b11
DS
2763dnl ************************************************************
2764dnl disable cryptographic authentication
2765dnl
2766AC_MSG_CHECKING([whether to enable cryptographic authentication methods])
2767AC_ARG_ENABLE(crypto-auth,
2768AC_HELP_STRING([--enable-crypto-auth],[Enable cryptographic authentication])
2769AC_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]),
2770[ case "$enableval" in
2771 no)
2772 AC_MSG_RESULT(no)
2773 AC_DEFINE(CURL_DISABLE_CRYPTO_AUTH, 1, [to disable cryptographic authentication])
94043b11
DS
2774 ;;
2775 *) AC_MSG_RESULT(yes)
2776 ;;
2777 esac ],
2778 AC_MSG_RESULT(yes)
2779)
2780
59cf93cc
QS
2781dnl ************************************************************
2782dnl disable TLS-SRP authentication
2783dnl
2784AC_MSG_CHECKING([whether to enable TLS-SRP authentication])
2785AC_ARG_ENABLE(tls-srp,
2786AC_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication])
2787AC_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
2788[ case "$enableval" in
2789 no)
2790 AC_MSG_RESULT(no)
2791 AC_DEFINE(CURL_DISABLE_TLS_SRP, 1, [to disable TLS-SRP authentication])
2792 want_tls_srp=no
2793 ;;
2794 *) AC_MSG_RESULT(yes)
2795 want_tls_srp=yes
2796 ;;
2797 esac ],
2798 AC_MSG_RESULT(yes)
2799 want_tls_srp=yes
2800)
2801
2531cd94 2802if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_SSLEAY_SRP" = "x1") ; then
59cf93cc 2803 AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication])
4ba3d8bd 2804 USE_TLS_SRP=1
59cf93cc
QS
2805 curl_tls_srp_msg="enabled"
2806fi
2807
ac269a8f
DS
2808dnl ************************************************************
2809dnl disable cookies support
2810dnl
2811AC_MSG_CHECKING([whether to enable support for cookies])
2812AC_ARG_ENABLE(cookies,
2813AC_HELP_STRING([--enable-cookies],[Enable cookies support])
2814AC_HELP_STRING([--disable-cookies],[Disable cookies support]),
2815[ case "$enableval" in
2816 no)
2817 AC_MSG_RESULT(no)
2818 AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support])
ac269a8f
DS
2819 ;;
2820 *) AC_MSG_RESULT(yes)
2821 ;;
2822 esac ],
2823 AC_MSG_RESULT(yes)
2824)
2825
59582a9d
DF
2826dnl ************************************************************
2827dnl Enable hiding of internal symbols in library to reduce its size and
2828dnl speed dynamic linking of applications. This currently is only supported
10489879 2829dnl on gcc >= 4.0 and SunPro C.
59582a9d
DF
2830dnl
2831AC_MSG_CHECKING([whether to enable hidden symbols in the library])
2832AC_ARG_ENABLE(hidden-symbols,
10489879 2833AC_HELP_STRING([--enable-hidden-symbols],[Hide internal symbols in library])
59582a9d
DF
2834AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibility in library]),
2835[ case "$enableval" in
2836 no)
2837 AC_MSG_RESULT(no)
2838 ;;
e16c1b8e 2839 *)
10489879 2840 AC_MSG_CHECKING([whether $CC supports it])
f13ac35e 2841 if test "$GCC" = yes ; then
f5d8c0be
DS
2842 if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ||
2843 dnl clang always supports -fvisibility= but it doesn't show up
2844 dnl under --help.
2845 test "$compiler_id" = "CLANG"; then
77431568
GK
2846 AC_MSG_RESULT(yes)
2847 AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
77431568 2848 AC_DEFINE(CURL_EXTERN_SYMBOL, [__attribute__ ((visibility ("default")))], [to make a symbol visible])
77431568 2849 CFLAGS="$CFLAGS -fvisibility=hidden"
f13ac35e
DF
2850 else
2851 AC_MSG_RESULT(no)
2852 fi
10489879 2853
f13ac35e 2854 else
77431568
GK
2855 dnl Test for SunPro cc
2856 if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
10489879 2857 AC_MSG_RESULT(yes)
77431568 2858 AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
77431568 2859 AC_DEFINE(CURL_EXTERN_SYMBOL, [__global], [to make a symbol visible])
77431568 2860 CFLAGS="$CFLAGS -xldscope=hidden"
10489879
DF
2861 else
2862 AC_MSG_RESULT(no)
2863 fi
f13ac35e 2864 fi
59582a9d
DF
2865 ;;
2866 esac ],
2867 AC_MSG_RESULT(no)
2868)
2869
8dabd344
DS
2870dnl ************************************************************
2871dnl enforce SONAME bump
966cc10f 2872dnl
8dabd344 2873
8dabd344
DS
2874AC_MSG_CHECKING([whether to enforce SONAME bump])
2875AC_ARG_ENABLE(soname-bump,
2876AC_HELP_STRING([--enable-soname-bump],[Enable enforced SONAME bump])
2877AC_HELP_STRING([--disable-soname-bump],[Disable enforced SONAME bump]),
2878[ case "$enableval" in
2879 yes) AC_MSG_RESULT(yes)
2880 soname_bump=yes
2881 ;;
2882 *)
d7d56184 2883 AC_MSG_RESULT(no)
8dabd344
DS
2884 ;;
2885 esac ],
3f3d6ebe 2886 AC_MSG_RESULT($soname_bump)
8dabd344
DS
2887)
2888AM_CONDITIONAL(SONAME_BUMP, test x$soname_bump = xyes)
2889
2890
59582a9d 2891dnl ************************************************************
560a82ae 2892if test ! -z "$winsock_LIB"; then
9f3d9da1
DS
2893
2894 dnl If ws2_32 is wanted, make sure it is the _last_ lib in LIBS (makes
2895 dnl things work when built with c-ares). But we can't just move it last
2896 dnl since then other stuff (SSL) won't build. So we simply append it to the
2897 dnl end.
2898
560a82ae
YT
2899 LIBS="$LIBS $winsock_LIB"
2900 TEST_SERVER_LIBS="$TEST_SERVER_LIBS $winsock_LIB"
9f3d9da1
DS
2901
2902fi
2903
a0a47f27
DF
2904dnl
2905dnl All the library dependencies put into $LIB apply to libcurl only.
2906dnl Those in $CURL_LIBS apply to the curl command-line client only.
c461254d 2907dnl Those in $TEST_SERVER_LIBS apply to test servers only.
a0a47f27
DF
2908dnl Those in $ALL_LIBS apply to all targets, including test targets.
2909dnl
2910LIBCURL_LIBS=$LIBS
a0a47f27
DF
2911
2912AC_SUBST(LIBCURL_LIBS)
2913AC_SUBST(CURL_LIBS)
2914AC_SUBST(TEST_SERVER_LIBS)
50a1d5ee 2915AC_SUBST(CURL_NETWORK_LIBS)
c461254d 2916LIBS=$ALL_LIBS dnl LIBS is a magic variable that's used for every link
a0a47f27 2917
20705ca3
DS
2918AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
2919
a1312859
DS
2920dnl yes or no
2921ENABLE_SHARED="$enable_shared"
2922AC_SUBST(ENABLE_SHARED)
2923
bbc002a5
DS
2924dnl
2925dnl For keeping supported features and protocols also in pkg-config file
2926dnl since it is more cross-compile frient than curl-config
2927dnl
2928
2929if test "x$USE_SSLEAY" = "x1"; then
2930 SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
2931elif test -n "$SSL_ENABLED"; then
2932 SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
2933fi
2934if test "@KRB4_ENABLED@" = "x1"; then
2935 SUPPORT_FEATURES="$SUPPORT_FEATURES KRB4"
2936fi
2937if test "x$IPV6_ENABLED" = "x1"; then
2938 SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6"
2939fi
2940if test "x$HAVE_LIBZ" = "x1"; then
2941 SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
2942fi
79dc74e8 2943if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1"; then
bbc002a5
DS
2944 SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
2945fi
2946if test "x$IDN_ENABLED" = "x1"; then
2947 SUPPORT_FEATURES="$SUPPORT_FEATURES IDN"
2948fi
2949if test "x$USE_WINDOWS_SSPI" = "x1"; then
2950 SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
2951fi
6eb48494
DF
2952if test "x$CURL_DISABLE_HTTP" != "x1"; then
2953 if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
2954 -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1"; then
2955 SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
2956 fi
bbc002a5 2957fi
59cf93cc
QS
2958if test "x$USE_TLS_SRP" = "x1"; then
2959 SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
2960fi
bbc002a5
DS
2961
2962AC_SUBST(SUPPORT_FEATURES)
2963
2964dnl For supported protocols in pkg-config file
2965if test "x$CURL_DISABLE_HTTP" != "x1"; then
2966 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP"
2967 if test "x$SSL_ENABLED" = "x1"; then
2968 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS"
2969 fi
2970fi
2971if test "x$CURL_DISABLE_FTP" != "x1"; then
2972 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP"
2973 if test "x$SSL_ENABLED" = "x1"; then
2974 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS"
2975 fi
2976fi
2977if test "x$CURL_DISABLE_FILE" != "x1"; then
2978 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE"
2979fi
2980if test "x$CURL_DISABLE_TELNET" != "x1"; then
2981 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET"
2982fi
89da5324 2983if test "x$CURL_DISABLE_LDAP" != "x1"; then
bbc002a5 2984 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP"
89da5324
YT
2985 if test "x$CURL_DISABLE_LDAPS" != "x1"; then
2986 if (test "x$USE_OPENLDAP" = "x1" && test "x$SSL_ENABLED" = "x1") ||
2987 (test "x$USE_OPENLDAP" != "x1" && test "x$HAVE_LDAP_SSL" = "x1"); then
2988 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS"
2989 fi
b1c1b9bb 2990 fi
bbc002a5
DS
2991fi
2992if test "x$CURL_DISABLE_DICT" != "x1"; then
2993 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT"
2994fi
2995if test "x$CURL_DISABLE_TFTP" != "x1"; then
2996 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP"
2997fi
201637d4
CK
2998if test "x$CURL_DISABLE_GOPHER" != "x1"; then
2999 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER"
3000fi
92b9b468
DS
3001if test "x$CURL_DISABLE_POP3" != "x1"; then
3002 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3"
30eb452a
DS
3003 if test "x$SSL_ENABLED" = "x1"; then
3004 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3S"
3005 fi
92b9b468
DS
3006fi
3007if test "x$CURL_DISABLE_IMAP" != "x1"; then
3008 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAP"
30eb452a
DS
3009 if test "x$SSL_ENABLED" = "x1"; then
3010 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS"
3011 fi
92b9b468
DS
3012fi
3013if test "x$CURL_DISABLE_SMTP" != "x1"; then
3014 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP"
30eb452a
DS
3015 if test "x$SSL_ENABLED" = "x1"; then
3016 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTPS"
3017 fi
92b9b468 3018fi
bbc002a5
DS
3019if test "x$USE_LIBSSH2" = "x1"; then
3020 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
3021 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
3022fi
bc4582b6
DS
3023if test "x$CURL_DISABLE_RTSP" != "x1"; then
3024 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP"
3025fi
04cb15ae 3026if test "x$USE_LIBRTMP" = "x1"; then
027ceb37 3027 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP"
04cb15ae 3028fi
bbc002a5 3029
c047fe8e
DS
3030dnl replace spaces with newlines
3031dnl sort the lines
3032dnl replace the newlines back to spaces
3033SUPPORT_PROTOCOLS=`echo $SUPPORT_PROTOCOLS | tr ' ' '\012' | sort | tr '\012' ' '`
3034
bbc002a5
DS
3035AC_SUBST(SUPPORT_PROTOCOLS)
3036
d930280a
YT
3037dnl squeeze whitespace out of some variables
3038
be760bed
YT
3039squeeze CFLAGS
3040squeeze CPPFLAGS
3041squeeze DEFS
3042squeeze LDFLAGS
3043squeeze LIBS
3044
3045squeeze CURL_LIBS
3046squeeze LIBCURL_LIBS
3047squeeze TEST_SERVER_LIBS
50a1d5ee 3048squeeze CURL_NETWORK_LIBS
d930280a 3049
4a8a7314
YT
3050squeeze SUPPORT_FEATURES
3051squeeze SUPPORT_PROTOCOLS
3052
065047dc 3053if test "x$want_curldebug_assumed" = "xyes" &&
22ed0f50 3054 test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then
675d6ec5
YT
3055 ac_configure_args="$ac_configure_args --enable-curldebug"
3056fi
3057
93c53424 3058AC_CONFIG_FILES([Makefile \
77431568 3059 docs/Makefile \
d54cdf29 3060 docs/examples/Makefile \
e22657ea 3061 docs/libcurl/Makefile \
77431568
GK
3062 include/Makefile \
3063 include/curl/Makefile \
3064 src/Makefile \
172f0ba1 3065 lib/Makefile \
044ca343 3066 tests/Makefile \
b915ca68 3067 tests/data/Makefile \
fd8bf5f1 3068 tests/server/Makefile \
2aa0c6c4 3069 tests/libtest/Makefile \
35e1d653 3070 tests/unit/Makefile \
77431568
GK
3071 packages/Makefile \
3072 packages/Win32/Makefile \
3073 packages/Win32/cygwin/Makefile \
3074 packages/Linux/Makefile \
3075 packages/Linux/RPM/Makefile \
3076 packages/Linux/RPM/curl.spec \
3077 packages/Linux/RPM/curl-ssl.spec \
c503930b 3078 packages/Solaris/Makefile \
34f9ab10
DS
3079 packages/EPM/curl.list \
3080 packages/EPM/Makefile \
f19cade5 3081 packages/vms/Makefile \
c7e9e60b
DS
3082 packages/AIX/Makefile \
3083 packages/AIX/RPM/Makefile \
15f2647d 3084 packages/AIX/RPM/curl.spec \
df3ca591
DS
3085 curl-config \
3086 libcurl.pc
93c53424
DS
3087])
3088AC_OUTPUT
cff90cf3 3089
ef24ecde
YT
3090CURL_GENERATE_CONFIGUREHELP_PM
3091
cff90cf3
DS
3092AC_MSG_NOTICE([Configured to build curl/libcurl:
3093
0355e33b 3094 curl version: ${CURLVERSION}
cff90cf3
DS
3095 Host setup: ${host}
3096 Install prefix: ${prefix}
3097 Compiler: ${CC}
3098 SSL support: ${curl_ssl_msg}
2147284c 3099 SSH support: ${curl_ssh_msg}
cff90cf3
DS
3100 zlib support: ${curl_zlib_msg}
3101 krb4 support: ${curl_krb4_msg}
3102 GSSAPI support: ${curl_gss_msg}
48975876 3103 SPNEGO support: ${curl_spnego_msg}
59cf93cc 3104 TLS-SRP support: ${curl_tls_srp_msg}
79dc74e8 3105 resolver: ${curl_res_msg}
cff90cf3 3106 ipv6 support: ${curl_ipv6_msg}
96002646 3107 IDN support: ${curl_idn_msg}
e16c1b8e 3108 Build libcurl: Shared=${enable_shared}, Static=${enable_static}
cff90cf3 3109 Built-in manual: ${curl_manual_msg}
710e370c 3110 Verbose errors: ${curl_verbose_msg}
8ed31c48 3111 SSPI support: ${curl_sspi_msg}
86cbb232
MM
3112 ca cert bundle: ${ca}
3113 ca cert path: ${capath}
d0edb478 3114 LDAP support: ${curl_ldap_msg}
966cc10f 3115 LDAPS support: ${curl_ldaps_msg}
bc4582b6 3116 RTSP support: ${curl_rtsp_msg}
04cb15ae 3117 RTMP support: ${curl_rtmp_msg}
19b8a80e 3118 Protocols: ${SUPPORT_PROTOCOLS}
cff90cf3 3119])
3f3d6ebe
DS
3120
3121if test "x$soname_bump" = "xyes"; then
3122
3123cat <<EOM
3124 SONAME bump: yes - WARNING: this library will be built with the SONAME
3125 number bumped due to (a detected) ABI breakage.
3126 See lib/README.curl_off_t for details on this.
3127EOM
3128
3129fi
3130