1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
$NetBSD: patch-af,v 1.1 2005/04/05 01:42:46 dmcmahill Exp $
--- tclconfig/tcl.m4.orig 2004-09-08 01:23:52.000000000 +0000
+++ tclconfig/tcl.m4
@@ -796,6 +796,7 @@ AC_DEFUN(TEA_CONFIG_CFLAGS, [
# (and we have no CC_SEARCH_FLAGS).
do64bit_ok=no
+ TCL_LIB_SPEC_RPATH=""
LDFLAGS_ORIG="$LDFLAGS"
TCL_EXPORT_FILE_SUFFIX=""
UNSHARED_LIB_SUFFIX=""
@@ -1152,6 +1153,21 @@ dnl AC_CHECK_TOOL(AR, ar, :)
fi
LD_LIBRARY_PATH_VAR="SHLIB_PATH"
;;
+ Interix-3.*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD='${TCL_CC} -shared'
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,-E"
+ CC_SEARCH_FLAGS='-Wl,-R${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-Wl,-R${LIB_RUNTIME_DIR}'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so',
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ TCL_LIB_SPEC_RPATH="-Wl,-R${exec_prefix}/lib"
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
IRIX-4.*)
SHLIB_CFLAGS="-G 0"
SHLIB_SUFFIX=".a"
@@ -1171,6 +1187,9 @@ dnl AC_CHECK_TOOL(AR, ar, :)
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ TCL_LIB_VERSIONS_OK=nodots
;;
IRIX-6.*|IRIX64-6.5*)
SHLIB_CFLAGS=""
@@ -1195,6 +1214,9 @@ dnl AC_CHECK_TOOL(AR, ar, :)
esac
LDFLAGS="$LDFLAGS -n32"
fi
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ TCL_LIB_VERSIONS_OK=nodots
;;
IRIX64-6.*)
SHLIB_CFLAGS=""
@@ -1217,6 +1239,9 @@ dnl AC_CHECK_TOOL(AR, ar, :)
LDFLAGS="$LDFLAGS -64"
fi
fi
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ TCL_LIB_VERSIONS_OK=nodots
;;
Linux*)
SHLIB_CFLAGS="-fPIC"
@@ -1258,6 +1283,9 @@ dnl AC_CHECK_TOOL(AR, ar, :)
CFLAGS="$CFLAGS -fno-inline"
fi
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ TCL_LIB_VERSIONS_OK=nodots
;;
GNU*)
SHLIB_CFLAGS="-fPIC"
@@ -1301,27 +1329,34 @@ dnl AC_CHECK_TOOL(AR, ar, :)
LD_SEARCH_FLAGS=""
;;
NetBSD-*|FreeBSD-[[1-2]].*)
+ if test "X${COMPILER_OPTIMIZATION_BUG}" = "XYES"; then
+ CFLAGS_OPTIMIZE=-O0
+ fi
# Not available on all versions: check for include file.
AC_CHECK_HEADER(dlfcn.h, [
# NetBSD/SPARC needs -fPIC, -fpic will not do.
SHLIB_CFLAGS="-fPIC"
- SHLIB_LD="ld -Bshareable -x"
SHLIB_LD_LIBS=""
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
AC_MSG_CHECKING([for ELF])
AC_EGREP_CPP(yes, [
#ifdef __ELF__
yes
#endif
- ],
+ ], [
AC_MSG_RESULT([yes])
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so',
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ SHLIB_LD='${TCL_CC} -shared -Wl,-x'
+ LD_SEARCH_FLAGS='-Wl,-R${LIB_RUNTIME_DIR}'
+ ], [
AC_MSG_RESULT([no])
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
- )
+ SHLIB_LD="ld -Bshareable -x"
+ LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
+ TCL_LIB_SPEC_RPATH="-R${exec_prefix}/lib"
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.0.0'
+ ])
], [
SHLIB_CFLAGS=""
SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
@@ -1605,6 +1640,9 @@ dnl AC_CHECK_TOOL(AR, ar, :)
SHLIB_LD="/usr/ccs/bin/ld -G -z text"
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
fi
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ TCL_LIB_VERSIONS_OK=nodots
;;
ULTRIX-4.*)
SHLIB_CFLAGS="-G 0"
@@ -2982,7 +3020,7 @@ AC_DEFUN(TEA_MAKE_LIB, [
MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)"
else
MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)"
- MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_FLAGS} \${SHLIB_LD_LIBS}"
+ MAKE_SHARED_LIB="\${SHLIB_LD} -o \${@:C/\.so.*/.la/} \${PKG_OBJECTS:.o=.lo} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} -version-info 0:0"
MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)"
fi
@@ -3154,7 +3192,7 @@ AC_DEFUN(TEA_PRIVATE_TCL_HEADERS, [
TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
else
- TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)'
+ TCL_TOP_DIR_NATIVE='$(TCL_HEADER_DIR)'
TCL_GENERIC_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/generic'
TCL_UNIX_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/unix'
TCL_WIN_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/win'
|