# This is used only by compress.c.
AM_ZLIB
+AC_CACHE_CHECK([compiler support for hidden visibility], bfd_cv_hidden,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+const char hw[] __attribute__ ((__visibility__ ("hidden"))) = "Hello, World\n";
+extern void print (const char *) __attribute__ ((__visibility__ ("hidden")));]],
+ [[print (hw);]])],
+ [bfd_cv_hidden=yes], [bfd_cv_hidden=no])])
+if test $bfd_cv_hidden = yes; then
+ AC_DEFINE(HAVE_HIDDEN, 1,
+ [Define if your compiler supports hidden visibility.])
+fi
+
# Check if linker supports --as-needed and --no-as-needed options
AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
[bfd_cv_ld_as_needed=no