~ubuntu-branches/ubuntu/quantal/curl/quantal

« back to all changes in this revision

Viewing changes to m4/curl-functions.m4

  • Committer: Bazaar Package Importer
  • Author(s): James Page
  • Date: 2011-10-20 09:28:24 UTC
  • mfrom: (3.4.22 sid)
  • Revision ID: james.westby@ubuntu.com-20111020092824-i7kfjd5we7dh57nv
Tags: 7.21.7-3ubuntu1
* Merge from Debian testing, remaining changes:
  - Drop dependencies not in main:
    + Build-Depends: Drop stunnel and libssh2-1-dev.
    + Drop libssh2-1-dev from libcurl4-openssl-dev's Depends.
  - Add new libcurl3-udeb package, stripped down for use during 
    installation (LP: #831496).
* Dropped changes:
  - debian/patches/timeout_bug_736216: applied upstream.

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
2314
2314
  fi
2315
2315
])
2316
2316
 
 
2317
dnl CURL_CHECK_FUNC_GAI_STRERROR
 
2318
dnl -------------------------------------------------
 
2319
dnl Verify if gai_strerror is available, prototyped,
 
2320
dnl and can be compiled. If all of these are true,
 
2321
dnl and usage has not been previously disallowed with
 
2322
dnl shell variable curl_disallow_gai_strerror, then
 
2323
dnl HAVE_GAI_STRERROR will be defined.
 
2324
 
 
2325
AC_DEFUN([CURL_CHECK_FUNC_GAI_STRERROR], [
 
2326
  AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
 
2327
  AC_REQUIRE([CURL_INCLUDES_NETDB])dnl
 
2328
  #
 
2329
  tst_links_gai_strerror="unknown"
 
2330
  tst_proto_gai_strerror="unknown"
 
2331
  tst_compi_gai_strerror="unknown"
 
2332
  tst_allow_gai_strerror="unknown"
 
2333
  #
 
2334
  AC_MSG_CHECKING([if gai_strerror can be linked])
 
2335
  AC_LINK_IFELSE([
 
2336
    AC_LANG_PROGRAM([[
 
2337
      $curl_includes_winsock2
 
2338
      $curl_includes_netdb
 
2339
    ]],[[
 
2340
      if(0 != gai_strerror(0))
 
2341
        return 1;
 
2342
    ]])
 
2343
  ],[
 
2344
    AC_MSG_RESULT([yes])
 
2345
    tst_links_gai_strerror="yes"
 
2346
  ],[
 
2347
    AC_MSG_RESULT([no])
 
2348
    tst_links_gai_strerror="no"
 
2349
  ])
 
2350
  #
 
2351
  if test "$tst_links_gai_strerror" = "yes"; then
 
2352
    AC_MSG_CHECKING([if gai_strerror is prototyped])
 
2353
    AC_EGREP_CPP([gai_strerror],[
 
2354
      $curl_includes_winsock2
 
2355
      $curl_includes_netdb
 
2356
    ],[
 
2357
      AC_MSG_RESULT([yes])
 
2358
      tst_proto_gai_strerror="yes"
 
2359
    ],[
 
2360
      AC_MSG_RESULT([no])
 
2361
      tst_proto_gai_strerror="no"
 
2362
    ])
 
2363
  fi
 
2364
  #
 
2365
  if test "$tst_proto_gai_strerror" = "yes"; then
 
2366
    AC_MSG_CHECKING([if gai_strerror is compilable])
 
2367
    AC_COMPILE_IFELSE([
 
2368
      AC_LANG_PROGRAM([[
 
2369
        $curl_includes_winsock2
 
2370
        $curl_includes_netdb
 
2371
      ]],[[
 
2372
        if(0 != gai_strerror(0))
 
2373
          return 1;
 
2374
      ]])
 
2375
    ],[
 
2376
      AC_MSG_RESULT([yes])
 
2377
      tst_compi_gai_strerror="yes"
 
2378
    ],[
 
2379
      AC_MSG_RESULT([no])
 
2380
      tst_compi_gai_strerror="no"
 
2381
    ])
 
2382
  fi
 
2383
  #
 
2384
  if test "$tst_compi_gai_strerror" = "yes"; then
 
2385
    AC_MSG_CHECKING([if gai_strerror usage allowed])
 
2386
    if test "x$curl_disallow_gai_strerror" != "xyes"; then
 
2387
      AC_MSG_RESULT([yes])
 
2388
      tst_allow_gai_strerror="yes"
 
2389
    else
 
2390
      AC_MSG_RESULT([no])
 
2391
      tst_allow_gai_strerror="no"
 
2392
    fi
 
2393
  fi
 
2394
  #
 
2395
  AC_MSG_CHECKING([if gai_strerror might be used])
 
2396
  if test "$tst_links_gai_strerror" = "yes" &&
 
2397
     test "$tst_proto_gai_strerror" = "yes" &&
 
2398
     test "$tst_compi_gai_strerror" = "yes" &&
 
2399
     test "$tst_allow_gai_strerror" = "yes"; then
 
2400
    AC_MSG_RESULT([yes])
 
2401
    AC_DEFINE_UNQUOTED(HAVE_GAI_STRERROR, 1,
 
2402
      [Define to 1 if you have the gai_strerror function.])
 
2403
    ac_cv_func_gai_strerror="yes"
 
2404
  else
 
2405
    AC_MSG_RESULT([no])
 
2406
    ac_cv_func_gai_strerror="no"
 
2407
  fi
 
2408
])
 
2409
 
2317
2410
 
2318
2411
dnl CURL_CHECK_FUNC_GETHOSTBYADDR_R
2319
2412
dnl -------------------------------------------------