~ubuntu-branches/ubuntu/raring/gnutls26/raring

« back to all changes in this revision

Viewing changes to gl/m4/netdb_h.m4

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-05-20 13:07:18 UTC
  • mfrom: (12.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20110520130718-db41dybbanzfvlji
Tags: 2.10.5-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Fix build failure with --no-add-needed.
  - Build for multiarch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# netdb_h.m4 serial 5
2
 
dnl Copyright (C) 2008 Free Software Foundation, Inc.
 
1
# netdb_h.m4 serial 9
 
2
dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
3
3
dnl This file is free software; the Free Software Foundation
4
4
dnl gives unlimited permission to copy and/or distribute it,
5
5
dnl with or without modifications, as long as this notice is preserved.
7
7
AC_DEFUN([gl_HEADER_NETDB],
8
8
[
9
9
  AC_REQUIRE([gl_NETDB_H_DEFAULTS])
 
10
  AC_CHECK_HEADERS_ONCE([netdb.h])
10
11
  gl_CHECK_NEXT_HEADERS([netdb.h])
11
12
  if test $ac_cv_header_netdb_h = yes; then
12
 
    AC_COMPILE_IFELSE(
13
 
      [AC_LANG_PROGRAM([[
14
 
         #include <netdb.h>
15
 
         struct addrinfo a;
16
 
         int b = EAI_OVERFLOW;
17
 
         int c = AI_NUMERICSERV;
18
 
       ]])],
19
 
      [NETDB_H=''], [NETDB_H='netdb.h'])
20
13
    HAVE_NETDB_H=1
21
14
  else
22
 
    NETDB_H='netdb.h'
23
15
    HAVE_NETDB_H=0
24
16
  fi
25
17
  AC_SUBST([HAVE_NETDB_H])
26
 
  AC_SUBST([NETDB_H])
 
18
 
 
19
  dnl Check for declarations of anything we want to poison if the
 
20
  dnl corresponding gnulib module is not in use.
 
21
  gl_WARN_ON_USE_PREPARE([[#include <netdb.h>]],
 
22
    [getaddrinfo freeaddrinfo gai_strerror getnameinfo])
27
23
])
28
24
 
29
25
AC_DEFUN([gl_NETDB_MODULE_INDICATOR],
30
26
[
31
27
  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
32
28
  AC_REQUIRE([gl_NETDB_H_DEFAULTS])
33
 
  GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
 
29
  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
34
30
])
35
31
 
36
32
AC_DEFUN([gl_NETDB_H_DEFAULTS],