~ubuntu-branches/ubuntu/natty/curl/natty-security

« back to all changes in this revision

Viewing changes to acinclude.m4

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2010-06-20 13:56:28 UTC
  • mfrom: (3.4.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100620135628-e30tp9jldq6hq985
Tags: 7.21.0-1ubuntu1
* Merge from debian unstable.  Remaining changes: LP: #596334
  - Keep build deps in main:
    - Drop build dependencies: stunnel, libssh2-1-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:
5
5
#                            | (__| |_| |  _ <| |___
6
6
#                             \___|\___/|_| \_\_____|
7
7
#
8
 
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
 
8
# Copyright (C) 1998 - 2010, 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: acinclude.m4,v 1.239 2009-09-02 17:48:26 bagder Exp $
22
21
#***************************************************************************
23
22
 
24
23
 
167
166
 
168
167
dnl CURL_CHECK_HEADER_WINDOWS
169
168
dnl -------------------------------------------------
170
 
dnl Check for compilable and valid windows.h header 
 
169
dnl Check for compilable and valid windows.h header
171
170
 
172
171
AC_DEFUN([CURL_CHECK_HEADER_WINDOWS], [
173
172
  AC_CACHE_CHECK([for windows.h], [ac_cv_header_windows_h], [
240
239
 
241
240
dnl CURL_CHECK_HEADER_WINSOCK
242
241
dnl -------------------------------------------------
243
 
dnl Check for compilable and valid winsock.h header 
 
242
dnl Check for compilable and valid winsock.h header
244
243
 
245
244
AC_DEFUN([CURL_CHECK_HEADER_WINSOCK], [
246
245
  AC_REQUIRE([CURL_CHECK_HEADER_WINDOWS])dnl
277
276
 
278
277
dnl CURL_CHECK_HEADER_WINSOCK2
279
278
dnl -------------------------------------------------
280
 
dnl Check for compilable and valid winsock2.h header 
 
279
dnl Check for compilable and valid winsock2.h header
281
280
 
282
281
AC_DEFUN([CURL_CHECK_HEADER_WINSOCK2], [
283
282
  AC_REQUIRE([CURL_CHECK_HEADER_WINDOWS])dnl
966
965
 
967
966
dnl CURL_CHECK_FUNC_GETNAMEINFO
968
967
dnl -------------------------------------------------
969
 
dnl Test if the getnameinfo function is available, 
 
968
dnl Test if the getnameinfo function is available,
970
969
dnl and check the types of five of its arguments.
971
970
dnl If the function succeeds HAVE_GETNAMEINFO will be
972
971
dnl defined, defining the types of the arguments in
973
972
dnl GETNAMEINFO_TYPE_ARG1, GETNAMEINFO_TYPE_ARG2,
974
973
dnl GETNAMEINFO_TYPE_ARG46 and GETNAMEINFO_TYPE_ARG7,
975
 
dnl and also defining the type qualifier of first 
 
974
dnl and also defining the type qualifier of first
976
975
dnl argument in GETNAMEINFO_QUAL_ARG1.
977
976
 
978
977
AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [
1056
1055
              if test "$curl_cv_func_getnameinfo_args" = "unknown"; then
1057
1056
                AC_COMPILE_IFELSE([
1058
1057
                  AC_LANG_PROGRAM([[
1059
 
#undef inline 
 
1058
#undef inline
1060
1059
#ifdef HAVE_WINDOWS_H
1061
1060
#ifndef WIN32_LEAN_AND_MEAN
1062
1061
#define WIN32_LEAN_AND_MEAN
1067
1066
#endif
1068
1067
#include <windows.h>
1069
1068
#ifdef HAVE_WINSOCK2_H
1070
 
#include <winsock2.h> 
 
1069
#include <winsock2.h>
1071
1070
#ifdef HAVE_WS2TCPIP_H
1072
1071
#include <ws2tcpip.h>
1073
1072
#endif
1167
1166
 
1168
1167
dnl TYPE_SOCKADDR_STORAGE
1169
1168
dnl -------------------------------------------------
1170
 
dnl Check for struct sockaddr_storage. Most IPv6-enabled 
 
1169
dnl Check for struct sockaddr_storage. Most IPv6-enabled
1171
1170
dnl hosts have it, but AIX 4.3 is one known exception.
1172
1171
 
1173
1172
AC_DEFUN([TYPE_SOCKADDR_STORAGE],
1213
1212
  AC_CHECK_HEADERS(stdio.h sys/types.h sys/socket.h \
1214
1213
                   netdb.h netinet/in.h arpa/inet.h)
1215
1214
  #
1216
 
  AC_CACHE_CHECK([for working NI_WITHSCOPEID], 
 
1215
  AC_CACHE_CHECK([for working NI_WITHSCOPEID],
1217
1216
    [ac_cv_working_ni_withscopeid], [
1218
1217
    AC_RUN_IFELSE([
1219
1218
      AC_LANG_PROGRAM([[
1305
1304
 
1306
1305
dnl CURL_CHECK_FUNC_RECV
1307
1306
dnl -------------------------------------------------
1308
 
dnl Test if the socket recv() function is available, 
1309
 
dnl and check its return type and the types of its 
1310
 
dnl arguments. If the function succeeds HAVE_RECV 
1311
 
dnl will be defined, defining the types of the arguments 
1312
 
dnl in RECV_TYPE_ARG1, RECV_TYPE_ARG2, RECV_TYPE_ARG3 
 
1307
dnl Test if the socket recv() function is available,
 
1308
dnl and check its return type and the types of its
 
1309
dnl arguments. If the function succeeds HAVE_RECV
 
1310
dnl will be defined, defining the types of the arguments
 
1311
dnl in RECV_TYPE_ARG1, RECV_TYPE_ARG2, RECV_TYPE_ARG3
1313
1312
dnl and RECV_TYPE_ARG4, defining the type of the function
1314
1313
dnl return value in RECV_TYPE_RETV.
1315
1314
 
1321
1320
  AC_MSG_CHECKING([for recv])
1322
1321
  AC_LINK_IFELSE([
1323
1322
    AC_LANG_PROGRAM([[
1324
 
#undef inline 
 
1323
#undef inline
1325
1324
#ifdef HAVE_WINDOWS_H
1326
1325
#ifndef WIN32_LEAN_AND_MEAN
1327
1326
#define WIN32_LEAN_AND_MEAN
1365
1364
                if test "$curl_cv_func_recv_args" = "unknown"; then
1366
1365
                  AC_COMPILE_IFELSE([
1367
1366
                    AC_LANG_PROGRAM([[
1368
 
#undef inline 
 
1367
#undef inline
1369
1368
#ifdef HAVE_WINDOWS_H
1370
1369
#ifndef WIN32_LEAN_AND_MEAN
1371
1370
#define WIN32_LEAN_AND_MEAN
1438
1437
 
1439
1438
dnl CURL_CHECK_FUNC_SEND
1440
1439
dnl -------------------------------------------------
1441
 
dnl Test if the socket send() function is available, 
1442
 
dnl and check its return type and the types of its 
1443
 
dnl arguments. If the function succeeds HAVE_SEND 
1444
 
dnl will be defined, defining the types of the arguments 
1445
 
dnl in SEND_TYPE_ARG1, SEND_TYPE_ARG2, SEND_TYPE_ARG3 
 
1440
dnl Test if the socket send() function is available,
 
1441
dnl and check its return type and the types of its
 
1442
dnl arguments. If the function succeeds HAVE_SEND
 
1443
dnl will be defined, defining the types of the arguments
 
1444
dnl in SEND_TYPE_ARG1, SEND_TYPE_ARG2, SEND_TYPE_ARG3
1446
1445
dnl and SEND_TYPE_ARG4, defining the type of the function
1447
 
dnl return value in SEND_TYPE_RETV, and also defining the 
 
1446
dnl return value in SEND_TYPE_RETV, and also defining the
1448
1447
dnl type qualifier of second argument in SEND_QUAL_ARG2.
1449
1448
 
1450
1449
AC_DEFUN([CURL_CHECK_FUNC_SEND], [
1455
1454
  AC_MSG_CHECKING([for send])
1456
1455
  AC_LINK_IFELSE([
1457
1456
    AC_LANG_PROGRAM([[
1458
 
#undef inline 
 
1457
#undef inline
1459
1458
#ifdef HAVE_WINDOWS_H
1460
1459
#ifndef WIN32_LEAN_AND_MEAN
1461
1460
#define WIN32_LEAN_AND_MEAN
1499
1498
                if test "$curl_cv_func_send_args" = "unknown"; then
1500
1499
                  AC_COMPILE_IFELSE([
1501
1500
                    AC_LANG_PROGRAM([[
1502
 
#undef inline 
 
1501
#undef inline
1503
1502
#ifdef HAVE_WINDOWS_H
1504
1503
#ifndef WIN32_LEAN_AND_MEAN
1505
1504
#define WIN32_LEAN_AND_MEAN
1623
1622
  AC_MSG_CHECKING([for recvfrom])
1624
1623
  AC_LINK_IFELSE([
1625
1624
    AC_LANG_PROGRAM([[
1626
 
#undef inline 
 
1625
#undef inline
1627
1626
#ifdef HAVE_WINDOWS_H
1628
1627
#ifndef WIN32_LEAN_AND_MEAN
1629
1628
#define WIN32_LEAN_AND_MEAN
1669
1668
                    if test "$curl_cv_func_recvfrom_args" = "unknown"; then
1670
1669
                      AC_COMPILE_IFELSE([
1671
1670
                        AC_LANG_PROGRAM([[
1672
 
#undef inline 
 
1671
#undef inline
1673
1672
#ifdef HAVE_WINDOWS_H
1674
1673
#ifndef WIN32_LEAN_AND_MEAN
1675
1674
#define WIN32_LEAN_AND_MEAN
1805
1804
  AC_CACHE_CHECK([for MSG_NOSIGNAL], [ac_cv_msg_nosignal], [
1806
1805
    AC_COMPILE_IFELSE([
1807
1806
      AC_LANG_PROGRAM([[
1808
 
#undef inline 
 
1807
#undef inline
1809
1808
#ifdef HAVE_WINDOWS_H
1810
1809
#ifndef WIN32_LEAN_AND_MEAN
1811
1810
#define WIN32_LEAN_AND_MEAN
1856
1855
  AC_CACHE_CHECK([for struct timeval], [ac_cv_struct_timeval], [
1857
1856
    AC_COMPILE_IFELSE([
1858
1857
      AC_LANG_PROGRAM([[
1859
 
#undef inline 
 
1858
#undef inline
1860
1859
#ifdef HAVE_WINDOWS_H
1861
1860
#ifndef WIN32_LEAN_AND_MEAN
1862
1861
#define WIN32_LEAN_AND_MEAN
2815
2814
      done
2816
2815
    fi
2817
2816
  fi
2818
 
        
2819
 
    
 
2817
 
 
2818
 
2820
2819
 
2821
2820
  if test "x$ca" != "xno"; then
2822
2821
    CURL_CA_BUNDLE='"'$ca'"'
3043
3042
      '__int32'        \
3044
3043
      'int'            ; do
3045
3044
      DO_CURL_OFF_T_CHECK([$t4], [4])
3046
 
    done 
 
3045
    done
3047
3046
    AC_MSG_RESULT([$curl_typeof_curl_off_t])
3048
3047
  fi
3049
3048
  if test "$curl_typeof_curl_off_t" = "unknown"; then
3190
3189
  esac
3191
3190
])
3192
3191
 
3193
 
dnl CURL_CHECK_PKGCONFIG ($module)
 
3192
dnl CURL_EXPORT_PCDIR ($pcdir)
 
3193
dnl ------------------------
 
3194
dnl if $pcdir is not empty, set PKG_CONFIG_LIBDIR to $pcdir and export
 
3195
dnl
 
3196
dnl we need this macro since pkg-config distinguishes among empty and unset
 
3197
dnl variable while checking PKG_CONFIG_LIBDIR
 
3198
dnl
 
3199
 
 
3200
AC_DEFUN([CURL_EXPORT_PCDIR], [
 
3201
    if test -n "$1"; then
 
3202
      PKG_CONFIG_LIBDIR="$1"
 
3203
      export PKG_CONFIG_LIBDIR
 
3204
    fi
 
3205
])
 
3206
 
 
3207
dnl CURL_CHECK_PKGCONFIG ($module, [$pcdir])
3194
3208
dnl ------------------------
3195
3209
dnl search for the pkg-config tool (if not cross-compiling). Set the PKGCONFIG
3196
3210
dnl variable to hold the path to it, or 'no' if not found/present.
3198
3212
dnl If pkg-config is present, check that it has info about the $module or
3199
3213
dnl return "no" anyway!
3200
3214
dnl
 
3215
dnl Optionally PKG_CONFIG_LIBDIR may be given as $pcdir.
 
3216
dnl
3201
3217
 
3202
3218
AC_DEFUN([CURL_CHECK_PKGCONFIG], [
3203
3219
 
3216
3232
    if test x$PKGCONFIG != xno; then
3217
3233
      AC_MSG_CHECKING([for $1 options with pkg-config])
3218
3234
      dnl ask pkg-config about $1
3219
 
      $PKGCONFIG --exists $1
3220
 
      if test "$?" -ne "0"; then
 
3235
      itexists=`CURL_EXPORT_PCDIR([$2]) dnl
 
3236
        $PKGCONFIG --exists $1 >/dev/null 2>&1 && echo 1`
 
3237
 
 
3238
      if test -z "$itexists"; then
3221
3239
        dnl pkg-config does not have info about the given module! set the
3222
3240
        dnl variable to 'no'
3223
3241
        PKGCONFIG="no"