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