diff options
Diffstat (limited to 'gl/m4/visibility.m4')
-rw-r--r-- | gl/m4/visibility.m4 | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/gl/m4/visibility.m4 b/gl/m4/visibility.m4 index 077c476..6cbd7e5 100644 --- a/gl/m4/visibility.m4 +++ b/gl/m4/visibility.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # visibility.m4 serial 3 (gettext-0.18) | 1 | # visibility.m4 serial 5 (gettext-0.18.2) |
2 | dnl Copyright (C) 2005, 2008-2010 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2005, 2008, 2010-2013 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
@@ -12,7 +12,7 @@ dnl __attribute__((__visibility__("hidden"))) and | |||
12 | dnl __attribute__((__visibility__("default"))). | 12 | dnl __attribute__((__visibility__("default"))). |
13 | dnl Does *not* test for __visibility__("protected") - which has tricky | 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 | 14 | dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on |
15 | dnl MacOS X. | 15 | dnl Mac OS X. |
16 | dnl Does *not* test for __visibility__("internal") - which has processor | 16 | dnl Does *not* test for __visibility__("internal") - which has processor |
17 | dnl dependent semantics. | 17 | dnl dependent semantics. |
18 | dnl Does *not* test for #pragma GCC visibility push(hidden) - which is | 18 | dnl Does *not* test for #pragma GCC visibility push(hidden) - which is |
@@ -33,7 +33,8 @@ AC_DEFUN([gl_VISIBILITY], | |||
33 | AC_CACHE_VAL([gl_cv_cc_vis_werror], [ | 33 | AC_CACHE_VAL([gl_cv_cc_vis_werror], [ |
34 | gl_save_CFLAGS="$CFLAGS" | 34 | gl_save_CFLAGS="$CFLAGS" |
35 | CFLAGS="$CFLAGS -Werror" | 35 | CFLAGS="$CFLAGS -Werror" |
36 | AC_TRY_COMPILE([], [], | 36 | AC_COMPILE_IFELSE( |
37 | [AC_LANG_PROGRAM([[]], [[]])], | ||
37 | [gl_cv_cc_vis_werror=yes], | 38 | [gl_cv_cc_vis_werror=yes], |
38 | [gl_cv_cc_vis_werror=no]) | 39 | [gl_cv_cc_vis_werror=no]) |
39 | CFLAGS="$gl_save_CFLAGS"]) | 40 | CFLAGS="$gl_save_CFLAGS"]) |
@@ -51,13 +52,15 @@ AC_DEFUN([gl_VISIBILITY], | |||
51 | if test $gl_cv_cc_vis_werror = yes; then | 52 | if test $gl_cv_cc_vis_werror = yes; then |
52 | CFLAGS="$CFLAGS -Werror" | 53 | CFLAGS="$CFLAGS -Werror" |
53 | fi | 54 | fi |
54 | AC_TRY_COMPILE( | 55 | AC_COMPILE_IFELSE( |
55 | [extern __attribute__((__visibility__("hidden"))) int hiddenvar; | 56 | [AC_LANG_PROGRAM( |
56 | extern __attribute__((__visibility__("default"))) int exportedvar; | 57 | [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; |
57 | extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); | 58 | extern __attribute__((__visibility__("default"))) int exportedvar; |
58 | extern __attribute__((__visibility__("default"))) int exportedfunc (void); | 59 | extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); |
59 | void dummyfunc (void) {}], | 60 | extern __attribute__((__visibility__("default"))) int exportedfunc (void); |
60 | [], | 61 | void dummyfunc (void) {} |
62 | ]], | ||
63 | [[]])], | ||
61 | [gl_cv_cc_visibility=yes], | 64 | [gl_cv_cc_visibility=yes], |
62 | [gl_cv_cc_visibility=no]) | 65 | [gl_cv_cc_visibility=no]) |
63 | CFLAGS="$gl_save_CFLAGS"]) | 66 | CFLAGS="$gl_save_CFLAGS"]) |