OSDN Git Service

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