~ubuntu-branches/ubuntu/maverick/cryptsetup/maverick-proposed

« back to all changes in this revision

Viewing changes to m4/iconv.m4

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2010-06-14 21:47:28 UTC
  • mfrom: (0.1.12 sid)
  • Revision ID: james.westby@ubuntu.com-20100614214728-tm8kdwg6chjejlbq
Tags: 2:1.1.2-1ubuntu1
* Merge from Debian unstable (LP: #594365).  Remaining changes:
  - debian/control:
    + Bump initramfs-tools Suggests to Depends: so system is not
      potentially rendered unbootable.
    + Depend on plymouth.   
  - Add debian/cryptdisks-{enable,udev}.upstart.
  - debian/cryptdisks.functions:
    + new function, crypttab_start_one_disk, to look for the named source
      device in /etc/crypttab (by device name, UUID, or label) and start it
      if configured to do so
    + wrap the call to /lib/cryptsetup/askpass with watershed, to make sure
      we only ever have one of these running at a time; otherwise multiple
      invocations could steal each other's input and/or write over each
      other's output
    + initially create the device under a temporary name and rename it only
      at the end using 'dmsetup rename', to ensure that upstart/mountall
      doesn't see our device before it's ready to go.
    + do_tmp should mount under /var/run/cryptsetup for changing the
      permissions of the filesystem root, not directly on /tmp, since
      mounting on /tmp a) is racy, b) confuses mountall something fierce.
    + when called by cryptdisks-enable, check that we don't already have a
      corresponding cryptdisks-udev job running (probably waiting for a
      passphrase); if there is, wait until it's finished before continuing.
  - debian/cryptdisks{,-early}.init: Make the 'start' action of the init
    script a no-op, this should be handled entirely by the upstart job;
    and fix the LSB header to not declare this should be started in
    runlevel 'S'
  - debian/cryptsetup.postinst: Remove any symlinks from /etc/rcS.d on
    upgrade. 
  - debian/rules: Do not install start symlinks for init scripts, and
    install debian/cryptdisks-{enable,udev}.upstart scripts.
  - Add debian/cryptsetup.apport: Apport package hook. Install in
    debian/rules and create dir in debian/cryptsetup.dirs.
  - debian/rules: link dynamically against libgcrypt and libgpg-error.
  - debian/cryptsetup.postrm: call update-initramfs on package removal.
* Dropped changes, merged/superseded in Debian:
  - Add ext4 support to passdev.
  - cryptroot-hook: don't call copy_modules_dir with empty arguments when
    archcrypto isn't found
  - Set USPLASH=y and FRAMEBUFFER=y in the hook config to pull plymouth into
    the initramfs.
  - change interaction to use plymouth directly if present, and if not, to
    fall back to /lib/cryptsetup/askpass as before
  - cryptdisks.functions: replace 'echo -e' bashism with 'printf'.
  - debian/initramfs/cryptroot-script: if plymouth is present in the
    initramfs, use this directly, bypassing the cryptsetup askpass script
  - debian/initramfs/cryptroot-hook: Properly anchor our regexps when
    grepping /etc/crypttab so that we don't incorrectly match device names
    that are substrings of one another.
  - debian/initramfs/cryptroot-script: Don't leak /conf/conf.d/cryptroot
    file descriptor to subprocesses.
  - Fix grammar error in debian/initramfs/cryptroot-script
    ("setup" -> "set up")
  - debian/initramfs/cryptroot-script: Fix this to work with current
    initramfs-tools:
    + Source /scripts/functions after checking for prerequisites.
    + prereqs(): Do not assume we are running within initramfs, and
      calculate relative path correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# iconv.m4 serial AM4 (gettext-0.11.3)
 
2
dnl Copyright (C) 2000-2002 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
dnl From Bruno Haible.
 
8
 
 
9
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
 
10
[
 
11
  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
 
12
  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
 
13
  AC_REQUIRE([AC_LIB_RPATH])
 
14
 
 
15
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
 
16
  dnl accordingly.
 
17
  AC_LIB_LINKFLAGS_BODY([iconv])
 
18
])
 
19
 
 
20
AC_DEFUN([AM_ICONV_LINK],
 
21
[
 
22
  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
 
23
  dnl those with the standalone portable GNU libiconv installed).
 
24
 
 
25
  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
 
26
  dnl accordingly.
 
27
  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
 
28
 
 
29
  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
 
30
  dnl because if the user has installed libiconv and not disabled its use
 
31
  dnl via --without-libiconv-prefix, he wants to use it. The first
 
32
  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
 
33
  am_save_CPPFLAGS="$CPPFLAGS"
 
34
  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
 
35
 
 
36
  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
 
37
    am_cv_func_iconv="no, consider installing GNU libiconv"
 
38
    am_cv_lib_iconv=no
 
39
    AC_TRY_LINK([#include <stdlib.h>
 
40
#include <iconv.h>],
 
41
      [iconv_t cd = iconv_open("","");
 
42
       iconv(cd,NULL,NULL,NULL,NULL);
 
43
       iconv_close(cd);],
 
44
      am_cv_func_iconv=yes)
 
45
    if test "$am_cv_func_iconv" != yes; then
 
46
      am_save_LIBS="$LIBS"
 
47
      LIBS="$LIBS $LIBICONV"
 
48
      AC_TRY_LINK([#include <stdlib.h>
 
49
#include <iconv.h>],
 
50
        [iconv_t cd = iconv_open("","");
 
51
         iconv(cd,NULL,NULL,NULL,NULL);
 
52
         iconv_close(cd);],
 
53
        am_cv_lib_iconv=yes
 
54
        am_cv_func_iconv=yes)
 
55
      LIBS="$am_save_LIBS"
 
56
    fi
 
57
  ])
 
58
  if test "$am_cv_func_iconv" = yes; then
 
59
    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
 
60
  fi
 
61
  if test "$am_cv_lib_iconv" = yes; then
 
62
    AC_MSG_CHECKING([how to link with libiconv])
 
63
    AC_MSG_RESULT([$LIBICONV])
 
64
  else
 
65
    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
 
66
    dnl either.
 
67
    CPPFLAGS="$am_save_CPPFLAGS"
 
68
    LIBICONV=
 
69
    LTLIBICONV=
 
70
  fi
 
71
  AC_SUBST(LIBICONV)
 
72
  AC_SUBST(LTLIBICONV)
 
73
])
 
74
 
 
75
AC_DEFUN([AM_ICONV],
 
76
[
 
77
  AM_ICONV_LINK
 
78
  if test "$am_cv_func_iconv" = yes; then
 
79
    AC_MSG_CHECKING([for iconv declaration])
 
80
    AC_CACHE_VAL(am_cv_proto_iconv, [
 
81
      AC_TRY_COMPILE([
 
82
#include <stdlib.h>
 
83
#include <iconv.h>
 
84
extern
 
85
#ifdef __cplusplus
 
86
"C"
 
87
#endif
 
88
#if defined(__STDC__) || defined(__cplusplus)
 
89
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
 
90
#else
 
91
size_t iconv();
 
92
#endif
 
93
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
 
94
      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
 
95
    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
 
96
    AC_MSG_RESULT([$]{ac_t:-
 
97
         }[$]am_cv_proto_iconv)
 
98
    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
 
99
      [Define as const if the declaration of iconv() needs const.])
 
100
  fi
 
101
])