summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
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"
], [