~james-page/ubuntu/oneiric/curl/minimal-udeb

« back to all changes in this revision

Viewing changes to .pc/versioned/configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Lorenzo De Liso
  • Date: 2011-05-02 19:12:31 UTC
  • mfrom: (3.4.17 sid)
  • Revision ID: james.westby@ubuntu.com-20110502191231-1hiklg06nzo62ws8
Tags: 7.21.6-1ubuntu1
* Merge from debian unstable (LP: #775794), remaining changes:
  - debian/control:
    + Build-Depends: Replace libssh2-1-dev with openssh-server.
      Drop stunnel since it's in universe, as well.
    + Drop libssh2-1-dev from libcurl4-openssl-dev's Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
#                            | (__| |_| |  _ <| |___
6
6
#                             \___|\___/|_| \_\_____|
7
7
#
8
 
# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
 
8
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
9
9
#
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
30
30
 
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])
35
35
 
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])
38
39
AM_MAINTAINER_MODE
39
40
 
40
41
CURL_CHECK_OPTION_DEBUG
120
121
fi
121
122
 
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
AM_INIT_AUTOMAKE
125
126
AC_MSG_CHECKING([curl version])
126
 
AC_MSG_RESULT($VERSION)
 
127
AC_MSG_RESULT($CURLVERSION)
 
128
 
 
129
AC_SUBST(CURLVERSION)
127
130
 
128
131
dnl
129
132
dnl we extract the numerical version for curl-config only
140
143
 
141
144
dnl
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)"
156
160
  curl_ldaps_msg="no      (--enable-ldaps)"
157
161
   curl_rtsp_msg="no      (--enable-rtsp)"
158
162
   curl_rtmp_msg="no      (--with-librtmp)"
 
163
    init_ssl_msg=${curl_ssl_msg}
159
164
 
160
165
dnl
161
166
dnl Save anything in $LIBS for later
1631
1636
  fi
1632
1637
fi
1633
1638
 
 
1639
dnl ---
 
1640
dnl We require OpenSSL with SRP support.
 
1641
dnl ---
 
1642
if test "$OPENSSL_ENABLED" = "1"; then
 
1643
  AC_CHECK_LIB(crypto, SRP_Calc_client_key,
 
1644
   [
 
1645
     AC_DEFINE(HAVE_SSLEAY_SRP, 1, [if you have the function SRP_Calc_client_key])
 
1646
     AC_SUBST(HAVE_SSLEAY_SRP, [1])
 
1647
   ])
 
1648
fi
 
1649
 
1634
1650
dnl ----------------------------------------------------
1635
1651
dnl check for GnuTLS
1636
1652
dnl ----------------------------------------------------
1639
1655
OPT_GNUTLS=no
1640
1656
 
1641
1657
AC_ARG_WITH(gnutls,dnl
1642
 
AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root (default: /usr/local/)])
 
1658
AC_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root])
1643
1659
AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]),
1644
1660
  OPT_GNUTLS=$withval)
1645
1661
 
1754
1770
    ])
1755
1771
fi
1756
1772
 
 
1773
dnl ---
 
1774
dnl We require GnuTLS with SRP support.
 
1775
dnl ---
 
1776
if test "$GNUTLS_ENABLED" = "1"; then
 
1777
  AC_CHECK_LIB(gnutls, gnutls_srp_verifier,
 
1778
   [
 
1779
     AC_DEFINE(HAVE_GNUTLS_SRP, 1, [if you have the function gnutls_srp_verifier])
 
1780
     AC_SUBST(HAVE_GNUTLS_SRP, [1])
 
1781
   ])
 
1782
fi
 
1783
 
1757
1784
dnl ----------------------------------------------------
1758
1785
dnl check for PolarSSL
1759
1786
dnl ----------------------------------------------------
1764
1791
_cppflags=$CPPFLAGS
1765
1792
_ldflags=$LDFLAGS
1766
1793
AC_ARG_WITH(polarssl,dnl
1767
 
AC_HELP_STRING([--with-polarssl=PATH],[where to look for PolarSSL, PATH points to the installation root (default: /usr/local/)])
 
1794
AC_HELP_STRING([--with-polarssl=PATH],[where to look for PolarSSL, PATH points to the installation root])
1768
1795
AC_HELP_STRING([--without-polarssl], [disable PolarSSL detection]),
1769
1796
  OPT_POLARSSL=$withval)
1770
1797
 
1839
1866
fi dnl OPENSSL != 1
1840
1867
 
1841
1868
dnl ----------------------------------------------------
 
1869
dnl check for CyaSSL
 
1870
dnl ----------------------------------------------------
 
1871
 
 
1872
dnl Default to compiler & linker defaults for CyaSSL files & libraries.
 
1873
OPT_CYASSL=no
 
1874
 
 
1875
_cppflags=$CPPFLAGS
 
1876
_ldflags=$LDFLAGS
 
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)
 
1881
 
 
1882
if test "$OPENSSL_ENABLED" != "1"; then
 
1883
 
 
1884
  if test X"$OPT_CYASSL" != Xno; then
 
1885
 
 
1886
    if test "$OPT_CYASSL" = "yes"; then
 
1887
      OPT_CYASSL=""
 
1888
    fi
 
1889
 
 
1890
    if test -z "$OPT_CYASSL" ; then
 
1891
      dnl check for lib in default first
 
1892
 
 
1893
      trycyassldir="/usr/local/cyassl"
 
1894
 
 
1895
      LDFLAGS="$LDFLAGS -L$trycyassldir/lib"
 
1896
      CPPFLAGS="$CPPFLAGS -I$trycyassldir/include"
 
1897
 
 
1898
      AC_CHECK_LIB(cyassl, InitCyaSSL,
 
1899
      dnl libcyassl found, set the variable
 
1900
       [
 
1901
         AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
 
1902
         AC_SUBST(USE_CYASSL, [1])
 
1903
         CYASSL_ENABLED=1
 
1904
         USE_CYASSL="yes"
 
1905
         curl_ssl_msg="enabled (CyaSSL)"
 
1906
        ])
 
1907
    fi
 
1908
 
 
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
 
1914
 
 
1915
      LDFLAGS="$LDFLAGS $addld"
 
1916
      if test "$addcflags" != "-I/usr/include"; then
 
1917
         CPPFLAGS="$CPPFLAGS $addcflags"
 
1918
      fi
 
1919
 
 
1920
      AC_CHECK_LIB(cyassl, InitCyaSSL,
 
1921
       [
 
1922
       AC_DEFINE(USE_CYASSL, 1, [if CyaSSL is enabled])
 
1923
       AC_SUBST(USE_CYASSL, [1])
 
1924
       CYASSL_ENABLED=1
 
1925
       USE_CYASSL="yes"
 
1926
       curl_ssl_msg="enabled (CyaSSL)"
 
1927
       ],
 
1928
       [
 
1929
         CPPFLAGS=$_cppflags
 
1930
         LDFLAGS=$_ldflags
 
1931
       ])
 
1932
    fi
 
1933
 
 
1934
    if test "x$USE_CYASSL" = "xyes"; then
 
1935
      AC_MSG_NOTICE([detected CyaSSL])
 
1936
 
 
1937
      CURL_LIBS="$CURL_LIBS -lcyassl -lm"
 
1938
      LIBS="$LIBS -lcyassl -lm"
 
1939
 
 
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
 
1944
        dnl due to this
 
1945
 
 
1946
        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$cyassllib"
 
1947
        export LD_LIBRARY_PATH
 
1948
        AC_MSG_NOTICE([Added $cyassllib to LD_LIBRARY_PATH])
 
1949
      fi
 
1950
 
 
1951
    fi
 
1952
 
 
1953
  fi dnl CyaSSL not disabled
 
1954
 
 
1955
fi dnl OPENSSL != 1
 
1956
 
 
1957
dnl ----------------------------------------------------
1842
1958
dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
1843
1959
dnl ----------------------------------------------------
1844
1960
 
1846
1962
OPT_NSS=no
1847
1963
 
1848
1964
AC_ARG_WITH(nss,dnl
1849
 
AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root (default: /usr/local/)])
 
1965
AC_HELP_STRING([--with-nss=PATH],[where to look for NSS, PATH points to the installation root])
1850
1966
AC_HELP_STRING([--without-nss], [disable NSS detection]),
1851
1967
  OPT_NSS=$withval)
1852
1968
 
1934
2050
 
1935
2051
fi dnl OPENSSL != 1 -a GNUTLS_ENABLED != 1
1936
2052
 
1937
 
if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED" = "x"; then
 
2053
OPT_AXTLS=off
 
2054
 
 
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]),
 
2058
  OPT_AXTLS=$withval)
 
2059
 
 
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"
 
2065
    CLEANLIBS="$LIBS"
 
2066
 
 
2067
    case "$OPT_AXTLS" in
 
2068
    yes)
 
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"
 
2074
      ;;
 
2075
    off)
 
2076
      dnl no --with-axtls option given, just check default places
 
2077
      PREFIX_AXTLS=
 
2078
      ;;
 
2079
    *)
 
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"
 
2085
      ;;
 
2086
    esac
 
2087
 
 
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])
 
2092
      AXTLS_ENABLED=1
 
2093
      USE_AXTLS="yes"
 
2094
      curl_ssl_msg="enabled (axTLS)"
 
2095
 
 
2096
 
 
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])
 
2100
      ],[
 
2101
      LDFLAGS="$CLEANLDFLAGS"
 
2102
      CPPFLAGS="$CLEANCPPFLAGS"
 
2103
      LIBS="$CLEANLIBS"
 
2104
    ])
 
2105
  fi
 
2106
fi
 
2107
 
 
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.])
1940
2111
else
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)
1962
2133
 
1991
2162
 
1992
2163
  dnl if given with a prefix, we set -L and -I based on that
1993
2164
  if test -n "$PREFIX_SSH2"; then
 
2165
    LIB_SSH2="-lssh2"
1994
2166
    LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
1995
2167
    CPP_SSH2=-I${PREFIX_SSH2}/include
1996
2168
    DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
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)
2052
2224
 
2506
2678
CURL_CHECK_LIB_ARES
2507
2679
AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes)
2508
2680
 
2509
 
if test "x$enable_shared" = "xyes"; then
 
2681
if test "x$ac_cv_native_windows" != "xyes" &&
 
2682
   test "x$enable_shared" = "xyes"; then
2510
2683
  build_libhostname=yes
2511
2684
else
2512
2685
  build_libhostname=no
2599
2772
)
2600
2773
 
2601
2774
dnl ************************************************************
 
2775
dnl disable TLS-SRP authentication
 
2776
dnl
 
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
 
2782
  no)
 
2783
       AC_MSG_RESULT(no)
 
2784
       AC_DEFINE(CURL_DISABLE_TLS_SRP, 1, [to disable TLS-SRP authentication])
 
2785
       want_tls_srp=no
 
2786
       ;;
 
2787
  *)   AC_MSG_RESULT(yes)
 
2788
       want_tls_srp=yes
 
2789
       ;;
 
2790
  esac ],
 
2791
       AC_MSG_RESULT(yes)
 
2792
       want_tls_srp=yes
 
2793
)
 
2794
 
 
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])
 
2797
   USE_TLS_SRP=1
 
2798
   curl_tls_srp_msg="enabled"
 
2799
fi
 
2800
 
 
2801
dnl ************************************************************
2602
2802
dnl disable cookies support
2603
2803
dnl
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"
2744
2944
fi
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"
 
2949
  fi
 
2950
fi
 
2951
if test "x$USE_TLS_SRP" = "x1"; then
 
2952
  SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
2748
2953
fi
2749
2954
 
2750
2955
AC_SUBST(SUPPORT_FEATURES)
2855
3060
           tests/data/Makefile \
2856
3061
           tests/server/Makefile \
2857
3062
           tests/libtest/Makefile \
 
3063
           tests/unit/Makefile \
2858
3064
           packages/Makefile \
2859
3065
           packages/Win32/Makefile \
2860
3066
           packages/Win32/cygwin/Makefile \
2878
3084
 
2879
3085
AC_MSG_NOTICE([Configured to build curl/libcurl:
2880
3086
 
2881
 
  curl version:    ${VERSION}
 
3087
  curl version:    ${CURLVERSION}
2882
3088
  Host setup:      ${host}
2883
3089
  Install prefix:  ${prefix}
2884
3090
  Compiler:        ${CC}
2888
3094
  krb4 support:    ${curl_krb4_msg}
2889
3095
  GSSAPI support:  ${curl_gss_msg}
2890
3096
  SPNEGO support:  ${curl_spnego_msg}
 
3097
  TLS-SRP support: ${curl_tls_srp_msg}
2891
3098
  resolver:        ${curl_res_msg}
2892
3099
  ipv6 support:    ${curl_ipv6_msg}
2893
3100
  IDN support:     ${curl_idn_msg}