summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2011-03-28 11:44:25 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2011-03-28 11:44:25 (GMT)
commit7bf18296dfe77d9d8b6813d4cb9ae92a4c9bf45a (patch)
tree1d172f235cb7256e46fd1eb63cf260a34c7e8804
parenta74bb22f7f9037966e5b6fd81c92fff6e41fa77e (diff)
downloadtk-7bf18296dfe77d9d8b6813d4cb9ae92a4c9bf45a.zip
tk-7bf18296dfe77d9d8b6813d4cb9ae92a4c9bf45a.tar.gz
tk-7bf18296dfe77d9d8b6813d4cb9ae92a4c9bf45a.tar.bz2
set default MODULE_SCOPE=extern, in case no other value is determined
-rwxr-xr-xunix/configure25
-rw-r--r--unix/tcl.m49
-rwxr-xr-xwin/configure5
-rw-r--r--win/tcl.m41
4 files changed, 35 insertions, 5 deletions
diff --git a/unix/configure b/unix/configure
index 7d41649..e44463a 100755
--- a/unix/configure
+++ b/unix/configure
@@ -4380,13 +4380,13 @@ echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6
CFLAGS="$CFLAGS -fvisibility=hidden"
-else
-
-
cat >>confdefs.h <<\_ACEOF
-#define NO_VIZ
+#define MODULE_SCOPE extern
_ACEOF
+
+else
+
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -6001,6 +6001,7 @@ cat >>confdefs.h <<\_ACEOF
#define MODULE_SCOPE __private_extern__
_ACEOF
+ tcl_cv_cc_visibility_hidden=yes
fi
@@ -6873,6 +6874,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" = ""], [
diff --git a/win/configure b/win/configure
index 271bc3a..8bc626f 100755
--- a/win/configure
+++ b/win/configure
@@ -3239,6 +3239,11 @@ echo "${ECHO_T}$CELIB_DIR" >&6
# Set some defaults (may get changed below)
EXTRA_CFLAGS=""
+cat >>confdefs.h <<\_ACEOF
+#define MODULE_SCOPE extern
+_ACEOF
+
+
# Extract the first word of "cygpath", so it can be a program name with args.
set dummy cygpath; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
diff --git a/win/tcl.m4 b/win/tcl.m4
index 51498d6..5b72e1b 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -402,6 +402,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
# Set some defaults (may get changed below)
EXTRA_CFLAGS=""
+ AC_DEFINE(MODULE_SCOPE, [extern], [No need to mark inidividual symbols as hidden])
AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)