Use the shared macro from config/visibility.m4.
libga68/ChangeLog:
* Makefile.in: Regenerate.
* acinclude.m4: Delete LIBGA68_CHECK_ATTRIBUTE_VISIBILITY.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* configure.ac: Use GCC_CHECK_ATTRIBUTE_VISIBILITY instead of
LIBGA68_CHECK_ATTRIBUTE_VISIBILITY.
Signed-off-by: Pietro Monteiro <[email protected]>
---
libga68/Makefile.in | 1 +
libga68/acinclude.m4 | 15 ---------------
libga68/aclocal.m4 | 1 +
libga68/configure | 12 ++++++------
libga68/configure.ac | 2 +-
5 files changed, 9 insertions(+), 22 deletions(-)
diff --git a/libga68/Makefile.in b/libga68/Makefile.in
index 09899a8ffe2..28e03a5c612 100644
--- a/libga68/Makefile.in
+++ b/libga68/Makefile.in
@@ -125,6 +125,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/no-executables.m4 \
$(top_srcdir)/../config/override.m4 \
+ $(top_srcdir)/../config/visibility.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
diff --git a/libga68/acinclude.m4 b/libga68/acinclude.m4
index 5fb7e6ea754..6c8576d71f5 100644
--- a/libga68/acinclude.m4
+++ b/libga68/acinclude.m4
@@ -9,18 +9,3 @@ dnl even the implied warranty of MERCHANTABILITY or FITNESS
FOR A
dnl PARTICULAR PURPOSE.
m4_include([m4/autoconf.m4])
-
-dnl Check whether the target supports hidden visibility.
-AC_DEFUN([LIBGA68_CHECK_ATTRIBUTE_VISIBILITY], [
- AC_CACHE_CHECK([whether the target supports hidden visibility],
- libga68_cv_have_attribute_visibility, [
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[void
__attribute__((visibility("hidden"))) foo(void) { }]], [])],
- [libga68_cv_have_attribute_visibility=yes],
- [libga68_cv_have_attribute_visibility=no])
- CFLAGS="$save_CFLAGS"])
- if test $libga68_cv_have_attribute_visibility = yes; then
- AC_DEFINE(HAVE_ATTRIBUTE_VISIBILITY, 1,
- [Define to 1 if the target supports __attribute__((visibility(...))).])
- fi])
diff --git a/libga68/aclocal.m4 b/libga68/aclocal.m4
index 830fb238bbe..1fc086f52a7 100644
--- a/libga68/aclocal.m4
+++ b/libga68/aclocal.m4
@@ -1196,6 +1196,7 @@ m4_include([../config/lthostflags.m4])
m4_include([../config/multi.m4])
m4_include([../config/no-executables.m4])
m4_include([../config/override.m4])
+m4_include([../config/visibility.m4])
m4_include([../libtool.m4])
m4_include([../ltoptions.m4])
m4_include([../ltsugar.m4])
diff --git a/libga68/configure b/libga68/configure
index fd27bd6ab6c..731476fc909 100755
--- a/libga68/configure
+++ b/libga68/configure
@@ -13227,7 +13227,7 @@ CC_FOR_BUILD=${CC_FOR_BUILD:-gcc}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target
supports hidden visibility" >&5
$as_echo_n "checking whether the target supports hidden visibility... " >&6; }
-if ${libga68_cv_have_attribute_visibility+:} false; then :
+if ${gcc_cv_have_attribute_visibility+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -13245,16 +13245,16 @@ main ()
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- libga68_cv_have_attribute_visibility=yes
+ gcc_cv_have_attribute_visibility=yes
else
- libga68_cv_have_attribute_visibility=no
+ gcc_cv_have_attribute_visibility=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$save_CFLAGS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result:
$libga68_cv_have_attribute_visibility" >&5
-$as_echo "$libga68_cv_have_attribute_visibility" >&6; }
- if test $libga68_cv_have_attribute_visibility = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result:
$gcc_cv_have_attribute_visibility" >&5
+$as_echo "$gcc_cv_have_attribute_visibility" >&6; }
+ if test $gcc_cv_have_attribute_visibility = yes; then
$as_echo "#define HAVE_ATTRIBUTE_VISIBILITY 1" >>confdefs.h
diff --git a/libga68/configure.ac b/libga68/configure.ac
index 91b5753723d..d84088febe8 100644
--- a/libga68/configure.ac
+++ b/libga68/configure.ac
@@ -171,7 +171,7 @@ CC_FOR_BUILD=${CC_FOR_BUILD:-gcc}
AC_SUBST(CC_FOR_BUILD)
# Check whether the target supports hidden visibility.
-LIBGA68_CHECK_ATTRIBUTE_VISIBILITY
+GCC_CHECK_ATTRIBUTE_VISIBILITY
# Search for needed functions in host libraries.
AC_SEARCH_LIBS([malloc], [c])
base-commit: 9127d1c42f7116bd82372f93d6cc22af89be5316
--
2.43.0