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
|
$NetBSD: patch-ab,v 1.11 2001/07/25 19:42:58 jlam Exp $
--- configure.orig Tue Aug 8 12:17:11 2000
+++ configure
@@ -4766,6 +4766,7 @@
do64bit_ok=no
fullSrcDir=`cd $srcdir; pwd`
+ TCL_LIB_SPEC_RPATH=""
EXTRA_CFLAGS=""
TCL_EXPORT_FILE_SUFFIX=""
UNSHARED_LIB_SUFFIX=""
@@ -5033,20 +5034,23 @@
LD_SEARCH_FLAGS=""
;;
NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
+ if test "X${COMPILER_OPTIMIZATION_BUG}" = "XYES"; then
+ CFLAGS_OPTIMIZE=-O0
+ fi
# Not available on all versions: check for include file.
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:5040: checking for dlfcn.h" >&5
+echo "configure:5044: checking for dlfcn.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5045 "configure"
+#line 5049 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5065,17 +5069,15 @@
# 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=""
LDFLAGS=""
- LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:5077: checking for ELF" >&5
+echo "configure:5079: checking for ELF" >&5
cat > conftest.$ac_ext <<EOF
-#line 5079 "configure"
+#line 5081 "configure"
#include "confdefs.h"
#ifdef __ELF__
@@ -5086,11 +5088,20 @@
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
- echo "$ac_t""yes" 1>&6
+
+ echo "$ac_t""yes" 1>&6
+ SHLIB_LD='${TCL_CC} -shared -Wl,-x'
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ TCL_LIB_SPEC_RPATH="-Wl,-rpath,${exec_prefix}/lib"
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+
else
rm -rf conftest*
- echo "$ac_t""no" 1>&6
+
+ echo "$ac_t""no" 1>&6
+ 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.1.0'
fi
@@ -5789,7 +5800,7 @@
if test "x$DL_OBJS" = "xtclLoadAout.o"; then
MAKE_LIB="ar cr \${TCL_LIB_FILE} \${OBJS}"
else
- MAKE_LIB="\${SHLIB_LD} -o \${TCL_LIB_FILE} \${OBJS} ${SHLIB_LD_LIBS}"
+ MAKE_LIB="\${SHLIB_LD} -o \${TCL_LIB_FILE:C/\.so.*/.la/} \${OBJS:.o=.lo} ${SHLIB_LD_LIBS} -version-info 1:0"
RANLIB=":"
fi
else
@@ -5829,7 +5840,7 @@
TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"
fi
TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}"
- TCL_LIB_SPEC="-L${exec_prefix}/lib ${TCL_LIB_FLAG}"
+ TCL_LIB_SPEC="${TCL_LIB_SPEC_RPATH} -L${exec_prefix}/lib ${TCL_LIB_FLAG}"
else
TCL_BUILD_EXP_FILE="lib.exp"
eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}"
@@ -5859,9 +5870,9 @@
#--------------------------------------------------------------------
if test "$prefix" != "$exec_prefix"; then
- TCL_PACKAGE_PATH="${exec_prefix}/lib ${prefix}/lib"
+ TCL_PACKAGE_PATH="${exec_prefix}/lib/tcl ${prefix}/lib"
else
- TCL_PACKAGE_PATH="${prefix}/lib"
+ TCL_PACKAGE_PATH="${prefix}/lib/tcl"
fi
#--------------------------------------------------------------------
@@ -5943,6 +5954,8 @@
+
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -6106,6 +6119,8 @@
s%@TCL_STUB_LIB_PATH@%$TCL_STUB_LIB_PATH%g
s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
s%@BUILD_DLTEST@%$BUILD_DLTEST%g
+s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
+s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
s%@CFG_TCL_SHARED_LIB_SUFFIX@%$CFG_TCL_SHARED_LIB_SUFFIX%g
s%@CFG_TCL_UNSHARED_LIB_SUFFIX@%$CFG_TCL_UNSHARED_LIB_SUFFIX%g
s%@CFG_TCL_EXPORT_FILE_SUFFIX@%$CFG_TCL_EXPORT_FILE_SUFFIX%g
|