Changeset 503 for trunk


Ignore:
Timestamp:
Aug 7, 2006, 1:11:38 PM (18 years ago)
Author:
nkissebe
Message:

Converted to Tcl Extension Architecture (TEA) v3.5 for base Windows support. Added Windows ports of getrlimit, getrusage, gettimeofday, setrlimit functions.

Location:
trunk/gui
Files:
2 added
13 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/gui/Makefile.in

    r413 r503  
    11# Makefile.in --
    22#
    3 #       This file is a Makefile for the Rappture GUI library.  If it has
    4 #       the name "Makefile.in" then it is a template for a Makefile.
    5 #       To generate the actual Makefile, run "./configure", which is a
    6 #       configuration script generated by the "autoconf" program
    7 #       (constructs like "@foo@" will get replaced in the actual Makefile.
    8 #
    9 #========================================================================
    10 # This is the parameterized name of the library that we are building.
    11 #========================================================================
    12 
    13 lib_BINARIES=$(RapptureGUI_LIB_FILE)
    14 BINARIES=$(lib_BINARIES)
    15 
    16 #========================================================================
    17 # Enumerate the names of the source files included in this package.
     3#       This file is a Makefile for Sample TEA Extension.  If it has the name
     4#       "Makefile.in" then it is a template for a Makefile;  to generate the
     5#       actual Makefile, run "./configure", which is a configuration script
     6#       generated by the "autoconf" program (constructs like "@foo@" will get
     7#       replaced in the actual Makefile.
     8#
     9# Copyright (c) 1999 Scriptics Corporation.
     10# Copyright (c) 2002-2005 ActiveState Corporation.
     11#
     12# See the file "license.terms" for information on usage and redistribution
     13# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
     14#
     15# RCS: @(#) $Id: Makefile.in,v 1.60 2005/09/13 22:06:37 hobbs Exp $
     16
     17#========================================================================
     18# Add additional lines to handle any additional AC_SUBST cases that
     19# have been added in a customized configure script.
     20#========================================================================
     21
     22#SAMPLE_NEW_VAR = @SAMPLE_NEW_VAR@
     23BLT_SRC_DIR = @BLT_SRC_DIR@
     24
     25
     26#========================================================================
     27# Nothing of the variables below this line should need to be changed.
     28# Please check the TARGETS section below to make sure the make targets
     29# are correct.
     30#========================================================================
     31
     32#========================================================================
     33# The names of the source files is defined in the configure script.
     34# The object files are used for linking into the final library.
    1835# This will be used when a dist target is added to the Makefile.
    19 #========================================================================
    20 
    21 RapptureGUI_SOURCES = \
    22   src/RpInit.c \
    23   src/RpRlimit.c \
    24   src/RpRusage.c \
    25   src/RpSignal.c
    26 SOURCES = $(RapptureGUI_SOURCES)
    27 
    28 #========================================================================
    29 # Enumerate the names of the object files included in this package.
    30 # These objects are created and linked into the final library.  In
    31 # most cases these object files will correspond to the source files
    32 # above.
    33 #========================================================================
    34 
    35 RapptureGUI_OBJECTS = \
    36   RpInit.$(OBJEXT) \
    37   RpRlimit.$(OBJEXT) \
    38   RpRusage.$(OBJEXT) \
    39   RpSignal.$(OBJEXT)
    40 OBJECTS = $(RapptureGUI_OBJECTS)
    41 
    42 #========================================================================
    43 # The substitution of "RapptureGUI_LIB_FILE" into the variable name below
    44 # let's us refer to the objects for the library without knowing the name
    45 # of the library in advance.  It also lets us use the "$@" variable in
    46 # the rule for building the library, so we can refer to both the list of
    47 # objects and the library itself in a platform-independent manner.
    48 #========================================================================
    49 
    50 RapptureGUI_LIB_FILE = @RapptureGUI_LIB_FILE@
    51 $(RapptureGUI_LIB_FILE)_OBJECTS = $(RapptureGUI_OBJECTS)
    52 
    53 #========================================================================
    54 # This is a list of header files to be installed
    55 #========================================================================
    56 
    57 GENERIC_HDRS=
    58 
    59 #========================================================================
    60 # Nothing of the variables below this line need to be changed.  Please
    61 # check the TARGETS section below to make sure the make targets are
    62 # correct.
    63 #========================================================================
    64 
    65 SHELL = @SHELL@
    66 
    67 srcdir = @srcdir@
    68 top_srcdir = @top_srcdir@
    69 prefix = @prefix@
    70 exec_prefix = @exec_prefix@
    71 
    72 bindir = @bindir@
    73 sbindir = @sbindir@
    74 libexecdir = @libexecdir@
    75 datadir = @datadir@
    76 sysconfdir = @sysconfdir@
    77 sharedstatedir = @sharedstatedir@
    78 localstatedir = @localstatedir@
    79 libdir = @libdir@
    80 infodir = @infodir@
    81 mandir = @mandir@
    82 includedir = @includedir@
    83 oldincludedir = /usr/include
    84 
    85 DESTDIR =
    86 
    87 pkgdatadir = $(datadir)/@PACKAGE@@VERSION@
    88 pkglibdir = $(libdir)/@PACKAGE@@VERSION@
    89 pkgincludedir = $(includedir)/@PACKAGE@@VERSION@
    90 
    91 top_builddir = .
    92 
    93 INSTALL = @INSTALL@
    94 INSTALL_PROGRAM = @INSTALL_PROGRAM@
    95 INSTALL_DATA = @INSTALL_DATA@
    96 INSTALL_SCRIPT = @INSTALL_SCRIPT@
    97 INSTALL_STRIP_FLAG =
    98 transform = @program_transform_name@
    99 
    100 NORMAL_INSTALL = :
    101 PRE_INSTALL = :
    102 POST_INSTALL = :
    103 NORMAL_UNINSTALL = :
    104 PRE_UNINSTALL = :
    105 POST_UNINSTALL = :
    106 
    107 PACKAGE = @PACKAGE@
    108 VERSION = @VERSION@
    109 CC = @CC@
    110 CFLAGS_DEBUG = @CFLAGS_DEBUG@ -Wall
    111 CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ -Wall
    112 CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ -Wall
    113 CLEANFILES = @CLEANFILES@
    114 EXEEXT = @EXEEXT@
    115 LDFLAGS_DEBUG = @LDFLAGS_DEBUG@
    116 LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
    117 LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
    118 MAKE_LIB = @MAKE_LIB@
    119 MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
    120 MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
    121 OBJEXT = @OBJEXT@
    122 RANLIB = @RANLIB@
    123 SHLIB_CFLAGS = @SHLIB_CFLAGS@
    124 SHLIB_LD = @SHLIB_LD@
    125 SHLIB_LDFLAGS = @SHLIB_LDFLAGS@
    126 SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
    127 STLIB_LD = @STLIB_LD@
    128 TCL_BIN_DIR = @TCL_BIN_DIR@
    129 TCL_DEFS = @TCL_DEFS@
    130 TCL_EXTRA_CFLAGS = @TCL_EXTRA_CFLAGS@
    131 TCL_LD_FLAGS = @TCL_LD_FLAGS@
    132 TCL_LIBS = @TCL_LIBS@
    133 TCL_SHLIB_LD_LIBS = @TCL_SHLIB_LD_LIBS@
    134 TCL_SRC_DIR = @TCL_SRC_DIR@
    135 TCL_DBGX = @TCL_DBGX@
    136 TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@
    137 TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
    138 TCLSH_PROG = @TCLSH_PROG@
    139 
    140 BLT_SRC_DIR = @BLT_SRC_DIR@
    141 
    142 AUTOCONF = autoconf
    143 
    144 LDFLAGS = $(LDFLAGS_DEFAULT)
    145 
    146 INCLUDES = @TCL_INCLUDES@ -I$(BLT_SRC_DIR)
    147 
    148 EXTRA_CFLAGS = $(TCL_DEFS) $(PROTO_FLAGS) $(SECURITY_FLAGS) $(MEM_DEBUG_FLAGS) $(KEYSYM_FLAGS) $(NO_DEPRECATED_FLAGS)
    149 
    150 DEFS = @DEFS@ $(EXTRA_CFLAGS)
    151 
    152 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    153 mkinstalldirs = $(SHELL) $(top_srcdir)/cf/mkinstalldirs
    154 CONFIG_CLEAN_FILES = pkgIndex.tcl init.tcl
    155 
    156 CPPFLAGS = @CPPFLAGS@
    157 LIBS = @LIBS@
    158 AR = ar
    159 CFLAGS = @CFLAGS@
    160 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
    161 CCLD = $(CC)
    162 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
     36# It is not important to specify the directory, as long as it is the
     37# $(srcdir) or in the generic, win or unix subdirectory.
     38#========================================================================
     39
     40PKG_SOURCES     = @PKG_SOURCES@
     41PKG_OBJECTS     = @PKG_OBJECTS@
     42
     43PKG_STUB_SOURCES = @PKG_STUB_SOURCES@
     44PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@
     45
     46#========================================================================
     47# PKG_TCL_SOURCES identifies Tcl runtime files that are associated with
     48# this package that need to be installed, if any.
     49#========================================================================
     50
     51PKG_TCL_SOURCES = @PKG_TCL_SOURCES@
     52
     53#========================================================================
     54# This is a list of public header files to be installed, if any.
     55#========================================================================
     56
     57PKG_HEADERS     = @PKG_HEADERS@
     58
     59#========================================================================
     60# "PKG_LIB_FILE" refers to the library (dynamic or static as per
     61# configuration options) composed of the named objects.
     62#========================================================================
     63
     64PKG_LIB_FILE    = @PKG_LIB_FILE@
     65PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
     66
     67lib_BINARIES    = $(PKG_LIB_FILE)
     68BINARIES        = $(lib_BINARIES)
     69
     70SHELL           = @SHELL@
     71
     72srcdir          = @srcdir@
     73prefix          = @prefix@
     74exec_prefix     = @exec_prefix@
     75
     76bindir          = @bindir@
     77libdir          = @libdir@
     78datadir         = @datadir@
     79mandir          = @mandir@
     80includedir      = @includedir@
     81
     82DESTDIR         =
     83
     84PKG_DIR         = $(PACKAGE_NAME)$(PACKAGE_VERSION)
     85pkgdatadir      = $(datadir)/$(PKG_DIR)
     86pkglibdir       = $(libdir)/$(PKG_DIR)
     87pkgincludedir   = $(includedir)/$(PKG_DIR)
     88
     89top_builddir    = .
     90
     91INSTALL         = @INSTALL@
     92INSTALL_PROGRAM = @INSTALL_PROGRAM@
     93INSTALL_DATA    = @INSTALL_DATA@
     94INSTALL_SCRIPT  = @INSTALL_SCRIPT@
     95
     96PACKAGE_NAME    = @PACKAGE_NAME@
     97PACKAGE_VERSION = @PACKAGE_VERSION@
     98CC              = @CC@
     99CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
     100CFLAGS_WARNING  = @CFLAGS_WARNING@
     101CLEANFILES      = @CLEANFILES@
     102EXEEXT          = @EXEEXT@
     103LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
     104MAKE_LIB        = @MAKE_LIB@
     105MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
     106MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
     107MAKE_STUB_LIB   = @MAKE_STUB_LIB@
     108OBJEXT          = @OBJEXT@
     109RANLIB          = @RANLIB@
     110RANLIB_STUB     = @RANLIB_STUB@
     111SHLIB_CFLAGS    = @SHLIB_CFLAGS@
     112SHLIB_LD        = @SHLIB_LD@
     113SHLIB_LD_LIBS   = @SHLIB_LD_LIBS@
     114STLIB_LD        = @STLIB_LD@
     115#TCL_DEFS       = @TCL_DEFS@
     116TCL_BIN_DIR     = @TCL_BIN_DIR@
     117TCL_SRC_DIR     = @TCL_SRC_DIR@
     118#TK_BIN_DIR     = @TK_BIN_DIR@
     119#TK_SRC_DIR     = @TK_SRC_DIR@
     120
     121# Not used, but retained for reference of what libs Tcl required
     122#TCL_LIBS       = @TCL_LIBS@
     123
     124#========================================================================
     125# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
     126# package without installing.  The other environment variables allow us
     127# to test against an uninstalled Tcl.  Add special env vars that you
     128# require for testing here (like TCLX_LIBRARY).
     129#========================================================================
     130
     131EXTRA_PATH      = $(top_builddir):$(TCL_BIN_DIR)
     132#EXTRA_PATH     = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
     133TCLLIBPATH      = $(top_builddir)
     134TCLSH_ENV       = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
     135                  @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
     136                  PATH="$(EXTRA_PATH):$(PATH)" \
     137                  TCLLIBPATH="$(TCLLIBPATH)"
     138#                 TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library`
     139
     140TCLSH_PROG      = @TCLSH_PROG@
     141TCLSH   = $(TCLSH_ENV) $(TCLSH_PROG)
     142
     143#WISH_PROG      = @WISH_PROG@
     144#WISH   = $(TCLSH_ENV) $(WISH_PROG)
     145
     146
     147SHARED_BUILD    = @SHARED_BUILD@
     148
     149INCLUDES        = @PKG_INCLUDES@ @TCL_INCLUDES@ -I$(BLT_SRC_DIR)
     150#INCLUDES       = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@
     151
     152PKG_CFLAGS      = @PKG_CFLAGS@
     153
     154# TCL_DEFS is not strictly need here, but if you remove it, then you
     155# must make sure that configure.in checks for the necessary components
     156# that your library may use.  TCL_DEFS can actually be a problem if
     157# you do not compile with a similar machine setup as the Tcl core was
     158# compiled with.
     159#DEFS           = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS)
     160DEFS            = @DEFS@ $(PKG_CFLAGS)
     161
     162CONFIG_CLEAN_FILES = Makefile
     163
     164CPPFLAGS        = @CPPFLAGS@
     165LIBS            = @PKG_LIBS@ @LIBS@
     166AR              = @AR@
     167CFLAGS          = @CFLAGS@
     168COMPILE         = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
    163169
    164170#========================================================================
     
    188194        cd filexfer; make all
    189195
     196#========================================================================
     197# Your doc target should differentiate from doc builds (by the developer)
     198# and doc installs (see install-doc), which just install the docs on the
     199# end user machine when building from source.
     200#========================================================================
     201
    190202doc:
    191 
    192 install: all install-binaries install-libraries
     203#       @echo "If you have documentation to create, place the commands to"
     204#       @echo "build the docs in the 'doc:' target.  For example:"
     205#       @echo "        xml2nroff sample.xml > sample.n"
     206#       @echo "        xml2html sample.xml > sample.html"
     207
     208install: all install-binaries install-libraries install-doc
    193209
    194210install-binaries: binaries install-lib-binaries install-bin-binaries
     
    196212#========================================================================
    197213# This rule installs platform-independent files, such as header files.
     214# The list=...; for p in $$list handles the empty list case x-platform.
    198215#========================================================================
    199216
    200217install-libraries: libraries
    201         $(mkinstalldirs) $(includedir)
    202         echo "Installing header files in $(includedir)"
    203         @for i in $(GENERIC_HDRS) ; do \
    204             echo "Installing $$i" ; \
    205             $(INSTALL_DATA) $$i $(includedir) ; \
     218        @mkdir -p $(DESTDIR)$(includedir)
     219        @echo "Installing header files in $(DESTDIR)$(includedir)"
     220        @list='$(PKG_HEADERS)'; for i in $$list; do \
     221            echo "Installing $(srcdir)/$$i" ; \
     222            $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \
    206223        done;
    207224
     
    212229
    213230install-doc: doc
    214         $(mkinstalldirs) $(mandir)/man1
    215         $(mkinstalldirs) $(mandir)/man3
    216         $(mkinstalldirs) $(mandir)/mann
    217         @for i in $(srcdir)/*.n; \
    218             do \
    219             echo "Installing $$i"; \
    220             rm -f $(mandir)/mann/$$i; \
    221             $(INSTALL_DATA) $$i $(mandir)/mann/$$i ; \
    222             chmod 444 $(mandir)/mann/$$i; \
    223             done
    224 
    225 test:
     231#       @mkdir -p $(DESTDIR)$(mandir)/mann
     232#       @echo "Installing documentation in $(DESTDIR)$(mandir)"
     233#       @list='$(srcdir)/doc/*.n'; for i in $$list; do \
     234#           echo "Installing $$i"; \
     235#           rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \
     236#           $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \
     237#       done
     238
     239test: binaries libraries
     240        $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
     241
     242shell: binaries libraries
     243        @$(TCLSH) $(SCRIPT)
     244
     245gdb:
     246        $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
    226247
    227248depend:
    228249
    229250#========================================================================
    230 # Enumerate the names of the object files included in this package.
    231 # These objects are created and linked into the final library.  In
    232 # most cases these object files will correspond to the source files
    233 # above.
    234 #
    235 # $(RapptureGUI_LIB_FILE) should be listed as part of the BINARIES variable
    236 # at the top of the Makefile.  That will ensure that this target is built
    237 # when you run "make binaries".
    238 #
    239 # You shouldn't need to modify this target, except to change the package
    240 # name from "Rappture" to your package's name.
    241 #========================================================================
    242 
    243 $(RapptureGUI_LIB_FILE): $(RapptureGUI_OBJECTS)
    244         -rm -f $(RapptureGUI_LIB_FILE)
    245         @MAKE_LIB@
    246         $(RANLIB) $(RapptureGUI_LIB_FILE)
     251# $(PKG_LIB_FILE) should be listed as part of the BINARIES variable
     252# mentioned above.  That will ensure that this target is built when you
     253# run "make binaries".
     254#
     255# The $(PKG_OBJECTS) objects are created and linked into the final
     256# library.  In most cases these object files will correspond to the
     257# source files above.
     258#========================================================================
     259
     260$(PKG_LIB_FILE): $(PKG_OBJECTS)
     261        -rm -f $(PKG_LIB_FILE)
     262        ${MAKE_LIB}
     263        $(RANLIB) $(PKG_LIB_FILE)
     264
     265$(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS)
     266        -rm -f $(PKG_STUB_LIB_FILE)
     267        ${MAKE_STUB_LIB}
     268        $(RANLIB_STUB) $(PKG_STUB_LIB_FILE)
    247269
    248270#========================================================================
    249271# We need to enumerate the list of .c to .o lines here.
    250 # Unfortunately, there does not seem to be any other way to do this
    251 # in a Makefile-independent way.  We can't use VPATH because it picks up
    252 # object files that may be located in the source directory.
    253272#
    254273# In the following lines, $(srcdir) refers to the toplevel directory
     
    256275# you will have to modify the paths to reflect this:
    257276#
    258 # exampleA.$(OBJEXT): $(srcdir)/src/win/exampleA.c
    259 #       $(COMPILE) -c `@CYGPATH@ $(srcdir)/src/win/exampleA.c` -o $@
    260 #========================================================================
    261 
    262 RpInit.$(OBJEXT): $(srcdir)/src/RpInit.c
    263         $(COMPILE) -c `@CYGPATH@ $(srcdir)/src/RpInit.c` -o $@
    264 
    265 RpRlimit.$(OBJEXT): $(srcdir)/src/RpRlimit.c
    266         $(COMPILE) -c `@CYGPATH@ $(srcdir)/src/RpRlimit.c` -o $@
    267 
    268 RpRusage.$(OBJEXT): $(srcdir)/src/RpRusage.c
    269         $(COMPILE) -c `@CYGPATH@ $(srcdir)/src/RpRusage.c` -o $@
    270 
    271 RpSignal.$(OBJEXT): $(srcdir)/src/RpSignal.c
    272         $(COMPILE) -c `@CYGPATH@ $(srcdir)/src/RpSignal.c` -o $@
    273 
     277# sample.$(OBJEXT): $(srcdir)/generic/sample.c
     278#       $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@
     279#
     280# Setting the VPATH variable to a list of paths will cause the makefile
     281# to look into these paths when resolving .c to .obj dependencies.
     282# As necessary, add $(srcdir):$(srcdir)/compat:....
     283#========================================================================
     284
     285VPATH = $(srcdir):$(srcdir)/src:$(srcdir)/unix:$(srcdir)/win
     286
     287.c.@OBJEXT@:
     288        $(COMPILE) -c `@CYGPATH@ $<` -o $@
     289
     290#========================================================================
     291# Distribution creation
     292# You may need to tweak this target to make it work correctly.
     293#========================================================================
     294
     295#COMPRESS       = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
     296COMPRESS        = gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
     297DIST_ROOT       = /tmp/dist
     298DIST_DIR        = $(DIST_ROOT)/$(PKG_DIR)
     299
     300dist-clean:
     301        rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
     302
     303dist: dist-clean
     304        mkdir -p $(DIST_DIR)
     305        cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/license* \
     306                $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
     307                $(DIST_DIR)/
     308        chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
     309        chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
     310
     311        for i in $(srcdir)/*.[ch]; do \
     312            if [ -f $$i ]; then \
     313                cp -p $$i $(DIST_DIR)/ ; \
     314            fi; \
     315        done;
     316
     317        mkdir $(DIST_DIR)/tclconfig
     318        cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
     319                $(DIST_DIR)/tclconfig/
     320        chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
     321        chmod +x $(DIST_DIR)/tclconfig/install-sh
     322
     323        list='demos doc generic library mac tests unix win'; \
     324        for p in $$list; do \
     325            if test -d $(srcdir)/$$p ; then \
     326                mkdir $(DIST_DIR)/$$p; \
     327                cp -p $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \
     328            fi; \
     329        done
     330
     331        (cd $(DIST_ROOT); $(COMPRESS);)
    274332
    275333#========================================================================
     
    282340#========================================================================
    283341
    284 clean: 
    285         cd filexfer; make clean
     342clean:
     343        cd filexfer; make clean 
    286344        -test -z "$(BINARIES)" || rm -f $(BINARIES)
    287         -rm -f *.o core *.core
    288         -rm -f *.$(OBJEXT)
     345        -rm -f *.$(OBJEXT) core *.core
    289346        -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
    290347
    291348distclean: clean
    292349        -rm -f *.tab.c
    293         -rm -f Makefile $(CONFIG_CLEAN_FILES)
    294         -rm -f config.cache config.log stamp-h stamp-h[0-9]*
    295         -rm -f config.status
    296         -rm -rf autom4te.cache
     350        -rm -f $(CONFIG_CLEAN_FILES)
     351        -rm -f config.cache config.log config.status
    297352
    298353#========================================================================
     
    300355# .lib files.  Because the .lib files are not explicitly listed anywhere,
    301356# we need to deduce their existence from the .dll file of the same name.
    302 # Additionally, the .dll files go into the bin directory, but the .lib
    303 # files go into the lib directory.  On Unix platforms, all library files
    304 # go into the lib directory.  In addition, this will generate the pkgIndex.tcl
    305 # file in the install location (assuming it can find a usable tclsh8.2 shell)
     357# Library files go into the lib directory.
     358# In addition, this will generate the pkgIndex.tcl
     359# file in the install location (assuming it can find a usable tclsh shell)
    306360#
    307361# You should not have to modify this target.
    308362#========================================================================
    309363
    310 install-lib-binaries: installdirs
     364install-lib-binaries: binaries
     365        @mkdir -p $(DESTDIR)$(pkglibdir)
    311366        @list='$(lib_BINARIES)'; for p in $$list; do \
    312367          if test -f $$p; then \
     368            echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
     369            $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
     370            stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \
     371            if test "x$$stub" = "xstub"; then \
     372                echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \
     373                $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \
     374            else \
     375                echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
     376                $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
     377            fi; \
    313378            ext=`echo $$p|sed -e "s/.*\.//"`; \
    314379            if test "x$$ext" = "xdll"; then \
    315                 echo " $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p"; \
    316                 $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p; \
    317380                lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
    318381                if test -f $$lib; then \
    319                     echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib"; \
    320                     $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib; \
     382                    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
     383                    $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
    321384                fi; \
    322             else \
    323                 echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
    324                 $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
    325385            fi; \
    326           else :; fi; \
    327         done
    328         @list='$(lib_BINARIES)'; for p in $$list; do \
    329           if test -f $$p; then \
    330             echo " $(RANLIB) $(DESTDIR)$(bindir)/$$p"; \
    331             $(RANLIB) $(DESTDIR)$(bindir)/$$p; \
    332           else :; fi; \
    333         done
    334         $(mkinstalldirs) $(pkglibdir)/scripts
    335         @for i in $(srcdir)/scripts/*.tcl; do \
    336             echo "Installing $$i" ; \
    337             $(INSTALL_DATA) $$i $(DESTDIR)$(pkglibdir)/scripts ; \
    338         done;
    339         $(TCLSH_PROG) $(srcdir)/cf/mkindex.tcl $(DESTDIR)$(pkglibdir)/scripts
    340         $(mkinstalldirs) $(pkglibdir)/scripts/images
     386          fi; \
     387        done
     388        @mkdir -p $(DESTDIR)$(pkglibdir)/scripts
     389        @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
     390          if test -f $(srcdir)/$$p; then \
     391            destp=`basename $$p`; \
     392            echo " Install $$destp $(DESTDIR)$(pkglibdir)/scripts/$$destp"; \
     393            $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/scripts/$$destp; \
     394          fi; \
     395        done
     396        $(TCLSH_PROG) $(srcdir)/tclconfig/mkindex.tcl $(DESTDIR)$(pkglibdir)/scripts
     397        @mkdir -p $(DESTDIR)$(pkglibdir)/scripts/images
    341398        @for i in $(srcdir)/scripts/images/*.gif \
    342399                $(srcdir)/scripts/images/*.xbm; do \
    343             echo "Installing $$i" ; \
    344             $(INSTALL_DATA) $$i $(DESTDIR)$(pkglibdir)/scripts/images ; \
    345         done;
    346         $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir)/pkgIndex.tcl
     400                destp=`basename $$i`;\
     401                echo " Install $$destp $(DESTDIR)$(pkglibdir)/scripts/images/$$destp" ;\
     402                $(INSTALL_DATA) $$i $(DESTDIR)$(pkglibdir)/scripts/images ; \
     403                done;
    347404        $(INSTALL_DATA) init.tcl $(DESTDIR)$(pkglibdir)/init.tcl
    348         $(mkinstalldirs) $(pkglibdir)/filexfer
     405        @mkdir -p $(DESTDIR)$(pkglibdir)/filexfer;
    349406        @for i in $(srcdir)/filexfer/filexfer.jar \
    350               $(srcdir)/filexfer/*.class \
    351               $(srcdir)/filexfer/upload.html; do \
    352             echo "Installing $$i" ; \
    353             $(INSTALL_DATA) $$i $(DESTDIR)$(pkglibdir)/filexfer ; \
    354         done;
    355 
    356 #========================================================================
    357 # Install binary executables (e.g. .exe files)
    358 #
    359 # You should not have to modify this target.
    360 #========================================================================
    361 
    362 install-bin-binaries: installdirs
     407                $(srcdir)/filexfer/*.class \
     408                $(srcdir)/filexfer/upload.html; do \
     409                destp=`basename $$i`;\
     410                echo " Install $$destp $(DESTDIR)$(pkglibdir)/filexfer" ;\
     411                $(INSTALL_DATA) $$i $(DESTDIR)$(pkglibdir)/filexfer ; \
     412                done;
     413
     414        @if test "x$(SHARED_BUILD)" = "x1"; then \
     415            echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \
     416            $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
     417        fi
     418
     419#========================================================================
     420# Install binary executables (e.g. .exe files and dependent .dll files)
     421# This is for files that must go in the bin directory (located next to
     422# wish and tclsh), like dependent .dll files on Windows.
     423#
     424# You should not have to modify this target, except to define bin_BINARIES
     425# above if necessary.
     426#========================================================================
     427
     428install-bin-binaries: binaries
     429        @mkdir -p $(DESTDIR)$(bindir)
    363430        @list='$(bin_BINARIES)'; for p in $$list; do \
    364431          if test -f $$p; then \
    365             echo " $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p"; \
    366             $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p; \
    367           else :; fi; \
    368         done
    369 
    370 .SUFFIXES: .c .o .obj
     432            echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
     433            $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
     434          fi; \
     435        done
     436
     437.SUFFIXES: .c .$(OBJEXT)
    371438
    372439Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
     
    374441          && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
    375442
    376 config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
    377         $(SHELL) ./config.status --recheck
    378 $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
    379         cd $(srcdir) && $(AUTOCONF)
    380 
    381 
    382443uninstall-binaries:
    383         @$(NORMAL_UNINSTALL)
    384         list='$(BINARIES)'; for p in $$list; do \
    385           rm -f $(DESTDIR)$(libdir)/$$p; \
    386         done
    387 
    388 installdirs:
    389         $(mkinstalldirs)  $(DESTDIR)$(libdir)
    390         $(mkinstalldirs)  $(DESTDIR)$(bindir)
    391         $(mkinstalldirs)  $(DESTDIR)$(pkglibdir)
    392 
    393 .PHONY: all binaries clean depend distclean doc install installdirs \
    394 libraries test
     444        list='$(lib_BINARIES)'; for p in $$list; do \
     445          rm -f $(DESTDIR)$(pkglibdir)/$$p; \
     446        done
     447        list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
     448          p=`basename $$p`; \
     449          rm -f $(DESTDIR)$(pkglibdir)/$$p; \
     450        done
     451        list='$(bin_BINARIES)'; for p in $$list; do \
     452          rm -f $(DESTDIR)$(bindir)/$$p; \
     453        done
     454
     455.PHONY: all binaries clean depend distclean doc install libraries test
    395456
    396457# Tell versions [3.59,3.63) of GNU make to not export all variables.
  • trunk/gui/aclocal.m4

    r158 r503  
    1 builtin(include,tcl.m4)
     1builtin(include,tclconfig/tcl.m4)
  • trunk/gui/configure

    r408 r503  
    11#! /bin/sh
    22# Guess values for system-dependent variables and create Makefiles.
    3 # Generated by GNU Autoconf 2.59.
     3# Generated by GNU Autoconf 2.59 for RapptureGUI 1.0.
    44#
    55# Copyright (C) 2003 Free Software Foundation, Inc.
     
    266266
    267267# Identity of this package.
    268 PACKAGE_NAME=
    269 PACKAGE_TARNAME=
    270 PACKAGE_VERSION=
    271 PACKAGE_STRING=
    272 PACKAGE_BUGREPORT=
    273 
    274 ac_unique_file="src/RpInit.c"
    275 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB build build_cpu build_vendor build_os host host_cpu host_vendor host_os CYGPATH TCL_INCLUDES TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIBS TCL_DEFS TCL_SHLIB_LD_LIBS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_STUB_LIB_FILE TCL_LIB_SPEC TCL_BUILD_LIB_SPEC TCL_STUB_LIB_SPEC TCL_BUILD_STUB_LIB_SPEC TK_BIN_DIR TK_SRC_DIR TK_LIB_FILE BLT_SRC_DIR CLEANFILES CFLAGS_DEBUG CFLAGS_OPTIMIZE STLIB_LD SHLIB_LD SHLIB_CFLAGS SHLIB_LDFLAGS TCL_DBGX CFLAGS_DEFAULT LDFLAGS_DEFAULT MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB RapptureGUI_LIB_FILE SHLIB_LD_LIBS TCLSH_PROG PACKAGE VERSION PATCHLEVEL EXACT_VERSION NODOT_VERSION LIBOBJS LTLIBOBJS'
     268PACKAGE_NAME='RapptureGUI'
     269PACKAGE_TARNAME='rappturegui'
     270PACKAGE_VERSION='1.0'
     271PACKAGE_STRING='RapptureGUI 1.0'
     272PACKAGE_BUGREPORT=''
     273
     274# Factoring default headers for most tests.
     275ac_includes_default="\
     276#include <stdio.h>
     277#if HAVE_SYS_TYPES_H
     278# include <sys/types.h>
     279#endif
     280#if HAVE_SYS_STAT_H
     281# include <sys/stat.h>
     282#endif
     283#if STDC_HEADERS
     284# include <stdlib.h>
     285# include <stddef.h>
     286#else
     287# if HAVE_STDLIB_H
     288#  include <stdlib.h>
     289# endif
     290#endif
     291#if HAVE_STRING_H
     292# if !STDC_HEADERS && HAVE_MEMORY_H
     293#  include <memory.h>
     294# endif
     295# include <string.h>
     296#endif
     297#if HAVE_STRINGS_H
     298# include <strings.h>
     299#endif
     300#if HAVE_INTTYPES_H
     301# include <inttypes.h>
     302#else
     303# if HAVE_STDINT_H
     304#  include <stdint.h>
     305# endif
     306#endif
     307#if HAVE_UNISTD_H
     308# include <unistd.h>
     309#endif"
     310
     311ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CYGPATH EXEEXT PKG_LIB_FILE PKG_STUB_LIB_FILE PKG_STUB_SOURCES PKG_STUB_OBJECTS PKG_TCL_SOURCES PKG_HEADERS PKG_INCLUDES PKG_LIBS PKG_CFLAGS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS PKG_SOURCES PKG_OBJECTS CLEANFILES TCL_INCLUDES TCL_THREADS SHARED_BUILD AR CELIB_DIR LIBOBJS DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS LD_LIBRARY_PATH_VAR TCL_DBGX CFLAGS_DEFAULT LDFLAGS_DEFAULT MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB TCLSH_PROG BLT_SRC_DIR RAPPTURE_DIR PACKAGE VERSION PATCHLEVEL EXACT_VERSION NODOT_VERSION LTLIBOBJS'
    276312ac_subst_files=''
    277313
     
    730766ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
    731767ac_cv_env_CPPFLAGS_value=$CPPFLAGS
     768ac_env_CPP_set=${CPP+set}
     769ac_env_CPP_value=$CPP
     770ac_cv_env_CPP_set=${CPP+set}
     771ac_cv_env_CPP_value=$CPP
    732772
    733773#
     
    738778  # This message is too long to be a string in the A/UX 3.1 sh.
    739779  cat <<_ACEOF
    740 \`configure' configures this package to adapt to many kinds of systems.
     780\`configure' configures RapptureGUI 1.0 to adapt to many kinds of systems.
    741781
    742782Usage: $0 [OPTION]... [VAR=VALUE]...
     
    790830
    791831  cat <<\_ACEOF
    792 
    793 System types:
    794   --build=BUILD     configure for building on BUILD [guessed]
    795   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
    796832_ACEOF
    797833fi
    798834
    799835if test -n "$ac_init_help"; then
    800 
     836  case $ac_init_help in
     837     short | recursive ) echo "Configuration of RapptureGUI 1.0:";;
     838   esac
    801839  cat <<\_ACEOF
    802840
     
    804842  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
    805843  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
    806   --enable-gcc            allow use of gcc if available --disable-gcc
    807844  --enable-threads        build with threads
    808   --enable-shared         build and link with shared libraries --enable-shared
    809   --enable-symbols        build with debugging symbols --disable-symbols
     845  --enable-shared         build and link with shared libraries (default: on)
     846  --enable-64bit          enable 64bit support (default: off)
     847  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
     848  --enable-wince          enable Win/CE support (where applicable)
     849  --disable-load          disallow dynamic loading and "load" command
     850                          (default: enabled)
     851  --enable-symbols        build with debugging symbols (default: off)
    810852
    811853Optional Packages:
     
    813855  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
    814856  --with-blt=DIR          Find bltInt.h in DIR
    815  --with-tclinclude      directory containing the public Tcl header files.
    816   --with-tcl              directory containing tcl configuration (tclConfig.sh)
    817   --with-tk               directory containing tk configuration (tkConfig.sh)
     857  --with-rappture=DIR          Find include/core/rappture.h in DIR
     858  --with-tcl              directory containing tcl configuration
     859                          (tclConfig.sh)
     860  --with-tclinclude       directory containing the public Tcl header files
     861  --with-celib=DIR        use Windows/CE support library from DIR
    818862
    819863Some influential environment variables:
     
    824868  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
    825869              headers in a nonstandard directory <include dir>
     870  CPP         C preprocessor
    826871
    827872Use these variables to override the choices made by `configure' or to help
     
    916961      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
    917962    fi
    918     cd "$ac_popdir"
     963    cd $ac_popdir
    919964  done
    920965fi
     
    923968if $ac_init_version; then
    924969  cat <<\_ACEOF
     970RapptureGUI configure 1.0
     971generated by GNU Autoconf 2.59
    925972
    926973Copyright (C) 2003 Free Software Foundation, Inc.
     
    935982running configure, to aid debugging if configure makes a mistake.
    936983
    937 It was created by $as_me, which was
     984It was created by RapptureGUI $as_me 1.0, which was
    938985generated by GNU Autoconf 2.59.  Invocation command line was
    939986
     
    12631310
    12641311
     1312
     1313
     1314
     1315
     1316
     1317
     1318
     1319
     1320
     1321PACKAGE=RapptureGUI
     1322
     1323MAJOR_VERSION=1
     1324MINOR_VERSION=0
     1325VERSION=${MAJOR_VERSION}.${MINOR_VERSION}
     1326
     1327#--------------------------------------------------------------------
     1328# Call TEA_INIT as the first TEA_ macro to set up initial vars.
     1329# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
     1330# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
     1331#--------------------------------------------------------------------
     1332
     1333
     1334    # TEA extensions pass this us the version of TEA they think they
     1335    # are compatible with.
     1336    TEA_VERSION="3.5"
     1337
     1338    echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
     1339echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6
     1340    if test x"${PACKAGE_NAME}" = x ; then
     1341        { { echo "$as_me:$LINENO: error:
     1342The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
     1343echo "$as_me: error:
     1344The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
     1345   { (exit 1); exit 1; }; }
     1346    fi
     1347    if test x"3.5" = x ; then
     1348        { { echo "$as_me:$LINENO: error:
     1349TEA version not specified." >&5
     1350echo "$as_me: error:
     1351TEA version not specified." >&2;}
     1352   { (exit 1); exit 1; }; }
     1353    elif test "3.5" != "${TEA_VERSION}" ; then
     1354        echo "$as_me:$LINENO: result: warning: requested TEA version \"3.5\", have \"${TEA_VERSION}\"" >&5
     1355echo "${ECHO_T}warning: requested TEA version \"3.5\", have \"${TEA_VERSION}\"" >&6
     1356    else
     1357        echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
     1358echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6
     1359    fi
     1360    case "`uname -s`" in
     1361        *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*|*MSYS_NT*)
     1362            # Extract the first word of "cygpath", so it can be a program name with args.
     1363set dummy cygpath; ac_word=$2
     1364echo "$as_me:$LINENO: checking for $ac_word" >&5
     1365echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     1366if test "${ac_cv_prog_CYGPATH+set}" = set; then
     1367  echo $ECHO_N "(cached) $ECHO_C" >&6
     1368else
     1369  if test -n "$CYGPATH"; then
     1370  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
     1371else
     1372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     1373for as_dir in $PATH
     1374do
     1375  IFS=$as_save_IFS
     1376  test -z "$as_dir" && as_dir=.
     1377  for ac_exec_ext in '' $ac_executable_extensions; do
     1378  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     1379    ac_cv_prog_CYGPATH="cygpath -w"
     1380    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     1381    break 2
     1382  fi
     1383done
     1384done
     1385
     1386  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
     1387fi
     1388fi
     1389CYGPATH=$ac_cv_prog_CYGPATH
     1390if test -n "$CYGPATH"; then
     1391  echo "$as_me:$LINENO: result: $CYGPATH" >&5
     1392echo "${ECHO_T}$CYGPATH" >&6
     1393else
     1394  echo "$as_me:$LINENO: result: no" >&5
     1395echo "${ECHO_T}no" >&6
     1396fi
     1397
     1398            EXEEXT=".exe"
     1399            TEA_PLATFORM="windows"
     1400            ;;
     1401        *)
     1402            CYGPATH=echo
     1403            EXEEXT=""
     1404            TEA_PLATFORM="unix"
     1405            ;;
     1406    esac
     1407
     1408    # Check if exec_prefix is set. If not use fall back to prefix.
     1409    # Note when adjusted, so that TEA_PREFIX can correct for this.
     1410    # This is needed for recursive configures, since autoconf propagates
     1411    # $prefix, but not $exec_prefix (doh!).
     1412    if test x$exec_prefix = xNONE ; then
     1413        exec_prefix_default=yes
     1414        exec_prefix=$prefix
     1415    fi
     1416
     1417
     1418
     1419
     1420    # This package name must be replaced statically for AC_SUBST to work
     1421
     1422    # Substitute STUB_LIB_FILE in case package creates a stub library too.
     1423
     1424
     1425    # We AC_SUBST these here to ensure they are subst'ed,
     1426    # in case the user doesn't call TEA_ADD_...
     1427
     1428
     1429
     1430
     1431
     1432
     1433
     1434
     1435
    12651436ac_aux_dir=
    1266 for ac_dir in cf $srcdir/cf; do
     1437for ac_dir in tclconfig $srcdir/tclconfig; do
    12671438  if test -f $ac_dir/install-sh; then
    12681439    ac_aux_dir=$ac_dir
     
    12801451done
    12811452if test -z "$ac_aux_dir"; then
    1282   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in cf $srcdir/cf" >&5
    1283 echo "$as_me: error: cannot find install-sh or install.sh in cf $srcdir/cf" >&2;}
     1453  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in tclconfig $srcdir/tclconfig" >&5
     1454echo "$as_me: error: cannot find install-sh or install.sh in tclconfig $srcdir/tclconfig" >&2;}
    12841455   { (exit 1); exit 1; }; }
    12851456fi
     
    12881459ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
    12891460
    1290 
    1291 #--------------------------------------------------------------------
    1292 # __CHANGE__
    1293 # Set your package name and version numbers here.  The NODOT_VERSION is
    1294 # required for constructing the library name on systems that don't like
    1295 # dots in library names (Windows).  The VERSION variable is used on the
    1296 # other systems.
    1297 #--------------------------------------------------------------------
    1298 
    1299 PACKAGE=RapptureGUI
    1300 
    1301 MAJOR_VERSION=1
    1302 MINOR_VERSION=0
    1303 VERSION=${MAJOR_VERSION}.${MINOR_VERSION}
    13041461
    13051462#--------------------------------------------------------------------
     
    13131470fi;
    13141471
     1472
     1473# Check whether --with-rappture or --without-rappture was given.
     1474if test "${with_rappture+set}" = set; then
     1475  withval="$with_rappture"
     1476  rappture_dir=$withval
     1477fi;
     1478
    13151479#--------------------------------------------------------------------
    1316 # We put this here so that you can compile with -DVERSION="1.2" to
    1317 # encode the package version directly into the source files.
     1480# Load the tclConfig.sh file
    13181481#--------------------------------------------------------------------
    13191482
    1320 eval cat >>confdefs.h <<_ACEOF
    1321 #define VERSION "${VERSION}"
    1322 _ACEOF
    1323 
    1324 
    1325 #--------------------------------------------------------------------
    1326 # Check whether --enable-gcc or --disable-gcc was given.  Do this
    1327 # before AC_CYGWIN is called so the compiler can
    1328 # be fully tested by built-in autoconf tools.
    1329 # This macro also calls AC_PROG_CC to set the compiler if --enable-gcc
    1330 # was not used.
    1331 #--------------------------------------------------------------------
    1332 
    1333 
    1334     # Check whether --enable-gcc or --disable-gcc was given.
    1335 if test "${enable_gcc+set}" = set; then
    1336   enableval="$enable_gcc"
    1337   ok=$enableval
    1338 else
    1339   ok=no
     1483
     1484
     1485    #
     1486    # Ok, lets find the tcl configuration
     1487    # First, look for one uninstalled.
     1488    # the alternative search directory is invoked by --with-tcl
     1489    #
     1490
     1491    if test x"${no_tcl}" = x ; then
     1492        # we reset no_tcl in case something fails here
     1493        no_tcl=true
     1494
     1495# Check whether --with-tcl or --without-tcl was given.
     1496if test "${with_tcl+set}" = set; then
     1497  withval="$with_tcl"
     1498  with_tclconfig=${withval}
    13401499fi;
    1341     if test "$ok" = "yes"; then
    1342         CC=gcc
     1500        echo "$as_me:$LINENO: checking for Tcl configuration" >&5
     1501echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
     1502        if test "${ac_cv_c_tclconfig+set}" = set; then
     1503  echo $ECHO_N "(cached) $ECHO_C" >&6
     1504else
     1505
     1506
     1507            # First check to see if --with-tcl was specified.
     1508            if test x"${with_tclconfig}" != x ; then
     1509                case ${with_tclconfig} in
     1510                    */tclConfig.sh )
     1511                        if test -f ${with_tclconfig}; then
     1512                            { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
     1513echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
     1514                            with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'`
     1515                        fi ;;
     1516                esac
     1517                if test -f "${with_tclconfig}/tclConfig.sh" ; then
     1518                    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
     1519                else
     1520                    { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
     1521echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
     1522   { (exit 1); exit 1; }; }
     1523                fi
     1524            fi
     1525
     1526            # then check for a private Tcl installation
     1527            if test x"${ac_cv_c_tclconfig}" = x ; then
     1528                for i in \
     1529                        ../tcl \
     1530                        `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
     1531                        `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
     1532                        `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
     1533                        ../../tcl \
     1534                        `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
     1535                        `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
     1536                        `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
     1537                        ../../../tcl \
     1538                        `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
     1539                        `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
     1540                        `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
     1541                    if test -f "$i/unix/tclConfig.sh" ; then
     1542                        ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
     1543                        break
     1544                    fi
     1545                done
     1546            fi
     1547
     1548            # on Darwin, check in Framework installation locations
     1549            if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
     1550                for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
     1551                        `ls -d /Library/Frameworks 2>/dev/null` \
     1552                        `ls -d /Network/Library/Frameworks 2>/dev/null` \
     1553                        `ls -d /System/Library/Frameworks 2>/dev/null` \
     1554                        ; do
     1555                    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
     1556                        ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
     1557                        break
     1558                    fi
     1559                done
     1560            fi
     1561
     1562            # on Windows, check in common installation locations
     1563            if test "${TEA_PLATFORM}" = "windows" \
     1564                -a x"${ac_cv_c_tclconfig}" = x ; then
     1565                for i in `ls -d C:/Tcl/lib 2>/dev/null` \
     1566                        `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
     1567                        ; do
     1568                    if test -f "$i/tclConfig.sh" ; then
     1569                        ac_cv_c_tclconfig=`(cd $i; pwd)`
     1570                        break
     1571                    fi
     1572                done
     1573            fi
     1574
     1575            # check in a few common install locations
     1576            if test x"${ac_cv_c_tclconfig}" = x ; then
     1577                for i in `ls -d ${libdir} 2>/dev/null` \
     1578                        `ls -d ${exec_prefix}/lib 2>/dev/null` \
     1579                        `ls -d ${prefix}/lib 2>/dev/null` \
     1580                        `ls -d /usr/local/lib 2>/dev/null` \
     1581                        `ls -d /usr/contrib/lib 2>/dev/null` \
     1582                        `ls -d /usr/lib 2>/dev/null` \
     1583                        ; do
     1584                    if test -f "$i/tclConfig.sh" ; then
     1585                        ac_cv_c_tclconfig=`(cd $i; pwd)`
     1586                        break
     1587                    fi
     1588                done
     1589            fi
     1590
     1591            # check in a few other private locations
     1592            if test x"${ac_cv_c_tclconfig}" = x ; then
     1593                for i in \
     1594                        ${srcdir}/../tcl \
     1595                        `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
     1596                        `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
     1597                        `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
     1598                    if test -f "$i/unix/tclConfig.sh" ; then
     1599                    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
     1600                    break
     1601                fi
     1602                done
     1603            fi
     1604
     1605fi
     1606
     1607
     1608        if test x"${ac_cv_c_tclconfig}" = x ; then
     1609            TCL_BIN_DIR="# no Tcl configs found"
     1610            { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5
     1611echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
     1612            exit 0
     1613        else
     1614            no_tcl=
     1615            TCL_BIN_DIR=${ac_cv_c_tclconfig}
     1616            echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
     1617echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6
     1618        fi
     1619    fi
     1620
     1621
     1622    echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
     1623echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6
     1624
     1625    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
     1626        echo "$as_me:$LINENO: result: loading" >&5
     1627echo "${ECHO_T}loading" >&6
     1628        . ${TCL_BIN_DIR}/tclConfig.sh
    13431629    else
    1344         case "`uname -s`" in
    1345             *win32* | *WIN32* | *CYGWIN_NT*)
    1346                 CC=cl
    1347             ;;
    1348             *)
    1349                 CC=${CC-cc}
    1350             ;;
     1630        echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
     1631echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
     1632    fi
     1633
     1634    # eval is required to do the TCL_DBGX substitution
     1635    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
     1636    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
     1637
     1638    # If the TCL_BIN_DIR is the build directory (not the install directory),
     1639    # then set the common variable name to the value of the build variables.
     1640    # For example, the variable TCL_LIB_SPEC will be set to the value
     1641    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
     1642    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
     1643    # installed and uninstalled version of Tcl.
     1644    if test -f ${TCL_BIN_DIR}/Makefile ; then
     1645        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
     1646        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
     1647        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
     1648    elif test "`uname -s`" = "Darwin"; then
     1649        # If Tcl was built as a framework, attempt to use the libraries
     1650        # from the framework at the given location so that linking works
     1651        # against Tcl.framework installed in an arbitary location.
     1652        case ${TCL_DEFS} in
     1653            *TCL_FRAMEWORK*)
     1654                if test -f ${TCL_BIN_DIR}/${TCL_LIB_FILE}; then
     1655                    for i in "`cd ${TCL_BIN_DIR}; pwd`" \
     1656                             "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
     1657                        if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
     1658                            TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
     1659                            break
     1660                        fi
     1661                    done
     1662                fi
     1663                if test -f ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}; then
     1664                    TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
     1665                    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
     1666                fi
     1667                ;;
    13511668        esac
    13521669    fi
     1670
     1671    # eval is required to do the TCL_DBGX substitution
     1672    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
     1673    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
     1674    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
     1675    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
     1676
     1677
     1678
     1679
     1680
     1681
     1682
     1683
     1684
     1685
     1686
     1687
     1688
     1689
     1690
     1691
     1692
     1693
     1694
     1695
     1696#--------------------------------------------------------------------
     1697# Load the tkConfig.sh file if necessary (Tk extension)
     1698#--------------------------------------------------------------------
     1699
     1700#TEA_PATH_TKCONFIG
     1701#TEA_LOAD_TKCONFIG
     1702
     1703#-----------------------------------------------------------------------
     1704# Handle the --prefix=... option by defaulting to what Tcl gave.
     1705# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
     1706#-----------------------------------------------------------------------
     1707
     1708
     1709    if test "${prefix}" = "NONE"; then
     1710        prefix_default=yes
     1711        if test x"${TCL_PREFIX}" != x; then
     1712            { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
     1713echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
     1714            prefix=${TCL_PREFIX}
     1715        else
     1716            { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
     1717echo "$as_me: --prefix defaulting to /usr/local" >&6;}
     1718            prefix=/usr/local
     1719        fi
     1720    fi
     1721    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
     1722        -o x"${exec_prefix_default}" = x"yes" ; then
     1723        if test x"${TCL_EXEC_PREFIX}" != x; then
     1724            { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
     1725echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
     1726            exec_prefix=${TCL_EXEC_PREFIX}
     1727        else
     1728            { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
     1729echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
     1730            exec_prefix=$prefix
     1731        fi
     1732    fi
     1733
     1734
     1735#-----------------------------------------------------------------------
     1736# Standard compiler checks.
     1737# This sets up CC by using the CC env var, or looks for gcc otherwise.
     1738# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
     1739# the basic setup necessary to compile executables.
     1740#-----------------------------------------------------------------------
     1741
     1742
     1743    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
     1744    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
     1745
     1746    # If the user did not set CFLAGS, set it now to keep
     1747    # the AC_PROG_CC macro from adding "-g -O2".
     1748    if test "${CFLAGS+set}" != "set" ; then
     1749        CFLAGS=""
     1750    fi
     1751
    13531752    ac_ext=c
    13541753ac_cpp='$CPP $CPPFLAGS'
     
    19192318  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    19202319  (exit $ac_status); } &&
    1921          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
     2320         { ac_try='test -z "$ac_c_werror_flag"
     2321                         || test ! -s conftest.err'
    19222322  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    19232323  (eval $ac_try) 2>&5
     
    19772377  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    19782378  (exit $ac_status); } &&
    1979          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
     2379         { ac_try='test -z "$ac_c_werror_flag"
     2380                         || test ! -s conftest.err'
    19802381  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    19812382  (eval $ac_try) 2>&5
     
    20932494  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    20942495  (exit $ac_status); } &&
    2095          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
     2496         { ac_try='test -z "$ac_c_werror_flag"
     2497                         || test ! -s conftest.err'
    20962498  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    20972499  (eval $ac_try) 2>&5
     
    21472549  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    21482550  (exit $ac_status); } &&
    2149          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
     2551         { ac_try='test -z "$ac_c_werror_flag"
     2552                         || test ! -s conftest.err'
    21502553  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    21512554  (eval $ac_try) 2>&5
     
    21922595  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    21932596  (exit $ac_status); } &&
    2194          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
     2597         { ac_try='test -z "$ac_c_werror_flag"
     2598                         || test ! -s conftest.err'
    21952599  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    21962600  (eval $ac_try) 2>&5
     
    22362640  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    22372641  (exit $ac_status); } &&
    2238          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
     2642         { ac_try='test -z "$ac_c_werror_flag"
     2643                         || test ! -s conftest.err'
    22392644  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    22402645  (eval $ac_try) 2>&5
     
    22752680ac_compiler_gnu=$ac_cv_c_compiler_gnu
    22762681
    2277 
    2278 # Find a good install program.  We prefer a C program (faster),
     2682    ac_ext=c
     2683ac_cpp='$CPP $CPPFLAGS'
     2684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     2685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     2686ac_compiler_gnu=$ac_cv_c_compiler_gnu
     2687echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
     2688echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
     2689# On Suns, sometimes $CPP names a directory.
     2690if test -n "$CPP" && test -d "$CPP"; then
     2691  CPP=
     2692fi
     2693if test -z "$CPP"; then
     2694  if test "${ac_cv_prog_CPP+set}" = set; then
     2695  echo $ECHO_N "(cached) $ECHO_C" >&6
     2696else
     2697      # Double quotes because CPP needs to be expanded
     2698    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
     2699    do
     2700      ac_preproc_ok=false
     2701for ac_c_preproc_warn_flag in '' yes
     2702do
     2703  # Use a header file that comes with gcc, so configuring glibc
     2704  # with a fresh cross-compiler works.
     2705  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     2706  # <limits.h> exists even on freestanding compilers.
     2707  # On the NeXT, cc -E runs the code through the compiler's parser,
     2708  # not just through cpp. "Syntax error" is here to catch this case.
     2709  cat >conftest.$ac_ext <<_ACEOF
     2710/* confdefs.h.  */
     2711_ACEOF
     2712cat confdefs.h >>conftest.$ac_ext
     2713cat >>conftest.$ac_ext <<_ACEOF
     2714/* end confdefs.h.  */
     2715#ifdef __STDC__
     2716# include <limits.h>
     2717#else
     2718# include <assert.h>
     2719#endif
     2720                     Syntax error
     2721_ACEOF
     2722if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     2723  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     2724  ac_status=$?
     2725  grep -v '^ *+' conftest.er1 >conftest.err
     2726  rm -f conftest.er1
     2727  cat conftest.err >&5
     2728  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2729  (exit $ac_status); } >/dev/null; then
     2730  if test -s conftest.err; then
     2731    ac_cpp_err=$ac_c_preproc_warn_flag
     2732    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     2733  else
     2734    ac_cpp_err=
     2735  fi
     2736else
     2737  ac_cpp_err=yes
     2738fi
     2739if test -z "$ac_cpp_err"; then
     2740  :
     2741else
     2742  echo "$as_me: failed program was:" >&5
     2743sed 's/^/| /' conftest.$ac_ext >&5
     2744
     2745  # Broken: fails on valid input.
     2746continue
     2747fi
     2748rm -f conftest.err conftest.$ac_ext
     2749
     2750  # OK, works on sane cases.  Now check whether non-existent headers
     2751  # can be detected and how.
     2752  cat >conftest.$ac_ext <<_ACEOF
     2753/* confdefs.h.  */
     2754_ACEOF
     2755cat confdefs.h >>conftest.$ac_ext
     2756cat >>conftest.$ac_ext <<_ACEOF
     2757/* end confdefs.h.  */
     2758#include <ac_nonexistent.h>
     2759_ACEOF
     2760if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     2761  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     2762  ac_status=$?
     2763  grep -v '^ *+' conftest.er1 >conftest.err
     2764  rm -f conftest.er1
     2765  cat conftest.err >&5
     2766  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2767  (exit $ac_status); } >/dev/null; then
     2768  if test -s conftest.err; then
     2769    ac_cpp_err=$ac_c_preproc_warn_flag
     2770    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     2771  else
     2772    ac_cpp_err=
     2773  fi
     2774else
     2775  ac_cpp_err=yes
     2776fi
     2777if test -z "$ac_cpp_err"; then
     2778  # Broken: success on invalid input.
     2779continue
     2780else
     2781  echo "$as_me: failed program was:" >&5
     2782sed 's/^/| /' conftest.$ac_ext >&5
     2783
     2784  # Passes both tests.
     2785ac_preproc_ok=:
     2786break
     2787fi
     2788rm -f conftest.err conftest.$ac_ext
     2789
     2790done
     2791# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
     2792rm -f conftest.err conftest.$ac_ext
     2793if $ac_preproc_ok; then
     2794  break
     2795fi
     2796
     2797    done
     2798    ac_cv_prog_CPP=$CPP
     2799
     2800fi
     2801  CPP=$ac_cv_prog_CPP
     2802else
     2803  ac_cv_prog_CPP=$CPP
     2804fi
     2805echo "$as_me:$LINENO: result: $CPP" >&5
     2806echo "${ECHO_T}$CPP" >&6
     2807ac_preproc_ok=false
     2808for ac_c_preproc_warn_flag in '' yes
     2809do
     2810  # Use a header file that comes with gcc, so configuring glibc
     2811  # with a fresh cross-compiler works.
     2812  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     2813  # <limits.h> exists even on freestanding compilers.
     2814  # On the NeXT, cc -E runs the code through the compiler's parser,
     2815  # not just through cpp. "Syntax error" is here to catch this case.
     2816  cat >conftest.$ac_ext <<_ACEOF
     2817/* confdefs.h.  */
     2818_ACEOF
     2819cat confdefs.h >>conftest.$ac_ext
     2820cat >>conftest.$ac_ext <<_ACEOF
     2821/* end confdefs.h.  */
     2822#ifdef __STDC__
     2823# include <limits.h>
     2824#else
     2825# include <assert.h>
     2826#endif
     2827                     Syntax error
     2828_ACEOF
     2829if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     2830  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     2831  ac_status=$?
     2832  grep -v '^ *+' conftest.er1 >conftest.err
     2833  rm -f conftest.er1
     2834  cat conftest.err >&5
     2835  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2836  (exit $ac_status); } >/dev/null; then
     2837  if test -s conftest.err; then
     2838    ac_cpp_err=$ac_c_preproc_warn_flag
     2839    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     2840  else
     2841    ac_cpp_err=
     2842  fi
     2843else
     2844  ac_cpp_err=yes
     2845fi
     2846if test -z "$ac_cpp_err"; then
     2847  :
     2848else
     2849  echo "$as_me: failed program was:" >&5
     2850sed 's/^/| /' conftest.$ac_ext >&5
     2851
     2852  # Broken: fails on valid input.
     2853continue
     2854fi
     2855rm -f conftest.err conftest.$ac_ext
     2856
     2857  # OK, works on sane cases.  Now check whether non-existent headers
     2858  # can be detected and how.
     2859  cat >conftest.$ac_ext <<_ACEOF
     2860/* confdefs.h.  */
     2861_ACEOF
     2862cat confdefs.h >>conftest.$ac_ext
     2863cat >>conftest.$ac_ext <<_ACEOF
     2864/* end confdefs.h.  */
     2865#include <ac_nonexistent.h>
     2866_ACEOF
     2867if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     2868  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     2869  ac_status=$?
     2870  grep -v '^ *+' conftest.er1 >conftest.err
     2871  rm -f conftest.er1
     2872  cat conftest.err >&5
     2873  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     2874  (exit $ac_status); } >/dev/null; then
     2875  if test -s conftest.err; then
     2876    ac_cpp_err=$ac_c_preproc_warn_flag
     2877    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     2878  else
     2879    ac_cpp_err=
     2880  fi
     2881else
     2882  ac_cpp_err=yes
     2883fi
     2884if test -z "$ac_cpp_err"; then
     2885  # Broken: success on invalid input.
     2886continue
     2887else
     2888  echo "$as_me: failed program was:" >&5
     2889sed 's/^/| /' conftest.$ac_ext >&5
     2890
     2891  # Passes both tests.
     2892ac_preproc_ok=:
     2893break
     2894fi
     2895rm -f conftest.err conftest.$ac_ext
     2896
     2897done
     2898# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
     2899rm -f conftest.err conftest.$ac_ext
     2900if $ac_preproc_ok; then
     2901  :
     2902else
     2903  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
     2904See \`config.log' for more details." >&5
     2905echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
     2906See \`config.log' for more details." >&2;}
     2907   { (exit 1); exit 1; }; }
     2908fi
     2909
     2910ac_ext=c
     2911ac_cpp='$CPP $CPPFLAGS'
     2912ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     2913ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     2914ac_compiler_gnu=$ac_cv_c_compiler_gnu
     2915
     2916
     2917    # Find a good install program.  We prefer a C program (faster),
    22792918# so one script is as good as another.  But avoid the broken or
    22802919# incompatible versions:
     
    23562995
    23572996
    2358 #--------------------------------------------------------------------
    2359 # Checks to see if the make program sets the $MAKE variable.
    2360 #--------------------------------------------------------------------
    2361 
    2362 echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
     2997    #--------------------------------------------------------------------
     2998    # Checks to see if the make program sets the $MAKE variable.
     2999    #--------------------------------------------------------------------
     3000
     3001    echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
    23633002echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
    23643003set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
     
    23903029
    23913030
    2392 #--------------------------------------------------------------------
    2393 # Find ranlib
    2394 #--------------------------------------------------------------------
    2395 
    2396 if test -n "$ac_tool_prefix"; then
     3031    #--------------------------------------------------------------------
     3032    # Find ranlib
     3033    #--------------------------------------------------------------------
     3034
     3035    if test -n "$ac_tool_prefix"; then
    23973036  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
    23983037set dummy ${ac_tool_prefix}ranlib; ac_word=$2
     
    24753114
    24763115
    2477 #--------------------------------------------------------------------
    2478 # This macro performs additional compiler tests.
    2479 #--------------------------------------------------------------------
    2480 
    2481 # Make sure we can run config.sub.
    2482 $ac_config_sub sun4 >/dev/null 2>&1 ||
    2483   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
    2484 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
    2485    { (exit 1); exit 1; }; }
    2486 
    2487 echo "$as_me:$LINENO: checking build system type" >&5
    2488 echo $ECHO_N "checking build system type... $ECHO_C" >&6
    2489 if test "${ac_cv_build+set}" = set; then
     3116    #--------------------------------------------------------------------
     3117    # Determines the correct binary file extension (.o, .obj, .exe etc.)
     3118    #--------------------------------------------------------------------
     3119
     3120
     3121
     3122
     3123
     3124
     3125echo "$as_me:$LINENO: checking for egrep" >&5
     3126echo $ECHO_N "checking for egrep... $ECHO_C" >&6
     3127if test "${ac_cv_prog_egrep+set}" = set; then
    24903128  echo $ECHO_N "(cached) $ECHO_C" >&6
    24913129else
    2492   ac_cv_build_alias=$build_alias
    2493 test -z "$ac_cv_build_alias" &&
    2494   ac_cv_build_alias=`$ac_config_guess`
    2495 test -z "$ac_cv_build_alias" &&
    2496   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
    2497 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
    2498    { (exit 1); exit 1; }; }
    2499 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
    2500   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
    2501 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
    2502    { (exit 1); exit 1; }; }
    2503 
    2504 fi
    2505 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
    2506 echo "${ECHO_T}$ac_cv_build" >&6
    2507 build=$ac_cv_build
    2508 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
    2509 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
    2510 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
    2511 
    2512 
    2513 echo "$as_me:$LINENO: checking host system type" >&5
    2514 echo $ECHO_N "checking host system type... $ECHO_C" >&6
    2515 if test "${ac_cv_host+set}" = set; then
     3130  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
     3131    then ac_cv_prog_egrep='grep -E'
     3132    else ac_cv_prog_egrep='egrep'
     3133    fi
     3134fi
     3135echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
     3136echo "${ECHO_T}$ac_cv_prog_egrep" >&6
     3137 EGREP=$ac_cv_prog_egrep
     3138
     3139
     3140echo "$as_me:$LINENO: checking for ANSI C header files" >&5
     3141echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
     3142if test "${ac_cv_header_stdc+set}" = set; then
    25163143  echo $ECHO_N "(cached) $ECHO_C" >&6
    25173144else
    2518   ac_cv_host_alias=$host_alias
    2519 test -z "$ac_cv_host_alias" &&
    2520   ac_cv_host_alias=$ac_cv_build_alias
    2521 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
    2522   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
    2523 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
    2524    { (exit 1); exit 1; }; }
    2525 
    2526 fi
    2527 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
    2528 echo "${ECHO_T}$ac_cv_host" >&6
    2529 host=$ac_cv_host
    2530 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
    2531 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
    2532 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
    2533 
    2534 
    2535 case $host_os in
    2536   *cygwin* ) CYGWIN=yes;;
    2537          * ) CYGWIN=no;;
     3145  cat >conftest.$ac_ext <<_ACEOF
     3146/* confdefs.h.  */
     3147_ACEOF
     3148cat confdefs.h >>conftest.$ac_ext
     3149cat >>conftest.$ac_ext <<_ACEOF
     3150/* end confdefs.h.  */
     3151#include <stdlib.h>
     3152#include <stdarg.h>
     3153#include <string.h>
     3154#include <float.h>
     3155
     3156int
     3157main ()
     3158{
     3159
     3160  ;
     3161  return 0;
     3162}
     3163_ACEOF
     3164rm -f conftest.$ac_objext
     3165if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     3166  (eval $ac_compile) 2>conftest.er1
     3167  ac_status=$?
     3168  grep -v '^ *+' conftest.er1 >conftest.err
     3169  rm -f conftest.er1
     3170  cat conftest.err >&5
     3171  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3172  (exit $ac_status); } &&
     3173         { ac_try='test -z "$ac_c_werror_flag"
     3174                         || test ! -s conftest.err'
     3175  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3176  (eval $ac_try) 2>&5
     3177  ac_status=$?
     3178  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3179  (exit $ac_status); }; } &&
     3180         { ac_try='test -s conftest.$ac_objext'
     3181  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3182  (eval $ac_try) 2>&5
     3183  ac_status=$?
     3184  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3185  (exit $ac_status); }; }; then
     3186  ac_cv_header_stdc=yes
     3187else
     3188  echo "$as_me: failed program was:" >&5
     3189sed 's/^/| /' conftest.$ac_ext >&5
     3190
     3191ac_cv_header_stdc=no
     3192fi
     3193rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     3194
     3195if test $ac_cv_header_stdc = yes; then
     3196  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
     3197  cat >conftest.$ac_ext <<_ACEOF
     3198/* confdefs.h.  */
     3199_ACEOF
     3200cat confdefs.h >>conftest.$ac_ext
     3201cat >>conftest.$ac_ext <<_ACEOF
     3202/* end confdefs.h.  */
     3203#include <string.h>
     3204
     3205_ACEOF
     3206if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     3207  $EGREP "memchr" >/dev/null 2>&1; then
     3208  :
     3209else
     3210  ac_cv_header_stdc=no
     3211fi
     3212rm -f conftest*
     3213
     3214fi
     3215
     3216if test $ac_cv_header_stdc = yes; then
     3217  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
     3218  cat >conftest.$ac_ext <<_ACEOF
     3219/* confdefs.h.  */
     3220_ACEOF
     3221cat confdefs.h >>conftest.$ac_ext
     3222cat >>conftest.$ac_ext <<_ACEOF
     3223/* end confdefs.h.  */
     3224#include <stdlib.h>
     3225
     3226_ACEOF
     3227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     3228  $EGREP "free" >/dev/null 2>&1; then
     3229  :
     3230else
     3231  ac_cv_header_stdc=no
     3232fi
     3233rm -f conftest*
     3234
     3235fi
     3236
     3237if test $ac_cv_header_stdc = yes; then
     3238  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
     3239  if test "$cross_compiling" = yes; then
     3240  :
     3241else
     3242  cat >conftest.$ac_ext <<_ACEOF
     3243/* confdefs.h.  */
     3244_ACEOF
     3245cat confdefs.h >>conftest.$ac_ext
     3246cat >>conftest.$ac_ext <<_ACEOF
     3247/* end confdefs.h.  */
     3248#include <ctype.h>
     3249#if ((' ' & 0x0FF) == 0x020)
     3250# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
     3251# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
     3252#else
     3253# define ISLOWER(c) \
     3254                   (('a' <= (c) && (c) <= 'i') \
     3255                     || ('j' <= (c) && (c) <= 'r') \
     3256                     || ('s' <= (c) && (c) <= 'z'))
     3257# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
     3258#endif
     3259
     3260#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
     3261int
     3262main ()
     3263{
     3264  int i;
     3265  for (i = 0; i < 256; i++)
     3266    if (XOR (islower (i), ISLOWER (i))
     3267        || toupper (i) != TOUPPER (i))
     3268      exit(2);
     3269  exit (0);
     3270}
     3271_ACEOF
     3272rm -f conftest$ac_exeext
     3273if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     3274  (eval $ac_link) 2>&5
     3275  ac_status=$?
     3276  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3277  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
     3278  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3279  (eval $ac_try) 2>&5
     3280  ac_status=$?
     3281  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3282  (exit $ac_status); }; }; then
     3283  :
     3284else
     3285  echo "$as_me: program exited with status $ac_status" >&5
     3286echo "$as_me: failed program was:" >&5
     3287sed 's/^/| /' conftest.$ac_ext >&5
     3288
     3289( exit $ac_status )
     3290ac_cv_header_stdc=no
     3291fi
     3292rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
     3293fi
     3294fi
     3295fi
     3296echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
     3297echo "${ECHO_T}$ac_cv_header_stdc" >&6
     3298if test $ac_cv_header_stdc = yes; then
     3299
     3300cat >>confdefs.h <<\_ACEOF
     3301#define STDC_HEADERS 1
     3302_ACEOF
     3303
     3304fi
     3305
     3306# On IRIX 5.3, sys/types and inttypes.h are conflicting.
     3307
     3308
     3309
     3310
     3311
     3312
     3313
     3314
     3315
     3316for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
     3317                  inttypes.h stdint.h unistd.h
     3318do
     3319as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     3320echo "$as_me:$LINENO: checking for $ac_header" >&5
     3321echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     3322if eval "test \"\${$as_ac_Header+set}\" = set"; then
     3323  echo $ECHO_N "(cached) $ECHO_C" >&6
     3324else
     3325  cat >conftest.$ac_ext <<_ACEOF
     3326/* confdefs.h.  */
     3327_ACEOF
     3328cat confdefs.h >>conftest.$ac_ext
     3329cat >>conftest.$ac_ext <<_ACEOF
     3330/* end confdefs.h.  */
     3331$ac_includes_default
     3332
     3333#include <$ac_header>
     3334_ACEOF
     3335rm -f conftest.$ac_objext
     3336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     3337  (eval $ac_compile) 2>conftest.er1
     3338  ac_status=$?
     3339  grep -v '^ *+' conftest.er1 >conftest.err
     3340  rm -f conftest.er1
     3341  cat conftest.err >&5
     3342  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3343  (exit $ac_status); } &&
     3344         { ac_try='test -z "$ac_c_werror_flag"
     3345                         || test ! -s conftest.err'
     3346  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3347  (eval $ac_try) 2>&5
     3348  ac_status=$?
     3349  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3350  (exit $ac_status); }; } &&
     3351         { ac_try='test -s conftest.$ac_objext'
     3352  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3353  (eval $ac_try) 2>&5
     3354  ac_status=$?
     3355  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3356  (exit $ac_status); }; }; then
     3357  eval "$as_ac_Header=yes"
     3358else
     3359  echo "$as_me: failed program was:" >&5
     3360sed 's/^/| /' conftest.$ac_ext >&5
     3361
     3362eval "$as_ac_Header=no"
     3363fi
     3364rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     3365fi
     3366echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     3367echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     3368if test `eval echo '${'$as_ac_Header'}'` = yes; then
     3369  cat >>confdefs.h <<_ACEOF
     3370#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     3371_ACEOF
     3372
     3373fi
     3374
     3375done
     3376
     3377
     3378
     3379    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
     3380
     3381
     3382    #------------------------------------------------------------------------
     3383    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
     3384    # It makes compiling go faster.  (This is only a performance feature.)
     3385    #------------------------------------------------------------------------
     3386
     3387    if test -z "$no_pipe" -a -n "$GCC"; then
     3388        echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
     3389echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6
     3390        OLDCC="$CC"
     3391        CC="$CC -pipe"
     3392        cat >conftest.$ac_ext <<_ACEOF
     3393/* confdefs.h.  */
     3394_ACEOF
     3395cat confdefs.h >>conftest.$ac_ext
     3396cat >>conftest.$ac_ext <<_ACEOF
     3397/* end confdefs.h.  */
     3398
     3399int
     3400main ()
     3401{
     3402
     3403  ;
     3404  return 0;
     3405}
     3406_ACEOF
     3407rm -f conftest.$ac_objext
     3408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     3409  (eval $ac_compile) 2>conftest.er1
     3410  ac_status=$?
     3411  grep -v '^ *+' conftest.er1 >conftest.err
     3412  rm -f conftest.er1
     3413  cat conftest.err >&5
     3414  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3415  (exit $ac_status); } &&
     3416         { ac_try='test -z "$ac_c_werror_flag"
     3417                         || test ! -s conftest.err'
     3418  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3419  (eval $ac_try) 2>&5
     3420  ac_status=$?
     3421  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3422  (exit $ac_status); }; } &&
     3423         { ac_try='test -s conftest.$ac_objext'
     3424  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3425  (eval $ac_try) 2>&5
     3426  ac_status=$?
     3427  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3428  (exit $ac_status); }; }; then
     3429  echo "$as_me:$LINENO: result: yes" >&5
     3430echo "${ECHO_T}yes" >&6
     3431else
     3432  echo "$as_me: failed program was:" >&5
     3433sed 's/^/| /' conftest.$ac_ext >&5
     3434
     3435CC="$OLDCC"
     3436            echo "$as_me:$LINENO: result: no" >&5
     3437echo "${ECHO_T}no" >&6
     3438fi
     3439rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     3440    fi
     3441
     3442    #--------------------------------------------------------------------
     3443    # Common compiler flag setup
     3444    #--------------------------------------------------------------------
     3445
     3446    echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
     3447echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
     3448if test "${ac_cv_c_bigendian+set}" = set; then
     3449  echo $ECHO_N "(cached) $ECHO_C" >&6
     3450else
     3451  # See if sys/param.h defines the BYTE_ORDER macro.
     3452cat >conftest.$ac_ext <<_ACEOF
     3453/* confdefs.h.  */
     3454_ACEOF
     3455cat confdefs.h >>conftest.$ac_ext
     3456cat >>conftest.$ac_ext <<_ACEOF
     3457/* end confdefs.h.  */
     3458#include <sys/types.h>
     3459#include <sys/param.h>
     3460
     3461int
     3462main ()
     3463{
     3464#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
     3465 bogus endian macros
     3466#endif
     3467
     3468  ;
     3469  return 0;
     3470}
     3471_ACEOF
     3472rm -f conftest.$ac_objext
     3473if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     3474  (eval $ac_compile) 2>conftest.er1
     3475  ac_status=$?
     3476  grep -v '^ *+' conftest.er1 >conftest.err
     3477  rm -f conftest.er1
     3478  cat conftest.err >&5
     3479  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3480  (exit $ac_status); } &&
     3481         { ac_try='test -z "$ac_c_werror_flag"
     3482                         || test ! -s conftest.err'
     3483  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3484  (eval $ac_try) 2>&5
     3485  ac_status=$?
     3486  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3487  (exit $ac_status); }; } &&
     3488         { ac_try='test -s conftest.$ac_objext'
     3489  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3490  (eval $ac_try) 2>&5
     3491  ac_status=$?
     3492  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3493  (exit $ac_status); }; }; then
     3494  # It does; now see whether it defined to BIG_ENDIAN or not.
     3495cat >conftest.$ac_ext <<_ACEOF
     3496/* confdefs.h.  */
     3497_ACEOF
     3498cat confdefs.h >>conftest.$ac_ext
     3499cat >>conftest.$ac_ext <<_ACEOF
     3500/* end confdefs.h.  */
     3501#include <sys/types.h>
     3502#include <sys/param.h>
     3503
     3504int
     3505main ()
     3506{
     3507#if BYTE_ORDER != BIG_ENDIAN
     3508 not big endian
     3509#endif
     3510
     3511  ;
     3512  return 0;
     3513}
     3514_ACEOF
     3515rm -f conftest.$ac_objext
     3516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     3517  (eval $ac_compile) 2>conftest.er1
     3518  ac_status=$?
     3519  grep -v '^ *+' conftest.er1 >conftest.err
     3520  rm -f conftest.er1
     3521  cat conftest.err >&5
     3522  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3523  (exit $ac_status); } &&
     3524         { ac_try='test -z "$ac_c_werror_flag"
     3525                         || test ! -s conftest.err'
     3526  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3527  (eval $ac_try) 2>&5
     3528  ac_status=$?
     3529  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3530  (exit $ac_status); }; } &&
     3531         { ac_try='test -s conftest.$ac_objext'
     3532  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3533  (eval $ac_try) 2>&5
     3534  ac_status=$?
     3535  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3536  (exit $ac_status); }; }; then
     3537  ac_cv_c_bigendian=yes
     3538else
     3539  echo "$as_me: failed program was:" >&5
     3540sed 's/^/| /' conftest.$ac_ext >&5
     3541
     3542ac_cv_c_bigendian=no
     3543fi
     3544rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     3545else
     3546  echo "$as_me: failed program was:" >&5
     3547sed 's/^/| /' conftest.$ac_ext >&5
     3548
     3549# It does not; compile a test program.
     3550if test "$cross_compiling" = yes; then
     3551  # try to guess the endianness by grepping values into an object file
     3552  ac_cv_c_bigendian=unknown
     3553  cat >conftest.$ac_ext <<_ACEOF
     3554/* confdefs.h.  */
     3555_ACEOF
     3556cat confdefs.h >>conftest.$ac_ext
     3557cat >>conftest.$ac_ext <<_ACEOF
     3558/* end confdefs.h.  */
     3559short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
     3560short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
     3561void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
     3562short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
     3563short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
     3564void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
     3565int
     3566main ()
     3567{
     3568 _ascii (); _ebcdic ();
     3569  ;
     3570  return 0;
     3571}
     3572_ACEOF
     3573rm -f conftest.$ac_objext
     3574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     3575  (eval $ac_compile) 2>conftest.er1
     3576  ac_status=$?
     3577  grep -v '^ *+' conftest.er1 >conftest.err
     3578  rm -f conftest.er1
     3579  cat conftest.err >&5
     3580  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3581  (exit $ac_status); } &&
     3582         { ac_try='test -z "$ac_c_werror_flag"
     3583                         || test ! -s conftest.err'
     3584  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3585  (eval $ac_try) 2>&5
     3586  ac_status=$?
     3587  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3588  (exit $ac_status); }; } &&
     3589         { ac_try='test -s conftest.$ac_objext'
     3590  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3591  (eval $ac_try) 2>&5
     3592  ac_status=$?
     3593  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3594  (exit $ac_status); }; }; then
     3595  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
     3596  ac_cv_c_bigendian=yes
     3597fi
     3598if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
     3599  if test "$ac_cv_c_bigendian" = unknown; then
     3600    ac_cv_c_bigendian=no
     3601  else
     3602    # finding both strings is unlikely to happen, but who knows?
     3603    ac_cv_c_bigendian=unknown
     3604  fi
     3605fi
     3606else
     3607  echo "$as_me: failed program was:" >&5
     3608sed 's/^/| /' conftest.$ac_ext >&5
     3609
     3610fi
     3611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     3612else
     3613  cat >conftest.$ac_ext <<_ACEOF
     3614/* confdefs.h.  */
     3615_ACEOF
     3616cat confdefs.h >>conftest.$ac_ext
     3617cat >>conftest.$ac_ext <<_ACEOF
     3618/* end confdefs.h.  */
     3619int
     3620main ()
     3621{
     3622  /* Are we little or big endian?  From Harbison&Steele.  */
     3623  union
     3624  {
     3625    long l;
     3626    char c[sizeof (long)];
     3627  } u;
     3628  u.l = 1;
     3629  exit (u.c[sizeof (long) - 1] == 1);
     3630}
     3631_ACEOF
     3632rm -f conftest$ac_exeext
     3633if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     3634  (eval $ac_link) 2>&5
     3635  ac_status=$?
     3636  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3637  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
     3638  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3639  (eval $ac_try) 2>&5
     3640  ac_status=$?
     3641  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3642  (exit $ac_status); }; }; then
     3643  ac_cv_c_bigendian=no
     3644else
     3645  echo "$as_me: program exited with status $ac_status" >&5
     3646echo "$as_me: failed program was:" >&5
     3647sed 's/^/| /' conftest.$ac_ext >&5
     3648
     3649( exit $ac_status )
     3650ac_cv_c_bigendian=yes
     3651fi
     3652rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
     3653fi
     3654fi
     3655rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     3656fi
     3657echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
     3658echo "${ECHO_T}$ac_cv_c_bigendian" >&6
     3659case $ac_cv_c_bigendian in
     3660  yes)
     3661
     3662cat >>confdefs.h <<\_ACEOF
     3663#define WORDS_BIGENDIAN 1
     3664_ACEOF
     3665 ;;
     3666  no)
     3667     ;;
     3668  *)
     3669    { { echo "$as_me:$LINENO: error: unknown endianness
     3670presetting ac_cv_c_bigendian=no (or yes) will help" >&5
     3671echo "$as_me: error: unknown endianness
     3672presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
     3673   { (exit 1); exit 1; }; } ;;
    25383674esac
    25393675
    2540 
    2541 #--------------------------------------------------------------------
    2542 # Determines the correct binary file extension (.o, .obj, .exe etc.)
    2543 #--------------------------------------------------------------------
    2544 
    2545 
    2546 
    2547 
    2548 #--------------------------------------------------------------------
    2549 # "cygpath" is used on windows to generate native path names for include
    2550 # files.
    2551 # These variables should only be used with the compiler and linker since
    2552 # they generate native path names.
    2553 #
    2554 # Unix tclConfig.sh points SRC_DIR at the top-level directory of
    2555 # the Tcl sources, while the Windows tclConfig.sh points SRC_DIR at
    2556 # the win subdirectory.  Hence the different usages of SRC_DIR below.
    2557 #
    2558 # This must be done before calling SC_PUBLIC_TCL_HEADERS
    2559 #--------------------------------------------------------------------
    2560 
    2561 case "`uname -s`" in
    2562     *win32* | *WIN32* | *CYGWIN_NT*)
    2563         CYGPATH="cygpath -w"
     3676    if test "${TEA_PLATFORM}" = "unix" ; then
     3677
     3678    #--------------------------------------------------------------------
     3679    # On a few very rare systems, all of the libm.a stuff is
     3680    # already in libc.a.  Set compiler flags accordingly.
     3681    # Also, Linux requires the "ieee" library for math to work
     3682    # right (and it must appear before "-lm").
     3683    #--------------------------------------------------------------------
     3684
     3685    echo "$as_me:$LINENO: checking for sin" >&5
     3686echo $ECHO_N "checking for sin... $ECHO_C" >&6
     3687if test "${ac_cv_func_sin+set}" = set; then
     3688  echo $ECHO_N "(cached) $ECHO_C" >&6
     3689else
     3690  cat >conftest.$ac_ext <<_ACEOF
     3691/* confdefs.h.  */
     3692_ACEOF
     3693cat confdefs.h >>conftest.$ac_ext
     3694cat >>conftest.$ac_ext <<_ACEOF
     3695/* end confdefs.h.  */
     3696/* Define sin to an innocuous variant, in case <limits.h> declares sin.
     3697   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
     3698#define sin innocuous_sin
     3699
     3700/* System header to define __stub macros and hopefully few prototypes,
     3701    which can conflict with char sin (); below.
     3702    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     3703    <limits.h> exists even on freestanding compilers.  */
     3704
     3705#ifdef __STDC__
     3706# include <limits.h>
     3707#else
     3708# include <assert.h>
     3709#endif
     3710
     3711#undef sin
     3712
     3713/* Override any gcc2 internal prototype to avoid an error.  */
     3714#ifdef __cplusplus
     3715extern "C"
     3716{
     3717#endif
     3718/* We use char because int might match the return type of a gcc2
     3719   builtin and then its argument prototype would still apply.  */
     3720char sin ();
     3721/* The GNU C library defines this for functions which it implements
     3722    to always fail with ENOSYS.  Some functions are actually named
     3723    something starting with __ and the normal name is an alias.  */
     3724#if defined (__stub_sin) || defined (__stub___sin)
     3725choke me
     3726#else
     3727char (*f) () = sin;
     3728#endif
     3729#ifdef __cplusplus
     3730}
     3731#endif
     3732
     3733int
     3734main ()
     3735{
     3736return f != sin;
     3737  ;
     3738  return 0;
     3739}
     3740_ACEOF
     3741rm -f conftest.$ac_objext conftest$ac_exeext
     3742if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     3743  (eval $ac_link) 2>conftest.er1
     3744  ac_status=$?
     3745  grep -v '^ *+' conftest.er1 >conftest.err
     3746  rm -f conftest.er1
     3747  cat conftest.err >&5
     3748  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3749  (exit $ac_status); } &&
     3750         { ac_try='test -z "$ac_c_werror_flag"
     3751                         || test ! -s conftest.err'
     3752  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3753  (eval $ac_try) 2>&5
     3754  ac_status=$?
     3755  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3756  (exit $ac_status); }; } &&
     3757         { ac_try='test -s conftest$ac_exeext'
     3758  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3759  (eval $ac_try) 2>&5
     3760  ac_status=$?
     3761  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3762  (exit $ac_status); }; }; then
     3763  ac_cv_func_sin=yes
     3764else
     3765  echo "$as_me: failed program was:" >&5
     3766sed 's/^/| /' conftest.$ac_ext >&5
     3767
     3768ac_cv_func_sin=no
     3769fi
     3770rm -f conftest.err conftest.$ac_objext \
     3771      conftest$ac_exeext conftest.$ac_ext
     3772fi
     3773echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
     3774echo "${ECHO_T}$ac_cv_func_sin" >&6
     3775if test $ac_cv_func_sin = yes; then
     3776  MATH_LIBS=""
     3777else
     3778  MATH_LIBS="-lm"
     3779fi
     3780
     3781    echo "$as_me:$LINENO: checking for main in -lieee" >&5
     3782echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6
     3783if test "${ac_cv_lib_ieee_main+set}" = set; then
     3784  echo $ECHO_N "(cached) $ECHO_C" >&6
     3785else
     3786  ac_check_lib_save_LIBS=$LIBS
     3787LIBS="-lieee  $LIBS"
     3788cat >conftest.$ac_ext <<_ACEOF
     3789/* confdefs.h.  */
     3790_ACEOF
     3791cat confdefs.h >>conftest.$ac_ext
     3792cat >>conftest.$ac_ext <<_ACEOF
     3793/* end confdefs.h.  */
     3794
     3795
     3796int
     3797main ()
     3798{
     3799main ();
     3800  ;
     3801  return 0;
     3802}
     3803_ACEOF
     3804rm -f conftest.$ac_objext conftest$ac_exeext
     3805if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     3806  (eval $ac_link) 2>conftest.er1
     3807  ac_status=$?
     3808  grep -v '^ *+' conftest.er1 >conftest.err
     3809  rm -f conftest.er1
     3810  cat conftest.err >&5
     3811  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3812  (exit $ac_status); } &&
     3813         { ac_try='test -z "$ac_c_werror_flag"
     3814                         || test ! -s conftest.err'
     3815  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3816  (eval $ac_try) 2>&5
     3817  ac_status=$?
     3818  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3819  (exit $ac_status); }; } &&
     3820         { ac_try='test -s conftest$ac_exeext'
     3821  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3822  (eval $ac_try) 2>&5
     3823  ac_status=$?
     3824  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3825  (exit $ac_status); }; }; then
     3826  ac_cv_lib_ieee_main=yes
     3827else
     3828  echo "$as_me: failed program was:" >&5
     3829sed 's/^/| /' conftest.$ac_ext >&5
     3830
     3831ac_cv_lib_ieee_main=no
     3832fi
     3833rm -f conftest.err conftest.$ac_objext \
     3834      conftest$ac_exeext conftest.$ac_ext
     3835LIBS=$ac_check_lib_save_LIBS
     3836fi
     3837echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
     3838echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6
     3839if test $ac_cv_lib_ieee_main = yes; then
     3840  MATH_LIBS="-lieee $MATH_LIBS"
     3841fi
     3842
     3843
     3844    #--------------------------------------------------------------------
     3845    # Interactive UNIX requires -linet instead of -lsocket, plus it
     3846    # needs net/errno.h to define the socket-related error codes.
     3847    #--------------------------------------------------------------------
     3848
     3849    echo "$as_me:$LINENO: checking for main in -linet" >&5
     3850echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6
     3851if test "${ac_cv_lib_inet_main+set}" = set; then
     3852  echo $ECHO_N "(cached) $ECHO_C" >&6
     3853else
     3854  ac_check_lib_save_LIBS=$LIBS
     3855LIBS="-linet  $LIBS"
     3856cat >conftest.$ac_ext <<_ACEOF
     3857/* confdefs.h.  */
     3858_ACEOF
     3859cat confdefs.h >>conftest.$ac_ext
     3860cat >>conftest.$ac_ext <<_ACEOF
     3861/* end confdefs.h.  */
     3862
     3863
     3864int
     3865main ()
     3866{
     3867main ();
     3868  ;
     3869  return 0;
     3870}
     3871_ACEOF
     3872rm -f conftest.$ac_objext conftest$ac_exeext
     3873if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     3874  (eval $ac_link) 2>conftest.er1
     3875  ac_status=$?
     3876  grep -v '^ *+' conftest.er1 >conftest.err
     3877  rm -f conftest.er1
     3878  cat conftest.err >&5
     3879  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3880  (exit $ac_status); } &&
     3881         { ac_try='test -z "$ac_c_werror_flag"
     3882                         || test ! -s conftest.err'
     3883  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3884  (eval $ac_try) 2>&5
     3885  ac_status=$?
     3886  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3887  (exit $ac_status); }; } &&
     3888         { ac_try='test -s conftest$ac_exeext'
     3889  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3890  (eval $ac_try) 2>&5
     3891  ac_status=$?
     3892  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3893  (exit $ac_status); }; }; then
     3894  ac_cv_lib_inet_main=yes
     3895else
     3896  echo "$as_me: failed program was:" >&5
     3897sed 's/^/| /' conftest.$ac_ext >&5
     3898
     3899ac_cv_lib_inet_main=no
     3900fi
     3901rm -f conftest.err conftest.$ac_objext \
     3902      conftest$ac_exeext conftest.$ac_ext
     3903LIBS=$ac_check_lib_save_LIBS
     3904fi
     3905echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
     3906echo "${ECHO_T}$ac_cv_lib_inet_main" >&6
     3907if test $ac_cv_lib_inet_main = yes; then
     3908  LIBS="$LIBS -linet"
     3909fi
     3910
     3911    if test "${ac_cv_header_net_errno_h+set}" = set; then
     3912  echo "$as_me:$LINENO: checking for net/errno.h" >&5
     3913echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
     3914if test "${ac_cv_header_net_errno_h+set}" = set; then
     3915  echo $ECHO_N "(cached) $ECHO_C" >&6
     3916fi
     3917echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
     3918echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
     3919else
     3920  # Is the header compilable?
     3921echo "$as_me:$LINENO: checking net/errno.h usability" >&5
     3922echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6
     3923cat >conftest.$ac_ext <<_ACEOF
     3924/* confdefs.h.  */
     3925_ACEOF
     3926cat confdefs.h >>conftest.$ac_ext
     3927cat >>conftest.$ac_ext <<_ACEOF
     3928/* end confdefs.h.  */
     3929$ac_includes_default
     3930#include <net/errno.h>
     3931_ACEOF
     3932rm -f conftest.$ac_objext
     3933if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     3934  (eval $ac_compile) 2>conftest.er1
     3935  ac_status=$?
     3936  grep -v '^ *+' conftest.er1 >conftest.err
     3937  rm -f conftest.er1
     3938  cat conftest.err >&5
     3939  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3940  (exit $ac_status); } &&
     3941         { ac_try='test -z "$ac_c_werror_flag"
     3942                         || test ! -s conftest.err'
     3943  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3944  (eval $ac_try) 2>&5
     3945  ac_status=$?
     3946  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3947  (exit $ac_status); }; } &&
     3948         { ac_try='test -s conftest.$ac_objext'
     3949  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     3950  (eval $ac_try) 2>&5
     3951  ac_status=$?
     3952  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3953  (exit $ac_status); }; }; then
     3954  ac_header_compiler=yes
     3955else
     3956  echo "$as_me: failed program was:" >&5
     3957sed 's/^/| /' conftest.$ac_ext >&5
     3958
     3959ac_header_compiler=no
     3960fi
     3961rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     3962echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     3963echo "${ECHO_T}$ac_header_compiler" >&6
     3964
     3965# Is the header present?
     3966echo "$as_me:$LINENO: checking net/errno.h presence" >&5
     3967echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6
     3968cat >conftest.$ac_ext <<_ACEOF
     3969/* confdefs.h.  */
     3970_ACEOF
     3971cat confdefs.h >>conftest.$ac_ext
     3972cat >>conftest.$ac_ext <<_ACEOF
     3973/* end confdefs.h.  */
     3974#include <net/errno.h>
     3975_ACEOF
     3976if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     3977  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     3978  ac_status=$?
     3979  grep -v '^ *+' conftest.er1 >conftest.err
     3980  rm -f conftest.er1
     3981  cat conftest.err >&5
     3982  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     3983  (exit $ac_status); } >/dev/null; then
     3984  if test -s conftest.err; then
     3985    ac_cpp_err=$ac_c_preproc_warn_flag
     3986    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     3987  else
     3988    ac_cpp_err=
     3989  fi
     3990else
     3991  ac_cpp_err=yes
     3992fi
     3993if test -z "$ac_cpp_err"; then
     3994  ac_header_preproc=yes
     3995else
     3996  echo "$as_me: failed program was:" >&5
     3997sed 's/^/| /' conftest.$ac_ext >&5
     3998
     3999  ac_header_preproc=no
     4000fi
     4001rm -f conftest.err conftest.$ac_ext
     4002echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     4003echo "${ECHO_T}$ac_header_preproc" >&6
     4004
     4005# So?  What about this header?
     4006case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     4007  yes:no: )
     4008    { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
     4009echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
     4010    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
     4011echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
     4012    ac_header_preproc=yes
    25644013    ;;
    2565     *)
    2566         CYGPATH=echo
     4014  no:yes:* )
     4015    { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
     4016echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
     4017    { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
     4018echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
     4019    { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
     4020echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
     4021    { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
     4022echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
     4023    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
     4024echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
     4025    { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
     4026echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
     4027    (
     4028      cat <<\_ASBOX
     4029## -------------------------------------- ##
     4030## Report this to the RapptureGUI lists.  ##
     4031## -------------------------------------- ##
     4032_ASBOX
     4033    ) |
     4034      sed "s/^/$as_me: WARNING:     /" >&2
    25674035    ;;
    25684036esac
    2569 
     4037echo "$as_me:$LINENO: checking for net/errno.h" >&5
     4038echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
     4039if test "${ac_cv_header_net_errno_h+set}" = set; then
     4040  echo $ECHO_N "(cached) $ECHO_C" >&6
     4041else
     4042  ac_cv_header_net_errno_h=$ac_header_preproc
     4043fi
     4044echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
     4045echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
     4046
     4047fi
     4048if test $ac_cv_header_net_errno_h = yes; then
     4049
     4050
     4051cat >>confdefs.h <<\_ACEOF
     4052#define HAVE_NET_ERRNO_H 1
     4053_ACEOF
     4054
     4055fi
     4056
     4057
     4058
     4059    #--------------------------------------------------------------------
     4060    #   Check for the existence of the -lsocket and -lnsl libraries.
     4061    #   The order here is important, so that they end up in the right
     4062    #   order in the command line generated by make.  Here are some
     4063    #   special considerations:
     4064    #   1. Use "connect" and "accept" to check for -lsocket, and
     4065    #      "gethostbyname" to check for -lnsl.
     4066    #   2. Use each function name only once:  can't redo a check because
     4067    #      autoconf caches the results of the last check and won't redo it.
     4068    #   3. Use -lnsl and -lsocket only if they supply procedures that
     4069    #      aren't already present in the normal libraries.  This is because
     4070    #      IRIX 5.2 has libraries, but they aren't needed and they're
     4071    #      bogus:  they goof up name resolution if used.
     4072    #   4. On some SVR4 systems, can't use -lsocket without -lnsl too.
     4073    #      To get around this problem, check for both libraries together
     4074    #      if -lsocket doesn't work by itself.
     4075    #--------------------------------------------------------------------
     4076
     4077    tcl_checkBoth=0
     4078    echo "$as_me:$LINENO: checking for connect" >&5
     4079echo $ECHO_N "checking for connect... $ECHO_C" >&6
     4080if test "${ac_cv_func_connect+set}" = set; then
     4081  echo $ECHO_N "(cached) $ECHO_C" >&6
     4082else
     4083  cat >conftest.$ac_ext <<_ACEOF
     4084/* confdefs.h.  */
     4085_ACEOF
     4086cat confdefs.h >>conftest.$ac_ext
     4087cat >>conftest.$ac_ext <<_ACEOF
     4088/* end confdefs.h.  */
     4089/* Define connect to an innocuous variant, in case <limits.h> declares connect.
     4090   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
     4091#define connect innocuous_connect
     4092
     4093/* System header to define __stub macros and hopefully few prototypes,
     4094    which can conflict with char connect (); below.
     4095    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     4096    <limits.h> exists even on freestanding compilers.  */
     4097
     4098#ifdef __STDC__
     4099# include <limits.h>
     4100#else
     4101# include <assert.h>
     4102#endif
     4103
     4104#undef connect
     4105
     4106/* Override any gcc2 internal prototype to avoid an error.  */
     4107#ifdef __cplusplus
     4108extern "C"
     4109{
     4110#endif
     4111/* We use char because int might match the return type of a gcc2
     4112   builtin and then its argument prototype would still apply.  */
     4113char connect ();
     4114/* The GNU C library defines this for functions which it implements
     4115    to always fail with ENOSYS.  Some functions are actually named
     4116    something starting with __ and the normal name is an alias.  */
     4117#if defined (__stub_connect) || defined (__stub___connect)
     4118choke me
     4119#else
     4120char (*f) () = connect;
     4121#endif
     4122#ifdef __cplusplus
     4123}
     4124#endif
     4125
     4126int
     4127main ()
     4128{
     4129return f != connect;
     4130  ;
     4131  return 0;
     4132}
     4133_ACEOF
     4134rm -f conftest.$ac_objext conftest$ac_exeext
     4135if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     4136  (eval $ac_link) 2>conftest.er1
     4137  ac_status=$?
     4138  grep -v '^ *+' conftest.er1 >conftest.err
     4139  rm -f conftest.er1
     4140  cat conftest.err >&5
     4141  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4142  (exit $ac_status); } &&
     4143         { ac_try='test -z "$ac_c_werror_flag"
     4144                         || test ! -s conftest.err'
     4145  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4146  (eval $ac_try) 2>&5
     4147  ac_status=$?
     4148  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4149  (exit $ac_status); }; } &&
     4150         { ac_try='test -s conftest$ac_exeext'
     4151  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4152  (eval $ac_try) 2>&5
     4153  ac_status=$?
     4154  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4155  (exit $ac_status); }; }; then
     4156  ac_cv_func_connect=yes
     4157else
     4158  echo "$as_me: failed program was:" >&5
     4159sed 's/^/| /' conftest.$ac_ext >&5
     4160
     4161ac_cv_func_connect=no
     4162fi
     4163rm -f conftest.err conftest.$ac_objext \
     4164      conftest$ac_exeext conftest.$ac_ext
     4165fi
     4166echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
     4167echo "${ECHO_T}$ac_cv_func_connect" >&6
     4168if test $ac_cv_func_connect = yes; then
     4169  tcl_checkSocket=0
     4170else
     4171  tcl_checkSocket=1
     4172fi
     4173
     4174    if test "$tcl_checkSocket" = 1; then
     4175        echo "$as_me:$LINENO: checking for setsockopt" >&5
     4176echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
     4177if test "${ac_cv_func_setsockopt+set}" = set; then
     4178  echo $ECHO_N "(cached) $ECHO_C" >&6
     4179else
     4180  cat >conftest.$ac_ext <<_ACEOF
     4181/* confdefs.h.  */
     4182_ACEOF
     4183cat confdefs.h >>conftest.$ac_ext
     4184cat >>conftest.$ac_ext <<_ACEOF
     4185/* end confdefs.h.  */
     4186/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
     4187   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
     4188#define setsockopt innocuous_setsockopt
     4189
     4190/* System header to define __stub macros and hopefully few prototypes,
     4191    which can conflict with char setsockopt (); below.
     4192    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     4193    <limits.h> exists even on freestanding compilers.  */
     4194
     4195#ifdef __STDC__
     4196# include <limits.h>
     4197#else
     4198# include <assert.h>
     4199#endif
     4200
     4201#undef setsockopt
     4202
     4203/* Override any gcc2 internal prototype to avoid an error.  */
     4204#ifdef __cplusplus
     4205extern "C"
     4206{
     4207#endif
     4208/* We use char because int might match the return type of a gcc2
     4209   builtin and then its argument prototype would still apply.  */
     4210char setsockopt ();
     4211/* The GNU C library defines this for functions which it implements
     4212    to always fail with ENOSYS.  Some functions are actually named
     4213    something starting with __ and the normal name is an alias.  */
     4214#if defined (__stub_setsockopt) || defined (__stub___setsockopt)
     4215choke me
     4216#else
     4217char (*f) () = setsockopt;
     4218#endif
     4219#ifdef __cplusplus
     4220}
     4221#endif
     4222
     4223int
     4224main ()
     4225{
     4226return f != setsockopt;
     4227  ;
     4228  return 0;
     4229}
     4230_ACEOF
     4231rm -f conftest.$ac_objext conftest$ac_exeext
     4232if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     4233  (eval $ac_link) 2>conftest.er1
     4234  ac_status=$?
     4235  grep -v '^ *+' conftest.er1 >conftest.err
     4236  rm -f conftest.er1
     4237  cat conftest.err >&5
     4238  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4239  (exit $ac_status); } &&
     4240         { ac_try='test -z "$ac_c_werror_flag"
     4241                         || test ! -s conftest.err'
     4242  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4243  (eval $ac_try) 2>&5
     4244  ac_status=$?
     4245  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4246  (exit $ac_status); }; } &&
     4247         { ac_try='test -s conftest$ac_exeext'
     4248  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4249  (eval $ac_try) 2>&5
     4250  ac_status=$?
     4251  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4252  (exit $ac_status); }; }; then
     4253  ac_cv_func_setsockopt=yes
     4254else
     4255  echo "$as_me: failed program was:" >&5
     4256sed 's/^/| /' conftest.$ac_ext >&5
     4257
     4258ac_cv_func_setsockopt=no
     4259fi
     4260rm -f conftest.err conftest.$ac_objext \
     4261      conftest$ac_exeext conftest.$ac_ext
     4262fi
     4263echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
     4264echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
     4265if test $ac_cv_func_setsockopt = yes; then
     4266  :
     4267else
     4268  echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
     4269echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6
     4270if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
     4271  echo $ECHO_N "(cached) $ECHO_C" >&6
     4272else
     4273  ac_check_lib_save_LIBS=$LIBS
     4274LIBS="-lsocket  $LIBS"
     4275cat >conftest.$ac_ext <<_ACEOF
     4276/* confdefs.h.  */
     4277_ACEOF
     4278cat confdefs.h >>conftest.$ac_ext
     4279cat >>conftest.$ac_ext <<_ACEOF
     4280/* end confdefs.h.  */
     4281
     4282/* Override any gcc2 internal prototype to avoid an error.  */
     4283#ifdef __cplusplus
     4284extern "C"
     4285#endif
     4286/* We use char because int might match the return type of a gcc2
     4287   builtin and then its argument prototype would still apply.  */
     4288char setsockopt ();
     4289int
     4290main ()
     4291{
     4292setsockopt ();
     4293  ;
     4294  return 0;
     4295}
     4296_ACEOF
     4297rm -f conftest.$ac_objext conftest$ac_exeext
     4298if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     4299  (eval $ac_link) 2>conftest.er1
     4300  ac_status=$?
     4301  grep -v '^ *+' conftest.er1 >conftest.err
     4302  rm -f conftest.er1
     4303  cat conftest.err >&5
     4304  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4305  (exit $ac_status); } &&
     4306         { ac_try='test -z "$ac_c_werror_flag"
     4307                         || test ! -s conftest.err'
     4308  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4309  (eval $ac_try) 2>&5
     4310  ac_status=$?
     4311  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4312  (exit $ac_status); }; } &&
     4313         { ac_try='test -s conftest$ac_exeext'
     4314  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4315  (eval $ac_try) 2>&5
     4316  ac_status=$?
     4317  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4318  (exit $ac_status); }; }; then
     4319  ac_cv_lib_socket_setsockopt=yes
     4320else
     4321  echo "$as_me: failed program was:" >&5
     4322sed 's/^/| /' conftest.$ac_ext >&5
     4323
     4324ac_cv_lib_socket_setsockopt=no
     4325fi
     4326rm -f conftest.err conftest.$ac_objext \
     4327      conftest$ac_exeext conftest.$ac_ext
     4328LIBS=$ac_check_lib_save_LIBS
     4329fi
     4330echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
     4331echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6
     4332if test $ac_cv_lib_socket_setsockopt = yes; then
     4333  LIBS="$LIBS -lsocket"
     4334else
     4335  tcl_checkBoth=1
     4336fi
     4337
     4338fi
     4339
     4340    fi
     4341    if test "$tcl_checkBoth" = 1; then
     4342        tk_oldLibs=$LIBS
     4343        LIBS="$LIBS -lsocket -lnsl"
     4344        echo "$as_me:$LINENO: checking for accept" >&5
     4345echo $ECHO_N "checking for accept... $ECHO_C" >&6
     4346if test "${ac_cv_func_accept+set}" = set; then
     4347  echo $ECHO_N "(cached) $ECHO_C" >&6
     4348else
     4349  cat >conftest.$ac_ext <<_ACEOF
     4350/* confdefs.h.  */
     4351_ACEOF
     4352cat confdefs.h >>conftest.$ac_ext
     4353cat >>conftest.$ac_ext <<_ACEOF
     4354/* end confdefs.h.  */
     4355/* Define accept to an innocuous variant, in case <limits.h> declares accept.
     4356   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
     4357#define accept innocuous_accept
     4358
     4359/* System header to define __stub macros and hopefully few prototypes,
     4360    which can conflict with char accept (); below.
     4361    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     4362    <limits.h> exists even on freestanding compilers.  */
     4363
     4364#ifdef __STDC__
     4365# include <limits.h>
     4366#else
     4367# include <assert.h>
     4368#endif
     4369
     4370#undef accept
     4371
     4372/* Override any gcc2 internal prototype to avoid an error.  */
     4373#ifdef __cplusplus
     4374extern "C"
     4375{
     4376#endif
     4377/* We use char because int might match the return type of a gcc2
     4378   builtin and then its argument prototype would still apply.  */
     4379char accept ();
     4380/* The GNU C library defines this for functions which it implements
     4381    to always fail with ENOSYS.  Some functions are actually named
     4382    something starting with __ and the normal name is an alias.  */
     4383#if defined (__stub_accept) || defined (__stub___accept)
     4384choke me
     4385#else
     4386char (*f) () = accept;
     4387#endif
     4388#ifdef __cplusplus
     4389}
     4390#endif
     4391
     4392int
     4393main ()
     4394{
     4395return f != accept;
     4396  ;
     4397  return 0;
     4398}
     4399_ACEOF
     4400rm -f conftest.$ac_objext conftest$ac_exeext
     4401if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     4402  (eval $ac_link) 2>conftest.er1
     4403  ac_status=$?
     4404  grep -v '^ *+' conftest.er1 >conftest.err
     4405  rm -f conftest.er1
     4406  cat conftest.err >&5
     4407  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4408  (exit $ac_status); } &&
     4409         { ac_try='test -z "$ac_c_werror_flag"
     4410                         || test ! -s conftest.err'
     4411  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4412  (eval $ac_try) 2>&5
     4413  ac_status=$?
     4414  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4415  (exit $ac_status); }; } &&
     4416         { ac_try='test -s conftest$ac_exeext'
     4417  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4418  (eval $ac_try) 2>&5
     4419  ac_status=$?
     4420  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4421  (exit $ac_status); }; }; then
     4422  ac_cv_func_accept=yes
     4423else
     4424  echo "$as_me: failed program was:" >&5
     4425sed 's/^/| /' conftest.$ac_ext >&5
     4426
     4427ac_cv_func_accept=no
     4428fi
     4429rm -f conftest.err conftest.$ac_objext \
     4430      conftest$ac_exeext conftest.$ac_ext
     4431fi
     4432echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
     4433echo "${ECHO_T}$ac_cv_func_accept" >&6
     4434if test $ac_cv_func_accept = yes; then
     4435  tcl_checkNsl=0
     4436else
     4437  LIBS=$tk_oldLibs
     4438fi
     4439
     4440    fi
     4441    echo "$as_me:$LINENO: checking for gethostbyname" >&5
     4442echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
     4443if test "${ac_cv_func_gethostbyname+set}" = set; then
     4444  echo $ECHO_N "(cached) $ECHO_C" >&6
     4445else
     4446  cat >conftest.$ac_ext <<_ACEOF
     4447/* confdefs.h.  */
     4448_ACEOF
     4449cat confdefs.h >>conftest.$ac_ext
     4450cat >>conftest.$ac_ext <<_ACEOF
     4451/* end confdefs.h.  */
     4452/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
     4453   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
     4454#define gethostbyname innocuous_gethostbyname
     4455
     4456/* System header to define __stub macros and hopefully few prototypes,
     4457    which can conflict with char gethostbyname (); below.
     4458    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     4459    <limits.h> exists even on freestanding compilers.  */
     4460
     4461#ifdef __STDC__
     4462# include <limits.h>
     4463#else
     4464# include <assert.h>
     4465#endif
     4466
     4467#undef gethostbyname
     4468
     4469/* Override any gcc2 internal prototype to avoid an error.  */
     4470#ifdef __cplusplus
     4471extern "C"
     4472{
     4473#endif
     4474/* We use char because int might match the return type of a gcc2
     4475   builtin and then its argument prototype would still apply.  */
     4476char gethostbyname ();
     4477/* The GNU C library defines this for functions which it implements
     4478    to always fail with ENOSYS.  Some functions are actually named
     4479    something starting with __ and the normal name is an alias.  */
     4480#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
     4481choke me
     4482#else
     4483char (*f) () = gethostbyname;
     4484#endif
     4485#ifdef __cplusplus
     4486}
     4487#endif
     4488
     4489int
     4490main ()
     4491{
     4492return f != gethostbyname;
     4493  ;
     4494  return 0;
     4495}
     4496_ACEOF
     4497rm -f conftest.$ac_objext conftest$ac_exeext
     4498if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     4499  (eval $ac_link) 2>conftest.er1
     4500  ac_status=$?
     4501  grep -v '^ *+' conftest.er1 >conftest.err
     4502  rm -f conftest.er1
     4503  cat conftest.err >&5
     4504  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4505  (exit $ac_status); } &&
     4506         { ac_try='test -z "$ac_c_werror_flag"
     4507                         || test ! -s conftest.err'
     4508  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4509  (eval $ac_try) 2>&5
     4510  ac_status=$?
     4511  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4512  (exit $ac_status); }; } &&
     4513         { ac_try='test -s conftest$ac_exeext'
     4514  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4515  (eval $ac_try) 2>&5
     4516  ac_status=$?
     4517  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4518  (exit $ac_status); }; }; then
     4519  ac_cv_func_gethostbyname=yes
     4520else
     4521  echo "$as_me: failed program was:" >&5
     4522sed 's/^/| /' conftest.$ac_ext >&5
     4523
     4524ac_cv_func_gethostbyname=no
     4525fi
     4526rm -f conftest.err conftest.$ac_objext \
     4527      conftest$ac_exeext conftest.$ac_ext
     4528fi
     4529echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
     4530echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
     4531if test $ac_cv_func_gethostbyname = yes; then
     4532  :
     4533else
     4534  echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
     4535echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
     4536if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
     4537  echo $ECHO_N "(cached) $ECHO_C" >&6
     4538else
     4539  ac_check_lib_save_LIBS=$LIBS
     4540LIBS="-lnsl  $LIBS"
     4541cat >conftest.$ac_ext <<_ACEOF
     4542/* confdefs.h.  */
     4543_ACEOF
     4544cat confdefs.h >>conftest.$ac_ext
     4545cat >>conftest.$ac_ext <<_ACEOF
     4546/* end confdefs.h.  */
     4547
     4548/* Override any gcc2 internal prototype to avoid an error.  */
     4549#ifdef __cplusplus
     4550extern "C"
     4551#endif
     4552/* We use char because int might match the return type of a gcc2
     4553   builtin and then its argument prototype would still apply.  */
     4554char gethostbyname ();
     4555int
     4556main ()
     4557{
     4558gethostbyname ();
     4559  ;
     4560  return 0;
     4561}
     4562_ACEOF
     4563rm -f conftest.$ac_objext conftest$ac_exeext
     4564if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     4565  (eval $ac_link) 2>conftest.er1
     4566  ac_status=$?
     4567  grep -v '^ *+' conftest.er1 >conftest.err
     4568  rm -f conftest.er1
     4569  cat conftest.err >&5
     4570  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4571  (exit $ac_status); } &&
     4572         { ac_try='test -z "$ac_c_werror_flag"
     4573                         || test ! -s conftest.err'
     4574  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4575  (eval $ac_try) 2>&5
     4576  ac_status=$?
     4577  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4578  (exit $ac_status); }; } &&
     4579         { ac_try='test -s conftest$ac_exeext'
     4580  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4581  (eval $ac_try) 2>&5
     4582  ac_status=$?
     4583  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4584  (exit $ac_status); }; }; then
     4585  ac_cv_lib_nsl_gethostbyname=yes
     4586else
     4587  echo "$as_me: failed program was:" >&5
     4588sed 's/^/| /' conftest.$ac_ext >&5
     4589
     4590ac_cv_lib_nsl_gethostbyname=no
     4591fi
     4592rm -f conftest.err conftest.$ac_objext \
     4593      conftest$ac_exeext conftest.$ac_ext
     4594LIBS=$ac_check_lib_save_LIBS
     4595fi
     4596echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
     4597echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
     4598if test $ac_cv_lib_nsl_gethostbyname = yes; then
     4599  LIBS="$LIBS -lnsl"
     4600fi
     4601
     4602fi
     4603
     4604
     4605    # Don't perform the eval of the libraries here because DL_LIBS
     4606    # won't be set until we call TEA_CONFIG_CFLAGS
     4607
     4608    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
     4609
     4610
     4611
     4612
     4613    echo "$as_me:$LINENO: checking dirent.h" >&5
     4614echo $ECHO_N "checking dirent.h... $ECHO_C" >&6
     4615if test "${tcl_cv_dirent_h+set}" = set; then
     4616  echo $ECHO_N "(cached) $ECHO_C" >&6
     4617else
     4618  cat >conftest.$ac_ext <<_ACEOF
     4619/* confdefs.h.  */
     4620_ACEOF
     4621cat confdefs.h >>conftest.$ac_ext
     4622cat >>conftest.$ac_ext <<_ACEOF
     4623/* end confdefs.h.  */
     4624#include <sys/types.h>
     4625#include <dirent.h>
     4626int
     4627main ()
     4628{
     4629
     4630#ifndef _POSIX_SOURCE
     4631#   ifdef __Lynx__
     4632        /*
     4633         * Generate compilation error to make the test fail:  Lynx headers
     4634         * are only valid if really in the POSIX environment.
     4635         */
     4636
     4637        missing_procedure();
     4638#   endif
     4639#endif
     4640DIR *d;
     4641struct dirent *entryPtr;
     4642char *p;
     4643d = opendir("foobar");
     4644entryPtr = readdir(d);
     4645p = entryPtr->d_name;
     4646closedir(d);
     4647
     4648  ;
     4649  return 0;
     4650}
     4651_ACEOF
     4652rm -f conftest.$ac_objext conftest$ac_exeext
     4653if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     4654  (eval $ac_link) 2>conftest.er1
     4655  ac_status=$?
     4656  grep -v '^ *+' conftest.er1 >conftest.err
     4657  rm -f conftest.er1
     4658  cat conftest.err >&5
     4659  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4660  (exit $ac_status); } &&
     4661         { ac_try='test -z "$ac_c_werror_flag"
     4662                         || test ! -s conftest.err'
     4663  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4664  (eval $ac_try) 2>&5
     4665  ac_status=$?
     4666  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4667  (exit $ac_status); }; } &&
     4668         { ac_try='test -s conftest$ac_exeext'
     4669  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4670  (eval $ac_try) 2>&5
     4671  ac_status=$?
     4672  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4673  (exit $ac_status); }; }; then
     4674  tcl_cv_dirent_h=yes
     4675else
     4676  echo "$as_me: failed program was:" >&5
     4677sed 's/^/| /' conftest.$ac_ext >&5
     4678
     4679tcl_cv_dirent_h=no
     4680fi
     4681rm -f conftest.err conftest.$ac_objext \
     4682      conftest$ac_exeext conftest.$ac_ext
     4683fi
     4684echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
     4685echo "${ECHO_T}$tcl_cv_dirent_h" >&6
     4686
     4687    if test $tcl_cv_dirent_h = no; then
     4688
     4689cat >>confdefs.h <<\_ACEOF
     4690#define NO_DIRENT_H 1
     4691_ACEOF
     4692
     4693    fi
     4694
     4695    if test "${ac_cv_header_errno_h+set}" = set; then
     4696  echo "$as_me:$LINENO: checking for errno.h" >&5
     4697echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
     4698if test "${ac_cv_header_errno_h+set}" = set; then
     4699  echo $ECHO_N "(cached) $ECHO_C" >&6
     4700fi
     4701echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
     4702echo "${ECHO_T}$ac_cv_header_errno_h" >&6
     4703else
     4704  # Is the header compilable?
     4705echo "$as_me:$LINENO: checking errno.h usability" >&5
     4706echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6
     4707cat >conftest.$ac_ext <<_ACEOF
     4708/* confdefs.h.  */
     4709_ACEOF
     4710cat confdefs.h >>conftest.$ac_ext
     4711cat >>conftest.$ac_ext <<_ACEOF
     4712/* end confdefs.h.  */
     4713$ac_includes_default
     4714#include <errno.h>
     4715_ACEOF
     4716rm -f conftest.$ac_objext
     4717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     4718  (eval $ac_compile) 2>conftest.er1
     4719  ac_status=$?
     4720  grep -v '^ *+' conftest.er1 >conftest.err
     4721  rm -f conftest.er1
     4722  cat conftest.err >&5
     4723  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4724  (exit $ac_status); } &&
     4725         { ac_try='test -z "$ac_c_werror_flag"
     4726                         || test ! -s conftest.err'
     4727  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4728  (eval $ac_try) 2>&5
     4729  ac_status=$?
     4730  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4731  (exit $ac_status); }; } &&
     4732         { ac_try='test -s conftest.$ac_objext'
     4733  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4734  (eval $ac_try) 2>&5
     4735  ac_status=$?
     4736  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4737  (exit $ac_status); }; }; then
     4738  ac_header_compiler=yes
     4739else
     4740  echo "$as_me: failed program was:" >&5
     4741sed 's/^/| /' conftest.$ac_ext >&5
     4742
     4743ac_header_compiler=no
     4744fi
     4745rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     4746echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     4747echo "${ECHO_T}$ac_header_compiler" >&6
     4748
     4749# Is the header present?
     4750echo "$as_me:$LINENO: checking errno.h presence" >&5
     4751echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6
     4752cat >conftest.$ac_ext <<_ACEOF
     4753/* confdefs.h.  */
     4754_ACEOF
     4755cat confdefs.h >>conftest.$ac_ext
     4756cat >>conftest.$ac_ext <<_ACEOF
     4757/* end confdefs.h.  */
     4758#include <errno.h>
     4759_ACEOF
     4760if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     4761  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     4762  ac_status=$?
     4763  grep -v '^ *+' conftest.er1 >conftest.err
     4764  rm -f conftest.er1
     4765  cat conftest.err >&5
     4766  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4767  (exit $ac_status); } >/dev/null; then
     4768  if test -s conftest.err; then
     4769    ac_cpp_err=$ac_c_preproc_warn_flag
     4770    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     4771  else
     4772    ac_cpp_err=
     4773  fi
     4774else
     4775  ac_cpp_err=yes
     4776fi
     4777if test -z "$ac_cpp_err"; then
     4778  ac_header_preproc=yes
     4779else
     4780  echo "$as_me: failed program was:" >&5
     4781sed 's/^/| /' conftest.$ac_ext >&5
     4782
     4783  ac_header_preproc=no
     4784fi
     4785rm -f conftest.err conftest.$ac_ext
     4786echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     4787echo "${ECHO_T}$ac_header_preproc" >&6
     4788
     4789# So?  What about this header?
     4790case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     4791  yes:no: )
     4792    { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
     4793echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
     4794    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
     4795echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
     4796    ac_header_preproc=yes
     4797    ;;
     4798  no:yes:* )
     4799    { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
     4800echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
     4801    { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
     4802echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
     4803    { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
     4804echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
     4805    { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
     4806echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
     4807    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
     4808echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
     4809    { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
     4810echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
     4811    (
     4812      cat <<\_ASBOX
     4813## -------------------------------------- ##
     4814## Report this to the RapptureGUI lists.  ##
     4815## -------------------------------------- ##
     4816_ASBOX
     4817    ) |
     4818      sed "s/^/$as_me: WARNING:     /" >&2
     4819    ;;
     4820esac
     4821echo "$as_me:$LINENO: checking for errno.h" >&5
     4822echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
     4823if test "${ac_cv_header_errno_h+set}" = set; then
     4824  echo $ECHO_N "(cached) $ECHO_C" >&6
     4825else
     4826  ac_cv_header_errno_h=$ac_header_preproc
     4827fi
     4828echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
     4829echo "${ECHO_T}$ac_cv_header_errno_h" >&6
     4830
     4831fi
     4832if test $ac_cv_header_errno_h = yes; then
     4833  :
     4834else
     4835
     4836cat >>confdefs.h <<\_ACEOF
     4837#define NO_ERRNO_H 1
     4838_ACEOF
     4839
     4840fi
     4841
     4842
     4843    if test "${ac_cv_header_float_h+set}" = set; then
     4844  echo "$as_me:$LINENO: checking for float.h" >&5
     4845echo $ECHO_N "checking for float.h... $ECHO_C" >&6
     4846if test "${ac_cv_header_float_h+set}" = set; then
     4847  echo $ECHO_N "(cached) $ECHO_C" >&6
     4848fi
     4849echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
     4850echo "${ECHO_T}$ac_cv_header_float_h" >&6
     4851else
     4852  # Is the header compilable?
     4853echo "$as_me:$LINENO: checking float.h usability" >&5
     4854echo $ECHO_N "checking float.h usability... $ECHO_C" >&6
     4855cat >conftest.$ac_ext <<_ACEOF
     4856/* confdefs.h.  */
     4857_ACEOF
     4858cat confdefs.h >>conftest.$ac_ext
     4859cat >>conftest.$ac_ext <<_ACEOF
     4860/* end confdefs.h.  */
     4861$ac_includes_default
     4862#include <float.h>
     4863_ACEOF
     4864rm -f conftest.$ac_objext
     4865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     4866  (eval $ac_compile) 2>conftest.er1
     4867  ac_status=$?
     4868  grep -v '^ *+' conftest.er1 >conftest.err
     4869  rm -f conftest.er1
     4870  cat conftest.err >&5
     4871  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4872  (exit $ac_status); } &&
     4873         { ac_try='test -z "$ac_c_werror_flag"
     4874                         || test ! -s conftest.err'
     4875  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4876  (eval $ac_try) 2>&5
     4877  ac_status=$?
     4878  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4879  (exit $ac_status); }; } &&
     4880         { ac_try='test -s conftest.$ac_objext'
     4881  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4882  (eval $ac_try) 2>&5
     4883  ac_status=$?
     4884  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4885  (exit $ac_status); }; }; then
     4886  ac_header_compiler=yes
     4887else
     4888  echo "$as_me: failed program was:" >&5
     4889sed 's/^/| /' conftest.$ac_ext >&5
     4890
     4891ac_header_compiler=no
     4892fi
     4893rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     4894echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     4895echo "${ECHO_T}$ac_header_compiler" >&6
     4896
     4897# Is the header present?
     4898echo "$as_me:$LINENO: checking float.h presence" >&5
     4899echo $ECHO_N "checking float.h presence... $ECHO_C" >&6
     4900cat >conftest.$ac_ext <<_ACEOF
     4901/* confdefs.h.  */
     4902_ACEOF
     4903cat confdefs.h >>conftest.$ac_ext
     4904cat >>conftest.$ac_ext <<_ACEOF
     4905/* end confdefs.h.  */
     4906#include <float.h>
     4907_ACEOF
     4908if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     4909  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     4910  ac_status=$?
     4911  grep -v '^ *+' conftest.er1 >conftest.err
     4912  rm -f conftest.er1
     4913  cat conftest.err >&5
     4914  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4915  (exit $ac_status); } >/dev/null; then
     4916  if test -s conftest.err; then
     4917    ac_cpp_err=$ac_c_preproc_warn_flag
     4918    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     4919  else
     4920    ac_cpp_err=
     4921  fi
     4922else
     4923  ac_cpp_err=yes
     4924fi
     4925if test -z "$ac_cpp_err"; then
     4926  ac_header_preproc=yes
     4927else
     4928  echo "$as_me: failed program was:" >&5
     4929sed 's/^/| /' conftest.$ac_ext >&5
     4930
     4931  ac_header_preproc=no
     4932fi
     4933rm -f conftest.err conftest.$ac_ext
     4934echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     4935echo "${ECHO_T}$ac_header_preproc" >&6
     4936
     4937# So?  What about this header?
     4938case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     4939  yes:no: )
     4940    { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
     4941echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
     4942    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
     4943echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
     4944    ac_header_preproc=yes
     4945    ;;
     4946  no:yes:* )
     4947    { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
     4948echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
     4949    { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
     4950echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
     4951    { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
     4952echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
     4953    { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
     4954echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
     4955    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
     4956echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
     4957    { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
     4958echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
     4959    (
     4960      cat <<\_ASBOX
     4961## -------------------------------------- ##
     4962## Report this to the RapptureGUI lists.  ##
     4963## -------------------------------------- ##
     4964_ASBOX
     4965    ) |
     4966      sed "s/^/$as_me: WARNING:     /" >&2
     4967    ;;
     4968esac
     4969echo "$as_me:$LINENO: checking for float.h" >&5
     4970echo $ECHO_N "checking for float.h... $ECHO_C" >&6
     4971if test "${ac_cv_header_float_h+set}" = set; then
     4972  echo $ECHO_N "(cached) $ECHO_C" >&6
     4973else
     4974  ac_cv_header_float_h=$ac_header_preproc
     4975fi
     4976echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
     4977echo "${ECHO_T}$ac_cv_header_float_h" >&6
     4978
     4979fi
     4980if test $ac_cv_header_float_h = yes; then
     4981  :
     4982else
     4983
     4984cat >>confdefs.h <<\_ACEOF
     4985#define NO_FLOAT_H 1
     4986_ACEOF
     4987
     4988fi
     4989
     4990
     4991    if test "${ac_cv_header_values_h+set}" = set; then
     4992  echo "$as_me:$LINENO: checking for values.h" >&5
     4993echo $ECHO_N "checking for values.h... $ECHO_C" >&6
     4994if test "${ac_cv_header_values_h+set}" = set; then
     4995  echo $ECHO_N "(cached) $ECHO_C" >&6
     4996fi
     4997echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
     4998echo "${ECHO_T}$ac_cv_header_values_h" >&6
     4999else
     5000  # Is the header compilable?
     5001echo "$as_me:$LINENO: checking values.h usability" >&5
     5002echo $ECHO_N "checking values.h usability... $ECHO_C" >&6
     5003cat >conftest.$ac_ext <<_ACEOF
     5004/* confdefs.h.  */
     5005_ACEOF
     5006cat confdefs.h >>conftest.$ac_ext
     5007cat >>conftest.$ac_ext <<_ACEOF
     5008/* end confdefs.h.  */
     5009$ac_includes_default
     5010#include <values.h>
     5011_ACEOF
     5012rm -f conftest.$ac_objext
     5013if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     5014  (eval $ac_compile) 2>conftest.er1
     5015  ac_status=$?
     5016  grep -v '^ *+' conftest.er1 >conftest.err
     5017  rm -f conftest.er1
     5018  cat conftest.err >&5
     5019  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5020  (exit $ac_status); } &&
     5021         { ac_try='test -z "$ac_c_werror_flag"
     5022                         || test ! -s conftest.err'
     5023  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5024  (eval $ac_try) 2>&5
     5025  ac_status=$?
     5026  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5027  (exit $ac_status); }; } &&
     5028         { ac_try='test -s conftest.$ac_objext'
     5029  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5030  (eval $ac_try) 2>&5
     5031  ac_status=$?
     5032  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5033  (exit $ac_status); }; }; then
     5034  ac_header_compiler=yes
     5035else
     5036  echo "$as_me: failed program was:" >&5
     5037sed 's/^/| /' conftest.$ac_ext >&5
     5038
     5039ac_header_compiler=no
     5040fi
     5041rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     5042echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     5043echo "${ECHO_T}$ac_header_compiler" >&6
     5044
     5045# Is the header present?
     5046echo "$as_me:$LINENO: checking values.h presence" >&5
     5047echo $ECHO_N "checking values.h presence... $ECHO_C" >&6
     5048cat >conftest.$ac_ext <<_ACEOF
     5049/* confdefs.h.  */
     5050_ACEOF
     5051cat confdefs.h >>conftest.$ac_ext
     5052cat >>conftest.$ac_ext <<_ACEOF
     5053/* end confdefs.h.  */
     5054#include <values.h>
     5055_ACEOF
     5056if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     5057  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     5058  ac_status=$?
     5059  grep -v '^ *+' conftest.er1 >conftest.err
     5060  rm -f conftest.er1
     5061  cat conftest.err >&5
     5062  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5063  (exit $ac_status); } >/dev/null; then
     5064  if test -s conftest.err; then
     5065    ac_cpp_err=$ac_c_preproc_warn_flag
     5066    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     5067  else
     5068    ac_cpp_err=
     5069  fi
     5070else
     5071  ac_cpp_err=yes
     5072fi
     5073if test -z "$ac_cpp_err"; then
     5074  ac_header_preproc=yes
     5075else
     5076  echo "$as_me: failed program was:" >&5
     5077sed 's/^/| /' conftest.$ac_ext >&5
     5078
     5079  ac_header_preproc=no
     5080fi
     5081rm -f conftest.err conftest.$ac_ext
     5082echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     5083echo "${ECHO_T}$ac_header_preproc" >&6
     5084
     5085# So?  What about this header?
     5086case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     5087  yes:no: )
     5088    { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
     5089echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
     5090    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
     5091echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
     5092    ac_header_preproc=yes
     5093    ;;
     5094  no:yes:* )
     5095    { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
     5096echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
     5097    { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
     5098echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
     5099    { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
     5100echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
     5101    { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
     5102echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
     5103    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
     5104echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
     5105    { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
     5106echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
     5107    (
     5108      cat <<\_ASBOX
     5109## -------------------------------------- ##
     5110## Report this to the RapptureGUI lists.  ##
     5111## -------------------------------------- ##
     5112_ASBOX
     5113    ) |
     5114      sed "s/^/$as_me: WARNING:     /" >&2
     5115    ;;
     5116esac
     5117echo "$as_me:$LINENO: checking for values.h" >&5
     5118echo $ECHO_N "checking for values.h... $ECHO_C" >&6
     5119if test "${ac_cv_header_values_h+set}" = set; then
     5120  echo $ECHO_N "(cached) $ECHO_C" >&6
     5121else
     5122  ac_cv_header_values_h=$ac_header_preproc
     5123fi
     5124echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
     5125echo "${ECHO_T}$ac_cv_header_values_h" >&6
     5126
     5127fi
     5128if test $ac_cv_header_values_h = yes; then
     5129  :
     5130else
     5131
     5132cat >>confdefs.h <<\_ACEOF
     5133#define NO_VALUES_H 1
     5134_ACEOF
     5135
     5136fi
     5137
     5138
     5139    if test "${ac_cv_header_limits_h+set}" = set; then
     5140  echo "$as_me:$LINENO: checking for limits.h" >&5
     5141echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
     5142if test "${ac_cv_header_limits_h+set}" = set; then
     5143  echo $ECHO_N "(cached) $ECHO_C" >&6
     5144fi
     5145echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
     5146echo "${ECHO_T}$ac_cv_header_limits_h" >&6
     5147else
     5148  # Is the header compilable?
     5149echo "$as_me:$LINENO: checking limits.h usability" >&5
     5150echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6
     5151cat >conftest.$ac_ext <<_ACEOF
     5152/* confdefs.h.  */
     5153_ACEOF
     5154cat confdefs.h >>conftest.$ac_ext
     5155cat >>conftest.$ac_ext <<_ACEOF
     5156/* end confdefs.h.  */
     5157$ac_includes_default
     5158#include <limits.h>
     5159_ACEOF
     5160rm -f conftest.$ac_objext
     5161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     5162  (eval $ac_compile) 2>conftest.er1
     5163  ac_status=$?
     5164  grep -v '^ *+' conftest.er1 >conftest.err
     5165  rm -f conftest.er1
     5166  cat conftest.err >&5
     5167  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5168  (exit $ac_status); } &&
     5169         { ac_try='test -z "$ac_c_werror_flag"
     5170                         || test ! -s conftest.err'
     5171  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5172  (eval $ac_try) 2>&5
     5173  ac_status=$?
     5174  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5175  (exit $ac_status); }; } &&
     5176         { ac_try='test -s conftest.$ac_objext'
     5177  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5178  (eval $ac_try) 2>&5
     5179  ac_status=$?
     5180  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5181  (exit $ac_status); }; }; then
     5182  ac_header_compiler=yes
     5183else
     5184  echo "$as_me: failed program was:" >&5
     5185sed 's/^/| /' conftest.$ac_ext >&5
     5186
     5187ac_header_compiler=no
     5188fi
     5189rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     5190echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     5191echo "${ECHO_T}$ac_header_compiler" >&6
     5192
     5193# Is the header present?
     5194echo "$as_me:$LINENO: checking limits.h presence" >&5
     5195echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6
     5196cat >conftest.$ac_ext <<_ACEOF
     5197/* confdefs.h.  */
     5198_ACEOF
     5199cat confdefs.h >>conftest.$ac_ext
     5200cat >>conftest.$ac_ext <<_ACEOF
     5201/* end confdefs.h.  */
     5202#include <limits.h>
     5203_ACEOF
     5204if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     5205  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     5206  ac_status=$?
     5207  grep -v '^ *+' conftest.er1 >conftest.err
     5208  rm -f conftest.er1
     5209  cat conftest.err >&5
     5210  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5211  (exit $ac_status); } >/dev/null; then
     5212  if test -s conftest.err; then
     5213    ac_cpp_err=$ac_c_preproc_warn_flag
     5214    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     5215  else
     5216    ac_cpp_err=
     5217  fi
     5218else
     5219  ac_cpp_err=yes
     5220fi
     5221if test -z "$ac_cpp_err"; then
     5222  ac_header_preproc=yes
     5223else
     5224  echo "$as_me: failed program was:" >&5
     5225sed 's/^/| /' conftest.$ac_ext >&5
     5226
     5227  ac_header_preproc=no
     5228fi
     5229rm -f conftest.err conftest.$ac_ext
     5230echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     5231echo "${ECHO_T}$ac_header_preproc" >&6
     5232
     5233# So?  What about this header?
     5234case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     5235  yes:no: )
     5236    { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
     5237echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
     5238    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
     5239echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
     5240    ac_header_preproc=yes
     5241    ;;
     5242  no:yes:* )
     5243    { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
     5244echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
     5245    { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
     5246echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
     5247    { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
     5248echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
     5249    { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
     5250echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
     5251    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
     5252echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
     5253    { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
     5254echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
     5255    (
     5256      cat <<\_ASBOX
     5257## -------------------------------------- ##
     5258## Report this to the RapptureGUI lists.  ##
     5259## -------------------------------------- ##
     5260_ASBOX
     5261    ) |
     5262      sed "s/^/$as_me: WARNING:     /" >&2
     5263    ;;
     5264esac
     5265echo "$as_me:$LINENO: checking for limits.h" >&5
     5266echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
     5267if test "${ac_cv_header_limits_h+set}" = set; then
     5268  echo $ECHO_N "(cached) $ECHO_C" >&6
     5269else
     5270  ac_cv_header_limits_h=$ac_header_preproc
     5271fi
     5272echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
     5273echo "${ECHO_T}$ac_cv_header_limits_h" >&6
     5274
     5275fi
     5276if test $ac_cv_header_limits_h = yes; then
     5277
     5278cat >>confdefs.h <<\_ACEOF
     5279#define HAVE_LIMITS_H 1
     5280_ACEOF
     5281
     5282else
     5283
     5284cat >>confdefs.h <<\_ACEOF
     5285#define NO_LIMITS_H 1
     5286_ACEOF
     5287
     5288fi
     5289
     5290
     5291    if test "${ac_cv_header_stdlib_h+set}" = set; then
     5292  echo "$as_me:$LINENO: checking for stdlib.h" >&5
     5293echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
     5294if test "${ac_cv_header_stdlib_h+set}" = set; then
     5295  echo $ECHO_N "(cached) $ECHO_C" >&6
     5296fi
     5297echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
     5298echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
     5299else
     5300  # Is the header compilable?
     5301echo "$as_me:$LINENO: checking stdlib.h usability" >&5
     5302echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6
     5303cat >conftest.$ac_ext <<_ACEOF
     5304/* confdefs.h.  */
     5305_ACEOF
     5306cat confdefs.h >>conftest.$ac_ext
     5307cat >>conftest.$ac_ext <<_ACEOF
     5308/* end confdefs.h.  */
     5309$ac_includes_default
     5310#include <stdlib.h>
     5311_ACEOF
     5312rm -f conftest.$ac_objext
     5313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     5314  (eval $ac_compile) 2>conftest.er1
     5315  ac_status=$?
     5316  grep -v '^ *+' conftest.er1 >conftest.err
     5317  rm -f conftest.er1
     5318  cat conftest.err >&5
     5319  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5320  (exit $ac_status); } &&
     5321         { ac_try='test -z "$ac_c_werror_flag"
     5322                         || test ! -s conftest.err'
     5323  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5324  (eval $ac_try) 2>&5
     5325  ac_status=$?
     5326  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5327  (exit $ac_status); }; } &&
     5328         { ac_try='test -s conftest.$ac_objext'
     5329  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5330  (eval $ac_try) 2>&5
     5331  ac_status=$?
     5332  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5333  (exit $ac_status); }; }; then
     5334  ac_header_compiler=yes
     5335else
     5336  echo "$as_me: failed program was:" >&5
     5337sed 's/^/| /' conftest.$ac_ext >&5
     5338
     5339ac_header_compiler=no
     5340fi
     5341rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     5342echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     5343echo "${ECHO_T}$ac_header_compiler" >&6
     5344
     5345# Is the header present?
     5346echo "$as_me:$LINENO: checking stdlib.h presence" >&5
     5347echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6
     5348cat >conftest.$ac_ext <<_ACEOF
     5349/* confdefs.h.  */
     5350_ACEOF
     5351cat confdefs.h >>conftest.$ac_ext
     5352cat >>conftest.$ac_ext <<_ACEOF
     5353/* end confdefs.h.  */
     5354#include <stdlib.h>
     5355_ACEOF
     5356if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     5357  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     5358  ac_status=$?
     5359  grep -v '^ *+' conftest.er1 >conftest.err
     5360  rm -f conftest.er1
     5361  cat conftest.err >&5
     5362  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5363  (exit $ac_status); } >/dev/null; then
     5364  if test -s conftest.err; then
     5365    ac_cpp_err=$ac_c_preproc_warn_flag
     5366    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     5367  else
     5368    ac_cpp_err=
     5369  fi
     5370else
     5371  ac_cpp_err=yes
     5372fi
     5373if test -z "$ac_cpp_err"; then
     5374  ac_header_preproc=yes
     5375else
     5376  echo "$as_me: failed program was:" >&5
     5377sed 's/^/| /' conftest.$ac_ext >&5
     5378
     5379  ac_header_preproc=no
     5380fi
     5381rm -f conftest.err conftest.$ac_ext
     5382echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     5383echo "${ECHO_T}$ac_header_preproc" >&6
     5384
     5385# So?  What about this header?
     5386case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     5387  yes:no: )
     5388    { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
     5389echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
     5390    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
     5391echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
     5392    ac_header_preproc=yes
     5393    ;;
     5394  no:yes:* )
     5395    { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
     5396echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
     5397    { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
     5398echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
     5399    { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
     5400echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
     5401    { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
     5402echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
     5403    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
     5404echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
     5405    { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
     5406echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
     5407    (
     5408      cat <<\_ASBOX
     5409## -------------------------------------- ##
     5410## Report this to the RapptureGUI lists.  ##
     5411## -------------------------------------- ##
     5412_ASBOX
     5413    ) |
     5414      sed "s/^/$as_me: WARNING:     /" >&2
     5415    ;;
     5416esac
     5417echo "$as_me:$LINENO: checking for stdlib.h" >&5
     5418echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
     5419if test "${ac_cv_header_stdlib_h+set}" = set; then
     5420  echo $ECHO_N "(cached) $ECHO_C" >&6
     5421else
     5422  ac_cv_header_stdlib_h=$ac_header_preproc
     5423fi
     5424echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
     5425echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
     5426
     5427fi
     5428if test $ac_cv_header_stdlib_h = yes; then
     5429  tcl_ok=1
     5430else
     5431  tcl_ok=0
     5432fi
     5433
     5434
     5435    cat >conftest.$ac_ext <<_ACEOF
     5436/* confdefs.h.  */
     5437_ACEOF
     5438cat confdefs.h >>conftest.$ac_ext
     5439cat >>conftest.$ac_ext <<_ACEOF
     5440/* end confdefs.h.  */
     5441#include <stdlib.h>
     5442
     5443_ACEOF
     5444if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     5445  $EGREP "strtol" >/dev/null 2>&1; then
     5446  :
     5447else
     5448  tcl_ok=0
     5449fi
     5450rm -f conftest*
     5451
     5452    cat >conftest.$ac_ext <<_ACEOF
     5453/* confdefs.h.  */
     5454_ACEOF
     5455cat confdefs.h >>conftest.$ac_ext
     5456cat >>conftest.$ac_ext <<_ACEOF
     5457/* end confdefs.h.  */
     5458#include <stdlib.h>
     5459
     5460_ACEOF
     5461if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     5462  $EGREP "strtoul" >/dev/null 2>&1; then
     5463  :
     5464else
     5465  tcl_ok=0
     5466fi
     5467rm -f conftest*
     5468
     5469    cat >conftest.$ac_ext <<_ACEOF
     5470/* confdefs.h.  */
     5471_ACEOF
     5472cat confdefs.h >>conftest.$ac_ext
     5473cat >>conftest.$ac_ext <<_ACEOF
     5474/* end confdefs.h.  */
     5475#include <stdlib.h>
     5476
     5477_ACEOF
     5478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     5479  $EGREP "strtod" >/dev/null 2>&1; then
     5480  :
     5481else
     5482  tcl_ok=0
     5483fi
     5484rm -f conftest*
     5485
     5486    if test $tcl_ok = 0; then
     5487
     5488cat >>confdefs.h <<\_ACEOF
     5489#define NO_STDLIB_H 1
     5490_ACEOF
     5491
     5492    fi
     5493    if test "${ac_cv_header_string_h+set}" = set; then
     5494  echo "$as_me:$LINENO: checking for string.h" >&5
     5495echo $ECHO_N "checking for string.h... $ECHO_C" >&6
     5496if test "${ac_cv_header_string_h+set}" = set; then
     5497  echo $ECHO_N "(cached) $ECHO_C" >&6
     5498fi
     5499echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
     5500echo "${ECHO_T}$ac_cv_header_string_h" >&6
     5501else
     5502  # Is the header compilable?
     5503echo "$as_me:$LINENO: checking string.h usability" >&5
     5504echo $ECHO_N "checking string.h usability... $ECHO_C" >&6
     5505cat >conftest.$ac_ext <<_ACEOF
     5506/* confdefs.h.  */
     5507_ACEOF
     5508cat confdefs.h >>conftest.$ac_ext
     5509cat >>conftest.$ac_ext <<_ACEOF
     5510/* end confdefs.h.  */
     5511$ac_includes_default
     5512#include <string.h>
     5513_ACEOF
     5514rm -f conftest.$ac_objext
     5515if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     5516  (eval $ac_compile) 2>conftest.er1
     5517  ac_status=$?
     5518  grep -v '^ *+' conftest.er1 >conftest.err
     5519  rm -f conftest.er1
     5520  cat conftest.err >&5
     5521  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5522  (exit $ac_status); } &&
     5523         { ac_try='test -z "$ac_c_werror_flag"
     5524                         || test ! -s conftest.err'
     5525  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5526  (eval $ac_try) 2>&5
     5527  ac_status=$?
     5528  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5529  (exit $ac_status); }; } &&
     5530         { ac_try='test -s conftest.$ac_objext'
     5531  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5532  (eval $ac_try) 2>&5
     5533  ac_status=$?
     5534  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5535  (exit $ac_status); }; }; then
     5536  ac_header_compiler=yes
     5537else
     5538  echo "$as_me: failed program was:" >&5
     5539sed 's/^/| /' conftest.$ac_ext >&5
     5540
     5541ac_header_compiler=no
     5542fi
     5543rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     5544echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     5545echo "${ECHO_T}$ac_header_compiler" >&6
     5546
     5547# Is the header present?
     5548echo "$as_me:$LINENO: checking string.h presence" >&5
     5549echo $ECHO_N "checking string.h presence... $ECHO_C" >&6
     5550cat >conftest.$ac_ext <<_ACEOF
     5551/* confdefs.h.  */
     5552_ACEOF
     5553cat confdefs.h >>conftest.$ac_ext
     5554cat >>conftest.$ac_ext <<_ACEOF
     5555/* end confdefs.h.  */
     5556#include <string.h>
     5557_ACEOF
     5558if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     5559  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     5560  ac_status=$?
     5561  grep -v '^ *+' conftest.er1 >conftest.err
     5562  rm -f conftest.er1
     5563  cat conftest.err >&5
     5564  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5565  (exit $ac_status); } >/dev/null; then
     5566  if test -s conftest.err; then
     5567    ac_cpp_err=$ac_c_preproc_warn_flag
     5568    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     5569  else
     5570    ac_cpp_err=
     5571  fi
     5572else
     5573  ac_cpp_err=yes
     5574fi
     5575if test -z "$ac_cpp_err"; then
     5576  ac_header_preproc=yes
     5577else
     5578  echo "$as_me: failed program was:" >&5
     5579sed 's/^/| /' conftest.$ac_ext >&5
     5580
     5581  ac_header_preproc=no
     5582fi
     5583rm -f conftest.err conftest.$ac_ext
     5584echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     5585echo "${ECHO_T}$ac_header_preproc" >&6
     5586
     5587# So?  What about this header?
     5588case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     5589  yes:no: )
     5590    { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
     5591echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
     5592    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
     5593echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
     5594    ac_header_preproc=yes
     5595    ;;
     5596  no:yes:* )
     5597    { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
     5598echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
     5599    { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
     5600echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
     5601    { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
     5602echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
     5603    { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
     5604echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
     5605    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
     5606echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
     5607    { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
     5608echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
     5609    (
     5610      cat <<\_ASBOX
     5611## -------------------------------------- ##
     5612## Report this to the RapptureGUI lists.  ##
     5613## -------------------------------------- ##
     5614_ASBOX
     5615    ) |
     5616      sed "s/^/$as_me: WARNING:     /" >&2
     5617    ;;
     5618esac
     5619echo "$as_me:$LINENO: checking for string.h" >&5
     5620echo $ECHO_N "checking for string.h... $ECHO_C" >&6
     5621if test "${ac_cv_header_string_h+set}" = set; then
     5622  echo $ECHO_N "(cached) $ECHO_C" >&6
     5623else
     5624  ac_cv_header_string_h=$ac_header_preproc
     5625fi
     5626echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
     5627echo "${ECHO_T}$ac_cv_header_string_h" >&6
     5628
     5629fi
     5630if test $ac_cv_header_string_h = yes; then
     5631  tcl_ok=1
     5632else
     5633  tcl_ok=0
     5634fi
     5635
     5636
     5637    cat >conftest.$ac_ext <<_ACEOF
     5638/* confdefs.h.  */
     5639_ACEOF
     5640cat confdefs.h >>conftest.$ac_ext
     5641cat >>conftest.$ac_ext <<_ACEOF
     5642/* end confdefs.h.  */
     5643#include <string.h>
     5644
     5645_ACEOF
     5646if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     5647  $EGREP "strstr" >/dev/null 2>&1; then
     5648  :
     5649else
     5650  tcl_ok=0
     5651fi
     5652rm -f conftest*
     5653
     5654    cat >conftest.$ac_ext <<_ACEOF
     5655/* confdefs.h.  */
     5656_ACEOF
     5657cat confdefs.h >>conftest.$ac_ext
     5658cat >>conftest.$ac_ext <<_ACEOF
     5659/* end confdefs.h.  */
     5660#include <string.h>
     5661
     5662_ACEOF
     5663if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     5664  $EGREP "strerror" >/dev/null 2>&1; then
     5665  :
     5666else
     5667  tcl_ok=0
     5668fi
     5669rm -f conftest*
     5670
     5671
     5672    # See also memmove check below for a place where NO_STRING_H can be
     5673    # set and why.
     5674
     5675    if test $tcl_ok = 0; then
     5676
     5677cat >>confdefs.h <<\_ACEOF
     5678#define NO_STRING_H 1
     5679_ACEOF
     5680
     5681    fi
     5682
     5683    if test "${ac_cv_header_sys_wait_h+set}" = set; then
     5684  echo "$as_me:$LINENO: checking for sys/wait.h" >&5
     5685echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
     5686if test "${ac_cv_header_sys_wait_h+set}" = set; then
     5687  echo $ECHO_N "(cached) $ECHO_C" >&6
     5688fi
     5689echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
     5690echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
     5691else
     5692  # Is the header compilable?
     5693echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
     5694echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6
     5695cat >conftest.$ac_ext <<_ACEOF
     5696/* confdefs.h.  */
     5697_ACEOF
     5698cat confdefs.h >>conftest.$ac_ext
     5699cat >>conftest.$ac_ext <<_ACEOF
     5700/* end confdefs.h.  */
     5701$ac_includes_default
     5702#include <sys/wait.h>
     5703_ACEOF
     5704rm -f conftest.$ac_objext
     5705if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     5706  (eval $ac_compile) 2>conftest.er1
     5707  ac_status=$?
     5708  grep -v '^ *+' conftest.er1 >conftest.err
     5709  rm -f conftest.er1
     5710  cat conftest.err >&5
     5711  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5712  (exit $ac_status); } &&
     5713         { ac_try='test -z "$ac_c_werror_flag"
     5714                         || test ! -s conftest.err'
     5715  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5716  (eval $ac_try) 2>&5
     5717  ac_status=$?
     5718  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5719  (exit $ac_status); }; } &&
     5720         { ac_try='test -s conftest.$ac_objext'
     5721  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5722  (eval $ac_try) 2>&5
     5723  ac_status=$?
     5724  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5725  (exit $ac_status); }; }; then
     5726  ac_header_compiler=yes
     5727else
     5728  echo "$as_me: failed program was:" >&5
     5729sed 's/^/| /' conftest.$ac_ext >&5
     5730
     5731ac_header_compiler=no
     5732fi
     5733rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     5734echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     5735echo "${ECHO_T}$ac_header_compiler" >&6
     5736
     5737# Is the header present?
     5738echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
     5739echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6
     5740cat >conftest.$ac_ext <<_ACEOF
     5741/* confdefs.h.  */
     5742_ACEOF
     5743cat confdefs.h >>conftest.$ac_ext
     5744cat >>conftest.$ac_ext <<_ACEOF
     5745/* end confdefs.h.  */
     5746#include <sys/wait.h>
     5747_ACEOF
     5748if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     5749  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     5750  ac_status=$?
     5751  grep -v '^ *+' conftest.er1 >conftest.err
     5752  rm -f conftest.er1
     5753  cat conftest.err >&5
     5754  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5755  (exit $ac_status); } >/dev/null; then
     5756  if test -s conftest.err; then
     5757    ac_cpp_err=$ac_c_preproc_warn_flag
     5758    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     5759  else
     5760    ac_cpp_err=
     5761  fi
     5762else
     5763  ac_cpp_err=yes
     5764fi
     5765if test -z "$ac_cpp_err"; then
     5766  ac_header_preproc=yes
     5767else
     5768  echo "$as_me: failed program was:" >&5
     5769sed 's/^/| /' conftest.$ac_ext >&5
     5770
     5771  ac_header_preproc=no
     5772fi
     5773rm -f conftest.err conftest.$ac_ext
     5774echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     5775echo "${ECHO_T}$ac_header_preproc" >&6
     5776
     5777# So?  What about this header?
     5778case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     5779  yes:no: )
     5780    { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
     5781echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
     5782    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
     5783echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
     5784    ac_header_preproc=yes
     5785    ;;
     5786  no:yes:* )
     5787    { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
     5788echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
     5789    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
     5790echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
     5791    { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
     5792echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
     5793    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
     5794echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
     5795    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
     5796echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
     5797    { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
     5798echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
     5799    (
     5800      cat <<\_ASBOX
     5801## -------------------------------------- ##
     5802## Report this to the RapptureGUI lists.  ##
     5803## -------------------------------------- ##
     5804_ASBOX
     5805    ) |
     5806      sed "s/^/$as_me: WARNING:     /" >&2
     5807    ;;
     5808esac
     5809echo "$as_me:$LINENO: checking for sys/wait.h" >&5
     5810echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
     5811if test "${ac_cv_header_sys_wait_h+set}" = set; then
     5812  echo $ECHO_N "(cached) $ECHO_C" >&6
     5813else
     5814  ac_cv_header_sys_wait_h=$ac_header_preproc
     5815fi
     5816echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
     5817echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
     5818
     5819fi
     5820if test $ac_cv_header_sys_wait_h = yes; then
     5821  :
     5822else
     5823
     5824cat >>confdefs.h <<\_ACEOF
     5825#define NO_SYS_WAIT_H 1
     5826_ACEOF
     5827
     5828fi
     5829
     5830
     5831    if test "${ac_cv_header_dlfcn_h+set}" = set; then
     5832  echo "$as_me:$LINENO: checking for dlfcn.h" >&5
     5833echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
     5834if test "${ac_cv_header_dlfcn_h+set}" = set; then
     5835  echo $ECHO_N "(cached) $ECHO_C" >&6
     5836fi
     5837echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
     5838echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
     5839else
     5840  # Is the header compilable?
     5841echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
     5842echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6
     5843cat >conftest.$ac_ext <<_ACEOF
     5844/* confdefs.h.  */
     5845_ACEOF
     5846cat confdefs.h >>conftest.$ac_ext
     5847cat >>conftest.$ac_ext <<_ACEOF
     5848/* end confdefs.h.  */
     5849$ac_includes_default
     5850#include <dlfcn.h>
     5851_ACEOF
     5852rm -f conftest.$ac_objext
     5853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     5854  (eval $ac_compile) 2>conftest.er1
     5855  ac_status=$?
     5856  grep -v '^ *+' conftest.er1 >conftest.err
     5857  rm -f conftest.er1
     5858  cat conftest.err >&5
     5859  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5860  (exit $ac_status); } &&
     5861         { ac_try='test -z "$ac_c_werror_flag"
     5862                         || test ! -s conftest.err'
     5863  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5864  (eval $ac_try) 2>&5
     5865  ac_status=$?
     5866  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5867  (exit $ac_status); }; } &&
     5868         { ac_try='test -s conftest.$ac_objext'
     5869  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5870  (eval $ac_try) 2>&5
     5871  ac_status=$?
     5872  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5873  (exit $ac_status); }; }; then
     5874  ac_header_compiler=yes
     5875else
     5876  echo "$as_me: failed program was:" >&5
     5877sed 's/^/| /' conftest.$ac_ext >&5
     5878
     5879ac_header_compiler=no
     5880fi
     5881rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     5882echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     5883echo "${ECHO_T}$ac_header_compiler" >&6
     5884
     5885# Is the header present?
     5886echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
     5887echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6
     5888cat >conftest.$ac_ext <<_ACEOF
     5889/* confdefs.h.  */
     5890_ACEOF
     5891cat confdefs.h >>conftest.$ac_ext
     5892cat >>conftest.$ac_ext <<_ACEOF
     5893/* end confdefs.h.  */
     5894#include <dlfcn.h>
     5895_ACEOF
     5896if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     5897  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     5898  ac_status=$?
     5899  grep -v '^ *+' conftest.er1 >conftest.err
     5900  rm -f conftest.er1
     5901  cat conftest.err >&5
     5902  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5903  (exit $ac_status); } >/dev/null; then
     5904  if test -s conftest.err; then
     5905    ac_cpp_err=$ac_c_preproc_warn_flag
     5906    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     5907  else
     5908    ac_cpp_err=
     5909  fi
     5910else
     5911  ac_cpp_err=yes
     5912fi
     5913if test -z "$ac_cpp_err"; then
     5914  ac_header_preproc=yes
     5915else
     5916  echo "$as_me: failed program was:" >&5
     5917sed 's/^/| /' conftest.$ac_ext >&5
     5918
     5919  ac_header_preproc=no
     5920fi
     5921rm -f conftest.err conftest.$ac_ext
     5922echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     5923echo "${ECHO_T}$ac_header_preproc" >&6
     5924
     5925# So?  What about this header?
     5926case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     5927  yes:no: )
     5928    { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
     5929echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
     5930    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
     5931echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
     5932    ac_header_preproc=yes
     5933    ;;
     5934  no:yes:* )
     5935    { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
     5936echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
     5937    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
     5938echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
     5939    { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
     5940echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
     5941    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
     5942echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
     5943    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
     5944echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
     5945    { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
     5946echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
     5947    (
     5948      cat <<\_ASBOX
     5949## -------------------------------------- ##
     5950## Report this to the RapptureGUI lists.  ##
     5951## -------------------------------------- ##
     5952_ASBOX
     5953    ) |
     5954      sed "s/^/$as_me: WARNING:     /" >&2
     5955    ;;
     5956esac
     5957echo "$as_me:$LINENO: checking for dlfcn.h" >&5
     5958echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
     5959if test "${ac_cv_header_dlfcn_h+set}" = set; then
     5960  echo $ECHO_N "(cached) $ECHO_C" >&6
     5961else
     5962  ac_cv_header_dlfcn_h=$ac_header_preproc
     5963fi
     5964echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
     5965echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
     5966
     5967fi
     5968if test $ac_cv_header_dlfcn_h = yes; then
     5969  :
     5970else
     5971
     5972cat >>confdefs.h <<\_ACEOF
     5973#define NO_DLFCN_H 1
     5974_ACEOF
     5975
     5976fi
     5977
     5978
     5979
     5980    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
     5981
     5982for ac_header in sys/param.h
     5983do
     5984as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     5985if eval "test \"\${$as_ac_Header+set}\" = set"; then
     5986  echo "$as_me:$LINENO: checking for $ac_header" >&5
     5987echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     5988if eval "test \"\${$as_ac_Header+set}\" = set"; then
     5989  echo $ECHO_N "(cached) $ECHO_C" >&6
     5990fi
     5991echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     5992echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     5993else
     5994  # Is the header compilable?
     5995echo "$as_me:$LINENO: checking $ac_header usability" >&5
     5996echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     5997cat >conftest.$ac_ext <<_ACEOF
     5998/* confdefs.h.  */
     5999_ACEOF
     6000cat confdefs.h >>conftest.$ac_ext
     6001cat >>conftest.$ac_ext <<_ACEOF
     6002/* end confdefs.h.  */
     6003$ac_includes_default
     6004#include <$ac_header>
     6005_ACEOF
     6006rm -f conftest.$ac_objext
     6007if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     6008  (eval $ac_compile) 2>conftest.er1
     6009  ac_status=$?
     6010  grep -v '^ *+' conftest.er1 >conftest.err
     6011  rm -f conftest.er1
     6012  cat conftest.err >&5
     6013  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6014  (exit $ac_status); } &&
     6015         { ac_try='test -z "$ac_c_werror_flag"
     6016                         || test ! -s conftest.err'
     6017  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6018  (eval $ac_try) 2>&5
     6019  ac_status=$?
     6020  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6021  (exit $ac_status); }; } &&
     6022         { ac_try='test -s conftest.$ac_objext'
     6023  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6024  (eval $ac_try) 2>&5
     6025  ac_status=$?
     6026  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6027  (exit $ac_status); }; }; then
     6028  ac_header_compiler=yes
     6029else
     6030  echo "$as_me: failed program was:" >&5
     6031sed 's/^/| /' conftest.$ac_ext >&5
     6032
     6033ac_header_compiler=no
     6034fi
     6035rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     6036echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     6037echo "${ECHO_T}$ac_header_compiler" >&6
     6038
     6039# Is the header present?
     6040echo "$as_me:$LINENO: checking $ac_header presence" >&5
     6041echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     6042cat >conftest.$ac_ext <<_ACEOF
     6043/* confdefs.h.  */
     6044_ACEOF
     6045cat confdefs.h >>conftest.$ac_ext
     6046cat >>conftest.$ac_ext <<_ACEOF
     6047/* end confdefs.h.  */
     6048#include <$ac_header>
     6049_ACEOF
     6050if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     6051  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     6052  ac_status=$?
     6053  grep -v '^ *+' conftest.er1 >conftest.err
     6054  rm -f conftest.er1
     6055  cat conftest.err >&5
     6056  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6057  (exit $ac_status); } >/dev/null; then
     6058  if test -s conftest.err; then
     6059    ac_cpp_err=$ac_c_preproc_warn_flag
     6060    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     6061  else
     6062    ac_cpp_err=
     6063  fi
     6064else
     6065  ac_cpp_err=yes
     6066fi
     6067if test -z "$ac_cpp_err"; then
     6068  ac_header_preproc=yes
     6069else
     6070  echo "$as_me: failed program was:" >&5
     6071sed 's/^/| /' conftest.$ac_ext >&5
     6072
     6073  ac_header_preproc=no
     6074fi
     6075rm -f conftest.err conftest.$ac_ext
     6076echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     6077echo "${ECHO_T}$ac_header_preproc" >&6
     6078
     6079# So?  What about this header?
     6080case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     6081  yes:no: )
     6082    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     6083echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     6084    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     6085echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     6086    ac_header_preproc=yes
     6087    ;;
     6088  no:yes:* )
     6089    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     6090echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     6091    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     6092echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     6093    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     6094echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     6095    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     6096echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     6097    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     6098echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     6099    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     6100echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     6101    (
     6102      cat <<\_ASBOX
     6103## -------------------------------------- ##
     6104## Report this to the RapptureGUI lists.  ##
     6105## -------------------------------------- ##
     6106_ASBOX
     6107    ) |
     6108      sed "s/^/$as_me: WARNING:     /" >&2
     6109    ;;
     6110esac
     6111echo "$as_me:$LINENO: checking for $ac_header" >&5
     6112echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     6113if eval "test \"\${$as_ac_Header+set}\" = set"; then
     6114  echo $ECHO_N "(cached) $ECHO_C" >&6
     6115else
     6116  eval "$as_ac_Header=\$ac_header_preproc"
     6117fi
     6118echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     6119echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     6120
     6121fi
     6122if test `eval echo '${'$as_ac_Header'}'` = yes; then
     6123  cat >>confdefs.h <<_ACEOF
     6124#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     6125_ACEOF
     6126
     6127fi
     6128
     6129done
     6130
     6131
     6132        # Let the user call this, because if it triggers, they will
     6133        # need a compat/strtod.c that is correct.  Users can also
     6134        # use Tcl_GetDouble(FromObj) instead.
     6135        #TEA_BUGGY_STRTOD
     6136    fi
     6137
     6138
     6139#-----------------------------------------------------------------------
     6140# __CHANGE__
     6141# Specify the C source files to compile in TEA_ADD_SOURCES,
     6142# public headers that need to be installed in TEA_ADD_HEADERS,
     6143# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
     6144# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
     6145# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
     6146# and PKG_TCL_SOURCES.
     6147#-----------------------------------------------------------------------
     6148
     6149
     6150    vars="RpInit.c RpRlimit.c RpRusage.c RpSignal.c"
     6151    for i in $vars; do
     6152        case $i in
     6153            \$*)
     6154                # allow $-var names
     6155                PKG_SOURCES="$PKG_SOURCES $i"
     6156                PKG_OBJECTS="$PKG_OBJECTS $i"
     6157                ;;
     6158            *)
     6159                # check for existence - allows for generic/win/unix VPATH
     6160                if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/src/$i" \
     6161                    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
     6162                    ; then
     6163                    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
     6164echo "$as_me: error: could not find source file '$i'" >&2;}
     6165   { (exit 1); exit 1; }; }
     6166                fi
     6167                PKG_SOURCES="$PKG_SOURCES $i"
     6168                # this assumes it is in a VPATH dir
     6169                i=`basename $i`
     6170                # handle user calling this before or after TEA_SETUP_COMPILER
     6171                if test x"${OBJEXT}" != x ; then
     6172                    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
     6173                else
     6174                    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
     6175                fi
     6176                PKG_OBJECTS="$PKG_OBJECTS $j"
     6177                ;;
     6178        esac
     6179    done
     6180
     6181
     6182
     6183
     6184    vars=""
     6185    for i in $vars; do
     6186        # check for existence, be strict because it is installed
     6187        if test ! -f "${srcdir}/$i" ; then
     6188            { { echo "$as_me:$LINENO: error: could not find header file '${srcdir}/$i'" >&5
     6189echo "$as_me: error: could not find header file '${srcdir}/$i'" >&2;}
     6190   { (exit 1); exit 1; }; }
     6191        fi
     6192        PKG_HEADERS="$PKG_HEADERS $i"
     6193    done
     6194
     6195
     6196
     6197    vars=""
     6198    for i in $vars; do
     6199        PKG_INCLUDES="$PKG_INCLUDES $i"
     6200    done
     6201
     6202
     6203
     6204    PKG_CFLAGS="$PKG_CFLAGS "
     6205
     6206
     6207
     6208    vars=""
     6209    for i in $vars; do
     6210        # check for existence - allows for generic/win/unix VPATH
     6211        if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
     6212            -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
     6213            ; then
     6214            { { echo "$as_me:$LINENO: error: could not find stub source file '$i'" >&5
     6215echo "$as_me: error: could not find stub source file '$i'" >&2;}
     6216   { (exit 1); exit 1; }; }
     6217        fi
     6218        PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
     6219        # this assumes it is in a VPATH dir
     6220        i=`basename $i`
     6221        # handle user calling this before or after TEA_SETUP_COMPILER
     6222        if test x"${OBJEXT}" != x ; then
     6223            j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
     6224        else
     6225            j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
     6226        fi
     6227        PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
     6228    done
     6229
     6230
     6231
     6232
     6233    vars="scripts/analyzer.tcl scripts/animover.tcl"
     6234    for i in $vars; do
     6235        # check for existence, be strict because it is installed
     6236        if test ! -f "${srcdir}/$i" ; then
     6237            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6238echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6239   { (exit 1); exit 1; }; }
     6240        fi
     6241        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6242    done
     6243
     6244
     6245
     6246    vars="scripts/balloon.tcl scripts/booleanentry.tcl"
     6247    for i in $vars; do
     6248        # check for existence, be strict because it is installed
     6249        if test ! -f "${srcdir}/$i" ; then
     6250            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6251echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6252   { (exit 1); exit 1; }; }
     6253        fi
     6254        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6255    done
     6256
     6257
     6258
     6259    vars="scripts/bugreport.tcl scripts/choiceentry.tcl"
     6260    for i in $vars; do
     6261        # check for existence, be strict because it is installed
     6262        if test ! -f "${srcdir}/$i" ; then
     6263            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6264echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6265   { (exit 1); exit 1; }; }
     6266        fi
     6267        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6268    done
     6269
     6270
     6271
     6272    vars="scripts/cloud.tcl scripts/color.tcl"
     6273    for i in $vars; do
     6274        # check for existence, be strict because it is installed
     6275        if test ! -f "${srcdir}/$i" ; then
     6276            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6277echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6278   { (exit 1); exit 1; }; }
     6279        fi
     6280        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6281    done
     6282
     6283
     6284
     6285    vars="scripts/combobox.tcl scripts/contourresult.tcl"
     6286    for i in $vars; do
     6287        # check for existence, be strict because it is installed
     6288        if test ! -f "${srcdir}/$i" ; then
     6289            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6290echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6291   { (exit 1); exit 1; }; }
     6292        fi
     6293        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6294    done
     6295
     6296
     6297
     6298    vars="scripts/controlOwner.tcl scripts/controls.tcl"
     6299    for i in $vars; do
     6300        # check for existence, be strict because it is installed
     6301        if test ! -f "${srcdir}/$i" ; then
     6302            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6303echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6304   { (exit 1); exit 1; }; }
     6305        fi
     6306        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6307    done
     6308
     6309
     6310
     6311    vars="scripts/curve.tcl scripts/deviceEditor.tcl"
     6312    for i in $vars; do
     6313        # check for existence, be strict because it is installed
     6314        if test ! -f "${srcdir}/$i" ; then
     6315            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6316echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6317   { (exit 1); exit 1; }; }
     6318        fi
     6319        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6320    done
     6321
     6322
     6323
     6324    vars="scripts/deviceLayout1D.tcl scripts/deviceViewer1D.tcl"
     6325    for i in $vars; do
     6326        # check for existence, be strict because it is installed
     6327        if test ! -f "${srcdir}/$i" ; then
     6328            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6329echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6330   { (exit 1); exit 1; }; }
     6331        fi
     6332        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6333    done
     6334
     6335
     6336
     6337    vars="scripts/deviceresult.tcl scripts/dispatcher.tcl"
     6338    for i in $vars; do
     6339        # check for existence, be strict because it is installed
     6340        if test ! -f "${srcdir}/$i" ; then
     6341            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6342echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6343   { (exit 1); exit 1; }; }
     6344        fi
     6345        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6346    done
     6347
     6348
     6349
     6350    vars="scripts/dropdown.tcl scripts/dropdownlist.tcl"
     6351    for i in $vars; do
     6352        # check for existence, be strict because it is installed
     6353        if test ! -f "${srcdir}/$i" ; then
     6354            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6355echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6356   { (exit 1); exit 1; }; }
     6357        fi
     6358        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6359    done
     6360
     6361
     6362
     6363    vars="scripts/editor.tcl scripts/energyLevels.tcl"
     6364    for i in $vars; do
     6365        # check for existence, be strict because it is installed
     6366        if test ! -f "${srcdir}/$i" ; then
     6367            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6368echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6369   { (exit 1); exit 1; }; }
     6370        fi
     6371        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6372    done
     6373
     6374
     6375
     6376    vars="scripts/field.tcl scripts/field3dresult.tcl"
     6377    for i in $vars; do
     6378        # check for existence, be strict because it is installed
     6379        if test ! -f "${srcdir}/$i" ; then
     6380            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6381echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6382   { (exit 1); exit 1; }; }
     6383        fi
     6384        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6385    done
     6386
     6387
     6388
     6389    vars="scripts/filexfer.tcl scripts/gauge.tcl"
     6390    for i in $vars; do
     6391        # check for existence, be strict because it is installed
     6392        if test ! -f "${srcdir}/$i" ; then
     6393            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6394echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6395   { (exit 1); exit 1; }; }
     6396        fi
     6397        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6398    done
     6399
     6400
     6401
     6402    vars="scripts/getopts.tcl scripts/grab.tcl"
     6403    for i in $vars; do
     6404        # check for existence, be strict because it is installed
     6405        if test ! -f "${srcdir}/$i" ; then
     6406            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6407echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6408   { (exit 1); exit 1; }; }
     6409        fi
     6410        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6411    done
     6412
     6413
     6414
     6415    vars="scripts/groupentry.tcl scripts/icons.tcl"
     6416    for i in $vars; do
     6417        # check for existence, be strict because it is installed
     6418        if test ! -f "${srcdir}/$i" ; then
     6419            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6420echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6421   { (exit 1); exit 1; }; }
     6422        fi
     6423        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6424    done
     6425
     6426
     6427
     6428    vars="scripts/image.tcl scripts/imageentry.tcl"
     6429    for i in $vars; do
     6430        # check for existence, be strict because it is installed
     6431        if test ! -f "${srcdir}/$i" ; then
     6432            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6433echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6434   { (exit 1); exit 1; }; }
     6435        fi
     6436        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6437    done
     6438
     6439
     6440
     6441    vars="scripts/imageresult.tcl"
     6442    for i in $vars; do
     6443        # check for existence, be strict because it is installed
     6444        if test ! -f "${srcdir}/$i" ; then
     6445            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6446echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6447   { (exit 1); exit 1; }; }
     6448        fi
     6449        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6450    done
     6451
     6452
     6453
     6454    vars="scripts/integerentry.tcl scripts/loader.tcl"
     6455    for i in $vars; do
     6456        # check for existence, be strict because it is installed
     6457        if test ! -f "${srcdir}/$i" ; then
     6458            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6459echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6460   { (exit 1); exit 1; }; }
     6461        fi
     6462        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6463    done
     6464
     6465
     6466
     6467    vars="scripts/mainwin.tcl scripts/mesh.tcl"
     6468    for i in $vars; do
     6469        # check for existence, be strict because it is installed
     6470        if test ! -f "${srcdir}/$i" ; then
     6471            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6472echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6473   { (exit 1); exit 1; }; }
     6474        fi
     6475        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6476    done
     6477
     6478
     6479
     6480    vars="scripts/meshresult.tcl scripts/moleculeViewer.tcl"
     6481    for i in $vars; do
     6482        # check for existence, be strict because it is installed
     6483        if test ! -f "${srcdir}/$i" ; then
     6484            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6485echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6486   { (exit 1); exit 1; }; }
     6487        fi
     6488        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6489    done
     6490
     6491
     6492
     6493    vars="scripts/nanovisviewer.tcl scripts/notebook.tcl"
     6494    for i in $vars; do
     6495        # check for existence, be strict because it is installed
     6496        if test ! -f "${srcdir}/$i" ; then
     6497            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6498echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6499   { (exit 1); exit 1; }; }
     6500        fi
     6501        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6502    done
     6503
     6504
     6505
     6506    vars="scripts/numberentry.tcl scripts/page.tcl"
     6507    for i in $vars; do
     6508        # check for existence, be strict because it is installed
     6509        if test ! -f "${srcdir}/$i" ; then
     6510            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6511echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6512   { (exit 1); exit 1; }; }
     6513        fi
     6514        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6515    done
     6516
     6517
     6518
     6519    vars="scripts/pager.tcl scripts/panes.tcl"
     6520    for i in $vars; do
     6521        # check for existence, be strict because it is installed
     6522        if test ! -f "${srcdir}/$i" ; then
     6523            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6524echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6525   { (exit 1); exit 1; }; }
     6526        fi
     6527        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6528    done
     6529
     6530
     6531
     6532    vars="scripts/postern.tcl scripts/progress.tcl"
     6533    for i in $vars; do
     6534        # check for existence, be strict because it is installed
     6535        if test ! -f "${srcdir}/$i" ; then
     6536            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6537echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6538   { (exit 1); exit 1; }; }
     6539        fi
     6540        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6541    done
     6542
     6543
     6544
     6545    vars="scripts/radiodial.tcl scripts/resources.tcl"
     6546    for i in $vars; do
     6547        # check for existence, be strict because it is installed
     6548        if test ! -f "${srcdir}/$i" ; then
     6549            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6550echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6551   { (exit 1); exit 1; }; }
     6552        fi
     6553        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6554    done
     6555
     6556
     6557
     6558    vars="scripts/resultset.tcl scripts/resultviewer.tcl"
     6559    for i in $vars; do
     6560        # check for existence, be strict because it is installed
     6561        if test ! -f "${srcdir}/$i" ; then
     6562            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6563echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6564   { (exit 1); exit 1; }; }
     6565        fi
     6566        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6567    done
     6568
     6569
     6570
     6571    vars="scripts/scroller.tcl scripts/sequence.tcl"
     6572    for i in $vars; do
     6573        # check for existence, be strict because it is installed
     6574        if test ! -f "${srcdir}/$i" ; then
     6575            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6576echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6577   { (exit 1); exit 1; }; }
     6578        fi
     6579        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6580    done
     6581
     6582
     6583
     6584    vars="scripts/sequenceresult.tcl scripts/service.tcl"
     6585    for i in $vars; do
     6586        # check for existence, be strict because it is installed
     6587        if test ! -f "${srcdir}/$i" ; then
     6588            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6589echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6590   { (exit 1); exit 1; }; }
     6591        fi
     6592        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6593    done
     6594
     6595
     6596
     6597    vars="scripts/spectrum.tcl scripts/spinint.tcl"
     6598    for i in $vars; do
     6599        # check for existence, be strict because it is installed
     6600        if test ! -f "${srcdir}/$i" ; then
     6601            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6602echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6603   { (exit 1); exit 1; }; }
     6604        fi
     6605        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6606    done
     6607
     6608
     6609
     6610    vars="scripts/switch.tcl scripts/table.tcl"
     6611    for i in $vars; do
     6612        # check for existence, be strict because it is installed
     6613        if test ! -f "${srcdir}/$i" ; then
     6614            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6615echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6616   { (exit 1); exit 1; }; }
     6617        fi
     6618        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6619    done
     6620
     6621
     6622
     6623    vars="scripts/tempgauge.tcl scripts/textentry.tcl"
     6624    for i in $vars; do
     6625        # check for existence, be strict because it is installed
     6626        if test ! -f "${srcdir}/$i" ; then
     6627            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6628echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6629   { (exit 1); exit 1; }; }
     6630        fi
     6631        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6632    done
     6633
     6634
     6635
     6636    vars="scripts/textresult.tcl scripts/tool.tcl"
     6637    for i in $vars; do
     6638        # check for existence, be strict because it is installed
     6639        if test ! -f "${srcdir}/$i" ; then
     6640            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6641echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6642   { (exit 1); exit 1; }; }
     6643        fi
     6644        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6645    done
     6646
     6647
     6648
     6649    vars="scripts/tooltip.tcl scripts/tuples.tcl"
     6650    for i in $vars; do
     6651        # check for existence, be strict because it is installed
     6652        if test ! -f "${srcdir}/$i" ; then
     6653            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6654echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6655   { (exit 1); exit 1; }; }
     6656        fi
     6657        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6658    done
     6659
     6660
     6661
     6662    vars="scripts/units.tcl scripts/valueresult.tcl"
     6663    for i in $vars; do
     6664        # check for existence, be strict because it is installed
     6665        if test ! -f "${srcdir}/$i" ; then
     6666            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6667echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6668   { (exit 1); exit 1; }; }
     6669        fi
     6670        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6671    done
     6672
     6673
     6674
     6675    vars="scripts/xyresult.tcl"
     6676    for i in $vars; do
     6677        # check for existence, be strict because it is installed
     6678        if test ! -f "${srcdir}/$i" ; then
     6679            { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
     6680echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
     6681   { (exit 1); exit 1; }; }
     6682        fi
     6683        PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
     6684    done
     6685
     6686
     6687
     6688#--------------------------------------------------------------------
     6689# __CHANGE__
     6690# A few miscellaneous platform-specific items:
     6691#
     6692# Define a special symbol for Windows (BUILD_Rappture in this case) so
     6693# that we create the export library with the dll.
     6694#
     6695# Windows creates a few extra files that need to be cleaned up.
     6696# You can add more files to clean if your extension creates any extra
     6697# files.
     6698#
     6699# TEA_ADD_* any platform specific compiler/build info here.
     6700#--------------------------------------------------------------------
     6701
     6702if test "${TEA_PLATFORM}" = "windows" ; then
     6703
     6704cat >>confdefs.h <<\_ACEOF
     6705#define BUILD_Rappture 1
     6706_ACEOF
     6707
     6708    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch *.manifest"
     6709
     6710    vars="RpWinResource.c"
     6711    for i in $vars; do
     6712        case $i in
     6713            \$*)
     6714                # allow $-var names
     6715                PKG_SOURCES="$PKG_SOURCES $i"
     6716                PKG_OBJECTS="$PKG_OBJECTS $i"
     6717                ;;
     6718            *)
     6719                # check for existence - allows for generic/win/unix VPATH
     6720                if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/src/$i" \
     6721                    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
     6722                    ; then
     6723                    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
     6724echo "$as_me: error: could not find source file '$i'" >&2;}
     6725   { (exit 1); exit 1; }; }
     6726                fi
     6727                PKG_SOURCES="$PKG_SOURCES $i"
     6728                # this assumes it is in a VPATH dir
     6729                i=`basename $i`
     6730                # handle user calling this before or after TEA_SETUP_COMPILER
     6731                if test x"${OBJEXT}" != x ; then
     6732                    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
     6733                else
     6734                    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
     6735                fi
     6736                PKG_OBJECTS="$PKG_OBJECTS $j"
     6737                ;;
     6738        esac
     6739    done
     6740
     6741
     6742
     6743
     6744    vars="-LIBPATH:${TCL_EXEC_PREFIX}/lib"
     6745    for i in $vars; do
     6746        if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
     6747            # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
     6748            i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
     6749        fi
     6750        PKG_LIBS="$PKG_LIBS $i"
     6751    done
     6752
     6753
     6754
     6755    vars="BLT24.LIB"
     6756    for i in $vars; do
     6757        if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
     6758            # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
     6759            i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
     6760        fi
     6761        PKG_LIBS="$PKG_LIBS $i"
     6762    done
     6763
     6764
     6765
     6766    vars="psapi.lib"
     6767    for i in $vars; do
     6768        if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
     6769            # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
     6770            i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
     6771        fi
     6772        PKG_LIBS="$PKG_LIBS $i"
     6773    done
     6774
     6775
     6776
     6777    PKG_CFLAGS="$PKG_CFLAGS -D_CRT_SECURE_NO_DEPRECATE -wd4996"
     6778
     6779
     6780else
     6781    CLEANFILES=""
     6782
     6783    vars="-L${TCL_EXEC_PREFIX}/lib"
     6784    for i in $vars; do
     6785        if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
     6786            # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
     6787            i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
     6788        fi
     6789        PKG_LIBS="$PKG_LIBS $i"
     6790    done
     6791
     6792
     6793
     6794    vars="-lBLT24"
     6795    for i in $vars; do
     6796        if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
     6797            # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
     6798            i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
     6799        fi
     6800        PKG_LIBS="$PKG_LIBS $i"
     6801    done
     6802
     6803
     6804fi
    25706805
    25716806
     
    25766811# contain private data structures and are subject to change without
    25776812# notice.
    2578 # This MUST be called before SC_PATH_TCLCONFIG/SC_LOAD_TCLCONFIG
     6813# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
    25796814#--------------------------------------------------------------------
    25806815
     
    25906825fi;
    25916826
    2592     if test x"${with_tclinclude}" != x ; then
    2593         if test -f "${with_tclinclude}/tcl.h" ; then
    2594             ac_cv_c_tclh=${with_tclinclude}
    2595         else
    2596             { { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain Tcl public header file tcl.h" >&5
    2597 echo "$as_me: error: ${with_tclinclude} directory does not contain Tcl public header file tcl.h" >&2;}
    2598    { (exit 1); exit 1; }; }
    2599         fi
    2600     else
    2601         if test "${ac_cv_c_tclh+set}" = set; then
     6827    if test "${ac_cv_c_tclh+set}" = set; then
    26026828  echo $ECHO_N "(cached) $ECHO_C" >&6
    26036829else
    26046830
    2605             # Use the value from --with-tclinclude, if it was given
    2606 
    2607             if test x"${with_tclinclude}" != x ; then
     6831        # Use the value from --with-tclinclude, if it was given
     6832
     6833        if test x"${with_tclinclude}" != x ; then
     6834            if test -f "${with_tclinclude}/tcl.h" ; then
    26086835                ac_cv_c_tclh=${with_tclinclude}
    26096836            else
    2610                 # Check in the includedir, if --prefix was specified
    2611 
    2612                 eval "temp_includedir=${includedir}"
    2613                 for i in \
    2614                         `ls -d ${temp_includedir} 2>/dev/null` \
    2615                         /usr/local/include /usr/include ; do
    2616                     if test -f "$i/tcl.h" ; then
    2617                         ac_cv_c_tclh=$i
    2618                         break
    2619                     fi
    2620                 done
     6837                { { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
     6838echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
     6839   { (exit 1); exit 1; }; }
    26216840            fi
    2622 
    2623 fi
    2624 
    2625     fi
     6841        else
     6842            if test "`uname -s`" = "Darwin"; then
     6843                # If Tcl was built as a framework, attempt to use
     6844                # the framework's Headers directory
     6845                case ${TCL_DEFS} in
     6846                    *TCL_FRAMEWORK*)
     6847                        list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
     6848                        ;;
     6849                esac
     6850            fi
     6851
     6852            # Look in the source dir only if Tcl is not installed,
     6853            # and in that situation, look there before installed locations.
     6854            if test -f "${TCL_BIN_DIR}/Makefile" ; then
     6855                list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
     6856            fi
     6857
     6858            # Check order: pkg --prefix location, Tcl's --prefix location,
     6859            # relative to directory of tclConfig.sh.
     6860
     6861            eval "temp_includedir=${includedir}"
     6862            list="$list \
     6863                `ls -d ${temp_includedir}        2>/dev/null` \
     6864                `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
     6865                `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
     6866            if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
     6867                list="$list /usr/local/include /usr/include"
     6868                if test x"${TCL_INCLUDE_SPEC}" != x ; then
     6869                    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
     6870                    list="$list `ls -d ${d} 2>/dev/null`"
     6871                fi
     6872            fi
     6873            for i in $list ; do
     6874                if test -f "$i/tcl.h" ; then
     6875                    ac_cv_c_tclh=$i
     6876                    break
     6877                fi
     6878            done
     6879        fi
     6880
     6881fi
     6882
    26266883
    26276884    # Print a message based on how we determined the include path
     
    26446901
    26456902
    2646 #SC_PRIVATE_TCL_HEADERS
     6903#TEA_PRIVATE_TCL_HEADERS
     6904
     6905#TEA_PUBLIC_TK_HEADERS
     6906#TEA_PRIVATE_TK_HEADERS
     6907#TEA_PATH_X
    26476908
    26486909#--------------------------------------------------------------------
    2649 # Load the tclConfig.sh file
     6910# Check whether --enable-threads or --disable-threads was given.
     6911# This auto-enables if Tcl was compiled threaded.
    26506912#--------------------------------------------------------------------
    26516913
    26526914
    2653     #
    2654     # Ok, lets find the tcl configuration
     6915    # Check whether --enable-threads or --disable-threads was given.
     6916if test "${enable_threads+set}" = set; then
     6917  enableval="$enable_threads"
     6918  tcl_ok=$enableval
     6919else
     6920  tcl_ok=yes
     6921fi;
     6922
     6923    if test "${enable_threads+set}" = set; then
     6924        enableval="$enable_threads"
     6925        tcl_ok=$enableval
     6926    else
     6927        tcl_ok=yes
     6928    fi
     6929
     6930    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
     6931        TCL_THREADS=1
     6932
     6933        if test "${TEA_PLATFORM}" != "windows" ; then
     6934            # We are always OK on Windows, so check what this platform wants:
     6935
     6936            # USE_THREAD_ALLOC tells us to try the special thread-based
     6937            # allocator that significantly reduces lock contention
     6938
     6939cat >>confdefs.h <<\_ACEOF
     6940#define USE_THREAD_ALLOC 1
     6941_ACEOF
     6942
     6943
     6944cat >>confdefs.h <<\_ACEOF
     6945#define _REENTRANT 1
     6946_ACEOF
     6947
     6948            if test "`uname -s`" = "SunOS" ; then
     6949
     6950cat >>confdefs.h <<\_ACEOF
     6951#define _POSIX_PTHREAD_SEMANTICS 1
     6952_ACEOF
     6953
     6954            fi
     6955
     6956cat >>confdefs.h <<\_ACEOF
     6957#define _THREAD_SAFE 1
     6958_ACEOF
     6959
     6960            echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
     6961echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6
     6962if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
     6963  echo $ECHO_N "(cached) $ECHO_C" >&6
     6964else
     6965  ac_check_lib_save_LIBS=$LIBS
     6966LIBS="-lpthread  $LIBS"
     6967cat >conftest.$ac_ext <<_ACEOF
     6968/* confdefs.h.  */
     6969_ACEOF
     6970cat confdefs.h >>conftest.$ac_ext
     6971cat >>conftest.$ac_ext <<_ACEOF
     6972/* end confdefs.h.  */
     6973
     6974/* Override any gcc2 internal prototype to avoid an error.  */
     6975#ifdef __cplusplus
     6976extern "C"
     6977#endif
     6978/* We use char because int might match the return type of a gcc2
     6979   builtin and then its argument prototype would still apply.  */
     6980char pthread_mutex_init ();
     6981int
     6982main ()
     6983{
     6984pthread_mutex_init ();
     6985  ;
     6986  return 0;
     6987}
     6988_ACEOF
     6989rm -f conftest.$ac_objext conftest$ac_exeext
     6990if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     6991  (eval $ac_link) 2>conftest.er1
     6992  ac_status=$?
     6993  grep -v '^ *+' conftest.er1 >conftest.err
     6994  rm -f conftest.er1
     6995  cat conftest.err >&5
     6996  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6997  (exit $ac_status); } &&
     6998         { ac_try='test -z "$ac_c_werror_flag"
     6999                         || test ! -s conftest.err'
     7000  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7001  (eval $ac_try) 2>&5
     7002  ac_status=$?
     7003  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7004  (exit $ac_status); }; } &&
     7005         { ac_try='test -s conftest$ac_exeext'
     7006  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7007  (eval $ac_try) 2>&5
     7008  ac_status=$?
     7009  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7010  (exit $ac_status); }; }; then
     7011  ac_cv_lib_pthread_pthread_mutex_init=yes
     7012else
     7013  echo "$as_me: failed program was:" >&5
     7014sed 's/^/| /' conftest.$ac_ext >&5
     7015
     7016ac_cv_lib_pthread_pthread_mutex_init=no
     7017fi
     7018rm -f conftest.err conftest.$ac_objext \
     7019      conftest$ac_exeext conftest.$ac_ext
     7020LIBS=$ac_check_lib_save_LIBS
     7021fi
     7022echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
     7023echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6
     7024if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
     7025  tcl_ok=yes
     7026else
     7027  tcl_ok=no
     7028fi
     7029
     7030            if test "$tcl_ok" = "no"; then
     7031                # Check a little harder for __pthread_mutex_init in the same
     7032                # library, as some systems hide it there until pthread.h is
     7033                # defined.  We could alternatively do an AC_TRY_COMPILE with
     7034                # pthread.h, but that will work with libpthread really doesn't
     7035                # exist, like AIX 4.2.  [Bug: 4359]
     7036                echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
     7037echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6
     7038if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
     7039  echo $ECHO_N "(cached) $ECHO_C" >&6
     7040else
     7041  ac_check_lib_save_LIBS=$LIBS
     7042LIBS="-lpthread  $LIBS"
     7043cat >conftest.$ac_ext <<_ACEOF
     7044/* confdefs.h.  */
     7045_ACEOF
     7046cat confdefs.h >>conftest.$ac_ext
     7047cat >>conftest.$ac_ext <<_ACEOF
     7048/* end confdefs.h.  */
     7049
     7050/* Override any gcc2 internal prototype to avoid an error.  */
     7051#ifdef __cplusplus
     7052extern "C"
     7053#endif
     7054/* We use char because int might match the return type of a gcc2
     7055   builtin and then its argument prototype would still apply.  */
     7056char __pthread_mutex_init ();
     7057int
     7058main ()
     7059{
     7060__pthread_mutex_init ();
     7061  ;
     7062  return 0;
     7063}
     7064_ACEOF
     7065rm -f conftest.$ac_objext conftest$ac_exeext
     7066if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     7067  (eval $ac_link) 2>conftest.er1
     7068  ac_status=$?
     7069  grep -v '^ *+' conftest.er1 >conftest.err
     7070  rm -f conftest.er1
     7071  cat conftest.err >&5
     7072  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7073  (exit $ac_status); } &&
     7074         { ac_try='test -z "$ac_c_werror_flag"
     7075                         || test ! -s conftest.err'
     7076  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7077  (eval $ac_try) 2>&5
     7078  ac_status=$?
     7079  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7080  (exit $ac_status); }; } &&
     7081         { ac_try='test -s conftest$ac_exeext'
     7082  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7083  (eval $ac_try) 2>&5
     7084  ac_status=$?
     7085  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7086  (exit $ac_status); }; }; then
     7087  ac_cv_lib_pthread___pthread_mutex_init=yes
     7088else
     7089  echo "$as_me: failed program was:" >&5
     7090sed 's/^/| /' conftest.$ac_ext >&5
     7091
     7092ac_cv_lib_pthread___pthread_mutex_init=no
     7093fi
     7094rm -f conftest.err conftest.$ac_objext \
     7095      conftest$ac_exeext conftest.$ac_ext
     7096LIBS=$ac_check_lib_save_LIBS
     7097fi
     7098echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
     7099echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6
     7100if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
     7101  tcl_ok=yes
     7102else
     7103  tcl_ok=no
     7104fi
     7105
     7106            fi
     7107
     7108            if test "$tcl_ok" = "yes"; then
     7109                # The space is needed
     7110                THREADS_LIBS=" -lpthread"
     7111            else
     7112                echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
     7113echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6
     7114if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
     7115  echo $ECHO_N "(cached) $ECHO_C" >&6
     7116else
     7117  ac_check_lib_save_LIBS=$LIBS
     7118LIBS="-lpthreads  $LIBS"
     7119cat >conftest.$ac_ext <<_ACEOF
     7120/* confdefs.h.  */
     7121_ACEOF
     7122cat confdefs.h >>conftest.$ac_ext
     7123cat >>conftest.$ac_ext <<_ACEOF
     7124/* end confdefs.h.  */
     7125
     7126/* Override any gcc2 internal prototype to avoid an error.  */
     7127#ifdef __cplusplus
     7128extern "C"
     7129#endif
     7130/* We use char because int might match the return type of a gcc2
     7131   builtin and then its argument prototype would still apply.  */
     7132char pthread_mutex_init ();
     7133int
     7134main ()
     7135{
     7136pthread_mutex_init ();
     7137  ;
     7138  return 0;
     7139}
     7140_ACEOF
     7141rm -f conftest.$ac_objext conftest$ac_exeext
     7142if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     7143  (eval $ac_link) 2>conftest.er1
     7144  ac_status=$?
     7145  grep -v '^ *+' conftest.er1 >conftest.err
     7146  rm -f conftest.er1
     7147  cat conftest.err >&5
     7148  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7149  (exit $ac_status); } &&
     7150         { ac_try='test -z "$ac_c_werror_flag"
     7151                         || test ! -s conftest.err'
     7152  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7153  (eval $ac_try) 2>&5
     7154  ac_status=$?
     7155  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7156  (exit $ac_status); }; } &&
     7157         { ac_try='test -s conftest$ac_exeext'
     7158  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7159  (eval $ac_try) 2>&5
     7160  ac_status=$?
     7161  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7162  (exit $ac_status); }; }; then
     7163  ac_cv_lib_pthreads_pthread_mutex_init=yes
     7164else
     7165  echo "$as_me: failed program was:" >&5
     7166sed 's/^/| /' conftest.$ac_ext >&5
     7167
     7168ac_cv_lib_pthreads_pthread_mutex_init=no
     7169fi
     7170rm -f conftest.err conftest.$ac_objext \
     7171      conftest$ac_exeext conftest.$ac_ext
     7172LIBS=$ac_check_lib_save_LIBS
     7173fi
     7174echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
     7175echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6
     7176if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
     7177  tcl_ok=yes
     7178else
     7179  tcl_ok=no
     7180fi
     7181
     7182                if test "$tcl_ok" = "yes"; then
     7183                    # The space is needed
     7184                    THREADS_LIBS=" -lpthreads"
     7185                else
     7186                    echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
     7187echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6
     7188if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
     7189  echo $ECHO_N "(cached) $ECHO_C" >&6
     7190else
     7191  ac_check_lib_save_LIBS=$LIBS
     7192LIBS="-lc  $LIBS"
     7193cat >conftest.$ac_ext <<_ACEOF
     7194/* confdefs.h.  */
     7195_ACEOF
     7196cat confdefs.h >>conftest.$ac_ext
     7197cat >>conftest.$ac_ext <<_ACEOF
     7198/* end confdefs.h.  */
     7199
     7200/* Override any gcc2 internal prototype to avoid an error.  */
     7201#ifdef __cplusplus
     7202extern "C"
     7203#endif
     7204/* We use char because int might match the return type of a gcc2
     7205   builtin and then its argument prototype would still apply.  */
     7206char pthread_mutex_init ();
     7207int
     7208main ()
     7209{
     7210pthread_mutex_init ();
     7211  ;
     7212  return 0;
     7213}
     7214_ACEOF
     7215rm -f conftest.$ac_objext conftest$ac_exeext
     7216if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     7217  (eval $ac_link) 2>conftest.er1
     7218  ac_status=$?
     7219  grep -v '^ *+' conftest.er1 >conftest.err
     7220  rm -f conftest.er1
     7221  cat conftest.err >&5
     7222  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7223  (exit $ac_status); } &&
     7224         { ac_try='test -z "$ac_c_werror_flag"
     7225                         || test ! -s conftest.err'
     7226  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7227  (eval $ac_try) 2>&5
     7228  ac_status=$?
     7229  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7230  (exit $ac_status); }; } &&
     7231         { ac_try='test -s conftest$ac_exeext'
     7232  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7233  (eval $ac_try) 2>&5
     7234  ac_status=$?
     7235  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7236  (exit $ac_status); }; }; then
     7237  ac_cv_lib_c_pthread_mutex_init=yes
     7238else
     7239  echo "$as_me: failed program was:" >&5
     7240sed 's/^/| /' conftest.$ac_ext >&5
     7241
     7242ac_cv_lib_c_pthread_mutex_init=no
     7243fi
     7244rm -f conftest.err conftest.$ac_objext \
     7245      conftest$ac_exeext conftest.$ac_ext
     7246LIBS=$ac_check_lib_save_LIBS
     7247fi
     7248echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
     7249echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6
     7250if test $ac_cv_lib_c_pthread_mutex_init = yes; then
     7251  tcl_ok=yes
     7252else
     7253  tcl_ok=no
     7254fi
     7255
     7256                    if test "$tcl_ok" = "no"; then
     7257                        echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
     7258echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6
     7259if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
     7260  echo $ECHO_N "(cached) $ECHO_C" >&6
     7261else
     7262  ac_check_lib_save_LIBS=$LIBS
     7263LIBS="-lc_r  $LIBS"
     7264cat >conftest.$ac_ext <<_ACEOF
     7265/* confdefs.h.  */
     7266_ACEOF
     7267cat confdefs.h >>conftest.$ac_ext
     7268cat >>conftest.$ac_ext <<_ACEOF
     7269/* end confdefs.h.  */
     7270
     7271/* Override any gcc2 internal prototype to avoid an error.  */
     7272#ifdef __cplusplus
     7273extern "C"
     7274#endif
     7275/* We use char because int might match the return type of a gcc2
     7276   builtin and then its argument prototype would still apply.  */
     7277char pthread_mutex_init ();
     7278int
     7279main ()
     7280{
     7281pthread_mutex_init ();
     7282  ;
     7283  return 0;
     7284}
     7285_ACEOF
     7286rm -f conftest.$ac_objext conftest$ac_exeext
     7287if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     7288  (eval $ac_link) 2>conftest.er1
     7289  ac_status=$?
     7290  grep -v '^ *+' conftest.er1 >conftest.err
     7291  rm -f conftest.er1
     7292  cat conftest.err >&5
     7293  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7294  (exit $ac_status); } &&
     7295         { ac_try='test -z "$ac_c_werror_flag"
     7296                         || test ! -s conftest.err'
     7297  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7298  (eval $ac_try) 2>&5
     7299  ac_status=$?
     7300  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7301  (exit $ac_status); }; } &&
     7302         { ac_try='test -s conftest$ac_exeext'
     7303  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7304  (eval $ac_try) 2>&5
     7305  ac_status=$?
     7306  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7307  (exit $ac_status); }; }; then
     7308  ac_cv_lib_c_r_pthread_mutex_init=yes
     7309else
     7310  echo "$as_me: failed program was:" >&5
     7311sed 's/^/| /' conftest.$ac_ext >&5
     7312
     7313ac_cv_lib_c_r_pthread_mutex_init=no
     7314fi
     7315rm -f conftest.err conftest.$ac_objext \
     7316      conftest$ac_exeext conftest.$ac_ext
     7317LIBS=$ac_check_lib_save_LIBS
     7318fi
     7319echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
     7320echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6
     7321if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
     7322  tcl_ok=yes
     7323else
     7324  tcl_ok=no
     7325fi
     7326
     7327                        if test "$tcl_ok" = "yes"; then
     7328                            # The space is needed
     7329                            THREADS_LIBS=" -pthread"
     7330                        else
     7331                            TCL_THREADS=0
     7332                            { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
     7333echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
     7334                        fi
     7335                    fi
     7336                fi
     7337            fi
     7338        fi
     7339    else
     7340        TCL_THREADS=0
     7341    fi
     7342    # Do checking message here to not mess up interleaved configure output
     7343    echo "$as_me:$LINENO: checking for building with threads" >&5
     7344echo $ECHO_N "checking for building with threads... $ECHO_C" >&6
     7345    if test "${TCL_THREADS}" = 1; then
     7346
     7347cat >>confdefs.h <<\_ACEOF
     7348#define TCL_THREADS 1
     7349_ACEOF
     7350
     7351        echo "$as_me:$LINENO: result: yes (default)" >&5
     7352echo "${ECHO_T}yes (default)" >&6
     7353    else
     7354        echo "$as_me:$LINENO: result: no" >&5
     7355echo "${ECHO_T}no" >&6
     7356    fi
     7357    # TCL_THREADS sanity checking.  See if our request for building with
     7358    # threads is the same as the way Tcl was built.  If not, warn the user.
     7359    case ${TCL_DEFS} in
     7360        *THREADS=1*)
     7361            if test "${TCL_THREADS}" = "0"; then
     7362                { echo "$as_me:$LINENO: WARNING:
     7363    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
     7364    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
     7365echo "$as_me: WARNING:
     7366    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
     7367    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
     7368            fi
     7369            ;;
     7370        *)
     7371            if test "${TCL_THREADS}" = "1"; then
     7372                { echo "$as_me:$LINENO: WARNING:
     7373    --enable-threads requested, but building against a Tcl that is NOT
     7374    thread-enabled.  This is an OK configuration that will also run in
     7375    a thread-enabled core." >&5
     7376echo "$as_me: WARNING:
     7377    --enable-threads requested, but building against a Tcl that is NOT
     7378    thread-enabled.  This is an OK configuration that will also run in
     7379    a thread-enabled core." >&2;}
     7380            fi
     7381            ;;
     7382    esac
     7383
     7384
     7385
     7386#--------------------------------------------------------------------
     7387# The statement below defines a collection of symbols related to
     7388# building as a shared library instead of a static library.
     7389#--------------------------------------------------------------------
     7390
     7391
     7392    echo "$as_me:$LINENO: checking how to build libraries" >&5
     7393echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6
     7394    # Check whether --enable-shared or --disable-shared was given.
     7395if test "${enable_shared+set}" = set; then
     7396  enableval="$enable_shared"
     7397  tcl_ok=$enableval
     7398else
     7399  tcl_ok=yes
     7400fi;
     7401
     7402    if test "${enable_shared+set}" = set; then
     7403        enableval="$enable_shared"
     7404        tcl_ok=$enableval
     7405    else
     7406        tcl_ok=yes
     7407    fi
     7408
     7409    if test "$tcl_ok" = "yes" ; then
     7410        echo "$as_me:$LINENO: result: shared" >&5
     7411echo "${ECHO_T}shared" >&6
     7412        SHARED_BUILD=1
     7413    else
     7414        echo "$as_me:$LINENO: result: static" >&5
     7415echo "${ECHO_T}static" >&6
     7416        SHARED_BUILD=0
     7417
     7418cat >>confdefs.h <<\_ACEOF
     7419#define STATIC_BUILD 1
     7420_ACEOF
     7421
     7422    fi
     7423
     7424
     7425
     7426#--------------------------------------------------------------------
     7427# This macro figures out what flags to use with the compiler/linker
     7428# when building shared/static debug/optimized objects.  This information
     7429# can be taken from the tclConfig.sh file, but this figures it all out.
     7430#--------------------------------------------------------------------
     7431
     7432
     7433
     7434
     7435    # Step 0.a: Enable 64 bit support?
     7436
     7437    echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
     7438echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6
     7439    # Check whether --enable-64bit or --disable-64bit was given.
     7440if test "${enable_64bit+set}" = set; then
     7441  enableval="$enable_64bit"
     7442  do64bit=$enableval
     7443else
     7444  do64bit=no
     7445fi;
     7446    echo "$as_me:$LINENO: result: $do64bit" >&5
     7447echo "${ECHO_T}$do64bit" >&6
     7448
     7449    # Step 0.b: Enable Solaris 64 bit VIS support?
     7450
     7451    echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
     7452echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6
     7453    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
     7454if test "${enable_64bit_vis+set}" = set; then
     7455  enableval="$enable_64bit_vis"
     7456  do64bitVIS=$enableval
     7457else
     7458  do64bitVIS=no
     7459fi;
     7460    echo "$as_me:$LINENO: result: $do64bitVIS" >&5
     7461echo "${ECHO_T}$do64bitVIS" >&6
     7462
     7463    if test "$do64bitVIS" = "yes"; then
     7464        # Force 64bit on with VIS
     7465        do64bit=yes
     7466    fi
     7467
     7468    # Step 0.c: Cross-compiling options for Windows/CE builds?
     7469
     7470    if test "${TEA_PLATFORM}" = "windows" ; then
     7471        echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
     7472echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6
     7473        # Check whether --enable-wince or --disable-wince was given.
     7474if test "${enable_wince+set}" = set; then
     7475  enableval="$enable_wince"
     7476  doWince=$enableval
     7477else
     7478  doWince=no
     7479fi;
     7480        echo "$as_me:$LINENO: result: $doWince" >&5
     7481echo "${ECHO_T}$doWince" >&6
     7482    fi
     7483
     7484    # Step 1: set the variable "system" to hold the name and version number
     7485    # for the system.
     7486
     7487
     7488    echo "$as_me:$LINENO: checking system version" >&5
     7489echo $ECHO_N "checking system version... $ECHO_C" >&6
     7490if test "${tcl_cv_sys_version+set}" = set; then
     7491  echo $ECHO_N "(cached) $ECHO_C" >&6
     7492else
     7493
     7494        if test "${TEA_PLATFORM}" = "windows" ; then
     7495            tcl_cv_sys_version=windows
     7496        elif test -f /usr/lib/NextStep/software_version; then
     7497            tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
     7498        else
     7499            tcl_cv_sys_version=`uname -s`-`uname -r`
     7500            if test "$?" -ne 0 ; then
     7501                { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
     7502echo "$as_me: WARNING: can't find uname command" >&2;}
     7503                tcl_cv_sys_version=unknown
     7504            else
     7505                # Special check for weird MP-RAS system (uname returns weird
     7506                # results, and the version is kept in special file).
     7507
     7508                if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
     7509                    tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
     7510                fi
     7511                if test "`uname -s`" = "AIX" ; then
     7512                    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
     7513                fi
     7514            fi
     7515        fi
     7516
     7517fi
     7518echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
     7519echo "${ECHO_T}$tcl_cv_sys_version" >&6
     7520    system=$tcl_cv_sys_version
     7521
     7522
     7523    # Step 2: check for existence of -ldl library.  This is needed because
     7524    # Linux can use either -ldl or -ldld for dynamic loading.
     7525
     7526    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
     7527echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
     7528if test "${ac_cv_lib_dl_dlopen+set}" = set; then
     7529  echo $ECHO_N "(cached) $ECHO_C" >&6
     7530else
     7531  ac_check_lib_save_LIBS=$LIBS
     7532LIBS="-ldl  $LIBS"
     7533cat >conftest.$ac_ext <<_ACEOF
     7534/* confdefs.h.  */
     7535_ACEOF
     7536cat confdefs.h >>conftest.$ac_ext
     7537cat >>conftest.$ac_ext <<_ACEOF
     7538/* end confdefs.h.  */
     7539
     7540/* Override any gcc2 internal prototype to avoid an error.  */
     7541#ifdef __cplusplus
     7542extern "C"
     7543#endif
     7544/* We use char because int might match the return type of a gcc2
     7545   builtin and then its argument prototype would still apply.  */
     7546char dlopen ();
     7547int
     7548main ()
     7549{
     7550dlopen ();
     7551  ;
     7552  return 0;
     7553}
     7554_ACEOF
     7555rm -f conftest.$ac_objext conftest$ac_exeext
     7556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     7557  (eval $ac_link) 2>conftest.er1
     7558  ac_status=$?
     7559  grep -v '^ *+' conftest.er1 >conftest.err
     7560  rm -f conftest.er1
     7561  cat conftest.err >&5
     7562  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7563  (exit $ac_status); } &&
     7564         { ac_try='test -z "$ac_c_werror_flag"
     7565                         || test ! -s conftest.err'
     7566  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7567  (eval $ac_try) 2>&5
     7568  ac_status=$?
     7569  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7570  (exit $ac_status); }; } &&
     7571         { ac_try='test -s conftest$ac_exeext'
     7572  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     7573  (eval $ac_try) 2>&5
     7574  ac_status=$?
     7575  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     7576  (exit $ac_status); }; }; then
     7577  ac_cv_lib_dl_dlopen=yes
     7578else
     7579  echo "$as_me: failed program was:" >&5
     7580sed 's/^/| /' conftest.$ac_ext >&5
     7581
     7582ac_cv_lib_dl_dlopen=no
     7583fi
     7584rm -f conftest.err conftest.$ac_objext \
     7585      conftest$ac_exeext conftest.$ac_ext
     7586LIBS=$ac_check_lib_save_LIBS
     7587fi
     7588echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
     7589echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
     7590if test $ac_cv_lib_dl_dlopen = yes; then
     7591  have_dl=yes
     7592else
     7593  have_dl=no
     7594fi
     7595
     7596
     7597    # Require ranlib early so we can override it in special cases below.
     7598
     7599
     7600
     7601    # Step 3: set configuration options based on system name and version.
     7602    # This is similar to Tcl's unix/tcl.m4 except that we've added a
     7603    # "windows" case.
     7604
     7605    do64bit_ok=no
     7606    LDFLAGS_ORIG="$LDFLAGS"
     7607    # When ld needs options to work in 64-bit mode, put them in
     7608    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
     7609    # is disabled by the user. [Bug 1016796]
     7610    LDFLAGS_ARCH=""
     7611    TCL_EXPORT_FILE_SUFFIX=""
     7612    UNSHARED_LIB_SUFFIX=""
     7613    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
     7614    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
     7615    TCL_LIB_VERSIONS_OK=ok
     7616    CFLAGS_DEBUG=-g
     7617    CFLAGS_OPTIMIZE=-O
     7618    if test "$GCC" = "yes" ; then
     7619        CFLAGS_OPTIMIZE=-O2
     7620        CFLAGS_WARNING="-Wall -Wno-implicit-int"
     7621    else
     7622        CFLAGS_WARNING=""
     7623    fi
     7624    TCL_NEEDS_EXP_FILE=0
     7625    TCL_BUILD_EXP_FILE=""
     7626    TCL_EXP_FILE=""
     7627    # Extract the first word of "ar", so it can be a program name with args.
     7628set dummy ar; ac_word=$2
     7629echo "$as_me:$LINENO: checking for $ac_word" >&5
     7630echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     7631if test "${ac_cv_prog_AR+set}" = set; then
     7632  echo $ECHO_N "(cached) $ECHO_C" >&6
     7633else
     7634  if test -n "$AR"; then
     7635  ac_cv_prog_AR="$AR" # Let the user override the test.
     7636else
     7637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     7638for as_dir in $PATH
     7639do
     7640  IFS=$as_save_IFS
     7641  test -z "$as_dir" && as_dir=.
     7642  for ac_exec_ext in '' $ac_executable_extensions; do
     7643  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     7644    ac_cv_prog_AR="ar"
     7645    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     7646    break 2
     7647  fi
     7648done
     7649done
     7650
     7651fi
     7652fi
     7653AR=$ac_cv_prog_AR
     7654if test -n "$AR"; then
     7655  echo "$as_me:$LINENO: result: $AR" >&5
     7656echo "${ECHO_T}$AR" >&6
     7657else
     7658  echo "$as_me:$LINENO: result: no" >&5
     7659echo "${ECHO_T}no" >&6
     7660fi
     7661
     7662    STLIB_LD='${AR} cr'
     7663    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
     7664    case $system in
     7665        windows)
     7666            # This is a 2-stage check to make sure we have the 64-bit SDK
     7667            # We have to know where the SDK is installed.
     7668            # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
     7669            # MACHINE is IX86 for LINK, but this is used by the manifest,
     7670            # which requires x86|amd64|ia64.
     7671            MACHINE="X86"
     7672            if test "$do64bit" != "no" ; then
     7673                if test "x${MSSDK}x" = "xx" ; then
     7674                    MSSDK="C:/Progra~1/Microsoft Platform SDK"
     7675                fi
     7676                MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
     7677                PATH64=""
     7678                case "$do64bit" in
     7679                    amd64|x64|yes)
     7680                        MACHINE="AMD64" ; # default to AMD64 64-bit build
     7681                        PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
     7682                        ;;
     7683                    ia64)
     7684                        MACHINE="IA64"
     7685                        PATH64="${MSSDK}/Bin/Win64"
     7686                        ;;
     7687                esac
     7688                if test ! -d "${PATH64}" ; then
     7689                    { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
     7690echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
     7691                    { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
     7692echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
     7693                    do64bit="no"
     7694                else
     7695                    echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
     7696echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6
     7697                    do64bit_ok="yes"
     7698                fi
     7699            fi
     7700
     7701            if test "$doWince" != "no" ; then
     7702                if test "$do64bit" != "no" ; then
     7703                    { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
     7704echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
     7705   { (exit 1); exit 1; }; }
     7706                fi
     7707                if test "$GCC" = "yes" ; then
     7708                    { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
     7709echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
     7710   { (exit 1); exit 1; }; }
     7711                fi
     7712
    26557713    # First, look for one uninstalled.
    2656     # the alternative search directory is invoked by --with-tcl
    2657     #
    2658 
    2659     if test x"${no_tcl}" = x ; then
    2660         # we reset no_tcl in case something fails here
    2661         no_tcl=true
    2662 
    2663 # Check whether --with-tcl or --without-tcl was given.
    2664 if test "${with_tcl+set}" = set; then
    2665   withval="$with_tcl"
    2666   with_tclconfig=${withval}
     7714    # the alternative search directory is invoked by --with-celib
     7715
     7716    if test x"${no_celib}" = x ; then
     7717        # we reset no_celib in case something fails here
     7718        no_celib=true
     7719
     7720# Check whether --with-celib or --without-celib was given.
     7721if test "${with_celib+set}" = set; then
     7722  withval="$with_celib"
     7723  with_celibconfig=${withval}
    26677724fi;
    2668         echo "$as_me:$LINENO: checking for Tcl configuration" >&5
    2669 echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
    2670         if test "${ac_cv_c_tclconfig+set}" = set; then
     7725        echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
     7726echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6
     7727        if test "${ac_cv_c_celibconfig+set}" = set; then
    26717728  echo $ECHO_N "(cached) $ECHO_C" >&6
    26727729else
    26737730
    2674 
    2675             # First check to see if --with-tcl was specified.
    2676             if test x"${with_tclconfig}" != x ; then
    2677                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
    2678                     ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
     7731            # First check to see if --with-celibconfig was specified.
     7732            if test x"${with_celibconfig}" != x ; then
     7733                if test -d "${with_celibconfig}/inc" ; then
     7734                    ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
    26797735                else
    2680                     { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
    2681 echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
     7736                    { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
     7737echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
    26827738   { (exit 1); exit 1; }; }
    26837739                fi
    26847740            fi
    26857741
    2686             # then check for a private Tcl installation
    2687             if test x"${ac_cv_c_tclconfig}" = x ; then
     7742            # then check for a celib library
     7743            if test x"${ac_cv_c_celibconfig}" = x ; then
    26887744                for i in \
    2689                         ../tcl \
    2690                         `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
    2691                         ../../tcl \
    2692                         `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
    2693                         ../../../tcl \
    2694                         `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
    2695                     if test -f "$i/unix/tclConfig.sh" ; then
    2696                         ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
     7745                        ../celib-palm-3.0 \
     7746                        ../celib \
     7747                        ../../celib-palm-3.0 \
     7748                        ../../celib \
     7749                        `ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
     7750                        ${srcdir}/../celib-palm-3.0 \
     7751                        ${srcdir}/../celib \
     7752                        `ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
     7753                        ; do
     7754                    if test -d "$i/inc" ; then
     7755                        ac_cv_c_celibconfig=`(cd $i; pwd)`
    26977756                        break
    26987757                    fi
     
    27007759            fi
    27017760
    2702             # check in a few common install locations
    2703             if test x"${ac_cv_c_tclconfig}" = x ; then
    2704                 for i in `ls -d ${prefix}/lib 2>/dev/null` \
    2705                         `ls -d /usr/local/lib 2>/dev/null` ; do
    2706                     if test -f "$i/tclConfig.sh" ; then
    2707                         ac_cv_c_tclconfig=`(cd $i; pwd)`
    2708                         break
    2709                     fi
    2710                 done
    2711             fi
    2712 
    2713             # check in a few other private locations
    2714             if test x"${ac_cv_c_tclconfig}" = x ; then
    2715                 for i in \
    2716                         ${srcdir}/../tcl \
    2717                         `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
    2718                     if test -f "$i/unix/tclConfig.sh" ; then
    2719                     ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
    2720                     break
    2721                 fi
    2722                 done
    2723             fi
    2724 
    2725 fi
    2726 
    2727 
    2728         if test x"${ac_cv_c_tclconfig}" = x ; then
    2729             TCL_BIN_DIR="# no Tcl configs found"
    2730             { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5
    2731 echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
    2732             exit 0
     7761fi
     7762
     7763        if test x"${ac_cv_c_celibconfig}" = x ; then
     7764            { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
     7765echo "$as_me: error: Cannot find celib support library directory" >&2;}
     7766   { (exit 1); exit 1; }; }
    27337767        else
    2734             no_tcl=
    2735             TCL_BIN_DIR=${ac_cv_c_tclconfig}
    2736             echo "$as_me:$LINENO: result: found $TCL_BIN_DIR/tclConfig.sh" >&5
    2737 echo "${ECHO_T}found $TCL_BIN_DIR/tclConfig.sh" >&6
     7768            no_celib=
     7769            CELIB_DIR=${ac_cv_c_celibconfig}
     7770            CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
     7771            echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
     7772echo "${ECHO_T}found $CELIB_DIR" >&6
    27387773        fi
    27397774    fi
    27407775
    2741 
    2742     echo "$as_me:$LINENO: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
    2743 echo $ECHO_N "checking for existence of $TCL_BIN_DIR/tclConfig.sh... $ECHO_C" >&6
    2744 
    2745     if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
    2746         echo "$as_me:$LINENO: result: loading" >&5
    2747 echo "${ECHO_T}loading" >&6
    2748         . $TCL_BIN_DIR/tclConfig.sh
    2749     else
    2750         echo "$as_me:$LINENO: result: file not found" >&5
    2751 echo "${ECHO_T}file not found" >&6
    2752     fi
    2753 
    2754     #
    2755     # The eval is required to do the TCL_DBGX substitution in the
    2756     # TCL_LIB_FILE variable
    2757     #
    2758 
    2759     eval TCL_LIB_FILE=${TCL_LIB_FILE}
    2760     eval TCL_LIB_FLAG=${TCL_LIB_FLAG}
    2761 
    2762 
    2763 
    2764 
    2765 
    2766 
    2767 
    2768 
    2769 
    2770 
    2771 
    2772 
    2773 
    2774 
    2775 
    2776 
    2777 
    2778     #
    2779     # Ok, lets find the tk configuration
    2780     # First, look for one uninstalled.
    2781     # the alternative search directory is invoked by --with-tk
    2782     #
    2783 
    2784     if test x"${no_tk}" = x ; then
    2785         # we reset no_tk in case something fails here
    2786         no_tk=true
    2787 
    2788 # Check whether --with-tk or --without-tk was given.
    2789 if test "${with_tk+set}" = set; then
    2790   withval="$with_tk"
    2791   with_tkconfig=${withval}
    2792 fi;
    2793         echo "$as_me:$LINENO: checking for Tk configuration" >&5
    2794 echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6
    2795         if test "${ac_cv_c_tkconfig+set}" = set; then
    2796   echo $ECHO_N "(cached) $ECHO_C" >&6
    2797 else
    2798 
    2799 
    2800             # First check to see if --with-tkconfig was specified.
    2801             if test x"${with_tkconfig}" != x ; then
    2802                 if test -f "${with_tkconfig}/tkConfig.sh" ; then
    2803                     ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
     7776                # Set defaults for common evc4/PPC2003 setup
     7777                # Currently Tcl requires 300+, possibly 420+ for sockets
     7778                CEVERSION=420;          # could be 211 300 301 400 420 ...
     7779                TARGETCPU=ARMV4;        # could be ARMV4 ARM MIPS SH3 X86 ...
     7780                ARCH=ARM;               # could be ARM MIPS X86EM ...
     7781                PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
     7782                if test "$doWince" != "yes"; then
     7783                    # If !yes then the user specified something
     7784                    # Reset ARCH to allow user to skip specifying it
     7785                    ARCH=
     7786                    eval `echo $doWince | awk -F, '{ \
     7787            if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
     7788            if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
     7789            if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
     7790            if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
     7791            if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
     7792                    }'`
     7793                    if test "x${ARCH}" = "x" ; then
     7794                        ARCH=$TARGETCPU;
     7795                    fi
     7796                fi
     7797                OSVERSION=WCE$CEVERSION;
     7798                if test "x${WCEROOT}" = "x" ; then
     7799                        WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
     7800                    if test ! -d "${WCEROOT}" ; then
     7801                        WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
     7802                    fi
     7803                fi
     7804                if test "x${SDKROOT}" = "x" ; then
     7805                    SDKROOT="C:/Program Files/Windows CE Tools"
     7806                    if test ! -d "${SDKROOT}" ; then
     7807                        SDKROOT="C:/Windows CE Tools"
     7808                    fi
     7809                fi
     7810                WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
     7811                SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
     7812                if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
     7813                    -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
     7814                    { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
     7815echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
     7816   { (exit 1); exit 1; }; }
     7817                    doWince="no"
    28047818                else
    2805                     { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
    2806 echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
    2807    { (exit 1); exit 1; }; }
     7819                    # We could PATH_NOSPACE these, but that's not important,
     7820                    # as long as we quote them when used.
     7821                    CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
     7822                    if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
     7823                        CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
     7824                    fi
     7825                    CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
     7826                fi
     7827            fi
     7828
     7829            if test "$GCC" != "yes" ; then
     7830                if test "${SHARED_BUILD}" = "0" ; then
     7831                    runtime=-MT
     7832                else
     7833                    runtime=-MD
     7834                fi
     7835
     7836                if test "$do64bit" != "no" ; then
     7837                    # All this magic is necessary for the Win64 SDK RC1 - hobbs
     7838                    CC="\"${PATH64}/cl.exe\""
     7839                    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
     7840                    RC="\"${MSSDK}/bin/rc.exe\""
     7841                    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
     7842                    LINKBIN="\"${PATH64}/link.exe\""
     7843                    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
     7844                    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
     7845                    # Avoid 'unresolved external symbol __security_cookie'
     7846                    # errors, c.f. http://support.microsoft.com/?id=894573
     7847
     7848    vars="bufferoverflowU.lib"
     7849    for i in $vars; do
     7850        if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
     7851            # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
     7852            i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
     7853        fi
     7854        PKG_LIBS="$PKG_LIBS $i"
     7855    done
     7856
     7857
     7858                elif test "$doWince" != "no" ; then
     7859                    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
     7860                    if test "${TARGETCPU}" = "X86"; then
     7861                        CC="\"${CEBINROOT}/cl.exe\""
     7862                    else
     7863                        CC="\"${CEBINROOT}/cl${ARCH}.exe\""
     7864                    fi
     7865                    CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
     7866                    RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
     7867                    arch=`echo ${ARCH} | awk '{print tolower($0)}'`
     7868                    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
     7869                    if test "${SHARED_BUILD}" = "1" ; then
     7870                        # Static CE builds require static celib as well
     7871                        defs="${defs} _DLL"
     7872                    fi
     7873                    for i in $defs ; do
     7874
     7875cat >>confdefs.h <<_ACEOF
     7876#define $i 1
     7877_ACEOF
     7878
     7879                    done
     7880
     7881cat >>confdefs.h <<_ACEOF
     7882#define _WIN32_WCE $CEVERSION
     7883_ACEOF
     7884
     7885
     7886cat >>confdefs.h <<_ACEOF
     7887#define UNDER_CE $CEVERSION
     7888_ACEOF
     7889
     7890                    CFLAGS_DEBUG="-nologo -Zi -Od"
     7891                    CFLAGS_OPTIMIZE="-nologo -Ox"
     7892                    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
     7893                    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
     7894                    LINKBIN="\"${CEBINROOT}/link.exe\""
     7895
     7896                else
     7897                    RC="rc"
     7898                    lflags="-nologo"
     7899                    LINKBIN="link"
     7900                    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
     7901                    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
    28087902                fi
    28097903            fi
    28107904
    2811             # then check for a private Tk library
    2812             if test x"${ac_cv_c_tkconfig}" = x ; then
    2813                 for i in \
    2814                         ../tk \
    2815                         `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
    2816                         ../../tk \
    2817                         `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
    2818                         ../../../tk \
    2819                         `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
    2820                     if test -f "$i/unix/tkConfig.sh" ; then
    2821                         ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
    2822                         break
     7905            if test "$GCC" = "yes"; then
     7906                # mingw gcc mode
     7907                RC="windres"
     7908                CFLAGS_DEBUG="-g"
     7909                CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
     7910                SHLIB_LD="$CC -shared"
     7911                UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
     7912                LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
     7913                LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
     7914            else
     7915                SHLIB_LD="${LINKBIN} -dll ${lflags}"
     7916                # link -lib only works when -lib is the first arg
     7917                STLIB_LD="${LINKBIN} -lib ${lflags}"
     7918                UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
     7919                PATHTYPE=-w
     7920                # For information on what debugtype is most useful, see:
     7921                # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
     7922                # This essentially turns it all on.
     7923                LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
     7924                LDFLAGS_OPTIMIZE="-release"
     7925                if test "$doWince" != "no" ; then
     7926                    LDFLAGS_CONSOLE="-link ${lflags}"
     7927                    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
     7928                else
     7929                    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
     7930                    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
     7931                fi
     7932            fi
     7933
     7934            SHLIB_LD_LIBS='${LIBS}'
     7935            SHLIB_SUFFIX=".dll"
     7936            SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
     7937
     7938            TCL_LIB_VERSIONS_OK=nodots
     7939            # Bogus to avoid getting this turned off
     7940            DL_OBJS="tclLoadNone.obj"
     7941            ;;
     7942        AIX-*)
     7943            if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
     7944                # AIX requires the _r compiler when gcc isn't being used
     7945                case "${CC}" in
     7946                    *_r)
     7947                        # ok ...
     7948                        ;;
     7949                    *)
     7950                        CC=${CC}_r
     7951                        ;;
     7952                esac
     7953                echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
     7954echo "${ECHO_T}Using $CC for compiling with threads" >&6
     7955            fi
     7956            LIBS="$LIBS -lc"
     7957            SHLIB_CFLAGS=""
     7958            SHLIB_LD_LIBS='${LIBS}'
     7959            SHLIB_SUFFIX=".so"
     7960
     7961            DL_OBJS="tclLoadDl.o"
     7962            LD_LIBRARY_PATH_VAR="LIBPATH"
     7963
     7964            # Check to enable 64-bit flags for compiler/linker on AIX 4+
     7965            if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
     7966                if test "$GCC" = "yes" ; then
     7967                    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
     7968echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
     7969                else
     7970                    do64bit_ok=yes
     7971                    CFLAGS="$CFLAGS -q64"
     7972                    LDFLAGS_ARCH="-q64"
     7973                    RANLIB="${RANLIB} -X64"
     7974                    AR="${AR} -X64"
     7975                    SHLIB_LD_FLAGS="-b64"
     7976                fi
     7977            fi
     7978
     7979            if test "`uname -m`" = "ia64" ; then
     7980                # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
     7981                SHLIB_LD="/usr/ccs/bin/ld -G -z text"
     7982                # AIX-5 has dl* in libc.so
     7983                DL_LIBS=""
     7984                if test "$GCC" = "yes" ; then
     7985                    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
     7986                else
     7987                    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
     7988                fi
     7989                LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
     7990            else
     7991                if test "$GCC" = "yes" ; then
     7992                    SHLIB_LD="gcc -shared"
     7993                else
     7994                    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
     7995                fi
     7996                SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
     7997                DL_LIBS="-ldl"
     7998                CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     7999                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     8000                TCL_NEEDS_EXP_FILE=1
     8001                TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp'
     8002            fi
     8003
     8004            # AIX v<=4.1 has some different flags than 4.2+
     8005            if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
     8006                case $LIBOBJS in
     8007    "tclLoadAix.$ac_objext"   | \
     8008  *" tclLoadAix.$ac_objext"   | \
     8009    "tclLoadAix.$ac_objext "* | \
     8010  *" tclLoadAix.$ac_objext "* ) ;;
     8011  *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;;
     8012esac
     8013
     8014                DL_LIBS="-lld"
     8015            fi
     8016
     8017            # On AIX <=v4 systems, libbsd.a has to be linked in to support
     8018            # non-blocking file IO.  This library has to be linked in after
     8019            # the MATH_LIBS or it breaks the pow() function.  The way to
     8020            # insure proper sequencing, is to add it to the tail of MATH_LIBS.
     8021            # This library also supplies gettimeofday.
     8022            #
     8023            # AIX does not have a timezone field in struct tm. When the AIX
     8024            # bsd library is used, the timezone global and the gettimeofday
     8025            # methods are to be avoided for timezone deduction instead, we
     8026            # deduce the timezone by comparing the localtime result on a
     8027            # known GMT value.
     8028
     8029            echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5
     8030echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
     8031if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
     8032  echo $ECHO_N "(cached) $ECHO_C" >&6
     8033else
     8034  ac_check_lib_save_LIBS=$LIBS
     8035LIBS="-lbsd  $LIBS"
     8036cat >conftest.$ac_ext <<_ACEOF
     8037/* confdefs.h.  */
     8038_ACEOF
     8039cat confdefs.h >>conftest.$ac_ext
     8040cat >>conftest.$ac_ext <<_ACEOF
     8041/* end confdefs.h.  */
     8042
     8043/* Override any gcc2 internal prototype to avoid an error.  */
     8044#ifdef __cplusplus
     8045extern "C"
     8046#endif
     8047/* We use char because int might match the return type of a gcc2
     8048   builtin and then its argument prototype would still apply.  */
     8049char gettimeofday ();
     8050int
     8051main ()
     8052{
     8053gettimeofday ();
     8054  ;
     8055  return 0;
     8056}
     8057_ACEOF
     8058rm -f conftest.$ac_objext conftest$ac_exeext
     8059if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     8060  (eval $ac_link) 2>conftest.er1
     8061  ac_status=$?
     8062  grep -v '^ *+' conftest.er1 >conftest.err
     8063  rm -f conftest.er1
     8064  cat conftest.err >&5
     8065  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8066  (exit $ac_status); } &&
     8067         { ac_try='test -z "$ac_c_werror_flag"
     8068                         || test ! -s conftest.err'
     8069  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     8070  (eval $ac_try) 2>&5
     8071  ac_status=$?
     8072  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8073  (exit $ac_status); }; } &&
     8074         { ac_try='test -s conftest$ac_exeext'
     8075  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     8076  (eval $ac_try) 2>&5
     8077  ac_status=$?
     8078  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8079  (exit $ac_status); }; }; then
     8080  ac_cv_lib_bsd_gettimeofday=yes
     8081else
     8082  echo "$as_me: failed program was:" >&5
     8083sed 's/^/| /' conftest.$ac_ext >&5
     8084
     8085ac_cv_lib_bsd_gettimeofday=no
     8086fi
     8087rm -f conftest.err conftest.$ac_objext \
     8088      conftest$ac_exeext conftest.$ac_ext
     8089LIBS=$ac_check_lib_save_LIBS
     8090fi
     8091echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5
     8092echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
     8093if test $ac_cv_lib_bsd_gettimeofday = yes; then
     8094  libbsd=yes
     8095else
     8096  libbsd=no
     8097fi
     8098
     8099            if test $libbsd = yes; then
     8100                MATH_LIBS="$MATH_LIBS -lbsd"
     8101
     8102cat >>confdefs.h <<\_ACEOF
     8103#define USE_DELTA_FOR_TZ 1
     8104_ACEOF
     8105
     8106            fi
     8107            ;;
     8108        BeOS*)
     8109            SHLIB_CFLAGS="-fPIC"
     8110            SHLIB_LD="${CC} -nostart"
     8111            SHLIB_LD_LIBS='${LIBS}'
     8112            SHLIB_SUFFIX=".so"
     8113            DL_OBJS="tclLoadDl.o"
     8114            DL_LIBS="-ldl"
     8115
     8116            #-----------------------------------------------------------
     8117            # Check for inet_ntoa in -lbind, for BeOS (which also needs
     8118            # -lsocket, even if the network functions are in -lnet which
     8119            # is always linked to, for compatibility.
     8120            #-----------------------------------------------------------
     8121            echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
     8122echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6
     8123if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
     8124  echo $ECHO_N "(cached) $ECHO_C" >&6
     8125else
     8126  ac_check_lib_save_LIBS=$LIBS
     8127LIBS="-lbind  $LIBS"
     8128cat >conftest.$ac_ext <<_ACEOF
     8129/* confdefs.h.  */
     8130_ACEOF
     8131cat confdefs.h >>conftest.$ac_ext
     8132cat >>conftest.$ac_ext <<_ACEOF
     8133/* end confdefs.h.  */
     8134
     8135/* Override any gcc2 internal prototype to avoid an error.  */
     8136#ifdef __cplusplus
     8137extern "C"
     8138#endif
     8139/* We use char because int might match the return type of a gcc2
     8140   builtin and then its argument prototype would still apply.  */
     8141char inet_ntoa ();
     8142int
     8143main ()
     8144{
     8145inet_ntoa ();
     8146  ;
     8147  return 0;
     8148}
     8149_ACEOF
     8150rm -f conftest.$ac_objext conftest$ac_exeext
     8151if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     8152  (eval $ac_link) 2>conftest.er1
     8153  ac_status=$?
     8154  grep -v '^ *+' conftest.er1 >conftest.err
     8155  rm -f conftest.er1
     8156  cat conftest.err >&5
     8157  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8158  (exit $ac_status); } &&
     8159         { ac_try='test -z "$ac_c_werror_flag"
     8160                         || test ! -s conftest.err'
     8161  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     8162  (eval $ac_try) 2>&5
     8163  ac_status=$?
     8164  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8165  (exit $ac_status); }; } &&
     8166         { ac_try='test -s conftest$ac_exeext'
     8167  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     8168  (eval $ac_try) 2>&5
     8169  ac_status=$?
     8170  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8171  (exit $ac_status); }; }; then
     8172  ac_cv_lib_bind_inet_ntoa=yes
     8173else
     8174  echo "$as_me: failed program was:" >&5
     8175sed 's/^/| /' conftest.$ac_ext >&5
     8176
     8177ac_cv_lib_bind_inet_ntoa=no
     8178fi
     8179rm -f conftest.err conftest.$ac_objext \
     8180      conftest$ac_exeext conftest.$ac_ext
     8181LIBS=$ac_check_lib_save_LIBS
     8182fi
     8183echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
     8184echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6
     8185if test $ac_cv_lib_bind_inet_ntoa = yes; then
     8186  LIBS="$LIBS -lbind -lsocket"
     8187fi
     8188
     8189            ;;
     8190        BSD/OS-2.1*|BSD/OS-3*)
     8191            SHLIB_CFLAGS=""
     8192            SHLIB_LD="shlicc -r"
     8193            SHLIB_LD_LIBS='${LIBS}'
     8194            SHLIB_SUFFIX=".so"
     8195            DL_OBJS="tclLoadDl.o"
     8196            DL_LIBS="-ldl"
     8197            CC_SEARCH_FLAGS=""
     8198            LD_SEARCH_FLAGS=""
     8199            ;;
     8200        BSD/OS-4.*)
     8201            SHLIB_CFLAGS="-export-dynamic -fPIC"
     8202            SHLIB_LD="cc -shared"
     8203            SHLIB_LD_LIBS='${LIBS}'
     8204            SHLIB_SUFFIX=".so"
     8205            DL_OBJS="tclLoadDl.o"
     8206            DL_LIBS="-ldl"
     8207            LDFLAGS="$LDFLAGS -export-dynamic"
     8208            CC_SEARCH_FLAGS=""
     8209            LD_SEARCH_FLAGS=""
     8210            ;;
     8211        dgux*)
     8212            SHLIB_CFLAGS="-K PIC"
     8213            SHLIB_LD="cc -G"
     8214            SHLIB_LD_LIBS=""
     8215            SHLIB_SUFFIX=".so"
     8216            DL_OBJS="tclLoadDl.o"
     8217            DL_LIBS="-ldl"
     8218            CC_SEARCH_FLAGS=""
     8219            LD_SEARCH_FLAGS=""
     8220            ;;
     8221        HP-UX-*.11.*)
     8222            # Use updated header definitions where possible
     8223
     8224cat >>confdefs.h <<\_ACEOF
     8225#define _XOPEN_SOURCE_EXTENDED 1
     8226_ACEOF
     8227
     8228            # Needed by Tcl, but not most extensions
     8229            #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
     8230            #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
     8231
     8232            SHLIB_SUFFIX=".sl"
     8233            echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
     8234echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
     8235if test "${ac_cv_lib_dld_shl_load+set}" = set; then
     8236  echo $ECHO_N "(cached) $ECHO_C" >&6
     8237else
     8238  ac_check_lib_save_LIBS=$LIBS
     8239LIBS="-ldld  $LIBS"
     8240cat >conftest.$ac_ext <<_ACEOF
     8241/* confdefs.h.  */
     8242_ACEOF
     8243cat confdefs.h >>conftest.$ac_ext
     8244cat >>conftest.$ac_ext <<_ACEOF
     8245/* end confdefs.h.  */
     8246
     8247/* Override any gcc2 internal prototype to avoid an error.  */
     8248#ifdef __cplusplus
     8249extern "C"
     8250#endif
     8251/* We use char because int might match the return type of a gcc2
     8252   builtin and then its argument prototype would still apply.  */
     8253char shl_load ();
     8254int
     8255main ()
     8256{
     8257shl_load ();
     8258  ;
     8259  return 0;
     8260}
     8261_ACEOF
     8262rm -f conftest.$ac_objext conftest$ac_exeext
     8263if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     8264  (eval $ac_link) 2>conftest.er1
     8265  ac_status=$?
     8266  grep -v '^ *+' conftest.er1 >conftest.err
     8267  rm -f conftest.er1
     8268  cat conftest.err >&5
     8269  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8270  (exit $ac_status); } &&
     8271         { ac_try='test -z "$ac_c_werror_flag"
     8272                         || test ! -s conftest.err'
     8273  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     8274  (eval $ac_try) 2>&5
     8275  ac_status=$?
     8276  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8277  (exit $ac_status); }; } &&
     8278         { ac_try='test -s conftest$ac_exeext'
     8279  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     8280  (eval $ac_try) 2>&5
     8281  ac_status=$?
     8282  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8283  (exit $ac_status); }; }; then
     8284  ac_cv_lib_dld_shl_load=yes
     8285else
     8286  echo "$as_me: failed program was:" >&5
     8287sed 's/^/| /' conftest.$ac_ext >&5
     8288
     8289ac_cv_lib_dld_shl_load=no
     8290fi
     8291rm -f conftest.err conftest.$ac_objext \
     8292      conftest$ac_exeext conftest.$ac_ext
     8293LIBS=$ac_check_lib_save_LIBS
     8294fi
     8295echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
     8296echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
     8297if test $ac_cv_lib_dld_shl_load = yes; then
     8298  tcl_ok=yes
     8299else
     8300  tcl_ok=no
     8301fi
     8302
     8303            if test "$tcl_ok" = yes; then
     8304                SHLIB_CFLAGS="+z"
     8305                SHLIB_LD="ld -b"
     8306                SHLIB_LD_LIBS='${LIBS}'
     8307                DL_OBJS="tclLoadShl.o"
     8308                DL_LIBS="-ldld"
     8309                LDFLAGS="$LDFLAGS -Wl,-E"
     8310                CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
     8311                LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
     8312                LD_LIBRARY_PATH_VAR="SHLIB_PATH"
     8313            fi
     8314            if test "$GCC" = "yes" ; then
     8315                SHLIB_LD="gcc -shared"
     8316                SHLIB_LD_LIBS='${LIBS}'
     8317                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     8318            fi
     8319
     8320            # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
     8321            #CFLAGS="$CFLAGS +DAportable"
     8322
     8323            # Check to enable 64-bit flags for compiler/linker
     8324            if test "$do64bit" = "yes" ; then
     8325                if test "$GCC" = "yes" ; then
     8326                    hpux_arch=`${CC} -dumpmachine`
     8327                    case $hpux_arch in
     8328                        hppa64*)
     8329                            # 64-bit gcc in use.  Fix flags for GNU ld.
     8330                            do64bit_ok=yes
     8331                            SHLIB_LD="${CC} -shared"
     8332                            SHLIB_LD_LIBS='${LIBS}'
     8333                            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     8334                            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     8335                            ;;
     8336                        *)
     8337                            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
     8338echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
     8339                            ;;
     8340                    esac
     8341                else
     8342                    do64bit_ok=yes
     8343                    CFLAGS="$CFLAGS +DD64"
     8344                    LDFLAGS_ARCH="+DD64"
     8345                fi
     8346            fi
     8347            ;;
     8348        HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
     8349            SHLIB_SUFFIX=".sl"
     8350            echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
     8351echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
     8352if test "${ac_cv_lib_dld_shl_load+set}" = set; then
     8353  echo $ECHO_N "(cached) $ECHO_C" >&6
     8354else
     8355  ac_check_lib_save_LIBS=$LIBS
     8356LIBS="-ldld  $LIBS"
     8357cat >conftest.$ac_ext <<_ACEOF
     8358/* confdefs.h.  */
     8359_ACEOF
     8360cat confdefs.h >>conftest.$ac_ext
     8361cat >>conftest.$ac_ext <<_ACEOF
     8362/* end confdefs.h.  */
     8363
     8364/* Override any gcc2 internal prototype to avoid an error.  */
     8365#ifdef __cplusplus
     8366extern "C"
     8367#endif
     8368/* We use char because int might match the return type of a gcc2
     8369   builtin and then its argument prototype would still apply.  */
     8370char shl_load ();
     8371int
     8372main ()
     8373{
     8374shl_load ();
     8375  ;
     8376  return 0;
     8377}
     8378_ACEOF
     8379rm -f conftest.$ac_objext conftest$ac_exeext
     8380if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     8381  (eval $ac_link) 2>conftest.er1
     8382  ac_status=$?
     8383  grep -v '^ *+' conftest.er1 >conftest.err
     8384  rm -f conftest.er1
     8385  cat conftest.err >&5
     8386  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8387  (exit $ac_status); } &&
     8388         { ac_try='test -z "$ac_c_werror_flag"
     8389                         || test ! -s conftest.err'
     8390  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     8391  (eval $ac_try) 2>&5
     8392  ac_status=$?
     8393  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8394  (exit $ac_status); }; } &&
     8395         { ac_try='test -s conftest$ac_exeext'
     8396  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     8397  (eval $ac_try) 2>&5
     8398  ac_status=$?
     8399  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8400  (exit $ac_status); }; }; then
     8401  ac_cv_lib_dld_shl_load=yes
     8402else
     8403  echo "$as_me: failed program was:" >&5
     8404sed 's/^/| /' conftest.$ac_ext >&5
     8405
     8406ac_cv_lib_dld_shl_load=no
     8407fi
     8408rm -f conftest.err conftest.$ac_objext \
     8409      conftest$ac_exeext conftest.$ac_ext
     8410LIBS=$ac_check_lib_save_LIBS
     8411fi
     8412echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
     8413echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
     8414if test $ac_cv_lib_dld_shl_load = yes; then
     8415  tcl_ok=yes
     8416else
     8417  tcl_ok=no
     8418fi
     8419
     8420            if test "$tcl_ok" = yes; then
     8421                SHLIB_CFLAGS="+z"
     8422                SHLIB_LD="ld -b"
     8423                SHLIB_LD_LIBS=""
     8424                DL_OBJS="tclLoadShl.o"
     8425                DL_LIBS="-ldld"
     8426                LDFLAGS="$LDFLAGS -Wl,-E"
     8427                CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
     8428                LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
     8429                LD_LIBRARY_PATH_VAR="SHLIB_PATH"
     8430            fi
     8431            ;;
     8432        IRIX-5.*)
     8433            SHLIB_CFLAGS=""
     8434            SHLIB_LD="ld -shared -rdata_shared"
     8435            SHLIB_LD_LIBS='${LIBS}'
     8436            SHLIB_SUFFIX=".so"
     8437            DL_OBJS="tclLoadDl.o"
     8438            DL_LIBS=""
     8439            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     8440            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     8441            ;;
     8442        IRIX-6.*)
     8443            SHLIB_CFLAGS=""
     8444            SHLIB_LD="ld -n32 -shared -rdata_shared"
     8445            SHLIB_LD_LIBS='${LIBS}'
     8446            SHLIB_SUFFIX=".so"
     8447            DL_OBJS="tclLoadDl.o"
     8448            DL_LIBS=""
     8449            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     8450            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     8451            if test "$GCC" = "yes" ; then
     8452                CFLAGS="$CFLAGS -mabi=n32"
     8453                LDFLAGS="$LDFLAGS -mabi=n32"
     8454            else
     8455                case $system in
     8456                    IRIX-6.3)
     8457                        # Use to build 6.2 compatible binaries on 6.3.
     8458                        CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
     8459                        ;;
     8460                    *)
     8461                        CFLAGS="$CFLAGS -n32"
     8462                        ;;
     8463                esac
     8464                LDFLAGS="$LDFLAGS -n32"
     8465            fi
     8466            ;;
     8467        IRIX64-6.*)
     8468            SHLIB_CFLAGS=""
     8469            SHLIB_LD="ld -n32 -shared -rdata_shared"
     8470            SHLIB_LD_LIBS='${LIBS}'
     8471            SHLIB_SUFFIX=".so"
     8472            DL_OBJS="tclLoadDl.o"
     8473            DL_LIBS=""
     8474            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     8475            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     8476
     8477            # Check to enable 64-bit flags for compiler/linker
     8478
     8479            if test "$do64bit" = "yes" ; then
     8480                if test "$GCC" = "yes" ; then
     8481                    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
     8482echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
     8483                else
     8484                    do64bit_ok=yes
     8485                    SHLIB_LD="ld -64 -shared -rdata_shared"
     8486                    CFLAGS="$CFLAGS -64"
     8487                    LDFLAGS_ARCH="-64"
     8488                fi
     8489            fi
     8490            ;;
     8491        Linux*)
     8492            SHLIB_CFLAGS="-fPIC"
     8493            SHLIB_LD_LIBS='${LIBS}'
     8494            SHLIB_SUFFIX=".so"
     8495
     8496            CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
     8497            # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
     8498            # when you inline the string and math operations.  Turn this off to
     8499            # get rid of the warnings.
     8500            #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
     8501
     8502            SHLIB_LD="${CC} -shared"
     8503            DL_OBJS="tclLoadDl.o"
     8504            DL_LIBS="-ldl"
     8505            LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
     8506            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     8507            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     8508            if test "`uname -m`" = "alpha" ; then
     8509                CFLAGS="$CFLAGS -mieee"
     8510            fi
     8511
     8512            # The combo of gcc + glibc has a bug related
     8513            # to inlining of functions like strtod(). The
     8514            # -fno-builtin flag should address this problem
     8515            # but it does not work. The -fno-inline flag
     8516            # is kind of overkill but it works.
     8517            # Disable inlining only when one of the
     8518            # files in compat/*.c is being linked in.
     8519            if test x"${USE_COMPAT}" != x ; then
     8520                CFLAGS="$CFLAGS -fno-inline"
     8521            fi
     8522
     8523            ;;
     8524        GNU*)
     8525            SHLIB_CFLAGS="-fPIC"
     8526            SHLIB_LD_LIBS='${LIBS}'
     8527            SHLIB_SUFFIX=".so"
     8528
     8529            SHLIB_LD="${CC} -shared"
     8530            DL_OBJS=""
     8531            DL_LIBS="-ldl"
     8532            LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
     8533            CC_SEARCH_FLAGS=""
     8534            LD_SEARCH_FLAGS=""
     8535            if test "`uname -m`" = "alpha" ; then
     8536                CFLAGS="$CFLAGS -mieee"
     8537            fi
     8538            ;;
     8539        Lynx*)
     8540            SHLIB_CFLAGS="-fPIC"
     8541            SHLIB_LD_LIBS='${LIBS}'
     8542            SHLIB_SUFFIX=".so"
     8543            CFLAGS_OPTIMIZE=-02
     8544            SHLIB_LD="${CC} -shared "
     8545            DL_OBJS="tclLoadDl.o"
     8546            DL_LIBS="-mshared -ldl"
     8547            LD_FLAGS="-Wl,--export-dynamic"
     8548            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     8549            LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     8550            ;;
     8551        MP-RAS-02*)
     8552            SHLIB_CFLAGS="-K PIC"
     8553            SHLIB_LD="cc -G"
     8554            SHLIB_LD_LIBS=""
     8555            SHLIB_SUFFIX=".so"
     8556            DL_OBJS="tclLoadDl.o"
     8557            DL_LIBS="-ldl"
     8558            CC_SEARCH_FLAGS=""
     8559            LD_SEARCH_FLAGS=""
     8560            ;;
     8561        MP-RAS-*)
     8562            SHLIB_CFLAGS="-K PIC"
     8563            SHLIB_LD="cc -G"
     8564            SHLIB_LD_LIBS=""
     8565            SHLIB_SUFFIX=".so"
     8566            DL_OBJS="tclLoadDl.o"
     8567            DL_LIBS="-ldl"
     8568            LDFLAGS="$LDFLAGS -Wl,-Bexport"
     8569            CC_SEARCH_FLAGS=""
     8570            LD_SEARCH_FLAGS=""
     8571            ;;
     8572        NetBSD-*|FreeBSD-[1-2].*)
     8573            # NetBSD/SPARC needs -fPIC, -fpic will not do.
     8574            SHLIB_CFLAGS="-fPIC"
     8575            SHLIB_LD="ld -Bshareable -x"
     8576            SHLIB_LD_LIBS='${LIBS}'
     8577            SHLIB_SUFFIX=".so"
     8578            DL_OBJS="tclLoadDl.o"
     8579            DL_LIBS=""
     8580            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     8581            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     8582            echo "$as_me:$LINENO: checking for ELF" >&5
     8583echo $ECHO_N "checking for ELF... $ECHO_C" >&6
     8584if test "${tcl_cv_ld_elf+set}" = set; then
     8585  echo $ECHO_N "(cached) $ECHO_C" >&6
     8586else
     8587
     8588                cat >conftest.$ac_ext <<_ACEOF
     8589/* confdefs.h.  */
     8590_ACEOF
     8591cat confdefs.h >>conftest.$ac_ext
     8592cat >>conftest.$ac_ext <<_ACEOF
     8593/* end confdefs.h.  */
     8594
     8595#ifdef __ELF__
     8596        yes
     8597#endif
     8598
     8599_ACEOF
     8600if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     8601  $EGREP "yes" >/dev/null 2>&1; then
     8602  tcl_cv_ld_elf=yes
     8603else
     8604  tcl_cv_ld_elf=no
     8605fi
     8606rm -f conftest*
     8607
     8608fi
     8609echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
     8610echo "${ECHO_T}$tcl_cv_ld_elf" >&6
     8611            if test $tcl_cv_ld_elf = yes; then
     8612                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
     8613            else
     8614                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
     8615            fi
     8616
     8617            # Ancient FreeBSD doesn't handle version numbers with dots.
     8618
     8619            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
     8620            TCL_LIB_VERSIONS_OK=nodots
     8621            ;;
     8622        OpenBSD-*)
     8623            # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do.
     8624            case `machine` in
     8625            sparc|sparc64)
     8626                SHLIB_CFLAGS="-fPIC";;
     8627            *)
     8628                SHLIB_CFLAGS="-fpic";;
     8629            esac
     8630            SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
     8631            SHLIB_LD_LIBS='${LIBS}'
     8632            SHLIB_SUFFIX=".so"
     8633            DL_OBJS="tclLoadDl.o"
     8634            DL_LIBS=""
     8635            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     8636            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     8637            SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
     8638            echo "$as_me:$LINENO: checking for ELF" >&5
     8639echo $ECHO_N "checking for ELF... $ECHO_C" >&6
     8640if test "${tcl_cv_ld_elf+set}" = set; then
     8641  echo $ECHO_N "(cached) $ECHO_C" >&6
     8642else
     8643
     8644                cat >conftest.$ac_ext <<_ACEOF
     8645/* confdefs.h.  */
     8646_ACEOF
     8647cat confdefs.h >>conftest.$ac_ext
     8648cat >>conftest.$ac_ext <<_ACEOF
     8649/* end confdefs.h.  */
     8650
     8651#ifdef __ELF__
     8652        yes
     8653#endif
     8654
     8655_ACEOF
     8656if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
     8657  $EGREP "yes" >/dev/null 2>&1; then
     8658  tcl_cv_ld_elf=yes
     8659else
     8660  tcl_cv_ld_elf=no
     8661fi
     8662rm -f conftest*
     8663
     8664fi
     8665echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
     8666echo "${ECHO_T}$tcl_cv_ld_elf" >&6
     8667            if test $tcl_cv_ld_elf = yes; then
     8668                LDFLAGS=-Wl,-export-dynamic
     8669            else
     8670                LDFLAGS=""
     8671            fi
     8672
     8673            # OpenBSD doesn't do version numbers with dots.
     8674            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
     8675            TCL_LIB_VERSIONS_OK=nodots
     8676            ;;
     8677        FreeBSD-*)
     8678            # FreeBSD 3.* and greater have ELF.
     8679            SHLIB_CFLAGS="-fPIC"
     8680            SHLIB_LD="ld -Bshareable -x"
     8681            SHLIB_LD_LIBS='${LIBS}'
     8682            SHLIB_SUFFIX=".so"
     8683            DL_OBJS="tclLoadDl.o"
     8684            DL_LIBS=""
     8685            LDFLAGS="$LDFLAGS -export-dynamic"
     8686            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     8687            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     8688            if test "${TCL_THREADS}" = "1" ; then
     8689                # The -pthread needs to go in the CFLAGS, not LIBS
     8690                LIBS=`echo $LIBS | sed s/-pthread//`
     8691                CFLAGS="$CFLAGS -pthread"
     8692                LDFLAGS="$LDFLAGS -pthread"
     8693            fi
     8694            case $system in
     8695            FreeBSD-3.*)
     8696                # FreeBSD-3 doesn't handle version numbers with dots.
     8697                UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
     8698                SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
     8699                TCL_LIB_VERSIONS_OK=nodots
     8700                ;;
     8701            esac
     8702            ;;
     8703        Darwin-*)
     8704            CFLAGS_OPTIMIZE="-Os"
     8705            SHLIB_CFLAGS="-fno-common"
     8706            if test $do64bit = yes; then
     8707                do64bit_ok=yes
     8708                CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
     8709            fi
     8710            # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS here:
     8711            SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
     8712            echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
     8713echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6
     8714if test "${tcl_cv_ld_single_module+set}" = set; then
     8715  echo $ECHO_N "(cached) $ECHO_C" >&6
     8716else
     8717
     8718                hold_ldflags=$LDFLAGS
     8719                LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
     8720                cat >conftest.$ac_ext <<_ACEOF
     8721/* confdefs.h.  */
     8722_ACEOF
     8723cat confdefs.h >>conftest.$ac_ext
     8724cat >>conftest.$ac_ext <<_ACEOF
     8725/* end confdefs.h.  */
     8726
     8727int
     8728main ()
     8729{
     8730int i;
     8731  ;
     8732  return 0;
     8733}
     8734_ACEOF
     8735rm -f conftest.$ac_objext conftest$ac_exeext
     8736if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     8737  (eval $ac_link) 2>conftest.er1
     8738  ac_status=$?
     8739  grep -v '^ *+' conftest.er1 >conftest.err
     8740  rm -f conftest.er1
     8741  cat conftest.err >&5
     8742  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8743  (exit $ac_status); } &&
     8744         { ac_try='test -z "$ac_c_werror_flag"
     8745                         || test ! -s conftest.err'
     8746  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     8747  (eval $ac_try) 2>&5
     8748  ac_status=$?
     8749  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8750  (exit $ac_status); }; } &&
     8751         { ac_try='test -s conftest$ac_exeext'
     8752  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     8753  (eval $ac_try) 2>&5
     8754  ac_status=$?
     8755  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8756  (exit $ac_status); }; }; then
     8757  tcl_cv_ld_single_module=yes
     8758else
     8759  echo "$as_me: failed program was:" >&5
     8760sed 's/^/| /' conftest.$ac_ext >&5
     8761
     8762tcl_cv_ld_single_module=no
     8763fi
     8764rm -f conftest.err conftest.$ac_objext \
     8765      conftest$ac_exeext conftest.$ac_ext
     8766                LDFLAGS=$hold_ldflags
     8767fi
     8768echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
     8769echo "${ECHO_T}$tcl_cv_ld_single_module" >&6
     8770            if test $tcl_cv_ld_single_module = yes; then
     8771                SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
     8772            fi
     8773            SHLIB_LD_LIBS='${LIBS}'
     8774            SHLIB_SUFFIX=".dylib"
     8775            DL_OBJS="tclLoadDyld.o"
     8776            DL_LIBS=""
     8777            # Don't use -prebind when building for Mac OS X 10.4 or later only:
     8778            test -z "${MACOSX_DEPLOYMENT_TARGET}" || \
     8779                test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F. '{print $2}'`" -lt 4 && \
     8780                LDFLAGS="$LDFLAGS -prebind"
     8781            LDFLAGS="$LDFLAGS -headerpad_max_install_names"
     8782            echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
     8783echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6
     8784if test "${tcl_cv_ld_search_paths_first+set}" = set; then
     8785  echo $ECHO_N "(cached) $ECHO_C" >&6
     8786else
     8787
     8788                hold_ldflags=$LDFLAGS
     8789                LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
     8790                cat >conftest.$ac_ext <<_ACEOF
     8791/* confdefs.h.  */
     8792_ACEOF
     8793cat confdefs.h >>conftest.$ac_ext
     8794cat >>conftest.$ac_ext <<_ACEOF
     8795/* end confdefs.h.  */
     8796
     8797int
     8798main ()
     8799{
     8800int i;
     8801  ;
     8802  return 0;
     8803}
     8804_ACEOF
     8805rm -f conftest.$ac_objext conftest$ac_exeext
     8806if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     8807  (eval $ac_link) 2>conftest.er1
     8808  ac_status=$?
     8809  grep -v '^ *+' conftest.er1 >conftest.err
     8810  rm -f conftest.er1
     8811  cat conftest.err >&5
     8812  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8813  (exit $ac_status); } &&
     8814         { ac_try='test -z "$ac_c_werror_flag"
     8815                         || test ! -s conftest.err'
     8816  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     8817  (eval $ac_try) 2>&5
     8818  ac_status=$?
     8819  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8820  (exit $ac_status); }; } &&
     8821         { ac_try='test -s conftest$ac_exeext'
     8822  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     8823  (eval $ac_try) 2>&5
     8824  ac_status=$?
     8825  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     8826  (exit $ac_status); }; }; then
     8827  tcl_cv_ld_search_paths_first=yes
     8828else
     8829  echo "$as_me: failed program was:" >&5
     8830sed 's/^/| /' conftest.$ac_ext >&5
     8831
     8832tcl_cv_ld_search_paths_first=no
     8833fi
     8834rm -f conftest.err conftest.$ac_objext \
     8835      conftest$ac_exeext conftest.$ac_ext
     8836                LDFLAGS=$hold_ldflags
     8837fi
     8838echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
     8839echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6
     8840            if test $tcl_cv_ld_search_paths_first = yes; then
     8841                LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
     8842            fi
     8843            CC_SEARCH_FLAGS=""
     8844            LD_SEARCH_FLAGS=""
     8845            LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
     8846
     8847            # TEA specific: for Tk extensions, remove -arch ppc64 from CFLAGS
     8848            # for fat builds, as neither TkAqua nor TkX11 can be built for 64bit
     8849            # at present (no 64bit GUI libraries).
     8850            test $do64bit_ok = no && test -n "${TK_BIN_DIR}" && \
     8851                CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/g'`"
     8852            ;;
     8853        NEXTSTEP-*)
     8854            SHLIB_CFLAGS=""
     8855            SHLIB_LD="cc -nostdlib -r"
     8856            SHLIB_LD_LIBS=""
     8857            SHLIB_SUFFIX=".so"
     8858            DL_OBJS="tclLoadNext.o"
     8859            DL_LIBS=""
     8860            CC_SEARCH_FLAGS=""
     8861            LD_SEARCH_FLAGS=""
     8862            ;;
     8863        OS/390-*)
     8864            CFLAGS_OPTIMIZE=""          # Optimizer is buggy
     8865
     8866cat >>confdefs.h <<\_ACEOF
     8867#define _OE_SOCKETS 1
     8868_ACEOF
     8869
     8870            ;;
     8871        OSF1-1.0|OSF1-1.1|OSF1-1.2)
     8872            # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
     8873            SHLIB_CFLAGS=""
     8874            # Hack: make package name same as library name
     8875            SHLIB_LD='ld -R -export :'
     8876            SHLIB_LD_LIBS=""
     8877            SHLIB_SUFFIX=".so"
     8878            DL_OBJS="tclLoadOSF.o"
     8879            DL_LIBS=""
     8880            CC_SEARCH_FLAGS=""
     8881            LD_SEARCH_FLAGS=""
     8882            ;;
     8883        OSF1-1.*)
     8884            # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
     8885            SHLIB_CFLAGS="-fPIC"
     8886            if test "$SHARED_BUILD" = "1" ; then
     8887                SHLIB_LD="ld -shared"
     8888            else
     8889                SHLIB_LD="ld -non_shared"
     8890            fi
     8891            SHLIB_LD_LIBS=""
     8892            SHLIB_SUFFIX=".so"
     8893            DL_OBJS="tclLoadDl.o"
     8894            DL_LIBS=""
     8895            CC_SEARCH_FLAGS=""
     8896            LD_SEARCH_FLAGS=""
     8897            ;;
     8898        OSF1-V*)
     8899            # Digital OSF/1
     8900            SHLIB_CFLAGS=""
     8901            if test "$SHARED_BUILD" = "1" ; then
     8902                SHLIB_LD='ld -shared -expect_unresolved "*"'
     8903            else
     8904                SHLIB_LD='ld -non_shared -expect_unresolved "*"'
     8905            fi
     8906            SHLIB_LD_LIBS=""
     8907            SHLIB_SUFFIX=".so"
     8908            DL_OBJS="tclLoadDl.o"
     8909            DL_LIBS=""
     8910            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
     8911            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
     8912            if test "$GCC" = "yes" ; then
     8913                CFLAGS="$CFLAGS -mieee"
     8914            else
     8915                CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
     8916            fi
     8917            # see pthread_intro(3) for pthread support on osf1, k.furukawa
     8918            if test "${TCL_THREADS}" = "1" ; then
     8919                CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
     8920                CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
     8921                LIBS=`echo $LIBS | sed s/-lpthreads//`
     8922                if test "$GCC" = "yes" ; then
     8923                    LIBS="$LIBS -lpthread -lmach -lexc"
     8924                else
     8925                    CFLAGS="$CFLAGS -pthread"
     8926                    LDFLAGS="$LDFLAGS -pthread"
     8927                fi
     8928            fi
     8929
     8930            ;;
     8931        QNX-6*)
     8932            # QNX RTP
     8933            # This may work for all QNX, but it was only reported for v6.
     8934            SHLIB_CFLAGS="-fPIC"
     8935            SHLIB_LD="ld -Bshareable -x"
     8936            SHLIB_LD_LIBS=""
     8937            SHLIB_SUFFIX=".so"
     8938            DL_OBJS="tclLoadDl.o"
     8939            # dlopen is in -lc on QNX
     8940            DL_LIBS=""
     8941            CC_SEARCH_FLAGS=""
     8942            LD_SEARCH_FLAGS=""
     8943            ;;
     8944        SCO_SV-3.2*)
     8945            # Note, dlopen is available only on SCO 3.2.5 and greater. However,
     8946            # this test works, since "uname -s" was non-standard in 3.2.4 and
     8947            # below.
     8948            if test "$GCC" = "yes" ; then
     8949                SHLIB_CFLAGS="-fPIC -melf"
     8950                LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
     8951            else
     8952                SHLIB_CFLAGS="-Kpic -belf"
     8953                LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
     8954            fi
     8955            SHLIB_LD="ld -G"
     8956            SHLIB_LD_LIBS=""
     8957            SHLIB_SUFFIX=".so"
     8958            DL_OBJS="tclLoadDl.o"
     8959            DL_LIBS=""
     8960            CC_SEARCH_FLAGS=""
     8961            LD_SEARCH_FLAGS=""
     8962            ;;
     8963        SINIX*5.4*)
     8964            SHLIB_CFLAGS="-K PIC"
     8965            SHLIB_LD="cc -G"
     8966            SHLIB_LD_LIBS=""
     8967            SHLIB_SUFFIX=".so"
     8968            DL_OBJS="tclLoadDl.o"
     8969            DL_LIBS="-ldl"
     8970            CC_SEARCH_FLAGS=""
     8971            LD_SEARCH_FLAGS=""
     8972            ;;
     8973        SunOS-4*)
     8974            SHLIB_CFLAGS="-PIC"
     8975            SHLIB_LD="ld"
     8976            SHLIB_LD_LIBS=""
     8977            SHLIB_SUFFIX=".so"
     8978            DL_OBJS="tclLoadDl.o"
     8979            DL_LIBS="-ldl"
     8980            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
     8981            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     8982
     8983            # SunOS can't handle version numbers with dots in them in library
     8984            # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
     8985            # requires an extra version number at the end of .so file names.
     8986            # So, the library has to have a name like libtcl75.so.1.0
     8987
     8988            SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
     8989            UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
     8990            TCL_LIB_VERSIONS_OK=nodots
     8991            ;;
     8992        SunOS-5.[0-6])
     8993            # Careful to not let 5.10+ fall into this case
     8994
     8995            # Note: If _REENTRANT isn't defined, then Solaris
     8996            # won't define thread-safe library routines.
     8997
     8998
     8999cat >>confdefs.h <<\_ACEOF
     9000#define _REENTRANT 1
     9001_ACEOF
     9002
     9003
     9004cat >>confdefs.h <<\_ACEOF
     9005#define _POSIX_PTHREAD_SEMANTICS 1
     9006_ACEOF
     9007
     9008
     9009            SHLIB_CFLAGS="-KPIC"
     9010
     9011            # Note: need the LIBS below, otherwise Tk won't find Tcl's
     9012            # symbols when dynamically loaded into tclsh.
     9013
     9014            SHLIB_LD_LIBS='${LIBS}'
     9015            SHLIB_SUFFIX=".so"
     9016            DL_OBJS="tclLoadDl.o"
     9017            DL_LIBS="-ldl"
     9018            if test "$GCC" = "yes" ; then
     9019                SHLIB_LD="$CC -shared"
     9020                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
     9021                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     9022            else
     9023                SHLIB_LD="/usr/ccs/bin/ld -G -z text"
     9024                CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
     9025                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     9026            fi
     9027            ;;
     9028        SunOS-5*)
     9029            # Note: If _REENTRANT isn't defined, then Solaris
     9030            # won't define thread-safe library routines.
     9031
     9032
     9033cat >>confdefs.h <<\_ACEOF
     9034#define _REENTRANT 1
     9035_ACEOF
     9036
     9037
     9038cat >>confdefs.h <<\_ACEOF
     9039#define _POSIX_PTHREAD_SEMANTICS 1
     9040_ACEOF
     9041
     9042
     9043            SHLIB_CFLAGS="-KPIC"
     9044
     9045            # Check to enable 64-bit flags for compiler/linker
     9046            if test "$do64bit" = "yes" ; then
     9047                arch=`isainfo`
     9048                if test "$arch" = "sparcv9 sparc" ; then
     9049                        if test "$GCC" = "yes" ; then
     9050                            if test "`gcc -dumpversion | awk -F. '{print $1}'`" -lt "3" ; then
     9051                                { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
     9052echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
     9053                            else
     9054                                do64bit_ok=yes
     9055                                CFLAGS="$CFLAGS -m64 -mcpu=v9"
     9056                                LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
     9057                                SHLIB_CFLAGS="-fPIC"
     9058                            fi
     9059                        else
     9060                            do64bit_ok=yes
     9061                            if test "$do64bitVIS" = "yes" ; then
     9062                                CFLAGS="$CFLAGS -xarch=v9a"
     9063                                LDFLAGS_ARCH="-xarch=v9a"
     9064                            else
     9065                                CFLAGS="$CFLAGS -xarch=v9"
     9066                                LDFLAGS_ARCH="-xarch=v9"
     9067                            fi
     9068                            # Solaris 64 uses this as well
     9069                            #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
     9070                        fi
     9071                elif test "$arch" = "amd64 i386" ; then
     9072                    if test "$GCC" = "yes" ; then
     9073                        { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
     9074echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
     9075                    else
     9076                        do64bit_ok=yes
     9077                        CFLAGS="$CFLAGS -xarch=amd64"
     9078                        LDFLAGS="$LDFLAGS -xarch=amd64"
    28239079                    fi
    2824                 done
     9080                else
     9081                    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
     9082echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
     9083                fi
    28259084            fi
    2826             # check in a few common install locations
    2827             if test x"${ac_cv_c_tkconfig}" = x ; then
    2828                 for i in `ls -d ${prefix}/lib 2>/dev/null` \
    2829                         `ls -d /usr/local/lib 2>/dev/null` ; do
    2830                     if test -f "$i/tkConfig.sh" ; then
    2831                         ac_cv_c_tkconfig=`(cd $i; pwd)`
    2832                         break
    2833                     fi
    2834                 done
     9085
     9086            # Note: need the LIBS below, otherwise Tk won't find Tcl's
     9087            # symbols when dynamically loaded into tclsh.
     9088
     9089            SHLIB_LD_LIBS='${LIBS}'
     9090            SHLIB_SUFFIX=".so"
     9091            DL_OBJS="tclLoadDl.o"
     9092            DL_LIBS="-ldl"
     9093            if test "$GCC" = "yes" ; then
     9094                SHLIB_LD="$CC -shared"
     9095                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
     9096                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
     9097                if test "$do64bit_ok" = "yes" ; then
     9098                    # We need to specify -static-libgcc or we need to
     9099                    # add the path to the sparv9 libgcc.
     9100                    # JH: static-libgcc is necessary for core Tcl, but may
     9101                    # not be necessary for extensions.
     9102                    SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
     9103                    # for finding sparcv9 libgcc, get the regular libgcc
     9104                    # path, remove so name and append 'sparcv9'
     9105                    #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
     9106                    #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
     9107                fi
     9108            else
     9109                SHLIB_LD="/usr/ccs/bin/ld -G -z text"
     9110                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
     9111                LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
    28359112            fi
    2836             # check in a few other private locations
    2837             if test x"${ac_cv_c_tkconfig}" = x ; then
    2838                 for i in \
    2839                         ${srcdir}/../tk \
    2840                         `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
    2841                     if test -f "$i/unix/tkConfig.sh" ; then
    2842                         ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
    2843                         break
    2844                     fi
    2845                 done
     9113            ;;
     9114        UNIX_SV* | UnixWare-5*)
     9115            SHLIB_CFLAGS="-KPIC"
     9116            SHLIB_LD="cc -G"
     9117            SHLIB_LD_LIBS=""
     9118            SHLIB_SUFFIX=".so"
     9119            DL_OBJS="tclLoadDl.o"
     9120            DL_LIBS="-ldl"
     9121            # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
     9122            # that don't grok the -Bexport option.  Test that it does.
     9123            echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
     9124echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6
     9125if test "${tcl_cv_ld_Bexport+set}" = set; then
     9126  echo $ECHO_N "(cached) $ECHO_C" >&6
     9127else
     9128
     9129                hold_ldflags=$LDFLAGS
     9130                LDFLAGS="$LDFLAGS -Wl,-Bexport"
     9131                cat >conftest.$ac_ext <<_ACEOF
     9132/* confdefs.h.  */
     9133_ACEOF
     9134cat confdefs.h >>conftest.$ac_ext
     9135cat >>conftest.$ac_ext <<_ACEOF
     9136/* end confdefs.h.  */
     9137
     9138int
     9139main ()
     9140{
     9141int i;
     9142  ;
     9143  return 0;
     9144}
     9145_ACEOF
     9146rm -f conftest.$ac_objext conftest$ac_exeext
     9147if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     9148  (eval $ac_link) 2>conftest.er1
     9149  ac_status=$?
     9150  grep -v '^ *+' conftest.er1 >conftest.err
     9151  rm -f conftest.er1
     9152  cat conftest.err >&5
     9153  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9154  (exit $ac_status); } &&
     9155         { ac_try='test -z "$ac_c_werror_flag"
     9156                         || test ! -s conftest.err'
     9157  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9158  (eval $ac_try) 2>&5
     9159  ac_status=$?
     9160  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9161  (exit $ac_status); }; } &&
     9162         { ac_try='test -s conftest$ac_exeext'
     9163  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9164  (eval $ac_try) 2>&5
     9165  ac_status=$?
     9166  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9167  (exit $ac_status); }; }; then
     9168  tcl_cv_ld_Bexport=yes
     9169else
     9170  echo "$as_me: failed program was:" >&5
     9171sed 's/^/| /' conftest.$ac_ext >&5
     9172
     9173tcl_cv_ld_Bexport=no
     9174fi
     9175rm -f conftest.err conftest.$ac_objext \
     9176      conftest$ac_exeext conftest.$ac_ext
     9177                LDFLAGS=$hold_ldflags
     9178fi
     9179echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5
     9180echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6
     9181            if test $tcl_cv_ld_Bexport = yes; then
     9182                LDFLAGS="$LDFLAGS -Wl,-Bexport"
    28469183            fi
    2847 
    2848 fi
    2849 
    2850         if test x"${ac_cv_c_tkconfig}" = x ; then
    2851             TK_BIN_DIR="# no Tk configs found"
    2852             { echo "$as_me:$LINENO: WARNING: Can't find Tk configuration definitions" >&5
    2853 echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
    2854             exit 0
    2855         else
    2856             no_tk=
    2857             TK_BIN_DIR=${ac_cv_c_tkconfig}
    2858             echo "$as_me:$LINENO: result: found $TK_BIN_DIR/tkConfig.sh" >&5
    2859 echo "${ECHO_T}found $TK_BIN_DIR/tkConfig.sh" >&6
     9184            CC_SEARCH_FLAGS=""
     9185            LD_SEARCH_FLAGS=""
     9186            ;;
     9187    esac
     9188
     9189    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
     9190        { echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
     9191echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
     9192    fi
     9193
     9194    # Step 4: disable dynamic loading if requested via a command-line switch.
     9195
     9196    # Check whether --enable-load or --disable-load was given.
     9197if test "${enable_load+set}" = set; then
     9198  enableval="$enable_load"
     9199  tcl_ok=$enableval
     9200else
     9201  tcl_ok=yes
     9202fi;
     9203    if test "$tcl_ok" = "no"; then
     9204        DL_OBJS=""
     9205    fi
     9206
     9207    if test "x$DL_OBJS" != "x" ; then
     9208        BUILD_DLTEST="\$(DLTEST_TARGETS)"
     9209    else
     9210        echo "Can't figure out how to do dynamic loading or shared libraries"
     9211        echo "on this system."
     9212        SHLIB_CFLAGS=""
     9213        SHLIB_LD=""
     9214        SHLIB_SUFFIX=""
     9215        DL_OBJS="tclLoadNone.o"
     9216        DL_LIBS=""
     9217        LDFLAGS="$LDFLAGS_ORIG"
     9218        CC_SEARCH_FLAGS=""
     9219        LD_SEARCH_FLAGS=""
     9220        BUILD_DLTEST=""
     9221    fi
     9222    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
     9223
     9224    # If we're running gcc, then change the C flags for compiling shared
     9225    # libraries to the right flags for gcc, instead of those for the
     9226    # standard manufacturer compiler.
     9227
     9228    if test "$DL_OBJS" != "tclLoadNone.o" ; then
     9229        if test "$GCC" = "yes" ; then
     9230            case $system in
     9231                AIX-*)
     9232                    ;;
     9233                BSD/OS*)
     9234                    ;;
     9235                IRIX*)
     9236                    ;;
     9237                NetBSD-*|FreeBSD-*)
     9238                    ;;
     9239                Darwin-*)
     9240                    ;;
     9241                SCO_SV-3.2*)
     9242                    ;;
     9243                windows)
     9244                    ;;
     9245                *)
     9246                    SHLIB_CFLAGS="-fPIC"
     9247                    ;;
     9248            esac
    28609249        fi
    28619250    fi
    28629251
    2863 
    2864 
    2865     echo "$as_me:$LINENO: checking for existence of $TCLCONFIG" >&5
    2866 echo $ECHO_N "checking for existence of $TCLCONFIG... $ECHO_C" >&6
    2867 
    2868     if test -f "$TK_BIN_DIR/tkConfig.sh" ; then
    2869         echo "$as_me:$LINENO: checking loading $TK_BIN_DIR/tkConfig.sh" >&5
    2870 echo $ECHO_N "checking loading $TK_BIN_DIR/tkConfig.sh... $ECHO_C" >&6
    2871         . $TK_BIN_DIR/tkConfig.sh
     9252    if test "$SHARED_LIB_SUFFIX" = "" ; then
     9253        SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
     9254    fi
     9255    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
     9256        UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
     9257    fi
     9258
     9259
     9260
     9261
     9262
     9263
     9264
     9265
     9266
     9267
     9268
     9269
     9270
     9271
     9272
     9273    # These must be called after we do the basic CFLAGS checks and
     9274    # verify any possible 64-bit or similar switches are necessary
     9275
     9276    echo "$as_me:$LINENO: checking for required early compiler flags" >&5
     9277echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6
     9278    tcl_flags=""
     9279
     9280    if test "${tcl_cv_flag__isoc99_source+set}" = set; then
     9281  echo $ECHO_N "(cached) $ECHO_C" >&6
     9282else
     9283  cat >conftest.$ac_ext <<_ACEOF
     9284/* confdefs.h.  */
     9285_ACEOF
     9286cat confdefs.h >>conftest.$ac_ext
     9287cat >>conftest.$ac_ext <<_ACEOF
     9288/* end confdefs.h.  */
     9289#include <stdlib.h>
     9290int
     9291main ()
     9292{
     9293char *p = (char *)strtoll; char *q = (char *)strtoull;
     9294  ;
     9295  return 0;
     9296}
     9297_ACEOF
     9298rm -f conftest.$ac_objext
     9299if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     9300  (eval $ac_compile) 2>conftest.er1
     9301  ac_status=$?
     9302  grep -v '^ *+' conftest.er1 >conftest.err
     9303  rm -f conftest.er1
     9304  cat conftest.err >&5
     9305  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9306  (exit $ac_status); } &&
     9307         { ac_try='test -z "$ac_c_werror_flag"
     9308                         || test ! -s conftest.err'
     9309  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9310  (eval $ac_try) 2>&5
     9311  ac_status=$?
     9312  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9313  (exit $ac_status); }; } &&
     9314         { ac_try='test -s conftest.$ac_objext'
     9315  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9316  (eval $ac_try) 2>&5
     9317  ac_status=$?
     9318  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9319  (exit $ac_status); }; }; then
     9320  tcl_cv_flag__isoc99_source=no
     9321else
     9322  echo "$as_me: failed program was:" >&5
     9323sed 's/^/| /' conftest.$ac_ext >&5
     9324
     9325cat >conftest.$ac_ext <<_ACEOF
     9326/* confdefs.h.  */
     9327_ACEOF
     9328cat confdefs.h >>conftest.$ac_ext
     9329cat >>conftest.$ac_ext <<_ACEOF
     9330/* end confdefs.h.  */
     9331#define _ISOC99_SOURCE 1
     9332#include <stdlib.h>
     9333int
     9334main ()
     9335{
     9336char *p = (char *)strtoll; char *q = (char *)strtoull;
     9337  ;
     9338  return 0;
     9339}
     9340_ACEOF
     9341rm -f conftest.$ac_objext
     9342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     9343  (eval $ac_compile) 2>conftest.er1
     9344  ac_status=$?
     9345  grep -v '^ *+' conftest.er1 >conftest.err
     9346  rm -f conftest.er1
     9347  cat conftest.err >&5
     9348  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9349  (exit $ac_status); } &&
     9350         { ac_try='test -z "$ac_c_werror_flag"
     9351                         || test ! -s conftest.err'
     9352  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9353  (eval $ac_try) 2>&5
     9354  ac_status=$?
     9355  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9356  (exit $ac_status); }; } &&
     9357         { ac_try='test -s conftest.$ac_objext'
     9358  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9359  (eval $ac_try) 2>&5
     9360  ac_status=$?
     9361  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9362  (exit $ac_status); }; }; then
     9363  tcl_cv_flag__isoc99_source=yes
     9364else
     9365  echo "$as_me: failed program was:" >&5
     9366sed 's/^/| /' conftest.$ac_ext >&5
     9367
     9368tcl_cv_flag__isoc99_source=no
     9369fi
     9370rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     9371fi
     9372rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     9373fi
     9374
     9375    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
     9376
     9377cat >>confdefs.h <<\_ACEOF
     9378#define _ISOC99_SOURCE 1
     9379_ACEOF
     9380
     9381        tcl_flags="$tcl_flags _ISOC99_SOURCE"
     9382    fi
     9383
     9384
     9385    if test "${tcl_cv_flag__largefile64_source+set}" = set; then
     9386  echo $ECHO_N "(cached) $ECHO_C" >&6
     9387else
     9388  cat >conftest.$ac_ext <<_ACEOF
     9389/* confdefs.h.  */
     9390_ACEOF
     9391cat confdefs.h >>conftest.$ac_ext
     9392cat >>conftest.$ac_ext <<_ACEOF
     9393/* end confdefs.h.  */
     9394#include <sys/stat.h>
     9395int
     9396main ()
     9397{
     9398struct stat64 buf; int i = stat64("/", &buf);
     9399  ;
     9400  return 0;
     9401}
     9402_ACEOF
     9403rm -f conftest.$ac_objext
     9404if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     9405  (eval $ac_compile) 2>conftest.er1
     9406  ac_status=$?
     9407  grep -v '^ *+' conftest.er1 >conftest.err
     9408  rm -f conftest.er1
     9409  cat conftest.err >&5
     9410  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9411  (exit $ac_status); } &&
     9412         { ac_try='test -z "$ac_c_werror_flag"
     9413                         || test ! -s conftest.err'
     9414  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9415  (eval $ac_try) 2>&5
     9416  ac_status=$?
     9417  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9418  (exit $ac_status); }; } &&
     9419         { ac_try='test -s conftest.$ac_objext'
     9420  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9421  (eval $ac_try) 2>&5
     9422  ac_status=$?
     9423  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9424  (exit $ac_status); }; }; then
     9425  tcl_cv_flag__largefile64_source=no
     9426else
     9427  echo "$as_me: failed program was:" >&5
     9428sed 's/^/| /' conftest.$ac_ext >&5
     9429
     9430cat >conftest.$ac_ext <<_ACEOF
     9431/* confdefs.h.  */
     9432_ACEOF
     9433cat confdefs.h >>conftest.$ac_ext
     9434cat >>conftest.$ac_ext <<_ACEOF
     9435/* end confdefs.h.  */
     9436#define _LARGEFILE64_SOURCE 1
     9437#include <sys/stat.h>
     9438int
     9439main ()
     9440{
     9441struct stat64 buf; int i = stat64("/", &buf);
     9442  ;
     9443  return 0;
     9444}
     9445_ACEOF
     9446rm -f conftest.$ac_objext
     9447if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     9448  (eval $ac_compile) 2>conftest.er1
     9449  ac_status=$?
     9450  grep -v '^ *+' conftest.er1 >conftest.err
     9451  rm -f conftest.er1
     9452  cat conftest.err >&5
     9453  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9454  (exit $ac_status); } &&
     9455         { ac_try='test -z "$ac_c_werror_flag"
     9456                         || test ! -s conftest.err'
     9457  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9458  (eval $ac_try) 2>&5
     9459  ac_status=$?
     9460  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9461  (exit $ac_status); }; } &&
     9462         { ac_try='test -s conftest.$ac_objext'
     9463  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9464  (eval $ac_try) 2>&5
     9465  ac_status=$?
     9466  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9467  (exit $ac_status); }; }; then
     9468  tcl_cv_flag__largefile64_source=yes
     9469else
     9470  echo "$as_me: failed program was:" >&5
     9471sed 's/^/| /' conftest.$ac_ext >&5
     9472
     9473tcl_cv_flag__largefile64_source=no
     9474fi
     9475rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     9476fi
     9477rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     9478fi
     9479
     9480    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
     9481
     9482cat >>confdefs.h <<\_ACEOF
     9483#define _LARGEFILE64_SOURCE 1
     9484_ACEOF
     9485
     9486        tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
     9487    fi
     9488
     9489
     9490    if test "${tcl_cv_flag__largefile_source64+set}" = set; then
     9491  echo $ECHO_N "(cached) $ECHO_C" >&6
     9492else
     9493  cat >conftest.$ac_ext <<_ACEOF
     9494/* confdefs.h.  */
     9495_ACEOF
     9496cat confdefs.h >>conftest.$ac_ext
     9497cat >>conftest.$ac_ext <<_ACEOF
     9498/* end confdefs.h.  */
     9499#include <sys/stat.h>
     9500int
     9501main ()
     9502{
     9503char *p = (char *)open64;
     9504  ;
     9505  return 0;
     9506}
     9507_ACEOF
     9508rm -f conftest.$ac_objext
     9509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     9510  (eval $ac_compile) 2>conftest.er1
     9511  ac_status=$?
     9512  grep -v '^ *+' conftest.er1 >conftest.err
     9513  rm -f conftest.er1
     9514  cat conftest.err >&5
     9515  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9516  (exit $ac_status); } &&
     9517         { ac_try='test -z "$ac_c_werror_flag"
     9518                         || test ! -s conftest.err'
     9519  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9520  (eval $ac_try) 2>&5
     9521  ac_status=$?
     9522  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9523  (exit $ac_status); }; } &&
     9524         { ac_try='test -s conftest.$ac_objext'
     9525  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9526  (eval $ac_try) 2>&5
     9527  ac_status=$?
     9528  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9529  (exit $ac_status); }; }; then
     9530  tcl_cv_flag__largefile_source64=no
     9531else
     9532  echo "$as_me: failed program was:" >&5
     9533sed 's/^/| /' conftest.$ac_ext >&5
     9534
     9535cat >conftest.$ac_ext <<_ACEOF
     9536/* confdefs.h.  */
     9537_ACEOF
     9538cat confdefs.h >>conftest.$ac_ext
     9539cat >>conftest.$ac_ext <<_ACEOF
     9540/* end confdefs.h.  */
     9541#define _LARGEFILE_SOURCE64 1
     9542#include <sys/stat.h>
     9543int
     9544main ()
     9545{
     9546char *p = (char *)open64;
     9547  ;
     9548  return 0;
     9549}
     9550_ACEOF
     9551rm -f conftest.$ac_objext
     9552if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     9553  (eval $ac_compile) 2>conftest.er1
     9554  ac_status=$?
     9555  grep -v '^ *+' conftest.er1 >conftest.err
     9556  rm -f conftest.er1
     9557  cat conftest.err >&5
     9558  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9559  (exit $ac_status); } &&
     9560         { ac_try='test -z "$ac_c_werror_flag"
     9561                         || test ! -s conftest.err'
     9562  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9563  (eval $ac_try) 2>&5
     9564  ac_status=$?
     9565  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9566  (exit $ac_status); }; } &&
     9567         { ac_try='test -s conftest.$ac_objext'
     9568  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9569  (eval $ac_try) 2>&5
     9570  ac_status=$?
     9571  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9572  (exit $ac_status); }; }; then
     9573  tcl_cv_flag__largefile_source64=yes
     9574else
     9575  echo "$as_me: failed program was:" >&5
     9576sed 's/^/| /' conftest.$ac_ext >&5
     9577
     9578tcl_cv_flag__largefile_source64=no
     9579fi
     9580rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     9581fi
     9582rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     9583fi
     9584
     9585    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
     9586
     9587cat >>confdefs.h <<\_ACEOF
     9588#define _LARGEFILE_SOURCE64 1
     9589_ACEOF
     9590
     9591        tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
     9592    fi
     9593
     9594    if test "x${tcl_flags}" = "x" ; then
     9595        echo "$as_me:$LINENO: result: none" >&5
     9596echo "${ECHO_T}none" >&6
    28729597    else
    2873         echo "$as_me:$LINENO: result: could not find $TK_BIN_DIR/tkConfig.sh" >&5
    2874 echo "${ECHO_T}could not find $TK_BIN_DIR/tkConfig.sh" >&6
     9598        echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
     9599echo "${ECHO_T}${tcl_flags}" >&6
    28759600    fi
    28769601
    28779602
    2878 
    2879 
     9603    echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
     9604echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6
     9605    if test "${tcl_cv_type_64bit+set}" = set; then
     9606  echo $ECHO_N "(cached) $ECHO_C" >&6
     9607else
     9608
     9609        tcl_cv_type_64bit=none
     9610        # See if the compiler knows natively about __int64
     9611        cat >conftest.$ac_ext <<_ACEOF
     9612/* confdefs.h.  */
     9613_ACEOF
     9614cat confdefs.h >>conftest.$ac_ext
     9615cat >>conftest.$ac_ext <<_ACEOF
     9616/* end confdefs.h.  */
     9617
     9618int
     9619main ()
     9620{
     9621__int64 value = (__int64) 0;
     9622  ;
     9623  return 0;
     9624}
     9625_ACEOF
     9626rm -f conftest.$ac_objext
     9627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     9628  (eval $ac_compile) 2>conftest.er1
     9629  ac_status=$?
     9630  grep -v '^ *+' conftest.er1 >conftest.err
     9631  rm -f conftest.er1
     9632  cat conftest.err >&5
     9633  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9634  (exit $ac_status); } &&
     9635         { ac_try='test -z "$ac_c_werror_flag"
     9636                         || test ! -s conftest.err'
     9637  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9638  (eval $ac_try) 2>&5
     9639  ac_status=$?
     9640  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9641  (exit $ac_status); }; } &&
     9642         { ac_try='test -s conftest.$ac_objext'
     9643  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9644  (eval $ac_try) 2>&5
     9645  ac_status=$?
     9646  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9647  (exit $ac_status); }; }; then
     9648  tcl_type_64bit=__int64
     9649else
     9650  echo "$as_me: failed program was:" >&5
     9651sed 's/^/| /' conftest.$ac_ext >&5
     9652
     9653tcl_type_64bit="long long"
     9654fi
     9655rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     9656        # See if we should use long anyway  Note that we substitute in the
     9657        # type that is our current guess for a 64-bit type inside this check
     9658        # program, so it should be modified only carefully...
     9659        cat >conftest.$ac_ext <<_ACEOF
     9660/* confdefs.h.  */
     9661_ACEOF
     9662cat confdefs.h >>conftest.$ac_ext
     9663cat >>conftest.$ac_ext <<_ACEOF
     9664/* end confdefs.h.  */
     9665
     9666int
     9667main ()
     9668{
     9669switch (0) {
     9670            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
     9671        }
     9672  ;
     9673  return 0;
     9674}
     9675_ACEOF
     9676rm -f conftest.$ac_objext
     9677if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     9678  (eval $ac_compile) 2>conftest.er1
     9679  ac_status=$?
     9680  grep -v '^ *+' conftest.er1 >conftest.err
     9681  rm -f conftest.er1
     9682  cat conftest.err >&5
     9683  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9684  (exit $ac_status); } &&
     9685         { ac_try='test -z "$ac_c_werror_flag"
     9686                         || test ! -s conftest.err'
     9687  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9688  (eval $ac_try) 2>&5
     9689  ac_status=$?
     9690  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9691  (exit $ac_status); }; } &&
     9692         { ac_try='test -s conftest.$ac_objext'
     9693  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9694  (eval $ac_try) 2>&5
     9695  ac_status=$?
     9696  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9697  (exit $ac_status); }; }; then
     9698  tcl_cv_type_64bit=${tcl_type_64bit}
     9699else
     9700  echo "$as_me: failed program was:" >&5
     9701sed 's/^/| /' conftest.$ac_ext >&5
     9702
     9703fi
     9704rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     9705fi
     9706
     9707    if test "${tcl_cv_type_64bit}" = none ; then
     9708
     9709cat >>confdefs.h <<\_ACEOF
     9710#define TCL_WIDE_INT_IS_LONG 1
     9711_ACEOF
     9712
     9713        echo "$as_me:$LINENO: result: using long" >&5
     9714echo "${ECHO_T}using long" >&6
     9715    elif test "${tcl_cv_type_64bit}" = "__int64" \
     9716                -a "${TEA_PLATFORM}" = "windows" ; then
     9717        # We actually want to use the default tcl.h checks in this
     9718        # case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
     9719        echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
     9720echo "${ECHO_T}using Tcl header defaults" >&6
     9721    else
     9722
     9723cat >>confdefs.h <<_ACEOF
     9724#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
     9725_ACEOF
     9726
     9727        echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
     9728echo "${ECHO_T}${tcl_cv_type_64bit}" >&6
     9729
     9730        # Now check for auxiliary declarations
     9731        echo "$as_me:$LINENO: checking for struct dirent64" >&5
     9732echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6
     9733if test "${tcl_cv_struct_dirent64+set}" = set; then
     9734  echo $ECHO_N "(cached) $ECHO_C" >&6
     9735else
     9736
     9737            cat >conftest.$ac_ext <<_ACEOF
     9738/* confdefs.h.  */
     9739_ACEOF
     9740cat confdefs.h >>conftest.$ac_ext
     9741cat >>conftest.$ac_ext <<_ACEOF
     9742/* end confdefs.h.  */
     9743#include <sys/types.h>
     9744#include <sys/dirent.h>
     9745int
     9746main ()
     9747{
     9748struct dirent64 p;
     9749  ;
     9750  return 0;
     9751}
     9752_ACEOF
     9753rm -f conftest.$ac_objext
     9754if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     9755  (eval $ac_compile) 2>conftest.er1
     9756  ac_status=$?
     9757  grep -v '^ *+' conftest.er1 >conftest.err
     9758  rm -f conftest.er1
     9759  cat conftest.err >&5
     9760  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9761  (exit $ac_status); } &&
     9762         { ac_try='test -z "$ac_c_werror_flag"
     9763                         || test ! -s conftest.err'
     9764  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9765  (eval $ac_try) 2>&5
     9766  ac_status=$?
     9767  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9768  (exit $ac_status); }; } &&
     9769         { ac_try='test -s conftest.$ac_objext'
     9770  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9771  (eval $ac_try) 2>&5
     9772  ac_status=$?
     9773  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9774  (exit $ac_status); }; }; then
     9775  tcl_cv_struct_dirent64=yes
     9776else
     9777  echo "$as_me: failed program was:" >&5
     9778sed 's/^/| /' conftest.$ac_ext >&5
     9779
     9780tcl_cv_struct_dirent64=no
     9781fi
     9782rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     9783fi
     9784echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
     9785echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6
     9786        if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
     9787
     9788cat >>confdefs.h <<\_ACEOF
     9789#define HAVE_STRUCT_DIRENT64 1
     9790_ACEOF
     9791
     9792        fi
     9793
     9794        echo "$as_me:$LINENO: checking for struct stat64" >&5
     9795echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6
     9796if test "${tcl_cv_struct_stat64+set}" = set; then
     9797  echo $ECHO_N "(cached) $ECHO_C" >&6
     9798else
     9799
     9800            cat >conftest.$ac_ext <<_ACEOF
     9801/* confdefs.h.  */
     9802_ACEOF
     9803cat confdefs.h >>conftest.$ac_ext
     9804cat >>conftest.$ac_ext <<_ACEOF
     9805/* end confdefs.h.  */
     9806#include <sys/stat.h>
     9807int
     9808main ()
     9809{
     9810struct stat64 p;
     9811
     9812  ;
     9813  return 0;
     9814}
     9815_ACEOF
     9816rm -f conftest.$ac_objext
     9817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     9818  (eval $ac_compile) 2>conftest.er1
     9819  ac_status=$?
     9820  grep -v '^ *+' conftest.er1 >conftest.err
     9821  rm -f conftest.er1
     9822  cat conftest.err >&5
     9823  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9824  (exit $ac_status); } &&
     9825         { ac_try='test -z "$ac_c_werror_flag"
     9826                         || test ! -s conftest.err'
     9827  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9828  (eval $ac_try) 2>&5
     9829  ac_status=$?
     9830  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9831  (exit $ac_status); }; } &&
     9832         { ac_try='test -s conftest.$ac_objext'
     9833  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9834  (eval $ac_try) 2>&5
     9835  ac_status=$?
     9836  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9837  (exit $ac_status); }; }; then
     9838  tcl_cv_struct_stat64=yes
     9839else
     9840  echo "$as_me: failed program was:" >&5
     9841sed 's/^/| /' conftest.$ac_ext >&5
     9842
     9843tcl_cv_struct_stat64=no
     9844fi
     9845rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     9846fi
     9847echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
     9848echo "${ECHO_T}$tcl_cv_struct_stat64" >&6
     9849        if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
     9850
     9851cat >>confdefs.h <<\_ACEOF
     9852#define HAVE_STRUCT_STAT64 1
     9853_ACEOF
     9854
     9855        fi
     9856
     9857
     9858
     9859for ac_func in open64 lseek64
     9860do
     9861as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
     9862echo "$as_me:$LINENO: checking for $ac_func" >&5
     9863echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
     9864if eval "test \"\${$as_ac_var+set}\" = set"; then
     9865  echo $ECHO_N "(cached) $ECHO_C" >&6
     9866else
     9867  cat >conftest.$ac_ext <<_ACEOF
     9868/* confdefs.h.  */
     9869_ACEOF
     9870cat confdefs.h >>conftest.$ac_ext
     9871cat >>conftest.$ac_ext <<_ACEOF
     9872/* end confdefs.h.  */
     9873/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
     9874   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
     9875#define $ac_func innocuous_$ac_func
     9876
     9877/* System header to define __stub macros and hopefully few prototypes,
     9878    which can conflict with char $ac_func (); below.
     9879    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     9880    <limits.h> exists even on freestanding compilers.  */
     9881
     9882#ifdef __STDC__
     9883# include <limits.h>
     9884#else
     9885# include <assert.h>
     9886#endif
     9887
     9888#undef $ac_func
     9889
     9890/* Override any gcc2 internal prototype to avoid an error.  */
     9891#ifdef __cplusplus
     9892extern "C"
     9893{
     9894#endif
     9895/* We use char because int might match the return type of a gcc2
     9896   builtin and then its argument prototype would still apply.  */
     9897char $ac_func ();
     9898/* The GNU C library defines this for functions which it implements
     9899    to always fail with ENOSYS.  Some functions are actually named
     9900    something starting with __ and the normal name is an alias.  */
     9901#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
     9902choke me
     9903#else
     9904char (*f) () = $ac_func;
     9905#endif
     9906#ifdef __cplusplus
     9907}
     9908#endif
     9909
     9910int
     9911main ()
     9912{
     9913return f != $ac_func;
     9914  ;
     9915  return 0;
     9916}
     9917_ACEOF
     9918rm -f conftest.$ac_objext conftest$ac_exeext
     9919if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     9920  (eval $ac_link) 2>conftest.er1
     9921  ac_status=$?
     9922  grep -v '^ *+' conftest.er1 >conftest.err
     9923  rm -f conftest.er1
     9924  cat conftest.err >&5
     9925  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9926  (exit $ac_status); } &&
     9927         { ac_try='test -z "$ac_c_werror_flag"
     9928                         || test ! -s conftest.err'
     9929  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9930  (eval $ac_try) 2>&5
     9931  ac_status=$?
     9932  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9933  (exit $ac_status); }; } &&
     9934         { ac_try='test -s conftest$ac_exeext'
     9935  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9936  (eval $ac_try) 2>&5
     9937  ac_status=$?
     9938  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9939  (exit $ac_status); }; }; then
     9940  eval "$as_ac_var=yes"
     9941else
     9942  echo "$as_me: failed program was:" >&5
     9943sed 's/^/| /' conftest.$ac_ext >&5
     9944
     9945eval "$as_ac_var=no"
     9946fi
     9947rm -f conftest.err conftest.$ac_objext \
     9948      conftest$ac_exeext conftest.$ac_ext
     9949fi
     9950echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
     9951echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
     9952if test `eval echo '${'$as_ac_var'}'` = yes; then
     9953  cat >>confdefs.h <<_ACEOF
     9954#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
     9955_ACEOF
     9956
     9957fi
     9958done
     9959
     9960        echo "$as_me:$LINENO: checking for off64_t" >&5
     9961echo $ECHO_N "checking for off64_t... $ECHO_C" >&6
     9962        if test "${tcl_cv_type_off64_t+set}" = set; then
     9963  echo $ECHO_N "(cached) $ECHO_C" >&6
     9964else
     9965
     9966            cat >conftest.$ac_ext <<_ACEOF
     9967/* confdefs.h.  */
     9968_ACEOF
     9969cat confdefs.h >>conftest.$ac_ext
     9970cat >>conftest.$ac_ext <<_ACEOF
     9971/* end confdefs.h.  */
     9972#include <sys/types.h>
     9973int
     9974main ()
     9975{
     9976off64_t offset;
     9977
     9978  ;
     9979  return 0;
     9980}
     9981_ACEOF
     9982rm -f conftest.$ac_objext
     9983if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     9984  (eval $ac_compile) 2>conftest.er1
     9985  ac_status=$?
     9986  grep -v '^ *+' conftest.er1 >conftest.err
     9987  rm -f conftest.er1
     9988  cat conftest.err >&5
     9989  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9990  (exit $ac_status); } &&
     9991         { ac_try='test -z "$ac_c_werror_flag"
     9992                         || test ! -s conftest.err'
     9993  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     9994  (eval $ac_try) 2>&5
     9995  ac_status=$?
     9996  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     9997  (exit $ac_status); }; } &&
     9998         { ac_try='test -s conftest.$ac_objext'
     9999  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     10000  (eval $ac_try) 2>&5
     10001  ac_status=$?
     10002  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     10003  (exit $ac_status); }; }; then
     10004  tcl_cv_type_off64_t=yes
     10005else
     10006  echo "$as_me: failed program was:" >&5
     10007sed 's/^/| /' conftest.$ac_ext >&5
     10008
     10009tcl_cv_type_off64_t=no
     10010fi
     10011rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     10012fi
     10013
     10014                        if test "x${tcl_cv_type_off64_t}" = "xyes" && \
     10015                test "x${ac_cv_func_lseek64}" = "xyes" && \
     10016                test "x${ac_cv_func_open64}" = "xyes" ; then
     10017
     10018cat >>confdefs.h <<\_ACEOF
     10019#define HAVE_TYPE_OFF64_T 1
     10020_ACEOF
     10021
     10022            echo "$as_me:$LINENO: result: yes" >&5
     10023echo "${ECHO_T}yes" >&6
     10024        else
     10025            echo "$as_me:$LINENO: result: no" >&5
     10026echo "${ECHO_T}no" >&6
     10027        fi
     10028    fi
     10029
     10030
     10031
     10032#--------------------------------------------------------------------
     10033# Set the default compiler switches based on the --enable-symbols option.
     10034#--------------------------------------------------------------------
     10035
     10036
     10037
     10038    echo "$as_me:$LINENO: checking for build with symbols" >&5
     10039echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6
     10040    # Check whether --enable-symbols or --disable-symbols was given.
     10041if test "${enable_symbols+set}" = set; then
     10042  enableval="$enable_symbols"
     10043  tcl_ok=$enableval
     10044else
     10045  tcl_ok=no
     10046fi;
     10047    DBGX=""
     10048    if test "$tcl_ok" = "no"; then
     10049        CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
     10050        LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
     10051        echo "$as_me:$LINENO: result: no" >&5
     10052echo "${ECHO_T}no" >&6
     10053    else
     10054        CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
     10055        LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
     10056        if test "$tcl_ok" = "yes"; then
     10057            echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
     10058echo "${ECHO_T}yes (standard debugging)" >&6
     10059        fi
     10060    fi
     10061    if test "${TEA_PLATFORM}" != "windows" ; then
     10062        LDFLAGS_DEFAULT="${LDFLAGS}"
     10063    fi
     10064
     10065
     10066
     10067
     10068
     10069    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
     10070
     10071cat >>confdefs.h <<\_ACEOF
     10072#define TCL_MEM_DEBUG 1
     10073_ACEOF
     10074
     10075    fi
     10076
     10077    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
     10078        if test "$tcl_ok" = "all"; then
     10079            echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
     10080echo "${ECHO_T}enabled symbols mem debugging" >&6
     10081        else
     10082            echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
     10083echo "${ECHO_T}enabled $tcl_ok debugging" >&6
     10084        fi
     10085    fi
     10086
     10087
     10088#--------------------------------------------------------------------
     10089# Everyone should be linking against the Tcl stub library.  If you
     10090# can't for some reason, remove this definition.  If you aren't using
     10091# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
     10092# link against the non-stubbed Tcl library.  Add Tk too if necessary.
     10093#--------------------------------------------------------------------
     10094
     10095
     10096cat >>confdefs.h <<\_ACEOF
     10097#define USE_TCL_STUBS 1
     10098_ACEOF
     10099
     10100#AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
     10101
     10102#--------------------------------------------------------------------
     10103# This macro generates a line to use when building a library.  It
     10104# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
     10105# and TEA_LOAD_TCLCONFIG macros above.
     10106#--------------------------------------------------------------------
     10107
     10108
     10109    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
     10110        MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
     10111        MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
     10112        MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
     10113    else
     10114        MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
     10115        MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
     10116        MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
     10117    fi
     10118
     10119    if test "${SHARED_BUILD}" = "1" ; then
     10120        MAKE_LIB="${MAKE_SHARED_LIB} "
     10121    else
     10122        MAKE_LIB="${MAKE_STATIC_LIB} "
     10123    fi
     10124
     10125    #--------------------------------------------------------------------
     10126    # Shared libraries and static libraries have different names.
     10127    # Use the double eval to make sure any variables in the suffix is
     10128    # substituted. (@@@ Might not be necessary anymore)
     10129    #--------------------------------------------------------------------
     10130
     10131    if test "${TEA_PLATFORM}" = "windows" ; then
     10132        if test "${SHARED_BUILD}" = "1" ; then
     10133            # We force the unresolved linking of symbols that are really in
     10134            # the private libraries of Tcl and Tk.
     10135            SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
     10136            if test x"${TK_BIN_DIR}" != x ; then
     10137                SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
     10138            fi
     10139            eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
     10140        else
     10141            eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
     10142        fi
     10143        # Some packages build their own stubs libraries
     10144        eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
     10145        if test "$GCC" = "yes"; then
     10146            PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
     10147        fi
     10148        # These aren't needed on Windows (either MSVC or gcc)
     10149        RANLIB="mt -manifest ${PKG_LIB_FILE}.manifest -outputresource:${PKG_LIB_FILE}\;2 ; test -f"
     10150        RANLIB_STUB=:
     10151    else
     10152        RANLIB_STUB="${RANLIB}"
     10153        if test "${SHARED_BUILD}" = "1" ; then
     10154            SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
     10155            if test x"${TK_BIN_DIR}" != x ; then
     10156                SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
     10157            fi
     10158            eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
     10159            RANLIB=:
     10160        else
     10161            eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
     10162        fi
     10163        # Some packages build their own stubs libraries
     10164        eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
     10165    fi
     10166
     10167    # These are escaped so that only CFLAGS is picked up at configure time.
     10168    # The other values will be substituted at make time.
     10169    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
     10170    if test "${SHARED_BUILD}" = "1" ; then
     10171        CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
     10172    fi
     10173
     10174
     10175
     10176
     10177
     10178
     10179
     10180
     10181
     10182#--------------------------------------------------------------------
     10183# Determine the name of the tclsh and/or wish executables in the
     10184# Tcl and Tk build directories or the location they were installed
     10185# into. These paths are used to support running test cases only,
     10186# the Makefile should not be making use of these paths to generate
     10187# a pkgIndex.tcl file or anything else at extension build time.
     10188#--------------------------------------------------------------------
     10189
     10190
     10191    echo "$as_me:$LINENO: checking for tclsh" >&5
     10192echo $ECHO_N "checking for tclsh... $ECHO_C" >&6
     10193    if test -f "${TCL_BIN_DIR}/Makefile" ; then
     10194        # tclConfig.sh is in Tcl build directory
     10195        if test "${TEA_PLATFORM}" = "windows"; then
     10196            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
     10197        else
     10198            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
     10199        fi
     10200    else
     10201        # tclConfig.sh is in install location
     10202        if test "${TEA_PLATFORM}" = "windows"; then
     10203            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
     10204        else
     10205            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
     10206        fi
     10207        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
     10208              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
     10209              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
     10210        for i in $list ; do
     10211            if test -f "$i/${TCLSH_PROG}" ; then
     10212                REAL_TCL_BIN_DIR="`cd "$i"; pwd`"
     10213                break
     10214            fi
     10215        done
     10216        TCLSH_PROG="${REAL_TCL_BIN_DIR}/${TCLSH_PROG}"
     10217    fi
     10218    echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
     10219echo "${ECHO_T}${TCLSH_PROG}" >&6
     10220
     10221
     10222#TEA_PROG_WISH
    288010223
    288110224
     
    291010253      break
    291110254    elif test -r "$dir/include/bltInt.h" ; then
    2912       BLT_SRC_DIR="$dir/lib"
     10255      BLT_SRC_DIR="$dir/include"
    291310256      break
    291410257    fi
     
    292410267     ../../blt \
    292510268     `ls -dr ../../../blt[2-3].[0-9]* 2>/dev/null` \
    2926      ../../../blt
     10269     ../../../blt \
     10270     `ls -dr c:/opt/blt[2-3].[0-9]* 2>/dev/null` \
     10271     c\:/opt/blt
    292710272    do
    2928       if test -r "$dir/bltInt.h" ; then
    2929         tclConfigFile="$dir/bltInt.h"
    2930         break
     10273      if test -r "$dir/src/bltInt.h" ; then
     10274        BLT_SRC_DIR="$dir/src"
     10275        break
    293110276      fi
    293210277    done
    293310278  fi
    293410279fi
    2935 
    293610280echo "$as_me:$LINENO: result: ${BLT_SRC_DIR}" >&5
    293710281echo "${ECHO_T}${BLT_SRC_DIR}" >&6
     
    294410288
    294510289
    2946 
    294710290#--------------------------------------------------------------------
    2948 # __CHANGE__
    2949 # A few miscellaneous platform-specific items:
    2950 #
    2951 # Define a special symbol for Windows (BUILD_exampleA in this case) so
    2952 # that we create the export library with the dll.  See sha1.h on how
    2953 # to use this.
    2954 #
    2955 # Windows creates a few extra files that need to be cleaned up.
    2956 # You can add more files to clean if your extension creates any extra
    2957 # files.
    2958 #
    2959 # Define any extra compiler flags in the PACKAGE_CFLAGS variable.
    2960 # These will be appended to the current set of compiler flags for
    2961 # your system.
     10291# Look for rappture.h on the normal include path.  If not found, look
     10292# for it in the --with-rappture directory.
    296210293#--------------------------------------------------------------------
    2963 
    2964 case "`uname -s`" in
    2965     *win32* | *WIN32* | *CYGWIN_NT*)
    2966         cat >>confdefs.h <<\_ACEOF
    2967 #define BUILD_RapptureGUI 1
    2968 _ACEOF
    2969 
    2970         CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch"
    2971 
    2972     ;;
    2973     *)
    2974         CLEANFILES=
    2975     ;;
    2976 esac
    2977 
    2978 #--------------------------------------------------------------------
    2979 # Check whether --enable-threads or --disable-threads was given.
    2980 # So far only Tcl responds to this one.
    2981 #--------------------------------------------------------------------
    2982 
    2983 
    2984 
    2985     echo "$as_me:$LINENO: checking for building with threads" >&5
    2986 echo $ECHO_N "checking for building with threads... $ECHO_C" >&6
    2987     # Check whether --enable-threads or --disable-threads was given.
    2988 if test "${enable_threads+set}" = set; then
    2989   enableval="$enable_threads"
    2990   tcl_ok=$enableval
    2991 else
    2992   tcl_ok=no
    2993 fi;
    2994 
    2995     if test "$tcl_ok" = "yes"; then
    2996         echo "$as_me:$LINENO: result: yes" >&5
    2997 echo "${ECHO_T}yes" >&6
    2998         TCL_THREADS=1
    2999         cat >>confdefs.h <<\_ACEOF
    3000 #define TCL_THREADS 1
    3001 _ACEOF
    3002 
    3003         cat >>confdefs.h <<\_ACEOF
    3004 #define _REENTRANT 1
    3005 _ACEOF
    3006 
    3007 
    3008         echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
    3009 echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6
    3010 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
    3011   echo $ECHO_N "(cached) $ECHO_C" >&6
    3012 else
    3013   ac_check_lib_save_LIBS=$LIBS
    3014 LIBS="-lpthread  $LIBS"
    3015 cat >conftest.$ac_ext <<_ACEOF
    3016 /* confdefs.h.  */
    3017 _ACEOF
    3018 cat confdefs.h >>conftest.$ac_ext
    3019 cat >>conftest.$ac_ext <<_ACEOF
    3020 /* end confdefs.h.  */
    3021 
    3022 /* Override any gcc2 internal prototype to avoid an error.  */
    3023 #ifdef __cplusplus
    3024 extern "C"
    3025 #endif
    3026 /* We use char because int might match the return type of a gcc2
    3027    builtin and then its argument prototype would still apply.  */
    3028 char pthread_mutex_init ();
    3029 int
    3030 main ()
    3031 {
    3032 pthread_mutex_init ();
    3033   ;
    3034   return 0;
    3035 }
    3036 _ACEOF
    3037 rm -f conftest.$ac_objext conftest$ac_exeext
    3038 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    3039   (eval $ac_link) 2>conftest.er1
    3040   ac_status=$?
    3041   grep -v '^ *+' conftest.er1 >conftest.err
    3042   rm -f conftest.er1
    3043   cat conftest.err >&5
    3044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3045   (exit $ac_status); } &&
    3046          { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
    3047   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    3048   (eval $ac_try) 2>&5
    3049   ac_status=$?
    3050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3051   (exit $ac_status); }; } &&
    3052          { ac_try='test -s conftest$ac_exeext'
    3053   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    3054   (eval $ac_try) 2>&5
    3055   ac_status=$?
    3056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    3057   (exit $ac_status); }; }; then
    3058   ac_cv_lib_pthread_pthread_mutex_init=yes
    3059 else
    3060   echo "$as_me: failed program was:" >&5
    3061 sed 's/^/| /' conftest.$ac_ext >&5
    3062 
    3063 ac_cv_lib_pthread_pthread_mutex_init=no
    3064 fi
    3065 rm -f conftest.err conftest.$ac_objext \
    3066       conftest$ac_exeext conftest.$ac_ext
    3067 LIBS=$ac_check_lib_save_LIBS
    3068 fi
    3069 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
    3070 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6
    3071 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
    3072   tcl_ok=yes
    3073 else
    3074   tcl_ok=no
    3075 fi
    3076 
    3077         if test "$tcl_ok" = "yes"; then
    3078             # The space is needed
    3079             THREADS_LIBS=" -lpthread"
    3080         else
    3081             TCL_THREADS=0
    3082             { echo "$as_me:$LINENO: WARNING: \"Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...\"" >&5
    3083 echo "$as_me: WARNING: \"Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...\"" >&2;}
    3084         fi
    3085     else
    3086         TCL_THREADS=0
    3087         echo "$as_me:$LINENO: result: no (default)" >&5
    3088 echo "${ECHO_T}no (default)" >&6
     10294echo "$as_me:$LINENO: checking for include/core/rappture.h" >&5
     10295echo $ECHO_N "checking for include/core/rappture.h... $ECHO_C" >&6
     10296RAPPTURE_DIR=""
     10297if test "x$rappture_dir" != "x" ; then
     10298  #
     10299  # Verify that a rappture.h file exists in the directory specified
     10300  # by --with-rappture.
     10301  #
     10302  if test -r "$rappture_dir/include/core/rappture.h" ; then
     10303    RAPPTURE_DIR="$rappture_dir"
     10304  fi
     10305else
     10306  #
     10307  # Otherwise, search for the rappture.h include file...
     10308  # 1. Search previously named locations.
     10309  #
     10310  for dir in \
     10311   $prefix \
     10312   $exec_prefix
     10313  do
     10314    if test -r "$dir/include/core/rappture.h" ; then
     10315      RAPPTURE_DIR="$dir"
     10316      break
    308910317    fi
    3090 
    3091 
    3092 
    3093 #--------------------------------------------------------------------
    3094 # The statement below defines a collection of symbols related to
    3095 # building as a shared library instead of a static library.
    3096 #--------------------------------------------------------------------
    3097 
    3098 
    3099     echo "$as_me:$LINENO: checking how to build libraries" >&5
    3100 echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6
    3101     # Check whether --enable-shared or --disable-shared was given.
    3102 if test "${enable_shared+set}" = set; then
    3103   enableval="$enable_shared"
    3104   tcl_ok=$enableval
    3105 else
    3106   tcl_ok=yes
    3107 fi;
    3108 
    3109     if test "${enable_shared+set}" = set; then
    3110         enableval="$enable_shared"
    3111         tcl_ok=$enableval
    3112     else
    3113         tcl_ok=yes
    3114     fi
    3115 
    3116     if test "$tcl_ok" = "yes" ; then
    3117         echo "$as_me:$LINENO: result: shared" >&5
    3118 echo "${ECHO_T}shared" >&6
    3119         SHARED_BUILD=1
    3120     else
    3121         echo "$as_me:$LINENO: result: static" >&5
    3122 echo "${ECHO_T}static" >&6
    3123         SHARED_BUILD=0
    3124         cat >>confdefs.h <<\_ACEOF
    3125 #define STATIC_BUILD 1
    3126 _ACEOF
    3127 
    3128     fi
    3129 
    3130 
    3131 #--------------------------------------------------------------------
    3132 # This macro figures out what flags to use with the compiler/linker
    3133 # when building shared/static debug/optimized objects.  This information
    3134 # is all taken from the tclConfig.sh file.
    3135 #--------------------------------------------------------------------
    3136 
    3137 CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
    3138 CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
    3139 LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
    3140 LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
    3141 SHLIB_LD=${TCL_SHLIB_LD}
    3142 STLIB_LD=${TCL_STLIB_LD}
    3143 SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
    3144 
    3145 
    3146 
    3147 
    3148 
    3149 
    3150 
    3151 
    3152 #--------------------------------------------------------------------
    3153 # Set the default compiler switches based on the --enable-symbols
    3154 # option.
    3155 #--------------------------------------------------------------------
    3156 
    3157 
    3158     case "`uname -s`" in
    3159         *win32* | *WIN32* | *CYGWIN_NT*)
    3160             tcl_dbgx=d
    3161         ;;
    3162         *)
    3163             tcl_dbgx=g
    3164         ;;
    3165     esac
    3166 
    3167     echo "$as_me:$LINENO: checking for build with symbols" >&5
    3168 echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6
    3169     # Check whether --enable-symbols or --disable-symbols was given.
    3170 if test "${enable_symbols+set}" = set; then
    3171   enableval="$enable_symbols"
    3172   tcl_ok=$enableval
    3173 else
    3174   tcl_ok=no
    3175 fi;
    3176     if test "$tcl_ok" = "yes"; then
    3177         CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
    3178         LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
    3179         DBGX=${tcl_dbgx}
    3180         TCL_DBGX=${tcl_dbgx}
    3181         echo "$as_me:$LINENO: result: yes" >&5
    3182 echo "${ECHO_T}yes" >&6
    3183     else
    3184         CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
    3185         LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
    3186         DBGX=""
    3187         TCL_DBGX=""
    3188         echo "$as_me:$LINENO: result: no" >&5
    3189 echo "${ECHO_T}no" >&6
    3190     fi
    3191 
    3192 
    3193 
    3194 
    3195 
    3196 
    3197 if test "${SHARED_BUILD}" = "1" ; then
    3198     CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}'
    3199 else
    3200     CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}'
    3201 fi
    3202 
    3203 #--------------------------------------------------------------------
    3204 # Everyone should be linking against the Tcl stub library.  If you
    3205 # can't for some reason, remove this definition.  If you aren't using
    3206 # stubs, you also need to modify the SHLIB_LD_LIBS setting below to
    3207 # link against the non-stubbed Tcl library.
    3208 #--------------------------------------------------------------------
    3209 
    3210 cat >>confdefs.h <<\_ACEOF
    3211 #define USE_TCL_STUBS 1
    3212 _ACEOF
    3213 
    3214 
    3215 #--------------------------------------------------------------------
    3216 # This macro generates a line to use when building a library.  It
    3217 # depends on values set by the SC_ENABLE_SHARED, SC_ENABLE_SYMBOLS,
    3218 # and SC_LOAD_TCLCONFIG macros above.
    3219 #--------------------------------------------------------------------
    3220 
    3221 
    3222     case "`uname -s`" in
    3223         *win32* | *WIN32* | *CYGWIN_NT*)
    3224             if test "${CC-cc}" = "cl"; then
    3225                 MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$@_OBJECTS) "
    3226                 MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$@_OBJECTS) "
    3227             fi
    3228             ;;
    3229         *)
    3230             MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$@_OBJECTS)"
    3231             MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$@_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
    3232             ;;
    3233     esac
    3234 
    3235     if test "${SHARED_BUILD}" = "1" ; then
    3236         MAKE_LIB=${MAKE_SHARED_LIB}
    3237     else
    3238         MAKE_LIB=${MAKE_STATIC_LIB}
    3239     fi
    3240 
    3241 
    3242 
    3243 
    3244 
    3245 
    3246 #--------------------------------------------------------------------
    3247 # eval these two values to dereference the ${DBGX} variable.
    3248 #--------------------------------------------------------------------
    3249 
    3250 eval "SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
    3251 eval "UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
    3252 
    3253 #--------------------------------------------------------------------
    3254 # Shared libraries and static libraries have different names.
    3255 #--------------------------------------------------------------------
    3256 
    3257 case "`uname -s`" in
    3258     *win32* | *WIN32* | *CYGWIN_NT*)
    3259         if test "${SHARED_BUILD}" = "1" ; then
    3260             SHLIB_LD_LIBS="\"`cygpath -w ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\" ${TCL_SHLIB_LD_LIBS}"
    3261             eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
    3262             RANLIB=:
    3263         else
    3264             eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
    3265         fi
    3266         ;;
    3267     *)
    3268         if test "${SHARED_BUILD}" = "1" ; then
    3269             SHLIB_LD_LIBS="${TCL_LIB_SPEC} ${TK_LIB_SPEC} -lBLT24"
    3270             eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
    3271             RANLIB=:
    3272         else
    3273             eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
    3274         fi
    3275         ;;
    3276 esac
    3277 
    3278 #--------------------------------------------------------------------
    3279 # __CHANGE__
    3280 # Change the name from exampeA_LIB_FILE to match your package name.
    3281 #--------------------------------------------------------------------
    3282 
    3283 
    3284 
    3285 
    3286 #--------------------------------------------------------------------
    3287 # Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
    3288 # file during the install process.  Don't run the TCLSH_PROG through
    3289 # ${CYGPATH} because it's being used directly by make.
    3290 # Require that we use a tclsh shell version 8.2 or later since earlier
    3291 # versions have bugs in the pkg_mkIndex routine.
    3292 #--------------------------------------------------------------------
    3293 
    3294 for ac_prog in tclsh8.4${EXEEXT} tclsh84${EXEEXT} tclsh${EXEEXT}
    3295 do
    3296   # Extract the first word of "$ac_prog", so it can be a program name with args.
    3297 set dummy $ac_prog; ac_word=$2
    3298 echo "$as_me:$LINENO: checking for $ac_word" >&5
    3299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
    3300 if test "${ac_cv_path_TCLSH_PROG+set}" = set; then
    3301   echo $ECHO_N "(cached) $ECHO_C" >&6
    3302 else
    3303   case $TCLSH_PROG in
    3304   [\\/]* | ?:[\\/]*)
    3305   ac_cv_path_TCLSH_PROG="$TCLSH_PROG" # Let the user override the test with a path.
    3306   ;;
    3307   *)
    3308   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    3309 as_dummy="${exec_prefix}:${PATH}"
    3310 for as_dir in $as_dummy
    3311 do
    3312   IFS=$as_save_IFS
    3313   test -z "$as_dir" && as_dir=.
    3314   for ac_exec_ext in '' $ac_executable_extensions; do
    3315   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    3316     ac_cv_path_TCLSH_PROG="$as_dir/$ac_word$ac_exec_ext"
    3317     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    3318     break 2
     10318  done
     10319  #
     10320  #  2. Search source directories.
     10321  #
     10322  if test "x$RAPPTURE_DIR" = "x" ; then
     10323    for dir in \
     10324     `ls -dr ../rappture 2>/dev/null` \
     10325     `ls -dr ../../rappture 2>/dev/null` \
     10326     `ls -dr ../../../rappture 2>/dev/null` \
     10327     `ls -dr C\:/opt/rappture 2>/dev/null` \
     10328     `ls -dr /opt/rappture 2>/dev/null`
     10329    do
     10330      if test -r "$dir/include/core/rappture.h" ; then
     10331        RAPPTURE_DIR="$dir"
     10332        break
     10333      fi
     10334    done
    331910335  fi
    3320 done
    3321 done
    3322 
    3323   ;;
    3324 esac
    3325 fi
    3326 TCLSH_PROG=$ac_cv_path_TCLSH_PROG
    3327 
    3328 if test -n "$TCLSH_PROG"; then
    3329   echo "$as_me:$LINENO: result: $TCLSH_PROG" >&5
    3330 echo "${ECHO_T}$TCLSH_PROG" >&6
    3331 else
    3332   echo "$as_me:$LINENO: result: no" >&5
    3333 echo "${ECHO_T}no" >&6
    3334 fi
    3335 
    3336   test -n "$TCLSH_PROG" && break
    3337 done
    3338 test -n "$TCLSH_PROG" || TCLSH_PROG=":"
    3339 
    3340 
    3341 if test "x${TCLSH_PROG}" = "x:" ; then
    3342     { echo "$as_me:$LINENO: WARNING: No tclsh executable found.  You will have to build the pkgIndex.tcl file manually." >&5
    3343 echo "$as_me: WARNING: No tclsh executable found.  You will have to build the pkgIndex.tcl file manually." >&2;}
    3344 fi
    3345 
    3346 
    3347 #--------------------------------------------------------------------
    3348 # Finalize patchlevel and version info
    3349 #--------------------------------------------------------------------
    3350 PATCHLEVEL=`${TCLSH_PROG} cf/patchlevel.tcl`
     10336fi
     10337echo "$as_me:$LINENO: result: ${RAPPTURE_DIR}" >&5
     10338echo "${ECHO_T}${RAPPTURE_DIR}" >&6
     10339
     10340if test "x$RAPPTURE_DIR" = "x" ; then
     10341  echo "can't find RAPPTURE include file \"include/core/rappture.h\""
     10342  echo "use --with-rappture=DIR to specify the location of rappture"
     10343  exit 1
     10344fi
     10345
     10346
     10347
     10348PATCHLEVEL=`${TCLSH_PROG} tclconfig/patchlevel.tcl`
    335110349EXACT_VERSION=${MAJOR_VERSION}.${MINOR_VERSION}-${PATCHLEVEL}
    335210350NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
     
    336110359#--------------------------------------------------------------------
    336210360# Finally, substitute all of the various values into the Makefile.
     10361# You may alternatively have a special pkgIndex.tcl.in or other files
     10362# which require substituting th AC variables in.  Include these here.
    336310363#--------------------------------------------------------------------
    336410364
     
    375710757cat >&5 <<_CSEOF
    375810758
    3759 This file was extended by $as_me, which was
     10759This file was extended by RapptureGUI $as_me 1.0, which was
    376010760generated by GNU Autoconf 2.59.  Invocation command line was
    376110761
     
    381210812cat >>$CONFIG_STATUS <<_ACEOF
    381310813ac_cs_version="\\
    3814 config.status
     10814RapptureGUI config.status 1.0
    381510815configured by $0, generated by GNU Autoconf 2.59,
    381610816  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
     
    400111001s,@ECHO_T@,$ECHO_T,;t t
    400211002s,@LIBS@,$LIBS,;t t
     11003s,@CYGPATH@,$CYGPATH,;t t
     11004s,@EXEEXT@,$EXEEXT,;t t
     11005s,@PKG_LIB_FILE@,$PKG_LIB_FILE,;t t
     11006s,@PKG_STUB_LIB_FILE@,$PKG_STUB_LIB_FILE,;t t
     11007s,@PKG_STUB_SOURCES@,$PKG_STUB_SOURCES,;t t
     11008s,@PKG_STUB_OBJECTS@,$PKG_STUB_OBJECTS,;t t
     11009s,@PKG_TCL_SOURCES@,$PKG_TCL_SOURCES,;t t
     11010s,@PKG_HEADERS@,$PKG_HEADERS,;t t
     11011s,@PKG_INCLUDES@,$PKG_INCLUDES,;t t
     11012s,@PKG_LIBS@,$PKG_LIBS,;t t
     11013s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
     11014s,@TCL_VERSION@,$TCL_VERSION,;t t
     11015s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
     11016s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
     11017s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
     11018s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
     11019s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
     11020s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
     11021s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
     11022s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
     11023s,@TCL_LIBS@,$TCL_LIBS,;t t
     11024s,@TCL_DEFS@,$TCL_DEFS,;t t
     11025s,@TCL_EXTRA_CFLAGS@,$TCL_EXTRA_CFLAGS,;t t
     11026s,@TCL_LD_FLAGS@,$TCL_LD_FLAGS,;t t
     11027s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
    400311028s,@CC@,$CC,;t t
    400411029s,@CFLAGS@,$CFLAGS,;t t
     
    400611031s,@CPPFLAGS@,$CPPFLAGS,;t t
    400711032s,@ac_ct_CC@,$ac_ct_CC,;t t
    4008 s,@EXEEXT@,$EXEEXT,;t t
    400911033s,@OBJEXT@,$OBJEXT,;t t
     11034s,@CPP@,$CPP,;t t
    401011035s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
    401111036s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
     
    401411039s,@RANLIB@,$RANLIB,;t t
    401511040s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
    4016 s,@build@,$build,;t t
    4017 s,@build_cpu@,$build_cpu,;t t
    4018 s,@build_vendor@,$build_vendor,;t t
    4019 s,@build_os@,$build_os,;t t
    4020 s,@host@,$host,;t t
    4021 s,@host_cpu@,$host_cpu,;t t
    4022 s,@host_vendor@,$host_vendor,;t t
    4023 s,@host_os@,$host_os,;t t
    4024 s,@CYGPATH@,$CYGPATH,;t t
     11041s,@EGREP@,$EGREP,;t t
     11042s,@MATH_LIBS@,$MATH_LIBS,;t t
     11043s,@PKG_SOURCES@,$PKG_SOURCES,;t t
     11044s,@PKG_OBJECTS@,$PKG_OBJECTS,;t t
     11045s,@CLEANFILES@,$CLEANFILES,;t t
    402511046s,@TCL_INCLUDES@,$TCL_INCLUDES,;t t
    4026 s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
    4027 s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
    4028 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
    4029 s,@TCL_LIBS@,$TCL_LIBS,;t t
    4030 s,@TCL_DEFS@,$TCL_DEFS,;t t
    4031 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
    4032 s,@TCL_EXTRA_CFLAGS@,$TCL_EXTRA_CFLAGS,;t t
    4033 s,@TCL_LD_FLAGS@,$TCL_LD_FLAGS,;t t
    4034 s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
    4035 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
    4036 s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t
    4037 s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
    4038 s,@TCL_BUILD_STUB_LIB_SPEC@,$TCL_BUILD_STUB_LIB_SPEC,;t t
    4039 s,@TK_BIN_DIR@,$TK_BIN_DIR,;t t
    4040 s,@TK_SRC_DIR@,$TK_SRC_DIR,;t t
    4041 s,@TK_LIB_FILE@,$TK_LIB_FILE,;t t
    4042 s,@BLT_SRC_DIR@,$BLT_SRC_DIR,;t t
    4043 s,@CLEANFILES@,$CLEANFILES,;t t
     11047s,@TCL_THREADS@,$TCL_THREADS,;t t
     11048s,@SHARED_BUILD@,$SHARED_BUILD,;t t
     11049s,@AR@,$AR,;t t
     11050s,@CELIB_DIR@,$CELIB_DIR,;t t
     11051s,@LIBOBJS@,$LIBOBJS,;t t
     11052s,@DL_LIBS@,$DL_LIBS,;t t
    404411053s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t
    404511054s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t
     11055s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t
    404611056s,@STLIB_LD@,$STLIB_LD,;t t
    404711057s,@SHLIB_LD@,$SHLIB_LD,;t t
     11058s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t
    404811059s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t
    4049 s,@SHLIB_LDFLAGS@,$SHLIB_LDFLAGS,;t t
     11060s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t
    405011061s,@TCL_DBGX@,$TCL_DBGX,;t t
    405111062s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t
     
    405411065s,@MAKE_SHARED_LIB@,$MAKE_SHARED_LIB,;t t
    405511066s,@MAKE_STATIC_LIB@,$MAKE_STATIC_LIB,;t t
    4056 s,@RapptureGUI_LIB_FILE@,$RapptureGUI_LIB_FILE,;t t
    4057 s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t
     11067s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t
     11068s,@RANLIB_STUB@,$RANLIB_STUB,;t t
    405811069s,@TCLSH_PROG@,$TCLSH_PROG,;t t
     11070s,@BLT_SRC_DIR@,$BLT_SRC_DIR,;t t
     11071s,@RAPPTURE_DIR@,$RAPPTURE_DIR,;t t
    405911072s,@PACKAGE@,$PACKAGE,;t t
    406011073s,@VERSION@,$VERSION,;t t
     
    406211075s,@EXACT_VERSION@,$EXACT_VERSION,;t t
    406311076s,@NODOT_VERSION@,$NODOT_VERSION,;t t
    4064 s,@LIBOBJS@,$LIBOBJS,;t t
    406511077s,@LTLIBOBJS@,$LTLIBOBJS,;t t
    406611078CEOF
     
    423011242  esac
    423111243
     11244  if test x"$ac_file" != x-; then
     11245    { echo "$as_me:$LINENO: creating $ac_file" >&5
     11246echo "$as_me: creating $ac_file" >&6;}
     11247    rm -f "$ac_file"
     11248  fi
    423211249  # Let's still pretend it is `configure' which instantiates (i.e., don't
    423311250  # use $as_me), people would be surprised to read:
     
    426811285      esac
    426911286    done` || { (exit 1); exit 1; }
    4270 
    4271   if test x"$ac_file" != x-; then
    4272     { echo "$as_me:$LINENO: creating $ac_file" >&5
    4273 echo "$as_me: creating $ac_file" >&6;}
    4274     rm -f "$ac_file"
    4275   fi
    427611287_ACEOF
    427711288cat >>$CONFIG_STATUS <<_ACEOF
  • trunk/gui/configure.in

    r166 r503  
    1 #--------------------------------------------------------------------
     1#!/bin/bash -norc
     2dnl     This file is an input file used by the GNU "autoconf" program to
     3dnl     generate the file "configure", which is run during Tcl installation
     4dnl     to configure the system for the local environment.
     5#
     6# RCS: @(#) $Id: configure.in,v 1.46 2006/01/23 19:18:55 hobbs Exp $
     7
     8#-----------------------------------------------------------------------
    29# Sample configure.in for Tcl Extensions.  The only places you should
    310# need to modify this file are marked by the string __CHANGE__
    4 #--------------------------------------------------------------------
    5 
    6 #--------------------------------------------------------------------
     11#-----------------------------------------------------------------------
     12
     13#-----------------------------------------------------------------------
    714# __CHANGE__
    8 # This very first macro is used to verify that the configure script can
    9 # find the sources.  The argument to AC_INIT should be a unique filename
    10 # for this package, and can be a relative path, such as:
    11 #
    12 # AC_INIT(../generic/tcl.h)
    13 #--------------------------------------------------------------------
    14 
    15 AC_INIT(src/RpInit.c)
    16 AC_CONFIG_AUX_DIR(cf)
    17 
    18 #--------------------------------------------------------------------
    19 # __CHANGE__
    20 # Set your package name and version numbers here.  The NODOT_VERSION is
    21 # required for constructing the library name on systems that don't like
    22 # dots in library names (Windows).  The VERSION variable is used on the
    23 # other systems.
    24 #--------------------------------------------------------------------
     15# Set your package name and version numbers here.
     16#
     17# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
     18# set as provided.  These will also be added as -D defs in your Makefile
     19# so you can encode the package version directly into the source files.
     20#-----------------------------------------------------------------------
     21
     22AC_INIT([RapptureGUI], [1.0])
    2523
    2624PACKAGE=RapptureGUI
     
    3129
    3230#--------------------------------------------------------------------
     31# Call TEA_INIT as the first TEA_ macro to set up initial vars.
     32# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
     33# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
     34#--------------------------------------------------------------------
     35
     36TEA_INIT([3.5])
     37
     38AC_CONFIG_AUX_DIR(tclconfig)
     39
     40#--------------------------------------------------------------------
    3341# Extra build options
    3442#--------------------------------------------------------------------
     
    3644  blt_source_dir=$withval)
    3745
    38 #--------------------------------------------------------------------
    39 # We put this here so that you can compile with -DVERSION="1.2" to
    40 # encode the package version directly into the source files.
    41 #--------------------------------------------------------------------
    42 
    43 eval AC_DEFINE_UNQUOTED(VERSION, "${VERSION}")
    44 
    45 #--------------------------------------------------------------------
    46 # Check whether --enable-gcc or --disable-gcc was given.  Do this
    47 # before AC_CYGWIN is called so the compiler can
    48 # be fully tested by built-in autoconf tools.
    49 # This macro also calls AC_PROG_CC to set the compiler if --enable-gcc
    50 # was not used.
    51 #--------------------------------------------------------------------
    52 
    53 SC_ENABLE_GCC
    54 AC_PROG_INSTALL
    55 
    56 #--------------------------------------------------------------------
    57 # Checks to see if the make program sets the $MAKE variable.
    58 #--------------------------------------------------------------------
    59 
    60 AC_PROG_MAKE_SET
    61 
    62 #--------------------------------------------------------------------
    63 # Find ranlib
    64 #--------------------------------------------------------------------
    65 
    66 AC_PROG_RANLIB
    67 
    68 #--------------------------------------------------------------------
    69 # This macro performs additional compiler tests.
    70 #--------------------------------------------------------------------
    71 
    72 AC_CYGWIN
    73 
    74 #--------------------------------------------------------------------
    75 # Determines the correct binary file extension (.o, .obj, .exe etc.)
    76 #--------------------------------------------------------------------
    77 
    78 AC_OBJEXT
    79 AC_EXEEXT
    80 
    81 #--------------------------------------------------------------------
    82 # "cygpath" is used on windows to generate native path names for include
     46AC_ARG_WITH(rappture, [  --with-rappture=DIR          Find include/core/rappture.h in DIR],
     47  rappture_dir=$withval)
     48
     49#--------------------------------------------------------------------
     50# Load the tclConfig.sh file
     51#--------------------------------------------------------------------
     52
     53TEA_PATH_TCLCONFIG
     54TEA_LOAD_TCLCONFIG
     55
     56#--------------------------------------------------------------------
     57# Load the tkConfig.sh file if necessary (Tk extension)
     58#--------------------------------------------------------------------
     59
     60#TEA_PATH_TKCONFIG
     61#TEA_LOAD_TKCONFIG
     62
     63#-----------------------------------------------------------------------
     64# Handle the --prefix=... option by defaulting to what Tcl gave.
     65# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
     66#-----------------------------------------------------------------------
     67
     68TEA_PREFIX
     69
     70#-----------------------------------------------------------------------
     71# Standard compiler checks.
     72# This sets up CC by using the CC env var, or looks for gcc otherwise.
     73# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
     74# the basic setup necessary to compile executables.
     75#-----------------------------------------------------------------------
     76
     77TEA_SETUP_COMPILER
     78
     79#-----------------------------------------------------------------------
     80# __CHANGE__
     81# Specify the C source files to compile in TEA_ADD_SOURCES,
     82# public headers that need to be installed in TEA_ADD_HEADERS,
     83# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
     84# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
     85# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
     86# and PKG_TCL_SOURCES.
     87#-----------------------------------------------------------------------
     88
     89TEA_ADD_SOURCES([RpInit.c RpRlimit.c RpRusage.c RpSignal.c])
     90TEA_ADD_HEADERS([])
     91TEA_ADD_INCLUDES([])
     92TEA_ADD_CFLAGS([])
     93TEA_ADD_STUB_SOURCES([])
     94TEA_ADD_TCL_SOURCES([scripts/analyzer.tcl scripts/animover.tcl])
     95TEA_ADD_TCL_SOURCES([scripts/balloon.tcl scripts/booleanentry.tcl])
     96TEA_ADD_TCL_SOURCES([scripts/bugreport.tcl scripts/choiceentry.tcl])
     97TEA_ADD_TCL_SOURCES([scripts/cloud.tcl scripts/color.tcl])
     98TEA_ADD_TCL_SOURCES([scripts/combobox.tcl scripts/contourresult.tcl])
     99TEA_ADD_TCL_SOURCES([scripts/controlOwner.tcl scripts/controls.tcl])
     100TEA_ADD_TCL_SOURCES([scripts/curve.tcl scripts/deviceEditor.tcl])
     101TEA_ADD_TCL_SOURCES([scripts/deviceLayout1D.tcl scripts/deviceViewer1D.tcl])
     102TEA_ADD_TCL_SOURCES([scripts/deviceresult.tcl scripts/dispatcher.tcl])
     103TEA_ADD_TCL_SOURCES([scripts/dropdown.tcl scripts/dropdownlist.tcl])
     104TEA_ADD_TCL_SOURCES([scripts/editor.tcl scripts/energyLevels.tcl])
     105TEA_ADD_TCL_SOURCES([scripts/field.tcl scripts/field3dresult.tcl])
     106TEA_ADD_TCL_SOURCES([scripts/filexfer.tcl scripts/gauge.tcl])
     107TEA_ADD_TCL_SOURCES([scripts/getopts.tcl scripts/grab.tcl])
     108TEA_ADD_TCL_SOURCES([scripts/groupentry.tcl scripts/icons.tcl])
     109TEA_ADD_TCL_SOURCES([scripts/image.tcl scripts/imageentry.tcl])
     110TEA_ADD_TCL_SOURCES([scripts/imageresult.tcl])
     111TEA_ADD_TCL_SOURCES([scripts/integerentry.tcl scripts/loader.tcl])
     112TEA_ADD_TCL_SOURCES([scripts/mainwin.tcl scripts/mesh.tcl])
     113TEA_ADD_TCL_SOURCES([scripts/meshresult.tcl scripts/moleculeViewer.tcl])
     114TEA_ADD_TCL_SOURCES([scripts/nanovisviewer.tcl scripts/notebook.tcl])
     115TEA_ADD_TCL_SOURCES([scripts/numberentry.tcl scripts/page.tcl])
     116TEA_ADD_TCL_SOURCES([scripts/pager.tcl scripts/panes.tcl])
     117TEA_ADD_TCL_SOURCES([scripts/postern.tcl scripts/progress.tcl])
     118TEA_ADD_TCL_SOURCES([scripts/radiodial.tcl scripts/resources.tcl])
     119TEA_ADD_TCL_SOURCES([scripts/resultset.tcl scripts/resultviewer.tcl])
     120TEA_ADD_TCL_SOURCES([scripts/scroller.tcl scripts/sequence.tcl])
     121TEA_ADD_TCL_SOURCES([scripts/sequenceresult.tcl scripts/service.tcl])
     122TEA_ADD_TCL_SOURCES([scripts/spectrum.tcl scripts/spinint.tcl])
     123TEA_ADD_TCL_SOURCES([scripts/switch.tcl scripts/table.tcl])
     124TEA_ADD_TCL_SOURCES([scripts/tempgauge.tcl scripts/textentry.tcl])
     125TEA_ADD_TCL_SOURCES([scripts/textresult.tcl scripts/tool.tcl])
     126TEA_ADD_TCL_SOURCES([scripts/tooltip.tcl scripts/tuples.tcl])
     127TEA_ADD_TCL_SOURCES([scripts/units.tcl scripts/valueresult.tcl])
     128TEA_ADD_TCL_SOURCES([scripts/xyresult.tcl])
     129
     130#--------------------------------------------------------------------
     131# __CHANGE__
     132# A few miscellaneous platform-specific items:
     133#
     134# Define a special symbol for Windows (BUILD_Rappture in this case) so
     135# that we create the export library with the dll.
     136#
     137# Windows creates a few extra files that need to be cleaned up.
     138# You can add more files to clean if your extension creates any extra
    83139# files.
    84 # These variables should only be used with the compiler and linker since
    85 # they generate native path names.
    86 #
    87 # Unix tclConfig.sh points SRC_DIR at the top-level directory of
    88 # the Tcl sources, while the Windows tclConfig.sh points SRC_DIR at
    89 # the win subdirectory.  Hence the different usages of SRC_DIR below.
    90 #
    91 # This must be done before calling SC_PUBLIC_TCL_HEADERS
    92 #--------------------------------------------------------------------
    93 
    94 case "`uname -s`" in
    95     *win32* | *WIN32* | *CYGWIN_NT*)
    96         CYGPATH="cygpath -w"
    97     ;;
    98     *)
    99         CYGPATH=echo
    100     ;;
    101 esac
    102 
    103 AC_SUBST(CYGPATH)
     140#
     141# TEA_ADD_* any platform specific compiler/build info here.
     142#--------------------------------------------------------------------
     143
     144if test "${TEA_PLATFORM}" = "windows" ; then
     145    AC_DEFINE(BUILD_Rappture, 1, [Build windows export dll])
     146    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch *.manifest"
     147    TEA_ADD_SOURCES([RpWinResource.c])
     148    TEA_ADD_LIBS([-LIBPATH:${TCL_EXEC_PREFIX}/lib])
     149    TEA_ADD_LIBS([BLT24.LIB])
     150    TEA_ADD_LIBS([psapi.lib])
     151    TEA_ADD_CFLAGS([-D_CRT_SECURE_NO_DEPRECATE -wd4996])
     152else
     153    CLEANFILES=""
     154    TEA_ADD_LIBS([-L${TCL_EXEC_PREFIX}/lib])
     155    TEA_ADD_LIBS([-lBLT24])
     156fi
     157AC_SUBST(CLEANFILES)
    104158
    105159#--------------------------------------------------------------------
     
    109163# contain private data structures and are subject to change without
    110164# notice.
    111 # This MUST be called before SC_PATH_TCLCONFIG/SC_LOAD_TCLCONFIG
    112 #--------------------------------------------------------------------
    113 
    114 SC_PUBLIC_TCL_HEADERS
    115 #SC_PRIVATE_TCL_HEADERS
    116 
    117 #--------------------------------------------------------------------
    118 # Load the tclConfig.sh file
    119 #--------------------------------------------------------------------
    120 
    121 SC_PATH_TCLCONFIG
    122 SC_LOAD_TCLCONFIG
    123 SC_PATH_TKCONFIG
    124 SC_LOAD_TKCONFIG
     165# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
     166#--------------------------------------------------------------------
     167
     168TEA_PUBLIC_TCL_HEADERS
     169#TEA_PRIVATE_TCL_HEADERS
     170
     171#TEA_PUBLIC_TK_HEADERS
     172#TEA_PRIVATE_TK_HEADERS
     173#TEA_PATH_X
     174
     175#--------------------------------------------------------------------
     176# Check whether --enable-threads or --disable-threads was given.
     177# This auto-enables if Tcl was compiled threaded.
     178#--------------------------------------------------------------------
     179
     180TEA_ENABLE_THREADS
     181
     182#--------------------------------------------------------------------
     183# The statement below defines a collection of symbols related to
     184# building as a shared library instead of a static library.
     185#--------------------------------------------------------------------
     186
     187TEA_ENABLE_SHARED
     188
     189#--------------------------------------------------------------------
     190# This macro figures out what flags to use with the compiler/linker
     191# when building shared/static debug/optimized objects.  This information
     192# can be taken from the tclConfig.sh file, but this figures it all out.
     193#--------------------------------------------------------------------
     194
     195TEA_CONFIG_CFLAGS
     196
     197#--------------------------------------------------------------------
     198# Set the default compiler switches based on the --enable-symbols option.
     199#--------------------------------------------------------------------
     200
     201TEA_ENABLE_SYMBOLS
     202
     203#--------------------------------------------------------------------
     204# Everyone should be linking against the Tcl stub library.  If you
     205# can't for some reason, remove this definition.  If you aren't using
     206# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
     207# link against the non-stubbed Tcl library.  Add Tk too if necessary.
     208#--------------------------------------------------------------------
     209
     210AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
     211#AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
     212
     213#--------------------------------------------------------------------
     214# This macro generates a line to use when building a library.  It
     215# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
     216# and TEA_LOAD_TCLCONFIG macros above.
     217#--------------------------------------------------------------------
     218
     219TEA_MAKE_LIB
     220
     221#--------------------------------------------------------------------
     222# Determine the name of the tclsh and/or wish executables in the
     223# Tcl and Tk build directories or the location they were installed
     224# into. These paths are used to support running test cases only,
     225# the Makefile should not be making use of these paths to generate
     226# a pkgIndex.tcl file or anything else at extension build time.
     227#--------------------------------------------------------------------
     228
     229TEA_PROG_TCLSH
     230#TEA_PROG_WISH
     231
    125232
    126233#--------------------------------------------------------------------
     
    132239if test "x$blt_source_dir" != "x" ; then
    133240  #
    134   # Verify that a tclConfig.sh file exists in the directory specified 
    135   # by --with-blt. 
     241  # Verify that a tclConfig.sh file exists in the directory specified
     242  # by --with-blt.
    136243  #
    137244  if test -r "$blt_source_dir/bltInt.h" ; then
     
    140247    BLT_SRC_DIR="$blt_source_dir/src"
    141248  fi
    142 else 
     249else
    143250  #
    144251  # Otherwise, search for the bltInt.h include file...
    145252  # 1. Search previously named locations.
    146   # 
     253  #
    147254  for dir in \
    148255   $prefix \
     
    153260      break
    154261    elif test -r "$dir/include/bltInt.h" ; then
    155       BLT_SRC_DIR="$dir/lib"
     262      BLT_SRC_DIR="$dir/include"
    156263      break
    157264    fi
     
    159266  #
    160267  #  2. Search source directories.
    161   # 
     268  #
    162269  if test "x$BLT_SRC_DIR" = "x" ; then
    163270    for dir in \
     
    167274     ../../blt \
    168275     `ls -dr ../../../blt[[2-3]].[[0-9]]* 2>/dev/null` \
    169      ../../../blt
     276     ../../../blt \
     277     `ls -dr c:/opt/blt[[2-3]].[[0-9]]* 2>/dev/null` \
     278     c\:/opt/blt
    170279    do
    171       if test -r "$dir/bltInt.h" ; then
    172         tclConfigFile="$dir/bltInt.h"
    173         break
     280      if test -r "$dir/src/bltInt.h" ; then
     281        BLT_SRC_DIR="$dir/src"
     282        break
    174283      fi
    175284    done
    176285  fi
    177286fi
    178 
    179287AC_MSG_RESULT([${BLT_SRC_DIR}])
    180288
     
    186294
    187295AC_SUBST(BLT_SRC_DIR)
    188 
    189 #--------------------------------------------------------------------
    190 # __CHANGE__
    191 # A few miscellaneous platform-specific items:
    192 #
    193 # Define a special symbol for Windows (BUILD_exampleA in this case) so
    194 # that we create the export library with the dll.  See sha1.h on how
    195 # to use this.
    196 #
    197 # Windows creates a few extra files that need to be cleaned up.
    198 # You can add more files to clean if your extension creates any extra
    199 # files.
    200 #
    201 # Define any extra compiler flags in the PACKAGE_CFLAGS variable.
    202 # These will be appended to the current set of compiler flags for
    203 # your system.
    204 #--------------------------------------------------------------------
    205 
    206 case "`uname -s`" in
    207     *win32* | *WIN32* | *CYGWIN_NT*)
    208         AC_DEFINE(BUILD_RapptureGUI)
    209         CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch"
    210         AC_SUBST(CLEANFILES)
    211     ;;
    212     *)
    213         CLEANFILES=
    214     ;;
    215 esac
    216 
    217 #--------------------------------------------------------------------
    218 # Check whether --enable-threads or --disable-threads was given.
    219 # So far only Tcl responds to this one.
    220 #--------------------------------------------------------------------
    221 
    222 SC_ENABLE_THREADS
    223 
    224 #--------------------------------------------------------------------
    225 # The statement below defines a collection of symbols related to
    226 # building as a shared library instead of a static library.
    227 #--------------------------------------------------------------------
    228 
    229 SC_ENABLE_SHARED
    230 
    231 #--------------------------------------------------------------------
    232 # This macro figures out what flags to use with the compiler/linker
    233 # when building shared/static debug/optimized objects.  This information
    234 # is all taken from the tclConfig.sh file.
    235 #--------------------------------------------------------------------
    236 
    237 CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
    238 CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
    239 LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
    240 LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
    241 SHLIB_LD=${TCL_SHLIB_LD}
    242 STLIB_LD=${TCL_STLIB_LD}
    243 SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
    244 
    245 AC_SUBST(CFLAGS_DEBUG)
    246 AC_SUBST(CFLAGS_OPTIMIZE)
    247 AC_SUBST(STLIB_LD)
    248 AC_SUBST(SHLIB_LD)
    249 AC_SUBST(SHLIB_CFLAGS)
    250 AC_SUBST(SHLIB_LDFLAGS)
    251 
    252 #--------------------------------------------------------------------
    253 # Set the default compiler switches based on the --enable-symbols
    254 # option.
    255 #--------------------------------------------------------------------
    256 
    257 SC_ENABLE_SYMBOLS
    258 
    259 if test "${SHARED_BUILD}" = "1" ; then
    260     CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}'
     296#--------------------------------------------------------------------
     297# Look for rappture.h on the normal include path.  If not found, look
     298# for it in the --with-rappture directory.
     299#--------------------------------------------------------------------
     300AC_MSG_CHECKING([for include/core/rappture.h])
     301RAPPTURE_DIR=""
     302if test "x$rappture_dir" != "x" ; then
     303  #
     304  # Verify that a rappture.h file exists in the directory specified
     305  # by --with-rappture.
     306  #
     307  if test -r "$rappture_dir/include/core/rappture.h" ; then
     308    RAPPTURE_DIR="$rappture_dir"
     309  fi
    261310else
    262     CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}'
    263 fi
    264 
    265 #--------------------------------------------------------------------
    266 # Everyone should be linking against the Tcl stub library.  If you
    267 # can't for some reason, remove this definition.  If you aren't using
    268 # stubs, you also need to modify the SHLIB_LD_LIBS setting below to
    269 # link against the non-stubbed Tcl library.
    270 #--------------------------------------------------------------------
    271 
    272 AC_DEFINE(USE_TCL_STUBS)
    273 
    274 #--------------------------------------------------------------------
    275 # This macro generates a line to use when building a library.  It
    276 # depends on values set by the SC_ENABLE_SHARED, SC_ENABLE_SYMBOLS,
    277 # and SC_LOAD_TCLCONFIG macros above.
    278 #--------------------------------------------------------------------
    279 
    280 SC_MAKE_LIB
    281 
    282 #--------------------------------------------------------------------
    283 # eval these two values to dereference the ${DBGX} variable.
    284 #--------------------------------------------------------------------
    285 
    286 eval "SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
    287 eval "UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
    288 
    289 #--------------------------------------------------------------------
    290 # Shared libraries and static libraries have different names.
    291 #--------------------------------------------------------------------
    292 
    293 case "`uname -s`" in
    294     *win32* | *WIN32* | *CYGWIN_NT*)
    295         if test "${SHARED_BUILD}" = "1" ; then
    296             SHLIB_LD_LIBS="\"`cygpath -w ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\" ${TCL_SHLIB_LD_LIBS}"
    297             eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
    298             RANLIB=:
    299         else
    300             eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
    301         fi
    302         ;;
    303     *)
    304         if test "${SHARED_BUILD}" = "1" ; then
    305             SHLIB_LD_LIBS="${TCL_LIB_SPEC} ${TK_LIB_SPEC} -lBLT24"
    306             eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
    307             RANLIB=:
    308         else
    309             eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
    310         fi
    311         ;;
    312 esac
    313 
    314 #--------------------------------------------------------------------
    315 # __CHANGE__
    316 # Change the name from exampeA_LIB_FILE to match your package name.
    317 #--------------------------------------------------------------------
    318 
    319 AC_SUBST(RapptureGUI_LIB_FILE)
    320 AC_SUBST(SHLIB_LD_LIBS)
    321 
    322 #--------------------------------------------------------------------
    323 # Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
    324 # file during the install process.  Don't run the TCLSH_PROG through
    325 # ${CYGPATH} because it's being used directly by make.
    326 # Require that we use a tclsh shell version 8.2 or later since earlier
    327 # versions have bugs in the pkg_mkIndex routine.
    328 #--------------------------------------------------------------------
    329 
    330 AC_PATH_PROGS(TCLSH_PROG, tclsh8.4${EXEEXT} tclsh84${EXEEXT} tclsh${EXEEXT}, :, ${exec_prefix}:${PATH})
    331 
    332 if test "x${TCLSH_PROG}" = "x:" ; then
    333     AC_MSG_WARN(No tclsh executable found.  You will have to build the pkgIndex.tcl file manually.)
    334 fi
    335 AC_SUBST(TCLSH_PROG)
    336 
    337 #--------------------------------------------------------------------
    338 # Finalize patchlevel and version info
    339 #--------------------------------------------------------------------
    340 PATCHLEVEL=`${TCLSH_PROG} cf/patchlevel.tcl`
     311  #
     312  # Otherwise, search for the rappture.h include file...
     313  # 1. Search previously named locations.
     314  #
     315  for dir in \
     316   $prefix \
     317   $exec_prefix
     318  do
     319    if test -r "$dir/include/core/rappture.h" ; then
     320      RAPPTURE_DIR="$dir"
     321      break
     322    fi
     323  done
     324  #
     325  #  2. Search source directories.
     326  #
     327  if test "x$RAPPTURE_DIR" = "x" ; then
     328    for dir in \
     329     `ls -dr ../rappture 2>/dev/null` \
     330     `ls -dr ../../rappture 2>/dev/null` \
     331     `ls -dr ../../../rappture 2>/dev/null` \
     332     `ls -dr C\:/opt/rappture 2>/dev/null` \
     333     `ls -dr /opt/rappture 2>/dev/null`
     334    do
     335      if test -r "$dir/include/core/rappture.h" ; then
     336        RAPPTURE_DIR="$dir"
     337        break
     338      fi
     339    done
     340  fi
     341fi
     342AC_MSG_RESULT([${RAPPTURE_DIR}])
     343
     344if test "x$RAPPTURE_DIR" = "x" ; then
     345  echo "can't find RAPPTURE include file \"include/core/rappture.h\""
     346  echo "use --with-rappture=DIR to specify the location of rappture"
     347  exit 1
     348fi
     349
     350AC_SUBST(RAPPTURE_DIR)
     351
     352PATCHLEVEL=`${TCLSH_PROG} tclconfig/patchlevel.tcl`
    341353EXACT_VERSION=${MAJOR_VERSION}.${MINOR_VERSION}-${PATCHLEVEL}
    342354NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
     
    351363#--------------------------------------------------------------------
    352364# Finally, substitute all of the various values into the Makefile.
     365# You may alternatively have a special pkgIndex.tcl.in or other files
     366# which require substituting th AC variables in.  Include these here.
    353367#--------------------------------------------------------------------
    354368
  • trunk/gui/init.tcl.in

    r171 r503  
    2121
    2222    set suffix [info sharedlibextension]
    23     set library [file join $dir .. libRapptureGUI@VERSION@${suffix}]
     23    set library [file join $dir @PKG_LIB_FILE@]
    2424    load $library RapptureGUI
    2525
  • trunk/gui/src/RpInit.c

    r193 r503  
    1717int RpRlimit_Init _ANSI_ARGS_((Tcl_Interp *interp));
    1818
     19#ifdef BUILD_Rappture
     20__declspec( dllexport )
     21#endif
    1922int
    20 Rappturegui_Init(interp)
    21     Tcl_Interp *interp;  /* interpreter being initialized */
     23Rappturegui_Init(Tcl_Interp *interp)   /* interpreter being initialized */
    2224{
     25#ifdef _WIN32
     26    rpWinInitJob();
     27#endif
     28    if (Tcl_InitStubs(interp, "8.4", 0) == NULL) {
     29        return TCL_ERROR;
     30    }
     31    if (Tcl_PkgProvide(interp, "RapptureGUI", PACKAGE_VERSION) != TCL_OK) {
     32        return TCL_ERROR;
     33    }
    2334    if (RpRlimit_Init(interp) != TCL_OK) {
    2435        return TCL_ERROR;
  • trunk/gui/src/RpRlimit.c

    r158 r503  
    1616 */
    1717#include <tcl.h>
     18#ifndef _WIN32
    1819#include <sys/time.h>
    1920#include <sys/resource.h>
     21#else
     22#include "RpWinResource.h"
     23#endif
    2024
    2125#include "bltInt.h"
  • trunk/gui/src/RpRusage.c

    r158 r503  
    1616 */
    1717#include <tcl.h>
     18#ifndef WIN32
    1819#include <sys/time.h>
    1920#include <sys/resource.h>
     21#else
     22#include "RpWinResource.h"
     23#endif
    2024
    2125#include "bltInt.h"
     
    252256    return tval;
    253257}
     258
  • trunk/gui/src/RpSignal.c

    r193 r503  
    4242    int signum;
    4343} RpSignalNames;
     44
     45#ifdef _WIN32
     46#define SIGHUP -1
     47#define SIGQUIT -1
     48#define SIGKILL -1
     49#define SIGPIPE -1
     50#define SIGALRM -1
     51#define SIGUSR1 -1
     52#define SIGUSR2 -1
     53#define SIGCHLD -1
     54#define SIGCONT -1
     55#define SIGSTOP -1
     56#define SIGTSTP -1
     57#define SIGTTIN -1
     58#define SIGTTOU -1
     59#endif
    4460
    4561static RpSignalNames signalNames[] = {
  • trunk/gui/tclconfig/config.guess

    r158 r503  
    22# Attempt to guess a canonical system name.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002 Free Software Foundation, Inc.
    5 
    6 timestamp='2002-09-03'
     4#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
     5
     6timestamp='2003-02-22'
    77
    88# This file is free software; you can redistribute it and/or modify it
     
    9999# use `HOST_CC' if defined, but it is deprecated.
    100100
    101 # This shell variable is my proudest work .. or something. --bje
    102 
    103 set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
    104 (old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
    105    || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
    106 dummy=$tmpdir/dummy ;
    107 files="$dummy.c $dummy.o $dummy.rel $dummy" ;
    108 trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
     101# Portable tmp directory creation inspired by the Autoconf team.
     102
     103set_cc_for_build='
     104trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
     105trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
     106: ${TMPDIR=/tmp} ;
     107 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
     108 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
     109 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
     110dummy=$tmp/dummy ;
     111tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
    109112case $CC_FOR_BUILD,$HOST_CC,$CC in
    110113 ,,)    echo "int x;" > $dummy.c ;
    111114        for c in cc gcc c89 c99 ; do
    112           if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then
     115          if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
    113116             CC_FOR_BUILD="$c"; break ;
    114117          fi ;
    115118        done ;
    116         rm -f $files ;
    117119        if test x"$CC_FOR_BUILD" = x ; then
    118120          CC_FOR_BUILD=no_compiler_found ;
     
    121123 ,,*)   CC_FOR_BUILD=$CC ;;
    122124 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
    123 esac ;
    124 unset files'
     125esac ;'
    125126
    126127# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
     
    179180        esac
    180181        # The OS release
    181         release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     182        # Debian GNU/NetBSD machines have a different userland, and
     183        # thus, need a distinct triplet. However, they do not need
     184        # kernel version information, so it can be replaced with a
     185        # suitable tag, in the style of linux-gnu.
     186        case "${UNAME_VERSION}" in
     187            Debian*)
     188                release='-gnu'
     189                ;;
     190            *)
     191                release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     192                ;;
     193        esac
    182194        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
    183195        # contains redundant information, the shorter form:
     
    228240                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
    229241        fi
     242        # According to Compaq, /usr/sbin/psrinfo has been available on
     243        # OSF/1 and Tru64 systems produced since 1995.  I hope that
     244        # covers most systems running today.  This code pipes the CPU
     245        # types through head -n 1, so we only detect the type of CPU 0.
     246        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
     247        case "$ALPHA_CPU_TYPE" in
     248            "EV4 (21064)")
     249                UNAME_MACHINE="alpha" ;;
     250            "EV4.5 (21064)")
     251                UNAME_MACHINE="alpha" ;;
     252            "LCA4 (21066/21068)")
     253                UNAME_MACHINE="alpha" ;;
     254            "EV5 (21164)")
     255                UNAME_MACHINE="alphaev5" ;;
     256            "EV5.6 (21164A)")
     257                UNAME_MACHINE="alphaev56" ;;
     258            "EV5.6 (21164PC)")
     259                UNAME_MACHINE="alphapca56" ;;
     260            "EV5.7 (21164PC)")
     261                UNAME_MACHINE="alphapca57" ;;
     262            "EV6 (21264)")
     263                UNAME_MACHINE="alphaev6" ;;
     264            "EV6.7 (21264A)")
     265                UNAME_MACHINE="alphaev67" ;;
     266            "EV6.8CB (21264C)")
     267                UNAME_MACHINE="alphaev68" ;;
     268            "EV6.8AL (21264B)")
     269                UNAME_MACHINE="alphaev68" ;;
     270            "EV6.8CX (21264D)")
     271                UNAME_MACHINE="alphaev68" ;;
     272            "EV6.9A (21264/EV69A)")
     273                UNAME_MACHINE="alphaev69" ;;
     274            "EV7 (21364)")
     275                UNAME_MACHINE="alphaev7" ;;
     276            "EV7.9 (21364A)")
     277                UNAME_MACHINE="alphaev79" ;;
     278        esac
    230279        # A Vn.n version is a released version.
    231280        # A Tn.n version is a released field test version.
    232281        # A Xn.n version is an unreleased experimental baselevel.
    233282        # 1.2 uses "1.2" for uname -r.
    234         eval $set_cc_for_build
    235         cat <<EOF >$dummy.s
    236         .data
    237 \$Lformat:
    238         .byte 37,100,45,37,120,10,0     # "%d-%x\n"
    239 
    240         .text
    241         .globl main
    242         .align 4
    243         .ent main
    244 main:
    245         .frame \$30,16,\$26,0
    246         ldgp \$29,0(\$27)
    247         .prologue 1
    248         .long 0x47e03d80 # implver \$0
    249         lda \$2,-1
    250         .long 0x47e20c21 # amask \$2,\$1
    251         lda \$16,\$Lformat
    252         mov \$0,\$17
    253         not \$1,\$18
    254         jsr \$26,printf
    255         ldgp \$29,0(\$26)
    256         mov 0,\$16
    257         jsr \$26,exit
    258         .end main
    259 EOF
    260         $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
    261         if test "$?" = 0 ; then
    262                 case `$dummy` in
    263                         0-0)
    264                                 UNAME_MACHINE="alpha"
    265                                 ;;
    266                         1-0)
    267                                 UNAME_MACHINE="alphaev5"
    268                                 ;;
    269                         1-1)
    270                                 UNAME_MACHINE="alphaev56"
    271                                 ;;
    272                         1-101)
    273                                 UNAME_MACHINE="alphapca56"
    274                                 ;;
    275                         2-303)
    276                                 UNAME_MACHINE="alphaev6"
    277                                 ;;
    278                         2-307)
    279                                 UNAME_MACHINE="alphaev67"
    280                                 ;;
    281                         2-1307)
    282                                 UNAME_MACHINE="alphaev68"
    283                                 ;;
    284                         3-1307)
    285                                 UNAME_MACHINE="alphaev7"
    286                                 ;;
    287                 esac
    288         fi
    289         rm -f $dummy.s $dummy && rmdir $tmpdir
    290283        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    291284        exit 0 ;;
     
    438431        }
    439432EOF
    440         $CC_FOR_BUILD $dummy.c -o $dummy \
     433        $CC_FOR_BUILD -o $dummy $dummy.c \
    441434          && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
    442           && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
    443         rm -f $dummy.c $dummy && rmdir $tmpdir
     435          && exit 0
    444436        echo mips-mips-riscos${UNAME_RELEASE}
    445437        exit 0 ;;
     
    450442        echo powerpc-harris-powermax
    451443        exit 0 ;;
    452     Night_Hawk:*:*:PowerMAX_OS)
     444    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
    453445        echo powerpc-harris-powermax
    454446        exit 0 ;;
     
    525517                        }
    526518EOF
    527                 $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
    528                 rm -f $dummy.c $dummy && rmdir $tmpdir
     519                $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
    529520                echo rs6000-ibm-aix3.2.5
    530521        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
     
    624615              }
    625616EOF
    626                     (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy`
    627                     if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
    628                     rm -f $dummy.c $dummy && rmdir $tmpdir
     617                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
     618                    test -z "$HP_ARCH" && HP_ARCH=hppa
    629619                fi ;;
    630620        esac
     621        if [ ${HP_ARCH} = "hppa2.0w" ]
     622        then
     623            # avoid double evaluation of $set_cc_for_build
     624            test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
     625            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
     626            then
     627                HP_ARCH="hppa2.0w"
     628            else
     629                HP_ARCH="hppa64"
     630            fi
     631        fi
    631632        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
    632633        exit 0 ;;
     
    662663        }
    663664EOF
    664         $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
    665         rm -f $dummy.c $dummy && rmdir $tmpdir
     665        $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
    666666        echo unknown-hitachi-hiuxwe2
    667667        exit 0 ;;
     
    721721        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    722722        exit 0 ;;
    723     CRAY*T3D:*:*:*)
    724         echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    725         exit 0 ;;
    726723    CRAY*T3E:*:*:*)
    727724        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     
    729726    CRAY*SV1:*:*:*)
    730727        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     728        exit 0 ;;
     729    *:UNICOS/mp:*:*)
     730        echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    731731        exit 0 ;;
    732732    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
     
    757757EOF
    758758        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
    759         rm -f $dummy.c && rmdir $tmpdir
    760759        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
    761760        exit 0 ;;
     
    766765        echo ${UNAME_MACHINE}-pc-mingw32
    767766        exit 0 ;;
     767    i*:MSYS*:*)
     768        echo ${UNAME_MACHINE}-pc-msys
     769        exit 0 ;;
    768770    i*:PW*:*)
    769771        echo ${UNAME_MACHINE}-pc-pw32
    770772        exit 0 ;;
    771773    x86:Interix*:3*)
    772         echo i386-pc-interix3
     774        echo i586-pc-interix3
     775        exit 0 ;;
     776    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
     777        echo i${UNAME_MACHINE}-pc-mks
    773778        exit 0 ;;
    774779    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
     
    776781        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
    777782        # UNAME_MACHINE based on the output of uname instead of i386?
    778         echo i386-pc-interix
     783        echo i586-pc-interix
    779784        exit 0 ;;
    780785    i*:UWIN*:*)
     
    819824EOF
    820825        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
    821         rm -f $dummy.c && rmdir $tmpdir
    822         test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
     826        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
     827        ;;
     828    mips64:Linux:*:*)
     829        eval $set_cc_for_build
     830        sed 's/^        //' << EOF >$dummy.c
     831        #undef CPU
     832        #undef mips64
     833        #undef mips64el
     834        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
     835        CPU=mips64el
     836        #else
     837        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
     838        CPU=mips64
     839        #else
     840        CPU=
     841        #endif
     842        #endif
     843EOF
     844        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
     845        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
    823846        ;;
    824847    ppc:Linux:*:*)
     
    915938EOF
    916939        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
    917         rm -f $dummy.c && rmdir $tmpdir
    918940        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
    919941        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
     
    932954        # Use sysv4.2uw... so that sysv4* matches it.
    933955        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
     956        exit 0 ;;
     957    i*86:OS/2:*:*)
     958        # If we were able to find `uname', then EMX Unix compatibility
     959        # is probably installed.
     960        echo ${UNAME_MACHINE}-pc-os2-emx
     961        exit 0 ;;
     962    i*86:XTS-300:*:STOP)
     963        echo ${UNAME_MACHINE}-unknown-stop
     964        exit 0 ;;
     965    i*86:atheos:*:*)
     966        echo ${UNAME_MACHINE}-unknown-atheos
     967        exit 0 ;;
     968    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
     969        echo i386-unknown-lynxos${UNAME_RELEASE}
     970        exit 0 ;;
     971    i*86:*DOS:*:*)
     972        echo ${UNAME_MACHINE}-pc-msdosdjgpp
    934973        exit 0 ;;
    935974    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
     
    9671006        fi
    9681007        exit 0 ;;
    969     i*86:*DOS:*:*)
    970         echo ${UNAME_MACHINE}-pc-msdosdjgpp
    971         exit 0 ;;
    9721008    pc:*:*:*)
    9731009        # Left here for compatibility:
     
    9961032        echo m68k-convergent-sysv
    9971033        exit 0 ;;
     1034    M680?0:D-NIX:5.3:*)
     1035        echo m68k-diab-dnix
     1036        exit 0 ;;
    9981037    M68*:*:R3V[567]*:*)
    9991038        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
    1000     3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
     1039    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
    10011040        OS_REL=''
    10021041        test -r /etc/.relid \
     
    10151054        echo m68k-atari-sysv4
    10161055        exit 0 ;;
    1017     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
    1018         echo i386-unknown-lynxos${UNAME_RELEASE}
    1019         exit 0 ;;
    10201056    TSUNAMI:LynxOS:2.*:*)
    10211057        echo sparc-unknown-lynxos${UNAME_RELEASE}
     
    10991135        exit 0 ;;
    11001136    *:Darwin:*:*)
    1101         echo `uname -p`-apple-darwin${UNAME_RELEASE}
     1137        case `uname -p` in
     1138            *86) UNAME_PROCESSOR=i686 ;;
     1139            powerpc) UNAME_PROCESSOR=powerpc ;;
     1140        esac
     1141        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
    11021142        exit 0 ;;
    11031143    *:procnto*:*:* | *:QNX:[0123456789]*:*)
     
    11351175        echo ${UNAME_MACHINE}-unknown-plan9
    11361176        exit 0 ;;
    1137     i*86:OS/2:*:*)
    1138         # If we were able to find `uname', then EMX Unix compatibility
    1139         # is probably installed.
    1140         echo ${UNAME_MACHINE}-pc-os2-emx
    1141         exit 0 ;;
    11421177    *:TOPS-10:*:*)
    11431178        echo pdp10-unknown-tops10
     
    11571192    *:ITS:*:*)
    11581193        echo pdp10-unknown-its
    1159         exit 0 ;;
    1160     i*86:XTS-300:*:STOP)
    1161         echo ${UNAME_MACHINE}-unknown-stop
    1162         exit 0 ;;
    1163     i*86:atheos:*:*)
    1164         echo ${UNAME_MACHINE}-unknown-atheos
    11651194        exit 0 ;;
    11661195esac
     
    12841313EOF
    12851314
    1286 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
    1287 rm -f $dummy.c $dummy && rmdir $tmpdir
     1315$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
    12881316
    12891317# Apollos put the system type in the environment.
  • trunk/gui/tclconfig/config.sub

    r158 r503  
    22# Configuration validation subroutine script.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002 Free Software Foundation, Inc.
    5 
    6 timestamp='2002-09-05'
     4#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
     5
     6timestamp='2003-02-22'
    77
    88# This file is (in principle) common to ALL GNU software.
     
    119119maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
    120120case $maybe_os in
    121   nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
     121  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
    122122    os=-$maybe_os
    123123    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     
    246246        | mips64vr5000 | mips64vr5000el \
    247247        | mipsisa32 | mipsisa32el \
     248        | mipsisa32r2 | mipsisa32r2el \
    248249        | mipsisa64 | mipsisa64el \
    249250        | mipsisa64sb1 | mipsisa64sb1el \
     
    251252        | mipstx39 | mipstx39el \
    252253        | mn10200 | mn10300 \
     254        | msp430 \
    253255        | ns16k | ns32k \
    254256        | openrisc | or32 \
     
    256258        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
    257259        | pyramid \
    258         | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
     260        | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
    259261        | sh64 | sh64le \
    260262        | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
     
    295297        | avr-* \
    296298        | bs2000-* \
    297         | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
     299        | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
    298300        | clipper-* | cydra-* \
    299301        | d10v-* | d30v-* | dlx-* \
     
    316318        | mips64vr5000-* | mips64vr5000el-* \
    317319        | mipsisa32-* | mipsisa32el-* \
     320        | mipsisa32r2-* | mipsisa32r2el-* \
    318321        | mipsisa64-* | mipsisa64el-* \
    319322        | mipsisa64sb1-* | mipsisa64sb1el-* \
    320323        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
    321         | mipstx39 | mipstx39el \
    322         | none-* | np1-* | ns16k-* | ns32k-* \
     324        | mipstx39-* | mipstx39el-* \
     325        | msp430-* \
     326        | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
    323327        | orion-* \
    324328        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
     
    326330        | pyramid-* \
    327331        | romp-* | rs6000-* \
    328         | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
     332        | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
    329333        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
    330334        | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
    331335        | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
    332         | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
     336        | tahoe-* | thumb-* \
     337        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
     338        | tron-* \
    333339        | v850-* | v850e-* | vax-* \
    334340        | we32k-* \
     
    617623                ;;
    618624        mingw32)
    619                 basic_machine=i386-pc
     625                basic_machine=i686-pc
    620626                os=-mingw32
     627                ;;
     628        msys)
     629                basic_machine=i686-pc
     630                os=-msys
    621631                ;;
    622632        miniframe)
     
    717727                basic_machine=np1-gould
    718728                ;;
     729        nv1)
     730                basic_machine=nv1-cray
     731                os=-unicosmp
     732                ;;
    719733        nsr-tandem)
    720734                basic_machine=nsr-tandem
     
    902916                os=-dynix
    903917                ;;
    904         t3d)
    905                 basic_machine=alpha-cray
    906                 os=-unicos
    907                 ;;
    908918        t3e)
    909919                basic_machine=alphaev5-cray
     
    922932                os=-coff
    923933                ;;
     934        tic55x | c55x*)
     935                basic_machine=tic55x-unknown
     936                os=-coff
     937                ;;
     938        tic6x | c6x*)
     939                basic_machine=tic6x-unknown
     940                os=-coff
     941                ;;
    924942        tx39)
    925943                basic_machine=mipstx39-unknown
     
    977995                basic_machine=hppa1.1-winbond
    978996                os=-proelf
    979                 ;;
    980         windows32)
    981                 basic_machine=i386-pc
    982                 os=-windows32-msvcrt
    983997                ;;
    984998        xps | xps100)
     
    10281042                basic_machine=we32k-att
    10291043                ;;
    1030         sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
     1044        sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
    10311045                basic_machine=sh-unknown
    10321046                ;;
     
    11131127              | -chorusos* | -chorusrdb* \
    11141128              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    1115               | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
    1116               | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
     1129              | -mingw32* | -msys* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
     1130              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
    11171131              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
    11181132              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
    11191133              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
    1120               | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
     1134              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
     1135              | -powermax* | -dnix*)
    11211136        # Remember, each alternative MUST END IN *, to match a version number.
    11221137                ;;
     
    11301145                esac
    11311146                ;;
     1147        -nto-qnx*)
     1148                ;;
    11321149        -nto*)
    1133                 os=-nto-qnx
     1150                os=`echo $os | sed -e 's|nto|nto-qnx|'`
    11341151                ;;
    11351152        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
     
    12241241        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
    12251242                os=-mint
     1243                ;;
     1244        -aros*)
     1245                os=-aros
     1246                ;;
     1247        -kaos*)
     1248                os=-kaos
    12261249                ;;
    12271250        -none)
  • trunk/gui/tclconfig/install-sh

    r158 r503  
    11#!/bin/sh
    2 #
    32# install - install a program, script, or datafile
    4 # This comes from X11R5 (mit/util/scripts/install.sh).
    5 #
    6 # Copyright 1991 by the Massachusetts Institute of Technology
    7 #
    8 # Permission to use, copy, modify, distribute, and sell this software and its
    9 # documentation for any purpose is hereby granted without fee, provided that
    10 # the above copyright notice appear in all copies and that both that
    11 # copyright notice and this permission notice appear in supporting
    12 # documentation, and that the name of M.I.T. not be used in advertising or
    13 # publicity pertaining to distribution of the software without specific,
    14 # written prior permission.  M.I.T. makes no representations about the
    15 # suitability of this software for any purpose.  It is provided "as is"
    16 # without express or implied warranty.
     3
     4scriptversion=2004-01-12.10
     5
     6# This originates from X11R5 (mit/util/scripts/install.sh), which was
     7# later released in X11R6 (xc/config/util/install.sh) with the
     8# following copyright and license.
     9#
     10# Copyright (C) 1994 X Consortium
     11#
     12# Permission is hereby granted, free of charge, to any person obtaining a copy
     13# of this software and associated documentation files (the "Software"), to
     14# deal in the Software without restriction, including without limitation the
     15# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
     16# sell copies of the Software, and to permit persons to whom the Software is
     17# furnished to do so, subject to the following conditions:
     18#
     19# The above copyright notice and this permission notice shall be included in
     20# all copies or substantial portions of the Software.
     21#
     22# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     23# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     24# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
     25# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
     26# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
     27# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     28#
     29# Except as contained in this notice, the name of the X Consortium shall not
     30# be used in advertising or otherwise to promote the sale, use or other deal-
     31# ings in this Software without prior written authorization from the X Consor-
     32# tium.
     33#
     34#
     35# FSF changes to this file are in the public domain.
    1736#
    1837# Calling this script install-sh is preferred over install.sh, to prevent
     
    2443# shared with many OS's install programs.
    2544
    26 
    2745# set DOITPROG to echo to test this script
    2846
    2947# Don't use :- since 4.3BSD and earlier shells don't like it.
    3048doit="${DOITPROG-}"
    31 
    3249
    3350# put in absolute paths if you don't have them in your path; or use env. vars.
     
    4259mkdirprog="${MKDIRPROG-mkdir}"
    4360
    44 transformbasename=""
    45 transform_arg=""
     61transformbasename=
     62transform_arg=
    4663instcmd="$mvprog"
    4764chmodcmd="$chmodprog 0755"
    48 chowncmd=""
    49 chgrpcmd=""
    50 stripcmd=""
     65chowncmd=
     66chgrpcmd=
     67stripcmd=
    5168rmcmd="$rmprog -f"
    5269mvcmd="$mvprog"
    53 src=""
    54 dst=""
    55 dir_arg=""
    56 
    57 while [ x"$1" != x ]; do
    58     case $1 in
    59         -c) instcmd="$cpprog"
    60             shift
    61             continue;;
    62 
    63         -d) dir_arg=true
    64             shift
    65             continue;;
    66 
    67         -m) chmodcmd="$chmodprog $2"
    68             shift
    69             shift
    70             continue;;
    71 
    72         -o) chowncmd="$chownprog $2"
    73             shift
    74             shift
    75             continue;;
    76 
    77         -g) chgrpcmd="$chgrpprog $2"
    78             shift
    79             shift
    80             continue;;
    81 
    82         -s) stripcmd="$stripprog"
    83             shift
    84             continue;;
    85 
    86         -t=*) transformarg=`echo $1 | sed 's/-t=//'`
    87             shift
    88             continue;;
    89 
    90         -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
    91             shift
    92             continue;;
    93 
    94         *)  if [ x"$src" = x ]
    95             then
    96                 src=$1
    97             else
    98                 # this colon is to work around a 386BSD /bin/sh bug
    99                 :
    100                 dst=$1
    101             fi
    102             shift
    103             continue;;
     70src=
     71dst=
     72dir_arg=
     73
     74usage="Usage: $0 [OPTION]... SRCFILE DSTFILE
     75   or: $0 [OPTION]... SRCFILES... DIRECTORY
     76   or: $0 -d DIRECTORIES...
     77
     78In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
     79In the second, create the directory path DIR.
     80
     81Options:
     82-b=TRANSFORMBASENAME
     83-c         copy source (using $cpprog) instead of moving (using $mvprog).
     84-d         create directories instead of installing files.
     85-g GROUP   $chgrp installed files to GROUP.
     86-m MODE    $chmod installed files to MODE.
     87-o USER    $chown installed files to USER.
     88-s         strip installed files (using $stripprog).
     89-t=TRANSFORM
     90--help     display this help and exit.
     91--version  display version info and exit.
     92
     93Environment variables override the default commands:
     94  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
     95"
     96
     97while test -n "$1"; do
     98  case $1 in
     99    -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
     100        shift
     101        continue;;
     102
     103    -c) instcmd=$cpprog
     104        shift
     105        continue;;
     106
     107    -d) dir_arg=true
     108        shift
     109        continue;;
     110
     111    -g) chgrpcmd="$chgrpprog $2"
     112        shift
     113        shift
     114        continue;;
     115
     116    --help) echo "$usage"; exit 0;;
     117
     118    -m) chmodcmd="$chmodprog $2"
     119        shift
     120        shift
     121        continue;;
     122
     123    -o) chowncmd="$chownprog $2"
     124        shift
     125        shift
     126        continue;;
     127
     128    -s) stripcmd=$stripprog
     129        shift
     130        continue;;
     131
     132    -t=*) transformarg=`echo $1 | sed 's/-t=//'`
     133        shift
     134        continue;;
     135
     136    --version) echo "$0 $scriptversion"; exit 0;;
     137
     138    *)  # When -d is used, all remaining arguments are directories to create.
     139        test -n "$dir_arg" && break
     140        # Otherwise, the last argument is the destination.  Remove it from $@.
     141        for arg
     142        do
     143          if test -n "$dstarg"; then
     144            # $@ is not empty: it contains at least $arg.
     145            set fnord "$@" "$dstarg"
     146            shift # fnord
     147          fi
     148          shift # arg
     149          dstarg=$arg
     150        done
     151        break;;
     152  esac
     153done
     154
     155if test -z "$1"; then
     156  if test -z "$dir_arg"; then
     157    echo "$0: no input file specified." >&2
     158    exit 1
     159  fi
     160  # It's OK to call `install-sh -d' without argument.
     161  # This can happen when creating conditional directories.
     162  exit 0
     163fi
     164
     165for src
     166do
     167  # Protect names starting with `-'.
     168  case $src in
     169    -*) src=./$src ;;
     170  esac
     171
     172  if test -n "$dir_arg"; then
     173    dst=$src
     174    src=
     175
     176    if test -d "$dst"; then
     177      instcmd=:
     178      chmodcmd=
     179    else
     180      instcmd=$mkdirprog
     181    fi
     182  else
     183    # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
     184    # might cause directories to be created, which would be especially bad
     185    # if $src (and thus $dsttmp) contains '*'.
     186    if test ! -f "$src" && test ! -d "$src"; then
     187      echo "$0: $src does not exist." >&2
     188      exit 1
     189    fi
     190
     191    if test -z "$dstarg"; then
     192      echo "$0: no destination specified." >&2
     193      exit 1
     194    fi
     195
     196    dst=$dstarg
     197    # Protect names starting with `-'.
     198    case $dst in
     199      -*) dst=./$dst ;;
    104200    esac
     201
     202    # If destination is a directory, append the input filename; won't work
     203    # if double slashes aren't ignored.
     204    if test -d "$dst"; then
     205      dst=$dst/`basename "$src"`
     206    fi
     207  fi
     208
     209  # This sed command emulates the dirname command.
     210  dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
     211
     212  # Make sure that the destination directory exists.
     213
     214  # Skip lots of stat calls in the usual case.
     215  if test ! -d "$dstdir"; then
     216    defaultIFS='
     217        '
     218    IFS="${IFS-$defaultIFS}"
     219
     220    oIFS=$IFS
     221    # Some sh's can't handle IFS=/ for some reason.
     222    IFS='%'
     223    set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
     224    IFS=$oIFS
     225
     226    pathcomp=
     227
     228    while test $# -ne 0 ; do
     229      pathcomp=$pathcomp$1
     230      shift
     231      test -d "$pathcomp" || $mkdirprog "$pathcomp"
     232      pathcomp=$pathcomp/
     233    done
     234  fi
     235
     236  if test -n "$dir_arg"; then
     237    $doit $instcmd "$dst" \
     238      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
     239      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
     240      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
     241      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
     242
     243  else
     244    # If we're going to rename the final executable, determine the name now.
     245    if test -z "$transformarg"; then
     246      dstfile=`basename "$dst"`
     247    else
     248      dstfile=`basename "$dst" $transformbasename \
     249               | sed $transformarg`$transformbasename
     250    fi
     251
     252    # don't allow the sed command to completely eliminate the filename.
     253    test -z "$dstfile" && dstfile=`basename "$dst"`
     254
     255    # Make a couple of temp file names in the proper directory.
     256    dsttmp=$dstdir/_inst.$$_
     257    rmtmp=$dstdir/_rm.$$_
     258
     259    # Trap to clean up those temp files at exit.
     260    trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
     261    trap '(exit $?); exit' 1 2 13 15
     262
     263    # Move or copy the file name to the temp name
     264    $doit $instcmd "$src" "$dsttmp" &&
     265
     266    # and set any options; do chmod last to preserve setuid bits.
     267    #
     268    # If any of these fail, we abort the whole thing.  If we want to
     269    # ignore errors from any of these, just make sure not to ignore
     270    # errors from the above "$doit $instcmd $src $dsttmp" command.
     271    #
     272    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
     273      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
     274      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
     275      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
     276
     277    # Now remove or move aside any old file at destination location.  We
     278    # try this two ways since rm can't unlink itself on some systems and
     279    # the destination file might be busy for other reasons.  In this case,
     280    # the final cleanup might fail but the new file should still install
     281    # successfully.
     282    {
     283      if test -f "$dstdir/$dstfile"; then
     284        $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
     285        || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
     286        || {
     287          echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
     288          (exit 1); exit
     289        }
     290      else
     291        :
     292      fi
     293    } &&
     294
     295    # Now rename the file to the real destination.
     296    $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
     297  fi || { (exit 1); exit; }
    105298done
    106299
    107 if [ x"$src" = x ]
    108 then
    109         echo "install:  no input file specified"
    110         exit 1
    111 else
    112         true
    113 fi
    114 
    115 if [ x"$dir_arg" != x ]; then
    116         dst=$src
    117         src=""
    118        
    119         if [ -d $dst ]; then
    120                 instcmd=:
    121                 chmodcmd=""
    122         else
    123                 instcmd=mkdir
    124         fi
    125 else
    126 
    127 # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
    128 # might cause directories to be created, which would be especially bad
    129 # if $src (and thus $dsttmp) contains '*'.
    130 
    131         if [ -f $src -o -d $src ]
    132         then
    133                 true
    134         else
    135                 echo "install:  $src does not exist"
    136                 exit 1
    137         fi
    138        
    139         if [ x"$dst" = x ]
    140         then
    141                 echo "install:  no destination specified"
    142                 exit 1
    143         else
    144                 true
    145         fi
    146 
    147 # If destination is a directory, append the input filename; if your system
    148 # does not like double slashes in filenames, you may need to add some logic
    149 
    150         if [ -d $dst ]
    151         then
    152                 dst="$dst"/`basename $src`
    153         else
    154                 true
    155         fi
    156 fi
    157 
    158 ## this sed command emulates the dirname command
    159 dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
    160 
    161 # Make sure that the destination directory exists.
    162 #  this part is taken from Noah Friedman's mkinstalldirs script
    163 
    164 # Skip lots of stat calls in the usual case.
    165 if [ ! -d "$dstdir" ]; then
    166 defaultIFS='   
    167 '
    168 IFS="${IFS-${defaultIFS}}"
    169 
    170 oIFS="${IFS}"
    171 # Some sh's can't handle IFS=/ for some reason.
    172 IFS='%'
    173 set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
    174 IFS="${oIFS}"
    175 
    176 pathcomp=''
    177 
    178 while [ $# -ne 0 ] ; do
    179         pathcomp="${pathcomp}${1}"
    180         shift
    181 
    182         if [ ! -d "${pathcomp}" ] ;
    183         then
    184                 $mkdirprog "${pathcomp}"
    185         else
    186                 true
    187         fi
    188 
    189         pathcomp="${pathcomp}/"
    190 done
    191 fi
    192 
    193 if [ x"$dir_arg" != x ]
    194 then
    195         $doit $instcmd $dst &&
    196 
    197         if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
    198         if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
    199         if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
    200         if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
    201 else
    202 
    203 # If we're going to rename the final executable, determine the name now.
    204 
    205         if [ x"$transformarg" = x ]
    206         then
    207                 dstfile=`basename $dst`
    208         else
    209                 dstfile=`basename $dst $transformbasename |
    210                         sed $transformarg`$transformbasename
    211         fi
    212 
    213 # don't allow the sed command to completely eliminate the filename
    214 
    215         if [ x"$dstfile" = x ]
    216         then
    217                 dstfile=`basename $dst`
    218         else
    219                 true
    220         fi
    221 
    222 # Make a temp file name in the proper directory.
    223 
    224         dsttmp=$dstdir/#inst.$$#
    225 
    226 # Move or copy the file name to the temp name
    227 
    228         $doit $instcmd $src $dsttmp &&
    229 
    230         trap "rm -f ${dsttmp}" 0 &&
    231 
    232 # and set any options; do chmod last to preserve setuid bits
    233 
    234 # If any of these fail, we abort the whole thing.  If we want to
    235 # ignore errors from any of these, just make sure not to ignore
    236 # errors from the above "$doit $instcmd $src $dsttmp" command.
    237 
    238         if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
    239         if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
    240         if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
    241         if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
    242 
    243 # Now rename the file to the real destination.
    244 
    245         $doit $rmcmd -f $dstdir/$dstfile &&
    246         $doit $mvcmd $dsttmp $dstdir/$dstfile
    247 
    248 fi &&
    249 
    250 
    251 exit 0
     300# The final little trick to "correctly" pass the exit status to the exit trap.
     301{
     302  (exit 0); exit
     303}
     304
     305# Local variables:
     306# eval: (add-hook 'write-file-hooks 'time-stamp)
     307# time-stamp-start: "scriptversion="
     308# time-stamp-format: "%:y-%02m-%02d.%02H"
     309# time-stamp-end: "$"
     310# End:
  • trunk/gui/tclconfig/mkinstalldirs

    r158 r503  
    11#! /bin/sh
    22# mkinstalldirs --- make directory hierarchy
    3 # Author: Noah Friedman <friedman@prep.ai.mit.edu>
     3
     4scriptversion=2003-11-08.23
     5
     6# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
    47# Created: 1993-05-16
    5 # Public domain
    6 
    7 # $Id: mkinstalldirs,v 1.1.1.1 1999/08/04 23:03:40 wart Exp $
     8# Public domain.
     9#
     10# This file is maintained in Automake, please report
     11# bugs to <bug-automake@gnu.org> or send patches to
     12# <automake-patches@gnu.org>.
    813
    914errstatus=0
     15dirmode=""
     16
     17usage="\
     18Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
     19
     20Create each directory DIR (with mode MODE, if specified), including all
     21leading file name components.
     22
     23Report bugs to <bug-automake@gnu.org>."
     24
     25# process command line arguments
     26while test $# -gt 0 ; do
     27  case $1 in
     28    -h | --help | --h*)         # -h for help
     29      echo "$usage"
     30      exit 0
     31      ;;
     32    -m)                         # -m PERM arg
     33      shift
     34      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
     35      dirmode=$1
     36      shift
     37      ;;
     38    --version)
     39      echo "$0 $scriptversion"
     40      exit 0
     41      ;;
     42    --)                         # stop option processing
     43      shift
     44      break
     45      ;;
     46    -*)                         # unknown option
     47      echo "$usage" 1>&2
     48      exit 1
     49      ;;
     50    *)                          # first non-opt arg
     51      break
     52      ;;
     53  esac
     54done
    1055
    1156for file
    1257do
    13    set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
    14    shift
     58  if test -d "$file"; then
     59    shift
     60  else
     61    break
     62  fi
     63done
    1564
    16    pathcomp=
    17    for d
    18    do
    19      pathcomp="$pathcomp$d"
    20      case "$pathcomp" in
    21        -* ) pathcomp=./$pathcomp ;;
    22      esac
     65case $# in
     66  0) exit 0 ;;
     67esac
    2368
    24      if test ! -d "$pathcomp"; then
    25         echo "mkdir $pathcomp"
     69case $dirmode in
     70  '')
     71    if mkdir -p -- . 2>/dev/null; then
     72      echo "mkdir -p -- $*"
     73      exec mkdir -p -- "$@"
     74    else
     75      # On NextStep and OpenStep, the `mkdir' command does not
     76      # recognize any option.  It will interpret all options as
     77      # directories to create, and then abort because `.' already
     78      # exists.
     79      test -d ./-p && rmdir ./-p
     80      test -d ./-- && rmdir ./--
     81    fi
     82    ;;
     83  *)
     84    if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
     85      echo "mkdir -m $dirmode -p -- $*"
     86      exec mkdir -m "$dirmode" -p -- "$@"
     87    else
     88      # Clean up after NextStep and OpenStep mkdir.
     89      for d in ./-m ./-p ./-- "./$dirmode";
     90      do
     91        test -d $d && rmdir $d
     92      done
     93    fi
     94    ;;
     95esac
    2696
    27         mkdir "$pathcomp" || lasterr=$?
     97for file
     98do
     99  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
     100  shift
    28101
    29         if test ! -d "$pathcomp"; then
    30           errstatus=$lasterr
    31         fi
    32      fi
     102  pathcomp=
     103  for d
     104  do
     105    pathcomp="$pathcomp$d"
     106    case $pathcomp in
     107      -*) pathcomp=./$pathcomp ;;
     108    esac
    33109
    34      pathcomp="$pathcomp/"
    35    done
     110    if test ! -d "$pathcomp"; then
     111      echo "mkdir $pathcomp"
     112
     113      mkdir "$pathcomp" || lasterr=$?
     114
     115      if test ! -d "$pathcomp"; then
     116        errstatus=$lasterr
     117      else
     118        if test ! -z "$dirmode"; then
     119          echo "chmod $dirmode $pathcomp"
     120          lasterr=""
     121          chmod "$dirmode" "$pathcomp" || lasterr=$?
     122
     123          if test ! -z "$lasterr"; then
     124            errstatus=$lasterr
     125          fi
     126        fi
     127      fi
     128    fi
     129
     130    pathcomp="$pathcomp/"
     131  done
    36132done
    37133
    38134exit $errstatus
    39135
    40 # mkinstalldirs ends here
     136# Local Variables:
     137# mode: shell-script
     138# sh-indentation: 2
     139# eval: (add-hook 'write-file-hooks 'time-stamp)
     140# time-stamp-start: "scriptversion="
     141# time-stamp-format: "%:y-%02m-%02d.%02H"
     142# time-stamp-end: "$"
     143# End:
Note: See TracChangeset for help on using the changeset viewer.