1 diff -urN aaa/pilot-link-0.11.8/tcl.m4 pilot-link-0.11.8/tcl.m4
2 --- aaa/pilot-link-0.11.8/tcl.m4 1970-01-01 01:00:00.000000000 +0100
3 +++ pilot-link-0.11.8/tcl.m4 2003-07-21 22:25:22.000000000 +0200
7 +# This file provides a set of autoconf macros to help
8 +# pilot-link find Tcl support (borrowed from PILOT_LINK)
10 +# Copyright (c) 1999-2000 Ajuba Solutions.
11 +# Copyright (c) 2002-2003 ActiveState Corporation.
13 +# See the file "license.terms" for information on usage and redistribution
14 +# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
16 +#------------------------------------------------------------------------
17 +# PILOT_LINK_PATH_TCLCONFIG --
19 +# Locate the tclConfig.sh file and perform a sanity check on
20 +# the Tcl compile flags
27 +# Adds the following arguments to configure:
30 +# Defines the following vars:
31 +# TCL_BIN_DIR Full path to the directory containing
32 +# the tclConfig.sh file
33 +#------------------------------------------------------------------------
35 +AC_DEFUN(PILOT_LINK_PATH_TCLCONFIG, [
36 + # Ok, lets find the tcl configuration
37 + # First, look for one uninstalled.
38 + # the alternative search directory is invoked by --with-tcl
43 + AC_ARG_WITH(tcl, [ --with-tcl=tclconfig use TCL], with_tclconfig=${withval}, with_tclconfig=no)
45 + if test x"${with_tclconfig}" != xno ; then
46 + AC_MSG_CHECKING([for Tcl configuration])
47 + AC_CACHE_VAL(ac_cv_c_tclconfig,[
49 + # First check to see if --with-tcl was specified.
50 + if test x"${with_tclconfig}" != x ; then
51 + if test -f "${with_tclconfig}/tclConfig.sh" ; then
52 + ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
54 + AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
58 + # then check for a private Tcl installation
59 + if test x"${ac_cv_c_tclconfig}" = x ; then
62 + `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
64 + `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
66 + `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
67 + if test -f "$i/unix/tclConfig.sh" ; then
68 + ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
74 + # check in a few common install locations
75 + if test x"${ac_cv_c_tclconfig}" = x ; then
76 + for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
77 + `ls -d ${prefix}/lib 2>/dev/null` \
78 + `ls -d /usr/local/lib 2>/dev/null` \
79 + `ls -d /usr/contrib/lib 2>/dev/null` \
80 + `ls -d /usr/lib 2>/dev/null` \
82 + if test -f "$i/tclConfig.sh" ; then
83 + ac_cv_c_tclconfig=`(cd $i; pwd)`
89 + # check in a few other private locations
90 + if test x"${ac_cv_c_tclconfig}" = x ; then
93 + `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
94 + if test -f "$i/unix/tclConfig.sh" ; then
95 + ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
102 + if test x"${ac_cv_c_tclconfig}" = x ; then
103 + TCL_BIN_DIR="# no Tcl configs found"
104 + AC_MSG_WARN("Cannot find Tcl configuration definitions")
108 + TCL_BIN_DIR=${ac_cv_c_tclconfig}
109 + AC_MSG_RESULT([found $TCL_BIN_DIR/tclConfig.sh])
115 +#------------------------------------------------------------------------
116 +# PILOT_LINK_LOAD_TCLCONFIG --
118 +# Load the tclConfig.sh file
122 +# Requires the following vars to be set:
127 +# Subst the following vars:
132 +#------------------------------------------------------------------------
134 +AC_DEFUN(PILOT_LINK_LOAD_TCLCONFIG, [
135 + AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
137 + if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
138 + AC_MSG_RESULT([loading])
139 + . $TCL_BIN_DIR/tclConfig.sh
141 + AC_MSG_RESULT([file not found])
145 + # If the TCL_BIN_DIR is the build directory (not the install directory),
146 + # then set the common variable name to the value of the build variables.
147 + # For example, the variable TCL_LIB_SPEC will be set to the value
148 + # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
149 + # instead of TCL_BUILD_LIB_SPEC since it will work with both an
150 + # installed and uninstalled version of Tcl.
153 + if test -f $TCL_BIN_DIR/Makefile ; then
154 + TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
155 + TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
156 + TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
160 + # eval is required to do the TCL_DBGX substitution
163 + eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
164 + eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
165 + eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
167 + eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
168 + eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
169 + eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
171 + AC_SUBST(TCL_VERSION)
172 + AC_SUBST(TCL_BIN_DIR)
173 + AC_SUBST(TCL_SRC_DIR)
175 + AC_SUBST(TCL_LIB_FILE)
176 + AC_SUBST(TCL_LIB_FLAG)
177 + AC_SUBST(TCL_LIB_SPEC)
179 + AC_SUBST(TCL_STUB_LIB_FILE)
180 + AC_SUBST(TCL_STUB_LIB_FLAG)
181 + AC_SUBST(TCL_STUB_LIB_SPEC)
183 + #AC_SUBST(TCL_DBGX)
186 + AC_SUBST(TCL_EXTRA_CFLAGS)
187 + AC_SUBST(TCL_LD_FLAGS)
188 + AC_SUBST(TCL_SHLIB_LD_LIBS)
189 + #AC_SUBST(TCL_BUILD_LIB_SPEC)
190 + #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
194 +#--------------------------------------------------------------------
195 +# PILOT_LINK_TCL_LINK_LIBS
197 +# Search for the libraries needed to link the Tcl shell.
198 +# Things like the math library (-lm) and socket stuff (-lsocket vs.
199 +# -lnsl) are dealt with here.
202 +# Requires the following vars to be set in the Makefile:
209 +# Subst's the following var:
213 +# Might append to the following vars:
216 +# Might define the following vars:
219 +#--------------------------------------------------------------------
221 +AC_DEFUN(PILOT_LINK_TCL_LINK_LIBS, [
222 + #--------------------------------------------------------------------
223 + # On a few very rare systems, all of the libm.a stuff is
224 + # already in libc.a. Set compiler flags accordingly.
225 + # Also, Linux requires the "ieee" library for math to work
226 + # right (and it must appear before "-lm").
227 + #--------------------------------------------------------------------
229 + AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
230 + AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
232 + #--------------------------------------------------------------------
233 + # Interactive UNIX requires -linet instead of -lsocket, plus it
234 + # needs net/errno.h to define the socket-related error codes.
235 + #--------------------------------------------------------------------
237 + AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
238 + AC_CHECK_HEADER(net/errno.h, AC_DEFINE(HAVE_NET_ERRNO_H))
240 + #--------------------------------------------------------------------
241 + # Check for the existence of the -lsocket and -lnsl libraries.
242 + # The order here is important, so that they end up in the right
243 + # order in the command line generated by make. Here are some
244 + # special considerations:
245 + # 1. Use "connect" and "accept" to check for -lsocket, and
246 + # "gethostbyname" to check for -lnsl.
247 + # 2. Use each function name only once: can't redo a check because
248 + # autoconf caches the results of the last check and won't redo it.
249 + # 3. Use -lnsl and -lsocket only if they supply procedures that
250 + # aren't already present in the normal libraries. This is because
251 + # IRIX 5.2 has libraries, but they aren't needed and they're
252 + # bogus: they goof up name resolution if used.
253 + # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
254 + # To get around this problem, check for both libraries together
255 + # if -lsocket doesn't work by itself.
256 + #--------------------------------------------------------------------
259 + AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
260 + if test "$tcl_checkSocket" = 1; then
261 + AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt,
262 + LIBS="$LIBS -lsocket", tcl_checkBoth=1)])
264 + if test "$tcl_checkBoth" = 1; then
266 + LIBS="$LIBS -lsocket -lnsl"
267 + AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs])
269 + AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname,
270 + [LIBS="$LIBS -lnsl"])])
272 + # Don't perform the eval of the libraries here because DL_LIBS
273 + # won't be set until we call PILOT_LINK_CONFIG_CFLAGS
275 + TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
277 + AC_SUBST(MATH_LIBS)
280 +#--------------------------------------------------------------------
281 +# PILOT_LINK_TCL_EARLY_FLAGS
283 +# Check for what flags are needed to be passed so the correct OS
284 +# features are available.
291 +# Might define the following vars:
293 +# _LARGEFILE64_SOURCE
295 +#--------------------------------------------------------------------
297 +AC_DEFUN(PILOT_LINK_TCL_EARLY_FLAG,[
298 + AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
299 + AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
300 + AC_TRY_COMPILE([[#define ]$1[ 1
302 + [tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
303 + [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
304 + if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
306 + tcl_flags="$tcl_flags $1"
310 +AC_DEFUN(PILOT_LINK_TCL_EARLY_FLAGS,[
311 + AC_MSG_CHECKING([for required early compiler flags])
313 + PILOT_LINK_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
314 + [char *p = (char *)strtoll; char *q = (char *)strtoull;])
315 + PILOT_LINK_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
316 + [struct stat64 buf; int i = stat64("/", &buf);])
317 + if test "x${tcl_flags}" = "x" ; then
318 + AC_MSG_RESULT([none])
320 + AC_MSG_RESULT([${tcl_flags}])
324 +#--------------------------------------------------------------------
325 +# PILOT_LINK_TCL_64BIT_FLAGS
327 +# Check for what is defined in the way of 64-bit features.
334 +# Might define the following vars:
335 +# TCL_WIDE_INT_IS_LONG
337 +# HAVE_STRUCT_DIRENT64
338 +# HAVE_STRUCT_STAT64
341 +#--------------------------------------------------------------------
343 +AC_DEFUN(PILOT_LINK_TCL_64BIT_FLAGS, [
344 + AC_MSG_CHECKING([for 64-bit integer type])
345 + AC_CACHE_VAL(tcl_cv_type_64bit,[
346 + AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
347 + tcl_cv_type_64bit=__int64,tcl_cv_type_64bit=none
348 + AC_TRY_RUN([#include <unistd.h>
349 + int main() {exit(!(sizeof(long long) > sizeof(long)));}
350 + ], tcl_cv_type_64bit="long long"))])
351 + if test "${tcl_cv_type_64bit}" = none ; then
352 + AC_MSG_RESULT([using long])
354 + AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
355 + AC_MSG_RESULT([${tcl_cv_type_64bit}])
357 + # Now check for auxiliary declarations
358 + AC_MSG_CHECKING([for struct dirent64])
359 + AC_CACHE_VAL(tcl_cv_struct_dirent64,[
360 + AC_TRY_COMPILE([#include <sys/types.h>
361 +#include <sys/dirent.h>],[struct dirent64 p;],
362 + tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
363 + if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
364 + AC_DEFINE(HAVE_STRUCT_DIRENT64)
366 + AC_MSG_RESULT([${tcl_cv_struct_dirent64}])
368 + AC_MSG_CHECKING([for struct stat64])
369 + AC_CACHE_VAL(tcl_cv_struct_stat64,[
370 + AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
372 + tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
373 + if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
374 + AC_DEFINE(HAVE_STRUCT_STAT64)
376 + AC_MSG_RESULT([${tcl_cv_struct_stat64}])
378 + AC_MSG_CHECKING([for off64_t])
379 + AC_CACHE_VAL(tcl_cv_type_off64_t,[
380 + AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
382 + tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
383 + if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
384 + AC_DEFINE(HAVE_TYPE_OFF64_T)
386 + AC_MSG_RESULT([${tcl_cv_type_off64_t}])
391 +## Here ends the standard Tcl configuration bits and starts the
392 +## PILOT_LINK specific functions
395 +#------------------------------------------------------------------------
396 +# PILOT_LINK_PUBLIC_TCL_HEADERS --
398 +# Locate the installed public Tcl header files
405 +# Adds a --with-tclinclude switch to configure.
408 +# Substs the following vars:
410 +#------------------------------------------------------------------------
412 +AC_DEFUN(PILOT_LINK_PUBLIC_TCL_HEADERS, [
413 + AC_MSG_CHECKING([for Tcl public headers])
415 + AC_ARG_WITH(tclinclude, [ --with-tclinclude directory containing the public Tcl header files], with_tclinclude=${withval})
417 + AC_CACHE_VAL(ac_cv_c_tclh, [
418 + # Use the value from --with-tclinclude, if it was given
420 + if test x"${with_tclinclude}" != x ; then
421 + if test -f "${with_tclinclude}/tcl.h" ; then
422 + ac_cv_c_tclh=${with_tclinclude}
424 + AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h])
427 + # Check order: pkg --prefix location, Tcl's --prefix location,
428 + # directory of tclConfig.sh, and Tcl source directory.
429 + # Looking in the source dir is not ideal, but OK.
431 + eval "temp_includedir=${includedir}"
432 + list="`ls -d ${temp_includedir} 2>/dev/null` \
433 + `ls -d ${TCL_PREFIX}/include 2>/dev/null` \
434 + `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
435 + `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
436 + if test "${PILOT_LINK_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
437 + list="$list /usr/local/include /usr/include"
439 + for i in $list ; do
440 + if test -f "$i/tcl.h" ; then
448 + # Print a message based on how we determined the include path
450 + if test x"${ac_cv_c_tclh}" = x ; then
451 + AC_MSG_ERROR([tcl.h not found. Please specify its location with --with-tclinclude])
453 + AC_MSG_RESULT([${ac_cv_c_tclh}])
456 + TCL_INCLUDES=-I\"${ac_cv_c_tclh}\"
458 + AC_SUBST(TCL_INCLUDES)
462 +#------------------------------------------------------------------------
463 +# PILOT_LINK_PROG_TCLSH
464 +# Locate a tclsh shell in the following directories:
465 +# ${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin
466 +# ${exec_prefix}/bin ${prefix}/bin
473 +# Subst's the following values:
475 +#------------------------------------------------------------------------
477 +AC_DEFUN(PILOT_LINK_PROG_TCLSH, [
478 + AC_MSG_CHECKING([for tclsh])
480 + AC_CACHE_VAL(ac_cv_path_tclsh, [
481 + if test "x${CELIB_DIR}" != "x" ; then
482 + # If CELIB_DIR is defined, assume Windows/CE target is requested
483 + # which means target tclsh cannot be run (cross-compile)
484 + search_path=`echo ${PATH} | sed -e 's/:/ /g'`
486 + search_path=`echo ${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
488 + for dir in $search_path ; do
489 + for j in `ls -r $dir/tclsh[[8-9]]*${EXEEXT} 2> /dev/null` \
490 + `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
491 + if test x"$ac_cv_path_tclsh" = x ; then
492 + if test -f "$j" ; then
493 + ac_cv_path_tclsh=$j
501 + if test -f "$ac_cv_path_tclsh" ; then
502 + TCLSH_PROG=$ac_cv_path_tclsh
503 + AC_MSG_RESULT([$TCLSH_PROG])
505 + AC_MSG_ERROR([No tclsh found in PATH: $search_path])
507 + AC_SUBST(TCLSH_PROG)
510 +#------------------------------------------------------------------------
511 +# PILOT_LINK_PROG_WISH
512 +# Locate a wish shell in the following directories:
513 +# ${TK_BIN_DIR} ${TK_BIN_DIR}/../bin
514 +# ${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin
515 +# ${exec_prefix}/bin ${prefix}/bin
522 +# Subst's the following values:
524 +#------------------------------------------------------------------------
526 +AC_DEFUN(PILOT_LINK_PROG_WISH, [
527 + AC_MSG_CHECKING([for wish])
529 + AC_CACHE_VAL(ac_cv_path_wish, [
530 + if test "x${CELIB_DIR}" != "x" ; then
531 + # If CELIB_DIR is defined, assume Windows/CE target is requested
532 + # which means target wish cannot be run (cross-compile)
533 + search_path=`echo ${PATH} | sed -e 's/:/ /g'`
535 + search_path=`echo ${TK_BIN_DIR}:${TK_BIN_DIR}/../bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${exec_prefix}/bin:${prefix}/bin:${PATH} | sed -e 's/:/ /g'`
537 + for dir in $search_path ; do
538 + for j in `ls -r $dir/wish[[8-9]]*${EXEEXT} 2> /dev/null` \
539 + `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
540 + if test x"$ac_cv_path_wish" = x ; then
541 + if test -f "$j" ; then
550 + if test -f "$ac_cv_path_wish" ; then
551 + WISH_PROG=$ac_cv_path_wish
552 + AC_MSG_RESULT([$WISH_PROG])
554 + AC_MSG_ERROR([No wish found in PATH: $search_path])
556 + AC_SUBST(WISH_PROG)
559 +#------------------------------------------------------------------------
560 +# PILOT_LINK_PATH_CONFIG --
562 +# Locate the ${1}Config.sh file and perform a sanity check on
563 +# the ${1} compile flags. These are used by packages like
564 +# [incr Tk] that load *Config.sh files from more than Tcl and Tk.
571 +# Adds the following arguments to configure:
574 +# Defines the following vars:
575 +# $1_BIN_DIR Full path to the directory containing
576 +# the $1Config.sh file
577 +#------------------------------------------------------------------------
579 +AC_DEFUN(PILOT_LINK_PATH_CONFIG, [
581 + # Ok, lets find the $1 configuration
582 + # First, look for one uninstalled.
583 + # the alternative search directory is invoked by --with-$1
586 + if test x"${no_$1}" = x ; then
587 + # we reset no_$1 in case something fails here
589 + AC_ARG_WITH($1, [ --with-$1 directory containing $1 configuration ($1Config.sh)], with_$1config=${withval})
590 + AC_MSG_CHECKING([for $1 configuration])
591 + AC_CACHE_VAL(ac_cv_c_$1config,[
593 + # First check to see if --with-$1 was specified.
594 + if test x"${with_$1config}" != x ; then
595 + if test -f "${with_$1config}/$1Config.sh" ; then
596 + ac_cv_c_$1config=`(cd ${with_$1config}; pwd)`
598 + AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh])
602 + # then check for a private $1 installation
603 + if test x"${ac_cv_c_$1config}" = x ; then
606 + `ls -dr ../$1[[8-9]].[[0-9]]* 2>/dev/null` \
608 + `ls -dr ../../$1[[8-9]].[[0-9]]* 2>/dev/null` \
610 + `ls -dr ../../../$1[[8-9]].[[0-9]]* 2>/dev/null` \
612 + `ls -dr ${srcdir}/../$1[[8-9]].[[0-9]]* 2>/dev/null` \
614 + if test -f "$i/$1Config.sh" ; then
615 + ac_cv_c_$1config=`(cd $i; pwd)`
618 + if test -f "$i/unix/$1Config.sh" ; then
619 + ac_cv_c_$1config=`(cd $i/unix; pwd)`
625 + # check in a few common install locations
626 + if test x"${ac_cv_c_$1config}" = x ; then
627 + for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
628 + `ls -d ${prefix}/lib 2>/dev/null` \
629 + `ls -d /usr/local/lib 2>/dev/null` \
630 + `ls -d /usr/contrib/lib 2>/dev/null` \
631 + `ls -d /usr/lib 2>/dev/null` \
633 + if test -f "$i/$1Config.sh" ; then
634 + ac_cv_c_$1config=`(cd $i; pwd)`
641 + if test x"${ac_cv_c_$1config}" = x ; then
642 + $1_BIN_DIR="# no $1 configs found"
643 + AC_MSG_WARN("Cannot find $1 configuration definitions")
647 + $1_BIN_DIR=${ac_cv_c_$1config}
648 + AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh])
653 +#------------------------------------------------------------------------
654 +# PILOT_LINK_LOAD_CONFIG --
656 +# Load the $1Config.sh file
660 +# Requires the following vars to be set:
665 +# Subst the following vars:
670 +#------------------------------------------------------------------------
672 +AC_DEFUN(PILOT_LINK_LOAD_CONFIG, [
673 + AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh])
675 + if test -f "${$1_BIN_DIR}/$1Config.sh" ; then
676 + AC_MSG_RESULT([loading])
677 + . ${$1_BIN_DIR}/$1Config.sh
679 + AC_MSG_RESULT([file not found])
683 + # If the $1_BIN_DIR is the build directory (not the install directory),
684 + # then set the common variable name to the value of the build variables.
685 + # For example, the variable $1_LIB_SPEC will be set to the value
686 + # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC
687 + # instead of $1_BUILD_LIB_SPEC since it will work with both an
688 + # installed and uninstalled version of Tcl.
691 + if test -f ${$1_BIN_DIR}/Makefile ; then
692 + AC_MSG_WARN([Found Makefile - using build library specs for $1])
693 + $1_LIB_SPEC=${$1_BUILD_LIB_SPEC}
694 + $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC}
695 + $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH}
698 + AC_SUBST($1_VERSION)
699 + AC_SUBST($1_SRC_DIR)
701 + AC_SUBST($1_LIB_FILE)
702 + AC_SUBST($1_LIB_SPEC)
704 + AC_SUBST($1_STUB_LIB_FILE)
705 + AC_SUBST($1_STUB_LIB_SPEC)
706 + AC_SUBST($1_STUB_LIB_PATH)