mirror of https://git.tukaani.org/xz.git
Build: Update visibility.m4 from Gnulib
This fixes the syntax of the "serial" line and renames a temporary variable.
This commit is contained in:
parent
6e8732c5a3
commit
c692bd42be
|
@ -1,5 +1,6 @@
|
||||||
# visibility.m4 serial 8
|
# visibility.m4
|
||||||
dnl Copyright (C) 2005, 2008, 2010-2023 Free Software Foundation, Inc.
|
# serial 9
|
||||||
|
dnl Copyright (C) 2005, 2008, 2010-2024 Free Software Foundation, Inc.
|
||||||
dnl This file is free software; the Free Software Foundation
|
dnl This file is free software; the Free Software Foundation
|
||||||
dnl gives unlimited permission to copy and/or distribute it,
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
dnl with or without modifications, as long as this notice is preserved.
|
dnl with or without modifications, as long as this notice is preserved.
|
||||||
|
@ -31,18 +32,18 @@ AC_DEFUN([gl_VISIBILITY],
|
||||||
dnl user has put into $CC $CFLAGS $CPPFLAGS.
|
dnl user has put into $CC $CFLAGS $CPPFLAGS.
|
||||||
AC_CACHE_CHECK([whether the -Werror option is usable],
|
AC_CACHE_CHECK([whether the -Werror option is usable],
|
||||||
[gl_cv_cc_vis_werror],
|
[gl_cv_cc_vis_werror],
|
||||||
[gl_save_CFLAGS="$CFLAGS"
|
[gl_saved_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -Werror"
|
CFLAGS="$CFLAGS -Werror"
|
||||||
AC_COMPILE_IFELSE(
|
AC_COMPILE_IFELSE(
|
||||||
[AC_LANG_PROGRAM([[]], [[]])],
|
[AC_LANG_PROGRAM([[]], [[]])],
|
||||||
[gl_cv_cc_vis_werror=yes],
|
[gl_cv_cc_vis_werror=yes],
|
||||||
[gl_cv_cc_vis_werror=no])
|
[gl_cv_cc_vis_werror=no])
|
||||||
CFLAGS="$gl_save_CFLAGS"
|
CFLAGS="$gl_saved_CFLAGS"
|
||||||
])
|
])
|
||||||
dnl Now check whether visibility declarations are supported.
|
dnl Now check whether visibility declarations are supported.
|
||||||
AC_CACHE_CHECK([for simple visibility declarations],
|
AC_CACHE_CHECK([for simple visibility declarations],
|
||||||
[gl_cv_cc_visibility],
|
[gl_cv_cc_visibility],
|
||||||
[gl_save_CFLAGS="$CFLAGS"
|
[gl_saved_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -fvisibility=hidden"
|
CFLAGS="$CFLAGS -fvisibility=hidden"
|
||||||
dnl We use the option -Werror and a function dummyfunc, because on some
|
dnl We use the option -Werror and a function dummyfunc, because on some
|
||||||
dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
|
dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
|
||||||
|
@ -68,7 +69,7 @@ AC_DEFUN([gl_VISIBILITY],
|
||||||
[[]])],
|
[[]])],
|
||||||
[gl_cv_cc_visibility=yes],
|
[gl_cv_cc_visibility=yes],
|
||||||
[gl_cv_cc_visibility=no])
|
[gl_cv_cc_visibility=no])
|
||||||
CFLAGS="$gl_save_CFLAGS"
|
CFLAGS="$gl_saved_CFLAGS"
|
||||||
])
|
])
|
||||||
if test $gl_cv_cc_visibility = yes; then
|
if test $gl_cv_cc_visibility = yes; then
|
||||||
CFLAG_VISIBILITY="-fvisibility=hidden"
|
CFLAG_VISIBILITY="-fvisibility=hidden"
|
||||||
|
|
Loading…
Reference in New Issue