Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / lang / libtcl-nothread / patches / patch-ab
blob6468e30bf5676c22b976c2398d8a0af134488563
1 $NetBSD$
3 --- configure.orig      2004-03-02 00:58:59.000000000 +0100
4 +++ configure
5 @@ -5552,7 +5552,7 @@ echo "configure:5543: checking system ve
6             # results, and the version is kept in special file).
7         
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`
11             fi
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.
17      do64bit_ok=no
18 +    TCL_LIB_SPEC_RPATH=""
19      EXTRA_CFLAGS=""
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
26      CFLAGS_DEBUG=-g
27      CFLAGS_OPTIMIZE=-O
28      if test "$GCC" = "yes" ; then
29 @@ -5682,7 +5683,7 @@ fi
30             SHLIB_SUFFIX=".so"
32             DL_OBJS="tclLoadDl.o"
33 -           LDFLAGS=""
34 +           LD_FLAGS=""
36             LD_LIBRARY_PATH_VAR="LIBPATH"
38 @@ -5693,7 +5694,7 @@ fi
39                 else 
40                     do64bit_ok=yes
41                     EXTRA_CFLAGS="-q64"
42 -                   LDFLAGS="-q64"
43 +                   LD_FLAGS="-q64"
44                     RANLIB="${RANLIB} -X64"
45                     AR="${AR} -X64"
46                     SHLIB_LD_FLAGS="-b64"
47 @@ -5734,7 +5735,7 @@ fi
48             SHLIB_SUFFIX=".so"
49             DL_OBJS="tclLoadDl.o"
50             DL_LIBS="-ldl"
51 -           LDFLAGS=""
52 +           LD_FLAGS=""
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
57                 else 
58                     do64bit_ok=yes
59                     EXTRA_CFLAGS="-q64"
60 -                   LDFLAGS="-q64"
61 +                   LD_FLAGS="-q64"
62                     RANLIB="${RANLIB} -X64"
63                     AR="${AR} -X64"
64                     SHLIB_LD_FLAGS="-b64"
65 @@ -5830,7 +5831,7 @@ EOF
66             SHLIB_SUFFIX=".so"
67             DL_OBJS="tclLoadDl.o"
68             DL_LIBS="-ldl"
69 -           LDFLAGS=""
70 +           LD_FLAGS=""
71             CC_SEARCH_FLAGS=""
72             LD_SEARCH_FLAGS=""
73             ;;
74 @@ -5841,7 +5842,7 @@ EOF
75             SHLIB_SUFFIX=".so"
76             DL_OBJS="tclLoadDl.o"
77             DL_LIBS="-ldl"
78 -           LDFLAGS="-export-dynamic"
79 +           LD_FLAGS="-export-dynamic"
80             CC_SEARCH_FLAGS=""
81             LD_SEARCH_FLAGS=""
82             ;;
83 @@ -5852,7 +5853,7 @@ EOF
84             SHLIB_SUFFIX=".so"
85             DL_OBJS="tclLoadDl.o"
86             DL_LIBS="-ldl"
87 -           LDFLAGS=""
88 +           LD_FLAGS=""
89             CC_SEARCH_FLAGS=""
90             LD_SEARCH_FLAGS=""
91             ;;
92 @@ -5916,7 +5917,7 @@ fi
93                 SHLIB_LD_LIBS='${LIBS}'
94                 DL_OBJS="tclLoadShl.o"
95                 DL_LIBS="-ldld"
96 -               LDFLAGS="-Wl,-E"
97 +               LD_FLAGS="-Wl,-E"
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
102                     do64bit_ok=yes
103                     if test "`uname -m`" = "ia64" ; then
104                         EXTRA_CFLAGS="+DD64"
105 -                       LDFLAGS="+DD64 $LDFLAGS"
106 +                       LD_FLAGS="+DD64 $LD_FLAGS"
107                     else
108                         EXTRA_CFLAGS="+DA2.0W"
109 -                       LDFLAGS="+DA2.0W $LDFLAGS"
110 +                       LD_FLAGS="+DA2.0W $LD_FLAGS"
111                     fi
112                 fi
113             fi
114 @@ -6009,7 +6010,7 @@ fi
115                 SHLIB_LD_LIBS=""
116                 DL_OBJS="tclLoadShl.o"
117                 DL_LIBS="-ldld"
118 -               LDFLAGS="-Wl,-E"
119 +               LD_FLAGS="-Wl,-E"
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"
126             DL_LIBS=""
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}'
135             EXTRA_CFLAGS=""
136 -           LDFLAGS=""
137 +           LD_FLAGS=""
138             ;;
139         IRIX-6.*)
140             SHLIB_CFLAGS=""
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"
147             else
148                 case $system in
149                     IRIX-6.3)
150 @@ -6061,7 +6062,7 @@ fi
151                         EXTRA_CFLAGS="-n32"
152                         ;;
153                 esac
154 -               LDFLAGS="-n32"
155 +               LD_FLAGS="-n32"
156             fi
157             ;;
158         IRIX64-6.*)
159 @@ -6071,7 +6072,7 @@ fi
160             SHLIB_SUFFIX=".so"
161             DL_OBJS="tclLoadDl.o"
162             DL_LIBS=""
163 -           LDFLAGS=""
164 +           LD_FLAGS=""
165             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
166             LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
168 @@ -6084,7 +6085,7 @@ fi
169                     do64bit_ok=yes
170                     SHLIB_LD="ld -64 -shared -rdata_shared"
171                     EXTRA_CFLAGS="-64"
172 -                   LDFLAGS="-64"
173 +                   LD_FLAGS="-64"
174                 fi
175             fi
176             ;;
177 @@ -6103,7 +6104,7 @@ fi
178                 SHLIB_LD="${CC} -shared"
179                 DL_OBJS="tclLoadDl.o"
180                 DL_LIBS="-ldl"
181 -               LDFLAGS="-rdynamic"
182 +               LD_FLAGS="-rdynamic"
183                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
184                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
185             else
186 @@ -6139,7 +6140,7 @@ if eval "test \"`echo '$ac_cv_header_'$a
187                     SHLIB_LD="ld -shared"
188                     DL_OBJS="tclLoadDld.o"
189                     DL_LIBS="-ldld"
190 -                   LDFLAGS=""
191 +                   LD_FLAGS=""
192                     CC_SEARCH_FLAGS=""
193                     LD_SEARCH_FLAGS=""
194  else
195 @@ -6178,7 +6179,7 @@ EOF
196                 SHLIB_LD="${CC} -shared"
197                 DL_OBJS=""
198                 DL_LIBS="-ldl"
199 -               LDFLAGS="-rdynamic"
200 +               LD_FLAGS="-rdynamic"
201                 CC_SEARCH_FLAGS=""
202                 LD_SEARCH_FLAGS=""
203             else
204 @@ -6214,7 +6215,7 @@ if eval "test \"`echo '$ac_cv_header_'$a
205                     SHLIB_LD="ld -shared"
206                     DL_OBJS=""
207                     DL_LIBS="-ldld"
208 -                   LDFLAGS=""
209 +                   LD_FLAGS=""
210                     CC_SEARCH_FLAGS=""
211                     LD_SEARCH_FLAGS=""
212  else
213 @@ -6233,7 +6234,7 @@ fi
214             SHLIB_SUFFIX=".so"
215             DL_OBJS="tclLoadDl.o"
216             DL_LIBS="-ldl"
217 -           LDFLAGS=""
218 +           LD_FLAGS=""
219             CC_SEARCH_FLAGS=""
220             LD_SEARCH_FLAGS=""
221             ;;
222 @@ -6244,11 +6245,14 @@ fi
223             SHLIB_SUFFIX=".so"
224             DL_OBJS="tclLoadDl.o"
225             DL_LIBS="-ldl"
226 -           LDFLAGS="-Wl,-Bexport"
227 +           LD_FLAGS="-Wl,-Bexport"
228             CC_SEARCH_FLAGS=""
229             LD_SEARCH_FLAGS=""
230             ;;
231         NetBSD-*|FreeBSD-[1-2].*|OpenBSD-*)
232 +           if test "X${COMPILER_OPTIMIZATION_BUG}" = "XYES"; then
233 +               CFLAGS_OPTIMIZE=-O0
234 +           fi
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
239    
240                 # NetBSD/SPARC needs -fPIC, -fpic will not do.
241                 SHLIB_CFLAGS="-fPIC"
242 -               SHLIB_LD="ld -Bshareable -x"
243                 SHLIB_LD_LIBS=""
244                 SHLIB_SUFFIX=".so"
245                 DL_OBJS="tclLoadDl.o"
246                 DL_LIBS=""
247 -               LDFLAGS=""
248 +               LD_FLAGS=""
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"
259  #ifdef __ELF__
260 @@ -6303,11 +6305,20 @@ EOF
261  if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
262    egrep "yes" >/dev/null 2>&1; then
263    rm -rf conftest*
264 -  echo "$ac_t""yes" 1>&6
265 +  
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'
271 +               
272  else
273    rm -rf conftest*
274 -  echo "$ac_t""no" 1>&6
275 +  
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'
281                 
282  fi
283 @@ -6323,7 +6334,7 @@ else
284                 SHLIB_SUFFIX=".a"
285                 DL_OBJS="tclLoadAout.o"
286                 DL_LIBS=""
287 -               LDFLAGS=""
288 +               LD_FLAGS=""
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
295             ;;
296 -       FreeBSD-*)
297 +       FreeBSD-*|DragonFly-*)
298             # FreeBSD 3.* and greater have ELF.
299             SHLIB_CFLAGS="-fPIC"
300             SHLIB_LD="ld -Bshareable -x"
301 @@ -6344,23 +6355,23 @@ fi
302             SHLIB_SUFFIX=".so"
303             DL_OBJS="tclLoadDl.o"
304             DL_LIBS=""
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"
315             fi
316             case $system in
317             FreeBSD-3.*)
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
322                 ;;
323             esac
324 +           SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
325             ;;
326         Rhapsody-*|Darwin-*)
327             SHLIB_CFLAGS="-fno-common"
328 @@ -6372,7 +6383,7 @@ fi
329             DL_OBJS="tclLoadDyld.o"
330             PLAT_OBJS="tclMacOSXBundle.o"
331             DL_LIBS=""
332 -           LDFLAGS="-prebind"
333 +           LD_FLAGS="-prebind"
334             CC_SEARCH_FLAGS=""
335             LD_SEARCH_FLAGS=""
336             CFLAGS_OPTIMIZE="-Os"
337 @@ -6389,7 +6400,7 @@ fi
338             SHLIB_SUFFIX=".so"
339             DL_OBJS="tclLoadNext.o"
340             DL_LIBS=""
341 -           LDFLAGS=""
342 +           LD_FLAGS=""
343             CC_SEARCH_FLAGS=""
344             LD_SEARCH_FLAGS=""
345             ;;
346 @@ -6409,7 +6420,7 @@ EOF
347             SHLIB_SUFFIX=".so"
348             DL_OBJS="tclLoadOSF.o"
349             DL_LIBS=""
350 -           LDFLAGS=""
351 +           LD_FLAGS=""
352             CC_SEARCH_FLAGS=""
353             LD_SEARCH_FLAGS=""
354             ;;
355 @@ -6425,7 +6436,7 @@ EOF
356             SHLIB_SUFFIX=".so"
357             DL_OBJS="tclLoadDl.o"
358             DL_LIBS=""
359 -           LDFLAGS=""
360 +           LD_FLAGS=""
361             CC_SEARCH_FLAGS=""
362             LD_SEARCH_FLAGS=""
363             ;;
364 @@ -6441,7 +6452,7 @@ EOF
365             SHLIB_SUFFIX=".so"
366             DL_OBJS="tclLoadDl.o"
367             DL_LIBS=""
368 -           LDFLAGS=""
369 +           LD_FLAGS=""
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"
375                 else
376                     EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
377 -                   LDFLAGS="-pthread"
378 +                   LD_FLAGS="-pthread"
379                 fi
380             fi
382 @@ -6473,7 +6484,7 @@ EOF
383             DL_OBJS="tclLoadDl.o"
384             # dlopen is in -lc on QNX
385             DL_LIBS=""
386 -           LDFLAGS=""
387 +           LD_FLAGS=""
388             CC_SEARCH_FLAGS=""
389             LD_SEARCH_FLAGS=""
390             ;;
391 @@ -6484,7 +6495,7 @@ EOF
392             SHLIB_SUFFIX=".a"
393             DL_OBJS="tclLoadAout.o"
394             DL_LIBS=""
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}
399             ;;
400 @@ -6494,10 +6505,10 @@ EOF
401             # below.
402             if test "$GCC" = "yes" ; then
403                 SHLIB_CFLAGS="-fPIC -melf"
404 -               LDFLAGS="-melf -Wl,-Bexport"
405 +               LD_FLAGS="-melf -Wl,-Bexport"
406             else
407                 SHLIB_CFLAGS="-Kpic -belf"
408 -               LDFLAGS="-belf -Wl,-Bexport"
409 +               LD_FLAGS="-belf -Wl,-Bexport"
410             fi
411             SHLIB_LD="ld -G"
412             SHLIB_LD_LIBS=""
413 @@ -6514,7 +6525,7 @@ EOF
414             SHLIB_SUFFIX=".so"
415             DL_OBJS="tclLoadDl.o"
416             DL_LIBS="-ldl"
417 -           LDFLAGS=""
418 +           LD_FLAGS=""
419             CC_SEARCH_FLAGS=""
420             LD_SEARCH_FLAGS=""
421             ;;
422 @@ -6525,7 +6536,7 @@ EOF
423             SHLIB_SUFFIX=".so"
424             DL_OBJS="tclLoadDl.o"
425             DL_LIBS="-ldl"
426 -           LDFLAGS=""
427 +           LD_FLAGS=""
428             CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
429             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
431 @@ -6561,7 +6572,7 @@ EOF
432             SHLIB_SUFFIX=".so"
433             DL_OBJS="tclLoadDl.o"
434             DL_LIBS="-ldl"
435 -           LDFLAGS=""
436 +           LD_FLAGS=""
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
443             SHLIB_CFLAGS="-KPIC"
444 -           LDFLAGS=""
445 +           LD_FLAGS=""
446      
447             # Check to enable 64-bit flags for compiler/linker
448             if test "$do64bit" = "yes" ; then
449 @@ -6599,10 +6610,10 @@ EOF
450                             do64bit_ok=yes
451                             if test "$do64bitVIS" = "yes" ; then
452                                 EXTRA_CFLAGS="-xarch=v9a"
453 -                               LDFLAGS="-xarch=v9a"
454 +                               LD_FLAGS="-xarch=v9a"
455                             else
456                                 EXTRA_CFLAGS="-xarch=v9"
457 -                               LDFLAGS="-xarch=v9"
458 +                               LD_FLAGS="-xarch=v9"
459                             fi
460                         fi
461                 else
462 @@ -6634,7 +6645,7 @@ EOF
463             SHLIB_LD_LIBS='${LIBS}'
464             DL_OBJS="tclLoadAout.o"
465             DL_LIBS=""
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"
477             else
478 -           LDFLAGS=""
479 +           LD_FLAGS=""
480             fi
481             CC_SEARCH_FLAGS=""
482             LD_SEARCH_FLAGS=""
483 @@ -6852,7 +6863,7 @@ fi
484         SHLIB_SUFFIX=""
485         DL_OBJS="tclLoadNone.o"
486         DL_LIBS=""
487 -       LDFLAGS=""
488 +       LD_FLAGS=""
489         CC_SEARCH_FLAGS=""
490         LD_SEARCH_FLAGS=""
491         BUILD_DLTEST=""
492 @@ -6889,16 +6900,16 @@ fi
493      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}'
498      fi
499      if test "$UNSHARED_LIB_SUFFIX" = "" ; then
500 -       UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
501 +       UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
502      fi
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)'
510      else
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).
515         
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`
519             fi
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}"
524      fi
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}"
528  else
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"
540  else
541 -    TCL_PACKAGE_PATH="${prefix}/lib"
542 +    TCL_PACKAGE_PATH_ADD="${prefix}/lib/tcl"
543  fi
545 +for dir in ${TCL_PACKAGE_PATH_ADD}; do
546 +    if test -z "${TCL_PACKAGE_PATH}"; then
547 +      TCL_PACKAGE_PATH="$dir"
548 +    else
549 +      TCL_PACKAGE_PATH="${TCL_PACKAGE_PATH} $dir"
550 +    fi
551 +done
552  #--------------------------------------------------------------------
553  #       The statements below define various symbols relating to Tcl
554  #       stub support.
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