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
|
$NetBSD: patch-ab,v 1.33 2006/02/23 23:30:57 minskim Exp $
--- unix/configure.orig 2005-12-06 16:03:33.000000000 +0000
+++ unix/configure
@@ -2542,12 +2542,13 @@ fi
# Step 3: set configuration options based on system name and version.
do64bit_ok=no
+ TCL_LIB_SPEC_RPATH=""
LDFLAGS_ORIG="$LDFLAGS"
TCL_EXPORT_FILE_SUFFIX=""
UNSHARED_LIB_SUFFIX=""
TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
ECHO_VERSION='`echo ${VERSION}`'
- TCL_LIB_VERSIONS_OK=ok
+ TCL_LIB_VERSIONS_OK=nodots
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE=-O
if test "$GCC" = "yes" ; then
@@ -2962,6 +2963,21 @@ fi
LD_LIBRARY_PATH_VAR="SHLIB_PATH"
fi
;;
+ 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"
@@ -3202,6 +3218,9 @@ fi
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_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
@@ -3234,13 +3253,11 @@ if eval "test \"`echo '$ac_cv_header_'$a
# NetBSD/SPARC needs -fPIC, -fpic will not do.
SHLIB_CFLAGS="-fPIC"
- SHLIB_LD="ld -Bshareable -x"
- SHLIB_LD_LIBS=""
+ SHLIB_LD_LIBS='${LIBS}'
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
echo $ac_n "checking for ELF""... $ac_c" 1>&6
echo "configure:3246: checking for ELF" >&5
cat > conftest.$ac_ext <<EOF
@@ -3255,11 +3272,20 @@ EOF
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,-R${LIB_RUNTIME_DIR}'
+ TCL_LIB_SPEC_RPATH="-Wl,-R${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
@@ -3348,7 +3374,7 @@ rm -f conftest*
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
TCL_LIB_VERSIONS_OK=nodots
;;
- FreeBSD-*)
+ FreeBSD-*|DragonFly-*)
# FreeBSD 3.* and greater have ELF.
SHLIB_CFLAGS="-fPIC"
SHLIB_LD="ld -Bshareable -x"
@@ -4301,16 +4327,16 @@ fi
fi
if test "$SHARED_LIB_SUFFIX" = "" ; then
- SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}${SHLIB_SUFFIX}'
fi
if test "$UNSHARED_LIB_SUFFIX" = "" ; then
- UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
fi
if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
LIB_SUFFIX=${SHARED_LIB_SUFFIX}
- MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
+ MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS:.o=.lo} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS} -version-info 1:0'
+ INSTALL_LIB='$(INSTALL_LIBRARY) $(TCL_LA_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
else
LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
@@ -7785,7 +7811,7 @@ else
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${libdir} ${TCL_LIB_FLAG}"
+ TCL_LIB_SPEC="${TCL_LIB_SPEC_RPATH} -L${libdir} ${TCL_LIB_FLAG}"
else
TCL_BUILD_EXP_FILE="lib.exp"
eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}"
@@ -7816,13 +7842,21 @@ VERSION=${TCL_VERSION}
#--------------------------------------------------------------------
if test "$FRAMEWORK_BUILD" = "1" ; then
- TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks"
+ TCL_PACKAGE_PATH_ADD="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks"
elif test "$prefix" != "$exec_prefix"; then
- TCL_PACKAGE_PATH="${libdir} ${prefix}/lib"
+ TCL_PACKAGE_PATH_ADD="${libdir}/tcl ${prefix}/lib"
else
- TCL_PACKAGE_PATH="${prefix}/lib"
+ TCL_PACKAGE_PATH_ADD="${prefix}/lib/tcl"
fi
+for dir in ${TCL_PACKAGE_PATH_ADD}; do
+ if test -z "${TCL_PACKAGE_PATH}"; then
+ TCL_PACKAGE_PATH="$dir"
+ else
+ TCL_PACKAGE_PATH="${TCL_PACKAGE_PATH} $dir"
+ fi
+done
+
# If a system share directory like /usr/local/share already exists, then add
# it to the package search path.
|