1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.59.
4#
5# Copyright (C) 2003 Free Software Foundation, Inc.
6# This configure script is free software; the Free Software Foundation
7# gives unlimited permission to copy, distribute and modify it.
8## --------------------- ##
9## M4sh Initialization.  ##
10## --------------------- ##
11
12# Be Bourne compatible
13if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14  emulate sh
15  NULLCMD=:
16  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17  # is contrary to our usage.  Disable this feature.
18  alias -g '${1+"$@"}'='"$@"'
19elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20  set -o posix
21fi
22DUALCASE=1; export DUALCASE # for MKS sh
23
24# Support unset when possible.
25if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26  as_unset=unset
27else
28  as_unset=false
29fi
30
31
32# Work around bugs in pre-3.0 UWIN ksh.
33$as_unset ENV MAIL MAILPATH
34PS1='$ '
35PS2='> '
36PS4='+ '
37
38# NLS nuisances.
39for as_var in \
40  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
41  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
42  LC_TELEPHONE LC_TIME
43do
44  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
45    eval $as_var=C; export $as_var
46  else
47    $as_unset $as_var
48  fi
49done
50
51# Required to use basename.
52if expr a : '\(a\)' >/dev/null 2>&1; then
53  as_expr=expr
54else
55  as_expr=false
56fi
57
58if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
59  as_basename=basename
60else
61  as_basename=false
62fi
63
64
65# Name of the executable.
66as_me=`$as_basename "$0" ||
67$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68	 X"$0" : 'X\(//\)$' \| \
69	 X"$0" : 'X\(/\)$' \| \
70	 .     : '\(.\)' 2>/dev/null ||
71echo X/"$0" |
72    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
73  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
74  	  /^X\/\(\/\).*/{ s//\1/; q; }
75  	  s/.*/./; q'`
76
77
78# PATH needs CR, and LINENO needs CR and PATH.
79# Avoid depending upon Character Ranges.
80as_cr_letters='abcdefghijklmnopqrstuvwxyz'
81as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
82as_cr_Letters=$as_cr_letters$as_cr_LETTERS
83as_cr_digits='0123456789'
84as_cr_alnum=$as_cr_Letters$as_cr_digits
85
86# The user is always right.
87if test "${PATH_SEPARATOR+set}" != set; then
88  echo "#! /bin/sh" >conf$$.sh
89  echo  "exit 0"   >>conf$$.sh
90  chmod +x conf$$.sh
91  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
92    PATH_SEPARATOR=';'
93  else
94    PATH_SEPARATOR=:
95  fi
96  rm -f conf$$.sh
97fi
98
99
100  as_lineno_1=$LINENO
101  as_lineno_2=$LINENO
102  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
103  test "x$as_lineno_1" != "x$as_lineno_2" &&
104  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
105  # Find who we are.  Look in the path if we contain no path at all
106  # relative or not.
107  case $0 in
108    *[\\/]* ) as_myself=$0 ;;
109    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
110for as_dir in $PATH
111do
112  IFS=$as_save_IFS
113  test -z "$as_dir" && as_dir=.
114  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
115done
116
117       ;;
118  esac
119  # We did not find ourselves, most probably we were run as `sh COMMAND'
120  # in which case we are not to be found in the path.
121  if test "x$as_myself" = x; then
122    as_myself=$0
123  fi
124  if test ! -f "$as_myself"; then
125    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
126   { (exit 1); exit 1; }; }
127  fi
128  case $CONFIG_SHELL in
129  '')
130    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
131for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
132do
133  IFS=$as_save_IFS
134  test -z "$as_dir" && as_dir=.
135  for as_base in sh bash ksh sh5; do
136	 case $as_dir in
137	 /*)
138	   if ("$as_dir/$as_base" -c '
139  as_lineno_1=$LINENO
140  as_lineno_2=$LINENO
141  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
142  test "x$as_lineno_1" != "x$as_lineno_2" &&
143  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
144	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
145	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
146	     CONFIG_SHELL=$as_dir/$as_base
147	     export CONFIG_SHELL
148	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
149	   fi;;
150	 esac
151       done
152done
153;;
154  esac
155
156  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
157  # uniformly replaced by the line number.  The first 'sed' inserts a
158  # line-number line before each line; the second 'sed' does the real
159  # work.  The second script uses 'N' to pair each line-number line
160  # with the numbered line, and appends trailing '-' during
161  # substitution so that $LINENO is not a special case at line end.
162  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
163  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
164  sed '=' <$as_myself |
165    sed '
166      N
167      s,$,-,
168      : loop
169      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
170      t loop
171      s,-$,,
172      s,^['$as_cr_digits']*\n,,
173    ' >$as_me.lineno &&
174  chmod +x $as_me.lineno ||
175    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
176   { (exit 1); exit 1; }; }
177
178  # Don't try to exec as it changes $[0], causing all sort of problems
179  # (the dirname of $[0] is not the place where we might find the
180  # original and so on.  Autoconf is especially sensible to this).
181  . ./$as_me.lineno
182  # Exit status is that of the last command.
183  exit
184}
185
186
187case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
188  *c*,-n*) ECHO_N= ECHO_C='
189' ECHO_T='	' ;;
190  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
191  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
192esac
193
194if expr a : '\(a\)' >/dev/null 2>&1; then
195  as_expr=expr
196else
197  as_expr=false
198fi
199
200rm -f conf$$ conf$$.exe conf$$.file
201echo >conf$$.file
202if ln -s conf$$.file conf$$ 2>/dev/null; then
203  # We could just check for DJGPP; but this test a) works b) is more generic
204  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
205  if test -f conf$$.exe; then
206    # Don't use ln at all; we don't have any links
207    as_ln_s='cp -p'
208  else
209    as_ln_s='ln -s'
210  fi
211elif ln conf$$.file conf$$ 2>/dev/null; then
212  as_ln_s=ln
213else
214  as_ln_s='cp -p'
215fi
216rm -f conf$$ conf$$.exe conf$$.file
217
218if mkdir -p . 2>/dev/null; then
219  as_mkdir_p=:
220else
221  test -d ./-p && rmdir ./-p
222  as_mkdir_p=false
223fi
224
225as_executable_p="test -f"
226
227# Sed expression to map a string onto a valid CPP name.
228as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
229
230# Sed expression to map a string onto a valid variable name.
231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
232
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" 	$as_nl"
239
240# CDPATH.
241$as_unset CDPATH
242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
254ac_default_prefix=/usr/local
255ac_config_libobj_dir=.
256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete.  It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
274ac_unique_file="../generic/tk.h"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289#  include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294#  include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305#  include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AR RANLIB RC SET_MAKE TCL_THREADS CYGPATH CELIB_DIR DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING MAN2TCLFLAGS CFLAGS_DEFAULT LDFLAGS_DEFAULT VC_MANIFEST_EMBED_DLL VC_MANIFEST_EMBED_EXE TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_DEFS BUILD_TCLSH TCLSH_PROG TK_WIN_VERSION MACHINE TK_VERSION TK_MAJOR_VERSION TK_MINOR_VERSION TK_PATCH_LEVEL TK_DBGX TK_LIB_FILE TK_DLL_FILE TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_BUILD_STUB_LIB_SPEC TK_SRC_DIR TK_BIN_DIR TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_PATCH_LEVEL TCL_DBGX CFG_TK_SHARED_LIB_SUFFIX CFG_TK_UNSHARED_LIB_SUFFIX CFG_TK_EXPORT_FILE_SUFFIX TK_SHARED_BUILD DEPARG EXTRA_CFLAGS STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX CC_OBJNAME CC_EXENAME LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LDFLAGS_CONSOLE LDFLAGS_WINDOW RC_OUT RC_TYPE RC_INCLUDE RC_DEFINE RC_DEFINES TK_RES RES LIBS_GUI DLLSUFFIX LIBPREFIX LIBSUFFIX EXESUFFIX LIBRARIES MAKE_LIB POST_MAKE_LIB MAKE_DLL MAKE_EXE TK_LIB_FLAG TK_LIB_SPEC TK_BUILD_LIB_SPEC TK_STUB_LIB_SPEC TK_STUB_LIB_PATH TK_BUILD_STUB_LIB_PATH TK_CC_SEARCH_FLAGS TK_LD_SEARCH_FLAGS LIBOBJS LTLIBOBJS'
313ac_subst_files=''
314
315# Initialize some variables set by options.
316ac_init_help=
317ac_init_version=false
318# The variables have the same names as the options, with
319# dashes changed to underlines.
320cache_file=/dev/null
321exec_prefix=NONE
322no_create=
323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
328silent=
329site=
330srcdir=
331verbose=
332x_includes=NONE
333x_libraries=NONE
334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
352
353ac_prev=
354for ac_option
355do
356  # If the previous option needs an argument, assign it.
357  if test -n "$ac_prev"; then
358    eval "$ac_prev=\$ac_option"
359    ac_prev=
360    continue
361  fi
362
363  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
364
365  # Accept the important Cygnus configure options, so we can diagnose typos.
366
367  case $ac_option in
368
369  -bindir | --bindir | --bindi | --bind | --bin | --bi)
370    ac_prev=bindir ;;
371  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
372    bindir=$ac_optarg ;;
373
374  -build | --build | --buil | --bui | --bu)
375    ac_prev=build_alias ;;
376  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
377    build_alias=$ac_optarg ;;
378
379  -cache-file | --cache-file | --cache-fil | --cache-fi \
380  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381    ac_prev=cache_file ;;
382  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
384    cache_file=$ac_optarg ;;
385
386  --config-cache | -C)
387    cache_file=config.cache ;;
388
389  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390    ac_prev=datadir ;;
391  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392  | --da=*)
393    datadir=$ac_optarg ;;
394
395  -disable-* | --disable-*)
396    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
397    # Reject names that are not valid shell variable names.
398    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400   { (exit 1); exit 1; }; }
401    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402    eval "enable_$ac_feature=no" ;;
403
404  -enable-* | --enable-*)
405    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
406    # Reject names that are not valid shell variable names.
407    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409   { (exit 1); exit 1; }; }
410    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411    case $ac_option in
412      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
413      *) ac_optarg=yes ;;
414    esac
415    eval "enable_$ac_feature='$ac_optarg'" ;;
416
417  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419  | --exec | --exe | --ex)
420    ac_prev=exec_prefix ;;
421  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423  | --exec=* | --exe=* | --ex=*)
424    exec_prefix=$ac_optarg ;;
425
426  -gas | --gas | --ga | --g)
427    # Obsolete; use --with-gas.
428    with_gas=yes ;;
429
430  -help | --help | --hel | --he | -h)
431    ac_init_help=long ;;
432  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433    ac_init_help=recursive ;;
434  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435    ac_init_help=short ;;
436
437  -host | --host | --hos | --ho)
438    ac_prev=host_alias ;;
439  -host=* | --host=* | --hos=* | --ho=*)
440    host_alias=$ac_optarg ;;
441
442  -includedir | --includedir | --includedi | --included | --include \
443  | --includ | --inclu | --incl | --inc)
444    ac_prev=includedir ;;
445  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446  | --includ=* | --inclu=* | --incl=* | --inc=*)
447    includedir=$ac_optarg ;;
448
449  -infodir | --infodir | --infodi | --infod | --info | --inf)
450    ac_prev=infodir ;;
451  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
452    infodir=$ac_optarg ;;
453
454  -libdir | --libdir | --libdi | --libd)
455    ac_prev=libdir ;;
456  -libdir=* | --libdir=* | --libdi=* | --libd=*)
457    libdir=$ac_optarg ;;
458
459  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460  | --libexe | --libex | --libe)
461    ac_prev=libexecdir ;;
462  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463  | --libexe=* | --libex=* | --libe=*)
464    libexecdir=$ac_optarg ;;
465
466  -localstatedir | --localstatedir | --localstatedi | --localstated \
467  | --localstate | --localstat | --localsta | --localst \
468  | --locals | --local | --loca | --loc | --lo)
469    ac_prev=localstatedir ;;
470  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
473    localstatedir=$ac_optarg ;;
474
475  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476    ac_prev=mandir ;;
477  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
478    mandir=$ac_optarg ;;
479
480  -nfp | --nfp | --nf)
481    # Obsolete; use --without-fp.
482    with_fp=no ;;
483
484  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
485  | --no-cr | --no-c | -n)
486    no_create=yes ;;
487
488  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490    no_recursion=yes ;;
491
492  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494  | --oldin | --oldi | --old | --ol | --o)
495    ac_prev=oldincludedir ;;
496  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
499    oldincludedir=$ac_optarg ;;
500
501  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502    ac_prev=prefix ;;
503  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
504    prefix=$ac_optarg ;;
505
506  -program-prefix | --program-prefix | --program-prefi | --program-pref \
507  | --program-pre | --program-pr | --program-p)
508    ac_prev=program_prefix ;;
509  -program-prefix=* | --program-prefix=* | --program-prefi=* \
510  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
511    program_prefix=$ac_optarg ;;
512
513  -program-suffix | --program-suffix | --program-suffi | --program-suff \
514  | --program-suf | --program-su | --program-s)
515    ac_prev=program_suffix ;;
516  -program-suffix=* | --program-suffix=* | --program-suffi=* \
517  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
518    program_suffix=$ac_optarg ;;
519
520  -program-transform-name | --program-transform-name \
521  | --program-transform-nam | --program-transform-na \
522  | --program-transform-n | --program-transform- \
523  | --program-transform | --program-transfor \
524  | --program-transfo | --program-transf \
525  | --program-trans | --program-tran \
526  | --progr-tra | --program-tr | --program-t)
527    ac_prev=program_transform_name ;;
528  -program-transform-name=* | --program-transform-name=* \
529  | --program-transform-nam=* | --program-transform-na=* \
530  | --program-transform-n=* | --program-transform-=* \
531  | --program-transform=* | --program-transfor=* \
532  | --program-transfo=* | --program-transf=* \
533  | --program-trans=* | --program-tran=* \
534  | --progr-tra=* | --program-tr=* | --program-t=*)
535    program_transform_name=$ac_optarg ;;
536
537  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538  | -silent | --silent | --silen | --sile | --sil)
539    silent=yes ;;
540
541  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542    ac_prev=sbindir ;;
543  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544  | --sbi=* | --sb=*)
545    sbindir=$ac_optarg ;;
546
547  -sharedstatedir | --sharedstatedir | --sharedstatedi \
548  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549  | --sharedst | --shareds | --shared | --share | --shar \
550  | --sha | --sh)
551    ac_prev=sharedstatedir ;;
552  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555  | --sha=* | --sh=*)
556    sharedstatedir=$ac_optarg ;;
557
558  -site | --site | --sit)
559    ac_prev=site ;;
560  -site=* | --site=* | --sit=*)
561    site=$ac_optarg ;;
562
563  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564    ac_prev=srcdir ;;
565  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
566    srcdir=$ac_optarg ;;
567
568  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569  | --syscon | --sysco | --sysc | --sys | --sy)
570    ac_prev=sysconfdir ;;
571  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
573    sysconfdir=$ac_optarg ;;
574
575  -target | --target | --targe | --targ | --tar | --ta | --t)
576    ac_prev=target_alias ;;
577  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
578    target_alias=$ac_optarg ;;
579
580  -v | -verbose | --verbose | --verbos | --verbo | --verb)
581    verbose=yes ;;
582
583  -version | --version | --versio | --versi | --vers | -V)
584    ac_init_version=: ;;
585
586  -with-* | --with-*)
587    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
588    # Reject names that are not valid shell variable names.
589    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590      { echo "$as_me: error: invalid package name: $ac_package" >&2
591   { (exit 1); exit 1; }; }
592    ac_package=`echo $ac_package| sed 's/-/_/g'`
593    case $ac_option in
594      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
595      *) ac_optarg=yes ;;
596    esac
597    eval "with_$ac_package='$ac_optarg'" ;;
598
599  -without-* | --without-*)
600    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
601    # Reject names that are not valid shell variable names.
602    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603      { echo "$as_me: error: invalid package name: $ac_package" >&2
604   { (exit 1); exit 1; }; }
605    ac_package=`echo $ac_package | sed 's/-/_/g'`
606    eval "with_$ac_package=no" ;;
607
608  --x)
609    # Obsolete; use --with-x.
610    with_x=yes ;;
611
612  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613  | --x-incl | --x-inc | --x-in | --x-i)
614    ac_prev=x_includes ;;
615  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
617    x_includes=$ac_optarg ;;
618
619  -x-libraries | --x-libraries | --x-librarie | --x-librari \
620  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621    ac_prev=x_libraries ;;
622  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
624    x_libraries=$ac_optarg ;;
625
626  -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628   { (exit 1); exit 1; }; }
629    ;;
630
631  *=*)
632    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633    # Reject names that are not valid shell variable names.
634    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636   { (exit 1); exit 1; }; }
637    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638    eval "$ac_envvar='$ac_optarg'"
639    export $ac_envvar ;;
640
641  *)
642    # FIXME: should be removed in autoconf 3.0.
643    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
647    ;;
648
649  esac
650done
651
652if test -n "$ac_prev"; then
653  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654  { echo "$as_me: error: missing argument to $ac_option" >&2
655   { (exit 1); exit 1; }; }
656fi
657
658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
660do
661  eval ac_val=$`echo $ac_var`
662  case $ac_val in
663    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665   { (exit 1); exit 1; }; };;
666  esac
667done
668
669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
671	      localstatedir libdir includedir oldincludedir infodir mandir
672do
673  eval ac_val=$`echo $ac_var`
674  case $ac_val in
675    [\\/$]* | ?:[\\/]* ) ;;
676    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677   { (exit 1); exit 1; }; };;
678  esac
679done
680
681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
687
688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690  if test "x$build_alias" = x; then
691    cross_compiling=maybe
692    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693    If a cross compiler is detected then cross compile mode will be used." >&2
694  elif test "x$build_alias" != "x$host_alias"; then
695    cross_compiling=yes
696  fi
697fi
698
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
703
704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
707  ac_srcdir_defaulted=yes
708  # Try the directory containing this script, then its parent.
709  ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
711	 X"$0" : 'X\(//\)[^/]' \| \
712	 X"$0" : 'X\(//\)$' \| \
713	 X"$0" : 'X\(/\)' \| \
714	 .     : '\(.\)' 2>/dev/null ||
715echo X"$0" |
716    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718  	  /^X\(\/\/\)$/{ s//\1/; q; }
719  	  /^X\(\/\).*/{ s//\1/; q; }
720  	  s/.*/./; q'`
721  srcdir=$ac_confdir
722  if test ! -r $srcdir/$ac_unique_file; then
723    srcdir=..
724  fi
725else
726  ac_srcdir_defaulted=no
727fi
728if test ! -r $srcdir/$ac_unique_file; then
729  if test "$ac_srcdir_defaulted" = yes; then
730    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731   { (exit 1); exit 1; }; }
732  else
733    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734   { (exit 1); exit 1; }; }
735  fi
736fi
737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739   { (exit 1); exit 1; }; }
740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
773
774#
775# Report the --help message.
776#
777if test "$ac_init_help" = "long"; then
778  # Omit some internal or obsolete options to make the list less imposing.
779  # This message is too long to be a string in the A/UX 3.1 sh.
780  cat <<_ACEOF
781\`configure' configures this package to adapt to many kinds of systems.
782
783Usage: $0 [OPTION]... [VAR=VALUE]...
784
785To assign environment variables (e.g., CC, CFLAGS...), specify them as
786VAR=VALUE.  See below for descriptions of some of the useful variables.
787
788Defaults for the options are specified in brackets.
789
790Configuration:
791  -h, --help              display this help and exit
792      --help=short        display options specific to this package
793      --help=recursive    display the short help of all the included packages
794  -V, --version           display version information and exit
795  -q, --quiet, --silent   do not print \`checking...' messages
796      --cache-file=FILE   cache test results in FILE [disabled]
797  -C, --config-cache      alias for \`--cache-file=config.cache'
798  -n, --no-create         do not create output files
799      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
800
801_ACEOF
802
803  cat <<_ACEOF
804Installation directories:
805  --prefix=PREFIX         install architecture-independent files in PREFIX
806			  [$ac_default_prefix]
807  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
808			  [PREFIX]
809
810By default, \`make install' will install all the files in
811\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
812an installation prefix other than \`$ac_default_prefix' using \`--prefix',
813for instance \`--prefix=\$HOME'.
814
815For better control, use the options below.
816
817Fine tuning of the installation directories:
818  --bindir=DIR           user executables [EPREFIX/bin]
819  --sbindir=DIR          system admin executables [EPREFIX/sbin]
820  --libexecdir=DIR       program executables [EPREFIX/libexec]
821  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
822  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
823  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
824  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
825  --libdir=DIR           object code libraries [EPREFIX/lib]
826  --includedir=DIR       C header files [PREFIX/include]
827  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
828  --infodir=DIR          info documentation [PREFIX/info]
829  --mandir=DIR           man documentation [PREFIX/man]
830_ACEOF
831
832  cat <<\_ACEOF
833_ACEOF
834fi
835
836if test -n "$ac_init_help"; then
837
838  cat <<\_ACEOF
839
840Optional Features:
841  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
842  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
843  --enable-threads        build with threads
844  --enable-shared         build and link with shared libraries --enable-shared
845  --enable-64bit          enable 64bit support (where applicable)
846  --enable-wince          enable Win/CE support (where applicable)
847  --enable-symbols        build with debugging symbols --disable-symbols
848  --enable-embedded-manifest
849                          embed manifest if possible (default: yes)
850
851Optional Packages:
852  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
853  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
854  --with-celib=DIR        use Windows/CE support library from DIR
855  --with-tcl=DIR          use Tcl 8.5 binaries from DIR
856
857Some influential environment variables:
858  CC          C compiler command
859  CFLAGS      C compiler flags
860  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
861              nonstandard directory <lib dir>
862  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
863              headers in a nonstandard directory <include dir>
864  CPP         C preprocessor
865
866Use these variables to override the choices made by `configure' or to help
867it to find libraries and programs with nonstandard names/locations.
868
869_ACEOF
870fi
871
872if test "$ac_init_help" = "recursive"; then
873  # If there are subdirs, report their specific --help.
874  ac_popdir=`pwd`
875  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
876    test -d $ac_dir || continue
877    ac_builddir=.
878
879if test "$ac_dir" != .; then
880  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
881  # A "../" for each directory in $ac_dir_suffix.
882  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
883else
884  ac_dir_suffix= ac_top_builddir=
885fi
886
887case $srcdir in
888  .)  # No --srcdir option.  We are building in place.
889    ac_srcdir=.
890    if test -z "$ac_top_builddir"; then
891       ac_top_srcdir=.
892    else
893       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
894    fi ;;
895  [\\/]* | ?:[\\/]* )  # Absolute path.
896    ac_srcdir=$srcdir$ac_dir_suffix;
897    ac_top_srcdir=$srcdir ;;
898  *) # Relative path.
899    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
900    ac_top_srcdir=$ac_top_builddir$srcdir ;;
901esac
902
903# Do not use `cd foo && pwd` to compute absolute paths, because
904# the directories may not exist.
905case `pwd` in
906.) ac_abs_builddir="$ac_dir";;
907*)
908  case "$ac_dir" in
909  .) ac_abs_builddir=`pwd`;;
910  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
911  *) ac_abs_builddir=`pwd`/"$ac_dir";;
912  esac;;
913esac
914case $ac_abs_builddir in
915.) ac_abs_top_builddir=${ac_top_builddir}.;;
916*)
917  case ${ac_top_builddir}. in
918  .) ac_abs_top_builddir=$ac_abs_builddir;;
919  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
920  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
921  esac;;
922esac
923case $ac_abs_builddir in
924.) ac_abs_srcdir=$ac_srcdir;;
925*)
926  case $ac_srcdir in
927  .) ac_abs_srcdir=$ac_abs_builddir;;
928  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
929  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
930  esac;;
931esac
932case $ac_abs_builddir in
933.) ac_abs_top_srcdir=$ac_top_srcdir;;
934*)
935  case $ac_top_srcdir in
936  .) ac_abs_top_srcdir=$ac_abs_builddir;;
937  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
938  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
939  esac;;
940esac
941
942    cd $ac_dir
943    # Check for guested configure; otherwise get Cygnus style configure.
944    if test -f $ac_srcdir/configure.gnu; then
945      echo
946      $SHELL $ac_srcdir/configure.gnu  --help=recursive
947    elif test -f $ac_srcdir/configure; then
948      echo
949      $SHELL $ac_srcdir/configure  --help=recursive
950    elif test -f $ac_srcdir/configure.ac ||
951	   test -f $ac_srcdir/configure.in; then
952      echo
953      $ac_configure --help
954    else
955      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
956    fi
957    cd $ac_popdir
958  done
959fi
960
961test -n "$ac_init_help" && exit 0
962if $ac_init_version; then
963  cat <<\_ACEOF
964
965Copyright (C) 2003 Free Software Foundation, Inc.
966This configure script is free software; the Free Software Foundation
967gives unlimited permission to copy, distribute and modify it.
968_ACEOF
969  exit 0
970fi
971exec 5>config.log
972cat >&5 <<_ACEOF
973This file contains any messages produced by compilers while
974running configure, to aid debugging if configure makes a mistake.
975
976It was created by $as_me, which was
977generated by GNU Autoconf 2.59.  Invocation command line was
978
979  $ $0 $@
980
981_ACEOF
982{
983cat <<_ASUNAME
984## --------- ##
985## Platform. ##
986## --------- ##
987
988hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
989uname -m = `(uname -m) 2>/dev/null || echo unknown`
990uname -r = `(uname -r) 2>/dev/null || echo unknown`
991uname -s = `(uname -s) 2>/dev/null || echo unknown`
992uname -v = `(uname -v) 2>/dev/null || echo unknown`
993
994/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
995/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
996
997/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
998/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
999/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1000hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1001/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1002/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1003/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1004
1005_ASUNAME
1006
1007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1008for as_dir in $PATH
1009do
1010  IFS=$as_save_IFS
1011  test -z "$as_dir" && as_dir=.
1012  echo "PATH: $as_dir"
1013done
1014
1015} >&5
1016
1017cat >&5 <<_ACEOF
1018
1019
1020## ----------- ##
1021## Core tests. ##
1022## ----------- ##
1023
1024_ACEOF
1025
1026
1027# Keep a trace of the command line.
1028# Strip out --no-create and --no-recursion so they do not pile up.
1029# Strip out --silent because we don't want to record it for future runs.
1030# Also quote any args containing shell meta-characters.
1031# Make two passes to allow for proper duplicate-argument suppression.
1032ac_configure_args=
1033ac_configure_args0=
1034ac_configure_args1=
1035ac_sep=
1036ac_must_keep_next=false
1037for ac_pass in 1 2
1038do
1039  for ac_arg
1040  do
1041    case $ac_arg in
1042    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1043    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1044    | -silent | --silent | --silen | --sile | --sil)
1045      continue ;;
1046    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1047      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1048    esac
1049    case $ac_pass in
1050    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1051    2)
1052      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1053      if test $ac_must_keep_next = true; then
1054	ac_must_keep_next=false # Got value, back to normal.
1055      else
1056	case $ac_arg in
1057	  *=* | --config-cache | -C | -disable-* | --disable-* \
1058	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1059	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1060	  | -with-* | --with-* | -without-* | --without-* | --x)
1061	    case "$ac_configure_args0 " in
1062	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1063	    esac
1064	    ;;
1065	  -* ) ac_must_keep_next=true ;;
1066	esac
1067      fi
1068      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1069      # Get rid of the leading space.
1070      ac_sep=" "
1071      ;;
1072    esac
1073  done
1074done
1075$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1076$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1077
1078# When interrupted or exit'd, cleanup temporary files, and complete
1079# config.log.  We remove comments because anyway the quotes in there
1080# would cause problems or look ugly.
1081# WARNING: Be sure not to use single quotes in there, as some shells,
1082# such as our DU 5.0 friend, will then `close' the trap.
1083trap 'exit_status=$?
1084  # Save into config.log some information that might help in debugging.
1085  {
1086    echo
1087
1088    cat <<\_ASBOX
1089## ---------------- ##
1090## Cache variables. ##
1091## ---------------- ##
1092_ASBOX
1093    echo
1094    # The following way of writing the cache mishandles newlines in values,
1095{
1096  (set) 2>&1 |
1097    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1098    *ac_space=\ *)
1099      sed -n \
1100	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1101	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1102      ;;
1103    *)
1104      sed -n \
1105	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1106      ;;
1107    esac;
1108}
1109    echo
1110
1111    cat <<\_ASBOX
1112## ----------------- ##
1113## Output variables. ##
1114## ----------------- ##
1115_ASBOX
1116    echo
1117    for ac_var in $ac_subst_vars
1118    do
1119      eval ac_val=$`echo $ac_var`
1120      echo "$ac_var='"'"'$ac_val'"'"'"
1121    done | sort
1122    echo
1123
1124    if test -n "$ac_subst_files"; then
1125      cat <<\_ASBOX
1126## ------------- ##
1127## Output files. ##
1128## ------------- ##
1129_ASBOX
1130      echo
1131      for ac_var in $ac_subst_files
1132      do
1133	eval ac_val=$`echo $ac_var`
1134	echo "$ac_var='"'"'$ac_val'"'"'"
1135      done | sort
1136      echo
1137    fi
1138
1139    if test -s confdefs.h; then
1140      cat <<\_ASBOX
1141## ----------- ##
1142## confdefs.h. ##
1143## ----------- ##
1144_ASBOX
1145      echo
1146      sed "/^$/d" confdefs.h | sort
1147      echo
1148    fi
1149    test "$ac_signal" != 0 &&
1150      echo "$as_me: caught signal $ac_signal"
1151    echo "$as_me: exit $exit_status"
1152  } >&5
1153  rm -f core *.core &&
1154  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1155    exit $exit_status
1156     ' 0
1157for ac_signal in 1 2 13 15; do
1158  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1159done
1160ac_signal=0
1161
1162# confdefs.h avoids OS command line length limits that DEFS can exceed.
1163rm -rf conftest* confdefs.h
1164# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1165echo >confdefs.h
1166
1167# Predefined preprocessor variables.
1168
1169cat >>confdefs.h <<_ACEOF
1170#define PACKAGE_NAME "$PACKAGE_NAME"
1171_ACEOF
1172
1173
1174cat >>confdefs.h <<_ACEOF
1175#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1176_ACEOF
1177
1178
1179cat >>confdefs.h <<_ACEOF
1180#define PACKAGE_VERSION "$PACKAGE_VERSION"
1181_ACEOF
1182
1183
1184cat >>confdefs.h <<_ACEOF
1185#define PACKAGE_STRING "$PACKAGE_STRING"
1186_ACEOF
1187
1188
1189cat >>confdefs.h <<_ACEOF
1190#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1191_ACEOF
1192
1193
1194# Let the site file select an alternate cache file if it wants to.
1195# Prefer explicitly selected file to automatically selected ones.
1196if test -z "$CONFIG_SITE"; then
1197  if test "x$prefix" != xNONE; then
1198    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1199  else
1200    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1201  fi
1202fi
1203for ac_site_file in $CONFIG_SITE; do
1204  if test -r "$ac_site_file"; then
1205    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1206echo "$as_me: loading site script $ac_site_file" >&6;}
1207    sed 's/^/| /' "$ac_site_file" >&5
1208    . "$ac_site_file"
1209  fi
1210done
1211
1212if test -r "$cache_file"; then
1213  # Some versions of bash will fail to source /dev/null (special
1214  # files actually), so we avoid doing that.
1215  if test -f "$cache_file"; then
1216    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1217echo "$as_me: loading cache $cache_file" >&6;}
1218    case $cache_file in
1219      [\\/]* | ?:[\\/]* ) . $cache_file;;
1220      *)                      . ./$cache_file;;
1221    esac
1222  fi
1223else
1224  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1225echo "$as_me: creating cache $cache_file" >&6;}
1226  >$cache_file
1227fi
1228
1229# Check that the precious variables saved in the cache have kept the same
1230# value.
1231ac_cache_corrupted=false
1232for ac_var in `(set) 2>&1 |
1233	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1234  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1235  eval ac_new_set=\$ac_env_${ac_var}_set
1236  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1237  eval ac_new_val="\$ac_env_${ac_var}_value"
1238  case $ac_old_set,$ac_new_set in
1239    set,)
1240      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1241echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1242      ac_cache_corrupted=: ;;
1243    ,set)
1244      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1245echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1246      ac_cache_corrupted=: ;;
1247    ,);;
1248    *)
1249      if test "x$ac_old_val" != "x$ac_new_val"; then
1250	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1251echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1252	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1253echo "$as_me:   former value:  $ac_old_val" >&2;}
1254	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1255echo "$as_me:   current value: $ac_new_val" >&2;}
1256	ac_cache_corrupted=:
1257      fi;;
1258  esac
1259  # Pass precious variables to config.status.
1260  if test "$ac_new_set" = set; then
1261    case $ac_new_val in
1262    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1263      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1264    *) ac_arg=$ac_var=$ac_new_val ;;
1265    esac
1266    case " $ac_configure_args " in
1267      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1268      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1269    esac
1270  fi
1271done
1272if $ac_cache_corrupted; then
1273  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1274echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1275  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1276echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1277   { (exit 1); exit 1; }; }
1278fi
1279
1280ac_ext=c
1281ac_cpp='$CPP $CPPFLAGS'
1282ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1283ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1284ac_compiler_gnu=$ac_cv_c_compiler_gnu
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306# The following define is needed when building with Cygwin since newer
1307# versions of autoconf incorrectly set SHELL to /bin/bash instead of
1308# /bin/sh. The bash shell seems to suffer from some strange failures.
1309SHELL=/bin/sh
1310
1311TK_VERSION=8.5
1312TK_MAJOR_VERSION=8
1313TK_MINOR_VERSION=5
1314TK_PATCH_LEVEL=".9"
1315VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION
1316
1317#------------------------------------------------------------------------
1318# Handle the --prefix=... option
1319#------------------------------------------------------------------------
1320
1321if test "${prefix}" = "NONE"; then
1322    prefix=/usr/local
1323fi
1324if test "${exec_prefix}" = "NONE"; then
1325    exec_prefix=$prefix
1326fi
1327# libdir must be a fully qualified path and (not ${exec_prefix}/lib)
1328eval libdir="$libdir"
1329
1330#------------------------------------------------------------------------
1331# Standard compiler checks
1332#------------------------------------------------------------------------
1333
1334# If the user did not set CFLAGS, set it now to keep
1335# the AC_PROG_CC macro from adding "-g -O2".
1336if test "${CFLAGS+set}" != "set" ; then
1337    CFLAGS=""
1338fi
1339
1340ac_ext=c
1341ac_cpp='$CPP $CPPFLAGS'
1342ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1343ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1344ac_compiler_gnu=$ac_cv_c_compiler_gnu
1345if test -n "$ac_tool_prefix"; then
1346  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1347set dummy ${ac_tool_prefix}gcc; ac_word=$2
1348echo "$as_me:$LINENO: checking for $ac_word" >&5
1349echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1350if test "${ac_cv_prog_CC+set}" = set; then
1351  echo $ECHO_N "(cached) $ECHO_C" >&6
1352else
1353  if test -n "$CC"; then
1354  ac_cv_prog_CC="$CC" # Let the user override the test.
1355else
1356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1357for as_dir in $PATH
1358do
1359  IFS=$as_save_IFS
1360  test -z "$as_dir" && as_dir=.
1361  for ac_exec_ext in '' $ac_executable_extensions; do
1362  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1363    ac_cv_prog_CC="${ac_tool_prefix}gcc"
1364    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1365    break 2
1366  fi
1367done
1368done
1369
1370fi
1371fi
1372CC=$ac_cv_prog_CC
1373if test -n "$CC"; then
1374  echo "$as_me:$LINENO: result: $CC" >&5
1375echo "${ECHO_T}$CC" >&6
1376else
1377  echo "$as_me:$LINENO: result: no" >&5
1378echo "${ECHO_T}no" >&6
1379fi
1380
1381fi
1382if test -z "$ac_cv_prog_CC"; then
1383  ac_ct_CC=$CC
1384  # Extract the first word of "gcc", so it can be a program name with args.
1385set dummy gcc; ac_word=$2
1386echo "$as_me:$LINENO: checking for $ac_word" >&5
1387echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1388if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1389  echo $ECHO_N "(cached) $ECHO_C" >&6
1390else
1391  if test -n "$ac_ct_CC"; then
1392  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1393else
1394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1395for as_dir in $PATH
1396do
1397  IFS=$as_save_IFS
1398  test -z "$as_dir" && as_dir=.
1399  for ac_exec_ext in '' $ac_executable_extensions; do
1400  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1401    ac_cv_prog_ac_ct_CC="gcc"
1402    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1403    break 2
1404  fi
1405done
1406done
1407
1408fi
1409fi
1410ac_ct_CC=$ac_cv_prog_ac_ct_CC
1411if test -n "$ac_ct_CC"; then
1412  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1413echo "${ECHO_T}$ac_ct_CC" >&6
1414else
1415  echo "$as_me:$LINENO: result: no" >&5
1416echo "${ECHO_T}no" >&6
1417fi
1418
1419  CC=$ac_ct_CC
1420else
1421  CC="$ac_cv_prog_CC"
1422fi
1423
1424if test -z "$CC"; then
1425  if test -n "$ac_tool_prefix"; then
1426  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1427set dummy ${ac_tool_prefix}cc; ac_word=$2
1428echo "$as_me:$LINENO: checking for $ac_word" >&5
1429echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1430if test "${ac_cv_prog_CC+set}" = set; then
1431  echo $ECHO_N "(cached) $ECHO_C" >&6
1432else
1433  if test -n "$CC"; then
1434  ac_cv_prog_CC="$CC" # Let the user override the test.
1435else
1436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1437for as_dir in $PATH
1438do
1439  IFS=$as_save_IFS
1440  test -z "$as_dir" && as_dir=.
1441  for ac_exec_ext in '' $ac_executable_extensions; do
1442  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1443    ac_cv_prog_CC="${ac_tool_prefix}cc"
1444    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1445    break 2
1446  fi
1447done
1448done
1449
1450fi
1451fi
1452CC=$ac_cv_prog_CC
1453if test -n "$CC"; then
1454  echo "$as_me:$LINENO: result: $CC" >&5
1455echo "${ECHO_T}$CC" >&6
1456else
1457  echo "$as_me:$LINENO: result: no" >&5
1458echo "${ECHO_T}no" >&6
1459fi
1460
1461fi
1462if test -z "$ac_cv_prog_CC"; then
1463  ac_ct_CC=$CC
1464  # Extract the first word of "cc", so it can be a program name with args.
1465set dummy cc; ac_word=$2
1466echo "$as_me:$LINENO: checking for $ac_word" >&5
1467echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1468if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1469  echo $ECHO_N "(cached) $ECHO_C" >&6
1470else
1471  if test -n "$ac_ct_CC"; then
1472  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1473else
1474as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1475for as_dir in $PATH
1476do
1477  IFS=$as_save_IFS
1478  test -z "$as_dir" && as_dir=.
1479  for ac_exec_ext in '' $ac_executable_extensions; do
1480  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1481    ac_cv_prog_ac_ct_CC="cc"
1482    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1483    break 2
1484  fi
1485done
1486done
1487
1488fi
1489fi
1490ac_ct_CC=$ac_cv_prog_ac_ct_CC
1491if test -n "$ac_ct_CC"; then
1492  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1493echo "${ECHO_T}$ac_ct_CC" >&6
1494else
1495  echo "$as_me:$LINENO: result: no" >&5
1496echo "${ECHO_T}no" >&6
1497fi
1498
1499  CC=$ac_ct_CC
1500else
1501  CC="$ac_cv_prog_CC"
1502fi
1503
1504fi
1505if test -z "$CC"; then
1506  # Extract the first word of "cc", so it can be a program name with args.
1507set dummy cc; ac_word=$2
1508echo "$as_me:$LINENO: checking for $ac_word" >&5
1509echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1510if test "${ac_cv_prog_CC+set}" = set; then
1511  echo $ECHO_N "(cached) $ECHO_C" >&6
1512else
1513  if test -n "$CC"; then
1514  ac_cv_prog_CC="$CC" # Let the user override the test.
1515else
1516  ac_prog_rejected=no
1517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1518for as_dir in $PATH
1519do
1520  IFS=$as_save_IFS
1521  test -z "$as_dir" && as_dir=.
1522  for ac_exec_ext in '' $ac_executable_extensions; do
1523  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1524    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1525       ac_prog_rejected=yes
1526       continue
1527     fi
1528    ac_cv_prog_CC="cc"
1529    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1530    break 2
1531  fi
1532done
1533done
1534
1535if test $ac_prog_rejected = yes; then
1536  # We found a bogon in the path, so make sure we never use it.
1537  set dummy $ac_cv_prog_CC
1538  shift
1539  if test $# != 0; then
1540    # We chose a different compiler from the bogus one.
1541    # However, it has the same basename, so the bogon will be chosen
1542    # first if we set CC to just the basename; use the full file name.
1543    shift
1544    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1545  fi
1546fi
1547fi
1548fi
1549CC=$ac_cv_prog_CC
1550if test -n "$CC"; then
1551  echo "$as_me:$LINENO: result: $CC" >&5
1552echo "${ECHO_T}$CC" >&6
1553else
1554  echo "$as_me:$LINENO: result: no" >&5
1555echo "${ECHO_T}no" >&6
1556fi
1557
1558fi
1559if test -z "$CC"; then
1560  if test -n "$ac_tool_prefix"; then
1561  for ac_prog in cl
1562  do
1563    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1564set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1565echo "$as_me:$LINENO: checking for $ac_word" >&5
1566echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1567if test "${ac_cv_prog_CC+set}" = set; then
1568  echo $ECHO_N "(cached) $ECHO_C" >&6
1569else
1570  if test -n "$CC"; then
1571  ac_cv_prog_CC="$CC" # Let the user override the test.
1572else
1573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1574for as_dir in $PATH
1575do
1576  IFS=$as_save_IFS
1577  test -z "$as_dir" && as_dir=.
1578  for ac_exec_ext in '' $ac_executable_extensions; do
1579  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1580    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1581    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1582    break 2
1583  fi
1584done
1585done
1586
1587fi
1588fi
1589CC=$ac_cv_prog_CC
1590if test -n "$CC"; then
1591  echo "$as_me:$LINENO: result: $CC" >&5
1592echo "${ECHO_T}$CC" >&6
1593else
1594  echo "$as_me:$LINENO: result: no" >&5
1595echo "${ECHO_T}no" >&6
1596fi
1597
1598    test -n "$CC" && break
1599  done
1600fi
1601if test -z "$CC"; then
1602  ac_ct_CC=$CC
1603  for ac_prog in cl
1604do
1605  # Extract the first word of "$ac_prog", so it can be a program name with args.
1606set dummy $ac_prog; ac_word=$2
1607echo "$as_me:$LINENO: checking for $ac_word" >&5
1608echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1609if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1610  echo $ECHO_N "(cached) $ECHO_C" >&6
1611else
1612  if test -n "$ac_ct_CC"; then
1613  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1614else
1615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1616for as_dir in $PATH
1617do
1618  IFS=$as_save_IFS
1619  test -z "$as_dir" && as_dir=.
1620  for ac_exec_ext in '' $ac_executable_extensions; do
1621  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1622    ac_cv_prog_ac_ct_CC="$ac_prog"
1623    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1624    break 2
1625  fi
1626done
1627done
1628
1629fi
1630fi
1631ac_ct_CC=$ac_cv_prog_ac_ct_CC
1632if test -n "$ac_ct_CC"; then
1633  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1634echo "${ECHO_T}$ac_ct_CC" >&6
1635else
1636  echo "$as_me:$LINENO: result: no" >&5
1637echo "${ECHO_T}no" >&6
1638fi
1639
1640  test -n "$ac_ct_CC" && break
1641done
1642
1643  CC=$ac_ct_CC
1644fi
1645
1646fi
1647
1648
1649test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1650See \`config.log' for more details." >&5
1651echo "$as_me: error: no acceptable C compiler found in \$PATH
1652See \`config.log' for more details." >&2;}
1653   { (exit 1); exit 1; }; }
1654
1655# Provide some information about the compiler.
1656echo "$as_me:$LINENO:" \
1657     "checking for C compiler version" >&5
1658ac_compiler=`set X $ac_compile; echo $2`
1659{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1660  (eval $ac_compiler --version </dev/null >&5) 2>&5
1661  ac_status=$?
1662  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1663  (exit $ac_status); }
1664{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1665  (eval $ac_compiler -v </dev/null >&5) 2>&5
1666  ac_status=$?
1667  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1668  (exit $ac_status); }
1669{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1670  (eval $ac_compiler -V </dev/null >&5) 2>&5
1671  ac_status=$?
1672  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1673  (exit $ac_status); }
1674
1675cat >conftest.$ac_ext <<_ACEOF
1676/* confdefs.h.  */
1677_ACEOF
1678cat confdefs.h >>conftest.$ac_ext
1679cat >>conftest.$ac_ext <<_ACEOF
1680/* end confdefs.h.  */
1681
1682int
1683main ()
1684{
1685
1686  ;
1687  return 0;
1688}
1689_ACEOF
1690ac_clean_files_save=$ac_clean_files
1691ac_clean_files="$ac_clean_files a.out a.exe b.out"
1692# Try to create an executable without -o first, disregard a.out.
1693# It will help us diagnose broken compilers, and finding out an intuition
1694# of exeext.
1695echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
1696echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
1697ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1698if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1699  (eval $ac_link_default) 2>&5
1700  ac_status=$?
1701  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1702  (exit $ac_status); }; then
1703  # Find the output, starting from the most likely.  This scheme is
1704# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1705# resort.
1706
1707# Be careful to initialize this variable, since it used to be cached.
1708# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1709ac_cv_exeext=
1710# b.out is created by i960 compilers.
1711for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1712do
1713  test -f "$ac_file" || continue
1714  case $ac_file in
1715    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1716	;;
1717    conftest.$ac_ext )
1718	# This is the source file.
1719	;;
1720    [ab].out )
1721	# We found the default executable, but exeext='' is most
1722	# certainly right.
1723	break;;
1724    *.* )
1725	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1726	# FIXME: I believe we export ac_cv_exeext for Libtool,
1727	# but it would be cool to find out if it's true.  Does anybody
1728	# maintain Libtool? --akim.
1729	export ac_cv_exeext
1730	break;;
1731    * )
1732	break;;
1733  esac
1734done
1735else
1736  echo "$as_me: failed program was:" >&5
1737sed 's/^/| /' conftest.$ac_ext >&5
1738
1739{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
1740See \`config.log' for more details." >&5
1741echo "$as_me: error: C compiler cannot create executables
1742See \`config.log' for more details." >&2;}
1743   { (exit 77); exit 77; }; }
1744fi
1745
1746ac_exeext=$ac_cv_exeext
1747echo "$as_me:$LINENO: result: $ac_file" >&5
1748echo "${ECHO_T}$ac_file" >&6
1749
1750# Check the compiler produces executables we can run.  If not, either
1751# the compiler is broken, or we cross compile.
1752echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1753echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1754# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1755# If not cross compiling, check that we can run a simple program.
1756if test "$cross_compiling" != yes; then
1757  if { ac_try='./$ac_file'
1758  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1759  (eval $ac_try) 2>&5
1760  ac_status=$?
1761  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1762  (exit $ac_status); }; }; then
1763    cross_compiling=no
1764  else
1765    if test "$cross_compiling" = maybe; then
1766	cross_compiling=yes
1767    else
1768	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1769If you meant to cross compile, use \`--host'.
1770See \`config.log' for more details." >&5
1771echo "$as_me: error: cannot run C compiled programs.
1772If you meant to cross compile, use \`--host'.
1773See \`config.log' for more details." >&2;}
1774   { (exit 1); exit 1; }; }
1775    fi
1776  fi
1777fi
1778echo "$as_me:$LINENO: result: yes" >&5
1779echo "${ECHO_T}yes" >&6
1780
1781rm -f a.out a.exe conftest$ac_cv_exeext b.out
1782ac_clean_files=$ac_clean_files_save
1783# Check the compiler produces executables we can run.  If not, either
1784# the compiler is broken, or we cross compile.
1785echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1786echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1787echo "$as_me:$LINENO: result: $cross_compiling" >&5
1788echo "${ECHO_T}$cross_compiling" >&6
1789
1790echo "$as_me:$LINENO: checking for suffix of executables" >&5
1791echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1792if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1793  (eval $ac_link) 2>&5
1794  ac_status=$?
1795  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1796  (exit $ac_status); }; then
1797  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1798# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1799# work properly (i.e., refer to `conftest.exe'), while it won't with
1800# `rm'.
1801for ac_file in conftest.exe conftest conftest.*; do
1802  test -f "$ac_file" || continue
1803  case $ac_file in
1804    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1805    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1806	  export ac_cv_exeext
1807	  break;;
1808    * ) break;;
1809  esac
1810done
1811else
1812  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1813See \`config.log' for more details." >&5
1814echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1815See \`config.log' for more details." >&2;}
1816   { (exit 1); exit 1; }; }
1817fi
1818
1819rm -f conftest$ac_cv_exeext
1820echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1821echo "${ECHO_T}$ac_cv_exeext" >&6
1822
1823rm -f conftest.$ac_ext
1824EXEEXT=$ac_cv_exeext
1825ac_exeext=$EXEEXT
1826echo "$as_me:$LINENO: checking for suffix of object files" >&5
1827echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1828if test "${ac_cv_objext+set}" = set; then
1829  echo $ECHO_N "(cached) $ECHO_C" >&6
1830else
1831  cat >conftest.$ac_ext <<_ACEOF
1832/* confdefs.h.  */
1833_ACEOF
1834cat confdefs.h >>conftest.$ac_ext
1835cat >>conftest.$ac_ext <<_ACEOF
1836/* end confdefs.h.  */
1837
1838int
1839main ()
1840{
1841
1842  ;
1843  return 0;
1844}
1845_ACEOF
1846rm -f conftest.o conftest.obj
1847if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1848  (eval $ac_compile) 2>&5
1849  ac_status=$?
1850  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1851  (exit $ac_status); }; then
1852  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1853  case $ac_file in
1854    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1855    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1856       break;;
1857  esac
1858done
1859else
1860  echo "$as_me: failed program was:" >&5
1861sed 's/^/| /' conftest.$ac_ext >&5
1862
1863{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1864See \`config.log' for more details." >&5
1865echo "$as_me: error: cannot compute suffix of object files: cannot compile
1866See \`config.log' for more details." >&2;}
1867   { (exit 1); exit 1; }; }
1868fi
1869
1870rm -f conftest.$ac_cv_objext conftest.$ac_ext
1871fi
1872echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1873echo "${ECHO_T}$ac_cv_objext" >&6
1874OBJEXT=$ac_cv_objext
1875ac_objext=$OBJEXT
1876echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1877echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1878if test "${ac_cv_c_compiler_gnu+set}" = set; then
1879  echo $ECHO_N "(cached) $ECHO_C" >&6
1880else
1881  cat >conftest.$ac_ext <<_ACEOF
1882/* confdefs.h.  */
1883_ACEOF
1884cat confdefs.h >>conftest.$ac_ext
1885cat >>conftest.$ac_ext <<_ACEOF
1886/* end confdefs.h.  */
1887
1888int
1889main ()
1890{
1891#ifndef __GNUC__
1892       choke me
1893#endif
1894
1895  ;
1896  return 0;
1897}
1898_ACEOF
1899rm -f conftest.$ac_objext
1900if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1901  (eval $ac_compile) 2>conftest.er1
1902  ac_status=$?
1903  grep -v '^ *+' conftest.er1 >conftest.err
1904  rm -f conftest.er1
1905  cat conftest.err >&5
1906  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1907  (exit $ac_status); } &&
1908	 { ac_try='test -z "$ac_c_werror_flag"
1909			 || test ! -s conftest.err'
1910  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1911  (eval $ac_try) 2>&5
1912  ac_status=$?
1913  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1914  (exit $ac_status); }; } &&
1915	 { ac_try='test -s conftest.$ac_objext'
1916  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1917  (eval $ac_try) 2>&5
1918  ac_status=$?
1919  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1920  (exit $ac_status); }; }; then
1921  ac_compiler_gnu=yes
1922else
1923  echo "$as_me: failed program was:" >&5
1924sed 's/^/| /' conftest.$ac_ext >&5
1925
1926ac_compiler_gnu=no
1927fi
1928rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1929ac_cv_c_compiler_gnu=$ac_compiler_gnu
1930
1931fi
1932echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
1933echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1934GCC=`test $ac_compiler_gnu = yes && echo yes`
1935ac_test_CFLAGS=${CFLAGS+set}
1936ac_save_CFLAGS=$CFLAGS
1937CFLAGS="-g"
1938echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
1939echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1940if test "${ac_cv_prog_cc_g+set}" = set; then
1941  echo $ECHO_N "(cached) $ECHO_C" >&6
1942else
1943  cat >conftest.$ac_ext <<_ACEOF
1944/* confdefs.h.  */
1945_ACEOF
1946cat confdefs.h >>conftest.$ac_ext
1947cat >>conftest.$ac_ext <<_ACEOF
1948/* end confdefs.h.  */
1949
1950int
1951main ()
1952{
1953
1954  ;
1955  return 0;
1956}
1957_ACEOF
1958rm -f conftest.$ac_objext
1959if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1960  (eval $ac_compile) 2>conftest.er1
1961  ac_status=$?
1962  grep -v '^ *+' conftest.er1 >conftest.err
1963  rm -f conftest.er1
1964  cat conftest.err >&5
1965  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1966  (exit $ac_status); } &&
1967	 { ac_try='test -z "$ac_c_werror_flag"
1968			 || test ! -s conftest.err'
1969  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1970  (eval $ac_try) 2>&5
1971  ac_status=$?
1972  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1973  (exit $ac_status); }; } &&
1974	 { ac_try='test -s conftest.$ac_objext'
1975  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1976  (eval $ac_try) 2>&5
1977  ac_status=$?
1978  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1979  (exit $ac_status); }; }; then
1980  ac_cv_prog_cc_g=yes
1981else
1982  echo "$as_me: failed program was:" >&5
1983sed 's/^/| /' conftest.$ac_ext >&5
1984
1985ac_cv_prog_cc_g=no
1986fi
1987rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1988fi
1989echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
1990echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1991if test "$ac_test_CFLAGS" = set; then
1992  CFLAGS=$ac_save_CFLAGS
1993elif test $ac_cv_prog_cc_g = yes; then
1994  if test "$GCC" = yes; then
1995    CFLAGS="-g -O2"
1996  else
1997    CFLAGS="-g"
1998  fi
1999else
2000  if test "$GCC" = yes; then
2001    CFLAGS="-O2"
2002  else
2003    CFLAGS=
2004  fi
2005fi
2006echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2007echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2008if test "${ac_cv_prog_cc_stdc+set}" = set; then
2009  echo $ECHO_N "(cached) $ECHO_C" >&6
2010else
2011  ac_cv_prog_cc_stdc=no
2012ac_save_CC=$CC
2013cat >conftest.$ac_ext <<_ACEOF
2014/* confdefs.h.  */
2015_ACEOF
2016cat confdefs.h >>conftest.$ac_ext
2017cat >>conftest.$ac_ext <<_ACEOF
2018/* end confdefs.h.  */
2019#include <stdarg.h>
2020#include <stdio.h>
2021#include <sys/types.h>
2022#include <sys/stat.h>
2023/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2024struct buf { int x; };
2025FILE * (*rcsopen) (struct buf *, struct stat *, int);
2026static char *e (p, i)
2027     char **p;
2028     int i;
2029{
2030  return p[i];
2031}
2032static char *f (char * (*g) (char **, int), char **p, ...)
2033{
2034  char *s;
2035  va_list v;
2036  va_start (v,p);
2037  s = g (p, va_arg (v,int));
2038  va_end (v);
2039  return s;
2040}
2041
2042/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2043   function prototypes and stuff, but not '\xHH' hex character constants.
2044   These don't provoke an error unfortunately, instead are silently treated
2045   as 'x'.  The following induces an error, until -std1 is added to get
2046   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2047   array size at least.  It's necessary to write '\x00'==0 to get something
2048   that's true only with -std1.  */
2049int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2050
2051int test (int i, double x);
2052struct s1 {int (*f) (int a);};
2053struct s2 {int (*f) (double a);};
2054int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2055int argc;
2056char **argv;
2057int
2058main ()
2059{
2060return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2061  ;
2062  return 0;
2063}
2064_ACEOF
2065# Don't try gcc -ansi; that turns off useful extensions and
2066# breaks some systems' header files.
2067# AIX			-qlanglvl=ansi
2068# Ultrix and OSF/1	-std1
2069# HP-UX 10.20 and later	-Ae
2070# HP-UX older versions	-Aa -D_HPUX_SOURCE
2071# SVR4			-Xc -D__EXTENSIONS__
2072for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2073do
2074  CC="$ac_save_CC $ac_arg"
2075  rm -f conftest.$ac_objext
2076if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2077  (eval $ac_compile) 2>conftest.er1
2078  ac_status=$?
2079  grep -v '^ *+' conftest.er1 >conftest.err
2080  rm -f conftest.er1
2081  cat conftest.err >&5
2082  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2083  (exit $ac_status); } &&
2084	 { ac_try='test -z "$ac_c_werror_flag"
2085			 || test ! -s conftest.err'
2086  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2087  (eval $ac_try) 2>&5
2088  ac_status=$?
2089  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2090  (exit $ac_status); }; } &&
2091	 { ac_try='test -s conftest.$ac_objext'
2092  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2093  (eval $ac_try) 2>&5
2094  ac_status=$?
2095  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2096  (exit $ac_status); }; }; then
2097  ac_cv_prog_cc_stdc=$ac_arg
2098break
2099else
2100  echo "$as_me: failed program was:" >&5
2101sed 's/^/| /' conftest.$ac_ext >&5
2102
2103fi
2104rm -f conftest.err conftest.$ac_objext
2105done
2106rm -f conftest.$ac_ext conftest.$ac_objext
2107CC=$ac_save_CC
2108
2109fi
2110
2111case "x$ac_cv_prog_cc_stdc" in
2112  x|xno)
2113    echo "$as_me:$LINENO: result: none needed" >&5
2114echo "${ECHO_T}none needed" >&6 ;;
2115  *)
2116    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2117echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2118    CC="$CC $ac_cv_prog_cc_stdc" ;;
2119esac
2120
2121# Some people use a C++ compiler to compile C.  Since we use `exit',
2122# in C++ we need to declare it.  In case someone uses the same compiler
2123# for both compiling C and C++ we need to have the C++ compiler decide
2124# the declaration of exit, since it's the most demanding environment.
2125cat >conftest.$ac_ext <<_ACEOF
2126#ifndef __cplusplus
2127  choke me
2128#endif
2129_ACEOF
2130rm -f conftest.$ac_objext
2131if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2132  (eval $ac_compile) 2>conftest.er1
2133  ac_status=$?
2134  grep -v '^ *+' conftest.er1 >conftest.err
2135  rm -f conftest.er1
2136  cat conftest.err >&5
2137  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2138  (exit $ac_status); } &&
2139	 { ac_try='test -z "$ac_c_werror_flag"
2140			 || test ! -s conftest.err'
2141  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2142  (eval $ac_try) 2>&5
2143  ac_status=$?
2144  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2145  (exit $ac_status); }; } &&
2146	 { ac_try='test -s conftest.$ac_objext'
2147  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2148  (eval $ac_try) 2>&5
2149  ac_status=$?
2150  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2151  (exit $ac_status); }; }; then
2152  for ac_declaration in \
2153   '' \
2154   'extern "C" void std::exit (int) throw (); using std::exit;' \
2155   'extern "C" void std::exit (int); using std::exit;' \
2156   'extern "C" void exit (int) throw ();' \
2157   'extern "C" void exit (int);' \
2158   'void exit (int);'
2159do
2160  cat >conftest.$ac_ext <<_ACEOF
2161/* confdefs.h.  */
2162_ACEOF
2163cat confdefs.h >>conftest.$ac_ext
2164cat >>conftest.$ac_ext <<_ACEOF
2165/* end confdefs.h.  */
2166$ac_declaration
2167#include <stdlib.h>
2168int
2169main ()
2170{
2171exit (42);
2172  ;
2173  return 0;
2174}
2175_ACEOF
2176rm -f conftest.$ac_objext
2177if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2178  (eval $ac_compile) 2>conftest.er1
2179  ac_status=$?
2180  grep -v '^ *+' conftest.er1 >conftest.err
2181  rm -f conftest.er1
2182  cat conftest.err >&5
2183  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2184  (exit $ac_status); } &&
2185	 { ac_try='test -z "$ac_c_werror_flag"
2186			 || test ! -s conftest.err'
2187  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2188  (eval $ac_try) 2>&5
2189  ac_status=$?
2190  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2191  (exit $ac_status); }; } &&
2192	 { ac_try='test -s conftest.$ac_objext'
2193  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2194  (eval $ac_try) 2>&5
2195  ac_status=$?
2196  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2197  (exit $ac_status); }; }; then
2198  :
2199else
2200  echo "$as_me: failed program was:" >&5
2201sed 's/^/| /' conftest.$ac_ext >&5
2202
2203continue
2204fi
2205rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2206  cat >conftest.$ac_ext <<_ACEOF
2207/* confdefs.h.  */
2208_ACEOF
2209cat confdefs.h >>conftest.$ac_ext
2210cat >>conftest.$ac_ext <<_ACEOF
2211/* end confdefs.h.  */
2212$ac_declaration
2213int
2214main ()
2215{
2216exit (42);
2217  ;
2218  return 0;
2219}
2220_ACEOF
2221rm -f conftest.$ac_objext
2222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2223  (eval $ac_compile) 2>conftest.er1
2224  ac_status=$?
2225  grep -v '^ *+' conftest.er1 >conftest.err
2226  rm -f conftest.er1
2227  cat conftest.err >&5
2228  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2229  (exit $ac_status); } &&
2230	 { ac_try='test -z "$ac_c_werror_flag"
2231			 || test ! -s conftest.err'
2232  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2233  (eval $ac_try) 2>&5
2234  ac_status=$?
2235  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2236  (exit $ac_status); }; } &&
2237	 { ac_try='test -s conftest.$ac_objext'
2238  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2239  (eval $ac_try) 2>&5
2240  ac_status=$?
2241  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2242  (exit $ac_status); }; }; then
2243  break
2244else
2245  echo "$as_me: failed program was:" >&5
2246sed 's/^/| /' conftest.$ac_ext >&5
2247
2248fi
2249rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2250done
2251rm -f conftest*
2252if test -n "$ac_declaration"; then
2253  echo '#ifdef __cplusplus' >>confdefs.h
2254  echo $ac_declaration      >>confdefs.h
2255  echo '#endif'             >>confdefs.h
2256fi
2257
2258else
2259  echo "$as_me: failed program was:" >&5
2260sed 's/^/| /' conftest.$ac_ext >&5
2261
2262fi
2263rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2264ac_ext=c
2265ac_cpp='$CPP $CPPFLAGS'
2266ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2267ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2268ac_compiler_gnu=$ac_cv_c_compiler_gnu
2269
2270
2271echo "$as_me:$LINENO: checking for inline" >&5
2272echo $ECHO_N "checking for inline... $ECHO_C" >&6
2273if test "${ac_cv_c_inline+set}" = set; then
2274  echo $ECHO_N "(cached) $ECHO_C" >&6
2275else
2276  ac_cv_c_inline=no
2277for ac_kw in inline __inline__ __inline; do
2278  cat >conftest.$ac_ext <<_ACEOF
2279/* confdefs.h.  */
2280_ACEOF
2281cat confdefs.h >>conftest.$ac_ext
2282cat >>conftest.$ac_ext <<_ACEOF
2283/* end confdefs.h.  */
2284#ifndef __cplusplus
2285typedef int foo_t;
2286static $ac_kw foo_t static_foo () {return 0; }
2287$ac_kw foo_t foo () {return 0; }
2288#endif
2289
2290_ACEOF
2291rm -f conftest.$ac_objext
2292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2293  (eval $ac_compile) 2>conftest.er1
2294  ac_status=$?
2295  grep -v '^ *+' conftest.er1 >conftest.err
2296  rm -f conftest.er1
2297  cat conftest.err >&5
2298  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2299  (exit $ac_status); } &&
2300	 { ac_try='test -z "$ac_c_werror_flag"
2301			 || test ! -s conftest.err'
2302  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2303  (eval $ac_try) 2>&5
2304  ac_status=$?
2305  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2306  (exit $ac_status); }; } &&
2307	 { ac_try='test -s conftest.$ac_objext'
2308  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2309  (eval $ac_try) 2>&5
2310  ac_status=$?
2311  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2312  (exit $ac_status); }; }; then
2313  ac_cv_c_inline=$ac_kw; break
2314else
2315  echo "$as_me: failed program was:" >&5
2316sed 's/^/| /' conftest.$ac_ext >&5
2317
2318fi
2319rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2320done
2321
2322fi
2323echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
2324echo "${ECHO_T}$ac_cv_c_inline" >&6
2325
2326
2327case $ac_cv_c_inline in
2328  inline | yes) ;;
2329  *)
2330    case $ac_cv_c_inline in
2331      no) ac_val=;;
2332      *) ac_val=$ac_cv_c_inline;;
2333    esac
2334    cat >>confdefs.h <<_ACEOF
2335#ifndef __cplusplus
2336#define inline $ac_val
2337#endif
2338_ACEOF
2339    ;;
2340esac
2341
2342ac_ext=c
2343ac_cpp='$CPP $CPPFLAGS'
2344ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2345ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2346ac_compiler_gnu=$ac_cv_c_compiler_gnu
2347echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2348echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2349# On Suns, sometimes $CPP names a directory.
2350if test -n "$CPP" && test -d "$CPP"; then
2351  CPP=
2352fi
2353if test -z "$CPP"; then
2354  if test "${ac_cv_prog_CPP+set}" = set; then
2355  echo $ECHO_N "(cached) $ECHO_C" >&6
2356else
2357      # Double quotes because CPP needs to be expanded
2358    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2359    do
2360      ac_preproc_ok=false
2361for ac_c_preproc_warn_flag in '' yes
2362do
2363  # Use a header file that comes with gcc, so configuring glibc
2364  # with a fresh cross-compiler works.
2365  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2366  # <limits.h> exists even on freestanding compilers.
2367  # On the NeXT, cc -E runs the code through the compiler's parser,
2368  # not just through cpp. "Syntax error" is here to catch this case.
2369  cat >conftest.$ac_ext <<_ACEOF
2370/* confdefs.h.  */
2371_ACEOF
2372cat confdefs.h >>conftest.$ac_ext
2373cat >>conftest.$ac_ext <<_ACEOF
2374/* end confdefs.h.  */
2375#ifdef __STDC__
2376# include <limits.h>
2377#else
2378# include <assert.h>
2379#endif
2380		     Syntax error
2381_ACEOF
2382if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2383  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2384  ac_status=$?
2385  grep -v '^ *+' conftest.er1 >conftest.err
2386  rm -f conftest.er1
2387  cat conftest.err >&5
2388  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2389  (exit $ac_status); } >/dev/null; then
2390  if test -s conftest.err; then
2391    ac_cpp_err=$ac_c_preproc_warn_flag
2392    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2393  else
2394    ac_cpp_err=
2395  fi
2396else
2397  ac_cpp_err=yes
2398fi
2399if test -z "$ac_cpp_err"; then
2400  :
2401else
2402  echo "$as_me: failed program was:" >&5
2403sed 's/^/| /' conftest.$ac_ext >&5
2404
2405  # Broken: fails on valid input.
2406continue
2407fi
2408rm -f conftest.err conftest.$ac_ext
2409
2410  # OK, works on sane cases.  Now check whether non-existent headers
2411  # can be detected and how.
2412  cat >conftest.$ac_ext <<_ACEOF
2413/* confdefs.h.  */
2414_ACEOF
2415cat confdefs.h >>conftest.$ac_ext
2416cat >>conftest.$ac_ext <<_ACEOF
2417/* end confdefs.h.  */
2418#include <ac_nonexistent.h>
2419_ACEOF
2420if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2421  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2422  ac_status=$?
2423  grep -v '^ *+' conftest.er1 >conftest.err
2424  rm -f conftest.er1
2425  cat conftest.err >&5
2426  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2427  (exit $ac_status); } >/dev/null; then
2428  if test -s conftest.err; then
2429    ac_cpp_err=$ac_c_preproc_warn_flag
2430    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2431  else
2432    ac_cpp_err=
2433  fi
2434else
2435  ac_cpp_err=yes
2436fi
2437if test -z "$ac_cpp_err"; then
2438  # Broken: success on invalid input.
2439continue
2440else
2441  echo "$as_me: failed program was:" >&5
2442sed 's/^/| /' conftest.$ac_ext >&5
2443
2444  # Passes both tests.
2445ac_preproc_ok=:
2446break
2447fi
2448rm -f conftest.err conftest.$ac_ext
2449
2450done
2451# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2452rm -f conftest.err conftest.$ac_ext
2453if $ac_preproc_ok; then
2454  break
2455fi
2456
2457    done
2458    ac_cv_prog_CPP=$CPP
2459
2460fi
2461  CPP=$ac_cv_prog_CPP
2462else
2463  ac_cv_prog_CPP=$CPP
2464fi
2465echo "$as_me:$LINENO: result: $CPP" >&5
2466echo "${ECHO_T}$CPP" >&6
2467ac_preproc_ok=false
2468for ac_c_preproc_warn_flag in '' yes
2469do
2470  # Use a header file that comes with gcc, so configuring glibc
2471  # with a fresh cross-compiler works.
2472  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2473  # <limits.h> exists even on freestanding compilers.
2474  # On the NeXT, cc -E runs the code through the compiler's parser,
2475  # not just through cpp. "Syntax error" is here to catch this case.
2476  cat >conftest.$ac_ext <<_ACEOF
2477/* confdefs.h.  */
2478_ACEOF
2479cat confdefs.h >>conftest.$ac_ext
2480cat >>conftest.$ac_ext <<_ACEOF
2481/* end confdefs.h.  */
2482#ifdef __STDC__
2483# include <limits.h>
2484#else
2485# include <assert.h>
2486#endif
2487		     Syntax error
2488_ACEOF
2489if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2490  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2491  ac_status=$?
2492  grep -v '^ *+' conftest.er1 >conftest.err
2493  rm -f conftest.er1
2494  cat conftest.err >&5
2495  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2496  (exit $ac_status); } >/dev/null; then
2497  if test -s conftest.err; then
2498    ac_cpp_err=$ac_c_preproc_warn_flag
2499    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2500  else
2501    ac_cpp_err=
2502  fi
2503else
2504  ac_cpp_err=yes
2505fi
2506if test -z "$ac_cpp_err"; then
2507  :
2508else
2509  echo "$as_me: failed program was:" >&5
2510sed 's/^/| /' conftest.$ac_ext >&5
2511
2512  # Broken: fails on valid input.
2513continue
2514fi
2515rm -f conftest.err conftest.$ac_ext
2516
2517  # OK, works on sane cases.  Now check whether non-existent headers
2518  # can be detected and how.
2519  cat >conftest.$ac_ext <<_ACEOF
2520/* confdefs.h.  */
2521_ACEOF
2522cat confdefs.h >>conftest.$ac_ext
2523cat >>conftest.$ac_ext <<_ACEOF
2524/* end confdefs.h.  */
2525#include <ac_nonexistent.h>
2526_ACEOF
2527if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2528  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2529  ac_status=$?
2530  grep -v '^ *+' conftest.er1 >conftest.err
2531  rm -f conftest.er1
2532  cat conftest.err >&5
2533  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2534  (exit $ac_status); } >/dev/null; then
2535  if test -s conftest.err; then
2536    ac_cpp_err=$ac_c_preproc_warn_flag
2537    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2538  else
2539    ac_cpp_err=
2540  fi
2541else
2542  ac_cpp_err=yes
2543fi
2544if test -z "$ac_cpp_err"; then
2545  # Broken: success on invalid input.
2546continue
2547else
2548  echo "$as_me: failed program was:" >&5
2549sed 's/^/| /' conftest.$ac_ext >&5
2550
2551  # Passes both tests.
2552ac_preproc_ok=:
2553break
2554fi
2555rm -f conftest.err conftest.$ac_ext
2556
2557done
2558# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2559rm -f conftest.err conftest.$ac_ext
2560if $ac_preproc_ok; then
2561  :
2562else
2563  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2564See \`config.log' for more details." >&5
2565echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2566See \`config.log' for more details." >&2;}
2567   { (exit 1); exit 1; }; }
2568fi
2569
2570ac_ext=c
2571ac_cpp='$CPP $CPPFLAGS'
2572ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2573ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2574ac_compiler_gnu=$ac_cv_c_compiler_gnu
2575
2576
2577echo "$as_me:$LINENO: checking for egrep" >&5
2578echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2579if test "${ac_cv_prog_egrep+set}" = set; then
2580  echo $ECHO_N "(cached) $ECHO_C" >&6
2581else
2582  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2583    then ac_cv_prog_egrep='grep -E'
2584    else ac_cv_prog_egrep='egrep'
2585    fi
2586fi
2587echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2588echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2589 EGREP=$ac_cv_prog_egrep
2590
2591
2592echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2593echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2594if test "${ac_cv_header_stdc+set}" = set; then
2595  echo $ECHO_N "(cached) $ECHO_C" >&6
2596else
2597  cat >conftest.$ac_ext <<_ACEOF
2598/* confdefs.h.  */
2599_ACEOF
2600cat confdefs.h >>conftest.$ac_ext
2601cat >>conftest.$ac_ext <<_ACEOF
2602/* end confdefs.h.  */
2603#include <stdlib.h>
2604#include <stdarg.h>
2605#include <string.h>
2606#include <float.h>
2607
2608int
2609main ()
2610{
2611
2612  ;
2613  return 0;
2614}
2615_ACEOF
2616rm -f conftest.$ac_objext
2617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2618  (eval $ac_compile) 2>conftest.er1
2619  ac_status=$?
2620  grep -v '^ *+' conftest.er1 >conftest.err
2621  rm -f conftest.er1
2622  cat conftest.err >&5
2623  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2624  (exit $ac_status); } &&
2625	 { ac_try='test -z "$ac_c_werror_flag"
2626			 || test ! -s conftest.err'
2627  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2628  (eval $ac_try) 2>&5
2629  ac_status=$?
2630  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2631  (exit $ac_status); }; } &&
2632	 { ac_try='test -s conftest.$ac_objext'
2633  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2634  (eval $ac_try) 2>&5
2635  ac_status=$?
2636  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2637  (exit $ac_status); }; }; then
2638  ac_cv_header_stdc=yes
2639else
2640  echo "$as_me: failed program was:" >&5
2641sed 's/^/| /' conftest.$ac_ext >&5
2642
2643ac_cv_header_stdc=no
2644fi
2645rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2646
2647if test $ac_cv_header_stdc = yes; then
2648  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2649  cat >conftest.$ac_ext <<_ACEOF
2650/* confdefs.h.  */
2651_ACEOF
2652cat confdefs.h >>conftest.$ac_ext
2653cat >>conftest.$ac_ext <<_ACEOF
2654/* end confdefs.h.  */
2655#include <string.h>
2656
2657_ACEOF
2658if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2659  $EGREP "memchr" >/dev/null 2>&1; then
2660  :
2661else
2662  ac_cv_header_stdc=no
2663fi
2664rm -f conftest*
2665
2666fi
2667
2668if test $ac_cv_header_stdc = yes; then
2669  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2670  cat >conftest.$ac_ext <<_ACEOF
2671/* confdefs.h.  */
2672_ACEOF
2673cat confdefs.h >>conftest.$ac_ext
2674cat >>conftest.$ac_ext <<_ACEOF
2675/* end confdefs.h.  */
2676#include <stdlib.h>
2677
2678_ACEOF
2679if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2680  $EGREP "free" >/dev/null 2>&1; then
2681  :
2682else
2683  ac_cv_header_stdc=no
2684fi
2685rm -f conftest*
2686
2687fi
2688
2689if test $ac_cv_header_stdc = yes; then
2690  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2691  if test "$cross_compiling" = yes; then
2692  :
2693else
2694  cat >conftest.$ac_ext <<_ACEOF
2695/* confdefs.h.  */
2696_ACEOF
2697cat confdefs.h >>conftest.$ac_ext
2698cat >>conftest.$ac_ext <<_ACEOF
2699/* end confdefs.h.  */
2700#include <ctype.h>
2701#if ((' ' & 0x0FF) == 0x020)
2702# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2703# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2704#else
2705# define ISLOWER(c) \
2706		   (('a' <= (c) && (c) <= 'i') \
2707		     || ('j' <= (c) && (c) <= 'r') \
2708		     || ('s' <= (c) && (c) <= 'z'))
2709# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2710#endif
2711
2712#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2713int
2714main ()
2715{
2716  int i;
2717  for (i = 0; i < 256; i++)
2718    if (XOR (islower (i), ISLOWER (i))
2719	|| toupper (i) != TOUPPER (i))
2720      exit(2);
2721  exit (0);
2722}
2723_ACEOF
2724rm -f conftest$ac_exeext
2725if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2726  (eval $ac_link) 2>&5
2727  ac_status=$?
2728  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2729  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2730  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2731  (eval $ac_try) 2>&5
2732  ac_status=$?
2733  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2734  (exit $ac_status); }; }; then
2735  :
2736else
2737  echo "$as_me: program exited with status $ac_status" >&5
2738echo "$as_me: failed program was:" >&5
2739sed 's/^/| /' conftest.$ac_ext >&5
2740
2741( exit $ac_status )
2742ac_cv_header_stdc=no
2743fi
2744rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2745fi
2746fi
2747fi
2748echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2749echo "${ECHO_T}$ac_cv_header_stdc" >&6
2750if test $ac_cv_header_stdc = yes; then
2751
2752cat >>confdefs.h <<\_ACEOF
2753#define STDC_HEADERS 1
2754_ACEOF
2755
2756fi
2757
2758
2759# To properly support cross-compilation, one would
2760# need to use these tool checks instead of
2761# the ones below and reconfigure with
2762# autoconf 2.50. You can also just set
2763# the CC, AR, RANLIB, and RC environment
2764# variables if you want to cross compile.
2765
2766if test "${GCC}" = "yes" ; then
2767    # Extract the first word of "ar", so it can be a program name with args.
2768set dummy ar; ac_word=$2
2769echo "$as_me:$LINENO: checking for $ac_word" >&5
2770echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2771if test "${ac_cv_prog_AR+set}" = set; then
2772  echo $ECHO_N "(cached) $ECHO_C" >&6
2773else
2774  if test -n "$AR"; then
2775  ac_cv_prog_AR="$AR" # Let the user override the test.
2776else
2777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2778for as_dir in $PATH
2779do
2780  IFS=$as_save_IFS
2781  test -z "$as_dir" && as_dir=.
2782  for ac_exec_ext in '' $ac_executable_extensions; do
2783  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2784    ac_cv_prog_AR="ar"
2785    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2786    break 2
2787  fi
2788done
2789done
2790
2791fi
2792fi
2793AR=$ac_cv_prog_AR
2794if test -n "$AR"; then
2795  echo "$as_me:$LINENO: result: $AR" >&5
2796echo "${ECHO_T}$AR" >&6
2797else
2798  echo "$as_me:$LINENO: result: no" >&5
2799echo "${ECHO_T}no" >&6
2800fi
2801
2802    # Extract the first word of "ranlib", so it can be a program name with args.
2803set dummy ranlib; ac_word=$2
2804echo "$as_me:$LINENO: checking for $ac_word" >&5
2805echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2806if test "${ac_cv_prog_RANLIB+set}" = set; then
2807  echo $ECHO_N "(cached) $ECHO_C" >&6
2808else
2809  if test -n "$RANLIB"; then
2810  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2811else
2812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2813for as_dir in $PATH
2814do
2815  IFS=$as_save_IFS
2816  test -z "$as_dir" && as_dir=.
2817  for ac_exec_ext in '' $ac_executable_extensions; do
2818  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2819    ac_cv_prog_RANLIB="ranlib"
2820    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2821    break 2
2822  fi
2823done
2824done
2825
2826fi
2827fi
2828RANLIB=$ac_cv_prog_RANLIB
2829if test -n "$RANLIB"; then
2830  echo "$as_me:$LINENO: result: $RANLIB" >&5
2831echo "${ECHO_T}$RANLIB" >&6
2832else
2833  echo "$as_me:$LINENO: result: no" >&5
2834echo "${ECHO_T}no" >&6
2835fi
2836
2837    # Extract the first word of "windres", so it can be a program name with args.
2838set dummy windres; ac_word=$2
2839echo "$as_me:$LINENO: checking for $ac_word" >&5
2840echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2841if test "${ac_cv_prog_RC+set}" = set; then
2842  echo $ECHO_N "(cached) $ECHO_C" >&6
2843else
2844  if test -n "$RC"; then
2845  ac_cv_prog_RC="$RC" # Let the user override the test.
2846else
2847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2848for as_dir in $PATH
2849do
2850  IFS=$as_save_IFS
2851  test -z "$as_dir" && as_dir=.
2852  for ac_exec_ext in '' $ac_executable_extensions; do
2853  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2854    ac_cv_prog_RC="windres"
2855    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2856    break 2
2857  fi
2858done
2859done
2860
2861fi
2862fi
2863RC=$ac_cv_prog_RC
2864if test -n "$RC"; then
2865  echo "$as_me:$LINENO: result: $RC" >&5
2866echo "${ECHO_T}$RC" >&6
2867else
2868  echo "$as_me:$LINENO: result: no" >&5
2869echo "${ECHO_T}no" >&6
2870fi
2871
2872
2873    if test "${AR}" = "" ; then
2874	{ { echo "$as_me:$LINENO: error: Required archive tool 'ar' not found on PATH." >&5
2875echo "$as_me: error: Required archive tool 'ar' not found on PATH." >&2;}
2876   { (exit 1); exit 1; }; }
2877    fi
2878    if test "${RANLIB}" = "" ; then
2879	{ { echo "$as_me:$LINENO: error: Required archive index tool 'ranlib' not found on PATH." >&5
2880echo "$as_me: error: Required archive index tool 'ranlib' not found on PATH." >&2;}
2881   { (exit 1); exit 1; }; }
2882    fi
2883    if test "${RC}" = "" ; then
2884	{ { echo "$as_me:$LINENO: error: Required resource tool 'windres' not found on PATH." >&5
2885echo "$as_me: error: Required resource tool 'windres' not found on PATH." >&2;}
2886   { (exit 1); exit 1; }; }
2887    fi
2888fi
2889
2890#--------------------------------------------------------------------
2891# Checks to see if the make progeam sets the $MAKE variable.
2892#--------------------------------------------------------------------
2893
2894echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2895echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
2896set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
2897if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2898  echo $ECHO_N "(cached) $ECHO_C" >&6
2899else
2900  cat >conftest.make <<\_ACEOF
2901all:
2902	@echo 'ac_maketemp="$(MAKE)"'
2903_ACEOF
2904# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2905eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2906if test -n "$ac_maketemp"; then
2907  eval ac_cv_prog_make_${ac_make}_set=yes
2908else
2909  eval ac_cv_prog_make_${ac_make}_set=no
2910fi
2911rm -f conftest.make
2912fi
2913if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2914  echo "$as_me:$LINENO: result: yes" >&5
2915echo "${ECHO_T}yes" >&6
2916  SET_MAKE=
2917else
2918  echo "$as_me:$LINENO: result: no" >&5
2919echo "${ECHO_T}no" >&6
2920  SET_MAKE="MAKE=${MAKE-make}"
2921fi
2922
2923
2924#--------------------------------------------------------------------
2925# Perform additinal compiler tests.
2926#--------------------------------------------------------------------
2927
2928
2929echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5
2930echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6
2931if test "${ac_cv_cygwin+set}" = set; then
2932  echo $ECHO_N "(cached) $ECHO_C" >&6
2933else
2934  cat >conftest.$ac_ext <<_ACEOF
2935/* confdefs.h.  */
2936_ACEOF
2937cat confdefs.h >>conftest.$ac_ext
2938cat >>conftest.$ac_ext <<_ACEOF
2939/* end confdefs.h.  */
2940
2941#ifdef __CYGWIN__
2942#error cygwin
2943#endif
2944
2945int
2946main ()
2947{
2948
2949  ;
2950  return 0;
2951}
2952_ACEOF
2953rm -f conftest.$ac_objext
2954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2955  (eval $ac_compile) 2>conftest.er1
2956  ac_status=$?
2957  grep -v '^ *+' conftest.er1 >conftest.err
2958  rm -f conftest.er1
2959  cat conftest.err >&5
2960  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2961  (exit $ac_status); } &&
2962	 { ac_try='test -z "$ac_c_werror_flag"
2963			 || test ! -s conftest.err'
2964  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2965  (eval $ac_try) 2>&5
2966  ac_status=$?
2967  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2968  (exit $ac_status); }; } &&
2969	 { ac_try='test -s conftest.$ac_objext'
2970  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2971  (eval $ac_try) 2>&5
2972  ac_status=$?
2973  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2974  (exit $ac_status); }; }; then
2975  ac_cv_cygwin=no
2976else
2977  echo "$as_me: failed program was:" >&5
2978sed 's/^/| /' conftest.$ac_ext >&5
2979
2980ac_cv_cygwin=yes
2981fi
2982rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2983
2984fi
2985echo "$as_me:$LINENO: result: $ac_cv_cygwin" >&5
2986echo "${ECHO_T}$ac_cv_cygwin" >&6
2987if test "$ac_cv_cygwin" = "yes" ; then
2988    { { echo "$as_me:$LINENO: error: Compiling under Cygwin is not currently supported.
2989A maintainer for the Cygwin port of Tcl/Tk is needed. See the README
2990file for information about building with Mingw." >&5
2991echo "$as_me: error: Compiling under Cygwin is not currently supported.
2992A maintainer for the Cygwin port of Tcl/Tk is needed. See the README
2993file for information about building with Mingw." >&2;}
2994   { (exit 1); exit 1; }; }
2995fi
2996
2997#--------------------------------------------------------------------
2998# Determines the correct binary file extension (.o, .obj, .exe etc.)
2999#--------------------------------------------------------------------
3000
3001
3002
3003
3004#--------------------------------------------------------------------
3005# Check whether --enable-threads or --disable-threads was given.
3006#--------------------------------------------------------------------
3007
3008
3009    echo "$as_me:$LINENO: checking for building with threads" >&5
3010echo $ECHO_N "checking for building with threads... $ECHO_C" >&6
3011    # Check whether --enable-threads or --disable-threads was given.
3012if test "${enable_threads+set}" = set; then
3013  enableval="$enable_threads"
3014  tcl_ok=$enableval
3015else
3016  tcl_ok=no
3017fi;
3018
3019    if test "$tcl_ok" = "yes"; then
3020	echo "$as_me:$LINENO: result: yes" >&5
3021echo "${ECHO_T}yes" >&6
3022	TCL_THREADS=1
3023	cat >>confdefs.h <<\_ACEOF
3024#define TCL_THREADS 1
3025_ACEOF
3026
3027	# USE_THREAD_ALLOC tells us to try the special thread-based
3028	# allocator that significantly reduces lock contention
3029	cat >>confdefs.h <<\_ACEOF
3030#define USE_THREAD_ALLOC 1
3031_ACEOF
3032
3033    else
3034	TCL_THREADS=0
3035	echo "$as_me:$LINENO: result: no (default)" >&5
3036echo "${ECHO_T}no (default)" >&6
3037    fi
3038
3039
3040
3041#--------------------------------------------------------------------
3042# The statements below define a collection of symbols related to
3043# building libtk as a shared library instead of a static library.
3044#--------------------------------------------------------------------
3045
3046
3047    echo "$as_me:$LINENO: checking how to build libraries" >&5
3048echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6
3049    # Check whether --enable-shared or --disable-shared was given.
3050if test "${enable_shared+set}" = set; then
3051  enableval="$enable_shared"
3052  tcl_ok=$enableval
3053else
3054  tcl_ok=yes
3055fi;
3056
3057    if test "${enable_shared+set}" = set; then
3058	enableval="$enable_shared"
3059	tcl_ok=$enableval
3060    else
3061	tcl_ok=yes
3062    fi
3063
3064    if test "$tcl_ok" = "yes" ; then
3065	echo "$as_me:$LINENO: result: shared" >&5
3066echo "${ECHO_T}shared" >&6
3067	SHARED_BUILD=1
3068    else
3069	echo "$as_me:$LINENO: result: static" >&5
3070echo "${ECHO_T}static" >&6
3071	SHARED_BUILD=0
3072	cat >>confdefs.h <<\_ACEOF
3073#define STATIC_BUILD 1
3074_ACEOF
3075
3076    fi
3077
3078
3079#--------------------------------------------------------------------
3080# The statements below define a collection of compile flags.  This
3081# macro depends on the value of SHARED_BUILD, and should be called
3082# after SC_ENABLE_SHARED checks the configure switches.
3083#--------------------------------------------------------------------
3084
3085# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3096		  inttypes.h stdint.h unistd.h
3097do
3098as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3099echo "$as_me:$LINENO: checking for $ac_header" >&5
3100echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3101if eval "test \"\${$as_ac_Header+set}\" = set"; then
3102  echo $ECHO_N "(cached) $ECHO_C" >&6
3103else
3104  cat >conftest.$ac_ext <<_ACEOF
3105/* confdefs.h.  */
3106_ACEOF
3107cat confdefs.h >>conftest.$ac_ext
3108cat >>conftest.$ac_ext <<_ACEOF
3109/* end confdefs.h.  */
3110$ac_includes_default
3111
3112#include <$ac_header>
3113_ACEOF
3114rm -f conftest.$ac_objext
3115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3116  (eval $ac_compile) 2>conftest.er1
3117  ac_status=$?
3118  grep -v '^ *+' conftest.er1 >conftest.err
3119  rm -f conftest.er1
3120  cat conftest.err >&5
3121  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3122  (exit $ac_status); } &&
3123	 { ac_try='test -z "$ac_c_werror_flag"
3124			 || test ! -s conftest.err'
3125  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3126  (eval $ac_try) 2>&5
3127  ac_status=$?
3128  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3129  (exit $ac_status); }; } &&
3130	 { ac_try='test -s conftest.$ac_objext'
3131  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3132  (eval $ac_try) 2>&5
3133  ac_status=$?
3134  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3135  (exit $ac_status); }; }; then
3136  eval "$as_ac_Header=yes"
3137else
3138  echo "$as_me: failed program was:" >&5
3139sed 's/^/| /' conftest.$ac_ext >&5
3140
3141eval "$as_ac_Header=no"
3142fi
3143rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3144fi
3145echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3146echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3147if test `eval echo '${'$as_ac_Header'}'` = yes; then
3148  cat >>confdefs.h <<_ACEOF
3149#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3150_ACEOF
3151
3152fi
3153
3154done
3155
3156
3157
3158
3159    # Step 0: Enable 64 bit support?
3160
3161    echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
3162echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6
3163    # Check whether --enable-64bit or --disable-64bit was given.
3164if test "${enable_64bit+set}" = set; then
3165  enableval="$enable_64bit"
3166  do64bit=$enableval
3167else
3168  do64bit=no
3169fi;
3170    echo "$as_me:$LINENO: result: $do64bit" >&5
3171echo "${ECHO_T}$do64bit" >&6
3172
3173    # Cross-compiling options for Windows/CE builds
3174
3175    echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
3176echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6
3177    # Check whether --enable-wince or --disable-wince was given.
3178if test "${enable_wince+set}" = set; then
3179  enableval="$enable_wince"
3180  doWince=$enableval
3181else
3182  doWince=no
3183fi;
3184    echo "$as_me:$LINENO: result: $doWince" >&5
3185echo "${ECHO_T}$doWince" >&6
3186
3187    echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
3188echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6
3189
3190# Check whether --with-celib or --without-celib was given.
3191if test "${with_celib+set}" = set; then
3192  withval="$with_celib"
3193  CELIB_DIR=$withval
3194else
3195  CELIB_DIR=NO_CELIB
3196fi;
3197    echo "$as_me:$LINENO: result: $CELIB_DIR" >&5
3198echo "${ECHO_T}$CELIB_DIR" >&6
3199
3200    # Set some defaults (may get changed below)
3201    EXTRA_CFLAGS=""
3202
3203    # Extract the first word of "cygpath", so it can be a program name with args.
3204set dummy cygpath; ac_word=$2
3205echo "$as_me:$LINENO: checking for $ac_word" >&5
3206echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3207if test "${ac_cv_prog_CYGPATH+set}" = set; then
3208  echo $ECHO_N "(cached) $ECHO_C" >&6
3209else
3210  if test -n "$CYGPATH"; then
3211  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
3212else
3213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3214for as_dir in $PATH
3215do
3216  IFS=$as_save_IFS
3217  test -z "$as_dir" && as_dir=.
3218  for ac_exec_ext in '' $ac_executable_extensions; do
3219  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3220    ac_cv_prog_CYGPATH="cygpath -w"
3221    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3222    break 2
3223  fi
3224done
3225done
3226
3227  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
3228fi
3229fi
3230CYGPATH=$ac_cv_prog_CYGPATH
3231if test -n "$CYGPATH"; then
3232  echo "$as_me:$LINENO: result: $CYGPATH" >&5
3233echo "${ECHO_T}$CYGPATH" >&6
3234else
3235  echo "$as_me:$LINENO: result: no" >&5
3236echo "${ECHO_T}no" >&6
3237fi
3238
3239
3240    SHLIB_SUFFIX=".dll"
3241
3242    # Check for a bug in gcc's windres that causes the
3243    # compile to fail when a Windows native path is
3244    # passed into windres. The mingw toolchain requires
3245    # Windows native paths while Cygwin should work
3246    # with both. Avoid the bug by passing a POSIX
3247    # path when using the Cygwin toolchain.
3248
3249    if test "$GCC" = "yes" && test "$CYGPATH" != "echo" ; then
3250	conftest=/tmp/conftest.rc
3251	echo "STRINGTABLE BEGIN" > $conftest
3252	echo "101 \"name\"" >> $conftest
3253	echo "END" >> $conftest
3254
3255	echo "$as_me:$LINENO: checking for Windows native path bug in windres" >&5
3256echo $ECHO_N "checking for Windows native path bug in windres... $ECHO_C" >&6
3257	cyg_conftest=`$CYGPATH $conftest`
3258	if { ac_try='$RC -o conftest.res.o $cyg_conftest'
3259  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3260  (eval $ac_try) 2>&5
3261  ac_status=$?
3262  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3263  (exit $ac_status); }; } ; then
3264	    echo "$as_me:$LINENO: result: no" >&5
3265echo "${ECHO_T}no" >&6
3266	else
3267	    echo "$as_me:$LINENO: result: yes" >&5
3268echo "${ECHO_T}yes" >&6
3269	    CYGPATH=echo
3270	fi
3271	conftest=
3272	cyg_conftest=
3273    fi
3274
3275    if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then
3276        DEPARG='"$<"'
3277    else
3278        DEPARG='"$(shell $(CYGPATH) $<)"'
3279    fi
3280
3281    # set various compiler flags depending on whether we are using gcc or cl
3282
3283    echo "$as_me:$LINENO: checking compiler flags" >&5
3284echo $ECHO_N "checking compiler flags... $ECHO_C" >&6
3285    if test "${GCC}" = "yes" ; then
3286	if test "$do64bit" != "no" ; then
3287	    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on Windows" >&5
3288echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;}
3289	fi
3290	SHLIB_LD=""
3291	SHLIB_LD_LIBS=""
3292	LIBS="-lws2_32"
3293	# mingw needs to link ole32 and oleaut32 for [send], but MSVC doesn't
3294	LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid -lole32 -loleaut32"
3295	STLIB_LD='${AR} cr'
3296	RC_OUT=-o
3297	RC_TYPE=
3298	RC_INCLUDE=--include
3299	RC_DEFINE=--define
3300	RES=res.o
3301	MAKE_LIB="\${STLIB_LD} \$@"
3302	POST_MAKE_LIB="\${RANLIB} \$@"
3303	MAKE_EXE="\${CC} -o \$@"
3304	LIBPREFIX="lib"
3305
3306	#if test "$ac_cv_cygwin" = "yes"; then
3307	#    extra_cflags="-mno-cygwin"
3308	#    extra_ldflags="-mno-cygwin"
3309	#else
3310	#    extra_cflags=""
3311	#    extra_ldflags=""
3312	#fi
3313
3314	if test "$ac_cv_cygwin" = "yes"; then
3315	  touch ac$$.c
3316	  if ${CC} -c -mwin32 ac$$.c >/dev/null 2>&1; then
3317	    case "$extra_cflags" in
3318	      *-mwin32*) ;;
3319	      *) extra_cflags="-mwin32 $extra_cflags" ;;
3320	    esac
3321	    case "$extra_ldflags" in
3322	      *-mwin32*) ;;
3323	      *) extra_ldflags="-mwin32 $extra_ldflags" ;;
3324	    esac
3325	  fi
3326	  rm -f ac$$.o ac$$.c
3327	else
3328	  extra_cflags=''
3329	  extra_ldflags=''
3330	fi
3331
3332	if test "${SHARED_BUILD}" = "0" ; then
3333	    # static
3334            echo "$as_me:$LINENO: result: using static flags" >&5
3335echo "${ECHO_T}using static flags" >&6
3336	    runtime=
3337	    MAKE_DLL="echo "
3338	    LIBSUFFIX="s\${DBGX}.a"
3339	    LIBFLAGSUFFIX="s\${DBGX}"
3340	    LIBRARIES="\${STATIC_LIBRARIES}"
3341	    EXESUFFIX="s\${DBGX}.exe"
3342	else
3343	    # dynamic
3344            echo "$as_me:$LINENO: result: using shared flags" >&5
3345echo "${ECHO_T}using shared flags" >&6
3346
3347	    # ad-hoc check to see if CC supports -shared.
3348	    if "${CC}" -shared 2>&1 | egrep ': -shared not supported' >/dev/null; then
3349		{ { echo "$as_me:$LINENO: error: ${CC} does not support the -shared option.
3350                You will need to upgrade to a newer version of the toolchain." >&5
3351echo "$as_me: error: ${CC} does not support the -shared option.
3352                You will need to upgrade to a newer version of the toolchain." >&2;}
3353   { (exit 1); exit 1; }; }
3354	    fi
3355
3356	    runtime=
3357	    # Link with gcc since ld does not link to default libs like
3358	    # -luser32 and -lmsvcrt by default. Make sure CFLAGS is
3359	    # included so -mno-cygwin passed the correct libs to the linker.
3360	    SHLIB_LD='${CC} -shared ${CFLAGS}'
3361	    SHLIB_LD_LIBS='${LIBS}'
3362	    # Add SHLIB_LD_LIBS to the Make rule, not here.
3363	    MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \$@ ${extra_ldflags} \
3364	        -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\$@)"
3365
3366	    LIBSUFFIX="\${DBGX}.a"
3367	    LIBFLAGSUFFIX="\${DBGX}"
3368	    EXESUFFIX="\${DBGX}.exe"
3369	    LIBRARIES="\${SHARED_LIBRARIES}"
3370	fi
3371	# DLLSUFFIX is separate because it is the building block for
3372	# users of tclConfig.sh that may build shared or static.
3373	DLLSUFFIX="\${DBGX}.dll"
3374	SHLIB_SUFFIX=.dll
3375
3376	EXTRA_CFLAGS="${extra_cflags}"
3377
3378	CFLAGS_DEBUG=-g
3379	CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
3380	CFLAGS_WARNING="-Wall"
3381	LDFLAGS_DEBUG=
3382	LDFLAGS_OPTIMIZE=
3383
3384	# Specify the CC output file names based on the target name
3385	CC_OBJNAME="-o \$@"
3386	CC_EXENAME="-o \$@"
3387
3388	# Specify linker flags depending on the type of app being
3389	# built -- Console vs. Window.
3390	#
3391	# ORIGINAL COMMENT:
3392	# We need to pass -e _WinMain@16 so that ld will use
3393	# WinMain() instead of main() as the entry point. We can't
3394	# use autoconf to check for this case since it would need
3395	# to run an executable and that does not work when
3396	# cross compiling. Remove this -e workaround once we
3397	# require a gcc that does not have this bug.
3398	#
3399	# MK NOTE: Tk should use a different mechanism. This causes
3400	# interesting problems, such as wish dying at startup.
3401	#LDFLAGS_WINDOW="-mwindows -e _WinMain@16 ${extra_ldflags}"
3402	LDFLAGS_CONSOLE="-mconsole ${extra_ldflags}"
3403	LDFLAGS_WINDOW="-mwindows ${extra_ldflags}"
3404
3405	# gcc under Windows supports only 32bit builds
3406	MACHINE="X86"
3407    else
3408	if test "${SHARED_BUILD}" = "0" ; then
3409	    # static
3410            echo "$as_me:$LINENO: result: using static flags" >&5
3411echo "${ECHO_T}using static flags" >&6
3412	    runtime=-MT
3413	    MAKE_DLL="echo "
3414	    LIBSUFFIX="s\${DBGX}.lib"
3415	    LIBFLAGSUFFIX="s\${DBGX}"
3416	    LIBRARIES="\${STATIC_LIBRARIES}"
3417	    EXESUFFIX="s\${DBGX}.exe"
3418	    SHLIB_LD_LIBS=""
3419	else
3420	    # dynamic
3421            echo "$as_me:$LINENO: result: using shared flags" >&5
3422echo "${ECHO_T}using shared flags" >&6
3423	    runtime=-MD
3424	    # Add SHLIB_LD_LIBS to the Make rule, not here.
3425	    MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@"
3426	    LIBSUFFIX="\${DBGX}.lib"
3427	    LIBFLAGSUFFIX="\${DBGX}"
3428	    EXESUFFIX="\${DBGX}.exe"
3429	    LIBRARIES="\${SHARED_LIBRARIES}"
3430	    SHLIB_LD_LIBS='${LIBS}'
3431	fi
3432	# DLLSUFFIX is separate because it is the building block for
3433	# users of tclConfig.sh that may build shared or static.
3434	DLLSUFFIX="\${DBGX}.dll"
3435
3436 	# This is a 2-stage check to make sure we have the 64-bit SDK
3437 	# We have to know where the SDK is installed.
3438	# This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
3439	# MACHINE is IX86 for LINK, but this is used by the manifest,
3440	# which requires x86|amd64|ia64.
3441	MACHINE="X86"
3442	if test "$do64bit" != "no" ; then
3443	    if test "x${MSSDK}x" = "xx" ; then
3444		MSSDK="C:/Progra~1/Microsoft Platform SDK"
3445	    fi
3446	    MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'`
3447	    PATH64=""
3448	    case "$do64bit" in
3449	      amd64|x64|yes)
3450		MACHINE="AMD64" ; # assume AMD64 as default 64-bit build
3451		PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
3452		;;
3453	      ia64)
3454		MACHINE="IA64"
3455		PATH64="${MSSDK}/Bin/Win64"
3456		;;
3457	    esac
3458	    if test ! -d "${PATH64}" ; then
3459		{ echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
3460echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
3461		{ echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
3462echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
3463		do64bit="no"
3464	    else
3465		echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
3466echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6
3467	    fi
3468	fi
3469
3470	LIBS="user32.lib advapi32.lib ws2_32.lib"
3471	if test "$do64bit" != "no" ; then
3472	    # The space-based-path will work for the Makefile, but will
3473	    # not work if AC_TRY_COMPILE is called.  TEA has the
3474	    # TEA_PATH_NOSPACE to avoid this issue.
3475	    # Check if _WIN64 is already recognized, and if so we don't
3476	    # need to modify CC.
3477	    echo "$as_me:$LINENO: checking whether _WIN64 is declared" >&5
3478echo $ECHO_N "checking whether _WIN64 is declared... $ECHO_C" >&6
3479if test "${ac_cv_have_decl__WIN64+set}" = set; then
3480  echo $ECHO_N "(cached) $ECHO_C" >&6
3481else
3482  cat >conftest.$ac_ext <<_ACEOF
3483/* confdefs.h.  */
3484_ACEOF
3485cat confdefs.h >>conftest.$ac_ext
3486cat >>conftest.$ac_ext <<_ACEOF
3487/* end confdefs.h.  */
3488$ac_includes_default
3489int
3490main ()
3491{
3492#ifndef _WIN64
3493  char *p = (char *) _WIN64;
3494#endif
3495
3496  ;
3497  return 0;
3498}
3499_ACEOF
3500rm -f conftest.$ac_objext
3501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3502  (eval $ac_compile) 2>conftest.er1
3503  ac_status=$?
3504  grep -v '^ *+' conftest.er1 >conftest.err
3505  rm -f conftest.er1
3506  cat conftest.err >&5
3507  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3508  (exit $ac_status); } &&
3509	 { ac_try='test -z "$ac_c_werror_flag"
3510			 || test ! -s conftest.err'
3511  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3512  (eval $ac_try) 2>&5
3513  ac_status=$?
3514  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3515  (exit $ac_status); }; } &&
3516	 { ac_try='test -s conftest.$ac_objext'
3517  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3518  (eval $ac_try) 2>&5
3519  ac_status=$?
3520  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3521  (exit $ac_status); }; }; then
3522  ac_cv_have_decl__WIN64=yes
3523else
3524  echo "$as_me: failed program was:" >&5
3525sed 's/^/| /' conftest.$ac_ext >&5
3526
3527ac_cv_have_decl__WIN64=no
3528fi
3529rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3530fi
3531echo "$as_me:$LINENO: result: $ac_cv_have_decl__WIN64" >&5
3532echo "${ECHO_T}$ac_cv_have_decl__WIN64" >&6
3533if test $ac_cv_have_decl__WIN64 = yes; then
3534  :
3535else
3536  CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \
3537			 -I\"${MSSDK}/Include/crt\" \
3538			 -I\"${MSSDK}/Include/crt/sys\""
3539fi
3540
3541	    RC="\"${MSSDK}/bin/rc.exe\""
3542	    CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d"
3543	    # Do not use -O2 for Win64 - this has proved buggy in code gen.
3544	    CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}"
3545	    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
3546	    LINKBIN="\"${PATH64}/link.exe\""
3547	    # Avoid 'unresolved external symbol __security_cookie' errors.
3548	    # c.f. http://support.microsoft.com/?id=894573
3549	    LIBS="$LIBS bufferoverflowU.lib"
3550	else
3551	    RC="rc"
3552	    # -Od - no optimization
3553	    # -WX - warnings as errors
3554	    CFLAGS_DEBUG="-nologo -Z7 -Od -WX ${runtime}d"
3555	    # -O2 - create fast code (/Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy)
3556	    CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}"
3557	    lflags="-nologo"
3558	    LINKBIN="link"
3559	fi
3560
3561	if test "$doWince" != "no" ; then
3562	    # Set defaults for common evc4/PPC2003 setup
3563	    # Currently Tcl requires 300+, possibly 420+ for sockets
3564	    CEVERSION=420; 		# could be 211 300 301 400 420 ...
3565	    TARGETCPU=ARMV4;	# could be ARMV4 ARM MIPS SH3 X86 ...
3566	    ARCH=ARM;		# could be ARM MIPS X86EM ...
3567	    PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
3568	    if test "$doWince" != "yes"; then
3569		# If !yes then the user specified something
3570		# Reset ARCH to allow user to skip specifying it
3571		ARCH=
3572		eval `echo $doWince | awk -F "," '{ \
3573	if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
3574	if ($1 < 400)	  { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
3575	if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
3576	if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
3577	if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
3578		}'`
3579		if test "x${ARCH}" = "x" ; then
3580		    ARCH=$TARGETCPU;
3581		fi
3582	    fi
3583	    OSVERSION=WCE$CEVERSION;
3584	    if test "x${WCEROOT}" = "x" ; then
3585		WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
3586		if test ! -d "${WCEROOT}" ; then
3587		    WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
3588		fi
3589	    fi
3590	    if test "x${SDKROOT}" = "x" ; then
3591		SDKROOT="C:/Program Files/Windows CE Tools"
3592		if test ! -d "${SDKROOT}" ; then
3593		    SDKROOT="C:/Windows CE Tools"
3594		fi
3595	    fi
3596	    # The space-based-path will work for the Makefile, but will
3597	    # not work if AC_TRY_COMPILE is called.
3598	    WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
3599	    SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
3600	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
3601	    if test ! -d "${CELIB_DIR}/inc"; then
3602		{ { echo "$as_me:$LINENO: error: Invalid celib directory \"${CELIB_DIR}\"" >&5
3603echo "$as_me: error: Invalid celib directory \"${CELIB_DIR}\"" >&2;}
3604   { (exit 1); exit 1; }; }
3605	    fi
3606	    if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"\
3607		-o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
3608		{ { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
3609echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
3610   { (exit 1); exit 1; }; }
3611	    else
3612		CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
3613		if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
3614		    CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
3615		fi
3616		CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
3617	    fi
3618	fi
3619
3620	if test "$doWince" != "no" ; then
3621	    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
3622	    if test "${TARGETCPU}" = "X86"; then
3623		CC="${CEBINROOT}/cl.exe"
3624	    else
3625		CC="${CEBINROOT}/cl${ARCH}.exe"
3626	    fi
3627	    CC="\"${CC}\" -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
3628	    RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
3629	    arch=`echo ${ARCH} | awk '{print tolower($0)}'`
3630	    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _DLL _WINDOWS"
3631	    for i in $defs ; do
3632		cat >>confdefs.h <<_ACEOF
3633#define $i 1
3634_ACEOF
3635
3636	    done
3637#	    if test "${ARCH}" = "X86EM"; then
3638#		AC_DEFINE_UNQUOTED(_WIN32_WCE_EMULATION)
3639#	    fi
3640	    cat >>confdefs.h <<_ACEOF
3641#define _WIN32_WCE $CEVERSION
3642_ACEOF
3643
3644	    cat >>confdefs.h <<_ACEOF
3645#define UNDER_CE $CEVERSION
3646_ACEOF
3647
3648	    CFLAGS_DEBUG="-nologo -Zi -Od"
3649	    CFLAGS_OPTIMIZE="-nologo -O2"
3650	    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
3651	    lflags="-nodefaultlib -MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
3652	    LINKBIN="\"${CEBINROOT}/link.exe\""
3653
3654	    if test "${CEVERSION}" -lt 400 ; then
3655		LIBS="coredll.lib corelibc.lib winsock.lib"
3656	    else
3657		LIBS="coredll.lib corelibc.lib ws2.lib"
3658	    fi
3659	    # celib currently stuck at wce300 status
3660	    #LIBS="$LIBS \${CELIB_DIR}/wince-${ARCH}-pocket-${OSVERSION}-release/celib.lib"
3661	    LIBS="$LIBS \"\${CELIB_DIR}/wince-${ARCH}-pocket-wce300-release/celib.lib\""
3662	    LIBS_GUI="commctrl.lib commdlg.lib"
3663	else
3664	    LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib comctl32.lib shell32.lib uuid.lib"
3665	fi
3666
3667	SHLIB_LD="${LINKBIN} -dll -incremental:no ${lflags}"
3668	# link -lib only works when -lib is the first arg
3669	STLIB_LD="${LINKBIN} -lib ${lflags}"
3670	RC_OUT=-fo
3671	RC_TYPE=-r
3672	RC_INCLUDE=-i
3673	RC_DEFINE=-d
3674	RES=res
3675	MAKE_LIB="\${STLIB_LD} -out:\$@"
3676	POST_MAKE_LIB=
3677	MAKE_EXE="\${CC} -Fe\$@"
3678	LIBPREFIX=""
3679
3680	CFLAGS_DEBUG="${CFLAGS_DEBUG} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE"
3681	CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE"
3682
3683	EXTRA_CFLAGS=""
3684	CFLAGS_WARNING="-W3"
3685	LDFLAGS_DEBUG="-debug:full"
3686	LDFLAGS_OPTIMIZE="-release"
3687
3688	# Specify the CC output file names based on the target name
3689	CC_OBJNAME="-Fo\$@"
3690	CC_EXENAME="-Fe\"\$(shell \$(CYGPATH) '\$@')\""
3691
3692	# Specify linker flags depending on the type of app being
3693	# built -- Console vs. Window.
3694	if test "$doWince" != "no" -a "${TARGETCPU}" != "X86"; then
3695	    LDFLAGS_CONSOLE="-link ${lflags}"
3696	    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
3697	else
3698	    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
3699	    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
3700	fi
3701    fi
3702
3703    if test "$do64bit" != "no" ; then
3704	cat >>confdefs.h <<\_ACEOF
3705#define TCL_CFG_DO64BIT 1
3706_ACEOF
3707
3708    fi
3709
3710    # DL_LIBS is empty, but then we match the Unix version
3711
3712
3713
3714
3715
3716
3717#--------------------------------------------------------------------
3718# man2tcl needs this so that it can use errno.h
3719#--------------------------------------------------------------------
3720
3721if test "${ac_cv_header_errno_h+set}" = set; then
3722  echo "$as_me:$LINENO: checking for errno.h" >&5
3723echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
3724if test "${ac_cv_header_errno_h+set}" = set; then
3725  echo $ECHO_N "(cached) $ECHO_C" >&6
3726fi
3727echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
3728echo "${ECHO_T}$ac_cv_header_errno_h" >&6
3729else
3730  # Is the header compilable?
3731echo "$as_me:$LINENO: checking errno.h usability" >&5
3732echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6
3733cat >conftest.$ac_ext <<_ACEOF
3734/* confdefs.h.  */
3735_ACEOF
3736cat confdefs.h >>conftest.$ac_ext
3737cat >>conftest.$ac_ext <<_ACEOF
3738/* end confdefs.h.  */
3739$ac_includes_default
3740#include <errno.h>
3741_ACEOF
3742rm -f conftest.$ac_objext
3743if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3744  (eval $ac_compile) 2>conftest.er1
3745  ac_status=$?
3746  grep -v '^ *+' conftest.er1 >conftest.err
3747  rm -f conftest.er1
3748  cat conftest.err >&5
3749  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3750  (exit $ac_status); } &&
3751	 { ac_try='test -z "$ac_c_werror_flag"
3752			 || test ! -s conftest.err'
3753  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3754  (eval $ac_try) 2>&5
3755  ac_status=$?
3756  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3757  (exit $ac_status); }; } &&
3758	 { ac_try='test -s conftest.$ac_objext'
3759  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3760  (eval $ac_try) 2>&5
3761  ac_status=$?
3762  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3763  (exit $ac_status); }; }; then
3764  ac_header_compiler=yes
3765else
3766  echo "$as_me: failed program was:" >&5
3767sed 's/^/| /' conftest.$ac_ext >&5
3768
3769ac_header_compiler=no
3770fi
3771rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3772echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3773echo "${ECHO_T}$ac_header_compiler" >&6
3774
3775# Is the header present?
3776echo "$as_me:$LINENO: checking errno.h presence" >&5
3777echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6
3778cat >conftest.$ac_ext <<_ACEOF
3779/* confdefs.h.  */
3780_ACEOF
3781cat confdefs.h >>conftest.$ac_ext
3782cat >>conftest.$ac_ext <<_ACEOF
3783/* end confdefs.h.  */
3784#include <errno.h>
3785_ACEOF
3786if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3787  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3788  ac_status=$?
3789  grep -v '^ *+' conftest.er1 >conftest.err
3790  rm -f conftest.er1
3791  cat conftest.err >&5
3792  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3793  (exit $ac_status); } >/dev/null; then
3794  if test -s conftest.err; then
3795    ac_cpp_err=$ac_c_preproc_warn_flag
3796    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3797  else
3798    ac_cpp_err=
3799  fi
3800else
3801  ac_cpp_err=yes
3802fi
3803if test -z "$ac_cpp_err"; then
3804  ac_header_preproc=yes
3805else
3806  echo "$as_me: failed program was:" >&5
3807sed 's/^/| /' conftest.$ac_ext >&5
3808
3809  ac_header_preproc=no
3810fi
3811rm -f conftest.err conftest.$ac_ext
3812echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3813echo "${ECHO_T}$ac_header_preproc" >&6
3814
3815# So?  What about this header?
3816case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3817  yes:no: )
3818    { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
3819echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3820    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
3821echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
3822    ac_header_preproc=yes
3823    ;;
3824  no:yes:* )
3825    { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
3826echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
3827    { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
3828echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
3829    { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
3830echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
3831    { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
3832echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
3833    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
3834echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
3835    { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
3836echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
3837    (
3838      cat <<\_ASBOX
3839## ------------------------------------------ ##
3840## Report this to the AC_PACKAGE_NAME lists.  ##
3841## ------------------------------------------ ##
3842_ASBOX
3843    ) |
3844      sed "s/^/$as_me: WARNING:     /" >&2
3845    ;;
3846esac
3847echo "$as_me:$LINENO: checking for errno.h" >&5
3848echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
3849if test "${ac_cv_header_errno_h+set}" = set; then
3850  echo $ECHO_N "(cached) $ECHO_C" >&6
3851else
3852  ac_cv_header_errno_h=$ac_header_preproc
3853fi
3854echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
3855echo "${ECHO_T}$ac_cv_header_errno_h" >&6
3856
3857fi
3858if test $ac_cv_header_errno_h = yes; then
3859  :
3860else
3861  MAN2TCLFLAGS="-DNO_ERRNO_H"
3862fi
3863
3864
3865
3866
3867#--------------------------------------------------------------------
3868# Windows XP theme engine header for Ttk
3869#--------------------------------------------------------------------
3870
3871echo "$as_me:$LINENO: checking for uxtheme.h" >&5
3872echo $ECHO_N "checking for uxtheme.h... $ECHO_C" >&6
3873if test "${ac_cv_header_uxtheme_h+set}" = set; then
3874  echo $ECHO_N "(cached) $ECHO_C" >&6
3875else
3876  cat >conftest.$ac_ext <<_ACEOF
3877/* confdefs.h.  */
3878_ACEOF
3879cat confdefs.h >>conftest.$ac_ext
3880cat >>conftest.$ac_ext <<_ACEOF
3881/* end confdefs.h.  */
3882#include <windows.h>
3883
3884#include <uxtheme.h>
3885_ACEOF
3886rm -f conftest.$ac_objext
3887if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3888  (eval $ac_compile) 2>conftest.er1
3889  ac_status=$?
3890  grep -v '^ *+' conftest.er1 >conftest.err
3891  rm -f conftest.er1
3892  cat conftest.err >&5
3893  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3894  (exit $ac_status); } &&
3895	 { ac_try='test -z "$ac_c_werror_flag"
3896			 || test ! -s conftest.err'
3897  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3898  (eval $ac_try) 2>&5
3899  ac_status=$?
3900  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3901  (exit $ac_status); }; } &&
3902	 { ac_try='test -s conftest.$ac_objext'
3903  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3904  (eval $ac_try) 2>&5
3905  ac_status=$?
3906  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3907  (exit $ac_status); }; }; then
3908  ac_cv_header_uxtheme_h=yes
3909else
3910  echo "$as_me: failed program was:" >&5
3911sed 's/^/| /' conftest.$ac_ext >&5
3912
3913ac_cv_header_uxtheme_h=no
3914fi
3915rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3916fi
3917echo "$as_me:$LINENO: result: $ac_cv_header_uxtheme_h" >&5
3918echo "${ECHO_T}$ac_cv_header_uxtheme_h" >&6
3919if test $ac_cv_header_uxtheme_h = yes; then
3920  cat >>confdefs.h <<\_ACEOF
3921#define HAVE_UXTHEME_H 1
3922_ACEOF
3923
3924else
3925  { echo "$as_me:$LINENO: xpnative theme will be unavailable" >&5
3926echo "$as_me: xpnative theme will be unavailable" >&6;}
3927fi
3928
3929
3930
3931#--------------------------------------------------------------------
3932# Set the default compiler switches based on the --enable-symbols
3933# option.  This macro depends on C flags, and should be called
3934# after SC_CONFIG_CFLAGS macro is called.
3935#--------------------------------------------------------------------
3936
3937
3938    echo "$as_me:$LINENO: checking for build with symbols" >&5
3939echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6
3940    # Check whether --enable-symbols or --disable-symbols was given.
3941if test "${enable_symbols+set}" = set; then
3942  enableval="$enable_symbols"
3943  tcl_ok=$enableval
3944else
3945  tcl_ok=no
3946fi;
3947# FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
3948    if test "$tcl_ok" = "no"; then
3949	CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
3950	LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
3951	DBGX=""
3952	echo "$as_me:$LINENO: result: no" >&5
3953echo "${ECHO_T}no" >&6
3954
3955	cat >>confdefs.h <<\_ACEOF
3956#define TCL_CFG_OPTIMIZED 1
3957_ACEOF
3958
3959    else
3960	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
3961	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
3962	DBGX=g
3963	if test "$tcl_ok" = "yes"; then
3964	    echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
3965echo "${ECHO_T}yes (standard debugging)" >&6
3966	fi
3967    fi
3968
3969
3970    cat >>confdefs.h <<\_ACEOF
3971#define TCL_CFG_DEBUG 1
3972_ACEOF
3973
3974
3975    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
3976	cat >>confdefs.h <<\_ACEOF
3977#define TCL_MEM_DEBUG 1
3978_ACEOF
3979
3980    fi
3981
3982    if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
3983	cat >>confdefs.h <<\_ACEOF
3984#define TCL_COMPILE_DEBUG 1
3985_ACEOF
3986
3987	cat >>confdefs.h <<\_ACEOF
3988#define TCL_COMPILE_STATS 1
3989_ACEOF
3990
3991    fi
3992
3993    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
3994	if test "$tcl_ok" = "all"; then
3995	    echo "$as_me:$LINENO: result: enabled symbols mem compile debugging" >&5
3996echo "${ECHO_T}enabled symbols mem compile debugging" >&6
3997	else
3998	    echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
3999echo "${ECHO_T}enabled $tcl_ok debugging" >&6
4000	fi
4001    fi
4002
4003
4004TK_DBGX=${DBGX}
4005
4006#--------------------------------------------------------------------
4007# Embed the manifest if we can determine how
4008#--------------------------------------------------------------------
4009
4010
4011    echo "$as_me:$LINENO: checking whether to embed manifest" >&5
4012echo $ECHO_N "checking whether to embed manifest... $ECHO_C" >&6
4013    # Check whether --enable-embedded-manifest or --disable-embedded-manifest was given.
4014if test "${enable_embedded_manifest+set}" = set; then
4015  enableval="$enable_embedded_manifest"
4016  embed_ok=$enableval
4017else
4018  embed_ok=yes
4019fi;
4020
4021    VC_MANIFEST_EMBED_DLL=
4022    VC_MANIFEST_EMBED_EXE=
4023    result=no
4024    if test "$embed_ok" = "yes" -a "${SHARED_BUILD}" = "1" \
4025       -a "$GCC" != "yes" ; then
4026	# Add the magic to embed the manifest into the dll/exe
4027	cat >conftest.$ac_ext <<_ACEOF
4028/* confdefs.h.  */
4029_ACEOF
4030cat confdefs.h >>conftest.$ac_ext
4031cat >>conftest.$ac_ext <<_ACEOF
4032/* end confdefs.h.  */
4033
4034#if defined(_MSC_VER) && _MSC_VER >= 1400
4035print("manifest needed")
4036#endif
4037
4038_ACEOF
4039if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4040  $EGREP "manifest needed" >/dev/null 2>&1; then
4041
4042	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
4043	# Could add 'if test -f' check, but manifest should be created
4044	# in this compiler case
4045	# Add in a manifest argument that may be specified
4046	# XXX Needs improvement so that the test for existence accounts
4047	# XXX for a provided (known) manifest
4048	VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest wish.exe.manifest -outputresource:\$@\;2 ; fi"
4049	VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest wish.exe.manifest -outputresource:\$@\;1 ; fi"
4050	result=yes
4051	if test "xwish.exe.manifest" != x ; then
4052	    result="yes (wish.exe.manifest)"
4053	fi
4054
4055fi
4056rm -f conftest*
4057
4058    fi
4059    echo "$as_me:$LINENO: result: $result" >&5
4060echo "${ECHO_T}$result" >&6
4061
4062
4063
4064
4065#--------------------------------------------------------------------
4066# Locate and source the tclConfig.sh file.
4067#--------------------------------------------------------------------
4068
4069
4070    echo "$as_me:$LINENO: checking the location of tclConfig.sh" >&5
4071echo $ECHO_N "checking the location of tclConfig.sh... $ECHO_C" >&6
4072
4073    if test -d ../../tcl8.5$TK_PATCH_LEVEL/win;  then
4074	TCL_BIN_DIR_DEFAULT=../../tcl8.5$TK_PATCH_LEVEL/win
4075    elif test -d ../../tcl8.5/win;  then
4076	TCL_BIN_DIR_DEFAULT=../../tcl8.5/win
4077    else
4078	TCL_BIN_DIR_DEFAULT=../../tcl/win
4079    fi
4080
4081
4082# Check whether --with-tcl or --without-tcl was given.
4083if test "${with_tcl+set}" = set; then
4084  withval="$with_tcl"
4085  TCL_BIN_DIR=$withval
4086else
4087  TCL_BIN_DIR=`cd $TCL_BIN_DIR_DEFAULT; pwd`
4088fi;
4089    if test ! -d $TCL_BIN_DIR; then
4090	{ { echo "$as_me:$LINENO: error: Tcl directory $TCL_BIN_DIR does not exist" >&5
4091echo "$as_me: error: Tcl directory $TCL_BIN_DIR does not exist" >&2;}
4092   { (exit 1); exit 1; }; }
4093    fi
4094    if test ! -f $TCL_BIN_DIR/tclConfig.sh; then
4095	{ { echo "$as_me:$LINENO: 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?" >&5
4096echo "$as_me: 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?" >&2;}
4097   { (exit 1); exit 1; }; }
4098    fi
4099    echo "$as_me:$LINENO: result: $TCL_BIN_DIR/tclConfig.sh" >&5
4100echo "${ECHO_T}$TCL_BIN_DIR/tclConfig.sh" >&6
4101
4102
4103    echo "$as_me:$LINENO: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
4104echo $ECHO_N "checking for existence of $TCL_BIN_DIR/tclConfig.sh... $ECHO_C" >&6
4105
4106    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
4107        echo "$as_me:$LINENO: result: loading" >&5
4108echo "${ECHO_T}loading" >&6
4109	. $TCL_BIN_DIR/tclConfig.sh
4110    else
4111        echo "$as_me:$LINENO: result: file not found" >&5
4112echo "${ECHO_T}file not found" >&6
4113    fi
4114
4115    #
4116    # If the TCL_BIN_DIR is the build directory (not the install directory),
4117    # then set the common variable name to the value of the build variables.
4118    # For example, the variable TCL_LIB_SPEC will be set to the value
4119    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
4120    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
4121    # installed and uninstalled version of Tcl.
4122    #
4123
4124    if test -f $TCL_BIN_DIR/Makefile ; then
4125        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
4126        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
4127        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
4128    fi
4129
4130    #
4131    # eval is required to do the TCL_DBGX substitution
4132    #
4133
4134    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
4135    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
4136    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
4137
4138    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
4139    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
4140    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158    echo "$as_me:$LINENO: checking for tclsh in Tcl build directory" >&5
4159echo $ECHO_N "checking for tclsh in Tcl build directory... $ECHO_C" >&6
4160    BUILD_TCLSH=${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}
4161    echo "$as_me:$LINENO: result: $BUILD_TCLSH" >&5
4162echo "${ECHO_T}$BUILD_TCLSH" >&6
4163
4164
4165
4166    echo "$as_me:$LINENO: checking for tclsh" >&5
4167echo $ECHO_N "checking for tclsh... $ECHO_C" >&6
4168
4169    if test "${ac_cv_path_tclsh+set}" = set; then
4170  echo $ECHO_N "(cached) $ECHO_C" >&6
4171else
4172
4173	search_path=`echo ${PATH} | sed -e 's/:/ /g'`
4174	for dir in $search_path ; do
4175	    for j in `ls -r $dir/tclsh[8-9]*.exe 2> /dev/null` \
4176		    `ls -r $dir/tclsh* 2> /dev/null` ; do
4177		if test x"$ac_cv_path_tclsh" = x ; then
4178		    if test -f "$j" ; then
4179			ac_cv_path_tclsh=$j
4180			break
4181		    fi
4182		fi
4183	    done
4184	done
4185
4186fi
4187
4188
4189    if test -f "$ac_cv_path_tclsh" ; then
4190	TCLSH_PROG="$ac_cv_path_tclsh"
4191	echo "$as_me:$LINENO: result: $TCLSH_PROG" >&5
4192echo "${ECHO_T}$TCLSH_PROG" >&6
4193    else
4194	# It is not an error if an installed version of Tcl can't be located.
4195	TCLSH_PROG=""
4196	echo "$as_me:$LINENO: result: No tclsh found on PATH" >&5
4197echo "${ECHO_T}No tclsh found on PATH" >&6
4198    fi
4199
4200
4201
4202#------------------------------------------------------------------------
4203# tkConfig.sh refers to this by a different name
4204#------------------------------------------------------------------------
4205
4206TK_SHARED_BUILD=${SHARED_BUILD}
4207
4208#--------------------------------------------------------------------
4209# Perform final evaluations of variables with possible substitutions.
4210#--------------------------------------------------------------------
4211
4212TK_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}"
4213TK_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
4214TK_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
4215
4216eval "TK_SRC_DIR=\"`cd $srcdir/..; pwd`\""
4217
4218eval "TK_DLL_FILE=tk$VER${DLLSUFFIX}"
4219eval "TK_LIB_FILE=${LIBPREFIX}tk$VER${LIBSUFFIX}"
4220
4221eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}"
4222# FIXME: All of this var junk needs to be done in tcl.m4 !!!!
4223# I left out the other vars that also need to get defined here.
4224# we also need to double check about spaces in path names
4225eval "TK_LIB_FLAG=\"-ltk${VER}${LIBFLAGSUFFIX}\""
4226TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}"
4227TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}"
4228
4229eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${LIBFLAGSUFFIX}\""
4230TK_BUILD_STUB_LIB_SPEC="-L`pwd` ${TK_STUB_LIB_FLAG}"
4231
4232TK_STUB_LIB_SPEC="-L${libdir} ${TK_STUB_LIB_FLAG}"
4233TK_STUB_LIB_PATH="${libdir}/${TK_STUB_LIB_FILE}"
4234TK_BUILD_STUB_LIB_PATH="`pwd`/${TK_STUB_LIB_FILE}"
4235
4236eval "DLLSUFFIX=${DLLSUFFIX}"
4237eval "LIBPREFIX=${LIBPREFIX}"
4238eval "LIBSUFFIX=${LIBSUFFIX}"
4239eval "EXESUFFIX=${EXESUFFIX}"
4240
4241CFG_TK_SHARED_LIB_SUFFIX=${TK_SHARED_LIB_SUFFIX}
4242CFG_TK_UNSHARED_LIB_SUFFIX=${TK_UNSHARED_LIB_SUFFIX}
4243CFG_TK_EXPORT_FILE_SUFFIX=${TK_EXPORT_FILE_SUFFIX}
4244
4245#--------------------------------------------------------------------
4246# Adjust the defines for how the resources are built depending
4247# on symbols and static vs. shared.
4248#--------------------------------------------------------------------
4249
4250if test "$SHARED_BUILD" = 0 -o "$TCL_NEEDS_EXP_FILE" = 0; then
4251    if test "${DBGX}" = "d"; then
4252        RC_DEFINES="${RC_DEFINE} STATIC_BUILD ${RC_DEFINE} DEBUG"
4253    else
4254        RC_DEFINES="${RC_DEFINE} STATIC_BUILD"
4255    fi
4256    TK_RES=""
4257else
4258    if test "${DBGX}" = "d"; then
4259        RC_DEFINES="${RC_DEFINE} DEBUG"
4260    else
4261        RC_DEFINES=""
4262    fi
4263    TK_RES='tk.$(RES)'
4264fi
4265
4266# The wish.exe.manifest requires these
4267# TK_WIN_VERSION is the 4 dotted pair Windows version format which needs
4268# the release level, and must account for interim release versioning
4269case "$TK_PATCH_LEVEL" in
4270     *a*) TK_RELEASE_LEVEL=0 ;;
4271     *b*) TK_RELEASE_LEVEL=1 ;;
4272     *)   TK_RELEASE_LEVEL=2 ;;
4273esac
4274TK_WIN_VERSION="$TK_VERSION.$TK_RELEASE_LEVEL.`echo $TK_PATCH_LEVEL | tr -d ab.`"
4275
4276# X86|AMD64|IA64 for manifest
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349# undefined at this point for win
4350
4351
4352
4353                              ac_config_files="$ac_config_files Makefile tkConfig.sh wish.exe.manifest"
4354cat >confcache <<\_ACEOF
4355# This file is a shell script that caches the results of configure
4356# tests run on this system so they can be shared between configure
4357# scripts and configure runs, see configure's option --config-cache.
4358# It is not useful on other systems.  If it contains results you don't
4359# want to keep, you may remove or edit it.
4360#
4361# config.status only pays attention to the cache file if you give it
4362# the --recheck option to rerun configure.
4363#
4364# `ac_cv_env_foo' variables (set or unset) will be overridden when
4365# loading this file, other *unset* `ac_cv_foo' will be assigned the
4366# following values.
4367
4368_ACEOF
4369
4370# The following way of writing the cache mishandles newlines in values,
4371# but we know of no workaround that is simple, portable, and efficient.
4372# So, don't put newlines in cache variables' values.
4373# Ultrix sh set writes to stderr and can't be redirected directly,
4374# and sets the high bit in the cache file unless we assign to the vars.
4375{
4376  (set) 2>&1 |
4377    case `(ac_space=' '; set | grep ac_space) 2>&1` in
4378    *ac_space=\ *)
4379      # `set' does not quote correctly, so add quotes (double-quote
4380      # substitution turns \\\\ into \\, and sed turns \\ into \).
4381      sed -n \
4382	"s/'/'\\\\''/g;
4383	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
4384      ;;
4385    *)
4386      # `set' quotes correctly as required by POSIX, so do not add quotes.
4387      sed -n \
4388	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
4389      ;;
4390    esac;
4391} |
4392  sed '
4393     t clear
4394     : clear
4395     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
4396     t end
4397     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
4398     : end' >>confcache
4399if diff $cache_file confcache >/dev/null 2>&1; then :; else
4400  if test -w $cache_file; then
4401    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
4402    cat confcache >$cache_file
4403  else
4404    echo "not updating unwritable cache $cache_file"
4405  fi
4406fi
4407rm -f confcache
4408
4409test "x$prefix" = xNONE && prefix=$ac_default_prefix
4410# Let make expand exec_prefix.
4411test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4412
4413# VPATH may cause trouble with some makes, so we remove $(srcdir),
4414# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
4415# trailing colons and then remove the whole line if VPATH becomes empty
4416# (actually we leave an empty line to preserve line numbers).
4417if test "x$srcdir" = x.; then
4418  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
4419s/:*\$(srcdir):*/:/;
4420s/:*\${srcdir}:*/:/;
4421s/:*@srcdir@:*/:/;
4422s/^\([^=]*=[	 ]*\):*/\1/;
4423s/:*$//;
4424s/^[^=]*=[	 ]*$//;
4425}'
4426fi
4427
4428# Transform confdefs.h into DEFS.
4429# Protect against shell expansion while executing Makefile rules.
4430# Protect against Makefile macro expansion.
4431#
4432# If the first sed substitution is executed (which looks for macros that
4433# take arguments), then we branch to the quote section.  Otherwise,
4434# look for a macro that doesn't take arguments.
4435cat >confdef2opt.sed <<\_ACEOF
4436t clear
4437: clear
4438s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\),-D\1=\2,g
4439t quote
4440s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\),-D\1=\2,g
4441t quote
4442d
4443: quote
4444s,[	 `~#$^&*(){}\\|;'"<>?],\\&,g
4445s,\[,\\&,g
4446s,\],\\&,g
4447s,\$,$$,g
4448p
4449_ACEOF
4450# We use echo to avoid assuming a particular line-breaking character.
4451# The extra dot is to prevent the shell from consuming trailing
4452# line-breaks from the sub-command output.  A line-break within
4453# single-quotes doesn't work because, if this script is created in a
4454# platform that uses two characters for line-breaks (e.g., DOS), tr
4455# would break.
4456ac_LF_and_DOT=`echo; echo .`
4457DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
4458rm -f confdef2opt.sed
4459
4460
4461ac_libobjs=
4462ac_ltlibobjs=
4463for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
4464  # 1. Remove the extension, and $U if already installed.
4465  ac_i=`echo "$ac_i" |
4466	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
4467  # 2. Add them.
4468  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
4469  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
4470done
4471LIBOBJS=$ac_libobjs
4472
4473LTLIBOBJS=$ac_ltlibobjs
4474
4475
4476
4477: ${CONFIG_STATUS=./config.status}
4478ac_clean_files_save=$ac_clean_files
4479ac_clean_files="$ac_clean_files $CONFIG_STATUS"
4480{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
4481echo "$as_me: creating $CONFIG_STATUS" >&6;}
4482cat >$CONFIG_STATUS <<_ACEOF
4483#! $SHELL
4484# Generated by $as_me.
4485# Run this file to recreate the current configuration.
4486# Compiler output produced by configure, useful for debugging
4487# configure, is in config.log if it exists.
4488
4489debug=false
4490ac_cs_recheck=false
4491ac_cs_silent=false
4492SHELL=\${CONFIG_SHELL-$SHELL}
4493_ACEOF
4494
4495cat >>$CONFIG_STATUS <<\_ACEOF
4496## --------------------- ##
4497## M4sh Initialization.  ##
4498## --------------------- ##
4499
4500# Be Bourne compatible
4501if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
4502  emulate sh
4503  NULLCMD=:
4504  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
4505  # is contrary to our usage.  Disable this feature.
4506  alias -g '${1+"$@"}'='"$@"'
4507elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
4508  set -o posix
4509fi
4510DUALCASE=1; export DUALCASE # for MKS sh
4511
4512# Support unset when possible.
4513if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
4514  as_unset=unset
4515else
4516  as_unset=false
4517fi
4518
4519
4520# Work around bugs in pre-3.0 UWIN ksh.
4521$as_unset ENV MAIL MAILPATH
4522PS1='$ '
4523PS2='> '
4524PS4='+ '
4525
4526# NLS nuisances.
4527for as_var in \
4528  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
4529  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
4530  LC_TELEPHONE LC_TIME
4531do
4532  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
4533    eval $as_var=C; export $as_var
4534  else
4535    $as_unset $as_var
4536  fi
4537done
4538
4539# Required to use basename.
4540if expr a : '\(a\)' >/dev/null 2>&1; then
4541  as_expr=expr
4542else
4543  as_expr=false
4544fi
4545
4546if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
4547  as_basename=basename
4548else
4549  as_basename=false
4550fi
4551
4552
4553# Name of the executable.
4554as_me=`$as_basename "$0" ||
4555$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
4556	 X"$0" : 'X\(//\)$' \| \
4557	 X"$0" : 'X\(/\)$' \| \
4558	 .     : '\(.\)' 2>/dev/null ||
4559echo X/"$0" |
4560    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
4561  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
4562  	  /^X\/\(\/\).*/{ s//\1/; q; }
4563  	  s/.*/./; q'`
4564
4565
4566# PATH needs CR, and LINENO needs CR and PATH.
4567# Avoid depending upon Character Ranges.
4568as_cr_letters='abcdefghijklmnopqrstuvwxyz'
4569as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
4570as_cr_Letters=$as_cr_letters$as_cr_LETTERS
4571as_cr_digits='0123456789'
4572as_cr_alnum=$as_cr_Letters$as_cr_digits
4573
4574# The user is always right.
4575if test "${PATH_SEPARATOR+set}" != set; then
4576  echo "#! /bin/sh" >conf$$.sh
4577  echo  "exit 0"   >>conf$$.sh
4578  chmod +x conf$$.sh
4579  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
4580    PATH_SEPARATOR=';'
4581  else
4582    PATH_SEPARATOR=:
4583  fi
4584  rm -f conf$$.sh
4585fi
4586
4587
4588  as_lineno_1=$LINENO
4589  as_lineno_2=$LINENO
4590  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
4591  test "x$as_lineno_1" != "x$as_lineno_2" &&
4592  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
4593  # Find who we are.  Look in the path if we contain no path at all
4594  # relative or not.
4595  case $0 in
4596    *[\\/]* ) as_myself=$0 ;;
4597    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4598for as_dir in $PATH
4599do
4600  IFS=$as_save_IFS
4601  test -z "$as_dir" && as_dir=.
4602  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
4603done
4604
4605       ;;
4606  esac
4607  # We did not find ourselves, most probably we were run as `sh COMMAND'
4608  # in which case we are not to be found in the path.
4609  if test "x$as_myself" = x; then
4610    as_myself=$0
4611  fi
4612  if test ! -f "$as_myself"; then
4613    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
4614echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
4615   { (exit 1); exit 1; }; }
4616  fi
4617  case $CONFIG_SHELL in
4618  '')
4619    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4620for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
4621do
4622  IFS=$as_save_IFS
4623  test -z "$as_dir" && as_dir=.
4624  for as_base in sh bash ksh sh5; do
4625	 case $as_dir in
4626	 /*)
4627	   if ("$as_dir/$as_base" -c '
4628  as_lineno_1=$LINENO
4629  as_lineno_2=$LINENO
4630  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
4631  test "x$as_lineno_1" != "x$as_lineno_2" &&
4632  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
4633	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
4634	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
4635	     CONFIG_SHELL=$as_dir/$as_base
4636	     export CONFIG_SHELL
4637	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
4638	   fi;;
4639	 esac
4640       done
4641done
4642;;
4643  esac
4644
4645  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
4646  # uniformly replaced by the line number.  The first 'sed' inserts a
4647  # line-number line before each line; the second 'sed' does the real
4648  # work.  The second script uses 'N' to pair each line-number line
4649  # with the numbered line, and appends trailing '-' during
4650  # substitution so that $LINENO is not a special case at line end.
4651  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
4652  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
4653  sed '=' <$as_myself |
4654    sed '
4655      N
4656      s,$,-,
4657      : loop
4658      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
4659      t loop
4660      s,-$,,
4661      s,^['$as_cr_digits']*\n,,
4662    ' >$as_me.lineno &&
4663  chmod +x $as_me.lineno ||
4664    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
4665echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
4666   { (exit 1); exit 1; }; }
4667
4668  # Don't try to exec as it changes $[0], causing all sort of problems
4669  # (the dirname of $[0] is not the place where we might find the
4670  # original and so on.  Autoconf is especially sensible to this).
4671  . ./$as_me.lineno
4672  # Exit status is that of the last command.
4673  exit
4674}
4675
4676
4677case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
4678  *c*,-n*) ECHO_N= ECHO_C='
4679' ECHO_T='	' ;;
4680  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
4681  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
4682esac
4683
4684if expr a : '\(a\)' >/dev/null 2>&1; then
4685  as_expr=expr
4686else
4687  as_expr=false
4688fi
4689
4690rm -f conf$$ conf$$.exe conf$$.file
4691echo >conf$$.file
4692if ln -s conf$$.file conf$$ 2>/dev/null; then
4693  # We could just check for DJGPP; but this test a) works b) is more generic
4694  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
4695  if test -f conf$$.exe; then
4696    # Don't use ln at all; we don't have any links
4697    as_ln_s='cp -p'
4698  else
4699    as_ln_s='ln -s'
4700  fi
4701elif ln conf$$.file conf$$ 2>/dev/null; then
4702  as_ln_s=ln
4703else
4704  as_ln_s='cp -p'
4705fi
4706rm -f conf$$ conf$$.exe conf$$.file
4707
4708if mkdir -p . 2>/dev/null; then
4709  as_mkdir_p=:
4710else
4711  test -d ./-p && rmdir ./-p
4712  as_mkdir_p=false
4713fi
4714
4715as_executable_p="test -f"
4716
4717# Sed expression to map a string onto a valid CPP name.
4718as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
4719
4720# Sed expression to map a string onto a valid variable name.
4721as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
4722
4723
4724# IFS
4725# We need space, tab and new line, in precisely that order.
4726as_nl='
4727'
4728IFS=" 	$as_nl"
4729
4730# CDPATH.
4731$as_unset CDPATH
4732
4733exec 6>&1
4734
4735# Open the log real soon, to keep \$[0] and so on meaningful, and to
4736# report actual input values of CONFIG_FILES etc. instead of their
4737# values after options handling.  Logging --version etc. is OK.
4738exec 5>>config.log
4739{
4740  echo
4741  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
4742## Running $as_me. ##
4743_ASBOX
4744} >&5
4745cat >&5 <<_CSEOF
4746
4747This file was extended by $as_me, which was
4748generated by GNU Autoconf 2.59.  Invocation command line was
4749
4750  CONFIG_FILES    = $CONFIG_FILES
4751  CONFIG_HEADERS  = $CONFIG_HEADERS
4752  CONFIG_LINKS    = $CONFIG_LINKS
4753  CONFIG_COMMANDS = $CONFIG_COMMANDS
4754  $ $0 $@
4755
4756_CSEOF
4757echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
4758echo >&5
4759_ACEOF
4760
4761# Files that config.status was made for.
4762if test -n "$ac_config_files"; then
4763  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
4764fi
4765
4766if test -n "$ac_config_headers"; then
4767  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
4768fi
4769
4770if test -n "$ac_config_links"; then
4771  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
4772fi
4773
4774if test -n "$ac_config_commands"; then
4775  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
4776fi
4777
4778cat >>$CONFIG_STATUS <<\_ACEOF
4779
4780ac_cs_usage="\
4781\`$as_me' instantiates files from templates according to the
4782current configuration.
4783
4784Usage: $0 [OPTIONS] [FILE]...
4785
4786  -h, --help       print this help, then exit
4787  -V, --version    print version number, then exit
4788  -q, --quiet      do not print progress messages
4789  -d, --debug      don't remove temporary files
4790      --recheck    update $as_me by reconfiguring in the same conditions
4791  --file=FILE[:TEMPLATE]
4792		   instantiate the configuration file FILE
4793
4794Configuration files:
4795$config_files
4796
4797Report bugs to <bug-autoconf@gnu.org>."
4798_ACEOF
4799
4800cat >>$CONFIG_STATUS <<_ACEOF
4801ac_cs_version="\\
4802config.status
4803configured by $0, generated by GNU Autoconf 2.59,
4804  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
4805
4806Copyright (C) 2003 Free Software Foundation, Inc.
4807This config.status script is free software; the Free Software Foundation
4808gives unlimited permission to copy, distribute and modify it."
4809srcdir=$srcdir
4810_ACEOF
4811
4812cat >>$CONFIG_STATUS <<\_ACEOF
4813# If no file are specified by the user, then we need to provide default
4814# value.  By we need to know if files were specified by the user.
4815ac_need_defaults=:
4816while test $# != 0
4817do
4818  case $1 in
4819  --*=*)
4820    ac_option=`expr "x$1" : 'x\([^=]*\)='`
4821    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
4822    ac_shift=:
4823    ;;
4824  -*)
4825    ac_option=$1
4826    ac_optarg=$2
4827    ac_shift=shift
4828    ;;
4829  *) # This is not an option, so the user has probably given explicit
4830     # arguments.
4831     ac_option=$1
4832     ac_need_defaults=false;;
4833  esac
4834
4835  case $ac_option in
4836  # Handling of the options.
4837_ACEOF
4838cat >>$CONFIG_STATUS <<\_ACEOF
4839  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4840    ac_cs_recheck=: ;;
4841  --version | --vers* | -V )
4842    echo "$ac_cs_version"; exit 0 ;;
4843  --he | --h)
4844    # Conflict between --help and --header
4845    { { echo "$as_me:$LINENO: error: ambiguous option: $1
4846Try \`$0 --help' for more information." >&5
4847echo "$as_me: error: ambiguous option: $1
4848Try \`$0 --help' for more information." >&2;}
4849   { (exit 1); exit 1; }; };;
4850  --help | --hel | -h )
4851    echo "$ac_cs_usage"; exit 0 ;;
4852  --debug | --d* | -d )
4853    debug=: ;;
4854  --file | --fil | --fi | --f )
4855    $ac_shift
4856    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
4857    ac_need_defaults=false;;
4858  --header | --heade | --head | --hea )
4859    $ac_shift
4860    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
4861    ac_need_defaults=false;;
4862  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
4863  | -silent | --silent | --silen | --sile | --sil | --si | --s)
4864    ac_cs_silent=: ;;
4865
4866  # This is an error.
4867  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
4868Try \`$0 --help' for more information." >&5
4869echo "$as_me: error: unrecognized option: $1
4870Try \`$0 --help' for more information." >&2;}
4871   { (exit 1); exit 1; }; } ;;
4872
4873  *) ac_config_targets="$ac_config_targets $1" ;;
4874
4875  esac
4876  shift
4877done
4878
4879ac_configure_extra_args=
4880
4881if $ac_cs_silent; then
4882  exec 6>/dev/null
4883  ac_configure_extra_args="$ac_configure_extra_args --silent"
4884fi
4885
4886_ACEOF
4887cat >>$CONFIG_STATUS <<_ACEOF
4888if \$ac_cs_recheck; then
4889  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
4890  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
4891fi
4892
4893_ACEOF
4894
4895
4896
4897
4898
4899cat >>$CONFIG_STATUS <<\_ACEOF
4900for ac_config_target in $ac_config_targets
4901do
4902  case "$ac_config_target" in
4903  # Handling of arguments.
4904  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
4905  "tkConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tkConfig.sh" ;;
4906  "wish.exe.manifest" ) CONFIG_FILES="$CONFIG_FILES wish.exe.manifest" ;;
4907  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
4908echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
4909   { (exit 1); exit 1; }; };;
4910  esac
4911done
4912
4913# If the user did not use the arguments to specify the items to instantiate,
4914# then the envvar interface is used.  Set only those that are not.
4915# We use the long form for the default assignment because of an extremely
4916# bizarre bug on SunOS 4.1.3.
4917if $ac_need_defaults; then
4918  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
4919fi
4920
4921# Have a temporary directory for convenience.  Make it in the build tree
4922# simply because there is no reason to put it here, and in addition,
4923# creating and moving files from /tmp can sometimes cause problems.
4924# Create a temporary directory, and hook for its removal unless debugging.
4925$debug ||
4926{
4927  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
4928  trap '{ (exit 1); exit 1; }' 1 2 13 15
4929}
4930
4931# Create a (secure) tmp directory for tmp files.
4932
4933{
4934  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
4935  test -n "$tmp" && test -d "$tmp"
4936}  ||
4937{
4938  tmp=./confstat$$-$RANDOM
4939  (umask 077 && mkdir $tmp)
4940} ||
4941{
4942   echo "$me: cannot create a temporary directory in ." >&2
4943   { (exit 1); exit 1; }
4944}
4945
4946_ACEOF
4947
4948cat >>$CONFIG_STATUS <<_ACEOF
4949
4950#
4951# CONFIG_FILES section.
4952#
4953
4954# No need to generate the scripts if there are no CONFIG_FILES.
4955# This happens for instance when ./config.status config.h
4956if test -n "\$CONFIG_FILES"; then
4957  # Protect against being on the right side of a sed subst in config.status.
4958  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
4959   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
4960s,@SHELL@,$SHELL,;t t
4961s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
4962s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
4963s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
4964s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
4965s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
4966s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
4967s,@exec_prefix@,$exec_prefix,;t t
4968s,@prefix@,$prefix,;t t
4969s,@program_transform_name@,$program_transform_name,;t t
4970s,@bindir@,$bindir,;t t
4971s,@sbindir@,$sbindir,;t t
4972s,@libexecdir@,$libexecdir,;t t
4973s,@datadir@,$datadir,;t t
4974s,@sysconfdir@,$sysconfdir,;t t
4975s,@sharedstatedir@,$sharedstatedir,;t t
4976s,@localstatedir@,$localstatedir,;t t
4977s,@libdir@,$libdir,;t t
4978s,@includedir@,$includedir,;t t
4979s,@oldincludedir@,$oldincludedir,;t t
4980s,@infodir@,$infodir,;t t
4981s,@mandir@,$mandir,;t t
4982s,@build_alias@,$build_alias,;t t
4983s,@host_alias@,$host_alias,;t t
4984s,@target_alias@,$target_alias,;t t
4985s,@DEFS@,$DEFS,;t t
4986s,@ECHO_C@,$ECHO_C,;t t
4987s,@ECHO_N@,$ECHO_N,;t t
4988s,@ECHO_T@,$ECHO_T,;t t
4989s,@LIBS@,$LIBS,;t t
4990s,@CC@,$CC,;t t
4991s,@CFLAGS@,$CFLAGS,;t t
4992s,@LDFLAGS@,$LDFLAGS,;t t
4993s,@CPPFLAGS@,$CPPFLAGS,;t t
4994s,@ac_ct_CC@,$ac_ct_CC,;t t
4995s,@EXEEXT@,$EXEEXT,;t t
4996s,@OBJEXT@,$OBJEXT,;t t
4997s,@CPP@,$CPP,;t t
4998s,@EGREP@,$EGREP,;t t
4999s,@AR@,$AR,;t t
5000s,@RANLIB@,$RANLIB,;t t
5001s,@RC@,$RC,;t t
5002s,@SET_MAKE@,$SET_MAKE,;t t
5003s,@TCL_THREADS@,$TCL_THREADS,;t t
5004s,@CYGPATH@,$CYGPATH,;t t
5005s,@CELIB_DIR@,$CELIB_DIR,;t t
5006s,@DL_LIBS@,$DL_LIBS,;t t
5007s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t
5008s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t
5009s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t
5010s,@MAN2TCLFLAGS@,$MAN2TCLFLAGS,;t t
5011s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t
5012s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t
5013s,@VC_MANIFEST_EMBED_DLL@,$VC_MANIFEST_EMBED_DLL,;t t
5014s,@VC_MANIFEST_EMBED_EXE@,$VC_MANIFEST_EMBED_EXE,;t t
5015s,@TCL_VERSION@,$TCL_VERSION,;t t
5016s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
5017s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
5018s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
5019s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
5020s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
5021s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
5022s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
5023s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
5024s,@TCL_DEFS@,$TCL_DEFS,;t t
5025s,@BUILD_TCLSH@,$BUILD_TCLSH,;t t
5026s,@TCLSH_PROG@,$TCLSH_PROG,;t t
5027s,@TK_WIN_VERSION@,$TK_WIN_VERSION,;t t
5028s,@MACHINE@,$MACHINE,;t t
5029s,@TK_VERSION@,$TK_VERSION,;t t
5030s,@TK_MAJOR_VERSION@,$TK_MAJOR_VERSION,;t t
5031s,@TK_MINOR_VERSION@,$TK_MINOR_VERSION,;t t
5032s,@TK_PATCH_LEVEL@,$TK_PATCH_LEVEL,;t t
5033s,@TK_DBGX@,$TK_DBGX,;t t
5034s,@TK_LIB_FILE@,$TK_LIB_FILE,;t t
5035s,@TK_DLL_FILE@,$TK_DLL_FILE,;t t
5036s,@TK_STUB_LIB_FILE@,$TK_STUB_LIB_FILE,;t t
5037s,@TK_STUB_LIB_FLAG@,$TK_STUB_LIB_FLAG,;t t
5038s,@TK_BUILD_STUB_LIB_SPEC@,$TK_BUILD_STUB_LIB_SPEC,;t t
5039s,@TK_SRC_DIR@,$TK_SRC_DIR,;t t
5040s,@TK_BIN_DIR@,$TK_BIN_DIR,;t t
5041s,@TCL_MAJOR_VERSION@,$TCL_MAJOR_VERSION,;t t
5042s,@TCL_MINOR_VERSION@,$TCL_MINOR_VERSION,;t t
5043s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t
5044s,@TCL_DBGX@,$TCL_DBGX,;t t
5045s,@CFG_TK_SHARED_LIB_SUFFIX@,$CFG_TK_SHARED_LIB_SUFFIX,;t t
5046s,@CFG_TK_UNSHARED_LIB_SUFFIX@,$CFG_TK_UNSHARED_LIB_SUFFIX,;t t
5047s,@CFG_TK_EXPORT_FILE_SUFFIX@,$CFG_TK_EXPORT_FILE_SUFFIX,;t t
5048s,@TK_SHARED_BUILD@,$TK_SHARED_BUILD,;t t
5049s,@DEPARG@,$DEPARG,;t t
5050s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
5051s,@STLIB_LD@,$STLIB_LD,;t t
5052s,@SHLIB_LD@,$SHLIB_LD,;t t
5053s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t
5054s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t
5055s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t
5056s,@CC_OBJNAME@,$CC_OBJNAME,;t t
5057s,@CC_EXENAME@,$CC_EXENAME,;t t
5058s,@LDFLAGS_DEBUG@,$LDFLAGS_DEBUG,;t t
5059s,@LDFLAGS_OPTIMIZE@,$LDFLAGS_OPTIMIZE,;t t
5060s,@LDFLAGS_CONSOLE@,$LDFLAGS_CONSOLE,;t t
5061s,@LDFLAGS_WINDOW@,$LDFLAGS_WINDOW,;t t
5062s,@RC_OUT@,$RC_OUT,;t t
5063s,@RC_TYPE@,$RC_TYPE,;t t
5064s,@RC_INCLUDE@,$RC_INCLUDE,;t t
5065s,@RC_DEFINE@,$RC_DEFINE,;t t
5066s,@RC_DEFINES@,$RC_DEFINES,;t t
5067s,@TK_RES@,$TK_RES,;t t
5068s,@RES@,$RES,;t t
5069s,@LIBS_GUI@,$LIBS_GUI,;t t
5070s,@DLLSUFFIX@,$DLLSUFFIX,;t t
5071s,@LIBPREFIX@,$LIBPREFIX,;t t
5072s,@LIBSUFFIX@,$LIBSUFFIX,;t t
5073s,@EXESUFFIX@,$EXESUFFIX,;t t
5074s,@LIBRARIES@,$LIBRARIES,;t t
5075s,@MAKE_LIB@,$MAKE_LIB,;t t
5076s,@POST_MAKE_LIB@,$POST_MAKE_LIB,;t t
5077s,@MAKE_DLL@,$MAKE_DLL,;t t
5078s,@MAKE_EXE@,$MAKE_EXE,;t t
5079s,@TK_LIB_FLAG@,$TK_LIB_FLAG,;t t
5080s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t
5081s,@TK_BUILD_LIB_SPEC@,$TK_BUILD_LIB_SPEC,;t t
5082s,@TK_STUB_LIB_SPEC@,$TK_STUB_LIB_SPEC,;t t
5083s,@TK_STUB_LIB_PATH@,$TK_STUB_LIB_PATH,;t t
5084s,@TK_BUILD_STUB_LIB_PATH@,$TK_BUILD_STUB_LIB_PATH,;t t
5085s,@TK_CC_SEARCH_FLAGS@,$TK_CC_SEARCH_FLAGS,;t t
5086s,@TK_LD_SEARCH_FLAGS@,$TK_LD_SEARCH_FLAGS,;t t
5087s,@LIBOBJS@,$LIBOBJS,;t t
5088s,@LTLIBOBJS@,$LTLIBOBJS,;t t
5089CEOF
5090
5091_ACEOF
5092
5093  cat >>$CONFIG_STATUS <<\_ACEOF
5094  # Split the substitutions into bite-sized pieces for seds with
5095  # small command number limits, like on Digital OSF/1 and HP-UX.
5096  ac_max_sed_lines=48
5097  ac_sed_frag=1 # Number of current file.
5098  ac_beg=1 # First line for current file.
5099  ac_end=$ac_max_sed_lines # Line after last line for current file.
5100  ac_more_lines=:
5101  ac_sed_cmds=
5102  while $ac_more_lines; do
5103    if test $ac_beg -gt 1; then
5104      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
5105    else
5106      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
5107    fi
5108    if test ! -s $tmp/subs.frag; then
5109      ac_more_lines=false
5110    else
5111      # The purpose of the label and of the branching condition is to
5112      # speed up the sed processing (if there are no `@' at all, there
5113      # is no need to browse any of the substitutions).
5114      # These are the two extra sed commands mentioned above.
5115      (echo ':t
5116  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
5117      if test -z "$ac_sed_cmds"; then
5118	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
5119      else
5120	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
5121      fi
5122      ac_sed_frag=`expr $ac_sed_frag + 1`
5123      ac_beg=$ac_end
5124      ac_end=`expr $ac_end + $ac_max_sed_lines`
5125    fi
5126  done
5127  if test -z "$ac_sed_cmds"; then
5128    ac_sed_cmds=cat
5129  fi
5130fi # test -n "$CONFIG_FILES"
5131
5132_ACEOF
5133cat >>$CONFIG_STATUS <<\_ACEOF
5134for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
5135  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5136  case $ac_file in
5137  - | *:- | *:-:* ) # input from stdin
5138	cat >$tmp/stdin
5139	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
5140	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
5141  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
5142	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
5143  * )   ac_file_in=$ac_file.in ;;
5144  esac
5145
5146  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
5147  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
5148$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5149	 X"$ac_file" : 'X\(//\)[^/]' \| \
5150	 X"$ac_file" : 'X\(//\)$' \| \
5151	 X"$ac_file" : 'X\(/\)' \| \
5152	 .     : '\(.\)' 2>/dev/null ||
5153echo X"$ac_file" |
5154    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
5155  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
5156  	  /^X\(\/\/\)$/{ s//\1/; q; }
5157  	  /^X\(\/\).*/{ s//\1/; q; }
5158  	  s/.*/./; q'`
5159  { if $as_mkdir_p; then
5160    mkdir -p "$ac_dir"
5161  else
5162    as_dir="$ac_dir"
5163    as_dirs=
5164    while test ! -d "$as_dir"; do
5165      as_dirs="$as_dir $as_dirs"
5166      as_dir=`(dirname "$as_dir") 2>/dev/null ||
5167$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5168	 X"$as_dir" : 'X\(//\)[^/]' \| \
5169	 X"$as_dir" : 'X\(//\)$' \| \
5170	 X"$as_dir" : 'X\(/\)' \| \
5171	 .     : '\(.\)' 2>/dev/null ||
5172echo X"$as_dir" |
5173    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
5174  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
5175  	  /^X\(\/\/\)$/{ s//\1/; q; }
5176  	  /^X\(\/\).*/{ s//\1/; q; }
5177  	  s/.*/./; q'`
5178    done
5179    test ! -n "$as_dirs" || mkdir $as_dirs
5180  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
5181echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
5182   { (exit 1); exit 1; }; }; }
5183
5184  ac_builddir=.
5185
5186if test "$ac_dir" != .; then
5187  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
5188  # A "../" for each directory in $ac_dir_suffix.
5189  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
5190else
5191  ac_dir_suffix= ac_top_builddir=
5192fi
5193
5194case $srcdir in
5195  .)  # No --srcdir option.  We are building in place.
5196    ac_srcdir=.
5197    if test -z "$ac_top_builddir"; then
5198       ac_top_srcdir=.
5199    else
5200       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
5201    fi ;;
5202  [\\/]* | ?:[\\/]* )  # Absolute path.
5203    ac_srcdir=$srcdir$ac_dir_suffix;
5204    ac_top_srcdir=$srcdir ;;
5205  *) # Relative path.
5206    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
5207    ac_top_srcdir=$ac_top_builddir$srcdir ;;
5208esac
5209
5210# Do not use `cd foo && pwd` to compute absolute paths, because
5211# the directories may not exist.
5212case `pwd` in
5213.) ac_abs_builddir="$ac_dir";;
5214*)
5215  case "$ac_dir" in
5216  .) ac_abs_builddir=`pwd`;;
5217  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
5218  *) ac_abs_builddir=`pwd`/"$ac_dir";;
5219  esac;;
5220esac
5221case $ac_abs_builddir in
5222.) ac_abs_top_builddir=${ac_top_builddir}.;;
5223*)
5224  case ${ac_top_builddir}. in
5225  .) ac_abs_top_builddir=$ac_abs_builddir;;
5226  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
5227  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
5228  esac;;
5229esac
5230case $ac_abs_builddir in
5231.) ac_abs_srcdir=$ac_srcdir;;
5232*)
5233  case $ac_srcdir in
5234  .) ac_abs_srcdir=$ac_abs_builddir;;
5235  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
5236  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
5237  esac;;
5238esac
5239case $ac_abs_builddir in
5240.) ac_abs_top_srcdir=$ac_top_srcdir;;
5241*)
5242  case $ac_top_srcdir in
5243  .) ac_abs_top_srcdir=$ac_abs_builddir;;
5244  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
5245  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
5246  esac;;
5247esac
5248
5249
5250
5251  if test x"$ac_file" != x-; then
5252    { echo "$as_me:$LINENO: creating $ac_file" >&5
5253echo "$as_me: creating $ac_file" >&6;}
5254    rm -f "$ac_file"
5255  fi
5256  # Let's still pretend it is `configure' which instantiates (i.e., don't
5257  # use $as_me), people would be surprised to read:
5258  #    /* config.h.  Generated by config.status.  */
5259  if test x"$ac_file" = x-; then
5260    configure_input=
5261  else
5262    configure_input="$ac_file.  "
5263  fi
5264  configure_input=$configure_input"Generated from `echo $ac_file_in |
5265				     sed 's,.*/,,'` by configure."
5266
5267  # First look for the input files in the build tree, otherwise in the
5268  # src tree.
5269  ac_file_inputs=`IFS=:
5270    for f in $ac_file_in; do
5271      case $f in
5272      -) echo $tmp/stdin ;;
5273      [\\/$]*)
5274	 # Absolute (can't be DOS-style, as IFS=:)
5275	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
5276echo "$as_me: error: cannot find input file: $f" >&2;}
5277   { (exit 1); exit 1; }; }
5278	 echo "$f";;
5279      *) # Relative
5280	 if test -f "$f"; then
5281	   # Build tree
5282	   echo "$f"
5283	 elif test -f "$srcdir/$f"; then
5284	   # Source tree
5285	   echo "$srcdir/$f"
5286	 else
5287	   # /dev/null tree
5288	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
5289echo "$as_me: error: cannot find input file: $f" >&2;}
5290   { (exit 1); exit 1; }; }
5291	 fi;;
5292      esac
5293    done` || { (exit 1); exit 1; }
5294_ACEOF
5295cat >>$CONFIG_STATUS <<_ACEOF
5296  sed "$ac_vpsub
5297$extrasub
5298_ACEOF
5299cat >>$CONFIG_STATUS <<\_ACEOF
5300:t
5301/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
5302s,@configure_input@,$configure_input,;t t
5303s,@srcdir@,$ac_srcdir,;t t
5304s,@abs_srcdir@,$ac_abs_srcdir,;t t
5305s,@top_srcdir@,$ac_top_srcdir,;t t
5306s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
5307s,@builddir@,$ac_builddir,;t t
5308s,@abs_builddir@,$ac_abs_builddir,;t t
5309s,@top_builddir@,$ac_top_builddir,;t t
5310s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
5311" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
5312  rm -f $tmp/stdin
5313  if test x"$ac_file" != x-; then
5314    mv $tmp/out $ac_file
5315  else
5316    cat $tmp/out
5317    rm -f $tmp/out
5318  fi
5319
5320done
5321_ACEOF
5322
5323cat >>$CONFIG_STATUS <<\_ACEOF
5324
5325{ (exit 0); exit 0; }
5326_ACEOF
5327chmod +x $CONFIG_STATUS
5328ac_clean_files=$ac_clean_files_save
5329
5330
5331# configure is writing to config.log, and then calls config.status.
5332# config.status does its own redirection, appending to config.log.
5333# Unfortunately, on DOS this fails, as config.log is still kept open
5334# by configure, so config.status won't be able to write to it; its
5335# output is simply discarded.  So we exec the FD to /dev/null,
5336# effectively closing config.log, so it can be properly (re)opened and
5337# appended to by config.status.  When coming back to configure, we
5338# need to make the FD available again.
5339if test "$no_create" != yes; then
5340  ac_cs_success=:
5341  ac_config_status_args=
5342  test "$silent" = yes &&
5343    ac_config_status_args="$ac_config_status_args --quiet"
5344  exec 5>/dev/null
5345  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
5346  exec 5>>config.log
5347  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
5348  # would make configure fail if this is the last instruction.
5349  $ac_cs_success || { (exit 1); exit 1; }
5350fi
5351
5352