~ubuntu-branches/ubuntu/vivid/curl/vivid

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Schuldei
  • Date: 2009-04-02 23:35:45 UTC
  • mto: (1.2.1 upstream) (3.2.3 sid)
  • mto: This revision was merged to the branch mainline in revision 38.
  • Revision ID: james.westby@ubuntu.com-20090402233545-geixkwhe3izccjt7
Tags: upstream-7.19.4
ImportĀ upstreamĀ versionĀ 7.19.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
#                            | (__| |_| |  _ <| |___
6
6
#                             \___|\___/|_| \_\_____|
7
7
#
8
 
# Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
 
8
# Copyright (C) 1998 - 2009, 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
18
18
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19
19
# KIND, either express or implied.
20
20
#
21
 
# $Id: configure.ac,v 1.300 2008-05-26 15:09:28 bagder Exp $
22
 
###########################################################################
 
21
# $Id: configure.ac,v 1.392 2009-02-13 05:49:58 yangtse Exp $
 
22
#***************************************************************************
23
23
dnl Process this file with autoconf to produce a configure script.
24
24
 
25
25
AC_PREREQ(2.57)
27
27
dnl We don't know the version number "statically" so we use a dash here
28
28
AC_INIT([curl], [-], [a suitable curl mailing list => http://curl.haxx.se/mail/])
29
29
 
 
30
CURL_OVERRIDE_AUTOCONF
 
31
 
30
32
dnl configure script copyright
31
33
AC_COPYRIGHT([Copyright (c) 1998 - 2008 Daniel Stenberg, <daniel@haxx.se>
32
34
This configure script may be copied, distributed and modified under the
33
35
terms of the curl license; see COPYING for more details])
34
36
 
35
37
AC_CONFIG_SRCDIR([lib/urldata.h])
36
 
AM_CONFIG_HEADER(lib/config.h src/config.h)
 
38
AM_CONFIG_HEADER(lib/config.h src/config.h include/curl/curlbuild.h)
37
39
AM_MAINTAINER_MODE
38
40
 
39
 
dnl SED is needed by some of the tools
40
 
AC_PATH_PROG( SED, sed, sed-was-not-found-by-configure,
41
 
              $PATH:/usr/bin:/usr/local/bin)
42
 
AC_SUBST(SED)
43
 
 
44
 
if test "x$SED" = "xsed-was-not-found-by-configure"; then
45
 
  AC_MSG_WARN([sed was not found, this may ruin your chances to build fine])
46
 
fi
47
 
 
48
 
dnl AR is used by libtool, and try the odd Solaris path too
49
 
dnl we use AC_CHECK_TOOL since this should make a library for the target
50
 
dnl platform
51
 
AC_CHECK_TOOL(AR, ar,
52
 
              ar-was-not-found-by-configure,
53
 
              $PATH:/usr/bin:/usr/local/bin:/usr/ccs/bin)
54
 
AC_SUBST(AR)
55
 
if test "x$AR" = "xar-was-not-found-by-configure"; then
56
 
  AC_MSG_WARN([ar was not found, this may ruin your chances to build fine])
57
 
fi
 
41
CURL_CHECK_OPTION_DEBUG
 
42
CURL_CHECK_OPTION_OPTIMIZE
 
43
CURL_CHECK_OPTION_WARNINGS
 
44
 
 
45
CURL_CHECK_PATH_SEPARATOR
 
46
 
 
47
dnl SED is mandatory for configure process and libtool.
 
48
dnl Set it now, allowing it to be changed later.
 
49
AC_PATH_PROG([SED], [sed], [not_found],
 
50
  [$PATH:/usr/bin:/usr/local/bin])
 
51
if test -z "$SED" || test "$SED" = "not_found"; then
 
52
  AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
 
53
fi
 
54
AC_SUBST([SED])
 
55
 
 
56
dnl GREP is mandatory for configure process and libtool.
 
57
dnl Set it now, allowing it to be changed later.
 
58
AC_PATH_PROG([GREP], [grep], [not_found],
 
59
  [$PATH:/usr/bin:/usr/local/bin])
 
60
if test -z "$GREP" || test "$GREP" = "not_found"; then
 
61
  AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
 
62
fi
 
63
AC_SUBST([GREP])
 
64
 
 
65
dnl EGREP is mandatory for configure process and libtool.
 
66
dnl Set it now, allowing it to be changed later.
 
67
if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
 
68
  AC_MSG_CHECKING([for egrep])
 
69
  EGREP="$GREP -E"
 
70
  AC_MSG_RESULT([$EGREP])
 
71
else
 
72
  AC_PATH_PROG([EGREP], [egrep], [not_found],
 
73
    [$PATH:/usr/bin:/usr/local/bin])
 
74
fi
 
75
if test -z "$EGREP" || test "$EGREP" = "not_found"; then
 
76
  AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.])
 
77
fi
 
78
AC_SUBST([EGREP])
 
79
 
 
80
dnl AR is mandatory for configure process and libtool.
 
81
dnl This is target dependant, so check it as a tool.
 
82
AC_PATH_TOOL([AR], [ar], [not_found],
 
83
  [$PATH:/usr/bin:/usr/local/bin])
 
84
if test -z "$AR" || test "$AR" = "not_found"; then
 
85
  AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
 
86
fi
 
87
AC_SUBST([AR])
 
88
 
58
89
AC_SUBST(libext)
59
90
 
60
91
dnl figure out the libcurl version
106
137
dnl Get system canonical name
107
138
AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
108
139
 
109
 
dnl Check for AIX weirdos
110
 
AC_AIX
111
 
 
112
140
dnl Checks for programs.
113
 
AC_PROG_CC
 
141
CURL_CHECK_PROG_CC
 
142
 
 
143
dnl Our curl_off_t internal and external configure settings
 
144
CURL_CONFIGURE_CURL_OFF_T
 
145
 
 
146
dnl This defines _ALL_SOURCE for AIX
 
147
CURL_CHECK_AIX_ALL_SOURCE
 
148
 
 
149
dnl Our configure and build reentrant settings
 
150
CURL_CONFIGURE_REENTRANT
114
151
 
115
152
dnl check for how to do large files
116
153
AC_SYS_LARGEFILE
118
155
dnl support building of Windows DLLs
119
156
AC_LIBTOOL_WIN32_DLL
120
157
 
121
 
dnl skip libtool C++ and Fortran compiler checks
122
 
m4_ifdef([AC_PROG_CXX], [m4_undefine([AC_PROG_CXX])])
123
 
m4_defun([AC_PROG_CXX],[])
124
 
m4_ifdef([AC_PROG_CXXCPP], [m4_undefine([AC_PROG_CXXCPP])])
125
 
m4_defun([AC_PROG_CXXCPP],[true])
126
 
m4_ifdef([AC_PROG_F77], [m4_undefine([AC_PROG_F77])])
127
 
m4_defun([AC_PROG_F77],[])
128
 
 
129
 
dnl skip libtool C++ and Fortran linker checks
130
 
m4_ifdef([AC_LIBTOOL_CXX], [m4_undefine([AC_LIBTOOL_CXX])])
131
 
m4_defun([AC_LIBTOOL_CXX],[])
132
 
m4_ifdef([AC_LIBTOOL_CXXCPP], [m4_undefine([AC_LIBTOOL_CXXCPP])])
133
 
m4_defun([AC_LIBTOOL_CXXCPP],[true])
134
 
m4_ifdef([AC_LIBTOOL_F77], [m4_undefine([AC_LIBTOOL_F77])])
135
 
m4_defun([AC_LIBTOOL_F77],[])
136
 
 
137
 
dnl force libtool to build static libraries with PIC on AMD64-linux
138
 
AC_MSG_CHECKING([if arch-OS host is AMD64-linux (to build static libraries with PIC)])
 
158
CURL_PROCESS_DEBUG_BUILD_OPTS
 
159
 
 
160
dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD
 
161
AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)])
139
162
case $host in
140
 
  x86_64*linux*)
 
163
  x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
141
164
    AC_MSG_RESULT([yes])
142
165
    with_pic=yes
143
166
    ;;
213
236
AC_C_INLINE
214
237
 
215
238
dnl **********************************************************************
 
239
dnl platform/compiler/architecture specific checks/flags
 
240
dnl **********************************************************************
 
241
 
 
242
CURL_CHECK_COMPILER
 
243
CURL_SET_COMPILER_BASIC_OPTS
 
244
CURL_SET_COMPILER_DEBUG_OPTS
 
245
CURL_SET_COMPILER_OPTIMIZE_OPTS
 
246
CURL_SET_COMPILER_WARNING_OPTS
 
247
 
 
248
case $host in
 
249
  #
 
250
  x86_64*linux*|amd64*freebsd*|ia64*freebsd*)
 
251
    #
 
252
    if test "$compiler_id" = "INTEL_UNIX_C"; then
 
253
      #
 
254
      if test "$compiler_num" -ge "900" &&
 
255
        test "$compiler_num" -lt "1000"; then
 
256
        dnl icc 9.X specific
 
257
        CFLAGS="$CFLAGS -i-dynamic"
 
258
      fi
 
259
      #
 
260
      if test "$compiler_num" -ge "1000"; then
 
261
        dnl icc 10.X or later
 
262
        CFLAGS="$CFLAGS -shared-intel"
 
263
      fi
 
264
      #
 
265
    fi
 
266
    ;;
 
267
  #
 
268
esac
 
269
 
 
270
CURL_CHECK_COMPILER_HALT_ON_ERROR
 
271
CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
 
272
 
 
273
dnl **********************************************************************
 
274
dnl Compilation based checks should not be done before this point.
 
275
dnl **********************************************************************
 
276
 
 
277
dnl **********************************************************************
216
278
dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
217
279
dnl and ws2tcpip.h take precedence over any other further checks which
218
280
dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
237
299
    ac_cv_header_winber_h="no"
238
300
    ;;
239
301
esac
240
 
 
241
 
dnl **********************************************************************
242
 
dnl platform/compiler/architecture specific checks/flags
243
 
dnl **********************************************************************
244
 
 
245
 
case $host in
246
 
  #
247
 
  x86_64*linux*)
248
 
    #
249
 
    dnl find out if icc is being used
250
 
    if test "z$ICC" = "z"; then
251
 
      CURL_DETECT_ICC
252
 
    fi
253
 
    #
254
 
    if test "$ICC" = "yes"; then
255
 
      dnl figure out icc version
256
 
      AC_MSG_CHECKING([icc version])
257
 
      iccver=`$CC -dumpversion`
258
 
      iccnhi=`echo $iccver | cut -d . -f1`
259
 
      iccnlo=`echo $iccver | cut -d . -f2`
260
 
      iccnum=`(expr $iccnhi "*" 100 + $iccnlo) 2>/dev/null`
261
 
      AC_MSG_RESULT($iccver)
262
 
      #
263
 
      if test "$iccnum" -ge "900" && test "$iccnum" -lt "1000"; then
264
 
        dnl icc 9.X specific
265
 
        CFLAGS="$CFLAGS -i-dynamic"
266
 
      fi
267
 
      #
268
 
      if test "$iccnum" -ge "1000"; then
269
 
        dnl icc 10.X or later
270
 
        CFLAGS="$CFLAGS -shared-intel"
271
 
      fi
272
 
      #
273
 
    fi
274
 
    ;;
275
 
  #
276
 
esac
 
302
CURL_CHECK_WIN32_LARGEFILE
277
303
 
278
304
dnl ************************************************************
279
305
dnl switch off particular protocols
384
410
       AC_SUBST(CURL_DISABLE_LDAPS, [1])
385
411
)
386
412
 
 
413
AC_MSG_CHECKING([whether to support proxies])
 
414
AC_ARG_ENABLE(proxy,
 
415
AC_HELP_STRING([--enable-proxy],[Enable proxy support])
 
416
AC_HELP_STRING([--disable-proxy],[Disable proxy support]),
 
417
[ case "$enableval" in
 
418
  no)
 
419
       AC_MSG_RESULT(no)
 
420
       AC_DEFINE(CURL_DISABLE_PROXY, 1, [to disable proxies])
 
421
       AC_SUBST(CURL_DISABLE_PROXY, [1])
 
422
       ;;
 
423
  *)   AC_MSG_RESULT(yes)
 
424
       ;;
 
425
  esac ],
 
426
       AC_MSG_RESULT(yes)
 
427
)
 
428
 
387
429
AC_MSG_CHECKING([whether to support dict])
388
430
AC_ARG_ENABLE(dict,
389
431
AC_HELP_STRING([--enable-dict],[Enable DICT support])
453
495
dnl script to allow other actions to disable it as well.
454
496
 
455
497
dnl **********************************************************************
456
 
dnl check if this is the Intel ICC compiler, and if so make it stricter
457
 
dnl (convert warning 147 into an error) so that it properly can detect the
458
 
dnl gethostbyname_r() version
459
 
dnl **********************************************************************
460
 
CURL_DETECT_ICC([CFLAGS="$CFLAGS -we 147"])
461
 
 
462
 
dnl **********************************************************************
463
498
dnl Checks for libraries.
464
499
dnl **********************************************************************
465
500
 
611
646
fi
612
647
 
613
648
 
614
 
if test "$HAVE_GETHOSTBYNAME" = "1"; then
615
 
  AC_DEFINE(HAVE_GETHOSTBYNAME, 1, [If you have gethostbyname])
616
 
else
 
649
if test "$HAVE_GETHOSTBYNAME" != "1"; then
617
650
  AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
618
651
fi
619
652
 
626
659
               ,
627
660
               -lnsl)
628
661
fi
 
662
ac_cv_func_strcasecmp="no"
629
663
 
630
664
dnl socket lib?
631
665
AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ])
784
818
  curl_ipv6_msg="enabled"
785
819
fi
786
820
 
787
 
dnl **********************************************************************
788
 
dnl Check how non-blocking sockets are set
789
 
dnl **********************************************************************
790
 
AC_ARG_ENABLE(nonblocking,
791
 
AC_HELP_STRING([--enable-nonblocking],[Enable detecting how to do it])
792
 
AC_HELP_STRING([--disable-nonblocking],[Disable non-blocking socket detection]),
793
 
[
794
 
  if test "$enableval" = "no" ; then
795
 
    AC_MSG_WARN([non-blocking sockets disabled])
796
 
    AC_DEFINE(HAVE_DISABLED_NONBLOCKING, 1,
797
 
    [to disable NON-BLOCKING connections])
 
821
# Check if struct sockaddr_in6 have sin6_scope_id member
 
822
if test "$ipv6" = yes; then
 
823
  AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
 
824
  AC_TRY_COMPILE([
 
825
#include <sys/types.h>
 
826
#include <netinet/in.h>] ,
 
827
  struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes)
 
828
  if test "$have_sin6_scope_id" = yes; then
 
829
    AC_MSG_RESULT([yes])
 
830
    AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member])
798
831
  else
799
 
    CURL_CHECK_NONBLOCKING_SOCKET
 
832
    AC_MSG_RESULT([no])
800
833
  fi
801
 
],
802
 
[
803
 
  CURL_CHECK_NONBLOCKING_SOCKET
804
 
])
 
834
fi
805
835
 
806
836
dnl **********************************************************************
807
837
dnl Check if the operating system allows programs to write to their own argv[]
1045
1075
        AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries])
1046
1076
        dnl check if we have a really old MIT kerberos (<= 1.2)
1047
1077
        AC_MSG_CHECKING([if gssapi headers declare GSS_C_NT_HOSTBASED_SERVICE])
1048
 
        AC_TRY_COMPILE([
 
1078
        AC_COMPILE_IFELSE([
 
1079
          AC_LANG_PROGRAM([[
1049
1080
#include <gssapi/gssapi.h>
1050
1081
#include <gssapi/gssapi_generic.h>
1051
1082
#include <gssapi/gssapi_krb5.h>
1052
 
          ],[
 
1083
          ]],[[
1053
1084
            gss_import_name(
1054
1085
                            (OM_uint32 *)0,
1055
1086
                            (gss_buffer_t)0,
1056
1087
                            GSS_C_NT_HOSTBASED_SERVICE,
1057
1088
                            (gss_name_t *)0);
1058
 
          ],[
1059
 
            AC_MSG_RESULT([yes])
1060
 
          ],[
1061
 
            AC_MSG_RESULT([no])
1062
 
            AC_DEFINE(HAVE_OLD_GSSMIT, 1, [if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE])
1063
 
          ]
1064
 
         )
1065
 
 
 
1089
          ]])
 
1090
        ],[
 
1091
          AC_MSG_RESULT([yes])
 
1092
        ],[
 
1093
          AC_MSG_RESULT([no])
 
1094
          AC_DEFINE(HAVE_OLD_GSSMIT, 1,
 
1095
            [if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE])
 
1096
        ])
1066
1097
      fi
1067
1098
    ]
1068
1099
  )
1140
1171
    PKGTEST="no"
1141
1172
    PREFIX_OPENSSL=$OPT_SSL
1142
1173
    LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
1143
 
    LDFLAGS="$LDFLAGS -L$LIB_OPENSSL"
1144
 
    CPPFLAGS="$CPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
 
1174
    if [ "$PREFIX_OPENSSL" != "/usr" ] ; then
 
1175
      LDFLAGS="$LDFLAGS -L$LIB_OPENSSL"
 
1176
      CPPFLAGS="$CPPFLAGS -I$PREFIX_OPENSSL/include"
 
1177
    fi
 
1178
    CPPFLAGS="$CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
1145
1179
    ;;
1146
1180
  esac
1147
1181
 
1148
1182
  if test "$PKGTEST" = "yes"; then
1149
1183
 
1150
 
    dnl Detect the pkg-config tool, as it may have extra info about the
1151
 
    dnl openssl installation we can use. I *believe* this is what we are
1152
 
    dnl expected to do on really recent Redhat Linux hosts.
 
1184
    CURL_CHECK_PKGCONFIG(openssl)
1153
1185
 
1154
 
    AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
1155
1186
    if test "$PKGCONFIG" != "no" ; then
1156
 
      AC_MSG_CHECKING([OpenSSL options with pkg-config])
1157
 
 
1158
 
      $PKGCONFIG --exists openssl
1159
 
      SSL_EXISTS=$?
1160
 
 
1161
 
      if test "$SSL_EXISTS" -eq "0"; then
1162
 
        SSL_LIBS=`$PKGCONFIG --libs-only-l openssl 2>/dev/null`
1163
 
        SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null`
1164
 
        SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null`
1165
 
 
1166
 
        LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
1167
 
 
1168
 
        dnl use the values pkg-config reported
1169
 
        LIBS="$LIBS $SSL_LIBS"
1170
 
        CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
1171
 
        LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
1172
 
        AC_MSG_RESULT([found])
1173
 
      else
1174
 
        AC_MSG_RESULT([no])
1175
 
      fi
 
1187
      SSL_LIBS=`$PKGCONFIG --libs-only-l openssl 2>/dev/null`
 
1188
      SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null`
 
1189
      SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null`
 
1190
 
 
1191
      LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
 
1192
 
 
1193
      dnl use the values pkg-config reported
 
1194
      LIBS="$LIBS $SSL_LIBS"
 
1195
      CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
 
1196
      LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
1176
1197
    fi
1177
1198
  fi
1178
1199
 
1179
1200
  dnl This is for Msys/Mingw
1180
1201
  case $host in
1181
 
    *-*-cygwin*)
1182
 
      dnl Under Cygwin this is extraneous and causes an unnecessary -lgdi32
1183
 
      dnl to be added to LIBS and recorded in the .la file.
1184
 
      ;;
1185
 
    *)
 
1202
    *-*-msys* | *-*-mingw*)
1186
1203
      AC_MSG_CHECKING([for gdi32])
1187
1204
      my_ac_save_LIBS=$LIBS
1188
1205
      LIBS="-lgdi32 $LIBS"
1517
1534
fi
1518
1535
 
1519
1536
dnl ----------------------------------------------------
1520
 
dnl FIX: only check for GnuTLS if OpenSSL is not enabled
 
1537
dnl check for GnuTLS
1521
1538
dnl ----------------------------------------------------
1522
1539
 
1523
1540
dnl Default to compiler & linker defaults for GnuTLS files & libraries.
1531
1548
if test "$OPENSSL_ENABLED" != "1"; then
1532
1549
 
1533
1550
  if test X"$OPT_GNUTLS" != Xno; then
 
1551
 
 
1552
    AC_MSG_NOTICE([OPT_GNUTLS is $OPT_GNUTLS])
 
1553
 
 
1554
    addld=""
1534
1555
    if test "x$OPT_GNUTLS" = "xyes"; then
1535
 
     check=`libgnutls-config --version 2>/dev/null`
1536
 
     if test -n "$check"; then
1537
 
       addlib=`libgnutls-config --libs`
1538
 
       addcflags=`libgnutls-config --cflags`
1539
 
       version=`libgnutls-config --version`
1540
 
       gtlsprefix=`libgnutls-config --prefix`
1541
 
     fi
 
1556
      check=`libgnutls-config --version 2>/dev/null`
 
1557
      if test -n "$check"; then
 
1558
        addlib=`libgnutls-config --libs`
 
1559
        addcflags=`libgnutls-config --cflags`
 
1560
        version=`libgnutls-config --version`
 
1561
        gtlslib=`libgnutls-config --prefix`/lib$libsuff
 
1562
      fi
1542
1563
    else
1543
1564
      addlib=`$OPT_GNUTLS/bin/libgnutls-config --libs`
1544
1565
      addcflags=`$OPT_GNUTLS/bin/libgnutls-config --cflags`
1545
1566
      version=`$OPT_GNUTLS/bin/libgnutls-config --version 2>/dev/null`
1546
 
      gtlsprefix=$OPT_GNUTLS
1547
 
      if test -z "$version"; then
1548
 
        version="unknown"
 
1567
      gtlslib=$OPT_GNUTLS/lib$libsuff
 
1568
    fi
 
1569
 
 
1570
    if test -z "$version"; then
 
1571
      CURL_CHECK_PKGCONFIG(gnutls)
 
1572
 
 
1573
      if test "$PKGCONFIG" != "no" ; then
 
1574
        addlib=`$PKGCONFIG --libs-only-l gnutls`
 
1575
        addld=`$PKGCONFIG --libs-only-L gnutls`
 
1576
        addcflags=`$PKGCONFIG --cflags-only-I gnutls`
 
1577
        version=`$PKGCONFIG --modversion gnutls`
 
1578
        gtlslib=`echo $addld | $SED -e 's/-L//'`
1549
1579
      fi
1550
 
    fi
 
1580
 
 
1581
    fi
 
1582
 
 
1583
    if test -z "$version"; then
 
1584
      dnl lots of efforts, still no go
 
1585
      version="unknown"
 
1586
    fi
 
1587
 
1551
1588
    if test -n "$addlib"; then
1552
1589
 
1553
1590
      CLEANLIBS="$LIBS"
1554
1591
      CLEANCPPFLAGS="$CPPFLAGS"
 
1592
      CLEADLDFLAGS="$LDFLAGS"
1555
1593
 
1556
1594
      LIBS="$LIBS $addlib"
 
1595
      LDFLAGS="$LDFLAGS $addld"
1557
1596
      if test "$addcflags" != "-I/usr/include"; then
1558
1597
         CPPFLAGS="$CPPFLAGS $addcflags"
1559
1598
      fi
1574
1613
      if test "x$USE_GNUTLS" = "xyes"; then
1575
1614
        AC_MSG_NOTICE([detected GnuTLS version $version])
1576
1615
 
1577
 
        dnl when shared libs were found in a path that the run-time
1578
 
        dnl linker doesn't search through, we need to add it to
1579
 
        dnl LD_LIBRARY_PATH to prevent further configure tests to fail
1580
 
        dnl due to this
 
1616
        if test -n "$gtlslib"; then
 
1617
          dnl when shared libs were found in a path that the run-time
 
1618
          dnl linker doesn't search through, we need to add it to
 
1619
          dnl LD_LIBRARY_PATH to prevent further configure tests to fail
 
1620
          dnl due to this
1581
1621
 
1582
 
        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlsprefix/lib$libsuff"
1583
 
        export LD_LIBRARY_PATH
1584
 
        AC_MSG_NOTICE([Added $gtlsprefix/lib$libsuff to LD_LIBRARY_PATH])
 
1622
          LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
 
1623
          export LD_LIBRARY_PATH
 
1624
          AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH])
 
1625
        fi
1585
1626
      fi
1586
1627
 
1587
1628
    fi
1606
1647
 
1607
1648
  if test X"$OPT_NSS" != Xno; then
1608
1649
    if test "x$OPT_NSS" = "xyes"; then
1609
 
     check=`pkg-config --version 2>/dev/null`
1610
 
     if test -n "$check"; then
1611
 
       addlib=`pkg-config --libs nss`
1612
 
       addcflags=`pkg-config --cflags nss`
1613
 
       version=`pkg-config --modversion nss`
1614
 
       nssprefix=`pkg-config --variable=prefix nss`
1615
 
     fi
 
1650
 
 
1651
      CURL_CHECK_PKGCONFIG(nss)
 
1652
 
 
1653
      if test "$PKGCONFIG" != "no" ; then
 
1654
        addlib=`$PKGCONFIG --libs nss`
 
1655
        addcflags=`$PKGCONFIG --cflags nss`
 
1656
        version=`$PKGCONFIG --modversion nss`
 
1657
        nssprefix=`$PKGCONFIG --variable=prefix nss`
 
1658
      fi
1616
1659
    else
1617
1660
      # Without pkg-config, we'll kludge in some defaults
1618
1661
      addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
1773
1816
  AC_DEFINE(DISABLED_THREADSAFE, 1,
1774
1817
    [Set to explicitly specify we don't want to use thread-safe functions])
1775
1818
else
1776
 
  if test "$ipv6" != "yes"; then
 
1819
  dnl if test "$ipv6" != "yes"; then
1777
1820
    dnl dig around for gethostbyname_r()
1778
 
    CURL_CHECK_GETHOSTBYNAME_R()
 
1821
    dnl the old gethostbyname_r check was done here
1779
1822
 
1780
1823
    dnl dig around for gethostbyaddr_r()
1781
 
    dnl CURL_CHECK_GETHOSTBYADDR_R()
1782
 
  fi
 
1824
    dnl the old gethostbyaddr_r check was here BUT COMMENTED OUT
 
1825
  dnl fi
1783
1826
 
1784
1827
  dnl poke around for inet_ntoa_r()
1785
 
  CURL_CHECK_INET_NTOA_R()
 
1828
  dnl the old inet_ntoa_r check was done here
1786
1829
 
1787
1830
  dnl is there a localtime_r()
1788
 
  CURL_CHECK_LOCALTIME_R()
 
1831
  dnl the old localtime_r check was done here
1789
1832
 
1790
1833
  dnl is there a strerror_r()
1791
 
  CURL_CHECK_STRERROR_R()
 
1834
  dnl the old strerror_r check was done here
1792
1835
 
1793
1836
  checkfor_gmtime_r="yes"
1794
1837
fi
1805
1848
 
1806
1849
  AC_DEFINE(_THREAD_SAFE, 1, [define this if you need it to compile thread-safe code])
1807
1850
 
1808
 
  dnl check if this is the IMB xlc compiler
1809
 
  dnl Details thanks to => http://predef.sourceforge.net/
1810
 
  AC_MSG_CHECKING([if this is the xlc compiler])
1811
 
  AC_EGREP_CPP([^__xlC__], [__xlC__],
1812
 
         dnl action if the text is found, this it has not been replaced by the
1813
 
         dnl cpp
1814
 
         XLC="no"
1815
 
         AC_MSG_RESULT([no]),
1816
 
         dnl the text was not found, it was replaced by the cpp
1817
 
         XLC="yes"
1818
 
         AC_MSG_RESULT([yes])
1819
 
         CFLAGS="$CFLAGS -qthreaded"
1820
 
         dnl AIX xlc has to have strict aliasing turned off. If not,
1821
 
         dnl the optimizer assumes that pointers can only point to
1822
 
         dnl an object of the same type.
1823
 
         CFLAGS="$CFLAGS -qnoansialias"
1824
 
         dnl Force AIX xlc to stop after the compilation phase, and not
1825
 
         dnl generate object code, when the source compiles with errors.
1826
 
         CFLAGS="$CFLAGS -qhalt=e"
1827
 
       )
1828
 
 
1829
 
 
1830
1851
  dnl is there a localtime_r()
1831
 
  CURL_CHECK_LOCALTIME_R()
 
1852
  dnl the old localtime_r check was done here
1832
1853
 
1833
1854
  dnl is there a strerror_r()
1834
 
  CURL_CHECK_STRERROR_R()
 
1855
  dnl the old strerror_r check was done here
1835
1856
 
1836
1857
  checkfor_gmtime_r="yes"
1837
1858
fi
1838
1859
 
1839
 
if test x$cross_compiling != xyes; then
1840
 
 
1841
 
  if test x$checkfor_gmtime_r = xyes; then
1842
 
 
1843
 
    dnl if gmtime_r was found, verify that it actually works, as (at least) HPUX
1844
 
    dnl 10.20 is known to have a buggy one. If it doesn't work, disable use of
1845
 
    dnl it.
1846
 
 
1847
 
    AC_MSG_CHECKING([if gmtime_r exists and works])
1848
 
    AC_RUN_IFELSE([[
1849
 
    #include <time.h>
1850
 
    int main(void)
1851
 
    {
1852
 
    time_t local = 1170352587;
1853
 
    struct tm *gmt;
1854
 
    struct tm keeper;
1855
 
    putenv("TZ=CST6CDT");
1856
 
    tzset();
1857
 
    gmt = gmtime_r(&local, &keeper);
1858
 
    if(gmt) {
1859
 
      return 0;
1860
 
    }
1861
 
    return 1; /* failure */
1862
 
    }
1863
 
     ]],
1864
 
     dnl success, do nothing
1865
 
     AC_MSG_RESULT(yes)
1866
 
     AC_DEFINE(HAVE_GMTIME_R, 1, [if you have (a working) gmtime_r])
1867
 
     ,
1868
 
     dnl failure, now disable the function
1869
 
     AC_MSG_RESULT(no)
1870
 
    ,
1871
 
    dnl not invoked when crosscompiling)
1872
 
     echo "hej"
1873
 
    )
1874
 
  fi
1875
 
else
1876
 
  dnl and for crosscompiling
1877
 
  AC_CHECK_FUNCS(gmtime_r)
1878
 
fi
1879
 
 
1880
1860
 
1881
1861
dnl **********************************************************************
1882
1862
dnl Back to "normal" configuring
1895
1875
        sys/select.h \
1896
1876
        sys/socket.h \
1897
1877
        sys/ioctl.h \
 
1878
        sys/uio.h \
1898
1879
        assert.h \
1899
1880
        unistd.h \
1900
1881
        stdlib.h \
1963
1944
CURL_CHECK_STRUCT_TIMEVAL
1964
1945
CURL_VERIFY_RUNTIMELIBS
1965
1946
 
1966
 
AC_CHECK_SIZEOF(curl_off_t, ,[
1967
 
#include <stdio.h>
1968
 
#include "$srcdir/include/curl/curl.h"
1969
 
])
1970
1947
AC_CHECK_SIZEOF(size_t)
 
1948
AC_CHECK_SIZEOF(int)
1971
1949
AC_CHECK_SIZEOF(long)
 
1950
CURL_CONFIGURE_LONG
1972
1951
AC_CHECK_SIZEOF(time_t)
1973
1952
AC_CHECK_SIZEOF(off_t)
1974
1953
 
 
1954
soname_bump=no
 
1955
if test x"$ac_cv_native_windows" != "xyes" &&
 
1956
   test $ac_cv_sizeof_off_t -ne $curl_sizeof_curl_off_t; then
 
1957
  AC_MSG_WARN([This libcurl built is probably not ABI compatible with previous])
 
1958
  AC_MSG_WARN([builds! You MUST read lib/README.curl_off_t to figure it out.])
 
1959
  soname_bump=yes
 
1960
fi
 
1961
 
 
1962
 
1975
1963
AC_CHECK_TYPE(long long,
1976
 
   [AC_DEFINE(HAVE_LONGLONG, 1, [if your compiler supports long long])]
 
1964
   [AC_DEFINE(HAVE_LONGLONG, 1,
 
1965
      [Define to 1 if the compiler supports the 'long long' data type.])]
1977
1966
   longlong="yes"
1978
1967
)
1979
1968
 
2018
2007
CURL_CHECK_FUNC_SELECT
2019
2008
 
2020
2009
CURL_CHECK_FUNC_RECV
2021
 
 
 
2010
CURL_CHECK_FUNC_RECVFROM
2022
2011
CURL_CHECK_FUNC_SEND
2023
 
 
2024
2012
CURL_CHECK_MSG_NOSIGNAL
2025
2013
 
 
2014
CURL_CHECK_FUNC_ALARM
 
2015
CURL_CHECK_FUNC_FCNTL
 
2016
CURL_CHECK_FUNC_FDOPEN
 
2017
CURL_CHECK_FUNC_FREEADDRINFO
 
2018
CURL_CHECK_FUNC_FREEIFADDRS
 
2019
CURL_CHECK_FUNC_FTRUNCATE
 
2020
CURL_CHECK_FUNC_GETADDRINFO
 
2021
CURL_CHECK_FUNC_GETHOSTBYADDR
 
2022
CURL_CHECK_FUNC_GETHOSTBYADDR_R
 
2023
CURL_CHECK_FUNC_GETHOSTBYNAME
 
2024
CURL_CHECK_FUNC_GETHOSTBYNAME_R
 
2025
CURL_CHECK_FUNC_GETHOSTNAME
 
2026
CURL_CHECK_FUNC_GETIFADDRS
 
2027
CURL_CHECK_FUNC_GETSERVBYPORT_R
 
2028
CURL_CHECK_FUNC_GMTIME_R
 
2029
CURL_CHECK_FUNC_INET_NTOA_R
 
2030
CURL_CHECK_FUNC_INET_NTOP
 
2031
CURL_CHECK_FUNC_INET_PTON
 
2032
CURL_CHECK_FUNC_IOCTL
 
2033
CURL_CHECK_FUNC_IOCTLSOCKET
 
2034
CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL
 
2035
CURL_CHECK_FUNC_LOCALTIME_R
 
2036
CURL_CHECK_FUNC_POLL
 
2037
CURL_CHECK_FUNC_SETSOCKOPT
 
2038
CURL_CHECK_FUNC_SIGACTION
 
2039
CURL_CHECK_FUNC_SIGINTERRUPT
 
2040
CURL_CHECK_FUNC_SIGNAL
 
2041
CURL_CHECK_FUNC_SIGSETJMP
 
2042
CURL_CHECK_FUNC_STRCASECMP
 
2043
CURL_CHECK_FUNC_STRCASESTR
 
2044
CURL_CHECK_FUNC_STRCMPI
 
2045
CURL_CHECK_FUNC_STRDUP
 
2046
CURL_CHECK_FUNC_STRERROR_R
 
2047
CURL_CHECK_FUNC_STRICMP
 
2048
CURL_CHECK_FUNC_STRLCAT
 
2049
CURL_CHECK_FUNC_STRNCASECMP
 
2050
CURL_CHECK_FUNC_STRNCMPI
 
2051
CURL_CHECK_FUNC_STRNICMP
 
2052
CURL_CHECK_FUNC_STRSTR
 
2053
CURL_CHECK_FUNC_STRTOK_R
 
2054
CURL_CHECK_FUNC_STRTOLL
 
2055
CURL_CHECK_FUNC_WRITEV
 
2056
 
2026
2057
dnl Checks for library functions.
2027
2058
dnl AC_PROG_GCC_TRADITIONAL
2028
2059
 
2034
2065
     AC_MSG_NOTICE([skip check for pipe on msdosdjgpp])
2035
2066
    ;;
2036
2067
esac
2037
 
AC_CHECK_FUNCS( strtoll \
2038
 
                socket \
2039
 
                strdup \
2040
 
                strstr \
2041
 
                strcasestr \
2042
 
                strtok_r \
2043
 
                uname \
2044
 
                strcasecmp \
2045
 
                stricmp \
2046
 
                strcmpi \
2047
 
                gethostbyaddr \
2048
 
                gettimeofday \
2049
 
                inet_addr \
2050
 
                inet_ntoa \
2051
 
                inet_pton \
2052
 
                perror \
2053
 
                closesocket \
2054
 
                siginterrupt \
2055
 
                sigaction \
2056
 
                signal \
2057
 
                getpass_r \
2058
 
                strlcat \
2059
 
                getpwuid \
2060
 
                geteuid \
2061
 
                getppid \
2062
 
                utime \
2063
 
                sigsetjmp \
2064
 
                basename \
2065
 
                setlocale \
2066
 
                ftruncate \
2067
 
                pipe \
2068
 
                poll \
2069
 
                getprotobyname \
2070
 
                getrlimit \
2071
 
                setrlimit \
2072
 
                fork \
2073
 
                setmode,
2074
 
dnl if found
2075
 
[],
2076
 
dnl if not found, $ac_func is the name we check for
2077
 
func="$ac_func"
2078
 
eval skipcheck=\$skipcheck_$func
2079
 
if test "x$skipcheck" != "xyes"; then
2080
 
  AC_MSG_CHECKING([deeper for $func])
2081
 
  AC_TRY_LINK( [],
2082
 
               [ $func ();],
2083
 
               AC_MSG_RESULT(yes!)
2084
 
               eval "ac_cv_func_$func=yes"
2085
 
               def=`echo "HAVE_$func" | tr 'a-z' 'A-Z'`
2086
 
               AC_DEFINE_UNQUOTED($def, 1, [If you have $func]),
2087
 
               AC_MSG_RESULT(but still no)
2088
 
               )
2089
 
fi
2090
 
)
2091
 
 
2092
 
dnl sigsetjmp() might be a macro and no function so if it isn't found already
2093
 
dnl we make an extra check here!
2094
 
if test "$ac_cv_func_sigsetjmp" != "yes"; then
2095
 
  AC_MSG_CHECKING([for sigsetjmp defined as macro])
2096
 
  AC_LINK_IFELSE([
2097
 
    AC_LANG_PROGRAM([[
2098
 
#include <setjmp.h>
2099
 
    ]],[[
2100
 
      sigjmp_buf jmpenv;
2101
 
      sigsetjmp(jmpenv, 1);
2102
 
    ]])
2103
 
  ],[
2104
 
    AC_MSG_RESULT([yes])
2105
 
    AC_DEFINE(HAVE_SIGSETJMP, 1, [If you have sigsetjmp])
2106
 
  ],[
2107
 
    AC_MSG_RESULT([no])
2108
 
  ])
2109
 
fi
 
2068
 
 
2069
AC_CHECK_FUNCS([basename \
 
2070
  closesocket \
 
2071
  fork \
 
2072
  geteuid \
 
2073
  getpass_r \
 
2074
  getppid \
 
2075
  getprotobyname \
 
2076
  getpwuid \
 
2077
  getrlimit \
 
2078
  gettimeofday \
 
2079
  inet_addr \
 
2080
  perror \
 
2081
  pipe \
 
2082
  setlocale \
 
2083
  setmode \
 
2084
  setrlimit \
 
2085
  socket \
 
2086
  uname \
 
2087
  utime
 
2088
],[
 
2089
],[
 
2090
  func="$ac_func"
 
2091
  eval skipcheck=\$skipcheck_$func
 
2092
  if test "x$skipcheck" != "xyes"; then
 
2093
    AC_MSG_CHECKING([deeper for $func])
 
2094
    AC_LINK_IFELSE([
 
2095
      AC_LANG_PROGRAM([[
 
2096
      ]],[[
 
2097
        $func ();
 
2098
      ]])
 
2099
    ],[
 
2100
      AC_MSG_RESULT([yes])
 
2101
      eval "ac_cv_func_$func=yes"
 
2102
      AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$func])], [1],
 
2103
        [Define to 1 if you have the $func function.])
 
2104
    ],[
 
2105
      AC_MSG_RESULT([but still no])
 
2106
    ])
 
2107
  fi
 
2108
])
 
2109
 
2110
2110
 
2111
2111
AC_CHECK_DECL(basename, ,
2112
2112
              AC_DEFINE(NEED_BASENAME_PROTO, 1, [If you lack a fine basename() prototype]),
2121
2121
#endif
2122
2122
)
2123
2123
 
2124
 
AC_CHECK_DECL(inet_pton, ,
2125
 
              AC_DEFINE(HAVE_NO_INET_PTON_PROTO, 1,
2126
 
                        [Defined if no inet_pton() prototype available]),
2127
 
[
2128
 
#ifdef HAVE_ARPA_INET_H
2129
 
#include <arpa/inet.h>
2130
 
#endif
2131
 
]
2132
 
)
2133
2124
 
2134
2125
dnl Check if the getnameinfo function is available
2135
2126
dnl and get the types of five of its arguments.
2136
2127
CURL_CHECK_FUNC_GETNAMEINFO
2137
2128
 
2138
2129
if test "$ipv6" = "yes"; then
2139
 
  CURL_CHECK_WORKING_GETADDRINFO
 
2130
  if test "$ac_cv_func_getaddrinfo" = "yes"; then
 
2131
    AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
 
2132
    IPV6_ENABLED=1
 
2133
    AC_SUBST(IPV6_ENABLED)
 
2134
  fi
2140
2135
  CURL_CHECK_NI_WITHSCOPEID
2141
2136
fi
2142
2137
 
2143
 
AC_MSG_CHECKING([if we are Mac OS X (to disable poll)])
2144
 
disable_poll=no
2145
 
case $host in
2146
 
  *-*-darwin*)
2147
 
    disable_poll="yes";
2148
 
    ;;
2149
 
  *)
2150
 
    ;;
2151
 
esac
2152
 
AC_MSG_RESULT($disable_poll)
2153
 
 
2154
 
if test "$disable_poll" = "no"; then
2155
 
 
2156
 
  dnl poll() might be badly emulated, as in Mac OS X 10.3 (and other BSDs?) and
2157
 
  dnl to find out we make an extra check here!
2158
 
  if test "$ac_cv_func_poll" = "yes"; then
2159
 
    AC_MSG_CHECKING([if poll works with NULL inputs])
2160
 
    AC_RUN_IFELSE([
2161
 
#ifdef HAVE_SYS_POLL_H
2162
 
#include <sys/poll.h>
2163
 
#elif defined(HAVE_POLL_H)
2164
 
#include <poll.h>
2165
 
#endif
2166
 
 
2167
 
  int main(void)
2168
 
  {
2169
 
    /* make this return 0 == timeout since there's nothing to read from */
2170
 
    return poll((void *)0, 0, 10 /*ms*/);
2171
 
  }
2172
 
],
2173
 
    AC_MSG_RESULT(yes)
2174
 
    AC_DEFINE(HAVE_POLL_FINE, 1, [If you have a fine poll]),
2175
 
    AC_MSG_RESULT(no),
2176
 
    AC_MSG_RESULT(cross-compiling assumes yes)
2177
 
    AC_DEFINE(HAVE_POLL_FINE, 1, [If you have a fine poll])
2178
 
    ) dnl end of AC_RUN_IFELSE
2179
 
  fi dnl poll() was found
2180
 
fi dnl poll()-check is not disabled
2181
 
 
 
2138
dnl ************************************************************
 
2139
dnl enable non-blocking communications
 
2140
dnl
 
2141
CURL_CHECK_OPTION_NONBLOCKING
 
2142
CURL_CHECK_NONBLOCKING_SOCKET
 
2143
 
 
2144
dnl ************************************************************
 
2145
dnl nroff tool stuff
 
2146
dnl
2182
2147
 
2183
2148
AC_PATH_PROG( PERL, perl, ,
2184
2149
  $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
2351
2316
)
2352
2317
 
2353
2318
dnl ************************************************************
2354
 
dnl lame option to switch on debug options
2355
 
dnl
2356
 
AC_MSG_CHECKING([whether to enable debug options])
2357
 
AC_ARG_ENABLE(debug,
2358
 
AC_HELP_STRING([--enable-debug],[Enable pedantic debug options])
2359
 
AC_HELP_STRING([--disable-debug],[Disable debug options]),
2360
 
[ case "$enableval" in
2361
 
  no)
2362
 
       AC_MSG_RESULT(no)
2363
 
       ;;
2364
 
  *)   AC_MSG_RESULT(yes)
2365
 
 
2366
 
    CPPFLAGS="$CPPFLAGS -DCURLDEBUG"
2367
 
    CFLAGS="$CFLAGS -g"
2368
 
 
2369
 
    dnl set compiler "debug" options to become more picky, and remove
2370
 
    dnl optimize options from CFLAGS
2371
 
    CURL_CC_DEBUG_OPTS
2372
 
       ;;
2373
 
  esac
2374
 
 ],
2375
 
       AC_MSG_RESULT(no)
2376
 
)
2377
 
 
2378
 
dnl ************************************************************
2379
2319
dnl disable cryptographic authentication
2380
2320
dnl
2381
2321
AC_MSG_CHECKING([whether to enable cryptographic authentication methods])
2453
2393
)
2454
2394
 
2455
2395
dnl ************************************************************
 
2396
dnl enforce SONAME bump
 
2397
dnl 
 
2398
 
 
2399
AC_MSG_CHECKING([whether to enforce SONAME bump])
 
2400
AC_ARG_ENABLE(soname-bump,
 
2401
AC_HELP_STRING([--enable-soname-bump],[Enable enforced SONAME bump])
 
2402
AC_HELP_STRING([--disable-soname-bump],[Disable enforced SONAME bump]),
 
2403
[ case "$enableval" in
 
2404
  yes)   AC_MSG_RESULT(yes)
 
2405
         soname_bump=yes
 
2406
         ;;
 
2407
  *)
 
2408
         AC_MSG_RESULT(no)
 
2409
         ;;
 
2410
  esac ],
 
2411
        AC_MSG_RESULT($soname_bump)
 
2412
)
 
2413
AM_CONDITIONAL(SONAME_BUMP, test x$soname_bump = xyes)
 
2414
 
 
2415
 
 
2416
dnl ************************************************************
2456
2417
if test ! -z "$winsock_LIB"; then
2457
2418
 
2458
2419
  dnl If ws2_32 is wanted, make sure it is the _last_ lib in LIBS (makes
2480
2441
 
2481
2442
AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
2482
2443
 
 
2444
dnl
 
2445
dnl For keeping supported features and protocols also in pkg-config file
 
2446
dnl since it is more cross-compile frient than curl-config
 
2447
dnl
 
2448
 
 
2449
if test "x$USE_SSLEAY" = "x1"; then
 
2450
  SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
 
2451
elif test -n "$SSL_ENABLED"; then
 
2452
  SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
 
2453
fi
 
2454
if test "@KRB4_ENABLED@" = "x1"; then
 
2455
  SUPPORT_FEATURES="$SUPPORT_FEATURES KRB4"
 
2456
fi
 
2457
if test "x$IPV6_ENABLED" = "x1"; then
 
2458
  SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6"
 
2459
fi
 
2460
if test "x$HAVE_LIBZ" = "x1"; then
 
2461
  SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
 
2462
fi
 
2463
if test "x$HAVE_ARES" = "x1"; then
 
2464
  SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
 
2465
fi
 
2466
if test "x$IDN_ENABLED" = "x1"; then
 
2467
  SUPPORT_FEATURES="$SUPPORT_FEATURES IDN"
 
2468
fi
 
2469
if test "x$USE_WINDOWS_SSPI" = "x1"; then
 
2470
  SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
 
2471
fi
 
2472
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" -o "x$GNUTLS_ENABLED" = "x1"; then
 
2473
  SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
 
2474
fi
 
2475
 
 
2476
AC_SUBST(SUPPORT_FEATURES)
 
2477
 
 
2478
dnl For supported protocols in pkg-config file
 
2479
if test "x$CURL_DISABLE_HTTP" != "x1"; then
 
2480
  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP"
 
2481
  if test "x$SSL_ENABLED" = "x1"; then
 
2482
    SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS"
 
2483
  fi
 
2484
fi
 
2485
if test "x$CURL_DISABLE_FTP" != "x1"; then
 
2486
  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP"
 
2487
  if test "x$SSL_ENABLED" = "x1"; then
 
2488
    SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS"
 
2489
  fi
 
2490
fi
 
2491
if test "x$CURL_DISABLE_FILE" != "x1"; then
 
2492
  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE"
 
2493
fi
 
2494
if test "x$CURL_DISABLE_TELNET" != "x1"; then
 
2495
  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET"
 
2496
fi
 
2497
if test "x$CURL_DISABLE_LDAP" != "x1"; then
 
2498
  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP"
 
2499
fi
 
2500
if test "x$CURL_DISABLE_LDAPS" != "x1"; then
 
2501
  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS"
 
2502
fi
 
2503
if test "x$CURL_DISABLE_DICT" != "x1"; then
 
2504
  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT"
 
2505
fi
 
2506
if test "x$CURL_DISABLE_TFTP" != "x1"; then
 
2507
  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP"
 
2508
fi
 
2509
if test "x$USE_LIBSSH2" = "x1"; then
 
2510
  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
 
2511
  SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
 
2512
fi
 
2513
 
 
2514
AC_SUBST(SUPPORT_PROTOCOLS)
 
2515
 
 
2516
dnl squeeze whitespace out of some variables
 
2517
 
 
2518
squeeze CFLAGS
 
2519
squeeze CPPFLAGS
 
2520
squeeze DEFS
 
2521
squeeze LDFLAGS
 
2522
squeeze LIBS
 
2523
 
 
2524
squeeze CURL_LIBS
 
2525
squeeze LIBCURL_LIBS
 
2526
squeeze TEST_SERVER_LIBS
 
2527
 
2483
2528
AC_CONFIG_FILES([Makefile \
2484
2529
           docs/Makefile \
2485
2530
           docs/examples/Makefile \
2534
2579
  ca cert bundle:  ${ca}
2535
2580
  ca cert path:    ${capath}
2536
2581
  LDAP support:    ${curl_ldap_msg}
2537
 
  LDAPS support:   ${curl_ldaps_msg}
 
2582
  LDAPS support:   ${curl_ldaps_msg} 
2538
2583
])
 
2584
 
 
2585
if test "x$soname_bump" = "xyes"; then
 
2586
 
 
2587
cat <<EOM
 
2588
  SONAME bump:     yes - WARNING: this library will be built with the SONAME
 
2589
                   number bumped due to (a detected) ABI breakage.
 
2590
                   See lib/README.curl_off_t for details on this.
 
2591
EOM
 
2592
 
 
2593
fi
 
2594