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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
|
$NetBSD: patch-ay,v 1.2 2007/01/13 11:27:03 joerg Exp $
--- configure.orig 1996-06-24 00:59:45.000000000 +0000
+++ configure
@@ -1468,6 +1468,8 @@ else
d=""
fi
+tcldir=tcl8.3
+tcllib=tcl83
if test "$d" != "" ; then
if test ! -d $d ; then
echo "'$d' is not a directory"
@@ -1478,8 +1480,8 @@ if test "$d" != "" ; then
echo "can't find tcl.h in $d/include"
exit 1
fi
- places="$d/lib/libtcl7.5.so \
- $d/lib/libtcl7.5.a \
+ places="$d/lib/lib${tcllib}.so \
+ $d/lib/lib${tcllib}.a \
$d/lib/libtcl.so \
$d/lib/libtcl.a"
V_LIB_TCL=FAIL
@@ -1493,7 +1495,7 @@ if test "$d" != "" ; then
echo "can't find libtcl.a in $d/lib"
exit 1
fi
- places="$d/lib/tcl7.5 \
+ places="$d/lib/${tcldir} \
$d/lib/tcl"
V_LIBRARY_TCL=FAIL
for dir in $places; do
@@ -1513,23 +1515,26 @@ else
#include <tcl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:1715: \"$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*
V_INCLUDE_TCL=""
else
echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
V_INCLUDE_TCL=FAIL
fi
rm -f conftest*
if test "$V_INCLUDE_TCL" = FAIL; then
echo "checking for tcl.h"
- places="$PWD/../tcl7.5 \
- /usr/src/local/tcl7.5 \
- /import/tcl/include/tcl7.5 \
+ places="$PWD/../${tcldir} \
+ /usr/src/local/${tcldir} \
+ /import/tcl/include/${tcldir} \
$prefix/include \
+ $prefix/include/${tcldir} \
$x_includes/tk \
$x_includes \
/usr/local/include \
@@ -1546,81 +1551,43 @@ rm -f conftest*
exit 1
fi
fi
- echo $ac_n "checking for -ltcl7.5""... $ac_c" 1>&6
-ac_lib_var=`echo tcl7.5'_'main | tr './+\055' '__p_'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ltcl7.5 $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1558 "configure"
-#include "confdefs.h"
-
-int main() { return 0; }
-int t() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:1566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- V_LIB_TCL="-ltcl7.5"
-else
- echo "$ac_t""no" 1>&6
-V_LIB_TCL="FAIL"
-fi
-
- if test "$V_LIB_TCL" = FAIL; then
- echo "checking for libtcl.a"
- places="\
- $prefix/lib \
- $x_libraries \
- /usr/contrib/lib \
- /usr/local/lib \
- /usr/lib \
- $PWD/../tcl7.5 \
- /usr/src/local/tcl7.5 \
- /import/tcl/lib/tcl7.5 \
- "
- for dir in $places; do
- if test -r $dir/libtcl7.5.so -o -r $dir/libtcl7.5.a; then
- V_LIB_TCL="-L$dir -ltcl7.5"
- break
- fi
- if test -r $dir/libtcl.so -o -r $dir/libtcl.a; then
- V_LIB_TCL="-L$dir -ltcl"
- break
- fi
- done
- if test "$V_LIB_TCL" = FAIL; then
- echo "can't find libtcl.a"
- exit 1
- else
- if test $solaris ; then
- V_LIB_TCL="-R$dir $V_LIB_TCL"
- fi
+ V_TCL_CONFIG=FAIL
+ echo "checking for tclConfig.sh"
+ places="/usr/local/lib/${tcldir} \
+ /usr/contrib/lib/${tcldir} \
+ /usr/lib/${tcldir} \
+ /usr/lib/tk/${tcldir} \
+ /import/tcl/lib/${tcldir} \
+ $prefix/lib/${tcldir} \
+ $x_libraries/${tcldir} \
+ /usr/local/lib/tcl \
+ /usr/lib/tcl \
+ /usr/lib/tk/tcl \
+ /import/tcl/lib/tcl \
+ $prefix/lib/tcl \
+ $x_libraries/tcl \
+ $x_libraries/tcl"
+ for dir in $places; do
+ if test -r $dir/tclConfig.sh ; then
+ V_TCL_CONFIG=$dir/tclConfig.sh
+ break
fi
+ done
+ if test "$V_TCL_CONFIG" = FAIL; then
+ echo "can't find tclConfig.sh"
+ exit 1
fi
+ . ${V_TCL_CONFIG}
+ V_LIB_TCL="${TCL_LIB_FLAG}"
echo "checking for tcl/init.tcl"
V_LIBRARY_TCL=FAIL
- places="/usr/local/lib/tcl7.5 \
- /usr/contrib/lib/tcl7.5 \
- /usr/lib/tcl7.5 \
- /usr/lib/tk/tcl7.5 \
- /import/tcl/lib/tcl7.5 \
- $prefix/lib/tcl7.5 \
- $x_libraries/tcl7.5 \
+ places="/usr/local/lib/${tcldir} \
+ /usr/contrib/lib/${tcldir} \
+ /usr/lib/${tcldir} \
+ /usr/lib/tk/${tcldir} \
+ /import/tcl/lib/${tcldir} \
+ $prefix/lib/${tcldir} \
+ $x_libraries/${tcldir} \
/usr/local/lib/tcl \
/usr/lib/tcl \
/usr/lib/tk/tcl \
@@ -1651,6 +1618,8 @@ else
d=""
fi
+tkdir=tk8.3
+tklib=tk83
if test "$d" != "" ; then
if test ! -d $d ; then
echo "'$d' is not a directory"
@@ -1661,8 +1630,8 @@ if test "$d" != "" ; then
echo "can't find tk.h in $d/include"
exit 1
fi
- places="$d/lib/libtk4.1.so \
- $d/lib/libtk4.1.a \
+ places="$d/lib/lib${tklib}.so \
+ $d/lib/lib${tklib}.a \
$d/lib/libtk.so \
$d/lib/libtk.a"
V_LIB_TK=FAIL
@@ -1676,7 +1645,7 @@ if test "$d" != "" ; then
echo "can't find libtk.a in $d/lib"
exit 1
fi
- places="$d/lib/tk4.1 \
+ places="$d/lib/${tkdir} \
$d/lib/tk"
V_LIBRARY_TK=FAIL
for dir in $places; do
@@ -1696,13 +1665,15 @@ else
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:1865: \"$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*
V_INCLUDE_TK=""
else
echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
V_INCLUDE_TK=FAIL
fi
@@ -1712,15 +1683,16 @@ rm -f conftest*
V_INCLUDE_TK=""
places="\
$prefix/include \
+ $prefix/include/${tkdir} \
/usr/local/include \
/usr/contrib/include \
/usr/include/tcl \
/usr/include\
$x_includes/tk \
$x_includes \
- $PWD/../tk4.1 \
- /usr/src/local/tk4.1 \
- /import/tcl/include/tk4.1 \
+ $PWD/../${tkdir} \
+ /usr/src/local/${tkdir} \
+ /import/tcl/include/${tkdir} \
"
for dir in $places; do
if test -r $dir/tk.h ; then
@@ -1733,82 +1705,47 @@ rm -f conftest*
exit 1
fi
fi
- echo $ac_n "checking for -ltk4.1""... $ac_c" 1>&6
-ac_lib_var=`echo tk4.1'_'main | tr './+\055' '__p_'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ltk4.1 $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1745 "configure"
-#include "confdefs.h"
-
-int main() { return 0; }
-int t() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:1753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- V_LIB_TK="-ltk4.1"
-else
- echo "$ac_t""no" 1>&6
-V_LIB_TK="FAIL"
-fi
-
- if test "$V_LIB_TK" = FAIL; then
- echo "checking for libtk.a"
- places="/usr/local/lib \
- /usr/contrib/lib \
- /usr/lib \
- /usr/lib/tk \
- /import/tcl/lib \
- $PWD/../tk4.1 \
- /usr/src/local/tk4.1 \
- $prefix/lib \
- $x_libraries"
- for dir in $places; do
- if test -r $dir/libtk4.1.so -o -r $dir/libtk4.1.a; then
- V_LIB_TK="-L$dir -ltk4.1"
- break
- fi
- if test -r $dir/libtk.so -o -r $dir/libtk.a; then
- V_LIB_TK="-L$dir -ltk"
- break
- fi
- done
- if test "$V_LIB_TK" = FAIL; then
- echo "can't find libtk.a"
- exit 1
- else
- if test $solaris ; then
- V_LIB_TK="-R$dir $V_LIB_TK"
- fi
+ V_TK_CONFIG=FAIL
+ echo "checking for tkConfig.sh"
+ places="/usr/local/lib/${tkdir} \
+ /usr/contrib/lib/${tkdir} \
+ /usr/lib/${tkdir} \
+ /usr/lib/tk/${tkdir} \
+ /import/tcl/lib/${tkdir} \
+ $prefix/lib/${tkdir} \
+ $x_libraries/${tkdir} \
+ $PWD/../${tkdir}/library \
+ /usr/src/local/${tkdir}/library \
+ /usr/local/lib/tk \
+ /usr/lib/tk \
+ /usr/lib/tk/tk \
+ /import/tcl/lib/tk \
+ $prefix/lib/tk \
+ $x_libraries/tk \
+ $x_libraries/tk"
+ for dir in $places; do
+ if test -r $dir/tkConfig.sh ; then
+ V_TK_CONFIG=$dir/tkConfig.sh
+ break
fi
+ done
+ if test "$V_TK_CONFIG" = FAIL; then
+ echo "can't find tkConfig.sh"
+ exit 1
fi
+ . ${V_TK_CONFIG}
+ V_LIB_TK="${TK_LIB_FLAG}"
echo "checking for tk/tk.tcl"
V_LIBRARY_TK=FAIL
- places="/usr/local/lib/tk4.1 \
- /usr/contrib/lib/tk4.1 \
- /usr/lib/tk4.1 \
- /usr/lib/tk/tk4.1 \
- /import/tcl/lib/tk4.1 \
- $prefix/lib/tk4.1 \
- $x_libraries/tk4.1 \
- $PWD/../tk4.1/library \
- /usr/src/local/tk4.1/library \
+ places="/usr/local/lib/${tkdir} \
+ /usr/contrib/lib/${tkdir} \
+ /usr/lib/${tkdir} \
+ /usr/lib/tk/${tkdir} \
+ /import/tcl/lib/${tkdir} \
+ $prefix/lib/${tkdir} \
+ $x_libraries/${tkdir} \
+ $PWD/../${tkdir}/library \
+ /usr/src/local/${tkdir}/library \
/usr/local/lib/tk \
/usr/lib/tk \
/usr/lib/tk/tk \
@@ -1842,7 +1779,7 @@ fi
#XXX
-V_STATIC="-static"
+V_STATIC=""
# Check whether --with-aix-shm or --without-aix-shm was given.
if test "${with_aix_shm+set}" = set; then
@@ -2072,7 +2009,12 @@ sparc-sun-sunos*)
;;
*-*-netbsd*)
V_TARCMD="tar -h -c -f"
- V_LIB="$V_LIB -L/usr/local/lib"
+ V_LIB="${LDFLAGS} $V_LIB"
+ V_SHM=""
+ V_STATIC=""
+ ;;
+*-*-freebsd*)
+ V_STATIC=""
;;
*-*-hpux*)
V_CCOPT="-O"
@@ -2347,6 +2289,8 @@ for ac_option
do
case "\$ac_option" in
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ : Avoid regenerating within pkgsrc
+ exit 0
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|