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

« back to all changes in this revision

Viewing changes to m4/strchrnul.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
# strchrnul.m4 serial 9
 
2
dnl Copyright (C) 2003, 2007, 2009-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([gl_FUNC_STRCHRNUL],
 
8
[
 
9
  dnl Persuade glibc <string.h> to declare strchrnul().
 
10
  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
11
 
 
12
  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
 
13
  AC_CHECK_FUNCS([strchrnul])
 
14
  if test $ac_cv_func_strchrnul = no; then
 
15
    HAVE_STRCHRNUL=0
 
16
  else
 
17
    AC_CACHE_CHECK([whether strchrnul works],
 
18
      [gl_cv_func_strchrnul_works],
 
19
      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
 
20
#include <string.h> /* for strchrnul */
 
21
]], [[const char *buf = "a";
 
22
      return strchrnul (buf, 'b') != buf + 1;
 
23
    ]])],
 
24
        [gl_cv_func_strchrnul_works=yes],
 
25
        [gl_cv_func_strchrnul_works=no],
 
26
        [dnl Cygwin 1.7.9 introduced strchrnul, but it was broken until 1.7.10
 
27
         AC_EGREP_CPP([Lucky user],
 
28
           [
 
29
#if defined __CYGWIN__
 
30
 #include <cygwin/version.h>
 
31
 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
 
32
  Lucky user
 
33
 #endif
 
34
#else
 
35
  Lucky user
 
36
#endif
 
37
           ],
 
38
           [gl_cv_func_strchrnul_works="guessing yes"],
 
39
           [gl_cv_func_strchrnul_works="guessing no"])
 
40
        ])
 
41
      ])
 
42
    case "$gl_cv_func_strchrnul_works" in
 
43
      *yes) ;;
 
44
      *) REPLACE_STRCHRNUL=1 ;;
 
45
    esac
 
46
  fi
 
47
])
 
48
 
 
49
# Prerequisites of lib/strchrnul.c.
 
50
AC_DEFUN([gl_PREREQ_STRCHRNUL], [:])