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/])
31 CURL_OVERRIDE_AUTOCONF
33 dnl configure script copyright
34 AC_COPYRIGHT([Copyright (c) 1998 - 2012 Daniel Stenberg, <daniel@haxx.se>
35 This configure script may be copied, distributed and modified under the
36 terms of the curl license; see COPYING for more details])
38 AC_CONFIG_SRCDIR([lib/urldata.h])
39 AC_CONFIG_HEADERS(lib/curl_config.h include/curl/curlbuild.h)
40 AC_CONFIG_MACRO_DIR([m4])
43 CURL_CHECK_OPTION_DEBUG
44 CURL_CHECK_OPTION_OPTIMIZE
45 CURL_CHECK_OPTION_WARNINGS
46 CURL_CHECK_OPTION_WERROR
47 CURL_CHECK_OPTION_CURLDEBUG
48 CURL_CHECK_OPTION_SYMBOL_HIDING
49 CURL_CHECK_OPTION_ARES
51 CURL_CHECK_PATH_SEPARATOR_REQUIRED
54 # save the configure arguments
56 CONFIGURE_OPTIONS="\"$ac_configure_args\""
57 AC_SUBST(CONFIGURE_OPTIONS)
60 if test X"$want_werror" = Xyes; then
61 CURL_CFLAG_EXTRAS="-Werror"
63 AC_SUBST(CURL_CFLAG_EXTRAS)
65 dnl SED is mandatory for configure process and libtool.
66 dnl Set it now, allowing it to be changed later.
67 if test -z "$SED"; then
68 dnl allow it to be overridden
69 AC_PATH_PROG([SED], [sed], [not_found],
70 [$PATH:/usr/bin:/usr/local/bin])
71 if test -z "$SED" || test "$SED" = "not_found"; then
72 AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
77 dnl GREP is mandatory for configure process and libtool.
78 dnl Set it now, allowing it to be changed later.
79 if test -z "$GREP"; then
80 dnl allow it to be overridden
81 AC_PATH_PROG([GREP], [grep], [not_found],
82 [$PATH:/usr/bin:/usr/local/bin])
83 if test -z "$GREP" || test "$GREP" = "not_found"; then
84 AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
89 dnl EGREP is mandatory for configure process and libtool.
90 dnl Set it now, allowing it to be changed later.
91 if test -z "$EGREP"; then
92 dnl allow it to be overridden
93 if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
94 AC_MSG_CHECKING([for egrep])
96 AC_MSG_RESULT([$EGREP])
98 AC_PATH_PROG([EGREP], [egrep], [not_found],
99 [$PATH:/usr/bin:/usr/local/bin])
102 if test -z "$EGREP" || test "$EGREP" = "not_found"; then
103 AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.])
107 dnl AR is mandatory for configure process and libtool.
108 dnl This is target dependent, so check it as a tool.
109 if test -z "$AR"; then
110 dnl allow it to be overridden
111 AC_PATH_TOOL([AR], [ar], [not_found],
112 [$PATH:/usr/bin:/usr/local/bin])
113 if test -z "$AR" || test "$AR" = "not_found"; then
114 AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
121 dnl Remove non-configure distributed curlbuild.h
122 if test -f ${srcdir}/include/curl/curlbuild.h; then
123 rm -f ${srcdir}/include/curl/curlbuild.h
126 dnl figure out the libcurl version
127 CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
129 AC_MSG_CHECKING([curl version])
130 AC_MSG_RESULT($CURLVERSION)
132 AC_SUBST(CURLVERSION)
135 dnl we extract the numerical version for curl-config only
136 VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curlver.h`
139 dnl Solaris pkgadd support definitions
140 PKGADD_PKG="HAXXcurl"
141 PKGADD_NAME="cURL - a client that groks URLs"
142 PKGADD_VENDOR="curl.haxx.se"
144 AC_SUBST(PKGADD_NAME)
145 AC_SUBST(PKGADD_VENDOR)
148 dnl initialize all the info variables
149 curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls,winssl,darwinssl} )"
150 curl_ssh_msg="no (--with-libssh2)"
151 curl_zlib_msg="no (--with-zlib)"
152 curl_krb4_msg="no (--with-krb4*)"
153 curl_gss_msg="no (--with-gssapi)"
154 curl_spnego_msg="no (--with-spnego)"
155 curl_tls_srp_msg="no (--enable-tls-srp)"
156 curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
157 curl_ipv6_msg="no (--enable-ipv6)"
158 curl_idn_msg="no (--with-{libidn,winidn})"
159 curl_manual_msg="no (--enable-manual)"
160 curl_libcurl_msg="enabled (--disable-libcurl-option)"
161 curl_verbose_msg="enabled (--disable-verbose)"
162 curl_sspi_msg="no (--enable-sspi)"
163 curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
164 curl_ldaps_msg="no (--enable-ldaps)"
165 curl_rtsp_msg="no (--enable-rtsp)"
166 curl_rtmp_msg="no (--with-librtmp)"
167 curl_mtlnk_msg="no (--with-libmetalink)"
169 init_ssl_msg=${curl_ssl_msg}
172 dnl LIBS should only specify libraries
175 for word1 in $LIBS; do
185 if test "$tst_bad_spec" = "yes"; then
186 AC_MSG_WARN([invalid LIBS: $LIBS])
187 AC_MSG_ERROR([LIBS may only be used to specify libraries (-lname).])
191 dnl LDFLAGS should only specify linker flags
195 for word1 in $LDFLAGS; do
199 tst_bad_msg="not macro definitions. Use CPPFLAGS for these."
203 tst_bad_msg="not macro suppressions. Use CPPFLAGS for these."
207 tst_bad_msg="not include directories. Use CPPFLAGS for these."
211 tst_bad_msg="not libraries. Use LIBS for these."
215 if test "$tst_bad_spec" = "yes"; then
216 AC_MSG_WARN([invalid LDFLAGS: $LDFLAGS])
217 AC_MSG_ERROR([LDFLAGS may only be used to specify linker flags, $tst_bad_msg])
221 dnl CPPFLAGS should only specify C preprocessor flags
225 for word1 in $CPPFLAGS; do
229 tst_bad_msg="not library runtime directories. Use LDFLAGS for these."
231 -L* | --library-path=*)
233 tst_bad_msg="not library directories. Use LDFLAGS for these."
237 tst_bad_msg="not libraries. Use LIBS for these."
241 if test "$tst_bad_spec" = "yes"; then
242 AC_MSG_WARN([invalid CPPFLAGS: $CPPFLAGS])
243 AC_MSG_ERROR([CPPFLAGS may only be used to specify C preprocessor flags, $tst_bad_msg])
247 dnl CFLAGS should only specify C compiler flags
251 for word1 in $CFLAGS; do
255 tst_bad_msg="not macro definitions. Use CPPFLAGS for these."
259 tst_bad_msg="not macro suppressions. Use CPPFLAGS for these."
263 tst_bad_msg="not include directories. Use CPPFLAGS for these."
267 tst_bad_msg="not library runtime directories. Use LDFLAGS for these."
269 -L* | --library-path=*)
271 tst_bad_msg="not library directories. Use LDFLAGS for these."
275 tst_bad_msg="not libraries. Use LIBS for these."
279 if test "$tst_bad_spec" = "yes"; then
280 AC_MSG_WARN([invalid CFLAGS: $CFLAGS])
281 AC_MSG_ERROR([CFLAGS may only be used to specify C compiler flags, $tst_bad_msg])
285 dnl Save some initial values the user might have provided
287 INITIAL_LDFLAGS=$LDFLAGS
291 dnl Detect the canonical host and target build environment
295 dnl Get system canonical name
296 AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
298 dnl Checks for programs.
301 dnl Our curl_off_t internal and external configure settings
302 CURL_CONFIGURE_CURL_OFF_T
304 dnl This defines _ALL_SOURCE for AIX
305 CURL_CHECK_AIX_ALL_SOURCE
307 dnl Our configure and build reentrant settings
308 CURL_CONFIGURE_THREAD_SAFE
309 CURL_CONFIGURE_REENTRANT
311 dnl check for how to do large files
314 dnl support building of Windows DLLs
317 dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD
318 AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)])
320 x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
329 AC_MSG_CHECKING([if compiler is icc (to build with PIC)])
343 AC_MSG_CHECKING([if we need -mimpure-text])
347 if test "$GCC" = "yes"; then
354 AC_MSG_RESULT($mimpure)
355 AM_CONDITIONAL(MIMPURE, test x$mimpure = xyes)
357 AC_MSG_CHECKING([if we need BUILDING_LIBCURL])
358 use_cppflag_building_libcurl="no"
359 use_cppflag_curl_staticlib="no"
360 CPPFLAG_CURL_STATICLIB=""
364 use_cppflag_building_libcurl="yes"
365 AC_MSG_CHECKING([if we need CURL_STATICLIB])
366 if test "X$enable_shared" = "Xno"
369 use_cppflag_curl_staticlib="yes"
370 CPPFLAG_CURL_STATICLIB="-DCURL_STATICLIB"
379 AM_CONDITIONAL(USE_CPPFLAG_BUILDING_LIBCURL, test x$use_cppflag_building_libcurl = xyes)
380 AM_CONDITIONAL(USE_CPPFLAG_CURL_STATICLIB, test x$use_cppflag_curl_staticlib = xyes)
381 AC_SUBST(CPPFLAG_CURL_STATICLIB)
383 # Determine whether all dependent libraries must be specified when linking
384 if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno"
390 AC_SUBST(REQUIRE_LIB_DEPS)
391 AM_CONDITIONAL(USE_EXPLICIT_LIB_DEPS, test x$REQUIRE_LIB_DEPS = xyes)
393 dnl The install stuff has already been taken care of by the automake stuff
397 dnl check if there's a way to force code inline
400 dnl **********************************************************************
401 dnl platform/compiler/architecture specific checks/flags
402 dnl **********************************************************************
405 CURL_SET_COMPILER_BASIC_OPTS
406 CURL_SET_COMPILER_DEBUG_OPTS
407 CURL_SET_COMPILER_OPTIMIZE_OPTS
408 CURL_SET_COMPILER_WARNING_OPTS
410 if test "$compiler_id" = "INTEL_UNIX_C"; then
412 if test "$compiler_num" -ge "1000"; then
413 dnl icc 10.X or later
414 CFLAGS="$CFLAGS -shared-intel"
415 elif test "$compiler_num" -ge "900"; then
417 CFLAGS="$CFLAGS -i-dynamic"
422 CURL_CHECK_COMPILER_HALT_ON_ERROR
423 CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
424 CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH
425 CURL_CHECK_COMPILER_SYMBOL_HIDING
427 CURL_CHECK_NO_UNDEFINED
428 AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
431 AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
433 supports_unittests=yes
434 # cross-compilation of unit tests static library/programs fails when
435 # libcurl shared library is built. This might be due to a libtool or
436 # automake issue. In this case we disable unit tests.
437 if test "x$cross_compiling" != "xno" &&
438 test "x$enable_shared" != "xno"; then
439 supports_unittests=no
442 # IRIX 6.5.24 gcc 3.3 autobuilds fail unittests library compilation due to
443 # a problem related with OpenSSL headers and library versions not matching.
444 # Disable unit tests while time to further investigate this is found.
447 if test "$compiler_id" = "GNU_C"; then
448 supports_unittests=no
453 # All AIX autobuilds fails unit tests linking against unittests library
454 # due to unittests library being built with no symbols or members. Libtool ?
455 # Disable unit tests while time to further investigate this is found.
458 supports_unittests=no
462 dnl Build unit tests when option --enable-debug is given.
463 if test "x$want_debug" = "xyes" &&
464 test "x$supports_unittests" = "xyes"; then
469 AM_CONDITIONAL(BUILD_UNITTESTS, test x$want_unittests = xyes)
471 dnl **********************************************************************
472 dnl Compilation based checks should not be done before this point.
473 dnl **********************************************************************
475 dnl **********************************************************************
476 dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
477 dnl and ws2tcpip.h take precedence over any other further checks which
478 dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
479 dnl this specific header files. And do them before its results are used.
480 dnl **********************************************************************
482 CURL_CHECK_HEADER_WINDOWS
483 CURL_CHECK_NATIVE_WINDOWS
484 case X-"$ac_cv_native_windows" in
486 CURL_CHECK_HEADER_WINSOCK
487 CURL_CHECK_HEADER_WINSOCK2
488 CURL_CHECK_HEADER_WS2TCPIP
489 CURL_CHECK_HEADER_WINLDAP
490 CURL_CHECK_HEADER_WINBER
493 ac_cv_header_winsock_h="no"
494 ac_cv_header_winsock2_h="no"
495 ac_cv_header_ws2tcpip_h="no"
496 ac_cv_header_winldap_h="no"
497 ac_cv_header_winber_h="no"
500 CURL_CHECK_WIN32_LARGEFILE
502 dnl ************************************************************
503 dnl switch off particular protocols
505 AC_MSG_CHECKING([whether to support http])
507 AC_HELP_STRING([--enable-http],[Enable HTTP support])
508 AC_HELP_STRING([--disable-http],[Disable HTTP support]),
509 [ case "$enableval" in
512 AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP])
513 AC_MSG_WARN([disable HTTP disables FTP over proxy and RTSP])
514 AC_SUBST(CURL_DISABLE_HTTP, [1])
515 AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
516 AC_SUBST(CURL_DISABLE_RTSP, [1])
518 *) AC_MSG_RESULT(yes)
523 AC_MSG_CHECKING([whether to support ftp])
525 AC_HELP_STRING([--enable-ftp],[Enable FTP support])
526 AC_HELP_STRING([--disable-ftp],[Disable FTP support]),
527 [ case "$enableval" in
530 AC_DEFINE(CURL_DISABLE_FTP, 1, [to disable FTP])
531 AC_SUBST(CURL_DISABLE_FTP, [1])
533 *) AC_MSG_RESULT(yes)
538 AC_MSG_CHECKING([whether to support file])
540 AC_HELP_STRING([--enable-file],[Enable FILE support])
541 AC_HELP_STRING([--disable-file],[Disable FILE support]),
542 [ case "$enableval" in
545 AC_DEFINE(CURL_DISABLE_FILE, 1, [to disable FILE])
546 AC_SUBST(CURL_DISABLE_FILE, [1])
548 *) AC_MSG_RESULT(yes)
553 AC_MSG_CHECKING([whether to support ldap])
555 AC_HELP_STRING([--enable-ldap],[Enable LDAP support])
556 AC_HELP_STRING([--disable-ldap],[Disable LDAP support]),
557 [ case "$enableval" in
560 AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
561 AC_SUBST(CURL_DISABLE_LDAP, [1])
569 AC_MSG_CHECKING([whether to support ldaps])
571 AC_HELP_STRING([--enable-ldaps],[Enable LDAPS support])
572 AC_HELP_STRING([--disable-ldaps],[Disable LDAPS support]),
573 [ case "$enableval" in
576 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
577 AC_SUBST(CURL_DISABLE_LDAPS, [1])
579 *) if test "x$CURL_DISABLE_LDAP" = "x1" ; then
580 AC_MSG_RESULT(LDAP needs to be enabled to support LDAPS)
581 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
582 AC_SUBST(CURL_DISABLE_LDAPS, [1])
585 AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
586 AC_SUBST(HAVE_LDAP_SSL, [1])
590 if test "x$CURL_DISABLE_LDAP" = "x1" ; then
592 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
593 AC_SUBST(CURL_DISABLE_LDAPS, [1])
596 AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
597 AC_SUBST(HAVE_LDAP_SSL, [1])
601 AC_MSG_CHECKING([whether to support rtsp])
603 AC_HELP_STRING([--enable-rtsp],[Enable RTSP support])
604 AC_HELP_STRING([--disable-rtsp],[Disable RTSP support]),
605 [ case "$enableval" in
608 AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
609 AC_SUBST(CURL_DISABLE_RTSP, [1])
611 *) if test x$CURL_DISABLE_HTTP = x1 ; then
612 AC_MSG_ERROR(HTTP support needs to be enabled in order to enable RTSP support!)
615 curl_rtsp_msg="enabled"
619 if test "x$CURL_DISABLE_HTTP" != "x1"; then
621 curl_rtsp_msg="enabled"
627 AC_MSG_CHECKING([whether to support proxies])
629 AC_HELP_STRING([--enable-proxy],[Enable proxy support])
630 AC_HELP_STRING([--disable-proxy],[Disable proxy support]),
631 [ case "$enableval" in
634 AC_DEFINE(CURL_DISABLE_PROXY, 1, [to disable proxies])
635 AC_SUBST(CURL_DISABLE_PROXY, [1])
637 *) AC_MSG_RESULT(yes)
643 AC_MSG_CHECKING([whether to support dict])
645 AC_HELP_STRING([--enable-dict],[Enable DICT support])
646 AC_HELP_STRING([--disable-dict],[Disable DICT support]),
647 [ case "$enableval" in
650 AC_DEFINE(CURL_DISABLE_DICT, 1, [to disable DICT])
651 AC_SUBST(CURL_DISABLE_DICT, [1])
653 *) AC_MSG_RESULT(yes)
658 AC_MSG_CHECKING([whether to support telnet])
659 AC_ARG_ENABLE(telnet,
660 AC_HELP_STRING([--enable-telnet],[Enable TELNET support])
661 AC_HELP_STRING([--disable-telnet],[Disable TELNET support]),
662 [ case "$enableval" in
665 AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET])
666 AC_SUBST(CURL_DISABLE_TELNET, [1])
668 *) AC_MSG_RESULT(yes)
673 AC_MSG_CHECKING([whether to support tftp])
675 AC_HELP_STRING([--enable-tftp],[Enable TFTP support])
676 AC_HELP_STRING([--disable-tftp],[Disable TFTP support]),
677 [ case "$enableval" in
680 AC_DEFINE(CURL_DISABLE_TFTP, 1, [to disable TFTP])
681 AC_SUBST(CURL_DISABLE_TFTP, [1])
683 *) AC_MSG_RESULT(yes)
689 AC_MSG_CHECKING([whether to support pop3])
691 AC_HELP_STRING([--enable-pop3],[Enable POP3 support])
692 AC_HELP_STRING([--disable-pop3],[Disable POP3 support]),
693 [ case "$enableval" in
696 AC_DEFINE(CURL_DISABLE_POP3, 1, [to disable POP3])
697 AC_SUBST(CURL_DISABLE_POP3, [1])
699 *) AC_MSG_RESULT(yes)
706 AC_MSG_CHECKING([whether to support imap])
708 AC_HELP_STRING([--enable-imap],[Enable IMAP support])
709 AC_HELP_STRING([--disable-imap],[Disable IMAP support]),
710 [ case "$enableval" in
713 AC_DEFINE(CURL_DISABLE_IMAP, 1, [to disable IMAP])
714 AC_SUBST(CURL_DISABLE_IMAP, [1])
716 *) AC_MSG_RESULT(yes)
723 AC_MSG_CHECKING([whether to support smtp])
725 AC_HELP_STRING([--enable-smtp],[Enable SMTP support])
726 AC_HELP_STRING([--disable-smtp],[Disable SMTP support]),
727 [ case "$enableval" in
730 AC_DEFINE(CURL_DISABLE_SMTP, 1, [to disable SMTP])
731 AC_SUBST(CURL_DISABLE_SMTP, [1])
733 *) AC_MSG_RESULT(yes)
739 AC_MSG_CHECKING([whether to support gopher])
740 AC_ARG_ENABLE(gopher,
741 AC_HELP_STRING([--enable-gopher],[Enable Gopher support])
742 AC_HELP_STRING([--disable-gopher],[Disable Gopher support]),
743 [ case "$enableval" in
746 AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable Gopher])
747 AC_SUBST(CURL_DISABLE_GOPHER, [1])
749 *) AC_MSG_RESULT(yes)
756 dnl **********************************************************************
757 dnl Check for built-in manual
758 dnl **********************************************************************
760 AC_MSG_CHECKING([whether to provide built-in manual])
761 AC_ARG_ENABLE(manual,
762 AC_HELP_STRING([--enable-manual],[Enable built-in manual])
763 AC_HELP_STRING([--disable-manual],[Disable built-in manual]),
764 [ case "$enableval" in
768 *) AC_MSG_RESULT(yes)
775 dnl The actual use of the USE_MANUAL variable is done much later in this
776 dnl script to allow other actions to disable it as well.
778 dnl ************************************************************
779 dnl disable C code generation support
781 AC_MSG_CHECKING([whether to enable generation of C code])
782 AC_ARG_ENABLE(libcurl_option,
783 AC_HELP_STRING([--enable-libcurl-option],[Enable --libcurl C code generation support])
784 AC_HELP_STRING([--disable-libcurl-option],[Disable --libcurl C code generation support]),
785 [ case "$enableval" in
788 AC_DEFINE(CURL_DISABLE_LIBCURL_OPTION, 1, [to disable --libcurl C code generation option])
789 curl_libcurl_msg="no"
791 *) AC_MSG_RESULT(yes)
797 dnl **********************************************************************
798 dnl Checks for libraries.
799 dnl **********************************************************************
801 AC_MSG_CHECKING([whether to use libgcc])
802 AC_ARG_ENABLE(libgcc,
803 AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
804 [ case "$enableval" in
817 dnl gethostbyname without lib or in the nsl lib?
818 AC_CHECK_FUNC(gethostbyname,
819 [HAVE_GETHOSTBYNAME="1"
821 [ AC_CHECK_LIB(nsl, gethostbyname,
822 [HAVE_GETHOSTBYNAME="1"
827 if test "$HAVE_GETHOSTBYNAME" != "1"
829 dnl gethostbyname in the socket lib?
830 AC_CHECK_LIB(socket, gethostbyname,
831 [HAVE_GETHOSTBYNAME="1"
832 LIBS="-lsocket $LIBS"
836 if test "$HAVE_GETHOSTBYNAME" != "1"
838 dnl gethostbyname in the watt lib?
839 AC_CHECK_LIB(watt, gethostbyname,
840 [HAVE_GETHOSTBYNAME="1"
841 CPPFLAGS="-I/dev/env/WATT_ROOT/inc"
842 LDFLAGS="-L/dev/env/WATT_ROOT/lib"
847 dnl At least one system has been identified to require BOTH nsl and socket
848 dnl libs at the same time to link properly.
849 if test "$HAVE_GETHOSTBYNAME" != "1"
851 AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs])
852 my_ac_save_LIBS=$LIBS
853 LIBS="-lnsl -lsocket $LIBS"
861 HAVE_GETHOSTBYNAME="1"
864 LIBS=$my_ac_save_LIBS
868 if test "$HAVE_GETHOSTBYNAME" != "1"
870 dnl This is for winsock systems
871 if test "$ac_cv_header_windows_h" = "yes"; then
872 if test "$ac_cv_header_winsock_h" = "yes"; then
875 winsock_LIB="-lwinsock"
878 winsock_LIB="-lwsock32"
882 if test "$ac_cv_header_winsock2_h" = "yes"; then
883 winsock_LIB="-lws2_32"
885 if test ! -z "$winsock_LIB"; then
886 my_ac_save_LIBS=$LIBS
887 LIBS="$winsock_LIB $LIBS"
888 AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
891 #ifdef HAVE_WINDOWS_H
892 #ifndef WIN32_LEAN_AND_MEAN
893 #define WIN32_LEAN_AND_MEAN
896 #ifdef HAVE_WINSOCK2_H
897 #include <winsock2.h>
899 #ifdef HAVE_WINSOCK_H
905 gethostbyname("www.dummysite.com");
909 HAVE_GETHOSTBYNAME="1"
913 LIBS=$my_ac_save_LIBS
919 if test "$HAVE_GETHOSTBYNAME" != "1"
921 dnl This is for Minix 3.1
922 AC_MSG_CHECKING([for gethostbyname for Minix 3])
925 /* Older Minix versions may need <net/gen/netdb.h> here instead */
928 gethostbyname("www.dummysite.com");
932 HAVE_GETHOSTBYNAME="1"
938 if test "$HAVE_GETHOSTBYNAME" != "1"
940 dnl This is for eCos with a stubbed DNS implementation
941 AC_MSG_CHECKING([for gethostbyname for eCos])
947 gethostbyname("www.dummysite.com");
951 HAVE_GETHOSTBYNAME="1"
957 if test "$HAVE_GETHOSTBYNAME" != "1"
959 dnl gethostbyname in the network lib - for Haiku OS
960 AC_CHECK_LIB(network, gethostbyname,
961 [HAVE_GETHOSTBYNAME="1"
962 LIBS="-lnetwork $LIBS"
966 if test "$HAVE_GETHOSTBYNAME" != "1"
968 dnl gethostbyname in the net lib - for BeOS
969 AC_CHECK_LIB(net, gethostbyname,
970 [HAVE_GETHOSTBYNAME="1"
976 if test "$HAVE_GETHOSTBYNAME" != "1"; then
977 AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
981 AC_CHECK_FUNC(strcasecmp, , [ AC_CHECK_LIB(resolve, strcasecmp) ])
983 if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
984 AC_CHECK_LIB(resolve, strcasecmp,
985 [LIBS="-lresolve $LIBS"],
989 ac_cv_func_strcasecmp="no"
991 CURL_CHECK_LIBS_CONNECT
993 CURL_NETWORK_LIBS=$LIBS
995 dnl **********************************************************************
996 dnl In case that function clock_gettime with monotonic timer is available,
997 dnl check for additional required libraries.
998 dnl **********************************************************************
999 CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
1001 dnl **********************************************************************
1002 dnl The preceding library checks are all potentially useful for test
1003 dnl servers and libtest cases which require networking and clock_gettime
1004 dnl support. Save the list of required libraries at this point for use
1005 dnl while linking those test servers and programs.
1006 dnl **********************************************************************
1007 CURL_NETWORK_AND_TIME_LIBS=$LIBS
1009 dnl **********************************************************************
1010 dnl Check for the presence of ZLIB libraries and headers
1011 dnl **********************************************************************
1013 dnl Check for & handle argument to --with-zlib.
1015 clean_CPPFLAGS=$CPPFLAGS
1016 clean_LDFLAGS=$LDFLAGS
1020 AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
1021 AC_HELP_STRING([--without-zlib],[disable use of zlib]),
1022 [OPT_ZLIB="$withval"])
1024 if test "$OPT_ZLIB" = "no" ; then
1025 AC_MSG_WARN([zlib disabled])
1027 if test "$OPT_ZLIB" = "yes" ; then
1031 if test -z "$OPT_ZLIB" ; then
1032 dnl check for the lib first without setting any new path, since many
1033 dnl people have it in the default path
1035 AC_CHECK_LIB(z, inflateEnd,
1036 dnl libz found, set the variable
1039 dnl if no lib found, try /usr/local
1040 [OPT_ZLIB="/usr/local"])
1044 dnl Add a nonempty path to the compiler flags
1045 if test -n "$OPT_ZLIB"; then
1046 CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
1047 LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
1050 AC_CHECK_HEADER(zlib.h,
1052 dnl zlib.h was found
1054 dnl if the lib wasn't found already, try again with the new paths
1055 if test "$HAVE_LIBZ" != "1"; then
1056 AC_CHECK_LIB(z, gzread,
1058 dnl the lib was found!
1062 [ CPPFLAGS=$clean_CPPFLAGS
1063 LDFLAGS=$clean_LDFLAGS])
1067 dnl zlib.h was not found, restore the flags
1068 CPPFLAGS=$clean_CPPFLAGS
1069 LDFLAGS=$clean_LDFLAGS]
1072 if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
1074 AC_MSG_WARN([configure found only the libz lib, not the header file!])
1076 CPPFLAGS=$clean_CPPFLAGS
1077 LDFLAGS=$clean_LDFLAGS
1079 elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
1081 AC_MSG_WARN([configure found only the libz header file, not the lib!])
1082 CPPFLAGS=$clean_CPPFLAGS
1083 LDFLAGS=$clean_LDFLAGS
1085 elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
1087 dnl both header and lib were found!
1089 AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file])
1090 AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
1093 LIBS="-lz $clean_LIBS"
1095 dnl replace 'HAVE_LIBZ' in the automake makefile.ams
1097 AC_MSG_NOTICE([found both libz and libz.h header])
1098 curl_zlib_msg="enabled"
1102 dnl set variable for use in automakefile(s)
1103 AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1)
1106 dnl **********************************************************************
1108 dnl **********************************************************************
1111 AC_ARG_WITH(ldap-lib,
1112 AC_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]),
1113 [LDAPLIBNAME="$withval"])
1116 AC_ARG_WITH(lber-lib,
1117 AC_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]),
1118 [LBERLIBNAME="$withval"])
1120 if test x$CURL_DISABLE_LDAP != x1 ; then
1122 CURL_CHECK_HEADER_LBER
1123 CURL_CHECK_HEADER_LDAP
1124 CURL_CHECK_HEADER_LDAPSSL
1125 CURL_CHECK_HEADER_LDAP_SSL
1127 if test -z "$LDAPLIBNAME" ; then
1128 if test "$ac_cv_native_windows" = "yes"; then
1129 dnl Windows uses a single and unique LDAP library name
1130 LDAPLIBNAME="wldap32"
1135 if test "$LDAPLIBNAME" ; then
1136 AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [
1137 AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled])
1138 AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
1139 AC_SUBST(CURL_DISABLE_LDAP, [1])
1140 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
1141 AC_SUBST(CURL_DISABLE_LDAPS, [1])])
1143 dnl Try to find the right ldap libraries for this system
1144 CURL_CHECK_LIBS_LDAP
1145 case X-"$curl_cv_ldap_LIBS" in
1147 AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled])
1148 AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
1149 AC_SUBST(CURL_DISABLE_LDAP, [1])
1150 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
1151 AC_SUBST(CURL_DISABLE_LDAPS, [1])
1157 if test x$CURL_DISABLE_LDAP != x1 ; then
1159 if test "$LBERLIBNAME" ; then
1160 dnl If name is "no" then don't define this library at all
1161 dnl (it's only needed if libldap.so's dependencies are broken).
1162 if test "$LBERLIBNAME" != "no" ; then
1163 AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [
1164 AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled])
1165 AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
1166 AC_SUBST(CURL_DISABLE_LDAP, [1])
1167 AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
1168 AC_SUBST(CURL_DISABLE_LDAPS, [1])])
1173 if test x$CURL_DISABLE_LDAP != x1 ; then
1174 AC_CHECK_FUNCS([ldap_url_parse ldap_init_fd])
1176 if test "$LDAPLIBNAME" = "wldap32"; then
1177 curl_ldap_msg="enabled (winldap)"
1178 AC_DEFINE(CURL_LDAP_WIN, 1, [Use Windows LDAP implementation])
1180 curl_ldap_msg="enabled (OpenLDAP)"
1181 if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
1182 AC_DEFINE(USE_OPENLDAP, 1, [Use OpenLDAP-specific code])
1183 AC_SUBST(USE_OPENLDAP, [1])
1188 if test x$CURL_DISABLE_LDAPS != x1 ; then
1189 curl_ldaps_msg="enabled"
1192 dnl **********************************************************************
1194 dnl **********************************************************************
1196 AC_MSG_CHECKING([whether to enable ipv6])
1198 AC_HELP_STRING([--enable-ipv6],[Enable ipv6 (with ipv4) support])
1199 AC_HELP_STRING([--disable-ipv6],[Disable ipv6 support]),
1200 [ case "$enableval" in
1205 *) AC_MSG_RESULT(yes)
1210 AC_TRY_RUN([ /* is AF_INET6 available? */
1211 #include <sys/types.h>
1212 #include <sys/socket.h>
1215 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
1229 if test "$ipv6" = "yes"; then
1230 curl_ipv6_msg="enabled"
1233 # Check if struct sockaddr_in6 have sin6_scope_id member
1234 if test "$ipv6" = yes; then
1235 AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
1237 #include <sys/types.h>
1238 #include <netinet/in.h>] ,
1239 struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes)
1240 if test "$have_sin6_scope_id" = yes; then
1241 AC_MSG_RESULT([yes])
1242 AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member])
1248 dnl **********************************************************************
1249 dnl Check if the operating system allows programs to write to their own argv[]
1250 dnl **********************************************************************
1252 AC_MSG_CHECKING([if argv can be written to])
1255 int main(int argc, char ** argv) {
1257 return (argv[0][0] == ' ')?0:1;
1261 curl_cv_writable_argv=yes
1263 curl_cv_writable_argv=no
1265 curl_cv_writable_argv=cross
1267 case $curl_cv_writable_argv in
1269 AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv])
1277 AC_MSG_WARN([the previous check could not be made default was used])
1281 dnl **********************************************************************
1282 dnl Check for the presence of Kerberos4 libraries and headers
1283 dnl **********************************************************************
1285 AC_ARG_WITH(krb4-includes,
1286 AC_HELP_STRING([--with-krb4-includes=DIR],
1287 [Specify location of kerberos4 headers]),[
1288 CPPFLAGS="$CPPFLAGS -I$withval"
1293 AC_ARG_WITH(krb4-libs,
1294 AC_HELP_STRING([--with-krb4-libs=DIR],[Specify location of kerberos4 libs]),[
1295 LDFLAGS="$LDFLAGS -L$withval"
1302 AC_ARG_WITH(krb4,dnl
1303 AC_HELP_STRING([--with-krb4=DIR],[where to look for Kerberos4]),[
1305 if test X"$OPT_KRB4" != Xno; then
1307 if test X"$OPT_KRB4" != Xyes; then
1308 LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib$libsuff"
1309 KRB4LIB="$OPT_KRB4/lib$libsuff"
1310 CPPFLAGS="$CPPFLAGS -I$OPT_KRB4/include"
1311 KRB4INC="$OPT_KRB4/include"
1316 AC_MSG_CHECKING([if Kerberos4 support is requested])
1318 if test "$want_krb4" = yes
1320 if test "$ipv6" = "yes"; then
1321 echo krb4 is not compatible with IPv6
1326 dnl Check for & handle argument to --with-krb4
1328 AC_MSG_CHECKING(where to look for Kerberos4)
1329 if test X"$OPT_KRB4" = Xyes
1331 AC_MSG_RESULT([defaults])
1333 AC_MSG_RESULT([libs in $KRB4LIB, headers in $KRB4INC])
1336 dnl Check for DES library
1337 AC_CHECK_LIB(des, des_pcbc_encrypt,
1339 AC_CHECK_HEADERS(des.h)
1342 AC_CHECK_FUNC(res_search, , [AC_CHECK_LIB(resolv, res_search)])
1344 dnl Check for the Kerberos4 library
1345 AC_CHECK_LIB(krb, krb_net_read,
1347 dnl Check for header files
1348 AC_CHECK_HEADERS(krb.h)
1350 dnl we found the required libraries, add to LIBS
1351 LIBS="-lkrb -lcom_err -ldes $LIBS"
1353 dnl Check for function krb_get_our_ip_for_realm
1354 dnl this is needed for NAT networks
1355 AC_CHECK_FUNCS(krb_get_our_ip_for_realm)
1358 AC_DEFINE(HAVE_KRB4, 1,
1359 [if you have the Kerberos4 libraries (including -ldes)])
1361 dnl substitute it too!
1363 AC_SUBST(KRB4_ENABLED)
1365 curl_krb4_msg="enabled"
1367 dnl the krb4 stuff needs a strlcpy()
1368 AC_CHECK_FUNCS(strlcpy)
1376 dnl **********************************************************************
1377 dnl Check for FBopenssl(SPNEGO) libraries
1378 dnl **********************************************************************
1381 AC_HELP_STRING([--with-spnego=DIR],
1382 [Specify location of SPNEGO library fbopenssl]), [
1383 SPNEGO_ROOT="$withval"
1384 if test x"$SPNEGO_ROOT" != xno; then
1389 AC_MSG_CHECKING([if SPNEGO support is requested])
1390 if test x"$want_spnego" = xyes; then
1392 if test X"$SPNEGO_ROOT" = Xyes; then
1393 AC_MSG_ERROR([FBOpenSSL libs and/or directories were not found where specified!])
1396 if test -z "$SPNEGO_LIB_DIR"; then
1397 LDFLAGS="$LDFLAGS -L$SPNEGO_ROOT -lfbopenssl"
1399 LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR"
1403 AC_DEFINE(HAVE_SPNEGO, 1,
1404 [Define this if you have the SPNEGO library fbopenssl])
1405 curl_spnego_msg="enabled"
1411 dnl **********************************************************************
1412 dnl Check for GSS-API libraries
1413 dnl **********************************************************************
1415 dnl check for gss stuff in the /usr as default
1418 AC_ARG_WITH(gssapi-includes,
1419 AC_HELP_STRING([--with-gssapi-includes=DIR],
1420 [Specify location of GSSAPI header]),
1421 [ GSSAPI_INCS="-I$withval"
1425 AC_ARG_WITH(gssapi-libs,
1426 AC_HELP_STRING([--with-gssapi-libs=DIR],
1427 [Specify location of GSSAPI libs]),
1428 [ GSSAPI_LIB_DIR="-L$withval"
1433 AC_HELP_STRING([--with-gssapi=DIR],
1434 [Where to look for GSSAPI]), [
1435 GSSAPI_ROOT="$withval"
1436 if test x"$GSSAPI_ROOT" != xno; then
1438 if test x"$GSSAPI_ROOT" = xyes; then
1439 dnl if yes, then use default root
1445 save_CPPFLAGS="$CPPFLAGS"
1446 AC_MSG_CHECKING([if GSSAPI support is requested])
1447 if test x"$want_gss" = xyes; then
1450 if test -z "$GSSAPI_INCS"; then
1451 if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
1452 GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi`
1453 elif test "$GSSAPI_ROOT" != "yes"; then
1454 GSSAPI_INCS="-I$GSSAPI_ROOT/include"
1458 CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
1460 AC_CHECK_HEADER(gss.h,
1462 dnl found in the given dirs
1463 AC_DEFINE(HAVE_GSSGNU, 1, [if you have the GNU gssapi libraries])
1467 dnl not found, check Heimdal or MIT
1468 AC_CHECK_HEADERS([gssapi/gssapi.h], [], [not_mit=1])
1470 [gssapi/gssapi_generic.h gssapi/gssapi_krb5.h],
1475 #ifdef HAVE_GSSAPI_GSSAPI_H
1476 #include <gssapi/gssapi.h>
1479 if test "x$not_mit" = "x1"; then
1480 dnl MIT not found, check for Heimdal
1481 AC_CHECK_HEADER(gssapi.h,
1484 AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries])
1487 dnl no header found, disabling GSS
1489 AC_MSG_WARN(disabling GSSAPI since no header files was found)
1494 AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries])
1495 dnl check if we have a really old MIT kerberos (<= 1.2)
1496 AC_MSG_CHECKING([if gssapi headers declare GSS_C_NT_HOSTBASED_SERVICE])
1499 #include <gssapi/gssapi.h>
1500 #include <gssapi/gssapi_generic.h>
1501 #include <gssapi/gssapi_krb5.h>
1506 GSS_C_NT_HOSTBASED_SERVICE,
1510 AC_MSG_RESULT([yes])
1513 AC_DEFINE(HAVE_OLD_GSSMIT, 1,
1514 [if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE])
1522 if test x"$want_gss" = xyes; then
1523 AC_DEFINE(HAVE_GSSAPI, 1, [if you have the gssapi libraries])
1525 curl_gss_msg="enabled (MIT/Heimdal)"
1527 if test -n "$gnu_gss"; then
1528 curl_gss_msg="enabled (GNU GSS)"
1529 LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
1531 elif test -z "$GSSAPI_LIB_DIR"; then
1534 LIBS="-lgssapi_krb5 -lresolv $LIBS"
1537 if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
1538 dnl krb5-config doesn't have --libs-only-L or similar, put everything
1540 gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
1541 LIBS="$gss_libs $LIBS"
1542 elif test "$GSSAPI_ROOT" != "yes"; then
1543 LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
1544 LIBS="-lgssapi $LIBS"
1546 LIBS="-lgssapi $LIBS"
1551 LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
1552 LIBS="-lgssapi $LIBS"
1555 CPPFLAGS="$save_CPPFLAGS"
1558 dnl -------------------------------------------------
1559 dnl check winssl option before other SSL libraries
1560 dnl -------------------------------------------------
1563 AC_ARG_WITH(winssl,dnl
1564 AC_HELP_STRING([--with-winssl],[enable Windows native SSL/TLS])
1565 AC_HELP_STRING([--without-winssl], [disable Windows native SSL/TLS]),
1566 OPT_WINSSL=$withval)
1568 AC_MSG_CHECKING([whether to enable Windows native SSL/TLS (Windows native builds only)])
1569 if test "$curl_ssl_msg" = "$init_ssl_msg"; then
1570 if test "x$OPT_WINSSL" != "xno" &&
1571 test "x$ac_cv_native_windows" = "xyes"; then
1573 AC_DEFINE(USE_SCHANNEL, 1, [to enable Windows native SSL/TLS support])
1574 AC_SUBST(USE_SCHANNEL, [1])
1575 curl_ssl_msg="enabled (Windows-native)"
1577 # --with-winssl implies --enable-sspi
1578 AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
1579 AC_SUBST(USE_WINDOWS_SSPI, [1])
1580 curl_sspi_msg="enabled"
1589 AC_ARG_WITH(darwinssl,dnl
1590 AC_HELP_STRING([--with-darwinssl],[enable iOS/Mac OS X native SSL/TLS])
1591 AC_HELP_STRING([--without-darwinssl], [disable iOS/Mac OS X native SSL/TLS]),
1592 OPT_DARWINSSL=$withval)
1594 AC_MSG_CHECKING([whether to enable iOS/Mac OS X native SSL/TLS])
1595 if test "$curl_ssl_msg" = "$init_ssl_msg"; then
1596 if test "x$OPT_DARWINSSL" != "xno" &&
1597 test -d "/System/Library/Frameworks/Security.framework"; then
1599 AC_DEFINE(USE_DARWINSSL, 1, [to enable iOS/Mac OS X native SSL/TLS support])
1600 AC_SUBST(USE_DARWINSSL, [1])
1601 curl_ssl_msg="enabled (iOS/Mac OS X-native)"
1603 LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security"
1611 dnl **********************************************************************
1612 dnl Check for the presence of SSL libraries and headers
1613 dnl **********************************************************************
1615 dnl Default to compiler & linker defaults for SSL files & libraries.
1617 dnl Default to no CA bundle
1620 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])
1621 AC_HELP_STRING([--without-ssl], [disable OpenSSL]),
1624 if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
1625 dnl backup the pre-ssl variables
1626 CLEANLDFLAGS="$LDFLAGS"
1627 CLEANCPPFLAGS="$CPPFLAGS"
1632 dnl --with-ssl (without path) used
1633 if test x$cross_compiling != xyes; then
1634 dnl only do pkg-config magic when not cross-compiling
1637 PREFIX_OPENSSL=/usr/local/ssl
1638 LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
1641 dnl no --with-ssl option given, just check default places
1642 if test x$cross_compiling != xyes; then
1643 dnl only do pkg-config magic when not cross-compiling
1649 dnl check the given --with-ssl spot
1651 PREFIX_OPENSSL=$OPT_SSL
1653 dnl Try pkg-config even when cross-compiling. Since we
1654 dnl specify PKG_CONFIG_LIBDIR we're only looking where
1655 dnl the user told us to look
1656 OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
1657 AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
1658 if test -f "$OPENSSL_PCDIR/openssl.pc"; then
1662 dnl in case pkg-config comes up empty, use what we got
1664 LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
1665 if test "$PREFIX_OPENSSL" != "/usr" ; then
1666 SSL_LDFLAGS="-L$LIB_OPENSSL"
1667 SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
1669 SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
1673 if test "$PKGTEST" = "yes"; then
1675 CURL_CHECK_PKGCONFIG(openssl, [$OPENSSL_PCDIR])
1677 if test "$PKGCONFIG" != "no" ; then
1678 SSL_LIBS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
1679 $PKGCONFIG --libs-only-l openssl 2>/dev/null`
1681 SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
1682 $PKGCONFIG --libs-only-L openssl 2>/dev/null`
1684 SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
1685 $PKGCONFIG --cflags-only-I openssl 2>/dev/null`
1687 AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
1688 AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
1689 AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])
1691 LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
1693 dnl use the values pkg-config reported. This is here
1694 dnl instead of below with CPPFLAGS and LDFLAGS because we only
1695 dnl learn about this via pkg-config. If we only have
1696 dnl the argument to --with-ssl we don't know what
1697 dnl additional libs may be necessary. Hope that we
1699 LIBS="$SSL_LIBS $LIBS"
1703 dnl finally, set flags to use SSL
1704 CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
1705 LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
1707 dnl This is for Msys/Mingw
1709 *-*-msys* | *-*-mingw*)
1710 AC_MSG_CHECKING([for gdi32])
1711 my_ac_save_LIBS=$LIBS
1712 LIBS="-lgdi32 $LIBS"
1713 AC_TRY_LINK([#include <windef.h>
1714 #include <wingdi.h>],
1717 AC_MSG_RESULT([yes])],
1718 [ dnl failed, restore LIBS
1719 LIBS=$my_ac_save_LIBS
1725 AC_CHECK_LIB(crypto, CRYPTO_lock,[
1727 LIBS="-lcrypto $LIBS"
1729 LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
1730 CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
1731 AC_CHECK_LIB(crypto, CRYPTO_add_lock,[
1733 LIBS="-lcrypto $LIBS"], [
1734 LDFLAGS="$CLEANLDFLAGS"
1735 CPPFLAGS="$CLEANCPPFLAGS"
1741 if test X"$HAVECRYPTO" = X"yes"; then
1742 dnl This is only reasonable to do if crypto actually is there: check for
1743 dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
1745 AC_CHECK_LIB(ssl, SSL_connect)
1747 if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
1748 dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff
1749 AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use);
1751 LIBS="-lRSAglue -lrsaref $LIBS"
1752 AC_CHECK_LIB(ssl, SSL_connect)
1753 if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
1754 dnl still no SSL_connect
1763 dnl Have the libraries--check for SSLeay/OpenSSL headers
1764 AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
1765 openssl/pem.h openssl/ssl.h openssl/err.h,
1766 curl_ssl_msg="enabled (OpenSSL)"
1768 AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use]))
1770 if test $ac_cv_header_openssl_x509_h = no; then
1771 dnl we don't use the "action" part of the AC_CHECK_HEADERS macro
1772 dnl since 'err.h' might in fact find a krb4 header with the same
1774 AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h)
1776 if test $ac_cv_header_x509_h = yes &&
1777 test $ac_cv_header_crypto_h = yes &&
1778 test $ac_cv_header_ssl_h = yes; then
1780 curl_ssl_msg="enabled (OpenSSL)"
1786 if test X"$OPENSSL_ENABLED" = X"1"; then
1787 AC_DEFINE(USE_SSLEAY, 1, [if SSL is enabled])
1789 dnl is there a pkcs12.h header present?
1790 AC_CHECK_HEADERS(openssl/pkcs12.h)
1794 dnl USE_SSLEAY is the historical name for what configure calls
1795 dnl OPENSSL_ENABLED; the names should really be unified
1796 USE_SSLEAY="$OPENSSL_ENABLED"
1797 AC_SUBST(USE_SSLEAY)
1799 if test X"$OPT_SSL" != Xoff &&
1800 test "$OPENSSL_ENABLED" != "1"; then
1801 AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!])
1805 if test X"$OPENSSL_ENABLED" = X"1"; then
1806 dnl If the ENGINE library seems to be around, check for the OpenSSL engine
1807 dnl stuff, it is kind of "separated" from the main SSL check
1808 AC_CHECK_FUNC(ENGINE_init,
1810 AC_CHECK_HEADERS(openssl/engine.h)
1811 AC_CHECK_FUNCS( ENGINE_load_builtin_engines )
1814 dnl these can only exist if openssl exists
1815 dnl yassl doesn't have SSL_get_shutdown
1817 AC_CHECK_FUNCS( RAND_status \
1821 CRYPTO_cleanup_all_ex_data \
1823 SSLv2_client_method )
1825 dnl Make an attempt to detect if this is actually yassl's headers and
1826 dnl OpenSSL emulation layer. We still leave everything else believing
1827 dnl and acting like OpenSSL.
1829 AC_MSG_CHECKING([for yaSSL using OpenSSL compatibility mode])
1832 #include <openssl/ssl.h>
1834 #if defined(YASSL_VERSION) && defined(OPENSSL_VERSION_NUMBER)
1835 int dummy = SSL_ERROR_NONE;
1837 Not the yaSSL OpenSSL compatibility header.
1841 AC_MSG_RESULT([yes])
1842 AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1,
1843 [Define to 1 if using yaSSL in OpenSSL compatibility mode.])
1844 curl_ssl_msg="enabled (OpenSSL emulation by yaSSL)"
1850 if test "$OPENSSL_ENABLED" = "1"; then
1851 if test -n "$LIB_OPENSSL"; then
1852 dnl when the ssl shared libs were found in a path that the run-time
1853 dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
1854 dnl to prevent further configure tests to fail due to this
1855 if test "x$cross_compiling" != "xyes"; then
1856 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
1857 export LD_LIBRARY_PATH
1858 AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
1861 CURL_CHECK_OPENSSL_API
1866 dnl **********************************************************************
1867 dnl Check for the random seed preferences
1868 dnl **********************************************************************
1870 if test X"$OPENSSL_ENABLED" = X"1"; then
1871 AC_ARG_WITH(egd-socket,
1872 AC_HELP_STRING([--with-egd-socket=FILE],
1873 [Entropy Gathering Daemon socket pathname]),
1874 [ EGD_SOCKET="$withval" ]
1876 if test -n "$EGD_SOCKET" ; then
1877 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET",
1878 [your Entropy Gathering Daemon socket pathname] )
1881 dnl Check for user-specified random device
1883 AC_HELP_STRING([--with-random=FILE],
1884 [read randomness from FILE (default=/dev/urandom)]),
1885 [ RANDOM_FILE="$withval" ],
1887 if test x$cross_compiling != xyes; then
1888 dnl Check for random device
1889 AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
1891 AC_MSG_WARN([skipped the /dev/urandom detection when cross-compiling])
1895 if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
1896 AC_SUBST(RANDOM_FILE)
1897 AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE",
1898 [a suitable file to read random data from])
1903 dnl We require OpenSSL with SRP support.
1905 if test "$OPENSSL_ENABLED" = "1"; then
1906 AC_CHECK_LIB(crypto, SRP_Calc_client_key,
1908 AC_DEFINE(HAVE_SSLEAY_SRP, 1, [if you have the function SRP_Calc_client_key])
1909 AC_SUBST(HAVE_SSLEAY_SRP, [1])
1913 dnl ----------------------------------------------------
1914 dnl check for GnuTLS
1915 dnl ----------------------------------------------------
1917 dnl Default to compiler & linker defaults for GnuTLS files & libraries.
1920 AC_ARG_WITH(gnutls,dnl
1921 AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root])
1922 AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]),
1923 OPT_GNUTLS=$withval)
1925 if test "$curl_ssl_msg" = "$init_ssl_msg"; then
1927 if test X"$OPT_GNUTLS" != Xno; then
1935 if test "x$OPT_GNUTLS" = "xyes"; then
1936 dnl this is with no partiular path given
1937 CURL_CHECK_PKGCONFIG(gnutls)
1939 if test "$PKGCONFIG" != "no" ; then
1940 addlib=`$PKGCONFIG --libs-only-l gnutls`
1941 addld=`$PKGCONFIG --libs-only-L gnutls`
1942 addcflags=`$PKGCONFIG --cflags-only-I gnutls`
1943 version=`$PKGCONFIG --modversion gnutls`
1944 gtlslib=`echo $addld | $SED -e 's/-L//'`
1946 dnl without pkg-config, we try libgnutls-config as that was how it
1948 check=`libgnutls-config --version 2>/dev/null`
1949 if test -n "$check"; then
1950 addlib=`libgnutls-config --libs`
1951 addcflags=`libgnutls-config --cflags`
1952 version=`libgnutls-config --version`
1953 gtlslib=`libgnutls-config --prefix`/lib$libsuff
1957 dnl this is with a given path, first check if there's a libgnutls-config
1958 dnl there and if not, make an educated guess
1959 cfg=$OPT_GNUTLS/bin/libgnutls-config
1960 check=`$cfg --version 2>/dev/null`
1961 if test -n "$check"; then
1962 addlib=`$cfg --libs`
1963 addcflags=`$cfg --cflags`
1964 version=`$cfg --version`
1965 gtlslib=`$cfg --prefix`/lib$libsuff
1967 dnl without pkg-config and libgnutls-config, we guess a lot!
1969 addld=-L$OPT_GNUTLS/lib$libsuff
1970 addcflags=-I$OPT_GNUTLS/include
1971 version="" # we just don't know
1972 gtlslib=$OPT_GNUTLS/lib$libsuff
1976 if test -z "$version"; then
1977 dnl lots of efforts, still no go
1981 if test -n "$addlib"; then
1984 CLEANCPPFLAGS="$CPPFLAGS"
1985 CLEANLDFLAGS="$LDFLAGS"
1987 LIBS="$addlib $LIBS"
1988 LDFLAGS="$LDFLAGS $addld"
1989 if test "$addcflags" != "-I/usr/include"; then
1990 CPPFLAGS="$CPPFLAGS $addcflags"
1993 AC_CHECK_LIB(gnutls, gnutls_check_version,
1995 AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled])
1996 AC_SUBST(USE_GNUTLS, [1])
1999 curl_ssl_msg="enabled (GnuTLS)"
2003 CPPFLAGS="$CLEANCPPFLAGS"
2006 if test "x$USE_GNUTLS" = "xyes"; then
2007 AC_MSG_NOTICE([detected GnuTLS version $version])
2009 if test -n "$gtlslib"; then
2010 dnl when shared libs were found in a path that the run-time
2011 dnl linker doesn't search through, we need to add it to
2012 dnl LD_LIBRARY_PATH to prevent further configure tests to fail
2014 if test "x$cross_compiling" != "xyes"; then
2015 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
2016 export LD_LIBRARY_PATH
2017 AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH])
2024 fi dnl GNUTLS not disabled
2029 dnl Check which crypto backend GnuTLS uses
2032 if test "$GNUTLS_ENABLED" = "1"; then
2034 # First check if we can detect either crypto library via transitive linking
2035 AC_CHECK_LIB(gnutls, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
2036 if test "$USE_GNUTLS_NETTLE" = ""; then
2037 AC_CHECK_LIB(gnutls, gcry_control, [ USE_GNUTLS_NETTLE=0 ])
2039 # If not, try linking directly to both of them to see if they are available
2040 if test "$USE_GNUTLS_NETTLE" = ""; then
2041 AC_CHECK_LIB(nettle, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
2043 if test "$USE_GNUTLS_NETTLE" = ""; then
2044 AC_CHECK_LIB(gcrypt, gcry_control, [ USE_GNUTLS_NETTLE=0 ])
2046 if test "$USE_GNUTLS_NETTLE" = ""; then
2047 AC_MSG_ERROR([GnuTLS found, but neither gcrypt nor nettle found])
2049 if test "$USE_GNUTLS_NETTLE" = "1"; then
2050 AC_DEFINE(USE_GNUTLS_NETTLE, 1, [if GnuTLS uses nettle as crypto backend])
2051 AC_SUBST(USE_GNUTLS_NETTLE, [1])
2052 LIBS="-lnettle $LIBS"
2054 LIBS="-lgcrypt $LIBS"
2059 dnl We require GnuTLS with SRP support.
2061 if test "$GNUTLS_ENABLED" = "1"; then
2062 AC_CHECK_LIB(gnutls, gnutls_srp_verifier,
2064 AC_DEFINE(HAVE_GNUTLS_SRP, 1, [if you have the function gnutls_srp_verifier])
2065 AC_SUBST(HAVE_GNUTLS_SRP, [1])
2069 dnl ----------------------------------------------------
2070 dnl check for PolarSSL
2071 dnl ----------------------------------------------------
2073 dnl Default to compiler & linker defaults for PolarSSL files & libraries.
2078 AC_ARG_WITH(polarssl,dnl
2079 AC_HELP_STRING([--with-polarssl=PATH],[where to look for PolarSSL, PATH points to the installation root])
2080 AC_HELP_STRING([--without-polarssl], [disable PolarSSL detection]),
2081 OPT_POLARSSL=$withval)
2083 if test "$curl_ssl_msg" = "$init_ssl_msg"; then
2085 if test X"$OPT_POLARSSL" != Xno; then
2087 if test "$OPT_POLARSSL" = "yes"; then
2091 if test -z "$OPT_POLARSSL" ; then
2092 dnl check for lib first without setting any new path
2094 AC_CHECK_LIB(polarssl, havege_init,
2095 dnl libpolarssl found, set the variable
2097 AC_DEFINE(USE_POLARSSL, 1, [if PolarSSL is enabled])
2098 AC_SUBST(USE_POLARSSL, [1])
2101 curl_ssl_msg="enabled (PolarSSL)"
2110 if test "x$USE_POLARSSL" != "xyes"; then
2111 dnl add the path and test again
2112 addld=-L$OPT_POLARSSL/lib$libsuff
2113 addcflags=-I$OPT_POLARSSL/include
2114 polarssllib=$OPT_POLARSSL/lib$libsuff
2116 LDFLAGS="$LDFLAGS $addld"
2117 if test "$addcflags" != "-I/usr/include"; then
2118 CPPFLAGS="$CPPFLAGS $addcflags"
2121 AC_CHECK_LIB(polarssl, ssl_init,
2123 AC_DEFINE(USE_POLARSSL, 1, [if PolarSSL is enabled])
2124 AC_SUBST(USE_POLARSSL, [1])
2127 curl_ssl_msg="enabled (PolarSSL)"
2135 if test "x$USE_POLARSSL" = "xyes"; then
2136 AC_MSG_NOTICE([detected PolarSSL])
2138 LIBS="-lpolarssl $LIBS"
2140 if test -n "$polarssllib"; then
2141 dnl when shared libs were found in a path that the run-time
2142 dnl linker doesn't search through, we need to add it to
2143 dnl LD_LIBRARY_PATH to prevent further configure tests to fail
2145 if test "x$cross_compiling" != "xyes"; then
2146 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$polarssllib"
2147 export LD_LIBRARY_PATH
2148 AC_MSG_NOTICE([Added $polarssllib to LD_LIBRARY_PATH])
2153 fi dnl PolarSSL not disabled
2157 dnl ----------------------------------------------------
2158 dnl check for CyaSSL
2159 dnl ----------------------------------------------------
2161 dnl Default to compiler & linker defaults for CyaSSL files & libraries.
2166 AC_ARG_WITH(cyassl,dnl
2167 AC_HELP_STRING([--with-cyassl=PATH],[where to look for CyaSSL, PATH points to the installation root (default: system lib default)])
2168 AC_HELP_STRING([--without-cyassl], [disable CyaSSL detection]),
2169 OPT_CYASSL=$withval)
2171 if test "$curl_ssl_msg" = "$init_ssl_msg"; then
2173 if test X"$OPT_CYASSL" != Xno; then
2175 if test "$OPT_CYASSL" = "yes"; then
2179 if test -z "$OPT_CYASSL" ; then
2180 dnl check for lib in system default first
2182 AC_CHECK_LIB(cyassl, CyaSSL_Init,
2183 dnl libcyassl found, set the variable
2185 AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
2186 AC_SUBST(USE_CYASSL, [1])
2189 curl_ssl_msg="enabled (CyaSSL)"
2198 if test "x$USE_CYASSL" != "xyes"; then
2199 dnl add the path and test again
2200 addld=-L$OPT_CYASSL/lib$libsuff
2201 addcflags=-I$OPT_CYASSL/include
2202 cyassllib=$OPT_CYASSL/lib$libsuff
2204 LDFLAGS="$LDFLAGS $addld"
2205 if test "$addcflags" != "-I/usr/include"; then
2206 CPPFLAGS="$CPPFLAGS $addcflags"
2209 AC_CHECK_LIB(cyassl, CyaSSL_Init,
2211 AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
2212 AC_SUBST(USE_CYASSL, [1])
2215 curl_ssl_msg="enabled (CyaSSL)"
2223 if test "x$USE_CYASSL" = "xyes"; then
2224 AC_MSG_NOTICE([detected CyaSSL])
2226 LIBS="-lcyassl -lm $LIBS"
2228 if test -n "$cyassllib"; then
2229 dnl when shared libs were found in a path that the run-time
2230 dnl linker doesn't search through, we need to add it to
2231 dnl LD_LIBRARY_PATH to prevent further configure tests to fail
2233 if test "x$cross_compiling" != "xyes"; then
2234 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$cyassllib"
2235 export LD_LIBRARY_PATH
2236 AC_MSG_NOTICE([Added $cyassllib to LD_LIBRARY_PATH])
2242 fi dnl CyaSSL not disabled
2246 dnl ----------------------------------------------------
2247 dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
2248 dnl ----------------------------------------------------
2250 dnl Default to compiler & linker defaults for NSS files & libraries.
2254 AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root])
2255 AC_HELP_STRING([--without-nss], [disable NSS detection]),
2258 if test "$curl_ssl_msg" = "$init_ssl_msg"; then
2260 if test X"$OPT_NSS" != Xno; then
2268 if test "x$OPT_NSS" = "xyes"; then
2270 CURL_CHECK_PKGCONFIG(nss)
2272 if test "$PKGCONFIG" != "no" ; then
2273 addlib=`$PKGCONFIG --libs nss`
2274 addcflags=`$PKGCONFIG --cflags nss`
2275 version=`$PKGCONFIG --modversion nss`
2276 nssprefix=`$PKGCONFIG --variable=prefix nss`
2278 dnl Without pkg-config, we check for nss-config
2280 check=`nss-config --version 2>/dev/null`
2281 if test -n "$check"; then
2282 addlib=`nss-config --libs`
2283 addcflags=`nss-config --cflags`
2284 version=`nss-config --version`
2285 nssprefix=`nss-config --prefix`
2293 # Without pkg-config, we'll kludge in some defaults
2294 addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
2295 addcflags="-I$OPT_NSS/include"
2300 if test -n "$addlib"; then
2303 CLEANCPPFLAGS="$CPPFLAGS"
2305 LIBS="$addlib $LIBS"
2306 if test "$addcflags" != "-I/usr/include"; then
2307 CPPFLAGS="$CPPFLAGS $addcflags"
2310 dnl The function PK11_CreateGenericObject is needed to load libnsspem.so
2311 AC_CHECK_LIB(nss3, PK11_CreateGenericObject,
2313 AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
2314 AC_SUBST(USE_NSS, [1])
2317 curl_ssl_msg="enabled (NSS)"
2321 CPPFLAGS="$CLEANCPPFLAGS"
2324 if test "x$USE_NSS" = "xyes"; then
2325 AC_MSG_NOTICE([detected NSS version $version])
2327 dnl NSS_InitContext() was introduced in NSS 3.12.5 and helps to prevent
2328 dnl collisions on NSS initialization/shutdown with other libraries
2329 AC_CHECK_FUNC(NSS_InitContext,
2331 AC_DEFINE(HAVE_NSS_INITCONTEXT, 1, [if you have the NSS_InitContext function])
2332 AC_SUBST(HAVE_NSS_INITCONTEXT, [1])
2335 dnl when shared libs were found in a path that the run-time
2336 dnl linker doesn't search through, we need to add it to
2337 dnl LD_LIBRARY_PATH to prevent further configure tests to fail
2339 if test "x$cross_compiling" != "xyes"; then
2340 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
2341 export LD_LIBRARY_PATH
2342 AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
2348 fi dnl NSS not disabled
2350 fi dnl curl_ssl_msg = init_ssl_msg
2354 AC_ARG_WITH(axtls,dnl
2355 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.])
2356 AC_HELP_STRING([--without-axtls], [disable axTLS]),
2359 if test "$curl_ssl_msg" = "$init_ssl_msg"; then
2360 if test X"$OPT_AXTLS" != Xno; then
2361 dnl backup the pre-axtls variables
2362 CLEANLDFLAGS="$LDFLAGS"
2363 CLEANCPPFLAGS="$CPPFLAGS"
2366 case "$OPT_AXTLS" in
2368 dnl --with-axtls (without path) used
2369 PREFIX_AXTLS=/usr/local
2370 LIB_AXTLS="$PREFIX_AXTLS/lib"
2371 LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
2372 CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
2375 dnl no --with-axtls option given, just check default places
2379 dnl check the given --with-axtls spot
2380 PREFIX_AXTLS=$OPT_AXTLS
2381 LIB_AXTLS="$PREFIX_AXTLS/lib"
2382 LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
2383 CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
2387 AC_CHECK_LIB(axtls, ssl_version,[
2388 LIBS="-laxtls $LIBS"
2389 AC_DEFINE(USE_AXTLS, 1, [if axTLS is enabled])
2390 AC_SUBST(USE_AXTLS, [1])
2393 curl_ssl_msg="enabled (axTLS)"
2396 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_AXTLS"
2397 export LD_LIBRARY_PATH
2398 AC_MSG_NOTICE([Added $LIB_AXTLS to LD_LIBRARY_PATH])
2400 LDFLAGS="$CLEANLDFLAGS"
2401 CPPFLAGS="$CLEANCPPFLAGS"
2407 if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED$WINSSL_ENABLED$DARWINSSL_ENABLED" = "x"; then
2408 AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
2409 AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-axtls or --with-winssl to address this.])
2411 # SSL is enabled, genericly
2412 AC_SUBST(SSL_ENABLED)
2416 dnl **********************************************************************
2417 dnl Check for the CA bundle
2418 dnl **********************************************************************
2420 CURL_CHECK_CA_BUNDLE
2422 dnl **********************************************************************
2423 dnl Check for libmetalink
2424 dnl **********************************************************************
2428 AC_ARG_WITH(libmetalink,dnl
2429 AC_HELP_STRING([--with-libmetalink=PATH],[where to look for libmetalink, PATH points to the installation root])
2430 AC_HELP_STRING([--without-libmetalink], [disable libmetalink detection]),
2431 OPT_LIBMETALINK=$withval)
2433 if test X"$OPT_LIBMETALINK" != Xno; then
2442 if test "x$OPT_LIBMETALINK" = "xyes"; then
2443 dnl this is with no partiular path given
2445 CURL_CHECK_PKGCONFIG(libmetalink)
2447 dnl When particular path is given, set PKG_CONFIG_LIBDIR using the path.
2448 LIBMETALINK_PCDIR="$OPT_LIBMETALINK/lib/pkgconfig"
2449 AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$LIBMETALINK_PCDIR"])
2450 if test -f "$LIBMETALINK_PCDIR/libmetalink.pc"; then
2453 if test "$PKGTEST" = "yes"; then
2454 CURL_CHECK_PKGCONFIG(libmetalink, [$LIBMETALINK_PCDIR])
2457 if test "$PKGTEST" = "yes" && test "$PKGCONFIG" != "no"; then
2458 addlib=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
2459 $PKGCONFIG --libs-only-l libmetalink`
2460 addld=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
2461 $PKGCONFIG --libs-only-L libmetalink`
2462 addcflags=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
2463 $PKGCONFIG --cflags-only-I libmetalink`
2464 version=`CURL_EXPORT_PCDIR([$LIBMETALINK_PCDIR]) dnl
2465 $PKGCONFIG --modversion libmetalink`
2466 libmetalinklib=`echo $addld | $SED -e 's/-L//'`
2468 if test -n "$addlib"; then
2470 clean_CPPFLAGS="$CPPFLAGS"
2471 clean_LDFLAGS="$LDFLAGS"
2473 CPPFLAGS="$addcflags $clean_CPPFLAGS"
2474 LDFLAGS="$addld $clean_LDFLAGS"
2475 LIBS="$addlib $clean_LIBS"
2476 AC_MSG_CHECKING([if libmetalink is recent enough])
2479 # include <metalink/metalink.h>
2481 if(0 != metalink_strerror(0)) /* added in 0.1.0 */
2485 AC_MSG_RESULT([yes ($version)])
2488 AC_MSG_RESULT([no ($version)])
2489 AC_MSG_NOTICE([libmetalink library defective or too old])
2492 CPPFLAGS="$clean_CPPFLAGS"
2493 LDFLAGS="$clean_LDFLAGS"
2495 if test "$want_metalink" = "yes"; then
2496 dnl finally libmetalink will be used
2497 AC_DEFINE(USE_METALINK, 1, [Define to enable metalink support])
2498 LIBMETALINK_LIBS=$addlib
2499 LIBMETALINK_LDFLAGS=$addld
2500 LIBMETALINK_CPPFLAGS=$addcflags
2501 AC_SUBST([LIBMETALINK_LIBS])
2502 AC_SUBST([LIBMETALINK_LDFLAGS])
2503 AC_SUBST([LIBMETALINK_CPPFLAGS])
2504 curl_mtlnk_msg="enabled"
2510 dnl **********************************************************************
2511 dnl Check for the presence of LIBSSH2 libraries and headers
2512 dnl **********************************************************************
2514 dnl Default to compiler & linker defaults for LIBSSH2 files & libraries.
2516 AC_ARG_WITH(libssh2,dnl
2517 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])
2518 AC_HELP_STRING([--without-libssh2], [disable LIBSSH2]),
2519 OPT_LIBSSH2=$withval)
2521 if test X"$OPT_LIBSSH2" != Xno; then
2522 dnl backup the pre-libssh2 variables
2523 CLEANLDFLAGS="$LDFLAGS"
2524 CLEANCPPFLAGS="$CPPFLAGS"
2527 case "$OPT_LIBSSH2" in
2529 dnl --with-libssh2 (without path) used
2530 CURL_CHECK_PKGCONFIG(libssh2)
2532 if test "$PKGCONFIG" != "no" ; then
2533 LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2`
2534 LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
2535 CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
2536 version=`$PKGCONFIG --modversion libssh2`
2537 DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/-L//'`
2542 dnl no --with-libssh2 option given, just check default places
2545 dnl use the given --with-libssh2 spot
2546 PREFIX_SSH2=$OPT_LIBSSH2
2550 dnl if given with a prefix, we set -L and -I based on that
2551 if test -n "$PREFIX_SSH2"; then
2553 LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
2554 CPP_SSH2=-I${PREFIX_SSH2}/include
2555 DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
2558 LDFLAGS="$LDFLAGS $LD_SSH2"
2559 CPPFLAGS="$CPPFLAGS $CPP_SSH2"
2560 LIBS="$LIB_SSH2 $LIBS"
2562 AC_CHECK_LIB(ssh2, libssh2_channel_open_ex)
2564 AC_CHECK_HEADERS(libssh2.h,
2565 curl_ssh_msg="enabled (libSSH2)"
2567 AC_DEFINE(USE_LIBSSH2, 1, [if libSSH2 is in use])
2568 AC_SUBST(USE_LIBSSH2, [1])
2571 if test X"$OPT_LIBSSH2" != Xoff &&
2572 test "$LIBSSH2_ENABLED" != "1"; then
2573 AC_MSG_ERROR([libSSH2 libs and/or directories were not found where specified!])
2576 if test "$LIBSSH2_ENABLED" = "1"; then
2577 if test -n "$DIR_SSH2"; then
2578 dnl when the libssh2 shared libs were found in a path that the run-time
2579 dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
2580 dnl to prevent further configure tests to fail due to this
2582 dnl libssh2_version is a post 1.0 addition
2583 dnl libssh2_init and libssh2_exit were added in 1.2.5
2584 dnl libssh2_scp_send64 was added in 1.2.6
2585 dnl libssh2_session_handshake was added in 1.2.8
2586 AC_CHECK_FUNCS( libssh2_version libssh2_init libssh2_exit \
2587 libssh2_scp_send64 libssh2_session_handshake)
2588 if test "x$cross_compiling" != "xyes"; then
2589 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
2590 export LD_LIBRARY_PATH
2591 AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH])
2595 dnl no libssh2, revert back to clean variables
2596 LDFLAGS=$CLEANLDFLAGS
2597 CPPFLAGS=$CLEANCPPFLAGS
2602 dnl **********************************************************************
2603 dnl Check for the presence of LIBRTMP libraries and headers
2604 dnl **********************************************************************
2606 dnl Default to compiler & linker defaults for LIBRTMP files & libraries.
2608 AC_ARG_WITH(librtmp,dnl
2609 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])
2610 AC_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
2611 OPT_LIBRTMP=$withval)
2613 if test X"$OPT_LIBRTMP" != Xno; then
2614 dnl backup the pre-librtmp variables
2615 CLEANLDFLAGS="$LDFLAGS"
2616 CLEANCPPFLAGS="$CPPFLAGS"
2619 case "$OPT_LIBRTMP" in
2621 dnl --with-librtmp (without path) used
2622 CURL_CHECK_PKGCONFIG(librtmp)
2624 if test "$PKGCONFIG" != "no" ; then
2625 LIB_RTMP=`$PKGCONFIG --libs-only-l librtmp`
2626 LD_RTMP=`$PKGCONFIG --libs-only-L librtmp`
2627 CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp`
2628 version=`$PKGCONFIG --modversion librtmp`
2629 DIR_RTMP=`echo $LD_RTMP | $SED -e 's/-L//'`
2631 dnl To avoid link errors, we do not allow --librtmp without
2632 dnl a pkgconfig file
2633 AC_MSG_ERROR([--librtmp was specified but could not find librtmp pkgconfig file.])
2638 dnl no --with-librtmp option given, just check default places
2642 dnl use the given --with-librtmp spot
2643 PREFIX_RTMP=$OPT_LIBRTMP
2647 dnl if given with a prefix, we set -L and -I based on that
2648 if test -n "$PREFIX_RTMP"; then
2649 LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff
2650 CPP_RTMP=-I${PREFIX_RTMP}/include
2651 DIR_RTMP=${PREFIX_RTMP}/lib$libsuff
2654 LDFLAGS="$LDFLAGS $LD_RTMP"
2655 CPPFLAGS="$CPPFLAGS $CPP_RTMP"
2656 LIBS="$LIB_RTMP $LIBS"
2658 AC_CHECK_LIB(rtmp, RTMP_Init,
2660 AC_CHECK_HEADERS(librtmp/rtmp.h,
2661 curl_rtmp_msg="enabled (librtmp)"
2663 AC_DEFINE(USE_LIBRTMP, 1, [if librtmp is in use])
2664 AC_SUBST(USE_LIBRTMP, [1])
2667 dnl not found, revert back to clean variables
2668 LDFLAGS=$CLEANLDFLAGS
2669 CPPFLAGS=$CLEANCPPFLAGS
2673 if test X"$OPT_LIBRTMP" != Xoff &&
2674 test "$LIBRTMP_ENABLED" != "1"; then
2675 AC_MSG_ERROR([librtmp libs and/or directories were not found where specified!])
2680 dnl **********************************************************************
2681 dnl Check for linker switch for versioned symbols
2682 dnl **********************************************************************
2684 versioned_symbols_flavour=
2685 AC_MSG_CHECKING([whether versioned symbols are wanted])
2686 AC_ARG_ENABLE(versioned-symbols,
2687 AC_HELP_STRING([--enable-versioned-symbols], [Enable versioned symbols in shared library])
2688 AC_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shared library]),
2689 [ case "$enableval" in
2690 yes) AC_MSG_RESULT(yes)
2691 AC_MSG_CHECKING([if libraries can be versioned])
2692 GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
2693 if test -z "$GLD"; then
2695 AC_MSG_WARN([You need an ld version supporting the --version-script option])
2698 if test "x$OPENSSL_ENABLED" = "x1"; then
2699 versioned_symbols_flavour="OPENSSL_"
2700 elif test "x$GNUTLS_ENABLED" == "x1"; then
2701 versioned_symbols_flavour="GNUTLS_"
2702 elif test "x$NSS_ENABLED" == "x1"; then
2703 versioned_symbols_flavour="NSS_"
2704 elif test "x$POLARSSL_ENABLED" == "x1"; then
2705 versioned_symbols_flavour="POLARSSL_"
2706 elif test "x$CYASSL_ENABLED" == "x1"; then
2707 versioned_symbols_flavour="CYASSL_"
2708 elif test "x$AXTLS_ENABLED" == "x1"; then
2709 versioned_symbols_flavour="AXTLS_"
2710 elif test "x$WINSSL_ENABLED" == "x1"; then
2711 versioned_symbols_flavour="WINSSL_"
2712 elif test "x$DARWINSSL_ENABLED" == "x1"; then
2713 versioned_symbols_flavour="DARWINSSL_"
2715 versioned_symbols_flavour=""
2717 versioned_symbols="yes"
2721 *) AC_MSG_RESULT(no)
2729 AC_SUBST(VERSIONED_FLAVOUR, ["$versioned_symbols_flavour"])
2730 AM_CONDITIONAL(VERSIONED_SYMBOLS, test "x$versioned_symbols" = "xyes")
2732 dnl -------------------------------------------------
2733 dnl check winidn option before other IDN libraries
2734 dnl -------------------------------------------------
2736 AC_MSG_CHECKING([whether to enable Windows native IDN (Windows native builds only)])
2737 OPT_WINIDN="default"
2739 AC_HELP_STRING([--with-winidn=PATH],[enable Windows native IDN])
2740 AC_HELP_STRING([--without-winidn], [disable Windows native IDN]),
2741 OPT_WINIDN=$withval)
2742 case "$OPT_WINIDN" in
2744 dnl --without-winidn option used or configure option not specified
2749 dnl --with-winidn option used without path
2751 want_winidn_path="default"
2752 AC_MSG_RESULT([yes])
2755 dnl --with-winidn option used with path
2757 want_winidn_path="$withval"
2758 AC_MSG_RESULT([yes ($withval)])
2762 if test "$want_winidn" = "yes"; then
2763 dnl winidn library support has been requested
2764 clean_CPPFLAGS="$CPPFLAGS"
2765 clean_LDFLAGS="$LDFLAGS"
2767 WINIDN_LIBS="-lnormaliz"
2769 if test "$want_winidn_path" != "default"; then
2770 dnl path has been specified
2771 dnl pkg-config not available or provides no info
2772 WINIDN_LDFLAGS="-L$want_winidn_path/lib$libsuff"
2773 WINIDN_CPPFLAGS="-I$want_winidn_path/include"
2774 WINIDN_DIR="$want_winidn_path/lib$libsuff"
2777 CPPFLAGS="$WINIDN_CPPFLAGS $CPPFLAGS"
2778 LDFLAGS="$WINIDN_LDFLAGS $LDFLAGS"
2779 LIBS="$WINIDN_LIBS $LIBS"
2781 AC_MSG_CHECKING([if IdnToUnicode can be linked])
2783 AC_LANG_FUNC_LINK_TRY([IdnToUnicode])
2785 AC_MSG_RESULT([yes])
2786 tst_links_winidn="yes"
2789 tst_links_winidn="no"
2792 if test "$tst_links_winidn" = "yes"; then
2793 AC_DEFINE(USE_WIN32_IDN, 1, [Define to 1 if you have the `normaliz' (WinIDN) library (-lnormaliz).])
2794 AC_DEFINE(WANT_IDN_PROTOTYPES, 1, [Define to 1 to provide own prototypes.])
2795 AC_SUBST([IDN_ENABLED], [1])
2796 curl_idn_msg="enabled (Windows-native)"
2798 AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
2799 CPPFLAGS="$clean_CPPFLAGS"
2800 LDFLAGS="$clean_LDFLAGS"
2805 dnl **********************************************************************
2806 dnl Check for the presence of IDN libraries and headers
2807 dnl **********************************************************************
2809 AC_MSG_CHECKING([whether to build with libidn])
2812 AC_HELP_STRING([--with-libidn=PATH],[Enable libidn usage])
2813 AC_HELP_STRING([--without-libidn],[Disable libidn usage]),
2817 dnl --without-libidn option used
2822 dnl configure option not specified
2824 want_idn_path="default"
2825 AC_MSG_RESULT([(assumed) yes])
2828 dnl --with-libidn option used without path
2830 want_idn_path="default"
2831 AC_MSG_RESULT([yes])
2834 dnl --with-libidn option used with path
2836 want_idn_path="$withval"
2837 AC_MSG_RESULT([yes ($withval)])
2841 if test "$want_idn" = "yes"; then
2842 dnl idn library support has been requested
2843 clean_CPPFLAGS="$CPPFLAGS"
2844 clean_LDFLAGS="$LDFLAGS"
2848 if test "$want_idn_path" != "default"; then
2849 dnl path has been specified
2850 IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig"
2851 CURL_CHECK_PKGCONFIG(libidn, [$IDN_PCDIR])
2852 if test "$PKGCONFIG" != "no"; then
2853 IDN_LIBS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
2854 $PKGCONFIG --libs-only-l libidn 2>/dev/null`
2855 IDN_LDFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
2856 $PKGCONFIG --libs-only-L libidn 2>/dev/null`
2857 IDN_CPPFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
2858 $PKGCONFIG --cflags-only-I libidn 2>/dev/null`
2859 IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'`
2861 dnl pkg-config not available or provides no info
2863 IDN_LDFLAGS="-L$want_idn_path/lib$libsuff"
2864 IDN_CPPFLAGS="-I$want_idn_path/include"
2865 IDN_DIR="$want_idn_path/lib$libsuff"
2868 dnl path not specified
2869 CURL_CHECK_PKGCONFIG(libidn)
2870 if test "$PKGCONFIG" != "no"; then
2871 IDN_LIBS=`$PKGCONFIG --libs-only-l libidn 2>/dev/null`
2872 IDN_LDFLAGS=`$PKGCONFIG --libs-only-L libidn 2>/dev/null`
2873 IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I libidn 2>/dev/null`
2874 IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/-L//'`
2876 dnl pkg-config not available or provides no info
2881 if test "$PKGCONFIG" != "no"; then
2882 AC_MSG_NOTICE([pkg-config: IDN_LIBS: "$IDN_LIBS"])
2883 AC_MSG_NOTICE([pkg-config: IDN_LDFLAGS: "$IDN_LDFLAGS"])
2884 AC_MSG_NOTICE([pkg-config: IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
2885 AC_MSG_NOTICE([pkg-config: IDN_DIR: "$IDN_DIR"])
2887 AC_MSG_NOTICE([IDN_LIBS: "$IDN_LIBS"])
2888 AC_MSG_NOTICE([IDN_LDFLAGS: "$IDN_LDFLAGS"])
2889 AC_MSG_NOTICE([IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
2890 AC_MSG_NOTICE([IDN_DIR: "$IDN_DIR"])
2893 CPPFLAGS="$IDN_CPPFLAGS $CPPFLAGS"
2894 LDFLAGS="$IDN_LDFLAGS $LDFLAGS"
2895 LIBS="$IDN_LIBS $LIBS"
2897 AC_MSG_CHECKING([if idna_to_ascii_4i can be linked])
2899 AC_LANG_FUNC_LINK_TRY([idna_to_ascii_4i])
2901 AC_MSG_RESULT([yes])
2902 tst_links_libidn="yes"
2905 tst_links_libidn="no"
2907 if test "$tst_links_libidn" = "no"; then
2908 AC_MSG_CHECKING([if idna_to_ascii_lz can be linked])
2910 AC_LANG_FUNC_LINK_TRY([idna_to_ascii_lz])
2912 AC_MSG_RESULT([yes])
2913 tst_links_libidn="yes"
2916 tst_links_libidn="no"
2920 if test "$tst_links_libidn" = "yes"; then
2921 AC_DEFINE(HAVE_LIBIDN, 1, [Define to 1 if you have the `idn' library (-lidn).])
2922 dnl different versions of libidn have different setups of these:
2923 AC_CHECK_FUNCS( idn_free idna_strerror tld_strerror )
2924 AC_CHECK_HEADERS( idn-free.h tld.h )
2925 if test "x$ac_cv_header_tld_h" = "xyes"; then
2926 AC_SUBST([IDN_ENABLED], [1])
2927 curl_idn_msg="enabled"
2928 if test -n "$IDN_DIR"; then
2929 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$IDN_DIR"
2930 export LD_LIBRARY_PATH
2931 AC_MSG_NOTICE([Added $IDN_DIR to LD_LIBRARY_PATH])
2934 AC_MSG_WARN([Libraries for IDN support too old: IDN disabled])
2935 CPPFLAGS="$clean_CPPFLAGS"
2936 LDFLAGS="$clean_LDFLAGS"
2940 AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
2941 CPPFLAGS="$clean_CPPFLAGS"
2942 LDFLAGS="$clean_LDFLAGS"
2948 dnl Let's hope this split URL remains working:
2949 dnl http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \
2950 dnl genprogc/thread_quick_ref.htm
2953 dnl **********************************************************************
2954 dnl Back to "normal" configuring
2955 dnl **********************************************************************
2957 dnl Checks for header files.
2960 CURL_CHECK_HEADER_MALLOC
2961 CURL_CHECK_HEADER_MEMORY
2963 dnl Now check for the very most basic headers. Then we can use these
2964 dnl ones as default-headers when checking for the rest!
3007 dnl to do if not found
3011 dnl default includes
3013 #ifdef HAVE_SYS_TYPES_H
3014 #include <sys/types.h>
3016 #ifdef HAVE_SYS_TIME_H
3017 #include <sys/time.h>
3019 #ifdef HAVE_SYS_SELECT_H
3020 #include <sys/select.h>
3022 #ifdef HAVE_SYS_SOCKET_H
3023 #include <sys/socket.h>
3025 #ifdef HAVE_NETINET_IN_H
3026 #include <netinet/in.h>
3028 #ifdef HAVE_SYS_UN_H
3034 dnl Checks for typedefs, structures, and compiler characteristics.
3036 CURL_CHECK_VARIADIC_MACROS
3039 CURL_CHECK_STRUCT_TIMEVAL
3040 CURL_VERIFY_RUNTIMELIBS
3042 AC_CHECK_SIZEOF(size_t)
3043 AC_CHECK_SIZEOF(long)
3044 AC_CHECK_SIZEOF(int)
3045 AC_CHECK_SIZEOF(short)
3047 AC_CHECK_SIZEOF(time_t)
3048 AC_CHECK_SIZEOF(off_t)
3051 if test x"$ac_cv_native_windows" != "xyes" &&
3052 test $ac_cv_sizeof_off_t -ne $curl_sizeof_curl_off_t; then
3053 AC_MSG_WARN([This libcurl built is probably not ABI compatible with previous])
3054 AC_MSG_WARN([builds! You MUST read lib/README.curl_off_t to figure it out.])
3059 AC_CHECK_TYPE(long long,
3060 [AC_DEFINE(HAVE_LONGLONG, 1,
3061 [Define to 1 if the compiler supports the 'long long' data type.])]
3065 if test "xyes" = "x$longlong"; then
3066 AC_MSG_CHECKING([if numberLL works])
3070 long long val = 1000LL;
3073 AC_MSG_RESULT([yes])
3074 AC_DEFINE(HAVE_LL, 1, [if your compiler supports LL])
3082 AC_CHECK_TYPE(ssize_t, ,
3083 AC_DEFINE(ssize_t, int, [the signed version of size_t]))
3085 # check for bool type
3086 AC_CHECK_TYPE([bool],[
3087 AC_DEFINE(HAVE_BOOL_T, 1,
3088 [Define to 1 if bool is an available type.])
3090 #ifdef HAVE_SYS_TYPES_H
3091 #include <sys/types.h>
3093 #ifdef HAVE_STDBOOL_H
3094 #include <stdbool.h>
3098 CURL_CONFIGURE_CURL_SOCKLEN_T
3100 CURL_CONFIGURE_PULL_SYS_POLL
3104 TYPE_SOCKADDR_STORAGE
3110 CURL_CHECK_FUNC_SELECT
3112 CURL_CHECK_FUNC_RECV
3113 CURL_CHECK_FUNC_RECVFROM
3114 CURL_CHECK_FUNC_SEND
3115 CURL_CHECK_MSG_NOSIGNAL
3117 CURL_CHECK_FUNC_ALARM
3118 CURL_CHECK_FUNC_BASENAME
3119 CURL_CHECK_FUNC_CLOSESOCKET
3120 CURL_CHECK_FUNC_CLOSESOCKET_CAMEL
3121 CURL_CHECK_FUNC_CONNECT
3122 CURL_CHECK_FUNC_FCNTL
3123 CURL_CHECK_FUNC_FDOPEN
3124 CURL_CHECK_FUNC_FREEADDRINFO
3125 CURL_CHECK_FUNC_FREEIFADDRS
3126 CURL_CHECK_FUNC_FSETXATTR
3127 CURL_CHECK_FUNC_FTRUNCATE
3128 CURL_CHECK_FUNC_GETADDRINFO
3129 CURL_CHECK_FUNC_GAI_STRERROR
3130 CURL_CHECK_FUNC_GETHOSTBYADDR
3131 CURL_CHECK_FUNC_GETHOSTBYADDR_R
3132 CURL_CHECK_FUNC_GETHOSTBYNAME
3133 CURL_CHECK_FUNC_GETHOSTBYNAME_R
3134 CURL_CHECK_FUNC_GETHOSTNAME
3135 CURL_CHECK_FUNC_GETIFADDRS
3136 CURL_CHECK_FUNC_GETSERVBYPORT_R
3137 CURL_CHECK_FUNC_GMTIME_R
3138 CURL_CHECK_FUNC_INET_NTOA_R
3139 CURL_CHECK_FUNC_INET_NTOP
3140 CURL_CHECK_FUNC_INET_PTON
3141 CURL_CHECK_FUNC_IOCTL
3142 CURL_CHECK_FUNC_IOCTLSOCKET
3143 CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL
3144 CURL_CHECK_FUNC_LOCALTIME_R
3145 CURL_CHECK_FUNC_MEMRCHR
3146 CURL_CHECK_FUNC_POLL
3147 CURL_CHECK_FUNC_SETSOCKOPT
3148 CURL_CHECK_FUNC_SIGACTION
3149 CURL_CHECK_FUNC_SIGINTERRUPT
3150 CURL_CHECK_FUNC_SIGNAL
3151 CURL_CHECK_FUNC_SIGSETJMP
3152 CURL_CHECK_FUNC_SOCKET
3153 CURL_CHECK_FUNC_SOCKETPAIR
3154 CURL_CHECK_FUNC_STRCASECMP
3155 CURL_CHECK_FUNC_STRCASESTR
3156 CURL_CHECK_FUNC_STRCMPI
3157 CURL_CHECK_FUNC_STRDUP
3158 CURL_CHECK_FUNC_STRERROR_R
3159 CURL_CHECK_FUNC_STRICMP
3160 CURL_CHECK_FUNC_STRLCAT
3161 CURL_CHECK_FUNC_STRNCASECMP
3162 CURL_CHECK_FUNC_STRNCMPI
3163 CURL_CHECK_FUNC_STRNICMP
3164 CURL_CHECK_FUNC_STRSTR
3165 CURL_CHECK_FUNC_STRTOK_R
3166 CURL_CHECK_FUNC_STRTOLL
3167 CURL_CHECK_FUNC_WRITEV
3173 AC_MSG_NOTICE([skip check for pipe on msdosdjgpp])
3177 AC_CHECK_FUNCS([fork \
3196 eval skipcheck=\$skipcheck_$func
3197 if test "x$skipcheck" != "xyes"; then
3198 AC_MSG_CHECKING([deeper for $func])
3205 AC_MSG_RESULT([yes])
3206 eval "ac_cv_func_$func=yes"
3207 AC_DEFINE_UNQUOTED(XC_SH_TR_CPP([HAVE_$func]), [1],
3208 [Define to 1 if you have the $func function.])
3210 AC_MSG_RESULT([but still no])
3215 dnl Check if the getnameinfo function is available
3216 dnl and get the types of five of its arguments.
3217 CURL_CHECK_FUNC_GETNAMEINFO
3219 if test "$ipv6" = "yes"; then
3220 if test "$ac_cv_func_getaddrinfo" = "yes"; then
3221 AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
3223 AC_SUBST(IPV6_ENABLED)
3225 CURL_CHECK_NI_WITHSCOPEID
3228 CURL_CHECK_NONBLOCKING_SOCKET
3230 dnl ************************************************************
3231 dnl nroff tool stuff
3234 AC_PATH_PROG( PERL, perl, ,
3235 $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
3238 AC_PATH_PROGS( NROFF, gnroff nroff, ,
3239 $PATH:/usr/bin/:/usr/local/bin )
3242 if test -n "$NROFF"; then
3243 dnl only check for nroff options if an nroff command was found
3245 AC_MSG_CHECKING([how to use *nroff to get plain text from man pages])
3247 mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
3248 if test -z "$mancheck"; then
3250 mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
3251 if test -z "$mancheck"; then
3253 AC_MSG_RESULT([failed])
3254 AC_MSG_WARN([found no *nroff option to get plaintext from man pages])
3256 AC_MSG_RESULT([$MANOPT])
3259 AC_MSG_RESULT([$MANOPT])
3264 if test -z "$MANOPT"
3266 dnl if no nroff tool was found, or no option that could convert man pages
3267 dnl was found, then disable the built-in manual stuff
3268 AC_MSG_WARN([disabling built-in manual])
3272 dnl *************************************************************************
3273 dnl If the manual variable still is set, then we go with providing a built-in
3276 if test "$USE_MANUAL" = "1"; then
3277 AC_DEFINE(USE_MANUAL, 1, [If you want to build curl with the built-in manual])
3278 curl_manual_msg="enabled"
3281 dnl set variable for use in automakefile(s)
3282 AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
3285 AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes)
3287 if test "x$ac_cv_native_windows" != "xyes" &&
3288 test "x$enable_shared" = "xyes"; then
3289 build_libhostname=yes
3291 build_libhostname=no
3293 AM_CONDITIONAL(BUILD_LIBHOSTNAME, test x$build_libhostname = xyes)
3295 CURL_CHECK_OPTION_THREADED_RESOLVER
3297 if test "x$want_thres" = xyes && test "x$want_ares" = xyes; then
3299 [Options --enable-threaded-resolver and --enable-ares are mutually exclusive])
3302 if test "$want_thres" = "yes"; then
3303 AC_CHECK_HEADER(pthread.h,
3304 [ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>])
3305 save_CFLAGS="$CFLAGS"
3306 CFLAGS="$CFLAGS -pthread"
3307 AC_CHECK_LIB(pthread, pthread_create,
3308 [ AC_MSG_NOTICE([using POSIX threaded DNS lookup])
3309 AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup])
3311 curl_res_msg="threaded"
3313 [ CFLAGS="$save_CFLAGS"])
3317 dnl ************************************************************
3318 dnl disable verbose text strings
3320 AC_MSG_CHECKING([whether to enable verbose strings])
3321 AC_ARG_ENABLE(verbose,
3322 AC_HELP_STRING([--enable-verbose],[Enable verbose strings])
3323 AC_HELP_STRING([--disable-verbose],[Disable verbose strings]),
3324 [ case "$enableval" in
3327 AC_DEFINE(CURL_DISABLE_VERBOSE_STRINGS, 1, [to disable verbose strings])
3328 curl_verbose_msg="no"
3330 *) AC_MSG_RESULT(yes)
3336 dnl ************************************************************
3337 dnl enable SSPI support
3339 AC_MSG_CHECKING([whether to enable SSPI support (Windows native builds only)])
3341 AC_HELP_STRING([--enable-sspi],[Enable SSPI])
3342 AC_HELP_STRING([--disable-sspi],[Disable SSPI]),
3343 [ case "$enableval" in
3345 if test "$ac_cv_native_windows" = "yes"; then
3347 AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
3348 AC_SUBST(USE_WINDOWS_SSPI, [1])
3349 curl_sspi_msg="enabled"
3352 AC_MSG_WARN([--enable-sspi Ignored. Only supported on native Windows builds.])
3356 if test "x$WINSSL_ENABLED" = "x1"; then
3357 # --with-winssl implies --enable-sspi
3364 if test "x$WINSSL_ENABLED" = "x1"; then
3365 # --with-winssl implies --enable-sspi
3372 dnl ************************************************************
3373 dnl disable cryptographic authentication
3375 AC_MSG_CHECKING([whether to enable cryptographic authentication methods])
3376 AC_ARG_ENABLE(crypto-auth,
3377 AC_HELP_STRING([--enable-crypto-auth],[Enable cryptographic authentication])
3378 AC_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]),
3379 [ case "$enableval" in
3382 AC_DEFINE(CURL_DISABLE_CRYPTO_AUTH, 1, [to disable cryptographic authentication])
3384 *) AC_MSG_RESULT(yes)
3390 CURL_CHECK_OPTION_NTLM_WB
3394 dnl ************************************************************
3395 dnl disable TLS-SRP authentication
3397 AC_MSG_CHECKING([whether to enable TLS-SRP authentication])
3398 AC_ARG_ENABLE(tls-srp,
3399 AC_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication])
3400 AC_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
3401 [ case "$enableval" in
3404 AC_DEFINE(CURL_DISABLE_TLS_SRP, 1, [to disable TLS-SRP authentication])
3407 *) AC_MSG_RESULT(yes)
3415 if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_SSLEAY_SRP" = "x1") ; then
3416 AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication])
3418 curl_tls_srp_msg="enabled"
3421 dnl ************************************************************
3422 dnl disable cookies support
3424 AC_MSG_CHECKING([whether to enable support for cookies])
3425 AC_ARG_ENABLE(cookies,
3426 AC_HELP_STRING([--enable-cookies],[Enable cookies support])
3427 AC_HELP_STRING([--disable-cookies],[Disable cookies support]),
3428 [ case "$enableval" in
3431 AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support])
3433 *) AC_MSG_RESULT(yes)
3439 dnl ************************************************************
3440 dnl hiding of library internal symbols
3442 CURL_CONFIGURE_SYMBOL_HIDING
3444 dnl ************************************************************
3445 dnl enforce SONAME bump
3448 AC_MSG_CHECKING([whether to enforce SONAME bump])
3449 AC_ARG_ENABLE(soname-bump,
3450 AC_HELP_STRING([--enable-soname-bump],[Enable enforced SONAME bump])
3451 AC_HELP_STRING([--disable-soname-bump],[Disable enforced SONAME bump]),
3452 [ case "$enableval" in
3453 yes) AC_MSG_RESULT(yes)
3460 AC_MSG_RESULT($soname_bump)
3462 AM_CONDITIONAL(SONAME_BUMP, test x$soname_bump = xyes)
3465 dnl All the library dependencies put into $LIB apply to libcurl only.
3469 AC_SUBST(LIBCURL_LIBS)
3470 AC_SUBST(CURL_NETWORK_LIBS)
3471 AC_SUBST(CURL_NETWORK_AND_TIME_LIBS)
3473 dnl BLANK_AT_MAKETIME may be used in our Makefile.am files to blank
3474 dnl LIBS variable used in generated makefile at makefile processing
3475 dnl time. Doing this functionally prevents LIBS from being used for
3476 dnl all link targets in given makefile.
3478 AC_SUBST(BLANK_AT_MAKETIME)
3480 AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
3483 ENABLE_SHARED="$enable_shared"
3484 AC_SUBST(ENABLE_SHARED)
3487 dnl For keeping supported features and protocols also in pkg-config file
3488 dnl since it is more cross-compile friendly than curl-config
3491 if test "x$USE_SSLEAY" = "x1"; then
3492 SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
3493 elif test -n "$SSL_ENABLED"; then
3494 SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
3496 if test "@KRB4_ENABLED@" = "x1"; then
3497 SUPPORT_FEATURES="$SUPPORT_FEATURES KRB4"
3499 if test "x$IPV6_ENABLED" = "x1"; then
3500 SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6"
3502 if test "x$HAVE_LIBZ" = "x1"; then
3503 SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
3505 if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1"; then
3506 SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
3508 if test "x$IDN_ENABLED" = "x1"; then
3509 SUPPORT_FEATURES="$SUPPORT_FEATURES IDN"
3511 if test "x$USE_WINDOWS_SSPI" = "x1"; then
3512 SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
3514 if test "x$CURL_DISABLE_HTTP" != "x1"; then
3515 if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
3516 -o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1" \
3517 -o "x$DARWINSSL_ENABLED" = "x1"; then
3518 SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
3519 if test "x$NTLM_WB_ENABLED" = "x1"; then
3520 SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM_WB"
3524 if test "x$USE_TLS_SRP" = "x1"; then
3525 SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
3528 AC_SUBST(SUPPORT_FEATURES)
3530 dnl For supported protocols in pkg-config file
3531 if test "x$CURL_DISABLE_HTTP" != "x1"; then
3532 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP"
3533 if test "x$SSL_ENABLED" = "x1"; then
3534 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS"
3537 if test "x$CURL_DISABLE_FTP" != "x1"; then
3538 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP"
3539 if test "x$SSL_ENABLED" = "x1"; then
3540 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS"
3543 if test "x$CURL_DISABLE_FILE" != "x1"; then
3544 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE"
3546 if test "x$CURL_DISABLE_TELNET" != "x1"; then
3547 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET"
3549 if test "x$CURL_DISABLE_LDAP" != "x1"; then
3550 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP"
3551 if test "x$CURL_DISABLE_LDAPS" != "x1"; then
3552 if (test "x$USE_OPENLDAP" = "x1" && test "x$SSL_ENABLED" = "x1") ||
3553 (test "x$USE_OPENLDAP" != "x1" && test "x$HAVE_LDAP_SSL" = "x1"); then
3554 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS"
3558 if test "x$CURL_DISABLE_DICT" != "x1"; then
3559 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT"
3561 if test "x$CURL_DISABLE_TFTP" != "x1"; then
3562 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP"
3564 if test "x$CURL_DISABLE_GOPHER" != "x1"; then
3565 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER"
3567 if test "x$CURL_DISABLE_POP3" != "x1"; then
3568 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3"
3569 if test "x$SSL_ENABLED" = "x1"; then
3570 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3S"
3573 if test "x$CURL_DISABLE_IMAP" != "x1"; then
3574 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAP"
3575 if test "x$SSL_ENABLED" = "x1"; then
3576 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS"
3579 if test "x$CURL_DISABLE_SMTP" != "x1"; then
3580 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP"
3581 if test "x$SSL_ENABLED" = "x1"; then
3582 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTPS"
3585 if test "x$USE_LIBSSH2" = "x1"; then
3586 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
3587 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
3589 if test "x$CURL_DISABLE_RTSP" != "x1"; then
3590 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP"
3592 if test "x$USE_LIBRTMP" = "x1"; then
3593 SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP"
3596 dnl replace spaces with newlines
3598 dnl replace the newlines back to spaces
3599 SUPPORT_PROTOCOLS=`echo $SUPPORT_PROTOCOLS | tr ' ' '\012' | sort | tr '\012' ' '`
3601 AC_SUBST(SUPPORT_PROTOCOLS)
3603 dnl squeeze whitespace out of some variables
3611 squeeze LIBCURL_LIBS
3612 squeeze CURL_NETWORK_LIBS
3613 squeeze CURL_NETWORK_AND_TIME_LIBS
3615 squeeze SUPPORT_FEATURES
3616 squeeze SUPPORT_PROTOCOLS
3619 dnl Some sanity checks for LIBS, LDFLAGS, CPPFLAGS and CFLAGS values that
3620 dnl configure is going to feed into makefiles generated by automake. Due
3621 dnl to automake placement and usage of these variables we have to follow
3622 dnl its rules or we may get funny results later on at make-time.
3626 dnl LIBS should only specify libraries
3628 AC_MSG_NOTICE([using LIBS: $LIBS])
3630 for word1 in $LIBS; do
3640 if test "$tst_bad_spec" = "yes"; then
3641 AC_MSG_WARN([oops, LIBS should only specify libraries.])
3645 dnl LDFLAGS should only specify linker flags
3647 AC_MSG_NOTICE([using LDFLAGS: $LDFLAGS])
3648 tst_bad_msg="oops, LDFLAGS should only specify linker flags, not"
3649 for word1 in $LDFLAGS; do
3652 AC_MSG_WARN([$tst_bad_msg macro definitions. Use CPPFLAGS for: $word1])
3655 AC_MSG_WARN([$tst_bad_msg macro suppressions. Use CPPFLAGS for: $word1])
3658 AC_MSG_WARN([$tst_bad_msg include directories. Use CPPFLAGS for: $word1])
3661 AC_MSG_WARN([$tst_bad_msg libraries. Use LIBS for: $word1])
3667 dnl CPPFLAGS should only specify C preprocessor flags
3669 AC_MSG_NOTICE([using CPPFLAGS: $CPPFLAGS])
3670 tst_bad_msg="oops, CPPFLAGS should only specify C preprocessor flags, not"
3671 for word1 in $CPPFLAGS; do
3674 AC_MSG_WARN([$tst_bad_msg library runtime directories. Use LDFLAGS for: $word1])
3676 -L* | --library-path=*)
3677 AC_MSG_WARN([$tst_bad_msg library directories. Use LDFLAGS for: $word1])
3680 AC_MSG_WARN([$tst_bad_msg libraries. Use LIBS for: $word1])
3686 dnl CFLAGS should only specify C compiler flags
3688 AC_MSG_NOTICE([using CFLAGS: $CFLAGS])
3689 tst_bad_msg="oops, CFLAGS should only specify C compiler flags, not"
3690 for word1 in $CFLAGS; do
3693 AC_MSG_WARN([$tst_bad_msg macro definitions. Use CPPFLAGS for: $word1])
3696 AC_MSG_WARN([$tst_bad_msg macro suppressions. Use CPPFLAGS for: $word1])
3699 AC_MSG_WARN([$tst_bad_msg include directories. Use CPPFLAGS for: $word1])
3702 AC_MSG_WARN([$tst_bad_msg library runtime directories. Use LDFLAGS for: $word1])
3704 -L* | --library-path=*)
3705 AC_MSG_WARN([$tst_bad_msg library directories. Use LDFLAGS for: $word1])
3708 AC_MSG_WARN([$tst_bad_msg libraries. Use LIBS for: $word1])
3713 if test "x$want_curldebug_assumed" = "xyes" &&
3714 test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then
3715 ac_configure_args="$ac_configure_args --enable-curldebug"
3718 AC_CONFIG_FILES([Makefile \
3720 docs/examples/Makefile \
3721 docs/libcurl/Makefile \
3723 include/curl/Makefile \
3728 tests/data/Makefile \
3729 tests/server/Makefile \
3730 tests/libtest/Makefile \
3731 tests/unit/Makefile \
3733 packages/Win32/Makefile \
3734 packages/Win32/cygwin/Makefile \
3735 packages/Linux/Makefile \
3736 packages/Linux/RPM/Makefile \
3737 packages/Linux/RPM/curl.spec \
3738 packages/Linux/RPM/curl-ssl.spec \
3739 packages/Solaris/Makefile \
3740 packages/EPM/curl.list \
3741 packages/EPM/Makefile \
3742 packages/vms/Makefile \
3743 packages/AIX/Makefile \
3744 packages/AIX/RPM/Makefile \
3745 packages/AIX/RPM/curl.spec \
3751 CURL_GENERATE_CONFIGUREHELP_PM
3753 AC_MSG_NOTICE([Configured to build curl/libcurl:
3755 curl version: ${CURLVERSION}
3757 Install prefix: ${prefix}
3759 SSL support: ${curl_ssl_msg}
3760 SSH support: ${curl_ssh_msg}
3761 zlib support: ${curl_zlib_msg}
3762 krb4 support: ${curl_krb4_msg}
3763 GSSAPI support: ${curl_gss_msg}
3764 SPNEGO support: ${curl_spnego_msg}
3765 TLS-SRP support: ${curl_tls_srp_msg}
3766 resolver: ${curl_res_msg}
3767 ipv6 support: ${curl_ipv6_msg}
3768 IDN support: ${curl_idn_msg}
3769 Build libcurl: Shared=${enable_shared}, Static=${enable_static}
3770 Built-in manual: ${curl_manual_msg}
3771 --libcurl option: ${curl_libcurl_msg}
3772 Verbose errors: ${curl_verbose_msg}
3773 SSPI support: ${curl_sspi_msg}
3774 ca cert bundle: ${ca}
3775 ca cert path: ${capath}
3776 LDAP support: ${curl_ldap_msg}
3777 LDAPS support: ${curl_ldaps_msg}
3778 RTSP support: ${curl_rtsp_msg}
3779 RTMP support: ${curl_rtmp_msg}
3780 metalink support: ${curl_mtlnk_msg}
3781 Protocols: ${SUPPORT_PROTOCOLS}
3784 if test "x$soname_bump" = "xyes"; then
3787 SONAME bump: yes - WARNING: this library will be built with the SONAME
3788 number bumped due to (a detected) ABI breakage.
3789 See lib/README.curl_off_t for details on this.