OSDN Git Service

* win/winMain.c (main): Ifdef out for cygwin.
[pf3gnuchains/sourceware.git] / tk / 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-symbols        build with debugging symbols [--disable-symbols]"
20 ac_help="$ac_help
21   --with-tcl=DIR          use Tcl 8.3 binaries from DIR"
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/tk.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 TK_VERSION=8.3
545 TK_MAJOR_VERSION=8
546 TK_MINOR_VERSION=3
547 TK_PATCH_LEVEL=".2"
548 VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION
549
550 if test "${prefix}" = "NONE"; then
551     prefix=/usr/local
552 fi
553 if test "${exec_prefix}" = "NONE"; then
554     exec_prefix=$prefix
555 fi
556
557 #------------------------------------------------------------------------
558 # Standard compiler checks
559 #------------------------------------------------------------------------
560
561 # Extract the first word of "gcc", so it can be a program name with args.
562 set dummy gcc; ac_word=$2
563 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
564 echo "configure:565: checking for $ac_word" >&5
565 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
566   echo $ac_n "(cached) $ac_c" 1>&6
567 else
568   if test -n "$CC"; then
569   ac_cv_prog_CC="$CC" # Let the user override the test.
570 else
571   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
572   ac_dummy="$PATH"
573   for ac_dir in $ac_dummy; do
574     test -z "$ac_dir" && ac_dir=.
575     if test -f $ac_dir/$ac_word; then
576       ac_cv_prog_CC="gcc"
577       break
578     fi
579   done
580   IFS="$ac_save_ifs"
581 fi
582 fi
583 CC="$ac_cv_prog_CC"
584 if test -n "$CC"; then
585   echo "$ac_t""$CC" 1>&6
586 else
587   echo "$ac_t""no" 1>&6
588 fi
589
590 if test -z "$CC"; then
591   # Extract the first word of "cc", so it can be a program name with args.
592 set dummy cc; ac_word=$2
593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
594 echo "configure:595: checking for $ac_word" >&5
595 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
596   echo $ac_n "(cached) $ac_c" 1>&6
597 else
598   if test -n "$CC"; then
599   ac_cv_prog_CC="$CC" # Let the user override the test.
600 else
601   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
602   ac_prog_rejected=no
603   ac_dummy="$PATH"
604   for ac_dir in $ac_dummy; do
605     test -z "$ac_dir" && ac_dir=.
606     if test -f $ac_dir/$ac_word; then
607       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
608         ac_prog_rejected=yes
609         continue
610       fi
611       ac_cv_prog_CC="cc"
612       break
613     fi
614   done
615   IFS="$ac_save_ifs"
616 if test $ac_prog_rejected = yes; then
617   # We found a bogon in the path, so make sure we never use it.
618   set dummy $ac_cv_prog_CC
619   shift
620   if test $# -gt 0; then
621     # We chose a different compiler from the bogus one.
622     # However, it has the same basename, so the bogon will be chosen
623     # first if we set CC to just the basename; use the full file name.
624     shift
625     set dummy "$ac_dir/$ac_word" "$@"
626     shift
627     ac_cv_prog_CC="$@"
628   fi
629 fi
630 fi
631 fi
632 CC="$ac_cv_prog_CC"
633 if test -n "$CC"; then
634   echo "$ac_t""$CC" 1>&6
635 else
636   echo "$ac_t""no" 1>&6
637 fi
638
639   if test -z "$CC"; then
640     case "`uname -s`" in
641     *win32* | *WIN32*)
642       # Extract the first word of "cl", so it can be a program name with args.
643 set dummy cl; ac_word=$2
644 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
645 echo "configure:646: checking for $ac_word" >&5
646 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
647   echo $ac_n "(cached) $ac_c" 1>&6
648 else
649   if test -n "$CC"; then
650   ac_cv_prog_CC="$CC" # Let the user override the test.
651 else
652   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
653   ac_dummy="$PATH"
654   for ac_dir in $ac_dummy; do
655     test -z "$ac_dir" && ac_dir=.
656     if test -f $ac_dir/$ac_word; then
657       ac_cv_prog_CC="cl"
658       break
659     fi
660   done
661   IFS="$ac_save_ifs"
662 fi
663 fi
664 CC="$ac_cv_prog_CC"
665 if test -n "$CC"; then
666   echo "$ac_t""$CC" 1>&6
667 else
668   echo "$ac_t""no" 1>&6
669 fi
670  ;;
671     esac
672   fi
673   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
674 fi
675
676 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
677 echo "configure:678: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
678
679 ac_ext=c
680 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
681 ac_cpp='$CPP $CPPFLAGS'
682 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
683 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
684 cross_compiling=$ac_cv_prog_cc_cross
685
686 cat > conftest.$ac_ext << EOF
687
688 #line 689 "configure"
689 #include "confdefs.h"
690
691 main(){return(0);}
692 EOF
693 if { (eval echo configure:694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
694   ac_cv_prog_cc_works=yes
695   # If we can't run a trivial program, we are probably using a cross compiler.
696   if (./conftest; exit) 2>/dev/null; then
697     ac_cv_prog_cc_cross=no
698   else
699     ac_cv_prog_cc_cross=yes
700   fi
701 else
702   echo "configure: failed program was:" >&5
703   cat conftest.$ac_ext >&5
704   ac_cv_prog_cc_works=no
705 fi
706 rm -fr conftest*
707 ac_ext=c
708 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
709 ac_cpp='$CPP $CPPFLAGS'
710 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
711 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
712 cross_compiling=$ac_cv_prog_cc_cross
713
714 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
715 if test $ac_cv_prog_cc_works = no; then
716   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
717 fi
718 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
719 echo "configure:720: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
720 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
721 cross_compiling=$ac_cv_prog_cc_cross
722
723 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
724 echo "configure:725: checking whether we are using GNU C" >&5
725 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
726   echo $ac_n "(cached) $ac_c" 1>&6
727 else
728   cat > conftest.c <<EOF
729 #ifdef __GNUC__
730   yes;
731 #endif
732 EOF
733 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
734   ac_cv_prog_gcc=yes
735 else
736   ac_cv_prog_gcc=no
737 fi
738 fi
739
740 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
741
742 if test $ac_cv_prog_gcc = yes; then
743   GCC=yes
744 else
745   GCC=
746 fi
747
748 ac_test_CFLAGS="${CFLAGS+set}"
749 ac_save_CFLAGS="$CFLAGS"
750 CFLAGS=
751 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
752 echo "configure:753: checking whether ${CC-cc} accepts -g" >&5
753 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
754   echo $ac_n "(cached) $ac_c" 1>&6
755 else
756   echo 'void f(){}' > conftest.c
757 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
758   ac_cv_prog_cc_g=yes
759 else
760   ac_cv_prog_cc_g=no
761 fi
762 rm -f conftest*
763
764 fi
765
766 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
767 if test "$ac_test_CFLAGS" = set; then
768   CFLAGS="$ac_save_CFLAGS"
769 elif test $ac_cv_prog_cc_g = yes; then
770   if test "$GCC" = yes; then
771     CFLAGS="-g -O2"
772   else
773     CFLAGS="-g"
774   fi
775 else
776   if test "$GCC" = yes; then
777     CFLAGS="-O2"
778   else
779     CFLAGS=
780   fi
781 fi
782
783
784 ac_aux_dir=
785 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
786   if test -f $ac_dir/install-sh; then
787     ac_aux_dir=$ac_dir
788     ac_install_sh="$ac_aux_dir/install-sh -c"
789     break
790   elif test -f $ac_dir/install.sh; then
791     ac_aux_dir=$ac_dir
792     ac_install_sh="$ac_aux_dir/install.sh -c"
793     break
794   fi
795 done
796 if test -z "$ac_aux_dir"; then
797   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
798 fi
799 ac_config_guess=$ac_aux_dir/config.guess
800 ac_config_sub=$ac_aux_dir/config.sub
801 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
802
803
804 # Make sure we can run config.sub.
805 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
806 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
807 fi
808
809 echo $ac_n "checking host system type""... $ac_c" 1>&6
810 echo "configure:811: checking host system type" >&5
811
812 host_alias=$host
813 case "$host_alias" in
814 NONE)
815   case $nonopt in
816   NONE)
817     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
818     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
819     fi ;;
820   *) host_alias=$nonopt ;;
821   esac ;;
822 esac
823
824 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
825 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
826 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
827 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
828 echo "$ac_t""$host" 1>&6
829
830 echo $ac_n "checking build system type""... $ac_c" 1>&6
831 echo "configure:832: checking build system type" >&5
832
833 build_alias=$build
834 case "$build_alias" in
835 NONE)
836   case $nonopt in
837   NONE) build_alias=$host_alias ;;
838   *) build_alias=$nonopt ;;
839   esac ;;
840 esac
841
842 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
843 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
844 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
845 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
846 echo "$ac_t""$build" 1>&6
847
848 if test $host != $build; then
849   ac_tool_prefix=${host_alias}-
850 else
851   ac_tool_prefix=
852 fi
853
854 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
855 set dummy ${ac_tool_prefix}ar; ac_word=$2
856 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
857 echo "configure:858: checking for $ac_word" >&5
858 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
859   echo $ac_n "(cached) $ac_c" 1>&6
860 else
861   if test -n "$AR"; then
862   ac_cv_prog_AR="$AR" # Let the user override the test.
863 else
864   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
865   ac_dummy="$PATH"
866   for ac_dir in $ac_dummy; do
867     test -z "$ac_dir" && ac_dir=.
868     if test -f $ac_dir/$ac_word; then
869       ac_cv_prog_AR="${ac_tool_prefix}ar"
870       break
871     fi
872   done
873   IFS="$ac_save_ifs"
874 fi
875 fi
876 AR="$ac_cv_prog_AR"
877 if test -n "$AR"; then
878   echo "$ac_t""$AR" 1>&6
879 else
880   echo "$ac_t""no" 1>&6
881 fi
882
883
884 if test -z "$ac_cv_prog_AR"; then
885 if test -n "$ac_tool_prefix"; then
886   # Extract the first word of "ar", so it can be a program name with args.
887 set dummy ar; ac_word=$2
888 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
889 echo "configure:890: checking for $ac_word" >&5
890 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
891   echo $ac_n "(cached) $ac_c" 1>&6
892 else
893   if test -n "$AR"; then
894   ac_cv_prog_AR="$AR" # Let the user override the test.
895 else
896   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
897   ac_dummy="$PATH"
898   for ac_dir in $ac_dummy; do
899     test -z "$ac_dir" && ac_dir=.
900     if test -f $ac_dir/$ac_word; then
901       ac_cv_prog_AR="ar"
902       break
903     fi
904   done
905   IFS="$ac_save_ifs"
906   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR=":"
907 fi
908 fi
909 AR="$ac_cv_prog_AR"
910 if test -n "$AR"; then
911   echo "$ac_t""$AR" 1>&6
912 else
913   echo "$ac_t""no" 1>&6
914 fi
915
916 else
917   AR=":"
918 fi
919 fi
920
921 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
922 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
923 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
924 echo "configure:925: checking for $ac_word" >&5
925 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
926   echo $ac_n "(cached) $ac_c" 1>&6
927 else
928   if test -n "$RANLIB"; then
929   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
930 else
931   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
932   ac_dummy="$PATH"
933   for ac_dir in $ac_dummy; do
934     test -z "$ac_dir" && ac_dir=.
935     if test -f $ac_dir/$ac_word; then
936       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
937       break
938     fi
939   done
940   IFS="$ac_save_ifs"
941 fi
942 fi
943 RANLIB="$ac_cv_prog_RANLIB"
944 if test -n "$RANLIB"; then
945   echo "$ac_t""$RANLIB" 1>&6
946 else
947   echo "$ac_t""no" 1>&6
948 fi
949
950
951 if test -z "$ac_cv_prog_RANLIB"; then
952 if test -n "$ac_tool_prefix"; then
953   # Extract the first word of "ranlib", so it can be a program name with args.
954 set dummy ranlib; ac_word=$2
955 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
956 echo "configure:957: checking for $ac_word" >&5
957 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
958   echo $ac_n "(cached) $ac_c" 1>&6
959 else
960   if test -n "$RANLIB"; then
961   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
962 else
963   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
964   ac_dummy="$PATH"
965   for ac_dir in $ac_dummy; do
966     test -z "$ac_dir" && ac_dir=.
967     if test -f $ac_dir/$ac_word; then
968       ac_cv_prog_RANLIB="ranlib"
969       break
970     fi
971   done
972   IFS="$ac_save_ifs"
973   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
974 fi
975 fi
976 RANLIB="$ac_cv_prog_RANLIB"
977 if test -n "$RANLIB"; then
978   echo "$ac_t""$RANLIB" 1>&6
979 else
980   echo "$ac_t""no" 1>&6
981 fi
982
983 else
984   RANLIB=":"
985 fi
986 fi
987
988 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
989 set dummy ${ac_tool_prefix}windres; ac_word=$2
990 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
991 echo "configure:992: checking for $ac_word" >&5
992 if eval "test \"`echo '$''{'ac_cv_prog_RC'+set}'`\" = set"; then
993   echo $ac_n "(cached) $ac_c" 1>&6
994 else
995   if test -n "$RC"; then
996   ac_cv_prog_RC="$RC" # Let the user override the test.
997 else
998   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
999   ac_dummy="$PATH"
1000   for ac_dir in $ac_dummy; do
1001     test -z "$ac_dir" && ac_dir=.
1002     if test -f $ac_dir/$ac_word; then
1003       ac_cv_prog_RC="${ac_tool_prefix}windres"
1004       break
1005     fi
1006   done
1007   IFS="$ac_save_ifs"
1008 fi
1009 fi
1010 RC="$ac_cv_prog_RC"
1011 if test -n "$RC"; then
1012   echo "$ac_t""$RC" 1>&6
1013 else
1014   echo "$ac_t""no" 1>&6
1015 fi
1016
1017
1018 if test -z "$ac_cv_prog_RC"; then
1019 if test -n "$ac_tool_prefix"; then
1020   # Extract the first word of "windres", so it can be a program name with args.
1021 set dummy windres; ac_word=$2
1022 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1023 echo "configure:1024: checking for $ac_word" >&5
1024 if eval "test \"`echo '$''{'ac_cv_prog_RC'+set}'`\" = set"; then
1025   echo $ac_n "(cached) $ac_c" 1>&6
1026 else
1027   if test -n "$RC"; then
1028   ac_cv_prog_RC="$RC" # Let the user override the test.
1029 else
1030   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1031   ac_dummy="$PATH"
1032   for ac_dir in $ac_dummy; do
1033     test -z "$ac_dir" && ac_dir=.
1034     if test -f $ac_dir/$ac_word; then
1035       ac_cv_prog_RC="windres"
1036       break
1037     fi
1038   done
1039   IFS="$ac_save_ifs"
1040   test -z "$ac_cv_prog_RC" && ac_cv_prog_RC=":"
1041 fi
1042 fi
1043 RC="$ac_cv_prog_RC"
1044 if test -n "$RC"; then
1045   echo "$ac_t""$RC" 1>&6
1046 else
1047   echo "$ac_t""no" 1>&6
1048 fi
1049
1050 else
1051   RC=":"
1052 fi
1053 fi
1054
1055
1056 #--------------------------------------------------------------------
1057 # Checks to see if the make progeam sets the $MAKE variable.
1058 #--------------------------------------------------------------------
1059
1060 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1061 echo "configure:1062: checking whether ${MAKE-make} sets \${MAKE}" >&5
1062 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1063 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1064   echo $ac_n "(cached) $ac_c" 1>&6
1065 else
1066   cat > conftestmake <<\EOF
1067 all:
1068         @echo 'ac_maketemp="${MAKE}"'
1069 EOF
1070 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1071 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1072 if test -n "$ac_maketemp"; then
1073   eval ac_cv_prog_make_${ac_make}_set=yes
1074 else
1075   eval ac_cv_prog_make_${ac_make}_set=no
1076 fi
1077 rm -f conftestmake
1078 fi
1079 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1080   echo "$ac_t""yes" 1>&6
1081   SET_MAKE=
1082 else
1083   echo "$ac_t""no" 1>&6
1084   SET_MAKE="MAKE=${MAKE-make}"
1085 fi
1086
1087
1088 #--------------------------------------------------------------------
1089 # These two macros perform additinal compiler test.
1090 #--------------------------------------------------------------------
1091
1092 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1093 echo "configure:1094: checking for Cygwin environment" >&5
1094 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1095   echo $ac_n "(cached) $ac_c" 1>&6
1096 else
1097   cat > conftest.$ac_ext <<EOF
1098 #line 1099 "configure"
1099 #include "confdefs.h"
1100
1101 int main() {
1102
1103 #ifndef __CYGWIN__
1104 #define __CYGWIN__ __CYGWIN32__
1105 #endif
1106 return __CYGWIN__;
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_cygwin=yes
1112 else
1113   echo "configure: failed program was:" >&5
1114   cat conftest.$ac_ext >&5
1115   rm -rf conftest*
1116   ac_cv_cygwin=no
1117 fi
1118 rm -f conftest*
1119 rm -f conftest*
1120 fi
1121
1122 echo "$ac_t""$ac_cv_cygwin" 1>&6
1123 CYGWIN=
1124 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1125
1126 case "${host}" in
1127 *-*-cygwin*)
1128         touch ac$$.c
1129         if ${CC} -c -mwin32 ac$$.c >/dev/null 2>&1; then
1130             case "$EXTRA_CFLAGS" in
1131                 *-mwin32*) ;;
1132                 *) EXTRA_CFLAGS="-mwin32 $EXTRA_CFLAGS" ;;
1133             esac
1134         fi
1135         rm -f ac$$.o ac$$.c
1136         ;;
1137 esac
1138
1139 #--------------------------------------------------------------------
1140 # Determines the correct binary file extension (.o, .obj, .exe etc.)
1141 #--------------------------------------------------------------------
1142
1143 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1144 echo "configure:1145: checking for object suffix" >&5
1145 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1146   echo $ac_n "(cached) $ac_c" 1>&6
1147 else
1148   rm -f conftest*
1149 echo 'int i = 1;' > conftest.$ac_ext
1150 if { (eval echo configure:1151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1151   for ac_file in conftest.*; do
1152     case $ac_file in
1153     *.c) ;;
1154     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1155     esac
1156   done
1157 else
1158   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1159 fi
1160 rm -f conftest*
1161 fi
1162
1163 echo "$ac_t""$ac_cv_objext" 1>&6
1164 OBJEXT=$ac_cv_objext
1165 ac_objext=$ac_cv_objext
1166
1167 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1168 echo "configure:1169: checking for mingw32 environment" >&5
1169 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1170   echo $ac_n "(cached) $ac_c" 1>&6
1171 else
1172   cat > conftest.$ac_ext <<EOF
1173 #line 1174 "configure"
1174 #include "confdefs.h"
1175
1176 int main() {
1177 return __MINGW32__;
1178 ; return 0; }
1179 EOF
1180 if { (eval echo configure:1181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1181   rm -rf conftest*
1182   ac_cv_mingw32=yes
1183 else
1184   echo "configure: failed program was:" >&5
1185   cat conftest.$ac_ext >&5
1186   rm -rf conftest*
1187   ac_cv_mingw32=no
1188 fi
1189 rm -f conftest*
1190 rm -f conftest*
1191 fi
1192
1193 echo "$ac_t""$ac_cv_mingw32" 1>&6
1194 MINGW32=
1195 test "$ac_cv_mingw32" = yes && MINGW32=yes
1196
1197
1198 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1199 echo "configure:1200: checking for executable suffix" >&5
1200 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1201   echo $ac_n "(cached) $ac_c" 1>&6
1202 else
1203   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1204   ac_cv_exeext=.exe
1205 else
1206   rm -f conftest*
1207   echo 'int main () { return 0; }' > conftest.$ac_ext
1208   ac_cv_exeext=
1209   if { (eval echo configure:1210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1210     for file in conftest.*; do
1211       case $file in
1212       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
1213       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1214       esac
1215     done
1216   else
1217     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1218   fi
1219   rm -f conftest*
1220   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1221 fi
1222 fi
1223
1224 EXEEXT=""
1225 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1226 echo "$ac_t""${ac_cv_exeext}" 1>&6
1227 ac_exeext=$EXEEXT
1228
1229
1230 #--------------------------------------------------------------------
1231 # Check whether --enable-threads or --disable-threads was given.
1232 #--------------------------------------------------------------------
1233
1234
1235     echo $ac_n "checking for building with threads""... $ac_c" 1>&6
1236 echo "configure:1237: checking for building with threads" >&5
1237     # Check whether --enable-threads or --disable-threads was given.
1238 if test "${enable_threads+set}" = set; then
1239   enableval="$enable_threads"
1240   tcl_ok=$enableval
1241 else
1242   tcl_ok=no
1243 fi
1244
1245
1246     if test "$tcl_ok" = "yes"; then
1247         echo "$ac_t""yes" 1>&6
1248         TCL_THREADS=1
1249         cat >> confdefs.h <<\EOF
1250 #define TCL_THREADS 1
1251 EOF
1252
1253     else
1254         TCL_THREADS=0
1255         echo "$ac_t""no (default)" 1>&6
1256     fi
1257
1258
1259 #--------------------------------------------------------------------
1260 # The statements below define a collection of symbols related to
1261 # building libtk as a shared library instead of a static library.
1262 #--------------------------------------------------------------------
1263
1264
1265     echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
1266 echo "configure:1267: checking how to build libraries" >&5
1267     # Check whether --enable-shared or --disable-shared was given.
1268 if test "${enable_shared+set}" = set; then
1269   enableval="$enable_shared"
1270   tcl_ok=$enableval
1271 else
1272   tcl_ok=yes
1273 fi
1274
1275
1276     if test "${enable_shared+set}" = set; then
1277         enableval="$enable_shared"
1278         tcl_ok=$enableval
1279     else
1280         tcl_ok=yes
1281     fi
1282
1283     if test "$tcl_ok" = "yes" ; then
1284         echo "$ac_t""shared" 1>&6
1285         SHARED_BUILD=1
1286     else
1287         echo "$ac_t""static" 1>&6
1288         SHARED_BUILD=0
1289         cat >> confdefs.h <<\EOF
1290 #define STATIC_BUILD 1
1291 EOF
1292
1293     fi
1294
1295
1296 #--------------------------------------------------------------------
1297 # The statements below define a collection of compile flags.  This 
1298 # macro depends on the value of SHARED_BUILD, and should be called
1299 # after SC_ENABLE_SHARED checks the configure switches.
1300 #--------------------------------------------------------------------
1301
1302
1303     TCL_LIB_VERSIONS_OK=nodots
1304
1305     # Extract the first word of "cygpath", so it can be a program name with args.
1306 set dummy cygpath; ac_word=$2
1307 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1308 echo "configure:1309: checking for $ac_word" >&5
1309 if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
1310   echo $ac_n "(cached) $ac_c" 1>&6
1311 else
1312   if test -n "$CYGPATH"; then
1313   ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1314 else
1315   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1316   ac_dummy="$PATH"
1317   for ac_dir in $ac_dummy; do
1318     test -z "$ac_dir" && ac_dir=.
1319     if test -f $ac_dir/$ac_word; then
1320       ac_cv_prog_CYGPATH="cygpath -w"
1321       break
1322     fi
1323   done
1324   IFS="$ac_save_ifs"
1325   test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1326 fi
1327 fi
1328 CYGPATH="$ac_cv_prog_CYGPATH"
1329 if test -n "$CYGPATH"; then
1330   echo "$ac_t""$CYGPATH" 1>&6
1331 else
1332   echo "$ac_t""no" 1>&6
1333 fi
1334
1335
1336     # Check for a bug in gcc's windres that causes the
1337     # compile to fail when a Windows native path is
1338     # passed into windres. The mingw toolchain requires
1339     # Windows native paths while Cygwin should work
1340     # with both. Avoid the bug by passing a POSIX
1341     # path when using the Cygwin toolchain.
1342
1343     if test "$GCC" = "yes" && test "$CYGPATH" != "echo" ; then
1344         conftest=/tmp/conftest.rc
1345         echo "STRINGTABLE BEGIN" > $conftest
1346         echo "101 \"name\"" >> $conftest
1347         echo "END" >> $conftest
1348
1349         echo $ac_n "checking for Windows native path bug in windres""... $ac_c" 1>&6
1350 echo "configure:1351: checking for Windows native path bug in windres" >&5
1351         cyg_conftest=`$CYGPATH $conftest`
1352         if { ac_try='$RC -o conftest.res.o $cyg_conftest'; { (eval echo configure:1353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } ; then
1353             echo "$ac_t""no" 1>&6
1354         else
1355             echo "$ac_t""yes" 1>&6
1356             CYGPATH=echo
1357         fi
1358         conftest=
1359         cyg_conftest=
1360     fi
1361
1362     if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then
1363         DEPARG='"$<"'
1364     else
1365         DEPARG='"$(shell $(CYGPATH) $<)"'
1366     fi
1367
1368     VENDORPREFIX=""
1369
1370     # set various compiler flags depending on whether we are using gcc or cl
1371
1372     echo $ac_n "checking compiler flags""... $ac_c" 1>&6
1373 echo "configure:1374: checking compiler flags" >&5
1374     if test "${GCC}" = "yes" ; then
1375
1376         # CYGNUS LOCAL
1377         VENDORPREFIX="cyg"
1378
1379         SHLIB_LD=""
1380         SHLIB_LD_LIBS=""
1381         LIBS=""
1382         LIBS_GUI="-lgdi32 -lcomdlg32"
1383         STLIB_LD="${AR} cr"
1384         RC_OUT=-o
1385         RC_TYPE=
1386         RC_INCLUDE=--include
1387         RES=res.o
1388         MAKE_LIB="\${STLIB_LD} \$@"
1389         POST_MAKE_LIB="\${RANLIB} \$@"
1390         MAKE_EXE="\${CC} -o \$@"
1391         LIBPREFIX="lib${VENDORPREFIX}"
1392
1393         if test "${SHARED_BUILD}" = "0" ; then
1394             # static
1395             echo "$ac_t""using static flags" 1>&6
1396             runtime=
1397             MAKE_DLL="echo "
1398             LIBSUFFIX="s\${DBGX}.a"
1399             LIBRARIES="\${STATIC_LIBRARIES}"
1400             EXESUFFIX="s\${DBGX}.exe"
1401             DLLSUFFIX=""
1402         else
1403             # dynamic
1404             echo "$ac_t""using shared flags" 1>&6
1405
1406             # ad-hoc check to see if CC supports -shared.
1407             if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then
1408                 { echo "configure: error: ${CC} does not support the -shared option.
1409                 You will need to upgrade to a newer version of the toolchain." 1>&2; exit 1; }
1410             fi
1411
1412             runtime=
1413             # Link with gcc since ld does not link to default libs like
1414             # -luser32 and -lmsvcrt. We also need to add CFLAGS so important
1415             # flags like -mno-cygwin get passed in to CC.
1416             SHLIB_LD='${CC} -shared ${CFLAGS}'
1417             # Add SHLIB_LD_LIBS to the Make rule, not here.
1418             MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \$@ ${extra_ldflags} \
1419                 -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\$@)"
1420             TK_DLL_BASE="-Wl,--image-base=0x66300000"
1421
1422             LIBSUFFIX="\${DBGX}.a"
1423             DLLSUFFIX="\${DBGX}.dll"
1424             EXESUFFIX="\${DBGX}.exe"
1425             LIBRARIES="\${SHARED_LIBRARIES}"
1426         fi
1427
1428         CFLAGS_DEBUG=-g
1429         CFLAGS_OPTIMIZE=-O
1430         CFLAGS_WARNING="-Wall -Wconversion"
1431         LDFLAGS_DEBUG=
1432         LDFLAGS_OPTIMIZE=
1433
1434         # Specify the CC output file names based on the target name
1435         CC_OBJNAME="-o \$@"
1436         CC_EXENAME="-o \$@"
1437
1438         # Specify linker flags depending on the type of app being 
1439         # built -- Console vs. Window.
1440         LDFLAGS_CONSOLE="-mconsole ${extra_ldflags}"
1441         LDFLAGS_WINDOW="-mwindows ${extra_ldflags}"
1442     else
1443         # CYGNUS LOCAL
1444         VENDORPREFIX="sn"
1445
1446         SHLIB_LD="link -dll -nologo"
1447         SHLIB_LD_LIBS="user32.lib advapi32.lib"
1448         LIBS="user32.lib advapi32.lib"
1449         LIBS_GUI="gdi32.lib comdlg32.lib"
1450         STLIB_LD="lib -nologo"
1451         RC="rc"
1452         RC_OUT=-fo
1453         RC_TYPE=-r
1454         RC_INCLUDE=-i
1455         RES=res
1456         MAKE_LIB="\${STLIB_LD} -out:\$@"
1457         POST_MAKE_LIB=
1458         MAKE_EXE="\${CC} -Fe\$@"
1459         LIBPREFIX=${VENDORPREFIX}
1460
1461         if test "${SHARED_BUILD}" = "0" ; then
1462             # static
1463             echo "$ac_t""using static flags" 1>&6
1464             runtime=-MT
1465             MAKE_DLL="echo "
1466             LIBSUFFIX="s\${DBGX}.lib"
1467             LIBRARIES="\${STATIC_LIBRARIES}"
1468             EXESUFFIX="s\${DBGX}.exe"
1469             DLLSUFFIX=""
1470         else
1471             # dynamic
1472             echo "$ac_t""using shared flags" 1>&6
1473             runtime=-MD
1474             # Add SHLIB_LD_LIBS to the Make rule, not here.
1475             MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@"
1476             LIBSUFFIX="\${DBGX}.lib"
1477             DLLSUFFIX="\${DBGX}.dll"
1478             EXESUFFIX="\${DBGX}.exe"
1479             LIBRARIES="\${SHARED_LIBRARIES}"
1480         fi
1481
1482         EXTRA_CFLAGS="-YX"
1483         CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d"
1484 #       CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD ${runtime}"
1485         CFLAGS_OPTIMIZE="-nologo -Oti -Gs -GD ${runtime}"
1486         CFLAGS_WARNING="-W3"
1487         LDFLAGS_DEBUG="-debug:full -debugtype:cv"
1488         LDFLAGS_OPTIMIZE="-release"
1489
1490         # Specify the CC output file names based on the target name
1491         CC_OBJNAME="-Fo\$@"
1492         CC_EXENAME="-Fe\"\$(shell \$(CYGPATH) '\$@')\""
1493
1494         # Specify linker flags depending on the type of app being 
1495         # built -- Console vs. Window.
1496         LDFLAGS_CONSOLE="-link -subsystem:console"
1497         LDFLAGS_WINDOW="-link -subsystem:windows"
1498     fi
1499
1500     # TCL_LIB_SUFFIX is defined here and in tclConfig.sh so that macros
1501     # can use a single variable name for both Tcl and extensions.
1502     TCL_LIB_SUFFIX=$LIBSUFFIX
1503
1504
1505 #--------------------------------------------------------------------
1506 # man2tcl needs this so that it can use errno.h
1507 #--------------------------------------------------------------------
1508
1509 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1510 echo "configure:1511: checking how to run the C preprocessor" >&5
1511 # On Suns, sometimes $CPP names a directory.
1512 if test -n "$CPP" && test -d "$CPP"; then
1513   CPP=
1514 fi
1515 if test -z "$CPP"; then
1516 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1517   echo $ac_n "(cached) $ac_c" 1>&6
1518 else
1519     # This must be in double quotes, not single quotes, because CPP may get
1520   # substituted into the Makefile and "${CC-cc}" will confuse make.
1521   CPP="${CC-cc} -E"
1522   # On the NeXT, cc -E runs the code through the compiler's parser,
1523   # not just through cpp.
1524   cat > conftest.$ac_ext <<EOF
1525 #line 1526 "configure"
1526 #include "confdefs.h"
1527 #include <assert.h>
1528 Syntax Error
1529 EOF
1530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1531 { (eval echo configure:1532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1533 if test -z "$ac_err"; then
1534   :
1535 else
1536   echo "$ac_err" >&5
1537   echo "configure: failed program was:" >&5
1538   cat conftest.$ac_ext >&5
1539   rm -rf conftest*
1540   CPP="${CC-cc} -E -traditional-cpp"
1541   cat > conftest.$ac_ext <<EOF
1542 #line 1543 "configure"
1543 #include "confdefs.h"
1544 #include <assert.h>
1545 Syntax Error
1546 EOF
1547 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1548 { (eval echo configure:1549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1549 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1550 if test -z "$ac_err"; then
1551   :
1552 else
1553   echo "$ac_err" >&5
1554   echo "configure: failed program was:" >&5
1555   cat conftest.$ac_ext >&5
1556   rm -rf conftest*
1557   CPP="${CC-cc} -nologo -E"
1558   cat > conftest.$ac_ext <<EOF
1559 #line 1560 "configure"
1560 #include "confdefs.h"
1561 #include <assert.h>
1562 Syntax Error
1563 EOF
1564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1565 { (eval echo configure:1566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1567 if test -z "$ac_err"; then
1568   :
1569 else
1570   echo "$ac_err" >&5
1571   echo "configure: failed program was:" >&5
1572   cat conftest.$ac_ext >&5
1573   rm -rf conftest*
1574   CPP=/lib/cpp
1575 fi
1576 rm -f conftest*
1577 fi
1578 rm -f conftest*
1579 fi
1580 rm -f conftest*
1581   ac_cv_prog_CPP="$CPP"
1582 fi
1583   CPP="$ac_cv_prog_CPP"
1584 else
1585   ac_cv_prog_CPP="$CPP"
1586 fi
1587 echo "$ac_t""$CPP" 1>&6
1588
1589 ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
1590 echo $ac_n "checking for errno.h""... $ac_c" 1>&6
1591 echo "configure:1592: checking for errno.h" >&5
1592 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1593   echo $ac_n "(cached) $ac_c" 1>&6
1594 else
1595   cat > conftest.$ac_ext <<EOF
1596 #line 1597 "configure"
1597 #include "confdefs.h"
1598 #include <errno.h>
1599 EOF
1600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1601 { (eval echo configure:1602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1603 if test -z "$ac_err"; then
1604   rm -rf conftest*
1605   eval "ac_cv_header_$ac_safe=yes"
1606 else
1607   echo "$ac_err" >&5
1608   echo "configure: failed program was:" >&5
1609   cat conftest.$ac_ext >&5
1610   rm -rf conftest*
1611   eval "ac_cv_header_$ac_safe=no"
1612 fi
1613 rm -f conftest*
1614 fi
1615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1616   echo "$ac_t""yes" 1>&6
1617   :
1618 else
1619   echo "$ac_t""no" 1>&6
1620 MAN2TCLFLAGS="-DNO_ERRNO_H"
1621 fi
1622
1623
1624
1625 #--------------------------------------------------------------------
1626 # Set the default compiler switches based on the --enable-symbols 
1627 # option.  This macro depends on C flags, and should be called
1628 # after SC_CONFIG_CFLAGS macro is called.
1629 #--------------------------------------------------------------------
1630
1631
1632     echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
1633 echo "configure:1634: checking for build with symbols" >&5
1634     # Check whether --enable-symbols or --disable-symbols was given.
1635 if test "${enable_symbols+set}" = set; then
1636   enableval="$enable_symbols"
1637   tcl_ok=$enableval
1638 else
1639   tcl_ok=no
1640 fi
1641
1642
1643     if test "$tcl_ok" = "yes"; then
1644         CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
1645         LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
1646         DBGX=d
1647         echo "$ac_t""yes" 1>&6
1648     else
1649         CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
1650         LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
1651         DBGX=""
1652         echo "$ac_t""no" 1>&6
1653     fi
1654
1655
1656 TK_DBGX=${DBGX}
1657
1658 #--------------------------------------------------------------------
1659 # Locate and source the tclConfig.sh file.
1660 #--------------------------------------------------------------------
1661
1662
1663     echo $ac_n "checking the location of tclConfig.sh""... $ac_c" 1>&6
1664 echo "configure:1665: checking the location of tclConfig.sh" >&5
1665
1666 # CYGNUS LOCAL
1667     if test -d ../../tcl8.1/win;  then
1668         TCL_BIN_DIR_DEFAULT=../../tcl8.1/win
1669     else
1670         TCL_BIN_DIR_DEFAULT=../../tcl/win
1671     fi
1672 # END CYGNUS LOCAL
1673     
1674     # Check whether --with-tcl or --without-tcl was given.
1675 if test "${with_tcl+set}" = set; then
1676   withval="$with_tcl"
1677   TCL_BIN_DIR=$withval
1678 else
1679   TCL_BIN_DIR=`cd $TCL_BIN_DIR_DEFAULT; pwd`
1680 fi
1681
1682     if test ! -d $TCL_BIN_DIR; then
1683         { echo "configure: error: Tcl directory $TCL_BIN_DIR does not exist" 1>&2; exit 1; }
1684     fi
1685     if test ! -f $TCL_BIN_DIR/tclConfig.sh; then
1686         { echo "configure: error: There is no tclConfig.sh in $TCL_BIN_DIR:  perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?" 1>&2; exit 1; }
1687     fi
1688     echo "$ac_t""$TCL_BIN_DIR/tclConfig.sh" 1>&6
1689
1690
1691     echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
1692 echo "configure:1693: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
1693
1694     if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
1695         echo "$ac_t""loading" 1>&6
1696         . $TCL_BIN_DIR/tclConfig.sh
1697     else
1698         echo "$ac_t""file not found" 1>&6
1699     fi
1700
1701     # The eval is required to do the TCL_DBGX substitution in the
1702     # TCL_LIB_FILE variable.
1703
1704     eval TCL_LIB_FILE=${TCL_LIB_FILE}
1705     eval TCL_LIB_FLAG=${TCL_LIB_FLAG}
1706
1707     
1708     
1709     
1710
1711
1712 #------------------------------------------------------------------------
1713 # tkConfig.sh refers to this by a different name
1714 #------------------------------------------------------------------------
1715
1716 TK_SHARED_BUILD=${SHARED_BUILD}
1717
1718 #--------------------------------------------------------------------
1719 # Perform final evaluations of variables with possible substitutions.
1720 #--------------------------------------------------------------------
1721
1722 NODOT_VERSION=${VER}
1723
1724 TK_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}"
1725 TK_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
1726 TK_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
1727
1728
1729   val="`cd $srcdir/..; pwd`"
1730
1731   if test "$val" = "" ; then
1732     { echo "configure: error: Empty value for variable TK_SRC_DIR" 1>&2; exit 1; }
1733   fi
1734
1735   case "${host}" in
1736     *windows32* | *mingw32*)
1737       if test "${CYGPATH}" = ""; then
1738         { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; }
1739       elif test "${CYGPATH}" = "echo"; then
1740         # No cygpath when cross compiling
1741         TK_SRC_DIR=$val
1742       else
1743         # store literal argument text in a variable
1744         val=$val
1745         # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo)
1746         val="`${CYGPATH} $val`"
1747         # Convert path like C:\Tmp\foo to C:/Tmp/foo
1748         TK_SRC_DIR="`echo $val | sed -e s#\\\\\\\\#/#g`"
1749       fi
1750     ;;
1751     *)
1752       # Default to a no-op under Unix or Cygwin gcc
1753       TK_SRC_DIR=$val
1754     ;;
1755   esac
1756
1757
1758
1759   libname=tk
1760   suffix=${TK_SHARED_LIB_SUFFIX}
1761
1762   case "${host}" in
1763     *windows32* | *mingw32* | *cygwin*)
1764       eval "long_libname=\"${TCL_VENDOR_PREFIX}${libname}${suffix}\""
1765     ;;
1766     *)
1767       eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\""
1768     ;;
1769   esac
1770
1771   eval "long_libname=${long_libname}"
1772
1773   # Trick to replace DBGX with TCL_DBGX
1774   DBGX='${TCL_DBGX}'
1775   eval "long_libname=${long_libname}"
1776
1777   TK_DLL_FILE=$long_libname
1778
1779
1780   libname=tk
1781   suffix=${TK_UNSHARED_LIB_SUFFIX}
1782
1783   case "${host}" in
1784     *windows32* | *mingw32*)
1785       if test "$GCC" != yes; then
1786         eval "long_libname=\"${TCL_VENDOR_PREFIX}${libname}${suffix}\""
1787       else
1788         eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\""
1789       fi
1790     ;;
1791     *)
1792       eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\""
1793     ;;
1794   esac
1795
1796   eval "long_libname=${long_libname}"
1797
1798   # Trick to replace DBGX with TCL_DBGX
1799   DBGX='${TCL_DBGX}'
1800   eval "long_libname=${long_libname}"
1801
1802   TK_LIB_FILE=$long_libname
1803
1804
1805   libname=tkstub
1806   suffix=${TK_UNSHARED_LIB_SUFFIX}
1807
1808   case "${host}" in
1809     *windows32* | *mingw32*)
1810       if test "$GCC" != yes; then
1811         eval "long_libname=\"${TCL_VENDOR_PREFIX}${libname}${suffix}\""
1812       else
1813         eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\""
1814       fi
1815     ;;
1816     *)
1817       eval "long_libname=\"lib${TCL_VENDOR_PREFIX}${libname}${suffix}\""
1818     ;;
1819   esac
1820
1821   eval "long_libname=${long_libname}"
1822
1823   # Trick to replace DBGX with TCL_DBGX
1824   DBGX='${TCL_DBGX}'
1825   eval "long_libname=${long_libname}"
1826
1827   TK_STUB_LIB_FILE=$long_libname
1828
1829
1830 if test "$GCC" = "yes"; then
1831     GNU_TK_LIB_FILE=${TK_LIB_FILE}
1832     MSVC_TK_LIB_FILE=
1833 else
1834     GNU_TK_LIB_FILE=
1835     MSVC_TK_LIB_FILE=${TK_LIB_FILE}
1836 fi
1837
1838
1839   libname=tkstub
1840   version=${TK_VERSION}
1841
1842   if test "$TCL_LIB_SUFFIX" = "" ; then
1843     { echo "configure: error: The TCL_LIB_SUFFIX variable is not defined" 1>&2; exit 1; }
1844   fi
1845
1846   # If the . character is not allowed in lib name, remove it from version
1847   if test "${TCL_LIB_VERSIONS_OK}" != "ok"; then
1848         version=`echo $version | tr -d .`
1849   fi
1850
1851   case "${host}" in
1852     *windows32* | *mingw32*)
1853       if test "$GCC" != yes; then
1854         eval "short_libname=\"${TCL_VENDOR_PREFIX}${libname}${version}${TCL_LIB_SUFFIX}\""
1855       else
1856         short_libname="-l${TCL_VENDOR_PREFIX}${libname}${version}${TCL_DBGX}"
1857       fi
1858     ;;
1859     *)
1860       short_libname="-l${TCL_VENDOR_PREFIX}${libname}${version}\${TCL_DBGX}"
1861     ;;
1862   esac
1863
1864   TK_STUB_LIB_FLAG=$short_libname
1865
1866
1867   case "${host}" in
1868     *windows32* | *mingw32*)
1869       if test "$GCC" != yes; then
1870         
1871   val="`pwd`/${TK_STUB_LIB_FLAG}"
1872
1873   if test "$val" = "" ; then
1874     { echo "configure: error: Empty value for variable TK_BUILD_STUB_LIB_SPEC" 1>&2; exit 1; }
1875   fi
1876
1877   case "${host}" in
1878     *windows32* | *mingw32*)
1879       if test "${CYGPATH}" = ""; then
1880         { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; }
1881       elif test "${CYGPATH}" = "echo"; then
1882         # No cygpath when cross compiling
1883         TK_BUILD_STUB_LIB_SPEC=$val
1884       else
1885         # store literal argument text in a variable
1886         val=$val
1887         # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo)
1888         val="`${CYGPATH} $val`"
1889         # Convert path like C:\Tmp\foo to C:/Tmp/foo
1890         TK_BUILD_STUB_LIB_SPEC="`echo $val | sed -e s#\\\\\\\\#/#g`"
1891       fi
1892     ;;
1893     *)
1894       # Default to a no-op under Unix or Cygwin gcc
1895       TK_BUILD_STUB_LIB_SPEC=$val
1896     ;;
1897   esac
1898
1899       else
1900         
1901   val=`pwd`
1902
1903   if test "$val" = "" ; then
1904     { echo "configure: error: Empty value for variable dirname" 1>&2; exit 1; }
1905   fi
1906
1907   case "${host}" in
1908     *windows32* | *mingw32*)
1909       if test "${CYGPATH}" = ""; then
1910         { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; }
1911       elif test "${CYGPATH}" = "echo"; then
1912         # No cygpath when cross compiling
1913         dirname=$val
1914       else
1915         # store literal argument text in a variable
1916         val=$val
1917         # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo)
1918         val="`${CYGPATH} $val`"
1919         # Convert path like C:\Tmp\foo to C:/Tmp/foo
1920         dirname="`echo $val | sed -e s#\\\\\\\\#/#g`"
1921       fi
1922     ;;
1923     *)
1924       # Default to a no-op under Unix or Cygwin gcc
1925       dirname=$val
1926     ;;
1927   esac
1928
1929         TK_BUILD_STUB_LIB_SPEC="-L${dirname} ${TK_STUB_LIB_FLAG}"
1930       fi
1931     ;;
1932     *)
1933       TK_BUILD_STUB_LIB_SPEC="-L`pwd` ${TK_STUB_LIB_FLAG}"
1934     ;;
1935   esac
1936
1937
1938   case "${host}" in
1939     *windows32* | *mingw32*)
1940       if test "$GCC" != yes; then
1941         
1942   val="${exec_prefix}/lib/${TK_STUB_LIB_FLAG}"
1943
1944   if test "$val" = "" ; then
1945     { echo "configure: error: Empty value for variable TK_STUB_LIB_SPEC" 1>&2; exit 1; }
1946   fi
1947
1948   case "${host}" in
1949     *windows32* | *mingw32*)
1950       if test "${CYGPATH}" = ""; then
1951         { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; }
1952       elif test "${CYGPATH}" = "echo"; then
1953         # No cygpath when cross compiling
1954         TK_STUB_LIB_SPEC=$val
1955       else
1956         # store literal argument text in a variable
1957         val=$val
1958         # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo)
1959         val="`${CYGPATH} $val`"
1960         # Convert path like C:\Tmp\foo to C:/Tmp/foo
1961         TK_STUB_LIB_SPEC="`echo $val | sed -e s#\\\\\\\\#/#g`"
1962       fi
1963     ;;
1964     *)
1965       # Default to a no-op under Unix or Cygwin gcc
1966       TK_STUB_LIB_SPEC=$val
1967     ;;
1968   esac
1969
1970       else
1971         
1972   val=${exec_prefix}/lib
1973
1974   if test "$val" = "" ; then
1975     { echo "configure: error: Empty value for variable dirname" 1>&2; exit 1; }
1976   fi
1977
1978   case "${host}" in
1979     *windows32* | *mingw32*)
1980       if test "${CYGPATH}" = ""; then
1981         { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; }
1982       elif test "${CYGPATH}" = "echo"; then
1983         # No cygpath when cross compiling
1984         dirname=$val
1985       else
1986         # store literal argument text in a variable
1987         val=$val
1988         # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo)
1989         val="`${CYGPATH} $val`"
1990         # Convert path like C:\Tmp\foo to C:/Tmp/foo
1991         dirname="`echo $val | sed -e s#\\\\\\\\#/#g`"
1992       fi
1993     ;;
1994     *)
1995       # Default to a no-op under Unix or Cygwin gcc
1996       dirname=$val
1997     ;;
1998   esac
1999
2000         TK_STUB_LIB_SPEC="-L${dirname} ${TK_STUB_LIB_FLAG}"
2001       fi
2002     ;;
2003     *)
2004       TK_STUB_LIB_SPEC="-L${exec_prefix}/lib ${TK_STUB_LIB_FLAG}"
2005     ;;
2006   esac
2007
2008
2009
2010   
2011   val="`pwd`/${TK_STUB_LIB_FILE}"
2012
2013   if test "$val" = "" ; then
2014     { echo "configure: error: Empty value for variable TK_BUILD_STUB_LIB_PATH" 1>&2; exit 1; }
2015   fi
2016
2017   case "${host}" in
2018     *windows32* | *mingw32*)
2019       if test "${CYGPATH}" = ""; then
2020         { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; }
2021       elif test "${CYGPATH}" = "echo"; then
2022         # No cygpath when cross compiling
2023         TK_BUILD_STUB_LIB_PATH=$val
2024       else
2025         # store literal argument text in a variable
2026         val=$val
2027         # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo)
2028         val="`${CYGPATH} $val`"
2029         # Convert path like C:\Tmp\foo to C:/Tmp/foo
2030         TK_BUILD_STUB_LIB_PATH="`echo $val | sed -e s#\\\\\\\\#/#g`"
2031       fi
2032     ;;
2033     *)
2034       # Default to a no-op under Unix or Cygwin gcc
2035       TK_BUILD_STUB_LIB_PATH=$val
2036     ;;
2037   esac
2038
2039
2040
2041   
2042   val="${exec_prefix}/lib/${TK_STUB_LIB_FILE}"
2043
2044   if test "$val" = "" ; then
2045     { echo "configure: error: Empty value for variable TK_STUB_LIB_PATH" 1>&2; exit 1; }
2046   fi
2047
2048   case "${host}" in
2049     *windows32* | *mingw32*)
2050       if test "${CYGPATH}" = ""; then
2051         { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; }
2052       elif test "${CYGPATH}" = "echo"; then
2053         # No cygpath when cross compiling
2054         TK_STUB_LIB_PATH=$val
2055       else
2056         # store literal argument text in a variable
2057         val=$val
2058         # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo)
2059         val="`${CYGPATH} $val`"
2060         # Convert path like C:\Tmp\foo to C:/Tmp/foo
2061         TK_STUB_LIB_PATH="`echo $val | sed -e s#\\\\\\\\#/#g`"
2062       fi
2063     ;;
2064     *)
2065       # Default to a no-op under Unix or Cygwin gcc
2066       TK_STUB_LIB_PATH=$val
2067     ;;
2068   esac
2069
2070
2071
2072 eval "DLLSUFFIX=${DLLSUFFIX}"
2073 eval "LIBPREFIX=${LIBPREFIX}"
2074 eval "LIBSUFFIX=${LIBSUFFIX}"
2075 eval "EXESUFFIX=${EXESUFFIX}"
2076
2077
2078   libname=tk
2079   version=$TK_VERSION
2080
2081   if test "$TCL_LIB_SUFFIX" = "" ; then
2082     { echo "configure: error: The TCL_LIB_SUFFIX variable is not defined" 1>&2; exit 1; }
2083   fi
2084
2085   # If the . character is not allowed in lib name, remove it from version
2086   if test "${TCL_LIB_VERSIONS_OK}" != "ok"; then
2087         version=`echo $version | tr -d .`
2088   fi
2089
2090   case "${host}" in
2091     *windows32* | *mingw32*)
2092       if test "$GCC" != yes; then
2093         eval "short_libname=\"${TCL_VENDOR_PREFIX}${libname}${version}${TCL_LIB_SUFFIX}\""
2094       else
2095         short_libname="-l${TCL_VENDOR_PREFIX}${libname}${version}${TCL_DBGX}"
2096       fi
2097     ;;
2098     *)
2099       short_libname="-l${TCL_VENDOR_PREFIX}${libname}${version}\${TCL_DBGX}"
2100     ;;
2101   esac
2102
2103   TK_LIB_FLAG=$short_libname
2104
2105
2106   case "${host}" in
2107     *windows32* | *mingw32*)
2108       if test "$GCC" != yes; then
2109         
2110   val="`pwd`/${TK_LIB_FLAG}"
2111
2112   if test "$val" = "" ; then
2113     { echo "configure: error: Empty value for variable TK_BUILD_LIB_SPEC" 1>&2; exit 1; }
2114   fi
2115
2116   case "${host}" in
2117     *windows32* | *mingw32*)
2118       if test "${CYGPATH}" = ""; then
2119         { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; }
2120       elif test "${CYGPATH}" = "echo"; then
2121         # No cygpath when cross compiling
2122         TK_BUILD_LIB_SPEC=$val
2123       else
2124         # store literal argument text in a variable
2125         val=$val
2126         # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo)
2127         val="`${CYGPATH} $val`"
2128         # Convert path like C:\Tmp\foo to C:/Tmp/foo
2129         TK_BUILD_LIB_SPEC="`echo $val | sed -e s#\\\\\\\\#/#g`"
2130       fi
2131     ;;
2132     *)
2133       # Default to a no-op under Unix or Cygwin gcc
2134       TK_BUILD_LIB_SPEC=$val
2135     ;;
2136   esac
2137
2138       else
2139         
2140   val=`pwd`
2141
2142   if test "$val" = "" ; then
2143     { echo "configure: error: Empty value for variable dirname" 1>&2; exit 1; }
2144   fi
2145
2146   case "${host}" in
2147     *windows32* | *mingw32*)
2148       if test "${CYGPATH}" = ""; then
2149         { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; }
2150       elif test "${CYGPATH}" = "echo"; then
2151         # No cygpath when cross compiling
2152         dirname=$val
2153       else
2154         # store literal argument text in a variable
2155         val=$val
2156         # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo)
2157         val="`${CYGPATH} $val`"
2158         # Convert path like C:\Tmp\foo to C:/Tmp/foo
2159         dirname="`echo $val | sed -e s#\\\\\\\\#/#g`"
2160       fi
2161     ;;
2162     *)
2163       # Default to a no-op under Unix or Cygwin gcc
2164       dirname=$val
2165     ;;
2166   esac
2167
2168         TK_BUILD_LIB_SPEC="-L${dirname} ${TK_LIB_FLAG}"
2169       fi
2170     ;;
2171     *)
2172       TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}"
2173     ;;
2174   esac
2175
2176
2177   case "${host}" in
2178     *windows32* | *mingw32*)
2179       if test "$GCC" != yes; then
2180         
2181   val="${exec_prefix}/lib/${TK_LIB_FLAG}"
2182
2183   if test "$val" = "" ; then
2184     { echo "configure: error: Empty value for variable TK_LIB_SPEC" 1>&2; exit 1; }
2185   fi
2186
2187   case "${host}" in
2188     *windows32* | *mingw32*)
2189       if test "${CYGPATH}" = ""; then
2190         { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; }
2191       elif test "${CYGPATH}" = "echo"; then
2192         # No cygpath when cross compiling
2193         TK_LIB_SPEC=$val
2194       else
2195         # store literal argument text in a variable
2196         val=$val
2197         # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo)
2198         val="`${CYGPATH} $val`"
2199         # Convert path like C:\Tmp\foo to C:/Tmp/foo
2200         TK_LIB_SPEC="`echo $val | sed -e s#\\\\\\\\#/#g`"
2201       fi
2202     ;;
2203     *)
2204       # Default to a no-op under Unix or Cygwin gcc
2205       TK_LIB_SPEC=$val
2206     ;;
2207   esac
2208
2209       else
2210         
2211   val=${exec_prefix}/lib
2212
2213   if test "$val" = "" ; then
2214     { echo "configure: error: Empty value for variable dirname" 1>&2; exit 1; }
2215   fi
2216
2217   case "${host}" in
2218     *windows32* | *mingw32*)
2219       if test "${CYGPATH}" = ""; then
2220         { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; }
2221       elif test "${CYGPATH}" = "echo"; then
2222         # No cygpath when cross compiling
2223         dirname=$val
2224       else
2225         # store literal argument text in a variable
2226         val=$val
2227         # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo)
2228         val="`${CYGPATH} $val`"
2229         # Convert path like C:\Tmp\foo to C:/Tmp/foo
2230         dirname="`echo $val | sed -e s#\\\\\\\\#/#g`"
2231       fi
2232     ;;
2233     *)
2234       # Default to a no-op under Unix or Cygwin gcc
2235       dirname=$val
2236     ;;
2237   esac
2238
2239         TK_LIB_SPEC="-L${dirname} ${TK_LIB_FLAG}"
2240       fi
2241     ;;
2242     *)
2243       TK_LIB_SPEC="-L${exec_prefix}/lib ${TK_LIB_FLAG}"
2244     ;;
2245   esac
2246
2247
2248   
2249   val="`pwd`/${TK_LIB_FILE}"
2250
2251   if test "$val" = "" ; then
2252     { echo "configure: error: Empty value for variable TK_LIB_FULL_PATH" 1>&2; exit 1; }
2253   fi
2254
2255   case "${host}" in
2256     *windows32* | *mingw32*)
2257       if test "${CYGPATH}" = ""; then
2258         { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; }
2259       elif test "${CYGPATH}" = "echo"; then
2260         # No cygpath when cross compiling
2261         TK_LIB_FULL_PATH=$val
2262       else
2263         # store literal argument text in a variable
2264         val=$val
2265         # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo)
2266         val="`${CYGPATH} $val`"
2267         # Convert path like C:\Tmp\foo to C:/Tmp/foo
2268         TK_LIB_FULL_PATH="`echo $val | sed -e s#\\\\\\\\#/#g`"
2269       fi
2270     ;;
2271     *)
2272       # Default to a no-op under Unix or Cygwin gcc
2273       TK_LIB_FULL_PATH=$val
2274     ;;
2275   esac
2276
2277
2278
2279 if test "$SHARED_BUILD" = 0 -o $TCL_NEEDS_EXP_FILE = 0; then
2280     WISH_RES=wish_static.${RES}
2281     TK_RES=
2282 else
2283     WISH_RES=wish_static.${RES}
2284     TK_RES=tk_dll.${RES}
2285 fi
2286 TK_SHARED_BUILD=${SHARED_BUILD}
2287
2288 CFG_TK_SHARED_LIB_SUFFIX=${TK_SHARED_LIB_SUFFIX}
2289 CFG_TK_UNSHARED_LIB_SUFFIX=${TK_UNSHARED_LIB_SUFFIX}
2290 CFG_TK_EXPORT_FILE_SUFFIX=${TK_EXPORT_FILE_SUFFIX}
2291
2292 # Add X include path, it must be in a format
2293 # like -I"C:/Dir" and not -I"C:\Dir" or VC++ will puke.
2294
2295   val=`cd $srcdir/../xlib; pwd`
2296
2297   if test "$val" = "" ; then
2298     { echo "configure: error: Empty value for variable XINCLUDES" 1>&2; exit 1; }
2299   fi
2300
2301   case "${host}" in
2302     *windows32* | *mingw32*)
2303       if test "${CYGPATH}" = ""; then
2304         { echo "configure: error: CYGPATH variable is not defined." 1>&2; exit 1; }
2305       elif test "${CYGPATH}" = "echo"; then
2306         # No cygpath when cross compiling
2307         XINCLUDES=$val
2308       else
2309         # store literal argument text in a variable
2310         val=$val
2311         # Convert Cygwin to Windows path (/tmp/foo -> C:\Tmp\foo)
2312         val="`${CYGPATH} $val`"
2313         # Convert path like C:\Tmp\foo to C:/Tmp/foo
2314         XINCLUDES="`echo $val | sed -e s#\\\\\\\\#/#g`"
2315       fi
2316     ;;
2317     *)
2318       # Default to a no-op under Unix or Cygwin gcc
2319       XINCLUDES=$val
2320     ;;
2321   esac
2322
2323 XINCLUDES="-I\"${XINCLUDES}\""
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409 trap '' 1 2 15
2410 cat > confcache <<\EOF
2411 # This file is a shell script that caches the results of configure
2412 # tests run on this system so they can be shared between configure
2413 # scripts and configure runs.  It is not useful on other systems.
2414 # If it contains results you don't want to keep, you may remove or edit it.
2415 #
2416 # By default, configure uses ./config.cache as the cache file,
2417 # creating it if it does not exist already.  You can give configure
2418 # the --cache-file=FILE option to use a different cache file; that is
2419 # what configure does when it calls configure scripts in
2420 # subdirectories, so they share the cache.
2421 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2422 # config.status only pays attention to the cache file if you give it the
2423 # --recheck option to rerun configure.
2424 #
2425 EOF
2426 # The following way of writing the cache mishandles newlines in values,
2427 # but we know of no workaround that is simple, portable, and efficient.
2428 # So, don't put newlines in cache variables' values.
2429 # Ultrix sh set writes to stderr and can't be redirected directly,
2430 # and sets the high bit in the cache file unless we assign to the vars.
2431 (set) 2>&1 |
2432   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2433   *ac_space=\ *)
2434     # `set' does not quote correctly, so add quotes (double-quote substitution
2435     # turns \\\\ into \\, and sed turns \\ into \).
2436     sed -n \
2437       -e "s/'/'\\\\''/g" \
2438       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2439     ;;
2440   *)
2441     # `set' quotes correctly as required by POSIX, so do not add quotes.
2442     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2443     ;;
2444   esac >> confcache
2445 if cmp -s $cache_file confcache; then
2446   :
2447 else
2448   if test -w $cache_file; then
2449     echo "updating cache $cache_file"
2450     cat confcache > $cache_file
2451   else
2452     echo "not updating unwritable cache $cache_file"
2453   fi
2454 fi
2455 rm -f confcache
2456
2457 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2458
2459 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2460 # Let make expand exec_prefix.
2461 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2462
2463 # Any assignment to VPATH causes Sun make to only execute
2464 # the first set of double-colon rules, so remove it if not needed.
2465 # If there is a colon in the path, we need to keep it.
2466 if test "x$srcdir" = x.; then
2467   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2468 fi
2469
2470 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2471
2472 # Transform confdefs.h into DEFS.
2473 # Protect against shell expansion while executing Makefile rules.
2474 # Protect against Makefile macro expansion.
2475 cat > conftest.defs <<\EOF
2476 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2477 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
2478 s%\[%\\&%g
2479 s%\]%\\&%g
2480 s%\$%$$%g
2481 EOF
2482 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2483 rm -f conftest.defs
2484
2485
2486 # Without the "./", some shells look in PATH for config.status.
2487 : ${CONFIG_STATUS=./config.status}
2488
2489 echo creating $CONFIG_STATUS
2490 rm -f $CONFIG_STATUS
2491 cat > $CONFIG_STATUS <<EOF
2492 #! /bin/sh
2493 # Generated automatically by configure.
2494 # Run this file to recreate the current configuration.
2495 # This directory was configured as follows,
2496 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2497 #
2498 # $0 $ac_configure_args
2499 #
2500 # Compiler output produced by configure, useful for debugging
2501 # configure, is in ./config.log if it exists.
2502
2503 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2504 for ac_option
2505 do
2506   case "\$ac_option" in
2507   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2508     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2509     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2510   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2511     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2512     exit 0 ;;
2513   -help | --help | --hel | --he | --h)
2514     echo "\$ac_cs_usage"; exit 0 ;;
2515   *) echo "\$ac_cs_usage"; exit 1 ;;
2516   esac
2517 done
2518
2519 ac_given_srcdir=$srcdir
2520
2521 trap 'rm -fr `echo "Makefile tkConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2522 EOF
2523 cat >> $CONFIG_STATUS <<EOF
2524
2525 # Protect against being on the right side of a sed subst in config.status.
2526 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2527  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2528 $ac_vpsub
2529 $extrasub
2530 s%@SHELL@%$SHELL%g
2531 s%@CFLAGS@%$CFLAGS%g
2532 s%@CPPFLAGS@%$CPPFLAGS%g
2533 s%@CXXFLAGS@%$CXXFLAGS%g
2534 s%@FFLAGS@%$FFLAGS%g
2535 s%@DEFS@%$DEFS%g
2536 s%@LDFLAGS@%$LDFLAGS%g
2537 s%@LIBS@%$LIBS%g
2538 s%@exec_prefix@%$exec_prefix%g
2539 s%@prefix@%$prefix%g
2540 s%@program_transform_name@%$program_transform_name%g
2541 s%@bindir@%$bindir%g
2542 s%@sbindir@%$sbindir%g
2543 s%@libexecdir@%$libexecdir%g
2544 s%@datadir@%$datadir%g
2545 s%@sysconfdir@%$sysconfdir%g
2546 s%@sharedstatedir@%$sharedstatedir%g
2547 s%@localstatedir@%$localstatedir%g
2548 s%@libdir@%$libdir%g
2549 s%@includedir@%$includedir%g
2550 s%@oldincludedir@%$oldincludedir%g
2551 s%@infodir@%$infodir%g
2552 s%@mandir@%$mandir%g
2553 s%@CC@%$CC%g
2554 s%@host@%$host%g
2555 s%@host_alias@%$host_alias%g
2556 s%@host_cpu@%$host_cpu%g
2557 s%@host_vendor@%$host_vendor%g
2558 s%@host_os@%$host_os%g
2559 s%@build@%$build%g
2560 s%@build_alias@%$build_alias%g
2561 s%@build_cpu@%$build_cpu%g
2562 s%@build_vendor@%$build_vendor%g
2563 s%@build_os@%$build_os%g
2564 s%@AR@%$AR%g
2565 s%@RANLIB@%$RANLIB%g
2566 s%@RC@%$RC%g
2567 s%@SET_MAKE@%$SET_MAKE%g
2568 s%@OBJEXT@%$OBJEXT%g
2569 s%@EXEEXT@%$EXEEXT%g
2570 s%@CYGPATH@%$CYGPATH%g
2571 s%@CPP@%$CPP%g
2572 s%@MAN2TCLFLAGS@%$MAN2TCLFLAGS%g
2573 s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
2574 s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
2575 s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
2576 s%@TK_VERSION@%$TK_VERSION%g
2577 s%@TK_MAJOR_VERSION@%$TK_MAJOR_VERSION%g
2578 s%@TK_MINOR_VERSION@%$TK_MINOR_VERSION%g
2579 s%@TK_PATCH_LEVEL@%$TK_PATCH_LEVEL%g
2580 s%@TK_DBGX@%$TK_DBGX%g
2581 s%@TK_LIB_FILE@%$TK_LIB_FILE%g
2582 s%@GNU_TK_LIB_FILE@%$GNU_TK_LIB_FILE%g
2583 s%@MSVC_TK_LIB_FILE@%$MSVC_TK_LIB_FILE%g
2584 s%@TK_DLL_FILE@%$TK_DLL_FILE%g
2585 s%@TK_DLL_BASE@%$TK_DLL_BASE%g
2586 s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
2587 s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
2588 s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
2589 s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
2590 s%@TK_STUB_LIB_PATH@%$TK_STUB_LIB_PATH%g
2591 s%@TK_BUILD_STUB_LIB_SPEC@%$TK_BUILD_STUB_LIB_SPEC%g
2592 s%@TK_BUILD_STUB_LIB_PATH@%$TK_BUILD_STUB_LIB_PATH%g
2593 s%@TK_SRC_DIR@%$TK_SRC_DIR%g
2594 s%@TK_BIN_DIR@%$TK_BIN_DIR%g
2595 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
2596 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
2597 s%@TK_LIB_FULL_PATH@%$TK_LIB_FULL_PATH%g
2598 s%@TK_SHARED_BUILD@%$TK_SHARED_BUILD%g
2599 s%@WISH_RES@%$WISH_RES%g
2600 s%@TK_RES@%$TK_RES%g
2601 s%@TCL_VERSION@%$TCL_VERSION%g
2602 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
2603 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
2604 s%@TCL_PATCH_LEVEL@%$TCL_PATCH_LEVEL%g
2605 s%@TCL_DLL_FILE@%$TCL_DLL_FILE%g
2606 s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
2607 s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
2608 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
2609 s%@TCL_BUILD_STUB_LIB_SPEC@%$TCL_BUILD_STUB_LIB_SPEC%g
2610 s%@TCL_DBGX@%$TCL_DBGX%g
2611 s%@CFG_TK_SHARED_LIB_SUFFIX@%$CFG_TK_SHARED_LIB_SUFFIX%g
2612 s%@CFG_TK_UNSHARED_LIB_SUFFIX@%$CFG_TK_UNSHARED_LIB_SUFFIX%g
2613 s%@CFG_TK_EXPORT_FILE_SUFFIX@%$CFG_TK_EXPORT_FILE_SUFFIX%g
2614 s%@DEPARG@%$DEPARG%g
2615 s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
2616 s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
2617 s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
2618 s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
2619 s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
2620 s%@STLIB_LD@%$STLIB_LD%g
2621 s%@SHLIB_LD@%$SHLIB_LD%g
2622 s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
2623 s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
2624 s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
2625 s%@CC_OBJNAME@%$CC_OBJNAME%g
2626 s%@CC_EXENAME@%$CC_EXENAME%g
2627 s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
2628 s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
2629 s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
2630 s%@LDFLAGS_CONSOLE@%$LDFLAGS_CONSOLE%g
2631 s%@LDFLAGS_WINDOW@%$LDFLAGS_WINDOW%g
2632 s%@RC_OUT@%$RC_OUT%g
2633 s%@RC_TYPE@%$RC_TYPE%g
2634 s%@RC_INCLUDE@%$RC_INCLUDE%g
2635 s%@RES@%$RES%g
2636 s%@LIBS_GUI@%$LIBS_GUI%g
2637 s%@DLLSUFFIX@%$DLLSUFFIX%g
2638 s%@LIBPREFIX@%$LIBPREFIX%g
2639 s%@LIBSUFFIX@%$LIBSUFFIX%g
2640 s%@EXESUFFIX@%$EXESUFFIX%g
2641 s%@LIBRARIES@%$LIBRARIES%g
2642 s%@MAKE_LIB@%$MAKE_LIB%g
2643 s%@POST_MAKE_LIB@%$POST_MAKE_LIB%g
2644 s%@MAKE_DLL@%$MAKE_DLL%g
2645 s%@MAKE_EXE@%$MAKE_EXE%g
2646 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
2647 s%@XINCLUDES@%$XINCLUDES%g
2648
2649 CEOF
2650 EOF
2651
2652 cat >> $CONFIG_STATUS <<\EOF
2653
2654 # Split the substitutions into bite-sized pieces for seds with
2655 # small command number limits, like on Digital OSF/1 and HP-UX.
2656 ac_max_sed_cmds=60 # Maximum number of lines to put in a sed script.
2657 ac_file=1 # Number of current file.
2658 ac_beg=1 # First line for current file.
2659 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2660 ac_more_lines=:
2661 ac_sed_cmds=""
2662 while $ac_more_lines; do
2663   if test $ac_beg -gt 1; then
2664     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2665   else
2666     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2667   fi
2668   if test ! -s conftest.s$ac_file; then
2669     ac_more_lines=false
2670     rm -f conftest.s$ac_file
2671   else
2672     if test -z "$ac_sed_cmds"; then
2673       ac_sed_cmds="sed -f conftest.s$ac_file"
2674     else
2675       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2676     fi
2677     ac_file=`expr $ac_file + 1`
2678     ac_beg=$ac_end
2679     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2680   fi
2681 done
2682 if test -z "$ac_sed_cmds"; then
2683   ac_sed_cmds=cat
2684 fi
2685 EOF
2686
2687 cat >> $CONFIG_STATUS <<EOF
2688
2689 CONFIG_FILES=\${CONFIG_FILES-"Makefile tkConfig.sh"}
2690 EOF
2691 cat >> $CONFIG_STATUS <<\EOF
2692 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2693   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2694   case "$ac_file" in
2695   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2696        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2697   *) ac_file_in="${ac_file}.in" ;;
2698   esac
2699
2700   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2701
2702   # Remove last slash and all that follows it.  Not all systems have dirname.
2703   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2704   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2705     # The file is in a subdirectory.
2706     test ! -d "$ac_dir" && mkdir "$ac_dir"
2707     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2708     # A "../" for each directory in $ac_dir_suffix.
2709     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2710   else
2711     ac_dir_suffix= ac_dots=
2712   fi
2713
2714   case "$ac_given_srcdir" in
2715   .)  srcdir=.
2716       if test -z "$ac_dots"; then top_srcdir=.
2717       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2718   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2719   *) # Relative path.
2720     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2721     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2722   esac
2723
2724
2725   echo creating "$ac_file"
2726   rm -f "$ac_file"
2727   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2728   case "$ac_file" in
2729   *Makefile*) ac_comsub="1i\\
2730 # $configure_input" ;;
2731   *) ac_comsub= ;;
2732   esac
2733
2734   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2735   sed -e "$ac_comsub
2736 s%@configure_input@%$configure_input%g
2737 s%@srcdir@%$srcdir%g
2738 s%@top_srcdir@%$top_srcdir%g
2739 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2740 fi; done
2741 rm -f conftest.s*
2742
2743 EOF
2744 cat >> $CONFIG_STATUS <<EOF
2745
2746 EOF
2747 cat >> $CONFIG_STATUS <<\EOF
2748
2749 exit 0
2750 EOF
2751 chmod +x $CONFIG_STATUS
2752 rm -fr confdefs* $ac_clean_files
2753 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2754