1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13 
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15  --enable-threads        build with threads"
16ac_help="$ac_help
17  --enable-shared         build and link with shared libraries [--enable-shared]"
18ac_help="$ac_help
19  --enable-64bit          enable 64bit support (where applicable = amd64|ia64)"
20ac_help="$ac_help
21  --enable-symbols        build with debugging symbols [--disable-symbols]"
22
23# Initialize some variables set by options.
24# The variables have the same names as the options, with
25# dashes changed to underlines.
26build=NONE
27cache_file=./config.cache
28exec_prefix=NONE
29host=NONE
30no_create=
31nonopt=NONE
32no_recursion=
33prefix=NONE
34program_prefix=NONE
35program_suffix=NONE
36program_transform_name=s,x,x,
37silent=
38site=
39srcdir=
40target=NONE
41verbose=
42x_includes=NONE
43x_libraries=NONE
44bindir='${exec_prefix}/bin'
45sbindir='${exec_prefix}/sbin'
46libexecdir='${exec_prefix}/libexec'
47datadir='${prefix}/share'
48sysconfdir='${prefix}/etc'
49sharedstatedir='${prefix}/com'
50localstatedir='${prefix}/var'
51libdir='${exec_prefix}/lib'
52includedir='${prefix}/include'
53oldincludedir='/usr/include'
54infodir='${prefix}/info'
55mandir='${prefix}/man'
56
57# Initialize some other variables.
58subdirs=
59MFLAGS= MAKEFLAGS=
60SHELL=${CONFIG_SHELL-/bin/sh}
61# Maximum number of lines to put in a shell here document.
62ac_max_here_lines=12
63
64ac_prev=
65for ac_option
66do
67
68  # If the previous option needs an argument, assign it.
69  if test -n "$ac_prev"; then
70    eval "$ac_prev=\$ac_option"
71    ac_prev=
72    continue
73  fi
74
75  case "$ac_option" in
76  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
77  *) ac_optarg= ;;
78  esac
79
80  # Accept the important Cygnus configure options, so we can diagnose typos.
81
82  case "$ac_option" in
83
84  -bindir | --bindir | --bindi | --bind | --bin | --bi)
85    ac_prev=bindir ;;
86  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
87    bindir="$ac_optarg" ;;
88
89  -build | --build | --buil | --bui | --bu)
90    ac_prev=build ;;
91  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
92    build="$ac_optarg" ;;
93
94  -cache-file | --cache-file | --cache-fil | --cache-fi \
95  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
96    ac_prev=cache_file ;;
97  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
98  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
99    cache_file="$ac_optarg" ;;
100
101  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
102    ac_prev=datadir ;;
103  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
104  | --da=*)
105    datadir="$ac_optarg" ;;
106
107  -disable-* | --disable-*)
108    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
109    # Reject names that are not valid shell variable names.
110    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
111      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
112    fi
113    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
114    eval "enable_${ac_feature}=no" ;;
115
116  -enable-* | --enable-*)
117    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
118    # Reject names that are not valid shell variable names.
119    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
120      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
121    fi
122    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
123    case "$ac_option" in
124      *=*) ;;
125      *) ac_optarg=yes ;;
126    esac
127    eval "enable_${ac_feature}='$ac_optarg'" ;;
128
129  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
130  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
131  | --exec | --exe | --ex)
132    ac_prev=exec_prefix ;;
133  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
134  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
135  | --exec=* | --exe=* | --ex=*)
136    exec_prefix="$ac_optarg" ;;
137
138  -gas | --gas | --ga | --g)
139    # Obsolete; use --with-gas.
140    with_gas=yes ;;
141
142  -help | --help | --hel | --he)
143    # Omit some internal or obsolete options to make the list less imposing.
144    # This message is too long to be a string in the A/UX 3.1 sh.
145    cat << EOF
146Usage: configure [options] [host]
147Options: [defaults in brackets after descriptions]
148Configuration:
149  --cache-file=FILE       cache test results in FILE
150  --help                  print this message
151  --no-create             do not create output files
152  --quiet, --silent       do not print \`checking...' messages
153  --version               print the version of autoconf that created configure
154Directory and file names:
155  --prefix=PREFIX         install architecture-independent files in PREFIX
156                          [$ac_default_prefix]
157  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
158                          [same as prefix]
159  --bindir=DIR            user executables in DIR [EPREFIX/bin]
160  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
161  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
162  --datadir=DIR           read-only architecture-independent data in DIR
163                          [PREFIX/share]
164  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
165  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
166                          [PREFIX/com]
167  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
168  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
169  --includedir=DIR        C header files in DIR [PREFIX/include]
170  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
171  --infodir=DIR           info documentation in DIR [PREFIX/info]
172  --mandir=DIR            man documentation in DIR [PREFIX/man]
173  --srcdir=DIR            find the sources in DIR [configure dir or ..]
174  --program-prefix=PREFIX prepend PREFIX to installed program names
175  --program-suffix=SUFFIX append SUFFIX to installed program names
176  --program-transform-name=PROGRAM
177                          run sed PROGRAM on installed program names
178EOF
179    cat << EOF
180Host type:
181  --build=BUILD           configure for building on BUILD [BUILD=HOST]
182  --host=HOST             configure for HOST [guessed]
183  --target=TARGET         configure for TARGET [TARGET=HOST]
184Features and packages:
185  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
186  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
187  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
188  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
189  --x-includes=DIR        X include files are in DIR
190  --x-libraries=DIR       X library files are in DIR
191EOF
192    if test -n "$ac_help"; then
193      echo "--enable and --with options recognized:$ac_help"
194    fi
195    exit 0 ;;
196
197  -host | --host | --hos | --ho)
198    ac_prev=host ;;
199  -host=* | --host=* | --hos=* | --ho=*)
200    host="$ac_optarg" ;;
201
202  -includedir | --includedir | --includedi | --included | --include \
203  | --includ | --inclu | --incl | --inc)
204    ac_prev=includedir ;;
205  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
206  | --includ=* | --inclu=* | --incl=* | --inc=*)
207    includedir="$ac_optarg" ;;
208
209  -infodir | --infodir | --infodi | --infod | --info | --inf)
210    ac_prev=infodir ;;
211  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
212    infodir="$ac_optarg" ;;
213
214  -libdir | --libdir | --libdi | --libd)
215    ac_prev=libdir ;;
216  -libdir=* | --libdir=* | --libdi=* | --libd=*)
217    libdir="$ac_optarg" ;;
218
219  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
220  | --libexe | --libex | --libe)
221    ac_prev=libexecdir ;;
222  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
223  | --libexe=* | --libex=* | --libe=*)
224    libexecdir="$ac_optarg" ;;
225
226  -localstatedir | --localstatedir | --localstatedi | --localstated \
227  | --localstate | --localstat | --localsta | --localst \
228  | --locals | --local | --loca | --loc | --lo)
229    ac_prev=localstatedir ;;
230  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
231  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
232  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
233    localstatedir="$ac_optarg" ;;
234
235  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
236    ac_prev=mandir ;;
237  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
238    mandir="$ac_optarg" ;;
239
240  -nfp | --nfp | --nf)
241    # Obsolete; use --without-fp.
242    with_fp=no ;;
243
244  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
245  | --no-cr | --no-c)
246    no_create=yes ;;
247
248  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
249  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
250    no_recursion=yes ;;
251
252  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
253  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
254  | --oldin | --oldi | --old | --ol | --o)
255    ac_prev=oldincludedir ;;
256  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
257  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
258  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
259    oldincludedir="$ac_optarg" ;;
260
261  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
262    ac_prev=prefix ;;
263  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
264    prefix="$ac_optarg" ;;
265
266  -program-prefix | --program-prefix | --program-prefi | --program-pref \
267  | --program-pre | --program-pr | --program-p)
268    ac_prev=program_prefix ;;
269  -program-prefix=* | --program-prefix=* | --program-prefi=* \
270  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
271    program_prefix="$ac_optarg" ;;
272
273  -program-suffix | --program-suffix | --program-suffi | --program-suff \
274  | --program-suf | --program-su | --program-s)
275    ac_prev=program_suffix ;;
276  -program-suffix=* | --program-suffix=* | --program-suffi=* \
277  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
278    program_suffix="$ac_optarg" ;;
279
280  -program-transform-name | --program-transform-name \
281  | --program-transform-nam | --program-transform-na \
282  | --program-transform-n | --program-transform- \
283  | --program-transform | --program-transfor \
284  | --program-transfo | --program-transf \
285  | --program-trans | --program-tran \
286  | --progr-tra | --program-tr | --program-t)
287    ac_prev=program_transform_name ;;
288  -program-transform-name=* | --program-transform-name=* \
289  | --program-transform-nam=* | --program-transform-na=* \
290  | --program-transform-n=* | --program-transform-=* \
291  | --program-transform=* | --program-transfor=* \
292  | --program-transfo=* | --program-transf=* \
293  | --program-trans=* | --program-tran=* \
294  | --progr-tra=* | --program-tr=* | --program-t=*)
295    program_transform_name="$ac_optarg" ;;
296
297  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
298  | -silent | --silent | --silen | --sile | --sil)
299    silent=yes ;;
300
301  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
302    ac_prev=sbindir ;;
303  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
304  | --sbi=* | --sb=*)
305    sbindir="$ac_optarg" ;;
306
307  -sharedstatedir | --sharedstatedir | --sharedstatedi \
308  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
309  | --sharedst | --shareds | --shared | --share | --shar \
310  | --sha | --sh)
311    ac_prev=sharedstatedir ;;
312  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
313  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
314  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
315  | --sha=* | --sh=*)
316    sharedstatedir="$ac_optarg" ;;
317
318  -site | --site | --sit)
319    ac_prev=site ;;
320  -site=* | --site=* | --sit=*)
321    site="$ac_optarg" ;;
322
323  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
324    ac_prev=srcdir ;;
325  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
326    srcdir="$ac_optarg" ;;
327
328  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
329  | --syscon | --sysco | --sysc | --sys | --sy)
330    ac_prev=sysconfdir ;;
331  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
332  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
333    sysconfdir="$ac_optarg" ;;
334
335  -target | --target | --targe | --targ | --tar | --ta | --t)
336    ac_prev=target ;;
337  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
338    target="$ac_optarg" ;;
339
340  -v | -verbose | --verbose | --verbos | --verbo | --verb)
341    verbose=yes ;;
342
343  -version | --version | --versio | --versi | --vers)
344    echo "configure generated by autoconf version 2.13"
345    exit 0 ;;
346
347  -with-* | --with-*)
348    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
349    # Reject names that are not valid shell variable names.
350    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
351      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
352    fi
353    ac_package=`echo $ac_package| sed 's/-/_/g'`
354    case "$ac_option" in
355      *=*) ;;
356      *) ac_optarg=yes ;;
357    esac
358    eval "with_${ac_package}='$ac_optarg'" ;;
359
360  -without-* | --without-*)
361    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
362    # Reject names that are not valid shell variable names.
363    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
364      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
365    fi
366    ac_package=`echo $ac_package| sed 's/-/_/g'`
367    eval "with_${ac_package}=no" ;;
368
369  --x)
370    # Obsolete; use --with-x.
371    with_x=yes ;;
372
373  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
374  | --x-incl | --x-inc | --x-in | --x-i)
375    ac_prev=x_includes ;;
376  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
377  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
378    x_includes="$ac_optarg" ;;
379
380  -x-libraries | --x-libraries | --x-librarie | --x-librari \
381  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
382    ac_prev=x_libraries ;;
383  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
384  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
385    x_libraries="$ac_optarg" ;;
386
387  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
388    ;;
389
390  *)
391    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
392      echo "configure: warning: $ac_option: invalid host type" 1>&2
393    fi
394    if test "x$nonopt" != xNONE; then
395      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
396    fi
397    nonopt="$ac_option"
398    ;;
399
400  esac
401done
402
403if test -n "$ac_prev"; then
404  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
405fi
406
407trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
408
409# File descriptor usage:
410# 0 standard input
411# 1 file creation
412# 2 errors and warnings
413# 3 some systems may open it to /dev/tty
414# 4 used on the Kubota Titan
415# 6 checking for... messages and results
416# 5 compiler messages saved in config.log
417if test "$silent" = yes; then
418  exec 6>/dev/null
419else
420  exec 6>&1
421fi
422exec 5>./config.log
423
424echo "\
425This file contains any messages produced by compilers while
426running configure, to aid debugging if configure makes a mistake.
427" 1>&5
428
429# Strip out --no-create and --no-recursion so they do not pile up.
430# Also quote any args containing shell metacharacters.
431ac_configure_args=
432for ac_arg
433do
434  case "$ac_arg" in
435  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
436  | --no-cr | --no-c) ;;
437  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
438  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
439  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
440  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
441  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
442  esac
443done
444
445# NLS nuisances.
446# Only set these to C if already set.  These must not be set unconditionally
447# because not all systems understand e.g. LANG=C (notably SCO).
448# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
449# Non-C LC_CTYPE values break the ctype check.
450if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
451if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
452if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
453if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
454
455# confdefs.h avoids OS command line length limits that DEFS can exceed.
456rm -rf conftest* confdefs.h
457# AIX cpp loses on an empty file, so make sure it contains at least a newline.
458echo > confdefs.h
459
460# A filename unique to this package, relative to the directory that
461# configure is in, which we can look for to find out if srcdir is correct.
462ac_unique_file=../generic/tcl.h
463
464# Find the source files, if location was not specified.
465if test -z "$srcdir"; then
466  ac_srcdir_defaulted=yes
467  # Try the directory containing this script, then its parent.
468  ac_prog=$0
469  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
470  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
471  srcdir=$ac_confdir
472  if test ! -r $srcdir/$ac_unique_file; then
473    srcdir=..
474  fi
475else
476  ac_srcdir_defaulted=no
477fi
478if test ! -r $srcdir/$ac_unique_file; then
479  if test "$ac_srcdir_defaulted" = yes; then
480    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
481  else
482    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
483  fi
484fi
485srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
486
487# Prefer explicitly selected file to automatically selected ones.
488if test -z "$CONFIG_SITE"; then
489  if test "x$prefix" != xNONE; then
490    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
491  else
492    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
493  fi
494fi
495for ac_site_file in $CONFIG_SITE; do
496  if test -r "$ac_site_file"; then
497    echo "loading site script $ac_site_file"
498    . "$ac_site_file"
499  fi
500done
501
502if test -r "$cache_file"; then
503  echo "loading cache $cache_file"
504  . $cache_file
505else
506  echo "creating cache $cache_file"
507  > $cache_file
508fi
509
510ac_ext=c
511# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
512ac_cpp='$CPP $CPPFLAGS'
513ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
514ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
515cross_compiling=$ac_cv_prog_cc_cross
516
517ac_exeext=
518ac_objext=o
519if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
520  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
521  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
522    ac_n= ac_c='
523' ac_t='	'
524  else
525    ac_n=-n ac_c= ac_t=
526  fi
527else
528  ac_n= ac_c='\c' ac_t=
529fi
530
531
532
533
534TCL_VERSION=8.4
535TCL_MAJOR_VERSION=8
536TCL_MINOR_VERSION=4
537TCL_PATCH_LEVEL=".19"
538VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
539
540TCL_DDE_VERSION=1.2
541TCL_DDE_MAJOR_VERSION=1
542TCL_DDE_MINOR_VERSION=2
543DDEVER=$TCL_DDE_MAJOR_VERSION$TCL_DDE_MINOR_VERSION
544
545TCL_REG_VERSION=1.1
546TCL_REG_MAJOR_VERSION=1
547TCL_REG_MINOR_VERSION=1
548REGVER=$TCL_REG_MAJOR_VERSION$TCL_REG_MINOR_VERSION
549
550#------------------------------------------------------------------------
551# Handle the --prefix=... option
552#------------------------------------------------------------------------
553
554if test "${prefix}" = "NONE"; then
555    prefix=/usr/local
556fi
557if test "${exec_prefix}" = "NONE"; then
558    exec_prefix=$prefix
559fi
560# libdir must be a fully qualified path (not ${exec_prefix}/lib)
561eval libdir="$libdir"
562
563#------------------------------------------------------------------------
564# Standard compiler checks
565#------------------------------------------------------------------------
566
567# If the user did not set CFLAGS, set it now to keep
568# the AC_PROG_CC macro from adding "-g -O2".
569if test "${CFLAGS+set}" != "set" ; then
570    CFLAGS=""
571fi
572
573# Extract the first word of "gcc", so it can be a program name with args.
574set dummy gcc; ac_word=$2
575echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
576echo "configure:577: checking for $ac_word" >&5
577if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
578  echo $ac_n "(cached) $ac_c" 1>&6
579else
580  if test -n "$CC"; then
581  ac_cv_prog_CC="$CC" # Let the user override the test.
582else
583  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
584  ac_dummy="$PATH"
585  for ac_dir in $ac_dummy; do
586    test -z "$ac_dir" && ac_dir=.
587    if test -f $ac_dir/$ac_word; then
588      ac_cv_prog_CC="gcc"
589      break
590    fi
591  done
592  IFS="$ac_save_ifs"
593fi
594fi
595CC="$ac_cv_prog_CC"
596if test -n "$CC"; then
597  echo "$ac_t""$CC" 1>&6
598else
599  echo "$ac_t""no" 1>&6
600fi
601
602if test -z "$CC"; then
603  # Extract the first word of "cc", so it can be a program name with args.
604set dummy cc; ac_word=$2
605echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
606echo "configure:607: checking for $ac_word" >&5
607if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
608  echo $ac_n "(cached) $ac_c" 1>&6
609else
610  if test -n "$CC"; then
611  ac_cv_prog_CC="$CC" # Let the user override the test.
612else
613  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
614  ac_prog_rejected=no
615  ac_dummy="$PATH"
616  for ac_dir in $ac_dummy; do
617    test -z "$ac_dir" && ac_dir=.
618    if test -f $ac_dir/$ac_word; then
619      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
620        ac_prog_rejected=yes
621	continue
622      fi
623      ac_cv_prog_CC="cc"
624      break
625    fi
626  done
627  IFS="$ac_save_ifs"
628if test $ac_prog_rejected = yes; then
629  # We found a bogon in the path, so make sure we never use it.
630  set dummy $ac_cv_prog_CC
631  shift
632  if test $# -gt 0; then
633    # We chose a different compiler from the bogus one.
634    # However, it has the same basename, so the bogon will be chosen
635    # first if we set CC to just the basename; use the full file name.
636    shift
637    set dummy "$ac_dir/$ac_word" "$@"
638    shift
639    ac_cv_prog_CC="$@"
640  fi
641fi
642fi
643fi
644CC="$ac_cv_prog_CC"
645if test -n "$CC"; then
646  echo "$ac_t""$CC" 1>&6
647else
648  echo "$ac_t""no" 1>&6
649fi
650
651  if test -z "$CC"; then
652    case "`uname -s`" in
653    *win32* | *WIN32*)
654      # Extract the first word of "cl", so it can be a program name with args.
655set dummy cl; ac_word=$2
656echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
657echo "configure:658: checking for $ac_word" >&5
658if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
659  echo $ac_n "(cached) $ac_c" 1>&6
660else
661  if test -n "$CC"; then
662  ac_cv_prog_CC="$CC" # Let the user override the test.
663else
664  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
665  ac_dummy="$PATH"
666  for ac_dir in $ac_dummy; do
667    test -z "$ac_dir" && ac_dir=.
668    if test -f $ac_dir/$ac_word; then
669      ac_cv_prog_CC="cl"
670      break
671    fi
672  done
673  IFS="$ac_save_ifs"
674fi
675fi
676CC="$ac_cv_prog_CC"
677if test -n "$CC"; then
678  echo "$ac_t""$CC" 1>&6
679else
680  echo "$ac_t""no" 1>&6
681fi
682 ;;
683    esac
684  fi
685  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
686fi
687
688echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
689echo "configure:690: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
690
691ac_ext=c
692# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
693ac_cpp='$CPP $CPPFLAGS'
694ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
695ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
696cross_compiling=$ac_cv_prog_cc_cross
697
698cat > conftest.$ac_ext << EOF
699
700#line 701 "configure"
701#include "confdefs.h"
702
703main(){return(0);}
704EOF
705if { (eval echo configure:706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
706  ac_cv_prog_cc_works=yes
707  # If we can't run a trivial program, we are probably using a cross compiler.
708  if (./conftest; exit) 2>/dev/null; then
709    ac_cv_prog_cc_cross=no
710  else
711    ac_cv_prog_cc_cross=yes
712  fi
713else
714  echo "configure: failed program was:" >&5
715  cat conftest.$ac_ext >&5
716  ac_cv_prog_cc_works=no
717fi
718rm -fr conftest*
719ac_ext=c
720# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
721ac_cpp='$CPP $CPPFLAGS'
722ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
723ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
724cross_compiling=$ac_cv_prog_cc_cross
725
726echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
727if test $ac_cv_prog_cc_works = no; then
728  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
729fi
730echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
731echo "configure:732: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
732echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
733cross_compiling=$ac_cv_prog_cc_cross
734
735echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
736echo "configure:737: checking whether we are using GNU C" >&5
737if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
738  echo $ac_n "(cached) $ac_c" 1>&6
739else
740  cat > conftest.c <<EOF
741#ifdef __GNUC__
742  yes;
743#endif
744EOF
745if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
746  ac_cv_prog_gcc=yes
747else
748  ac_cv_prog_gcc=no
749fi
750fi
751
752echo "$ac_t""$ac_cv_prog_gcc" 1>&6
753
754if test $ac_cv_prog_gcc = yes; then
755  GCC=yes
756else
757  GCC=
758fi
759
760ac_test_CFLAGS="${CFLAGS+set}"
761ac_save_CFLAGS="$CFLAGS"
762CFLAGS=
763echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
764echo "configure:765: checking whether ${CC-cc} accepts -g" >&5
765if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
766  echo $ac_n "(cached) $ac_c" 1>&6
767else
768  echo 'void f(){}' > conftest.c
769if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
770  ac_cv_prog_cc_g=yes
771else
772  ac_cv_prog_cc_g=no
773fi
774rm -f conftest*
775
776fi
777
778echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
779if test "$ac_test_CFLAGS" = set; then
780  CFLAGS="$ac_save_CFLAGS"
781elif test $ac_cv_prog_cc_g = yes; then
782  if test "$GCC" = yes; then
783    CFLAGS="-g -O2"
784  else
785    CFLAGS="-g"
786  fi
787else
788  if test "$GCC" = yes; then
789    CFLAGS="-O2"
790  else
791    CFLAGS=
792  fi
793fi
794
795
796# To properly support cross-compilation, one would
797# need to use these tool checks instead of
798# the ones below and reconfigure with
799# autoconf 2.50. You can also just set
800# the CC, AR, RANLIB, and RC environment
801# variables if you want to cross compile.
802
803if test "${GCC}" = "yes" ; then
804    # Extract the first word of "ar", so it can be a program name with args.
805set dummy ar; ac_word=$2
806echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
807echo "configure:808: checking for $ac_word" >&5
808if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
809  echo $ac_n "(cached) $ac_c" 1>&6
810else
811  if test -n "$AR"; then
812  ac_cv_prog_AR="$AR" # Let the user override the test.
813else
814  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
815  ac_dummy="$PATH"
816  for ac_dir in $ac_dummy; do
817    test -z "$ac_dir" && ac_dir=.
818    if test -f $ac_dir/$ac_word; then
819      ac_cv_prog_AR="ar"
820      break
821    fi
822  done
823  IFS="$ac_save_ifs"
824fi
825fi
826AR="$ac_cv_prog_AR"
827if test -n "$AR"; then
828  echo "$ac_t""$AR" 1>&6
829else
830  echo "$ac_t""no" 1>&6
831fi
832
833    # Extract the first word of "ranlib", so it can be a program name with args.
834set dummy ranlib; ac_word=$2
835echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
836echo "configure:837: checking for $ac_word" >&5
837if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
838  echo $ac_n "(cached) $ac_c" 1>&6
839else
840  if test -n "$RANLIB"; then
841  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
842else
843  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
844  ac_dummy="$PATH"
845  for ac_dir in $ac_dummy; do
846    test -z "$ac_dir" && ac_dir=.
847    if test -f $ac_dir/$ac_word; then
848      ac_cv_prog_RANLIB="ranlib"
849      break
850    fi
851  done
852  IFS="$ac_save_ifs"
853fi
854fi
855RANLIB="$ac_cv_prog_RANLIB"
856if test -n "$RANLIB"; then
857  echo "$ac_t""$RANLIB" 1>&6
858else
859  echo "$ac_t""no" 1>&6
860fi
861
862    # Extract the first word of "windres", so it can be a program name with args.
863set dummy windres; ac_word=$2
864echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
865echo "configure:866: checking for $ac_word" >&5
866if eval "test \"`echo '$''{'ac_cv_prog_RC'+set}'`\" = set"; then
867  echo $ac_n "(cached) $ac_c" 1>&6
868else
869  if test -n "$RC"; then
870  ac_cv_prog_RC="$RC" # Let the user override the test.
871else
872  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
873  ac_dummy="$PATH"
874  for ac_dir in $ac_dummy; do
875    test -z "$ac_dir" && ac_dir=.
876    if test -f $ac_dir/$ac_word; then
877      ac_cv_prog_RC="windres"
878      break
879    fi
880  done
881  IFS="$ac_save_ifs"
882fi
883fi
884RC="$ac_cv_prog_RC"
885if test -n "$RC"; then
886  echo "$ac_t""$RC" 1>&6
887else
888  echo "$ac_t""no" 1>&6
889fi
890
891
892    if test "${AR}" = "" ; then
893	{ echo "configure: error: Required archive tool 'ar' not found on PATH." 1>&2; exit 1; }
894    fi
895    if test "${RANLIB}" = "" ; then
896	{ echo "configure: error: Required archive index tool 'ranlib' not found on PATH." 1>&2; exit 1; }
897    fi
898    if test "${RC}" = "" ; then
899	{ echo "configure: error: Required resource tool 'windres' not found on PATH." 1>&2; exit 1; }
900    fi
901fi
902
903#--------------------------------------------------------------------
904# Checks to see if the make progeam sets the $MAKE variable.
905#--------------------------------------------------------------------
906
907echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
908echo "configure:909: checking whether ${MAKE-make} sets \${MAKE}" >&5
909set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
910if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
911  echo $ac_n "(cached) $ac_c" 1>&6
912else
913  cat > conftestmake <<\EOF
914all:
915	@echo 'ac_maketemp="${MAKE}"'
916EOF
917# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
918eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
919if test -n "$ac_maketemp"; then
920  eval ac_cv_prog_make_${ac_make}_set=yes
921else
922  eval ac_cv_prog_make_${ac_make}_set=no
923fi
924rm -f conftestmake
925fi
926if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
927  echo "$ac_t""yes" 1>&6
928  SET_MAKE=
929else
930  echo "$ac_t""no" 1>&6
931  SET_MAKE="MAKE=${MAKE-make}"
932fi
933
934
935#--------------------------------------------------------------------
936# Perform additinal compiler tests.
937#--------------------------------------------------------------------
938
939echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
940echo "configure:941: checking for Cygwin environment" >&5
941if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
942  echo $ac_n "(cached) $ac_c" 1>&6
943else
944  cat > conftest.$ac_ext <<EOF
945#line 946 "configure"
946#include "confdefs.h"
947
948int main() {
949
950#ifndef __CYGWIN__
951#define __CYGWIN__ __CYGWIN32__
952#endif
953return __CYGWIN__;
954; return 0; }
955EOF
956if { (eval echo configure:957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
957  rm -rf conftest*
958  ac_cv_cygwin=yes
959else
960  echo "configure: failed program was:" >&5
961  cat conftest.$ac_ext >&5
962  rm -rf conftest*
963  ac_cv_cygwin=no
964fi
965rm -f conftest*
966rm -f conftest*
967fi
968
969echo "$ac_t""$ac_cv_cygwin" 1>&6
970CYGWIN=
971test "$ac_cv_cygwin" = yes && CYGWIN=yes
972
973if test "$ac_cv_cygwin" = "yes" ; then
974    { echo "configure: error: Compiling under Cygwin is not currently supported.
975A maintainer for the Cygwin port of Tcl/Tk is needed. See the README
976file for information about building with Mingw." 1>&2; exit 1; }
977fi
978
979
980echo $ac_n "checking for SEH support in compiler""... $ac_c" 1>&6
981echo "configure:982: checking for SEH support in compiler" >&5
982if eval "test \"`echo '$''{'tcl_cv_seh'+set}'`\" = set"; then
983  echo $ac_n "(cached) $ac_c" 1>&6
984else
985  if test "$cross_compiling" = yes; then
986  tcl_cv_seh=no
987else
988  cat > conftest.$ac_ext <<EOF
989#line 990 "configure"
990#include "confdefs.h"
991
992#define WIN32_LEAN_AND_MEAN
993#include <windows.h>
994#undef WIN32_LEAN_AND_MEAN
995
996int main(int argc, char** argv) {
997    int a, b = 0;
998    __try {
999        a = 666 / b;
1000    }
1001    __except (EXCEPTION_EXECUTE_HANDLER) {
1002        return 0;
1003    }
1004    return 1;
1005}
1006
1007EOF
1008if { (eval echo configure:1009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1009then
1010  tcl_cv_seh=yes
1011else
1012  echo "configure: failed program was:" >&5
1013  cat conftest.$ac_ext >&5
1014  rm -fr conftest*
1015  tcl_cv_seh=no
1016fi
1017rm -fr conftest*
1018fi
1019
1020
1021fi
1022
1023echo "$ac_t""$tcl_cv_seh" 1>&6
1024if test "$tcl_cv_seh" = "no" ; then
1025    cat >> confdefs.h <<\EOF
1026#define HAVE_NO_SEH 1
1027EOF
1028
1029fi
1030
1031#
1032# Check to see if the excpt.h include file provided contains the
1033# definition for EXCEPTION_DISPOSITION; if not, which is the case
1034# with Cygwin's version as of 2002-04-10, define it to be int, 
1035# sufficient for getting the current code to work.
1036#
1037echo $ac_n "checking for EXCEPTION_DISPOSITION support in include files""... $ac_c" 1>&6
1038echo "configure:1039: checking for EXCEPTION_DISPOSITION support in include files" >&5
1039if eval "test \"`echo '$''{'tcl_cv_eh_disposition'+set}'`\" = set"; then
1040  echo $ac_n "(cached) $ac_c" 1>&6
1041else
1042  cat > conftest.$ac_ext <<EOF
1043#line 1044 "configure"
1044#include "confdefs.h"
1045
1046#define WIN32_LEAN_AND_MEAN
1047#include <windows.h>
1048#undef WIN32_LEAN_AND_MEAN
1049
1050int main() {
1051
1052  EXCEPTION_DISPOSITION x;
1053
1054; return 0; }
1055EOF
1056if { (eval echo configure:1057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1057  rm -rf conftest*
1058  tcl_cv_eh_disposition=yes
1059else
1060  echo "configure: failed program was:" >&5
1061  cat conftest.$ac_ext >&5
1062  rm -rf conftest*
1063  tcl_cv_eh_disposition=no
1064fi
1065rm -f conftest*
1066
1067fi
1068
1069echo "$ac_t""$tcl_cv_eh_disposition" 1>&6
1070if test "$tcl_cv_eh_disposition" = "no" ; then
1071    cat >> confdefs.h <<\EOF
1072#define EXCEPTION_DISPOSITION int
1073EOF
1074
1075fi
1076
1077
1078# Check to see if the winsock2.h include file provided contains
1079# typedefs like LPFN_ACCEPT and friends.
1080#
1081echo $ac_n "checking for LPFN_ACCEPT support in winsock2.h""... $ac_c" 1>&6
1082echo "configure:1083: checking for LPFN_ACCEPT support in winsock2.h" >&5
1083if eval "test \"`echo '$''{'tcl_cv_lpfn_decls'+set}'`\" = set"; then
1084  echo $ac_n "(cached) $ac_c" 1>&6
1085else
1086  cat > conftest.$ac_ext <<EOF
1087#line 1088 "configure"
1088#include "confdefs.h"
1089
1090#define WIN32_LEAN_AND_MEAN
1091#include <windows.h>
1092#undef WIN32_LEAN_AND_MEAN
1093#include <winsock2.h>
1094
1095int main() {
1096
1097  LPFN_ACCEPT accept;
1098
1099; return 0; }
1100EOF
1101if { (eval echo configure:1102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1102  rm -rf conftest*
1103  tcl_cv_lpfn_decls=yes
1104else
1105  echo "configure: failed program was:" >&5
1106  cat conftest.$ac_ext >&5
1107  rm -rf conftest*
1108  tcl_cv_lpfn_decls=no
1109fi
1110rm -f conftest*
1111
1112fi
1113
1114echo "$ac_t""$tcl_cv_lpfn_decls" 1>&6
1115if test "$tcl_cv_lpfn_decls" = "no" ; then
1116    cat >> confdefs.h <<\EOF
1117#define HAVE_NO_LPFN_DECLS 1
1118EOF
1119
1120fi
1121
1122# Check to see if winnt.h defines CHAR, SHORT, and LONG
1123# even if VOID has already been #defined. The win32api
1124# used by mingw and cygwin is known to do this.
1125
1126echo $ac_n "checking for winnt.h that ignores VOID define""... $ac_c" 1>&6
1127echo "configure:1128: checking for winnt.h that ignores VOID define" >&5
1128if eval "test \"`echo '$''{'tcl_cv_winnt_ignore_void'+set}'`\" = set"; then
1129  echo $ac_n "(cached) $ac_c" 1>&6
1130else
1131  cat > conftest.$ac_ext <<EOF
1132#line 1133 "configure"
1133#include "confdefs.h"
1134
1135#define VOID void
1136#define WIN32_LEAN_AND_MEAN
1137#include <windows.h>
1138#undef WIN32_LEAN_AND_MEAN
1139
1140int main() {
1141
1142  CHAR c;
1143  SHORT s;
1144  LONG l;
1145
1146; return 0; }
1147EOF
1148if { (eval echo configure:1149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1149  rm -rf conftest*
1150  tcl_cv_winnt_ignore_void=yes
1151else
1152  echo "configure: failed program was:" >&5
1153  cat conftest.$ac_ext >&5
1154  rm -rf conftest*
1155  tcl_cv_winnt_ignore_void=no
1156fi
1157rm -f conftest*
1158
1159fi
1160
1161echo "$ac_t""$tcl_cv_winnt_ignore_void" 1>&6
1162if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
1163    cat >> confdefs.h <<\EOF
1164#define HAVE_WINNT_IGNORE_VOID 1
1165EOF
1166
1167fi
1168
1169# Check to see if malloc.h is missing the alloca function
1170# declaration. This is known to be a problem with Mingw.
1171# If we compiled without the function declaration, it
1172# would work but we would get a warning message from gcc.
1173# If we add the function declaration ourselves, it
1174# would not compile correctly because the _alloca
1175# function expects the argument to be passed in a
1176# register and not on the stack. Instead, we just
1177# call it from inline asm code.
1178
1179echo $ac_n "checking for alloca declaration in malloc.h""... $ac_c" 1>&6
1180echo "configure:1181: checking for alloca declaration in malloc.h" >&5
1181if eval "test \"`echo '$''{'tcl_cv_malloc_decl_alloca'+set}'`\" = set"; then
1182  echo $ac_n "(cached) $ac_c" 1>&6
1183else
1184  cat > conftest.$ac_ext <<EOF
1185#line 1186 "configure"
1186#include "confdefs.h"
1187
1188#include <malloc.h>
1189
1190int main() {
1191
1192  size_t arg = 0;
1193  void* ptr;
1194  ptr = alloca;
1195  ptr = alloca(arg);
1196
1197; return 0; }
1198EOF
1199if { (eval echo configure:1200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1200  rm -rf conftest*
1201  tcl_cv_malloc_decl_alloca=yes
1202else
1203  echo "configure: failed program was:" >&5
1204  cat conftest.$ac_ext >&5
1205  rm -rf conftest*
1206  tcl_cv_malloc_decl_alloca=no
1207fi
1208rm -f conftest*
1209
1210fi
1211
1212echo "$ac_t""$tcl_cv_malloc_decl_alloca" 1>&6
1213if test "$tcl_cv_malloc_decl_alloca" = "no" &&
1214   test "${GCC}" = "yes" ; then
1215    cat >> confdefs.h <<\EOF
1216#define HAVE_ALLOCA_GCC_INLINE 1
1217EOF
1218
1219fi
1220
1221# See if the compiler supports casting to a union type.
1222# This is used to stop gcc from printing a compiler
1223# warning when initializing a union member.
1224
1225echo $ac_n "checking for cast to union support""... $ac_c" 1>&6
1226echo "configure:1227: checking for cast to union support" >&5
1227if eval "test \"`echo '$''{'tcl_cv_cast_to_union'+set}'`\" = set"; then
1228  echo $ac_n "(cached) $ac_c" 1>&6
1229else
1230  cat > conftest.$ac_ext <<EOF
1231#line 1232 "configure"
1232#include "confdefs.h"
1233
1234int main() {
1235
1236  union foo { int i; double d; };
1237  union foo f = (union foo) (int) 0;
1238
1239; return 0; }
1240EOF
1241if { (eval echo configure:1242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1242  rm -rf conftest*
1243  tcl_cv_cast_to_union=yes
1244else
1245  echo "configure: failed program was:" >&5
1246  cat conftest.$ac_ext >&5
1247  rm -rf conftest*
1248  tcl_cv_cast_to_union=no
1249fi
1250rm -f conftest*
1251
1252fi
1253
1254echo "$ac_t""$tcl_cv_cast_to_union" 1>&6
1255if test "$tcl_cv_cast_to_union" = "yes"; then
1256    cat >> confdefs.h <<\EOF
1257#define HAVE_CAST_TO_UNION 1
1258EOF
1259
1260fi
1261
1262
1263#--------------------------------------------------------------------
1264# Determines the correct binary file extension (.o, .obj, .exe etc.)
1265#--------------------------------------------------------------------
1266
1267echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1268echo "configure:1269: checking for object suffix" >&5
1269if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1270  echo $ac_n "(cached) $ac_c" 1>&6
1271else
1272  rm -f conftest*
1273echo 'int i = 1;' > conftest.$ac_ext
1274if { (eval echo configure:1275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1275  for ac_file in conftest.*; do
1276    case $ac_file in
1277    *.c) ;;
1278    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1279    esac
1280  done
1281else
1282  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1283fi
1284rm -f conftest*
1285fi
1286
1287echo "$ac_t""$ac_cv_objext" 1>&6
1288OBJEXT=$ac_cv_objext
1289ac_objext=$ac_cv_objext
1290
1291echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1292echo "configure:1293: checking for mingw32 environment" >&5
1293if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1294  echo $ac_n "(cached) $ac_c" 1>&6
1295else
1296  cat > conftest.$ac_ext <<EOF
1297#line 1298 "configure"
1298#include "confdefs.h"
1299
1300int main() {
1301return __MINGW32__;
1302; return 0; }
1303EOF
1304if { (eval echo configure:1305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1305  rm -rf conftest*
1306  ac_cv_mingw32=yes
1307else
1308  echo "configure: failed program was:" >&5
1309  cat conftest.$ac_ext >&5
1310  rm -rf conftest*
1311  ac_cv_mingw32=no
1312fi
1313rm -f conftest*
1314rm -f conftest*
1315fi
1316
1317echo "$ac_t""$ac_cv_mingw32" 1>&6
1318MINGW32=
1319test "$ac_cv_mingw32" = yes && MINGW32=yes
1320
1321
1322echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1323echo "configure:1324: checking for executable suffix" >&5
1324if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1325  echo $ac_n "(cached) $ac_c" 1>&6
1326else
1327  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1328  ac_cv_exeext=.exe
1329else
1330  rm -f conftest*
1331  echo 'int main () { return 0; }' > conftest.$ac_ext
1332  ac_cv_exeext=
1333  if { (eval echo configure:1334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1334    for file in conftest.*; do
1335      case $file in
1336      *.c | *.o | *.obj) ;;
1337      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1338      esac
1339    done
1340  else
1341    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1342  fi
1343  rm -f conftest*
1344  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1345fi
1346fi
1347
1348EXEEXT=""
1349test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1350echo "$ac_t""${ac_cv_exeext}" 1>&6
1351ac_exeext=$EXEEXT
1352
1353
1354#--------------------------------------------------------------------
1355# Check whether --enable-threads or --disable-threads was given.
1356#--------------------------------------------------------------------
1357
1358
1359    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
1360echo "configure:1361: checking for building with threads" >&5
1361    # Check whether --enable-threads or --disable-threads was given.
1362if test "${enable_threads+set}" = set; then
1363  enableval="$enable_threads"
1364  tcl_ok=$enableval
1365else
1366  tcl_ok=no
1367fi
1368
1369
1370    if test "$tcl_ok" = "yes"; then
1371	echo "$ac_t""yes" 1>&6
1372	TCL_THREADS=1
1373	cat >> confdefs.h <<\EOF
1374#define TCL_THREADS 1
1375EOF
1376
1377	# USE_THREAD_ALLOC tells us to try the special thread-based
1378	# allocator that significantly reduces lock contention
1379	cat >> confdefs.h <<\EOF
1380#define USE_THREAD_ALLOC 1
1381EOF
1382
1383    else
1384	TCL_THREADS=0
1385	echo "$ac_t""no (default)" 1>&6
1386    fi
1387    
1388
1389
1390#--------------------------------------------------------------------
1391# The statements below define a collection of symbols related to
1392# building libtcl as a shared library instead of a static library.
1393#--------------------------------------------------------------------
1394
1395
1396    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
1397echo "configure:1398: checking how to build libraries" >&5
1398    # Check whether --enable-shared or --disable-shared was given.
1399if test "${enable_shared+set}" = set; then
1400  enableval="$enable_shared"
1401  tcl_ok=$enableval
1402else
1403  tcl_ok=yes
1404fi
1405
1406
1407    if test "${enable_shared+set}" = set; then
1408	enableval="$enable_shared"
1409	tcl_ok=$enableval
1410    else
1411	tcl_ok=yes
1412    fi
1413
1414    if test "$tcl_ok" = "yes" ; then
1415	echo "$ac_t""shared" 1>&6
1416	SHARED_BUILD=1
1417    else
1418	echo "$ac_t""static" 1>&6
1419	SHARED_BUILD=0
1420	cat >> confdefs.h <<\EOF
1421#define STATIC_BUILD 1
1422EOF
1423
1424    fi
1425
1426
1427#--------------------------------------------------------------------
1428# The statements below define a collection of compile flags.  This 
1429# macro depends on the value of SHARED_BUILD, and should be called
1430# after SC_ENABLE_SHARED checks the configure switches.
1431#--------------------------------------------------------------------
1432
1433
1434
1435    # Step 0: Enable 64 bit support?
1436
1437    echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6
1438echo "configure:1439: checking if 64bit support is requested" >&5
1439    # Check whether --enable-64bit or --disable-64bit was given.
1440if test "${enable_64bit+set}" = set; then
1441  enableval="$enable_64bit"
1442  do64bit=$enableval
1443else
1444  do64bit=no
1445fi
1446
1447    echo "$ac_t""$do64bit" 1>&6
1448
1449    # Set some defaults (may get changed below)
1450    EXTRA_CFLAGS=""
1451
1452    # Extract the first word of "cygpath", so it can be a program name with args.
1453set dummy cygpath; ac_word=$2
1454echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1455echo "configure:1456: checking for $ac_word" >&5
1456if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
1457  echo $ac_n "(cached) $ac_c" 1>&6
1458else
1459  if test -n "$CYGPATH"; then
1460  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1461else
1462  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1463  ac_dummy="$PATH"
1464  for ac_dir in $ac_dummy; do
1465    test -z "$ac_dir" && ac_dir=.
1466    if test -f $ac_dir/$ac_word; then
1467      ac_cv_prog_CYGPATH="cygpath -w"
1468      break
1469    fi
1470  done
1471  IFS="$ac_save_ifs"
1472  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1473fi
1474fi
1475CYGPATH="$ac_cv_prog_CYGPATH"
1476if test -n "$CYGPATH"; then
1477  echo "$ac_t""$CYGPATH" 1>&6
1478else
1479  echo "$ac_t""no" 1>&6
1480fi
1481
1482
1483    SHLIB_SUFFIX=".dll"
1484
1485    # MACHINE is IX86 for LINK, but this is used by the manifest,
1486    # which requires x86|amd64|ia64.
1487    MACHINE="X86"
1488
1489    # Check for a bug in gcc's windres that causes the
1490    # compile to fail when a Windows native path is
1491    # passed into windres. The mingw toolchain requires
1492    # Windows native paths while Cygwin should work
1493    # with both. Avoid the bug by passing a POSIX
1494    # path when using the Cygwin toolchain.
1495
1496    if test "$GCC" = "yes" && test "$CYGPATH" != "echo" ; then
1497	conftest=/tmp/conftest.rc
1498	echo "STRINGTABLE BEGIN" > $conftest
1499	echo "101 \"name\"" >> $conftest
1500	echo "END" >> $conftest
1501
1502	echo $ac_n "checking for Windows native path bug in windres""... $ac_c" 1>&6
1503echo "configure:1504: checking for Windows native path bug in windres" >&5
1504	cyg_conftest=`$CYGPATH $conftest`
1505	if { ac_try='$RC -o conftest.res.o $cyg_conftest'; { (eval echo configure:1506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } ; then
1506	    echo "$ac_t""no" 1>&6
1507	else
1508	    echo "$ac_t""yes" 1>&6
1509	    CYGPATH=echo
1510	fi
1511	conftest=
1512	cyg_conftest=
1513    fi
1514
1515    if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then
1516        DEPARG='"$<"'
1517    else
1518        DEPARG='"$(shell $(CYGPATH) $<)"'
1519    fi
1520
1521    # set various compiler flags depending on whether we are using gcc or cl
1522
1523    echo $ac_n "checking compiler flags""... $ac_c" 1>&6
1524echo "configure:1525: checking compiler flags" >&5
1525    if test "${GCC}" = "yes" ; then
1526	if test "$do64bit" != "no" ; then
1527	    echo "configure: warning: "64bit mode not supported with GCC on Windows"" 1>&2
1528	fi
1529	SHLIB_LD=""
1530	SHLIB_LD_LIBS=""
1531	LIBS=""
1532	LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32"
1533	STLIB_LD='${AR} cr'
1534	RC_OUT=-o
1535	RC_TYPE=
1536	RC_INCLUDE=--include
1537	RC_DEFINE=--define
1538	RES=res.o
1539	MAKE_LIB="\${STLIB_LD} \$@"
1540	POST_MAKE_LIB="\${RANLIB} \$@"
1541	MAKE_EXE="\${CC} -o \$@"
1542	LIBPREFIX="lib"
1543
1544	#if test "$ac_cv_cygwin" = "yes"; then
1545	#    extra_cflags="-mno-cygwin"
1546	#    extra_ldflags="-mno-cygwin"
1547	#else
1548	#    extra_cflags=""
1549	#    extra_ldflags=""
1550	#fi
1551
1552	if test "$ac_cv_cygwin" = "yes"; then
1553	  touch ac$$.c
1554	  if ${CC} -c -mwin32 ac$$.c >/dev/null 2>&1; then
1555	    case "$extra_cflags" in
1556	      *-mwin32*) ;;
1557	      *) extra_cflags="-mwin32 $extra_cflags" ;;
1558	    esac
1559	    case "$extra_ldflags" in
1560	      *-mwin32*) ;;
1561	      *) extra_ldflags="-mwin32 $extra_ldflags" ;;
1562	    esac
1563	  fi
1564	  rm -f ac$$.o ac$$.c
1565	else
1566	  extra_cflags=''
1567	  extra_ldflags=''
1568	fi
1569
1570	if test "${SHARED_BUILD}" = "0" ; then
1571	    # static
1572            echo "$ac_t""using static flags" 1>&6
1573	    runtime=
1574	    MAKE_DLL="echo "
1575	    LIBSUFFIX="s\${DBGX}.a"
1576	    LIBFLAGSUFFIX="s\${DBGX}"
1577	    LIBRARIES="\${STATIC_LIBRARIES}"
1578	    EXESUFFIX="s\${DBGX}.exe"
1579	else
1580	    # dynamic
1581            echo "$ac_t""using shared flags" 1>&6
1582
1583	    # ad-hoc check to see if CC supports -shared.
1584	    if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then
1585		{ echo "configure: error: ${CC} does not support the -shared option.
1586                You will need to upgrade to a newer version of the toolchain." 1>&2; exit 1; }
1587	    fi
1588
1589	    runtime=
1590	    # Link with gcc since ld does not link to default libs like
1591	    # -luser32 and -lmsvcrt by default. Make sure CFLAGS is
1592	    # included so -mno-cygwin passed the correct libs to the linker.
1593	    SHLIB_LD='${CC} -shared ${CFLAGS}'
1594	    SHLIB_LD_LIBS='${LIBS}'
1595	    # Add SHLIB_LD_LIBS to the Make rule, not here.
1596	    MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \$@ ${extra_ldflags} \
1597	        -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\$@)"
1598
1599	    LIBSUFFIX="\${DBGX}.a"
1600	    LIBFLAGSUFFIX="\${DBGX}"
1601	    EXESUFFIX="\${DBGX}.exe"
1602	    LIBRARIES="\${SHARED_LIBRARIES}"
1603	fi
1604	# DLLSUFFIX is separate because it is the building block for
1605	# users of tclConfig.sh that may build shared or static.
1606	DLLSUFFIX="\${DBGX}.dll"
1607	SHLIB_SUFFIX=.dll
1608
1609	EXTRA_CFLAGS="${extra_cflags}"
1610
1611	CFLAGS_DEBUG=-g
1612	CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
1613	CFLAGS_WARNING="-Wall -Wconversion"
1614	LDFLAGS_DEBUG=
1615	LDFLAGS_OPTIMIZE=
1616
1617	# Specify the CC output file names based on the target name
1618	CC_OBJNAME="-o \$@"
1619	CC_EXENAME="-o \$@"
1620
1621	# Specify linker flags depending on the type of app being 
1622	# built -- Console vs. Window.
1623	#
1624	# ORIGINAL COMMENT:
1625	# We need to pass -e _WinMain@16 so that ld will use
1626	# WinMain() instead of main() as the entry point. We can't
1627	# use autoconf to check for this case since it would need
1628	# to run an executable and that does not work when
1629	# cross compiling. Remove this -e workaround once we
1630	# require a gcc that does not have this bug.
1631	#
1632	# MK NOTE: Tk should use a different mechanism. This causes 
1633	# interesting problems, such as wish dying at startup.
1634	#LDFLAGS_WINDOW="-mwindows -e _WinMain@16 ${extra_ldflags}"
1635	LDFLAGS_CONSOLE="-mconsole ${extra_ldflags}"
1636	LDFLAGS_WINDOW="-mwindows ${extra_ldflags}"
1637    else
1638	if test "${SHARED_BUILD}" = "0" ; then
1639	    # static
1640            echo "$ac_t""using static flags" 1>&6
1641	    runtime=-MT
1642	    MAKE_DLL="echo "
1643	    LIBSUFFIX="s\${DBGX}.lib"
1644	    LIBFLAGSUFFIX="s\${DBGX}"
1645	    LIBRARIES="\${STATIC_LIBRARIES}"
1646	    EXESUFFIX="s\${DBGX}.exe"
1647	    SHLIB_LD_LIBS=""
1648	else
1649	    # dynamic
1650            echo "$ac_t""using shared flags" 1>&6
1651	    runtime=-MD
1652	    # Add SHLIB_LD_LIBS to the Make rule, not here.
1653	    MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@"
1654	    LIBSUFFIX="\${DBGX}.lib"
1655	    LIBFLAGSUFFIX="\${DBGX}"
1656	    EXESUFFIX="\${DBGX}.exe"
1657	    LIBRARIES="\${SHARED_LIBRARIES}"
1658	    SHLIB_LD_LIBS='${LIBS}'
1659	fi
1660	# DLLSUFFIX is separate because it is the building block for
1661	# users of tclConfig.sh that may build shared or static.
1662	DLLSUFFIX="\${DBGX}.dll"
1663
1664	# This is a 2-stage check to make sure we have the 64-bit SDK
1665	# We have to know where the SDK is installed.
1666	# This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
1667	if test "$do64bit" != "no" ; then
1668	    if test "x${MSSDK}x" = "xx" ; then
1669		MSSDK="C:/Progra~1/Microsoft Platform SDK"
1670	    fi
1671	    MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'`
1672	    PATH64=""
1673	    case "$do64bit" in
1674		amd64|x64|yes)
1675		    MACHINE="AMD64" ; # default to AMD64 64-bit build
1676		    PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
1677		    ;;
1678		ia64)
1679		    MACHINE="IA64"
1680		    PATH64="${MSSDK}/Bin/Win64"
1681		    ;;
1682	    esac
1683	    if test ! -d "${PATH64}" ; then
1684		echo "configure: warning: Could not find 64-bit $MACHINE SDK to enable 64bit mode" 1>&2
1685		echo "configure: warning: Ensure latest Platform SDK is installed" 1>&2
1686		do64bit="no"
1687	    else
1688		echo "$ac_t""   Using 64-bit $MACHINE mode" 1>&6
1689	    fi
1690	fi
1691
1692	if test "$do64bit" != "no" ; then
1693	    # The space-based-path will work for the Makefile, but will
1694	    # not work if AC_TRY_COMPILE is called.
1695	    CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \
1696		-I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
1697	    RC="\"${MSSDK}/bin/rc.exe\""
1698	    CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d"
1699	    # Do not use -O2 for Win64 - this has proved buggy in code gen.
1700	    CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}"
1701	    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
1702	    LINKBIN="\"${PATH64}/link.exe\""
1703	    # Avoid 'unresolved external symbol __security_cookie' errors.
1704	    # c.f. http://support.microsoft.com/?id=894573
1705	    LIBS="user32.lib advapi32.lib bufferoverflowU.lib"
1706	else
1707	    RC="rc"
1708	    # -Od - no optimization
1709	    # -WX - warnings as errors
1710	    CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d"
1711	    # -O2 - create fast code (/Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy)
1712	    CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}"
1713	    lflags="-nologo"
1714	    LINKBIN="link"
1715	    LIBS="user32.lib advapi32.lib"
1716	fi
1717
1718	LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib comctl32.lib shell32.lib"
1719	SHLIB_LD="${LINKBIN} -dll -incremental:no ${lflags}"
1720	# link -lib only works when -lib is the first arg
1721	STLIB_LD="${LINKBIN} -lib ${lflags}"
1722	RC_OUT=-fo
1723	RC_TYPE=-r
1724	RC_INCLUDE=-i
1725	RC_DEFINE=-d
1726	RES=res
1727	MAKE_LIB="\${STLIB_LD} -out:\$@"
1728	POST_MAKE_LIB=
1729	MAKE_EXE="\${CC} -Fe\$@"
1730	LIBPREFIX=""
1731
1732	EXTRA_CFLAGS=""
1733	CFLAGS_WARNING="-W3"
1734	LDFLAGS_DEBUG="-debug:full"
1735	LDFLAGS_OPTIMIZE="-release"
1736	
1737	# Specify the CC output file names based on the target name
1738	CC_OBJNAME="-Fo\$@"
1739	CC_EXENAME="-Fe\"\$(shell \$(CYGPATH) '\$@')\""
1740
1741	# Specify linker flags depending on the type of app being 
1742	# built -- Console vs. Window.
1743	LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
1744	LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
1745    fi
1746
1747    # DL_LIBS is empty, but then we match the Unix version
1748    
1749    
1750    
1751    
1752
1753
1754#--------------------------------------------------------------------
1755# Set the default compiler switches based on the --enable-symbols 
1756# option.  This macro depends on C flags, and should be called
1757# after SC_CONFIG_CFLAGS macro is called.
1758#--------------------------------------------------------------------
1759
1760
1761    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
1762echo "configure:1763: checking for build with symbols" >&5
1763    # Check whether --enable-symbols or --disable-symbols was given.
1764if test "${enable_symbols+set}" = set; then
1765  enableval="$enable_symbols"
1766  tcl_ok=$enableval
1767else
1768  tcl_ok=no
1769fi
1770
1771# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
1772    if test "$tcl_ok" = "no"; then
1773	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
1774	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
1775	DBGX=""
1776	echo "$ac_t""no" 1>&6
1777    else
1778	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
1779	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
1780	DBGX=g
1781	if test "$tcl_ok" = "yes"; then
1782	    echo "$ac_t""yes (standard debugging)" 1>&6
1783	fi
1784    fi
1785    
1786    
1787
1788    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
1789	cat >> confdefs.h <<\EOF
1790#define TCL_MEM_DEBUG 1
1791EOF
1792
1793    fi
1794
1795    if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
1796	cat >> confdefs.h <<\EOF
1797#define TCL_COMPILE_DEBUG 1
1798EOF
1799
1800	cat >> confdefs.h <<\EOF
1801#define TCL_COMPILE_STATS 1
1802EOF
1803
1804    fi
1805
1806    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
1807	if test "$tcl_ok" = "all"; then
1808	    echo "$ac_t""enabled symbols mem compile debugging" 1>&6
1809	else
1810	    echo "$ac_t""enabled $tcl_ok debugging" 1>&6
1811	fi
1812    fi
1813
1814
1815TCL_DBGX=${DBGX}
1816
1817#--------------------------------------------------------------------
1818# man2tcl needs this so that it can use errno.h
1819#--------------------------------------------------------------------
1820
1821echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1822echo "configure:1823: checking how to run the C preprocessor" >&5
1823# On Suns, sometimes $CPP names a directory.
1824if test -n "$CPP" && test -d "$CPP"; then
1825  CPP=
1826fi
1827if test -z "$CPP"; then
1828if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1829  echo $ac_n "(cached) $ac_c" 1>&6
1830else
1831    # This must be in double quotes, not single quotes, because CPP may get
1832  # substituted into the Makefile and "${CC-cc}" will confuse make.
1833  CPP="${CC-cc} -E"
1834  # On the NeXT, cc -E runs the code through the compiler's parser,
1835  # not just through cpp.
1836  cat > conftest.$ac_ext <<EOF
1837#line 1838 "configure"
1838#include "confdefs.h"
1839#include <assert.h>
1840Syntax Error
1841EOF
1842ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1843{ (eval echo configure:1844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1844ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1845if test -z "$ac_err"; then
1846  :
1847else
1848  echo "$ac_err" >&5
1849  echo "configure: failed program was:" >&5
1850  cat conftest.$ac_ext >&5
1851  rm -rf conftest*
1852  CPP="${CC-cc} -E -traditional-cpp"
1853  cat > conftest.$ac_ext <<EOF
1854#line 1855 "configure"
1855#include "confdefs.h"
1856#include <assert.h>
1857Syntax Error
1858EOF
1859ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1860{ (eval echo configure:1861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1861ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1862if test -z "$ac_err"; then
1863  :
1864else
1865  echo "$ac_err" >&5
1866  echo "configure: failed program was:" >&5
1867  cat conftest.$ac_ext >&5
1868  rm -rf conftest*
1869  CPP="${CC-cc} -nologo -E"
1870  cat > conftest.$ac_ext <<EOF
1871#line 1872 "configure"
1872#include "confdefs.h"
1873#include <assert.h>
1874Syntax Error
1875EOF
1876ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1877{ (eval echo configure:1878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1878ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1879if test -z "$ac_err"; then
1880  :
1881else
1882  echo "$ac_err" >&5
1883  echo "configure: failed program was:" >&5
1884  cat conftest.$ac_ext >&5
1885  rm -rf conftest*
1886  CPP=/lib/cpp
1887fi
1888rm -f conftest*
1889fi
1890rm -f conftest*
1891fi
1892rm -f conftest*
1893  ac_cv_prog_CPP="$CPP"
1894fi
1895  CPP="$ac_cv_prog_CPP"
1896else
1897  ac_cv_prog_CPP="$CPP"
1898fi
1899echo "$ac_t""$CPP" 1>&6
1900
1901ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
1902echo $ac_n "checking for errno.h""... $ac_c" 1>&6
1903echo "configure:1904: checking for errno.h" >&5
1904if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1905  echo $ac_n "(cached) $ac_c" 1>&6
1906else
1907  cat > conftest.$ac_ext <<EOF
1908#line 1909 "configure"
1909#include "confdefs.h"
1910#include <errno.h>
1911EOF
1912ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1913{ (eval echo configure:1914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1914ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1915if test -z "$ac_err"; then
1916  rm -rf conftest*
1917  eval "ac_cv_header_$ac_safe=yes"
1918else
1919  echo "$ac_err" >&5
1920  echo "configure: failed program was:" >&5
1921  cat conftest.$ac_ext >&5
1922  rm -rf conftest*
1923  eval "ac_cv_header_$ac_safe=no"
1924fi
1925rm -f conftest*
1926fi
1927if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1928  echo "$ac_t""yes" 1>&6
1929  :
1930else
1931  echo "$ac_t""no" 1>&6
1932MAN2TCLFLAGS="-DNO_ERRNO_H"
1933fi
1934
1935
1936
1937#------------------------------------------------------------------------
1938# tclConfig.sh refers to this by a different name
1939#------------------------------------------------------------------------
1940
1941TCL_SHARED_BUILD=${SHARED_BUILD}
1942
1943#--------------------------------------------------------------------
1944# Perform final evaluations of variables with possible substitutions.
1945#--------------------------------------------------------------------
1946
1947TCL_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}"
1948TCL_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
1949TCL_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
1950
1951eval "TCL_SRC_DIR=\"`cd $srcdir/..; pwd`\""
1952
1953eval "TCL_DLL_FILE=tcl${VER}${DLLSUFFIX}"
1954
1955eval "TCL_LIB_FILE=${LIBPREFIX}tcl$VER${LIBSUFFIX}"
1956
1957eval "TCL_LIB_FLAG=\"-ltcl${VER}${LIBFLAGSUFFIX}\""
1958eval "TCL_BUILD_LIB_SPEC=\"-L`pwd` ${TCL_LIB_FLAG}\""
1959eval "TCL_LIB_SPEC=\"-L${libdir} ${TCL_LIB_FLAG}\""
1960
1961eval "TCL_STUB_LIB_FILE=\"${LIBPREFIX}tclstub${VER}${LIBSUFFIX}\""
1962eval "TCL_STUB_LIB_FLAG=\"-ltclstub${VER}${LIBFLAGSUFFIX}\""
1963eval "TCL_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TCL_STUB_LIB_FLAG}\""
1964eval "TCL_STUB_LIB_SPEC=\"-L${libdir} ${TCL_STUB_LIB_FLAG}\""
1965eval "TCL_BUILD_STUB_LIB_PATH=\"`pwd`/${TCL_STUB_LIB_FILE}\""
1966eval "TCL_STUB_LIB_PATH=\"${libdir}/${TCL_STUB_LIB_FILE}\""
1967
1968# Install time header dir can be set via --includedir
1969eval "TCL_INCLUDE_SPEC=\"-I${includedir}\""
1970
1971
1972eval "DLLSUFFIX=${DLLSUFFIX}"
1973eval "LIBPREFIX=${LIBPREFIX}"
1974eval "LIBSUFFIX=${LIBSUFFIX}"
1975eval "EXESUFFIX=${EXESUFFIX}"
1976
1977CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}
1978CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}
1979CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}
1980
1981#--------------------------------------------------------------------
1982# Adjust the defines for how the resources are built depending
1983# on symbols and static vs. shared.
1984#--------------------------------------------------------------------
1985
1986if test ${SHARED_BUILD} = 0 ; then
1987    if test "${DBGX}" = "g"; then
1988        RC_DEFINES="${RC_DEFINE} STATIC_BUILD ${RC_DEFINE} DEBUG"
1989    else
1990        RC_DEFINES="${RC_DEFINE} STATIC_BUILD"
1991    fi
1992else
1993    if test "${DBGX}" = "g"; then
1994        RC_DEFINES="${RC_DEFINE} DEBUG"
1995    else
1996        RC_DEFINES=""
1997    fi
1998fi
1999
2000#--------------------------------------------------------------------
2001#	The statements below define the symbol TCL_PACKAGE_PATH, which
2002#	gives a list of directories that may contain packages.  The list
2003#	consists of one directory for machine-dependent binaries and
2004#	another for platform-independent scripts.
2005#--------------------------------------------------------------------
2006
2007if test "$prefix" != "$exec_prefix"; then
2008    TCL_PACKAGE_PATH="${libdir} ${prefix}/lib"
2009else
2010    TCL_PACKAGE_PATH="${prefix}/lib"
2011fi
2012
2013
2014
2015
2016
2017
2018
2019
2020# empty on win
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038# win/tcl.m4 doesn't set (CFLAGS)
2039
2040
2041
2042
2043
2044
2045
2046# win/tcl.m4 doesn't set (LDFLAGS)
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074# empty on win, but needs sub'ing
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085# win only
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101trap '' 1 2 15
2102cat > confcache <<\EOF
2103# This file is a shell script that caches the results of configure
2104# tests run on this system so they can be shared between configure
2105# scripts and configure runs.  It is not useful on other systems.
2106# If it contains results you don't want to keep, you may remove or edit it.
2107#
2108# By default, configure uses ./config.cache as the cache file,
2109# creating it if it does not exist already.  You can give configure
2110# the --cache-file=FILE option to use a different cache file; that is
2111# what configure does when it calls configure scripts in
2112# subdirectories, so they share the cache.
2113# Giving --cache-file=/dev/null disables caching, for debugging configure.
2114# config.status only pays attention to the cache file if you give it the
2115# --recheck option to rerun configure.
2116#
2117EOF
2118# The following way of writing the cache mishandles newlines in values,
2119# but we know of no workaround that is simple, portable, and efficient.
2120# So, don't put newlines in cache variables' values.
2121# Ultrix sh set writes to stderr and can't be redirected directly,
2122# and sets the high bit in the cache file unless we assign to the vars.
2123(set) 2>&1 |
2124  case `(ac_space=' '; set | grep ac_space) 2>&1` in
2125  *ac_space=\ *)
2126    # `set' does not quote correctly, so add quotes (double-quote substitution
2127    # turns \\\\ into \\, and sed turns \\ into \).
2128    sed -n \
2129      -e "s/'/'\\\\''/g" \
2130      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2131    ;;
2132  *)
2133    # `set' quotes correctly as required by POSIX, so do not add quotes.
2134    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2135    ;;
2136  esac >> confcache
2137if cmp -s $cache_file confcache; then
2138  :
2139else
2140  if test -w $cache_file; then
2141    echo "updating cache $cache_file"
2142    cat confcache > $cache_file
2143  else
2144    echo "not updating unwritable cache $cache_file"
2145  fi
2146fi
2147rm -f confcache
2148
2149trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2150
2151test "x$prefix" = xNONE && prefix=$ac_default_prefix
2152# Let make expand exec_prefix.
2153test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2154
2155# Any assignment to VPATH causes Sun make to only execute
2156# the first set of double-colon rules, so remove it if not needed.
2157# If there is a colon in the path, we need to keep it.
2158if test "x$srcdir" = x.; then
2159  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
2160fi
2161
2162trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2163
2164# Transform confdefs.h into DEFS.
2165# Protect against shell expansion while executing Makefile rules.
2166# Protect against Makefile macro expansion.
2167#
2168# If the first sed substitution is executed (which looks for macros that
2169# take arguments), then we branch to the quote section.  Otherwise,
2170# look for a macro that doesn't take arguments.
2171cat >confdef2opt.sed <<\_ACEOF
2172t clear
2173: clear
2174s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	(][^ 	(]*([^)]*)\)[ 	]*\(.*\),-D\1=\2,g
2175t quote
2176s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\),-D\1=\2,g
2177t quote
2178d
2179: quote
2180s,[ 	`~#$^&*(){}\\|;'"<>?],\\&,g
2181s,\[,\\&,g
2182s,\],\\&,g
2183s,\$,$$,g
2184p
2185_ACEOF
2186# We use echo to avoid assuming a particular line-breaking character.
2187# The extra dot is to prevent the shell from consuming trailing
2188# line-breaks from the sub-command output.  A line-break within
2189# single-quotes doesn't work because, if this script is created in a
2190# platform that uses two characters for line-breaks (e.g., DOS), tr
2191# would break.
2192ac_LF_and_DOT=`echo; echo .`
2193DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
2194rm -f confdef2opt.sed
2195
2196
2197# Without the "./", some shells look in PATH for config.status.
2198: ${CONFIG_STATUS=./config.status}
2199
2200echo creating $CONFIG_STATUS
2201rm -f $CONFIG_STATUS
2202cat > $CONFIG_STATUS <<EOF
2203#! /bin/sh
2204# Generated automatically by configure.
2205# Run this file to recreate the current configuration.
2206# This directory was configured as follows,
2207# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2208#
2209# $0 $ac_configure_args
2210#
2211# Compiler output produced by configure, useful for debugging
2212# configure, is in ./config.log if it exists.
2213
2214ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2215for ac_option
2216do
2217  case "\$ac_option" in
2218  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2219    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2220    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2221  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2222    echo "$CONFIG_STATUS generated by autoconf version 2.13"
2223    exit 0 ;;
2224  -help | --help | --hel | --he | --h)
2225    echo "\$ac_cs_usage"; exit 0 ;;
2226  *) echo "\$ac_cs_usage"; exit 1 ;;
2227  esac
2228done
2229
2230ac_given_srcdir=$srcdir
2231
2232trap 'rm -fr `echo "Makefile tclConfig.sh tcl.hpj" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2233EOF
2234cat >> $CONFIG_STATUS <<EOF
2235
2236# Protect against being on the right side of a sed subst in config.status.
2237sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2238 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2239$ac_vpsub
2240$extrasub
2241s%@SHELL@%$SHELL%g
2242s%@CFLAGS@%$CFLAGS%g
2243s%@CPPFLAGS@%$CPPFLAGS%g
2244s%@CXXFLAGS@%$CXXFLAGS%g
2245s%@FFLAGS@%$FFLAGS%g
2246s%@DEFS@%$DEFS%g
2247s%@LDFLAGS@%$LDFLAGS%g
2248s%@LIBS@%$LIBS%g
2249s%@exec_prefix@%$exec_prefix%g
2250s%@prefix@%$prefix%g
2251s%@program_transform_name@%$program_transform_name%g
2252s%@bindir@%$bindir%g
2253s%@sbindir@%$sbindir%g
2254s%@libexecdir@%$libexecdir%g
2255s%@datadir@%$datadir%g
2256s%@sysconfdir@%$sysconfdir%g
2257s%@sharedstatedir@%$sharedstatedir%g
2258s%@localstatedir@%$localstatedir%g
2259s%@libdir@%$libdir%g
2260s%@includedir@%$includedir%g
2261s%@oldincludedir@%$oldincludedir%g
2262s%@infodir@%$infodir%g
2263s%@mandir@%$mandir%g
2264s%@CC@%$CC%g
2265s%@AR@%$AR%g
2266s%@RANLIB@%$RANLIB%g
2267s%@RC@%$RC%g
2268s%@SET_MAKE@%$SET_MAKE%g
2269s%@OBJEXT@%$OBJEXT%g
2270s%@EXEEXT@%$EXEEXT%g
2271s%@TCL_THREADS@%$TCL_THREADS%g
2272s%@CYGPATH@%$CYGPATH%g
2273s%@DL_LIBS@%$DL_LIBS%g
2274s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
2275s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
2276s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
2277s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
2278s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
2279s%@CPP@%$CPP%g
2280s%@MAN2TCLFLAGS@%$MAN2TCLFLAGS%g
2281s%@TCL_VERSION@%$TCL_VERSION%g
2282s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
2283s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
2284s%@TCL_PATCH_LEVEL@%$TCL_PATCH_LEVEL%g
2285s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
2286s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
2287s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
2288s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
2289s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
2290s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
2291s%@TCL_STUB_LIB_PATH@%$TCL_STUB_LIB_PATH%g
2292s%@TCL_INCLUDE_SPEC@%$TCL_INCLUDE_SPEC%g
2293s%@TCL_BUILD_STUB_LIB_SPEC@%$TCL_BUILD_STUB_LIB_SPEC%g
2294s%@TCL_BUILD_STUB_LIB_PATH@%$TCL_BUILD_STUB_LIB_PATH%g
2295s%@TCL_DLL_FILE@%$TCL_DLL_FILE%g
2296s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
2297s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
2298s%@TCL_DBGX@%$TCL_DBGX%g
2299s%@CFG_TCL_SHARED_LIB_SUFFIX@%$CFG_TCL_SHARED_LIB_SUFFIX%g
2300s%@CFG_TCL_UNSHARED_LIB_SUFFIX@%$CFG_TCL_UNSHARED_LIB_SUFFIX%g
2301s%@CFG_TCL_EXPORT_FILE_SUFFIX@%$CFG_TCL_EXPORT_FILE_SUFFIX%g
2302s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
2303s%@DEPARG@%$DEPARG%g
2304s%@CC_OBJNAME@%$CC_OBJNAME%g
2305s%@CC_EXENAME@%$CC_EXENAME%g
2306s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
2307s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
2308s%@LDFLAGS_CONSOLE@%$LDFLAGS_CONSOLE%g
2309s%@LDFLAGS_WINDOW@%$LDFLAGS_WINDOW%g
2310s%@STLIB_LD@%$STLIB_LD%g
2311s%@SHLIB_LD@%$SHLIB_LD%g
2312s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
2313s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
2314s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
2315s%@TCL_SHARED_BUILD@%$TCL_SHARED_BUILD%g
2316s%@LIBS_GUI@%$LIBS_GUI%g
2317s%@DLLSUFFIX@%$DLLSUFFIX%g
2318s%@LIBPREFIX@%$LIBPREFIX%g
2319s%@LIBSUFFIX@%$LIBSUFFIX%g
2320s%@EXESUFFIX@%$EXESUFFIX%g
2321s%@LIBRARIES@%$LIBRARIES%g
2322s%@MAKE_LIB@%$MAKE_LIB%g
2323s%@POST_MAKE_LIB@%$POST_MAKE_LIB%g
2324s%@MAKE_DLL@%$MAKE_DLL%g
2325s%@MAKE_EXE@%$MAKE_EXE%g
2326s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
2327s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
2328s%@TCL_NEEDS_EXP_FILE@%$TCL_NEEDS_EXP_FILE%g
2329s%@TCL_BUILD_EXP_FILE@%$TCL_BUILD_EXP_FILE%g
2330s%@TCL_EXP_FILE@%$TCL_EXP_FILE%g
2331s%@LIBOBJS@%$LIBOBJS%g
2332s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
2333s%@TCL_PACKAGE_PATH@%$TCL_PACKAGE_PATH%g
2334s%@TCL_DDE_VERSION@%$TCL_DDE_VERSION%g
2335s%@TCL_DDE_MAJOR_VERSION@%$TCL_DDE_MAJOR_VERSION%g
2336s%@TCL_DDE_MINOR_VERSION@%$TCL_DDE_MINOR_VERSION%g
2337s%@TCL_REG_VERSION@%$TCL_REG_VERSION%g
2338s%@TCL_REG_MAJOR_VERSION@%$TCL_REG_MAJOR_VERSION%g
2339s%@TCL_REG_MINOR_VERSION@%$TCL_REG_MINOR_VERSION%g
2340s%@RC_OUT@%$RC_OUT%g
2341s%@RC_TYPE@%$RC_TYPE%g
2342s%@RC_INCLUDE@%$RC_INCLUDE%g
2343s%@RC_DEFINE@%$RC_DEFINE%g
2344s%@RC_DEFINES@%$RC_DEFINES%g
2345s%@RES@%$RES%g
2346
2347CEOF
2348EOF
2349
2350cat >> $CONFIG_STATUS <<\EOF
2351
2352# Split the substitutions into bite-sized pieces for seds with
2353# small command number limits, like on Digital OSF/1 and HP-UX.
2354ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2355ac_file=1 # Number of current file.
2356ac_beg=1 # First line for current file.
2357ac_end=$ac_max_sed_cmds # Line after last line for current file.
2358ac_more_lines=:
2359ac_sed_cmds=""
2360while $ac_more_lines; do
2361  if test $ac_beg -gt 1; then
2362    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2363  else
2364    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2365  fi
2366  if test ! -s conftest.s$ac_file; then
2367    ac_more_lines=false
2368    rm -f conftest.s$ac_file
2369  else
2370    if test -z "$ac_sed_cmds"; then
2371      ac_sed_cmds="sed -f conftest.s$ac_file"
2372    else
2373      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2374    fi
2375    ac_file=`expr $ac_file + 1`
2376    ac_beg=$ac_end
2377    ac_end=`expr $ac_end + $ac_max_sed_cmds`
2378  fi
2379done
2380if test -z "$ac_sed_cmds"; then
2381  ac_sed_cmds=cat
2382fi
2383EOF
2384
2385cat >> $CONFIG_STATUS <<EOF
2386
2387CONFIG_FILES=\${CONFIG_FILES-"Makefile tclConfig.sh tcl.hpj"}
2388EOF
2389cat >> $CONFIG_STATUS <<\EOF
2390for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2391  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2392  case "$ac_file" in
2393  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2394       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2395  *) ac_file_in="${ac_file}.in" ;;
2396  esac
2397
2398  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2399
2400  # Remove last slash and all that follows it.  Not all systems have dirname.
2401  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2402  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2403    # The file is in a subdirectory.
2404    test ! -d "$ac_dir" && mkdir "$ac_dir"
2405    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2406    # A "../" for each directory in $ac_dir_suffix.
2407    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2408  else
2409    ac_dir_suffix= ac_dots=
2410  fi
2411
2412  case "$ac_given_srcdir" in
2413  .)  srcdir=.
2414      if test -z "$ac_dots"; then top_srcdir=.
2415      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2416  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2417  *) # Relative path.
2418    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2419    top_srcdir="$ac_dots$ac_given_srcdir" ;;
2420  esac
2421
2422
2423  echo creating "$ac_file"
2424  rm -f "$ac_file"
2425  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2426  case "$ac_file" in
2427  *Makefile*) ac_comsub="1i\\
2428# $configure_input" ;;
2429  *) ac_comsub= ;;
2430  esac
2431
2432  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2433  sed -e "$ac_comsub
2434s%@configure_input@%$configure_input%g
2435s%@srcdir@%$srcdir%g
2436s%@top_srcdir@%$top_srcdir%g
2437" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2438fi; done
2439rm -f conftest.s*
2440
2441EOF
2442cat >> $CONFIG_STATUS <<EOF
2443
2444EOF
2445cat >> $CONFIG_STATUS <<\EOF
2446
2447exit 0
2448EOF
2449chmod +x $CONFIG_STATUS
2450rm -fr confdefs* $ac_clean_files
2451test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2452
2453