~ubuntu-branches/ubuntu/oneiric/pam/oneiric-proposed

« back to all changes in this revision

Viewing changes to m4/visibility.m4

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-02-17 16:15:47 UTC
  • mfrom: (3.2.15 sid)
  • Revision ID: james.westby@ubuntu.com-20110217161547-afxi0yboxvn18a5t
Tags: 1.1.2-2ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/libpam-modules.postinst: Add PATH to /etc/environment if it's
    not present there or in /etc/security/pam_env.conf. (should send to
    Debian).
  - debian/libpam0g.postinst: only ask questions during update-manager when
    there are non-default services running.
  - debian/patches-applied/series: Ubuntu patches are as below ...
  - debian/patches-applied/ubuntu-rlimit_nice_correction: Explicitly
    initialise RLIMIT_NICE rather than relying on the kernel limits.
  - Change Vcs-Bzr to point at the Ubuntu branch.
  - debian/patches-applied/pam_motd-legal-notice: display the contents of
    /etc/legal once, then set a flag in the user's homedir to prevent
    showing it again.
  - debian/update-motd.5, debian/libpam-modules.manpages: add a manpage
    for update-motd, with some best practices and notes of explanation.
  - debian/patches/update-motd-manpage-ref: add a reference in pam_motd(8)
    to update-motd(5)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# visibility.m4 serial 1 (gettext-0.15)
2
 
dnl Copyright (C) 2005 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
 
    AC_MSG_CHECKING([for simple visibility declarations])
30
 
    AC_CACHE_VAL(gl_cv_cc_visibility, [
31
 
      gl_save_CFLAGS="$CFLAGS"
32
 
      CFLAGS="$CFLAGS -fvisibility=hidden"
33
 
      AC_TRY_COMPILE(
34
 
        [extern __attribute__((__visibility__("hidden"))) int hiddenvar;
35
 
         extern __attribute__((__visibility__("default"))) int exportedvar;
36
 
         extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
37
 
         extern __attribute__((__visibility__("default"))) int exportedfunc (void);],
38
 
        [],
39
 
        gl_cv_cc_visibility=yes,
40
 
        gl_cv_cc_visibility=no)
41
 
      CFLAGS="$gl_save_CFLAGS"])
42
 
    AC_MSG_RESULT([$gl_cv_cc_visibility])
43
 
    if test $gl_cv_cc_visibility = yes; then
44
 
      CFLAG_VISIBILITY="-fvisibility=hidden"
45
 
      HAVE_VISIBILITY=1
46
 
    fi
47
 
  fi
48
 
  AC_SUBST([CFLAG_VISIBILITY])
49
 
  AC_SUBST([HAVE_VISIBILITY])
50
 
  AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
51
 
    [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
52
 
])