~ubuntu-branches/ubuntu/precise/wget/precise-proposed

« back to all changes in this revision

Viewing changes to m4/environ.m4

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-10-19 00:00:09 UTC
  • mfrom: (2.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20111019000009-8p33w3wz4b1rdri0
Tags: 1.13-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add wget-udeb to ship wget.gnu as alternative to busybox wget
    implementation.
  - Depend on libssl-dev 0.9.8k-7ubuntu4 (LP: #503339)
* Dropped changes, superseded in Debian:
  - Keep build dependencies in main:
    + debian/control: remove info2man build-dep
    + debian/patches/series: disable wget-infopod_generated_manpage
  - Mark wget Multi-Arch: foreign, so packages that aren't of the same arch
    can depend on it.
* Pass --with-ssl=openssl; we don't want to use gnutls, there's no udeb for
  it.
* Add a second build pass for the udeb, so we can build without libidn.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# environ.m4 serial 5
 
2
dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc.
 
3
dnl This file is free software; the Free Software Foundation
 
4
dnl gives unlimited permission to copy and/or distribute it,
 
5
dnl with or without modifications, as long as this notice is preserved.
 
6
 
 
7
AC_DEFUN_ONCE([gl_ENVIRON],
 
8
[
 
9
  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
 
10
  dnl Persuade glibc <unistd.h> to declare environ.
 
11
  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
12
  gt_CHECK_VAR_DECL([#include <unistd.h>], environ)
 
13
  if test $gt_cv_var_environ_declaration != yes; then
 
14
    HAVE_DECL_ENVIRON=0
 
15
  fi
 
16
])
 
17
 
 
18
# Check if a variable is properly declared.
 
19
# gt_CHECK_VAR_DECL(includes,variable)
 
20
AC_DEFUN([gt_CHECK_VAR_DECL],
 
21
[
 
22
  define([gt_cv_var], [gt_cv_var_]$2[_declaration])
 
23
  AC_MSG_CHECKING([if $2 is properly declared])
 
24
  AC_CACHE_VAL([gt_cv_var], [
 
25
    AC_COMPILE_IFELSE(
 
26
      [AC_LANG_PROGRAM(
 
27
         [[$1
 
28
           extern struct { int foo; } $2;]],
 
29
         [[$2.foo = 1;]])],
 
30
      [gt_cv_var=no],
 
31
      [gt_cv_var=yes])])
 
32
  AC_MSG_RESULT([$gt_cv_var])
 
33
  if test $gt_cv_var = yes; then
 
34
    AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1,
 
35
              [Define if you have the declaration of $2.])
 
36
  fi
 
37
  undefine([gt_cv_var])
 
38
])