summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorTorbjorn Granlund <torbjorng@google.com>2015-09-03 19:38:20 +0200
committerTorbjorn Granlund <torbjorng@google.com>2015-09-03 19:38:20 +0200
commit532c6875110773238302e2eff9d51d274b453d6d (patch)
treecce1cda453bc07ca196c97c22921fa6874cf43df /acinclude.m4
parent54cee637e0394aa423da151e931bf97ed8ed7a3f (diff)
downloadgmp-532c6875110773238302e2eff9d51d274b453d6d.tar.gz
(GMP_C_HIDDEN_ALIAS): New.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m419
1 files changed, 19 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index f4ac3d2d9..35da65ada 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -3249,6 +3249,25 @@ if test $gmp_cv_c_attribute_noreturn = yes; then
fi
])
+dnl GMP_C_HIDDEN_ALIAS
+dnl ------------------------
+
+AC_DEFUN([GMP_C_HIDDEN_ALIAS],
+[AC_CACHE_CHECK([whether gcc hidden aliases work],
+ gmp_cv_c_hidden_alias,
+[AC_TRY_COMPILE(
+[void hid() __attribute__ ((visibility("hidden")));
+void hid() {}
+void pub() __attribute__ ((alias("hid")));],
+, gmp_cv_c_hidden_alias=yes, gmp_cv_c_hidden_alias=no)
+])
+if test $gmp_cv_c_hidden_alias = yes; then
+ AC_DEFINE(HAVE_HIDDEN_ALIAS, 1,
+ [Define to 1 if the compiler accepts gcc style __attribute__ ((visibility))
+and __attribute__ ((alias))])
+ GMP_DEFINE(HAVE_HIDDEN_ALIAS, [])
+fi
+])
dnl GMP_C_DOUBLE_FORMAT
dnl -------------------