1 #***************************************************************************
3 # Project ___| | | | _ \| |
5 # | (__| |_| | _ <| |___
6 # \___|\___/|_| \_\_____|
8 # Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
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.
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.
18 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 # KIND, either express or implied.
21 #***************************************************************************
22 dnl Process this file with autoconf to produce a configure script.
26 dnl We don't know the version number "statically" so we use a dash here
27 AC_INIT([curl], [-], [a suitable curl mailing list: http://curl.haxx.se/mail/])
30 CURL_OVERRIDE_AUTOCONF
32 dnl configure script copyright
33 AC_COPYRIGHT([Copyright (c) 1998 - 2012 Daniel Stenberg, <daniel@haxx.se>
34 This configure script may be copied, distributed and modified under the
35 terms of the curl license; see COPYING for more details])
37 AC_CONFIG_SRCDIR([lib/urldata.h])
38 AC_CONFIG_HEADERS(lib/curl_config.h include/curl/curlbuild.h)
39 AC_CONFIG_MACRO_DIR([m4])
42 CURL_CHECK_OPTION_DEBUG
43 CURL_CHECK_OPTION_OPTIMIZE
44 CURL_CHECK_OPTION_WARNINGS
45 CURL_CHECK_OPTION_WERROR
46 CURL_CHECK_OPTION_CURLDEBUG
47 CURL_CHECK_OPTION_SYMBOL_HIDING
48 CURL_CHECK_OPTION_ARES
50 CURL_CHECK_PATH_SEPARATOR_REQUIRED
53 # save the configure arguments
55 CONFIGURE_OPTIONS="\"$ac_configure_args\""
56 AC_SUBST(CONFIGURE_OPTIONS)
59 if test X"$want_werror" = Xyes; then
60 CURL_CFLAG_EXTRAS="-Werror"
62 AC_SUBST(CURL_CFLAG_EXTRAS)
64 dnl SED is mandatory for configure process and libtool.
65 dnl Set it now, allowing it to be changed later.
66 if test -z "$SED"; then
67 dnl allow it to be overridden
68 AC_PATH_PROG([SED], [sed], [not_found],
69 [$PATH:/usr/bin:/usr/local/bin])
70 if test -z "$SED" || test "$SED" = "not_found"; then
71 AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
76 dnl GREP is mandatory for configure process and libtool.
77 dnl Set it now, allowing it to be changed later.
78 if test -z "$GREP"; then
79 dnl allow it to be overridden
80 AC_PATH_PROG([GREP], [grep], [not_found],
81 [$PATH:/usr/bin:/usr/local/bin])
82 if test -z "$GREP" || test "$GREP" = "not_found"; then
83 AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
88 dnl EGREP is mandatory for configure process and libtool.
89 dnl Set it now, allowing it to be changed later.
90 if test -z "$EGREP"; then
91 dnl allow it to be overridden
92 if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
93 AC_MSG_CHECKING([for egrep])
95 AC_MSG_RESULT([$EGREP])
97 AC_PATH_PROG([EGREP], [egrep], [not_found],
98 [$PATH:/usr/bin:/usr/local/bin])
101 if test -z "$EGREP" || test "$EGREP" = "not_found"; then
102 AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.])
106 dnl AR is mandatory for configure process and libtool.
107 dnl This is target dependent, so check it as a tool.
108 if test -z "$AR"; then
109 dnl allow it to be overridden
110 AC_PATH_TOOL([AR], [ar], [not_found],
111 [$PATH:/usr/bin:/usr/local/bin])
112 if test -z "$AR" || test "$AR" = "not_found"; then
113 AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
120 dnl Remove non-configure distributed curlbuild.h
121 if test -f ${srcdir}/include/curl/curlbuild.h; then
122 rm -f ${srcdir}/include/curl/curlbuild.h
125 dnl figure out the libcurl version
126 CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
128 AC_MSG_CHECKING([curl version])
129 AC_MSG_RESULT($CURLVERSION)
131 AC_SUBST(CURLVERSION)
134 dnl we extract the numerical version for curl-config only
135 VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curlver.h`
138 dnl Solaris pkgadd support definitions
139 PKGADD_PKG="HAXXcurl"
140 PKGADD_NAME="cURL - a client that groks URLs"
141 PKGADD_VENDOR="curl.haxx.se"
143 AC_SUBST(PKGADD_NAME)
144 AC_SUBST(PKGADD_VENDOR)
147 dnl initialize all the info variables
148 curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls,winssl} )"
149 curl_ssh_msg="no (--with-libssh2)"
150 curl_zlib_msg="no (--with-zlib)"
151 curl_krb4_msg="no (--with-krb4*)"
152 curl_gss_msg="no (--with-gssapi)"
153 curl_spnego_msg="no (--with-spnego)"
154 curl_tls_srp_msg="no (--enable-tls-srp)"
155 curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
156 curl_ipv6_msg="no (--enable-ipv6)"
157 curl_idn_msg="no (--with-{libidn,winidn})"
158 curl_manual_msg="no (--enable-manual)"
159 curl_libcurl_msg="enabled (--disable-libcurl-option)"
160 curl_verbose_msg="enabled (--disable-verbose)"
161 curl_sspi_msg="no (--enable-sspi)"
162 curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
163 curl_ldaps_msg="no (--enable-ldaps)"
164 curl_rtsp_msg="no (--enable-rtsp)"
165 curl_rtmp_msg="no (--with-librtmp)"
166 curl_mtlnk_msg="no (--with-libmetalink)"
168 init_ssl_msg=${curl_ssl_msg}
171 dnl LIBS should only specify libraries
174 for word1 in $LIBS; do
184 if test "$tst_bad_spec" = "yes"; then
185 AC_MSG_WARN([invalid LIBS: $LIBS])
186 AC_MSG_ERROR([LIBS may only be used to specify libraries (-lname).])
190 dnl LDFLAGS should only specify linker flags
194 for word1 in $LDFLAGS; do
198 tst_bad_msg="not macro definitions. Use CPPFLAGS for these."
202 tst_bad_msg="not macro suppressions. Use CPPFLAGS for these."
206 tst_bad_msg="not include directories. Use CPPFLAGS for these."
210 tst_bad_msg="not libraries. Use LIBS for these."
214 if test "$tst_bad_spec" = "yes"; then
215 AC_MSG_WARN([invalid LDFLAGS: $LDFLAGS])
216 AC_MSG_ERROR([LDFLAGS may only be used to specify linker flags, $tst_bad_msg])
220 dnl CPPFLAGS should only specify C preprocessor flags
224 for word1 in $CPPFLAGS; do
228 tst_bad_msg="not library runtime directories. Use LDFLAGS for these."
230 -L* | --library-path=*)
232 tst_bad_msg="not library directories. Use LDFLAGS for these."
236 tst_bad_msg="not libraries. Use LIBS for these."
240 if test "$tst_bad_spec" = "yes"; then
241 AC_MSG_WARN([invalid CPPFLAGS: $CPPFLAGS])
242 AC_MSG_ERROR([CPPFLAGS may only be used to specify C preprocessor flags, $tst_bad_msg])
246 dnl CFLAGS should only specify C compiler flags
250 for word1 in $CFLAGS; do
254 tst_bad_msg="not macro definitions. Use CPPFLAGS for these."
258 tst_bad_msg="not macro suppressions. Use CPPFLAGS for these."
262 tst_bad_msg="not include directories. Use CPPFLAGS for these."
266 tst_bad_msg="not library runtime directories. Use LDFLAGS for these."
268 -L* | --library-path=*)
270 tst_bad_msg="not library directories. Use LDFLAGS for these."
274 tst_bad_msg="not libraries. Use LIBS for these."
278 if test "$tst_bad_spec" = "yes"; then
279 AC_MSG_WARN([invalid CFLAGS: $CFLAGS])
280 AC_MSG_ERROR([CFLAGS may only be used to specify C compiler flags, $tst_bad_msg])
284 dnl Save some initial values the user might have provided
286 INITIAL_LDFLAGS=$LDFLAGS
290 dnl Detect the canonical host and target build environment
294 dnl Get system canonical name
295 AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
297 dnl Checks for programs.
300 dnl Our curl_off_t internal and external configure settings
301 CURL_CONFIGURE_CURL_OFF_T
303 dnl This defines _ALL_SOURCE for AIX
304 CURL_CHECK_AIX_ALL_SOURCE
306 dnl Our configure and build reentrant settings
307 CURL_CONFIGURE_THREAD_SAFE
308 CURL_CONFIGURE_REENTRANT
310 dnl check for how to do large files
313 dnl support building of Windows DLLs
316 dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD
317 AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)])
319 x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
328 AC_MSG_CHECKING([if compiler is icc (to build with PIC)])
342 AC_MSG_CHECKING([if we need -mimpure-text])
346 if test "$GCC" = "yes"; then
353 AC_MSG_RESULT($mimpure)
354 AM_CONDITIONAL(MIMPURE, test x$mimpure = xyes)
356 AC_MSG_CHECKING([if we need BUILDING_LIBCURL])
357 use_cppflag_building_libcurl="no"
358 use_cppflag_curl_staticlib="no"
359 CPPFLAG_CURL_STATICLIB=""
363 use_cppflag_building_libcurl="yes"
364 AC_MSG_CHECKING([if we need CURL_STATICLIB])
365 if test "X$enable_shared" = "Xno"
368 use_cppflag_curl_staticlib="yes"
369 CPPFLAG_CURL_STATICLIB="-DCURL_STATICLIB"
378 AM_CONDITIONAL(USE_CPPFLAG_BUILDING_LIBCURL, test x$use_cppflag_building_libcurl = xyes)
379 AM_CONDITIONAL(USE_CPPFLAG_CURL_STATICLIB, test x$use_cppflag_curl_staticlib = xyes)
380 AC_SUBST(CPPFLAG_CURL_STATICLIB)
382 # Determine whether all dependent libraries must be specified when linking
383 if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno"
389 AC_SUBST(REQUIRE_LIB_DEPS)
390 AM_CONDITIONAL(USE_EXPLICIT_LIB_DEPS, test x$REQUIRE_LIB_DEPS = xyes)
392 dnl The install stuff has already been taken care of by the automake stuff
396 dnl check if there's a way to force code inline
399 dnl **********************************************************************
400 dnl platform/compiler/architecture specific checks/flags
401 dnl **********************************************************************
404 CURL_SET_COMPILER_BASIC_OPTS
405 CURL_SET_COMPILER_DEBUG_OPTS
406 CURL_SET_COMPILER_OPTIMIZE_OPTS
407 CURL_SET_COMPILER_WARNING_OPTS
409 if test "$compiler_id" = "INTEL_UNIX_C"; then
411 if test "$compiler_num" -ge "1000"; then
412 dnl icc 10.X or later
413 CFLAGS="$CFLAGS -shared-intel"
414 elif test "$compiler_num" -ge "900"; then
416 CFLAGS="$CFLAGS -i-dynamic"
421 CURL_CHECK_COMPILER_HALT_ON_ERROR
422 CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
423 CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH
424 CURL_CHECK_COMPILER_SYMBOL_HIDING
426 CURL_CHECK_NO_UNDEFINED
427 AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
430 AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
432 supports_unittests=yes
433 # cross-compilation of unit tests static library/programs fails when
434 # libcurl shared library is built. This might be due to a libtool or
435 # automake issue. In this case we disable unit tests.
436 if test "x$cross_compiling" != "xno" &&
437 test "x$enable_shared" != "xno"; then
438 supports_unittests=no
441 # IRIX 6.5.24 gcc 3.3 autobuilds fail unittests library compilation due to
442 # a problem related with OpenSSL headers and library versions not matching.
443 # Disable unit tests while time to further investigate this is found.
446 if test "$compiler_id" = "GNU_C"; then
447 supports_unittests=no
452 # All AIX autobuilds fails unit tests linking against unittests library
453 # due to unittests library being built with no symbols or members. Libtool ?
454 # Disable unit tests while time to further investigate this is found.
457 supports_unittests=no
461 dnl Build unit tests when option --enable-debug is given.
462 if test "x$want_debug" = "xyes" &&
463 test "x$supports_unittests" = "xyes"; then
468 AM_CONDITIONAL(BUILD_UNITTESTS, test x$want_unittests = xyes)
470 dnl **********************************************************************
471 dnl Compilation based checks should not be done before this point.
472 dnl **********************************************************************
474 dnl **********************************************************************
475 dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
476 dnl and ws2tcpip.h take precedence over any other further checks which
477 dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
478 dnl this specific header files. And do them before its results are used.
479 dnl **********************************************************************
481 CURL_CHECK_HEADER_WINDOWS
482 CURL_CHECK_NATIVE_WINDOWS
483 case X-"$ac_cv_native_windows" in
485 CURL_CHECK_HEADER_WINSOCK
486 CURL_CHECK_HEADER_WINSOCK2
487 CURL_CHECK_HEADER_WS2TCPIP
488 CURL_CHECK_HEADER_WINLDAP
489 CURL_CHECK_HEADER_WINBER
492 ac_cv_header_winsock_h="no"
493 ac_cv_header_winsock2_h="no"
494 ac_cv_header_ws2tcpip_h="no"
495 ac_cv_header_winldap_h="no"
496 ac_cv_header_winber_h="no"
499 CURL_CHECK_WIN32_LARGEFILE
501 dnl ************************************************************
502 dnl switch off particular protocols
504 AC_MSG_CHECKING([whether to support http])
506 AC_HELP_STRING([--enable-http],[Enable HTTP support])
507 AC_HELP_STRING([--disable-http],[Disable HTTP support]),
508 [ case "$enableval" in
511 AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP])
512 AC_MSG_WARN([disable HTTP disables FTP over proxy and RTSP])
513 AC_SUBST(CURL_DISABLE_HTTP, [1])
514 AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
515 AC_SUBST(CURL_DISABLE_RTSP, [1])
517 *) AC_MSG_RESULT(yes)
522 AC_MSG_CHECKING([whether to support ftp])
524 AC_HELP_STRING([--enable-ftp],[Enable FTP support])
525 AC_HELP_STRING([--disable-ftp],[Disable FTP support]),
526 [ case "$enableval" in
529 AC_DEFINE(CURL_DISABLE_FTP, 1, [to disable FTP])
530 AC_SUBST(CURL_DISABLE_FTP, [1])
532 *) AC_MSG_RESULT(yes)
537 AC_MSG_CHECKING([whether to support file])
539 AC_HELP_STRING([--enable-file],[Enable FILE support])
540 AC_HELP_STRING([--disable-file],[Disable FILE support]),
541 [ case "$enableval" in
544 AC_DEFINE(CURL_DISABLE_FILE, 1, [to disable FILE])
545 AC_SUBST(CURL_DISABLE_FILE, [1])
547 *) AC_MSG_RESULT(yes)
552 AC_MSG_CHECKING([whether to support ldap])
554 AC_HELP_STRING([--enable-ldap],[Enable LDAP support])
555 AC_HELP_STRING([--disable-ldap],[Disable LDAP support]),
556 [ case "$enableval" in
559 AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
560 AC_SUBST(CURL_DISABLE_LDAP, [1])
568 AC_MSG_CHECKING([whether to support ldaps])
570 AC_HELP_STRING([--enable-ldaps],[Enable LDAPS support])
571 AC_HELP_STRING([--disable-ldaps],[Disable LDAPS support]),
572 [ case "$enableval" in
575 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
576 AC_SUBST(CURL_DISABLE_LDAPS, [1])
578 *) if test "x$CURL_DISABLE_LDAP" = "x1" ; then
579 AC_MSG_RESULT(LDAP needs to be enabled to support LDAPS)
580 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
581 AC_SUBST(CURL_DISABLE_LDAPS, [1])
584 AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
585 AC_SUBST(HAVE_LDAP_SSL, [1])
589 if test "x$CURL_DISABLE_LDAP" = "x1" ; then
591 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
592 AC_SUBST(CURL_DISABLE_LDAPS, [1])
595 AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
596 AC_SUBST(HAVE_LDAP_SSL, [1])
600 AC_MSG_CHECKING([whether to support rtsp])
602 AC_HELP_STRING([--enable-rtsp],[Enable RTSP support])
603 AC_HELP_STRING([--disable-rtsp],[Disable RTSP support]),
604 [ case "$enableval" in
607 AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
608 AC_SUBST(CURL_DISABLE_RTSP, [1])
610 *) if test x$CURL_DISABLE_HTTP = x1 ; then
611 AC_MSG_ERROR(HTTP support needs to be enabled in order to enable RTSP support!)
614 curl_rtsp_msg="enabled"
618 if test "x$CURL_DISABLE_HTTP" != "x1"; then
620 curl_rtsp_msg="enabled"
626 AC_MSG_CHECKING([whether to support proxies])
628 AC_HELP_STRING([--enable-proxy],[Enable proxy support])
629 AC_HELP_STRING([--disable-proxy],[Disable proxy support]),
630 [ case "$enableval" in
633 AC_DEFINE(CURL_DISABLE_PROXY, 1, [to disable proxies])
634 AC_SUBST(CURL_DISABLE_PROXY, [1])
636 *) AC_MSG_RESULT(yes)
642 AC_MSG_CHECKING([whether to support dict])
644 AC_HELP_STRING([--enable-dict],[Enable DICT support])
645 AC_HELP_STRING([--disable-dict],[Disable DICT support]),
646 [ case "$enableval" in
649 AC_DEFINE(CURL_DISABLE_DICT, 1, [to disable DICT])
650 AC_SUBST(CURL_DISABLE_DICT, [1])
652 *) AC_MSG_RESULT(yes)
657 AC_MSG_CHECKING([whether to support telnet])
658 AC_ARG_ENABLE(telnet,
659 AC_HELP_STRING([--enable-telnet],[Enable TELNET support])
660 AC_HELP_STRING([--disable-telnet],[Disable TELNET support]),
661 [ case "$enableval" in
664 AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET])
665 AC_SUBST(CURL_DISABLE_TELNET, [1])
667 *) AC_MSG_RESULT(yes)
672 AC_MSG_CHECKING([whether to support tftp])
674 AC_HELP_STRING([--enable-tftp],[Enable TFTP support])
675 AC_HELP_STRING([--disable-tftp],[Disable TFTP support]),
676 [ case "$enableval" in
679 AC_DEFINE(CURL_DISABLE_TFTP, 1, [to disable TFTP])
680 AC_SUBST(CURL_DISABLE_TFTP, [1])
682 *) AC_MSG_RESULT(yes)
688 AC_MSG_CHECKING([whether to support pop3])
690 AC_HELP_STRING([--enable-pop3],[Enable POP3 support])
691 AC_HELP_STRING([--disable-pop3],[Disable POP3 support]),
692 [ case "$enableval" in
695 AC_DEFINE(CURL_DISABLE_POP3, 1, [to disable POP3])
696 AC_SUBST(CURL_DISABLE_POP3, [1])
698 *) AC_MSG_RESULT(yes)
705 AC_MSG_CHECKING([whether to support imap])
707 AC_HELP_STRING([--enable-imap],[Enable IMAP support])
708 AC_HELP_STRING([--disable-imap],[Disable IMAP support]),
709 [ case "$enableval" in
712 AC_DEFINE(CURL_DISABLE_IMAP, 1, [to disable IMAP])
713 AC_SUBST(CURL_DISABLE_IMAP, [1])
715 *) AC_MSG_RESULT(yes)
722 AC_MSG_CHECKING([whether to support smtp])
724 AC_HELP_STRING([--enable-smtp],[Enable SMTP support])
725 AC_HELP_STRING([--disable-smtp],[Disable SMTP support]),
726 [ case "$enableval" in
729 AC_DEFINE(CURL_DISABLE_SMTP, 1, [to disable SMTP])
730 AC_SUBST(CURL_DISABLE_SMTP, [1])
732 *) AC_MSG_RESULT(yes)
738 AC_MSG_CHECKING([whether to support gopher])
739 AC_ARG_ENABLE(gopher,
740 AC_HELP_STRING([--enable-gopher],[Enable Gopher support])
741 AC_HELP_STRING([--disable-gopher],[Disable Gopher support]),
742 [ case "$enableval" in
745 AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable Gopher])
746 AC_SUBST(CURL_DISABLE_GOPHER, [1])
748 *) AC_MSG_RESULT(yes)
755 dnl **********************************************************************
756 dnl Check for built-in manual
757 dnl **********************************************************************
759 AC_MSG_CHECKING([whether to provide built-in manual])
760 AC_ARG_ENABLE(manual,
761 AC_HELP_STRING([--enable-manual],[Enable built-in manual])
762 AC_HELP_STRING([--disable-manual],[Disable built-in manual]),
763 [ case "$enableval" in
767 *) AC_MSG_RESULT(yes)
774 dnl The actual use of the USE_MANUAL variable is done much later in this
775 dnl script to allow other actions to disable it as well.
777 dnl ************************************************************
778 dnl disable C code generation support
780 AC_MSG_CHECKING([whether to enable generation of C code])
781 AC_ARG_ENABLE(libcurl_option,
782 AC_HELP_STRING([--enable-libcurl-option],[Enable --libcurl C code generation support])
783 AC_HELP_STRING([--disable-libcurl-option],[Disable --libcurl C code generation support]),
784 [ case "$enableval" in
787 AC_DEFINE(CURL_DISABLE_LIBCURL_OPTION, 1, [to disable --libcurl C code generation option])
788 curl_libcurl_msg="no"
790 *) AC_MSG_RESULT(yes)
796 dnl **********************************************************************
797 dnl Checks for libraries.
798 dnl **********************************************************************
800 AC_MSG_CHECKING([whether to use libgcc])
801 AC_ARG_ENABLE(libgcc,
802 AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
803 [ case "$enableval" in
816 dnl gethostbyname without lib or in the nsl lib?
817 AC_CHECK_FUNC(gethostbyname,
818 [HAVE_GETHOSTBYNAME="1"
820 [ AC_CHECK_LIB(nsl, gethostbyname,
821 [HAVE_GETHOSTBYNAME="1"
826 if test "$HAVE_GETHOSTBYNAME" != "1"
828 dnl gethostbyname in the socket lib?
829 AC_CHECK_LIB(socket, gethostbyname,
830 [HAVE_GETHOSTBYNAME="1"
831 LIBS="-lsocket $LIBS"
835 if test "$HAVE_GETHOSTBYNAME" != "1"
837 dnl gethostbyname in the watt lib?
838 AC_CHECK_LIB(watt, gethostbyname,
839 [HAVE_GETHOSTBYNAME="1"
840 CPPFLAGS="-I/dev/env/WATT_ROOT/inc"
841 LDFLAGS="-L/dev/env/WATT_ROOT/lib"
846 dnl At least one system has been identified to require BOTH nsl and socket
847 dnl libs at the same time to link properly.
848 if test "$HAVE_GETHOSTBYNAME" != "1"
850 AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs])
851 my_ac_save_LIBS=$LIBS
852 LIBS="-lnsl -lsocket $LIBS"
860 HAVE_GETHOSTBYNAME="1"
863 LIBS=$my_ac_save_LIBS
867 if test "$HAVE_GETHOSTBYNAME" != "1"
869 dnl This is for winsock systems
870 if test "$ac_cv_header_windows_h" = "yes"; then
871 if test "$ac_cv_header_winsock_h" = "yes"; then
874 winsock_LIB="-lwinsock"
877 winsock_LIB="-lwsock32"
881 if test "$ac_cv_header_winsock2_h" = "yes"; then
882 winsock_LIB="-lws2_32"
884 if test ! -z "$winsock_LIB"; then
885 my_ac_save_LIBS=$LIBS
886 LIBS="$winsock_LIB $LIBS"
887 AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
890 #ifdef HAVE_WINDOWS_H
891 #ifndef WIN32_LEAN_AND_MEAN
892 #define WIN32_LEAN_AND_MEAN
895 #ifdef HAVE_WINSOCK2_H
896 #include <winsock2.h>
898 #ifdef HAVE_WINSOCK_H
904 gethostbyname("www.dummysite.com");
908 HAVE_GETHOSTBYNAME="1"
912 LIBS=$my_ac_save_LIBS
918 if test "$HAVE_GETHOSTBYNAME" != "1"
920 dnl This is for Minix 3.1
921 AC_MSG_CHECKING([for gethostbyname for Minix 3])
924 /* Older Minix versions may need <net/gen/netdb.h> here instead */
927 gethostbyname("www.dummysite.com");
931 HAVE_GETHOSTBYNAME="1"
937 if test "$HAVE_GETHOSTBYNAME" != "1"
939 dnl This is for eCos with a stubbed DNS implementation
940 AC_MSG_CHECKING([for gethostbyname for eCos])
946 gethostbyname("www.dummysite.com");
950 HAVE_GETHOSTBYNAME="1"
956 if test "$HAVE_GETHOSTBYNAME" != "1"
958 dnl gethostbyname in the network lib - for Haiku OS
959 AC_CHECK_LIB(network, gethostbyname,
960 [HAVE_GETHOSTBYNAME="1"
961 LIBS="-lnetwork $LIBS"
965 if test "$HAVE_GETHOSTBYNAME" != "1"
967 dnl gethostbyname in the net lib - for BeOS
968 AC_CHECK_LIB(net, gethostbyname,
969 [HAVE_GETHOSTBYNAME="1"
975 if test "$HAVE_GETHOSTBYNAME" != "1"; then
976 AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
980 AC_CHECK_FUNC(strcasecmp, , [ AC_CHECK_LIB(resolve, strcasecmp) ])
982 if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
983 AC_CHECK_LIB(resolve, strcasecmp,
984 [LIBS="-lresolve $LIBS"],
988 ac_cv_func_strcasecmp="no"
990 CURL_CHECK_LIBS_CONNECT
992 CURL_NETWORK_LIBS=$LIBS
994 dnl **********************************************************************
995 dnl In case that function clock_gettime with monotonic timer is available,
996 dnl check for additional required libraries.
997 dnl **********************************************************************
998 CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
1000 dnl **********************************************************************
1001 dnl The preceding library checks are all potentially useful for test
1002 dnl servers and libtest cases which require networking and clock_gettime
1003 dnl support. Save the list of required libraries at this point for use
1004 dnl while linking those test servers and programs.
1005 dnl **********************************************************************
1006 CURL_NETWORK_AND_TIME_LIBS=$LIBS
1008 dnl **********************************************************************
1009 dnl Check for the presence of ZLIB libraries and headers
1010 dnl **********************************************************************
1012 dnl Check for & handle argument to --with-zlib.
1014 clean_CPPFLAGS=$CPPFLAGS
1015 clean_LDFLAGS=$LDFLAGS
1019 AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
1020 AC_HELP_STRING([--without-zlib],[disable use of zlib]),
1021 [OPT_ZLIB="$withval"])
1023 if test "$OPT_ZLIB" = "no" ; then
1024 AC_MSG_WARN([zlib disabled])
1026 if test "$OPT_ZLIB" = "yes" ; then
1030 if test -z "$OPT_ZLIB" ; then
1031 dnl check for the lib first without setting any new path, since many
1032 dnl people have it in the default path
1034 AC_CHECK_LIB(z, inflateEnd,
1035 dnl libz found, set the variable
1038 dnl if no lib found, try /usr/local
1039 [OPT_ZLIB="/usr/local"])
1043 dnl Add a nonempty path to the compiler flags
1044 if test -n "$OPT_ZLIB"; then
1045 CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
1046 LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
1049 AC_CHECK_HEADER(zlib.h,
1051 dnl zlib.h was found
1053 dnl if the lib wasn't found already, try again with the new paths
1054 if test "$HAVE_LIBZ" != "1"; then
1055 AC_CHECK_LIB(z, gzread,
1057 dnl the lib was found!
1061 [ CPPFLAGS=$clean_CPPFLAGS
1062 LDFLAGS=$clean_LDFLAGS])
1066 dnl zlib.h was not found, restore the flags
1067 CPPFLAGS=$clean_CPPFLAGS
1068 LDFLAGS=$clean_LDFLAGS]
1071 if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
1073 AC_MSG_WARN([configure found only the libz lib, not the header file!])
1075 CPPFLAGS=$clean_CPPFLAGS
1076 LDFLAGS=$clean_LDFLAGS
1078 elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
1080 AC_MSG_WARN([configure found only the libz header file, not the lib!])
1081 CPPFLAGS=$clean_CPPFLAGS
1082 LDFLAGS=$clean_LDFLAGS
1084 elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
1086 dnl both header and lib were found!
1088 AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file])
1089 AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
1092 LIBS="-lz $clean_LIBS"
1094 dnl replace 'HAVE_LIBZ' in the automake makefile.ams
1096 AC_MSG_NOTICE([found both libz and libz.h header])
1097 curl_zlib_msg="enabled"
1101 dnl set variable for use in automakefile(s)
1102 AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1)
1105 dnl **********************************************************************
1107 dnl **********************************************************************
1110 AC_ARG_WITH(ldap-lib,
1111 AC_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]),
1112 [LDAPLIBNAME="$withval"])
1115 AC_ARG_WITH(lber-lib,
1116 AC_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]),
1117 [LBERLIBNAME="$withval"])
1119 if test x$CURL_DISABLE_LDAP != x1 ; then
1121 CURL_CHECK_HEADER_LBER
1122 CURL_CHECK_HEADER_LDAP
1123 CURL_CHECK_HEADER_LDAPSSL
1124 CURL_CHECK_HEADER_LDAP_SSL
1126 if test -z "$LDAPLIBNAME" ; then
1127 if test "$ac_cv_native_windows" = "yes"; then
1128 dnl Windows uses a single and unique LDAP library name
1129 LDAPLIBNAME="wldap32"
1134 if test "$LDAPLIBNAME" ; then
1135 AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [
1136 AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled])
1137 AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
1138 AC_SUBST(CURL_DISABLE_LDAP, [1])
1139 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
1140 AC_SUBST(CURL_DISABLE_LDAPS, [1])])
1142 dnl Try to find the right ldap libraries for this system
1143 CURL_CHECK_LIBS_LDAP
1144 case X-"$curl_cv_ldap_LIBS" in
1146 AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled])
1147 AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
1148 AC_SUBST(CURL_DISABLE_LDAP, [1])
1149 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
1150 AC_SUBST(CURL_DISABLE_LDAPS, [1])
1156 if test x$CURL_DISABLE_LDAP != x1 ; then
1158 if test "$LBERLIBNAME" ; then
1159 dnl If name is "no" then don't define this library at all
1160 dnl (it's only needed if libldap.so's dependencies are broken).
1161 if test "$LBERLIBNAME" != "no" ; then
1162 AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [
1163 AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled])
1164 AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
1165 AC_SUBST(CURL_DISABLE_LDAP, [1])
1166 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
1167 AC_SUBST(CURL_DISABLE_LDAPS, [1])])
1172 if test x$CURL_DISABLE_LDAP != x1 ; then
1173 AC_CHECK_FUNCS([ldap_url_parse ldap_init_fd])
1175 if test "$LDAPLIBNAME" = "wldap32"; then
1176 curl_ldap_msg="enabled (winldap)"
1177 AC_DEFINE(CURL_LDAP_WIN, 1, [Use Windows LDAP implementation])
1179 curl_ldap_msg="enabled (OpenLDAP)"
1180 if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
1181 AC_DEFINE(USE_OPENLDAP, 1, [Use OpenLDAP-specific code])
1182 AC_SUBST(USE_OPENLDAP, [1])
1187 if test x$CURL_DISABLE_LDAPS != x1 ; then
1188 curl_ldaps_msg="enabled"
1191 dnl **********************************************************************
1193 dnl **********************************************************************
1195 AC_MSG_CHECKING([whether to enable ipv6])
1197 AC_HELP_STRING([--enable-ipv6],[Enable ipv6 (with ipv4) support])
1198 AC_HELP_STRING([--disable-ipv6],[Disable ipv6 support]),
1199 [ case "$enableval" in
1204 *) AC_MSG_RESULT(yes)
1209 AC_TRY_RUN([ /* is AF_INET6 available? */
1210 #include <sys/types.h>
1211 #include <sys/socket.h>
1214 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
1228 if test "$ipv6" = "yes"; then
1229 curl_ipv6_msg="enabled"
1232 # Check if struct sockaddr_in6 have sin6_scope_id member
1233 if test "$ipv6" = yes; then
1234 AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
1236 #include <sys/types.h>
1237 #include <netinet/in.h>] ,
1238 struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes)
1239 if test "$have_sin6_scope_id" = yes; then
1240 AC_MSG_RESULT([yes])
1241 AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member])
1247 dnl **********************************************************************
1248 dnl Check if the operating system allows programs to write to their own argv[]
1249 dnl **********************************************************************
1251 AC_MSG_CHECKING([if argv can be written to])
1254 int main(int argc, char ** argv) {
1256 return (argv[0][0] == ' ')?0:1;
1260 curl_cv_writable_argv=yes
1262 curl_cv_writable_argv=no
1264 curl_cv_writable_argv=cross
1266 case $curl_cv_writable_argv in
1268 AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv])
1276 AC_MSG_WARN([the previous check could not be made default was used])
1280 dnl **********************************************************************
1281 dnl Check for the presence of Kerberos4 libraries and headers
1282 dnl **********************************************************************
1284 AC_ARG_WITH(krb4-includes,
1285 AC_HELP_STRING([--with-krb4-includes=DIR],
1286 [Specify location of kerberos4 headers]),[
1287 CPPFLAGS="$CPPFLAGS -I$withval"
1292 AC_ARG_WITH(krb4-libs,
1293 AC_HELP_STRING([--with-krb4-libs=DIR],[Specify location of kerberos4 libs]),[
1294 LDFLAGS="$LDFLAGS -L$withval"
1301 AC_ARG_WITH(krb4,dnl
1302 AC_HELP_STRING([--with-krb4=DIR],[where to look for Kerberos4]),[
1304 if test X"$OPT_KRB4" != Xno; then
1306 if test X"$OPT_KRB4" != Xyes; then
1307 LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib$libsuff"
1308 KRB4LIB="$OPT_KRB4/lib$libsuff"
1309 CPPFLAGS="$CPPFLAGS -I$OPT_KRB4/include"
1310 KRB4INC="$OPT_KRB4/include"
1315 AC_MSG_CHECKING([if Kerberos4 support is requested])
1317 if test "$want_krb4" = yes
1319 if test "$ipv6" = "yes"; then
1320 echo krb4 is not compatible with IPv6
1325 dnl Check for & handle argument to --with-krb4
1327 AC_MSG_CHECKING(where to look for Kerberos4)
1328 if test X"$OPT_KRB4" = Xyes
1330 AC_MSG_RESULT([defaults])
1332 AC_MSG_RESULT([libs in $KRB4LIB, headers in $KRB4INC])
1335 dnl Check for DES library
1336 AC_CHECK_LIB(des, des_pcbc_encrypt,
1338 AC_CHECK_HEADERS(des.h)
1341 AC_CHECK_FUNC(res_search, , [AC_CHECK_LIB(resolv, res_search)])
1343 dnl Check for the Kerberos4 library
1344 AC_CHECK_LIB(krb, krb_net_read,
1346 dnl Check for header files
1347 AC_CHECK_HEADERS(krb.h)
1349 dnl we found the required libraries, add to LIBS
1350 LIBS="-lkrb -lcom_err -ldes $LIBS"
1352 dnl Check for function krb_get_our_ip_for_realm
1353 dnl this is needed for NAT networks
1354 AC_CHECK_FUNCS(krb_get_our_ip_for_realm)
1357 AC_DEFINE(HAVE_KRB4, 1,
1358 [if you have the Kerberos4 libraries (including -ldes)])
1360 dnl substitute it too!
1362 AC_SUBST(KRB4_ENABLED)
1364 curl_krb4_msg="enabled"
1366 dnl the krb4 stuff needs a strlcpy()
1367 AC_CHECK_FUNCS(strlcpy)
1375 dnl **********************************************************************
1376 dnl Check for FBopenssl(SPNEGO) libraries
1377 dnl **********************************************************************
1380 AC_HELP_STRING([--with-spnego=DIR],
1381 [Specify location of SPNEGO library fbopenssl]), [
1382 SPNEGO_ROOT="$withval"
1383 if test x"$SPNEGO_ROOT" != xno; then
1388 AC_MSG_CHECKING([if SPNEGO support is requested])
1389 if test x"$want_spnego" = xyes; then
1391 if test X"$SPNEGO_ROOT" = Xyes; then
1392 AC_MSG_ERROR([FBOpenSSL libs and/or directories were not found where specified!])
1395 if test -z "$SPNEGO_LIB_DIR"; then
1396 LDFLAGS="$LDFLAGS -L$SPNEGO_ROOT -lfbopenssl"
1398 LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR"
1402 AC_DEFINE(HAVE_SPNEGO, 1,
1403 [Define this if you have the SPNEGO library fbopenssl])
1404 curl_spnego_msg="enabled"
1410 dnl **********************************************************************
1411 dnl Check for GSS-API libraries
1412 dnl **********************************************************************
1414 dnl check for gss stuff in the /usr as default
1417 AC_ARG_WITH(gssapi-includes,
1418 AC_HELP_STRING([--with-gssapi-includes=DIR],
1419 [Specify location of GSSAPI header]),
1420 [ GSSAPI_INCS="-I$withval"
1424 AC_ARG_WITH(gssapi-libs,
1425 AC_HELP_STRING([--with-gssapi-libs=DIR],
1426 [Specify location of GSSAPI libs]),
1427 [ GSSAPI_LIB_DIR="-L$withval"
1432 AC_HELP_STRING([--with-gssapi=DIR],
1433 [Where to look for GSSAPI]), [
1434 GSSAPI_ROOT="$withval"
1435 if test x"$GSSAPI_ROOT" != xno; then
1437 if test x"$GSSAPI_ROOT" = xyes; then
1438 dnl if yes, then use default root
1444 save_CPPFLAGS="$CPPFLAGS"
1445 AC_MSG_CHECKING([if GSSAPI support is requested])
1446 if test x"$want_gss" = xyes; then
1449 if test -z "$GSSAPI_INCS"; then
1450 if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
1451 GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi`
1452 elif test "$GSSAPI_ROOT" != "yes"; then
1453 GSSAPI_INCS="-I$GSSAPI_ROOT/include"
1457 CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
1459 AC_CHECK_HEADER(gss.h,
1461 dnl found in the given dirs
1462 AC_DEFINE(HAVE_GSSGNU, 1, [if you have the GNU gssapi libraries])
1466 dnl not found, check Heimdal or MIT
1467 AC_CHECK_HEADERS([gssapi/gssapi.h], [], [not_mit=1])
1469 [gssapi/gssapi_generic.h gssapi/gssapi_krb5.h],
1474 #ifdef HAVE_GSSAPI_GSSAPI_H
1475 #include <gssapi/gssapi.h>
1478 if test "x$not_mit" = "x1"; then
1479 dnl MIT not found, check for Heimdal
1480 AC_CHECK_HEADER(gssapi.h,
1483 AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries])
1486 dnl no header found, disabling GSS
1488 AC_MSG_WARN(disabling GSSAPI since no header files was found)
1493 AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries])
1494 dnl check if we have a really old MIT kerberos (<= 1.2)
1495 AC_MSG_CHECKING([if gssapi headers declare GSS_C_NT_HOSTBASED_SERVICE])
1498 #include <gssapi/gssapi.h>
1499 #include <gssapi/gssapi_generic.h>
1500 #include <gssapi/gssapi_krb5.h>
1505 GSS_C_NT_HOSTBASED_SERVICE,
1509 AC_MSG_RESULT([yes])
1512 AC_DEFINE(HAVE_OLD_GSSMIT, 1,
1513 [if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE])
1521 if test x"$want_gss" = xyes; then
1522 AC_DEFINE(HAVE_GSSAPI, 1, [if you have the gssapi libraries])
1524 curl_gss_msg="enabled (MIT/Heimdal)"
1526 if test -n "$gnu_gss"; then
1527 curl_gss_msg="enabled (GNU GSS)"
1528 LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
1530 elif test -z "$GSSAPI_LIB_DIR"; then
1533 LIBS="-lgssapi_krb5 -lresolv $LIBS"
1536 if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
1537 dnl krb5-config doesn't have --libs-only-L or similar, put everything
1539 gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
1540 LIBS="$gss_libs $LIBS"
1541 elif test "$GSSAPI_ROOT" != "yes"; then
1542 LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
1543 LIBS="-lgssapi $LIBS"
1545 LIBS="-lgssapi $LIBS"
1550 LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
1551 LIBS="-lgssapi $LIBS"
1554 CPPFLAGS="$save_CPPFLAGS"
1557 dnl -------------------------------------------------
1558 dnl check winssl option before other SSL libraries
1559 dnl -------------------------------------------------
1562 AC_ARG_WITH(winssl,dnl
1563 AC_HELP_STRING([--with-winssl],[enable Windows native SSL/TLS])
1564 AC_HELP_STRING([--without-winssl], [disable Windows native SSL/TLS]),
1565 OPT_WINSSL=$withval)
1567 AC_MSG_CHECKING([whether to enable Windows native SSL/TLS (Windows native builds only)])
1568 if test "$curl_ssl_msg" = "$init_ssl_msg"; then
1569 if test "x$OPT_WINSSL" != "xno" &&
1570 test "x$ac_cv_native_windows" = "xyes"; then
1572 AC_DEFINE(USE_SCHANNEL, 1, [to enable Windows native SSL/TLS support])
1573 AC_SUBST(USE_SCHANNEL, [1])
1574 curl_ssl_msg="enabled (Windows-native)"
1576 # --with-winssl implies --enable-sspi
1577 AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
1578 AC_SUBST(USE_WINDOWS_SSPI, [1])
1579 curl_sspi_msg="enabled"
1588 AC_ARG_WITH(darwinssl,dnl
1589 AC_HELP_STRING([--with-darwinssl],[enable iOS/Mac OS X native SSL/TLS])
1590 AC_HELP_STRING([--without-darwinssl], [disable iOS/Mac OS X native SSL/TLS]),
1591 OPT_DARWINSSL=$withval)
1593 AC_MSG_CHECKING([whether to enable iOS/Mac OS X native SSL/TLS])
1594 if test "$curl_ssl_msg" = "$init_ssl_msg"; then
1595 if test "x$OPT_DARWINSSL" != "xno" &&
1596 test -d "/System/Library/Frameworks/Security.framework"; then
1598 AC_DEFINE(USE_DARWINSSL, 1, [to enable iOS/Mac OS X native SSL/TLS support])
1599 AC_SUBST(USE_DARWINSSL, [1])
1600 curl_ssl_msg="enabled (iOS/Mac OS X-native)"
1602 LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security"
1610 dnl **********************************************************************
1611 dnl Check for the presence of SSL libraries and headers
1612 dnl **********************************************************************
1614 dnl Default to compiler & linker defaults for SSL files & libraries.
1616 dnl Default to no CA bundle
1619 AC_HELP_STRING([--with-ssl=PATH],[Where to look for OpenSSL, PATH points to the SSL installation (default: /usr/local/ssl); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
1620 AC_HELP_STRING([--without-ssl], [disable OpenSSL]),
1623 if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
1624 dnl backup the pre-ssl variables
1625 CLEANLDFLAGS="$LDFLAGS"
1626 CLEANCPPFLAGS="$CPPFLAGS"
1631 dnl --with-ssl (without path) used
1632 if test x$cross_compiling != xyes; then
1633 dnl only do pkg-config magic when not cross-compiling
1636 PREFIX_OPENSSL=/usr/local/ssl
1637 LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
1640 dnl no --with-ssl option given, just check default places
1641 if test x$cross_compiling != xyes; then
1642 dnl only do pkg-config magic when not cross-compiling
1648 dnl check the given --with-ssl spot
1650 PREFIX_OPENSSL=$OPT_SSL
1652 dnl Try pkg-config even when cross-compiling. Since we
1653 dnl specify PKG_CONFIG_LIBDIR we're only looking where
1654 dnl the user told us to look
1655 OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
1656 AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
1657 if test -f "$OPENSSL_PCDIR/openssl.pc"; then
1661 dnl in case pkg-config comes up empty, use what we got
1663 LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
1664 if test "$PREFIX_OPENSSL" != "/usr" ; then
1665 SSL_LDFLAGS="-L$LIB_OPENSSL"
1666 SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
1668 SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
1672 if test "$PKGTEST" = "yes"; then
1674 CURL_CHECK_PKGCONFIG(openssl, [$OPENSSL_PCDIR])
1676 if test "$PKGCONFIG" != "no" ; then
1677 SSL_LIBS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
1678 $PKGCONFIG --libs-only-l openssl 2>/dev/null`
1680 SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
1681 $PKGCONFIG --libs-only-L openssl 2>/dev/null`
1683 SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
1684 $PKGCONFIG --cflags-only-I openssl 2>/dev/null`
1686 AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
1687 AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
1688 AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])
1690 LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
1692 dnl use the values pkg-config reported. This is here
1693 dnl instead of below with CPPFLAGS and LDFLAGS because we only
1694 dnl learn about this via pkg-config. If we only have
1695 dnl the argument to --with-ssl we don't know what
1696 dnl additional libs may be necessary. Hope that we
1698 LIBS="$SSL_LIBS $LIBS"
1702 dnl finally, set flags to use SSL
1703 CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
1704 LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
1706 dnl This is for Msys/Mingw
1708 *-*-msys* | *-*-mingw*)
1709 AC_MSG_CHECKING([for gdi32])
1710 my_ac_save_LIBS=$LIBS
1711 LIBS="-lgdi32 $LIBS"
1712 AC_TRY_LINK([#include <windef.h>
1713 #include <wingdi.h>],
1716 AC_MSG_RESULT([yes])],
1717 [ dnl failed, restore LIBS
1718 LIBS=$my_ac_save_LIBS
1724 AC_CHECK_LIB(crypto, CRYPTO_lock,[
1726 LIBS="-lcrypto $LIBS"
1728 LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
1729 CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
1730 AC_CHECK_LIB(crypto, CRYPTO_add_lock,[
1732 LIBS="-lcrypto $LIBS"], [
1733 LDFLAGS="$CLEANLDFLAGS"
1734 CPPFLAGS="$CLEANCPPFLAGS"
1740 if test X"$HAVECRYPTO" = X"yes"; then
1741 dnl This is only reasonable to do if crypto actually is there: check for
1742 dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
1744 AC_CHECK_LIB(ssl, SSL_connect)
1746 if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
1747 dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff
1748 AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use);
1750 LIBS="-lRSAglue -lrsaref $LIBS"
1751 AC_CHECK_LIB(ssl, SSL_connect)
1752 if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
1753 dnl still no SSL_connect
1762 dnl Have the libraries--check for SSLeay/OpenSSL headers
1763 AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
1764 openssl/pem.h openssl/ssl.h openssl/err.h,
1765 curl_ssl_msg="enabled (OpenSSL)"
1767 AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use]))
1769 if test $ac_cv_header_openssl_x509_h = no; then
1770 dnl we don't use the "action" part of the AC_CHECK_HEADERS macro
1771 dnl since 'err.h' might in fact find a krb4 header with the same
1773 AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h)
1775 if test $ac_cv_header_x509_h = yes &&
1776 test $ac_cv_header_crypto_h = yes &&
1777 test $ac_cv_header_ssl_h = yes; then
1779 curl_ssl_msg="enabled (OpenSSL)"
1785 if test X"$OPENSSL_ENABLED" = X"1"; then
1786 AC_DEFINE(USE_SSLEAY, 1, [if SSL is enabled])
1788 dnl is there a pkcs12.h header present?
1789 AC_CHECK_HEADERS(openssl/pkcs12.h)
1793 dnl USE_SSLEAY is the historical name for what configure calls
1794 dnl OPENSSL_ENABLED; the names should really be unified
1795 USE_SSLEAY="$OPENSSL_ENABLED"
1796 AC_SUBST(USE_SSLEAY)
1798 if test X"$OPT_SSL" != Xoff &&
1799 test "$OPENSSL_ENABLED" != "1"; then
1800 AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!])
1804 if test X"$OPENSSL_ENABLED" = X"1"; then
1805 dnl If the ENGINE library seems to be around, check for the OpenSSL engine
1806 dnl stuff, it is kind of "separated" from the main SSL check
1807 AC_CHECK_FUNC(ENGINE_init,
1809 AC_CHECK_HEADERS(openssl/engine.h)
1810 AC_CHECK_FUNCS( ENGINE_load_builtin_engines )
1813 dnl these can only exist if openssl exists
1814 dnl yassl doesn't have SSL_get_shutdown
1816 AC_CHECK_FUNCS( RAND_status \
1820 CRYPTO_cleanup_all_ex_data \
1822 SSLv2_client_method )
1824 dnl Make an attempt to detect if this is actually yassl's headers and
1825 dnl OpenSSL emulation layer. We still leave everything else believing
1826 dnl and acting like OpenSSL.
1828 AC_MSG_CHECKING([for yaSSL using OpenSSL compatibility mode])
1831 #include <openssl/ssl.h>
1833 #if defined(YASSL_VERSION) && defined(OPENSSL_VERSION_NUMBER)
1834 int dummy = SSL_ERROR_NONE;
1836 Not the yaSSL OpenSSL compatibility header.
1840 AC_MSG_RESULT([yes])
1841 AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1,
1842 [Define to 1 if using yaSSL in OpenSSL compatibility mode.])
1843 curl_ssl_msg="enabled (OpenSSL emulation by yaSSL)"
1849 if test "$OPENSSL_ENABLED" = "1"; then
1850 if test -n "$LIB_OPENSSL"; then
1851 dnl when the ssl shared libs were found in a path that the run-time
1852 dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
1853 dnl to prevent further configure tests to fail due to this
1854 if test "x$cross_compiling" != "xyes"; then
1855 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
1856 export LD_LIBRARY_PATH
1857 AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
1860 CURL_CHECK_OPENSSL_API
1865 dnl **********************************************************************
1866 dnl Check for the random seed preferences
1867 dnl **********************************************************************
1869 if test X"$OPENSSL_ENABLED" = X"1"; then
1870 AC_ARG_WITH(egd-socket,
1871 AC_HELP_STRING([--with-egd-socket=FILE],
1872 [Entropy Gathering Daemon socket pathname]),
1873 [ EGD_SOCKET="$withval" ]
1875 if test -n "$EGD_SOCKET" ; then
1876 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET",
1877 [your Entropy Gathering Daemon socket pathname] )
1880 dnl Check for user-specified random device
1882 AC_HELP_STRING([--with-random=FILE],
1883 [read randomness from FILE (default=/dev/urandom)]),
1884 [ RANDOM_FILE="$withval" ],
1886 if test x$cross_compiling != xyes; then
1887 dnl Check for random device
1888 AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
1890 AC_MSG_WARN([skipped the /dev/urandom detection when cross-compiling])
1894 if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
1895 AC_SUBST(RANDOM_FILE)
1896 AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE",
1897 [a suitable file to read random data from])
1902 dnl We require OpenSSL with SRP support.
1904 if test "$OPENSSL_ENABLED" = "1"; then
1905 AC_CHECK_LIB(crypto, SRP_Calc_client_key,
1907 AC_DEFINE(HAVE_SSLEAY_SRP, 1, [if you have the function SRP_Calc_client_key])
1908 AC_SUBST(HAVE_SSLEAY_SRP, [1])
1912 dnl ----------------------------------------------------
1913 dnl check for GnuTLS
1914 dnl ----------------------------------------------------
1916 dnl Default to compiler & linker defaults for GnuTLS files & libraries.
1919 AC_ARG_WITH(gnutls,dnl
1920 AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root])
1921 AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]),
1922 OPT_GNUTLS=$withval)
1924 if test "$curl_ssl_msg" = "$init_ssl_msg"; then
1926 if test X"$OPT_GNUTLS" != Xno; then
1934 if test "x$OPT_GNUTLS" = "xyes"; then
1935 dnl this is with no partiular path given
1936 CURL_CHECK_PKGCONFIG(gnutls)
1938 if test "$PKGCONFIG" != "no" ; then
1939 addlib=`$PKGCONFIG --libs-only-l gnutls`
1940 addld=`$PKGCONFIG --libs-only-L gnutls`
1941 addcflags=`$PKGCONFIG --cflags-only-I gnutls`
1942 version=`$PKGCONFIG --modversion gnutls`
1943 gtlslib=`echo $addld | $SED -e 's/-L//'`
1945 dnl without pkg-config, we try libgnutls-config as that was how it
1947 check=`libgnutls-config --version 2>/dev/null`
1948 if test -n "$check"; then
1949 addlib=`libgnutls-config --libs`
1950 addcflags=`libgnutls-config --cflags`
1951 version=`libgnutls-config --version`
1952 gtlslib=`libgnutls-config --prefix`/lib$libsuff
1956 dnl this is with a given path, first check if there's a libgnutls-config
1957 dnl there and if not, make an educated guess
1958 cfg=$OPT_GNUTLS/bin/libgnutls-config
1959 check=`$cfg --version 2>/dev/null`
1960 if test -n "$check"; then
1961 addlib=`$cfg --libs`
1962 addcflags=`$cfg --cflags`
1963 version=`$cfg --version`
1964 gtlslib=`$cfg --prefix`/lib$libsuff
1966 dnl without pkg-config and libgnutls-config, we guess a lot!
1968 addld=-L$OPT_GNUTLS/lib$libsuff
1969 addcflags=-I$OPT_GNUTLS/include
1970 version="" # we just don't know
1971 gtlslib=$OPT_GNUTLS/lib$libsuff
1975 if test -z "$version"; then
1976 dnl lots of efforts, still no go
1980 if test -n "$addlib"; then
1983 CLEANCPPFLAGS="$CPPFLAGS"
1984 CLEANLDFLAGS="$LDFLAGS"
1986 LIBS="$addlib $LIBS"
1987 LDFLAGS="$LDFLAGS $addld"
1988 if test "$addcflags" != "-I/usr/include"; then
1989 CPPFLAGS="$CPPFLAGS $addcflags"
1992 AC_CHECK_LIB(gnutls, gnutls_check_version,
1994 AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled])
1995 AC_SUBST(USE_GNUTLS, [1])
1998 curl_ssl_msg="enabled (GnuTLS)"
2002 CPPFLAGS="$CLEANCPPFLAGS"
2005 if test "x$USE_GNUTLS" = "xyes"; then
2006 AC_MSG_NOTICE([detected GnuTLS version $version])
2008 if test -n "$gtlslib"; then
2009 dnl when shared libs were found in a path that the run-time
2010 dnl linker doesn't search through, we need to add it to
2011 dnl LD_LIBRARY_PATH to prevent further configure tests to fail
2013 if test "x$cross_compiling" != "xyes"; then
2014 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
2015 export LD_LIBRARY_PATH
2016 AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH])
2023 fi dnl GNUTLS not disabled
2028 dnl Check which crypto backend GnuTLS uses
2031 if test "$GNUTLS_ENABLED" = "1"; then
2033 # First check if we can detect either crypto library via transitive linking
2034 AC_CHECK_LIB(gnutls, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
2035 if test "$USE_GNUTLS_NETTLE" = ""; then
2036 AC_CHECK_LIB(gnutls, gcry_control, [ USE_GNUTLS_NETTLE=0 ])
2038 # If not, try linking directly to both of them to see if they are available
2039 if test "$USE_GNUTLS_NETTLE" = ""; then
2040 AC_CHECK_LIB(nettle, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
2042 if test "$USE_GNUTLS_NETTLE" = ""; then
2043 AC_CHECK_LIB(gcrypt, gcry_control, [ USE_GNUTLS_NETTLE=0 ])
2045 if test "$USE_GNUTLS_NETTLE" = ""; then
2046 AC_MSG_ERROR([GnuTLS found, but neither gcrypt nor nettle found])
2048 if test "$USE_GNUTLS_NETTLE" = "1"; then
2049 AC_DEFINE(USE_GNUTLS_NETTLE, 1, [if GnuTLS uses nettle as crypto backend])
2050 AC_SUBST(USE_GNUTLS_NETTLE, [1])
2051 LIBS="-lnettle $LIBS"
2053 LIBS="-lgcrypt $LIBS"
2058 dnl We require GnuTLS with SRP support.
2060 if test "$GNUTLS_ENABLED" = "1"; then
2061 AC_CHECK_LIB(gnutls, gnutls_srp_verifier,
2063 AC_DEFINE(HAVE_GNUTLS_SRP, 1, [if you have the function gnutls_srp_verifier])
2064 AC_SUBST(HAVE_GNUTLS_SRP, [1])
2068 dnl ----------------------------------------------------
2069 dnl check for PolarSSL
2070 dnl ----------------------------------------------------
2072 dnl Default to compiler & linker defaults for PolarSSL files & libraries.
2077 AC_ARG_WITH(polarssl,dnl
2078 AC_HELP_STRING([--with-polarssl=PATH],[where to look for PolarSSL, PATH points to the installation root])
2079 AC_HELP_STRING([--without-polarssl], [disable PolarSSL detection]),
2080 OPT_POLARSSL=$withval)
2082 if test "$curl_ssl_msg" = "$init_ssl_msg"; then
2084 if test X"$OPT_POLARSSL" != Xno; then
2086 if test "$OPT_POLARSSL" = "yes"; then
2090 if test -z "$OPT_POLARSSL" ; then
2091 dnl check for lib first without setting any new path
2093 AC_CHECK_LIB(polarssl, havege_init,
2094 dnl libpolarssl found, set the variable
2096 AC_DEFINE(USE_POLARSSL, 1, [if PolarSSL is enabled])
2097 AC_SUBST(USE_POLARSSL, [1])
2100 curl_ssl_msg="enabled (PolarSSL)"
2109 if test "x$USE_POLARSSL" != "xyes"; then
2110 dnl add the path and test again
2111 addld=-L$OPT_POLARSSL/lib$libsuff
2112 addcflags=-I$OPT_POLARSSL/include
2113 polarssllib=$OPT_POLARSSL/lib$libsuff
2115 LDFLAGS="$LDFLAGS $addld"
2116 if test "$addcflags" != "-I/usr/include"; then
2117 CPPFLAGS="$CPPFLAGS $addcflags"
2120 AC_CHECK_LIB(polarssl, ssl_init,
2122 AC_DEFINE(USE_POLARSSL, 1, [if PolarSSL is enabled])
2123 AC_SUBST(USE_POLARSSL, [1])
2126 curl_ssl_msg="enabled (PolarSSL)"
2134 if test "x$USE_POLARSSL" = "xyes"; then
2135 AC_MSG_NOTICE([detected PolarSSL])
2137 LIBS="-lpolarssl $LIBS"
2139 if test -n "$polarssllib"; then
2140 dnl when shared libs were found in a path that the run-time
2141 dnl linker doesn't search through, we need to add it to
2142 dnl LD_LIBRARY_PATH to prevent further configure tests to fail
2144 if test "x$cross_compiling" != "xyes"; then
2145 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$polarssllib"
2146 export LD_LIBRARY_PATH
2147 AC_MSG_NOTICE([Added $polarssllib to LD_LIBRARY_PATH])
2152 fi dnl PolarSSL not disabled
2156 dnl ----------------------------------------------------
2157 dnl check for CyaSSL
2158 dnl ----------------------------------------------------
2160 dnl Default to compiler & linker defaults for CyaSSL files & libraries.
2165 AC_ARG_WITH(cyassl,dnl
2166 AC_HELP_STRING([--with-cyassl=PATH],[where to look for CyaSSL, PATH points to the installation root (default: system lib default)])
2167 AC_HELP_STRING([--without-cyassl], [disable CyaSSL detection]),
2168 OPT_CYASSL=$withval)
2170 if test "$curl_ssl_msg" = "$init_ssl_msg"; then
2172 if test X"$OPT_CYASSL" != Xno; then
2174 if test "$OPT_CYASSL" = "yes"; then
2178 if test -z "$OPT_CYASSL" ; then
2179 dnl check for lib in system default first
2181 AC_CHECK_LIB(cyassl, CyaSSL_Init,
2182 dnl libcyassl found, set the variable
2184 AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
2185 AC_SUBST(USE_CYASSL, [1])
2188 curl_ssl_msg="enabled (CyaSSL)"
2197 if test "x$USE_CYASSL" != "xyes"; then
2198 dnl add the path and test again
2199 addld=-L$OPT_CYASSL/lib$libsuff
2200 addcflags=-I$OPT_CYASSL/include
2201 cyassllib=$OPT_CYASSL/lib$libsuff
2203 LDFLAGS="$LDFLAGS $addld"
2204 if test "$addcflags" != "-I/usr/include"; then
2205 CPPFLAGS="$CPPFLAGS $addcflags"
2208 AC_CHECK_LIB(cyassl, CyaSSL_Init,
2210 AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
2211 AC_SUBST(USE_CYASSL, [1])
2214 curl_ssl_msg="enabled (CyaSSL)"
2222 if test "x$USE_CYASSL" = "xyes"; then
2223 AC_MSG_NOTICE([detected CyaSSL])
2225 LIBS="-lcyassl -lm $LIBS"
2227 if test -n "$cyassllib"; then
2228 dnl when shared libs were found in a path that the run-time
2229 dnl linker doesn't search through, we need to add it to
2230 dnl LD_LIBRARY_PATH to prevent further configure tests to fail
2232 if test "x$cross_compiling" != "xyes"; then
2233 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$cyassllib"
2234 export LD_LIBRARY_PATH
2235 AC_MSG_NOTICE([Added $cyassllib to LD_LIBRARY_PATH])
2241 fi dnl CyaSSL not disabled
2245 dnl ----------------------------------------------------
2246 dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
2247 dnl ----------------------------------------------------
2249 dnl Default to compiler & linker defaults for NSS files & libraries.
2253 AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root])
2254 AC_HELP_STRING([--without-nss], [disable NSS detection]),
2257 if test "$curl_ssl_msg" = "$init_ssl_msg"; then
2259 if test X"$OPT_NSS" != Xno; then
2267 if test "x$OPT_NSS" = "xyes"; then
2269 CURL_CHECK_PKGCONFIG(nss)
2271 if test "$PKGCONFIG" != "no" ; then
2272 addlib=`$PKGCONFIG --libs nss`
2273 addcflags=`$PKGCONFIG --cflags nss`
2274 version=`$PKGCONFIG --modversion nss`
2275 nssprefix=`$PKGCONFIG --variable=prefix nss`
2277 dnl Without pkg-config, we check for nss-config
2279 check=`nss-config --version 2>/dev/null`
2280 if test -n "$check"; then
2281 addlib=`nss-config --libs`
2282 addcflags=`nss-config --cflags`
2283 version=`nss-config --version`
2284 nssprefix=`nss-config --prefix`
2292 # Without pkg-config, we'll kludge in some defaults
2293 addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
2294 addcflags="-I$OPT_NSS/include"
2299 if test -n "$addlib"; then
2302 CLEANCPPFLAGS="$CPPFLAGS"
2304 LIBS="$addlib $LIBS"
2305 if test "$addcflags" != "-I/usr/include"; then
2306 CPPFLAGS="$CPPFLAGS $addcflags"
2309 dnl The function PK11_CreateGenericObject is needed to load libnsspem.so
2310 AC_CHECK_LIB(nss3, PK11_CreateGenericObject,
2312 AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
2313 AC_SUBST(USE_NSS, [1])
2316 curl_ssl_msg="enabled (NSS)"
2320 CPPFLAGS="$CLEANCPPFLAGS"
2323 if test "x$USE_NSS" = "xyes"; then
2324 AC_MSG_NOTICE([detected NSS version $version])
2326 dnl NSS_InitContext() was introduced in NSS 3.12.5 and helps to prevent
2327 dnl collisions on NSS initialization/shutdown with other libraries
2328 AC_CHECK_FUNC(NSS_InitContext,
2330 AC_DEFINE(HAVE_NSS_INITCONTEXT, 1, [if you have the NSS_InitContext function])
2331 AC_SUBST(HAVE_NSS_INITCONTEXT, [1])
2334 dnl when shared libs were found in a path that the run-time
2335 dnl linker doesn't search through, we need to add it to
2336 dnl LD_LIBRARY_PATH to prevent further configure tests to fail
2338 if test "x$cross_compiling" != "xyes"; then
2339 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
2340 export LD_LIBRARY_PATH
2341 AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
2347 fi dnl NSS not disabled
2349 fi dnl curl_ssl_msg = init_ssl_msg
2353 AC_ARG_WITH(axtls,dnl
2354 AC_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.])
2355 AC_HELP_STRING([--without-axtls], [disable axTLS]),
2358 if test "$curl_ssl_msg" = "$init_ssl_msg"; then
2359 if test X"$OPT_AXTLS" != Xno; then
2360 dnl backup the pre-axtls variables
2361 CLEANLDFLAGS="$LDFLAGS"
2362 CLEANCPPFLAGS="$CPPFLAGS"
2365 case "$OPT_AXTLS" in
2367 dnl --with-axtls (without path) used
2368 PREFIX_AXTLS=/usr/local
2369 LIB_AXTLS="$PREFIX_AXTLS/lib"
2370 LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
2371 CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
2374 dnl no --with-axtls option given, just check default places
2378 dnl check the given --with-axtls spot
2379 PREFIX_AXTLS=$OPT_AXTLS
2380 LIB_AXTLS="$PREFIX_AXTLS/lib"
2381 LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
2382 CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
2386 AC_CHECK_LIB(axtls, ssl_version,[
2387 LIBS="-laxtls $LIBS"
2388 AC_DEFINE(USE_AXTLS, 1, [if axTLS is enabled])
2389 AC_SUBST(USE_AXTLS, [1])
2392 curl_ssl_msg="enabled (axTLS)"
2395 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_AXTLS"
2396 export LD_LIBRARY_PATH
2397 AC_MSG_NOTICE([Added $LIB_AXTLS to LD_LIBRARY_PATH])
2399 LDFLAGS="$CLEANLDFLAGS"
2400 CPPFLAGS="$CLEANCPPFLAGS"
2406 if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED$WINSSL_ENABLED$DARWINSSL_ENABLED" = "x"; then
2407 AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
2408 AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-axtls or --with-winssl to address this.])
2410 # SSL is enabled, genericly
2411 AC_SUBST(SSL_ENABLED)
2415 dnl **********************************************************************
2416 dnl Check for the CA bundle
2417 dnl **********************************************************************
2419 CURL_CHECK_CA_BUNDLE
2421 dnl **********************************************************************
2422 dnl Check for libmetalink
2423 dnl **********************************************************************
2427 AC_ARG_WITH(libmetalink,dnl
2428 AC_HELP_STRING([--with-libmetalink=PATH],[where to look for libmetalink, PATH points to the installation root])
2429 AC_HELP_STRING([--without-libmetalink], [disable libmetalink detection]),
2430 OPT_LIBMETALINK=$withval)
2432 if test X"$OPT_LIBMETALINK" != Xno; then
2441 if test "x$OPT_LIBMETALINK" = "xyes"; then
2442 dnl this is with no partiular path given
2444 CURL_CHECK_PKGCONFIG(libmetalink)
2446 dnl When particular path is given, set PKG_CONFIG_LIBDIR using the path.
2447 LIBMETALINK_PCDIR="$OPT_LIBMETALINK/lib/pkgconfig"
2448 AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$LIBMETALINK_PCDIR"])
2449 if test -f "$LIBMETALINK_PCDIR/libmetalink.pc"; then
2452 if test "$PKGTEST" = "yes"; then
2453 CURL_CHECK_PKGCONFIG(libmetalink, [$LIBMETALINK_PCDIR])
2456 if test "$PKGTEST" = "yes" && test "$PKGCONFIG" != "no"; then
2457 addlib=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
2458 $PKGCONFIG --libs-only-l libmetalink`
2459 addld=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
2460 $PKGCONFIG --libs-only-L libmetalink`
2461 addcflags=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
2462 $PKGCONFIG --cflags-only-I libmetalink`
2463 version=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
2464 $PKGCONFIG --modversion libmetalink`
2465 libmetalinklib=`echo $addld | $SED -e 's/-L//'`
2467 if test -n "$addlib"; then
2469 clean_CPPFLAGS="$CPPFLAGS"
2470 clean_LDFLAGS="$LDFLAGS"
2472 CPPFLAGS="$addcflags $clean_CPPFLAGS"
2473 LDFLAGS="$addld $clean_LDFLAGS"
2474 LIBS="$addlib $clean_LIBS"
2475 AC_MSG_CHECKING([if libmetalink is recent enough])
2478 # include <metalink/metalink.h>
2480 if(0 != metalink_strerror(0)) /* added in 0.1.0 */
2484 AC_MSG_RESULT([yes ($version)])
2487 AC_MSG_RESULT([no ($version)])
2488 AC_MSG_NOTICE([libmetalink library defective or too old])
2491 CPPFLAGS="$clean_CPPFLAGS"
2492 LDFLAGS="$clean_LDFLAGS"
2494 if test "$want_metalink" = "yes"; then
2495 dnl finally libmetalink will be used
2496 AC_DEFINE(USE_METALINK, 1, [Define to enable metalink support])
2497 LIBMETALINK_LIBS=$addlib
2498 LIBMETALINK_LDFLAGS=$addld
2499 LIBMETALINK_CPPFLAGS=$addcflags
2500 AC_SUBST([LIBMETALINK_LIBS])
2501 AC_SUBST([LIBMETALINK_LDFLAGS])
2502 AC_SUBST([LIBMETALINK_CPPFLAGS])
2503 curl_mtlnk_msg="enabled"
2509 dnl **********************************************************************
2510 dnl Check for the presence of LIBSSH2 libraries and headers
2511 dnl **********************************************************************
2513 dnl Default to compiler & linker defaults for LIBSSH2 files & libraries.
2515 AC_ARG_WITH(libssh2,dnl
2516 AC_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])
2517 AC_HELP_STRING([--without-libssh2], [disable LIBSSH2]),
2518 OPT_LIBSSH2=$withval)
2520 if test X"$OPT_LIBSSH2" != Xno; then
2521 dnl backup the pre-libssh2 variables
2522 CLEANLDFLAGS="$LDFLAGS"
2523 CLEANCPPFLAGS="$CPPFLAGS"
2526 case "$OPT_LIBSSH2" in
2528 dnl --with-libssh2 (without path) used
2529 CURL_CHECK_PKGCONFIG(libssh2)
2531 if test "$PKGCONFIG" != "no" ; then
2532 LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2`
2533 LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
2534 CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
2535 version=`$PKGCONFIG --modversion libssh2`
2536 DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/-L//'`
2541 dnl no --with-libssh2 option given, just check default places
2544 dnl use the given --with-libssh2 spot
2545 PREFIX_SSH2=$OPT_LIBSSH2
2549 dnl if given with a prefix, we set -L and -I based on that
2550 if test -n "$PREFIX_SSH2"; then
2552 LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
2553 CPP_SSH2=-I${PREFIX_SSH2}/include
2554 DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
2557 LDFLAGS="$LDFLAGS $LD_SSH2"
2558 CPPFLAGS="$CPPFLAGS $CPP_SSH2"
2559 LIBS="$LIB_SSH2 $LIBS"
2561 AC_CHECK_LIB(ssh2, libssh2_channel_open_ex)
2563 AC_CHECK_HEADERS(libssh2.h,
2564 curl_ssh_msg="enabled (libSSH2)"
2566 AC_DEFINE(USE_LIBSSH2, 1, [if libSSH2 is in use])
2567 AC_SUBST(USE_LIBSSH2, [1])
2570 if test X"$OPT_LIBSSH2" != Xoff &&
2571 test "$LIBSSH2_ENABLED" != "1"; then
2572 AC_MSG_ERROR([libSSH2 libs and/or directories were not found where specified!])
2575 if test "$LIBSSH2_ENABLED" = "1"; then
2576 if test -n "$DIR_SSH2"; then
2577 dnl when the libssh2 shared libs were found in a path that the run-time
2578 dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
2579 dnl to prevent further configure tests to fail due to this
2581 dnl libssh2_version is a post 1.0 addition
2582 dnl libssh2_init and libssh2_exit were added in 1.2.5
2583 dnl libssh2_scp_send64 was added in 1.2.6
2584 dnl libssh2_session_handshake was added in 1.2.8
2585 AC_CHECK_FUNCS( libssh2_version libssh2_init libssh2_exit \
2586 libssh2_scp_send64 libssh2_session_handshake)
2587 if test "x$cross_compiling" != "xyes"; then
2588 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
2589 export LD_LIBRARY_PATH
2590 AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH])
2594 dnl no libssh2, revert back to clean variables
2595 LDFLAGS=$CLEANLDFLAGS
2596 CPPFLAGS=$CLEANCPPFLAGS
2601 dnl **********************************************************************
2602 dnl Check for the presence of LIBRTMP libraries and headers
2603 dnl **********************************************************************
2605 dnl Default to compiler & linker defaults for LIBRTMP files & libraries.
2607 AC_ARG_WITH(librtmp,dnl
2608 AC_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])
2609 AC_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
2610 OPT_LIBRTMP=$withval)
2612 if test X"$OPT_LIBRTMP" != Xno; then
2613 dnl backup the pre-librtmp variables
2614 CLEANLDFLAGS="$LDFLAGS"
2615 CLEANCPPFLAGS="$CPPFLAGS"
2618 case "$OPT_LIBRTMP" in
2620 dnl --with-librtmp (without path) used
2621 CURL_CHECK_PKGCONFIG(librtmp)
2623 if test "$PKGCONFIG" != "no" ; then
2624 LIB_RTMP=`$PKGCONFIG --libs-only-l librtmp`
2625 LD_RTMP=`$PKGCONFIG --libs-only-L librtmp`
2626 CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp`
2627 version=`$PKGCONFIG --modversion librtmp`
2628 DIR_RTMP=`echo $LD_RTMP | $SED -e 's/-L//'`
2630 dnl To avoid link errors, we do not allow --librtmp without
2631 dnl a pkgconfig file
2632 AC_MSG_ERROR([--librtmp was specified but could not find librtmp pkgconfig file.])
2637 dnl no --with-librtmp option given, just check default places
2641 dnl use the given --with-librtmp spot
2642 PREFIX_RTMP=$OPT_LIBRTMP
2646 dnl if given with a prefix, we set -L and -I based on that
2647 if test -n "$PREFIX_RTMP"; then
2648 LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff
2649 CPP_RTMP=-I${PREFIX_RTMP}/include
2650 DIR_RTMP=${PREFIX_RTMP}/lib$libsuff
2653 LDFLAGS="$LDFLAGS $LD_RTMP"
2654 CPPFLAGS="$CPPFLAGS $CPP_RTMP"
2655 LIBS="$LIB_RTMP $LIBS"
2657 AC_CHECK_LIB(rtmp, RTMP_Init,
2659 AC_CHECK_HEADERS(librtmp/rtmp.h,
2660 curl_rtmp_msg="enabled (librtmp)"
2662 AC_DEFINE(USE_LIBRTMP, 1, [if librtmp is in use])
2663 AC_SUBST(USE_LIBRTMP, [1])
2666 dnl not found, revert back to clean variables
2667 LDFLAGS=$CLEANLDFLAGS
2668 CPPFLAGS=$CLEANCPPFLAGS
2672 if test X"$OPT_LIBRTMP" != Xoff &&
2673 test "$LIBRTMP_ENABLED" != "1"; then
2674 AC_MSG_ERROR([librtmp libs and/or directories were not found where specified!])
2679 dnl **********************************************************************
2680 dnl Check for linker switch for versioned symbols
2681 dnl **********************************************************************
2683 versioned_symbols_flavour=
2684 AC_MSG_CHECKING([whether versioned symbols are wanted])
2685 AC_ARG_ENABLE(versioned-symbols,
2686 AC_HELP_STRING([--enable-versioned-symbols], [Enable versioned symbols in shared library])
2687 AC_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shared library]),
2688 [ case "$enableval" in
2689 yes) AC_MSG_RESULT(yes)
2690 AC_MSG_CHECKING([if libraries can be versioned])
2691 GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
2692 if test -z "$GLD"; then
2694 AC_MSG_WARN([You need an ld version supporting the --version-script option])
2697 if test "x$OPENSSL_ENABLED" = "x1"; then
2698 versioned_symbols_flavour="OPENSSL_"
2699 elif test "x$GNUTLS_ENABLED" == "x1"; then
2700 versioned_symbols_flavour="GNUTLS_"
2701 elif test "x$NSS_ENABLED" == "x1"; then
2702 versioned_symbols_flavour="NSS_"
2703 elif test "x$POLARSSL_ENABLED" == "x1"; then
2704 versioned_symbols_flavour="POLARSSL_"
2705 elif test "x$CYASSL_ENABLED" == "x1"; then
2706 versioned_symbols_flavour="CYASSL_"
2707 elif test "x$AXTLS_ENABLED" == "x1"; then
2708 versioned_symbols_flavour="AXTLS_"
2709 elif test "x$WINSSL_ENABLED" == "x1"; then
2710 versioned_symbols_flavour="WINSSL_"
2711 elif test "x$DARWINSSL_ENABLED" == "x1"; then
2712 versioned_symbols_flavour="DARWINSSL_"
2714 versioned_symbols_flavour=""
2716 versioned_symbols="yes"
2720 *) AC_MSG_RESULT(no)
2728 AC_SUBST(VERSIONED_FLAVOUR, ["$versioned_symbols_flavour"])
2729 AM_CONDITIONAL(VERSIONED_SYMBOLS, test "x$versioned_symbols" = "xyes")
2731 dnl -------------------------------------------------
2732 dnl check winidn option before other IDN libraries
2733 dnl -------------------------------------------------
2735 AC_MSG_CHECKING([whether to enable Windows native IDN (Windows native builds only)])
2736 OPT_WINIDN="default"
2738 AC_HELP_STRING([--with-winidn=PATH],[enable Windows native IDN])
2739 AC_HELP_STRING([--without-winidn], [disable Windows native IDN]),
2740 OPT_WINIDN=$withval)
2741 case "$OPT_WINIDN" in
2743 dnl --without-winidn option used or configure option not specified
2748 dnl --with-winidn option used without path
2750 want_winidn_path="default"
2751 AC_MSG_RESULT([yes])
2754 dnl --with-winidn option used with path
2756 want_winidn_path="$withval"
2757 AC_MSG_RESULT([yes ($withval)])
2761 if test "$want_winidn" = "yes"; then
2762 dnl winidn library support has been requested
2763 clean_CPPFLAGS="$CPPFLAGS"
2764 clean_LDFLAGS="$LDFLAGS"
2766 WINIDN_LIBS="-lnormaliz"
2768 if test "$want_winidn_path" != "default"; then
2769 dnl path has been specified
2770 dnl pkg-config not available or provides no info
2771 WINIDN_LDFLAGS="-L$want_winidn_path/lib$libsuff"
2772 WINIDN_CPPFLAGS="-I$want_winidn_path/include"
2773 WINIDN_DIR="$want_winidn_path/lib$libsuff"
2776 CPPFLAGS="$WINIDN_CPPFLAGS $CPPFLAGS"
2777 LDFLAGS="$WINIDN_LDFLAGS $LDFLAGS"
2778 LIBS="$WINIDN_LIBS $LIBS"
2780 AC_MSG_CHECKING([if IdnToUnicode can be linked])
2782 AC_LANG_FUNC_LINK_TRY([IdnToUnicode])
2784 AC_MSG_RESULT([yes])
2785 tst_links_winidn="yes"
2788 tst_links_winidn="no"
2791 if test "$tst_links_winidn" = "yes"; then
2792 AC_DEFINE(USE_WIN32_IDN, 1, [Define to 1 if you have the `normaliz' (WinIDN) library (-lnormaliz).])
2793 AC_DEFINE(WANT_IDN_PROTOTYPES, 1, [Define to 1 to provide own prototypes.])
2794 AC_SUBST([IDN_ENABLED], [1])
2795 curl_idn_msg="enabled (Windows-native)"
2797 AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
2798 CPPFLAGS="$clean_CPPFLAGS"
2799 LDFLAGS="$clean_LDFLAGS"
2804 dnl **********************************************************************
2805 dnl Check for the presence of IDN libraries and headers
2806 dnl **********************************************************************
2808 AC_MSG_CHECKING([whether to build with libidn])
2811 AC_HELP_STRING([--with-libidn=PATH],[Enable libidn usage])
2812 AC_HELP_STRING([--without-libidn],[Disable libidn usage]),
2816 dnl --without-libidn option used
2821 dnl configure option not specified
2823 want_idn_path="default"
2824 AC_MSG_RESULT([(assumed) yes])
2827 dnl --with-libidn option used without path
2829 want_idn_path="default"
2830 AC_MSG_RESULT([yes])
2833 dnl --with-libidn option used with path
2835 want_idn_path="$withval"
2836 AC_MSG_RESULT([yes ($withval)])
2840 if test "$want_idn" = "yes"; then
2841 dnl idn library support has been requested
2842 clean_CPPFLAGS="$CPPFLAGS"
2843 clean_LDFLAGS="$LDFLAGS"
2847 if test "$want_idn_path" != "default"; then
2848 dnl path has been specified
2849 IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig"
2850 CURL_CHECK_PKGCONFIG(libidn, [$IDN_PCDIR])
2851 if test "$PKGCONFIG" != "no"; then
2852 IDN_LIBS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
2853 $PKGCONFIG --libs-only-l libidn 2>/dev/null`
2854 IDN_LDFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
2855 $PKGCONFIG --libs-only-L libidn 2>/dev/null`
2856 IDN_CPPFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
2857 $PKGCONFIG --cflags-only-I libidn 2>/dev/null`
2858 IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'`
2860 dnl pkg-config not available or provides no info
2862 IDN_LDFLAGS="-L$want_idn_path/lib$libsuff"
2863 IDN_CPPFLAGS="-I$want_idn_path/include"
2864 IDN_DIR="$want_idn_path/lib$libsuff"
2867 dnl path not specified
2868 CURL_CHECK_PKGCONFIG(libidn)
2869 if test "$PKGCONFIG" != "no"; then
2870 IDN_LIBS=`$PKGCONFIG --libs-only-l libidn 2>/dev/null`
2871 IDN_LDFLAGS=`$PKGCONFIG --libs-only-L libidn 2>/dev/null`
2872 IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I libidn 2>/dev/null`
2873 IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'`
2875 dnl pkg-config not available or provides no info
2880 if test "$PKGCONFIG" != "no"; then
2881 AC_MSG_NOTICE([pkg-config: IDN_LIBS: "$IDN_LIBS"])
2882 AC_MSG_NOTICE([pkg-config: IDN_LDFLAGS: "$IDN_LDFLAGS"])
2883 AC_MSG_NOTICE([pkg-config: IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
2884 AC_MSG_NOTICE([pkg-config: IDN_DIR: "$IDN_DIR"])
2886 AC_MSG_NOTICE([IDN_LIBS: "$IDN_LIBS"])
2887 AC_MSG_NOTICE([IDN_LDFLAGS: "$IDN_LDFLAGS"])
2888 AC_MSG_NOTICE([IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
2889 AC_MSG_NOTICE([IDN_DIR: "$IDN_DIR"])
2892 CPPFLAGS="$IDN_CPPFLAGS $CPPFLAGS"
2893 LDFLAGS="$IDN_LDFLAGS $LDFLAGS"
2894 LIBS="$IDN_LIBS $LIBS"
2896 AC_MSG_CHECKING([if idna_to_ascii_4i can be linked])
2898 AC_LANG_FUNC_LINK_TRY([idna_to_ascii_4i])
2900 AC_MSG_RESULT([yes])
2901 tst_links_libidn="yes"
2904 tst_links_libidn="no"
2906 if test "$tst_links_libidn" = "no"; then
2907 AC_MSG_CHECKING([if idna_to_ascii_lz can be linked])
2909 AC_LANG_FUNC_LINK_TRY([idna_to_ascii_lz])
2911 AC_MSG_RESULT([yes])
2912 tst_links_libidn="yes"
2915 tst_links_libidn="no"
2919 if test "$tst_links_libidn" = "yes"; then
2920 AC_DEFINE(HAVE_LIBIDN, 1, [Define to 1 if you have the `idn' library (-lidn).])
2921 dnl different versions of libidn have different setups of these:
2922 AC_CHECK_FUNCS( idn_free idna_strerror tld_strerror )
2923 AC_CHECK_HEADERS( idn-free.h tld.h )
2924 if test "x$ac_cv_header_tld_h" = "xyes"; then
2925 AC_SUBST([IDN_ENABLED], [1])
2926 curl_idn_msg="enabled"
2927 if test -n "$IDN_DIR"; then
2928 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$IDN_DIR"
2929 export LD_LIBRARY_PATH
2930 AC_MSG_NOTICE([Added $IDN_DIR to LD_LIBRARY_PATH])
2933 AC_MSG_WARN([Libraries for IDN support too old: IDN disabled])
2934 CPPFLAGS="$clean_CPPFLAGS"
2935 LDFLAGS="$clean_LDFLAGS"
2939 AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
2940 CPPFLAGS="$clean_CPPFLAGS"
2941 LDFLAGS="$clean_LDFLAGS"
2947 dnl Let's hope this split URL remains working:
2948 dnl http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \
2949 dnl genprogc/thread_quick_ref.htm
2952 dnl **********************************************************************
2953 dnl Back to "normal" configuring
2954 dnl **********************************************************************
2956 dnl Checks for header files.
2959 CURL_CHECK_HEADER_MALLOC
2960 CURL_CHECK_HEADER_MEMORY
2962 dnl Now check for the very most basic headers. Then we can use these
2963 dnl ones as default-headers when checking for the rest!
3006 dnl to do if not found
3010 dnl default includes
3012 #ifdef HAVE_SYS_TYPES_H
3013 #include <sys/types.h>
3015 #ifdef HAVE_SYS_TIME_H
3016 #include <sys/time.h>
3018 #ifdef HAVE_SYS_SELECT_H
3019 #include <sys/select.h>
3021 #ifdef HAVE_SYS_SOCKET_H
3022 #include <sys/socket.h>
3024 #ifdef HAVE_NETINET_IN_H
3025 #include <netinet/in.h>
3027 #ifdef HAVE_SYS_UN_H
3033 dnl Checks for typedefs, structures, and compiler characteristics.
3035 CURL_CHECK_VARIADIC_MACROS
3038 CURL_CHECK_STRUCT_TIMEVAL
3039 CURL_VERIFY_RUNTIMELIBS
3041 AC_CHECK_SIZEOF(size_t)
3042 AC_CHECK_SIZEOF(long)
3043 AC_CHECK_SIZEOF(int)
3044 AC_CHECK_SIZEOF(short)
3046 AC_CHECK_SIZEOF(time_t)
3047 AC_CHECK_SIZEOF(off_t)
3050 if test x"$ac_cv_native_windows" != "xyes" &&
3051 test $ac_cv_sizeof_off_t -ne $curl_sizeof_curl_off_t; then
3052 AC_MSG_WARN([This libcurl built is probably not ABI compatible with previous])
3053 AC_MSG_WARN([builds! You MUST read lib/README.curl_off_t to figure it out.])
3058 AC_CHECK_TYPE(long long,
3059 [AC_DEFINE(HAVE_LONGLONG, 1,
3060 [Define to 1 if the compiler supports the 'long long' data type.])]
3064 if test "xyes" = "x$longlong"; then
3065 AC_MSG_CHECKING([if numberLL works])
3069 long long val = 1000LL;
3072 AC_MSG_RESULT([yes])
3073 AC_DEFINE(HAVE_LL, 1, [if your compiler supports LL])
3081 AC_CHECK_TYPE(ssize_t, ,
3082 AC_DEFINE(ssize_t, int, [the signed version of size_t]))
3084 # check for bool type
3085 AC_CHECK_TYPE([bool],[
3086 AC_DEFINE(HAVE_BOOL_T, 1,
3087 [Define to 1 if bool is an available type.])
3089 #ifdef HAVE_SYS_TYPES_H
3090 #include <sys/types.h>
3092 #ifdef HAVE_STDBOOL_H
3093 #include <stdbool.h>
3097 CURL_CONFIGURE_CURL_SOCKLEN_T
3099 CURL_CONFIGURE_PULL_SYS_POLL
3103 TYPE_SOCKADDR_STORAGE
3109 CURL_CHECK_FUNC_SELECT
3111 CURL_CHECK_FUNC_RECV
3112 CURL_CHECK_FUNC_RECVFROM
3113 CURL_CHECK_FUNC_SEND
3114 CURL_CHECK_MSG_NOSIGNAL
3116 CURL_CHECK_FUNC_ALARM
3117 CURL_CHECK_FUNC_BASENAME
3118 CURL_CHECK_FUNC_CLOSESOCKET
3119 CURL_CHECK_FUNC_CLOSESOCKET_CAMEL
3120 CURL_CHECK_FUNC_CONNECT
3121 CURL_CHECK_FUNC_FCNTL
3122 CURL_CHECK_FUNC_FDOPEN
3123 CURL_CHECK_FUNC_FREEADDRINFO
3124 CURL_CHECK_FUNC_FREEIFADDRS
3125 CURL_CHECK_FUNC_FSETXATTR
3126 CURL_CHECK_FUNC_FTRUNCATE
3127 CURL_CHECK_FUNC_GETADDRINFO
3128 CURL_CHECK_FUNC_GAI_STRERROR
3129 CURL_CHECK_FUNC_GETHOSTBYADDR
3130 CURL_CHECK_FUNC_GETHOSTBYADDR_R
3131 CURL_CHECK_FUNC_GETHOSTBYNAME
3132 CURL_CHECK_FUNC_GETHOSTBYNAME_R
3133 CURL_CHECK_FUNC_GETHOSTNAME
3134 CURL_CHECK_FUNC_GETIFADDRS
3135 CURL_CHECK_FUNC_GETSERVBYPORT_R
3136 CURL_CHECK_FUNC_GMTIME_R
3137 CURL_CHECK_FUNC_INET_NTOA_R
3138 CURL_CHECK_FUNC_INET_NTOP
3139 CURL_CHECK_FUNC_INET_PTON
3140 CURL_CHECK_FUNC_IOCTL
3141 CURL_CHECK_FUNC_IOCTLSOCKET
3142 CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL
3143 CURL_CHECK_FUNC_LOCALTIME_R
3144 CURL_CHECK_FUNC_MEMRCHR
3145 CURL_CHECK_FUNC_POLL
3146 CURL_CHECK_FUNC_SETSOCKOPT
3147 CURL_CHECK_FUNC_SIGACTION
3148 CURL_CHECK_FUNC_SIGINTERRUPT
3149 CURL_CHECK_FUNC_SIGNAL
3150 CURL_CHECK_FUNC_SIGSETJMP
3151 CURL_CHECK_FUNC_SOCKET
3152 CURL_CHECK_FUNC_SOCKETPAIR
3153 CURL_CHECK_FUNC_STRCASECMP
3154 CURL_CHECK_FUNC_STRCASESTR
3155 CURL_CHECK_FUNC_STRCMPI
3156 CURL_CHECK_FUNC_STRDUP
3157 CURL_CHECK_FUNC_STRERROR_R
3158 CURL_CHECK_FUNC_STRICMP
3159 CURL_CHECK_FUNC_STRLCAT
3160 CURL_CHECK_FUNC_STRNCASECMP
3161 CURL_CHECK_FUNC_STRNCMPI
3162 CURL_CHECK_FUNC_STRNICMP
3163 CURL_CHECK_FUNC_STRSTR
3164 CURL_CHECK_FUNC_STRTOK_R
3165 CURL_CHECK_FUNC_STRTOLL
3166 CURL_CHECK_FUNC_WRITEV
3172 AC_MSG_NOTICE([skip check for pipe on msdosdjgpp])
3176 AC_CHECK_FUNCS([fork \
3195 eval skipcheck=\$skipcheck_$func
3196 if test "x$skipcheck" != "xyes"; then
3197 AC_MSG_CHECKING([deeper for $func])
3204 AC_MSG_RESULT([yes])
3205 eval "ac_cv_func_$func=yes"
3206 AC_DEFINE_UNQUOTED(XC_SH_TR_CPP([HAVE_$func]), [1],
3207 [Define to 1 if you have the $func function.])
3209 AC_MSG_RESULT([but still no])
3214 dnl Check if the getnameinfo function is available
3215 dnl and get the types of five of its arguments.
3216 CURL_CHECK_FUNC_GETNAMEINFO
3218 if test "$ipv6" = "yes"; then
3219 if test "$ac_cv_func_getaddrinfo" = "yes"; then
3220 AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
3222 AC_SUBST(IPV6_ENABLED)
3224 CURL_CHECK_NI_WITHSCOPEID
3227 CURL_CHECK_NONBLOCKING_SOCKET
3229 dnl ************************************************************
3230 dnl nroff tool stuff
3233 AC_PATH_PROG( PERL, perl, ,
3234 $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
3237 AC_PATH_PROGS( NROFF, gnroff nroff, ,
3238 $PATH:/usr/bin/:/usr/local/bin )
3241 if test -n "$NROFF"; then
3242 dnl only check for nroff options if an nroff command was found
3244 AC_MSG_CHECKING([how to use *nroff to get plain text from man pages])
3246 mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
3247 if test -z "$mancheck"; then
3249 mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
3250 if test -z "$mancheck"; then
3252 AC_MSG_RESULT([failed])
3253 AC_MSG_WARN([found no *nroff option to get plaintext from man pages])
3255 AC_MSG_RESULT([$MANOPT])
3258 AC_MSG_RESULT([$MANOPT])
3263 if test -z "$MANOPT"
3265 dnl if no nroff tool was found, or no option that could convert man pages
3266 dnl was found, then disable the built-in manual stuff
3267 AC_MSG_WARN([disabling built-in manual])
3271 dnl *************************************************************************
3272 dnl If the manual variable still is set, then we go with providing a built-in
3275 if test "$USE_MANUAL" = "1"; then
3276 AC_DEFINE(USE_MANUAL, 1, [If you want to build curl with the built-in manual])
3277 curl_manual_msg="enabled"
3280 dnl set variable for use in automakefile(s)
3281 AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
3284 AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes)
3286 if test "x$ac_cv_native_windows" != "xyes" &&
3287 test "x$enable_shared" = "xyes"; then
3288 build_libhostname=yes
3290 build_libhostname=no
3292 AM_CONDITIONAL(BUILD_LIBHOSTNAME, test x$build_libhostname = xyes)
3294 CURL_CHECK_OPTION_THREADED_RESOLVER
3296 if test "x$want_thres" = xyes && test "x$want_ares" = xyes; then
3298 [Options --enable-threaded-resolver and --enable-ares are mutually exclusive])
3301 if test "$want_thres" = "yes"; then
3302 AC_CHECK_HEADER(pthread.h,
3303 [ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>])
3304 save_CFLAGS="$CFLAGS"
3305 CFLAGS="$CFLAGS -pthread"
3306 AC_CHECK_LIB(pthread, pthread_create,
3307 [ AC_MSG_NOTICE([using POSIX threaded DNS lookup])
3308 AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup])
3310 curl_res_msg="threaded"
3312 [ CFLAGS="$save_CFLAGS"])
3316 dnl ************************************************************
3317 dnl disable verbose text strings
3319 AC_MSG_CHECKING([whether to enable verbose strings])
3320 AC_ARG_ENABLE(verbose,
3321 AC_HELP_STRING([--enable-verbose],[Enable verbose strings])
3322 AC_HELP_STRING([--disable-verbose],[Disable verbose strings]),
3323 [ case "$enableval" in
3326 AC_DEFINE(CURL_DISABLE_VERBOSE_STRINGS, 1, [to disable verbose strings])
3327 curl_verbose_msg="no"
3329 *) AC_MSG_RESULT(yes)
3335 dnl ************************************************************
3336 dnl enable SSPI support
3338 AC_MSG_CHECKING([whether to enable SSPI support (Windows native builds only)])
3340 AC_HELP_STRING([--enable-sspi],[Enable SSPI])
3341 AC_HELP_STRING([--disable-sspi],[Disable SSPI]),
3342 [ case "$enableval" in
3344 if test "$ac_cv_native_windows" = "yes"; then
3346 AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
3347 AC_SUBST(USE_WINDOWS_SSPI, [1])
3348 curl_sspi_msg="enabled"
3351 AC_MSG_WARN([--enable-sspi Ignored. Only supported on native Windows builds.])
3355 if test "x$WINSSL_ENABLED" = "x1"; then
3356 # --with-winssl implies --enable-sspi
3363 if test "x$WINSSL_ENABLED" = "x1"; then
3364 # --with-winssl implies --enable-sspi
3371 dnl ************************************************************
3372 dnl disable cryptographic authentication
3374 AC_MSG_CHECKING([whether to enable cryptographic authentication methods])
3375 AC_ARG_ENABLE(crypto-auth,
3376 AC_HELP_STRING([--enable-crypto-auth],[Enable cryptographic authentication])
3377 AC_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]),
3378 [ case "$enableval" in
3381 AC_DEFINE(CURL_DISABLE_CRYPTO_AUTH, 1, [to disable cryptographic authentication])
3383 *) AC_MSG_RESULT(yes)
3389 CURL_CHECK_OPTION_NTLM_WB
3393 dnl ************************************************************
3394 dnl disable TLS-SRP authentication
3396 AC_MSG_CHECKING([whether to enable TLS-SRP authentication])
3397 AC_ARG_ENABLE(tls-srp,
3398 AC_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication])
3399 AC_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
3400 [ case "$enableval" in
3403 AC_DEFINE(CURL_DISABLE_TLS_SRP, 1, [to disable TLS-SRP authentication])
3406 *) AC_MSG_RESULT(yes)
3414 if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_SSLEAY_SRP" = "x1") ; then
3415 AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication])
3417 curl_tls_srp_msg="enabled"
3420 dnl ************************************************************
3421 dnl disable cookies support
3423 AC_MSG_CHECKING([whether to enable support for cookies])
3424 AC_ARG_ENABLE(cookies,
3425 AC_HELP_STRING([--enable-cookies],[Enable cookies support])
3426 AC_HELP_STRING([--disable-cookies],[Disable cookies support]),
3427 [ case "$enableval" in
3430 AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support])
3432 *) AC_MSG_RESULT(yes)
3438 dnl ************************************************************
3439 dnl hiding of library internal symbols
3441 CURL_CONFIGURE_SYMBOL_HIDING
3443 dnl ************************************************************
3444 dnl enforce SONAME bump
3447 AC_MSG_CHECKING([whether to enforce SONAME bump])
3448 AC_ARG_ENABLE(soname-bump,
3449 AC_HELP_STRING([--enable-soname-bump],[Enable enforced SONAME bump])
3450 AC_HELP_STRING([--disable-soname-bump],[Disable enforced SONAME bump]),
3451 [ case "$enableval" in
3452 yes) AC_MSG_RESULT(yes)
3459 AC_MSG_RESULT($soname_bump)
3461 AM_CONDITIONAL(SONAME_BUMP, test x$soname_bump = xyes)
3464 dnl All the library dependencies put into $LIB apply to libcurl only.
3468 AC_SUBST(LIBCURL_LIBS)
3469 AC_SUBST(CURL_NETWORK_LIBS)
3470 AC_SUBST(CURL_NETWORK_AND_TIME_LIBS)
3472 dnl BLANK_AT_MAKETIME may be used in our Makefile.am files to blank
3473 dnl LIBS variable used in generated makefile at makefile processing
3474 dnl time. Doing this functionally prevents LIBS from being used for
3475 dnl all link targets in given makefile.
3477 AC_SUBST(BLANK_AT_MAKETIME)
3479 AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
3482 ENABLE_SHARED="$enable_shared"
3483 AC_SUBST(ENABLE_SHARED)
3486 dnl For keeping supported features and protocols also in pkg-config file
3487 dnl since it is more cross-compile friendly than curl-config
3490 if test "x$USE_SSLEAY" = "x1"; then
3491 SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
3492 elif test -n "$SSL_ENABLED"; then
3493 SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
3495 if test "@KRB4_ENABLED@" = "x1"; then
3496 SUPPORT_FEATURES="$SUPPORT_FEATURES KRB4"
3498 if test "x$IPV6_ENABLED" = "x1"; then
3499 SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6"
3501 if test "x$HAVE_LIBZ" = "x1"; then
3502 SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
3504 if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1"; then
3505 SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
3507 if test "x$IDN_ENABLED" = "x1"; then
3508 SUPPORT_FEATURES="$SUPPORT_FEATURES IDN"
3510 if test "x$USE_WINDOWS_SSPI" = "x1"; then
3511 SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
3513 if test "x$CURL_DISABLE_HTTP" != "x1"; then
3514 if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
3515 -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \
3516 -o "x$DARWINSSL_ENABLED" = "x1"; then
3517 SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
3518 if test "x$NTLM_WB_ENABLED" = "x1"; then
3519 SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM_WB"
3523 if test "x$USE_TLS_SRP" = "x1"; then
3524 SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
3527 AC_SUBST(SUPPORT_FEATURES)
3529 dnl For supported protocols in pkg-config file
3530 if test "x$CURL_DISABLE_HTTP" != "x1"; then
3531 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP"
3532 if test "x$SSL_ENABLED" = "x1"; then
3533 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS"
3536 if test "x$CURL_DISABLE_FTP" != "x1"; then
3537 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP"
3538 if test "x$SSL_ENABLED" = "x1"; then
3539 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS"
3542 if test "x$CURL_DISABLE_FILE" != "x1"; then
3543 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE"
3545 if test "x$CURL_DISABLE_TELNET" != "x1"; then
3546 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET"
3548 if test "x$CURL_DISABLE_LDAP" != "x1"; then
3549 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP"
3550 if test "x$CURL_DISABLE_LDAPS" != "x1"; then
3551 if (test "x$USE_OPENLDAP" = "x1" && test "x$SSL_ENABLED" = "x1") ||
3552 (test "x$USE_OPENLDAP" != "x1" && test "x$HAVE_LDAP_SSL" = "x1"); then
3553 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS"
3557 if test "x$CURL_DISABLE_DICT" != "x1"; then
3558 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT"
3560 if test "x$CURL_DISABLE_TFTP" != "x1"; then
3561 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP"
3563 if test "x$CURL_DISABLE_GOPHER" != "x1"; then
3564 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER"
3566 if test "x$CURL_DISABLE_POP3" != "x1"; then
3567 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3"
3568 if test "x$SSL_ENABLED" = "x1"; then
3569 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3S"
3572 if test "x$CURL_DISABLE_IMAP" != "x1"; then
3573 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAP"
3574 if test "x$SSL_ENABLED" = "x1"; then
3575 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS"
3578 if test "x$CURL_DISABLE_SMTP" != "x1"; then
3579 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP"
3580 if test "x$SSL_ENABLED" = "x1"; then
3581 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTPS"
3584 if test "x$USE_LIBSSH2" = "x1"; then
3585 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
3586 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
3588 if test "x$CURL_DISABLE_RTSP" != "x1"; then
3589 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP"
3591 if test "x$USE_LIBRTMP" = "x1"; then
3592 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP"
3595 dnl replace spaces with newlines
3597 dnl replace the newlines back to spaces
3598 SUPPORT_PROTOCOLS=`echo $SUPPORT_PROTOCOLS | tr ' ' '\012' | sort | tr '\012' ' '`
3600 AC_SUBST(SUPPORT_PROTOCOLS)
3602 dnl squeeze whitespace out of some variables
3610 squeeze LIBCURL_LIBS
3611 squeeze CURL_NETWORK_LIBS
3612 squeeze CURL_NETWORK_AND_TIME_LIBS
3614 squeeze SUPPORT_FEATURES
3615 squeeze SUPPORT_PROTOCOLS
3618 dnl Some sanity checks for LIBS, LDFLAGS, CPPFLAGS and CFLAGS values that
3619 dnl configure is going to feed into makefiles generated by automake. Due
3620 dnl to automake placement and usage of these variables we have to follow
3621 dnl its rules or we may get funny results later on at make-time.
3625 dnl LIBS should only specify libraries
3627 AC_MSG_NOTICE([using LIBS: $LIBS])
3629 for word1 in $LIBS; do
3639 if test "$tst_bad_spec" = "yes"; then
3640 AC_MSG_WARN([oops, LIBS should only specify libraries.])
3644 dnl LDFLAGS should only specify linker flags
3646 AC_MSG_NOTICE([using LDFLAGS: $LDFLAGS])
3647 tst_bad_msg="oops, LDFLAGS should only specify linker flags, not"
3648 for word1 in $LDFLAGS; do
3651 AC_MSG_WARN([$tst_bad_msg macro definitions. Use CPPFLAGS for: $word1])
3654 AC_MSG_WARN([$tst_bad_msg macro suppressions. Use CPPFLAGS for: $word1])
3657 AC_MSG_WARN([$tst_bad_msg include directories. Use CPPFLAGS for: $word1])
3660 AC_MSG_WARN([$tst_bad_msg libraries. Use LIBS for: $word1])
3666 dnl CPPFLAGS should only specify C preprocessor flags
3668 AC_MSG_NOTICE([using CPPFLAGS: $CPPFLAGS])
3669 tst_bad_msg="oops, CPPFLAGS should only specify C preprocessor flags, not"
3670 for word1 in $CPPFLAGS; do
3673 AC_MSG_WARN([$tst_bad_msg library runtime directories. Use LDFLAGS for: $word1])
3675 -L* | --library-path=*)
3676 AC_MSG_WARN([$tst_bad_msg library directories. Use LDFLAGS for: $word1])
3679 AC_MSG_WARN([$tst_bad_msg libraries. Use LIBS for: $word1])
3685 dnl CFLAGS should only specify C compiler flags
3687 AC_MSG_NOTICE([using CFLAGS: $CFLAGS])
3688 tst_bad_msg="oops, CFLAGS should only specify C compiler flags, not"
3689 for word1 in $CFLAGS; do
3692 AC_MSG_WARN([$tst_bad_msg macro definitions. Use CPPFLAGS for: $word1])
3695 AC_MSG_WARN([$tst_bad_msg macro suppressions. Use CPPFLAGS for: $word1])
3698 AC_MSG_WARN([$tst_bad_msg include directories. Use CPPFLAGS for: $word1])
3701 AC_MSG_WARN([$tst_bad_msg library runtime directories. Use LDFLAGS for: $word1])
3703 -L* | --library-path=*)
3704 AC_MSG_WARN([$tst_bad_msg library directories. Use LDFLAGS for: $word1])
3707 AC_MSG_WARN([$tst_bad_msg libraries. Use LIBS for: $word1])
3712 if test "x$want_curldebug_assumed" = "xyes" &&
3713 test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then
3714 ac_configure_args="$ac_configure_args --enable-curldebug"
3717 AC_CONFIG_FILES([Makefile \
3719 docs/examples/Makefile \
3720 docs/libcurl/Makefile \
3722 include/curl/Makefile \
3727 tests/data/Makefile \
3728 tests/server/Makefile \
3729 tests/libtest/Makefile \
3730 tests/unit/Makefile \
3732 packages/Win32/Makefile \
3733 packages/Win32/cygwin/Makefile \
3734 packages/Linux/Makefile \
3735 packages/Linux/RPM/Makefile \
3736 packages/Linux/RPM/curl.spec \
3737 packages/Linux/RPM/curl-ssl.spec \
3738 packages/Solaris/Makefile \
3739 packages/EPM/curl.list \
3740 packages/EPM/Makefile \
3741 packages/vms/Makefile \
3742 packages/AIX/Makefile \
3743 packages/AIX/RPM/Makefile \
3744 packages/AIX/RPM/curl.spec \
3750 CURL_GENERATE_CONFIGUREHELP_PM
3752 AC_MSG_NOTICE([Configured to build curl/libcurl:
3754 curl version: ${CURLVERSION}
3756 Install prefix: ${prefix}
3758 SSL support: ${curl_ssl_msg}
3759 SSH support: ${curl_ssh_msg}
3760 zlib support: ${curl_zlib_msg}
3761 krb4 support: ${curl_krb4_msg}
3762 GSSAPI support: ${curl_gss_msg}
3763 SPNEGO support: ${curl_spnego_msg}
3764 TLS-SRP support: ${curl_tls_srp_msg}
3765 resolver: ${curl_res_msg}
3766 ipv6 support: ${curl_ipv6_msg}
3767 IDN support: ${curl_idn_msg}
3768 Build libcurl: Shared=${enable_shared}, Static=${enable_static}
3769 Built-in manual: ${curl_manual_msg}
3770 --libcurl option: ${curl_libcurl_msg}
3771 Verbose errors: ${curl_verbose_msg}
3772 SSPI support: ${curl_sspi_msg}
3773 ca cert bundle: ${ca}
3774 ca cert path: ${capath}
3775 LDAP support: ${curl_ldap_msg}
3776 LDAPS support: ${curl_ldaps_msg}
3777 RTSP support: ${curl_rtsp_msg}
3778 RTMP support: ${curl_rtmp_msg}
3779 metalink support: ${curl_mtlnk_msg}
3780 Protocols: ${SUPPORT_PROTOCOLS}
3783 if test "x$soname_bump" = "xyes"; then
3786 SONAME bump: yes - WARNING: this library will be built with the SONAME
3787 number bumped due to (a detected) ABI breakage.
3788 See lib/README.curl_off_t for details on this.