diff options
author | das <das> | 2007-02-04 02:51:21 (GMT) |
---|---|---|
committer | das <das> | 2007-02-04 02:51:21 (GMT) |
commit | 88cd3810ef18b4e05cae8aebda92c41155ce7f1a (patch) | |
tree | 588a7081570533689fad036167d1fa5ff4ed5537 /unix/tcl.m4 | |
parent | 42d8740f9f7ffd03e3785f6a99f7ce57fe0cd1b5 (diff) | |
download | tcl-88cd3810ef18b4e05cae8aebda92c41155ce7f1a.zip tcl-88cd3810ef18b4e05cae8aebda92c41155ce7f1a.tar.gz tcl-88cd3810ef18b4e05cae8aebda92c41155ce7f1a.tar.bz2 |
* unix/tcl.m4: use gcc4's __attribute__((__visibility__("hidden"))) if
available to define MODULE_SCOPE effective on all platforms.
* unix/configure.in: add caching to -pipe and zoneinfo checks.
* unix/configure: autoconf-2.59
* unix/tclConfig.h.in: autoheader-2.59
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r-- | unix/tcl.m4 | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 4e90aaf..1a19fce 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1086,6 +1086,25 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ do64bit=yes fi + # Step 0.c: Check if gcc visibility support is available. Do this here so + # that platform specific alternatives can be used below if this fails. + + if test "$GCC" = "yes" ; then + AC_CACHE_CHECK([if gcc supports visibility "hidden"], + tcl_cv_cc_visibility_hidden, [ + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" + AC_TRY_LINK([ + extern __attribute__((__visibility__("hidden"))) void f(void); + void f(void) {}], [f();], tcl_cv_cc_visibility_hidden=yes, + tcl_cv_cc_visibility_hidden=no) + CFLAGS=$hold_cflags]) + if test $tcl_cv_cc_visibility_hidden = yes; then + AC_DEFINE(MODULE_SCOPE, + [extern __attribute__((__visibility__("hidden")))], + [Compiler support for module scope symbols]) + fi + fi + # Step 1: set the variable "system" to hold the name and version number # for the system. @@ -1691,9 +1710,11 @@ dnl AC_CHECK_TOOL(AR, ar) fi fi fi + if test "$tcl_cv_cc_visibility_hidden" != yes; then + AC_DEFINE(MODULE_SCOPE, [__private_extern__], + [Compiler support for module scope symbols]) + fi AC_DEFINE(MAC_OSX_TCL, 1, [Is this a Mac I see before me?]) - AC_DEFINE(MODULE_SCOPE, __private_extern__, - [Linker support for module scope symbols]) ;; NEXTSTEP-*) SHLIB_CFLAGS="" |