summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-03-29 22:31:53 (GMT)
committernijtmans <nijtmans>2010-03-29 22:31:53 (GMT)
commit1800bb7cff79bda28c05c8702f44b3fe5d069716 (patch)
treeeff66796a786683d5d37ecc0e2ada204fa740b21 /unix/tcl.m4
parent1df0c99376f51c3ea31e38fb947ba43057cafa9a (diff)
downloadtcl-1800bb7cff79bda28c05c8702f44b3fe5d069716.zip
tcl-1800bb7cff79bda28c05c8702f44b3fe5d069716.tar.gz
tcl-1800bb7cff79bda28c05c8702f44b3fe5d069716.tar.bz2
Only test for -visibility=hidden with gcc
(Second remark in [Bug 2976508])
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m413
1 files changed, 9 insertions, 4 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index d6769af..06b6ae6 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1052,10 +1052,15 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
AC_CACHE_CHECK([if compiler supports visibility "hidden"],
tcl_cv_cc_visibility_hidden, [
- hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror"
- AC_TRY_COMPILE(,, tcl_cv_cc_visibility_hidden=yes,
- tcl_cv_cc_visibility_hidden=no)
- CFLAGS=$hold_cflags])
+ AS_IF([test "$GCC" = yes], [
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fvisibility=hidden -Werror"
+ AC_TRY_COMPILE(,, tcl_cv_cc_visibility_hidden=yes,
+ tcl_cv_cc_visibility_hidden=no)
+ CFLAGS=$hold_cflags
+ ], [
+ tcl_cv_cc_visibility_hidden=no
+ ])
+ ])
AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [
CFLAGS="$CFLAGS -fvisibility=hidden"
], [