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
|
$NetBSD: patch-ab,v 1.14 2004/03/11 01:27:05 minskim Exp $
--- configure.orig 2004-03-01 18:04:48.000000000 -0600
+++ configure
@@ -2071,6 +2071,7 @@ fi
# Step 3: set configuration options based on system name and version.
do64bit_ok=no
+ RPATH_FLAG=""
EXTRA_CFLAGS=""
TCL_EXPORT_FILE_SUFFIX=""
UNSHARED_LIB_SUFFIX=""
@@ -2496,6 +2497,9 @@ fi
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
EXTRA_CFLAGS=""
LDFLAGS=""
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ TCL_LIB_VERSIONS_OK=nodots
;;
IRIX-6.*)
SHLIB_CFLAGS=""
@@ -2521,6 +2525,9 @@ fi
esac
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=""
@@ -2545,6 +2552,9 @@ fi
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"
@@ -2626,6 +2636,9 @@ fi
EOF
+ 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"
@@ -2739,7 +2752,6 @@ 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_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
@@ -2761,13 +2773,23 @@ 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'
+ RPATH_FLAG='-Wl,-R'
+ LD_SEARCH_FLAGS='-Wl,-R${LIB_RUNTIME_DIR}'
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"
+ RPATH_FLAG='-R'
+ LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
+
fi
rm -f conftest*
@@ -3084,6 +3106,9 @@ EOF
CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
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"
@@ -3355,8 +3380,8 @@ fi
if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
LIB_SUFFIX=${SHARED_LIB_SUFFIX}
- MAKE_LIB='${SHLIB_LD} -o $@ ${SHLIB_LD_FLAGS} ${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 ${@:C/\.so.*/.la/} ${SHLIB_LD_FLAGS} ${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) $(LIB_FILE:C/\.so.*/.la/) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
else
LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
@@ -4428,7 +4453,11 @@ echo "configure:4426: checking for X11 l
for i in $dirs ; do
if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
echo "$ac_t""$i" 1>&6
- XLIBSW="-L$i -lX11"
+ if test "${RPATH_FLAG}" != ""; then
+ XLIBSW="-L$i ${RPATH_FLAG}$i -lX11"
+ else
+ XLIBSW="-L$i -lX11"
+ fi
x_libraries="$i"
break
fi
@@ -4437,7 +4466,11 @@ echo "configure:4426: checking for X11 l
if test "$x_libraries" = ""; then
XLIBSW=-lX11
else
- XLIBSW="-L$x_libraries -lX11"
+ if test "${RPATH_FLAG}" != ""; then
+ XLIBSW="-L$x_libraries ${RPATH_FLAG}$x_libraries -lX11"
+ else
+ XLIBSW="-L$x_libraries -lX11"
+ fi
fi
fi
if test "$XLIBSW" = nope ; then
@@ -4507,6 +4540,10 @@ if test "x${x_libraries}" != "x"; then
fi
if test "${TCL_LD_SEARCH_FLAGS}" = '-L${LIB_RUNTIME_DIR}'; then
LIB_RUNTIME_DIR=`echo ${LIB_RUNTIME_DIR} |sed -e 's/:/ -L/g'`
+elif test "${TCL_LD_SEARCH_FLAGS}" = '-R${LIB_RUNTIME_DIR}'; then
+ LIB_RUNTIME_DIR=`echo ${LIB_RUNTIME_DIR} |sed -e 's/:/ -R/g'`
+elif test "${TCL_LD_SEARCH_FLAGS}" = '-Wl,-R${LIB_RUNTIME_DIR}'; then
+ LIB_RUNTIME_DIR=`echo ${LIB_RUNTIME_DIR} |sed -e 's/:/ -Wl,-R/g'`
fi
# The statement below is very tricky! It actually *evaluates* the
@@ -5156,11 +5193,18 @@ eval "TK_LIB_FILE=${TK_LIB_FILE}"
if test "$SHARED_BUILD" = 0 -o $TCL_NEEDS_EXP_FILE = 0; then
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
eval TK_LIB_FLAG="-ltk${VERSION}\${TK_DBGX}"
+ eval TK_BUILD_LIB_SPEC="libtk${VERSION}\${TK_DBGX}.la"
else
eval TK_LIB_FLAG="-ltk`echo ${VERSION} | tr -d .`\${TK_DBGX}"
+ eval TK_BUILD_LIB_SPEC="libtk`echo ${VERSION} | tr -d .`\${TK_DBGX}.la"
fi
- TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}"
TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}"
+ if test "${RPATH_FLAG}" != ""; then
+ TK_LIB_SPEC_RPATH="${RPATH_FLAG}${exec_prefix}/lib"
+ else
+ TK_LIB_SPEC_RPATH=""
+ fi
+ TK_LIB_SPEC="-L${exec_prefix}/lib ${TK_LIB_SPEC_RPATH} ${TK_LIB_FLAG}"
TK_BUILD_EXP_FILE=""
TK_EXP_FILE=""
else
|