~ubuntu-branches/ubuntu/intrepid/curl/intrepid-security

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-06-18 15:21:57 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20080618152157-qq94aiequcq35w6b
Tags: 7.18.2-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Drop the stunnel build dependency.
  - Drop the build-dependency on libdb4.5-dev
  - Add build-dependency on openssh-server
  - Drop libssh2-1-dev from libcurl4-openssl-dev's Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.273 2008-01-28 11:48:41 bagder Exp $
 
21
# $Id: configure.ac,v 1.300 2008-05-26 15:09:28 bagder Exp $
22
22
###########################################################################
23
23
dnl Process this file with autoconf to produce a configure script.
24
24
 
25
25
AC_PREREQ(2.57)
26
26
 
27
27
dnl We don't know the version number "statically" so we use a dash here
28
 
AC_INIT(curl, [-], [a suitable curl mailing list => http://curl.haxx.se/mail/])
 
28
AC_INIT([curl], [-], [a suitable curl mailing list => http://curl.haxx.se/mail/])
29
29
 
30
30
dnl configure script copyright
31
31
AC_COPYRIGHT([Copyright (c) 1998 - 2008 Daniel Stenberg, <daniel@haxx.se>
151
151
 
152
152
AC_MSG_CHECKING([if we need -no-undefined])
153
153
case $host in
154
 
  *-*-cygwin | *-*-mingw* | *-*-pw32*)
 
154
  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
155
155
    need_no_undefined=yes
156
156
    ;;
157
157
  *)
220
220
dnl **********************************************************************
221
221
 
222
222
CURL_CHECK_HEADER_WINDOWS
223
 
CURL_CHECK_HEADER_WINSOCK
224
 
CURL_CHECK_HEADER_WINSOCK2
225
 
CURL_CHECK_HEADER_WS2TCPIP
226
 
 
227
 
CURL_CHECK_HEADER_WINLDAP
228
 
CURL_CHECK_HEADER_WINBER
 
223
CURL_CHECK_NATIVE_WINDOWS
 
224
case X-"$ac_cv_native_windows" in
 
225
  X-yes)
 
226
    CURL_CHECK_HEADER_WINSOCK
 
227
    CURL_CHECK_HEADER_WINSOCK2
 
228
    CURL_CHECK_HEADER_WS2TCPIP
 
229
    CURL_CHECK_HEADER_WINLDAP
 
230
    CURL_CHECK_HEADER_WINBER
 
231
    ;;
 
232
  *)
 
233
    ac_cv_header_winsock_h="no"
 
234
    ac_cv_header_winsock2_h="no"
 
235
    ac_cv_header_ws2tcpip_h="no"
 
236
    ac_cv_header_winldap_h="no"
 
237
    ac_cv_header_winber_h="no"
 
238
    ;;
 
239
esac
229
240
 
230
241
dnl **********************************************************************
231
242
dnl platform/compiler/architecture specific checks/flags
478
489
  AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs])
479
490
  my_ac_save_LIBS=$LIBS
480
491
  LIBS="-lnsl -lsocket $LIBS"
481
 
  AC_TRY_LINK( ,
482
 
             [gethostbyname();],
483
 
             [ dnl found it!
484
 
             HAVE_GETHOSTBYNAME="1"
485
 
             AC_MSG_RESULT([yes])],
486
 
             [ dnl failed!
487
 
             AC_MSG_RESULT([no])
488
 
             dnl restore LIBS
489
 
             LIBS=$my_ac_save_LIBS]
490
 
             )
 
492
  AC_LINK_IFELSE([
 
493
    AC_LANG_PROGRAM([[
 
494
    ]],[[
 
495
      gethostbyname();
 
496
    ]])
 
497
  ],[
 
498
    AC_MSG_RESULT([yes])
 
499
    HAVE_GETHOSTBYNAME="1"
 
500
  ],[
 
501
    AC_MSG_RESULT([no])
 
502
    LIBS=$my_ac_save_LIBS
 
503
  ])
491
504
fi
492
505
 
493
506
if test "$HAVE_GETHOSTBYNAME" != "1"
494
507
then
495
 
  dnl This is for Msys/Mingw
496
 
  AC_MSG_CHECKING([for gethostbyname in ws2_32])
497
 
  my_ac_save_LIBS=$LIBS
498
 
  LIBS="-lws2_32 $LIBS"
499
 
  AC_TRY_LINK([#include <winsock2.h>],
500
 
               [gethostbyname("www.dummysite.com");],
501
 
               [ dnl worked!
502
 
               ws2="yes"
503
 
               AC_MSG_RESULT([yes])
504
 
               HAVE_GETHOSTBYNAME="1"],
505
 
               [ dnl failed, restore LIBS
506
 
               LIBS=$my_ac_save_LIBS
507
 
               AC_MSG_RESULT(no)]
508
 
             )
 
508
  dnl This is for winsock systems
 
509
  if test "$ac_cv_header_windows_h" = "yes"; then
 
510
    if test "$ac_cv_header_winsock_h" = "yes"; then
 
511
      case $host in
 
512
        *-*-mingw32ce*)
 
513
          winsock_LIB="-lwinsock"
 
514
          ;;
 
515
        *)
 
516
          winsock_LIB="-lwsock32"
 
517
          ;;
 
518
      esac
 
519
    fi
 
520
    if test "$ac_cv_header_winsock2_h" = "yes"; then
 
521
      winsock_LIB="-lws2_32"
 
522
    fi
 
523
    if test ! -z "$winsock_LIB"; then
 
524
      my_ac_save_LIBS=$LIBS
 
525
      LIBS="$winsock_LIB $LIBS"
 
526
      AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
 
527
      AC_LINK_IFELSE([
 
528
        AC_LANG_PROGRAM([[
 
529
#ifdef HAVE_WINDOWS_H
 
530
#ifndef WIN32_LEAN_AND_MEAN
 
531
#define WIN32_LEAN_AND_MEAN
 
532
#endif
 
533
#include <windows.h>
 
534
#ifdef HAVE_WINSOCK2_H
 
535
#include <winsock2.h>
 
536
#else
 
537
#ifdef HAVE_WINSOCK_H
 
538
#include <winsock.h>
 
539
#endif
 
540
#endif
 
541
#endif
 
542
        ]],[[
 
543
          gethostbyname("www.dummysite.com");
 
544
        ]])
 
545
      ],[
 
546
        AC_MSG_RESULT([yes])
 
547
        HAVE_GETHOSTBYNAME="1"
 
548
      ],[
 
549
        AC_MSG_RESULT([no])
 
550
        winsock_LIB=""
 
551
        LIBS=$my_ac_save_LIBS
 
552
      ])
 
553
    fi
 
554
  fi
509
555
fi
510
556
 
511
557
if test "$HAVE_GETHOSTBYNAME" != "1"
512
558
then
513
559
  dnl This is for Minix 3.1
514
560
  AC_MSG_CHECKING([for gethostbyname for Minix 3])
515
 
  AC_TRY_LINK([
 
561
  AC_LINK_IFELSE([
 
562
    AC_LANG_PROGRAM([[
516
563
/* Older Minix versions may need <net/gen/netdb.h> here instead */
517
 
#include <netdb.h>],
518
 
               [gethostbyname("www.dummysite.com");],
519
 
               [ dnl worked!
520
 
               AC_MSG_RESULT([yes])
521
 
               HAVE_GETHOSTBYNAME="1"],
522
 
               AC_MSG_RESULT(no)
523
 
             )
 
564
#include <netdb.h>
 
565
    ]],[[
 
566
      gethostbyname("www.dummysite.com");
 
567
    ]])
 
568
  ],[
 
569
    AC_MSG_RESULT([yes])
 
570
    HAVE_GETHOSTBYNAME="1"
 
571
  ],[
 
572
    AC_MSG_RESULT([no])
 
573
  ])
524
574
fi
525
575
 
526
576
if test "$HAVE_GETHOSTBYNAME" != "1"
527
577
then
528
578
  dnl This is for eCos with a stubbed DNS implementation
529
579
  AC_MSG_CHECKING([for gethostbyname for eCos])
530
 
  AC_TRY_LINK([
 
580
  AC_LINK_IFELSE([
 
581
    AC_LANG_PROGRAM([[
531
582
#include <stdio.h>
532
 
#include <netdb.h>],
533
 
               [gethostbyname("www.dummysite.com");],
534
 
               [ dnl worked!
535
 
               AC_MSG_RESULT([yes])
536
 
               HAVE_GETHOSTBYNAME="1"],
537
 
               AC_MSG_RESULT(no)
538
 
             )
 
583
#include <netdb.h>
 
584
    ]],[[
 
585
      gethostbyname("www.dummysite.com");
 
586
    ]])
 
587
  ],[
 
588
    AC_MSG_RESULT([yes])
 
589
    HAVE_GETHOSTBYNAME="1"
 
590
  ],[
 
591
    AC_MSG_RESULT([no])
 
592
  ])
 
593
fi
 
594
 
 
595
if test "$HAVE_GETHOSTBYNAME" != "1"
 
596
then
 
597
  dnl gethostbyname in the network lib - for Haiku OS
 
598
  AC_CHECK_LIB(network, gethostbyname,
 
599
               [HAVE_GETHOSTBYNAME="1"
 
600
               LIBS="$LIBS -lnetwork"
 
601
               ])
539
602
fi
540
603
 
541
604
if test "$HAVE_GETHOSTBYNAME" != "1"
568
631
AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ])
569
632
 
570
633
dnl **********************************************************************
 
634
dnl In case that function clock_gettime with monotonic timer is available,
 
635
dnl check for additional required libraries.
 
636
dnl **********************************************************************
 
637
CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
 
638
 
 
639
dnl **********************************************************************
571
640
dnl The preceding library checks are all potentially useful for test
572
641
dnl servers (for providing networking support).  Save the list of required
573
642
dnl libraries at this point for use while linking those test servers.
625
694
      AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled])
626
695
      AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
627
696
      AC_SUBST(CURL_DISABLE_LDAP, [1])])
 
697
      AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
 
698
      AC_SUBST(CURL_DISABLE_LDAPS, [1])
628
699
  else
629
700
    dnl Try to find the right ldap libraries for this system
630
701
    CURL_CHECK_LIBS_LDAP
633
704
        AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled])
634
705
        AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
635
706
        AC_SUBST(CURL_DISABLE_LDAP, [1])
 
707
        AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
 
708
        AC_SUBST(CURL_DISABLE_LDAPS, [1])
636
709
        ;;
637
710
    esac
638
711
  fi
648
721
        AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled])
649
722
        AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
650
723
        AC_SUBST(CURL_DISABLE_LDAP, [1])])
 
724
        AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
 
725
        AC_SUBST(CURL_DISABLE_LDAPS, [1])
651
726
    fi
652
727
  fi
653
728
fi
669
744
fi
670
745
 
671
746
dnl **********************************************************************
672
 
dnl Check for the presence of the winmm library.
673
 
dnl **********************************************************************
674
 
 
675
 
case $host in
676
 
  *-*-cygwin*)
677
 
    dnl Under Cygwin, winmm exists but is not needed as WIN32 is not #defined
678
 
    dnl and gettimeofday() will be used regardless of the outcome of this test.
679
 
    dnl Skip this test, otherwise -lwinmm will be needlessly added to LIBS
680
 
    dnl (and recorded as such in the .la file, potentially affecting downstream
681
 
    dnl clients of the library.)
682
 
    ;;
683
 
  *)
684
 
    AC_MSG_CHECKING([for timeGetTime in winmm])
685
 
    my_ac_save_LIBS=$LIBS
686
 
    LIBS="-lwinmm $LIBS"
687
 
    AC_TRY_LINK([#include <windef.h>
688
 
                 #include <mmsystem.h>
689
 
                 ],
690
 
                 [timeGetTime();],
691
 
                 [ dnl worked!
692
 
                 AC_MSG_RESULT([yes])
693
 
                 ],
694
 
                 [ dnl failed, restore LIBS
695
 
                 LIBS=$my_ac_save_LIBS
696
 
                 AC_MSG_RESULT(no)]
697
 
               )
698
 
    ;;
699
 
esac
700
 
 
701
 
dnl **********************************************************************
702
747
dnl Checks for IPv6
703
748
dnl **********************************************************************
704
749
 
977
1022
      gnu_gss=yes
978
1023
    ],
979
1024
    [
980
 
      dnl not found, check Heimdal
981
 
      AC_CHECK_HEADER(gssapi.h,
982
 
        [
983
 
          dnl found in the given dirs
984
 
          AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries])
985
 
        ],
986
 
        [
987
 
          dnl not found, check in gssapi/ subdir
988
 
          AC_CHECK_HEADER(gssapi/gssapi.h,
 
1025
      dnl not found, check Heimdal or MIT
 
1026
      AC_CHECK_HEADERS(
 
1027
        [gssapi/gssapi.h gssapi/gssapi_generic.h gssapi/gssapi_krb5.h],
 
1028
        [],
 
1029
        [not_mit=1])
 
1030
      if test "x$not_mit" = "x1"; then
 
1031
        dnl MIT not found, check for Heimdal
 
1032
        AC_CHECK_HEADER(gssapi.h,
989
1033
            [
990
1034
              dnl found
991
 
              AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries])
 
1035
              AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries])
992
1036
            ],
993
1037
            [
994
1038
              dnl no header found, disabling GSS
996
1040
              AC_MSG_WARN(disabling GSSAPI since no header files was found)
997
1041
            ]
998
1042
          )
999
 
        ]
1000
 
      )
 
1043
      else
 
1044
        dnl MIT found
 
1045
        AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries])
 
1046
        dnl check if we have a really old MIT kerberos (<= 1.2)
 
1047
        AC_MSG_CHECKING([if gssapi headers declare GSS_C_NT_HOSTBASED_SERVICE])
 
1048
        AC_TRY_COMPILE([
 
1049
#include <gssapi/gssapi.h>
 
1050
#include <gssapi/gssapi_generic.h>
 
1051
#include <gssapi/gssapi_krb5.h>
 
1052
          ],[
 
1053
            gss_import_name(
 
1054
                            (OM_uint32 *)0,
 
1055
                            (gss_buffer_t)0,
 
1056
                            GSS_C_NT_HOSTBASED_SERVICE,
 
1057
                            (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
 
 
1066
      fi
1001
1067
    ]
1002
1068
  )
1003
1069
else
1010
1076
 
1011
1077
  if test -n "$gnu_gss"; then
1012
1078
    curl_gss_msg="enabled (GNU GSS)"
1013
 
    LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR -lgss"
 
1079
    LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
 
1080
    LIBS="$LIBS -lgss"
1014
1081
  elif test -z "$GSSAPI_LIB_DIR"; then
1015
1082
     if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
1016
 
        gss_ldflags=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
1017
 
        LDFLAGS="$LDFLAGS $gss_ldflags"
 
1083
        dnl krb5-config doesn't have --libs-only-L or similar, put everything
 
1084
        dnl into LIBS
 
1085
        gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
 
1086
        LIBS="$LIBS $gss_libs"
1018
1087
     elif test "$GSSAPI_ROOT" != "yes"; then
1019
 
        LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff -lgssapi"
 
1088
        LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
 
1089
        LIBS="$LIBS -lgssapi"
1020
1090
     else
1021
 
        LDFLAGS="$LDFLAGS -lgssapi"
 
1091
        LIBS="$LIBS -lgssapi"
1022
1092
     fi
1023
1093
  else
1024
 
     LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR -lgssapi"
 
1094
     LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
 
1095
     LIBS="$LIBS -lgssapi"
1025
1096
  fi
1026
1097
else
1027
1098
  CPPFLAGS="$save_CPPFLAGS"
1230
1301
    dnl and acting like OpenSSL.
1231
1302
 
1232
1303
    AC_MSG_CHECKING([for yaSSL using OpenSSL compatibility mode])
1233
 
    AC_TRY_COMPILE([
 
1304
    AC_COMPILE_IFELSE([
 
1305
      AC_LANG_PROGRAM([[
1234
1306
#include <openssl/ssl.h>
1235
 
      ],[
 
1307
      ]],[[
1236
1308
#if defined(YASSL_VERSION) && defined(OPENSSL_VERSION_NUMBER)
1237
1309
        int dummy = SSL_ERROR_NONE;
1238
1310
#else
1239
1311
        Not the yaSSL OpenSSL compatibility header.
1240
1312
#endif
1241
 
      ],[
1242
 
        AC_MSG_RESULT([yes])
1243
 
        AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1,
1244
 
          [Define to 1 if using yaSSL in OpenSSL compatibility mode.])
1245
 
        curl_ssl_msg="enabled (OpenSSL emulation by yaSSL)"
1246
 
      ],[
1247
 
        AC_MSG_RESULT([no])
 
1313
      ]])
 
1314
    ],[
 
1315
      AC_MSG_RESULT([yes])
 
1316
      AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1,
 
1317
        [Define to 1 if using yaSSL in OpenSSL compatibility mode.])
 
1318
      curl_ssl_msg="enabled (OpenSSL emulation by yaSSL)"
 
1319
    ],[
 
1320
      AC_MSG_RESULT([no])
1248
1321
    ])
1249
1322
  fi
1250
1323
 
1369
1442
  yes)
1370
1443
    dnl --with-libssh2 (without path) used
1371
1444
    PREFIX_LIBSSH2=/usr/local/lib
1372
 
    LIB_LIBSSH2="$PREFIX_LIBSSH2/lib$libsuff"
 
1445
    LIB_LIBSSH2="$PREFIX_LIBSSH2$libsuff"
1373
1446
    ;;
1374
1447
  off)
1375
1448
    dnl no --with-libssh2 option given, just check default places
1610
1683
dnl Check for the CA bundle
1611
1684
dnl **********************************************************************
1612
1685
 
1613
 
if test X"$SSL_ENABLED" != "X"; then
1614
 
 
1615
 
  AC_MSG_CHECKING([CA cert bundle install path])
1616
 
 
1617
 
  AC_ARG_WITH(ca-bundle,
1618
 
AC_HELP_STRING([--with-ca-bundle=FILE], [File name to install the CA bundle as])
1619
 
AC_HELP_STRING([--without-ca-bundle], [Don't install the CA bundle]),
1620
 
    [ ca="$withval" ],
1621
 
    [
1622
 
      if test "x$prefix" != xNONE; then
1623
 
        ca="\${prefix}/share/curl/curl-ca-bundle.crt"
1624
 
      else
1625
 
        ca="$ac_default_prefix/share/curl/curl-ca-bundle.crt"
1626
 
      fi
1627
 
    ] )
1628
 
 
1629
 
    if test "x$ca" != "xno"; then
1630
 
      CURL_CA_BUNDLE='"'$ca'"'
1631
 
      AC_SUBST(CURL_CA_BUNDLE)
1632
 
    fi
1633
 
    AC_MSG_RESULT([$ca])
1634
 
fi dnl only done if some kind of SSL was enabled
1635
 
 
1636
 
AM_CONDITIONAL(CABUNDLE, test x$ca != xno)
 
1686
CURL_CHECK_CA_BUNDLE
1637
1687
 
1638
1688
dnl **********************************************************************
1639
1689
dnl Check for the presence of IDN libraries and headers
1771
1821
         dnl the optimizer assumes that pointers can only point to
1772
1822
         dnl an object of the same type.
1773
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"
1774
1827
       )
1775
1828
 
1776
1829
 
1849
1902
        arpa/inet.h \
1850
1903
        net/if.h \
1851
1904
        netinet/in.h \
 
1905
        sys/un.h \
1852
1906
        netinet/tcp.h \
1853
1907
        netdb.h \
1854
1908
        sys/sockio.h \
1895
1949
#ifdef HAVE_NETINET_IN_H
1896
1950
#include <netinet/in.h>
1897
1951
#endif
 
1952
#ifdef HAVE_SYS_UN_H
 
1953
#include <sys/un.h>
 
1954
#endif
1898
1955
]
1899
1956
)
1900
1957
 
1958
2015
 
1959
2016
AC_TYPE_SIGNAL
1960
2017
 
1961
 
AC_FUNC_SELECT_ARGTYPES
 
2018
CURL_CHECK_FUNC_SELECT
1962
2019
 
1963
2020
CURL_CHECK_FUNC_RECV
1964
2021
 
1979
2036
esac
1980
2037
AC_CHECK_FUNCS( strtoll \
1981
2038
                socket \
1982
 
                select \
1983
2039
                strdup \
1984
2040
                strstr \
1985
2041
                strcasestr \
2002
2058
                strlcat \
2003
2059
                getpwuid \
2004
2060
                geteuid \
 
2061
                getppid \
2005
2062
                utime \
2006
2063
                sigsetjmp \
2007
2064
                basename \
2032
2089
fi
2033
2090
)
2034
2091
 
2035
 
dnl For some reason, the check above doesn't properly detect select() with
2036
 
dnl Msys/Mingw
2037
 
if test "$ac_cv_func_select" = "no"; then
2038
 
  AC_MSG_CHECKING([for select in ws2_32])
2039
 
  AC_TRY_LINK([
2040
 
#undef inline
2041
 
#ifdef HAVE_WINDOWS_H
2042
 
#ifndef WIN32_LEAN_AND_MEAN
2043
 
#define WIN32_LEAN_AND_MEAN
2044
 
#endif
2045
 
#include <windows.h>
2046
 
#ifdef HAVE_WINSOCK2_H
2047
 
#include <winsock2.h>
2048
 
#else
2049
 
#ifdef HAVE_WINSOCK_H
2050
 
#include <winsock.h>
2051
 
#endif
2052
 
#endif
2053
 
#endif
2054
 
    ],[
2055
 
      select(0,(fd_set *)NULL,(fd_set *)NULL,(fd_set *)NULL,(struct timeval *)NULL);
2056
 
    ],[
2057
 
      AC_MSG_RESULT([yes])
2058
 
      HAVE_SELECT="1"
2059
 
      AC_DEFINE_UNQUOTED(HAVE_SELECT, 1,
2060
 
        [Define to 1 if you have the select function.])
2061
 
    ],[
2062
 
      AC_MSG_ERROR([You can't compile without a select])
2063
 
  ])
2064
 
fi
2065
 
 
2066
2092
dnl sigsetjmp() might be a macro and no function so if it isn't found already
2067
2093
dnl we make an extra check here!
2068
2094
if test "$ac_cv_func_sigsetjmp" != "yes"; then
2069
2095
  AC_MSG_CHECKING([for sigsetjmp defined as macro])
2070
 
  AC_TRY_LINK( [#include <setjmp.h>],
2071
 
               [sigjmp_buf jmpenv;
2072
 
                sigsetjmp(jmpenv, 1);],
2073
 
               AC_MSG_RESULT(yes)
2074
 
               AC_DEFINE(HAVE_SIGSETJMP, 1, [If you have sigsetjmp]),
2075
 
               AC_MSG_RESULT(no)
2076
 
               )
 
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
  ])
2077
2109
fi
2078
2110
 
2079
2111
AC_CHECK_DECL(basename, ,
2247
2279
         dnl out and don't use the "embedded" ares dir (in which case we don't
2248
2280
         dnl check it because it might not have been built yet)
2249
2281
         AC_MSG_CHECKING([that c-ares is good and recent enough])
2250
 
         AC_LINK_IFELSE( [
 
2282
         AC_LINK_IFELSE([
 
2283
           AC_LANG_PROGRAM([[
2251
2284
#include <ares.h>
2252
 
/* provide a set of dummy functions in case c-ares was built with debug */
2253
 
void curl_dofree() { }
2254
 
void curl_sclose() { }
2255
 
void curl_domalloc() { }
2256
 
 
2257
 
int main(void)
2258
 
{
2259
 
  ares_channel channel;
2260
 
  ares_cancel(channel); /* added in 1.2.0 */
2261
 
  ares_process_fd(channel, 0, 0); /* added in 1.4.0 */
2262
 
  return 0;
2263
 
}
2264
 
],
2265
 
          AC_MSG_RESULT(yes),
2266
 
          AC_MSG_RESULT(no)
2267
 
          AC_MSG_ERROR([c-ares library defective or too old])
2268
 
          )
 
2285
             /* set of dummy functions in case c-ares was built with debug */
 
2286
             void curl_dofree() { }
 
2287
             void curl_sclose() { }
 
2288
             void curl_domalloc() { }
 
2289
             void curl_docalloc() { }
 
2290
             void curl_socket() { }
 
2291
           ]],[[
 
2292
             ares_channel channel;
 
2293
             ares_cancel(channel); /* added in 1.2.0 */
 
2294
             ares_process_fd(channel, 0, 0); /* added in 1.4.0 */
 
2295
           ]])
 
2296
         ],[
 
2297
           AC_MSG_RESULT([yes])
 
2298
         ],[
 
2299
           AC_MSG_RESULT([no])
 
2300
           AC_MSG_ERROR([c-ares library defective or too old])
 
2301
         ])
2269
2302
       fi
2270
2303
       ;;
2271
2304
  esac ],
2291
2324
       AC_MSG_RESULT(yes)
2292
2325
)
2293
2326
 
2294
 
CURL_CHECK_NATIVE_WINDOWS
2295
 
 
2296
2327
dnl ************************************************************
2297
2328
dnl enable SSPI support
2298
2329
dnl
2422
2453
)
2423
2454
 
2424
2455
dnl ************************************************************
2425
 
if test "x$ws2" = "xyes"; then
 
2456
if test ! -z "$winsock_LIB"; then
2426
2457
 
2427
2458
  dnl If ws2_32 is wanted, make sure it is the _last_ lib in LIBS (makes
2428
2459
  dnl things work when built with c-ares). But we can't just move it last
2429
2460
  dnl since then other stuff (SSL) won't build. So we simply append it to the
2430
2461
  dnl end.
2431
2462
 
2432
 
  LIBS="$LIBS -lws2_32"
2433
 
  TEST_SERVER_LIBS="$TEST_SERVER_LIBS -lws2_32"
 
2463
  LIBS="$LIBS $winsock_LIB"
 
2464
  TEST_SERVER_LIBS="$TEST_SERVER_LIBS $winsock_LIB"
2434
2465
 
2435
2466
fi
2436
2467
 
2500
2531
  Built-in manual: ${curl_manual_msg}
2501
2532
  Verbose errors:  ${curl_verbose_msg}
2502
2533
  SSPI support:    ${curl_sspi_msg}
2503
 
  ca cert path:    ${ca}
 
2534
  ca cert bundle:  ${ca}
 
2535
  ca cert path:    ${capath}
2504
2536
  LDAP support:    ${curl_ldap_msg}
2505
2537
  LDAPS support:   ${curl_ldaps_msg}
2506
2538
])