3 --- configure.orig 2004-03-02 00:58:59.000000000 +0100
5 @@ -5552,7 +5552,7 @@ echo "configure:5543: checking system ve
6 # results, and the version is kept in special file).
8 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
9 - system=MP-RAS-`awk '{print }' /etc/.relid'`
10 + system=MP-RAS-`awk '{print }' /etc/.relid`
12 if test "`uname -s`" = "AIX" ; then
13 system=AIX-`uname -v`.`uname -r`
14 @@ -5613,12 +5613,13 @@ fi
15 # Step 3: set configuration options based on system name and version.
18 + TCL_LIB_SPEC_RPATH=""
20 TCL_EXPORT_FILE_SUFFIX=""
21 UNSHARED_LIB_SUFFIX=""
22 TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
23 ECHO_VERSION='`echo ${VERSION}`'
24 - TCL_LIB_VERSIONS_OK=ok
25 + TCL_LIB_VERSIONS_OK=nodots
28 if test "$GCC" = "yes" ; then
29 @@ -5682,7 +5683,7 @@ fi
36 LD_LIBRARY_PATH_VAR="LIBPATH"
38 @@ -5693,7 +5694,7 @@ fi
44 RANLIB="${RANLIB} -X64"
47 @@ -5734,7 +5735,7 @@ fi
53 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
54 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
55 LD_LIBRARY_PATH_VAR="LIBPATH"
56 @@ -5754,7 +5755,7 @@ fi
62 RANLIB="${RANLIB} -X64"
65 @@ -5830,7 +5831,7 @@ EOF
74 @@ -5841,7 +5842,7 @@ EOF
78 - LDFLAGS="-export-dynamic"
79 + LD_FLAGS="-export-dynamic"
83 @@ -5852,7 +5853,7 @@ EOF
92 @@ -5916,7 +5917,7 @@ fi
93 SHLIB_LD_LIBS='${LIBS}'
94 DL_OBJS="tclLoadShl.o"
98 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
99 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
100 LD_LIBRARY_PATH_VAR="SHLIB_PATH"
101 @@ -5952,10 +5953,10 @@ fi
103 if test "`uname -m`" = "ia64" ; then
105 - LDFLAGS="+DD64 $LDFLAGS"
106 + LD_FLAGS="+DD64 $LD_FLAGS"
108 EXTRA_CFLAGS="+DA2.0W"
109 - LDFLAGS="+DA2.0W $LDFLAGS"
110 + LD_FLAGS="+DA2.0W $LD_FLAGS"
114 @@ -6009,7 +6010,7 @@ fi
116 DL_OBJS="tclLoadShl.o"
120 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
121 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
122 LD_LIBRARY_PATH_VAR="SHLIB_PATH"
123 @@ -6022,7 +6023,7 @@ fi
124 SHLIB_LD_LIBS='${LIBS}'
125 DL_OBJS="tclLoadAout.o"
127 - LDFLAGS="-Wl,-D,08000000"
128 + LD_FLAGS="-Wl,-D,08000000"
129 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
130 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
131 SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
132 @@ -6037,7 +6038,7 @@ fi
133 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
134 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
141 @@ -6050,7 +6051,7 @@ fi
142 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
143 if test "$GCC" = "yes" ; then
144 EXTRA_CFLAGS="-mabi=n32"
145 - LDFLAGS="-mabi=n32"
146 + LD_FLAGS="-mabi=n32"
150 @@ -6061,7 +6062,7 @@ fi
159 @@ -6071,7 +6072,7 @@ fi
161 DL_OBJS="tclLoadDl.o"
165 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
166 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
168 @@ -6084,7 +6085,7 @@ fi
170 SHLIB_LD="ld -64 -shared -rdata_shared"
177 @@ -6103,7 +6104,7 @@ fi
178 SHLIB_LD="${CC} -shared"
179 DL_OBJS="tclLoadDl.o"
181 - LDFLAGS="-rdynamic"
182 + LD_FLAGS="-rdynamic"
183 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
184 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
186 @@ -6139,7 +6140,7 @@ if eval "test \"`echo '$ac_cv_header_'$a
187 SHLIB_LD="ld -shared"
188 DL_OBJS="tclLoadDld.o"
195 @@ -6178,7 +6179,7 @@ EOF
196 SHLIB_LD="${CC} -shared"
199 - LDFLAGS="-rdynamic"
200 + LD_FLAGS="-rdynamic"
204 @@ -6214,7 +6215,7 @@ if eval "test \"`echo '$ac_cv_header_'$a
205 SHLIB_LD="ld -shared"
213 @@ -6233,7 +6234,7 @@ fi
215 DL_OBJS="tclLoadDl.o"
222 @@ -6244,11 +6245,14 @@ fi
224 DL_OBJS="tclLoadDl.o"
226 - LDFLAGS="-Wl,-Bexport"
227 + LD_FLAGS="-Wl,-Bexport"
231 NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
232 + if test "X${COMPILER_OPTIMIZATION_BUG}" = "XYES"; then
233 + CFLAGS_OPTIMIZE=-O0
235 # Not available on all versions: check for include file.
236 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
237 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
238 @@ -6281,18 +6285,16 @@ if eval "test \"`echo '$ac_cv_header_'$a
240 # NetBSD/SPARC needs -fPIC, -fpic will not do.
242 - SHLIB_LD="ld -Bshareable -x"
245 DL_OBJS="tclLoadDl.o"
249 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
250 - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
251 echo $ac_n "checking for ELF""... $ac_c" 1>&6
252 -echo "configure:6294: checking for ELF" >&5
253 +echo "configure:6308: checking for ELF" >&5
254 cat > conftest.$ac_ext <<EOF
255 -#line 6296 "configure"
256 +#line 6310 "configure"
257 #include "confdefs.h"
260 @@ -6303,11 +6305,20 @@ EOF
261 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
262 egrep "yes" >/dev/null 2>&1; then
264 - echo "$ac_t""yes" 1>&6
266 + echo "$ac_t""yes" 1>&6
267 + SHLIB_LD='${TCL_CC} -shared -Wl,-x'
268 + LD_SEARCH_FLAGS='-Wl,-R${LIB_RUNTIME_DIR}'
269 + TCL_LIB_SPEC_RPATH="-Wl,-R${exec_prefix}/lib"
270 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
274 - echo "$ac_t""no" 1>&6
276 + echo "$ac_t""no" 1>&6
277 + SHLIB_LD="ld -Bshareable -x"
278 + LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
279 + TCL_LIB_SPEC_RPATH="-R${exec_prefix}/lib"
280 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
283 @@ -6323,7 +6334,7 @@ else
285 DL_OBJS="tclLoadAout.o"
289 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
290 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
291 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
292 @@ -6336,7 +6347,7 @@ fi
293 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
294 TCL_LIB_VERSIONS_OK=nodots
297 + FreeBSD-*|DragonFly-*)
298 # FreeBSD 3.* and greater have ELF.
300 SHLIB_LD="ld -Bshareable -x"
301 @@ -6344,23 +6355,23 @@ fi
303 DL_OBJS="tclLoadDl.o"
305 - LDFLAGS="-export-dynamic"
306 + LD_FLAGS="-export-dynamic"
307 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
308 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
309 if test "${TCL_THREADS}" = "1" ; then
310 # The -pthread needs to go in the CFLAGS, not LIBS
311 LIBS=`echo $LIBS | sed s/-pthread//`
312 EXTRA_CFLAGS="-pthread"
313 - LDFLAGS="$LDFLAGS -pthread"
314 + LD_FLAGS="$LD_FLAGS -pthread"
318 # FreeBSD-3 doesn't handle version numbers with dots.
319 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
320 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
321 TCL_LIB_VERSIONS_OK=nodots
324 + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
327 SHLIB_CFLAGS="-fno-common"
328 @@ -6372,7 +6383,7 @@ fi
329 DL_OBJS="tclLoadDyld.o"
330 PLAT_OBJS="tclMacOSXBundle.o"
333 + LD_FLAGS="-prebind"
336 CFLAGS_OPTIMIZE="-Os"
337 @@ -6389,7 +6400,7 @@ fi
339 DL_OBJS="tclLoadNext.o"
346 @@ -6409,7 +6420,7 @@ EOF
348 DL_OBJS="tclLoadOSF.o"
355 @@ -6425,7 +6436,7 @@ EOF
357 DL_OBJS="tclLoadDl.o"
364 @@ -6441,7 +6452,7 @@ EOF
366 DL_OBJS="tclLoadDl.o"
370 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
371 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
372 if test "$GCC" = "yes" ; then
373 @@ -6458,7 +6469,7 @@ EOF
374 LIBS="$LIBS -lpthread -lmach -lexc"
376 EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
378 + LD_FLAGS="-pthread"
382 @@ -6473,7 +6484,7 @@ EOF
383 DL_OBJS="tclLoadDl.o"
384 # dlopen is in -lc on QNX
391 @@ -6484,7 +6495,7 @@ EOF
393 DL_OBJS="tclLoadAout.o"
395 - LDFLAGS="-Wl,-D,08000000"
396 + LD_FLAGS="-Wl,-D,08000000"
397 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
398 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
400 @@ -6494,10 +6505,10 @@ EOF
402 if test "$GCC" = "yes" ; then
403 SHLIB_CFLAGS="-fPIC -melf"
404 - LDFLAGS="-melf -Wl,-Bexport"
405 + LD_FLAGS="-melf -Wl,-Bexport"
407 SHLIB_CFLAGS="-Kpic -belf"
408 - LDFLAGS="-belf -Wl,-Bexport"
409 + LD_FLAGS="-belf -Wl,-Bexport"
413 @@ -6514,7 +6525,7 @@ EOF
415 DL_OBJS="tclLoadDl.o"
422 @@ -6525,7 +6536,7 @@ EOF
424 DL_OBJS="tclLoadDl.o"
428 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
429 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
431 @@ -6561,7 +6572,7 @@ EOF
433 DL_OBJS="tclLoadDl.o"
437 if test "$GCC" = "yes" ; then
438 SHLIB_LD="$CC -shared"
439 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
440 @@ -6587,7 +6598,7 @@ EOF
447 # Check to enable 64-bit flags for compiler/linker
448 if test "$do64bit" = "yes" ; then
449 @@ -6599,10 +6610,10 @@ EOF
451 if test "$do64bitVIS" = "yes" ; then
452 EXTRA_CFLAGS="-xarch=v9a"
453 - LDFLAGS="-xarch=v9a"
454 + LD_FLAGS="-xarch=v9a"
456 EXTRA_CFLAGS="-xarch=v9"
457 - LDFLAGS="-xarch=v9"
458 + LD_FLAGS="-xarch=v9"
462 @@ -6634,7 +6645,7 @@ EOF
463 SHLIB_LD_LIBS='${LIBS}'
464 DL_OBJS="tclLoadAout.o"
466 - LDFLAGS="-Wl,-D,08000000"
467 + LD_FLAGS="-Wl,-D,08000000"
468 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
469 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
470 if test "$GCC" != "yes" ; then
471 @@ -6675,9 +6686,9 @@ rm -f conftest*
472 LDFLAGS=$hold_ldflags
473 echo "$ac_t""$found" 1>&6
474 if test $found = yes; then
475 - LDFLAGS="-Wl,-Bexport"
476 + LD_FLAGS="-Wl,-Bexport"
483 @@ -6852,7 +6863,7 @@ fi
485 DL_OBJS="tclLoadNone.o"
492 @@ -6889,16 +6900,16 @@ fi
495 if test "$SHARED_LIB_SUFFIX" = "" ; then
496 - SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
497 + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}${SHLIB_SUFFIX}'
499 if test "$UNSHARED_LIB_SUFFIX" = "" ; then
500 - UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
501 + UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
504 if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
505 LIB_SUFFIX=${SHARED_LIB_SUFFIX}
506 - MAKE_LIB='${SHLIB_LD} -o $@ ${SHLIB_LD_FLAGS} ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
507 - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
508 + MAKE_LIB='${SHLIB_LD} -o $@ ${SHLIB_LD_FLAGS} ${OBJS:.o=.lo} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS} -version-info 1:0'
509 + INSTALL_LIB='$(INSTALL_LIBRARY) $(TCL_LA_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
511 LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
513 @@ -7113,7 +7124,7 @@ echo "configure:7105: checking FIONBIO v
514 # results, and the version is kept in special file).
516 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
517 - system=MP-RAS-`awk '{print }' /etc/.relid'`
518 + system=MP-RAS-`awk '{print }' /etc/.relid`
520 if test "`uname -s`" = "AIX" ; then
521 system=AIX-`uname -v`.`uname -r`
522 @@ -7217,7 +7228,7 @@ elif test "$SHARED_BUILD" = "0" || test
523 TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"
525 TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}"
526 - TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}"
527 + TCL_LIB_SPEC="${TCL_LIB_SPEC_RPATH} -L${libdir} ${TCL_LIB_FLAG}"
529 TCL_BUILD_EXP_FILE="lib.exp"
530 eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}"
531 @@ -7247,13 +7258,19 @@ VERSION=${TCL_VERSION}
532 #--------------------------------------------------------------------
534 if test "$FRAMEWORK_BUILD" = "1" ; then
535 - TCL_PACKAGE_PATH="${libdir}/Resources/Scripts"
536 + TCL_PACKAGE_PATH_ADD="${libdir}/Resources/Scripts"
537 elif test "$prefix" != "$exec_prefix"; then
538 - TCL_PACKAGE_PATH="${libdir} ${prefix}/lib"
539 + TCL_PACKAGE_PATH_ADD="${libdir}/tcl ${prefix}/lib"
541 - TCL_PACKAGE_PATH="${prefix}/lib"
542 + TCL_PACKAGE_PATH_ADD="${prefix}/lib/tcl"
545 +for dir in ${TCL_PACKAGE_PATH_ADD}; do
546 + if test -z "${TCL_PACKAGE_PATH}"; then
547 + TCL_PACKAGE_PATH="$dir"
549 + TCL_PACKAGE_PATH="${TCL_PACKAGE_PATH} $dir"
552 #--------------------------------------------------------------------
553 # The statements below define various symbols relating to Tcl
555 @@ -7487,6 +7506,7 @@ s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
556 s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
557 s%@CC_SEARCH_FLAGS@%$CC_SEARCH_FLAGS%g
558 s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
559 +s%@LD_FLAGS@%$LD_FLAGS%g
560 s%@STLIB_LD@%$STLIB_LD%g
561 s%@SHLIB_LD@%$SHLIB_LD%g
562 s%@TCL_SHLIB_LD_EXTRAS@%$TCL_SHLIB_LD_EXTRAS%g