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

« back to all changes in this revision

Viewing changes to m4/visibility.m4

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Robert Millan, Updated translations
  • Date: 2010-11-22 12:24:56 UTC
  • mfrom: (1.26.4 upstream) (17.3.36 sid)
  • mto: (17.3.43 sid)
  • mto: This revision was merged to the branch mainline in revision 89.
  • Revision ID: james.westby@ubuntu.com-20101122122456-y82z3sfb7k4zfdcc
Tags: 1.99~20101122-1
[ Colin Watson ]
* New Bazaar snapshot.  Too many changes to list in full, but some of the
  more user-visible ones are as follows:
  - GRUB script:
    + Function parameters, "break", "continue", "shift", "setparams",
      "return", and "!".
    + "export" command supports multiple variable names.
    + Multi-line quoted strings support.
    + Wildcard expansion.
  - sendkey support.
  - USB hotunplugging and USB serial support.
  - Rename CD-ROM to cd on BIOS.
  - Add new --boot-directory option to grub-install, grub-reboot, and
    grub-set-default; the old --root-directory option is still accepted
    but was often confusing.
  - Basic btrfs detection/UUID support (but no file reading yet).
  - bash-completion for utilities.
  - If a device is listed in device.map, always assume that it is
    BIOS-visible rather than using extra layers such as LVM or RAID.
  - Add grub-mknetdir script (closes: #550658).
  - Remove deprecated "root" command.
  - Handle RAID devices containing virtio components.
  - GRUB Legacy configuration file support (via grub-menulst2cfg).
  - Keyboard layout support (via grub-mklayout and grub-kbdcomp).
  - Check generated grub.cfg for syntax errors before saving.
  - Pause execution for at most ten seconds if any errors are displayed,
    so that the user has a chance to see them.
  - Support submenus.
  - Write embedding zone using Reed-Solomon, so that it's robust against
    being partially overwritten (closes: #550702, #591416, #593347).
  - GRUB_DISABLE_LINUX_RECOVERY and GRUB_DISABLE_NETBSD_RECOVERY merged
    into a single GRUB_DISABLE_RECOVERY variable.
  - Fix loader memory allocation failure (closes: #551627).
  - Don't call savedefault on recovery entries (closes: #589325).
  - Support triple-indirect blocks on ext2 (closes: #543924).
  - Recognise DDF1 fake RAID (closes: #603354).

[ Robert Millan ]
* Use dpkg architecture wildcards.

[ Updated translations ]
* Slovenian (Vanja Cvelbar).  Closes: #604003
* Dzongkha (dawa pemo via Tenzin Dendup).  Closes: #604102

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# visibility.m4 serial 4 (gettext-0.18.2)
 
2
dnl Copyright (C) 2005, 2008, 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
dnl From Bruno Haible.
 
8
 
 
9
dnl Tests whether the compiler supports the command-line option
 
10
dnl -fvisibility=hidden and the function and variable attributes
 
11
dnl __attribute__((__visibility__("hidden"))) and
 
12
dnl __attribute__((__visibility__("default"))).
 
13
dnl Does *not* test for __visibility__("protected") - which has tricky
 
14
dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
 
15
dnl MacOS X.
 
16
dnl Does *not* test for __visibility__("internal") - which has processor
 
17
dnl dependent semantics.
 
18
dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
 
19
dnl "really only recommended for legacy code".
 
20
dnl Set the variable CFLAG_VISIBILITY.
 
21
dnl Defines and sets the variable HAVE_VISIBILITY.
 
22
 
 
23
AC_DEFUN([gl_VISIBILITY],
 
24
[
 
25
  AC_REQUIRE([AC_PROG_CC])
 
26
  CFLAG_VISIBILITY=
 
27
  HAVE_VISIBILITY=0
 
28
  if test -n "$GCC"; then
 
29
    dnl First, check whether -Werror can be added to the command line, or
 
30
    dnl whether it leads to an error because of some other option that the
 
31
    dnl user has put into $CC $CFLAGS $CPPFLAGS.
 
32
    AC_MSG_CHECKING([whether the -Werror option is usable])
 
33
    AC_CACHE_VAL([gl_cv_cc_vis_werror], [
 
34
      gl_save_CFLAGS="$CFLAGS"
 
35
      CFLAGS="$CFLAGS -Werror"
 
36
      AC_COMPILE_IFELSE(
 
37
        [AC_LANG_PROGRAM([[]], [[]])],
 
38
        [gl_cv_cc_vis_werror=yes],
 
39
        [gl_cv_cc_vis_werror=no])
 
40
      CFLAGS="$gl_save_CFLAGS"])
 
41
    AC_MSG_RESULT([$gl_cv_cc_vis_werror])
 
42
    dnl Now check whether visibility declarations are supported.
 
43
    AC_MSG_CHECKING([for simple visibility declarations])
 
44
    AC_CACHE_VAL([gl_cv_cc_visibility], [
 
45
      gl_save_CFLAGS="$CFLAGS"
 
46
      CFLAGS="$CFLAGS -fvisibility=hidden"
 
47
      dnl We use the option -Werror and a function dummyfunc, because on some
 
48
      dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
 
49
      dnl "visibility attribute not supported in this configuration; ignored"
 
50
      dnl at the first function definition in every compilation unit, and we
 
51
      dnl don't want to use the option in this case.
 
52
      if test $gl_cv_cc_vis_werror = yes; then
 
53
        CFLAGS="$CFLAGS -Werror"
 
54
      fi
 
55
      AC_COMPILE_IFELSE(
 
56
        [AC_LANG_PROGRAM(
 
57
           [[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
 
58
             extern __attribute__((__visibility__("default"))) int exportedvar;
 
59
             extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
 
60
             extern __attribute__((__visibility__("default"))) int exportedfunc (void);
 
61
             void dummyfunc (void) {}
 
62
           ]],
 
63
           [[]])],
 
64
        [gl_cv_cc_visibility=yes],
 
65
        [gl_cv_cc_visibility=no])
 
66
      CFLAGS="$gl_save_CFLAGS"])
 
67
    AC_MSG_RESULT([$gl_cv_cc_visibility])
 
68
    if test $gl_cv_cc_visibility = yes; then
 
69
      CFLAG_VISIBILITY="-fvisibility=hidden"
 
70
      HAVE_VISIBILITY=1
 
71
    fi
 
72
  fi
 
73
  AC_SUBST([CFLAG_VISIBILITY])
 
74
  AC_SUBST([HAVE_VISIBILITY])
 
75
  AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
 
76
    [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
 
77
])