From bad210c83a783476d088f18141f858e71894fea3 Mon Sep 17 00:00:00 2001 From: das Date: Tue, 10 Jan 2006 05:38:19 +0000 Subject: * macosx/tkMacOSXDraw.c: re-added inclusion of tclInt.h to allow access * macosx/tkMacOSXFont.c: to 8.4-internal Tcl_CreateNamespace(). * macosx/tkMacOSXDebug.c: add TkMacOSXGetNamedDebugSymbol() function * macosx/tkMacOSXDebug.h: that finds unexported symbols in loaded libraries by manually walking their symbol table; only to be used for debugging purposes, may break unexpectedly in the future. Needed to get access to private_extern internal debugging functions in HIToolbox. * macosx/tkMacOSXCarbonEvents.c: fix debug event tracing on Tiger. * macosx/tkMacOSXMenu.c: add debug menu printing during reconfigure. * macosx/tkMacOSXInit.c: conditionalize 64bit-unsafe dyld code. * macosx/Makefile: add 'wish8.x' symlink to SYMROOT. * unix/configure: add caching, use AC_CACHE_CHECK instead of * unix/configure.in: AC_CACHE_VAL where possible, consistent message * unix/tcl.m4: quoting, sync relevant tclconfig/tcl.m4 changes and gratuitous formatting differences, fix SC_CONFIG_MANPAGES with default argument, Darwin improvements to SC_LOAD_*CONFIG. --- ChangeLog | 22 ++ macosx/Makefile | 5 +- macosx/tkMacOSXCarbonEvents.c | 52 +-- macosx/tkMacOSXDebug.c | 134 ++++++- macosx/tkMacOSXDebug.h | 11 +- macosx/tkMacOSXDraw.c | 3 +- macosx/tkMacOSXFont.c | 3 +- macosx/tkMacOSXInit.c | 6 +- macosx/tkMacOSXMenu.c | 20 +- unix/configure | 846 +++++++++++++++++++++++------------------- unix/configure.in | 33 +- unix/tcl.m4 | 476 ++++++++++++++---------- 12 files changed, 989 insertions(+), 622 deletions(-) diff --git a/ChangeLog b/ChangeLog index f181a42..cc32000 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,25 @@ +2006-01-10 Daniel Steffen + + * macosx/tkMacOSXDraw.c: re-added inclusion of tclInt.h to allow access + * macosx/tkMacOSXFont.c: to 8.4-internal Tcl_CreateNamespace(). + + * macosx/tkMacOSXDebug.c: add TkMacOSXGetNamedDebugSymbol() function + * macosx/tkMacOSXDebug.h: that finds unexported symbols in loaded + libraries by manually walking their symbol table; only to be used for + debugging purposes, may break unexpectedly in the future. Needed to get + access to private_extern internal debugging functions in HIToolbox. + + * macosx/tkMacOSXCarbonEvents.c: fix debug event tracing on Tiger. + * macosx/tkMacOSXMenu.c: add debug menu printing during reconfigure. + * macosx/tkMacOSXInit.c: conditionalize 64bit-unsafe dyld code. + * macosx/Makefile: add 'wish8.x' symlink to SYMROOT. + + * unix/configure: add caching, use AC_CACHE_CHECK instead of + * unix/configure.in: AC_CACHE_VAL where possible, consistent message + * unix/tcl.m4: quoting, sync relevant tclconfig/tcl.m4 changes and + gratuitous formatting differences, fix SC_CONFIG_MANPAGES with default + argument, Darwin improvements to SC_LOAD_*CONFIG. + 2005-12-13 Daniel Steffen * library/demos/cscroll.tcl: add MouseWheel bindings for aqua. diff --git a/macosx/Makefile b/macosx/Makefile index b4f77f7..e73780c 100644 --- a/macosx/Makefile +++ b/macosx/Makefile @@ -4,7 +4,7 @@ # uses the standard unix build system in tk/unix (which can be used directly instead of this # if you are not using the tk/macosx projects). # -# RCS: @(#) $Id: Makefile,v 1.7.2.12 2005/11/27 02:36:46 das Exp $ +# RCS: @(#) $Id: Makefile,v 1.7.2.13 2006/01/10 05:38:19 das Exp $ # ######################################################################################################## @@ -186,7 +186,8 @@ build-${PROJECT}: ${OBJ_DIR}/Makefile rm -rf ./${LIBDIR} ./${BINDIR} && ln -fs ${SYMROOT} ./${LIBDIR} && \ ln -fs ${SYMROOT} ./${BINDIR} && ln -fs ${OBJ_DIR}/tktest ${SYMROOT} ifeq (${TK_X11},) - @rm -f ${OBJ_DIR}/${BINDIR} + @rm -f ${OBJ_DIR}/${BINDIR} && \ + ln -fs Wish.app/Contents/MacOS/Wish ${SYMROOT}/${WISH} endif # Create symbolic link to Tcl.framework in ${SYMROOT}if necessary @cd ${SYMROOT} && if [ ! -e Tcl.framework -o -L Tcl.framework ]; then \ diff --git a/macosx/tkMacOSXCarbonEvents.c b/macosx/tkMacOSXCarbonEvents.c index 45be898..d903636 100644 --- a/macosx/tkMacOSXCarbonEvents.c +++ b/macosx/tkMacOSXCarbonEvents.c @@ -60,7 +60,7 @@ * software in accordance with the terms specified in this * license. * - * RCS: @(#) $Id: tkMacOSXCarbonEvents.c,v 1.3.2.8 2005/12/13 03:44:42 das Exp $ + * RCS: @(#) $Id: tkMacOSXCarbonEvents.c,v 1.3.2.9 2006/01/10 05:38:20 das Exp $ */ #include "tkInt.h" @@ -125,7 +125,7 @@ CarbonEventHandlerProc ( macEvent.eKind != kEventMouseDragged) { CarbonEventToAscii(event, buf); fprintf(stderr, "CarbonEventHandlerProc started handling %s\n", buf); - TkMacOSXInitNamedSymbol(HIToolbox, void, _DebugPrintEvent, + TkMacOSXInitNamedDebugSymbol(HIToolbox, void, _DebugPrintEvent, EventRef inEvent); if (_DebugPrintEvent) { /* Carbon-internal event debugging (c.f. Technote 2124) */ @@ -226,31 +226,31 @@ TkMacOSXInitCarbonEvents ( } #ifdef TK_MAC_DEBUG_CARBON_EVENTS - TkMacOSXInitNamedSymbol(HIToolbox, void, _TraceEventByName, CFStringRef); - if (_TraceEventByName) { + TkMacOSXInitNamedDebugSymbol(HIToolbox, void, TraceEventByName, char*); + if (TraceEventByName) { /* Carbon-internal event debugging (c.f. Technote 2124) */ - _TraceEventByName(CFSTR("kEventMouseDown")); - _TraceEventByName(CFSTR("kEventMouseUp")); - _TraceEventByName(CFSTR("kEventMouseWheelMoved")); - _TraceEventByName(CFSTR("kEventMouseScroll")); - _TraceEventByName(CFSTR("kEventWindowUpdate")); - _TraceEventByName(CFSTR("kEventWindowActivated")); - _TraceEventByName(CFSTR("kEventWindowDeactivated")); - _TraceEventByName(CFSTR("kEventRawKeyDown")); - _TraceEventByName(CFSTR("kEventRawKeyRepeat")); - _TraceEventByName(CFSTR("kEventRawKeyUp")); - _TraceEventByName(CFSTR("kEventRawKeyModifiersChanged")); - _TraceEventByName(CFSTR("kEventRawKeyRepeat")); - _TraceEventByName(CFSTR("kEventAppActivated")); - _TraceEventByName(CFSTR("kEventAppDeactivated")); - _TraceEventByName(CFSTR("kEventAppQuit")); - _TraceEventByName(CFSTR("kEventMenuBeginTracking")); - _TraceEventByName(CFSTR("kEventMenuEndTracking")); - _TraceEventByName(CFSTR("kEventCommandProcess")); - _TraceEventByName(CFSTR("kEventWindowExpanded")); - _TraceEventByName(CFSTR("kEventAppHidden")); - _TraceEventByName(CFSTR("kEventAppShown")); - _TraceEventByName(CFSTR("kEventAppAvailableWindowBoundsChanged")); + TraceEventByName("kEventMouseDown"); + TraceEventByName("kEventMouseUp"); + TraceEventByName("kEventMouseWheelMoved"); + TraceEventByName("kEventMouseScroll"); + TraceEventByName("kEventWindowUpdate"); + TraceEventByName("kEventWindowActivated"); + TraceEventByName("kEventWindowDeactivated"); + TraceEventByName("kEventRawKeyDown"); + TraceEventByName("kEventRawKeyRepeat"); + TraceEventByName("kEventRawKeyUp"); + TraceEventByName("kEventRawKeyModifiersChanged"); + TraceEventByName("kEventRawKeyRepeat"); + TraceEventByName("kEventAppActivated"); + TraceEventByName("kEventAppDeactivated"); + TraceEventByName("kEventAppQuit"); + TraceEventByName("kEventMenuBeginTracking"); + TraceEventByName("kEventMenuEndTracking"); + TraceEventByName("kEventCommandProcess"); + TraceEventByName("kEventWindowExpanded"); + TraceEventByName("kEventAppHidden"); + TraceEventByName("kEventAppShown"); + TraceEventByName("kEventAppAvailableWindowBoundsChanged"); } #endif /* TK_MAC_DEBUG_CARBON_EVENTS */ } diff --git a/macosx/tkMacOSXDebug.c b/macosx/tkMacOSXDebug.c index 77d700d..37d2750 100644 --- a/macosx/tkMacOSXDebug.c +++ b/macosx/tkMacOSXDebug.c @@ -50,13 +50,17 @@ * software in accordance with the terms specified in this * license. * - * RCS: @(#) $Id: tkMacOSXDebug.c,v 1.2.2.4 2005/11/27 02:36:46 das Exp $ + * RCS: @(#) $Id: tkMacOSXDebug.c,v 1.2.2.5 2006/01/10 05:38:20 das Exp $ */ +#include "tkMacOSXInt.h" #include "tkMacOSXDebug.h" #ifdef TK_MAC_DEBUG +#include +#include + typedef struct { EventKind kind; char * name; @@ -447,5 +451,133 @@ MouseTrackingResultToAscii(MouseTrackingResult r, char * buf) sprintf(buf, "Unknown mouse tracking result : %d", r); return buf; } + +/* + *---------------------------------------------------------------------- + * + * TkMacOSXGetNamedDebugSymbol -- + * + * + * Dynamically acquire address of a named symbol from a loaded + * dynamic library, so that we can use API that may not be + * available on all OS versions. + * For debugging purposes, if we cannot find the symbol with the + * usual dynamic library APIs, we manually walk the symbol table + * of the loaded library. This allows access to unexported + * symbols such as private_extern internal debugging functions. + * If module is NULL or the empty string, search all loaded + * libraries (could be very expensive and should be avoided). + * + * THIS FUCTION IS ONLY TO BE USED FOR DEBUGGING PURPOSES, IT MAY + * BREAK UNEXPECTEDLY IN THE FUTURE ! + * + * Results: + * Address of given symbol or NULL if unavailable. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + +void * +TkMacOSXGetNamedDebugSymbol(const char* module, const char* symbol) +{ + void* addr = TkMacOSXGetNamedSymbol(module, symbol); +#ifndef __LP64__ + if (!addr) { + const struct mach_header *mh = NULL; + uint32_t i, n = _dyld_image_count(); + + for (i = 0; i < n; i++) { + if (module && *module) { + /* Find image with given module name */ + char *name; + const char *path = _dyld_get_image_name(i); + + if (!path) { + continue; + } + name = strrchr(path, '/') + 1; + if (strncmp(name, module, strlen(name)) != 0) { + continue; + } + } + mh = _dyld_get_image_header(i); + if (mh) { + struct load_command *lc; + struct symtab_command *st = NULL; + struct segment_command *sg = NULL; + uint32_t j, m, nsect = 0, txtsectx = 0; + + lc = (struct load_command*)((char *) mh + + sizeof(struct mach_header)); + m = mh->ncmds; + for (j = 0; j < m; j++) { + /* Find symbol table and index of __text section */ + if (lc->cmd == LC_SEGMENT) { + /* Find last segment before symbol table */ + sg = (struct segment_command*) lc; + if (!txtsectx) { + /* Count total sections until (__TEXT, __text) */ + uint32_t k, ns = sg->nsects; + + if (strcmp(sg->segname, SEG_TEXT) == 0) { + struct section *s = (struct section *)( + (char *)sg + + sizeof(struct segment_command)); + + for(k = 0; k < ns; k++) { + if (strcmp(s->sectname, SECT_TEXT) == 0) { + txtsectx = nsect+k+1; + break; + } + s++; + } + } + nsect += ns; + } + } else if (!st && lc->cmd == LC_SYMTAB) { + st = (struct symtab_command*) lc; + break; + } + lc = (struct load_command *)((char *) lc + lc->cmdsize); + } + if (st && sg && txtsectx) { + intptr_t base, slide = _dyld_get_image_vmaddr_slide(i); + char *strings; + struct nlist *sym; + uint32_t strsize = st->strsize; + int32_t strx; + + /* Offset file positions by difference to actual position + in memory of last segment before symbol table: */ + base = (intptr_t) sg->vmaddr + slide - sg->fileoff; + strings = (char*)(base + st->stroff); + sym = (struct nlist*)(base + st->symoff); + m = st->nsyms; + for (j = 0; j < m; j++) { + /* Find symbol with given name in __text section */ + strx = sym->n_un.n_strx; + if ((sym->n_type & N_TYPE) == N_SECT && + sym->n_sect == txtsectx && + strx > 0 && strx < strsize && + strcmp(strings + strx, symbol) == 0) { + addr = (void*) sym->n_value + slide; + break; + } + sym++; + } + } + } + if (module && *module) { + /* If given a module name, only search corresponding image */ + break; + } + } + } +#endif /* __LP64__ */ + return addr; +} #endif /* TK_MAC_DEBUG */ diff --git a/macosx/tkMacOSXDebug.h b/macosx/tkMacOSXDebug.h index f57fc71..df3c00c 100644 --- a/macosx/tkMacOSXDebug.h +++ b/macosx/tkMacOSXDebug.h @@ -50,7 +50,7 @@ * software in accordance with the terms specified in this * license. * - * RCS: @(#) $Id: tkMacOSXDebug.h,v 1.2.2.4 2005/11/27 02:36:46 das Exp $ + * RCS: @(#) $Id: tkMacOSXDebug.h,v 1.2.2.5 2006/01/10 05:38:20 das Exp $ */ #ifndef _TKMACDEBUG @@ -79,6 +79,15 @@ char * TkMacOSXMenuMessageToAscii(int msg, char * s); char * MouseTrackingResultToAscii(MouseTrackingResult r, char * buf ); +void * TkMacOSXGetNamedDebugSymbol(const char* module, const char* symbol); + +/* Macro to abstract common use of TkMacOSXGetNamedDebugSymbol to initialize named symbols */ +#define TkMacOSXInitNamedDebugSymbol(module, ret, symbol, ...) \ + static ret (* symbol)(__VA_ARGS__) = (void*)(-1L); \ + if (symbol == (void*)(-1L)) { \ + symbol = TkMacOSXGetNamedDebugSymbol(STRINGIFY(module), STRINGIFY(_##symbol));\ + } + #endif #endif diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 5722057..cfdfc22 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.2.2.9 2005/12/08 07:50:30 das Exp $ + * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.2.2.10 2006/01/10 05:38:20 das Exp $ */ #include "tkInt.h" @@ -23,6 +23,7 @@ #include "tkMacOSXInt.h" #include "tkPort.h" #include "tkMacOSXDebug.h" +#include "tclInt.h" /* for Tcl_CreateNamespace() */ #ifndef PI # define PI 3.14159265358979323846 diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index 2a2466e..e27650e 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -11,12 +11,13 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXFont.c,v 1.3.2.6 2005/12/08 07:50:30 das Exp $ + * RCS: @(#) $Id: tkMacOSXFont.c,v 1.3.2.7 2006/01/10 05:38:20 das Exp $ */ #include #include "tkMacOSXInt.h" #include "tkFont.h" +#include "tclInt.h" /* for Tcl_CreateNamespace() */ /* * For doing things with Mac strings and Fixed numbers. This probably should move diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c index a1ee640..d0f5a5a 100644 --- a/macosx/tkMacOSXInit.c +++ b/macosx/tkMacOSXInit.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXInit.c,v 1.3.2.12 2005/12/08 07:50:30 das Exp $ + * RCS: @(#) $Id: tkMacOSXInit.c,v 1.3.2.13 2006/01/10 05:38:20 das Exp $ */ #include "tkInt.h" @@ -170,12 +170,13 @@ TkpInit(interp) if (rsrc) { ReleaseResource(rsrc); } else { +#ifndef __LP64__ const struct mach_header *image; char *data = NULL; uint32_t size; int fd = -1; char fileName[L_tmpnam + 15]; - int i, n; + uint32_t i, n; /* Get resource data from __tk_rsrc section of tk library file */ n = _dyld_image_count(); @@ -216,6 +217,7 @@ TkpInit(interp) unlink(fileName); close(fd); } +#endif /* __LP64__ */ } } diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 275846d..797e7ab 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.6.2.14 2005/11/27 06:53:36 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.6.2.15 2006/01/10 05:38:20 das Exp $ */ #include "tkMacOSXInt.h" #include "tkMenubutton.h" @@ -25,6 +25,12 @@ #include "tkMacOSXDebug.h" #include +/* +#ifdef TK_MAC_DEBUG +#define TK_MAC_DEBUG_MENUS +#endif +*/ + #if !defined(MAC_OS_X_VERSION_10_3) || \ (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3) /* Define constants only available on Mac OS X 10.3 or later */ @@ -1066,6 +1072,14 @@ ReconfigureIndividualMenu( TkMenuEntry *mePtr; int parentDisabled = 0; +#ifdef TK_MAC_DEBUG_MENUS + /* Carbon-internal menu debugging (c.f. Technote 2124) */ + TkMacOSXInitNamedDebugSymbol(HIToolbox, void, DebugPrintMenu, MenuRef menu); + if (DebugPrintMenu) { + DebugPrintMenu(macMenuHdl); + } +#endif + for (mePtr = menuPtr->menuRefPtr->parentEntryPtr; mePtr != NULL; mePtr = mePtr->nextCascadePtr) { char *name = (mePtr->namePtr == NULL) ? "" @@ -1150,10 +1164,6 @@ ReconfigureIndividualMenu( ((MacMenu *) mePtr->childMenuRefPtr ->menuPtr->platformData)->menuHdl; - if (childMenuHdl == NULL) { - childMenuHdl = ((MacMenu *) mePtr->childMenuRefPtr - ->menuPtr->platformData)->menuHdl; - } if (childMenuHdl != NULL) { { SetMenuItemHierarchicalID(macMenuHdl, base + index, diff --git a/unix/configure b/unix/configure index 0f06e27..f879d8c 100755 --- a/unix/configure +++ b/unix/configure @@ -619,9 +619,25 @@ else done fi + # on Darwin, check in Framework installation locations + if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then + for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ + `ls -d /Library/Frameworks 2>/dev/null` \ + `ls -d /Network/Library/Frameworks 2>/dev/null` \ + `ls -d /System/Library/Frameworks 2>/dev/null` \ + ; do + if test -f "$i/Tcl.framework/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` + break + fi + done + fi + # check in a few common install locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ + `ls -d ${exec_prefix}/lib 2>/dev/null` \ + `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ @@ -657,45 +673,61 @@ fi else no_tcl= TCL_BIN_DIR=${ac_cv_c_tclconfig} - echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6 + echo "$ac_t""found ${TCL_BIN_DIR}/tclConfig.sh" 1>&6 fi fi - echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6 -echo "configure:667: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 + echo $ac_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh""... $ac_c" 1>&6 +echo "configure:683: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 - if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then + if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then echo "$ac_t""loading" 1>&6 - . $TCL_BIN_DIR/tclConfig.sh + . ${TCL_BIN_DIR}/tclConfig.sh else - echo "$ac_t""file not found" 1>&6 + echo "$ac_t""could not find ${TCL_BIN_DIR}/tclConfig.sh" 1>&6 fi - # + # eval is required to do the TCL_DBGX substitution + eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" + eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" + # If the TCL_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable TCL_LIB_SPEC will be set to the value # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC # instead of TCL_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. - # - - if test -f $TCL_BIN_DIR/Makefile ; then + if test -f ${TCL_BIN_DIR}/Makefile ; then TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} + elif test "`uname -s`" = "Darwin"; then + # If Tcl was built as a framework, attempt to use the libraries + # from the framework at the given location so that linking works + # against Tcl.framework installed in an arbitary location. + case ${TCL_DEFS} in + *TCL_FRAMEWORK*) + if test -f ${TCL_BIN_DIR}/${TCL_LIB_FILE}; then + for i in "`cd ${TCL_BIN_DIR}; pwd`" \ + "`cd ${TCL_BIN_DIR}/../..; pwd`"; do + if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then + TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" + break + fi + done + fi + if test -f ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}; then + TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" + TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" + fi + ;; + esac fi - # # eval is required to do the TCL_DBGX substitution - # - - eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" - - eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" @@ -714,8 +746,7 @@ echo "configure:667: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5 echo $ac_n "checking for tclsh""... $ac_c" 1>&6 -echo "configure:718: checking for tclsh" >&5 - +echo "configure:750: checking for tclsh" >&5 if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -748,7 +779,7 @@ fi echo $ac_n "checking for tclsh in Tcl build directory""... $ac_c" 1>&6 -echo "configure:752: checking for tclsh in Tcl build directory" >&5 +echo "configure:783: checking for tclsh in Tcl build directory" >&5 BUILD_TCLSH=${TCL_BIN_DIR}/tclsh echo "$ac_t""$BUILD_TCLSH" 1>&6 @@ -778,8 +809,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:783: checking whether to use symlinks for manpages" >&5 +echo "configure:815: 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" @@ -791,12 +823,15 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking whether to compress the manpages""... $ac_c" 1>&6 -echo "configure:795: checking whether to compress the manpages" >&5 +echo "configure:827: 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" + case $enableval in + yes) { echo "configure: error: missing argument to --enable-man-compression" 1>&2; exit 1; };; + no) ;; + *) MAN_FLAGS="$MAN_FLAGS --compress $enableval";; + esac else enableval="no" fi @@ -804,7 +839,7 @@ 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 +echo "configure:843: checking for compressed file suffix" >&5 touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` @@ -814,12 +849,15 @@ echo "configure:808: checking for compressed file suffix" >&5 fi 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 +echo "configure:853: 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" + case $enableval in + yes) enableval="tk" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; + no) ;; + *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; + esac else enableval="no" fi @@ -842,7 +880,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:846: checking for $ac_word" >&5 +echo "configure:884: 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 @@ -872,7 +910,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:876: checking for $ac_word" >&5 +echo "configure:914: 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 @@ -923,7 +961,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:927: checking for $ac_word" >&5 +echo "configure:965: 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 @@ -955,7 +993,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:959: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:997: 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. @@ -966,12 +1004,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 970 "configure" +#line 1008 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1013: \"$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 @@ -997,12 +1035,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:1001: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1039: 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:1006: checking whether we are using GNU C" >&5 +echo "configure:1044: 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 @@ -1011,7 +1049,7 @@ else yes; #endif EOF -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 +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1053: \"$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 @@ -1030,7 +1068,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:1034: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1072: 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 @@ -1065,7 +1103,7 @@ 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:1069: checking how to run the C preprocessor" >&5 +echo "configure:1107: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1080,13 +1118,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1128: \"$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 : @@ -1097,13 +1135,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1145: \"$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 : @@ -1114,13 +1152,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1162: \"$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 : @@ -1146,17 +1184,17 @@ echo "$ac_t""$CPP" 1>&6 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 +echo "configure:1188: checking for limits.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1198: \"$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* @@ -1188,17 +1226,17 @@ 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:1192: checking for $ac_hdr" >&5 +echo "configure:1230: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1240: \"$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* @@ -1231,9 +1269,9 @@ done #-------------------------------------------------------------------- echo $ac_n "checking stdlib.h""... $ac_c" 1>&6 -echo "configure:1235: checking stdlib.h" >&5 +echo "configure:1273: checking stdlib.h" >&5 cat > conftest.$ac_ext < EOF @@ -1248,7 +1286,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < EOF @@ -1262,7 +1300,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < EOF @@ -1291,18 +1329,18 @@ echo "$ac_t""$tk_ok" 1>&6 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:1295: checking if the compiler understands -pipe" >&5 +echo "configure:1333: checking if the compiler understands -pipe" >&5 OLDCC="$CC" CC="$CC -pipe" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -1321,8 +1359,6 @@ fi #------------------------------------------------------------------------ - echo $ac_n "checking for building with threads""... $ac_c" 1>&6 -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" @@ -1332,17 +1368,12 @@ else fi + if test "${TCL_THREADS}" = 1; then + tcl_threaded_core=1; + fi + if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then - if test "${TCL_THREADS}" = 1; then - echo "$ac_t""yes (threaded core)" 1>&6 - else - echo "$ac_t""yes" 1>&6 - fi TCL_THREADS=1 - cat >> confdefs.h <<\EOF -#define TCL_THREADS 1 -EOF - # USE_THREAD_ALLOC tells us to try the special thread-based # allocator that significantly reduces lock contention cat >> confdefs.h <<\EOF @@ -1364,7 +1395,7 @@ EOF EOF echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6 -echo "configure:1368: checking for pthread_mutex_init in -lpthread" >&5 +echo "configure:1399: 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 @@ -1372,7 +1403,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1418: \"$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 @@ -1411,7 +1442,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:1415: checking for __pthread_mutex_init in -lpthread" >&5 +echo "configure:1446: 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 @@ -1419,7 +1450,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1465: \"$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 @@ -1458,7 +1489,7 @@ fi THREADS_LIBS=" -lpthread" else echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6 -echo "configure:1462: checking for pthread_mutex_init in -lpthreads" >&5 +echo "configure:1493: 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 @@ -1466,7 +1497,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1512: \"$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 @@ -1503,7 +1534,7 @@ fi THREADS_LIBS=" -lpthreads" else echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6 -echo "configure:1507: checking for pthread_mutex_init in -lc" >&5 +echo "configure:1538: 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 @@ -1511,7 +1542,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1557: \"$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 @@ -1543,9 +1574,9 @@ else tcl_ok=no fi - if test "$tcl_ok" = "no"; then + if test "$tcl_ok" = "no"; then echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6 -echo "configure:1549: checking for pthread_mutex_init in -lc_r" >&5 +echo "configure:1580: 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 @@ -1553,7 +1584,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_r $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1599: \"$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 @@ -1590,9 +1621,9 @@ fi THREADS_LIBS=" -pthread" else TCL_THREADS=0 - echo "configure: warning: "Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..."" 1>&2 + echo "configure: warning: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." 1>&2 fi - fi + fi fi fi @@ -1604,12 +1635,12 @@ fi for ac_func in pthread_attr_setstacksize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1608: checking for $ac_func" >&5 +echo "configure:1639: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1667: \"$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 @@ -1659,12 +1690,12 @@ done for ac_func in pthread_atfork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1663: checking for $ac_func" >&5 +echo "configure:1694: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1722: \"$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 @@ -1714,8 +1745,24 @@ done LIBS=$ac_saved_libs else TCL_THREADS=0 + fi + # Do checking message here to not mess up interleaved configure output + echo $ac_n "checking for building with threads""... $ac_c" 1>&6 +echo "configure:1752: checking for building with threads" >&5 + if test "${TCL_THREADS}" = 1; then + cat >> confdefs.h <<\EOF +#define TCL_THREADS 1 +EOF + + if test "${tcl_threaded_core}" = 1; then + echo "$ac_t""yes (threaded core)" 1>&6 + else + echo "$ac_t""yes" 1>&6 + fi + else echo "$ac_t""no (default)" 1>&6 fi + @@ -1728,12 +1775,12 @@ done MATH_LIBS="" echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:1732: checking for sin" >&5 +echo "configure:1779: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1807: \"$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 @@ -1777,7 +1824,7 @@ 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 +echo "configure:1828: 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 @@ -1785,14 +1832,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lieee $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1843: \"$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 @@ -1818,7 +1865,7 @@ LIBS="$LIBS$THREADS_LIBS" echo $ac_n "checking how to build libraries""... $ac_c" 1>&6 -echo "configure:1822: checking how to build libraries" >&5 +echo "configure:1869: 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" @@ -1857,7 +1904,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:1861: checking for $ac_word" >&5 +echo "configure:1908: 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 @@ -1889,77 +1936,77 @@ fi # Step 0.a: Enable 64 bit support? echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6 -echo "configure:1893: checking if 64bit support is requested" >&5 +echo "configure:1940: 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" - : + do64bit=$enableval else - enableval="no" + do64bit=no fi - - if test "$enableval" = "yes"; then - do64bit=yes - else - do64bit=no - fi echo "$ac_t""$do64bit" 1>&6 # 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:1913: checking if 64bit Sparc VIS support is requested" >&5 +echo "configure:1954: 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" - : + do64bitVIS=$enableval else - enableval="no" + do64bitVIS=no fi + echo "$ac_t""$do64bitVIS" 1>&6 - if test "$enableval" = "yes"; then + if test "$do64bitVIS" = "yes"; then # Force 64bit on with VIS do64bit=yes - do64bitVIS=yes - else - do64bitVIS=no fi - echo "$ac_t""$do64bitVIS" 1>&6 # Step 1: set the variable "system" to hold the name and version number - # for the system. This can usually be done via the "uname" command, but - # there are a few systems, like Next, where this doesn't work. + # for the system. - echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6 -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 - system=`uname -s`-`uname -r` - if test "$?" -ne 0 ; then - echo "$ac_t""unknown (can't find uname command)" 1>&6 - system=unknown + + echo $ac_n "checking system version""... $ac_c" 1>&6 +echo "configure:1975: checking system version" >&5 +if eval "test \"`echo '$''{'tcl_cv_sys_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test -f /usr/lib/NextStep/software_version; then + tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` else - # Special check for weird MP-RAS system (uname returns weird - # results, and the version is kept in special file). - - if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then - system=MP-RAS-`awk '{print }' /etc/.relid` - fi - if test "`uname -s`" = "AIX" ; then - system=AIX-`uname -v`.`uname -r` + tcl_cv_sys_version=`uname -s`-`uname -r` + if test "$?" -ne 0 ; then + echo "configure: warning: can't find uname command" 1>&2 + tcl_cv_sys_version=unknown + else + # Special check for weird MP-RAS system (uname returns weird + # results, and the version is kept in special file). + + if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then + tcl_cv_sys_version=MP-RAS-`awk '{print }' /etc/.relid` + fi + if test "`uname -s`" = "AIX" ; then + tcl_cv_sys_version=AIX-`uname -v`.`uname -r` + fi fi - echo "$ac_t""$system" 1>&6 fi - fi + +fi + +echo "$ac_t""$tcl_cv_sys_version" 1>&6 + system=$tcl_cv_sys_version + # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:1963: checking for dlopen in -ldl" >&5 +echo "configure:2010: 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 @@ -1967,7 +2014,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2029: \"$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 @@ -2026,7 +2073,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:2030: checking for $ac_word" >&5 +echo "configure:2077: 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 @@ -2141,7 +2188,7 @@ fi # known GMT value. echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 -echo "configure:2145: checking for gettimeofday in -lbsd" >&5 +echo "configure:2192: 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 @@ -2149,7 +2196,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2211: \"$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 @@ -2203,7 +2250,7 @@ EOF # is always linked to, for compatibility. #----------------------------------------------------------- echo $ac_n "checking for inet_ntoa in -lbind""... $ac_c" 1>&6 -echo "configure:2207: checking for inet_ntoa in -lbind" >&5 +echo "configure:2254: 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 @@ -2211,7 +2258,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbind $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2273: \"$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 @@ -2288,7 +2335,7 @@ EOF SHLIB_SUFFIX=".sl" echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:2292: checking for shl_load in -ldld" >&5 +echo "configure:2339: 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 @@ -2296,7 +2343,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2358: \"$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 @@ -2351,18 +2398,18 @@ fi # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = "yes" ; then if test "$GCC" = "yes" ; then - hpux_arch=`gcc -dumpmachine` + hpux_arch=`${CC} -dumpmachine` case $hpux_arch in hppa64*) # 64-bit gcc in use. Fix flags for GNU ld. do64bit_ok=yes - SHLIB_LD="gcc -shared" + SHLIB_LD="${CC} -shared" SHLIB_LD_LIBS='${LIBS}' CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ;; *) - echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2 + echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2 ;; esac else @@ -2375,7 +2422,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:2379: checking for shl_load in -ldld" >&5 +echo "configure:2426: 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 @@ -2383,7 +2430,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2445: \"$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 @@ -2518,17 +2565,17 @@ fi else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2522: checking for dld.h" >&5 +echo "configure:2569: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2579: \"$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* @@ -2592,17 +2639,17 @@ EOF else ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dld.h""... $ac_c" 1>&6 -echo "configure:2596: checking for dld.h" >&5 +echo "configure:2643: checking for dld.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2653: \"$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* @@ -2670,17 +2717,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:2674: checking for dlfcn.h" >&5 +echo "configure:2721: checking for dlfcn.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2731: \"$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* @@ -2707,29 +2754,38 @@ 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:2711: checking for ELF" >&5 - cat > conftest.$ac_ext <&5 +if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <&5 | egrep "yes" >/dev/null 2>&1; then rm -rf conftest* - echo "$ac_t""yes" 1>&6 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so' + tcl_cv_ld_elf=yes else rm -rf conftest* - echo "$ac_t""no" 1>&6 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' - + tcl_cv_ld_elf=no fi rm -f conftest* +fi + +echo "$ac_t""$tcl_cv_ld_elf" 1>&6 + if test $tcl_cv_ld_elf = yes; then + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so' + else + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' + fi else echo "$ac_t""no" 1>&6 @@ -2783,29 +2839,38 @@ 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:2787: checking for ELF" >&5 - cat > conftest.$ac_ext <&5 +if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <&5 | egrep "yes" >/dev/null 2>&1; then rm -rf conftest* - echo "$ac_t""yes" 1>&6 - LDFLAGS=-Wl,-export-dynamic + tcl_cv_ld_elf=yes else rm -rf conftest* - echo "$ac_t""no" 1>&6 - LDFLAGS="" - + tcl_cv_ld_elf=no fi rm -f conftest* +fi + +echo "$ac_t""$tcl_cv_ld_elf" 1>&6 + if test $tcl_cv_ld_elf = yes; then + LDFLAGS=-Wl,-export-dynamic + else + LDFLAGS="" + fi ;; esac @@ -2848,7 +2913,7 @@ rm -f conftest* fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' echo $ac_n "checking if ld accepts -single_module flag""... $ac_c" 1>&6 -echo "configure:2852: checking if ld accepts -single_module flag" >&5 +echo "configure:2917: 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 @@ -2856,14 +2921,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2932: \"$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 @@ -2890,7 +2955,7 @@ echo "$ac_t""$tcl_cv_ld_single_module" 1>&6 LDFLAGS="$LDFLAGS -prebind" LDFLAGS="$LDFLAGS -headerpad_max_install_names" echo $ac_n "checking if ld accepts -search_paths_first flag""... $ac_c" 1>&6 -echo "configure:2894: checking if ld accepts -search_paths_first flag" >&5 +echo "configure:2959: 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 @@ -2898,14 +2963,14 @@ else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2974: \"$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 @@ -2928,7 +2993,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:2932: checking whether to use CoreFoundation" >&5 +echo "configure:2997: 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" @@ -2940,7 +3005,7 @@ 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:2944: checking for CoreFoundation.framework" >&5 +echo "configure:3009: 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 @@ -2954,14 +3019,14 @@ else fi LIBS="$LIBS -framework CoreFoundation" cat > conftest.$ac_ext < int main() { CFBundleRef b = CFBundleGetMainBundle(); ; return 0; } EOF -if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcl_cv_lib_corefoundation=yes else @@ -2987,17 +3052,17 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2991: checking for $ac_hdr" >&5 +echo "configure:3056: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3066: \"$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* @@ -3026,12 +3091,12 @@ done for ac_func in OSSpinLockLock do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3030: checking for $ac_func" >&5 +echo "configure:3095: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3082,17 +3147,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3086: checking for $ac_hdr" >&5 +echo "configure:3151: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3161: \"$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* @@ -3121,12 +3186,12 @@ done for ac_func in copyfile do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3125: checking for $ac_func" >&5 +echo "configure:3190: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3218: \"$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 @@ -3196,12 +3261,12 @@ 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:3200: checking for realpath" >&5 +echo "configure:3265: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3293: \"$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 @@ -3259,11 +3324,11 @@ fi LD_SEARCH_FLAGS="" ;; OS/390-*) - CFLAGS_OPTIMIZE="" # Optimizer is buggy + CFLAGS_OPTIMIZE="" # Optimizer is buggy cat >> confdefs.h <<\EOF #define _OE_SOCKETS 1 EOF - # needed in sys/socket.h + # needed in sys/socket.h ;; OSF1-1.0|OSF1-1.1|OSF1-1.2) # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 @@ -3533,29 +3598,39 @@ EOF DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # 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:3539: checking for ld accepts -Bexport flag" >&5 - LDFLAGS="$LDFLAGS -Wl,-Bexport" - cat > conftest.$ac_ext <&5 +if eval "test \"`echo '$''{'tcl_cv_ld_Bexport'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-Bexport" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - found=yes + tcl_cv_ld_Bexport=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - LDFLAGS=$hold_ldflags found=no + tcl_cv_ld_Bexport=no fi rm -f conftest* - echo "$ac_t""$found" 1>&6 + LDFLAGS=$hold_ldflags +fi + +echo "$ac_t""$tcl_cv_ld_Bexport" 1>&6 + if test $tcl_cv_ld_Bexport = yes; then + LDFLAGS="$LDFLAGS -Wl,-Bexport" + fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; @@ -3586,9 +3661,13 @@ rm -f conftest* if test "x$DL_OBJS" = "xtclLoadAout.o" ; then echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6 -echo "configure:3590: checking sys/exec.h" >&5 +echo "configure:3665: checking sys/exec.h" >&5 +if eval "test \"`echo '$''{'tcl_cv_sysexec_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < int main() { @@ -3606,27 +3685,33 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - tcl_ok=usable + tcl_cv_sysexec_h=usable else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - tcl_ok=unusable + tcl_cv_sysexec_h=unusable fi rm -f conftest* - echo "$ac_t""$tcl_ok" 1>&6 - if test $tcl_ok = usable; then +fi + +echo "$ac_t""$tcl_cv_sysexec_h" 1>&6 + if test $tcl_cv_sysexec_h = usable; then cat >> confdefs.h <<\EOF #define USE_SYS_EXEC_H 1 EOF else echo $ac_n "checking a.out.h""... $ac_c" 1>&6 -echo "configure:3628: checking a.out.h" >&5 +echo "configure:3709: checking a.out.h" >&5 +if eval "test \"`echo '$''{'tcl_cv_aout_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < int main() { @@ -3644,27 +3729,33 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - tcl_ok=usable + tcl_cv_aout_h=usable else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - tcl_ok=unusable + tcl_cv_aout_h=unusable fi rm -f conftest* - echo "$ac_t""$tcl_ok" 1>&6 - if test $tcl_ok = usable; then +fi + +echo "$ac_t""$tcl_cv_aout_h" 1>&6 + if test $tcl_cv_aout_h = usable; then cat >> confdefs.h <<\EOF #define USE_A_OUT_H 1 EOF else echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6 -echo "configure:3666: checking sys/exec_aout.h" >&5 +echo "configure:3753: checking sys/exec_aout.h" >&5 +if eval "test \"`echo '$''{'tcl_cv_sysexecaout_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < int main() { @@ -3682,18 +3773,20 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - tcl_ok=usable + tcl_cv_sysexecaout_h=usable else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - tcl_ok=unusable + tcl_cv_sysexecaout_h=unusable fi rm -f conftest* - echo "$ac_t""$tcl_ok" 1>&6 - if test $tcl_ok = usable; then +fi + +echo "$ac_t""$tcl_cv_sysexecaout_h" 1>&6 + if test $tcl_cv_sysexecaout_h = usable; then cat >> confdefs.h <<\EOF #define USE_SYS_EXEC_AOUT_H 1 EOF @@ -3833,7 +3926,7 @@ fi echo $ac_n "checking for build with symbols""... $ac_c" 1>&6 -echo "configure:3837: checking for build with symbols" >&5 +echo "configure:3930: 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" @@ -3894,21 +3987,21 @@ TK_DBGX=${DBGX} echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6 -echo "configure:3898: checking for required early compiler flags" >&5 +echo "configure:3991: 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 < int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:3912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=no else @@ -3916,7 +4009,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -3924,7 +4017,7 @@ int main() { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } EOF -if { (eval echo configure:3928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__isoc99_source=yes else @@ -3945,19 +4038,20 @@ EOF tcl_flags="$tcl_flags _ISOC99_SOURCE" fi + if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:3961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile64_source=no else @@ -3965,7 +4059,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -3973,7 +4067,7 @@ int main() { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } EOF -if { (eval echo configure:3977: \"$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_cv_flag__largefile64_source=yes else @@ -3994,19 +4088,20 @@ 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 < int main() { char *p = (char *)open64; ; return 0; } EOF -if { (eval echo configure:4010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile_source64=no else @@ -4014,7 +4109,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext < @@ -4022,7 +4117,7 @@ int main() { char *p = (char *)open64; ; return 0; } EOF -if { (eval echo configure:4026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_flag__largefile_source64=yes else @@ -4043,6 +4138,7 @@ EOF tcl_flags="$tcl_flags _LARGEFILE_SOURCE64" fi + if test "x${tcl_flags}" = "x" ; then echo "$ac_t""none" 1>&6 else @@ -4050,8 +4146,9 @@ EOF fi + echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6 -echo "configure:4055: checking for 64-bit integer type" >&5 +echo "configure:4152: 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 @@ -4059,14 +4156,14 @@ else tcl_cv_type_64bit=none # See if the compiler knows natively about __int64 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_type_64bit=__int64 else @@ -4080,7 +4177,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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_64bit=${tcl_type_64bit} else @@ -4114,13 +4211,13 @@ EOF # Now check for auxiliary declarations echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:4118: checking for struct dirent64" >&5 - if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then +echo "configure:4215: checking for struct dirent64" >&5 +if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4128,7 +4225,7 @@ int main() { struct dirent64 p; ; return 0; } EOF -if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_dirent64=yes else @@ -4140,22 +4237,22 @@ fi rm -f conftest* fi +echo "$ac_t""$tcl_cv_struct_dirent64" 1>&6 if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then cat >> confdefs.h <<\EOF #define HAVE_STRUCT_DIRENT64 1 EOF fi - echo "$ac_t""${tcl_cv_struct_dirent64}" 1>&6 echo $ac_n "checking for struct stat64""... $ac_c" 1>&6 -echo "configure:4153: checking for struct stat64" >&5 - if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then +echo "configure:4250: checking for struct stat64" >&5 +if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -4163,7 +4260,7 @@ struct stat64 p; ; return 0; } EOF -if { (eval echo configure:4167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_struct_stat64=yes else @@ -4175,23 +4272,23 @@ fi rm -f conftest* fi +echo "$ac_t""$tcl_cv_struct_stat64" 1>&6 if test "x${tcl_cv_struct_stat64}" = "xyes" ; then cat >> confdefs.h <<\EOF #define HAVE_STRUCT_STAT64 1 EOF fi - echo "$ac_t""${tcl_cv_struct_stat64}" 1>&6 for ac_func in open64 lseek64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4190: checking for $ac_func" >&5 +echo "configure:4287: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4315: \"$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 @@ -4239,13 +4336,13 @@ fi done echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:4243: checking for off64_t" >&5 +echo "configure:4340: checking for off64_t" >&5 if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { @@ -4253,7 +4350,7 @@ off64_t offset; ; return 0; } EOF -if { (eval echo configure:4257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_off64_t=yes else @@ -4278,19 +4375,20 @@ EOF fi fi + #-------------------------------------------------------------------- # Check endianness because we can optimize some operations #-------------------------------------------------------------------- echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4287: checking whether byte ordering is bigendian" >&5 +echo "configure:4385: 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 < #include @@ -4301,11 +4399,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4403: \"$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 < #include @@ -4316,7 +4414,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4336,7 +4434,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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4451: \"$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 @@ -4401,19 +4499,19 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6 -echo "configure:4405: checking for fd_set in sys/types" >&5 +echo "configure:4503: 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 < int main() { fd_set readMask, writeMask; ; return 0; } EOF -if { (eval echo configure:4417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_type_fd_set=yes else @@ -4427,14 +4525,14 @@ fi 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 +if test $tk_ok = no; then echo $ac_n "checking for fd_mask in sys/select""... $ac_c" 1>&6 -echo "configure:4433: checking for fd_mask in sys/select" >&5 - if eval "test \"`echo '$''{'tcl_cv_grep_fd_mask'+set}'`\" = set"; then +echo "configure:4531: 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 cat > conftest.$ac_ext < EOF @@ -4450,7 +4548,7 @@ rm -f conftest* fi - echo "$ac_t""$tcl_cv_grep_fd_mask" 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 @@ -4474,17 +4572,17 @@ 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:4478: checking for $ac_hdr" >&5 +echo "configure:4576: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4586: \"$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* @@ -4511,12 +4609,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:4515: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4613: 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 < #include @@ -4525,7 +4623,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4555,12 +4653,12 @@ fi echo $ac_n "checking for strtod""... $ac_c" 1>&6 -echo "configure:4559: checking for strtod" >&5 +echo "configure:4657: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4685: \"$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 @@ -4605,16 +4703,16 @@ fi if test "$tcl_strtod" = 1; then echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6 -echo "configure:4609: checking for Solaris2.4/Tru64 strtod bugs" >&5 - if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then +echo "configure:4707: 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 + tcl_cv_strtod_buggy=buggy else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4739: \"$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 + tcl_cv_strtod_buggy=ok else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* - tcl_cv_strtod_buggy=0 + tcl_cv_strtod_buggy=buggy 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 +echo "$ac_t""$tcl_cv_strtod_buggy" 1>&6 + if test "$tcl_cv_strtod_buggy" = buggy; then LIBOBJS="$LIBOBJS fixstrtod.o" cat >> confdefs.h <<\EOF #define strtod fixstrtod @@ -4670,12 +4766,12 @@ EOF #-------------------------------------------------------------------- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4674: checking for ANSI C header files" >&5 +echo "configure:4770: 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 < #include @@ -4683,7 +4779,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4783: \"$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* @@ -4700,7 +4796,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 @@ -4718,7 +4814,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 @@ -4739,7 +4835,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4750,7 +4846,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -4774,12 +4870,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:4778: checking for mode_t" >&5 +echo "configure:4874: 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 < #if STDC_HEADERS @@ -4807,12 +4903,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:4811: checking for pid_t" >&5 +echo "configure:4907: 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 < #if STDC_HEADERS @@ -4840,12 +4936,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:4844: checking for size_t" >&5 +echo "configure:4940: 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 < #if STDC_HEADERS @@ -4873,12 +4969,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4877: checking for uid_t in sys/types.h" >&5 +echo "configure:4973: 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 @@ -4912,19 +5008,19 @@ fi #------------------------------------------- echo $ac_n "checking pw_gecos in struct pwd""... $ac_c" 1>&6 -echo "configure:4916: checking pw_gecos in struct pwd" >&5 +echo "configure:5012: 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 < int main() { struct passwd pwd; pwd.pw_gecos; ; return 0; } EOF -if { (eval echo configure:4928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* tcl_cv_pwd_pw_gecos=yes else @@ -4959,10 +5055,10 @@ fi if test $tk_aqua = yes; then if test $tcl_corefoundation = no; then - echo "configure: warning: "Aqua can only be used when CoreFoundation is available"" 1>&2 + echo "configure: warning: Aqua can only be used when CoreFoundation is available" 1>&2 tk_aqua=no elif test ! -d /System/Library/Frameworks/Carbon.framework; then - echo "configure: warning: "Aqua can only be used when Carbon is available"" 1>&2 + echo "configure: warning: Aqua can only be used when Carbon is available" 1>&2 tk_aqua=no fi fi @@ -5005,7 +5101,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:5009: checking for X" >&5 +echo "configure:5105: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -5067,12 +5163,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5172: \"$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* @@ -5141,14 +5237,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5248: \"$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. @@ -5238,12 +5334,12 @@ fi if test "$no_x" = ""; then if test "$x_includes" = ""; then cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5343: \"$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 : @@ -5263,15 +5359,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:5267: checking for X11 header files" >&5 +echo "configure:5363: checking for X11 header files" >&5 found_xincludes="no" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5371: \"$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* @@ -5307,7 +5403,7 @@ rm -f conftest* if test "$no_x" = yes; then echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6 -echo "configure:5311: checking for X11 libraries" >&5 +echo "configure:5407: 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 @@ -5327,7 +5423,7 @@ echo "configure:5311: 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:5331: checking for XCreateWindow in -lXwindow" >&5 +echo "configure:5427: 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 @@ -5335,7 +5431,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXwindow $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5446: \"$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 @@ -5368,7 +5464,7 @@ fi fi if test "$XLIBSW" = nope ; then - echo "$ac_t""couldn't find any! Using -lX11." 1>&6 + echo "$ac_t""could not find any! Using -lX11." 1>&6 XLIBSW=-lX11 fi @@ -5423,7 +5519,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:5427: checking for main in -lXbsd" >&5 +echo "configure:5523: 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 @@ -5431,14 +5527,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lXbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +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_lib_$ac_lib_var=yes" else @@ -5462,12 +5558,12 @@ fi tk_checkBoth=0 echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:5466: checking for connect" >&5 +echo "configure:5562: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5590: \"$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 @@ -5512,7 +5608,7 @@ fi if test "$tk_checkSocket" = 1; then echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:5516: checking for main in -lsocket" >&5 +echo "configure:5612: 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 @@ -5520,14 +5616,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5627: \"$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 @@ -5553,12 +5649,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:5557: checking for accept" >&5 +echo "configure:5653: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5681: \"$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 @@ -5603,12 +5699,12 @@ fi fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:5607: checking for gethostbyname" >&5 +echo "configure:5703: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5731: \"$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 @@ -5649,7 +5745,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:5653: checking for main in -lnsl" >&5 +echo "configure:5749: 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 @@ -5657,14 +5753,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5764: \"$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 @@ -5700,13 +5796,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:5704: checking MIT X libraries" >&5 +echo "configure:5800: 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 < @@ -5717,7 +5813,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:5721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 @@ -5741,14 +5837,14 @@ fi #-------------------------------------------------------------------- echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:5745: checking whether char is unsigned" >&5 +echo "configure:5841: 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 <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5880: \"$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 @@ -5840,7 +5936,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:5844: checking how to package libraries" >&5 +echo "configure:5940: 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" @@ -5861,11 +5957,11 @@ fi echo "$ac_t""framework" 1>&6 FRAMEWORK_BUILD=1 if test "${SHARED_BUILD}" = "0" ; then - echo "configure: warning: "Frameworks can only be built if --enable-shared is yes"" 1>&2 + echo "configure: warning: Frameworks can only be built if --enable-shared is yes" 1>&2 FRAMEWORK_BUILD=0 fi if test $tcl_corefoundation = no; then - echo "configure: warning: "Frameworks can only be used when CoreFoundation is available"" 1>&2 + echo "configure: warning: Frameworks can only be used when CoreFoundation is available" 1>&2 FRAMEWORK_BUILD=0 fi else @@ -5953,7 +6049,7 @@ if test $tk_aqua = yes; then LIB_RSRC_FILE='${TK_RSRC_FILE}' APP_RSRC_FILE='${WISH_RSRC_FILE}' REZ=/Developer/Tools/Rez - REZ_FLAGS='-d "SystemSevenOrLater=1" -useDF' + REZ_FLAGS='-d "SystemSevenOrLater=1" -useDF -ro' if test "$SHARED_BUILD" = 0; then EXTRA_INSTALL_BINARIES='@echo "Installing $(TK_RSRC_FILE) to $(LIB_INSTALL_DIR)" && $(INSTALL_DATA) $(TK_RSRC_FILE) $(LIB_INSTALL_DIR)' TK_BUILD_LIB_SPEC="$TK_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd`/\${TK_RSRC_FILE}" diff --git a/unix/configure.in b/unix/configure.in index 486a0c2..47b6942 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.25 2005/11/27 04:23:39 das Exp $ +# RCS: @(#) $Id: configure.in,v 1.83.2.26 2006/01/10 05:38:40 das Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -48,6 +48,7 @@ TK_SRC_DIR=`cd $srcdir/..; pwd` #------------------------------------------------------------------------ # Compress and/or soft link the manpages? #------------------------------------------------------------------------ + SC_CONFIG_MANPAGES([tk]) #------------------------------------------------------------------------ @@ -80,7 +81,7 @@ 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) +AC_MSG_RESULT([$tk_ok]) #------------------------------------------------------------------------ # If we're using GCC, see if the compiler understands -pipe. If so, use it. @@ -93,9 +94,9 @@ if test -n "$GCC"; then OLDCC="$CC" CC="$CC -pipe" AC_TRY_COMPILE(,, - AC_MSG_RESULT(yes), + AC_MSG_RESULT([yes]), CC="$OLDCC" - AC_MSG_RESULT(no)) + AC_MSG_RESULT([no])) fi fi @@ -174,18 +175,14 @@ fi # special flag. #-------------------------------------------------------------------- -AC_MSG_CHECKING([for fd_set in sys/types]) -AC_CACHE_VAL(tcl_cv_type_fd_set, +AC_CACHE_CHECK([for fd_set in sys/types], tcl_cv_type_fd_set, AC_TRY_COMPILE([#include ],[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, +if test $tk_ok = no; then + AC_CACHE_CHECK([for fd_mask in sys/select], 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 @@ -225,12 +222,10 @@ AC_TYPE_UID_T # In OS/390 struct pwd has no pw_gecos field #------------------------------------------- -AC_MSG_CHECKING([pw_gecos in struct pwd]) -AC_CACHE_VAL(tcl_cv_pwd_pw_gecos, +AC_CACHE_CHECK([pw_gecos in struct pwd], tcl_cv_pwd_pw_gecos, AC_TRY_COMPILE([#include ], [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 @@ -244,10 +239,10 @@ if test "`uname -s`" = "Darwin" ; then [tk_aqua=$enableval], [tk_aqua=no]) if test $tk_aqua = yes; then if test $tcl_corefoundation = no; then - AC_MSG_WARN("Aqua can only be used when CoreFoundation is available") + AC_MSG_WARN([Aqua can only be used when CoreFoundation is available]) tk_aqua=no elif test ! -d /System/Library/Frameworks/Carbon.framework; then - AC_MSG_WARN("Aqua can only be used when Carbon is available") + AC_MSG_WARN([Aqua can only be used when Carbon is available]) tk_aqua=no fi fi @@ -366,10 +361,10 @@ if test -d /usr/include/mit -a $tk_aqua = no; then ], [ XOpenDisplay(0); ], [ - AC_MSG_RESULT(yes) + AC_MSG_RESULT([yes]) XLIBSW="-lX11-mit" XINCLUDES="-I/usr/include/mit" - ], AC_MSG_RESULT(no)) + ], AC_MSG_RESULT([no])) CFLAGS=$tk_oldCFlags LIBS=$tk_oldLibs fi @@ -501,7 +496,7 @@ if test $tk_aqua = yes; then LIB_RSRC_FILE='${TK_RSRC_FILE}' APP_RSRC_FILE='${WISH_RSRC_FILE}' REZ=/Developer/Tools/Rez - REZ_FLAGS='-d "SystemSevenOrLater=1" -useDF' + REZ_FLAGS='-d "SystemSevenOrLater=1" -useDF -ro' if test "$SHARED_BUILD" = 0; then EXTRA_INSTALL_BINARIES='@echo "Installing $(TK_RSRC_FILE) to $(LIB_INSTALL_DIR)" && $(INSTALL_DATA) $(TK_RSRC_FILE) $(LIB_INSTALL_DIR)' TK_BUILD_LIB_SPEC="$TK_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd`/\${TK_RSRC_FILE}" diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 1c11781..9b86a7b 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -62,9 +62,25 @@ AC_DEFUN(SC_PATH_TCLCONFIG, [ done fi + # on Darwin, check in Framework installation locations + if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then + for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ + `ls -d /Library/Frameworks 2>/dev/null` \ + `ls -d /Network/Library/Frameworks 2>/dev/null` \ + `ls -d /System/Library/Frameworks 2>/dev/null` \ + ; do + if test -f "$i/Tcl.framework/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` + break + fi + done + fi + # check in a few common install locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ + `ls -d ${exec_prefix}/lib 2>/dev/null` \ + `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ @@ -93,12 +109,12 @@ AC_DEFUN(SC_PATH_TCLCONFIG, [ if test x"${ac_cv_c_tclconfig}" = x ; then TCL_BIN_DIR="# no Tcl configs found" - AC_MSG_WARN(Can't find Tcl configuration definitions) + AC_MSG_WARN([Can't find Tcl configuration definitions]) exit 0 else no_tcl= TCL_BIN_DIR=${ac_cv_c_tclconfig} - AC_MSG_RESULT(found $TCL_BIN_DIR/tclConfig.sh) + AC_MSG_RESULT([found ${TCL_BIN_DIR}/tclConfig.sh]) fi fi ]) @@ -165,9 +181,26 @@ AC_DEFUN(SC_PATH_TKCONFIG, [ fi done fi + + # on Darwin, check in Framework installation locations + if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then + for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ + `ls -d /Library/Frameworks 2>/dev/null` \ + `ls -d /Network/Library/Frameworks 2>/dev/null` \ + `ls -d /System/Library/Frameworks 2>/dev/null` \ + ; do + if test -f "$i/Tk.framework/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` + break + fi + done + fi + # check in a few common install locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ + `ls -d ${exec_prefix}/lib 2>/dev/null` \ + `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ @@ -192,17 +225,17 @@ AC_DEFUN(SC_PATH_TKCONFIG, [ done fi ]) + if test x"${ac_cv_c_tkconfig}" = x ; then TK_BIN_DIR="# no Tk configs found" - AC_MSG_WARN(Can't find Tk configuration definitions) + AC_MSG_WARN([Can't find Tk configuration definitions]) exit 0 else no_tk= TK_BIN_DIR=${ac_cv_c_tkconfig} - AC_MSG_RESULT(found $TK_BIN_DIR/tkConfig.sh) + AC_MSG_RESULT([found ${TK_BIN_DIR}/tkConfig.sh]) fi fi - ]) #------------------------------------------------------------------------ @@ -225,39 +258,55 @@ AC_DEFUN(SC_PATH_TKCONFIG, [ #------------------------------------------------------------------------ AC_DEFUN(SC_LOAD_TCLCONFIG, [ - AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh]) + AC_MSG_CHECKING([for existence of ${TCL_BIN_DIR}/tclConfig.sh]) - if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then + if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then AC_MSG_RESULT([loading]) - . $TCL_BIN_DIR/tclConfig.sh + . ${TCL_BIN_DIR}/tclConfig.sh else - AC_MSG_RESULT([file not found]) + AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh]) fi - # + # eval is required to do the TCL_DBGX substitution + eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" + eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" + # If the TCL_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable TCL_LIB_SPEC will be set to the value # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC # instead of TCL_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. - # - - if test -f $TCL_BIN_DIR/Makefile ; then + if test -f ${TCL_BIN_DIR}/Makefile ; then TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} + elif test "`uname -s`" = "Darwin"; then + # If Tcl was built as a framework, attempt to use the libraries + # from the framework at the given location so that linking works + # against Tcl.framework installed in an arbitary location. + case ${TCL_DEFS} in + *TCL_FRAMEWORK*) + if test -f ${TCL_BIN_DIR}/${TCL_LIB_FILE}; then + for i in "`cd ${TCL_BIN_DIR}; pwd`" \ + "`cd ${TCL_BIN_DIR}/../..; pwd`"; do + if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then + TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" + break + fi + done + fi + if test -f ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}; then + TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" + TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" + fi + ;; + esac fi - # # eval is required to do the TCL_DBGX substitution - # - - eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" - - eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" @@ -291,19 +340,69 @@ AC_DEFUN(SC_LOAD_TCLCONFIG, [ #------------------------------------------------------------------------ AC_DEFUN(SC_LOAD_TKCONFIG, [ - AC_MSG_CHECKING([for existence of $TK_BIN_DIR/tkConfig.sh]) + AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh]) - if test -f "$TK_BIN_DIR/tkConfig.sh" ; then + if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then AC_MSG_RESULT([loading]) - . $TK_BIN_DIR/tkConfig.sh + . ${TK_BIN_DIR}/tkConfig.sh else - AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh]) + AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh]) fi + # eval is required to do the TK_DBGX substitution + eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" + eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" + + # If the TK_BIN_DIR is the build directory (not the install directory), + # then set the common variable name to the value of the build variables. + # For example, the variable TK_LIB_SPEC will be set to the value + # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC + # instead of TK_BUILD_LIB_SPEC since it will work with both an + # installed and uninstalled version of Tcl. + if test -f ${TK_BIN_DIR}/Makefile ; then + TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} + TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} + TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} + elif test "`uname -s`" = "Darwin"; then + # If Tk was built as a framework, attempt to use the libraries + # from the framework at the given location so that linking works + # against Tk.framework installed in an arbitary location. + case ${TK_DEFS} in + *TK_FRAMEWORK*) + if test -f ${TK_BIN_DIR}/${TK_LIB_FILE}; then + for i in "`cd ${TK_BIN_DIR}; pwd`" \ + "`cd ${TK_BIN_DIR}/../..; pwd`"; do + if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then + TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" + break + fi + done + fi + if test -f ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}; then + TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" + TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" + fi + ;; + esac + fi + + # eval is required to do the TK_DBGX substitution + eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" + eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" + eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" + eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" + AC_SUBST(TK_VERSION) AC_SUBST(TK_BIN_DIR) AC_SUBST(TK_SRC_DIR) + AC_SUBST(TK_LIB_FILE) + AC_SUBST(TK_LIB_FLAG) + AC_SUBST(TK_LIB_SPEC) + + AC_SUBST(TK_STUB_LIB_FILE) + AC_SUBST(TK_STUB_LIB_FLAG) + AC_SUBST(TK_STUB_LIB_SPEC) ]) #------------------------------------------------------------------------ @@ -328,7 +427,6 @@ AC_DEFUN(SC_LOAD_TKCONFIG, [ AC_DEFUN(SC_PROG_TCLSH, [ AC_MSG_CHECKING([for tclsh]) - AC_CACHE_VAL(ac_cv_path_tclsh, [ search_path=`echo ${PATH} | sed -e 's/:/ /g'` for dir in $search_path ; do @@ -346,7 +444,7 @@ AC_DEFUN(SC_PROG_TCLSH, [ if test -f "$ac_cv_path_tclsh" ; then TCLSH_PROG="$ac_cv_path_tclsh" - AC_MSG_RESULT($TCLSH_PROG) + AC_MSG_RESULT([$TCLSH_PROG]) else # It is not an error if an installed version of Tcl can't be located. TCLSH_PROG="" @@ -375,7 +473,7 @@ AC_DEFUN(SC_PROG_TCLSH, [ AC_DEFUN(SC_BUILD_TCLSH, [ AC_MSG_CHECKING([for tclsh in Tcl build directory]) BUILD_TCLSH=${TCL_BIN_DIR}/tclsh - AC_MSG_RESULT($BUILD_TCLSH) + AC_MSG_RESULT([$BUILD_TCLSH]) AC_SUBST(BUILD_TCLSH) ]) @@ -457,11 +555,11 @@ AC_DEFUN(SC_ENABLE_FRAMEWORK, [ AC_MSG_RESULT([framework]) FRAMEWORK_BUILD=1 if test "${SHARED_BUILD}" = "0" ; then - AC_MSG_WARN("Frameworks can only be built if --enable-shared is yes") + AC_MSG_WARN([Frameworks can only be built if --enable-shared is yes]) FRAMEWORK_BUILD=0 fi if test $tcl_corefoundation = no; then - AC_MSG_WARN("Frameworks can only be used when CoreFoundation is available") + AC_MSG_WARN([Frameworks can only be used when CoreFoundation is available]) FRAMEWORK_BUILD=0 fi else @@ -496,18 +594,15 @@ AC_DEFUN(SC_ENABLE_FRAMEWORK, [ #------------------------------------------------------------------------ AC_DEFUN(SC_ENABLE_THREADS, [ - AC_MSG_CHECKING(for building with threads) AC_ARG_ENABLE(threads, [ --enable-threads build with threads], [tcl_ok=$enableval], [tcl_ok=no]) + if test "${TCL_THREADS}" = 1; then + tcl_threaded_core=1; + fi + if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then - if test "${TCL_THREADS}" = 1; then - AC_MSG_RESULT([yes (threaded core)]) - else - AC_MSG_RESULT([yes]) - fi TCL_THREADS=1 - AC_DEFINE(TCL_THREADS) # USE_THREAD_ALLOC tells us to try the special thread-based # allocator that significantly reduces lock contention AC_DEFINE(USE_THREAD_ALLOC) @@ -523,29 +618,33 @@ AC_DEFUN(SC_ENABLE_THREADS, [ # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] - AC_CHECK_LIB(pthread,__pthread_mutex_init,tcl_ok=yes,tcl_ok=no) + AC_CHECK_LIB(pthread, __pthread_mutex_init, + tcl_ok=yes, tcl_ok=no) fi if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -lpthread" else - AC_CHECK_LIB(pthreads,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) + AC_CHECK_LIB(pthreads, pthread_mutex_init, + tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -lpthreads" else - AC_CHECK_LIB(c,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) - if test "$tcl_ok" = "no"; then - AC_CHECK_LIB(c_r,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) + AC_CHECK_LIB(c, pthread_mutex_init, + tcl_ok=yes, tcl_ok=no) + if test "$tcl_ok" = "no"; then + AC_CHECK_LIB(c_r, pthread_mutex_init, + tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -pthread" else TCL_THREADS=0 - AC_MSG_WARN("Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...") + AC_MSG_WARN([Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...]) fi - fi + fi fi fi @@ -559,8 +658,20 @@ AC_DEFUN(SC_ENABLE_THREADS, [ LIBS=$ac_saved_libs else TCL_THREADS=0 + fi + # Do checking message here to not mess up interleaved configure output + AC_MSG_CHECKING([for building with threads]) + if test "${TCL_THREADS}" = 1; then + AC_DEFINE(TCL_THREADS, 1, [Are we building with threads enabled?]) + if test "${tcl_threaded_core}" = 1; then + AC_MSG_RESULT([yes (threaded core)]) + else + AC_MSG_RESULT([yes]) + fi + else AC_MSG_RESULT([no (default)]) fi + AC_SUBST(TCL_THREADS) ]) @@ -666,7 +777,7 @@ AC_DEFUN(SC_ENABLE_LANGINFO, [ AC_CACHE_VAL(tcl_cv_langinfo_h, AC_TRY_COMPILE([#include ], [nl_langinfo(CODESET);], [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])) - AC_MSG_RESULT($tcl_cv_langinfo_h) + AC_MSG_RESULT([$tcl_cv_langinfo_h]) if test $tcl_cv_langinfo_h = yes; then AC_DEFINE(HAVE_LANGINFO) fi @@ -714,8 +825,11 @@ AC_DEFUN(SC_CONFIG_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", + [case $enableval in + yes) AC_MSG_ERROR([missing argument to --enable-man-compression]);; + no) ;; + *) MAN_FLAGS="$MAN_FLAGS --compress $enableval";; + esac], enableval="no") AC_MSG_RESULT([$enableval]) if test "$enableval" != "no"; then @@ -733,8 +847,11 @@ AC_DEFUN(SC_CONFIG_MANPAGES, [ [ --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", + [case $enableval in + yes) enableval="$1" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; + no) ;; + *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; + esac], enableval="no") AC_MSG_RESULT([$enableval]) @@ -742,6 +859,49 @@ AC_DEFUN(SC_CONFIG_MANPAGES, [ ]) #-------------------------------------------------------------------- +# SC_CONFIG_SYSTEM +# +# Determine what the system is (some things cannot be easily checked +# on a feature-driven basis, alas). This can usually be done via the +# "uname" command, but there are a few systems, like Next, where +# this doesn't work. +# +# Arguments: +# none +# +# Results: +# Defines the following var: +# +# system - System/platform/version identification code. +# +#-------------------------------------------------------------------- + +AC_DEFUN(SC_CONFIG_SYSTEM, [ + AC_CACHE_CHECK([system version], tcl_cv_sys_version, [ + if test -f /usr/lib/NextStep/software_version; then + tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` + else + tcl_cv_sys_version=`uname -s`-`uname -r` + if test "$?" -ne 0 ; then + AC_MSG_WARN([can't find uname command]) + tcl_cv_sys_version=unknown + else + # Special check for weird MP-RAS system (uname returns weird + # results, and the version is kept in special file). + + if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then + tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid` + fi + if test "`uname -s`" = "AIX" ; then + tcl_cv_sys_version=AIX-`uname -v`.`uname -r` + fi + fi + fi + ]) + system=$tcl_cv_sys_version +]) + +#-------------------------------------------------------------------- # SC_CONFIG_CFLAGS # # Try to determine the proper flags to pass to the compiler @@ -839,54 +999,26 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [ # Step 0.a: Enable 64 bit support? AC_MSG_CHECKING([if 64bit support is requested]) - AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support (where applicable)],,enableval="no") - - if test "$enableval" = "yes"; then - do64bit=yes - else - do64bit=no - fi - AC_MSG_RESULT($do64bit) + AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support (where applicable)], + [do64bit=$enableval], [do64bit=no]) + AC_MSG_RESULT([$do64bit]) # Step 0.b: Enable Solaris 64 bit VIS support? AC_MSG_CHECKING([if 64bit Sparc VIS support is requested]) - AC_ARG_ENABLE(64bit-vis,[ --enable-64bit-vis enable 64bit Sparc VIS support],,enableval="no") + AC_ARG_ENABLE(64bit-vis,[ --enable-64bit-vis enable 64bit Sparc VIS support], + [do64bitVIS=$enableval], [do64bitVIS=no]) + AC_MSG_RESULT([$do64bitVIS]) - if test "$enableval" = "yes"; then + if test "$do64bitVIS" = "yes"; then # Force 64bit on with VIS do64bit=yes - do64bitVIS=yes - else - do64bitVIS=no fi - AC_MSG_RESULT($do64bitVIS) # Step 1: set the variable "system" to hold the name and version number - # for the system. This can usually be done via the "uname" command, but - # there are a few systems, like Next, where this doesn't work. + # for the system. - AC_MSG_CHECKING([system version (for dynamic loading)]) - if test -f /usr/lib/NextStep/software_version; then - system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` - else - system=`uname -s`-`uname -r` - if test "$?" -ne 0 ; then - AC_MSG_RESULT([unknown (can't find uname command)]) - system=unknown - else - # Special check for weird MP-RAS system (uname returns weird - # results, and the version is kept in special file). - - if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then - system=MP-RAS-`awk '{print $3}' /etc/.relid` - fi - if test "`uname -s`" = "AIX" ; then - system=AIX-`uname -v`.`uname -r` - fi - AC_MSG_RESULT($system) - fi - fi + SC_CONFIG_SYSTEM # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. @@ -1090,18 +1222,18 @@ dnl AC_CHECK_TOOL(AR, ar) # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = "yes" ; then if test "$GCC" = "yes" ; then - hpux_arch=`gcc -dumpmachine` + hpux_arch=`${CC} -dumpmachine` case $hpux_arch in hppa64*) # 64-bit gcc in use. Fix flags for GNU ld. do64bit_ok=yes - SHLIB_LD="gcc -shared" + SHLIB_LD="${CC} -shared" SHLIB_LD_LIBS='${LIBS}' CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ;; *) - AC_MSG_WARN("64bit mode not supported with GCC on $system") + AC_MSG_WARN([64bit mode not supported with GCC on $system]) ;; esac else @@ -1310,17 +1442,17 @@ dnl AC_CHECK_TOOL(AR, ar) DL_LIBS="" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' - AC_MSG_CHECKING(for ELF) - AC_EGREP_CPP(yes, [ + AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [ + AC_EGREP_CPP(yes, [ #ifdef __ELF__ yes #endif - ], - AC_MSG_RESULT(yes) - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so', - AC_MSG_RESULT(no) + ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)]) + if test $tcl_cv_ld_elf = yes; then + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so' + else SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' - ) + fi ], [ SHLIB_CFLAGS="" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r" @@ -1368,17 +1500,17 @@ dnl AC_CHECK_TOOL(AR, ar) CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' - AC_MSG_CHECKING(for ELF) - AC_EGREP_CPP(yes, [ + AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [ + AC_EGREP_CPP(yes, [ #ifdef __ELF__ yes #endif - ], - AC_MSG_RESULT(yes) - [ LDFLAGS=-Wl,-export-dynamic ], - AC_MSG_RESULT(no) + ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)]) + if test $tcl_cv_ld_elf = yes; then + LDFLAGS=-Wl,-export-dynamic + else LDFLAGS="" - ) + fi ;; esac @@ -1501,8 +1633,8 @@ dnl AC_CHECK_TOOL(AR, ar) LD_SEARCH_FLAGS="" ;; OS/390-*) - CFLAGS_OPTIMIZE="" # Optimizer is buggy - AC_DEFINE(_OE_SOCKETS) # needed in sys/socket.h + CFLAGS_OPTIMIZE="" # Optimizer is buggy + AC_DEFINE(_OE_SOCKETS) # needed in sys/socket.h ;; OSF1-1.0|OSF1-1.1|OSF1-1.2) # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 @@ -1760,12 +1892,14 @@ dnl AC_CHECK_TOOL(AR, ar) DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - hold_ldflags=$LDFLAGS - AC_MSG_CHECKING(for ld accepts -Bexport flag) - LDFLAGS="$LDFLAGS -Wl,-Bexport" - AC_TRY_LINK(, [int i;], [found=yes], - [LDFLAGS=$hold_ldflags found=no]) - AC_MSG_RESULT($found) + AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [ + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-Bexport" + AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no) + LDFLAGS=$hold_ldflags]) + if test $tcl_cv_ld_Bexport = yes; then + LDFLAGS="$LDFLAGS -Wl,-Bexport" + fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; @@ -1795,7 +1929,7 @@ dnl AC_CHECK_TOOL(AR, ar) # duplicates the v7 fields that are needed. if test "x$DL_OBJS" = "xtclLoadAout.o" ; then - AC_MSG_CHECKING(sys/exec.h) + AC_CACHE_CHECK([sys/exec.h], tcl_cv_sysexec_h, [ AC_TRY_COMPILE([#include ],[ struct exec foo; unsigned long seek; @@ -1807,12 +1941,11 @@ dnl AC_CHECK_TOOL(AR, ar) #endif flag = (foo.a_magic == OMAGIC); return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; - ], tcl_ok=usable, tcl_ok=unusable) - AC_MSG_RESULT($tcl_ok) - if test $tcl_ok = usable; then + ], tcl_cv_sysexec_h=usable, tcl_cv_sysexec_h=unusable)]) + if test $tcl_cv_sysexec_h = usable; then AC_DEFINE(USE_SYS_EXEC_H) else - AC_MSG_CHECKING(a.out.h) + AC_CACHE_CHECK([a.out.h], tcl_cv_aout_h, [ AC_TRY_COMPILE([#include ],[ struct exec foo; unsigned long seek; @@ -1824,12 +1957,11 @@ dnl AC_CHECK_TOOL(AR, ar) #endif flag = (foo.a_magic == OMAGIC); return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; - ], tcl_ok=usable, tcl_ok=unusable) - AC_MSG_RESULT($tcl_ok) - if test $tcl_ok = usable; then + ], tcl_cv_aout_h=usable, tcl_cv_aout_h=unusable)]) + if test $tcl_cv_aout_h = usable; then AC_DEFINE(USE_A_OUT_H) else - AC_MSG_CHECKING(sys/exec_aout.h) + AC_CACHE_CHECK([sys/exec_aout.h], tcl_cv_sysexecaout_h, [ AC_TRY_COMPILE([#include ],[ struct exec foo; unsigned long seek; @@ -1841,9 +1973,8 @@ dnl AC_CHECK_TOOL(AR, ar) #endif flag = (foo.a_midmag == OMAGIC); return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; - ], tcl_ok=usable, tcl_ok=unusable) - AC_MSG_RESULT($tcl_ok) - if test $tcl_ok = usable; then + ], tcl_cv_sysexecaout_h=usable, tcl_cv_sysexecaout_h=unusable)]) + if test $tcl_cv_sysexecaout_h = usable; then AC_DEFINE(USE_SYS_EXEC_AOUT_H) else DL_OBJS="" @@ -2009,8 +2140,7 @@ dnl esac AC_DEFUN(SC_SERIAL_PORT, [ AC_CHECK_HEADERS(sys/modem.h) - AC_MSG_CHECKING([termios vs. termio vs. sgtty]) - AC_CACHE_VAL(tcl_cv_api_serial, [ + AC_CACHE_CHECK([termios vs. termio vs. sgtty], tcl_cv_api_serial, [ AC_TRY_RUN([ #include @@ -2102,7 +2232,6 @@ int main() { termio) AC_DEFINE(USE_TERMIO);; sgtty) AC_DEFINE(USE_SGTTY);; esac - AC_MSG_RESULT($tcl_cv_api_serial) ]) #-------------------------------------------------------------------- @@ -2137,8 +2266,7 @@ int main() { #-------------------------------------------------------------------- AC_DEFUN(SC_MISSING_POSIX_HEADERS, [ - AC_MSG_CHECKING(dirent.h) - AC_CACHE_VAL(tcl_cv_dirent_h, + AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h, AC_TRY_LINK([#include #include ], [ #ifndef _POSIX_SOURCE @@ -2164,7 +2292,6 @@ closedir(d); AC_DEFINE(NO_DIRENT_H) fi - AC_MSG_RESULT($tcl_ok) AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H)]) AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H)]) AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H)]) @@ -2229,14 +2356,14 @@ AC_DEFUN(SC_PATH_X, [ fi fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then - AC_MSG_CHECKING(for X11 header files) + AC_MSG_CHECKING([for X11 header files]) found_xincludes="no" AC_TRY_CPP([#include ], found_xincludes="yes", found_xincludes="no") if test "$found_xincludes" = "no"; then dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include" for i in $dirs ; do if test -r $i/X11/Intrinsic.h; then - AC_MSG_RESULT($i) + AC_MSG_RESULT([$i]) XINCLUDES=" -I$i" found_xincludes="yes" break @@ -2250,16 +2377,16 @@ AC_DEFUN(SC_PATH_X, [ fi fi if test found_xincludes = "no"; then - AC_MSG_RESULT(couldn't find any!) + AC_MSG_RESULT([couldn't find any!]) fi if test "$no_x" = yes; then - AC_MSG_CHECKING(for X11 libraries) + AC_MSG_CHECKING([for X11 libraries]) 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 if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then - AC_MSG_RESULT($i) + AC_MSG_RESULT([$i]) XLIBSW="-L$i -lX11" x_libraries="$i" break @@ -2276,7 +2403,7 @@ AC_DEFUN(SC_PATH_X, [ AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow) fi if test "$XLIBSW" = nope ; then - AC_MSG_RESULT(couldn't find any! Using -lX11.) + AC_MSG_RESULT([could not find any! Using -lX11.]) XLIBSW=-lX11 fi ]) @@ -2305,25 +2432,8 @@ AC_DEFUN(SC_PATH_X, [ AC_DEFUN(SC_BLOCKING_STYLE, [ AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(sys/filio.h) + SC_CONFIG_SYSTEM AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O]) - if test -f /usr/lib/NextStep/software_version; then - system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` - else - system=`uname -s`-`uname -r` - if test "$?" -ne 0 ; then - system=unknown - else - # Special check for weird MP-RAS system (uname returns weird - # results, and the version is kept in special file). - - if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then - system=MP-RAS-`awk '{print $3}' /etc/.relid` - fi - if test "`uname -s`" = "AIX" ; then - system=AIX-`uname -v`.`uname -r` - fi - fi - fi case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since @@ -2332,18 +2442,18 @@ AC_DEFUN(SC_BLOCKING_STYLE, [ OSF*) AC_DEFINE(USE_FIONBIO) - AC_MSG_RESULT(FIONBIO) + AC_MSG_RESULT([FIONBIO]) ;; SunOS-4*) AC_DEFINE(USE_FIONBIO) - AC_MSG_RESULT(FIONBIO) + AC_MSG_RESULT([FIONBIO]) ;; ULTRIX-4.*) AC_DEFINE(USE_FIONBIO) - AC_MSG_RESULT(FIONBIO) + AC_MSG_RESULT([FIONBIO]) ;; *) - AC_MSG_RESULT(O_NONBLOCK) + AC_MSG_RESULT([O_NONBLOCK]) ;; esac ]) @@ -2374,20 +2484,16 @@ AC_DEFUN(SC_TIME_HANDLER, [ AC_CHECK_FUNCS(gmtime_r localtime_r) - AC_MSG_CHECKING([tm_tzadj in struct tm]) - AC_CACHE_VAL(tcl_cv_member_tm_tzadj, + AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj, AC_TRY_COMPILE([#include ], [struct tm tm; tm.tm_tzadj;], tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no)) - AC_MSG_RESULT($tcl_cv_member_tm_tzadj) if test $tcl_cv_member_tm_tzadj = yes ; then AC_DEFINE(HAVE_TM_TZADJ) fi - AC_MSG_CHECKING([tm_gmtoff in struct tm]) - AC_CACHE_VAL(tcl_cv_member_tm_gmtoff, + AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff, AC_TRY_COMPILE([#include ], [struct tm tm; tm.tm_gmtoff;], tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)) - AC_MSG_RESULT($tcl_cv_member_tm_gmtoff) if test $tcl_cv_member_tm_gmtoff = yes ; then AC_DEFINE(HAVE_TM_GMTOFF) fi @@ -2396,28 +2502,24 @@ AC_DEFUN(SC_TIME_HANDLER, [ # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # - AC_MSG_CHECKING([long timezone variable]) - AC_CACHE_VAL(tcl_cv_timezone_long, + AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, AC_TRY_COMPILE([#include ], [extern long timezone; timezone += 1; exit (0);], tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)) - AC_MSG_RESULT($tcl_cv_timezone_long) if test $tcl_cv_timezone_long = yes ; then AC_DEFINE(HAVE_TIMEZONE_VAR) else # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # - AC_MSG_CHECKING([time_t timezone variable]) - AC_CACHE_VAL(tcl_cv_timezone_time, + AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, AC_TRY_COMPILE([#include ], [extern time_t timezone; timezone += 1; exit (0);], tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)) - AC_MSG_RESULT($tcl_cv_timezone_time) if test $tcl_cv_timezone_time = yes ; then AC_DEFINE(HAVE_TIMEZONE_VAR) fi @@ -2447,8 +2549,7 @@ AC_DEFUN(SC_TIME_HANDLER, [ AC_DEFUN(SC_BUGGY_STRTOD, [ AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0) if test "$tcl_strtod" = 1; then - AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs]) - AC_CACHE_VAL(tcl_cv_strtod_buggy,[ + AC_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[ AC_TRY_RUN([ extern double strtod(); int main() { @@ -2468,11 +2569,9 @@ AC_DEFUN(SC_BUGGY_STRTOD, [ exit(1); } exit(0); - }], tcl_cv_strtod_buggy=1, tcl_cv_strtod_buggy=0, tcl_cv_strtod_buggy=0)]) - if test "$tcl_cv_strtod_buggy" = 1; then - AC_MSG_RESULT(ok) - else - AC_MSG_RESULT(buggy) + }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy, + tcl_cv_strtod_buggy=buggy)]) + if test "$tcl_cv_strtod_buggy" = buggy; then LIBOBJS="$LIBOBJS fixstrtod.o" AC_DEFINE(strtod, fixstrtod) fi @@ -2593,7 +2692,8 @@ AC_DEFUN(SC_TCL_EARLY_FLAG,[ if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then AC_DEFINE($1) tcl_flags="$tcl_flags $1" - fi]) + fi +]) AC_DEFUN(SC_TCL_EARLY_FLAGS,[ AC_MSG_CHECKING([for required early compiler flags]) @@ -2605,10 +2705,11 @@ AC_DEFUN(SC_TCL_EARLY_FLAGS,[ SC_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include ], [char *p = (char *)open64;]) if test "x${tcl_flags}" = "x" ; then - AC_MSG_RESULT(none) + AC_MSG_RESULT([none]) else - AC_MSG_RESULT(${tcl_flags}) - fi]) + AC_MSG_RESULT([${tcl_flags}]) + fi +]) #-------------------------------------------------------------------- # SC_TCL_64BIT_FLAGS @@ -2644,31 +2745,27 @@ AC_DEFUN(SC_TCL_64BIT_FLAGS, [ }],tcl_cv_type_64bit=${tcl_type_64bit})]) if test "${tcl_cv_type_64bit}" = none ; then AC_DEFINE(TCL_WIDE_INT_IS_LONG) - AC_MSG_RESULT(using long) + AC_MSG_RESULT([using long]) else AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit}) - AC_MSG_RESULT(${tcl_cv_type_64bit}) + AC_MSG_RESULT([${tcl_cv_type_64bit}]) # Now check for auxiliary declarations - AC_MSG_CHECKING([for struct dirent64]) - AC_CACHE_VAL(tcl_cv_struct_dirent64,[ + AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[ AC_TRY_COMPILE([#include #include ],[struct dirent64 p;], tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)]) if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then AC_DEFINE(HAVE_STRUCT_DIRENT64) fi - AC_MSG_RESULT(${tcl_cv_struct_dirent64}) - AC_MSG_CHECKING([for struct stat64]) - AC_CACHE_VAL(tcl_cv_struct_stat64,[ + AC_CACHE_CHECK([for struct stat64], tcl_cv_struct_stat64,[ AC_TRY_COMPILE([#include ],[struct stat64 p; ], tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)]) if test "x${tcl_cv_struct_stat64}" = "xyes" ; then AC_DEFINE(HAVE_STRUCT_STAT64) fi - AC_MSG_RESULT(${tcl_cv_struct_stat64}) AC_CHECK_FUNCS(open64 lseek64) AC_MSG_CHECKING([for off64_t]) @@ -2682,8 +2779,9 @@ AC_DEFUN(SC_TCL_64BIT_FLAGS, [ test "x${ac_cv_func_lseek64}" = "xyes" && \ test "x${ac_cv_func_open64}" = "xyes" ; then AC_DEFINE(HAVE_TYPE_OFF64_T) - AC_MSG_RESULT(yes) + AC_MSG_RESULT([yes]) else - AC_MSG_RESULT(no) + AC_MSG_RESULT([no]) fi - fi]) + fi +]) -- cgit v0.12