From 7efdf0549b1f292c3008ba46bd50ae45e17324ca Mon Sep 17 00:00:00 2001 From: Jeff Hobbs Date: Sun, 23 Feb 2003 22:21:52 +0000 Subject: [PATCH] * configure: regen * configure.in: * tclconfig/tcl.m4: regen from latest TEA setup * Makefile.in: only use pkgIndex.tcl with shared builds --- Makefile.in | 16 +- configure | 1949 ++++++++++++++++++++++++++++++---------------- configure.in | 12 +- tclconfig/tcl.m4 | 141 +--- 4 files changed, 1334 insertions(+), 784 deletions(-) diff --git a/Makefile.in b/Makefile.in index 34b85db..65bb41c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -173,7 +173,7 @@ binaries: $(BINARIES) libraries: @mkdir -p $(top_builddir)/library/ @list='$(RUNTIME_SOURCES)'; for p in $$list; do \ - $(INSTALL_DATA) $(srcdir)/library/$$p $(top_builddir)/library/$$p;\ + $(INSTALL_DATA) $(srcdir)/library/$$p $(top_builddir)/library/$$p;\ done doc: @@ -265,7 +265,7 @@ clean: -rm -f *.$(OBJEXT) core *.core -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) list='$(RUNTIME_SOURCES)'; for p in $$list; do \ - rm -f library/$$p; \ + rm -f library/$$p; \ done distclean: clean @@ -306,9 +306,9 @@ install-lib-binaries: @echo "Installing runtime sources in $(DESTDIR)$(pkglibdir)/" @list='$(RUNTIME_SOURCES)'; for p in $$list; do \ rm -f $(DESTDIR)$(pkglibdir)/`basename $$p`; \ - $(INSTALL_DATA) $(top_builddir)/library/$$p $(DESTDIR)$(pkglibdir)/;\ + $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/;\ done - @if test "@SHARED_BUILD@" = "1"; then \ + @if test "x$(SHARED_BUILD)" = "x1"; then \ echo "Installing pkgIndex.tcl in $(DESTDIR)$(pkglibdir)/"; \ $(INSTALL_DATA) $(top_builddir)/library/pkgIndex.tcl $(DESTDIR)$(pkglibdir)/;\ fi @@ -331,10 +331,12 @@ install-bin-binaries: .SUFFIXES: .c .$(OBJEXT) library/pkgIndex.tcl: $(srcdir)/library/pkgIndex.tcl.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + @if test "x$(SHARED_BUILD)" = "x1"; then \ + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status; \ + fi -Makefile: library/pkgIndex.tcl $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/configure b/configure index 0d1f91a..24b55a4 100755 --- a/configure +++ b/configure @@ -879,6 +879,86 @@ fi echo "$ac_t""$ac_cv_mingw32" 1>&6 MINGW32= test "$ac_cv_mingw32" = yes && MINGW32=yes +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:884: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:905: \"$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 + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:922: \"$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 + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:939: \"$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 + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + # If the user did not set CFLAGS, set it now to keep # the AC_PROG_CC macro from adding "-g -O2". @@ -889,7 +969,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:893: checking for $ac_word" >&5 +echo "configure:973: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -919,7 +999,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:923: checking for $ac_word" >&5 +echo "configure:1003: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -970,7 +1050,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:974: checking for $ac_word" >&5 +echo "configure:1054: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1002,7 +1082,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1006: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1086: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1013,12 +1093,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1017 "configure" +#line 1097 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1044,12 +1124,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1048: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1128: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1053: checking whether we are using GNU C" >&5 +echo "configure:1133: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1058,7 +1138,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1077,7 +1157,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1081: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1161: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1116,18 +1196,18 @@ fi if test -z "$no_pipe" -a -n "$GCC"; then echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6 -echo "configure:1120: checking if the compiler understands -pipe" >&5 +echo "configure:1200: checking if the compiler understands -pipe" >&5 OLDCC="$CC" CC="$CC -pipe" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -1152,7 +1232,7 @@ rm -f conftest* # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1156: checking for a BSD compatible install" >&5 +echo "configure:1236: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1210,7 +1290,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' #-------------------------------------------------------------------- echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1214: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1294: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1244,7 +1324,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1248: checking for $ac_word" >&5 +echo "configure:1328: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1277,13 +1357,13 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1281: checking for object suffix" >&5 +echo "configure:1361: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1303,7 +1383,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1307: checking for executable suffix" >&5 +echo "configure:1387: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1313,7 +1393,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -1334,276 +1414,989 @@ echo "$ac_t""${ac_cv_exeext}" 1>&6 ac_exeext=$EXEEXT - - - echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6 -echo "configure:1341: checking for Tcl public headers" >&5 - - # Check whether --with-tclinclude or --without-tclinclude was given. -if test "${with_tclinclude+set}" = set; then - withval="$with_tclinclude" - with_tclinclude=${withval} -fi - - - if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - # Use the value from --with-tclinclude, if it was given - - if test x"${with_tclinclude}" != x ; then - if test -f "${with_tclinclude}/tcl.h" ; then - ac_cv_c_tclh=${with_tclinclude} - else - { echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; } - fi - else - # Check order: pkg --prefix location, Tcl's --prefix location, - # directory of tclConfig.sh, and Tcl source directory. - # Looking in the source dir is not ideal, but OK. - - eval "temp_includedir=${includedir}" - list="`ls -d ${temp_includedir} 2>/dev/null` \ - `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ - `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \ - `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`" - if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then - list="$list /usr/local/include /usr/include" - fi - for i in $list ; do - if test -f "$i/tcl.h" ; then - ac_cv_c_tclh=$i - break - fi - done - fi - -fi - - - # Print a message based on how we determined the include path - - if test x"${ac_cv_c_tclh}" = x ; then - { echo "configure: error: tcl.h not found. Please specify its location with --with-tclinclude" 1>&2; exit 1; } - else - echo "$ac_t""${ac_cv_c_tclh}" 1>&6 - fi - - # Convert to a native path and substitute into the output files. - - INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}` - - TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" + #-------------------------------------------------------------------- + # Common compiler flag setup + #-------------------------------------------------------------------- - - -#-------------------------------------------------------------------- -# A few miscellaneous platform-specific items: -# -# Define a special symbol for Windows (BUILD_VFS in this case) so -# that we create the export library with the dll. See sha1.h on how -# to use this. -# -# Windows creates a few extra files that need to be cleaned up. -# You can add more files to clean if your extension creates any extra -# files. -# -# Define any extra compiler flags in the PACKAGE_CFLAGS variable. -# These will be appended to the current set of compiler flags for -# your system. -#-------------------------------------------------------------------- - -if test "${TEA_PLATFORM}" = "windows" ; then - cat >> confdefs.h <&6 +echo "configure:1424: checking for required early compiler flags" >&5 + tcl_flags="" -else - CLEANFILES="" -fi - - - - # Check whether --enable-threads or --disable-threads was given. -if test "${enable_threads+set}" = set; then - enableval="$enable_threads" - tcl_ok=$enableval -else - tcl_ok= -fi - - - if test "$tcl_ok" = "yes"; then - TCL_THREADS=1 - - if test "${TEA_PLATFORM}" != "windows" ; then - # We are always OK on Windows, so check what this platform wants. - cat >> confdefs.h <<\EOF -#define USE_THREAD_ALLOC 1 -EOF - - cat >> confdefs.h <<\EOF -#define _REENTRANT 1 -EOF - - cat >> confdefs.h <<\EOF -#define _THREAD_SAFE 1 -EOF - - echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6 -echo "configure:1459: checking for pthread_mutex_init in -lpthread" >&5 -ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lpthread $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < int main() { -pthread_mutex_init() +char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:1478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + tcl_cv_flag__isoc99_source=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 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 - tcl_ok=yes -else - echo "$ac_t""no" 1>&6 -tcl_ok=no -fi - - if test "$tcl_ok" = "no"; then - # Check a little harder for __pthread_mutex_init in the - # same library, as some systems hide it there until - # pthread.h is defined. We could alternatively do an - # AC_TRY_COMPILE with pthread.h, but that will work with - # libpthread really doesn't exist, like AIX 4.2. - # [Bug: 4359] - echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6 -echo "configure:1507: checking for __pthread_mutex_init in -lpthread" >&5 -ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__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="-lpthread $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < int main() { -__pthread_mutex_init() +char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:1526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + tcl_cv_flag__isoc99_source=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + tcl_cv_flag__isoc99_source=no fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +rm -f conftest* +fi + + if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then + cat >> confdefs.h <<\EOF +#define _ISOC99_SOURCE 1 +EOF + + tcl_flags="$tcl_flags _ISOC99_SOURCE" + fi + + + if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +struct stat64 buf; int i = stat64("/", &buf); +; return 0; } +EOF +if { (eval echo configure:1488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + tcl_cv_flag__largefile64_source=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext < +int main() { +struct stat64 buf; int i = stat64("/", &buf); +; return 0; } +EOF +if { (eval echo configure:1504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + tcl_cv_flag__largefile64_source=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + tcl_cv_flag__largefile64_source=no +fi +rm -f conftest* +fi +rm -f conftest* +fi + + if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then + cat >> confdefs.h <<\EOF +#define _LARGEFILE64_SOURCE 1 +EOF + + tcl_flags="$tcl_flags _LARGEFILE64_SOURCE" + fi + + if test "x${tcl_flags}" = "x" ; then + echo "$ac_t""none" 1>&6 + else + echo "$ac_t""${tcl_flags}" 1>&6 + fi + + + echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6 +echo "configure:1534: checking for 64-bit integer type" >&5 + if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + tcl_cv_type_64bit=__int64 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + tcl_cv_type_64bit=none + if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext < + int main() {exit(!(sizeof(long long) > sizeof(long)));} + +EOF +if { (eval echo configure:1565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + tcl_cv_type_64bit="long long" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + +fi +rm -f conftest* +fi + + if test "${tcl_cv_type_64bit}" = none ; then + echo "$ac_t""using long" 1>&6 + else + cat >> confdefs.h <&6 + + # Now check for auxiliary declarations + echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 +echo "configure:1590: checking for struct dirent64" >&5 + if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +#include +int main() { +struct dirent64 p; +; return 0; } +EOF +if { (eval echo configure:1604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + tcl_cv_struct_dirent64=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + tcl_cv_struct_dirent64=no +fi +rm -f conftest* +fi + + if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_DIRENT64 1 +EOF + + fi + echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6 + + echo $ac_n "checking for struct stat64""... $ac_c" 1>&6 +echo "configure:1625: checking for struct stat64" >&5 + if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +int main() { +struct stat64 p; + +; return 0; } +EOF +if { (eval echo configure:1639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + tcl_cv_struct_stat64=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + tcl_cv_struct_stat64=no +fi +rm -f conftest* +fi + + if test "x${tcl_cv_struct_stat64}" = "xyes" ; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_STAT64 1 +EOF + + fi + echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6 + + echo $ac_n "checking for off64_t""... $ac_c" 1>&6 +echo "configure:1660: checking for off64_t" >&5 + if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +int main() { +off64_t offset; + +; return 0; } +EOF +if { (eval echo configure:1674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + tcl_cv_type_off64_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + tcl_cv_type_off64_t=no +fi +rm -f conftest* +fi + + if test "x${tcl_cv_type_off64_t}" = "xyes" ; then + cat >> confdefs.h <<\EOF +#define HAVE_TYPE_OFF64_T 1 +EOF + + fi + echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6 + fi + + #TEA_C_BIGENDIAN + if test "${TEA_PLATFORM}" = "unix" ; then + + echo $ac_n "checking dirent.h""... $ac_c" 1>&6 +echo "configure:1699: checking dirent.h" >&5 + cat > conftest.$ac_ext < +#include +int main() { + +#ifndef _POSIX_SOURCE +# ifdef __Lynx__ + /* + * Generate compilation error to make the test fail: Lynx headers + * are only valid if really in the POSIX environment. + */ + + missing_procedure(); +# endif +#endif +DIR *d; +struct dirent *entryPtr; +char *p; +d = opendir("foobar"); +entryPtr = readdir(d); +p = entryPtr->d_name; +closedir(d); + +; return 0; } +EOF +if { (eval echo configure:1727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + tcl_ok=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + tcl_ok=no +fi +rm -f conftest* + + if test $tcl_ok = no; then + cat >> confdefs.h <<\EOF +#define NO_DIRENT_H 1 +EOF + + fi + + echo "$ac_t""$tcl_ok" 1>&6 + ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for errno.h""... $ac_c" 1>&6 +echo "configure:1748: checking for errno.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1758: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define NO_ERRNO_H 1 +EOF + +fi + + ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for float.h""... $ac_c" 1>&6 +echo "configure:1785: checking for float.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1795: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define NO_FLOAT_H 1 +EOF + +fi + + ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for values.h""... $ac_c" 1>&6 +echo "configure:1822: checking for values.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1832: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define NO_VALUES_H 1 +EOF + +fi + + ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for limits.h""... $ac_c" 1>&6 +echo "configure:1859: checking for limits.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1869: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define NO_LIMITS_H 1 +EOF + +fi + + ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6 +echo "configure:1896: checking for stdlib.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1906: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + tcl_ok=1 +else + echo "$ac_t""no" 1>&6 +tcl_ok=0 +fi + + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "strtol" >/dev/null 2>&1; then + : +else + rm -rf conftest* + tcl_ok=0 +fi +rm -f conftest* + + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "strtoul" >/dev/null 2>&1; then + : +else + rm -rf conftest* + tcl_ok=0 +fi +rm -f conftest* + + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "strtod" >/dev/null 2>&1; then + : +else + rm -rf conftest* + tcl_ok=0 +fi +rm -f conftest* + + if test $tcl_ok = 0; then + cat >> confdefs.h <<\EOF +#define NO_STDLIB_H 1 +EOF + + fi + ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for string.h""... $ac_c" 1>&6 +echo "configure:1978: checking for string.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1988: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + tcl_ok=1 +else + echo "$ac_t""no" 1>&6 +tcl_ok=0 +fi + + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "strstr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + tcl_ok=0 +fi +rm -f conftest* + + cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "strerror" >/dev/null 2>&1; then + : +else + rm -rf conftest* + tcl_ok=0 +fi +rm -f conftest* + + + # See also memmove check below for a place where NO_STRING_H can be + # set and why. + + if test $tcl_ok = 0; then + cat >> confdefs.h <<\EOF +#define NO_STRING_H 1 +EOF + + fi + + ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6 +echo "configure:2051: checking for sys/wait.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2061: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define NO_SYS_WAIT_H 1 +EOF + +fi + + ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 +echo "configure:2088: checking for dlfcn.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2098: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - tcl_ok=yes + : else echo "$ac_t""no" 1>&6 -tcl_ok=no +cat >> confdefs.h <<\EOF +#define NO_DLFCN_H 1 +EOF + fi - fi - - if test "$tcl_ok" = "yes"; then - # The space is needed - THREADS_LIBS=" -lpthread" - else - echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6 -echo "configure:1554: checking for pthread_mutex_init in -lpthreads" >&5 -ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + + # OS/390 lacks sys/param.h (and doesn't need it, by chance). + + for ac_hdr in unistd.h sys/param.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2130: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - ac_save_LIBS="$LIBS" -LIBS="-lpthreads $LIBS" -cat > conftest.$ac_ext < conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2140: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + + + + echo $ac_n "checking for strtod""... $ac_c" 1>&6 +echo "configure:2170: checking for strtod" >&5 +if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char pthread_mutex_init(); +char strtod(); int main() { -pthread_mutex_init() + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_strtod) || defined (__stub___strtod) +choke me +#else +strtod(); +#endif + ; return 0; } EOF -if { (eval echo configure:1573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + eval "ac_cv_func_strtod=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + eval "ac_cv_func_strtod=no" fi rm -f conftest* -LIBS="$ac_save_LIBS" - fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + +if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then echo "$ac_t""yes" 1>&6 - tcl_ok=yes + tcl_strtod=1 else echo "$ac_t""no" 1>&6 -tcl_ok=no +tcl_strtod=0 fi - if test "$tcl_ok" = "yes"; then - # The space is needed - THREADS_LIBS=" -lpthreads" - else - echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6 -echo "configure:1599: checking for pthread_mutex_init in -lc" >&5 -ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'` + if test "$tcl_strtod" = 1; then + echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6 +echo "configure:2220: checking for Solaris2.4/Tru64 strtod bugs" >&5 + if test "$cross_compiling" = yes; then + tcl_ok=0 +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + tcl_ok=1 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + tcl_ok=0 +fi +rm -fr conftest* +fi + + if test "$tcl_ok" = 1; then + echo "$ac_t""ok" 1>&6 + else + echo "$ac_t""buggy" 1>&6 + LIBOBJS="$LIBOBJS fixstrtod.o" + cat >> confdefs.h <<\EOF +#define strtod fixstrtod +EOF + + fi + fi + + fi + + + + echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6 +echo "configure:2274: checking for Tcl public headers" >&5 + + # Check whether --with-tclinclude or --without-tclinclude was given. +if test "${with_tclinclude+set}" = set; then + withval="$with_tclinclude" + with_tclinclude=${withval} +fi + + + if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + # Use the value from --with-tclinclude, if it was given + + if test x"${with_tclinclude}" != x ; then + if test -f "${with_tclinclude}/tcl.h" ; then + ac_cv_c_tclh=${with_tclinclude} + else + { echo "configure: error: ${with_tclinclude} directory does not contain tcl.h" 1>&2; exit 1; } + fi + else + # Check order: pkg --prefix location, Tcl's --prefix location, + # directory of tclConfig.sh, and Tcl source directory. + # Looking in the source dir is not ideal, but OK. + + eval "temp_includedir=${includedir}" + list="`ls -d ${temp_includedir} 2>/dev/null` \ + `ls -d ${TCL_PREFIX}/include 2>/dev/null` \ + `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \ + `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`" + if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then + list="$list /usr/local/include /usr/include" + fi + for i in $list ; do + if test -f "$i/tcl.h" ; then + ac_cv_c_tclh=$i + break + fi + done + fi + +fi + + + # Print a message based on how we determined the include path + + if test x"${ac_cv_c_tclh}" = x ; then + { echo "configure: error: tcl.h not found. Please specify its location with --with-tclinclude" 1>&2; exit 1; } + else + echo "$ac_t""${ac_cv_c_tclh}" 1>&6 + fi + + # Convert to a native path and substitute into the output files. + + INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}` + + TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\" + + + + +#-------------------------------------------------------------------- +# A few miscellaneous platform-specific items: +# +# Define a special symbol for Windows (BUILD_VFS in this case) so +# that we create the export library with the dll. See sha1.h on how +# to use this. +# +# Windows creates a few extra files that need to be cleaned up. +# You can add more files to clean if your extension creates any extra +# files. +# +# Define any extra compiler flags in the PACKAGE_CFLAGS variable. +# These will be appended to the current set of compiler flags for +# your system. +#-------------------------------------------------------------------- + +if test "${TEA_PLATFORM}" = "windows" ; then + cat >> confdefs.h <> confdefs.h <<\EOF +#define USE_THREAD_ALLOC 1 +EOF + + cat >> confdefs.h <<\EOF +#define _REENTRANT 1 +EOF + + cat >> confdefs.h <<\EOF +#define _THREAD_SAFE 1 +EOF + + echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6 +echo "configure:2392: checking for pthread_mutex_init in -lpthread" >&5 +ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__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="-lc $LIBS" +LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1635,28 +2428,34 @@ else tcl_ok=no fi - if test "$tcl_ok" = "no"; then - echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6 -echo "configure:1641: checking for pthread_mutex_init in -lc_r" >&5 -ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'` + if test "$tcl_ok" = "no"; then + # Check a little harder for __pthread_mutex_init in the + # same library, as some systems hide it there until + # pthread.h is defined. We could alternatively do an + # AC_TRY_COMPILE with pthread.h, but that will work with + # libpthread really doesn't exist, like AIX 4.2. + # [Bug: 4359] + echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6 +echo "configure:2440: checking for __pthread_mutex_init in -lpthread" >&5 +ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__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="-lc_r $LIBS" +LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1677,397 +2476,307 @@ else tcl_ok=no fi - if test "$tcl_ok" = "yes"; then - # The space is needed - THREADS_LIBS=" -pthread" - else - TCL_THREADS=0 - echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2 - fi - fi - fi fi - # Does the pthread-implementation provide - # 'pthread_attr_setstacksize' ? - for ac_func in pthread_attr_setstacksize -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1697: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -lpthread" + else + echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6 +echo "configure:2487: checking for pthread_mutex_init in -lpthreads" >&5 +ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char $ac_func(); +char pthread_mutex_init(); int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - +pthread_mutex_init() ; return 0; } EOF -if { (eval echo configure:1725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* -fi +LIBS="$ac_save_LIBS" -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 +tcl_ok=no fi -done - - fi - else - TCL_THREADS=0 - fi - # Do checking message here to not mess up interleaved configure output - echo $ac_n "checking for building with threads""... $ac_c" 1>&6 -echo "configure:1755: checking for building with threads" >&5 - if test "${TCL_THREADS}" = "1"; then - cat >> confdefs.h <<\EOF -#define TCL_THREADS 1 -EOF - - echo "$ac_t""yes" 1>&6 - else - echo "$ac_t""no (default)" 1>&6 - fi - # TCL_THREADS sanity checking. See if our request for building with - # threads is the same as the way Tcl was built. If not, warn the user. - case ${TCL_DEFS} in - *THREADS=1*) - if test "${TCL_THREADS}" = "0"; then - echo "configure: warning: - Building ${PACKAGE} without threads enabled, but building against a Tcl - that IS thread-enabled." 1>&2 - fi - ;; - *) - if test "${TCL_THREADS}" = "1"; then - echo "configure: warning: - --enable-threads requested, but attempting building against a Tcl - that is NOT thread-enabled." 1>&2 - fi - ;; - esac - - - - - echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6 -echo "configure:1789: checking for required early compiler flags" >&5 - tcl_flags="" - - if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -lpthreads" + else + echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6 +echo "configure:2532: checking for pthread_mutex_init in -lc" >&5 +ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < -int main() { -char *p = (char *)strtoll; char *q = (char *)strtoull; -; return 0; } -EOF -if { (eval echo configure:1803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - tcl_cv_flag__isoc99_source=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat > conftest.$ac_ext < conftest.$ac_ext < -int main() { -char *p = (char *)strtoll; char *q = (char *)strtoull; -; return 0; } -EOF -if { (eval echo configure:1819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - tcl_cv_flag__isoc99_source=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - tcl_cv_flag__isoc99_source=no -fi -rm -f conftest* -fi -rm -f conftest* -fi - - if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then - cat >> confdefs.h <<\EOF -#define _ISOC99_SOURCE 1 -EOF +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_mutex_init(); - tcl_flags="$tcl_flags _ISOC99_SOURCE" - fi - - if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -int main() { -struct stat64 buf; int i = stat64("/", &buf); -; return 0; } -EOF -if { (eval echo configure:1852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - tcl_cv_flag__largefile64_source=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat > conftest.$ac_ext < int main() { -struct stat64 buf; int i = stat64("/", &buf); +pthread_mutex_init() ; return 0; } EOF -if { (eval echo configure:1868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - tcl_cv_flag__largefile64_source=yes + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - tcl_cv_flag__largefile64_source=no -fi -rm -f conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* -fi - - if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then - cat >> confdefs.h <<\EOF -#define _LARGEFILE64_SOURCE 1 -EOF - - tcl_flags="$tcl_flags _LARGEFILE64_SOURCE" - fi - if test "x${tcl_flags}" = "x" ; then - echo "$ac_t""none" 1>&6 - else - echo "$ac_t""${tcl_flags}" 1>&6 - fi - - echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6 -echo "configure:1896: checking for 64-bit integer type" >&5 - if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - tcl_cv_type_64bit=none - # See if the compiler knows natively about __int64 - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - tcl_type_64bit=__int64 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - tcl_type_64bit="long long" fi -rm -f conftest* - # See if we should use long anyway Note that we substitute in the - # type that is our current guess for a 64-bit type inside this check - # program, so it should be modified only carefully... - if test "$cross_compiling" = yes; then - : -else - cat > conftest.$ac_ext < - int main() {exit(!(sizeof(${tcl_type_64bit}) > sizeof(long)));} - -EOF -if { (eval echo configure:1934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - tcl_cv_type_64bit=${tcl_type_64bit} +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + tcl_ok=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - : -fi -rm -fr conftest* -fi - + echo "$ac_t""no" 1>&6 +tcl_ok=no fi - if test "${tcl_cv_type_64bit}" = none ; then - cat >> confdefs.h <<\EOF -#define TCL_WIDE_INT_IS_LONG 1 -EOF - - echo "$ac_t""using long" 1>&6 - else - cat >> confdefs.h <&6 - - # Now check for auxiliary declarations - echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:1963: checking for struct dirent64" >&5 - if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then + if test "$tcl_ok" = "no"; then + echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6 +echo "configure:2574: checking for pthread_mutex_init in -lc_r" >&5 +ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - - cat > conftest.$ac_ext < conftest.$ac_ext < -#include +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char pthread_mutex_init(); + int main() { -struct dirent64 p; +pthread_mutex_init() ; return 0; } EOF -if { (eval echo configure:1977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - tcl_cv_struct_dirent64=yes + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - tcl_cv_struct_dirent64=no + 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 + tcl_ok=yes +else + echo "$ac_t""no" 1>&6 +tcl_ok=no fi - if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then - cat >> confdefs.h <<\EOF -#define HAVE_STRUCT_DIRENT64 1 -EOF + if test "$tcl_ok" = "yes"; then + # The space is needed + THREADS_LIBS=" -pthread" + else + TCL_THREADS=0 + echo "configure: warning: "Don t know how to find pthread lib on your system - thread support disabled"" 1>&2 + fi + fi + fi + fi - fi - echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6 + # Does the pthread-implementation provide + # 'pthread_attr_setstacksize' ? - echo $ac_n "checking for struct stat64""... $ac_c" 1>&6 -echo "configure:1998: checking for struct stat64" >&5 - if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then + ac_saved_libs=$LIBS + LIBS="$LIBS $THREADS_LIBS" + for ac_func in pthread_attr_setstacksize +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2633: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - - cat > conftest.$ac_ext < conftest.$ac_ext < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + int main() { -struct stat64 p; + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif ; return 0; } EOF -if { (eval echo configure:2012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - tcl_cv_struct_stat64=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - tcl_cv_struct_stat64=no + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi - if test "x${tcl_cv_struct_stat64}" = "xyes" ; then - cat >> confdefs.h <<\EOF -#define HAVE_STRUCT_STAT64 1 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done - fi - echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6 - - echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:2033: checking for off64_t" >&5 - if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then + LIBS=$ac_saved_libs + for ac_func in readdir_r +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2689: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - - cat > conftest.$ac_ext < conftest.$ac_ext < +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + int main() { -off64_t offset; + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif ; return 0; } EOF -if { (eval echo configure:2047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - tcl_cv_type_off64_t=yes + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - tcl_cv_type_off64_t=no + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi - if test "x${tcl_cv_type_off64_t}" = "xyes" ; then - cat >> confdefs.h <<\EOF -#define HAVE_TYPE_OFF64_T 1 +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done fi - echo "$ac_t""${tcl_cv_type_off64_t}" 1>&6 + else + TCL_THREADS=0 + fi + # Do checking message here to not mess up interleaved configure output + echo $ac_n "checking for building with threads""... $ac_c" 1>&6 +echo "configure:2747: checking for building with threads" >&5 + if test "${TCL_THREADS}" = "1"; then + cat >> confdefs.h <<\EOF +#define TCL_THREADS 1 +EOF + + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no (default)" 1>&6 fi + # TCL_THREADS sanity checking. See if our request for building with + # threads is the same as the way Tcl was built. If not, warn the user. + case ${TCL_DEFS} in + *THREADS=1*) + if test "${TCL_THREADS}" = "0"; then + echo "configure: warning: + Building ${PACKAGE} without threads enabled, but building against a Tcl + that IS thread-enabled." 1>&2 + fi + ;; + *) + if test "${TCL_THREADS}" = "1"; then + echo "configure: warning: + --enable-threads requested, but attempting building against a Tcl + that is NOT thread-enabled." 1>&2 + fi + ;; + esac + echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 -echo "configure:2071: checking how to build libraries" >&5 +echo "configure:2780: checking how to build libraries" >&5 # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -2098,86 +2807,6 @@ EOF -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2103: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2124: \"$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 - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2141: \"$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 - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2158: \"$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 - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - if test x"${TEA_INITED}" = x ; then # Can't refer to exact macro name or it will be substituted @@ -2187,7 +2816,7 @@ echo "$ac_t""$CPP" 1>&6 # Step 0: Enable 64 bit support? echo $ac_n "checking if 64bit support is enabled""... $ac_c" 1>&6 -echo "configure:2191: checking if 64bit support is enabled" >&5 +echo "configure:2820: checking if 64bit support is enabled" >&5 # Check whether --enable-64bit or --disable-64bit was given. if test "${enable_64bit+set}" = set; then enableval="$enable_64bit" @@ -2201,7 +2830,7 @@ fi # Step 0.b: Enable Solaris 64 bit VIS support? echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6 -echo "configure:2205: checking if 64bit Sparc VIS support is requested" >&5 +echo "configure:2834: checking if 64bit Sparc VIS support is requested" >&5 # Check whether --enable-64bit-vis or --disable-64bit-vis was given. if test "${enable_64bit_vis+set}" = set; then enableval="$enable_64bit_vis" @@ -2222,7 +2851,7 @@ fi # there are a few systems, like Next, where this doesn't work. echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6 -echo "configure:2226: checking system version (for dynamic loading)" >&5 +echo "configure:2855: checking system version (for dynamic loading)" >&5 if test -f /usr/lib/NextStep/software_version; then system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` else @@ -2251,7 +2880,7 @@ echo "configure:2226: checking system version (for dynamic loading)" >&5 # Linux can use either -ldl or -ldld for dynamic loading. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:2255: checking for dlopen in -ldl" >&5 +echo "configure:2884: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2259,7 +2888,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2314,7 +2943,7 @@ fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2318: checking for $ac_word" >&5 +echo "configure:2947: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2471,7 +3100,7 @@ fi # known GMT value. echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:2475: checking for gettimeofday in -lbsd" >&5 +echo "configure:3104: checking for gettimeofday in -lbsd" >&5 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2479,7 +3108,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2572,7 +3201,7 @@ EOF SHLIB_SUFFIX=".sl" echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2576: checking for shl_load in -ldld" >&5 +echo "configure:3205: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2580,7 +3209,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2643,15 +3272,20 @@ fi esac else do64bit_ok=yes - EXTRA_CFLAGS="+DA2.0W" - LDFLAGS="+DA2.0W $LDFLAGS" + if test "`uname -m`" = "ia64" ; then + EXTRA_CFLAGS="+DD64" + LDFLAGS="+DD64 $LDFLAGS" + else + EXTRA_CFLAGS="+DA2.0W" + LDFLAGS="+DA2.0W $LDFLAGS" + fi fi fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2655: checking for shl_load in -ldld" >&5 +echo "configure:3289: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2659,7 +3293,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2790,17 +3424,17 @@ fi else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2794: checking for dld.h" >&5 +echo "configure:3428: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3438: \"$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* @@ -2857,17 +3491,17 @@ fi else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2861: checking for dld.h" >&5 +echo "configure:3495: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3505: \"$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* @@ -2922,17 +3556,17 @@ fi # Not available on all versions: check for include file. ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:2926: checking for dlfcn.h" >&5 +echo "configure:3560: checking for dlfcn.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3570: \"$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* @@ -2959,9 +3593,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then LDFLAGS="" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' echo $ac_n "checking for ELF""... $ac_c" 1>&6 -echo "configure:2963: checking for ELF" >&5 +echo "configure:3597: checking for ELF" >&5 cat > conftest.$ac_ext <&6 -echo "configure:3300: checking for ld accepts -Bexport flag" >&5 +echo "configure:3934: checking for ld accepts -Bexport flag" >&5 LDFLAGS="${LDFLAGS} -Wl,-Bexport" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* found=yes else @@ -3352,9 +3986,9 @@ rm -f conftest* if test "x$DL_OBJS" = "xtclLoadAout.o" ; then echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6 -echo "configure:3356: checking sys/exec.h" >&5 +echo "configure:3990: checking sys/exec.h" >&5 cat > conftest.$ac_ext < int main() { @@ -3372,7 +4006,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -3390,9 +4024,9 @@ EOF else echo $ac_n "checking a.out.h""... $ac_c" 1>&6 -echo "configure:3394: checking a.out.h" >&5 +echo "configure:4028: checking a.out.h" >&5 cat > conftest.$ac_ext < int main() { @@ -3410,7 +4044,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -3428,9 +4062,9 @@ EOF else echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 -echo "configure:3432: checking sys/exec_aout.h" >&5 +echo "configure:4066: checking sys/exec_aout.h" >&5 cat > conftest.$ac_ext < int main() { @@ -3448,7 +4082,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_ok=usable else @@ -3568,7 +4202,7 @@ fi fi echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:3572: checking for build with symbols" >&5 +echo "configure:4206: checking for build with symbols" >&5 # Check whether --enable-symbols or --disable-symbols was given. if test "${enable_symbols+set}" = set; then enableval="$enable_symbols" @@ -3686,7 +4320,7 @@ EOF echo $ac_n "checking for tclsh""... $ac_c" 1>&6 -echo "configure:3690: checking for tclsh" >&5 +echo "configure:4324: checking for tclsh" >&5 if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3721,6 +4355,11 @@ fi # Finally, substitute all of the various values into the Makefile. #-------------------------------------------------------------------- +OUTFILES="Makefile" +if test "x${SHARED_BUILD}" = "x1" ; then + OUTFILES="$OUTFILES library/pkgIndex.tcl" +fi + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -3834,7 +4473,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "Makefile library/pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "$OUTFILES" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then diff --git a/configure.in b/configure.in index 756e8e0..59a862f 100644 --- a/configure.in +++ b/configure.in @@ -82,11 +82,6 @@ AC_SUBST(CLEANFILES) TEA_ENABLE_THREADS - -SC_TCL_EARLY_FLAGS -SC_TCL_64BIT_FLAGS - - TEA_ENABLE_SHARED TEA_CONFIG_CFLAGS @@ -103,4 +98,9 @@ TEA_PROG_TCLSH # Finally, substitute all of the various values into the Makefile. #-------------------------------------------------------------------- -AC_OUTPUT([Makefile library/pkgIndex.tcl]) +OUTFILES="Makefile" +if test "x${SHARED_BUILD}" = "x1" ; then + OUTFILES="$OUTFILES library/pkgIndex.tcl" +fi + +AC_OUTPUT([$OUTFILES]) diff --git a/tclconfig/tcl.m4 b/tclconfig/tcl.m4 index ab2dfdc..97ec1d3 100644 --- a/tclconfig/tcl.m4 +++ b/tclconfig/tcl.m4 @@ -470,10 +470,15 @@ AC_DEFUN(TEA_ENABLE_THREADS, [ fi fi fi - + # Does the pthread-implementation provide # 'pthread_attr_setstacksize' ? + + ac_saved_libs=$LIBS + LIBS="$LIBS $THREADS_LIBS" AC_CHECK_FUNCS(pthread_attr_setstacksize) + LIBS=$ac_saved_libs + AC_CHECK_FUNCS(readdir_r) fi else TCL_THREADS=0 @@ -1010,8 +1015,13 @@ dnl AC_CHECK_TOOL(AR, ar, :) esac else do64bit_ok=yes - EXTRA_CFLAGS="+DA2.0W" - LDFLAGS="+DA2.0W $LDFLAGS" + if test "`uname -m`" = "ia64" ; then + EXTRA_CFLAGS="+DD64" + LDFLAGS="+DD64 $LDFLAGS" + else + EXTRA_CFLAGS="+DA2.0W" + LDFLAGS="+DA2.0W $LDFLAGS" + fi fi fi ;; @@ -2518,6 +2528,18 @@ AC_DEFUN(TEA_SETUP_COMPILER, [ AC_OBJEXT AC_EXEEXT + + #-------------------------------------------------------------------- + # Common compiler flag setup + #-------------------------------------------------------------------- + + TEA_TCL_EARLY_FLAGS + TEA_TCL_64BIT_FLAGS + #TEA_C_BIGENDIAN + if test "${TEA_PLATFORM}" = "unix" ; then + TEA_MISSING_POSIX_HEADERS + TEA_BUGGY_STRTOD + fi ]) #------------------------------------------------------------------------ @@ -3172,116 +3194,3 @@ AC_DEFUN(TEA_LOAD_CONFIG, [ AC_SUBST($1_STUB_LIB_SPEC) AC_SUBST($1_STUB_LIB_PATH) ]) - -#-------------------------------------------------------------------- -# SC_TCL_EARLY_FLAGS -# -# Check for what flags are needed to be passed so the correct OS -# features are available. -# -# Arguments: -# None -# -# Results: -# -# Might define the following vars: -# _ISOC99_SOURCE -# _LARGEFILE64_SOURCE -# -#-------------------------------------------------------------------- - -AC_DEFUN(SC_TCL_EARLY_FLAG,[ - AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]), - AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no, - AC_TRY_COMPILE([[#define ]$1[ 1 -]$2], $3, - [tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes, - [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no))) - if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then - AC_DEFINE($1) - tcl_flags="$tcl_flags $1" - fi]) - -AC_DEFUN(SC_TCL_EARLY_FLAGS,[ - AC_MSG_CHECKING([for required early compiler flags]) - tcl_flags="" - SC_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include ], - [char *p = (char *)strtoll; char *q = (char *)strtoull;]) - SC_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include ], - [struct stat64 buf; int i = stat64("/", &buf);]) - if test "x${tcl_flags}" = "x" ; then - AC_MSG_RESULT(none) - else - AC_MSG_RESULT(${tcl_flags}) - fi]) - -#-------------------------------------------------------------------- -# SC_TCL_64BIT_FLAGS -# -# Check for what is defined in the way of 64-bit features. -# -# Arguments: -# None -# -# Results: -# -# Might define the following vars: -# TCL_WIDE_INT_IS_LONG -# TCL_WIDE_INT_TYPE -# HAVE_STRUCT_DIRENT64 -# HAVE_STRUCT_STAT64 -# HAVE_TYPE_OFF64_T -# -#-------------------------------------------------------------------- - -AC_DEFUN(SC_TCL_64BIT_FLAGS, [ - AC_MSG_CHECKING([for 64-bit integer type]) - AC_CACHE_VAL(tcl_cv_type_64bit,[ - tcl_cv_type_64bit=none - # See if the compiler knows natively about __int64 - AC_TRY_COMPILE(,[__int64 value = (__int64) 0;], - tcl_type_64bit=__int64, tcl_type_64bit="long long") - # See if we should use long anyway Note that we substitute in the - # type that is our current guess for a 64-bit type inside this check - # program, so it should be modified only carefully... - AC_TRY_RUN([#include - int main() {exit(!(sizeof(]${tcl_type_64bit}[) > sizeof(long)));} - ], tcl_cv_type_64bit=${tcl_type_64bit},:,:)]) - if test "${tcl_cv_type_64bit}" = none ; then - AC_DEFINE(TCL_WIDE_INT_IS_LONG) - AC_MSG_RESULT(using long) - else - AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit}) - AC_MSG_RESULT(${tcl_cv_type_64bit}) - - # Now check for auxiliary declarations - AC_MSG_CHECKING([for struct dirent64]) - AC_CACHE_VAL(tcl_cv_struct_dirent64,[ - AC_TRY_COMPILE([#include -#include ],[struct dirent64 p;], - tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)]) - if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then - AC_DEFINE(HAVE_STRUCT_DIRENT64) - fi - AC_MSG_RESULT(${tcl_cv_struct_dirent64}) - - AC_MSG_CHECKING([for struct stat64]) - AC_CACHE_VAL(tcl_cv_struct_stat64,[ - AC_TRY_COMPILE([#include ],[struct stat64 p; -], - tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)]) - if test "x${tcl_cv_struct_stat64}" = "xyes" ; then - AC_DEFINE(HAVE_STRUCT_STAT64) - fi - AC_MSG_RESULT(${tcl_cv_struct_stat64}) - - AC_MSG_CHECKING([for off64_t]) - AC_CACHE_VAL(tcl_cv_type_off64_t,[ - AC_TRY_COMPILE([#include ],[off64_t offset; -], - tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)]) - if test "x${tcl_cv_type_off64_t}" = "xyes" ; then - AC_DEFINE(HAVE_TYPE_OFF64_T) - fi - AC_MSG_RESULT(${tcl_cv_type_off64_t}) - fi]) -- 2.23.0