summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordas <das>2005-11-27 02:36:46 (GMT)
committerdas <das>2005-11-27 02:36:46 (GMT)
commit1b9cdb47165d048a72acb062ead0a15fa722c256 (patch)
tree7ab2d749c35dad34d628970ddcc55bf506c6aace /unix
parent10e80a6dc5f569368be5a75752fa8e6071a2777b (diff)
downloadtk-1b9cdb47165d048a72acb062ead0a15fa722c256.zip
tk-1b9cdb47165d048a72acb062ead0a15fa722c256.tar.gz
tk-1b9cdb47165d048a72acb062ead0a15fa722c256.tar.bz2
* unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),
add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to configure (flag can't be present twice, so can't be in both CFLAGS and LDFLAGS during configure), don't use -prebind when deploying on 10.4, define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542). (SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete autoconf macros. Sync with tk/unix/tcl.m4, sync whitespace with HEAD. * unix/configure.in: fix obsolete autoconf macros, sync gratuitous formatting/ordering differences with tcl/unix/configure.in. * unix/Makefile.in: add CFLAGS to wish/tktest link to make executable linking the same as during configure (needed to avoid loosing any linker relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS). Avoid concurrent linking of wish and compiling of tkTestInit.o during parallel make, fix dependencies and flags for building tkMacOSXInit.o (checkstubs, checkexports): dependency and Darwin fixes * macosx/tkMacOSXEvent.c (TkMacOSXProcessEvent): * macosx/tkMacOSXEvent.h: * macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent): * macosx/tkMacOSXCarbonEvents.c: install standard application event handler, add & call functions to start and stop carbon even timer that runs the tcl event loop periodically during a nested carbon event loop in the toolbox (e.g. during menutracking) to ensure tcl timers etc continue to fire, register app event handler for menu tracking and HI command carbon events, move menu event handling to new handlers for those carbon events, no longer register for/handle appleevent carbon event (now dealt with by standard application event handler), event debugging code dynamically acquires carbon event debugging functions to allow use on Tiger where they are no longer exported from HIToolbox. * macosx/tkMacOSXFont.c (TkMacOSXUseAntialiasedText): * macosx/tkMacOSXKeyEvent.c (GetKeyboardLayout): * macosx/tkMacOSXCarbonEvents.c (TkMacOSXInitCarbonEvents): * macosx/tkMacOSXInit.c: * macosx/tkMacOSXInt.h: abstract common code to dynamically acquire address of a named symbol (from a loaded dynamic library) into new function TkMacOSXGetNamedSymbol() and macro TkMacOSXInitNamedSymbol. * macosx/tkMacOSXMenu.c (TkpNewMenu): * macosx/tkMacOSXMenubutton.c (MenuButtonInitControl): * macosx/tkMacOSXMenus.c (TkMacOSXHandleMenuSelect): switch to modern utf8 aware menu manager API, remove obsolete code, add error handling. * macosx/tkMacOSXMouseEvent.c: define OSX 10.3 or later only constants if necessary to allow compilation on OSX 10.2 * macosx/tkMacOSXWm.c (UpdateSizeHints): remove code that is never executed. * generic/tk.h: add/correct location of version numbers in macosx files. * generic/tkInt.h: clarify fat compile comment. * macosx/Wish.pbproj/default.pbxuser (new file): * macosx/Wish.pbproj/jingham.pbxuser: * macosx/Wish.pbproj/project.pbxproj: sync with HEAD. * macosx/buildTkConfig.tcl (removed): remove obsolete build files. * macosx/README: clarification/cleanup, sync with HEAD, document universal (fat) builds via CFLAGS (i.e. ppc and i386 at the same time). * macosx/Makefile: add support for reusing configure cache, build target fixes. * generic/tkMenu.c: * macosx/tkMacOSXButton.c: * macosx/tkMacOSXDebug.c: * macosx/tkMacOSXDebug.h: * macosx/tkMacOSXDialog.c: * macosx/tkMacOSXDraw.c: * macosx/tkMacOSXEntry.c: * macosx/tkMacOSXMenu.c: * macosx/tkMacOSXMouseEvent.c: * macosx/tkMacOSXXStubs.c: * macosx/tkMacOSXSubwindows.c: * xlib/xgc.c: declare functions and globals used only in own file as static, #ifdef out a few Xlib and aqua functions that are never called (sync with HEAD). * macosx/tkMacOSXPort.h: * generic/tkInt.decls: correct signature of TkMacOSXHandleMenuSelect, add XSync to aqua Xlib stubs. * generic/tkTest.c: #ifdef unix only declarations. (TestmetricsCmd): unify win and mac implementation. * generic/tkTextDisp.c: * generic/tkTextBTree.c: * macosx/tkMacOSXInit.c: * macosx/tkMacOSXKeyEvent.c: * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXXStubs.c: fix gcc 4 warnings. * macosx/tkMacOSXNotify.c: * macosx/tkMacOSXTest.c: sync with HEAD. * generic/tkIntPlatDecls.h: * generic/tkIntXlibDecls.h: * generic/tkStubInit.c: * unix/configure: regen.
Diffstat (limited to 'unix')
-rw-r--r--unix/Makefile.in42
-rwxr-xr-xunix/configure1433
-rw-r--r--unix/configure.in160
-rw-r--r--unix/tcl.m4142
4 files changed, 998 insertions, 779 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 9761480..55dada2 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -5,7 +5,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.87.2.14 2005/08/09 07:40:03 das Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.87.2.15 2005/11/27 02:44:26 das Exp $
# Current Tk version; used in various names.
@@ -522,8 +522,7 @@ objs: ${OBJS}
wish: $(WISH_OBJS) $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) @APP_RSRC_FILE@
- $(CC) $(LDFLAGS) $(WISH_OBJS) \
- @TK_BUILD_LIB_SPEC@ \
+ ${CC} ${CFLAGS} ${LDFLAGS} $(WISH_OBJS) @TK_BUILD_LIB_SPEC@ \
$(WISH_LIBS) $(CC_SEARCH_FLAGS) -o wish
# Resetting the LIB_RUNTIME_DIR below is required so that
@@ -536,7 +535,7 @@ tktest: $(TKTEST_OBJS) $(TK_LIB_FILE)
$(MAKE) tktest-real LIB_RUNTIME_DIR=`pwd`:$(TCL_BIN_DIR)
tktest-real:
- ${CC} $(LDFLAGS) $(TKTEST_OBJS) @TK_BUILD_LIB_SPEC@ \
+ ${CC} ${CFLAGS} ${LDFLAGS} $(TKTEST_OBJS) @TK_BUILD_LIB_SPEC@ \
$(WISH_LIBS) $(CC_SEARCH_FLAGS) -o tktest
# FIXME: This xttest rule seems to be broken in a number of ways.
@@ -544,7 +543,7 @@ tktest-real:
# lib location logic from tktest, and it is not clear where this
# test.o object file comes from.
xttest: test.o tkTest.o tkSquare.o $(TK_LIB_FILE)
- ${CC} $(LDFLAGS) test.o tkTest.o tkSquare.o \
+ ${CC} ${CFLAGS} ${LDFLAGS} test.o tkTest.o tkSquare.o \
@TK_BUILD_LIB_SPEC@ \
$(WISH_LIBS) $(LD_SEARCH_FLAGS) -lXt -o xttest
@@ -806,8 +805,12 @@ depend:
# Test binaries. The rule for tkTestInit.o is complicated because
# it is is compiled from tkAppInit.c. Can't use the "-o" option
# because this doesn't work on some strange compilers (e.g. UnixWare).
+# To enable concurrent parallel make of wish and tktest, this target has to
+# depend on wish, this ensures that linking of wish with tkTestInit.o does not
+# execute concurrently with the renaming and recompiling of that same object
+# file in the target below.
-tkTestInit.o: $(UNIX_DIR)/tkAppInit.c
+tkTestInit.o: $(UNIX_DIR)/tkAppInit.c wish
@if test -f tkAppInit.o ; then \
rm -f tkAppInit.sav; \
mv tkAppInit.o tkAppInit.sav; \
@@ -1153,8 +1156,9 @@ tkMacOSXFont.o: $(MAC_OSX_DIR)/tkMacOSXFont.c
tkMacOSXHLEvents.o: $(MAC_OSX_DIR)/tkMacOSXHLEvents.c
$(CC) -c $(CC_SWITCHES) $(MAC_OSX_DIR)/tkMacOSXHLEvents.c
-tkMacOSXInit.o: $(MAC_OSX_DIR)/tkMacOSXInit.c
- $(CC) -c $(CC_SWITCHES) $(MAC_OSX_DIR)/tkMacOSXInit.c
+tkMacOSXInit.o: $(MAC_OSX_DIR)/tkMacOSXInit.c $(GENERIC_DIR)/tkInitScript.h tkConfig.sh
+ $(CC) -c $(CC_SWITCHES) -DTK_LIBRARY=\"${TK_LIBRARY}\" \
+ $(MAC_OSX_DIR)/tkMacOSXInit.c
tkMacOSXKeyboard.o: $(MAC_OSX_DIR)/tkMacOSXKeyboard.c
$(CC) -c $(CC_SWITCHES) $(MAC_OSX_DIR)/tkMacOSXKeyboard.c
@@ -1247,12 +1251,13 @@ genstubs:
# tables.
#
-checkstubs:
- -@for i in `nm -p $(TK_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
+checkstubs: $(TK_LIB_FILE)
+ -@for i in `nm -p $(TK_LIB_FILE) \
+ | awk '$$2 ~ /^[TDBCS]$$/ { sub("^_", "", $$3); print $$3 }' \
| sort -n`; do \
match=0; \
for j in $(TK_DECLS); do \
- if [ `grep -c $$i $$j` -gt 0 ]; then \
+ if [ `grep -c "$$i *(" $$j` -gt 0 ]; then \
match=1; \
fi; \
done; \
@@ -1272,7 +1277,9 @@ checkuchar:
#
checkexports: $(TK_LIB_FILE)
- -nm -p $(TK_LIB_FILE) | awk '$$2 ~ /[TDB]/ { print $$3 }' | sort -n | grep -v '^[Tt]k'
+ -@nm -p $(TK_LIB_FILE) \
+ | awk '$$2 ~ /^[TDBCS]$$/ { sub("^_", "", $$3); print $$3 }' \
+ | sort -n | grep -E -v '^([Tt]k|_?X)' || true
#
# Target to create a Tk RPM for Linux. Requires that you be on a Linux
@@ -1362,13 +1369,12 @@ dist:
cp -p $(TOP_DIR)/mac/*.doc $(DISTDIR)/mac
cp -p $(TOP_DIR)/mac/*.tcl $(DISTDIR)/mac
mkdir $(DISTDIR)/macosx
- cp -p $(TOP_DIR)/macosx/Makefile $(TOP_DIR)/macosx/Wish.icns \
- $(TOP_DIR)/macosx/*.c $(TOP_DIR)/macosx/*.h $(TOP_DIR)/macosx/*.in \
- $(TOP_DIR)/macosx/*.r $(TOP_DIR)/macosx/*.tcl $(DISTDIR)/macosx
+ cp -p $(TOP_DIR)/macosx/Makefile $(TOP_DIR)/macosx/README \
+ $(TOP_DIR)/macosx/Wish.icns $(TOP_DIR)/macosx/*.c \
+ $(TOP_DIR)/macosx/*.h $(TOP_DIR)/macosx/*.in \
+ $(TOP_DIR)/macosx/*.r $(DISTDIR)/macosx
mkdir $(DISTDIR)/macosx/Wish.pbproj
- cp -p $(TOP_DIR)/macosx/Wish.pbproj/*.pbx* \
- $(DISTDIR)/macosx/Wish.pbproj
- cp -p $(TOP_DIR)/macosx/README $(DISTDIR)/macosx
+ cp -p $(TOP_DIR)/macosx/Wish.pbproj/*.pbx* $(DISTDIR)/macosx/Wish.pbproj
mkdir $(DISTDIR)/compat
cp -p $(TOP_DIR)/license.terms $(TCLDIR)/compat/unistd.h \
$(TCLDIR)/compat/stdlib.h $(TCLDIR)/compat/limits.h \
diff --git a/unix/configure b/unix/configure
index 8164a7f..cde0b5d 100755
--- a/unix/configure
+++ b/unix/configure
@@ -17,11 +17,11 @@ ac_help="$ac_help
--enable-man-symlinks use symlinks for the manpages"
ac_help="$ac_help
--enable-man-compression=PROG
- compress the manpages with PROG"
+ compress the manpages with PROG"
ac_help="$ac_help
--enable-man-suffix=STRING
- use STRING as a suffix to manpage file names
- (default: tk)"
+ use STRING as a suffix to manpage file names
+ (default: tk)"
ac_help="$ac_help
--enable-threads build with threads"
ac_help="$ac_help
@@ -778,10 +778,9 @@ TK_SRC_DIR=`cd $srcdir/..; pwd`
# Compress and/or soft link the manpages?
#------------------------------------------------------------------------
-
- echo $ac_n "checking whether to use symlinks for manpages""... $ac_c" 1>&6
-echo "configure:784: checking whether to use symlinks for manpages" >&5
- # Check whether --enable-man-symlinks or --disable-man-symlinks was given.
+ echo $ac_n "checking whether to use symlinks for manpages""... $ac_c" 1>&6
+echo "configure:783: checking whether to use symlinks for manpages" >&5
+ # Check whether --enable-man-symlinks or --disable-man-symlinks was given.
if test "${enable_man_symlinks+set}" = set; then
enableval="$enable_man_symlinks"
test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks"
@@ -789,45 +788,45 @@ else
enableval="no"
fi
- echo "$ac_t""$enableval" 1>&6
+ echo "$ac_t""$enableval" 1>&6
- echo $ac_n "checking whether to compress the manpages""... $ac_c" 1>&6
-echo "configure:796: checking whether to compress the manpages" >&5
- # Check whether --enable-man-compression or --disable-man-compression was given.
+ echo $ac_n "checking whether to compress the manpages""... $ac_c" 1>&6
+echo "configure:795: checking whether to compress the manpages" >&5
+ # Check whether --enable-man-compression or --disable-man-compression was given.
if test "${enable_man_compression+set}" = set; then
enableval="$enable_man_compression"
test "$enableval" = "yes" && { echo "configure: error: missing argument to --enable-man-compression" 1>&2; exit 1; }
- test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --compress $enableval"
+ test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --compress $enableval"
else
enableval="no"
fi
- echo "$ac_t""$enableval" 1>&6
- if test "$enableval" != "no"; then
- echo $ac_n "checking for compressed file suffix""... $ac_c" 1>&6
-echo "configure:809: checking for compressed file suffix" >&5
- touch TeST
- $enableval TeST
- Z=`ls TeST* | sed 's/^....//'`
- rm -f TeST*
- MAN_FLAGS="$MAN_FLAGS --extension $Z"
- echo "$ac_t""$Z" 1>&6
- fi
+ echo "$ac_t""$enableval" 1>&6
+ if test "$enableval" != "no"; then
+ echo $ac_n "checking for compressed file suffix""... $ac_c" 1>&6
+echo "configure:808: checking for compressed file suffix" >&5
+ touch TeST
+ $enableval TeST
+ Z=`ls TeST* | sed 's/^....//'`
+ rm -f TeST*
+ MAN_FLAGS="$MAN_FLAGS --extension $Z"
+ echo "$ac_t""$Z" 1>&6
+ fi
- echo $ac_n "checking whether to add a package name suffix for the manpages""... $ac_c" 1>&6
-echo "configure:819: checking whether to add a package name suffix for the manpages" >&5
- # Check whether --enable-man-suffix or --disable-man-suffix was given.
+ echo $ac_n "checking whether to add a package name suffix for the manpages""... $ac_c" 1>&6
+echo "configure:818: checking whether to add a package name suffix for the manpages" >&5
+ # Check whether --enable-man-suffix or --disable-man-suffix was given.
if test "${enable_man_suffix+set}" = set; then
enableval="$enable_man_suffix"
test "$enableval" = "yes" && enableval="tk"
- test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --suffix $enableval"
+ test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --suffix $enableval"
else
enableval="no"
fi
- echo "$ac_t""$enableval" 1>&6
+ echo "$ac_t""$enableval" 1>&6
-
+
#------------------------------------------------------------------------
@@ -843,7 +842,7 @@ fi
# 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:847: checking for $ac_word" >&5
+echo "configure:846: 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
@@ -873,7 +872,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:877: checking for $ac_word" >&5
+echo "configure:876: 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
@@ -924,7 +923,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:928: checking for $ac_word" >&5
+echo "configure:927: 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
@@ -956,7 +955,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:960: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:959: 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.
@@ -967,12 +966,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 971 "configure"
+#line 970 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:975: \"$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
@@ -998,12 +997,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:1002: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1001: 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:1007: checking whether we are using GNU C" >&5
+echo "configure:1006: 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
@@ -1012,7 +1011,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1016: \"$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:1015: \"$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
@@ -1031,7 +1030,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:1035: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1034: 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
@@ -1063,8 +1062,10 @@ else
fi
+# limits header checks must come early to prevent
+# an autoconf bug that throws errors on configure
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1068: checking how to run the C preprocessor" >&5
+echo "configure:1069: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1079,13 +1080,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1083 "configure"
+#line 1084 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1090: \"$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
:
@@ -1096,13 +1097,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1100 "configure"
+#line 1101 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1107: \"$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
:
@@ -1113,13 +1114,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1117 "configure"
+#line 1118 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1124: \"$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
:
@@ -1143,21 +1144,61 @@ else
fi
echo "$ac_t""$CPP" 1>&6
-for ac_hdr in unistd.h limits.h
+ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for limits.h""... $ac_c" 1>&6
+echo "configure:1150: 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
+#line 1155 "configure"
+#include "confdefs.h"
+#include <limits.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1160: \"$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
+ cat >> confdefs.h <<\EOF
+#define HAVE_LIMITS_H 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+cat >> confdefs.h <<\EOF
+#define NO_LIMITS_H 1
+EOF
+
+fi
+
+for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1151: checking for $ac_hdr" >&5
+echo "configure:1192: 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
cat > conftest.$ac_ext <<EOF
-#line 1156 "configure"
+#line 1197 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1202: \"$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*
@@ -1184,6 +1225,64 @@ fi
done
+#--------------------------------------------------------------------
+# Supply a substitute for stdlib.h if it doesn't define strtol,
+# strtoul, or strtod (which it doesn't in some versions of SunOS).
+#--------------------------------------------------------------------
+
+echo $ac_n "checking stdlib.h""... $ac_c" 1>&6
+echo "configure:1235: checking stdlib.h" >&5
+cat > conftest.$ac_ext <<EOF
+#line 1237 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "strtol" >/dev/null 2>&1; then
+ rm -rf conftest*
+ tk_ok=yes
+else
+ rm -rf conftest*
+ tk_ok=no
+fi
+rm -f conftest*
+
+cat > conftest.$ac_ext <<EOF
+#line 1252 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "strtoul" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ tk_ok=no
+fi
+rm -f conftest*
+
+cat > conftest.$ac_ext <<EOF
+#line 1266 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "strtod" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ tk_ok=no
+fi
+rm -f conftest*
+
+if test $tk_ok = no; then
+ cat >> confdefs.h <<\EOF
+#define NO_STDLIB_H 1
+EOF
+
+fi
+echo "$ac_t""$tk_ok" 1>&6
+
#------------------------------------------------------------------------
# If we're using GCC, see if the compiler understands -pipe. If so, use it.
# It makes compiling go faster. (This is only a performance feature.)
@@ -1192,18 +1291,18 @@ done
if test -z "$no_pipe"; then
if test -n "$GCC"; then
echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
-echo "configure:1196: checking if the compiler understands -pipe" >&5
+echo "configure:1295: checking if the compiler understands -pipe" >&5
OLDCC="$CC"
CC="$CC -pipe"
cat > conftest.$ac_ext <<EOF
-#line 1200 "configure"
+#line 1299 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@@ -1223,7 +1322,7 @@ fi
echo $ac_n "checking for building with threads""... $ac_c" 1>&6
-echo "configure:1227: checking for building with threads" >&5
+echo "configure:1326: checking for building with threads" >&5
# Check whether --enable-threads or --disable-threads was given.
if test "${enable_threads+set}" = set; then
enableval="$enable_threads"
@@ -1265,7 +1364,7 @@ EOF
EOF
echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:1269: checking for pthread_mutex_init in -lpthread" >&5
+echo "configure:1368: 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
@@ -1273,7 +1372,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1277 "configure"
+#line 1376 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1284,7 +1383,7 @@ int main() {
pthread_mutex_init()
; return 0; }
EOF
-if { (eval echo configure:1288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1387: \"$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
@@ -1312,7 +1411,7 @@ fi
# 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:1316: checking for __pthread_mutex_init in -lpthread" >&5
+echo "configure:1415: 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
@@ -1320,7 +1419,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1324 "configure"
+#line 1423 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1331,7 +1430,7 @@ int main() {
__pthread_mutex_init()
; return 0; }
EOF
-if { (eval echo configure:1335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1434: \"$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
@@ -1359,7 +1458,7 @@ fi
THREADS_LIBS=" -lpthread"
else
echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
-echo "configure:1363: checking for pthread_mutex_init in -lpthreads" >&5
+echo "configure:1462: 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
@@ -1367,7 +1466,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthreads $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1371 "configure"
+#line 1470 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1378,7 +1477,7 @@ int main() {
pthread_mutex_init()
; return 0; }
EOF
-if { (eval echo configure:1382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1481: \"$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
@@ -1404,7 +1503,7 @@ fi
THREADS_LIBS=" -lpthreads"
else
echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
-echo "configure:1408: checking for pthread_mutex_init in -lc" >&5
+echo "configure:1507: 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
@@ -1412,7 +1511,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1416 "configure"
+#line 1515 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1423,7 +1522,7 @@ int main() {
pthread_mutex_init()
; return 0; }
EOF
-if { (eval echo configure:1427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1526: \"$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
@@ -1446,7 +1545,7 @@ fi
if test "$tcl_ok" = "no"; then
echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
-echo "configure:1450: checking for pthread_mutex_init in -lc_r" >&5
+echo "configure:1549: 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
@@ -1454,7 +1553,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc_r $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1458 "configure"
+#line 1557 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1465,7 +1564,7 @@ int main() {
pthread_mutex_init()
; return 0; }
EOF
-if { (eval echo configure:1469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1568: \"$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
@@ -1505,12 +1604,12 @@ fi
for ac_func in pthread_attr_setstacksize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1509: checking for $ac_func" >&5
+echo "configure:1608: 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 <<EOF
-#line 1514 "configure"
+#line 1613 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1533,7 +1632,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1636: \"$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"
else
@@ -1560,12 +1659,12 @@ done
for ac_func in pthread_atfork
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1564: checking for $ac_func" >&5
+echo "configure:1663: 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 <<EOF
-#line 1569 "configure"
+#line 1668 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1588,7 +1687,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1691: \"$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"
else
@@ -1620,12 +1719,106 @@ done
+#--------------------------------------------------------------------
+# On a few very rare systems, all of the libm.a stuff is
+# already in libc.a. Set compiler flags accordingly.
+# Also, Linux requires the "ieee" library for math to work
+# right (and it must appear before "-lm").
+#--------------------------------------------------------------------
+
+MATH_LIBS=""
+echo $ac_n "checking for sin""... $ac_c" 1>&6
+echo "configure:1732: checking for sin" >&5
+if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1737 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char sin(); below. */
+#include <assert.h>
+/* 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 sin();
+
+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_sin) || defined (__stub___sin)
+choke me
+#else
+sin();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_sin=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_sin=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+MATH_LIBS="-lm"
+fi
+
+echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6
+echo "configure:1781: checking for main in -lieee" >&5
+ac_lib_var=`echo ieee'_'main | 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="-lieee $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1789 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:1796: \"$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
+ 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
+ MATH_LIBS="-lieee $MATH_LIBS"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
# Add the threads support libraries
LIBS="$LIBS$THREADS_LIBS"
echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
-echo "configure:1629: checking how to build libraries" >&5
+echo "configure:1822: 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"
@@ -1664,7 +1857,7 @@ EOF
# 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:1668: checking for $ac_word" >&5
+echo "configure:1861: 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
@@ -1696,7 +1889,7 @@ fi
# Step 0.a: Enable 64 bit support?
echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6
-echo "configure:1700: checking if 64bit support is requested" >&5
+echo "configure:1893: checking if 64bit support is requested" >&5
# Check whether --enable-64bit or --disable-64bit was given.
if test "${enable_64bit+set}" = set; then
enableval="$enable_64bit"
@@ -1716,7 +1909,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:1720: checking if 64bit Sparc VIS support is requested" >&5
+echo "configure:1913: 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"
@@ -1740,7 +1933,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:1744: checking system version (for dynamic loading)" >&5
+echo "configure:1937: 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
@@ -1766,7 +1959,7 @@ echo "configure:1744: 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:1770: checking for dlopen in -ldl" >&5
+echo "configure:1963: 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
@@ -1774,7 +1967,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1778 "configure"
+#line 1971 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1785,7 +1978,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1982: \"$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
@@ -1833,7 +2026,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:1837: checking for $ac_word" >&5
+echo "configure:2030: 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
@@ -1894,7 +2087,7 @@ fi
if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
if test "$GCC" = "yes" ; then
echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2
- else
+ else
do64bit_ok=yes
CFLAGS="$CFLAGS -q64"
LDFLAGS="$LDFLAGS -q64"
@@ -1948,7 +2141,7 @@ fi
# known GMT value.
echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:1952: checking for gettimeofday in -lbsd" >&5
+echo "configure:2145: 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
@@ -1956,7 +2149,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1960 "configure"
+#line 2153 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1967,7 +2160,7 @@ int main() {
gettimeofday()
; return 0; }
EOF
-if { (eval echo configure:1971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2164: \"$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
@@ -2010,7 +2203,7 @@ EOF
# is always linked to, for compatibility.
#-----------------------------------------------------------
echo $ac_n "checking for inet_ntoa in -lbind""... $ac_c" 1>&6
-echo "configure:2014: checking for inet_ntoa in -lbind" >&5
+echo "configure:2207: checking for inet_ntoa in -lbind" >&5
ac_lib_var=`echo bind'_'inet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2018,7 +2211,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2022 "configure"
+#line 2215 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2029,7 +2222,7 @@ int main() {
inet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:2033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2226: \"$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
@@ -2095,7 +2288,7 @@ EOF
SHLIB_SUFFIX=".sl"
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:2099: checking for shl_load in -ldld" >&5
+echo "configure:2292: 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
@@ -2103,7 +2296,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2107 "configure"
+#line 2300 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2114,7 +2307,7 @@ int main() {
shl_load()
; return 0; }
EOF
-if { (eval echo configure:2118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2311: \"$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
@@ -2182,7 +2375,7 @@ 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:2186: checking for shl_load in -ldld" >&5
+echo "configure:2379: 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
@@ -2190,7 +2383,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2194 "configure"
+#line 2387 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2201,7 +2394,7 @@ int main() {
shl_load()
; return 0; }
EOF
-if { (eval echo configure:2205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2398: \"$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
@@ -2325,17 +2518,17 @@ fi
else
ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:2329: checking for dld.h" >&5
+echo "configure:2522: 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
-#line 2334 "configure"
+#line 2527 "configure"
#include "confdefs.h"
#include <dld.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2532: \"$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*
@@ -2399,17 +2592,17 @@ EOF
else
ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:2403: checking for dld.h" >&5
+echo "configure:2596: 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
-#line 2408 "configure"
+#line 2601 "configure"
#include "confdefs.h"
#include <dld.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2606: \"$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*
@@ -2440,6 +2633,18 @@ fi
CFLAGS="$CFLAGS -mieee"
fi
;;
+ Lynx*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ CFLAGS_OPTIMIZE=-02
+ SHLIB_LD="${CC} -shared "
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-mshared -ldl"
+ LD_FLAGS="-Wl,--export-dynamic"
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ ;;
MP-RAS-02*)
SHLIB_CFLAGS="-K PIC"
SHLIB_LD="cc -G"
@@ -2465,17 +2670,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:2469: checking for dlfcn.h" >&5
+echo "configure:2674: 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
-#line 2474 "configure"
+#line 2679 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2684: \"$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*
@@ -2502,9 +2707,9 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:2506: checking for ELF" >&5
+echo "configure:2711: checking for ELF" >&5
cat > conftest.$ac_ext <<EOF
-#line 2508 "configure"
+#line 2713 "configure"
#include "confdefs.h"
#ifdef __ELF__
@@ -2578,9 +2783,9 @@ fi
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:2582: checking for ELF" >&5
+echo "configure:2787: checking for ELF" >&5
cat > conftest.$ac_ext <<EOF
-#line 2584 "configure"
+#line 2789 "configure"
#include "confdefs.h"
#ifdef __ELF__
@@ -2637,9 +2842,13 @@ rm -f conftest*
Darwin-*)
CFLAGS_OPTIMIZE="-Os"
SHLIB_CFLAGS="-fno-common"
- SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
+ if test $do64bit = yes; then
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
+ fi
+ SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
echo $ac_n "checking if ld accepts -single_module flag""... $ac_c" 1>&6
-echo "configure:2643: checking if ld accepts -single_module flag" >&5
+echo "configure:2852: checking if ld accepts -single_module flag" >&5
if eval "test \"`echo '$''{'tcl_cv_ld_single_module'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2647,14 +2856,14 @@ else
hold_ldflags=$LDFLAGS
LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
cat > conftest.$ac_ext <<EOF
-#line 2651 "configure"
+#line 2860 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
tcl_cv_ld_single_module=yes
else
@@ -2675,9 +2884,14 @@ echo "$ac_t""$tcl_cv_ld_single_module" 1>&6
SHLIB_SUFFIX=".dylib"
DL_OBJS="tclLoadDyld.o"
DL_LIBS=""
- LDFLAGS="$LDFLAGS -prebind -headerpad_max_install_names"
+ # Don't use -prebind when building for Mac OS X 10.4 or later only:
+ if test -z "${MACOSX_DEPLOYMENT_TARGET}" -o \
+ `echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F. '{print $2}'` -lt 4; then
+ LDFLAGS="$LDFLAGS -prebind"
+ fi
+ LDFLAGS="$LDFLAGS -headerpad_max_install_names"
echo $ac_n "checking if ld accepts -search_paths_first flag""... $ac_c" 1>&6
-echo "configure:2681: checking if ld accepts -search_paths_first flag" >&5
+echo "configure:2895: checking if ld accepts -search_paths_first flag" >&5
if eval "test \"`echo '$''{'tcl_cv_ld_search_paths_first'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2685,14 +2899,14 @@ else
hold_ldflags=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
cat > conftest.$ac_ext <<EOF
-#line 2689 "configure"
+#line 2903 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
tcl_cv_ld_search_paths_first=yes
else
@@ -2715,7 +2929,7 @@ echo "$ac_t""$tcl_cv_ld_search_paths_first" 1>&6
PLAT_OBJS=\$\(MAC\_OSX_OBJS\)
PLAT_SRCS=\$\(MAC\_OSX_SRCS\)
echo $ac_n "checking whether to use CoreFoundation""... $ac_c" 1>&6
-echo "configure:2719: checking whether to use CoreFoundation" >&5
+echo "configure:2933: checking whether to use CoreFoundation" >&5
# Check whether --enable-corefoundation or --disable-corefoundation was given.
if test "${enable_corefoundation+set}" = set; then
enableval="$enable_corefoundation"
@@ -2727,22 +2941,28 @@ fi
echo "$ac_t""$tcl_corefoundation" 1>&6
if test $tcl_corefoundation = yes; then
echo $ac_n "checking for CoreFoundation.framework""... $ac_c" 1>&6
-echo "configure:2731: checking for CoreFoundation.framework" >&5
+echo "configure:2945: checking for CoreFoundation.framework" >&5
if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- hold_libs=$LIBS
+ hold_libs=$LIBS; hold_cflags=$CFLAGS
+ if test $do64bit_ok = no ; then
+ # remove -arch ppc64 from CFLAGS while testing presence
+ # of CF, otherwise all archs will have CF disabled.
+ # CF for ppc64 is disabled in tclUnixPort.h instead.
+ CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/'`"
+ fi
LIBS="$LIBS -framework CoreFoundation"
cat > conftest.$ac_ext <<EOF
-#line 2739 "configure"
+#line 2959 "configure"
#include "confdefs.h"
#include <CoreFoundation/CoreFoundation.h>
int main() {
CFBundleRef b = CFBundleGetMainBundle();
; return 0; }
EOF
-if { (eval echo configure:2746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
tcl_cv_lib_corefoundation=yes
else
@@ -2752,7 +2972,7 @@ else
tcl_cv_lib_corefoundation=no
fi
rm -f conftest*
- LIBS=$hold_libs
+ LIBS=$hold_libs; CFLAGS=$hold_cflags
fi
echo "$ac_t""$tcl_cv_lib_corefoundation" 1>&6
@@ -2768,17 +2988,17 @@ EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2772: checking for $ac_hdr" >&5
+echo "configure:2992: 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
cat > conftest.$ac_ext <<EOF
-#line 2777 "configure"
+#line 2997 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3002: \"$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*
@@ -2807,12 +3027,107 @@ done
for ac_func in OSSpinLockLock
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2811: checking for $ac_func" >&5
+echo "configure:3031: 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 <<EOF
+#line 3036 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* 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() {
+
+/* 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:3059: \"$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"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+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 <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_hdr in copyfile.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3087: 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
+ cat > conftest.$ac_ext <<EOF
+#line 3092 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3097: \"$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 <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in copyfile
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3126: 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 <<EOF
-#line 2816 "configure"
+#line 3131 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2835,7 +3150,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3154: \"$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"
else
@@ -2875,15 +3190,19 @@ EOF
#define TCL_LOAD_FROM_MEMORY 1
EOF
+ cat >> confdefs.h <<\EOF
+#define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING 1
+EOF
+
# prior to Darwin 7, realpath is not threadsafe, so don't
# use it when threads are enabled, c.f. bug # 711232:
echo $ac_n "checking for realpath""... $ac_c" 1>&6
-echo "configure:2882: checking for realpath" >&5
+echo "configure:3201: checking for realpath" >&5
if eval "test \"`echo '$''{'ac_cv_func_realpath'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2887 "configure"
+#line 3206 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char realpath(); below. */
@@ -2906,7 +3225,7 @@ realpath();
; return 0; }
EOF
-if { (eval echo configure:2910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_realpath=yes"
else
@@ -2925,7 +3244,7 @@ else
echo "$ac_t""no" 1>&6
fi
- if test "$ac_cv_func_realpath" = yes -a "${TCL_THREADS}" = 1 \
+ if test $ac_cv_func_realpath = yes -a "${TCL_THREADS}" = 1 \
-a `uname -r | awk -F. '{print $1}'` -lt 7 ; then
ac_cv_func_realpath=no
fi
@@ -3217,17 +3536,17 @@ EOF
# that don't grok the -Bexport option. Test that it does.
hold_ldflags=$LDFLAGS
echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:3221: checking for ld accepts -Bexport flag" >&5
+echo "configure:3540: checking for ld accepts -Bexport flag" >&5
LDFLAGS="$LDFLAGS -Wl,-Bexport"
cat > conftest.$ac_ext <<EOF
-#line 3224 "configure"
+#line 3543 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:3231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -3268,9 +3587,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:3272: checking sys/exec.h" >&5
+echo "configure:3591: checking sys/exec.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3274 "configure"
+#line 3593 "configure"
#include "confdefs.h"
#include <sys/exec.h>
int main() {
@@ -3288,7 +3607,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:3292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_ok=usable
else
@@ -3306,9 +3625,9 @@ EOF
else
echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:3310: checking a.out.h" >&5
+echo "configure:3629: checking a.out.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3312 "configure"
+#line 3631 "configure"
#include "confdefs.h"
#include <a.out.h>
int main() {
@@ -3326,7 +3645,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:3330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_ok=usable
else
@@ -3344,9 +3663,9 @@ EOF
else
echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:3348: checking sys/exec_aout.h" >&5
+echo "configure:3667: checking sys/exec_aout.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3350 "configure"
+#line 3669 "configure"
#include "confdefs.h"
#include <sys/exec_aout.h>
int main() {
@@ -3364,7 +3683,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:3368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_ok=usable
else
@@ -3515,7 +3834,7 @@ fi
echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:3519: checking for build with symbols" >&5
+echo "configure:3838: 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"
@@ -3576,21 +3895,21 @@ TK_DBGX=${DBGX}
echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
-echo "configure:3580: checking for required early compiler flags" >&5
+echo "configure:3899: checking for required early compiler flags" >&5
tcl_flags=""
if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3587 "configure"
+#line 3906 "configure"
#include "confdefs.h"
#include <stdlib.h>
int main() {
char *p = (char *)strtoll; char *q = (char *)strtoull;
; return 0; }
EOF
-if { (eval echo configure:3594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_cv_flag__isoc99_source=no
else
@@ -3598,7 +3917,7 @@ else
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 3602 "configure"
+#line 3921 "configure"
#include "confdefs.h"
#define _ISOC99_SOURCE 1
#include <stdlib.h>
@@ -3606,7 +3925,7 @@ int main() {
char *p = (char *)strtoll; char *q = (char *)strtoull;
; return 0; }
EOF
-if { (eval echo configure:3610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_cv_flag__isoc99_source=yes
else
@@ -3632,14 +3951,14 @@ EOF
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3636 "configure"
+#line 3955 "configure"
#include "confdefs.h"
#include <sys/stat.h>
int main() {
struct stat64 buf; int i = stat64("/", &buf);
; return 0; }
EOF
-if { (eval echo configure:3643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_cv_flag__largefile64_source=no
else
@@ -3647,7 +3966,7 @@ else
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 3651 "configure"
+#line 3970 "configure"
#include "confdefs.h"
#define _LARGEFILE64_SOURCE 1
#include <sys/stat.h>
@@ -3655,7 +3974,7 @@ int main() {
struct stat64 buf; int i = stat64("/", &buf);
; return 0; }
EOF
-if { (eval echo configure:3659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_cv_flag__largefile64_source=yes
else
@@ -3676,6 +3995,55 @@ EOF
tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
fi
+
+ if eval "test \"`echo '$''{'tcl_cv_flag__largefile_source64'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4004 "configure"
+#include "confdefs.h"
+#include <sys/stat.h>
+int main() {
+char *p = (char *)open64;
+; return 0; }
+EOF
+if { (eval echo configure:4011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ tcl_cv_flag__largefile_source64=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ cat > conftest.$ac_ext <<EOF
+#line 4019 "configure"
+#include "confdefs.h"
+#define _LARGEFILE_SOURCE64 1
+#include <sys/stat.h>
+int main() {
+char *p = (char *)open64;
+; return 0; }
+EOF
+if { (eval echo configure:4027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ tcl_cv_flag__largefile_source64=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ tcl_cv_flag__largefile_source64=no
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+
+ if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
+ cat >> confdefs.h <<\EOF
+#define _LARGEFILE_SOURCE64 1
+EOF
+
+ tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
+ fi
if test "x${tcl_flags}" = "x" ; then
echo "$ac_t""none" 1>&6
else
@@ -3684,7 +4052,7 @@ EOF
echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
-echo "configure:3688: checking for 64-bit integer type" >&5
+echo "configure:4056: 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
@@ -3692,14 +4060,14 @@ else
tcl_cv_type_64bit=none
# See if the compiler knows natively about __int64
cat > conftest.$ac_ext <<EOF
-#line 3696 "configure"
+#line 4064 "configure"
#include "confdefs.h"
int main() {
__int64 value = (__int64) 0;
; return 0; }
EOF
-if { (eval echo configure:3703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_type_64bit=__int64
else
@@ -3713,7 +4081,7 @@ rm -f conftest*
# type that is our current guess for a 64-bit type inside this check
# program, so it should be modified only carefully...
cat > conftest.$ac_ext <<EOF
-#line 3717 "configure"
+#line 4085 "configure"
#include "confdefs.h"
int main() {
@@ -3722,7 +4090,7 @@ switch (0) {
}
; return 0; }
EOF
-if { (eval echo configure:3726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_cv_type_64bit=${tcl_type_64bit}
else
@@ -3747,13 +4115,13 @@ EOF
# Now check for auxiliary declarations
echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
-echo "configure:3751: checking for struct dirent64" >&5
+echo "configure:4119: 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 <<EOF
-#line 3757 "configure"
+#line 4125 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/dirent.h>
@@ -3761,7 +4129,7 @@ int main() {
struct dirent64 p;
; return 0; }
EOF
-if { (eval echo configure:3765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_cv_struct_dirent64=yes
else
@@ -3782,13 +4150,13 @@ EOF
echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6
echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
-echo "configure:3786: checking for struct stat64" >&5
+echo "configure:4154: 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 <<EOF
-#line 3792 "configure"
+#line 4160 "configure"
#include "confdefs.h"
#include <sys/stat.h>
int main() {
@@ -3796,7 +4164,7 @@ struct stat64 p;
; return 0; }
EOF
-if { (eval echo configure:3800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_cv_struct_stat64=yes
else
@@ -3819,12 +4187,12 @@ EOF
for ac_func in open64 lseek64
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3823: checking for $ac_func" >&5
+echo "configure:4191: 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 <<EOF
-#line 3828 "configure"
+#line 4196 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3847,7 +4215,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4219: \"$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"
else
@@ -3872,13 +4240,13 @@ fi
done
echo $ac_n "checking for off64_t""... $ac_c" 1>&6
-echo "configure:3876: checking for off64_t" >&5
+echo "configure:4244: 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 <<EOF
-#line 3882 "configure"
+#line 4250 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
@@ -3886,7 +4254,7 @@ off64_t offset;
; return 0; }
EOF
-if { (eval echo configure:3890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_cv_type_off64_t=yes
else
@@ -3916,14 +4284,14 @@ EOF
#--------------------------------------------------------------------
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3920: checking whether byte ordering is bigendian" >&5
+echo "configure:4288: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 3927 "configure"
+#line 4295 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3934,11 +4302,11 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 3942 "configure"
+#line 4310 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -3949,7 +4317,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:3953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -3969,7 +4337,7 @@ 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 <<EOF
-#line 3973 "configure"
+#line 4341 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@@ -3982,7 +4350,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:3986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@@ -4019,286 +4387,296 @@ fi
if test "$TCL_PREFIX" != "$prefix"; then
echo "configure: warning:
- Different --prefix selected for Tk and Tcl!
- [package require Tk] may not work correctly in tclsh." 1>&2
+ Different --prefix selected for Tk and Tcl!
+ [package require Tk] may not work correctly in tclsh." 1>&2
fi
#--------------------------------------------------------------------
-# On a few very rare systems, all of the libm.a stuff is
-# already in libc.a. Set compiler flags accordingly.
-# Also, Linux requires the "ieee" library for math to work
-# right (and it must appear before "-lm").
+# Include sys/select.h if it exists and if it supplies things
+# that appear to be useful and aren't already in sys/types.h.
+# This appears to be true only on the RS/6000 under AIX. Some
+# systems like OSF/1 have a sys/select.h that's of no use, and
+# other systems like SCO UNIX have a sys/select.h that's
+# pernicious. If "fd_set" isn't defined anywhere then set a
+# special flag.
#--------------------------------------------------------------------
-MATH_LIBS=""
-echo $ac_n "checking for sin""... $ac_c" 1>&6
-echo "configure:4036: checking for sin" >&5
-if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
+echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6
+echo "configure:4406: checking for fd_set in sys/types" >&5
+if eval "test \"`echo '$''{'tcl_cv_type_fd_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4041 "configure"
+#line 4411 "configure"
#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char sin(); below. */
-#include <assert.h>
-/* 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 sin();
-
+#include <sys/types.h>
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_sin) || defined (__stub___sin)
-choke me
-#else
-sin();
-#endif
-
+fd_set readMask, writeMask;
; return 0; }
EOF
-if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- eval "ac_cv_func_sin=yes"
+ tcl_cv_type_fd_set=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- eval "ac_cv_func_sin=no"
+ tcl_cv_type_fd_set=no
fi
rm -f conftest*
fi
-if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
-else
- echo "$ac_t""no" 1>&6
-MATH_LIBS="-lm"
-fi
-
-echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6
-echo "configure:4085: checking for main in -lieee" >&5
-ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+echo "$ac_t""$tcl_cv_type_fd_set" 1>&6
+tk_ok=$tcl_cv_type_fd_set
+if test $tcl_cv_type_fd_set = no; then
+ echo $ac_n "checking for fd_mask in sys/select""... $ac_c" 1>&6
+echo "configure:4434: checking for fd_mask in sys/select" >&5
+ if eval "test \"`echo '$''{'tcl_cv_grep_fd_mask'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-lieee $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4093 "configure"
+ cat > conftest.$ac_ext <<EOF
+#line 4439 "configure"
#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
+#include <sys/select.h>
EOF
-if { (eval echo configure:4100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "fd_mask" >/dev/null 2>&1; then
rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
+ tcl_cv_grep_fd_mask=present
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_grep_fd_mask=missing
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
- MATH_LIBS="-lieee $MATH_LIBS"
-else
- echo "$ac_t""no" 1>&6
+
+ echo "$ac_t""$tcl_cv_grep_fd_mask" 1>&6
+ if test $tcl_cv_grep_fd_mask = present; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_SYS_SELECT_H 1
+EOF
+
+ tk_ok=yes
+ fi
fi
+if test $tk_ok = no; then
+ cat >> confdefs.h <<\EOF
+#define NO_FD_SET 1
+EOF
+fi
-#--------------------------------------------------------------------
-# On AIX systems, libbsd.a has to be linked in to support
-# non-blocking file IO. This library has to be linked in after
-# the MATH_LIBS or it breaks the pow() function. The way to
-# insure proper sequencing, is to add it to the tail of MATH_LIBS.
-# This library also supplies gettimeofday.
-#--------------------------------------------------------------------
-libbsd=no
-if test "`uname -s`" = "AIX" ; then
- echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4131: 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
+#------------------------------------------------------------------------------
+# Find out all about time handling differences.
+#------------------------------------------------------------------------------
+
+for ac_hdr in sys/time.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4479: 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="-lbsd $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 4139 "configure"
+ cat > conftest.$ac_ext <<EOF
+#line 4484 "configure"
#include "confdefs.h"
-/* 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 gettimeofday();
-
-int main() {
-gettimeofday()
-; return 0; }
+#include <$ac_hdr>
EOF
-if { (eval echo configure:4150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4489: \"$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_lib_$ac_lib_var=yes"
+ 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_lib_$ac_lib_var=no"
+ eval "ac_cv_header_$ac_safe=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_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
- libbsd=yes
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
else
echo "$ac_t""no" 1>&6
fi
+done
- if test $libbsd = yes; then
- MATH_LIBS="$MATH_LIBS -lbsd"
- fi
-fi
-
-#--------------------------------------------------------------------
-# Supply a substitute for stdlib.h if it doesn't define strtol,
-# strtoul, or strtod (which it doesn't in some versions of SunOS).
-#--------------------------------------------------------------------
-
-echo $ac_n "checking stdlib.h""... $ac_c" 1>&6
-echo "configure:4181: checking stdlib.h" >&5
-cat > conftest.$ac_ext <<EOF
-#line 4183 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "strtol" >/dev/null 2>&1; then
- rm -rf conftest*
- tk_ok=yes
+echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
+echo "configure:4516: checking whether time.h and sys/time.h may both be included" >&5
+if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
else
- rm -rf conftest*
- tk_ok=no
-fi
-rm -f conftest*
-
-cat > conftest.$ac_ext <<EOF
-#line 4198 "configure"
+ cat > conftest.$ac_ext <<EOF
+#line 4521 "configure"
#include "confdefs.h"
-#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+int main() {
+struct tm *tp;
+; return 0; }
EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "strtoul" >/dev/null 2>&1; then
- :
-else
+if { (eval echo configure:4530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- tk_ok=no
-fi
-rm -f conftest*
-
-cat > conftest.$ac_ext <<EOF
-#line 4212 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "strtod" >/dev/null 2>&1; then
- :
+ ac_cv_header_time=yes
else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
- tk_ok=no
+ ac_cv_header_time=no
fi
rm -f conftest*
+fi
-if test $tk_ok = no; then
- cat >> confdefs.h <<\EOF
-#define NO_STDLIB_H 1
+echo "$ac_t""$ac_cv_header_time" 1>&6
+if test $ac_cv_header_time = yes; then
+ cat >> confdefs.h <<\EOF
+#define TIME_WITH_SYS_TIME 1
EOF
fi
-echo "$ac_t""$tk_ok" 1>&6
+
#--------------------------------------------------------------------
-# Include sys/select.h if it exists and if it supplies things
-# that appear to be useful and aren't already in sys/types.h.
-# This appears to be true only on the RS/6000 under AIX. Some
-# systems like OSF/1 have a sys/select.h that's of no use, and
-# other systems like SCO UNIX have a sys/select.h that's
-# pernicious. If "fd_set" isn't defined anywhere then set a
-# special flag.
+# Under Solaris 2.4, strtod returns the wrong value for the
+# terminating character under some conditions. Check for this
+# and if the problem exists use a substitute procedure
+# "fixstrtod" (provided by Tcl) that corrects the error.
#--------------------------------------------------------------------
-echo $ac_n "checking fd_set and sys/select""... $ac_c" 1>&6
-echo "configure:4244: checking fd_set and sys/select" >&5
-cat > conftest.$ac_ext <<EOF
-#line 4246 "configure"
+
+ echo $ac_n "checking for strtod""... $ac_c" 1>&6
+echo "configure:4560: 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 <<EOF
+#line 4565 "configure"
#include "confdefs.h"
-#include <sys/types.h>
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char strtod(); below. */
+#include <assert.h>
+/* 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 strtod();
+
int main() {
-fd_set readMask, writeMask;
+
+/* 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:4253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- tk_ok=yes
+ eval "ac_cv_func_strtod=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- tk_ok=no
+ eval "ac_cv_func_strtod=no"
fi
rm -f conftest*
-if test $tk_ok = no; then
- cat > conftest.$ac_ext <<EOF
-#line 4265 "configure"
+fi
+
+if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ tcl_strtod=1
+else
+ echo "$ac_t""no" 1>&6
+tcl_strtod=0
+fi
+
+ if test "$tcl_strtod" = 1; then
+ echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
+echo "configure:4610: checking for Solaris2.4/Tru64 strtod bugs" >&5
+ if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ if test "$cross_compiling" = yes; then
+ tcl_cv_strtod_buggy=0
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4619 "configure"
#include "confdefs.h"
-#include <sys/select.h>
+
+ extern double strtod();
+ int main() {
+ char *infString="Inf", *nanString="NaN", *spaceString=" ";
+ char *term;
+ double value;
+ value = strtod(infString, &term);
+ if ((term != infString) && (term[-1] == 0)) {
+ exit(1);
+ }
+ value = strtod(nanString, &term);
+ if ((term != nanString) && (term[-1] == 0)) {
+ exit(1);
+ }
+ value = strtod(spaceString, &term);
+ if (term == (spaceString+1)) {
+ exit(1);
+ }
+ exit(0);
+ }
EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "fd_mask" >/dev/null 2>&1; then
- rm -rf conftest*
- tk_ok=yes
+if { (eval echo configure:4642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ tcl_cv_strtod_buggy=1
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ tcl_cv_strtod_buggy=0
+fi
+rm -fr conftest*
fi
-rm -f conftest*
- if test $tk_ok = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_SYS_SELECT_H 1
+fi
+
+ if test "$tcl_cv_strtod_buggy" = 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_t""$tk_ok" 1>&6
-if test $tk_ok = no; then
- cat >> confdefs.h <<\EOF
-#define NO_FD_SET 1
-EOF
-fi
#--------------------------------------------------------------------
-# Check for various typedefs and provide substitutes if
-# they don't exist.
+# Check for various typedefs and provide substitutes if
+# they don't exist.
#--------------------------------------------------------------------
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:4297: checking for ANSI C header files" >&5
+echo "configure:4675: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4302 "configure"
+#line 4680 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -4306,7 +4684,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4688: \"$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*
@@ -4323,7 +4701,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 4327 "configure"
+#line 4705 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -4341,7 +4719,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 4345 "configure"
+#line 4723 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -4362,7 +4740,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 4366 "configure"
+#line 4744 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -4373,7 +4751,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -4397,12 +4775,12 @@ EOF
fi
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:4401: checking for mode_t" >&5
+echo "configure:4779: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4406 "configure"
+#line 4784 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -4430,12 +4808,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:4434: checking for pid_t" >&5
+echo "configure:4812: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4439 "configure"
+#line 4817 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -4463,12 +4841,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:4467: checking for size_t" >&5
+echo "configure:4845: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4472 "configure"
+#line 4850 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -4496,12 +4874,12 @@ EOF
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:4500: checking for uid_t in sys/types.h" >&5
+echo "configure:4878: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4505 "configure"
+#line 4883 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -4530,112 +4908,37 @@ EOF
fi
-#------------------------------------------------------------------------------
-# Find out about time handling differences.
-#------------------------------------------------------------------------------
-
-for ac_hdr in sys/time.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4542: 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
- cat > conftest.$ac_ext <<EOF
-#line 4547 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4552: \"$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 <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:4579: checking whether time.h and sys/time.h may both be included" >&5
-if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4584 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-int main() {
-struct tm *tp;
-; return 0; }
-EOF
-if { (eval echo configure:4593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_header_time=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_time=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_time" 1>&6
-if test $ac_cv_header_time = yes; then
- cat >> confdefs.h <<\EOF
-#define TIME_WITH_SYS_TIME 1
-EOF
-
-fi
-
-
#-------------------------------------------
# In OS/390 struct pwd has no pw_gecos field
#-------------------------------------------
echo $ac_n "checking pw_gecos in struct pwd""... $ac_c" 1>&6
-echo "configure:4619: checking pw_gecos in struct pwd" >&5
-cat > conftest.$ac_ext <<EOF
-#line 4621 "configure"
+echo "configure:4917: checking pw_gecos in struct pwd" >&5
+if eval "test \"`echo '$''{'tcl_cv_pwd_pw_gecos'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4922 "configure"
#include "confdefs.h"
#include <pwd.h>
int main() {
struct passwd pwd; pwd.pw_gecos;
; return 0; }
EOF
-if { (eval echo configure:4628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- tk_ok=yes
+ tcl_cv_pwd_pw_gecos=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- tk_ok=no
+ tcl_cv_pwd_pw_gecos=no
fi
rm -f conftest*
-echo "$ac_t""$tk_ok" 1>&6
-if test $tk_ok = yes; then
+fi
+
+echo "$ac_t""$tcl_cv_pwd_pw_gecos" 1>&6
+if test $tcl_cv_pwd_pw_gecos = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_PW_GECOS 1
EOF
@@ -4698,7 +5001,7 @@ else
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:4702: checking for X" >&5
+echo "configure:5005: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -4760,12 +5063,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 4764 "configure"
+#line 5067 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5072: \"$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*
@@ -4834,14 +5137,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4838 "configure"
+#line 5141 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:4845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -4931,12 +5234,12 @@ fi
if test "$no_x" = ""; then
if test "$x_includes" = ""; then
cat > conftest.$ac_ext <<EOF
-#line 4935 "configure"
+#line 5238 "configure"
#include "confdefs.h"
#include <X11/XIntrinsic.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5243: \"$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
:
@@ -4956,15 +5259,15 @@ rm -f conftest*
fi
if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
-echo "configure:4960: checking for X11 header files" >&5
+echo "configure:5263: checking for X11 header files" >&5
found_xincludes="no"
cat > conftest.$ac_ext <<EOF
-#line 4963 "configure"
+#line 5266 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5271: \"$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*
@@ -5000,7 +5303,7 @@ rm -f conftest*
if test "$no_x" = yes; then
echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
-echo "configure:5004: checking for X11 libraries" >&5
+echo "configure:5307: checking for X11 libraries" >&5
XLIBSW=nope
dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
for i in $dirs ; do
@@ -5020,7 +5323,7 @@ echo "configure:5004: checking for X11 libraries" >&5
fi
if test "$XLIBSW" = nope ; then
echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
-echo "configure:5024: checking for XCreateWindow in -lXwindow" >&5
+echo "configure:5327: checking for XCreateWindow in -lXwindow" >&5
ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5028,7 +5331,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lXwindow $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5032 "configure"
+#line 5335 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5039,7 +5342,7 @@ int main() {
XCreateWindow()
; return 0; }
EOF
-if { (eval echo configure:5043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5346: \"$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
@@ -5116,7 +5419,7 @@ eval "LD_SEARCH_FLAGS=\"$TCL_LD_SEARCH_FLAGS\""
if test $tk_aqua = no; then
echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
-echo "configure:5120: checking for main in -lXbsd" >&5
+echo "configure:5423: checking for main in -lXbsd" >&5
ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5124,14 +5427,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lXbsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5128 "configure"
+#line 5431 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5438: \"$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
@@ -5155,12 +5458,12 @@ fi
tk_checkBoth=0
echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:5159: checking for connect" >&5
+echo "configure:5462: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5164 "configure"
+#line 5467 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
@@ -5183,7 +5486,7 @@ connect();
; return 0; }
EOF
-if { (eval echo configure:5187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
@@ -5205,7 +5508,7 @@ fi
if test "$tk_checkSocket" = 1; then
echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
-echo "configure:5209: checking for main in -lsocket" >&5
+echo "configure:5512: checking for main in -lsocket" >&5
ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5213,14 +5516,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5217 "configure"
+#line 5520 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5527: \"$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
@@ -5246,12 +5549,12 @@ if test "$tk_checkBoth" = 1; then
tk_oldLibs=$LIBS
LIBS="$LIBS -lsocket -lnsl"
echo $ac_n "checking for accept""... $ac_c" 1>&6
-echo "configure:5250: checking for accept" >&5
+echo "configure:5553: checking for accept" >&5
if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5255 "configure"
+#line 5558 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char accept(); below. */
@@ -5274,7 +5577,7 @@ accept();
; return 0; }
EOF
-if { (eval echo configure:5278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_accept=yes"
else
@@ -5296,12 +5599,12 @@ fi
fi
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:5300: checking for gethostbyname" >&5
+echo "configure:5603: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5305 "configure"
+#line 5608 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
@@ -5324,7 +5627,7 @@ gethostbyname();
; return 0; }
EOF
-if { (eval echo configure:5328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
@@ -5342,7 +5645,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:5346: checking for main in -lnsl" >&5
+echo "configure:5649: checking for main in -lnsl" >&5
ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5350,14 +5653,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5354 "configure"
+#line 5657 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5664: \"$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
@@ -5393,13 +5696,13 @@ fi
if test -d /usr/include/mit -a $tk_aqua = no; then
echo $ac_n "checking MIT X libraries""... $ac_c" 1>&6
-echo "configure:5397: checking MIT X libraries" >&5
+echo "configure:5700: checking MIT X libraries" >&5
tk_oldCFlags=$CFLAGS
CFLAGS="$CFLAGS -I/usr/include/mit"
tk_oldLibs=$LIBS
LIBS="$LIBS -lX11-mit"
cat > conftest.$ac_ext <<EOF
-#line 5403 "configure"
+#line 5706 "configure"
#include "confdefs.h"
#include <X11/Xlib.h>
@@ -5410,7 +5713,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
@@ -5434,14 +5737,14 @@ fi
#--------------------------------------------------------------------
echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
-echo "configure:5438: checking whether char is unsigned" >&5
+echo "configure:5741: checking whether char is unsigned" >&5
if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$GCC" = yes; then
# GCC predefines this symbol on systems where it applies.
cat > conftest.$ac_ext <<EOF
-#line 5445 "configure"
+#line 5748 "configure"
#include "confdefs.h"
#ifdef __CHAR_UNSIGNED__
yes
@@ -5463,7 +5766,7 @@ 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 <<EOF
-#line 5467 "configure"
+#line 5770 "configure"
#include "confdefs.h"
/* volatile prevents gcc2 from optimizing the test away on sparcs. */
#if !defined(__STDC__) || __STDC__ != 1
@@ -5473,7 +5776,7 @@ main() {
volatile char c = 255; exit(c < 0);
}
EOF
-if { (eval echo configure:5477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_char_unsigned=yes
else
@@ -5498,124 +5801,6 @@ fi
#--------------------------------------------------------------------
-# Under Solaris 2.4, strtod returns the wrong value for the
-# terminating character under some conditions. Check for this
-# and if the problem exists use a substitute procedure
-# "fixstrtod" (provided by Tcl) that corrects the error.
-#--------------------------------------------------------------------
-
-
- echo $ac_n "checking for strtod""... $ac_c" 1>&6
-echo "configure:5510: 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 <<EOF
-#line 5515 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char strtod(); below. */
-#include <assert.h>
-/* 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 strtod();
-
-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_strtod) || defined (__stub___strtod)
-choke me
-#else
-strtod();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:5538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_strtod=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_strtod=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- tcl_strtod=1
-else
- echo "$ac_t""no" 1>&6
-tcl_strtod=0
-fi
-
- if test "$tcl_strtod" = 1; then
- echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
-echo "configure:5560: checking for Solaris2.4/Tru64 strtod bugs" >&5
- if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- if test "$cross_compiling" = yes; then
- tcl_cv_strtod_buggy=0
-else
- cat > conftest.$ac_ext <<EOF
-#line 5569 "configure"
-#include "confdefs.h"
-
- extern double strtod();
- int main() {
- char *infString="Inf", *nanString="NaN", *spaceString=" ";
- char *term;
- double value;
- value = strtod(infString, &term);
- if ((term != infString) && (term[-1] == 0)) {
- exit(1);
- }
- value = strtod(nanString, &term);
- if ((term != nanString) && (term[-1] == 0)) {
- exit(1);
- }
- value = strtod(spaceString, &term);
- if (term == (spaceString+1)) {
- exit(1);
- }
- exit(0);
- }
-EOF
-if { (eval echo configure:5592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- tcl_cv_strtod_buggy=1
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- tcl_cv_strtod_buggy=0
-fi
-rm -fr conftest*
-fi
-
-fi
-
- if test "$tcl_cv_strtod_buggy" = 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
-
-
-#--------------------------------------------------------------------
# The statements below define a collection of symbols related to
# building libtk as a shared library instead of a static library.
#--------------------------------------------------------------------
@@ -5651,7 +5836,7 @@ WISH_RSRC_FILE='wish$(VERSION).rsrc'
if test "`uname -s`" = "Darwin" ; then
echo $ac_n "checking how to package libraries""... $ac_c" 1>&6
-echo "configure:5655: checking how to package libraries" >&5
+echo "configure:5840: checking how to package libraries" >&5
# Check whether --enable-framework or --disable-framework was given.
if test "${enable_framework+set}" = set; then
enableval="$enable_framework"
@@ -5685,7 +5870,7 @@ fi
fi
TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk '{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}'`"
- TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | tail +3 > $$f && echo $$f)'
+ TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_ > $$f && echo $$f)'
fi
if test "$FRAMEWORK_BUILD" = "1" ; then
diff --git a/unix/configure.in b/unix/configure.in
index 5af3a43..1ff7d96 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tk installation
dnl to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.83.2.23 2005/11/16 22:07:37 dgp Exp $
+# RCS: @(#) $Id: configure.in,v 1.83.2.24 2005/11/27 02:44:26 das Exp $
AC_INIT(../generic/tk.h)
AC_PREREQ(2.13)
@@ -62,7 +62,25 @@ fi
AC_PROG_CC
-AC_HAVE_HEADERS([unistd.h limits.h])
+# limits header checks must come early to prevent
+# an autoconf bug that throws errors on configure
+AC_CHECK_HEADER(limits.h,
+ [AC_DEFINE(HAVE_LIMITS_H)], [AC_DEFINE(NO_LIMITS_H)])
+AC_HAVE_HEADERS(unistd.h)
+
+#--------------------------------------------------------------------
+# Supply a substitute for stdlib.h if it doesn't define strtol,
+# strtoul, or strtod (which it doesn't in some versions of SunOS).
+#--------------------------------------------------------------------
+
+AC_MSG_CHECKING(stdlib.h)
+AC_EGREP_HEADER(strtol, stdlib.h, tk_ok=yes, tk_ok=no)
+AC_EGREP_HEADER(strtoul, stdlib.h, , tk_ok=no)
+AC_EGREP_HEADER(strtod, stdlib.h, , tk_ok=no)
+if test $tk_ok = no; then
+ AC_DEFINE(NO_STDLIB_H)
+fi
+AC_MSG_RESULT($tk_ok)
#------------------------------------------------------------------------
# If we're using GCC, see if the compiler understands -pipe. If so, use it.
@@ -87,6 +105,17 @@ fi
SC_ENABLE_THREADS
+#--------------------------------------------------------------------
+# On a few very rare systems, all of the libm.a stuff is
+# already in libc.a. Set compiler flags accordingly.
+# Also, Linux requires the "ieee" library for math to work
+# right (and it must appear before "-lm").
+#--------------------------------------------------------------------
+
+MATH_LIBS=""
+AC_CHECK_FUNC(sin, , MATH_LIBS="-lm")
+AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
+
# Add the threads support libraries
LIBS="$LIBS$THREADS_LIBS"
@@ -131,77 +160,60 @@ fi
if test "$TCL_PREFIX" != "$prefix"; then
AC_MSG_WARN([
- Different --prefix selected for Tk and Tcl!
- [[package require Tk]] may not work correctly in tclsh.])
+ Different --prefix selected for Tk and Tcl!
+ [[package require Tk]] may not work correctly in tclsh.])
fi
#--------------------------------------------------------------------
-# On a few very rare systems, all of the libm.a stuff is
-# already in libc.a. Set compiler flags accordingly.
-# Also, Linux requires the "ieee" library for math to work
-# right (and it must appear before "-lm").
-#--------------------------------------------------------------------
-
-MATH_LIBS=""
-AC_CHECK_FUNC(sin, , MATH_LIBS="-lm")
-AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
-
-#--------------------------------------------------------------------
-# On AIX systems, libbsd.a has to be linked in to support
-# non-blocking file IO. This library has to be linked in after
-# the MATH_LIBS or it breaks the pow() function. The way to
-# insure proper sequencing, is to add it to the tail of MATH_LIBS.
-# This library also supplies gettimeofday.
-#--------------------------------------------------------------------
-libbsd=no
-if test "`uname -s`" = "AIX" ; then
- AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes)
- if test $libbsd = yes; then
- MATH_LIBS="$MATH_LIBS -lbsd"
+# Include sys/select.h if it exists and if it supplies things
+# that appear to be useful and aren't already in sys/types.h.
+# This appears to be true only on the RS/6000 under AIX. Some
+# systems like OSF/1 have a sys/select.h that's of no use, and
+# other systems like SCO UNIX have a sys/select.h that's
+# pernicious. If "fd_set" isn't defined anywhere then set a
+# special flag.
+#--------------------------------------------------------------------
+
+AC_MSG_CHECKING([for fd_set in sys/types])
+AC_CACHE_VAL(tcl_cv_type_fd_set,
+ AC_TRY_COMPILE([#include <sys/types.h>],[fd_set readMask, writeMask;],
+ tcl_cv_type_fd_set=yes, tcl_cv_type_fd_set=no))
+AC_MSG_RESULT($tcl_cv_type_fd_set)
+tk_ok=$tcl_cv_type_fd_set
+if test $tcl_cv_type_fd_set = no; then
+ AC_MSG_CHECKING([for fd_mask in sys/select])
+ AC_CACHE_VAL(tcl_cv_grep_fd_mask,
+ AC_EGREP_HEADER(fd_mask, sys/select.h,
+ tcl_cv_grep_fd_mask=present, tcl_cv_grep_fd_mask=missing))
+ AC_MSG_RESULT($tcl_cv_grep_fd_mask)
+ if test $tcl_cv_grep_fd_mask = present; then
+ AC_DEFINE(HAVE_SYS_SELECT_H)
+ tk_ok=yes
fi
fi
-
-#--------------------------------------------------------------------
-# Supply a substitute for stdlib.h if it doesn't define strtol,
-# strtoul, or strtod (which it doesn't in some versions of SunOS).
-#--------------------------------------------------------------------
-
-AC_MSG_CHECKING(stdlib.h)
-AC_HEADER_EGREP(strtol, stdlib.h, tk_ok=yes, tk_ok=no)
-AC_HEADER_EGREP(strtoul, stdlib.h, , tk_ok=no)
-AC_HEADER_EGREP(strtod, stdlib.h, , tk_ok=no)
if test $tk_ok = no; then
- AC_DEFINE(NO_STDLIB_H)
+ AC_DEFINE(NO_FD_SET)
fi
-AC_MSG_RESULT($tk_ok)
+
+#------------------------------------------------------------------------------
+# Find out all about time handling differences.
+#------------------------------------------------------------------------------
+
+AC_CHECK_HEADERS(sys/time.h)
+AC_HEADER_TIME
#--------------------------------------------------------------------
-# Include sys/select.h if it exists and if it supplies things
-# that appear to be useful and aren't already in sys/types.h.
-# This appears to be true only on the RS/6000 under AIX. Some
-# systems like OSF/1 have a sys/select.h that's of no use, and
-# other systems like SCO UNIX have a sys/select.h that's
-# pernicious. If "fd_set" isn't defined anywhere then set a
-# special flag.
+# Under Solaris 2.4, strtod returns the wrong value for the
+# terminating character under some conditions. Check for this
+# and if the problem exists use a substitute procedure
+# "fixstrtod" (provided by Tcl) that corrects the error.
#--------------------------------------------------------------------
-AC_MSG_CHECKING([fd_set and sys/select])
-AC_TRY_COMPILE([#include <sys/types.h>],
- [fd_set readMask, writeMask;], tk_ok=yes, tk_ok=no)
-if test $tk_ok = no; then
- AC_HEADER_EGREP(fd_mask, sys/select.h, tk_ok=yes)
- if test $tk_ok = yes; then
- AC_DEFINE(HAVE_SYS_SELECT_H)
- fi
-fi
-AC_MSG_RESULT($tk_ok)
-if test $tk_ok = no; then
- AC_DEFINE(NO_FD_SET)
-fi
+SC_BUGGY_STRTOD
#--------------------------------------------------------------------
-# Check for various typedefs and provide substitutes if
-# they don't exist.
+# Check for various typedefs and provide substitutes if
+# they don't exist.
#--------------------------------------------------------------------
AC_TYPE_MODE_T
@@ -209,22 +221,17 @@ AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_UID_T
-#------------------------------------------------------------------------------
-# Find out about time handling differences.
-#------------------------------------------------------------------------------
-
-AC_CHECK_HEADERS(sys/time.h)
-AC_HEADER_TIME
-
#-------------------------------------------
# In OS/390 struct pwd has no pw_gecos field
#-------------------------------------------
AC_MSG_CHECKING([pw_gecos in struct pwd])
-AC_TRY_COMPILE([#include <pwd.h>],
- [struct passwd pwd; pwd.pw_gecos;], tk_ok=yes, tk_ok=no)
-AC_MSG_RESULT($tk_ok)
-if test $tk_ok = yes; then
+AC_CACHE_VAL(tcl_cv_pwd_pw_gecos,
+ AC_TRY_COMPILE([#include <pwd.h>],
+ [struct passwd pwd; pwd.pw_gecos;],
+ tcl_cv_pwd_pw_gecos=yes, tcl_cv_pwd_pw_gecos=no))
+AC_MSG_RESULT($tcl_cv_pwd_pw_gecos)
+if test $tcl_cv_pwd_pw_gecos = yes; then
AC_DEFINE(HAVE_PW_GECOS)
fi
@@ -370,15 +377,6 @@ fi
AC_C_CHAR_UNSIGNED
#--------------------------------------------------------------------
-# Under Solaris 2.4, strtod returns the wrong value for the
-# terminating character under some conditions. Check for this
-# and if the problem exists use a substitute procedure
-# "fixstrtod" (provided by Tcl) that corrects the error.
-#--------------------------------------------------------------------
-
-SC_BUGGY_STRTOD
-
-#--------------------------------------------------------------------
# The statements below define a collection of symbols related to
# building libtk as a shared library instead of a static library.
#--------------------------------------------------------------------
@@ -414,7 +412,7 @@ WISH_RSRC_FILE='wish$(VERSION).rsrc'
if test "`uname -s`" = "Darwin" ; then
SC_ENABLE_FRAMEWORK
TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk ['{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}']`"
- TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | tail +3 > $$f && echo $$f)'
+ TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_ > $$f && echo $$f)'
fi
if test "$FRAMEWORK_BUILD" = "1" ; then
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 4ab705f..e8e5dc2 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -659,22 +659,20 @@ AC_DEFUN(SC_ENABLE_LANGINFO, [
HAVE_LANGINFO=0
if test "$langinfo_ok" = "yes"; then
- if test "$langinfo_ok" = "yes"; then
- AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
- fi
+ AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
fi
AC_MSG_CHECKING([whether to use nl_langinfo])
if test "$langinfo_ok" = "yes"; then
- AC_TRY_COMPILE([#include <langinfo.h>],
- [nl_langinfo(CODESET);],[langinfo_ok=yes],[langinfo_ok=no])
- if test "$langinfo_ok" = "no"; then
- langinfo_ok="no (could not compile with nl_langinfo)";
- fi
- if test "$langinfo_ok" = "yes"; then
+ AC_CACHE_VAL(tcl_cv_langinfo_h,
+ AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);],
+ [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no]))
+ AC_MSG_RESULT($tcl_cv_langinfo_h)
+ if test $tcl_cv_langinfo_h = yes; then
AC_DEFINE(HAVE_LANGINFO)
fi
+ else
+ AC_MSG_RESULT([$langinfo_ok])
fi
- AC_MSG_RESULT([$langinfo_ok])
])
#--------------------------------------------------------------------
@@ -703,44 +701,44 @@ AC_DEFUN(SC_ENABLE_LANGINFO, [
# according to the user's selection.
#
#--------------------------------------------------------------------
-AC_DEFUN(SC_CONFIG_MANPAGES, [
- AC_MSG_CHECKING([whether to use symlinks for manpages])
- AC_ARG_ENABLE(man-symlinks,
- [ --enable-man-symlinks use symlinks for the manpages],
- test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks",
- enableval="no")
- AC_MSG_RESULT([$enableval])
-
- AC_MSG_CHECKING([whether to compress the manpages])
- AC_ARG_ENABLE(man-compression,
- [ --enable-man-compression=PROG
- compress the manpages with PROG],
- test "$enableval" = "yes" && AC_MSG_ERROR([missing argument to --enable-man-compression])
- test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --compress $enableval",
- enableval="no")
- AC_MSG_RESULT([$enableval])
- if test "$enableval" != "no"; then
- AC_MSG_CHECKING([for compressed file suffix])
- touch TeST
- $enableval TeST
- Z=`ls TeST* | sed 's/^....//'`
- rm -f TeST*
- MAN_FLAGS="$MAN_FLAGS --extension $Z"
- AC_MSG_RESULT([$Z])
- fi
+AC_DEFUN(SC_CONFIG_MANPAGES, [
+ AC_MSG_CHECKING([whether to use symlinks for manpages])
+ AC_ARG_ENABLE(man-symlinks,
+ [ --enable-man-symlinks use symlinks for the manpages],
+ test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks",
+ enableval="no")
+ AC_MSG_RESULT([$enableval])
+
+ AC_MSG_CHECKING([whether to compress the manpages])
+ AC_ARG_ENABLE(man-compression,
+ [ --enable-man-compression=PROG
+ compress the manpages with PROG],
+ test "$enableval" = "yes" && AC_MSG_ERROR([missing argument to --enable-man-compression])
+ test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --compress $enableval",
+ enableval="no")
+ AC_MSG_RESULT([$enableval])
+ if test "$enableval" != "no"; then
+ AC_MSG_CHECKING([for compressed file suffix])
+ touch TeST
+ $enableval TeST
+ Z=`ls TeST* | sed 's/^....//'`
+ rm -f TeST*
+ MAN_FLAGS="$MAN_FLAGS --extension $Z"
+ AC_MSG_RESULT([$Z])
+ fi
- AC_MSG_CHECKING([whether to add a package name suffix for the manpages])
- AC_ARG_ENABLE(man-suffix,
- [ --enable-man-suffix=STRING
- use STRING as a suffix to manpage file names
- (default: $1)],
- test "$enableval" = "yes" && enableval="$1"
- test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --suffix $enableval",
- enableval="no")
- AC_MSG_RESULT([$enableval])
-
- AC_SUBST(MAN_FLAGS)
+ AC_MSG_CHECKING([whether to add a package name suffix for the manpages])
+ AC_ARG_ENABLE(man-suffix,
+ [ --enable-man-suffix=STRING
+ use STRING as a suffix to manpage file names
+ (default: $1)],
+ test "$enableval" = "yes" && enableval="$1"
+ test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --suffix $enableval",
+ enableval="no")
+ AC_MSG_RESULT([$enableval])
+
+ AC_SUBST(MAN_FLAGS)
])
#--------------------------------------------------------------------
@@ -956,7 +954,7 @@ dnl AC_CHECK_TOOL(AR, ar)
if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
if test "$GCC" = "yes" ; then
AC_MSG_WARN([64bit mode not supported with GCC on $system])
- else
+ else
do64bit_ok=yes
CFLAGS="$CFLAGS -q64"
LDFLAGS="$LDFLAGS -q64"
@@ -1267,6 +1265,18 @@ dnl AC_CHECK_TOOL(AR, ar)
CFLAGS="$CFLAGS -mieee"
fi
;;
+ Lynx*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ CFLAGS_OPTIMIZE=-02
+ SHLIB_LD="${CC} -shared "
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-mshared -ldl"
+ LD_FLAGS="-Wl,--export-dynamic"
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ ;;
MP-RAS-02*)
SHLIB_CFLAGS="-K PIC"
SHLIB_LD="cc -G"
@@ -1405,7 +1415,11 @@ dnl AC_CHECK_TOOL(AR, ar)
Darwin-*)
CFLAGS_OPTIMIZE="-Os"
SHLIB_CFLAGS="-fno-common"
- SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
+ if test $do64bit = yes; then
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
+ fi
+ SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
hold_ldflags=$LDFLAGS
LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
@@ -1418,7 +1432,12 @@ dnl AC_CHECK_TOOL(AR, ar)
SHLIB_SUFFIX=".dylib"
DL_OBJS="tclLoadDyld.o"
DL_LIBS=""
- LDFLAGS="$LDFLAGS -prebind -headerpad_max_install_names"
+ # Don't use -prebind when building for Mac OS X 10.4 or later only:
+ if test -z "${MACOSX_DEPLOYMENT_TARGET}" -o \
+ `echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F. '{print [$]2}'` -lt 4; then
+ LDFLAGS="$LDFLAGS -prebind"
+ fi
+ LDFLAGS="$LDFLAGS -headerpad_max_install_names"
AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [
hold_ldflags=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
@@ -1438,12 +1457,18 @@ dnl AC_CHECK_TOOL(AR, ar)
AC_MSG_RESULT([$tcl_corefoundation])
if test $tcl_corefoundation = yes; then
AC_CACHE_CHECK([for CoreFoundation.framework], tcl_cv_lib_corefoundation, [
- hold_libs=$LIBS
+ hold_libs=$LIBS; hold_cflags=$CFLAGS
+ if test $do64bit_ok = no ; then
+ # remove -arch ppc64 from CFLAGS while testing presence
+ # of CF, otherwise all archs will have CF disabled.
+ # CF for ppc64 is disabled in tclUnixPort.h instead.
+ CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/'`"
+ fi
LIBS="$LIBS -framework CoreFoundation"
AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>],
[CFBundleRef b = CFBundleGetMainBundle();],
tcl_cv_lib_corefoundation=yes, tcl_cv_lib_corefoundation=no)
- LIBS=$hold_libs])
+ LIBS=$hold_libs; CFLAGS=$hold_cflags])
if test $tcl_cv_lib_corefoundation = yes; then
LIBS="$LIBS -framework CoreFoundation"
AC_DEFINE(HAVE_COREFOUNDATION)
@@ -1451,14 +1476,17 @@ dnl AC_CHECK_TOOL(AR, ar)
fi
AC_CHECK_HEADERS(libkern/OSAtomic.h)
AC_CHECK_FUNCS(OSSpinLockLock)
+ AC_CHECK_HEADERS(copyfile.h)
+ AC_CHECK_FUNCS(copyfile)
AC_DEFINE(MAC_OSX_TCL)
AC_DEFINE(USE_VFORK)
AC_DEFINE(TCL_DEFAULT_ENCODING,"utf-8")
AC_DEFINE(TCL_LOAD_FROM_MEMORY)
+ AC_DEFINE(TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING)
# prior to Darwin 7, realpath is not threadsafe, so don't
# use it when threads are enabled, c.f. bug # 711232:
AC_CHECK_FUNC(realpath)
- if test "$ac_cv_func_realpath" = yes -a "${TCL_THREADS}" = 1 \
+ if test $ac_cv_func_realpath = yes -a "${TCL_THREADS}" = 1 \
-a `uname -r | awk -F. '{print [$]1}'` -lt 7 ; then
ac_cv_func_realpath=no
fi
@@ -2165,9 +2193,7 @@ closedir(d);
AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)])
# OS/390 lacks sys/param.h (and doesn't need it, by chance).
-
AC_HAVE_HEADERS(unistd.h sys/param.h)
-
])
#--------------------------------------------------------------------
@@ -2255,6 +2281,7 @@ AC_DEFUN(SC_PATH_X, [
XLIBSW=-lX11
fi
])
+
#--------------------------------------------------------------------
# SC_BLOCKING_STYLE
#
@@ -2371,7 +2398,7 @@ AC_DEFUN(SC_TIME_HANDLER, [
# (like convex) have timezone functions, etc.
#
AC_MSG_CHECKING([long timezone variable])
- AC_CACHE_VAL(tcl_cv_var_timezone,
+ AC_CACHE_VAL(tcl_cv_timezone_long,
AC_TRY_COMPILE([#include <time.h>],
[extern long timezone;
timezone += 1;
@@ -2553,6 +2580,7 @@ AC_DEFUN(SC_TCL_LINK_LIBS, [
# Might define the following vars:
# _ISOC99_SOURCE
# _LARGEFILE64_SOURCE
+# _LARGEFILE_SOURCE64
#
#--------------------------------------------------------------------
@@ -2575,6 +2603,8 @@ AC_DEFUN(SC_TCL_EARLY_FLAGS,[
[char *p = (char *)strtoll; char *q = (char *)strtoull;])
SC_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
[struct stat64 buf; int i = stat64("/", &buf);])
+ SC_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>],
+ [char *p = (char *)open64;])
if test "x${tcl_flags}" = "x" ; then
AC_MSG_RESULT(none)
else
@@ -2652,7 +2682,7 @@ AC_DEFUN(SC_TCL_64BIT_FLAGS, [
if test "x${tcl_cv_type_off64_t}" = "xyes" && \
test "x${ac_cv_func_lseek64}" = "xyes" && \
test "x${ac_cv_func_open64}" = "xyes" ; then
- AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?])
+ AC_DEFINE(HAVE_TYPE_OFF64_T)
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)