~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

Viewing changes to m4/vasnprintf.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
# vasnprintf.m4 serial 31
 
2
dnl Copyright (C) 2002-2004, 2006-2010 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_VASNPRINTF],
 
8
[
 
9
  AC_CHECK_FUNCS_ONCE([vasnprintf])
 
10
  if test $ac_cv_func_vasnprintf = no; then
 
11
    gl_REPLACE_VASNPRINTF
 
12
  fi
 
13
])
 
14
 
 
15
AC_DEFUN([gl_REPLACE_VASNPRINTF],
 
16
[
 
17
  AC_CHECK_FUNCS_ONCE([vasnprintf])
 
18
  AC_LIBOBJ([vasnprintf])
 
19
  AC_LIBOBJ([printf-args])
 
20
  AC_LIBOBJ([printf-parse])
 
21
  AC_LIBOBJ([asnprintf])
 
22
  if test $ac_cv_func_vasnprintf = yes; then
 
23
    AC_DEFINE([REPLACE_VASNPRINTF], [1],
 
24
      [Define if vasnprintf exists but is overridden by gnulib.])
 
25
  fi
 
26
  gl_PREREQ_PRINTF_ARGS
 
27
  gl_PREREQ_PRINTF_PARSE
 
28
  gl_PREREQ_VASNPRINTF
 
29
  gl_PREREQ_ASNPRINTF
 
30
])
 
31
 
 
32
# Prequisites of lib/printf-args.h, lib/printf-args.c.
 
33
AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
 
34
[
 
35
  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
 
36
  AC_REQUIRE([gt_TYPE_WCHAR_T])
 
37
  AC_REQUIRE([gt_TYPE_WINT_T])
 
38
])
 
39
 
 
40
# Prequisites of lib/printf-parse.h, lib/printf-parse.c.
 
41
AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
 
42
[
 
43
  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
 
44
  AC_REQUIRE([gt_TYPE_WCHAR_T])
 
45
  AC_REQUIRE([gt_TYPE_WINT_T])
 
46
  AC_REQUIRE([AC_TYPE_SIZE_T])
 
47
  AC_CHECK_TYPE([ptrdiff_t], ,
 
48
    [AC_DEFINE([ptrdiff_t], [long],
 
49
       [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
 
50
    ])
 
51
  AC_REQUIRE([gt_AC_TYPE_INTMAX_T])
 
52
])
 
53
 
 
54
# Prerequisites of lib/vasnprintf.c.
 
55
AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
 
56
[
 
57
  AC_REQUIRE([AC_C_INLINE])
 
58
  AC_REQUIRE([AC_FUNC_ALLOCA])
 
59
  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
 
60
  AC_REQUIRE([gt_TYPE_WCHAR_T])
 
61
  AC_REQUIRE([gt_TYPE_WINT_T])
 
62
  AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
 
63
  dnl Use the _snprintf function only if it is declared (because on NetBSD it
 
64
  dnl is defined as a weak alias of snprintf; we prefer to use the latter).
 
65
  AC_CHECK_DECLS([_snprintf], , , [#include <stdio.h>])
 
66
  dnl We can avoid a lot of code by assuming that snprintf's return value
 
67
  dnl conforms to ISO C99. So check that.
 
68
  AC_REQUIRE([gl_SNPRINTF_RETVAL_C99])
 
69
  case "$gl_cv_func_snprintf_retval_c99" in
 
70
    *yes)
 
71
      AC_DEFINE([HAVE_SNPRINTF_RETVAL_C99], [1],
 
72
        [Define if the return value of the snprintf function is the number of
 
73
         of bytes (excluding the terminating NUL) that would have been produced
 
74
         if the buffer had been large enough.])
 
75
      ;;
 
76
  esac
 
77
])
 
78
 
 
79
# Extra prerequisites of lib/vasnprintf.c for supporting 'long double'
 
80
# arguments.
 
81
AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE],
 
82
[
 
83
  AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
 
84
  case "$gl_cv_func_printf_long_double" in
 
85
    *yes)
 
86
      ;;
 
87
    *)
 
88
      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
 
89
        [Define if the vasnprintf implementation needs special code for
 
90
         'long double' arguments.])
 
91
      ;;
 
92
  esac
 
93
])
 
94
 
 
95
# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'double'
 
96
# arguments.
 
97
AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE],
 
98
[
 
99
  AC_REQUIRE([gl_PRINTF_INFINITE])
 
100
  case "$gl_cv_func_printf_infinite" in
 
101
    *yes)
 
102
      ;;
 
103
    *)
 
104
      AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], [1],
 
105
        [Define if the vasnprintf implementation needs special code for
 
106
         infinite 'double' arguments.])
 
107
      ;;
 
108
  esac
 
109
])
 
110
 
 
111
# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'long double'
 
112
# arguments.
 
113
AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE],
 
114
[
 
115
  AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
 
116
  dnl There is no need to set NEED_PRINTF_INFINITE_LONG_DOUBLE if
 
117
  dnl NEED_PRINTF_LONG_DOUBLE is already set.
 
118
  AC_REQUIRE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE])
 
119
  case "$gl_cv_func_printf_long_double" in
 
120
    *yes)
 
121
      case "$gl_cv_func_printf_infinite_long_double" in
 
122
        *yes)
 
123
          ;;
 
124
        *)
 
125
          AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], [1],
 
126
            [Define if the vasnprintf implementation needs special code for
 
127
             infinite 'long double' arguments.])
 
128
          ;;
 
129
      esac
 
130
      ;;
 
131
  esac
 
132
])
 
133
 
 
134
# Extra prerequisites of lib/vasnprintf.c for supporting the 'a' directive.
 
135
AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A],
 
136
[
 
137
  AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
 
138
  case "$gl_cv_func_printf_directive_a" in
 
139
    *yes)
 
140
      ;;
 
141
    *)
 
142
      AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1],
 
143
        [Define if the vasnprintf implementation needs special code for
 
144
         the 'a' and 'A' directives.])
 
145
      AC_CHECK_FUNCS([nl_langinfo])
 
146
      ;;
 
147
  esac
 
148
])
 
149
 
 
150
# Extra prerequisites of lib/vasnprintf.c for supporting the 'F' directive.
 
151
AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_F],
 
152
[
 
153
  AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
 
154
  case "$gl_cv_func_printf_directive_f" in
 
155
    *yes)
 
156
      ;;
 
157
    *)
 
158
      AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], [1],
 
159
        [Define if the vasnprintf implementation needs special code for
 
160
         the 'F' directive.])
 
161
      ;;
 
162
  esac
 
163
])
 
164
 
 
165
# Extra prerequisites of lib/vasnprintf.c for supporting the 'ls' directive.
 
166
AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LS],
 
167
[
 
168
  AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
 
169
  case "$gl_cv_func_printf_directive_ls" in
 
170
    *yes)
 
171
      ;;
 
172
    *)
 
173
      AC_DEFINE([NEED_PRINTF_DIRECTIVE_LS], [1],
 
174
        [Define if the vasnprintf implementation needs special code for
 
175
         the 'ls' directive.])
 
176
      ;;
 
177
  esac
 
178
])
 
179
 
 
180
# Extra prerequisites of lib/vasnprintf.c for supporting the ' flag.
 
181
AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING],
 
182
[
 
183
  AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
 
184
  case "$gl_cv_func_printf_flag_grouping" in
 
185
    *yes)
 
186
      ;;
 
187
    *)
 
188
      AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], [1],
 
189
        [Define if the vasnprintf implementation needs special code for the
 
190
         ' flag.])
 
191
      ;;
 
192
  esac
 
193
])
 
194
 
 
195
# Extra prerequisites of lib/vasnprintf.c for supporting the '-' flag.
 
196
AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST],
 
197
[
 
198
  AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
 
199
  case "$gl_cv_func_printf_flag_leftadjust" in
 
200
    *yes)
 
201
      ;;
 
202
    *)
 
203
      AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], [1],
 
204
        [Define if the vasnprintf implementation needs special code for the
 
205
         '-' flag.])
 
206
      ;;
 
207
  esac
 
208
])
 
209
 
 
210
# Extra prerequisites of lib/vasnprintf.c for supporting the 0 flag.
 
211
AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO],
 
212
[
 
213
  AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
 
214
  case "$gl_cv_func_printf_flag_zero" in
 
215
    *yes)
 
216
      ;;
 
217
    *)
 
218
      AC_DEFINE([NEED_PRINTF_FLAG_ZERO], [1],
 
219
        [Define if the vasnprintf implementation needs special code for the
 
220
         0 flag.])
 
221
      ;;
 
222
  esac
 
223
])
 
224
 
 
225
# Extra prerequisites of lib/vasnprintf.c for supporting large precisions.
 
226
AC_DEFUN([gl_PREREQ_VASNPRINTF_PRECISION],
 
227
[
 
228
  AC_REQUIRE([gl_PRINTF_PRECISION])
 
229
  case "$gl_cv_func_printf_precision" in
 
230
    *yes)
 
231
      ;;
 
232
    *)
 
233
      AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], [1],
 
234
        [Define if the vasnprintf implementation needs special code for
 
235
         supporting large precisions without arbitrary bounds.])
 
236
      AC_DEFINE([NEED_PRINTF_DOUBLE], [1],
 
237
        [Define if the vasnprintf implementation needs special code for
 
238
         'double' arguments.])
 
239
      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
 
240
        [Define if the vasnprintf implementation needs special code for
 
241
         'long double' arguments.])
 
242
      ;;
 
243
  esac
 
244
])
 
245
 
 
246
# Extra prerequisites of lib/vasnprintf.c for surviving out-of-memory
 
247
# conditions.
 
248
AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM],
 
249
[
 
250
  AC_REQUIRE([gl_PRINTF_ENOMEM])
 
251
  case "$gl_cv_func_printf_enomem" in
 
252
    *yes)
 
253
      ;;
 
254
    *)
 
255
      AC_DEFINE([NEED_PRINTF_ENOMEM], [1],
 
256
        [Define if the vasnprintf implementation needs special code for
 
257
         surviving out-of-memory conditions.])
 
258
      AC_DEFINE([NEED_PRINTF_DOUBLE], [1],
 
259
        [Define if the vasnprintf implementation needs special code for
 
260
         'double' arguments.])
 
261
      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
 
262
        [Define if the vasnprintf implementation needs special code for
 
263
         'long double' arguments.])
 
264
      ;;
 
265
  esac
 
266
])
 
267
 
 
268
# Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance.
 
269
AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS],
 
270
[
 
271
  AC_REQUIRE([gl_PREREQ_VASNPRINTF])
 
272
  gl_PREREQ_VASNPRINTF_LONG_DOUBLE
 
273
  gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
 
274
  gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
 
275
  gl_PREREQ_VASNPRINTF_DIRECTIVE_A
 
276
  gl_PREREQ_VASNPRINTF_DIRECTIVE_F
 
277
  gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
 
278
  gl_PREREQ_VASNPRINTF_FLAG_GROUPING
 
279
  gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
 
280
  gl_PREREQ_VASNPRINTF_FLAG_ZERO
 
281
  gl_PREREQ_VASNPRINTF_PRECISION
 
282
  gl_PREREQ_VASNPRINTF_ENOMEM
 
283
])
 
284
 
 
285
# Prerequisites of lib/asnprintf.c.
 
286
AC_DEFUN([gl_PREREQ_ASNPRINTF],
 
287
[
 
288
])