os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/unix/configure.in
First public contribution.
2 dnl This file is an input file used by the GNU "autoconf" program to
3 dnl generate the file "configure", which is run during Tcl installation
4 dnl to configure the system for the local environment.
6 # RCS: @(#) $Id: configure.in,v 1.106.2.35 2007/04/29 02:20:38 das Exp $
8 AC_INIT(../generic/tcl.h)
15 VERSION=${TCL_VERSION}
17 #------------------------------------------------------------------------
18 # Handle the --prefix=... option
19 #------------------------------------------------------------------------
21 if test "${prefix}" = "NONE"; then
24 if test "${exec_prefix}" = "NONE"; then
27 # Make sure srcdir is fully qualified!
28 srcdir=`cd $srcdir ; pwd`
29 TCL_SRC_DIR=`cd $srcdir/..; pwd`
31 #------------------------------------------------------------------------
32 # Compress and/or soft link the manpages?
33 #------------------------------------------------------------------------
35 SC_CONFIG_MANPAGES([tcl])
37 #------------------------------------------------------------------------
38 # Standard compiler checks
39 #------------------------------------------------------------------------
41 # If the user did not set CFLAGS, set it now to keep
42 # the AC_PROG_CC macro from adding "-g -O2".
43 if test "${CFLAGS+set}" != "set" ; then
49 #--------------------------------------------------------------------
50 # Supply substitutes for missing POSIX header files. Special notes:
51 # - stdlib.h doesn't define strtol, strtoul, or
52 # strtod insome versions of SunOS
53 # - some versions of string.h don't declare procedures such
55 # Do this early, otherwise an autoconf bug throws errors on configure
56 #--------------------------------------------------------------------
58 SC_MISSING_POSIX_HEADERS
60 #------------------------------------------------------------------------
61 # If we're using GCC, see if the compiler understands -pipe. If so, use it.
62 # It makes compiling go faster. (This is only a performance feature.)
63 #------------------------------------------------------------------------
65 if test -z "$no_pipe" && test -n "$GCC"; then
66 AC_CACHE_CHECK([if the compiler understands -pipe],
68 hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
69 AC_TRY_COMPILE(,, tcl_cv_cc_pipe=yes, tcl_cv_cc_pipe=no)
71 if test $tcl_cv_cc_pipe = yes; then
72 CFLAGS="$CFLAGS -pipe"
76 #------------------------------------------------------------------------
78 #------------------------------------------------------------------------
82 #--------------------------------------------------------------------
83 # Look for libraries that we will need when compiling the Tcl shell
84 #--------------------------------------------------------------------
88 # Add the threads support libraries
89 LIBS="$LIBS$THREADS_LIBS"
93 #--------------------------------------------------------------------
94 # The statements below define a collection of compile flags. This
95 # macro depends on the value of SHARED_BUILD, and should be called
96 # after SC_ENABLE_SHARED checks the configure switches.
97 #--------------------------------------------------------------------
105 #--------------------------------------------------------------------
106 # Detect what compiler flags to set for 64-bit support.
107 #--------------------------------------------------------------------
113 #--------------------------------------------------------------------
114 # Check endianness because we can optimize comparisons of
115 # Tcl_UniChar strings to memcmp on big-endian systems.
116 #--------------------------------------------------------------------
120 #--------------------------------------------------------------------
121 # Supply substitutes for missing POSIX library procedures, or
122 # set flags so Tcl uses alternate procedures.
123 #--------------------------------------------------------------------
125 # Check if Posix compliant getcwd exists, if not we'll use getwd.
126 AC_CHECK_FUNCS(getcwd, , [AC_DEFINE(USEGETWD)])
127 # Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
128 # define USEGETWD even if the posix getcwd exists. Add a test ?
130 AC_REPLACE_FUNCS(opendir strstr strtol strtoll strtoull tmpnam waitpid)
131 AC_CHECK_FUNC(strerror, , [AC_DEFINE(NO_STRERROR)])
132 AC_CHECK_FUNC(getwd, , [AC_DEFINE(NO_GETWD)])
133 AC_CHECK_FUNC(wait3, , [AC_DEFINE(NO_WAIT3)])
134 AC_CHECK_FUNC(uname, , [AC_DEFINE(NO_UNAME)])
136 if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \
137 test "`uname -r | awk -F. '{print [$]1}'`" -lt 7; then
138 # prior to Darwin 7, realpath is not threadsafe, so don't
139 # use it when threads are enabled, c.f. bug # 711232
140 ac_cv_func_realpath=no
142 AC_CHECK_FUNC(realpath, , [AC_DEFINE(NO_REALPATH)])
144 #--------------------------------------------------------------------
145 # Look for thread-safe variants of some library functions.
146 #--------------------------------------------------------------------
148 if test "${TCL_THREADS}" = 1; then
153 if test "`uname -s`" = "Darwin" && \
154 test "`uname -r | awk -F. '{print [$]1}'`" -gt 5; then
155 # Starting with Darwin 6 (Mac OSX 10.2), gethostbyX
156 # are actually MT-safe as they always return pointers
157 # from the TSD instead of the static storage.
158 AC_DEFINE(HAVE_MTSAFE_GETHOSTBYNAME)
159 AC_DEFINE(HAVE_MTSAFE_GETHOSTBYADDR)
160 elif test "`uname -s`" = "HP-UX" && \
161 test "`uname -r|sed -e 's|B\.||' -e 's|\..*$||'`" -gt 10; then
162 # Starting with HPUX 11.00 (we believe), gethostbyX
163 # are actually MT-safe as they always return pointers
164 # from TSD instead of static storage.
165 AC_DEFINE(HAVE_MTSAFE_GETHOSTBYNAME)
166 AC_DEFINE(HAVE_MTSAFE_GETHOSTBYADDR)
168 SC_TCL_GETHOSTBYNAME_R
169 SC_TCL_GETHOSTBYADDR_R
173 #---------------------------------------------------------------------------
174 # Determine which interface to use to talk to the serial port.
175 # Note that #include lines must begin in leftmost column for
176 # some compilers to recognize them as preprocessor directives.
177 #---------------------------------------------------------------------------
181 #--------------------------------------------------------------------
182 # Include sys/select.h if it exists and if it supplies things
183 # that appear to be useful and aren't already in sys/types.h.
184 # This appears to be true only on the RS/6000 under AIX. Some
185 # systems like OSF/1 have a sys/select.h that's of no use, and
186 # other systems like SCO UNIX have a sys/select.h that's
187 # pernicious. If "fd_set" isn't defined anywhere then set a
189 #--------------------------------------------------------------------
191 AC_CACHE_CHECK([for fd_set in sys/types], tcl_cv_type_fd_set, [
192 AC_TRY_COMPILE([#include <sys/types.h>],[fd_set readMask, writeMask;],
193 tcl_cv_type_fd_set=yes, tcl_cv_type_fd_set=no)])
194 tcl_ok=$tcl_cv_type_fd_set
195 if test $tcl_ok = no; then
196 AC_CACHE_CHECK([for fd_mask in sys/select], tcl_cv_grep_fd_mask, [
197 AC_EGREP_HEADER(fd_mask, sys/select.h,
198 tcl_cv_grep_fd_mask=present, tcl_cv_grep_fd_mask=missing)])
199 if test $tcl_cv_grep_fd_mask = present; then
200 AC_DEFINE(HAVE_SYS_SELECT_H)
204 if test $tcl_ok = no; then
208 #------------------------------------------------------------------------------
209 # Find out all about time handling differences.
210 #------------------------------------------------------------------------------
214 #--------------------------------------------------------------------
215 # Some systems (e.g., IRIX 4.0.5) lack the st_blksize field
216 # in struct stat. But we might be able to use fstatfs instead.
217 #--------------------------------------------------------------------
219 AC_CHECK_FUNC(fstatfs, , [AC_DEFINE(NO_FSTATFS)])
221 #--------------------------------------------------------------------
222 # Some system have no memcmp or it does not work with 8 bit
223 # data, this checks it and add memcmp.o to LIBOBJS if needed
224 #--------------------------------------------------------------------
227 #--------------------------------------------------------------------
228 # Some system like SunOS 4 and other BSD like systems
229 # have no memmove (we assume they have bcopy instead).
230 # {The replacement define is in compat/string.h}
231 #--------------------------------------------------------------------
232 AC_CHECK_FUNC(memmove, , [AC_DEFINE(NO_MEMMOVE) AC_DEFINE(NO_STRING_H)])
234 #--------------------------------------------------------------------
235 # On some systems strstr is broken: it returns a pointer even
236 # even if the original string is empty.
237 #--------------------------------------------------------------------
238 dnl only run if AC_REPLACE_FUNCS(strstr) hasn't already added strstr.o
239 if test "x${ac_cv_func_strstr}" = "xyes"; then
240 AC_CACHE_CHECK([proper strstr implementation], tcl_cv_strstr_unbroken, [
245 exit(strstr("\0test", "test") ? 1 : 0);
246 }], tcl_cv_strstr_unbroken=ok, tcl_cv_strstr_unbroken=broken,
247 tcl_cv_strstr_unbroken=broken)])
248 if test $tcl_cv_strstr_unbroken = broken; then
249 LIBOBJS="$LIBOBJS strstr.o"
253 #--------------------------------------------------------------------
254 # Check for strtoul function. This is tricky because under some
255 # versions of AIX strtoul returns an incorrect terminator
256 # pointer for the string "0".
257 #--------------------------------------------------------------------
259 AC_CHECK_FUNC(strtoul, tcl_ok=1, tcl_ok=0)
260 if test $tcl_ok = 1; then
261 AC_CACHE_CHECK([proper strtoul implementation], tcl_cv_strtoul_unbroken, [
263 extern int strtoul();
269 value = strtoul(string, &term, 0);
270 if ((value != 0) || (term != (string+1))) {
274 }], tcl_cv_strtoul_unbroken=ok , tcl_cv_strtoul_unbroken=broken,
275 tcl_cv_strtoul_unbroken=broken)])
276 if test $tcl_cv_strtoul_unbroken = broken; then
280 if test $tcl_ok = 0; then
281 LIBOBJS="$LIBOBJS strtoul.o"
284 #--------------------------------------------------------------------
285 # Check for the strtod function. This is tricky because in some
286 # versions of Linux strtod mis-parses strings starting with "+".
287 #--------------------------------------------------------------------
289 AC_CHECK_FUNC(strtod, tcl_ok=1, tcl_ok=0)
290 if test $tcl_ok = 1; then
291 AC_CACHE_CHECK([proper strtod implementation], tcl_cv_strtod_unbroken, [
293 extern double strtod();
296 char *string = " +69";
299 value = strtod(string, &term);
300 if ((value != 69) || (term != (string+4))) {
304 }], tcl_cv_strtod_unbroken=ok , tcl_cv_strtod_unbroken=broken,
305 tcl_cv_strtod_unbroken=broken)])
306 if test $tcl_cv_strtod_unbroken = broken; then
310 if test $tcl_ok = 0; then
311 LIBOBJS="$LIBOBJS strtod.o"
314 #--------------------------------------------------------------------
315 # Under Solaris 2.4, strtod returns the wrong value for the
316 # terminating character under some conditions. Check for this
317 # and if the problem exists use a substitute procedure
318 # "fixstrtod" that corrects the error.
319 #--------------------------------------------------------------------
323 #--------------------------------------------------------------------
324 # Check for various typedefs and provide substitutes if
326 #--------------------------------------------------------------------
333 AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t, [
334 AC_EGREP_CPP(changequote(<<,>>)dnl
335 <<(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]>>dnl
337 #include <sys/types.h>
338 #include <sys/socket.h>
343 ], ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no)])
344 if test $ac_cv_type_socklen_t = no; then
345 AC_DEFINE(socklen_t, unsigned)
348 #--------------------------------------------------------------------
349 # If a system doesn't have an opendir function (man, that's old!)
350 # then we have to supply a different version of dirent.h which
351 # is compatible with the substitute version of opendir that's
352 # provided. This version only works with V7-style directories.
353 #--------------------------------------------------------------------
355 AC_CHECK_FUNC(opendir, , [AC_DEFINE(USE_DIRENT2_H)])
357 #--------------------------------------------------------------------
358 # The check below checks whether <sys/wait.h> defines the type
359 # "union wait" correctly. It's needed because of weirdness in
360 # HP-UX where "union wait" is defined in both the BSD and SYS-V
361 # environments. Checking the usability of WIFEXITED seems to do
363 #--------------------------------------------------------------------
365 AC_CACHE_CHECK([union wait], tcl_cv_union_wait, [
366 AC_TRY_LINK([#include <sys/types.h>
367 #include <sys/wait.h>], [
369 WIFEXITED(x); /* Generates compiler error if WIFEXITED
371 ], tcl_cv_union_wait=yes, tcl_cv_union_wait=no)])
372 if test $tcl_cv_union_wait = no; then
373 AC_DEFINE(NO_UNION_WAIT)
376 #--------------------------------------------------------------------
377 # Check whether there is an strncasecmp function on this system.
378 # This is a bit tricky because under SCO it's in -lsocket and
379 # under Sequent Dynix it's in -linet.
380 #--------------------------------------------------------------------
382 AC_CHECK_FUNC(strncasecmp, tcl_ok=1, tcl_ok=0)
383 if test "$tcl_ok" = 0; then
384 AC_CHECK_LIB(socket, strncasecmp, tcl_ok=1, tcl_ok=0)
386 if test "$tcl_ok" = 0; then
387 AC_CHECK_LIB(inet, strncasecmp, tcl_ok=1, tcl_ok=0)
389 if test "$tcl_ok" = 0; then
390 LIBOBJS="$LIBOBJS strncasecmp.o"
393 #--------------------------------------------------------------------
394 # The code below deals with several issues related to gettimeofday:
395 # 1. Some systems don't provide a gettimeofday function at all
396 # (set NO_GETTOD if this is the case).
397 # 2. SGI systems don't use the BSD form of the gettimeofday function,
398 # but they have a BSDgettimeofday function that can be used instead.
399 # 3. See if gettimeofday is declared in the <sys/time.h> header file.
400 # if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can
402 #--------------------------------------------------------------------
404 AC_CHECK_FUNC(BSDgettimeofday,
405 [AC_DEFINE(HAVE_BSDGETTIMEOFDAY)], [
406 AC_CHECK_FUNC(gettimeofday, , [AC_DEFINE(NO_GETTOD)])
408 AC_CACHE_CHECK([for gettimeofday declaration], tcl_cv_grep_gettimeofday, [
409 AC_EGREP_HEADER(gettimeofday, sys/time.h,
410 tcl_cv_grep_gettimeofday=present, tcl_cv_grep_gettimeofday=missing)])
411 if test $tcl_cv_grep_gettimeofday = missing ; then
412 AC_DEFINE(GETTOD_NOT_DECLARED)
415 #--------------------------------------------------------------------
416 # The following code checks to see whether it is possible to get
417 # signed chars on this platform. This is needed in order to
418 # properly generate sign-extended ints from character values.
419 #--------------------------------------------------------------------
422 AC_CACHE_CHECK([signed char declarations], tcl_cv_char_signed, [
426 ], tcl_cv_char_signed=yes, tcl_cv_char_signed=no)])
427 if test $tcl_cv_char_signed = yes; then
428 AC_DEFINE(HAVE_SIGNED_CHAR)
431 #--------------------------------------------------------------------
432 # Does putenv() copy or not? We need to know to avoid memory leaks.
433 #--------------------------------------------------------------------
435 AC_CACHE_CHECK([for a putenv() that copies the buffer], tcl_cv_putenv_copy, [
438 #define OURVAR "havecopy=yes"
439 int main (int argc, char *argv[])
442 foo = (char *)strdup(OURVAR);
444 strcpy((char *)(strchr(foo, '=') + 1), "no");
445 bar = getenv("havecopy");
446 if (!strcmp(bar, "no")) {
455 tcl_cv_putenv_copy=no,
456 tcl_cv_putenv_copy=yes,
457 tcl_cv_putenv_copy=no)])
458 if test $tcl_cv_putenv_copy = yes; then
459 AC_DEFINE(HAVE_PUTENV_THAT_COPIES)
462 #--------------------------------------------------------------------
463 # Check for support of nl_langinfo function
464 #--------------------------------------------------------------------
468 #--------------------------------------------------------------------
469 # Darwin specific API checks and defines
470 #--------------------------------------------------------------------
472 if test "`uname -s`" = "Darwin" ; then
473 AC_CHECK_HEADERS(copyfile.h)
474 AC_CHECK_FUNCS(copyfile)
475 if test $tcl_corefoundation = yes; then
476 AC_CHECK_HEADERS(libkern/OSAtomic.h)
477 AC_CHECK_FUNCS(OSSpinLockLock)
478 AC_CHECK_FUNCS(pthread_atfork)
481 AC_DEFINE(TCL_DEFAULT_ENCODING, "utf-8")
482 AC_DEFINE(TCL_LOAD_FROM_MEMORY)
483 AC_CHECK_HEADERS(AvailabilityMacros.h)
484 if test "$ac_cv_header_AvailabilityMacros_h" = yes; then
485 AC_CACHE_CHECK([if weak import is available], tcl_cv_cc_weak_import, [
486 hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
488 #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
489 #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
490 #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
492 #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1020
493 #error MAC_OS_X_VERSION_MIN_REQUIRED < 1020
495 int rand(void) __attribute__((weak_import));
497 tcl_cv_cc_weak_import=yes, tcl_cv_cc_weak_import=no)
498 CFLAGS=$hold_cflags])
499 if test $tcl_cv_cc_weak_import = yes; then
500 AC_DEFINE(HAVE_WEAK_IMPORT)
505 #--------------------------------------------------------------------
506 # Check for support of fts functions (readdir replacement)
507 #--------------------------------------------------------------------
509 AC_CACHE_CHECK([for fts], tcl_cv_api_fts, [
511 #include <sys/param.h>
512 #include <sys/stat.h>
515 char*const p[2] = {"/", NULL};
516 FTS *f = fts_open(p, FTS_PHYSICAL|FTS_NOCHDIR|FTS_NOSTAT, NULL);
517 FTSENT *e = fts_read(f); fts_close(f);
518 ], tcl_cv_api_fts=yes, tcl_cv_api_fts=no)])
519 if test $tcl_cv_api_fts = yes; then
523 #--------------------------------------------------------------------
524 # The statements below check for systems where POSIX-style
525 # non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented.
526 # On these systems (mostly older ones), use the old BSD-style
527 # FIONBIO approach instead.
528 #--------------------------------------------------------------------
532 #--------------------------------------------------------------------
533 # The statements below define a collection of symbols related to
534 # building libtcl as a shared library instead of a static library.
535 #--------------------------------------------------------------------
537 TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
538 TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}
539 eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}"
541 # tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed
542 # so that the backslashes quoting the DBX braces are dropped.
544 # Trick to replace DBGX with TCL_DBGX
546 eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
548 TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)'
549 PRIVATE_INCLUDE_DIR='$(includedir)'
550 HTML_DIR='$(DISTDIR)/html'
552 # Note: in the following variable, it's important to use the absolute
553 # path name of the Tcl directory rather than "..": this is because
554 # AIX remembers this path and will attempt to use it at run-time to look
555 # up the Tcl library.
557 if test "`uname -s`" = "Darwin" ; then
559 TCL_SHLIB_LD_EXTRAS="-compatibility_version ${TCL_VERSION} -current_version ${TCL_VERSION}`echo ${TCL_PATCH_LEVEL} | awk ['{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}']`"
560 TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TCL_LIB_FILE} -seg1addr 0xa000000'
563 if test "$FRAMEWORK_BUILD" = "1" ; then
564 AC_DEFINE(TCL_FRAMEWORK)
565 tcl_config_files="${tcl_config_files} [Tcl-Info.plist:../macosx/Tcl-Info.plist.in]"
566 # Construct a fake local framework structure to make linking with
567 # '-framework Tcl' and running of tcltest work
568 AC_OUTPUT_COMMANDS([test "$FRAMEWORK_BUILD" = "1" && n=Tcl &&
569 f=$n.framework && v=Versions/$VERSION &&
570 echo "creating $f" && rm -rf $f && mkdir -p $f/$v/Resources &&
571 ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v &&
572 ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist &&
574 ], [VERSION=${TCL_VERSION} FRAMEWORK_BUILD=${FRAMEWORK_BUILD}])
575 LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH"
576 if test "${libdir}" = '${exec_prefix}/lib'; then
577 # override libdir default
578 libdir="/Library/Frameworks"
581 TCL_LIB_FLAG="-framework Tcl"
582 TCL_BUILD_LIB_SPEC="-F`pwd` -framework Tcl"
583 TCL_LIB_SPEC="-F${libdir} -framework Tcl"
584 libdir="${libdir}/Tcl.framework/Versions/\${VERSION}"
585 TCL_LIBRARY="${libdir}/Resources/Scripts"
586 includedir="${libdir}/Headers"
587 PRIVATE_INCLUDE_DIR="${libdir}/PrivateHeaders"
588 HTML_DIR="${libdir}/Resources/Documentation/Reference/Tcl"
589 EXTRA_INSTALL="install-private-headers html-tcl"
590 EXTRA_BUILD_HTML='@ln -fs contents.htm $(HTML_INSTALL_DIR)/TclTOC.html'
591 EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Tcl-Info.plist "$(LIB_INSTALL_DIR)/Resources/Info.plist"'
592 EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing license.terms to $(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "$(TOP_DIR)/license.terms" "$(LIB_INSTALL_DIR)/Resources"'
593 EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Finalizing Tcl.framework" && rm -f "$(LIB_INSTALL_DIR)/../Current" && ln -s "$(VERSION)" "$(LIB_INSTALL_DIR)/../Current" && for f in "$(LIB_FILE)" tclConfig.sh Resources Headers PrivateHeaders; do rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/Current/$$f" "$(LIB_INSTALL_DIR)/../.."; done && f="$(STUB_LIB_FILE)" && rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/$(VERSION)/$$f" "$(LIB_INSTALL_DIR)/../.."'
594 TCL_YEAR="`date +%Y`"
595 # Don't use AC_DEFINE for the following as the framework version define
596 # needs to go into the Makefile even when using autoheader, so that we
597 # can pick up a potential make override of VERSION. Also, don't put this
598 # into CFLAGS as it should not go into tclConfig.sh
599 EXTRA_CC_SWITCHES='-DTCL_FRAMEWORK_VERSION=\"$(VERSION)\"'
601 # libdir must be a fully qualified path and not ${exec_prefix}/lib
602 eval libdir="$libdir"
603 if test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then
604 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
605 TCL_LIB_FLAG="-ltcl${TCL_VERSION}\${TCL_DBGX}"
607 TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"
609 TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}"
610 TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}"
612 TCL_BUILD_EXP_FILE="lib.exp"
613 eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}"
615 # Replace DBGX with TCL_DBGX
616 eval "TCL_EXP_FILE=\"${TCL_EXP_FILE}\""
618 if test "$GCC" = "yes" ; then
619 TCL_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TCL_BUILD_EXP_FILE} -L`pwd`"
620 TCL_LIB_SPEC="-Wl,-bI:${libdir}/${TCL_EXP_FILE} -L`pwd`"
622 TCL_BUILD_LIB_SPEC="-bI:`pwd`/${TCL_BUILD_EXP_FILE}"
623 TCL_LIB_SPEC="-bI:${libdir}/${TCL_EXP_FILE}"
628 eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
629 eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
630 eval "CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}"
631 VERSION=${TCL_VERSION}
633 #--------------------------------------------------------------------
634 # The statements below define the symbol TCL_PACKAGE_PATH, which
635 # gives a list of directories that may contain packages. The list
636 # consists of one directory for machine-dependent binaries and
637 # another for platform-independent scripts.
638 #--------------------------------------------------------------------
640 if test "$FRAMEWORK_BUILD" = "1" ; then
641 TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks"
642 elif test "$prefix" != "$exec_prefix"; then
643 TCL_PACKAGE_PATH="${libdir} ${prefix}/lib"
645 TCL_PACKAGE_PATH="${prefix}/lib"
648 #--------------------------------------------------------------------
649 # The statements below define various symbols relating to Tcl
651 #--------------------------------------------------------------------
653 # Replace ${VERSION} with contents of ${TCL_VERSION}
654 eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}"
655 # Replace DBGX with TCL_DBGX
656 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
657 eval "TCL_STUB_LIB_DIR=${libdir}"
659 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
660 TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}\${TCL_DBGX}"
662 TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"
665 TCL_BUILD_STUB_LIB_SPEC="-L`pwd` ${TCL_STUB_LIB_FLAG}"
666 TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}"
667 TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}"
668 TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}"
670 # Install time header dir can be set via --includedir
671 eval "TCL_INCLUDE_SPEC=\"-I${includedir}\""
673 #------------------------------------------------------------------------
674 # tclConfig.sh refers to this by a different name
675 #------------------------------------------------------------------------
677 TCL_SHARED_BUILD=${SHARED_BUILD}
679 AC_SUBST(TCL_VERSION)
680 AC_SUBST(TCL_MAJOR_VERSION)
681 AC_SUBST(TCL_MINOR_VERSION)
682 AC_SUBST(TCL_PATCH_LEVEL)
685 AC_SUBST(TCL_LIB_FILE)
686 AC_SUBST(TCL_LIB_FLAG)
687 AC_SUBST(TCL_LIB_SPEC)
688 AC_SUBST(TCL_STUB_LIB_FILE)
689 AC_SUBST(TCL_STUB_LIB_FLAG)
690 AC_SUBST(TCL_STUB_LIB_SPEC)
691 AC_SUBST(TCL_STUB_LIB_PATH)
692 AC_SUBST(TCL_INCLUDE_SPEC)
693 AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
694 AC_SUBST(TCL_BUILD_STUB_LIB_PATH)
696 AC_SUBST(TCL_SRC_DIR)
698 AC_SUBST(CFG_TCL_SHARED_LIB_SUFFIX)
699 AC_SUBST(CFG_TCL_UNSHARED_LIB_SUFFIX)
700 AC_SUBST(CFG_TCL_EXPORT_FILE_SUFFIX)
702 AC_SUBST(TCL_SHARED_BUILD)
703 AC_SUBST(LD_LIBRARY_PATH_VAR)
705 AC_SUBST(TCL_BUILD_LIB_SPEC)
706 AC_SUBST(TCL_NEEDS_EXP_FILE)
707 AC_SUBST(TCL_BUILD_EXP_FILE)
708 AC_SUBST(TCL_EXP_FILE)
710 AC_SUBST(TCL_LIB_VERSIONS_OK)
711 AC_SUBST(TCL_SHARED_LIB_SUFFIX)
712 AC_SUBST(TCL_UNSHARED_LIB_SUFFIX)
714 AC_SUBST(TCL_HAS_LONGLONG)
716 AC_SUBST(BUILD_DLTEST)
717 AC_SUBST(TCL_PACKAGE_PATH)
719 AC_SUBST(TCL_LIBRARY)
720 AC_SUBST(PRIVATE_INCLUDE_DIR)
723 AC_SUBST(EXTRA_CC_SWITCHES)
724 AC_SUBST(EXTRA_INSTALL)
725 AC_SUBST(EXTRA_INSTALL_BINARIES)
726 AC_SUBST(EXTRA_BUILD_HTML)
728 SC_OUTPUT_COMMANDS_PRE
730 tcl_config_files="${tcl_config_files} [Makefile dltest/Makefile tclConfig.sh]"
731 AC_OUTPUT([${tcl_config_files}])