1#! /bin/sh
2
3# From configure.in Revision: 1.5 
4
5CONFIGDIR=../config
6
7ac_aux_dir=
8for ac_dir in ../config $srcdir/../config; do
9  if test -f $ac_dir/install-sh; then
10    ac_aux_dir=$ac_dir
11    ac_install_sh="$ac_aux_dir/install-sh -c"
12    break
13  elif test -f $ac_dir/install.sh; then
14    ac_aux_dir=$ac_dir
15    ac_install_sh="$ac_aux_dir/install.sh -c"
16    break
17  fi
18done
19if test -z "$ac_aux_dir"; then
20  { echo "configure: error: can not find install-sh or install.sh in ../config $srcdir/../config" 1>&2; exit 1; }
21fi
22ac_config_guess=$ac_aux_dir/config.guess
23ac_config_sub=$ac_aux_dir/config.sub
24ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
25
26# tcl.m4 --
27#
28#	This file provides a set of autoconf macros to help TEA-enable
29#	a Tcl extension.
30#
31# Copyright (c) 1999-2000 Ajuba Solutions.
32# See the file "license.terms" for information on usage and redistribution of this file.
33#
34# See the file "license.terms" for information on usage and redistribution
35# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
36
37#------------------------------------------------------------------------
38# SC_PATH_TCLCONFIG --
39#
40#	Locate the tclConfig.sh file and perform a sanity check on
41#	the Tcl compile flags
42#
43# Arguments:
44#	none
45#
46# Results:
47#
48#	Adds the following arguments to configure:
49#		--with-tcl=...
50#
51#	Defines the following vars:
52#		TCL_BIN_DIR	Full path to the directory containing
53#				the tclConfig.sh file
54#------------------------------------------------------------------------
55
56
57
58#------------------------------------------------------------------------
59# SC_PATH_TKCONFIG --
60#
61#	Locate the tkConfig.sh file
62#
63# Arguments:
64#	none
65#
66# Results:
67#
68#	Adds the following arguments to configure:
69#		--with-tk=...
70#
71#	Defines the following vars:
72#		TK_BIN_DIR	Full path to the directory containing
73#				the tkConfig.sh file
74#------------------------------------------------------------------------
75
76
77
78#------------------------------------------------------------------------
79# SC_LOAD_TCLCONFIG --
80#
81#	Load the tclConfig.sh file
82#
83# Arguments:
84#	
85#	Requires the following vars to be set:
86#		TCL_BIN_DIR
87#
88# Results:
89#
90#	Subst the following vars:
91#		TCL_BIN_DIR
92#		TCL_SRC_DIR
93#		TCL_LIB_FILE
94#
95#------------------------------------------------------------------------
96
97
98
99#------------------------------------------------------------------------
100# SC_LOAD_TKCONFIG --
101#
102#	Load the tkConfig.sh file
103#
104# Arguments:
105#	
106#	Requires the following vars to be set:
107#		TK_BIN_DIR
108#
109# Results:
110#
111#	Sets the following vars that should be in tkConfig.sh:
112#		TK_BIN_DIR
113#------------------------------------------------------------------------
114
115
116
117#------------------------------------------------------------------------
118# SC_ENABLE_GCC --
119#
120#	Allows the use of GCC if available
121#
122# Arguments:
123#	none
124#	
125# Results:
126#
127#	Adds the following arguments to configure:
128#		--enable-gcc
129#
130#	Sets the following vars:
131#		CC	Command to use for the compiler
132#------------------------------------------------------------------------
133
134
135
136#------------------------------------------------------------------------
137# SC_ENABLE_SHARED --
138#
139#	Allows the building of shared libraries
140#
141# Arguments:
142#	none
143#	
144# Results:
145#
146#	Adds the following arguments to configure:
147#		--enable-shared=yes|no
148#
149#	Defines the following vars:
150#		STATIC_BUILD	Used for building import/export libraries
151#				on Windows.
152#
153#	Sets the following vars:
154#		SHARED_BUILD	Value of 1 or 0
155#------------------------------------------------------------------------
156
157
158
159#------------------------------------------------------------------------
160# SC_ENABLE_THREADS --
161#
162#	Specify if thread support should be enabled
163#
164# Arguments:
165#	none
166#	
167# Results:
168#
169#	Adds the following arguments to configure:
170#		--enable-threads
171#
172#	Sets the following vars:
173#		THREADS_LIBS	Thread library(s)
174#
175#	Defines the following vars:
176#		TCL_THREADS
177#		_REENTRANT
178#
179#------------------------------------------------------------------------
180
181
182
183#------------------------------------------------------------------------
184# SC_ENABLE_SYMBOLS --
185#
186#	Specify if debugging symbols should be used
187#
188# Arguments:
189#	none
190#	
191#	Requires the following vars to be set:
192#		CFLAGS_DEBUG
193#		CFLAGS_OPTIMIZE
194#		LDFLAGS_DEBUG
195#		LDFLAGS_OPTIMIZE
196#	
197# Results:
198#
199#	Adds the following arguments to configure:
200#		--enable-symbols
201#
202#	Defines the following vars:
203#		CFLAGS_DEFAULT	Sets to CFLAGS_DEBUG if true
204#				Sets to CFLAGS_OPTIMIZE if false
205#		LDFLAGS_DEFAULT	Sets to LDFLAGS_DEBUG if true
206#				Sets to LDFLAGS_OPTIMIZE if false
207#		DBGX		Debug library extension
208#
209#------------------------------------------------------------------------
210
211
212
213#--------------------------------------------------------------------
214# SC_CONFIG_CFLAGS
215#
216#	Try to determine the proper flags to pass to the compiler
217#	for building shared libraries and other such nonsense.
218#
219# Arguments:
220#	none
221#
222# Results:
223#
224#	Defines the following vars:
225#
226#       DL_OBJS -       Name of the object file that implements dynamic
227#                       loading for Tcl on this system.
228#       DL_LIBS -       Library file(s) to include in tclsh and other base
229#                       applications in order for the "load" command to work.
230#       LDFLAGS -      Flags to pass to the compiler when linking object
231#                       files into an executable application binary such
232#                       as tclsh.
233#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
234#                       that tell the run-time dynamic linker where to look
235#                       for shared libraries such as libtcl.so.  Depends on
236#                       the variable LIB_RUNTIME_DIR in the Makefile.
237#       MAKE_LIB -      Command to execute to build the Tcl library;
238#                       differs depending on whether or not Tcl is being
239#                       compiled as a shared library.
240#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
241#                       of a shared library (may request position-independent
242#                       code, among other things).
243#       SHLIB_LD -      Base command to use for combining object files
244#                       into a shared library.
245#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
246#                       creating shared libraries.  This symbol typically
247#                       goes at the end of the "ld" commands that build
248#                       shared libraries. The value of the symbol is
249#                       "${LIBS}" if all of the dependent libraries should
250#                       be specified when creating a shared library.  If
251#                       dependent libraries should not be specified (as on
252#                       SunOS 4.x, where they cause the link to fail, or in
253#                       general if Tcl and Tk aren't themselves shared
254#                       libraries), then this symbol has an empty string
255#                       as its value.
256#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
257#                       extensions.  An empty string means we don't know how
258#                       to use shared libraries on this platform.
259#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
260#                       as libtcl7.8.so or libtcl7.8.a.
261#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
262#                       in the shared library name, using the $VERSION variable
263#                       to put the version in the right place.  This is used
264#                       by platforms that need non-standard library names.
265#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
266#                       to have a version after the .so, and ${VERSION}.a
267#                       on AIX, since the Tcl shared library needs to have
268#                       a .a extension whereas shared objects for loadable
269#                       extensions have a .so extension.  Defaults to
270#                       ${VERSION}${SHLIB_SUFFIX}.
271#       TCL_NEEDS_EXP_FILE -
272#                       1 means that an export file is needed to link to a
273#                       shared library.
274#       TCL_EXP_FILE -  The name of the installed export / import file which
275#                       should be used to link to the Tcl shared library.
276#                       Empty if Tcl is unshared.
277#       TCL_BUILD_EXP_FILE -
278#                       The name of the built export / import file which
279#                       should be used to link to the Tcl shared library.
280#                       Empty if Tcl is unshared.
281#	CFLAGS_DEBUG -
282#			Flags used when running the compiler in debug mode
283#	CFLAGS_OPTIMIZE -
284#			Flags used when running the compiler in optimize mode
285#
286#	EXTRA_CFLAGS
287#
288#	Subst's the following vars:
289#		DL_LIBS
290#		CFLAGS_DEBUG
291#		CFLAGS_OPTIMIZE
292#--------------------------------------------------------------------
293
294
295
296#--------------------------------------------------------------------
297# SC_SERIAL_PORT
298#
299#	Determine which interface to use to talk to the serial port.
300#	Note that #include lines must begin in leftmost column for
301#	some compilers to recognize them as preprocessor directives.
302#
303# Arguments:
304#	none
305#	
306# Results:
307#
308#	Defines only one of the following vars:
309#		USE_TERMIOS
310#		USE_TERMIO
311#		USE_SGTTY
312#
313#--------------------------------------------------------------------
314
315
316
317#--------------------------------------------------------------------
318# SC_MISSING_POSIX_HEADERS
319#
320#	Supply substitutes for missing POSIX header files.  Special
321#	notes:
322#	    - stdlib.h doesn't define strtol, strtoul, or
323#	      strtod insome versions of SunOS
324#	    - some versions of string.h don't declare procedures such
325#	      as strstr
326#
327# Arguments:
328#	none
329#	
330# Results:
331#
332#	Defines some of the following vars:
333#		NO_DIRENT_H
334#		NO_ERRNO_H
335#		NO_VALUES_H
336#		NO_LIMITS_H
337#		NO_STDLIB_H
338#		NO_STRING_H
339#		NO_SYS_WAIT_H
340#		NO_DLFCN_H
341#		HAVE_UNISTD_H
342#		HAVE_SYS_PARAM_H
343#
344#		HAVE_STRING_H ?
345#
346#--------------------------------------------------------------------
347
348
349
350#--------------------------------------------------------------------
351# SC_PATH_X
352#
353#	Locate the X11 header files and the X11 library archive.  Try
354#	the ac_path_x macro first, but if it doesn't find the X stuff
355#	(e.g. because there's no xmkmf program) then check through
356#	a list of possible directories.  Under some conditions the
357#	autoconf macro will return an include directory that contains
358#	no include files, so double-check its result just to be safe.
359#
360# Arguments:
361#	none
362#	
363# Results:
364#
365#	Sets the the following vars:
366#		XINCLUDES
367#		XLIBSW
368#
369#--------------------------------------------------------------------
370
371
372#--------------------------------------------------------------------
373# SC_BLOCKING_STYLE
374#
375#	The statements below check for systems where POSIX-style
376#	non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. 
377#	On these systems (mostly older ones), use the old BSD-style
378#	FIONBIO approach instead.
379#
380# Arguments:
381#	none
382#	
383# Results:
384#
385#	Defines some of the following vars:
386#		HAVE_SYS_IOCTL_H
387#		HAVE_SYS_FILIO_H
388#		USE_FIONBIO
389#		O_NONBLOCK
390#
391#--------------------------------------------------------------------
392
393
394
395#--------------------------------------------------------------------
396# SC_HAVE_VFORK
397#
398#	Check to see whether the system provides a vfork kernel call.
399#	If not, then use fork instead.  Also, check for a problem with
400#	vforks and signals that can cause core dumps if a vforked child
401#	resets a signal handler.  If the problem exists, then use fork
402#	instead of vfork.
403#
404# Arguments:
405#	none
406#	
407# Results:
408#
409#	Defines some of the following vars:
410#		vfork (=fork)
411#
412#--------------------------------------------------------------------
413
414
415
416#--------------------------------------------------------------------
417# SC_TIME_HANLDER
418#
419#	Checks how the system deals with time.h, what time structures
420#	are used on the system, and what fields the structures have.
421#
422# Arguments:
423#	none
424#	
425# Results:
426#
427#	Defines some of the following vars:
428#		USE_DELTA_FOR_TZ
429#		HAVE_TM_GMTOFF
430#		HAVE_TM_TZADJ
431#		HAVE_TIMEZONE_VAR
432#
433#--------------------------------------------------------------------
434
435
436
437#--------------------------------------------------------------------
438# SC_BUGGY_STRTOD
439#
440#	Under Solaris 2.4, strtod returns the wrong value for the
441#	terminating character under some conditions.  Check for this
442#	and if the problem exists use a substitute procedure
443#	"fixstrtod" (provided by Tcl) that corrects the error.
444#
445# Arguments:
446#	none
447#	
448# Results:
449#
450#	Might defines some of the following vars:
451#		strtod (=fixstrtod)
452#
453#--------------------------------------------------------------------
454
455
456
457#--------------------------------------------------------------------
458# SC_TCL_LINK_LIBS
459#
460#	Search for the libraries needed to link the Tcl shell.
461#	Things like the math library (-lm) and socket stuff (-lsocket vs.
462#	-lnsl) are dealt with here.
463#
464# Arguments:
465#	Requires the following vars to be set in the Makefile:
466#		DL_LIBS
467#		LIBS
468#		MATH_LIBS
469#	
470# Results:
471#
472#	Subst's the following var:
473#		TCL_LIBS
474#		MATH_LIBS
475#
476#	Might append to the following vars:
477#		LIBS
478#
479#	Might define the following vars:
480#		HAVE_NET_ERRNO_H
481#
482#--------------------------------------------------------------------
483
484
485
486#------------------------------------------------------------------------
487# SC_MAKE_LIB --
488#
489#	Generate a line that can be used to build a shared/unshared library
490#	in a platform independent manner.
491#
492# Arguments:
493#	none
494#
495#	Requires:
496#
497# Results:
498#
499#	Defines the following vars:
500#		MAKE_LIB	Makefile rule for building a library
501#		MAKE_SHARED_LIB	Makefile rule for building a shared library
502#		MAKE_UNSHARED_LIB	Makefile rule for building a static
503#				library
504#------------------------------------------------------------------------
505
506
507
508#------------------------------------------------------------------------
509# SC_LIB_SPEC --
510#
511#	Compute the name of an existing object library located in libdir
512#	from the given base name and produce the appropriate linker flags.
513#
514# Arguments:
515#	basename	The base name of the library without version
516#			numbers, extensions, or "lib" prefixes.
517#	extra_dir	Extra directory in which to search for the
518#			library.  This location is used first, then
519#			$prefix/$exec-prefix, then some defaults.
520#
521# Requires:
522#	CYGPATH		command used to generate native style paths
523#
524# Results:
525#
526#	Defines the following vars:
527#		${basename}_LIB_NAME	The computed library name.
528#		${basename}_LIB_SPEC	The computed linker flags.
529#------------------------------------------------------------------------
530
531
532
533#------------------------------------------------------------------------
534# SC_PRIVATE_TCL_HEADERS --
535#
536#	Locate the private Tcl include files
537#
538# Arguments:
539#
540#	Requires:
541#		TCL_SRC_DIR	Assumes that SC_LOAD_TCLCONFIG has
542#				 already been called.
543#
544# Results:
545#
546#	Substs the following vars:
547#		TCL_TOP_DIR_NATIVE
548#		TCL_GENERIC_DIR_NATIVE
549#		TCL_UNIX_DIR_NATIVE
550#		TCL_WIN_DIR_NATIVE
551#		TCL_BMAP_DIR_NATIVE
552#		TCL_TOOL_DIR_NATIVE
553#		TCL_PLATFORM_DIR_NATIVE
554#		TCL_BIN_DIR_NATIVE
555#		TCL_INCLUDES
556#------------------------------------------------------------------------
557
558
559
560#------------------------------------------------------------------------
561# SC_PUBLIC_TCL_HEADERS --
562#
563#	Locate the installed public Tcl header files
564#
565# Arguments:
566#	None.
567#
568# Requires:
569#	CYGPATH must be set
570#
571# Results:
572#
573#	Adds a --with-tclinclude switch to configure.
574#	Result is cached.
575#
576#	Substs the following vars:
577#		TCL_INCLUDES
578#------------------------------------------------------------------------
579
580
581
582#------------------------------------------------------------------------
583# SC_PRIVATE_TK_HEADERS --
584#
585#	Locate the private Tk include files
586#
587# Arguments:
588#
589#	Requires:
590#		TK_SRC_DIR	Assumes that SC_LOAD_TKCONFIG has
591#				 already been called.
592#
593# Results:
594#
595#	Substs the following vars:
596#		TK_INCLUDES
597#------------------------------------------------------------------------
598
599
600
601#------------------------------------------------------------------------
602# SC_PUBLIC_TK_HEADERS --
603#
604#	Locate the installed public Tk header files
605#
606# Arguments:
607#	None.
608#
609# Requires:
610#	CYGPATH must be set
611#
612# Results:
613#
614#	Adds a --with-tkinclude switch to configure.
615#	Result is cached.
616#
617#	Substs the following vars:
618#		TK_INCLUDES
619#------------------------------------------------------------------------
620
621
622
623#------------------------------------------------------------------------
624# SC_SIMPLE_EXEEXT
625#	Select the executable extension based on the host type.  This
626#	is a lightweight replacement for AC_EXEEXT that doesn't require
627#	a compiler.
628#
629# Arguments
630#	none
631#
632# Results
633#	Subst's the following values:
634#		EXEEXT
635#------------------------------------------------------------------------
636
637
638
639#------------------------------------------------------------------------
640# SC_PROG_TCLSH
641#	Locate a tclsh shell in the following directories:
642#		${exec_prefix}/bin
643#		${prefix}/bin
644#		${TCL_BIN_DIR}
645#		${TCL_BIN_DIR}/../bin
646#		${PATH}
647#
648# Arguments
649#	none
650#
651# Results
652#	Subst's the following values:
653#		TCLSH_PROG
654#------------------------------------------------------------------------
655
656
657
658#------------------------------------------------------------------------
659# SC_PROG_WISH
660#	Locate a wish shell in the following directories:
661#		${exec_prefix}/bin
662#		${prefix}/bin
663#		${TCL_BIN_DIR}
664#		${TCL_BIN_DIR}/../bin
665#		${PATH}
666#
667# Arguments
668#	none
669#
670# Results
671#	Subst's the following values:
672#		WISH_PROG
673#------------------------------------------------------------------------
674
675
676
677
678
679#------------------------------------------------------------------------
680# SC_CYGPATH --
681#
682#	Set the CYGPATH shell variable used by other SC_ macros. 
683#
684#------------------------------------------------------------------------
685
686
687# Guess values for system-dependent variables and create Makefiles.
688# Generated automatically using autoconf version 2.13 
689# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
690#
691# This configure script is free software; the Free Software Foundation
692# gives unlimited permission to copy, distribute and modify it.
693
694# Defaults:
695ac_help=
696ac_default_prefix=/usr/local
697# Any additions from configure.in:
698ac_help="$ac_help
699  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
700ac_help="$ac_help
701 --with-tclinclude      directory containing the public Tcl header files."
702ac_help="$ac_help
703  --with-expat=<directory>   directory containing EXPAT library"
704ac_help="$ac_help
705  --enable-symbols        build with debugging symbols [--disable-symbols]"
706ac_help="$ac_help
707  --enable-shared         build and link with shared libraries [--enable-shared]"
708
709# Initialize some variables set by options.
710# The variables have the same names as the options, with
711# dashes changed to underlines.
712build=NONE
713cache_file=./config.cache
714exec_prefix=NONE
715host=NONE
716no_create=
717nonopt=NONE
718no_recursion=
719prefix=NONE
720program_prefix=NONE
721program_suffix=NONE
722program_transform_name=s,x,x,
723silent=
724site=
725srcdir=
726target=NONE
727verbose=
728x_includes=NONE
729x_libraries=NONE
730bindir='${exec_prefix}/bin'
731sbindir='${exec_prefix}/sbin'
732libexecdir='${exec_prefix}/libexec'
733datadir='${prefix}/share'
734sysconfdir='${prefix}/etc'
735sharedstatedir='${prefix}/com'
736localstatedir='${prefix}/var'
737libdir='${exec_prefix}/lib'
738includedir='${prefix}/include'
739oldincludedir='/usr/include'
740infodir='${prefix}/info'
741mandir='${prefix}/man'
742
743# Initialize some other variables.
744subdirs=
745MFLAGS= MAKEFLAGS=
746SHELL=${CONFIG_SHELL-/bin/sh}
747# Maximum number of lines to put in a shell here document.
748ac_max_here_lines=12
749
750ac_prev=
751for ac_option
752do
753
754  # If the previous option needs an argument, assign it.
755  if test -n "$ac_prev"; then
756    eval "$ac_prev=\$ac_option"
757    ac_prev=
758    continue
759  fi
760
761  case "$ac_option" in
762  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
763  *) ac_optarg= ;;
764  esac
765
766  # Accept the important Cygnus configure options, so we can diagnose typos.
767
768  case "$ac_option" in
769
770  -bindir | --bindir | --bindi | --bind | --bin | --bi)
771    ac_prev=bindir ;;
772  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
773    bindir="$ac_optarg" ;;
774
775  -build | --build | --buil | --bui | --bu)
776    ac_prev=build ;;
777  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
778    build="$ac_optarg" ;;
779
780  -cache-file | --cache-file | --cache-fil | --cache-fi \
781  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
782    ac_prev=cache_file ;;
783  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
784  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
785    cache_file="$ac_optarg" ;;
786
787  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
788    ac_prev=datadir ;;
789  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
790  | --da=*)
791    datadir="$ac_optarg" ;;
792
793  -disable-* | --disable-*)
794    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
795    # Reject names that are not valid shell variable names.
796    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
797      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
798    fi
799    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
800    eval "enable_${ac_feature}=no" ;;
801
802  -enable-* | --enable-*)
803    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
804    # Reject names that are not valid shell variable names.
805    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
806      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
807    fi
808    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
809    case "$ac_option" in
810      *=*) ;;
811      *) ac_optarg=yes ;;
812    esac
813    eval "enable_${ac_feature}='$ac_optarg'" ;;
814
815  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
816  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
817  | --exec | --exe | --ex)
818    ac_prev=exec_prefix ;;
819  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
820  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
821  | --exec=* | --exe=* | --ex=*)
822    exec_prefix="$ac_optarg" ;;
823
824  -gas | --gas | --ga | --g)
825    # Obsolete; use --with-gas.
826    with_gas=yes ;;
827
828  -help | --help | --hel | --he)
829    # Omit some internal or obsolete options to make the list less imposing.
830    # This message is too long to be a string in the A/UX 3.1 sh.
831    cat << EOF
832Usage: configure [options] [host]
833Options: [defaults in brackets after descriptions]
834Configuration:
835  --cache-file=FILE       cache test results in FILE
836  --help                  print this message
837  --no-create             do not create output files
838  --quiet, --silent       do not print \`checking...' messages
839  --version               print the version of autoconf that created configure
840Directory and file names:
841  --prefix=PREFIX         install architecture-independent files in PREFIX
842                          [$ac_default_prefix]
843  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
844                          [same as prefix]
845  --bindir=DIR            user executables in DIR [EPREFIX/bin]
846  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
847  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
848  --datadir=DIR           read-only architecture-independent data in DIR
849                          [PREFIX/share]
850  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
851  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
852                          [PREFIX/com]
853  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
854  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
855  --includedir=DIR        C header files in DIR [PREFIX/include]
856  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
857  --infodir=DIR           info documentation in DIR [PREFIX/info]
858  --mandir=DIR            man documentation in DIR [PREFIX/man]
859  --srcdir=DIR            find the sources in DIR [configure dir or ..]
860  --program-prefix=PREFIX prepend PREFIX to installed program names
861  --program-suffix=SUFFIX append SUFFIX to installed program names
862  --program-transform-name=PROGRAM
863                          run sed PROGRAM on installed program names
864EOF
865    cat << EOF
866Host type:
867  --build=BUILD           configure for building on BUILD [BUILD=HOST]
868  --host=HOST             configure for HOST [guessed]
869  --target=TARGET         configure for TARGET [TARGET=HOST]
870Features and packages:
871  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
872  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
873  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
874  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
875  --x-includes=DIR        X include files are in DIR
876  --x-libraries=DIR       X library files are in DIR
877EOF
878    if test -n "$ac_help"; then
879      echo "--enable and --with options recognized:$ac_help"
880    fi
881    exit 0 ;;
882
883  -host | --host | --hos | --ho)
884    ac_prev=host ;;
885  -host=* | --host=* | --hos=* | --ho=*)
886    host="$ac_optarg" ;;
887
888  -includedir | --includedir | --includedi | --included | --include \
889  | --includ | --inclu | --incl | --inc)
890    ac_prev=includedir ;;
891  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
892  | --includ=* | --inclu=* | --incl=* | --inc=*)
893    includedir="$ac_optarg" ;;
894
895  -infodir | --infodir | --infodi | --infod | --info | --inf)
896    ac_prev=infodir ;;
897  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
898    infodir="$ac_optarg" ;;
899
900  -libdir | --libdir | --libdi | --libd)
901    ac_prev=libdir ;;
902  -libdir=* | --libdir=* | --libdi=* | --libd=*)
903    libdir="$ac_optarg" ;;
904
905  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
906  | --libexe | --libex | --libe)
907    ac_prev=libexecdir ;;
908  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
909  | --libexe=* | --libex=* | --libe=*)
910    libexecdir="$ac_optarg" ;;
911
912  -localstatedir | --localstatedir | --localstatedi | --localstated \
913  | --localstate | --localstat | --localsta | --localst \
914  | --locals | --local | --loca | --loc | --lo)
915    ac_prev=localstatedir ;;
916  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
917  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
918  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
919    localstatedir="$ac_optarg" ;;
920
921  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
922    ac_prev=mandir ;;
923  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
924    mandir="$ac_optarg" ;;
925
926  -nfp | --nfp | --nf)
927    # Obsolete; use --without-fp.
928    with_fp=no ;;
929
930  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
931  | --no-cr | --no-c)
932    no_create=yes ;;
933
934  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
935  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
936    no_recursion=yes ;;
937
938  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
939  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
940  | --oldin | --oldi | --old | --ol | --o)
941    ac_prev=oldincludedir ;;
942  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
943  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
944  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
945    oldincludedir="$ac_optarg" ;;
946
947  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
948    ac_prev=prefix ;;
949  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
950    prefix="$ac_optarg" ;;
951
952  -program-prefix | --program-prefix | --program-prefi | --program-pref \
953  | --program-pre | --program-pr | --program-p)
954    ac_prev=program_prefix ;;
955  -program-prefix=* | --program-prefix=* | --program-prefi=* \
956  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
957    program_prefix="$ac_optarg" ;;
958
959  -program-suffix | --program-suffix | --program-suffi | --program-suff \
960  | --program-suf | --program-su | --program-s)
961    ac_prev=program_suffix ;;
962  -program-suffix=* | --program-suffix=* | --program-suffi=* \
963  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
964    program_suffix="$ac_optarg" ;;
965
966  -program-transform-name | --program-transform-name \
967  | --program-transform-nam | --program-transform-na \
968  | --program-transform-n | --program-transform- \
969  | --program-transform | --program-transfor \
970  | --program-transfo | --program-transf \
971  | --program-trans | --program-tran \
972  | --progr-tra | --program-tr | --program-t)
973    ac_prev=program_transform_name ;;
974  -program-transform-name=* | --program-transform-name=* \
975  | --program-transform-nam=* | --program-transform-na=* \
976  | --program-transform-n=* | --program-transform-=* \
977  | --program-transform=* | --program-transfor=* \
978  | --program-transfo=* | --program-transf=* \
979  | --program-trans=* | --program-tran=* \
980  | --progr-tra=* | --program-tr=* | --program-t=*)
981    program_transform_name="$ac_optarg" ;;
982
983  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
984  | -silent | --silent | --silen | --sile | --sil)
985    silent=yes ;;
986
987  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
988    ac_prev=sbindir ;;
989  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
990  | --sbi=* | --sb=*)
991    sbindir="$ac_optarg" ;;
992
993  -sharedstatedir | --sharedstatedir | --sharedstatedi \
994  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
995  | --sharedst | --shareds | --shared | --share | --shar \
996  | --sha | --sh)
997    ac_prev=sharedstatedir ;;
998  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
999  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1000  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1001  | --sha=* | --sh=*)
1002    sharedstatedir="$ac_optarg" ;;
1003
1004  -site | --site | --sit)
1005    ac_prev=site ;;
1006  -site=* | --site=* | --sit=*)
1007    site="$ac_optarg" ;;
1008
1009  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1010    ac_prev=srcdir ;;
1011  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1012    srcdir="$ac_optarg" ;;
1013
1014  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1015  | --syscon | --sysco | --sysc | --sys | --sy)
1016    ac_prev=sysconfdir ;;
1017  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1018  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1019    sysconfdir="$ac_optarg" ;;
1020
1021  -target | --target | --targe | --targ | --tar | --ta | --t)
1022    ac_prev=target ;;
1023  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1024    target="$ac_optarg" ;;
1025
1026  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1027    verbose=yes ;;
1028
1029  -version | --version | --versio | --versi | --vers)
1030    echo "configure generated by autoconf version 2.13"
1031    exit 0 ;;
1032
1033  -with-* | --with-*)
1034    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
1035    # Reject names that are not valid shell variable names.
1036    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
1037      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
1038    fi
1039    ac_package=`echo $ac_package| sed 's/-/_/g'`
1040    case "$ac_option" in
1041      *=*) ;;
1042      *) ac_optarg=yes ;;
1043    esac
1044    eval "with_${ac_package}='$ac_optarg'" ;;
1045
1046  -without-* | --without-*)
1047    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
1048    # Reject names that are not valid shell variable names.
1049    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
1050      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
1051    fi
1052    ac_package=`echo $ac_package| sed 's/-/_/g'`
1053    eval "with_${ac_package}=no" ;;
1054
1055  --x)
1056    # Obsolete; use --with-x.
1057    with_x=yes ;;
1058
1059  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1060  | --x-incl | --x-inc | --x-in | --x-i)
1061    ac_prev=x_includes ;;
1062  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1063  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1064    x_includes="$ac_optarg" ;;
1065
1066  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1067  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1068    ac_prev=x_libraries ;;
1069  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1070  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1071    x_libraries="$ac_optarg" ;;
1072
1073  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
1074    ;;
1075
1076  *)
1077    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
1078      echo "configure: warning: $ac_option: invalid host type" 1>&2
1079    fi
1080    if test "x$nonopt" != xNONE; then
1081      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
1082    fi
1083    nonopt="$ac_option"
1084    ;;
1085
1086  esac
1087done
1088
1089if test -n "$ac_prev"; then
1090  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
1091fi
1092
1093trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1094
1095# File descriptor usage:
1096# 0 standard input
1097# 1 file creation
1098# 2 errors and warnings
1099# 3 some systems may open it to /dev/tty
1100# 4 used on the Kubota Titan
1101# 6 checking for... messages and results
1102# 5 compiler messages saved in config.log
1103if test "$silent" = yes; then
1104  exec 6>/dev/null
1105else
1106  exec 6>&1
1107fi
1108exec 5>./config.log
1109
1110echo "\
1111This file contains any messages produced by compilers while
1112running configure, to aid debugging if configure makes a mistake.
1113" 1>&5
1114
1115# Strip out --no-create and --no-recursion so they do not pile up.
1116# Also quote any args containing shell metacharacters.
1117ac_configure_args=
1118for ac_arg
1119do
1120  case "$ac_arg" in
1121  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1122  | --no-cr | --no-c) ;;
1123  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1124  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1125  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
1126  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1127  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
1128  esac
1129done
1130
1131# NLS nuisances.
1132# Only set these to C if already set.  These must not be set unconditionally
1133# because not all systems understand e.g. LANG=C (notably SCO).
1134# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
1135# Non-C LC_CTYPE values break the ctype check.
1136if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
1137if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
1138if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
1139if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
1140
1141# confdefs.h avoids OS command line length limits that DEFS can exceed.
1142rm -rf conftest* confdefs.h
1143# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1144echo > confdefs.h
1145
1146# A filename unique to this package, relative to the directory that
1147# configure is in, which we can look for to find out if srcdir is correct.
1148ac_unique_file=tcldompro.c
1149
1150# Find the source files, if location was not specified.
1151if test -z "$srcdir"; then
1152  ac_srcdir_defaulted=yes
1153  # Try the directory containing this script, then its parent.
1154  ac_prog=$0
1155  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
1156  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
1157  srcdir=$ac_confdir
1158  if test ! -r $srcdir/$ac_unique_file; then
1159    srcdir=..
1160  fi
1161else
1162  ac_srcdir_defaulted=no
1163fi
1164if test ! -r $srcdir/$ac_unique_file; then
1165  if test "$ac_srcdir_defaulted" = yes; then
1166    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
1167  else
1168    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
1169  fi
1170fi
1171srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
1172
1173# Prefer explicitly selected file to automatically selected ones.
1174if test -z "$CONFIG_SITE"; then
1175  if test "x$prefix" != xNONE; then
1176    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1177  else
1178    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1179  fi
1180fi
1181for ac_site_file in $CONFIG_SITE; do
1182  if test -r "$ac_site_file"; then
1183    echo "loading site script $ac_site_file"
1184    . "$ac_site_file"
1185  fi
1186done
1187
1188if test -r "$cache_file"; then
1189  echo "loading cache $cache_file"
1190  . $cache_file
1191else
1192  echo "creating cache $cache_file"
1193  > $cache_file
1194fi
1195
1196ac_ext=c
1197# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1198ac_cpp='$CPP $CPPFLAGS'
1199ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1200ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1201cross_compiling=$ac_cv_prog_cc_cross
1202
1203ac_exeext=
1204ac_objext=o
1205if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
1206  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
1207  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
1208    ac_n= ac_c='
1209' ac_t='	'
1210  else
1211    ac_n=-n ac_c= ac_t=
1212  fi
1213else
1214  ac_n= ac_c='\c' ac_t=
1215fi
1216
1217
1218
1219# Package identification:
1220#
1221PACKAGE=tcldom
1222MAJOR_VERSION=2
1223MINOR_VERSION=0
1224PATCHLEVEL=1
1225VERSION=${MAJOR_VERSION}.${MINOR_VERSION}
1226NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
1227
1228
1229
1230
1231cat >> confdefs.h <<EOF
1232#define PACKAGE_NAME "${PACKAGE}"
1233EOF
1234
1235cat >> confdefs.h <<EOF
1236#define VERSION "${VERSION}"
1237EOF
1238
1239cat >> confdefs.h <<EOF
1240#define PATCHLEVEL "${PATCHLEVEL}"
1241EOF
1242
1243
1244#
1245# Usual Tcl stuff:
1246#
1247
1248
1249    #
1250    # Ok, lets find the tcl configuration
1251    # First, look for one uninstalled.
1252    # the alternative search directory is invoked by --with-tcl
1253    #
1254
1255    if test x"${no_tcl}" = x ; then
1256	# we reset no_tcl in case something fails here
1257	no_tcl=true
1258	# Check whether --with-tcl or --without-tcl was given.
1259if test "${with_tcl+set}" = set; then
1260  withval="$with_tcl"
1261  with_tclconfig=${withval}
1262fi
1263
1264	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
1265echo "configure:1266: checking for Tcl configuration" >&5
1266	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
1267  echo $ac_n "(cached) $ac_c" 1>&6
1268else
1269  
1270
1271	    # First check to see if --with-tcl was specified.
1272	    if test x"${with_tclconfig}" != x ; then
1273		if test -f "${with_tclconfig}/tclConfig.sh" ; then
1274		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
1275		else
1276		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
1277		fi
1278	    fi
1279
1280	    # then check for a private Tcl installation
1281	    if test x"${ac_cv_c_tclconfig}" = x ; then
1282		for i in \
1283			../tcl \
1284			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
1285			../../tcl \
1286			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
1287			../../../tcl \
1288			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
1289		    if test -f "$i/unix/tclConfig.sh" ; then
1290			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
1291			break
1292		    fi
1293		done
1294	    fi
1295
1296	    # check in a few common install locations
1297	    if test x"${ac_cv_c_tclconfig}" = x ; then
1298		for i in `ls -d ${prefix}/lib 2>/dev/null` \
1299			`ls -d /usr/lib 2>/dev/null` \
1300			`ls -d /usr/local/lib 2>/dev/null` ; do
1301		    if test -f "$i/tclConfig.sh" ; then
1302			ac_cv_c_tclconfig=`(cd $i; pwd)`
1303			break
1304		    fi
1305		done
1306	    fi
1307
1308	    # check in a few other private locations
1309	    if test x"${ac_cv_c_tclconfig}" = x ; then
1310		for i in \
1311			${srcdir}/../tcl \
1312			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
1313		    if test -f "$i/unix/tclConfig.sh" ; then
1314		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
1315		    break
1316		fi
1317		done
1318	    fi
1319	
1320fi
1321
1322
1323	if test x"${ac_cv_c_tclconfig}" = x ; then
1324	    TCL_BIN_DIR="# no Tcl configs found"
1325	    echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
1326	    exit 0
1327	else
1328	    no_tcl=
1329	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
1330	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
1331	fi
1332    fi
1333
1334
1335    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
1336echo "configure:1337: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
1337
1338    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
1339        echo "$ac_t""loading" 1>&6
1340	. $TCL_BIN_DIR/tclConfig.sh
1341    else
1342        echo "$ac_t""file not found" 1>&6
1343    fi
1344
1345    #
1346    # The eval is required to do the TCL_DBGX substitution in the
1347    # TCL_LIB_FILE variable
1348    #
1349
1350    eval TCL_LIB_FILE=${TCL_LIB_FILE}
1351    eval TCL_LIB_FLAG=${TCL_LIB_FLAG}
1352
1353    
1354    
1355    
1356    
1357    
1358    
1359    
1360    
1361    
1362    
1363    
1364    
1365    
1366    
1367    
1368
1369
1370    case "`uname -s`" in
1371	*win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
1372	    CYGPATH="cygpath -w"
1373	;;
1374	*)
1375	    CYGPATH=echo
1376	;;
1377    esac
1378
1379
1380    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
1381echo "configure:1382: checking for Tcl public headers" >&5
1382
1383    # Check whether --with-tclinclude or --without-tclinclude was given.
1384if test "${with_tclinclude+set}" = set; then
1385  withval="$with_tclinclude"
1386  with_tclinclude=${withval}
1387fi
1388
1389
1390    if test x"${with_tclinclude}" != x ; then
1391	if test -f "${with_tclinclude}/tcl.h" ; then
1392	    ac_cv_c_tclh=${with_tclinclude}
1393	else
1394	    { echo "configure: error: ${with_tclinclude} directory does not contain Tcl public header file tcl.h" 1>&2; exit 1; }
1395	fi
1396    else
1397	if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
1398  echo $ac_n "(cached) $ac_c" 1>&6
1399else
1400  
1401	    # Use the value from --with-tclinclude, if it was given
1402
1403	    if test x"${with_tclinclude}" != x ; then
1404		ac_cv_c_tclh=${with_tclinclude}
1405	    else
1406		# Check in the includedir, if --prefix was specified
1407
1408		eval "temp_includedir=${includedir}"
1409		for i in \
1410			`ls -d ${TCL_PREFIX}/include 2>/dev/null` \
1411			`ls -d ${temp_includedir} 2>/dev/null` \
1412			`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
1413			/usr/local/include /usr/include ; do
1414		    if test -f "$i/tcl.h" ; then
1415			ac_cv_c_tclh=$i
1416			break
1417		    fi
1418		done
1419	    fi
1420	
1421fi
1422
1423    fi
1424
1425    # Print a message based on how we determined the include path
1426
1427    if test x"${ac_cv_c_tclh}" = x ; then
1428	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
1429    else
1430	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
1431    fi
1432
1433    # Convert to a native path and substitute into the output files.
1434
1435    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
1436
1437    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
1438
1439    
1440
1441
1442#
1443# Extra libraries needed by this extension:
1444#
1445# Check whether --with-expat or --without-expat was given.
1446if test "${with_expat+set}" = set; then
1447  withval="$with_expat"
1448  expat_withval=$withval
1449else
1450  expat_withval=""
1451fi
1452
1453
1454
1455    echo $ac_n "checking for expat library""... $ac_c" 1>&6
1456echo "configure:1457: checking for expat library" >&5
1457
1458    # Look in exec-prefix and prefix for the library.  If neither of
1459    # these were specified, look in libdir.  It doesn't matter if libdir
1460    # wasn't specified since a search in the unspecified directory will
1461    # fail (NONE/lib)
1462
1463    if test x"${exec_prefix}" != x"NONE" ; then
1464	sc_lib_name_dir="${exec_prefix}/lib"
1465    elif test x"${prefix}" != "NONE" ; then
1466	sc_lib_name_dir="${prefix}/lib"
1467    else
1468	eval "sc_lib_name_dir=${libdir}"
1469    fi
1470
1471    if test x"$expat_withval" != x ; then
1472	sc_extra_lib_dir=$expat_withval
1473    else
1474	sc_extra_lib_dir=NONE
1475    fi
1476
1477    for i in \
1478	    `ls -dr ${sc_extra_lib_dir}/expat[0-9]*.lib 2>/dev/null ` \
1479	    `ls -dr ${sc_extra_lib_dir}/expat.lib 2>/dev/null ` \
1480	    `ls -dr ${sc_extra_lib_dir}/libexpat[0-9]* 2>/dev/null ` \
1481	    `ls -dr ${sc_extra_lib_dir}/libexpat.* 2>/dev/null ` \
1482	    `ls -dr ${sc_lib_name_dir}/expat[0-9]*.lib 2>/dev/null ` \
1483	    `ls -dr ${sc_lib_name_dir}/expat.lib 2>/dev/null ` \
1484	    `ls -dr ${sc_lib_name_dir}/libexpat[0-9]* 2>/dev/null ` \
1485	    `ls -dr ${sc_lib_name_dir}/libexpat.* 2>/dev/null ` \
1486	    `ls -dr /usr/lib/expat[0-9]*.lib 2>/dev/null ` \
1487	    `ls -dr /usr/lib/expat.lib 2>/dev/null ` \
1488	    `ls -dr /usr/lib/libexpat[0-9]* 2>/dev/null ` \
1489	    `ls -dr /usr/lib/libexpat.* 2>/dev/null ` \
1490	    `ls -dr /usr/local/lib/expat[0-9]*.lib 2>/dev/null ` \
1491	    `ls -dr /usr/local/lib/expat.lib 2>/dev/null ` \
1492	    `ls -dr /usr/local/lib/libexpat[0-9]* 2>/dev/null ` \
1493	    `ls -dr /usr/local/lib/libexpat.* 2>/dev/null ` ; do
1494	if test -f "$i" ; then
1495
1496	    sc_lib_name_dir=`dirname $i`
1497	    expat_LIB_NAME=`basename $i`
1498	    expat_LIB_PATH_NAME=$i
1499	    break
1500	fi
1501    done
1502
1503    case "`uname -s`" in
1504	*win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*)
1505	    expat_LIB_SPEC=\"`${CYGPATH} ${expat_LIB_PATH_NAME}`\"
1506	    ;;
1507	*)
1508	    # Strip off the leading "lib" and trailing ".a" or ".so"
1509
1510	    sc_lib_name_lib=`echo ${expat_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[^.]*$//' -e 's/\.so.*//'`
1511	    expat_LIB_SPEC="-L${sc_lib_name_dir} -l${sc_lib_name_lib}"
1512	    ;;
1513    esac
1514
1515    if test "x${expat_LIB_NAME}" = x ; then
1516	{ echo "configure: error: not found" 1>&2; exit 1; }
1517    else
1518	echo "$ac_t""${expat_LIB_SPEC}" 1>&6
1519    fi
1520
1521# SC_LIB_SPEC macro partially broken:
1522if test x$expat_LIB_NAME = x ; then
1523    echo "configure: warning: Can't seem to find it -- punting" 1>&2
1524    expat_LIB_SPEC="-lexpat"
1525fi
1526expat_LIB_PATH=`dirname $expat_LIB_PATH_NAME`
1527
1528
1529
1530
1531# Programs we need:
1532#
1533# Extract the first word of "gcc", so it can be a program name with args.
1534set dummy gcc; ac_word=$2
1535echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1536echo "configure:1537: checking for $ac_word" >&5
1537if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1538  echo $ac_n "(cached) $ac_c" 1>&6
1539else
1540  if test -n "$CC"; then
1541  ac_cv_prog_CC="$CC" # Let the user override the test.
1542else
1543  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1544  ac_dummy="$PATH"
1545  for ac_dir in $ac_dummy; do
1546    test -z "$ac_dir" && ac_dir=.
1547    if test -f $ac_dir/$ac_word; then
1548      ac_cv_prog_CC="gcc"
1549      break
1550    fi
1551  done
1552  IFS="$ac_save_ifs"
1553fi
1554fi
1555CC="$ac_cv_prog_CC"
1556if test -n "$CC"; then
1557  echo "$ac_t""$CC" 1>&6
1558else
1559  echo "$ac_t""no" 1>&6
1560fi
1561
1562if test -z "$CC"; then
1563  # Extract the first word of "cc", so it can be a program name with args.
1564set dummy cc; ac_word=$2
1565echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1566echo "configure:1567: checking for $ac_word" >&5
1567if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1568  echo $ac_n "(cached) $ac_c" 1>&6
1569else
1570  if test -n "$CC"; then
1571  ac_cv_prog_CC="$CC" # Let the user override the test.
1572else
1573  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1574  ac_prog_rejected=no
1575  ac_dummy="$PATH"
1576  for ac_dir in $ac_dummy; do
1577    test -z "$ac_dir" && ac_dir=.
1578    if test -f $ac_dir/$ac_word; then
1579      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1580        ac_prog_rejected=yes
1581	continue
1582      fi
1583      ac_cv_prog_CC="cc"
1584      break
1585    fi
1586  done
1587  IFS="$ac_save_ifs"
1588if test $ac_prog_rejected = yes; then
1589  # We found a bogon in the path, so make sure we never use it.
1590  set dummy $ac_cv_prog_CC
1591  shift
1592  if test $# -gt 0; then
1593    # We chose a different compiler from the bogus one.
1594    # However, it has the same basename, so the bogon will be chosen
1595    # first if we set CC to just the basename; use the full file name.
1596    shift
1597    set dummy "$ac_dir/$ac_word" "$@"
1598    shift
1599    ac_cv_prog_CC="$@"
1600  fi
1601fi
1602fi
1603fi
1604CC="$ac_cv_prog_CC"
1605if test -n "$CC"; then
1606  echo "$ac_t""$CC" 1>&6
1607else
1608  echo "$ac_t""no" 1>&6
1609fi
1610
1611  if test -z "$CC"; then
1612    case "`uname -s`" in
1613    *win32* | *WIN32*)
1614      # Extract the first word of "cl", so it can be a program name with args.
1615set dummy cl; ac_word=$2
1616echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1617echo "configure:1618: checking for $ac_word" >&5
1618if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1619  echo $ac_n "(cached) $ac_c" 1>&6
1620else
1621  if test -n "$CC"; then
1622  ac_cv_prog_CC="$CC" # Let the user override the test.
1623else
1624  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1625  ac_dummy="$PATH"
1626  for ac_dir in $ac_dummy; do
1627    test -z "$ac_dir" && ac_dir=.
1628    if test -f $ac_dir/$ac_word; then
1629      ac_cv_prog_CC="cl"
1630      break
1631    fi
1632  done
1633  IFS="$ac_save_ifs"
1634fi
1635fi
1636CC="$ac_cv_prog_CC"
1637if test -n "$CC"; then
1638  echo "$ac_t""$CC" 1>&6
1639else
1640  echo "$ac_t""no" 1>&6
1641fi
1642 ;;
1643    esac
1644  fi
1645  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1646fi
1647
1648echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1649echo "configure:1650: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1650
1651ac_ext=c
1652# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1653ac_cpp='$CPP $CPPFLAGS'
1654ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1655ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1656cross_compiling=$ac_cv_prog_cc_cross
1657
1658cat > conftest.$ac_ext << EOF
1659
1660#line 1661 "configure"
1661#include "confdefs.h"
1662
1663main(){return(0);}
1664EOF
1665if { (eval echo configure:1666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1666  ac_cv_prog_cc_works=yes
1667  # If we can't run a trivial program, we are probably using a cross compiler.
1668  if (./conftest; exit) 2>/dev/null; then
1669    ac_cv_prog_cc_cross=no
1670  else
1671    ac_cv_prog_cc_cross=yes
1672  fi
1673else
1674  echo "configure: failed program was:" >&5
1675  cat conftest.$ac_ext >&5
1676  ac_cv_prog_cc_works=no
1677fi
1678rm -fr conftest*
1679ac_ext=c
1680# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1681ac_cpp='$CPP $CPPFLAGS'
1682ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1683ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1684cross_compiling=$ac_cv_prog_cc_cross
1685
1686echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1687if test $ac_cv_prog_cc_works = no; then
1688  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1689fi
1690echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1691echo "configure:1692: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1692echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1693cross_compiling=$ac_cv_prog_cc_cross
1694
1695echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1696echo "configure:1697: checking whether we are using GNU C" >&5
1697if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1698  echo $ac_n "(cached) $ac_c" 1>&6
1699else
1700  cat > conftest.c <<EOF
1701#ifdef __GNUC__
1702  yes;
1703#endif
1704EOF
1705if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1706  ac_cv_prog_gcc=yes
1707else
1708  ac_cv_prog_gcc=no
1709fi
1710fi
1711
1712echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1713
1714if test $ac_cv_prog_gcc = yes; then
1715  GCC=yes
1716else
1717  GCC=
1718fi
1719
1720ac_test_CFLAGS="${CFLAGS+set}"
1721ac_save_CFLAGS="$CFLAGS"
1722CFLAGS=
1723echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1724echo "configure:1725: checking whether ${CC-cc} accepts -g" >&5
1725if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1726  echo $ac_n "(cached) $ac_c" 1>&6
1727else
1728  echo 'void f(){}' > conftest.c
1729if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1730  ac_cv_prog_cc_g=yes
1731else
1732  ac_cv_prog_cc_g=no
1733fi
1734rm -f conftest*
1735
1736fi
1737
1738echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1739if test "$ac_test_CFLAGS" = set; then
1740  CFLAGS="$ac_save_CFLAGS"
1741elif test $ac_cv_prog_cc_g = yes; then
1742  if test "$GCC" = yes; then
1743    CFLAGS="-g -O2"
1744  else
1745    CFLAGS="-g"
1746  fi
1747else
1748  if test "$GCC" = yes; then
1749    CFLAGS="-O2"
1750  else
1751    CFLAGS=
1752  fi
1753fi
1754
1755# Find a good install program.  We prefer a C program (faster),
1756# so one script is as good as another.  But avoid the broken or
1757# incompatible versions:
1758# SysV /etc/install, /usr/sbin/install
1759# SunOS /usr/etc/install
1760# IRIX /sbin/install
1761# AIX /bin/install
1762# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1763# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1764# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1765# ./install, which can be erroneously created by make from ./install.sh.
1766echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1767echo "configure:1768: checking for a BSD compatible install" >&5
1768if test -z "$INSTALL"; then
1769if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1770  echo $ac_n "(cached) $ac_c" 1>&6
1771else
1772    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
1773  for ac_dir in $PATH; do
1774    # Account for people who put trailing slashes in PATH elements.
1775    case "$ac_dir/" in
1776    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1777    *)
1778      # OSF1 and SCO ODT 3.0 have their own names for install.
1779      # Don't use installbsd from OSF since it installs stuff as root
1780      # by default.
1781      for ac_prog in ginstall scoinst install; do
1782        if test -f $ac_dir/$ac_prog; then
1783	  if test $ac_prog = install &&
1784            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1785	    # AIX install.  It has an incompatible calling convention.
1786	    :
1787	  else
1788	    ac_cv_path_install="$ac_dir/$ac_prog -c"
1789	    break 2
1790	  fi
1791	fi
1792      done
1793      ;;
1794    esac
1795  done
1796  IFS="$ac_save_IFS"
1797
1798fi
1799  if test "${ac_cv_path_install+set}" = set; then
1800    INSTALL="$ac_cv_path_install"
1801  else
1802    # As a last resort, use the slow shell script.  We don't cache a
1803    # path for INSTALL within a source directory, because that will
1804    # break other packages using the cache if that directory is
1805    # removed, or if the path is relative.
1806    INSTALL="$ac_install_sh"
1807  fi
1808fi
1809echo "$ac_t""$INSTALL" 1>&6
1810
1811# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1812# It thinks the first close brace ends the variable substitution.
1813test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1814
1815test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1816
1817test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1818
1819echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1820echo "configure:1821: checking for Cygwin environment" >&5
1821if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1822  echo $ac_n "(cached) $ac_c" 1>&6
1823else
1824  cat > conftest.$ac_ext <<EOF
1825#line 1826 "configure"
1826#include "confdefs.h"
1827
1828int main() {
1829
1830#ifndef __CYGWIN__
1831#define __CYGWIN__ __CYGWIN32__
1832#endif
1833return __CYGWIN__;
1834; return 0; }
1835EOF
1836if { (eval echo configure:1837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1837  rm -rf conftest*
1838  ac_cv_cygwin=yes
1839else
1840  echo "configure: failed program was:" >&5
1841  cat conftest.$ac_ext >&5
1842  rm -rf conftest*
1843  ac_cv_cygwin=no
1844fi
1845rm -f conftest*
1846rm -f conftest*
1847fi
1848
1849echo "$ac_t""$ac_cv_cygwin" 1>&6
1850CYGWIN=
1851test "$ac_cv_cygwin" = yes && CYGWIN=yes
1852echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1853echo "configure:1854: checking for object suffix" >&5
1854if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1855  echo $ac_n "(cached) $ac_c" 1>&6
1856else
1857  rm -f conftest*
1858echo 'int i = 1;' > conftest.$ac_ext
1859if { (eval echo configure:1860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1860  for ac_file in conftest.*; do
1861    case $ac_file in
1862    *.c) ;;
1863    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1864    esac
1865  done
1866else
1867  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1868fi
1869rm -f conftest*
1870fi
1871
1872echo "$ac_t""$ac_cv_objext" 1>&6
1873OBJEXT=$ac_cv_objext
1874ac_objext=$ac_cv_objext
1875
1876echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1877echo "configure:1878: checking for mingw32 environment" >&5
1878if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1879  echo $ac_n "(cached) $ac_c" 1>&6
1880else
1881  cat > conftest.$ac_ext <<EOF
1882#line 1883 "configure"
1883#include "confdefs.h"
1884
1885int main() {
1886return __MINGW32__;
1887; return 0; }
1888EOF
1889if { (eval echo configure:1890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1890  rm -rf conftest*
1891  ac_cv_mingw32=yes
1892else
1893  echo "configure: failed program was:" >&5
1894  cat conftest.$ac_ext >&5
1895  rm -rf conftest*
1896  ac_cv_mingw32=no
1897fi
1898rm -f conftest*
1899rm -f conftest*
1900fi
1901
1902echo "$ac_t""$ac_cv_mingw32" 1>&6
1903MINGW32=
1904test "$ac_cv_mingw32" = yes && MINGW32=yes
1905
1906
1907echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1908echo "configure:1909: checking for executable suffix" >&5
1909if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1910  echo $ac_n "(cached) $ac_c" 1>&6
1911else
1912  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1913  ac_cv_exeext=.exe
1914else
1915  rm -f conftest*
1916  echo 'int main () { return 0; }' > conftest.$ac_ext
1917  ac_cv_exeext=
1918  if { (eval echo configure:1919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1919    for file in conftest.*; do
1920      case $file in
1921      *.c | *.o | *.obj) ;;
1922      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1923      esac
1924    done
1925  else
1926    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1927  fi
1928  rm -f conftest*
1929  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1930fi
1931fi
1932
1933EXEEXT=""
1934test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1935echo "$ac_t""${ac_cv_exeext}" 1>&6
1936ac_exeext=$EXEEXT
1937
1938
1939
1940    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
1941echo "configure:1942: checking for tclsh" >&5
1942
1943    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
1944  echo $ac_n "(cached) $ac_c" 1>&6
1945else
1946  
1947	search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'`
1948	for dir in $search_path ; do
1949	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
1950		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
1951		if test x"$ac_cv_path_tclsh" = x ; then
1952		    if test -f "$j" ; then
1953			ac_cv_path_tclsh=$j
1954			break
1955		    fi
1956		fi
1957	    done
1958	done
1959    
1960fi
1961
1962
1963    if test -f "$ac_cv_path_tclsh" ; then
1964	TCLSH_PROG=$ac_cv_path_tclsh
1965	echo "$ac_t""$TCLSH_PROG" 1>&6
1966    else
1967	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
1968    fi
1969    
1970
1971
1972#
1973# Windows/Unix compatibility tests:  @@
1974#
1975case "`uname -s`" in
1976    *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
1977	WINDOWS="yes"
1978    ;;
1979    *)
1980	WINDOWS="no"
1981    ;;
1982esac
1983
1984if test "$WINDOWS" = "yes" ; then
1985    cat >> confdefs.h <<EOF
1986#define BUILD_${PACKAGE} 1
1987EOF
1988
1989    CONFIG_CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch"
1990else
1991    CONFIG_CLEANFILES=
1992fi
1993
1994
1995#--------------------------------------------------------------------
1996
1997SHLIB_LD=${TCL_SHLIB_LD}
1998STLIB_LD=${TCL_STLIB_LD}
1999SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
2000
2001CFLAGS_WARNING=${TCL_CFLAGS_WARNING}
2002CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
2003CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
2004
2005cat >> confdefs.h <<\EOF
2006#define USE_TCL_STUBS 1
2007EOF
2008
2009
2010
2011
2012
2013
2014
2015
2016    case "`uname -s`" in
2017	*win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*)
2018	    tcl_dbgx=d
2019	;;
2020	*)
2021	    tcl_dbgx=g
2022	;;
2023    esac
2024
2025    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
2026echo "configure:2027: checking for build with symbols" >&5
2027    # Check whether --enable-symbols or --disable-symbols was given.
2028if test "${enable_symbols+set}" = set; then
2029  enableval="$enable_symbols"
2030  tcl_ok=$enableval
2031else
2032  tcl_ok=no
2033fi
2034
2035    if test "$tcl_ok" = "yes"; then
2036	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
2037	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
2038	DBGX=${tcl_dbgx}
2039	TCL_DBGX=${tcl_dbgx}
2040	echo "$ac_t""yes" 1>&6
2041    else
2042	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
2043	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
2044	DBGX=""
2045	TCL_DBGX=""
2046	echo "$ac_t""no" 1>&6
2047    fi
2048
2049    
2050    
2051    
2052
2053
2054
2055
2056
2057#
2058# Shared / static build gubbage: @@
2059#
2060
2061    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
2062echo "configure:2063: checking how to build libraries" >&5
2063    # Check whether --enable-shared or --disable-shared was given.
2064if test "${enable_shared+set}" = set; then
2065  enableval="$enable_shared"
2066  tcl_ok=$enableval
2067else
2068  tcl_ok=yes
2069fi
2070
2071
2072    if test "${enable_shared+set}" = set; then
2073	enableval="$enable_shared"
2074	tcl_ok=$enableval
2075    else
2076	tcl_ok=yes
2077    fi
2078
2079    if test "$tcl_ok" = "yes" ; then
2080	echo "$ac_t""shared" 1>&6
2081	SHARED_BUILD=1
2082    else
2083	echo "$ac_t""static" 1>&6
2084	SHARED_BUILD=0
2085	cat >> confdefs.h <<\EOF
2086#define STATIC_BUILD 1
2087EOF
2088
2089    fi
2090
2091
2092if test "${SHARED_BUILD}" = "1" ; then
2093    CFLAGS='${CFLAGS_DEFAULT} ${SHLIB_CFLAGS}'
2094else
2095    CFLAGS='${CFLAGS_DEFAULT}'
2096fi
2097eval "SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
2098eval "UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
2099
2100if test "$WINDOWS" = "yes" ; then
2101    if test "${SHARED_BUILD}" = "1" ; then
2102	SHLIB_LD_LIBS="\"`cygpath -w ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\" ${TCL_SHLIB_LD_LIBS}"
2103	eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
2104	RANLIB=:
2105    else
2106	eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
2107    fi
2108else
2109    if test "${SHARED_BUILD}" = "1" ; then
2110	SHLIB_LD_LIBS="${TCL_STUB_LIB_SPEC}"
2111	eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
2112	RANLIB=:
2113    else
2114	eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
2115    fi
2116fi
2117
2118
2119
2120
2121CONFIGURE_OUTPUTS="Makefile pkgIndex.tcl config.cache config.log config.status"
2122
2123
2124trap '' 1 2 15
2125cat > confcache <<\EOF
2126# This file is a shell script that caches the results of configure
2127# tests run on this system so they can be shared between configure
2128# scripts and configure runs.  It is not useful on other systems.
2129# If it contains results you don't want to keep, you may remove or edit it.
2130#
2131# By default, configure uses ./config.cache as the cache file,
2132# creating it if it does not exist already.  You can give configure
2133# the --cache-file=FILE option to use a different cache file; that is
2134# what configure does when it calls configure scripts in
2135# subdirectories, so they share the cache.
2136# Giving --cache-file=/dev/null disables caching, for debugging configure.
2137# config.status only pays attention to the cache file if you give it the
2138# --recheck option to rerun configure.
2139#
2140EOF
2141# The following way of writing the cache mishandles newlines in values,
2142# but we know of no workaround that is simple, portable, and efficient.
2143# So, don't put newlines in cache variables' values.
2144# Ultrix sh set writes to stderr and can't be redirected directly,
2145# and sets the high bit in the cache file unless we assign to the vars.
2146(set) 2>&1 |
2147  case `(ac_space=' '; set | grep ac_space) 2>&1` in
2148  *ac_space=\ *)
2149    # `set' does not quote correctly, so add quotes (double-quote substitution
2150    # turns \\\\ into \\, and sed turns \\ into \).
2151    sed -n \
2152      -e "s/'/'\\\\''/g" \
2153      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2154    ;;
2155  *)
2156    # `set' quotes correctly as required by POSIX, so do not add quotes.
2157    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2158    ;;
2159  esac >> confcache
2160if cmp -s $cache_file confcache; then
2161  :
2162else
2163  if test -w $cache_file; then
2164    echo "updating cache $cache_file"
2165    cat confcache > $cache_file
2166  else
2167    echo "not updating unwritable cache $cache_file"
2168  fi
2169fi
2170rm -f confcache
2171
2172trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2173
2174test "x$prefix" = xNONE && prefix=$ac_default_prefix
2175# Let make expand exec_prefix.
2176test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2177
2178# Any assignment to VPATH causes Sun make to only execute
2179# the first set of double-colon rules, so remove it if not needed.
2180# If there is a colon in the path, we need to keep it.
2181if test "x$srcdir" = x.; then
2182  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
2183fi
2184
2185trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2186
2187# Transform confdefs.h into DEFS.
2188# Protect against shell expansion while executing Makefile rules.
2189# Protect against Makefile macro expansion.
2190cat > conftest.defs <<\EOF
2191s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2192s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
2193s%\[%\\&%g
2194s%\]%\\&%g
2195s%\$%$$%g
2196EOF
2197DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2198rm -f conftest.defs
2199
2200
2201# Without the "./", some shells look in PATH for config.status.
2202: ${CONFIG_STATUS=./config.status}
2203
2204echo creating $CONFIG_STATUS
2205rm -f $CONFIG_STATUS
2206cat > $CONFIG_STATUS <<EOF
2207#! /bin/sh
2208# Generated automatically by configure.
2209# Run this file to recreate the current configuration.
2210# This directory was configured as follows,
2211# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2212#
2213# $0 $ac_configure_args
2214#
2215# Compiler output produced by configure, useful for debugging
2216# configure, is in ./config.log if it exists.
2217
2218ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2219for ac_option
2220do
2221  case "\$ac_option" in
2222  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2223    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2224    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2225  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2226    echo "$CONFIG_STATUS generated by autoconf version 2.13"
2227    exit 0 ;;
2228  -help | --help | --hel | --he | --h)
2229    echo "\$ac_cs_usage"; exit 0 ;;
2230  *) echo "\$ac_cs_usage"; exit 1 ;;
2231  esac
2232done
2233
2234ac_given_srcdir=$srcdir
2235ac_given_INSTALL="$INSTALL"
2236
2237trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2238EOF
2239cat >> $CONFIG_STATUS <<EOF
2240
2241# Protect against being on the right side of a sed subst in config.status.
2242sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2243 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2244$ac_vpsub
2245$extrasub
2246s%@CONFIGDIR@%$CONFIGDIR%g
2247s%@SHELL@%$SHELL%g
2248s%@CFLAGS@%$CFLAGS%g
2249s%@CPPFLAGS@%$CPPFLAGS%g
2250s%@CXXFLAGS@%$CXXFLAGS%g
2251s%@FFLAGS@%$FFLAGS%g
2252s%@DEFS@%$DEFS%g
2253s%@LDFLAGS@%$LDFLAGS%g
2254s%@LIBS@%$LIBS%g
2255s%@exec_prefix@%$exec_prefix%g
2256s%@prefix@%$prefix%g
2257s%@program_transform_name@%$program_transform_name%g
2258s%@bindir@%$bindir%g
2259s%@sbindir@%$sbindir%g
2260s%@libexecdir@%$libexecdir%g
2261s%@datadir@%$datadir%g
2262s%@sysconfdir@%$sysconfdir%g
2263s%@sharedstatedir@%$sharedstatedir%g
2264s%@localstatedir@%$localstatedir%g
2265s%@libdir@%$libdir%g
2266s%@includedir@%$includedir%g
2267s%@oldincludedir@%$oldincludedir%g
2268s%@infodir@%$infodir%g
2269s%@mandir@%$mandir%g
2270s%@PACKAGE@%$PACKAGE%g
2271s%@VERSION@%$VERSION%g
2272s%@PATCHLEVEL@%$PATCHLEVEL%g
2273s%@TCL_DBGX@%$TCL_DBGX%g
2274s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
2275s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
2276s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
2277s%@TCL_LIBS@%$TCL_LIBS%g
2278s%@TCL_DEFS@%$TCL_DEFS%g
2279s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
2280s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
2281s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
2282s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
2283s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
2284s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
2285s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
2286s%@TCL_BUILD_STUB_LIB_SPEC@%$TCL_BUILD_STUB_LIB_SPEC%g
2287s%@TCL_INCLUDES@%$TCL_INCLUDES%g
2288s%@expat_LIB_SPEC@%$expat_LIB_SPEC%g
2289s%@expat_LIB_PATH@%$expat_LIB_PATH%g
2290s%@CC@%$CC%g
2291s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2292s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2293s%@INSTALL_DATA@%$INSTALL_DATA%g
2294s%@OBJEXT@%$OBJEXT%g
2295s%@EXEEXT@%$EXEEXT%g
2296s%@TCLSH_PROG@%$TCLSH_PROG%g
2297s%@CONFIG_CLEANFILES@%$CONFIG_CLEANFILES%g
2298s%@SHLIB_LD@%$SHLIB_LD%g
2299s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
2300s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
2301s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
2302s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
2303s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
2304s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
2305s%@tcldom_LIB_FILE@%$tcldom_LIB_FILE%g
2306s%@CONFIGURE_OUTPUTS@%$CONFIGURE_OUTPUTS%g
2307
2308CEOF
2309EOF
2310
2311cat >> $CONFIG_STATUS <<\EOF
2312
2313# Split the substitutions into bite-sized pieces for seds with
2314# small command number limits, like on Digital OSF/1 and HP-UX.
2315ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2316ac_file=1 # Number of current file.
2317ac_beg=1 # First line for current file.
2318ac_end=$ac_max_sed_cmds # Line after last line for current file.
2319ac_more_lines=:
2320ac_sed_cmds=""
2321while $ac_more_lines; do
2322  if test $ac_beg -gt 1; then
2323    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2324  else
2325    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2326  fi
2327  if test ! -s conftest.s$ac_file; then
2328    ac_more_lines=false
2329    rm -f conftest.s$ac_file
2330  else
2331    if test -z "$ac_sed_cmds"; then
2332      ac_sed_cmds="sed -f conftest.s$ac_file"
2333    else
2334      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2335    fi
2336    ac_file=`expr $ac_file + 1`
2337    ac_beg=$ac_end
2338    ac_end=`expr $ac_end + $ac_max_sed_cmds`
2339  fi
2340done
2341if test -z "$ac_sed_cmds"; then
2342  ac_sed_cmds=cat
2343fi
2344EOF
2345
2346cat >> $CONFIG_STATUS <<EOF
2347
2348CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
2349EOF
2350cat >> $CONFIG_STATUS <<\EOF
2351for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2352  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2353  case "$ac_file" in
2354  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2355       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2356  *) ac_file_in="${ac_file}.in" ;;
2357  esac
2358
2359  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2360
2361  # Remove last slash and all that follows it.  Not all systems have dirname.
2362  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2363  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2364    # The file is in a subdirectory.
2365    test ! -d "$ac_dir" && mkdir "$ac_dir"
2366    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2367    # A "../" for each directory in $ac_dir_suffix.
2368    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2369  else
2370    ac_dir_suffix= ac_dots=
2371  fi
2372
2373  case "$ac_given_srcdir" in
2374  .)  srcdir=.
2375      if test -z "$ac_dots"; then top_srcdir=.
2376      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2377  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2378  *) # Relative path.
2379    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2380    top_srcdir="$ac_dots$ac_given_srcdir" ;;
2381  esac
2382
2383  case "$ac_given_INSTALL" in
2384  [/$]*) INSTALL="$ac_given_INSTALL" ;;
2385  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2386  esac
2387
2388  echo creating "$ac_file"
2389  rm -f "$ac_file"
2390  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2391  case "$ac_file" in
2392  *Makefile*) ac_comsub="1i\\
2393# $configure_input" ;;
2394  *) ac_comsub= ;;
2395  esac
2396
2397  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2398  sed -e "$ac_comsub
2399s%@configure_input@%$configure_input%g
2400s%@srcdir@%$srcdir%g
2401s%@top_srcdir@%$top_srcdir%g
2402s%@INSTALL@%$INSTALL%g
2403" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2404fi; done
2405rm -f conftest.s*
2406
2407EOF
2408cat >> $CONFIG_STATUS <<EOF
2409
2410EOF
2411cat >> $CONFIG_STATUS <<\EOF
2412
2413exit 0
2414EOF
2415chmod +x $CONFIG_STATUS
2416rm -fr confdefs* $ac_clean_files
2417test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2418
2419
2420#*EOF*
2421