5
5
# | (__| |_| | _ <| |___
6
6
# \___|\___/|_| \_\_____|
8
# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
8
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
10
10
# This software is licensed as described in the file COPYING, which
11
11
# you should have received as part of this distribution. The terms
29
29
CURL_OVERRIDE_AUTOCONF
31
31
dnl configure script copyright
32
AC_COPYRIGHT([Copyright (c) 1998 - 2010 Daniel Stenberg, <daniel@haxx.se>
32
AC_COPYRIGHT([Copyright (c) 1998 - 2011 Daniel Stenberg, <daniel@haxx.se>
33
33
This configure script may be copied, distributed and modified under the
34
34
terms of the curl license; see COPYING for more details])
36
36
AC_CONFIG_SRCDIR([lib/urldata.h])
37
37
AM_CONFIG_HEADER(lib/curl_config.h src/curl_config.h include/curl/curlbuild.h)
38
AC_CONFIG_MACRO_DIR([m4])
40
41
CURL_CHECK_OPTION_DEBUG
122
123
dnl figure out the libcurl version
123
VERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
124
AM_INIT_AUTOMAKE(curl,$VERSION)
124
CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curlver.h`
125
126
AC_MSG_CHECKING([curl version])
126
AC_MSG_RESULT($VERSION)
127
AC_MSG_RESULT($CURLVERSION)
129
AC_SUBST(CURLVERSION)
129
132
dnl we extract the numerical version for curl-config only
142
145
dnl initialize all the info variables
143
curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl} )"
146
curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls} )"
144
147
curl_ssh_msg="no (--with-libssh2)"
145
148
curl_zlib_msg="no (--with-zlib)"
146
149
curl_krb4_msg="no (--with-krb4*)"
147
150
curl_gss_msg="no (--with-gssapi)"
148
151
curl_spnego_msg="no (--with-spnego)"
152
curl_tls_srp_msg="no (--enable-tls-srp)"
149
153
curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
150
154
curl_ipv6_msg="no (--enable-ipv6)"
151
155
curl_idn_msg="no (--with-libidn)"
1640
dnl We require OpenSSL with SRP support.
1642
if test "$OPENSSL_ENABLED" = "1"; then
1643
AC_CHECK_LIB(crypto, SRP_Calc_client_key,
1645
AC_DEFINE(HAVE_SSLEAY_SRP, 1, [if you have the function SRP_Calc_client_key])
1646
AC_SUBST(HAVE_SSLEAY_SRP, [1])
1634
1650
dnl ----------------------------------------------------
1635
1651
dnl check for GnuTLS
1636
1652
dnl ----------------------------------------------------
1774
dnl We require GnuTLS with SRP support.
1776
if test "$GNUTLS_ENABLED" = "1"; then
1777
AC_CHECK_LIB(gnutls, gnutls_srp_verifier,
1779
AC_DEFINE(HAVE_GNUTLS_SRP, 1, [if you have the function gnutls_srp_verifier])
1780
AC_SUBST(HAVE_GNUTLS_SRP, [1])
1757
1784
dnl ----------------------------------------------------
1758
1785
dnl check for PolarSSL
1759
1786
dnl ----------------------------------------------------
1839
1866
fi dnl OPENSSL != 1
1841
1868
dnl ----------------------------------------------------
1869
dnl check for CyaSSL
1870
dnl ----------------------------------------------------
1872
dnl Default to compiler & linker defaults for CyaSSL files & libraries.
1877
AC_ARG_WITH(cyassl,dnl
1878
AC_HELP_STRING([--with-cyassl=PATH],[where to look for CyaSSL, PATH points to the installation root (default: /usr/local/cyassl)])
1879
AC_HELP_STRING([--without-cyassl], [disable CyaSSL detection]),
1880
OPT_CYASSL=$withval)
1882
if test "$OPENSSL_ENABLED" != "1"; then
1884
if test X"$OPT_CYASSL" != Xno; then
1886
if test "$OPT_CYASSL" = "yes"; then
1890
if test -z "$OPT_CYASSL" ; then
1891
dnl check for lib in default first
1893
trycyassldir="/usr/local/cyassl"
1895
LDFLAGS="$LDFLAGS -L$trycyassldir/lib"
1896
CPPFLAGS="$CPPFLAGS -I$trycyassldir/include"
1898
AC_CHECK_LIB(cyassl, InitCyaSSL,
1899
dnl libcyassl found, set the variable
1901
AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
1902
AC_SUBST(USE_CYASSL, [1])
1905
curl_ssl_msg="enabled (CyaSSL)"
1909
if test "x$USE_CYASSL" != "xyes"; then
1910
dnl add the path and test again
1911
addld=-L$OPT_CYASSL/lib$libsuff
1912
addcflags=-I$OPT_CYASSL/include
1913
cyassllib=$OPT_CYASSL/lib$libsuff
1915
LDFLAGS="$LDFLAGS $addld"
1916
if test "$addcflags" != "-I/usr/include"; then
1917
CPPFLAGS="$CPPFLAGS $addcflags"
1920
AC_CHECK_LIB(cyassl, InitCyaSSL,
1922
AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
1923
AC_SUBST(USE_CYASSL, [1])
1926
curl_ssl_msg="enabled (CyaSSL)"
1934
if test "x$USE_CYASSL" = "xyes"; then
1935
AC_MSG_NOTICE([detected CyaSSL])
1937
CURL_LIBS="$CURL_LIBS -lcyassl -lm"
1938
LIBS="$LIBS -lcyassl -lm"
1940
if test -n "$cyassllib"; then
1941
dnl when shared libs were found in a path that the run-time
1942
dnl linker doesn't search through, we need to add it to
1943
dnl LD_LIBRARY_PATH to prevent further configure tests to fail
1946
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$cyassllib"
1947
export LD_LIBRARY_PATH
1948
AC_MSG_NOTICE([Added $cyassllib to LD_LIBRARY_PATH])
1953
fi dnl CyaSSL not disabled
1957
dnl ----------------------------------------------------
1842
1958
dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
1843
1959
dnl ----------------------------------------------------
1935
2051
fi dnl OPENSSL != 1 -a GNUTLS_ENABLED != 1
1937
if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED" = "x"; then
2055
AC_ARG_WITH(axtls,dnl
2056
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.])
2057
AC_HELP_STRING([--without-axtls], [disable axTLS]),
2060
if test "$curl_ssl_msg" = "$init_ssl_msg"; then
2061
if test X"$OPT_AXTLS" != Xno; then
2062
dnl backup the pre-axtls variables
2063
CLEANLDFLAGS="$LDFLAGS"
2064
CLEANCPPFLAGS="$CPPFLAGS"
2067
case "$OPT_AXTLS" in
2069
dnl --with-axtls (without path) used
2070
PREFIX_AXTLS=/usr/local
2071
LIB_AXTLS="$PREFIX_AXTLS/lib"
2072
LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
2073
CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
2076
dnl no --with-axtls option given, just check default places
2080
dnl check the given --with-axtls spot
2081
PREFIX_AXTLS=$OPT_AXTLS
2082
LIB_AXTLS="$PREFIX_AXTLS/lib"
2083
LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
2084
CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
2088
AC_CHECK_LIB(axtls, ssl_version,[
2089
LIBS="-laxtls $LIBS"
2090
AC_DEFINE(USE_AXTLS, 1, [if axTLS is enabled])
2091
AC_SUBST(USE_AXTLS, [1])
2094
curl_ssl_msg="enabled (axTLS)"
2097
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_AXTLS"
2098
export LD_LIBRARY_PATH
2099
AC_MSG_NOTICE([Added $LIB_AXTLS to LD_LIBRARY_PATH])
2101
LDFLAGS="$CLEANLDFLAGS"
2102
CPPFLAGS="$CLEANCPPFLAGS"
2108
if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED" = "x"; then
1938
2109
AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
1939
AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl or --with-nss to address this.])
2110
AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss or --with-axtls to address this.])
1941
2112
# SSL is enabled, genericly
1942
2113
AC_SUBST(SSL_ENABLED)
1956
2127
dnl Default to compiler & linker defaults for LIBSSH2 files & libraries.
1957
2128
OPT_LIBSSH2=off
1958
2129
AC_ARG_WITH(libssh2,dnl
1959
AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the LIBSSH2 installation (default: /usr/local/lib); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
2130
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])
1960
2131
AC_HELP_STRING([--without-libssh2], [disable LIBSSH2]),
1961
2132
OPT_LIBSSH2=$withval)
2046
2218
dnl Default to compiler & linker defaults for LIBRTMP files & libraries.
2047
2219
OPT_LIBRTMP=off
2048
2220
AC_ARG_WITH(librtmp,dnl
2049
AC_HELP_STRING([--with-librtmp=PATH],[Where to look for librtmp, PATH points to the LIBRTMP installation (default: /usr/local/lib); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
2221
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])
2050
2222
AC_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
2051
2223
OPT_LIBRTMP=$withval)
2601
2774
dnl ************************************************************
2775
dnl disable TLS-SRP authentication
2777
AC_MSG_CHECKING([whether to enable TLS-SRP authentication])
2778
AC_ARG_ENABLE(tls-srp,
2779
AC_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication])
2780
AC_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
2781
[ case "$enableval" in
2784
AC_DEFINE(CURL_DISABLE_TLS_SRP, 1, [to disable TLS-SRP authentication])
2787
*) AC_MSG_RESULT(yes)
2795
if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_SSLEAY_SRP" = "x1") ; then
2796
AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication])
2798
curl_tls_srp_msg="enabled"
2801
dnl ************************************************************
2602
2802
dnl disable cookies support
2604
2804
AC_MSG_CHECKING([whether to enable support for cookies])
2742
2942
if test "x$USE_WINDOWS_SSPI" = "x1"; then
2743
2943
SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
2745
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
2746
-o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1"; then
2747
SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
2945
if test "x$CURL_DISABLE_HTTP" != "x1"; then
2946
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
2947
-o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1"; then
2948
SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
2951
if test "x$USE_TLS_SRP" = "x1"; then
2952
SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
2750
2955
AC_SUBST(SUPPORT_FEATURES)