OSDN Git Service

Updated to tcl 8.4.1
[pf3gnuchains/sourceware.git] / tcl / win / configure
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:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-threads        build with threads"
16 ac_help="$ac_help
17   --enable-shared         build and link with shared libraries [--enable-shared]"
18 ac_help="$ac_help
19   --enable-64bit          enable 64bit support (where applicable)"
20 ac_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.
26 build=NONE
27 cache_file=./config.cache
28 exec_prefix=NONE
29 host=NONE
30 no_create=
31 nonopt=NONE
32 no_recursion=
33 prefix=NONE
34 program_prefix=NONE
35 program_suffix=NONE
36 program_transform_name=s,x,x,
37 silent=
38 site=
39 srcdir=
40 target=NONE
41 verbose=
42 x_includes=NONE
43 x_libraries=NONE
44 bindir='${exec_prefix}/bin'
45 sbindir='${exec_prefix}/sbin'
46 libexecdir='${exec_prefix}/libexec'
47 datadir='${prefix}/share'
48 sysconfdir='${prefix}/etc'
49 sharedstatedir='${prefix}/com'
50 localstatedir='${prefix}/var'
51 libdir='${exec_prefix}/lib'
52 includedir='${prefix}/include'
53 oldincludedir='/usr/include'
54 infodir='${prefix}/info'
55 mandir='${prefix}/man'
56
57 # Initialize some other variables.
58 subdirs=
59 MFLAGS= MAKEFLAGS=
60 SHELL=${CONFIG_SHELL-/bin/sh}
61 # Maximum number of lines to put in a shell here document.
62 ac_max_here_lines=12
63
64 ac_prev=
65 for ac_option
66 do
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
146 Usage: configure [options] [host]
147 Options: [defaults in brackets after descriptions]
148 Configuration:
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
154 Directory 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
178 EOF
179     cat << EOF
180 Host 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]
184 Features 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
191 EOF
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
401 done
402
403 if test -n "$ac_prev"; then
404   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
405 fi
406
407 trap '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
417 if test "$silent" = yes; then
418   exec 6>/dev/null
419 else
420   exec 6>&1
421 fi
422 exec 5>./config.log
423
424 echo "\
425 This file contains any messages produced by compilers while
426 running 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.
431 ac_configure_args=
432 for ac_arg
433 do
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
443 done
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.
450 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
451 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
452 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
453 if 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.
456 rm -rf conftest* confdefs.h
457 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
458 echo > 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.
462 ac_unique_file=../generic/tcl.h
463
464 # Find the source files, if location was not specified.
465 if 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
475 else
476   ac_srcdir_defaulted=no
477 fi
478 if 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
484 fi
485 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
486
487 # Prefer explicitly selected file to automatically selected ones.
488 if 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
494 fi
495 for 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
500 done
501
502 if test -r "$cache_file"; then
503   echo "loading cache $cache_file"
504   . $cache_file
505 else
506   echo "creating cache $cache_file"
507   > $cache_file
508 fi
509
510 ac_ext=c
511 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
512 ac_cpp='$CPP $CPPFLAGS'
513 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
514 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
515 cross_compiling=$ac_cv_prog_cc_cross
516
517 ac_exeext=
518 ac_objext=o
519 if (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
527 else
528   ac_n= ac_c='\c' ac_t=
529 fi
530
531
532
533
534 TCL_VERSION=8.4
535 TCL_MAJOR_VERSION=8
536 TCL_MINOR_VERSION=4
537 TCL_PATCH_LEVEL=".1"
538 VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
539
540 TCL_DDE_VERSION=1.2
541 TCL_DDE_MAJOR_VERSION=1
542 TCL_DDE_MINOR_VERSION=2
543 TCL_DDE_PATCH_LEVEL=""
544 DDEVER=$TCL_DDE_MAJOR_VERSION$TCL_DDE_MINOR_VERSION
545
546 TCL_REG_VERSION=1.1
547 TCL_REG_MAJOR_VERSION=1
548 TCL_REG_MINOR_VERSION=1
549 TCL_REG_PATCH_LEVEL=""
550 REGVER=$TCL_REG_MAJOR_VERSION$TCL_REG_MINOR_VERSION
551
552 #------------------------------------------------------------------------
553 # Handle the --prefix=... option
554 #------------------------------------------------------------------------
555
556 if test "${prefix}" = "NONE"; then
557     prefix=/usr/local
558 fi
559 if test "${exec_prefix}" = "NONE"; then
560     exec_prefix=$prefix
561 fi
562 # libdir must be a fully qualified path (not ${exec_prefix}/lib)
563 eval libdir="$libdir"
564
565 #------------------------------------------------------------------------
566 # Standard compiler checks
567 #------------------------------------------------------------------------
568
569 # If the user did not set CFLAGS, set it now to keep
570 # the AC_PROG_CC macro from adding "-g -O2".
571 if test "${CFLAGS+set}" != "set" ; then
572     CFLAGS=""
573 fi
574
575 # Extract the first word of "gcc", so it can be a program name with args.
576 set dummy gcc; ac_word=$2
577 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
578 echo "configure:579: checking for $ac_word" >&5
579 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
580   echo $ac_n "(cached) $ac_c" 1>&6
581 else
582   if test -n "$CC"; then
583   ac_cv_prog_CC="$CC" # Let the user override the test.
584 else
585   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
586   ac_dummy="$PATH"
587   for ac_dir in $ac_dummy; do
588     test -z "$ac_dir" && ac_dir=.
589     if test -f $ac_dir/$ac_word; then
590       ac_cv_prog_CC="gcc"
591       break
592     fi
593   done
594   IFS="$ac_save_ifs"
595 fi
596 fi
597 CC="$ac_cv_prog_CC"
598 if test -n "$CC"; then
599   echo "$ac_t""$CC" 1>&6
600 else
601   echo "$ac_t""no" 1>&6
602 fi
603
604 if test -z "$CC"; then
605   # Extract the first word of "cc", so it can be a program name with args.
606 set dummy cc; ac_word=$2
607 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
608 echo "configure:609: checking for $ac_word" >&5
609 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
610   echo $ac_n "(cached) $ac_c" 1>&6
611 else
612   if test -n "$CC"; then
613   ac_cv_prog_CC="$CC" # Let the user override the test.
614 else
615   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
616   ac_prog_rejected=no
617   ac_dummy="$PATH"
618   for ac_dir in $ac_dummy; do
619     test -z "$ac_dir" && ac_dir=.
620     if test -f $ac_dir/$ac_word; then
621       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
622         ac_prog_rejected=yes
623         continue
624       fi
625       ac_cv_prog_CC="cc"
626       break
627     fi
628   done
629   IFS="$ac_save_ifs"
630 if test $ac_prog_rejected = yes; then
631   # We found a bogon in the path, so make sure we never use it.
632   set dummy $ac_cv_prog_CC
633   shift
634   if test $# -gt 0; then
635     # We chose a different compiler from the bogus one.
636     # However, it has the same basename, so the bogon will be chosen
637     # first if we set CC to just the basename; use the full file name.
638     shift
639     set dummy "$ac_dir/$ac_word" "$@"
640     shift
641     ac_cv_prog_CC="$@"
642   fi
643 fi
644 fi
645 fi
646 CC="$ac_cv_prog_CC"
647 if test -n "$CC"; then
648   echo "$ac_t""$CC" 1>&6
649 else
650   echo "$ac_t""no" 1>&6
651 fi
652
653   if test -z "$CC"; then
654     case "`uname -s`" in
655     *win32* | *WIN32*)
656       # Extract the first word of "cl", so it can be a program name with args.
657 set dummy cl; ac_word=$2
658 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
659 echo "configure:660: checking for $ac_word" >&5
660 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
661   echo $ac_n "(cached) $ac_c" 1>&6
662 else
663   if test -n "$CC"; then
664   ac_cv_prog_CC="$CC" # Let the user override the test.
665 else
666   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
667   ac_dummy="$PATH"
668   for ac_dir in $ac_dummy; do
669     test -z "$ac_dir" && ac_dir=.
670     if test -f $ac_dir/$ac_word; then
671       ac_cv_prog_CC="cl"
672       break
673     fi
674   done
675   IFS="$ac_save_ifs"
676 fi
677 fi
678 CC="$ac_cv_prog_CC"
679 if test -n "$CC"; then
680   echo "$ac_t""$CC" 1>&6
681 else
682   echo "$ac_t""no" 1>&6
683 fi
684  ;;
685     esac
686   fi
687   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
688 fi
689
690 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
691 echo "configure:692: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
692
693 ac_ext=c
694 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
695 ac_cpp='$CPP $CPPFLAGS'
696 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
697 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
698 cross_compiling=$ac_cv_prog_cc_cross
699
700 cat > conftest.$ac_ext << EOF
701
702 #line 703 "configure"
703 #include "confdefs.h"
704
705 main(){return(0);}
706 EOF
707 if { (eval echo configure:708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
708   ac_cv_prog_cc_works=yes
709   # If we can't run a trivial program, we are probably using a cross compiler.
710   if (./conftest; exit) 2>/dev/null; then
711     ac_cv_prog_cc_cross=no
712   else
713     ac_cv_prog_cc_cross=yes
714   fi
715 else
716   echo "configure: failed program was:" >&5
717   cat conftest.$ac_ext >&5
718   ac_cv_prog_cc_works=no
719 fi
720 rm -fr conftest*
721 ac_ext=c
722 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
723 ac_cpp='$CPP $CPPFLAGS'
724 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
725 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
726 cross_compiling=$ac_cv_prog_cc_cross
727
728 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
729 if test $ac_cv_prog_cc_works = no; then
730   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
731 fi
732 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
733 echo "configure:734: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
734 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
735 cross_compiling=$ac_cv_prog_cc_cross
736
737 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
738 echo "configure:739: checking whether we are using GNU C" >&5
739 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
740   echo $ac_n "(cached) $ac_c" 1>&6
741 else
742   cat > conftest.c <<EOF
743 #ifdef __GNUC__
744   yes;
745 #endif
746 EOF
747 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
748   ac_cv_prog_gcc=yes
749 else
750   ac_cv_prog_gcc=no
751 fi
752 fi
753
754 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
755
756 if test $ac_cv_prog_gcc = yes; then
757   GCC=yes
758 else
759   GCC=
760 fi
761
762 ac_test_CFLAGS="${CFLAGS+set}"
763 ac_save_CFLAGS="$CFLAGS"
764 CFLAGS=
765 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
766 echo "configure:767: checking whether ${CC-cc} accepts -g" >&5
767 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
768   echo $ac_n "(cached) $ac_c" 1>&6
769 else
770   echo 'void f(){}' > conftest.c
771 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
772   ac_cv_prog_cc_g=yes
773 else
774   ac_cv_prog_cc_g=no
775 fi
776 rm -f conftest*
777
778 fi
779
780 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
781 if test "$ac_test_CFLAGS" = set; then
782   CFLAGS="$ac_save_CFLAGS"
783 elif test $ac_cv_prog_cc_g = yes; then
784   if test "$GCC" = yes; then
785     CFLAGS="-g -O2"
786   else
787     CFLAGS="-g"
788   fi
789 else
790   if test "$GCC" = yes; then
791     CFLAGS="-O2"
792   else
793     CFLAGS=
794   fi
795 fi
796
797
798 # To properly support cross-compilation, one would
799 # need to use these tool checks instead of
800 # the ones below and reconfigure with
801 # autoconf 2.50. You can also just set
802 # the CC, AR, RANLIB, and RC environment
803 # variables if you want to cross compile.
804
805 if test "${GCC}" = "yes" ; then
806     # Extract the first word of "ar", so it can be a program name with args.
807 set dummy ar; ac_word=$2
808 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
809 echo "configure:810: checking for $ac_word" >&5
810 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
811   echo $ac_n "(cached) $ac_c" 1>&6
812 else
813   if test -n "$AR"; then
814   ac_cv_prog_AR="$AR" # Let the user override the test.
815 else
816   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
817   ac_dummy="$PATH"
818   for ac_dir in $ac_dummy; do
819     test -z "$ac_dir" && ac_dir=.
820     if test -f $ac_dir/$ac_word; then
821       ac_cv_prog_AR="ar"
822       break
823     fi
824   done
825   IFS="$ac_save_ifs"
826 fi
827 fi
828 AR="$ac_cv_prog_AR"
829 if test -n "$AR"; then
830   echo "$ac_t""$AR" 1>&6
831 else
832   echo "$ac_t""no" 1>&6
833 fi
834
835     # Extract the first word of "ranlib", so it can be a program name with args.
836 set dummy ranlib; ac_word=$2
837 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
838 echo "configure:839: checking for $ac_word" >&5
839 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
840   echo $ac_n "(cached) $ac_c" 1>&6
841 else
842   if test -n "$RANLIB"; then
843   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
844 else
845   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
846   ac_dummy="$PATH"
847   for ac_dir in $ac_dummy; do
848     test -z "$ac_dir" && ac_dir=.
849     if test -f $ac_dir/$ac_word; then
850       ac_cv_prog_RANLIB="ranlib"
851       break
852     fi
853   done
854   IFS="$ac_save_ifs"
855 fi
856 fi
857 RANLIB="$ac_cv_prog_RANLIB"
858 if test -n "$RANLIB"; then
859   echo "$ac_t""$RANLIB" 1>&6
860 else
861   echo "$ac_t""no" 1>&6
862 fi
863
864     # Extract the first word of "windres", so it can be a program name with args.
865 set dummy windres; ac_word=$2
866 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
867 echo "configure:868: checking for $ac_word" >&5
868 if eval "test \"`echo '$''{'ac_cv_prog_RC'+set}'`\" = set"; then
869   echo $ac_n "(cached) $ac_c" 1>&6
870 else
871   if test -n "$RC"; then
872   ac_cv_prog_RC="$RC" # Let the user override the test.
873 else
874   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
875   ac_dummy="$PATH"
876   for ac_dir in $ac_dummy; do
877     test -z "$ac_dir" && ac_dir=.
878     if test -f $ac_dir/$ac_word; then
879       ac_cv_prog_RC="windres"
880       break
881     fi
882   done
883   IFS="$ac_save_ifs"
884 fi
885 fi
886 RC="$ac_cv_prog_RC"
887 if test -n "$RC"; then
888   echo "$ac_t""$RC" 1>&6
889 else
890   echo "$ac_t""no" 1>&6
891 fi
892
893 fi
894
895 #--------------------------------------------------------------------
896 # Checks to see if the make progeam sets the $MAKE variable.
897 #--------------------------------------------------------------------
898
899 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
900 echo "configure:901: checking whether ${MAKE-make} sets \${MAKE}" >&5
901 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
902 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
903   echo $ac_n "(cached) $ac_c" 1>&6
904 else
905   cat > conftestmake <<\EOF
906 all:
907         @echo 'ac_maketemp="${MAKE}"'
908 EOF
909 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
910 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
911 if test -n "$ac_maketemp"; then
912   eval ac_cv_prog_make_${ac_make}_set=yes
913 else
914   eval ac_cv_prog_make_${ac_make}_set=no
915 fi
916 rm -f conftestmake
917 fi
918 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
919   echo "$ac_t""yes" 1>&6
920   SET_MAKE=
921 else
922   echo "$ac_t""no" 1>&6
923   SET_MAKE="MAKE=${MAKE-make}"
924 fi
925
926
927 #--------------------------------------------------------------------
928 # Perform additinal compiler tests.
929 #--------------------------------------------------------------------
930
931 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
932 echo "configure:933: checking for Cygwin environment" >&5
933 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
934   echo $ac_n "(cached) $ac_c" 1>&6
935 else
936   cat > conftest.$ac_ext <<EOF
937 #line 938 "configure"
938 #include "confdefs.h"
939
940 int main() {
941
942 #ifndef __CYGWIN__
943 #define __CYGWIN__ __CYGWIN32__
944 #endif
945 return __CYGWIN__;
946 ; return 0; }
947 EOF
948 if { (eval echo configure:949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
949   rm -rf conftest*
950   ac_cv_cygwin=yes
951 else
952   echo "configure: failed program was:" >&5
953   cat conftest.$ac_ext >&5
954   rm -rf conftest*
955   ac_cv_cygwin=no
956 fi
957 rm -f conftest*
958 rm -f conftest*
959 fi
960
961 echo "$ac_t""$ac_cv_cygwin" 1>&6
962 CYGWIN=
963 test "$ac_cv_cygwin" = yes && CYGWIN=yes
964
965 #if test "$ac_cv_cygwin" = "yes" ; then
966 #    AC_MSG_ERROR([Compiling with the Cygwin version of gcc is not supported.
967 #    Use the Mingw version of gcc from www.mingw.org instead.])
968 #fi
969
970
971 echo $ac_n "checking for SEH support in compiler""... $ac_c" 1>&6
972 echo "configure:973: checking for SEH support in compiler" >&5
973 if eval "test \"`echo '$''{'tcl_cv_seh'+set}'`\" = set"; then
974   echo $ac_n "(cached) $ac_c" 1>&6
975 else
976   if test "$cross_compiling" = yes; then
977   tcl_cv_seh=no
978 else
979   cat > conftest.$ac_ext <<EOF
980 #line 981 "configure"
981 #include "confdefs.h"
982
983 #define WIN32_LEAN_AND_MEAN
984 #include <windows.h>
985 #undef WIN32_LEAN_AND_MEAN
986
987 int main(int argc, char** argv) {
988     int a, b = 0;
989     __try {
990         a = 666 / b;
991     }
992     __except (EXCEPTION_EXECUTE_HANDLER) {
993         return 0;
994     }
995     return 1;
996 }
997
998 EOF
999 if { (eval echo configure:1000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1000 then
1001   tcl_cv_seh=yes
1002 else
1003   echo "configure: failed program was:" >&5
1004   cat conftest.$ac_ext >&5
1005   rm -fr conftest*
1006   tcl_cv_seh=no
1007 fi
1008 rm -fr conftest*
1009 fi
1010
1011
1012 fi
1013
1014 echo "$ac_t""$tcl_cv_seh" 1>&6
1015 if test "$tcl_cv_seh" = "no" ; then
1016     cat >> confdefs.h <<\EOF
1017 #define HAVE_NO_SEH 1
1018 EOF
1019
1020 fi
1021
1022 #
1023 # Check to see if the excpt.h include file provided contains the
1024 # definition for EXCEPTION_DISPOSITION; if not, which is the case
1025 # with Cygwin's version as of 2002-04-10, define it to be int, 
1026 # sufficient for getting the current code to work.
1027 #
1028 echo $ac_n "checking for EXCEPTION_DISPOSITION support in include files""... $ac_c" 1>&6
1029 echo "configure:1030: checking for EXCEPTION_DISPOSITION support in include files" >&5
1030 if eval "test \"`echo '$''{'tcl_cv_eh_disposition'+set}'`\" = set"; then
1031   echo $ac_n "(cached) $ac_c" 1>&6
1032 else
1033   cat > conftest.$ac_ext <<EOF
1034 #line 1035 "configure"
1035 #include "confdefs.h"
1036
1037 #define WIN32_LEAN_AND_MEAN
1038 #include <windows.h>
1039 #undef WIN32_LEAN_AND_MEAN
1040
1041 int main() {
1042
1043   EXCEPTION_DISPOSITION x;
1044
1045 ; return 0; }
1046 EOF
1047 if { (eval echo configure:1048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1048   rm -rf conftest*
1049   tcl_cv_eh_disposition=yes
1050 else
1051   echo "configure: failed program was:" >&5
1052   cat conftest.$ac_ext >&5
1053   rm -rf conftest*
1054   tcl_cv_eh_disposition=no
1055 fi
1056 rm -f conftest*
1057
1058 fi
1059
1060 echo "$ac_t""$tcl_cv_eh_disposition" 1>&6
1061 if test "$tcl_cv_eh_disposition" = "no" ; then
1062     cat >> confdefs.h <<\EOF
1063 #define EXCEPTION_DISPOSITION int
1064 EOF
1065
1066 fi
1067
1068 #--------------------------------------------------------------------
1069 # Determines the correct binary file extension (.o, .obj, .exe etc.)
1070 #--------------------------------------------------------------------
1071
1072 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1073 echo "configure:1074: checking for object suffix" >&5
1074 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1075   echo $ac_n "(cached) $ac_c" 1>&6
1076 else
1077   rm -f conftest*
1078 echo 'int i = 1;' > conftest.$ac_ext
1079 if { (eval echo configure:1080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1080   for ac_file in conftest.*; do
1081     case $ac_file in
1082     *.c) ;;
1083     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1084     esac
1085   done
1086 else
1087   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1088 fi
1089 rm -f conftest*
1090 fi
1091
1092 echo "$ac_t""$ac_cv_objext" 1>&6
1093 OBJEXT=$ac_cv_objext
1094 ac_objext=$ac_cv_objext
1095
1096 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1097 echo "configure:1098: checking for mingw32 environment" >&5
1098 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1099   echo $ac_n "(cached) $ac_c" 1>&6
1100 else
1101   cat > conftest.$ac_ext <<EOF
1102 #line 1103 "configure"
1103 #include "confdefs.h"
1104
1105 int main() {
1106 return __MINGW32__;
1107 ; return 0; }
1108 EOF
1109 if { (eval echo configure:1110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1110   rm -rf conftest*
1111   ac_cv_mingw32=yes
1112 else
1113   echo "configure: failed program was:" >&5
1114   cat conftest.$ac_ext >&5
1115   rm -rf conftest*
1116   ac_cv_mingw32=no
1117 fi
1118 rm -f conftest*
1119 rm -f conftest*
1120 fi
1121
1122 echo "$ac_t""$ac_cv_mingw32" 1>&6
1123 MINGW32=
1124 test "$ac_cv_mingw32" = yes && MINGW32=yes
1125
1126
1127 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1128 echo "configure:1129: checking for executable suffix" >&5
1129 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1130   echo $ac_n "(cached) $ac_c" 1>&6
1131 else
1132   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1133   ac_cv_exeext=.exe
1134 else
1135   rm -f conftest*
1136   echo 'int main () { return 0; }' > conftest.$ac_ext
1137   ac_cv_exeext=
1138   if { (eval echo configure:1139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1139     for file in conftest.*; do
1140       case $file in
1141       *.c | *.o | *.obj) ;;
1142       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1143       esac
1144     done
1145   else
1146     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1147   fi
1148   rm -f conftest*
1149   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1150 fi
1151 fi
1152
1153 EXEEXT=""
1154 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1155 echo "$ac_t""${ac_cv_exeext}" 1>&6
1156 ac_exeext=$EXEEXT
1157
1158
1159 #--------------------------------------------------------------------
1160 # Check whether --enable-threads or --disable-threads was given.
1161 #--------------------------------------------------------------------
1162
1163
1164     echo $ac_n "checking for building with threads""... $ac_c" 1>&6
1165 echo "configure:1166: checking for building with threads" >&5
1166     # Check whether --enable-threads or --disable-threads was given.
1167 if test "${enable_threads+set}" = set; then
1168   enableval="$enable_threads"
1169   tcl_ok=$enableval
1170 else
1171   tcl_ok=no
1172 fi
1173
1174
1175     if test "$tcl_ok" = "yes"; then
1176         echo "$ac_t""yes" 1>&6
1177         TCL_THREADS=1
1178         cat >> confdefs.h <<\EOF
1179 #define TCL_THREADS 1
1180 EOF
1181
1182         # USE_THREAD_ALLOC tells us to try the special thread-based
1183         # allocator that significantly reduces lock contention
1184         cat >> confdefs.h <<\EOF
1185 #define USE_THREAD_ALLOC 1
1186 EOF
1187
1188     else
1189         TCL_THREADS=0
1190         echo "$ac_t""no (default)" 1>&6
1191     fi
1192     
1193
1194
1195 #--------------------------------------------------------------------
1196 # The statements below define a collection of symbols related to
1197 # building libtcl as a shared library instead of a static library.
1198 #--------------------------------------------------------------------
1199
1200
1201     echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
1202 echo "configure:1203: checking how to build libraries" >&5
1203     # Check whether --enable-shared or --disable-shared was given.
1204 if test "${enable_shared+set}" = set; then
1205   enableval="$enable_shared"
1206   tcl_ok=$enableval
1207 else
1208   tcl_ok=yes
1209 fi
1210
1211
1212     if test "${enable_shared+set}" = set; then
1213         enableval="$enable_shared"
1214         tcl_ok=$enableval
1215     else
1216         tcl_ok=yes
1217     fi
1218
1219     if test "$tcl_ok" = "yes" ; then
1220         echo "$ac_t""shared" 1>&6
1221         SHARED_BUILD=1
1222     else
1223         echo "$ac_t""static" 1>&6
1224         SHARED_BUILD=0
1225         cat >> confdefs.h <<\EOF
1226 #define STATIC_BUILD 1
1227 EOF
1228
1229     fi
1230
1231
1232 #--------------------------------------------------------------------
1233 # The statements below define a collection of compile flags.  This 
1234 # macro depends on the value of SHARED_BUILD, and should be called
1235 # after SC_ENABLE_SHARED checks the configure switches.
1236 #--------------------------------------------------------------------
1237
1238
1239
1240     # Step 0: Enable 64 bit support?
1241
1242     echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6
1243 echo "configure:1244: checking if 64bit support is requested" >&5
1244     # Check whether --enable-64bit or --disable-64bit was given.
1245 if test "${enable_64bit+set}" = set; then
1246   enableval="$enable_64bit"
1247   do64bit=$enableval
1248 else
1249   do64bit=no
1250 fi
1251
1252     echo "$ac_t""$do64bit" 1>&6
1253
1254     # Set some defaults (may get changed below)
1255     EXTRA_CFLAGS=""
1256
1257     # Extract the first word of "cygpath", so it can be a program name with args.
1258 set dummy cygpath; ac_word=$2
1259 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1260 echo "configure:1261: checking for $ac_word" >&5
1261 if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
1262   echo $ac_n "(cached) $ac_c" 1>&6
1263 else
1264   if test -n "$CYGPATH"; then
1265   ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1266 else
1267   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1268   ac_dummy="$PATH"
1269   for ac_dir in $ac_dummy; do
1270     test -z "$ac_dir" && ac_dir=.
1271     if test -f $ac_dir/$ac_word; then
1272       ac_cv_prog_CYGPATH="cygpath -w"
1273       break
1274     fi
1275   done
1276   IFS="$ac_save_ifs"
1277   test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1278 fi
1279 fi
1280 CYGPATH="$ac_cv_prog_CYGPATH"
1281 if test -n "$CYGPATH"; then
1282   echo "$ac_t""$CYGPATH" 1>&6
1283 else
1284   echo "$ac_t""no" 1>&6
1285 fi
1286
1287
1288     # Check for a bug in gcc's windres that causes the
1289     # compile to fail when a Windows native path is
1290     # passed into windres. The mingw toolchain requires
1291     # Windows native paths while Cygwin should work
1292     # with both. Avoid the bug by passing a POSIX
1293     # path when using the Cygwin toolchain.
1294
1295     if test "$GCC" = "yes" && test "$CYGPATH" != "echo" ; then
1296         conftest=/tmp/conftest.rc
1297         echo "STRINGTABLE BEGIN" > $conftest
1298         echo "101 \"name\"" >> $conftest
1299         echo "END" >> $conftest
1300
1301         echo $ac_n "checking for Windows native path bug in windres""... $ac_c" 1>&6
1302 echo "configure:1303: checking for Windows native path bug in windres" >&5
1303         cyg_conftest=`$CYGPATH $conftest`
1304         if { ac_try='$RC -o conftest.res.o $cyg_conftest'; { (eval echo configure:1305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } ; then
1305             echo "$ac_t""no" 1>&6
1306         else
1307             echo "$ac_t""yes" 1>&6
1308             CYGPATH=echo
1309         fi
1310         conftest=
1311         cyg_conftest=
1312     fi
1313
1314     if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then
1315         DEPARG='"$<"'
1316     else
1317         DEPARG='"$(shell $(CYGPATH) $<)"'
1318     fi
1319
1320     # set various compiler flags depending on whether we are using gcc or cl
1321
1322     echo $ac_n "checking compiler flags""... $ac_c" 1>&6
1323 echo "configure:1324: checking compiler flags" >&5
1324     if test "${GCC}" = "yes" ; then
1325         if test "$do64bit" = "yes" ; then
1326             echo "configure: warning: "64bit mode not supported with GCC on Windows"" 1>&2
1327         fi
1328         SHLIB_LD=""
1329         SHLIB_LD_LIBS=""
1330         LIBS=""
1331         LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32"
1332         STLIB_LD='${AR} cr'
1333         RC_OUT=-o
1334         RC_TYPE=
1335         RC_INCLUDE=--include
1336         RC_DEFINE=--define
1337         RES=res.o
1338         MAKE_LIB="\${STLIB_LD} \$@"
1339         POST_MAKE_LIB="\${RANLIB} \$@"
1340         MAKE_EXE="\${CC} -o \$@"
1341         LIBPREFIX="lib"
1342
1343         #if test "$ac_cv_cygwin" = "yes"; then
1344         #    extra_cflags="-mno-cygwin"
1345         #    extra_ldflags="-mno-cygwin"
1346         #else
1347         #    extra_cflags=""
1348         #    extra_ldflags=""
1349         #fi
1350
1351         if test "$ac_cv_cygwin" = "yes"; then
1352           touch ac$$.c
1353           if ${CC} -c -mwin32 ac$$.c >/dev/null 2>&1; then
1354             case "$extra_cflags" in
1355               *-mwin32*) ;;
1356               *) extra_cflags="-mwin32 $extra_cflags" ;;
1357             esac
1358             case "$extra_ldflags" in
1359               *-mwin32*) ;;
1360               *) extra_ldflags="-mwin32 $extra_ldflags" ;;
1361             esac
1362           fi
1363           rm -f ac$$.o ac$$.c
1364         else
1365           extra_cflags=''
1366           extra_ldflags=''
1367         fi
1368
1369         if test "${SHARED_BUILD}" = "0" ; then
1370             # static
1371             echo "$ac_t""using static flags" 1>&6
1372             runtime=
1373             MAKE_DLL="echo "
1374             LIBSUFFIX="s\${DBGX}.a"
1375             LIBRARIES="\${STATIC_LIBRARIES}"
1376             EXESUFFIX="s\${DBGX}.exe"
1377         else
1378             # dynamic
1379             echo "$ac_t""using shared flags" 1>&6
1380
1381             # ad-hoc check to see if CC supports -shared.
1382             if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then
1383                 { echo "configure: error: ${CC} does not support the -shared option.
1384                 You will need to upgrade to a newer version of the toolchain." 1>&2; exit 1; }
1385             fi
1386
1387             runtime=
1388             # Link with gcc since ld does not link to default libs like
1389             # -luser32 and -lmsvcrt by default. Make sure CFLAGS is
1390             # included so -mno-cygwin passed the correct libs to the linker.
1391             SHLIB_LD='${CC} -shared ${CFLAGS}'
1392             # Add SHLIB_LD_LIBS to the Make rule, not here.
1393             MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \$@ ${extra_ldflags} \
1394                 -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\$@)"
1395
1396             LIBSUFFIX="\${DBGX}.a"
1397             EXESUFFIX="\${DBGX}.exe"
1398             LIBRARIES="\${SHARED_LIBRARIES}"
1399         fi
1400         # DLLSUFFIX is separate because it is the building block for
1401         # users of tclConfig.sh that may build shared or static.
1402         DLLSUFFIX="\${DBGX}.dll"
1403
1404         EXTRA_CFLAGS="${extra_cflags}"
1405
1406         CFLAGS_DEBUG=-g
1407         CFLAGS_OPTIMIZE=-O
1408         CFLAGS_WARNING="-Wall -Wconversion"
1409         LDFLAGS_DEBUG=
1410         LDFLAGS_OPTIMIZE=
1411
1412         # Specify the CC output file names based on the target name
1413         CC_OBJNAME="-o \$@"
1414         CC_EXENAME="-o \$@"
1415
1416         # Specify linker flags depending on the type of app being 
1417         # built -- Console vs. Window.
1418         #
1419         # ORIGINAL COMMENT:
1420         # We need to pass -e _WinMain@16 so that ld will use
1421         # WinMain() instead of main() as the entry point. We can't
1422         # use autoconf to check for this case since it would need
1423         # to run an executable and that does not work when
1424         # cross compiling. Remove this -e workaround once we
1425         # require a gcc that does not have this bug.
1426         #
1427         # MK NOTE: Tk should use a different mechanism. This causes 
1428         # interesting problems, such as wish dying at startup.
1429         #LDFLAGS_WINDOW="-mwindows -e _WinMain@16 ${extra_ldflags}"
1430         LDFLAGS_CONSOLE="-mconsole ${extra_ldflags}"
1431         LDFLAGS_WINDOW="-mwindows ${extra_ldflags}"
1432     else
1433         if test "${SHARED_BUILD}" = "0" ; then
1434             # static
1435             echo "$ac_t""using static flags" 1>&6
1436             runtime=-MT
1437             MAKE_DLL="echo "
1438             LIBSUFFIX="s\${DBGX}.lib"
1439             LIBRARIES="\${STATIC_LIBRARIES}"
1440             EXESUFFIX="s\${DBGX}.exe"
1441         else
1442             # dynamic
1443             echo "$ac_t""using shared flags" 1>&6
1444             runtime=-MD
1445             # Add SHLIB_LD_LIBS to the Make rule, not here.
1446             MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@"
1447             LIBSUFFIX="\${DBGX}.lib"
1448             EXESUFFIX="\${DBGX}.exe"
1449             LIBRARIES="\${SHARED_LIBRARIES}"
1450         fi
1451         # DLLSUFFIX is separate because it is the building block for
1452         # users of tclConfig.sh that may build shared or static.
1453         DLLSUFFIX="\${DBGX}.dll"
1454
1455         # This is a 2-stage check to make sure we have the 64-bit SDK
1456         # We have to know where the SDK is installed.
1457         if test "$do64bit" = "yes" ; then
1458             if test "x${MSSDK}x" = "xx" ; then
1459                 MSSDK="C:/Progra~1/Microsoft SDK"
1460             fi
1461             # In order to work in the tortured autoconf environment,
1462             # we need to ensure that this path has no spaces
1463             MSSDK=$(cygpath -w -s "$MSSDK" | sed -e 's!\\!/!g')
1464             if test ! -d "${MSSDK}/bin/win64" ; then
1465                 echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
1466                 do64bit="no"
1467             fi
1468         fi
1469
1470         if test "$do64bit" = "yes" ; then
1471             # All this magic is necessary for the Win64 SDK RC1 - hobbs
1472             CC="${MSSDK}/Bin/Win64/cl.exe \
1473         -I${MSSDK}/Include/prerelease \
1474         -I${MSSDK}/Include/Win64/crt \
1475         -I${MSSDK}/Include/Win64/crt/sys \
1476         -I${MSSDK}/Include"
1477             RC="${MSSDK}/bin/rc.exe"
1478             CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d"
1479             CFLAGS_OPTIMIZE="-nologo -O2 -Gs ${runtime}"
1480             lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
1481         -LIBPATH:${MSSDK}/Lib/Prerelease/IA64"
1482             STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
1483             LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
1484         else
1485             RC="rc"
1486             CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d"
1487             CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}"
1488             STLIB_LD="lib -nologo"
1489             LINKBIN="link -link50compat"
1490         fi
1491
1492         SHLIB_LD="${LINKBIN} -dll -nologo -incremental:no"
1493         SHLIB_LD_LIBS="user32.lib advapi32.lib"
1494         LIBS="user32.lib advapi32.lib"
1495         LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib comctl32.lib"
1496         RC_OUT=-fo
1497         RC_TYPE=-r
1498         RC_INCLUDE=-i
1499         RC_DEFINE=-d
1500         RES=res
1501         MAKE_LIB="\${STLIB_LD} -out:\$@"
1502         POST_MAKE_LIB=
1503         MAKE_EXE="\${CC} -Fe\$@"
1504         LIBPREFIX=""
1505
1506         EXTRA_CFLAGS="-YX"
1507         CFLAGS_WARNING="-W3"
1508         LDFLAGS_DEBUG="-debug:full -debugtype:both"
1509         LDFLAGS_OPTIMIZE="-release"
1510         
1511         # Specify the CC output file names based on the target name
1512         CC_OBJNAME="-Fo\$@"
1513         CC_EXENAME="-Fe\"\$(shell \$(CYGPATH) '\$@')\""
1514
1515         # Specify linker flags depending on the type of app being 
1516         # built -- Console vs. Window.
1517         LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
1518         LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
1519     fi
1520
1521     # DL_LIBS is empty, but then we match the Unix version
1522     
1523     
1524     
1525     
1526
1527
1528 #--------------------------------------------------------------------
1529 # Set the default compiler switches based on the --enable-symbols 
1530 # option.  This macro depends on C flags, and should be called
1531 # after SC_CONFIG_CFLAGS macro is called.
1532 #--------------------------------------------------------------------
1533
1534
1535     echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
1536 echo "configure:1537: checking for build with symbols" >&5
1537     # Check whether --enable-symbols or --disable-symbols was given.
1538 if test "${enable_symbols+set}" = set; then
1539   enableval="$enable_symbols"
1540   tcl_ok=$enableval
1541 else
1542   tcl_ok=no
1543 fi
1544
1545 # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
1546     if test "$tcl_ok" = "no"; then
1547         CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
1548         LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
1549         DBGX=""
1550         echo "$ac_t""no" 1>&6
1551     else
1552         CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
1553         LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
1554         DBGX=g
1555         if test "$tcl_ok" = "yes"; then
1556             echo "$ac_t""yes (standard debugging)" 1>&6
1557         fi
1558     fi
1559     
1560     
1561
1562     if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
1563         cat >> confdefs.h <<\EOF
1564 #define TCL_MEM_DEBUG 1
1565 EOF
1566
1567     fi
1568
1569     if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
1570         cat >> confdefs.h <<\EOF
1571 #define TCL_COMPILE_DEBUG 1
1572 EOF
1573
1574         cat >> confdefs.h <<\EOF
1575 #define TCL_COMPILE_STATS 1
1576 EOF
1577
1578     fi
1579
1580     if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
1581         if test "$tcl_ok" = "all"; then
1582             echo "$ac_t""enabled symbols mem compile debugging" 1>&6
1583         else
1584             echo "$ac_t""enabled $tcl_ok debugging" 1>&6
1585         fi
1586     fi
1587
1588
1589 TCL_DBGX=${DBGX}
1590
1591 #--------------------------------------------------------------------
1592 # man2tcl needs this so that it can use errno.h
1593 #--------------------------------------------------------------------
1594
1595 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1596 echo "configure:1597: checking how to run the C preprocessor" >&5
1597 # On Suns, sometimes $CPP names a directory.
1598 if test -n "$CPP" && test -d "$CPP"; then
1599   CPP=
1600 fi
1601 if test -z "$CPP"; then
1602 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1603   echo $ac_n "(cached) $ac_c" 1>&6
1604 else
1605     # This must be in double quotes, not single quotes, because CPP may get
1606   # substituted into the Makefile and "${CC-cc}" will confuse make.
1607   CPP="${CC-cc} -E"
1608   # On the NeXT, cc -E runs the code through the compiler's parser,
1609   # not just through cpp.
1610   cat > conftest.$ac_ext <<EOF
1611 #line 1612 "configure"
1612 #include "confdefs.h"
1613 #include <assert.h>
1614 Syntax Error
1615 EOF
1616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1617 { (eval echo configure:1618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1619 if test -z "$ac_err"; then
1620   :
1621 else
1622   echo "$ac_err" >&5
1623   echo "configure: failed program was:" >&5
1624   cat conftest.$ac_ext >&5
1625   rm -rf conftest*
1626   CPP="${CC-cc} -E -traditional-cpp"
1627   cat > conftest.$ac_ext <<EOF
1628 #line 1629 "configure"
1629 #include "confdefs.h"
1630 #include <assert.h>
1631 Syntax Error
1632 EOF
1633 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1634 { (eval echo configure:1635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1635 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1636 if test -z "$ac_err"; then
1637   :
1638 else
1639   echo "$ac_err" >&5
1640   echo "configure: failed program was:" >&5
1641   cat conftest.$ac_ext >&5
1642   rm -rf conftest*
1643   CPP="${CC-cc} -nologo -E"
1644   cat > conftest.$ac_ext <<EOF
1645 #line 1646 "configure"
1646 #include "confdefs.h"
1647 #include <assert.h>
1648 Syntax Error
1649 EOF
1650 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1651 { (eval echo configure:1652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1652 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1653 if test -z "$ac_err"; then
1654   :
1655 else
1656   echo "$ac_err" >&5
1657   echo "configure: failed program was:" >&5
1658   cat conftest.$ac_ext >&5
1659   rm -rf conftest*
1660   CPP=/lib/cpp
1661 fi
1662 rm -f conftest*
1663 fi
1664 rm -f conftest*
1665 fi
1666 rm -f conftest*
1667   ac_cv_prog_CPP="$CPP"
1668 fi
1669   CPP="$ac_cv_prog_CPP"
1670 else
1671   ac_cv_prog_CPP="$CPP"
1672 fi
1673 echo "$ac_t""$CPP" 1>&6
1674
1675 ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
1676 echo $ac_n "checking for errno.h""... $ac_c" 1>&6
1677 echo "configure:1678: checking for errno.h" >&5
1678 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1679   echo $ac_n "(cached) $ac_c" 1>&6
1680 else
1681   cat > conftest.$ac_ext <<EOF
1682 #line 1683 "configure"
1683 #include "confdefs.h"
1684 #include <errno.h>
1685 EOF
1686 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1687 { (eval echo configure:1688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1688 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1689 if test -z "$ac_err"; then
1690   rm -rf conftest*
1691   eval "ac_cv_header_$ac_safe=yes"
1692 else
1693   echo "$ac_err" >&5
1694   echo "configure: failed program was:" >&5
1695   cat conftest.$ac_ext >&5
1696   rm -rf conftest*
1697   eval "ac_cv_header_$ac_safe=no"
1698 fi
1699 rm -f conftest*
1700 fi
1701 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1702   echo "$ac_t""yes" 1>&6
1703   :
1704 else
1705   echo "$ac_t""no" 1>&6
1706 MAN2TCLFLAGS="-DNO_ERRNO_H"
1707 fi
1708
1709
1710
1711 #------------------------------------------------------------------------
1712 # tclConfig.sh refers to this by a different name
1713 #------------------------------------------------------------------------
1714
1715 TCL_SHARED_BUILD=${SHARED_BUILD}
1716
1717 #--------------------------------------------------------------------
1718 # Perform final evaluations of variables with possible substitutions.
1719 #--------------------------------------------------------------------
1720
1721 TCL_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}"
1722 TCL_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
1723 TCL_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
1724
1725 eval "TCL_SRC_DIR=\"`cd $srcdir/..; pwd`\""
1726
1727 eval "TCL_DLL_FILE=tcl${VER}${DLLSUFFIX}"
1728
1729 eval "TCL_LIB_FILE=${LIBPREFIX}tcl$VER${LIBSUFFIX}"
1730 # FIMXE: These variables decls are missing
1731 #TCL_LIB_FLAG
1732 TCL_BUILD_LIB_SPEC="-L`pwd` -ltcl${VER}${TCL_DBGX}"
1733 #TCL_LIB_SPEC
1734
1735 eval "TCL_STUB_LIB_FILE=\"${LIBPREFIX}tclstub${VER}${LIBSUFFIX}\""
1736 eval "TCL_STUB_LIB_FLAG=\"-ltclstub${VER}${TCL_DBGX}\""
1737 eval "TCL_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TCL_STUB_LIB_FLAG}\""
1738 eval "TCL_STUB_LIB_SPEC=\"-L${libdir} ${TCL_STUB_LIB_FLAG}\""
1739 eval "TCL_BUILD_STUB_LIB_PATH=\"`pwd`/${TCL_STUB_LIB_FILE}\""
1740 eval "TCL_STUB_LIB_PATH=\"${libdir}/${TCL_STUB_LIB_FILE}\""
1741
1742 # Install time header dir can be set via --includedir
1743 eval "TCL_INCLUDE_SPEC=\"-I${includedir}\""
1744
1745
1746 eval "DLLSUFFIX=${DLLSUFFIX}"
1747 eval "LIBPREFIX=${LIBPREFIX}"
1748 eval "LIBSUFFIX=${LIBSUFFIX}"
1749 eval "EXESUFFIX=${EXESUFFIX}"
1750
1751 CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}
1752 CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}
1753 CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}
1754
1755 #--------------------------------------------------------------------
1756 # Adjust the defines for how the resources are built depending
1757 # on symbols and static vs. shared.
1758 #--------------------------------------------------------------------
1759
1760 if test ${SHARED_BUILD} = 0 ; then
1761     if test "${DBGX}" = "d"; then
1762         RC_DEFINES="${RC_DEFINE} STATIC_BUILD ${RC_DEFINE} DEBUG"
1763     else
1764         RC_DEFINES="${RC_DEFINE} STATIC_BUILD"
1765     fi
1766 else
1767     if test "${DBGX}" = "d"; then
1768         RC_DEFINES="${RC_DEFINE} DEBUG"
1769     else
1770         RC_DEFINES=""
1771     fi
1772 fi
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782 # empty on win
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800 # win/tcl.m4 doesn't set (CFLAGS)
1801
1802
1803
1804
1805
1806
1807
1808 # win/tcl.m4 doesn't set (LDFLAGS)
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836 # empty on win, but needs sub'ing
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847 # win only
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865 trap '' 1 2 15
1866 cat > confcache <<\EOF
1867 # This file is a shell script that caches the results of configure
1868 # tests run on this system so they can be shared between configure
1869 # scripts and configure runs.  It is not useful on other systems.
1870 # If it contains results you don't want to keep, you may remove or edit it.
1871 #
1872 # By default, configure uses ./config.cache as the cache file,
1873 # creating it if it does not exist already.  You can give configure
1874 # the --cache-file=FILE option to use a different cache file; that is
1875 # what configure does when it calls configure scripts in
1876 # subdirectories, so they share the cache.
1877 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1878 # config.status only pays attention to the cache file if you give it the
1879 # --recheck option to rerun configure.
1880 #
1881 EOF
1882 # The following way of writing the cache mishandles newlines in values,
1883 # but we know of no workaround that is simple, portable, and efficient.
1884 # So, don't put newlines in cache variables' values.
1885 # Ultrix sh set writes to stderr and can't be redirected directly,
1886 # and sets the high bit in the cache file unless we assign to the vars.
1887 (set) 2>&1 |
1888   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1889   *ac_space=\ *)
1890     # `set' does not quote correctly, so add quotes (double-quote substitution
1891     # turns \\\\ into \\, and sed turns \\ into \).
1892     sed -n \
1893       -e "s/'/'\\\\''/g" \
1894       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1895     ;;
1896   *)
1897     # `set' quotes correctly as required by POSIX, so do not add quotes.
1898     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1899     ;;
1900   esac >> confcache
1901 if cmp -s $cache_file confcache; then
1902   :
1903 else
1904   if test -w $cache_file; then
1905     echo "updating cache $cache_file"
1906     cat confcache > $cache_file
1907   else
1908     echo "not updating unwritable cache $cache_file"
1909   fi
1910 fi
1911 rm -f confcache
1912
1913 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1914
1915 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1916 # Let make expand exec_prefix.
1917 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1918
1919 # Any assignment to VPATH causes Sun make to only execute
1920 # the first set of double-colon rules, so remove it if not needed.
1921 # If there is a colon in the path, we need to keep it.
1922 if test "x$srcdir" = x.; then
1923   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1924 fi
1925
1926 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1927
1928 # Transform confdefs.h into DEFS.
1929 # Protect against shell expansion while executing Makefile rules.
1930 # Protect against Makefile macro expansion.
1931 #
1932 # If the first sed substitution is executed (which looks for macros that
1933 # take arguments), then we branch to the quote section.  Otherwise,
1934 # look for a macro that doesn't take arguments.
1935 cat >confdef2opt.sed <<\_ACEOF
1936 t clear
1937 : clear
1938 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\),-D\1=\2,g
1939 t quote
1940 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\),-D\1=\2,g
1941 t quote
1942 d
1943 : quote
1944 s,[     `~#$^&*(){}\\|;'"<>?],\\&,g
1945 s,\[,\\&,g
1946 s,\],\\&,g
1947 s,\$,$$,g
1948 p
1949 _ACEOF
1950 # We use echo to avoid assuming a particular line-breaking character.
1951 # The extra dot is to prevent the shell from consuming trailing
1952 # line-breaks from the sub-command output.  A line-break within
1953 # single-quotes doesn't work because, if this script is created in a
1954 # platform that uses two characters for line-breaks (e.g., DOS), tr
1955 # would break.
1956 ac_LF_and_DOT=`echo; echo .`
1957 DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
1958 rm -f confdef2opt.sed
1959
1960
1961 # Without the "./", some shells look in PATH for config.status.
1962 : ${CONFIG_STATUS=./config.status}
1963
1964 echo creating $CONFIG_STATUS
1965 rm -f $CONFIG_STATUS
1966 cat > $CONFIG_STATUS <<EOF
1967 #! /bin/sh
1968 # Generated automatically by configure.
1969 # Run this file to recreate the current configuration.
1970 # This directory was configured as follows,
1971 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1972 #
1973 # $0 $ac_configure_args
1974 #
1975 # Compiler output produced by configure, useful for debugging
1976 # configure, is in ./config.log if it exists.
1977
1978 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1979 for ac_option
1980 do
1981   case "\$ac_option" in
1982   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1983     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1984     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1985   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1986     echo "$CONFIG_STATUS generated by autoconf version 2.13"
1987     exit 0 ;;
1988   -help | --help | --hel | --he | --h)
1989     echo "\$ac_cs_usage"; exit 0 ;;
1990   *) echo "\$ac_cs_usage"; exit 1 ;;
1991   esac
1992 done
1993
1994 ac_given_srcdir=$srcdir
1995
1996 trap 'rm -fr `echo "Makefile tclConfig.sh tcl.hpj" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1997 EOF
1998 cat >> $CONFIG_STATUS <<EOF
1999
2000 # Protect against being on the right side of a sed subst in config.status.
2001 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2002  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2003 $ac_vpsub
2004 $extrasub
2005 s%@SHELL@%$SHELL%g
2006 s%@CFLAGS@%$CFLAGS%g
2007 s%@CPPFLAGS@%$CPPFLAGS%g
2008 s%@CXXFLAGS@%$CXXFLAGS%g
2009 s%@FFLAGS@%$FFLAGS%g
2010 s%@DEFS@%$DEFS%g
2011 s%@LDFLAGS@%$LDFLAGS%g
2012 s%@LIBS@%$LIBS%g
2013 s%@exec_prefix@%$exec_prefix%g
2014 s%@prefix@%$prefix%g
2015 s%@program_transform_name@%$program_transform_name%g
2016 s%@bindir@%$bindir%g
2017 s%@sbindir@%$sbindir%g
2018 s%@libexecdir@%$libexecdir%g
2019 s%@datadir@%$datadir%g
2020 s%@sysconfdir@%$sysconfdir%g
2021 s%@sharedstatedir@%$sharedstatedir%g
2022 s%@localstatedir@%$localstatedir%g
2023 s%@libdir@%$libdir%g
2024 s%@includedir@%$includedir%g
2025 s%@oldincludedir@%$oldincludedir%g
2026 s%@infodir@%$infodir%g
2027 s%@mandir@%$mandir%g
2028 s%@CC@%$CC%g
2029 s%@AR@%$AR%g
2030 s%@RANLIB@%$RANLIB%g
2031 s%@RC@%$RC%g
2032 s%@SET_MAKE@%$SET_MAKE%g
2033 s%@OBJEXT@%$OBJEXT%g
2034 s%@EXEEXT@%$EXEEXT%g
2035 s%@TCL_THREADS@%$TCL_THREADS%g
2036 s%@CYGPATH@%$CYGPATH%g
2037 s%@DL_LIBS@%$DL_LIBS%g
2038 s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
2039 s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
2040 s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
2041 s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
2042 s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
2043 s%@CPP@%$CPP%g
2044 s%@MAN2TCLFLAGS@%$MAN2TCLFLAGS%g
2045 s%@TCL_VERSION@%$TCL_VERSION%g
2046 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
2047 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
2048 s%@TCL_PATCH_LEVEL@%$TCL_PATCH_LEVEL%g
2049 s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
2050 s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
2051 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
2052 s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
2053 s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
2054 s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
2055 s%@TCL_STUB_LIB_PATH@%$TCL_STUB_LIB_PATH%g
2056 s%@TCL_INCLUDE_SPEC@%$TCL_INCLUDE_SPEC%g
2057 s%@TCL_BUILD_STUB_LIB_SPEC@%$TCL_BUILD_STUB_LIB_SPEC%g
2058 s%@TCL_BUILD_STUB_LIB_PATH@%$TCL_BUILD_STUB_LIB_PATH%g
2059 s%@TCL_DLL_FILE@%$TCL_DLL_FILE%g
2060 s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
2061 s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
2062 s%@TCL_DBGX@%$TCL_DBGX%g
2063 s%@CFG_TCL_SHARED_LIB_SUFFIX@%$CFG_TCL_SHARED_LIB_SUFFIX%g
2064 s%@CFG_TCL_UNSHARED_LIB_SUFFIX@%$CFG_TCL_UNSHARED_LIB_SUFFIX%g
2065 s%@CFG_TCL_EXPORT_FILE_SUFFIX@%$CFG_TCL_EXPORT_FILE_SUFFIX%g
2066 s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
2067 s%@DEPARG@%$DEPARG%g
2068 s%@CC_OBJNAME@%$CC_OBJNAME%g
2069 s%@CC_EXENAME@%$CC_EXENAME%g
2070 s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
2071 s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
2072 s%@LDFLAGS_CONSOLE@%$LDFLAGS_CONSOLE%g
2073 s%@LDFLAGS_WINDOW@%$LDFLAGS_WINDOW%g
2074 s%@STLIB_LD@%$STLIB_LD%g
2075 s%@SHLIB_LD@%$SHLIB_LD%g
2076 s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
2077 s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
2078 s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
2079 s%@TCL_SHARED_BUILD@%$TCL_SHARED_BUILD%g
2080 s%@LIBS_GUI@%$LIBS_GUI%g
2081 s%@DLLSUFFIX@%$DLLSUFFIX%g
2082 s%@LIBPREFIX@%$LIBPREFIX%g
2083 s%@LIBSUFFIX@%$LIBSUFFIX%g
2084 s%@EXESUFFIX@%$EXESUFFIX%g
2085 s%@LIBRARIES@%$LIBRARIES%g
2086 s%@MAKE_LIB@%$MAKE_LIB%g
2087 s%@POST_MAKE_LIB@%$POST_MAKE_LIB%g
2088 s%@MAKE_DLL@%$MAKE_DLL%g
2089 s%@MAKE_EXE@%$MAKE_EXE%g
2090 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
2091 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
2092 s%@TCL_NEEDS_EXP_FILE@%$TCL_NEEDS_EXP_FILE%g
2093 s%@TCL_BUILD_EXP_FILE@%$TCL_BUILD_EXP_FILE%g
2094 s%@TCL_EXP_FILE@%$TCL_EXP_FILE%g
2095 s%@LIBOBJS@%$LIBOBJS%g
2096 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
2097 s%@TCL_PACKAGE_PATH@%$TCL_PACKAGE_PATH%g
2098 s%@TCL_DDE_VERSION@%$TCL_DDE_VERSION%g
2099 s%@TCL_DDE_MAJOR_VERSION@%$TCL_DDE_MAJOR_VERSION%g
2100 s%@TCL_DDE_MINOR_VERSION@%$TCL_DDE_MINOR_VERSION%g
2101 s%@TCL_DDE_PATCH_LEVEL@%$TCL_DDE_PATCH_LEVEL%g
2102 s%@TCL_REG_VERSION@%$TCL_REG_VERSION%g
2103 s%@TCL_REG_MAJOR_VERSION@%$TCL_REG_MAJOR_VERSION%g
2104 s%@TCL_REG_MINOR_VERSION@%$TCL_REG_MINOR_VERSION%g
2105 s%@TCL_REG_PATCH_LEVEL@%$TCL_REG_PATCH_LEVEL%g
2106 s%@RC_OUT@%$RC_OUT%g
2107 s%@RC_TYPE@%$RC_TYPE%g
2108 s%@RC_INCLUDE@%$RC_INCLUDE%g
2109 s%@RC_DEFINE@%$RC_DEFINE%g
2110 s%@RC_DEFINES@%$RC_DEFINES%g
2111 s%@RES@%$RES%g
2112
2113 CEOF
2114 EOF
2115
2116 cat >> $CONFIG_STATUS <<\EOF
2117
2118 # Split the substitutions into bite-sized pieces for seds with
2119 # small command number limits, like on Digital OSF/1 and HP-UX.
2120 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2121 ac_file=1 # Number of current file.
2122 ac_beg=1 # First line for current file.
2123 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2124 ac_more_lines=:
2125 ac_sed_cmds=""
2126 while $ac_more_lines; do
2127   if test $ac_beg -gt 1; then
2128     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2129   else
2130     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2131   fi
2132   if test ! -s conftest.s$ac_file; then
2133     ac_more_lines=false
2134     rm -f conftest.s$ac_file
2135   else
2136     if test -z "$ac_sed_cmds"; then
2137       ac_sed_cmds="sed -f conftest.s$ac_file"
2138     else
2139       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2140     fi
2141     ac_file=`expr $ac_file + 1`
2142     ac_beg=$ac_end
2143     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2144   fi
2145 done
2146 if test -z "$ac_sed_cmds"; then
2147   ac_sed_cmds=cat
2148 fi
2149 EOF
2150
2151 cat >> $CONFIG_STATUS <<EOF
2152
2153 CONFIG_FILES=\${CONFIG_FILES-"Makefile tclConfig.sh tcl.hpj"}
2154 EOF
2155 cat >> $CONFIG_STATUS <<\EOF
2156 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2157   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2158   case "$ac_file" in
2159   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2160        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2161   *) ac_file_in="${ac_file}.in" ;;
2162   esac
2163
2164   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2165
2166   # Remove last slash and all that follows it.  Not all systems have dirname.
2167   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2168   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2169     # The file is in a subdirectory.
2170     test ! -d "$ac_dir" && mkdir "$ac_dir"
2171     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2172     # A "../" for each directory in $ac_dir_suffix.
2173     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2174   else
2175     ac_dir_suffix= ac_dots=
2176   fi
2177
2178   case "$ac_given_srcdir" in
2179   .)  srcdir=.
2180       if test -z "$ac_dots"; then top_srcdir=.
2181       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2182   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2183   *) # Relative path.
2184     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2185     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2186   esac
2187
2188
2189   echo creating "$ac_file"
2190   rm -f "$ac_file"
2191   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2192   case "$ac_file" in
2193   *Makefile*) ac_comsub="1i\\
2194 # $configure_input" ;;
2195   *) ac_comsub= ;;
2196   esac
2197
2198   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2199   sed -e "$ac_comsub
2200 s%@configure_input@%$configure_input%g
2201 s%@srcdir@%$srcdir%g
2202 s%@top_srcdir@%$top_srcdir%g
2203 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2204 fi; done
2205 rm -f conftest.s*
2206
2207 EOF
2208 cat >> $CONFIG_STATUS <<EOF
2209
2210 EOF
2211 cat >> $CONFIG_STATUS <<\EOF
2212
2213 exit 0
2214 EOF
2215 chmod +x $CONFIG_STATUS
2216 rm -fr confdefs* $ac_clean_files
2217 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2218