~darkmuggle-deactivatedaccount/ubuntu/quantal/grub2/fix-872244

« back to all changes in this revision

Viewing changes to m4/wchar_h.m4

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Evan Broder, Mario Limonciello
  • Date: 2010-11-24 13:59:55 UTC
  • mfrom: (1.17.6 upstream) (17.6.15 experimental)
  • Revision ID: james.westby@ubuntu.com-20101124135955-r6ii5sepayr7jt53
Tags: 1.99~20101124-1ubuntu1
[ Colin Watson ]
* Resynchronise with Debian experimental.  Remaining changes:
  - Adjust for default Ubuntu boot options ("quiet splash").
  - Default to hiding the menu; holding down Shift at boot will show it.
  - Set a monochromatic theme for Ubuntu.
  - Apply Ubuntu GRUB Legacy changes to legacy update-grub script: title,
    recovery mode, quiet option, tweak how memtest86+ is displayed, and
    use UUIDs where appropriate.
  - Fix backslash-escaping in merge_debconf_into_conf.
  - Remove "GNU/Linux" from default distributor string.
  - Add crashkernel= options if kdump and makedumpfile are available.
  - If other operating systems are installed, then automatically unhide
    the menu.  Otherwise, if GRUB_HIDDEN_TIMEOUT is 0, then use keystatus
    if available to check whether Shift is pressed.  If it is, show the
    menu, otherwise boot immediately.  If keystatus is not available, then
    fall back to a short delay interruptible with Escape.
  - Allow Shift to interrupt 'sleep --interruptible'.
  - Don't display introductory message about line editing unless we're
    actually offering a shell prompt.  Don't clear the screen just before
    booting if we never drew the menu in the first place.
  - Remove some verbose messages printed before reading the configuration
    file.
  - Suppress progress messages as the kernel and initrd load for
    non-recovery kernel menu entries.
  - Change prepare_grub_to_access_device to handle filesystems
    loop-mounted on file images.
  - Ignore devices loop-mounted from files in 10_linux.
  - Show the boot menu if the previous boot failed, that is if it failed
    to get to the end of one of the normal runlevels.
  - Don't generate /boot/grub/device.map during grub-install or
    grub-mkconfig by default.
  - Adjust upgrade version checks for Ubuntu.
  - Don't display "GRUB loading" unless Shift is held down.
  - Adjust versions of grub-doc and grub-legacy-doc conflicts to tolerate
    our backport of the grub-doc split.
  - Fix LVM/RAID probing in the absence of /boot/grub/device.map.
  - Look for .mo files in /usr/share/locale-langpack as well, in
    preference.
  - Make sure GRUB_TIMEOUT isn't quoted unnecessarily.
  - Probe all devices in 'grub-probe --target=drive' if
    /boot/grub/device.map is missing.
  - Build-depend on qemu-kvm rather than qemu-system for grub-pc tests.
  - Use qemu rather than qemu-system-i386.
  - Program vesafb on BIOS systems rather than efifb.
  - Add a grub-rescue-efi-amd64 package containing a rescue CD-ROM image
    for EFI-AMD64.
  - On Wubi, don't ask for an install device, but just update wubildr
    using the diverted grub-install.
  - When embedding the core image in a post-MBR gap, check for and avoid
    sectors matching any of a list of known signatures.
  - Disable video_bochs and video_cirrus on PC BIOS systems, as probing
    PCI space seems to break on some systems.
* Downgrade "ACPI shutdown failed" error to a debug message, since it can
  cause spurious test failures.

[ Evan Broder ]
* Enable lua from grub-extras.
* Incorporate the bitop library into lua.
* Add enum_pci function to grub module in lua.
* Switch back to gfxpayload=keep by default, unless the video hardware
  is known to not support it.

[ Mario Limonciello ]
* Built part_msdos and vfat into bootx64.efi (LP: #677758)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
 
2
 
 
3
dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
 
4
dnl This file is free software; the Free Software Foundation
 
5
dnl gives unlimited permission to copy and/or distribute it,
 
6
dnl with or without modifications, as long as this notice is preserved.
 
7
 
 
8
dnl Written by Eric Blake.
 
9
 
 
10
# wchar_h.m4 serial 33
 
11
 
 
12
AC_DEFUN([gl_WCHAR_H],
 
13
[
 
14
  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
 
15
  AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
 
16
  dnl Prepare for creating substitute <wchar.h>.
 
17
  dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
 
18
  dnl character support).
 
19
  dnl <wchar.h> is always overridden, because of GNULIB_POSIXCHECK.
 
20
  AC_CHECK_HEADERS_ONCE([wchar.h])
 
21
  gl_CHECK_NEXT_HEADERS([wchar.h])
 
22
  if test $ac_cv_header_wchar_h = yes; then
 
23
    HAVE_WCHAR_H=1
 
24
  else
 
25
    HAVE_WCHAR_H=0
 
26
  fi
 
27
  AC_SUBST([HAVE_WCHAR_H])
 
28
 
 
29
  AC_REQUIRE([gt_TYPE_WINT_T])
 
30
  if test $gt_cv_c_wint_t = yes; then
 
31
    HAVE_WINT_T=1
 
32
  else
 
33
    HAVE_WINT_T=0
 
34
  fi
 
35
  AC_SUBST([HAVE_WINT_T])
 
36
 
 
37
  dnl Check for declarations of anything we want to poison if the
 
38
  dnl corresponding gnulib module is not in use.
 
39
  gl_WARN_ON_USE_PREPARE([[
 
40
/* Some systems require additional headers.  */
 
41
#ifndef __GLIBC__
 
42
# include <stddef.h>
 
43
# include <stdio.h>
 
44
# include <time.h>
 
45
#endif
 
46
#include <wchar.h>
 
47
    ]], [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb
 
48
    wcsrtombs wcsnrtombs wcwidth])
 
49
])
 
50
 
 
51
dnl Check whether <wchar.h> is usable at all.
 
52
AC_DEFUN([gl_WCHAR_H_INLINE_OK],
 
53
[
 
54
  dnl Test whether <wchar.h> suffers due to the transition from '__inline' to
 
55
  dnl 'gnu_inline'. See <http://sourceware.org/bugzilla/show_bug.cgi?id=4022>
 
56
  dnl and <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. In summary,
 
57
  dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and
 
58
  dnl the option -std=c99 or -std=gnu99, leads to a broken <wchar.h>.
 
59
  AC_CACHE_CHECK([whether <wchar.h> uses 'inline' correctly],
 
60
    [gl_cv_header_wchar_h_correct_inline],
 
61
    [gl_cv_header_wchar_h_correct_inline=yes
 
62
     AC_LANG_CONFTEST([
 
63
       AC_LANG_SOURCE([[#define wcstod renamed_wcstod
 
64
#include <wchar.h>
 
65
extern int zero (void);
 
66
int main () { return zero(); }
 
67
]])])
 
68
     if AC_TRY_EVAL([ac_compile]); then
 
69
       mv conftest.$ac_objext conftest1.$ac_objext
 
70
       AC_LANG_CONFTEST([
 
71
         AC_LANG_SOURCE([[#define wcstod renamed_wcstod
 
72
#include <wchar.h>
 
73
int zero (void) { return 0; }
 
74
]])])
 
75
       if AC_TRY_EVAL([ac_compile]); then
 
76
         mv conftest.$ac_objext conftest2.$ac_objext
 
77
         if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
 
78
           :
 
79
         else
 
80
           gl_cv_header_wchar_h_correct_inline=no
 
81
         fi
 
82
       fi
 
83
     fi
 
84
     rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
 
85
    ])
 
86
  if test $gl_cv_header_wchar_h_correct_inline = no; then
 
87
    AC_MSG_ERROR([<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
 
88
This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
 
89
C99 mode. You have four options:
 
90
  - Add the flag -fgnu89-inline to CC and reconfigure, or
 
91
  - Fix your include files, using parts of
 
92
    <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
 
93
  - Use a gcc version older than 4.3, or
 
94
  - Don't use the flags -std=c99 or -std=gnu99.
 
95
Configuration aborted.])
 
96
  fi
 
97
])
 
98
 
 
99
dnl Unconditionally enables the replacement of <wchar.h>.
 
100
AC_DEFUN([gl_REPLACE_WCHAR_H],
 
101
[
 
102
  dnl This is a no-op, because <wchar.h> is always overridden.
 
103
  :
 
104
])
 
105
 
 
106
AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
 
107
[
 
108
  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
 
109
  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
 
110
  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
 
111
  dnl Define it also as a C macro, for the benefit of the unit tests.
 
112
  gl_MODULE_INDICATOR_FOR_TESTS([$1])
 
113
])
 
114
 
 
115
AC_DEFUN([gl_WCHAR_H_DEFAULTS],
 
116
[
 
117
  GNULIB_BTOWC=0;      AC_SUBST([GNULIB_BTOWC])
 
118
  GNULIB_WCTOB=0;      AC_SUBST([GNULIB_WCTOB])
 
119
  GNULIB_MBSINIT=0;    AC_SUBST([GNULIB_MBSINIT])
 
120
  GNULIB_MBRTOWC=0;    AC_SUBST([GNULIB_MBRTOWC])
 
121
  GNULIB_MBRLEN=0;     AC_SUBST([GNULIB_MBRLEN])
 
122
  GNULIB_MBSRTOWCS=0;  AC_SUBST([GNULIB_MBSRTOWCS])
 
123
  GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS])
 
124
  GNULIB_WCRTOMB=0;    AC_SUBST([GNULIB_WCRTOMB])
 
125
  GNULIB_WCSRTOMBS=0;  AC_SUBST([GNULIB_WCSRTOMBS])
 
126
  GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS])
 
127
  GNULIB_WCWIDTH=0;    AC_SUBST([GNULIB_WCWIDTH])
 
128
  dnl Assume proper GNU behavior unless another module says otherwise.
 
129
  HAVE_BTOWC=1;         AC_SUBST([HAVE_BTOWC])
 
130
  HAVE_MBSINIT=1;       AC_SUBST([HAVE_MBSINIT])
 
131
  HAVE_MBRTOWC=1;       AC_SUBST([HAVE_MBRTOWC])
 
132
  HAVE_MBRLEN=1;        AC_SUBST([HAVE_MBRLEN])
 
133
  HAVE_MBSRTOWCS=1;     AC_SUBST([HAVE_MBSRTOWCS])
 
134
  HAVE_MBSNRTOWCS=1;    AC_SUBST([HAVE_MBSNRTOWCS])
 
135
  HAVE_WCRTOMB=1;       AC_SUBST([HAVE_WCRTOMB])
 
136
  HAVE_WCSRTOMBS=1;     AC_SUBST([HAVE_WCSRTOMBS])
 
137
  HAVE_WCSNRTOMBS=1;    AC_SUBST([HAVE_WCSNRTOMBS])
 
138
  HAVE_DECL_WCTOB=1;    AC_SUBST([HAVE_DECL_WCTOB])
 
139
  HAVE_DECL_WCWIDTH=1;  AC_SUBST([HAVE_DECL_WCWIDTH])
 
140
  REPLACE_MBSTATE_T=0;  AC_SUBST([REPLACE_MBSTATE_T])
 
141
  REPLACE_BTOWC=0;      AC_SUBST([REPLACE_BTOWC])
 
142
  REPLACE_WCTOB=0;      AC_SUBST([REPLACE_WCTOB])
 
143
  REPLACE_MBSINIT=0;    AC_SUBST([REPLACE_MBSINIT])
 
144
  REPLACE_MBRTOWC=0;    AC_SUBST([REPLACE_MBRTOWC])
 
145
  REPLACE_MBRLEN=0;     AC_SUBST([REPLACE_MBRLEN])
 
146
  REPLACE_MBSRTOWCS=0;  AC_SUBST([REPLACE_MBSRTOWCS])
 
147
  REPLACE_MBSNRTOWCS=0; AC_SUBST([REPLACE_MBSNRTOWCS])
 
148
  REPLACE_WCRTOMB=0;    AC_SUBST([REPLACE_WCRTOMB])
 
149
  REPLACE_WCSRTOMBS=0;  AC_SUBST([REPLACE_WCSRTOMBS])
 
150
  REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS])
 
151
  REPLACE_WCWIDTH=0;    AC_SUBST([REPLACE_WCWIDTH])
 
152
])