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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
$NetBSD: patch-unix_configure,v 1.14 2021/11/16 16:24:40 adam Exp $
--- unix/configure.orig 2021-11-04 15:04:06.000000000 +0000
+++ unix/configure
@@ -6772,12 +6772,12 @@ fi
LD_SEARCH_FLAGS=""
;;
BSD/OS-4.*)
- SHLIB_CFLAGS="-export-dynamic -fPIC"
+ SHLIB_CFLAGS="-Wl,--export-dynamic -fPIC"
SHLIB_LD='${CC} -shared'
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
- LDFLAGS="$LDFLAGS -export-dynamic"
+ LDFLAGS="$LDFLAGS --export-dynamic"
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
@@ -7462,7 +7462,7 @@ fi
CC_SEARCH_FLAGS=""
LD_SEARCH_FLAGS=""
;;
- OpenBSD-*)
+ OpenBSD-*|MirBSD-*)
arch=`arch -s`
case "$arch" in
alpha|sparc64)
@@ -7483,7 +7483,7 @@ fi
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
- LDFLAGS="-Wl,-export-dynamic"
+ LDFLAGS="-Wl,--export-dynamic"
CFLAGS_OPTIMIZE="-O2"
if test "${TCL_THREADS}" = "1"; then
@@ -7505,7 +7505,7 @@ fi
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- LDFLAGS="$LDFLAGS -export-dynamic"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
if test $doRpath = yes; then
CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
@@ -7523,7 +7523,6 @@ fi
;;
Darwin-*)
- CFLAGS_OPTIMIZE="-Os"
SHLIB_CFLAGS="-fno-common"
# To avoid discrepancies between what headers configure sees during
# preprocessing tests and compiling tests, move any -isysroot and
@@ -8735,7 +8734,11 @@ fi
else
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)"'
+ if test "${SHLIB_SUFFIX}" = ".dylib" ; then
+ INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/libtcl$(MAJOR_VERSION)$(MINOR_VERSION)$(SHLIB_VERSION)$(SHLIB_SUFFIX)"'
+ else
+ INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)$(SHLIB_VERSION)"'
+ fi
fi
@@ -8770,7 +8773,7 @@ else
fi
- INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"'
+ INSTALL_STUB_LIB='$(INSTALL_DATA) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)"'
# Define TCL_LIBS now that we know what DL_LIBS is.
# The trick here is that we don't want to change the value of TCL_LIBS if
@@ -18744,9 +18747,9 @@ fi
# building libtcl as a shared library instead of a static library.
#--------------------------------------------------------------------
-TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
-TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}
-eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}"
+TCL_UNSHARED_LIB_SUFFIX=${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}.a
+TCL_SHARED_LIB_SUFFIX=${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${SHLIB_SUFFIX}
+eval "TCL_LIB_FILE=libtcl${TCL_SHARED_LIB_SUFFIX}"
# tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed
# since on some platforms TCL_LIB_FILE contains shell escapes.
@@ -18859,13 +18862,10 @@ else
eval libdir="$libdir"
# default install directory for bundled packages
PACKAGE_DIR="$libdir"
- if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
- TCL_LIB_FLAG="-ltcl${TCL_VERSION}"
- else
- TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`"
- fi
+ TCL_LIB_FLAG="-ltcl${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}"
TCL_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TCL_LIB_FLAG}"
- TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}"
+ TCL_LIB_SPEC_RPATH="${COMPILER_RPATH_FLAG}${libdir}"
+ TCL_LIB_SPEC="${TCL_LIB_SPEC_RPATH} -L${libdir} ${TCL_LIB_FLAG}"
fi
VERSION='${VERSION}'
eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
@@ -18884,10 +18884,8 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl ~/Library/Frameworks /Library/Frameworks"
test -z "$TCL_MODULE_PATH" && \
TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl"
-elif test "$prefix/lib" != "$libdir"; then
- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="{${libdir}} {${prefix}/lib} ${TCL_PACKAGE_PATH}"
else
- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="{${prefix}/lib} ${TCL_PACKAGE_PATH}"
+ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${prefix}/lib/tcl ${prefix}/lib"
fi
#--------------------------------------------------------------------
@@ -18902,12 +18900,7 @@ eval "TCL_STUB_LIB_FILE=libtclstub${TCL_
eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
eval "TCL_STUB_LIB_DIR=\"${libdir}\""
-if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
- TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}"
-else
- TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`"
-fi
-
+TCL_STUB_LIB_FLAG="-ltclstub${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}"
TCL_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}"
TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}"
@@ -19061,34 +19054,15 @@ fi
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then we branch to the quote section. Otherwise,
-# look for a macro that doesn't take arguments.
-cat >confdef2opt.sed <<\_ACEOF
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
-t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
-t quote
-d
-: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
-s,\[,\\&,g
-s,\],\\&,g
-s,\$,$$,g
-p
-_ACEOF
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
-ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f confdef2opt.sed
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
@@ -19718,6 +19692,7 @@ s,@EXTRA_BUILD_HTML@,$EXTRA_BUILD_HTML,;
s,@EXTRA_TCLSH_LIBS@,$EXTRA_TCLSH_LIBS,;t t
s,@DLTEST_LD@,$DLTEST_LD,;t t
s,@DLTEST_SUFFIX@,$DLTEST_SUFFIX,;t t
+s,@SHLIB_VERSION@,$SHLIB_VERSION,;t t
CEOF
_ACEOF
|