diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2011-03-28 11:40:35 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2011-03-28 11:40:35 (GMT) |
commit | f5d20065645ee8d2b9005792208c5fa1405c9b7e (patch) | |
tree | 21f56eae1643f8e1d52c3cdc18d3d0cc9cae1f13 /unix | |
parent | 990a6f258a88f28274242e6730c5d495105a2940 (diff) | |
download | tcl-f5d20065645ee8d2b9005792208c5fa1405c9b7e.zip tcl-f5d20065645ee8d2b9005792208c5fa1405c9b7e.tar.gz tcl-f5d20065645ee8d2b9005792208c5fa1405c9b7e.tar.bz2 |
set default MODULE_SCOPE=extern, in case no other value is determined
Diffstat (limited to 'unix')
-rwxr-xr-x | unix/configure | 22 | ||||
-rw-r--r-- | unix/tcl.m4 | 9 |
2 files changed, 30 insertions, 1 deletions
diff --git a/unix/configure b/unix/configure index 9fbb864..8701f7e 100755 --- a/unix/configure +++ b/unix/configure @@ -6543,6 +6543,11 @@ echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6 CFLAGS="$CFLAGS -fvisibility=hidden" +cat >>confdefs.h <<\_ACEOF +#define MODULE_SCOPE extern +_ACEOF + + else @@ -8164,6 +8169,7 @@ cat >>confdefs.h <<\_ACEOF #define MODULE_SCOPE __private_extern__ _ACEOF + tcl_cv_cc_visibility_hidden=yes fi @@ -9036,6 +9042,22 @@ fi fi + if test "$tcl_cv_cc_visibility_hidden" != yes; then + + +cat >>confdefs.h <<\_ACEOF +#define MODULE_SCOPE extern +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define NO_VIZ +_ACEOF + + +fi + + if test "$SHARED_LIB_SUFFIX" = ""; then SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}' diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 9e533f0..8c9eaf0 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1055,8 +1055,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ ]) AS_IF([test $tcl_cv_cc_visibility_hidden = yes], [ CFLAGS="$CFLAGS -fvisibility=hidden" + AC_DEFINE(MODULE_SCOPE, [extern], [No need to mark inidividual symbols as hidden]) ], [ - AC_DEFINE(NO_VIZ, [], [No visibility attribute]) hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" AC_TRY_LINK([ extern __attribute__((__visibility__("hidden"))) void f(void); @@ -1663,6 +1663,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [ AC_DEFINE(MODULE_SCOPE, [__private_extern__], [Compiler support for module scope symbols]) + tcl_cv_cc_visibility_hidden=yes ]) CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" @@ -2061,6 +2062,12 @@ dnl # preprocessing tests use only CPPFLAGS. *) SHLIB_CFLAGS="-fPIC" ;; esac]) + AS_IF([test "$tcl_cv_cc_visibility_hidden" != yes], [ + AC_DEFINE(MODULE_SCOPE, [extern], + [No Compiler support for module scope symbols]) + AC_DEFINE(NO_VIZ, [], [No visibility attribute]) + ]) + AS_IF([test "$SHARED_LIB_SUFFIX" = ""], [ SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}']) AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [ |