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