1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for tkimgxbm 1.4.12.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7#
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18  emulate sh
19  NULLCMD=:
20  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21  # is contrary to our usage.  Disable this feature.
22  alias -g '${1+"$@"}'='"$@"'
23  setopt NO_GLOB_SUBST
24else
25  case `(set -o) 2>/dev/null` in #(
26  *posix*) :
27    set -o posix ;; #(
28  *) :
29     ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45  as_echo='print -r --'
46  as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48  as_echo='printf %s\n'
49  as_echo_n='printf %s'
50else
51  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53    as_echo_n='/usr/ucb/echo -n'
54  else
55    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56    as_echo_n_body='eval
57      arg=$1;
58      case $arg in #(
59      *"$as_nl"*)
60	expr "X$arg" : "X\\(.*\\)$as_nl";
61	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62      esac;
63      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64    '
65    export as_echo_n_body
66    as_echo_n='sh -c $as_echo_n_body as_echo'
67  fi
68  export as_echo_body
69  as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74  PATH_SEPARATOR=:
75  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77      PATH_SEPARATOR=';'
78  }
79fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order.  Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" ""	$as_nl"
88
89# Find who we are.  Look in the path if we contain no directory separator.
90as_myself=
91case $0 in #((
92  *[\\/]* ) as_myself=$0 ;;
93  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96  IFS=$as_save_IFS
97  test -z "$as_dir" && as_dir=.
98    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99  done
100IFS=$as_save_IFS
101
102     ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107  as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111  exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there.  '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135# Use a proper internal environment variable to ensure we don't fall
136  # into an infinite loop, continuously re-executing ourselves.
137  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138    _as_can_reexec=no; export _as_can_reexec;
139    # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147  *v*x* | *x*v* ) as_opts=-vx ;;
148  *v* ) as_opts=-v ;;
149  *x* ) as_opts=-x ;;
150  * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157  fi
158  # We don't want this to propagate to other subprocesses.
159          { _as_can_reexec=; unset _as_can_reexec;}
160if test "x$CONFIG_SHELL" = x; then
161  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162  emulate sh
163  NULLCMD=:
164  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165  # is contrary to our usage.  Disable this feature.
166  alias -g '\${1+\"\$@\"}'='\"\$@\"'
167  setopt NO_GLOB_SUBST
168else
169  case \`(set -o) 2>/dev/null\` in #(
170  *posix*) :
171    set -o posix ;; #(
172  *) :
173     ;;
174esac
175fi
176"
177  as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191  exitcode=1; echo positional parameters were not saved.
192fi
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
195  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200  if (eval "$as_required") 2>/dev/null; then :
201  as_have_required=yes
202else
203  as_have_required=no
204fi
205  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211do
212  IFS=$as_save_IFS
213  test -z "$as_dir" && as_dir=.
214  as_found=:
215  case $as_dir in #(
216	 /*)
217	   for as_base in sh bash ksh sh5; do
218	     # Try only shells that exist, to save several forks.
219	     as_shell=$as_dir/$as_base
220	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222  CONFIG_SHELL=$as_shell as_have_required=yes
223		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  break 2
225fi
226fi
227	   done;;
228       esac
229  as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233  CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238      if test "x$CONFIG_SHELL" != x; then :
239  export CONFIG_SHELL
240             # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248  *v*x* | *x*v* ) as_opts=-vx ;;
249  *v* ) as_opts=-v ;;
250  *x* ) as_opts=-x ;;
251  * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
258fi
259
260    if test x$as_have_required = xno; then :
261  $as_echo "$0: This script requires a shell more modern than all"
262  $as_echo "$0: the shells that I found on your system."
263  if test x${ZSH_VERSION+set} = xset ; then
264    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266  else
267    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
271  fi
272  exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290  { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299  return $1
300} # as_fn_set_status
301
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307  set +e
308  as_fn_set_status $1
309  exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318  case $as_dir in #(
319  -*) as_dir=./$as_dir;;
320  esac
321  test -d "$as_dir" || eval $as_mkdir_p || {
322    as_dirs=
323    while :; do
324      case $as_dir in #(
325      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326      *) as_qdir=$as_dir;;
327      esac
328      as_dirs="'$as_qdir' $as_dirs"
329      as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331	 X"$as_dir" : 'X\(//\)[^/]' \| \
332	 X"$as_dir" : 'X\(//\)$' \| \
333	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336	    s//\1/
337	    q
338	  }
339	  /^X\(\/\/\)[^/].*/{
340	    s//\1/
341	    q
342	  }
343	  /^X\(\/\/\)$/{
344	    s//\1/
345	    q
346	  }
347	  /^X\(\/\).*/{
348	    s//\1/
349	    q
350	  }
351	  s/.*/./; q'`
352      test -d "$as_dir" && break
353    done
354    test -z "$as_dirs" || eval "mkdir $as_dirs"
355  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358} # as_fn_mkdir_p
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365  test -f "$1" && test -x "$1"
366} # as_fn_executable_p
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374  eval 'as_fn_append ()
375  {
376    eval $1+=\$2
377  }'
378else
379  as_fn_append ()
380  {
381    eval $1=\$$1\$2
382  }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391  eval 'as_fn_arith ()
392  {
393    as_val=$(( $* ))
394  }'
395else
396  as_fn_arith ()
397  {
398    as_val=`expr "$@" || test $? -eq 1`
399  }
400fi # as_fn_arith
401
402
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407# script with STATUS, using 1 if that was 0.
408as_fn_error ()
409{
410  as_status=$1; test $as_status -eq 0 && as_status=1
411  if test "$4"; then
412    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414  fi
415  $as_echo "$as_me: error: $2" >&2
416  as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420   test "X`expr 00001 : '.*\(...\)'`" = X001; then
421  as_expr=expr
422else
423  as_expr=false
424fi
425
426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427  as_basename=basename
428else
429  as_basename=false
430fi
431
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433  as_dirname=dirname
434else
435  as_dirname=false
436fi
437
438as_me=`$as_basename -- "$0" ||
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440	 X"$0" : 'X\(//\)$' \| \
441	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443    sed '/^.*\/\([^/][^/]*\)\/*$/{
444	    s//\1/
445	    q
446	  }
447	  /^X\/\(\/\/\)$/{
448	    s//\1/
449	    q
450	  }
451	  /^X\/\(\/\).*/{
452	    s//\1/
453	    q
454	  }
455	  s/.*/./; q'`
456
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465  as_lineno_1=$LINENO as_lineno_1a=$LINENO
466  as_lineno_2=$LINENO as_lineno_2a=$LINENO
467  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
470  sed -n '
471    p
472    /[$]LINENO/=
473  ' <$as_myself |
474    sed '
475      s/[$]LINENO.*/&-/
476      t lineno
477      b
478      :lineno
479      N
480      :loop
481      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482      t loop
483      s/-\n.*//
484    ' >$as_me.lineno &&
485  chmod +x "$as_me.lineno" ||
486    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489  # already done that, so ensure we don't try to do so again and fall
490  # in an infinite loop.  This has already happened in practice.
491  _as_can_reexec=no; export _as_can_reexec
492  # Don't try to exec as it changes $[0], causing all sort of problems
493  # (the dirname of $[0] is not the place where we might find the
494  # original and so on.  Autoconf is especially sensitive to this).
495  . "./$as_me.lineno"
496  # Exit status is that of the last command.
497  exit
498}
499
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503  case `echo 'xy\c'` in
504  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
505  xy)  ECHO_C='\c';;
506  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
507       ECHO_T='	';;
508  esac;;
509*)
510  ECHO_N='-n';;
511esac
512
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515  rm -f conf$$.dir/conf$$.file
516else
517  rm -f conf$$.dir
518  mkdir conf$$.dir 2>/dev/null
519fi
520if (echo >conf$$.file) 2>/dev/null; then
521  if ln -s conf$$.file conf$$ 2>/dev/null; then
522    as_ln_s='ln -s'
523    # ... but there are two gotchas:
524    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526    # In both cases, we have to default to `cp -pR'.
527    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528      as_ln_s='cp -pR'
529  elif ln conf$$.file conf$$ 2>/dev/null; then
530    as_ln_s=ln
531  else
532    as_ln_s='cp -pR'
533  fi
534else
535  as_ln_s='cp -pR'
536fi
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
539
540if mkdir -p . 2>/dev/null; then
541  as_mkdir_p='mkdir -p "$as_dir"'
542else
543  test -d ./-p && rmdir ./-p
544  as_mkdir_p=false
545fi
546
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
559
560# Name of the host.
561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565#
566# Initializations.
567#
568ac_default_prefix=/usr/local
569ac_clean_files=
570ac_config_libobj_dir=.
571LIBOBJS=
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
576
577# Identity of this package.
578PACKAGE_NAME='tkimgxbm'
579PACKAGE_TARNAME='tkimgxbm'
580PACKAGE_VERSION='1.4.12'
581PACKAGE_STRING='tkimgxbm 1.4.12'
582PACKAGE_BUGREPORT=''
583PACKAGE_URL=''
584
585# Factoring default headers for most tests.
586ac_includes_default="\
587#include <stdio.h>
588#ifdef HAVE_SYS_TYPES_H
589# include <sys/types.h>
590#endif
591#ifdef HAVE_SYS_STAT_H
592# include <sys/stat.h>
593#endif
594#ifdef STDC_HEADERS
595# include <stdlib.h>
596# include <stddef.h>
597#else
598# ifdef HAVE_STDLIB_H
599#  include <stdlib.h>
600# endif
601#endif
602#ifdef HAVE_STRING_H
603# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
604#  include <memory.h>
605# endif
606# include <string.h>
607#endif
608#ifdef HAVE_STRINGS_H
609# include <strings.h>
610#endif
611#ifdef HAVE_INTTYPES_H
612# include <inttypes.h>
613#endif
614#ifdef HAVE_STDINT_H
615# include <stdint.h>
616#endif
617#ifdef HAVE_UNISTD_H
618# include <unistd.h>
619#endif"
620
621ac_subst_vars='LTLIBOBJS
622WISH_PROG
623TCLSH_PROG
624VC_MANIFEST_EMBED_EXE
625VC_MANIFEST_EMBED_DLL
626RANLIB_STUB
627MAKE_STUB_LIB
628MAKE_STATIC_LIB
629MAKE_SHARED_LIB
630MAKE_LIB
631XMKMF
632LDFLAGS_DEFAULT
633CFLAGS_DEFAULT
634LD_LIBRARY_PATH_VAR
635SHLIB_CFLAGS
636SHLIB_LD_LIBS
637SHLIB_LD
638STLIB_LD
639LDFLAGS_OPTIMIZE
640LDFLAGS_DEBUG
641CFLAGS_WARNING
642CFLAGS_OPTIMIZE
643CFLAGS_DEBUG
644LIBOBJS
645RC
646AR
647STUBS_BUILD
648SHARED_BUILD
649TCL_THREADS
650TK_INCLUDES
651TCL_INCLUDES
652PKG_OBJECTS
653PKG_SOURCES
654tkimg_BUILD_PATH
655tkimg_SRC_PATH
656tkimg_STUB_LIB_PATH
657tkimg_STUB_LIB_SPEC
658tkimg_STUB_LIB_FILE
659tkimg_LIB_SPEC
660tkimg_LIB_FILE
661tkimg_SRC_DIR
662tkimg_BIN_DIR
663tkimg_VERSION
664EGREP
665GREP
666RANLIB
667SET_MAKE
668CPP
669TK_XINCLUDES
670TK_LIBS
671TK_STUB_LIB_SPEC
672TK_STUB_LIB_FLAG
673TK_STUB_LIB_FILE
674TK_LIB_SPEC
675TK_LIB_FLAG
676TK_LIB_FILE
677TK_SRC_DIR
678TK_BIN_DIR
679TK_VERSION
680TCL_SHLIB_LD_LIBS
681TCL_LD_FLAGS
682TCL_EXTRA_CFLAGS
683TCL_DEFS
684TCL_LIBS
685CLEANFILES
686OBJEXT
687ac_ct_CC
688CPPFLAGS
689LDFLAGS
690CFLAGS
691CC
692TCL_STUB_LIB_SPEC
693TCL_STUB_LIB_FLAG
694TCL_STUB_LIB_FILE
695TCL_LIB_SPEC
696TCL_LIB_FLAG
697TCL_LIB_FILE
698TCL_SRC_DIR
699TCL_BIN_DIR
700TCL_PATCH_LEVEL
701TCL_VERSION
702PACKAGE_TCLNAME
703PHIMGTYPE
704INSTALL_LIBRARY
705INSTALL_SCRIPT
706INSTALL_PROGRAM
707INSTALL_DATA
708INSTALL_DATA_DIR
709INSTALL
710PKG_CFLAGS
711PKG_LIBS
712PKG_INCLUDES
713PKG_HEADERS
714PKG_TCL_SOURCES
715PKG_STUB_OBJECTS
716PKG_STUB_SOURCES
717PKG_STUB_LIB_FILE
718PKG_LIB_FILE
719EXEEXT
720CYGPATH
721target_alias
722host_alias
723build_alias
724LIBS
725ECHO_T
726ECHO_N
727ECHO_C
728DEFS
729mandir
730localedir
731libdir
732psdir
733pdfdir
734dvidir
735htmldir
736infodir
737docdir
738oldincludedir
739includedir
740localstatedir
741sharedstatedir
742sysconfdir
743datadir
744datarootdir
745libexecdir
746sbindir
747bindir
748program_transform_name
749prefix
750exec_prefix
751PACKAGE_URL
752PACKAGE_BUGREPORT
753PACKAGE_STRING
754PACKAGE_VERSION
755PACKAGE_TARNAME
756PACKAGE_NAME
757PATH_SEPARATOR
758SHELL'
759ac_subst_files=''
760ac_user_opts='
761enable_option_checking
762with_tcl
763with_tk
764with_tkimg
765with_tclinclude
766with_tkinclude
767enable_threads
768enable_shared
769enable_stubs
770enable_64bit
771enable_64bit_vis
772enable_rpath
773enable_symbols
774with_x
775'
776      ac_precious_vars='build_alias
777host_alias
778target_alias
779CC
780CFLAGS
781LDFLAGS
782LIBS
783CPPFLAGS
784CPP
785XMKMF'
786
787
788# Initialize some variables set by options.
789ac_init_help=
790ac_init_version=false
791ac_unrecognized_opts=
792ac_unrecognized_sep=
793# The variables have the same names as the options, with
794# dashes changed to underlines.
795cache_file=/dev/null
796exec_prefix=NONE
797no_create=
798no_recursion=
799prefix=NONE
800program_prefix=NONE
801program_suffix=NONE
802program_transform_name=s,x,x,
803silent=
804site=
805srcdir=
806verbose=
807x_includes=NONE
808x_libraries=NONE
809
810# Installation directory options.
811# These are left unexpanded so users can "make install exec_prefix=/foo"
812# and all the variables that are supposed to be based on exec_prefix
813# by default will actually change.
814# Use braces instead of parens because sh, perl, etc. also accept them.
815# (The list follows the same order as the GNU Coding Standards.)
816bindir='${exec_prefix}/bin'
817sbindir='${exec_prefix}/sbin'
818libexecdir='${exec_prefix}/libexec'
819datarootdir='${prefix}/share'
820datadir='${datarootdir}'
821sysconfdir='${prefix}/etc'
822sharedstatedir='${prefix}/com'
823localstatedir='${prefix}/var'
824includedir='${prefix}/include'
825oldincludedir='/usr/include'
826docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
827infodir='${datarootdir}/info'
828htmldir='${docdir}'
829dvidir='${docdir}'
830pdfdir='${docdir}'
831psdir='${docdir}'
832libdir='${exec_prefix}/lib'
833localedir='${datarootdir}/locale'
834mandir='${datarootdir}/man'
835
836ac_prev=
837ac_dashdash=
838for ac_option
839do
840  # If the previous option needs an argument, assign it.
841  if test -n "$ac_prev"; then
842    eval $ac_prev=\$ac_option
843    ac_prev=
844    continue
845  fi
846
847  case $ac_option in
848  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
849  *=)   ac_optarg= ;;
850  *)    ac_optarg=yes ;;
851  esac
852
853  # Accept the important Cygnus configure options, so we can diagnose typos.
854
855  case $ac_dashdash$ac_option in
856  --)
857    ac_dashdash=yes ;;
858
859  -bindir | --bindir | --bindi | --bind | --bin | --bi)
860    ac_prev=bindir ;;
861  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
862    bindir=$ac_optarg ;;
863
864  -build | --build | --buil | --bui | --bu)
865    ac_prev=build_alias ;;
866  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
867    build_alias=$ac_optarg ;;
868
869  -cache-file | --cache-file | --cache-fil | --cache-fi \
870  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
871    ac_prev=cache_file ;;
872  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
873  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
874    cache_file=$ac_optarg ;;
875
876  --config-cache | -C)
877    cache_file=config.cache ;;
878
879  -datadir | --datadir | --datadi | --datad)
880    ac_prev=datadir ;;
881  -datadir=* | --datadir=* | --datadi=* | --datad=*)
882    datadir=$ac_optarg ;;
883
884  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
885  | --dataroo | --dataro | --datar)
886    ac_prev=datarootdir ;;
887  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
888  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
889    datarootdir=$ac_optarg ;;
890
891  -disable-* | --disable-*)
892    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
893    # Reject names that are not valid shell variable names.
894    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
895      as_fn_error $? "invalid feature name: $ac_useropt"
896    ac_useropt_orig=$ac_useropt
897    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
898    case $ac_user_opts in
899      *"
900"enable_$ac_useropt"
901"*) ;;
902      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
903	 ac_unrecognized_sep=', ';;
904    esac
905    eval enable_$ac_useropt=no ;;
906
907  -docdir | --docdir | --docdi | --doc | --do)
908    ac_prev=docdir ;;
909  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
910    docdir=$ac_optarg ;;
911
912  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
913    ac_prev=dvidir ;;
914  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
915    dvidir=$ac_optarg ;;
916
917  -enable-* | --enable-*)
918    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
919    # Reject names that are not valid shell variable names.
920    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
921      as_fn_error $? "invalid feature name: $ac_useropt"
922    ac_useropt_orig=$ac_useropt
923    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
924    case $ac_user_opts in
925      *"
926"enable_$ac_useropt"
927"*) ;;
928      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
929	 ac_unrecognized_sep=', ';;
930    esac
931    eval enable_$ac_useropt=\$ac_optarg ;;
932
933  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
934  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
935  | --exec | --exe | --ex)
936    ac_prev=exec_prefix ;;
937  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
938  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
939  | --exec=* | --exe=* | --ex=*)
940    exec_prefix=$ac_optarg ;;
941
942  -gas | --gas | --ga | --g)
943    # Obsolete; use --with-gas.
944    with_gas=yes ;;
945
946  -help | --help | --hel | --he | -h)
947    ac_init_help=long ;;
948  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
949    ac_init_help=recursive ;;
950  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
951    ac_init_help=short ;;
952
953  -host | --host | --hos | --ho)
954    ac_prev=host_alias ;;
955  -host=* | --host=* | --hos=* | --ho=*)
956    host_alias=$ac_optarg ;;
957
958  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
959    ac_prev=htmldir ;;
960  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
961  | --ht=*)
962    htmldir=$ac_optarg ;;
963
964  -includedir | --includedir | --includedi | --included | --include \
965  | --includ | --inclu | --incl | --inc)
966    ac_prev=includedir ;;
967  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
968  | --includ=* | --inclu=* | --incl=* | --inc=*)
969    includedir=$ac_optarg ;;
970
971  -infodir | --infodir | --infodi | --infod | --info | --inf)
972    ac_prev=infodir ;;
973  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
974    infodir=$ac_optarg ;;
975
976  -libdir | --libdir | --libdi | --libd)
977    ac_prev=libdir ;;
978  -libdir=* | --libdir=* | --libdi=* | --libd=*)
979    libdir=$ac_optarg ;;
980
981  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
982  | --libexe | --libex | --libe)
983    ac_prev=libexecdir ;;
984  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
985  | --libexe=* | --libex=* | --libe=*)
986    libexecdir=$ac_optarg ;;
987
988  -localedir | --localedir | --localedi | --localed | --locale)
989    ac_prev=localedir ;;
990  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
991    localedir=$ac_optarg ;;
992
993  -localstatedir | --localstatedir | --localstatedi | --localstated \
994  | --localstate | --localstat | --localsta | --localst | --locals)
995    ac_prev=localstatedir ;;
996  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
997  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
998    localstatedir=$ac_optarg ;;
999
1000  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1001    ac_prev=mandir ;;
1002  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1003    mandir=$ac_optarg ;;
1004
1005  -nfp | --nfp | --nf)
1006    # Obsolete; use --without-fp.
1007    with_fp=no ;;
1008
1009  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1010  | --no-cr | --no-c | -n)
1011    no_create=yes ;;
1012
1013  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1014  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1015    no_recursion=yes ;;
1016
1017  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1018  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1019  | --oldin | --oldi | --old | --ol | --o)
1020    ac_prev=oldincludedir ;;
1021  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1022  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1023  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1024    oldincludedir=$ac_optarg ;;
1025
1026  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1027    ac_prev=prefix ;;
1028  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1029    prefix=$ac_optarg ;;
1030
1031  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1032  | --program-pre | --program-pr | --program-p)
1033    ac_prev=program_prefix ;;
1034  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1035  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1036    program_prefix=$ac_optarg ;;
1037
1038  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1039  | --program-suf | --program-su | --program-s)
1040    ac_prev=program_suffix ;;
1041  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1042  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1043    program_suffix=$ac_optarg ;;
1044
1045  -program-transform-name | --program-transform-name \
1046  | --program-transform-nam | --program-transform-na \
1047  | --program-transform-n | --program-transform- \
1048  | --program-transform | --program-transfor \
1049  | --program-transfo | --program-transf \
1050  | --program-trans | --program-tran \
1051  | --progr-tra | --program-tr | --program-t)
1052    ac_prev=program_transform_name ;;
1053  -program-transform-name=* | --program-transform-name=* \
1054  | --program-transform-nam=* | --program-transform-na=* \
1055  | --program-transform-n=* | --program-transform-=* \
1056  | --program-transform=* | --program-transfor=* \
1057  | --program-transfo=* | --program-transf=* \
1058  | --program-trans=* | --program-tran=* \
1059  | --progr-tra=* | --program-tr=* | --program-t=*)
1060    program_transform_name=$ac_optarg ;;
1061
1062  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1063    ac_prev=pdfdir ;;
1064  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1065    pdfdir=$ac_optarg ;;
1066
1067  -psdir | --psdir | --psdi | --psd | --ps)
1068    ac_prev=psdir ;;
1069  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1070    psdir=$ac_optarg ;;
1071
1072  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1073  | -silent | --silent | --silen | --sile | --sil)
1074    silent=yes ;;
1075
1076  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1077    ac_prev=sbindir ;;
1078  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1079  | --sbi=* | --sb=*)
1080    sbindir=$ac_optarg ;;
1081
1082  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1083  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1084  | --sharedst | --shareds | --shared | --share | --shar \
1085  | --sha | --sh)
1086    ac_prev=sharedstatedir ;;
1087  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1088  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1089  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1090  | --sha=* | --sh=*)
1091    sharedstatedir=$ac_optarg ;;
1092
1093  -site | --site | --sit)
1094    ac_prev=site ;;
1095  -site=* | --site=* | --sit=*)
1096    site=$ac_optarg ;;
1097
1098  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1099    ac_prev=srcdir ;;
1100  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1101    srcdir=$ac_optarg ;;
1102
1103  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1104  | --syscon | --sysco | --sysc | --sys | --sy)
1105    ac_prev=sysconfdir ;;
1106  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1107  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1108    sysconfdir=$ac_optarg ;;
1109
1110  -target | --target | --targe | --targ | --tar | --ta | --t)
1111    ac_prev=target_alias ;;
1112  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1113    target_alias=$ac_optarg ;;
1114
1115  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1116    verbose=yes ;;
1117
1118  -version | --version | --versio | --versi | --vers | -V)
1119    ac_init_version=: ;;
1120
1121  -with-* | --with-*)
1122    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1123    # Reject names that are not valid shell variable names.
1124    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1125      as_fn_error $? "invalid package name: $ac_useropt"
1126    ac_useropt_orig=$ac_useropt
1127    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1128    case $ac_user_opts in
1129      *"
1130"with_$ac_useropt"
1131"*) ;;
1132      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1133	 ac_unrecognized_sep=', ';;
1134    esac
1135    eval with_$ac_useropt=\$ac_optarg ;;
1136
1137  -without-* | --without-*)
1138    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1139    # Reject names that are not valid shell variable names.
1140    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1141      as_fn_error $? "invalid package name: $ac_useropt"
1142    ac_useropt_orig=$ac_useropt
1143    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1144    case $ac_user_opts in
1145      *"
1146"with_$ac_useropt"
1147"*) ;;
1148      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1149	 ac_unrecognized_sep=', ';;
1150    esac
1151    eval with_$ac_useropt=no ;;
1152
1153  --x)
1154    # Obsolete; use --with-x.
1155    with_x=yes ;;
1156
1157  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1158  | --x-incl | --x-inc | --x-in | --x-i)
1159    ac_prev=x_includes ;;
1160  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1161  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1162    x_includes=$ac_optarg ;;
1163
1164  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1165  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1166    ac_prev=x_libraries ;;
1167  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1168  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1169    x_libraries=$ac_optarg ;;
1170
1171  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1172Try \`$0 --help' for more information"
1173    ;;
1174
1175  *=*)
1176    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1177    # Reject names that are not valid shell variable names.
1178    case $ac_envvar in #(
1179      '' | [0-9]* | *[!_$as_cr_alnum]* )
1180      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1181    esac
1182    eval $ac_envvar=\$ac_optarg
1183    export $ac_envvar ;;
1184
1185  *)
1186    # FIXME: should be removed in autoconf 3.0.
1187    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1188    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1189      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1190    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1191    ;;
1192
1193  esac
1194done
1195
1196if test -n "$ac_prev"; then
1197  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1198  as_fn_error $? "missing argument to $ac_option"
1199fi
1200
1201if test -n "$ac_unrecognized_opts"; then
1202  case $enable_option_checking in
1203    no) ;;
1204    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1205    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1206  esac
1207fi
1208
1209# Check all directory arguments for consistency.
1210for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1211		datadir sysconfdir sharedstatedir localstatedir includedir \
1212		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1213		libdir localedir mandir
1214do
1215  eval ac_val=\$$ac_var
1216  # Remove trailing slashes.
1217  case $ac_val in
1218    */ )
1219      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1220      eval $ac_var=\$ac_val;;
1221  esac
1222  # Be sure to have absolute directory names.
1223  case $ac_val in
1224    [\\/$]* | ?:[\\/]* )  continue;;
1225    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1226  esac
1227  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1228done
1229
1230# There might be people who depend on the old broken behavior: `$host'
1231# used to hold the argument of --host etc.
1232# FIXME: To remove some day.
1233build=$build_alias
1234host=$host_alias
1235target=$target_alias
1236
1237# FIXME: To remove some day.
1238if test "x$host_alias" != x; then
1239  if test "x$build_alias" = x; then
1240    cross_compiling=maybe
1241  elif test "x$build_alias" != "x$host_alias"; then
1242    cross_compiling=yes
1243  fi
1244fi
1245
1246ac_tool_prefix=
1247test -n "$host_alias" && ac_tool_prefix=$host_alias-
1248
1249test "$silent" = yes && exec 6>/dev/null
1250
1251
1252ac_pwd=`pwd` && test -n "$ac_pwd" &&
1253ac_ls_di=`ls -di .` &&
1254ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1255  as_fn_error $? "working directory cannot be determined"
1256test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1257  as_fn_error $? "pwd does not report name of working directory"
1258
1259
1260# Find the source files, if location was not specified.
1261if test -z "$srcdir"; then
1262  ac_srcdir_defaulted=yes
1263  # Try the directory containing this script, then the parent directory.
1264  ac_confdir=`$as_dirname -- "$as_myself" ||
1265$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1266	 X"$as_myself" : 'X\(//\)[^/]' \| \
1267	 X"$as_myself" : 'X\(//\)$' \| \
1268	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1269$as_echo X"$as_myself" |
1270    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1271	    s//\1/
1272	    q
1273	  }
1274	  /^X\(\/\/\)[^/].*/{
1275	    s//\1/
1276	    q
1277	  }
1278	  /^X\(\/\/\)$/{
1279	    s//\1/
1280	    q
1281	  }
1282	  /^X\(\/\).*/{
1283	    s//\1/
1284	    q
1285	  }
1286	  s/.*/./; q'`
1287  srcdir=$ac_confdir
1288  if test ! -r "$srcdir/$ac_unique_file"; then
1289    srcdir=..
1290  fi
1291else
1292  ac_srcdir_defaulted=no
1293fi
1294if test ! -r "$srcdir/$ac_unique_file"; then
1295  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1296  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1297fi
1298ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1299ac_abs_confdir=`(
1300	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1301	pwd)`
1302# When building in place, set srcdir=.
1303if test "$ac_abs_confdir" = "$ac_pwd"; then
1304  srcdir=.
1305fi
1306# Remove unnecessary trailing slashes from srcdir.
1307# Double slashes in file names in object file debugging info
1308# mess up M-x gdb in Emacs.
1309case $srcdir in
1310*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1311esac
1312for ac_var in $ac_precious_vars; do
1313  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1314  eval ac_env_${ac_var}_value=\$${ac_var}
1315  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1316  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1317done
1318
1319#
1320# Report the --help message.
1321#
1322if test "$ac_init_help" = "long"; then
1323  # Omit some internal or obsolete options to make the list less imposing.
1324  # This message is too long to be a string in the A/UX 3.1 sh.
1325  cat <<_ACEOF
1326\`configure' configures tkimgxbm 1.4.12 to adapt to many kinds of systems.
1327
1328Usage: $0 [OPTION]... [VAR=VALUE]...
1329
1330To assign environment variables (e.g., CC, CFLAGS...), specify them as
1331VAR=VALUE.  See below for descriptions of some of the useful variables.
1332
1333Defaults for the options are specified in brackets.
1334
1335Configuration:
1336  -h, --help              display this help and exit
1337      --help=short        display options specific to this package
1338      --help=recursive    display the short help of all the included packages
1339  -V, --version           display version information and exit
1340  -q, --quiet, --silent   do not print \`checking ...' messages
1341      --cache-file=FILE   cache test results in FILE [disabled]
1342  -C, --config-cache      alias for \`--cache-file=config.cache'
1343  -n, --no-create         do not create output files
1344      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1345
1346Installation directories:
1347  --prefix=PREFIX         install architecture-independent files in PREFIX
1348                          [$ac_default_prefix]
1349  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1350                          [PREFIX]
1351
1352By default, \`make install' will install all the files in
1353\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1354an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1355for instance \`--prefix=\$HOME'.
1356
1357For better control, use the options below.
1358
1359Fine tuning of the installation directories:
1360  --bindir=DIR            user executables [EPREFIX/bin]
1361  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1362  --libexecdir=DIR        program executables [EPREFIX/libexec]
1363  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1364  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1365  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1366  --libdir=DIR            object code libraries [EPREFIX/lib]
1367  --includedir=DIR        C header files [PREFIX/include]
1368  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1369  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1370  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1371  --infodir=DIR           info documentation [DATAROOTDIR/info]
1372  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1373  --mandir=DIR            man documentation [DATAROOTDIR/man]
1374  --docdir=DIR            documentation root [DATAROOTDIR/doc/tkimgxbm]
1375  --htmldir=DIR           html documentation [DOCDIR]
1376  --dvidir=DIR            dvi documentation [DOCDIR]
1377  --pdfdir=DIR            pdf documentation [DOCDIR]
1378  --psdir=DIR             ps documentation [DOCDIR]
1379_ACEOF
1380
1381  cat <<\_ACEOF
1382
1383X features:
1384  --x-includes=DIR    X include files are in DIR
1385  --x-libraries=DIR   X library files are in DIR
1386_ACEOF
1387fi
1388
1389if test -n "$ac_init_help"; then
1390  case $ac_init_help in
1391     short | recursive ) echo "Configuration of tkimgxbm 1.4.12:";;
1392   esac
1393  cat <<\_ACEOF
1394
1395Optional Features:
1396  --disable-option-checking  ignore unrecognized --enable/--with options
1397  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1398  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1399  --enable-threads        build with threads (default: on)
1400  --enable-shared         build and link with shared libraries (default: on)
1401  --enable-stubs          build and link with stub libraries. Always true for
1402                          shared builds (default: on)
1403  --enable-64bit          enable 64bit support (default: off)
1404  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1405  --disable-rpath         disable rpath support (default: on)
1406  --enable-symbols        build with debugging symbols (default: off)
1407
1408Optional Packages:
1409  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1410  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1411  --with-tcl              directory containing tcl configuration
1412                          (tclConfig.sh)
1413  --with-tk               directory containing tk configuration (tkConfig.sh)
1414  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)
1415  --with-tclinclude       directory containing the public Tcl header files
1416  --with-tkinclude        directory containing the public Tk header files
1417  --with-x                use the X Window System
1418
1419Some influential environment variables:
1420  CC          C compiler command
1421  CFLAGS      C compiler flags
1422  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1423              nonstandard directory <lib dir>
1424  LIBS        libraries to pass to the linker, e.g. -l<library>
1425  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1426              you have headers in a nonstandard directory <include dir>
1427  CPP         C preprocessor
1428  XMKMF       Path to xmkmf, Makefile generator for X Window System
1429
1430Use these variables to override the choices made by `configure' or to help
1431it to find libraries and programs with nonstandard names/locations.
1432
1433Report bugs to the package provider.
1434_ACEOF
1435ac_status=$?
1436fi
1437
1438if test "$ac_init_help" = "recursive"; then
1439  # If there are subdirs, report their specific --help.
1440  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1441    test -d "$ac_dir" ||
1442      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1443      continue
1444    ac_builddir=.
1445
1446case "$ac_dir" in
1447.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1448*)
1449  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1450  # A ".." for each directory in $ac_dir_suffix.
1451  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1452  case $ac_top_builddir_sub in
1453  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1454  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1455  esac ;;
1456esac
1457ac_abs_top_builddir=$ac_pwd
1458ac_abs_builddir=$ac_pwd$ac_dir_suffix
1459# for backward compatibility:
1460ac_top_builddir=$ac_top_build_prefix
1461
1462case $srcdir in
1463  .)  # We are building in place.
1464    ac_srcdir=.
1465    ac_top_srcdir=$ac_top_builddir_sub
1466    ac_abs_top_srcdir=$ac_pwd ;;
1467  [\\/]* | ?:[\\/]* )  # Absolute name.
1468    ac_srcdir=$srcdir$ac_dir_suffix;
1469    ac_top_srcdir=$srcdir
1470    ac_abs_top_srcdir=$srcdir ;;
1471  *) # Relative name.
1472    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1473    ac_top_srcdir=$ac_top_build_prefix$srcdir
1474    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1475esac
1476ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1477
1478    cd "$ac_dir" || { ac_status=$?; continue; }
1479    # Check for guested configure.
1480    if test -f "$ac_srcdir/configure.gnu"; then
1481      echo &&
1482      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1483    elif test -f "$ac_srcdir/configure"; then
1484      echo &&
1485      $SHELL "$ac_srcdir/configure" --help=recursive
1486    else
1487      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1488    fi || ac_status=$?
1489    cd "$ac_pwd" || { ac_status=$?; break; }
1490  done
1491fi
1492
1493test -n "$ac_init_help" && exit $ac_status
1494if $ac_init_version; then
1495  cat <<\_ACEOF
1496tkimgxbm configure 1.4.12
1497generated by GNU Autoconf 2.69
1498
1499Copyright (C) 2012 Free Software Foundation, Inc.
1500This configure script is free software; the Free Software Foundation
1501gives unlimited permission to copy, distribute and modify it.
1502_ACEOF
1503  exit
1504fi
1505
1506## ------------------------ ##
1507## Autoconf initialization. ##
1508## ------------------------ ##
1509
1510# ac_fn_c_try_compile LINENO
1511# --------------------------
1512# Try to compile conftest.$ac_ext, and return whether this succeeded.
1513ac_fn_c_try_compile ()
1514{
1515  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1516  rm -f conftest.$ac_objext
1517  if { { ac_try="$ac_compile"
1518case "(($ac_try" in
1519  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1520  *) ac_try_echo=$ac_try;;
1521esac
1522eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1523$as_echo "$ac_try_echo"; } >&5
1524  (eval "$ac_compile") 2>conftest.err
1525  ac_status=$?
1526  if test -s conftest.err; then
1527    grep -v '^ *+' conftest.err >conftest.er1
1528    cat conftest.er1 >&5
1529    mv -f conftest.er1 conftest.err
1530  fi
1531  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1532  test $ac_status = 0; } && {
1533	 test -z "$ac_c_werror_flag" ||
1534	 test ! -s conftest.err
1535       } && test -s conftest.$ac_objext; then :
1536  ac_retval=0
1537else
1538  $as_echo "$as_me: failed program was:" >&5
1539sed 's/^/| /' conftest.$ac_ext >&5
1540
1541	ac_retval=1
1542fi
1543  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1544  as_fn_set_status $ac_retval
1545
1546} # ac_fn_c_try_compile
1547
1548# ac_fn_c_try_cpp LINENO
1549# ----------------------
1550# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1551ac_fn_c_try_cpp ()
1552{
1553  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1554  if { { ac_try="$ac_cpp conftest.$ac_ext"
1555case "(($ac_try" in
1556  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1557  *) ac_try_echo=$ac_try;;
1558esac
1559eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1560$as_echo "$ac_try_echo"; } >&5
1561  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1562  ac_status=$?
1563  if test -s conftest.err; then
1564    grep -v '^ *+' conftest.err >conftest.er1
1565    cat conftest.er1 >&5
1566    mv -f conftest.er1 conftest.err
1567  fi
1568  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1569  test $ac_status = 0; } > conftest.i && {
1570	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1571	 test ! -s conftest.err
1572       }; then :
1573  ac_retval=0
1574else
1575  $as_echo "$as_me: failed program was:" >&5
1576sed 's/^/| /' conftest.$ac_ext >&5
1577
1578    ac_retval=1
1579fi
1580  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1581  as_fn_set_status $ac_retval
1582
1583} # ac_fn_c_try_cpp
1584
1585# ac_fn_c_try_run LINENO
1586# ----------------------
1587# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1588# that executables *can* be run.
1589ac_fn_c_try_run ()
1590{
1591  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1592  if { { ac_try="$ac_link"
1593case "(($ac_try" in
1594  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1595  *) ac_try_echo=$ac_try;;
1596esac
1597eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1598$as_echo "$ac_try_echo"; } >&5
1599  (eval "$ac_link") 2>&5
1600  ac_status=$?
1601  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1602  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1603  { { case "(($ac_try" in
1604  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1605  *) ac_try_echo=$ac_try;;
1606esac
1607eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1608$as_echo "$ac_try_echo"; } >&5
1609  (eval "$ac_try") 2>&5
1610  ac_status=$?
1611  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1612  test $ac_status = 0; }; }; then :
1613  ac_retval=0
1614else
1615  $as_echo "$as_me: program exited with status $ac_status" >&5
1616       $as_echo "$as_me: failed program was:" >&5
1617sed 's/^/| /' conftest.$ac_ext >&5
1618
1619       ac_retval=$ac_status
1620fi
1621  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1622  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1623  as_fn_set_status $ac_retval
1624
1625} # ac_fn_c_try_run
1626
1627# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1628# -------------------------------------------------------
1629# Tests whether HEADER exists and can be compiled using the include files in
1630# INCLUDES, setting the cache variable VAR accordingly.
1631ac_fn_c_check_header_compile ()
1632{
1633  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1634  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1635$as_echo_n "checking for $2... " >&6; }
1636if eval \${$3+:} false; then :
1637  $as_echo_n "(cached) " >&6
1638else
1639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1640/* end confdefs.h.  */
1641$4
1642#include <$2>
1643_ACEOF
1644if ac_fn_c_try_compile "$LINENO"; then :
1645  eval "$3=yes"
1646else
1647  eval "$3=no"
1648fi
1649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1650fi
1651eval ac_res=\$$3
1652	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1653$as_echo "$ac_res" >&6; }
1654  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1655
1656} # ac_fn_c_check_header_compile
1657
1658# ac_fn_c_try_link LINENO
1659# -----------------------
1660# Try to link conftest.$ac_ext, and return whether this succeeded.
1661ac_fn_c_try_link ()
1662{
1663  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1664  rm -f conftest.$ac_objext conftest$ac_exeext
1665  if { { ac_try="$ac_link"
1666case "(($ac_try" in
1667  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1668  *) ac_try_echo=$ac_try;;
1669esac
1670eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1671$as_echo "$ac_try_echo"; } >&5
1672  (eval "$ac_link") 2>conftest.err
1673  ac_status=$?
1674  if test -s conftest.err; then
1675    grep -v '^ *+' conftest.err >conftest.er1
1676    cat conftest.er1 >&5
1677    mv -f conftest.er1 conftest.err
1678  fi
1679  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1680  test $ac_status = 0; } && {
1681	 test -z "$ac_c_werror_flag" ||
1682	 test ! -s conftest.err
1683       } && test -s conftest$ac_exeext && {
1684	 test "$cross_compiling" = yes ||
1685	 test -x conftest$ac_exeext
1686       }; then :
1687  ac_retval=0
1688else
1689  $as_echo "$as_me: failed program was:" >&5
1690sed 's/^/| /' conftest.$ac_ext >&5
1691
1692	ac_retval=1
1693fi
1694  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1695  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1696  # interfere with the next link command; also delete a directory that is
1697  # left behind by Apple's compiler.  We do this before executing the actions.
1698  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1699  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1700  as_fn_set_status $ac_retval
1701
1702} # ac_fn_c_try_link
1703
1704# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1705# -------------------------------------------------------
1706# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1707# the include files in INCLUDES and setting the cache variable VAR
1708# accordingly.
1709ac_fn_c_check_header_mongrel ()
1710{
1711  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1712  if eval \${$3+:} false; then :
1713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1714$as_echo_n "checking for $2... " >&6; }
1715if eval \${$3+:} false; then :
1716  $as_echo_n "(cached) " >&6
1717fi
1718eval ac_res=\$$3
1719	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1720$as_echo "$ac_res" >&6; }
1721else
1722  # Is the header compilable?
1723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1724$as_echo_n "checking $2 usability... " >&6; }
1725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1726/* end confdefs.h.  */
1727$4
1728#include <$2>
1729_ACEOF
1730if ac_fn_c_try_compile "$LINENO"; then :
1731  ac_header_compiler=yes
1732else
1733  ac_header_compiler=no
1734fi
1735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1737$as_echo "$ac_header_compiler" >&6; }
1738
1739# Is the header present?
1740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1741$as_echo_n "checking $2 presence... " >&6; }
1742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1743/* end confdefs.h.  */
1744#include <$2>
1745_ACEOF
1746if ac_fn_c_try_cpp "$LINENO"; then :
1747  ac_header_preproc=yes
1748else
1749  ac_header_preproc=no
1750fi
1751rm -f conftest.err conftest.i conftest.$ac_ext
1752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1753$as_echo "$ac_header_preproc" >&6; }
1754
1755# So?  What about this header?
1756case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1757  yes:no: )
1758    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1759$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1760    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1761$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1762    ;;
1763  no:yes:* )
1764    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1765$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1766    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1767$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1768    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1769$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1770    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1771$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1772    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1773$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1774    ;;
1775esac
1776  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1777$as_echo_n "checking for $2... " >&6; }
1778if eval \${$3+:} false; then :
1779  $as_echo_n "(cached) " >&6
1780else
1781  eval "$3=\$ac_header_compiler"
1782fi
1783eval ac_res=\$$3
1784	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1785$as_echo "$ac_res" >&6; }
1786fi
1787  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1788
1789} # ac_fn_c_check_header_mongrel
1790
1791# ac_fn_c_check_func LINENO FUNC VAR
1792# ----------------------------------
1793# Tests whether FUNC exists, setting the cache variable VAR accordingly
1794ac_fn_c_check_func ()
1795{
1796  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1798$as_echo_n "checking for $2... " >&6; }
1799if eval \${$3+:} false; then :
1800  $as_echo_n "(cached) " >&6
1801else
1802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1803/* end confdefs.h.  */
1804/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1805   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1806#define $2 innocuous_$2
1807
1808/* System header to define __stub macros and hopefully few prototypes,
1809    which can conflict with char $2 (); below.
1810    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1811    <limits.h> exists even on freestanding compilers.  */
1812
1813#ifdef __STDC__
1814# include <limits.h>
1815#else
1816# include <assert.h>
1817#endif
1818
1819#undef $2
1820
1821/* Override any GCC internal prototype to avoid an error.
1822   Use char because int might match the return type of a GCC
1823   builtin and then its argument prototype would still apply.  */
1824#ifdef __cplusplus
1825extern "C"
1826#endif
1827char $2 ();
1828/* The GNU C library defines this for functions which it implements
1829    to always fail with ENOSYS.  Some functions are actually named
1830    something starting with __ and the normal name is an alias.  */
1831#if defined __stub_$2 || defined __stub___$2
1832choke me
1833#endif
1834
1835int
1836main ()
1837{
1838return $2 ();
1839  ;
1840  return 0;
1841}
1842_ACEOF
1843if ac_fn_c_try_link "$LINENO"; then :
1844  eval "$3=yes"
1845else
1846  eval "$3=no"
1847fi
1848rm -f core conftest.err conftest.$ac_objext \
1849    conftest$ac_exeext conftest.$ac_ext
1850fi
1851eval ac_res=\$$3
1852	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1853$as_echo "$ac_res" >&6; }
1854  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1855
1856} # ac_fn_c_check_func
1857cat >config.log <<_ACEOF
1858This file contains any messages produced by compilers while
1859running configure, to aid debugging if configure makes a mistake.
1860
1861It was created by tkimgxbm $as_me 1.4.12, which was
1862generated by GNU Autoconf 2.69.  Invocation command line was
1863
1864  $ $0 $@
1865
1866_ACEOF
1867exec 5>>config.log
1868{
1869cat <<_ASUNAME
1870## --------- ##
1871## Platform. ##
1872## --------- ##
1873
1874hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1875uname -m = `(uname -m) 2>/dev/null || echo unknown`
1876uname -r = `(uname -r) 2>/dev/null || echo unknown`
1877uname -s = `(uname -s) 2>/dev/null || echo unknown`
1878uname -v = `(uname -v) 2>/dev/null || echo unknown`
1879
1880/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1881/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1882
1883/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1884/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1885/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1886/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1887/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1888/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1889/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1890
1891_ASUNAME
1892
1893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1894for as_dir in $PATH
1895do
1896  IFS=$as_save_IFS
1897  test -z "$as_dir" && as_dir=.
1898    $as_echo "PATH: $as_dir"
1899  done
1900IFS=$as_save_IFS
1901
1902} >&5
1903
1904cat >&5 <<_ACEOF
1905
1906
1907## ----------- ##
1908## Core tests. ##
1909## ----------- ##
1910
1911_ACEOF
1912
1913
1914# Keep a trace of the command line.
1915# Strip out --no-create and --no-recursion so they do not pile up.
1916# Strip out --silent because we don't want to record it for future runs.
1917# Also quote any args containing shell meta-characters.
1918# Make two passes to allow for proper duplicate-argument suppression.
1919ac_configure_args=
1920ac_configure_args0=
1921ac_configure_args1=
1922ac_must_keep_next=false
1923for ac_pass in 1 2
1924do
1925  for ac_arg
1926  do
1927    case $ac_arg in
1928    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1929    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1930    | -silent | --silent | --silen | --sile | --sil)
1931      continue ;;
1932    *\'*)
1933      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1934    esac
1935    case $ac_pass in
1936    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1937    2)
1938      as_fn_append ac_configure_args1 " '$ac_arg'"
1939      if test $ac_must_keep_next = true; then
1940	ac_must_keep_next=false # Got value, back to normal.
1941      else
1942	case $ac_arg in
1943	  *=* | --config-cache | -C | -disable-* | --disable-* \
1944	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1945	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1946	  | -with-* | --with-* | -without-* | --without-* | --x)
1947	    case "$ac_configure_args0 " in
1948	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1949	    esac
1950	    ;;
1951	  -* ) ac_must_keep_next=true ;;
1952	esac
1953      fi
1954      as_fn_append ac_configure_args " '$ac_arg'"
1955      ;;
1956    esac
1957  done
1958done
1959{ ac_configure_args0=; unset ac_configure_args0;}
1960{ ac_configure_args1=; unset ac_configure_args1;}
1961
1962# When interrupted or exit'd, cleanup temporary files, and complete
1963# config.log.  We remove comments because anyway the quotes in there
1964# would cause problems or look ugly.
1965# WARNING: Use '\'' to represent an apostrophe within the trap.
1966# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1967trap 'exit_status=$?
1968  # Save into config.log some information that might help in debugging.
1969  {
1970    echo
1971
1972    $as_echo "## ---------------- ##
1973## Cache variables. ##
1974## ---------------- ##"
1975    echo
1976    # The following way of writing the cache mishandles newlines in values,
1977(
1978  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1979    eval ac_val=\$$ac_var
1980    case $ac_val in #(
1981    *${as_nl}*)
1982      case $ac_var in #(
1983      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
1984$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1985      esac
1986      case $ac_var in #(
1987      _ | IFS | as_nl) ;; #(
1988      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1989      *) { eval $ac_var=; unset $ac_var;} ;;
1990      esac ;;
1991    esac
1992  done
1993  (set) 2>&1 |
1994    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1995    *${as_nl}ac_space=\ *)
1996      sed -n \
1997	"s/'\''/'\''\\\\'\'''\''/g;
1998	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1999      ;; #(
2000    *)
2001      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2002      ;;
2003    esac |
2004    sort
2005)
2006    echo
2007
2008    $as_echo "## ----------------- ##
2009## Output variables. ##
2010## ----------------- ##"
2011    echo
2012    for ac_var in $ac_subst_vars
2013    do
2014      eval ac_val=\$$ac_var
2015      case $ac_val in
2016      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2017      esac
2018      $as_echo "$ac_var='\''$ac_val'\''"
2019    done | sort
2020    echo
2021
2022    if test -n "$ac_subst_files"; then
2023      $as_echo "## ------------------- ##
2024## File substitutions. ##
2025## ------------------- ##"
2026      echo
2027      for ac_var in $ac_subst_files
2028      do
2029	eval ac_val=\$$ac_var
2030	case $ac_val in
2031	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2032	esac
2033	$as_echo "$ac_var='\''$ac_val'\''"
2034      done | sort
2035      echo
2036    fi
2037
2038    if test -s confdefs.h; then
2039      $as_echo "## ----------- ##
2040## confdefs.h. ##
2041## ----------- ##"
2042      echo
2043      cat confdefs.h
2044      echo
2045    fi
2046    test "$ac_signal" != 0 &&
2047      $as_echo "$as_me: caught signal $ac_signal"
2048    $as_echo "$as_me: exit $exit_status"
2049  } >&5
2050  rm -f core *.core core.conftest.* &&
2051    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2052    exit $exit_status
2053' 0
2054for ac_signal in 1 2 13 15; do
2055  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2056done
2057ac_signal=0
2058
2059# confdefs.h avoids OS command line length limits that DEFS can exceed.
2060rm -f -r conftest* confdefs.h
2061
2062$as_echo "/* confdefs.h */" > confdefs.h
2063
2064# Predefined preprocessor variables.
2065
2066cat >>confdefs.h <<_ACEOF
2067#define PACKAGE_NAME "$PACKAGE_NAME"
2068_ACEOF
2069
2070cat >>confdefs.h <<_ACEOF
2071#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2072_ACEOF
2073
2074cat >>confdefs.h <<_ACEOF
2075#define PACKAGE_VERSION "$PACKAGE_VERSION"
2076_ACEOF
2077
2078cat >>confdefs.h <<_ACEOF
2079#define PACKAGE_STRING "$PACKAGE_STRING"
2080_ACEOF
2081
2082cat >>confdefs.h <<_ACEOF
2083#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2084_ACEOF
2085
2086cat >>confdefs.h <<_ACEOF
2087#define PACKAGE_URL "$PACKAGE_URL"
2088_ACEOF
2089
2090
2091# Let the site file select an alternate cache file if it wants to.
2092# Prefer an explicitly selected file to automatically selected ones.
2093ac_site_file1=NONE
2094ac_site_file2=NONE
2095if test -n "$CONFIG_SITE"; then
2096  # We do not want a PATH search for config.site.
2097  case $CONFIG_SITE in #((
2098    -*)  ac_site_file1=./$CONFIG_SITE;;
2099    */*) ac_site_file1=$CONFIG_SITE;;
2100    *)   ac_site_file1=./$CONFIG_SITE;;
2101  esac
2102elif test "x$prefix" != xNONE; then
2103  ac_site_file1=$prefix/share/config.site
2104  ac_site_file2=$prefix/etc/config.site
2105else
2106  ac_site_file1=$ac_default_prefix/share/config.site
2107  ac_site_file2=$ac_default_prefix/etc/config.site
2108fi
2109for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2110do
2111  test "x$ac_site_file" = xNONE && continue
2112  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2113    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2114$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2115    sed 's/^/| /' "$ac_site_file" >&5
2116    . "$ac_site_file" \
2117      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2119as_fn_error $? "failed to load site script $ac_site_file
2120See \`config.log' for more details" "$LINENO" 5; }
2121  fi
2122done
2123
2124if test -r "$cache_file"; then
2125  # Some versions of bash will fail to source /dev/null (special files
2126  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2127  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2128    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2129$as_echo "$as_me: loading cache $cache_file" >&6;}
2130    case $cache_file in
2131      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2132      *)                      . "./$cache_file";;
2133    esac
2134  fi
2135else
2136  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2137$as_echo "$as_me: creating cache $cache_file" >&6;}
2138  >$cache_file
2139fi
2140
2141# Check that the precious variables saved in the cache have kept the same
2142# value.
2143ac_cache_corrupted=false
2144for ac_var in $ac_precious_vars; do
2145  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2146  eval ac_new_set=\$ac_env_${ac_var}_set
2147  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2148  eval ac_new_val=\$ac_env_${ac_var}_value
2149  case $ac_old_set,$ac_new_set in
2150    set,)
2151      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2152$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2153      ac_cache_corrupted=: ;;
2154    ,set)
2155      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2156$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2157      ac_cache_corrupted=: ;;
2158    ,);;
2159    *)
2160      if test "x$ac_old_val" != "x$ac_new_val"; then
2161	# differences in whitespace do not lead to failure.
2162	ac_old_val_w=`echo x $ac_old_val`
2163	ac_new_val_w=`echo x $ac_new_val`
2164	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2165	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2166$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2167	  ac_cache_corrupted=:
2168	else
2169	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2170$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2171	  eval $ac_var=\$ac_old_val
2172	fi
2173	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2174$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2175	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2176$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2177      fi;;
2178  esac
2179  # Pass precious variables to config.status.
2180  if test "$ac_new_set" = set; then
2181    case $ac_new_val in
2182    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2183    *) ac_arg=$ac_var=$ac_new_val ;;
2184    esac
2185    case " $ac_configure_args " in
2186      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2187      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2188    esac
2189  fi
2190done
2191if $ac_cache_corrupted; then
2192  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2193$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2194  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2195$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2196  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2197fi
2198## -------------------- ##
2199## Main body of script. ##
2200## -------------------- ##
2201
2202ac_ext=c
2203ac_cpp='$CPP $CPPFLAGS'
2204ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2205ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2206ac_compiler_gnu=$ac_cv_c_compiler_gnu
2207
2208
2209
2210
2211    TEA_VERSION="3.13"
2212
2213    { $as_echo "$as_me:${as_lineno-$LINENO}: checking TEA configuration" >&5
2214$as_echo_n "checking TEA configuration... " >&6; }
2215    if test x"${PACKAGE_NAME}" = x ; then
2216	as_fn_error $? "
2217The PACKAGE_NAME variable must be defined by your TEA configure.ac" "$LINENO" 5
2218    fi
2219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5
2220$as_echo "ok (TEA ${TEA_VERSION})" >&6; }
2221
2222    # If the user did not set CFLAGS, set it now to keep macros
2223    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
2224    if test "${CFLAGS+set}" != "set" ; then
2225	CFLAGS=""
2226    fi
2227
2228    case "`uname -s`" in
2229	*win32*|*WIN32*|*MINGW32_*|*MINGW64_*|*MSYS_*)
2230	    # Extract the first word of "cygpath", so it can be a program name with args.
2231set dummy cygpath; ac_word=$2
2232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2233$as_echo_n "checking for $ac_word... " >&6; }
2234if ${ac_cv_prog_CYGPATH+:} false; then :
2235  $as_echo_n "(cached) " >&6
2236else
2237  if test -n "$CYGPATH"; then
2238  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
2239else
2240as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2241for as_dir in $PATH
2242do
2243  IFS=$as_save_IFS
2244  test -z "$as_dir" && as_dir=.
2245    for ac_exec_ext in '' $ac_executable_extensions; do
2246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2247    ac_cv_prog_CYGPATH="cygpath -m"
2248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2249    break 2
2250  fi
2251done
2252  done
2253IFS=$as_save_IFS
2254
2255  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
2256fi
2257fi
2258CYGPATH=$ac_cv_prog_CYGPATH
2259if test -n "$CYGPATH"; then
2260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
2261$as_echo "$CYGPATH" >&6; }
2262else
2263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2264$as_echo "no" >&6; }
2265fi
2266
2267
2268	    EXEEXT=".exe"
2269	    TEA_PLATFORM="windows"
2270	    ;;
2271	*CYGWIN_*)
2272	    EXEEXT=".exe"
2273	    # CYGPATH and TEA_PLATFORM are determined later in LOAD_TCLCONFIG
2274	    ;;
2275	*)
2276	    CYGPATH=echo
2277	    # Maybe we are cross-compiling....
2278	    case ${host_alias} in
2279		*mingw32*)
2280		EXEEXT=".exe"
2281		TEA_PLATFORM="windows"
2282		;;
2283	    *)
2284		EXEEXT=""
2285		TEA_PLATFORM="unix"
2286		;;
2287	    esac
2288	    ;;
2289    esac
2290
2291    # Check if exec_prefix is set. If not use fall back to prefix.
2292    # Note when adjusted, so that TEA_PREFIX can correct for this.
2293    # This is needed for recursive configures, since autoconf propagates
2294    # $prefix, but not $exec_prefix (doh!).
2295    if test x$exec_prefix = xNONE ; then
2296	exec_prefix_default=yes
2297	exec_prefix=$prefix
2298    fi
2299
2300    { $as_echo "$as_me:${as_lineno-$LINENO}: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&5
2301$as_echo "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;}
2302
2303
2304
2305
2306    # This package name must be replaced statically for AC_SUBST to work
2307
2308    # Substitute STUB_LIB_FILE in case package creates a stub library too.
2309
2310
2311    # We AC_SUBST these here to ensure they are subst'ed,
2312    # in case the user doesn't call TEA_ADD_...
2313
2314
2315
2316
2317
2318
2319
2320
2321    # Configure the installer.
2322
2323    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
2324    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
2325    INSTALL_DATA='${INSTALL} -m 644'
2326    INSTALL_PROGRAM='${INSTALL} -m 755'
2327    INSTALL_SCRIPT='${INSTALL} -m 755'
2328
2329
2330    { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
2331$as_echo_n "checking system version... " >&6; }
2332if ${tcl_cv_sys_version+:} false; then :
2333  $as_echo_n "(cached) " >&6
2334else
2335
2336	# TEA specific:
2337	if test "${TEA_PLATFORM}" = "windows" ; then
2338	    tcl_cv_sys_version=windows
2339	else
2340	    tcl_cv_sys_version=`uname -s`-`uname -r`
2341	    if test "$?" -ne 0 ; then
2342		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
2343$as_echo "$as_me: WARNING: can't find uname command" >&2;}
2344		tcl_cv_sys_version=unknown
2345	    else
2346		if test "`uname -s`" = "AIX" ; then
2347		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
2348		fi
2349		if test "`uname -s`" = "NetBSD" -a -f /etc/debian_version ; then
2350		    tcl_cv_sys_version=NetBSD-Debian
2351		fi
2352	    fi
2353	fi
2354
2355fi
2356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
2357$as_echo "$tcl_cv_sys_version" >&6; }
2358    system=$tcl_cv_sys_version
2359
2360    case $system in
2361	HP-UX-*) INSTALL_LIBRARY='${INSTALL} -m 755' ;;
2362	      *) INSTALL_LIBRARY='${INSTALL} -m 644' ;;
2363    esac
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374ac_aux_dir=
2375for ac_dir in ../tclconfig "$srcdir"/../tclconfig; do
2376  if test -f "$ac_dir/install-sh"; then
2377    ac_aux_dir=$ac_dir
2378    ac_install_sh="$ac_aux_dir/install-sh -c"
2379    break
2380  elif test -f "$ac_dir/install.sh"; then
2381    ac_aux_dir=$ac_dir
2382    ac_install_sh="$ac_aux_dir/install.sh -c"
2383    break
2384  elif test -f "$ac_dir/shtool"; then
2385    ac_aux_dir=$ac_dir
2386    ac_install_sh="$ac_aux_dir/shtool install -c"
2387    break
2388  fi
2389done
2390if test -z "$ac_aux_dir"; then
2391  as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../tclconfig \"$srcdir\"/../tclconfig" "$LINENO" 5
2392fi
2393
2394# These three variables are undocumented and unsupported,
2395# and are intended to be withdrawn in a future Autoconf release.
2396# They can cause serious problems if a builder's source tree is in a directory
2397# whose full name contains unusual characters.
2398ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2399ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2400ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2401
2402
2403
2404PHIMGTYPE="xbm"
2405CPACKAGE="Tkimgxbm"
2406PACKAGE_TCLNAME="img::xbm"
2407
2408
2409
2410#--------------------------------------------------------------------
2411# Load the tclConfig.sh file
2412# Load the tkConfig.sh file
2413#--------------------------------------------------------------------
2414
2415
2416
2417    #
2418    # Ok, lets find the tcl configuration
2419    # First, look for one uninstalled.
2420    # the alternative search directory is invoked by --with-tcl
2421    #
2422
2423    if test x"${no_tcl}" = x ; then
2424	# we reset no_tcl in case something fails here
2425	no_tcl=true
2426
2427# Check whether --with-tcl was given.
2428if test "${with_tcl+set}" = set; then :
2429  withval=$with_tcl; with_tclconfig="${withval}"
2430fi
2431
2432	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
2433$as_echo_n "checking for Tcl configuration... " >&6; }
2434	if ${ac_cv_c_tclconfig+:} false; then :
2435  $as_echo_n "(cached) " >&6
2436else
2437
2438
2439	    # First check to see if --with-tcl was specified.
2440	    if test x"${with_tclconfig}" != x ; then
2441		case "${with_tclconfig}" in
2442		    */tclConfig.sh )
2443			if test -f "${with_tclconfig}"; then
2444			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
2445$as_echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
2446			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
2447			fi ;;
2448		esac
2449		if test -f "${with_tclconfig}/tclConfig.sh" ; then
2450		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
2451		else
2452		    as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
2453		fi
2454	    fi
2455
2456	    # then check for a private Tcl installation
2457	    if test x"${ac_cv_c_tclconfig}" = x ; then
2458		for i in \
2459			../tcl \
2460			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2461			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
2462			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
2463			../../tcl \
2464			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2465			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
2466			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
2467			../../../tcl \
2468			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2469			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
2470			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
2471		    if test "${TEA_PLATFORM}" = "windows" \
2472			    -a -f "$i/win/tclConfig.sh" ; then
2473			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2474			break
2475		    fi
2476		    if test -f "$i/unix/tclConfig.sh" ; then
2477			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2478			break
2479		    fi
2480		done
2481	    fi
2482
2483	    # on Darwin, check in Framework installation locations
2484	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
2485		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2486			`ls -d /Library/Frameworks 2>/dev/null` \
2487			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2488			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Library/Frameworks/Tcl.framework 2>/dev/null` \
2489			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Network/Library/Frameworks/Tcl.framework 2>/dev/null` \
2490			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tcl.framework 2>/dev/null` \
2491			; do
2492		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
2493			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
2494			break
2495		    fi
2496		done
2497	    fi
2498
2499	    # TEA specific: on Windows, check in common installation locations
2500	    if test "${TEA_PLATFORM}" = "windows" \
2501		-a x"${ac_cv_c_tclconfig}" = x ; then
2502		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2503			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2504			; do
2505		    if test -f "$i/tclConfig.sh" ; then
2506			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2507			break
2508		    fi
2509		done
2510	    fi
2511
2512	    # check in a few common install locations
2513	    if test x"${ac_cv_c_tclconfig}" = x ; then
2514		for i in `ls -d ${libdir} 2>/dev/null` \
2515			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2516			`ls -d ${prefix}/lib 2>/dev/null` \
2517			`ls -d /usr/local/lib 2>/dev/null` \
2518			`ls -d /usr/contrib/lib 2>/dev/null` \
2519			`ls -d /usr/pkg/lib 2>/dev/null` \
2520			`ls -d /usr/lib 2>/dev/null` \
2521			`ls -d /usr/lib64 2>/dev/null` \
2522			`ls -d /usr/lib/tcl8.6 2>/dev/null` \
2523			`ls -d /usr/lib/tcl8.5 2>/dev/null` \
2524			`ls -d /usr/local/lib/tcl8.6 2>/dev/null` \
2525			`ls -d /usr/local/lib/tcl8.5 2>/dev/null` \
2526			`ls -d /usr/local/lib/tcl/tcl8.6 2>/dev/null` \
2527			`ls -d /usr/local/lib/tcl/tcl8.5 2>/dev/null` \
2528			; do
2529		    if test -f "$i/tclConfig.sh" ; then
2530			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2531			break
2532		    fi
2533		done
2534	    fi
2535
2536	    # check in a few other private locations
2537	    if test x"${ac_cv_c_tclconfig}" = x ; then
2538		for i in \
2539			${srcdir}/../tcl \
2540			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2541			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2542			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2543		    if test "${TEA_PLATFORM}" = "windows" \
2544			    -a -f "$i/win/tclConfig.sh" ; then
2545			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2546			break
2547		    fi
2548		    if test -f "$i/unix/tclConfig.sh" ; then
2549			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2550			break
2551		    fi
2552		done
2553	    fi
2554
2555fi
2556
2557
2558	if test x"${ac_cv_c_tclconfig}" = x ; then
2559	    TCL_BIN_DIR="# no Tcl configs found"
2560	    as_fn_error $? "Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" "$LINENO" 5
2561	else
2562	    no_tcl=
2563	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
2564	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2565$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2566	fi
2567    fi
2568
2569ac_ext=c
2570ac_cpp='$CPP $CPPFLAGS'
2571ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2572ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2573ac_compiler_gnu=$ac_cv_c_compiler_gnu
2574if test -n "$ac_tool_prefix"; then
2575  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2576set dummy ${ac_tool_prefix}gcc; ac_word=$2
2577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2578$as_echo_n "checking for $ac_word... " >&6; }
2579if ${ac_cv_prog_CC+:} false; then :
2580  $as_echo_n "(cached) " >&6
2581else
2582  if test -n "$CC"; then
2583  ac_cv_prog_CC="$CC" # Let the user override the test.
2584else
2585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2586for as_dir in $PATH
2587do
2588  IFS=$as_save_IFS
2589  test -z "$as_dir" && as_dir=.
2590    for ac_exec_ext in '' $ac_executable_extensions; do
2591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2592    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2594    break 2
2595  fi
2596done
2597  done
2598IFS=$as_save_IFS
2599
2600fi
2601fi
2602CC=$ac_cv_prog_CC
2603if test -n "$CC"; then
2604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2605$as_echo "$CC" >&6; }
2606else
2607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2608$as_echo "no" >&6; }
2609fi
2610
2611
2612fi
2613if test -z "$ac_cv_prog_CC"; then
2614  ac_ct_CC=$CC
2615  # Extract the first word of "gcc", so it can be a program name with args.
2616set dummy gcc; ac_word=$2
2617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2618$as_echo_n "checking for $ac_word... " >&6; }
2619if ${ac_cv_prog_ac_ct_CC+:} false; then :
2620  $as_echo_n "(cached) " >&6
2621else
2622  if test -n "$ac_ct_CC"; then
2623  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2624else
2625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2626for as_dir in $PATH
2627do
2628  IFS=$as_save_IFS
2629  test -z "$as_dir" && as_dir=.
2630    for ac_exec_ext in '' $ac_executable_extensions; do
2631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2632    ac_cv_prog_ac_ct_CC="gcc"
2633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2634    break 2
2635  fi
2636done
2637  done
2638IFS=$as_save_IFS
2639
2640fi
2641fi
2642ac_ct_CC=$ac_cv_prog_ac_ct_CC
2643if test -n "$ac_ct_CC"; then
2644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2645$as_echo "$ac_ct_CC" >&6; }
2646else
2647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2648$as_echo "no" >&6; }
2649fi
2650
2651  if test "x$ac_ct_CC" = x; then
2652    CC=""
2653  else
2654    case $cross_compiling:$ac_tool_warned in
2655yes:)
2656{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2657$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2658ac_tool_warned=yes ;;
2659esac
2660    CC=$ac_ct_CC
2661  fi
2662else
2663  CC="$ac_cv_prog_CC"
2664fi
2665
2666if test -z "$CC"; then
2667          if test -n "$ac_tool_prefix"; then
2668    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2669set dummy ${ac_tool_prefix}cc; ac_word=$2
2670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2671$as_echo_n "checking for $ac_word... " >&6; }
2672if ${ac_cv_prog_CC+:} false; then :
2673  $as_echo_n "(cached) " >&6
2674else
2675  if test -n "$CC"; then
2676  ac_cv_prog_CC="$CC" # Let the user override the test.
2677else
2678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2679for as_dir in $PATH
2680do
2681  IFS=$as_save_IFS
2682  test -z "$as_dir" && as_dir=.
2683    for ac_exec_ext in '' $ac_executable_extensions; do
2684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2685    ac_cv_prog_CC="${ac_tool_prefix}cc"
2686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2687    break 2
2688  fi
2689done
2690  done
2691IFS=$as_save_IFS
2692
2693fi
2694fi
2695CC=$ac_cv_prog_CC
2696if test -n "$CC"; then
2697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2698$as_echo "$CC" >&6; }
2699else
2700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2701$as_echo "no" >&6; }
2702fi
2703
2704
2705  fi
2706fi
2707if test -z "$CC"; then
2708  # Extract the first word of "cc", so it can be a program name with args.
2709set dummy cc; ac_word=$2
2710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2711$as_echo_n "checking for $ac_word... " >&6; }
2712if ${ac_cv_prog_CC+:} false; then :
2713  $as_echo_n "(cached) " >&6
2714else
2715  if test -n "$CC"; then
2716  ac_cv_prog_CC="$CC" # Let the user override the test.
2717else
2718  ac_prog_rejected=no
2719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2720for as_dir in $PATH
2721do
2722  IFS=$as_save_IFS
2723  test -z "$as_dir" && as_dir=.
2724    for ac_exec_ext in '' $ac_executable_extensions; do
2725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2726    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2727       ac_prog_rejected=yes
2728       continue
2729     fi
2730    ac_cv_prog_CC="cc"
2731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2732    break 2
2733  fi
2734done
2735  done
2736IFS=$as_save_IFS
2737
2738if test $ac_prog_rejected = yes; then
2739  # We found a bogon in the path, so make sure we never use it.
2740  set dummy $ac_cv_prog_CC
2741  shift
2742  if test $# != 0; then
2743    # We chose a different compiler from the bogus one.
2744    # However, it has the same basename, so the bogon will be chosen
2745    # first if we set CC to just the basename; use the full file name.
2746    shift
2747    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2748  fi
2749fi
2750fi
2751fi
2752CC=$ac_cv_prog_CC
2753if test -n "$CC"; then
2754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2755$as_echo "$CC" >&6; }
2756else
2757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2758$as_echo "no" >&6; }
2759fi
2760
2761
2762fi
2763if test -z "$CC"; then
2764  if test -n "$ac_tool_prefix"; then
2765  for ac_prog in cl.exe
2766  do
2767    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2768set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2770$as_echo_n "checking for $ac_word... " >&6; }
2771if ${ac_cv_prog_CC+:} false; then :
2772  $as_echo_n "(cached) " >&6
2773else
2774  if test -n "$CC"; then
2775  ac_cv_prog_CC="$CC" # 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_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2784    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2786    break 2
2787  fi
2788done
2789  done
2790IFS=$as_save_IFS
2791
2792fi
2793fi
2794CC=$ac_cv_prog_CC
2795if test -n "$CC"; then
2796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2797$as_echo "$CC" >&6; }
2798else
2799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2800$as_echo "no" >&6; }
2801fi
2802
2803
2804    test -n "$CC" && break
2805  done
2806fi
2807if test -z "$CC"; then
2808  ac_ct_CC=$CC
2809  for ac_prog in cl.exe
2810do
2811  # Extract the first word of "$ac_prog", so it can be a program name with args.
2812set dummy $ac_prog; ac_word=$2
2813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2814$as_echo_n "checking for $ac_word... " >&6; }
2815if ${ac_cv_prog_ac_ct_CC+:} false; then :
2816  $as_echo_n "(cached) " >&6
2817else
2818  if test -n "$ac_ct_CC"; then
2819  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2820else
2821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2822for as_dir in $PATH
2823do
2824  IFS=$as_save_IFS
2825  test -z "$as_dir" && as_dir=.
2826    for ac_exec_ext in '' $ac_executable_extensions; do
2827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2828    ac_cv_prog_ac_ct_CC="$ac_prog"
2829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2830    break 2
2831  fi
2832done
2833  done
2834IFS=$as_save_IFS
2835
2836fi
2837fi
2838ac_ct_CC=$ac_cv_prog_ac_ct_CC
2839if test -n "$ac_ct_CC"; then
2840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2841$as_echo "$ac_ct_CC" >&6; }
2842else
2843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2844$as_echo "no" >&6; }
2845fi
2846
2847
2848  test -n "$ac_ct_CC" && break
2849done
2850
2851  if test "x$ac_ct_CC" = x; then
2852    CC=""
2853  else
2854    case $cross_compiling:$ac_tool_warned in
2855yes:)
2856{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2857$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2858ac_tool_warned=yes ;;
2859esac
2860    CC=$ac_ct_CC
2861  fi
2862fi
2863
2864fi
2865
2866
2867test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2869as_fn_error $? "no acceptable C compiler found in \$PATH
2870See \`config.log' for more details" "$LINENO" 5; }
2871
2872# Provide some information about the compiler.
2873$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2874set X $ac_compile
2875ac_compiler=$2
2876for ac_option in --version -v -V -qversion; do
2877  { { ac_try="$ac_compiler $ac_option >&5"
2878case "(($ac_try" in
2879  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2880  *) ac_try_echo=$ac_try;;
2881esac
2882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2883$as_echo "$ac_try_echo"; } >&5
2884  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2885  ac_status=$?
2886  if test -s conftest.err; then
2887    sed '10a\
2888... rest of stderr output deleted ...
2889         10q' conftest.err >conftest.er1
2890    cat conftest.er1 >&5
2891  fi
2892  rm -f conftest.er1 conftest.err
2893  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2894  test $ac_status = 0; }
2895done
2896
2897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2898/* end confdefs.h.  */
2899
2900int
2901main ()
2902{
2903
2904  ;
2905  return 0;
2906}
2907_ACEOF
2908ac_clean_files_save=$ac_clean_files
2909ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2910# Try to create an executable without -o first, disregard a.out.
2911# It will help us diagnose broken compilers, and finding out an intuition
2912# of exeext.
2913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2914$as_echo_n "checking whether the C compiler works... " >&6; }
2915ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2916
2917# The possible output files:
2918ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2919
2920ac_rmfiles=
2921for ac_file in $ac_files
2922do
2923  case $ac_file in
2924    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2925    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2926  esac
2927done
2928rm -f $ac_rmfiles
2929
2930if { { ac_try="$ac_link_default"
2931case "(($ac_try" in
2932  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2933  *) ac_try_echo=$ac_try;;
2934esac
2935eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2936$as_echo "$ac_try_echo"; } >&5
2937  (eval "$ac_link_default") 2>&5
2938  ac_status=$?
2939  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2940  test $ac_status = 0; }; then :
2941  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2942# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2943# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2944# so that the user can short-circuit this test for compilers unknown to
2945# Autoconf.
2946for ac_file in $ac_files ''
2947do
2948  test -f "$ac_file" || continue
2949  case $ac_file in
2950    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2951	;;
2952    [ab].out )
2953	# We found the default executable, but exeext='' is most
2954	# certainly right.
2955	break;;
2956    *.* )
2957	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2958	then :; else
2959	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2960	fi
2961	# We set ac_cv_exeext here because the later test for it is not
2962	# safe: cross compilers may not add the suffix if given an `-o'
2963	# argument, so we may need to know it at that point already.
2964	# Even if this section looks crufty: it has the advantage of
2965	# actually working.
2966	break;;
2967    * )
2968	break;;
2969  esac
2970done
2971test "$ac_cv_exeext" = no && ac_cv_exeext=
2972
2973else
2974  ac_file=''
2975fi
2976if test -z "$ac_file"; then :
2977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2978$as_echo "no" >&6; }
2979$as_echo "$as_me: failed program was:" >&5
2980sed 's/^/| /' conftest.$ac_ext >&5
2981
2982{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2983$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2984as_fn_error 77 "C compiler cannot create executables
2985See \`config.log' for more details" "$LINENO" 5; }
2986else
2987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2988$as_echo "yes" >&6; }
2989fi
2990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2991$as_echo_n "checking for C compiler default output file name... " >&6; }
2992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2993$as_echo "$ac_file" >&6; }
2994ac_exeext=$ac_cv_exeext
2995
2996rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2997ac_clean_files=$ac_clean_files_save
2998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2999$as_echo_n "checking for suffix of executables... " >&6; }
3000if { { ac_try="$ac_link"
3001case "(($ac_try" in
3002  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3003  *) ac_try_echo=$ac_try;;
3004esac
3005eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3006$as_echo "$ac_try_echo"; } >&5
3007  (eval "$ac_link") 2>&5
3008  ac_status=$?
3009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3010  test $ac_status = 0; }; then :
3011  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3012# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3013# work properly (i.e., refer to `conftest.exe'), while it won't with
3014# `rm'.
3015for ac_file in conftest.exe conftest conftest.*; do
3016  test -f "$ac_file" || continue
3017  case $ac_file in
3018    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3019    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3020	  break;;
3021    * ) break;;
3022  esac
3023done
3024else
3025  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3026$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3027as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3028See \`config.log' for more details" "$LINENO" 5; }
3029fi
3030rm -f conftest conftest$ac_cv_exeext
3031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3032$as_echo "$ac_cv_exeext" >&6; }
3033
3034rm -f conftest.$ac_ext
3035EXEEXT=$ac_cv_exeext
3036ac_exeext=$EXEEXT
3037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3038/* end confdefs.h.  */
3039#include <stdio.h>
3040int
3041main ()
3042{
3043FILE *f = fopen ("conftest.out", "w");
3044 return ferror (f) || fclose (f) != 0;
3045
3046  ;
3047  return 0;
3048}
3049_ACEOF
3050ac_clean_files="$ac_clean_files conftest.out"
3051# Check that the compiler produces executables we can run.  If not, either
3052# the compiler is broken, or we cross compile.
3053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3054$as_echo_n "checking whether we are cross compiling... " >&6; }
3055if test "$cross_compiling" != yes; then
3056  { { ac_try="$ac_link"
3057case "(($ac_try" in
3058  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3059  *) ac_try_echo=$ac_try;;
3060esac
3061eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3062$as_echo "$ac_try_echo"; } >&5
3063  (eval "$ac_link") 2>&5
3064  ac_status=$?
3065  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3066  test $ac_status = 0; }
3067  if { ac_try='./conftest$ac_cv_exeext'
3068  { { case "(($ac_try" in
3069  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3070  *) ac_try_echo=$ac_try;;
3071esac
3072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3073$as_echo "$ac_try_echo"; } >&5
3074  (eval "$ac_try") 2>&5
3075  ac_status=$?
3076  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3077  test $ac_status = 0; }; }; then
3078    cross_compiling=no
3079  else
3080    if test "$cross_compiling" = maybe; then
3081	cross_compiling=yes
3082    else
3083	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3085as_fn_error $? "cannot run C compiled programs.
3086If you meant to cross compile, use \`--host'.
3087See \`config.log' for more details" "$LINENO" 5; }
3088    fi
3089  fi
3090fi
3091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3092$as_echo "$cross_compiling" >&6; }
3093
3094rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3095ac_clean_files=$ac_clean_files_save
3096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3097$as_echo_n "checking for suffix of object files... " >&6; }
3098if ${ac_cv_objext+:} false; then :
3099  $as_echo_n "(cached) " >&6
3100else
3101  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3102/* end confdefs.h.  */
3103
3104int
3105main ()
3106{
3107
3108  ;
3109  return 0;
3110}
3111_ACEOF
3112rm -f conftest.o conftest.obj
3113if { { ac_try="$ac_compile"
3114case "(($ac_try" in
3115  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3116  *) ac_try_echo=$ac_try;;
3117esac
3118eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3119$as_echo "$ac_try_echo"; } >&5
3120  (eval "$ac_compile") 2>&5
3121  ac_status=$?
3122  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3123  test $ac_status = 0; }; then :
3124  for ac_file in conftest.o conftest.obj conftest.*; do
3125  test -f "$ac_file" || continue;
3126  case $ac_file in
3127    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3128    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3129       break;;
3130  esac
3131done
3132else
3133  $as_echo "$as_me: failed program was:" >&5
3134sed 's/^/| /' conftest.$ac_ext >&5
3135
3136{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3138as_fn_error $? "cannot compute suffix of object files: cannot compile
3139See \`config.log' for more details" "$LINENO" 5; }
3140fi
3141rm -f conftest.$ac_cv_objext conftest.$ac_ext
3142fi
3143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3144$as_echo "$ac_cv_objext" >&6; }
3145OBJEXT=$ac_cv_objext
3146ac_objext=$OBJEXT
3147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3148$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3149if ${ac_cv_c_compiler_gnu+:} false; then :
3150  $as_echo_n "(cached) " >&6
3151else
3152  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3153/* end confdefs.h.  */
3154
3155int
3156main ()
3157{
3158#ifndef __GNUC__
3159       choke me
3160#endif
3161
3162  ;
3163  return 0;
3164}
3165_ACEOF
3166if ac_fn_c_try_compile "$LINENO"; then :
3167  ac_compiler_gnu=yes
3168else
3169  ac_compiler_gnu=no
3170fi
3171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3172ac_cv_c_compiler_gnu=$ac_compiler_gnu
3173
3174fi
3175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3176$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3177if test $ac_compiler_gnu = yes; then
3178  GCC=yes
3179else
3180  GCC=
3181fi
3182ac_test_CFLAGS=${CFLAGS+set}
3183ac_save_CFLAGS=$CFLAGS
3184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3185$as_echo_n "checking whether $CC accepts -g... " >&6; }
3186if ${ac_cv_prog_cc_g+:} false; then :
3187  $as_echo_n "(cached) " >&6
3188else
3189  ac_save_c_werror_flag=$ac_c_werror_flag
3190   ac_c_werror_flag=yes
3191   ac_cv_prog_cc_g=no
3192   CFLAGS="-g"
3193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3194/* end confdefs.h.  */
3195
3196int
3197main ()
3198{
3199
3200  ;
3201  return 0;
3202}
3203_ACEOF
3204if ac_fn_c_try_compile "$LINENO"; then :
3205  ac_cv_prog_cc_g=yes
3206else
3207  CFLAGS=""
3208      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3209/* end confdefs.h.  */
3210
3211int
3212main ()
3213{
3214
3215  ;
3216  return 0;
3217}
3218_ACEOF
3219if ac_fn_c_try_compile "$LINENO"; then :
3220
3221else
3222  ac_c_werror_flag=$ac_save_c_werror_flag
3223	 CFLAGS="-g"
3224	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3225/* end confdefs.h.  */
3226
3227int
3228main ()
3229{
3230
3231  ;
3232  return 0;
3233}
3234_ACEOF
3235if ac_fn_c_try_compile "$LINENO"; then :
3236  ac_cv_prog_cc_g=yes
3237fi
3238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3239fi
3240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3241fi
3242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3243   ac_c_werror_flag=$ac_save_c_werror_flag
3244fi
3245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3246$as_echo "$ac_cv_prog_cc_g" >&6; }
3247if test "$ac_test_CFLAGS" = set; then
3248  CFLAGS=$ac_save_CFLAGS
3249elif test $ac_cv_prog_cc_g = yes; then
3250  if test "$GCC" = yes; then
3251    CFLAGS="-g -O2"
3252  else
3253    CFLAGS="-g"
3254  fi
3255else
3256  if test "$GCC" = yes; then
3257    CFLAGS="-O2"
3258  else
3259    CFLAGS=
3260  fi
3261fi
3262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3263$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3264if ${ac_cv_prog_cc_c89+:} false; then :
3265  $as_echo_n "(cached) " >&6
3266else
3267  ac_cv_prog_cc_c89=no
3268ac_save_CC=$CC
3269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3270/* end confdefs.h.  */
3271#include <stdarg.h>
3272#include <stdio.h>
3273struct stat;
3274/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3275struct buf { int x; };
3276FILE * (*rcsopen) (struct buf *, struct stat *, int);
3277static char *e (p, i)
3278     char **p;
3279     int i;
3280{
3281  return p[i];
3282}
3283static char *f (char * (*g) (char **, int), char **p, ...)
3284{
3285  char *s;
3286  va_list v;
3287  va_start (v,p);
3288  s = g (p, va_arg (v,int));
3289  va_end (v);
3290  return s;
3291}
3292
3293/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3294   function prototypes and stuff, but not '\xHH' hex character constants.
3295   These don't provoke an error unfortunately, instead are silently treated
3296   as 'x'.  The following induces an error, until -std is added to get
3297   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3298   array size at least.  It's necessary to write '\x00'==0 to get something
3299   that's true only with -std.  */
3300int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3301
3302/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3303   inside strings and character constants.  */
3304#define FOO(x) 'x'
3305int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3306
3307int test (int i, double x);
3308struct s1 {int (*f) (int a);};
3309struct s2 {int (*f) (double a);};
3310int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3311int argc;
3312char **argv;
3313int
3314main ()
3315{
3316return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3317  ;
3318  return 0;
3319}
3320_ACEOF
3321for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3322	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3323do
3324  CC="$ac_save_CC $ac_arg"
3325  if ac_fn_c_try_compile "$LINENO"; then :
3326  ac_cv_prog_cc_c89=$ac_arg
3327fi
3328rm -f core conftest.err conftest.$ac_objext
3329  test "x$ac_cv_prog_cc_c89" != "xno" && break
3330done
3331rm -f conftest.$ac_ext
3332CC=$ac_save_CC
3333
3334fi
3335# AC_CACHE_VAL
3336case "x$ac_cv_prog_cc_c89" in
3337  x)
3338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3339$as_echo "none needed" >&6; } ;;
3340  xno)
3341    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3342$as_echo "unsupported" >&6; } ;;
3343  *)
3344    CC="$CC $ac_cv_prog_cc_c89"
3345    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3346$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3347esac
3348if test "x$ac_cv_prog_cc_c89" != xno; then :
3349
3350fi
3351
3352ac_ext=c
3353ac_cpp='$CPP $CPPFLAGS'
3354ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3355ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3356ac_compiler_gnu=$ac_cv_c_compiler_gnu
3357
3358
3359
3360    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
3361$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
3362
3363    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
3364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
3365$as_echo "loading" >&6; }
3366	. "${TCL_BIN_DIR}/tclConfig.sh"
3367    else
3368        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
3369$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
3370    fi
3371
3372    # If the TCL_BIN_DIR is the build directory (not the install directory),
3373    # then set the common variable name to the value of the build variables.
3374    # For example, the variable TCL_LIB_SPEC will be set to the value
3375    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
3376    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
3377    # installed and uninstalled version of Tcl.
3378    if test -f "${TCL_BIN_DIR}/Makefile" ; then
3379        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
3380        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
3381        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
3382    elif test "`uname -s`" = "Darwin"; then
3383	# If Tcl was built as a framework, attempt to use the libraries
3384	# from the framework at the given location so that linking works
3385	# against Tcl.framework installed in an arbitrary location.
3386	case ${TCL_DEFS} in
3387	    *TCL_FRAMEWORK*)
3388		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
3389		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
3390			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
3391			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
3392			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
3393			    break
3394			fi
3395		    done
3396		fi
3397		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
3398		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
3399		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
3400		fi
3401		;;
3402	esac
3403    fi
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking platform" >&5
3419$as_echo_n "checking platform... " >&6; }
3420    hold_cc=$CC; CC="$TCL_CC"
3421    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3422/* end confdefs.h.  */
3423
3424int
3425main ()
3426{
3427
3428	    #ifdef _WIN32
3429		#error win32
3430	    #endif
3431
3432  ;
3433  return 0;
3434}
3435_ACEOF
3436if ac_fn_c_try_compile "$LINENO"; then :
3437
3438	    # first test we've already retrieved platform (cross-compile), fallback to unix otherwise:
3439	    TEA_PLATFORM="${TEA_PLATFORM-unix}"
3440	    CYGPATH=echo
3441
3442else
3443
3444	    TEA_PLATFORM="windows"
3445	    # Extract the first word of "cygpath", so it can be a program name with args.
3446set dummy cygpath; ac_word=$2
3447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3448$as_echo_n "checking for $ac_word... " >&6; }
3449if ${ac_cv_prog_CYGPATH+:} false; then :
3450  $as_echo_n "(cached) " >&6
3451else
3452  if test -n "$CYGPATH"; then
3453  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
3454else
3455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3456for as_dir in $PATH
3457do
3458  IFS=$as_save_IFS
3459  test -z "$as_dir" && as_dir=.
3460    for ac_exec_ext in '' $ac_executable_extensions; do
3461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3462    ac_cv_prog_CYGPATH="cygpath -m"
3463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3464    break 2
3465  fi
3466done
3467  done
3468IFS=$as_save_IFS
3469
3470  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
3471fi
3472fi
3473CYGPATH=$ac_cv_prog_CYGPATH
3474if test -n "$CYGPATH"; then
3475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
3476$as_echo "$CYGPATH" >&6; }
3477else
3478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3479$as_echo "no" >&6; }
3480fi
3481
3482
3483
3484fi
3485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3486    CC=$hold_cc
3487    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEA_PLATFORM" >&5
3488$as_echo "$TEA_PLATFORM" >&6; }
3489
3490    # The BUILD_$pkg is to define the correct extern storage class
3491    # handling when making this package
3492
3493cat >>confdefs.h <<_ACEOF
3494#define BUILD_${PACKAGE_NAME} /**/
3495_ACEOF
3496
3497    # Do this here as we have fully defined TEA_PLATFORM now
3498    if test "${TEA_PLATFORM}" = "windows" ; then
3499	EXEEXT=".exe"
3500	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
3501    fi
3502
3503    # TEA specific:
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513    #
3514    # Ok, lets find the tk configuration
3515    # First, look for one uninstalled.
3516    # the alternative search directory is invoked by --with-tk
3517    #
3518
3519    if test x"${no_tk}" = x ; then
3520	# we reset no_tk in case something fails here
3521	no_tk=true
3522
3523# Check whether --with-tk was given.
3524if test "${with_tk+set}" = set; then :
3525  withval=$with_tk; with_tkconfig="${withval}"
3526fi
3527
3528	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
3529$as_echo_n "checking for Tk configuration... " >&6; }
3530	if ${ac_cv_c_tkconfig+:} false; then :
3531  $as_echo_n "(cached) " >&6
3532else
3533
3534
3535	    # First check to see if --with-tkconfig was specified.
3536	    if test x"${with_tkconfig}" != x ; then
3537		case "${with_tkconfig}" in
3538		    */tkConfig.sh )
3539			if test -f "${with_tkconfig}"; then
3540			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&5
3541$as_echo "$as_me: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&2;}
3542			    with_tkconfig="`echo "${with_tkconfig}" | sed 's!/tkConfig\.sh$!!'`"
3543			fi ;;
3544		esac
3545		if test -f "${with_tkconfig}/tkConfig.sh" ; then
3546		    ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`"
3547		else
3548		    as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
3549		fi
3550	    fi
3551
3552	    # then check for a private Tk library
3553	    if test x"${ac_cv_c_tkconfig}" = x ; then
3554		for i in \
3555			../tk \
3556			`ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
3557			`ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
3558			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
3559			../../tk \
3560			`ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
3561			`ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
3562			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
3563			../../../tk \
3564			`ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
3565			`ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
3566			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
3567		    if test "${TEA_PLATFORM}" = "windows" \
3568			    -a -f "$i/win/tkConfig.sh" ; then
3569			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
3570			break
3571		    fi
3572		    if test -f "$i/unix/tkConfig.sh" ; then
3573			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
3574			break
3575		    fi
3576		done
3577	    fi
3578
3579	    # on Darwin, check in Framework installation locations
3580	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
3581		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
3582			`ls -d /Library/Frameworks 2>/dev/null` \
3583			`ls -d /Network/Library/Frameworks 2>/dev/null` \
3584			; do
3585		    if test -f "$i/Tk.framework/tkConfig.sh" ; then
3586			ac_cv_c_tkconfig="`(cd $i/Tk.framework; pwd)`"
3587			break
3588		    fi
3589		done
3590	    fi
3591
3592	    # check in a few common install locations
3593	    if test x"${ac_cv_c_tkconfig}" = x ; then
3594		for i in `ls -d ${libdir} 2>/dev/null` \
3595			`ls -d ${exec_prefix}/lib 2>/dev/null` \
3596			`ls -d ${prefix}/lib 2>/dev/null` \
3597			`ls -d /usr/local/lib 2>/dev/null` \
3598			`ls -d /usr/contrib/lib 2>/dev/null` \
3599			`ls -d /usr/pkg/lib 2>/dev/null` \
3600			`ls -d /usr/lib/tk8.6 2>/dev/null` \
3601			`ls -d /usr/lib/tk8.5 2>/dev/null` \
3602			`ls -d /usr/lib 2>/dev/null` \
3603			`ls -d /usr/lib64 2>/dev/null` \
3604			`ls -d /usr/local/lib/tk8.6 2>/dev/null` \
3605			`ls -d /usr/local/lib/tk8.5 2>/dev/null` \
3606			`ls -d /usr/local/lib/tcl/tk8.6 2>/dev/null` \
3607			`ls -d /usr/local/lib/tcl/tk8.5 2>/dev/null` \
3608			; do
3609		    if test -f "$i/tkConfig.sh" ; then
3610			ac_cv_c_tkconfig="`(cd $i; pwd)`"
3611			break
3612		    fi
3613		done
3614	    fi
3615
3616	    # TEA specific: on Windows, check in common installation locations
3617	    if test "${TEA_PLATFORM}" = "windows" \
3618		-a x"${ac_cv_c_tkconfig}" = x ; then
3619		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
3620			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
3621			; do
3622		    if test -f "$i/tkConfig.sh" ; then
3623			ac_cv_c_tkconfig="`(cd $i; pwd)`"
3624			break
3625		    fi
3626		done
3627	    fi
3628
3629	    # check in a few other private locations
3630	    if test x"${ac_cv_c_tkconfig}" = x ; then
3631		for i in \
3632			${srcdir}/../tk \
3633			`ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
3634			`ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
3635			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
3636		    if test "${TEA_PLATFORM}" = "windows" \
3637			    -a -f "$i/win/tkConfig.sh" ; then
3638			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
3639			break
3640		    fi
3641		    if test -f "$i/unix/tkConfig.sh" ; then
3642			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
3643			break
3644		    fi
3645		done
3646	    fi
3647
3648fi
3649
3650
3651	if test x"${ac_cv_c_tkconfig}" = x ; then
3652	    TK_BIN_DIR="# no Tk configs found"
3653	    as_fn_error $? "Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh" "$LINENO" 5
3654	else
3655	    no_tk=
3656	    TK_BIN_DIR="${ac_cv_c_tkconfig}"
3657	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
3658$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3659	fi
3660    fi
3661
3662
3663    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
3664$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
3665
3666    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
3667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
3668$as_echo "loading" >&6; }
3669	. "${TK_BIN_DIR}/tkConfig.sh"
3670    else
3671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
3672$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3673    fi
3674
3675    # If the TK_BIN_DIR is the build directory (not the install directory),
3676    # then set the common variable name to the value of the build variables.
3677    # For example, the variable TK_LIB_SPEC will be set to the value
3678    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
3679    # instead of TK_BUILD_LIB_SPEC since it will work with both an
3680    # installed and uninstalled version of Tcl.
3681    if test -f "${TK_BIN_DIR}/Makefile" ; then
3682        TK_LIB_SPEC="${TK_BUILD_LIB_SPEC}"
3683        TK_STUB_LIB_SPEC="${TK_BUILD_STUB_LIB_SPEC}"
3684        TK_STUB_LIB_PATH="${TK_BUILD_STUB_LIB_PATH}"
3685    elif test "`uname -s`" = "Darwin"; then
3686	# If Tk was built as a framework, attempt to use the libraries
3687	# from the framework at the given location so that linking works
3688	# against Tk.framework installed in an arbitrary location.
3689	case ${TK_DEFS} in
3690	    *TK_FRAMEWORK*)
3691		if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
3692		    for i in "`cd "${TK_BIN_DIR}"; pwd`" \
3693			     "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
3694			if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
3695			    TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
3696			    break
3697			fi
3698		    done
3699		fi
3700		if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
3701		    TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
3702		    TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
3703		fi
3704		;;
3705	esac
3706    fi
3707
3708    # TEA specific: Ensure windowingsystem is defined
3709    if test "${TEA_PLATFORM}" = "unix" ; then
3710	case ${TK_DEFS} in
3711	    *MAC_OSX_TK*)
3712
3713$as_echo "#define MAC_OSX_TK 1" >>confdefs.h
3714
3715		TEA_WINDOWINGSYSTEM="aqua"
3716		;;
3717	    *)
3718		TEA_WINDOWINGSYSTEM="x11"
3719		;;
3720	esac
3721    elif test "${TEA_PLATFORM}" = "windows" ; then
3722	TEA_WINDOWINGSYSTEM="win32"
3723    fi
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737    # TEA specific:
3738
3739
3740
3741
3742#-----------------------------------------------------------------------
3743# Handle the --prefix=... option by defaulting to what Tcl gave.
3744# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
3745#-----------------------------------------------------------------------
3746
3747
3748    if test "${prefix}" = "NONE"; then
3749	prefix_default=yes
3750	if test x"${TCL_PREFIX}" != x; then
3751	    { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
3752$as_echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
3753	    prefix=${TCL_PREFIX}
3754	else
3755	    { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to /usr/local" >&5
3756$as_echo "$as_me: --prefix defaulting to /usr/local" >&6;}
3757	    prefix=/usr/local
3758	fi
3759    fi
3760    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
3761	-o x"${exec_prefix_default}" = x"yes" ; then
3762	if test x"${TCL_EXEC_PREFIX}" != x; then
3763	    { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
3764$as_echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
3765	    exec_prefix=${TCL_EXEC_PREFIX}
3766	else
3767	    { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to ${prefix}" >&5
3768$as_echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
3769	    exec_prefix=$prefix
3770	fi
3771    fi
3772
3773
3774#-----------------------------------------------------------------------
3775# Standard compiler checks.
3776# This sets up CC by using the CC env var, or looks for gcc otherwise.
3777# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
3778# the basic setup necessary to compile executables.
3779#-----------------------------------------------------------------------
3780
3781
3782    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
3783    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
3784
3785    ac_ext=c
3786ac_cpp='$CPP $CPPFLAGS'
3787ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3788ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3789ac_compiler_gnu=$ac_cv_c_compiler_gnu
3790if test -n "$ac_tool_prefix"; then
3791  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3792set dummy ${ac_tool_prefix}gcc; ac_word=$2
3793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3794$as_echo_n "checking for $ac_word... " >&6; }
3795if ${ac_cv_prog_CC+:} false; then :
3796  $as_echo_n "(cached) " >&6
3797else
3798  if test -n "$CC"; then
3799  ac_cv_prog_CC="$CC" # Let the user override the test.
3800else
3801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3802for as_dir in $PATH
3803do
3804  IFS=$as_save_IFS
3805  test -z "$as_dir" && as_dir=.
3806    for ac_exec_ext in '' $ac_executable_extensions; do
3807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3808    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3810    break 2
3811  fi
3812done
3813  done
3814IFS=$as_save_IFS
3815
3816fi
3817fi
3818CC=$ac_cv_prog_CC
3819if test -n "$CC"; then
3820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3821$as_echo "$CC" >&6; }
3822else
3823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3824$as_echo "no" >&6; }
3825fi
3826
3827
3828fi
3829if test -z "$ac_cv_prog_CC"; then
3830  ac_ct_CC=$CC
3831  # Extract the first word of "gcc", so it can be a program name with args.
3832set dummy gcc; ac_word=$2
3833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3834$as_echo_n "checking for $ac_word... " >&6; }
3835if ${ac_cv_prog_ac_ct_CC+:} false; then :
3836  $as_echo_n "(cached) " >&6
3837else
3838  if test -n "$ac_ct_CC"; then
3839  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3840else
3841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3842for as_dir in $PATH
3843do
3844  IFS=$as_save_IFS
3845  test -z "$as_dir" && as_dir=.
3846    for ac_exec_ext in '' $ac_executable_extensions; do
3847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3848    ac_cv_prog_ac_ct_CC="gcc"
3849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3850    break 2
3851  fi
3852done
3853  done
3854IFS=$as_save_IFS
3855
3856fi
3857fi
3858ac_ct_CC=$ac_cv_prog_ac_ct_CC
3859if test -n "$ac_ct_CC"; then
3860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3861$as_echo "$ac_ct_CC" >&6; }
3862else
3863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3864$as_echo "no" >&6; }
3865fi
3866
3867  if test "x$ac_ct_CC" = x; then
3868    CC=""
3869  else
3870    case $cross_compiling:$ac_tool_warned in
3871yes:)
3872{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3873$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3874ac_tool_warned=yes ;;
3875esac
3876    CC=$ac_ct_CC
3877  fi
3878else
3879  CC="$ac_cv_prog_CC"
3880fi
3881
3882if test -z "$CC"; then
3883          if test -n "$ac_tool_prefix"; then
3884    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3885set dummy ${ac_tool_prefix}cc; ac_word=$2
3886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3887$as_echo_n "checking for $ac_word... " >&6; }
3888if ${ac_cv_prog_CC+:} false; then :
3889  $as_echo_n "(cached) " >&6
3890else
3891  if test -n "$CC"; then
3892  ac_cv_prog_CC="$CC" # Let the user override the test.
3893else
3894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3895for as_dir in $PATH
3896do
3897  IFS=$as_save_IFS
3898  test -z "$as_dir" && as_dir=.
3899    for ac_exec_ext in '' $ac_executable_extensions; do
3900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3901    ac_cv_prog_CC="${ac_tool_prefix}cc"
3902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3903    break 2
3904  fi
3905done
3906  done
3907IFS=$as_save_IFS
3908
3909fi
3910fi
3911CC=$ac_cv_prog_CC
3912if test -n "$CC"; then
3913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3914$as_echo "$CC" >&6; }
3915else
3916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3917$as_echo "no" >&6; }
3918fi
3919
3920
3921  fi
3922fi
3923if test -z "$CC"; then
3924  # Extract the first word of "cc", so it can be a program name with args.
3925set dummy cc; ac_word=$2
3926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3927$as_echo_n "checking for $ac_word... " >&6; }
3928if ${ac_cv_prog_CC+:} false; then :
3929  $as_echo_n "(cached) " >&6
3930else
3931  if test -n "$CC"; then
3932  ac_cv_prog_CC="$CC" # Let the user override the test.
3933else
3934  ac_prog_rejected=no
3935as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3936for as_dir in $PATH
3937do
3938  IFS=$as_save_IFS
3939  test -z "$as_dir" && as_dir=.
3940    for ac_exec_ext in '' $ac_executable_extensions; do
3941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3942    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3943       ac_prog_rejected=yes
3944       continue
3945     fi
3946    ac_cv_prog_CC="cc"
3947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3948    break 2
3949  fi
3950done
3951  done
3952IFS=$as_save_IFS
3953
3954if test $ac_prog_rejected = yes; then
3955  # We found a bogon in the path, so make sure we never use it.
3956  set dummy $ac_cv_prog_CC
3957  shift
3958  if test $# != 0; then
3959    # We chose a different compiler from the bogus one.
3960    # However, it has the same basename, so the bogon will be chosen
3961    # first if we set CC to just the basename; use the full file name.
3962    shift
3963    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3964  fi
3965fi
3966fi
3967fi
3968CC=$ac_cv_prog_CC
3969if test -n "$CC"; then
3970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3971$as_echo "$CC" >&6; }
3972else
3973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3974$as_echo "no" >&6; }
3975fi
3976
3977
3978fi
3979if test -z "$CC"; then
3980  if test -n "$ac_tool_prefix"; then
3981  for ac_prog in cl.exe
3982  do
3983    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3984set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3986$as_echo_n "checking for $ac_word... " >&6; }
3987if ${ac_cv_prog_CC+:} false; then :
3988  $as_echo_n "(cached) " >&6
3989else
3990  if test -n "$CC"; then
3991  ac_cv_prog_CC="$CC" # Let the user override the test.
3992else
3993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3994for as_dir in $PATH
3995do
3996  IFS=$as_save_IFS
3997  test -z "$as_dir" && as_dir=.
3998    for ac_exec_ext in '' $ac_executable_extensions; do
3999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4000    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4002    break 2
4003  fi
4004done
4005  done
4006IFS=$as_save_IFS
4007
4008fi
4009fi
4010CC=$ac_cv_prog_CC
4011if test -n "$CC"; then
4012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4013$as_echo "$CC" >&6; }
4014else
4015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4016$as_echo "no" >&6; }
4017fi
4018
4019
4020    test -n "$CC" && break
4021  done
4022fi
4023if test -z "$CC"; then
4024  ac_ct_CC=$CC
4025  for ac_prog in cl.exe
4026do
4027  # Extract the first word of "$ac_prog", so it can be a program name with args.
4028set dummy $ac_prog; ac_word=$2
4029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4030$as_echo_n "checking for $ac_word... " >&6; }
4031if ${ac_cv_prog_ac_ct_CC+:} false; then :
4032  $as_echo_n "(cached) " >&6
4033else
4034  if test -n "$ac_ct_CC"; then
4035  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4036else
4037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4038for as_dir in $PATH
4039do
4040  IFS=$as_save_IFS
4041  test -z "$as_dir" && as_dir=.
4042    for ac_exec_ext in '' $ac_executable_extensions; do
4043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4044    ac_cv_prog_ac_ct_CC="$ac_prog"
4045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4046    break 2
4047  fi
4048done
4049  done
4050IFS=$as_save_IFS
4051
4052fi
4053fi
4054ac_ct_CC=$ac_cv_prog_ac_ct_CC
4055if test -n "$ac_ct_CC"; then
4056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4057$as_echo "$ac_ct_CC" >&6; }
4058else
4059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4060$as_echo "no" >&6; }
4061fi
4062
4063
4064  test -n "$ac_ct_CC" && break
4065done
4066
4067  if test "x$ac_ct_CC" = x; then
4068    CC=""
4069  else
4070    case $cross_compiling:$ac_tool_warned in
4071yes:)
4072{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4073$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4074ac_tool_warned=yes ;;
4075esac
4076    CC=$ac_ct_CC
4077  fi
4078fi
4079
4080fi
4081
4082
4083test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4085as_fn_error $? "no acceptable C compiler found in \$PATH
4086See \`config.log' for more details" "$LINENO" 5; }
4087
4088# Provide some information about the compiler.
4089$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4090set X $ac_compile
4091ac_compiler=$2
4092for ac_option in --version -v -V -qversion; do
4093  { { ac_try="$ac_compiler $ac_option >&5"
4094case "(($ac_try" in
4095  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4096  *) ac_try_echo=$ac_try;;
4097esac
4098eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4099$as_echo "$ac_try_echo"; } >&5
4100  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4101  ac_status=$?
4102  if test -s conftest.err; then
4103    sed '10a\
4104... rest of stderr output deleted ...
4105         10q' conftest.err >conftest.er1
4106    cat conftest.er1 >&5
4107  fi
4108  rm -f conftest.er1 conftest.err
4109  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4110  test $ac_status = 0; }
4111done
4112
4113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4114$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4115if ${ac_cv_c_compiler_gnu+:} false; then :
4116  $as_echo_n "(cached) " >&6
4117else
4118  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4119/* end confdefs.h.  */
4120
4121int
4122main ()
4123{
4124#ifndef __GNUC__
4125       choke me
4126#endif
4127
4128  ;
4129  return 0;
4130}
4131_ACEOF
4132if ac_fn_c_try_compile "$LINENO"; then :
4133  ac_compiler_gnu=yes
4134else
4135  ac_compiler_gnu=no
4136fi
4137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4138ac_cv_c_compiler_gnu=$ac_compiler_gnu
4139
4140fi
4141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4142$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4143if test $ac_compiler_gnu = yes; then
4144  GCC=yes
4145else
4146  GCC=
4147fi
4148ac_test_CFLAGS=${CFLAGS+set}
4149ac_save_CFLAGS=$CFLAGS
4150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4151$as_echo_n "checking whether $CC accepts -g... " >&6; }
4152if ${ac_cv_prog_cc_g+:} false; then :
4153  $as_echo_n "(cached) " >&6
4154else
4155  ac_save_c_werror_flag=$ac_c_werror_flag
4156   ac_c_werror_flag=yes
4157   ac_cv_prog_cc_g=no
4158   CFLAGS="-g"
4159   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4160/* end confdefs.h.  */
4161
4162int
4163main ()
4164{
4165
4166  ;
4167  return 0;
4168}
4169_ACEOF
4170if ac_fn_c_try_compile "$LINENO"; then :
4171  ac_cv_prog_cc_g=yes
4172else
4173  CFLAGS=""
4174      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4175/* end confdefs.h.  */
4176
4177int
4178main ()
4179{
4180
4181  ;
4182  return 0;
4183}
4184_ACEOF
4185if ac_fn_c_try_compile "$LINENO"; then :
4186
4187else
4188  ac_c_werror_flag=$ac_save_c_werror_flag
4189	 CFLAGS="-g"
4190	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4191/* end confdefs.h.  */
4192
4193int
4194main ()
4195{
4196
4197  ;
4198  return 0;
4199}
4200_ACEOF
4201if ac_fn_c_try_compile "$LINENO"; then :
4202  ac_cv_prog_cc_g=yes
4203fi
4204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4205fi
4206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4207fi
4208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4209   ac_c_werror_flag=$ac_save_c_werror_flag
4210fi
4211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4212$as_echo "$ac_cv_prog_cc_g" >&6; }
4213if test "$ac_test_CFLAGS" = set; then
4214  CFLAGS=$ac_save_CFLAGS
4215elif test $ac_cv_prog_cc_g = yes; then
4216  if test "$GCC" = yes; then
4217    CFLAGS="-g -O2"
4218  else
4219    CFLAGS="-g"
4220  fi
4221else
4222  if test "$GCC" = yes; then
4223    CFLAGS="-O2"
4224  else
4225    CFLAGS=
4226  fi
4227fi
4228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4229$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4230if ${ac_cv_prog_cc_c89+:} false; then :
4231  $as_echo_n "(cached) " >&6
4232else
4233  ac_cv_prog_cc_c89=no
4234ac_save_CC=$CC
4235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4236/* end confdefs.h.  */
4237#include <stdarg.h>
4238#include <stdio.h>
4239struct stat;
4240/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4241struct buf { int x; };
4242FILE * (*rcsopen) (struct buf *, struct stat *, int);
4243static char *e (p, i)
4244     char **p;
4245     int i;
4246{
4247  return p[i];
4248}
4249static char *f (char * (*g) (char **, int), char **p, ...)
4250{
4251  char *s;
4252  va_list v;
4253  va_start (v,p);
4254  s = g (p, va_arg (v,int));
4255  va_end (v);
4256  return s;
4257}
4258
4259/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4260   function prototypes and stuff, but not '\xHH' hex character constants.
4261   These don't provoke an error unfortunately, instead are silently treated
4262   as 'x'.  The following induces an error, until -std is added to get
4263   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4264   array size at least.  It's necessary to write '\x00'==0 to get something
4265   that's true only with -std.  */
4266int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4267
4268/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4269   inside strings and character constants.  */
4270#define FOO(x) 'x'
4271int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4272
4273int test (int i, double x);
4274struct s1 {int (*f) (int a);};
4275struct s2 {int (*f) (double a);};
4276int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4277int argc;
4278char **argv;
4279int
4280main ()
4281{
4282return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4283  ;
4284  return 0;
4285}
4286_ACEOF
4287for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4288	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4289do
4290  CC="$ac_save_CC $ac_arg"
4291  if ac_fn_c_try_compile "$LINENO"; then :
4292  ac_cv_prog_cc_c89=$ac_arg
4293fi
4294rm -f core conftest.err conftest.$ac_objext
4295  test "x$ac_cv_prog_cc_c89" != "xno" && break
4296done
4297rm -f conftest.$ac_ext
4298CC=$ac_save_CC
4299
4300fi
4301# AC_CACHE_VAL
4302case "x$ac_cv_prog_cc_c89" in
4303  x)
4304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4305$as_echo "none needed" >&6; } ;;
4306  xno)
4307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4308$as_echo "unsupported" >&6; } ;;
4309  *)
4310    CC="$CC $ac_cv_prog_cc_c89"
4311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4312$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4313esac
4314if test "x$ac_cv_prog_cc_c89" != xno; then :
4315
4316fi
4317
4318ac_ext=c
4319ac_cpp='$CPP $CPPFLAGS'
4320ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4321ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4322ac_compiler_gnu=$ac_cv_c_compiler_gnu
4323
4324    ac_ext=c
4325ac_cpp='$CPP $CPPFLAGS'
4326ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4327ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4328ac_compiler_gnu=$ac_cv_c_compiler_gnu
4329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4330$as_echo_n "checking how to run the C preprocessor... " >&6; }
4331# On Suns, sometimes $CPP names a directory.
4332if test -n "$CPP" && test -d "$CPP"; then
4333  CPP=
4334fi
4335if test -z "$CPP"; then
4336  if ${ac_cv_prog_CPP+:} false; then :
4337  $as_echo_n "(cached) " >&6
4338else
4339      # Double quotes because CPP needs to be expanded
4340    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4341    do
4342      ac_preproc_ok=false
4343for ac_c_preproc_warn_flag in '' yes
4344do
4345  # Use a header file that comes with gcc, so configuring glibc
4346  # with a fresh cross-compiler works.
4347  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4348  # <limits.h> exists even on freestanding compilers.
4349  # On the NeXT, cc -E runs the code through the compiler's parser,
4350  # not just through cpp. "Syntax error" is here to catch this case.
4351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4352/* end confdefs.h.  */
4353#ifdef __STDC__
4354# include <limits.h>
4355#else
4356# include <assert.h>
4357#endif
4358		     Syntax error
4359_ACEOF
4360if ac_fn_c_try_cpp "$LINENO"; then :
4361
4362else
4363  # Broken: fails on valid input.
4364continue
4365fi
4366rm -f conftest.err conftest.i conftest.$ac_ext
4367
4368  # OK, works on sane cases.  Now check whether nonexistent headers
4369  # can be detected and how.
4370  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4371/* end confdefs.h.  */
4372#include <ac_nonexistent.h>
4373_ACEOF
4374if ac_fn_c_try_cpp "$LINENO"; then :
4375  # Broken: success on invalid input.
4376continue
4377else
4378  # Passes both tests.
4379ac_preproc_ok=:
4380break
4381fi
4382rm -f conftest.err conftest.i conftest.$ac_ext
4383
4384done
4385# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4386rm -f conftest.i conftest.err conftest.$ac_ext
4387if $ac_preproc_ok; then :
4388  break
4389fi
4390
4391    done
4392    ac_cv_prog_CPP=$CPP
4393
4394fi
4395  CPP=$ac_cv_prog_CPP
4396else
4397  ac_cv_prog_CPP=$CPP
4398fi
4399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4400$as_echo "$CPP" >&6; }
4401ac_preproc_ok=false
4402for ac_c_preproc_warn_flag in '' yes
4403do
4404  # Use a header file that comes with gcc, so configuring glibc
4405  # with a fresh cross-compiler works.
4406  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4407  # <limits.h> exists even on freestanding compilers.
4408  # On the NeXT, cc -E runs the code through the compiler's parser,
4409  # not just through cpp. "Syntax error" is here to catch this case.
4410  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4411/* end confdefs.h.  */
4412#ifdef __STDC__
4413# include <limits.h>
4414#else
4415# include <assert.h>
4416#endif
4417		     Syntax error
4418_ACEOF
4419if ac_fn_c_try_cpp "$LINENO"; then :
4420
4421else
4422  # Broken: fails on valid input.
4423continue
4424fi
4425rm -f conftest.err conftest.i conftest.$ac_ext
4426
4427  # OK, works on sane cases.  Now check whether nonexistent headers
4428  # can be detected and how.
4429  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4430/* end confdefs.h.  */
4431#include <ac_nonexistent.h>
4432_ACEOF
4433if ac_fn_c_try_cpp "$LINENO"; then :
4434  # Broken: success on invalid input.
4435continue
4436else
4437  # Passes both tests.
4438ac_preproc_ok=:
4439break
4440fi
4441rm -f conftest.err conftest.i conftest.$ac_ext
4442
4443done
4444# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4445rm -f conftest.i conftest.err conftest.$ac_ext
4446if $ac_preproc_ok; then :
4447
4448else
4449  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4450$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4451as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4452See \`config.log' for more details" "$LINENO" 5; }
4453fi
4454
4455ac_ext=c
4456ac_cpp='$CPP $CPPFLAGS'
4457ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4458ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4459ac_compiler_gnu=$ac_cv_c_compiler_gnu
4460
4461
4462    #--------------------------------------------------------------------
4463    # Checks to see if the make program sets the $MAKE variable.
4464    #--------------------------------------------------------------------
4465
4466    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4467$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4468set x ${MAKE-make}
4469ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4470if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4471  $as_echo_n "(cached) " >&6
4472else
4473  cat >conftest.make <<\_ACEOF
4474SHELL = /bin/sh
4475all:
4476	@echo '@@@%%%=$(MAKE)=@@@%%%'
4477_ACEOF
4478# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4479case `${MAKE-make} -f conftest.make 2>/dev/null` in
4480  *@@@%%%=?*=@@@%%%*)
4481    eval ac_cv_prog_make_${ac_make}_set=yes;;
4482  *)
4483    eval ac_cv_prog_make_${ac_make}_set=no;;
4484esac
4485rm -f conftest.make
4486fi
4487if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4489$as_echo "yes" >&6; }
4490  SET_MAKE=
4491else
4492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4493$as_echo "no" >&6; }
4494  SET_MAKE="MAKE=${MAKE-make}"
4495fi
4496
4497
4498    #--------------------------------------------------------------------
4499    # Find ranlib
4500    #--------------------------------------------------------------------
4501
4502    if test -n "$ac_tool_prefix"; then
4503  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4504set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4506$as_echo_n "checking for $ac_word... " >&6; }
4507if ${ac_cv_prog_RANLIB+:} false; then :
4508  $as_echo_n "(cached) " >&6
4509else
4510  if test -n "$RANLIB"; then
4511  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4512else
4513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4514for as_dir in $PATH
4515do
4516  IFS=$as_save_IFS
4517  test -z "$as_dir" && as_dir=.
4518    for ac_exec_ext in '' $ac_executable_extensions; do
4519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4520    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4522    break 2
4523  fi
4524done
4525  done
4526IFS=$as_save_IFS
4527
4528fi
4529fi
4530RANLIB=$ac_cv_prog_RANLIB
4531if test -n "$RANLIB"; then
4532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4533$as_echo "$RANLIB" >&6; }
4534else
4535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4536$as_echo "no" >&6; }
4537fi
4538
4539
4540fi
4541if test -z "$ac_cv_prog_RANLIB"; then
4542  ac_ct_RANLIB=$RANLIB
4543  # Extract the first word of "ranlib", so it can be a program name with args.
4544set dummy ranlib; ac_word=$2
4545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4546$as_echo_n "checking for $ac_word... " >&6; }
4547if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4548  $as_echo_n "(cached) " >&6
4549else
4550  if test -n "$ac_ct_RANLIB"; then
4551  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4552else
4553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4554for as_dir in $PATH
4555do
4556  IFS=$as_save_IFS
4557  test -z "$as_dir" && as_dir=.
4558    for ac_exec_ext in '' $ac_executable_extensions; do
4559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4560    ac_cv_prog_ac_ct_RANLIB="ranlib"
4561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4562    break 2
4563  fi
4564done
4565  done
4566IFS=$as_save_IFS
4567
4568fi
4569fi
4570ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4571if test -n "$ac_ct_RANLIB"; then
4572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4573$as_echo "$ac_ct_RANLIB" >&6; }
4574else
4575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4576$as_echo "no" >&6; }
4577fi
4578
4579  if test "x$ac_ct_RANLIB" = x; then
4580    RANLIB=""
4581  else
4582    case $cross_compiling:$ac_tool_warned in
4583yes:)
4584{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4585$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4586ac_tool_warned=yes ;;
4587esac
4588    RANLIB=$ac_ct_RANLIB
4589  fi
4590else
4591  RANLIB="$ac_cv_prog_RANLIB"
4592fi
4593
4594
4595    #--------------------------------------------------------------------
4596    # Determines the correct binary file extension (.o, .obj, .exe etc.)
4597    #--------------------------------------------------------------------
4598
4599
4600
4601
4602
4603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4604$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4605if ${ac_cv_path_GREP+:} false; then :
4606  $as_echo_n "(cached) " >&6
4607else
4608  if test -z "$GREP"; then
4609  ac_path_GREP_found=false
4610  # Loop through the user's path and test for each of PROGNAME-LIST
4611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4612for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4613do
4614  IFS=$as_save_IFS
4615  test -z "$as_dir" && as_dir=.
4616    for ac_prog in grep ggrep; do
4617    for ac_exec_ext in '' $ac_executable_extensions; do
4618      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4619      as_fn_executable_p "$ac_path_GREP" || continue
4620# Check for GNU ac_path_GREP and select it if it is found.
4621  # Check for GNU $ac_path_GREP
4622case `"$ac_path_GREP" --version 2>&1` in
4623*GNU*)
4624  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4625*)
4626  ac_count=0
4627  $as_echo_n 0123456789 >"conftest.in"
4628  while :
4629  do
4630    cat "conftest.in" "conftest.in" >"conftest.tmp"
4631    mv "conftest.tmp" "conftest.in"
4632    cp "conftest.in" "conftest.nl"
4633    $as_echo 'GREP' >> "conftest.nl"
4634    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4635    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4636    as_fn_arith $ac_count + 1 && ac_count=$as_val
4637    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4638      # Best one so far, save it but keep looking for a better one
4639      ac_cv_path_GREP="$ac_path_GREP"
4640      ac_path_GREP_max=$ac_count
4641    fi
4642    # 10*(2^10) chars as input seems more than enough
4643    test $ac_count -gt 10 && break
4644  done
4645  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4646esac
4647
4648      $ac_path_GREP_found && break 3
4649    done
4650  done
4651  done
4652IFS=$as_save_IFS
4653  if test -z "$ac_cv_path_GREP"; then
4654    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4655  fi
4656else
4657  ac_cv_path_GREP=$GREP
4658fi
4659
4660fi
4661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4662$as_echo "$ac_cv_path_GREP" >&6; }
4663 GREP="$ac_cv_path_GREP"
4664
4665
4666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4667$as_echo_n "checking for egrep... " >&6; }
4668if ${ac_cv_path_EGREP+:} false; then :
4669  $as_echo_n "(cached) " >&6
4670else
4671  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4672   then ac_cv_path_EGREP="$GREP -E"
4673   else
4674     if test -z "$EGREP"; then
4675  ac_path_EGREP_found=false
4676  # Loop through the user's path and test for each of PROGNAME-LIST
4677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4678for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4679do
4680  IFS=$as_save_IFS
4681  test -z "$as_dir" && as_dir=.
4682    for ac_prog in egrep; do
4683    for ac_exec_ext in '' $ac_executable_extensions; do
4684      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4685      as_fn_executable_p "$ac_path_EGREP" || continue
4686# Check for GNU ac_path_EGREP and select it if it is found.
4687  # Check for GNU $ac_path_EGREP
4688case `"$ac_path_EGREP" --version 2>&1` in
4689*GNU*)
4690  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4691*)
4692  ac_count=0
4693  $as_echo_n 0123456789 >"conftest.in"
4694  while :
4695  do
4696    cat "conftest.in" "conftest.in" >"conftest.tmp"
4697    mv "conftest.tmp" "conftest.in"
4698    cp "conftest.in" "conftest.nl"
4699    $as_echo 'EGREP' >> "conftest.nl"
4700    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4701    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4702    as_fn_arith $ac_count + 1 && ac_count=$as_val
4703    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4704      # Best one so far, save it but keep looking for a better one
4705      ac_cv_path_EGREP="$ac_path_EGREP"
4706      ac_path_EGREP_max=$ac_count
4707    fi
4708    # 10*(2^10) chars as input seems more than enough
4709    test $ac_count -gt 10 && break
4710  done
4711  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4712esac
4713
4714      $ac_path_EGREP_found && break 3
4715    done
4716  done
4717  done
4718IFS=$as_save_IFS
4719  if test -z "$ac_cv_path_EGREP"; then
4720    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4721  fi
4722else
4723  ac_cv_path_EGREP=$EGREP
4724fi
4725
4726   fi
4727fi
4728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4729$as_echo "$ac_cv_path_EGREP" >&6; }
4730 EGREP="$ac_cv_path_EGREP"
4731
4732
4733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4734$as_echo_n "checking for ANSI C header files... " >&6; }
4735if ${ac_cv_header_stdc+:} false; then :
4736  $as_echo_n "(cached) " >&6
4737else
4738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4739/* end confdefs.h.  */
4740#include <stdlib.h>
4741#include <stdarg.h>
4742#include <string.h>
4743#include <float.h>
4744
4745int
4746main ()
4747{
4748
4749  ;
4750  return 0;
4751}
4752_ACEOF
4753if ac_fn_c_try_compile "$LINENO"; then :
4754  ac_cv_header_stdc=yes
4755else
4756  ac_cv_header_stdc=no
4757fi
4758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4759
4760if test $ac_cv_header_stdc = yes; then
4761  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4762  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4763/* end confdefs.h.  */
4764#include <string.h>
4765
4766_ACEOF
4767if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4768  $EGREP "memchr" >/dev/null 2>&1; then :
4769
4770else
4771  ac_cv_header_stdc=no
4772fi
4773rm -f conftest*
4774
4775fi
4776
4777if test $ac_cv_header_stdc = yes; then
4778  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4779  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4780/* end confdefs.h.  */
4781#include <stdlib.h>
4782
4783_ACEOF
4784if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4785  $EGREP "free" >/dev/null 2>&1; then :
4786
4787else
4788  ac_cv_header_stdc=no
4789fi
4790rm -f conftest*
4791
4792fi
4793
4794if test $ac_cv_header_stdc = yes; then
4795  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4796  if test "$cross_compiling" = yes; then :
4797  :
4798else
4799  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4800/* end confdefs.h.  */
4801#include <ctype.h>
4802#include <stdlib.h>
4803#if ((' ' & 0x0FF) == 0x020)
4804# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4805# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4806#else
4807# define ISLOWER(c) \
4808		   (('a' <= (c) && (c) <= 'i') \
4809		     || ('j' <= (c) && (c) <= 'r') \
4810		     || ('s' <= (c) && (c) <= 'z'))
4811# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4812#endif
4813
4814#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4815int
4816main ()
4817{
4818  int i;
4819  for (i = 0; i < 256; i++)
4820    if (XOR (islower (i), ISLOWER (i))
4821	|| toupper (i) != TOUPPER (i))
4822      return 2;
4823  return 0;
4824}
4825_ACEOF
4826if ac_fn_c_try_run "$LINENO"; then :
4827
4828else
4829  ac_cv_header_stdc=no
4830fi
4831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4832  conftest.$ac_objext conftest.beam conftest.$ac_ext
4833fi
4834
4835fi
4836fi
4837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4838$as_echo "$ac_cv_header_stdc" >&6; }
4839if test $ac_cv_header_stdc = yes; then
4840
4841$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4842
4843fi
4844
4845# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4846for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4847		  inttypes.h stdint.h unistd.h
4848do :
4849  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4850ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4851"
4852if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4853  cat >>confdefs.h <<_ACEOF
4854#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4855_ACEOF
4856
4857fi
4858
4859done
4860
4861
4862
4863    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4864
4865
4866    #------------------------------------------------------------------------
4867    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4868    # It makes compiling go faster.  (This is only a performance feature.)
4869    #------------------------------------------------------------------------
4870
4871    if test -z "$no_pipe" -a -n "$GCC"; then
4872	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5
4873$as_echo_n "checking if the compiler understands -pipe... " >&6; }
4874if ${tcl_cv_cc_pipe+:} false; then :
4875  $as_echo_n "(cached) " >&6
4876else
4877
4878	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4879	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4880/* end confdefs.h.  */
4881
4882int
4883main ()
4884{
4885
4886  ;
4887  return 0;
4888}
4889_ACEOF
4890if ac_fn_c_try_compile "$LINENO"; then :
4891  tcl_cv_cc_pipe=yes
4892else
4893  tcl_cv_cc_pipe=no
4894fi
4895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4896	    CFLAGS=$hold_cflags
4897fi
4898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5
4899$as_echo "$tcl_cv_cc_pipe" >&6; }
4900	if test $tcl_cv_cc_pipe = yes; then
4901	    CFLAGS="$CFLAGS -pipe"
4902	fi
4903    fi
4904
4905    #--------------------------------------------------------------------
4906    # Common compiler flag setup
4907    #--------------------------------------------------------------------
4908
4909     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
4910$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
4911if ${ac_cv_c_bigendian+:} false; then :
4912  $as_echo_n "(cached) " >&6
4913else
4914  ac_cv_c_bigendian=unknown
4915    # See if we're dealing with a universal compiler.
4916    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4917/* end confdefs.h.  */
4918#ifndef __APPLE_CC__
4919	       not a universal capable compiler
4920	     #endif
4921	     typedef int dummy;
4922
4923_ACEOF
4924if ac_fn_c_try_compile "$LINENO"; then :
4925
4926	# Check for potential -arch flags.  It is not universal unless
4927	# there are at least two -arch flags with different values.
4928	ac_arch=
4929	ac_prev=
4930	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
4931	 if test -n "$ac_prev"; then
4932	   case $ac_word in
4933	     i?86 | x86_64 | ppc | ppc64)
4934	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
4935		 ac_arch=$ac_word
4936	       else
4937		 ac_cv_c_bigendian=universal
4938		 break
4939	       fi
4940	       ;;
4941	   esac
4942	   ac_prev=
4943	 elif test "x$ac_word" = "x-arch"; then
4944	   ac_prev=arch
4945	 fi
4946       done
4947fi
4948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4949    if test $ac_cv_c_bigendian = unknown; then
4950      # See if sys/param.h defines the BYTE_ORDER macro.
4951      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4952/* end confdefs.h.  */
4953#include <sys/types.h>
4954	     #include <sys/param.h>
4955
4956int
4957main ()
4958{
4959#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
4960		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
4961		     && LITTLE_ENDIAN)
4962	      bogus endian macros
4963	     #endif
4964
4965  ;
4966  return 0;
4967}
4968_ACEOF
4969if ac_fn_c_try_compile "$LINENO"; then :
4970  # It does; now see whether it defined to BIG_ENDIAN or not.
4971	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4972/* end confdefs.h.  */
4973#include <sys/types.h>
4974		#include <sys/param.h>
4975
4976int
4977main ()
4978{
4979#if BYTE_ORDER != BIG_ENDIAN
4980		 not big endian
4981		#endif
4982
4983  ;
4984  return 0;
4985}
4986_ACEOF
4987if ac_fn_c_try_compile "$LINENO"; then :
4988  ac_cv_c_bigendian=yes
4989else
4990  ac_cv_c_bigendian=no
4991fi
4992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4993fi
4994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4995    fi
4996    if test $ac_cv_c_bigendian = unknown; then
4997      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
4998      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4999/* end confdefs.h.  */
5000#include <limits.h>
5001
5002int
5003main ()
5004{
5005#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
5006	      bogus endian macros
5007	     #endif
5008
5009  ;
5010  return 0;
5011}
5012_ACEOF
5013if ac_fn_c_try_compile "$LINENO"; then :
5014  # It does; now see whether it defined to _BIG_ENDIAN or not.
5015	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5016/* end confdefs.h.  */
5017#include <limits.h>
5018
5019int
5020main ()
5021{
5022#ifndef _BIG_ENDIAN
5023		 not big endian
5024		#endif
5025
5026  ;
5027  return 0;
5028}
5029_ACEOF
5030if ac_fn_c_try_compile "$LINENO"; then :
5031  ac_cv_c_bigendian=yes
5032else
5033  ac_cv_c_bigendian=no
5034fi
5035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5036fi
5037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5038    fi
5039    if test $ac_cv_c_bigendian = unknown; then
5040      # Compile a test program.
5041      if test "$cross_compiling" = yes; then :
5042  # Try to guess by grepping values from an object file.
5043	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5044/* end confdefs.h.  */
5045short int ascii_mm[] =
5046		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
5047		short int ascii_ii[] =
5048		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
5049		int use_ascii (int i) {
5050		  return ascii_mm[i] + ascii_ii[i];
5051		}
5052		short int ebcdic_ii[] =
5053		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
5054		short int ebcdic_mm[] =
5055		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
5056		int use_ebcdic (int i) {
5057		  return ebcdic_mm[i] + ebcdic_ii[i];
5058		}
5059		extern int foo;
5060
5061int
5062main ()
5063{
5064return use_ascii (foo) == use_ebcdic (foo);
5065  ;
5066  return 0;
5067}
5068_ACEOF
5069if ac_fn_c_try_compile "$LINENO"; then :
5070  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
5071	      ac_cv_c_bigendian=yes
5072	    fi
5073	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
5074	      if test "$ac_cv_c_bigendian" = unknown; then
5075		ac_cv_c_bigendian=no
5076	      else
5077		# finding both strings is unlikely to happen, but who knows?
5078		ac_cv_c_bigendian=unknown
5079	      fi
5080	    fi
5081fi
5082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5083else
5084  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5085/* end confdefs.h.  */
5086$ac_includes_default
5087int
5088main ()
5089{
5090
5091	     /* Are we little or big endian?  From Harbison&Steele.  */
5092	     union
5093	     {
5094	       long int l;
5095	       char c[sizeof (long int)];
5096	     } u;
5097	     u.l = 1;
5098	     return u.c[sizeof (long int) - 1] == 1;
5099
5100  ;
5101  return 0;
5102}
5103_ACEOF
5104if ac_fn_c_try_run "$LINENO"; then :
5105  ac_cv_c_bigendian=no
5106else
5107  ac_cv_c_bigendian=yes
5108fi
5109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5110  conftest.$ac_objext conftest.beam conftest.$ac_ext
5111fi
5112
5113    fi
5114fi
5115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
5116$as_echo "$ac_cv_c_bigendian" >&6; }
5117 case $ac_cv_c_bigendian in #(
5118   yes)
5119     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
5120;; #(
5121   no)
5122      ;; #(
5123   universal)
5124
5125$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5126
5127     ;; #(
5128   *)
5129     as_fn_error $? "unknown endianness
5130 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
5131 esac
5132
5133
5134
5135
5136    #
5137    # Ok, lets find the tkimg configuration
5138    # First, look for one uninstalled.
5139    # the alternative search directory is invoked by --with-tkimg
5140    #
5141
5142    if test x"${no_tkimg}" = x ; then
5143	# we reset no_tkimg in case something fails here
5144	no_tkimg=true
5145
5146# Check whether --with-tkimg was given.
5147if test "${with_tkimg+set}" = set; then :
5148  withval=$with_tkimg; with_tkimgconfig=${withval}
5149fi
5150
5151	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tkimg configuration" >&5
5152$as_echo_n "checking for tkimg configuration... " >&6; }
5153	if ${ac_cv_c_tkimgconfig+:} false; then :
5154  $as_echo_n "(cached) " >&6
5155else
5156
5157
5158	    # First check to see if --with-tkimg was specified.
5159	    if test x"${with_tkimgconfig}" != x ; then
5160		case ${with_tkimgconfig} in
5161		    */tkimgConfig.sh )
5162			if test -f ${with_tkimgconfig}; then
5163			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tkimg argument should refer to directory containing tkimgConfig.sh, not to tkimgConfig.sh itself" >&5
5164$as_echo "$as_me: WARNING: --with-tkimg argument should refer to directory containing tkimgConfig.sh, not to tkimgConfig.sh itself" >&2;}
5165			    with_tkimgconfig=`echo ${with_tkimgconfig} | sed 's!/tkimgConfig\.sh$!!'`
5166			fi;;
5167		esac
5168		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
5169		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
5170		else
5171		    as_fn_error $? "${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" "$LINENO" 5
5172		fi
5173	    fi
5174
5175	    # then check for a private tkimg installation
5176	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
5177		for i in \
5178			../tkimg \
5179			`ls -dr ../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5180			`ls -dr ../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
5181			`ls -dr ../tkimg*[0-9].[0-9] 2>/dev/null` \
5182			`ls -dr ../tkimg*[0-9].[0-9]* 2>/dev/null` \
5183			../../tkimg \
5184			`ls -dr ../../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5185			`ls -dr ../../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
5186			`ls -dr ../../tkimg*[0-9].[0-9] 2>/dev/null` \
5187			`ls -dr ../../tkimg*[0-9].[0-9]* 2>/dev/null` \
5188			../../../tkimg \
5189			`ls -dr ../../../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5190			`ls -dr ../../../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
5191			`ls -dr ../../../tkimg*[0-9].[0-9] 2>/dev/null` \
5192			`ls -dr ../../../tkimg*[0-9].[0-9]* 2>/dev/null` \
5193			${srcdir}/../tkimg \
5194			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5195			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
5196			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9] 2>/dev/null` \
5197			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9]* 2>/dev/null` \
5198			; do
5199		    if test -f "$i/tkimgConfig.sh" ; then
5200			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
5201			break
5202		    fi
5203		    if test -f "$i/unix/tkimgConfig.sh" ; then
5204			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
5205			break
5206		    fi
5207		done
5208	    fi
5209
5210	    # check in a few common install locations
5211	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
5212		for i in `ls -d ${libdir} 2>/dev/null` \
5213			`ls -d ${exec_prefix}/lib 2>/dev/null` \
5214			`ls -d ${prefix}/lib 2>/dev/null` \
5215			`ls -d /usr/local/lib 2>/dev/null` \
5216			`ls -d /usr/contrib/lib 2>/dev/null` \
5217			`ls -d /usr/pkg/lib 2>/dev/null` \
5218			`ls -d /usr/lib 2>/dev/null` \
5219			`ls -d /usr/lib64 2>/dev/null` \
5220			; do
5221		    if test -f "$i/tkimgConfig.sh" ; then
5222			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
5223			break
5224		    fi
5225		done
5226	    fi
5227
5228fi
5229
5230
5231	if test x"${ac_cv_c_tkimgconfig}" = x ; then
5232	    tkimg_BIN_DIR="# no tkimg configs found"
5233	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find tkimg configuration definitions" >&5
5234$as_echo "$as_me: WARNING: Cannot find tkimg configuration definitions" >&2;}
5235	    exit 0
5236	else
5237	    no_tkimg=
5238	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
5239	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $tkimg_BIN_DIR/tkimgConfig.sh" >&5
5240$as_echo "found $tkimg_BIN_DIR/tkimgConfig.sh" >&6; }
5241	fi
5242    fi
5243
5244
5245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
5246$as_echo_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh... " >&6; }
5247
5248    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
5249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
5250$as_echo "loading" >&6; }
5251	. "${tkimg_BIN_DIR}/tkimgConfig.sh"
5252    else
5253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
5254$as_echo "file not found" >&6; }
5255    fi
5256
5257    #
5258    # If the tkimg_BIN_DIR is the build directory (not the install directory),
5259    # then set the common variable name to the value of the build variables.
5260    # For example, the variable tkimg_LIB_SPEC will be set to the value
5261    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
5262    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
5263    # installed and uninstalled version of Tcl.
5264    #
5265
5266    if test -f "${tkimg_BIN_DIR}/Makefile" ; then
5267	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found Makefile - using build library specs for tkimg" >&5
5268$as_echo "$as_me: WARNING: Found Makefile - using build library specs for tkimg" >&2;}
5269        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
5270        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
5271        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
5272        tkimg_INCLUDE_SPEC=${tkimg_BUILD_INCLUDE_SPEC}
5273        tkimg_LIBRARY_PATH=${tkimg_LIBRARY_PATH}
5274    fi
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287    # Allow the caller to prevent this auto-check by specifying any 2nd arg
5288    if test "x" = x; then :
5289
5290	# Check both upper and lower-case variants
5291	# If a dev wanted non-stubs libs, this function could take an option
5292	# to not use _STUB in the paths below
5293	if test "x${tkimg_STUB_LIB_SPEC}" = x; then :
5294
5295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking For TKIMG_STUB library for LIBS" >&5
5296$as_echo_n "checking For TKIMG_STUB library for LIBS... " >&6; }
5297    # This simplifies the use of stub libraries by automatically adding
5298    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
5299    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
5300    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
5301    if test "x${TKIMG_STUB_LIB_SPEC}" != "x" ; then
5302	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
5303
5304    vars="\"`${CYGPATH} ${TKIMG_STUB_LIB_PATH}`\""
5305    for i in $vars; do
5306	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5307	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5308	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5309	fi
5310	PKG_LIBS="$PKG_LIBS $i"
5311    done
5312
5313
5314	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using TKIMG_STUB_LIB_PATH ${TKIMG_STUB_LIB_PATH}" >&5
5315$as_echo "using TKIMG_STUB_LIB_PATH ${TKIMG_STUB_LIB_PATH}" >&6; }
5316	else
5317
5318    vars="${TKIMG_STUB_LIB_SPEC}"
5319    for i in $vars; do
5320	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5321	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5322	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5323	fi
5324	PKG_LIBS="$PKG_LIBS $i"
5325    done
5326
5327
5328	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using TKIMG_STUB_LIB_SPEC ${TKIMG_STUB_LIB_SPEC}" >&5
5329$as_echo "using TKIMG_STUB_LIB_SPEC ${TKIMG_STUB_LIB_SPEC}" >&6; }
5330	fi
5331    else
5332	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
5333$as_echo "file not found" >&6; }
5334    fi
5335
5336else
5337
5338    { $as_echo "$as_me:${as_lineno-$LINENO}: checking For tkimg_STUB library for LIBS" >&5
5339$as_echo_n "checking For tkimg_STUB library for LIBS... " >&6; }
5340    # This simplifies the use of stub libraries by automatically adding
5341    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
5342    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
5343    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
5344    if test "x${tkimg_STUB_LIB_SPEC}" != "x" ; then
5345	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
5346
5347    vars="\"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
5348    for i in $vars; do
5349	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5350	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5351	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5352	fi
5353	PKG_LIBS="$PKG_LIBS $i"
5354    done
5355
5356
5357	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using tkimg_STUB_LIB_PATH ${tkimg_STUB_LIB_PATH}" >&5
5358$as_echo "using tkimg_STUB_LIB_PATH ${tkimg_STUB_LIB_PATH}" >&6; }
5359	else
5360
5361    vars="${tkimg_STUB_LIB_SPEC}"
5362    for i in $vars; do
5363	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5364	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5365	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5366	fi
5367	PKG_LIBS="$PKG_LIBS $i"
5368    done
5369
5370
5371	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using tkimg_STUB_LIB_SPEC ${tkimg_STUB_LIB_SPEC}" >&5
5372$as_echo "using tkimg_STUB_LIB_SPEC ${tkimg_STUB_LIB_SPEC}" >&6; }
5373	fi
5374    else
5375	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
5376$as_echo "file not found" >&6; }
5377    fi
5378
5379fi
5380
5381fi
5382
5383
5384
5385#--------------------------------------------------------------------
5386# Compute an absolute path to the src directory of module 'tkimg' so
5387# that we are able to find its headers even if they are not installed.
5388#--------------------------------------------------------------------
5389
5390case $tkimg_SRC_DIR in
5391/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
5392	;;
5393*)	# SRC_DIR relative, splice with BUILD_PATH
5394	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
5395esac
5396
5397tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
5398
5399if test "${TEA_PLATFORM}" = "windows" ; then
5400    tkimg_SRC_PATH="`$CYGPATH $tkimg_SRC_PATH`"
5401    tkimg_BUILD_PATH="`$CYGPATH $tkimg_BUILD_PATH`"
5402fi
5403
5404
5405
5406
5407
5408#-----------------------------------------------------------------------
5409# Specify the C source files to compile in TEA_ADD_SOURCES,
5410# public headers that need to be installed in TEA_ADD_HEADERS,
5411# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
5412# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
5413# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
5414# and PKG_TCL_SOURCES.
5415#-----------------------------------------------------------------------
5416
5417
5418    vars="xbm.c"
5419    for i in $vars; do
5420	case $i in
5421	    \$*)
5422		# allow $-var names
5423		PKG_SOURCES="$PKG_SOURCES $i"
5424		PKG_OBJECTS="$PKG_OBJECTS $i"
5425		;;
5426	    *)
5427		# check for existence - allows for generic/win/unix VPATH
5428		# To add more dirs here (like 'src'), you have to update VPATH
5429		# in Makefile.in as well
5430		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
5431		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
5432		    -a ! -f "${srcdir}/macosx/$i" \
5433		    ; then
5434		    as_fn_error $? "could not find source file '$i'" "$LINENO" 5
5435		fi
5436		PKG_SOURCES="$PKG_SOURCES $i"
5437		# this assumes it is in a VPATH dir
5438		i=`basename $i`
5439		# handle user calling this before or after TEA_SETUP_COMPILER
5440		if test x"${OBJEXT}" != x ; then
5441		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
5442		else
5443		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
5444		fi
5445		PKG_OBJECTS="$PKG_OBJECTS $j"
5446		;;
5447	esac
5448    done
5449
5450
5451
5452
5453    vars=""
5454    for i in $vars; do
5455	# check for existence, be strict because it is installed
5456	if test ! -f "${srcdir}/$i" ; then
5457	    as_fn_error $? "could not find header file '${srcdir}/$i'" "$LINENO" 5
5458	fi
5459	PKG_HEADERS="$PKG_HEADERS $i"
5460    done
5461
5462
5463
5464    vars="-I\"`\${CYGPATH} \${tkimg_SRC_PATH}`\""
5465    for i in $vars; do
5466	PKG_INCLUDES="$PKG_INCLUDES $i"
5467    done
5468
5469
5470
5471    vars="-I."
5472    for i in $vars; do
5473	PKG_INCLUDES="$PKG_INCLUDES $i"
5474    done
5475
5476
5477
5478    vars=""
5479    for i in $vars; do
5480	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5481	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5482	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5483	fi
5484	PKG_LIBS="$PKG_LIBS $i"
5485    done
5486
5487
5488
5489    PKG_CFLAGS="$PKG_CFLAGS "
5490
5491
5492
5493    PKG_CFLAGS="$PKG_CFLAGS -DTKIMG_VERSION=\\\"\${tkimg_VERSION}\\\""
5494
5495
5496
5497    vars=""
5498    for i in $vars; do
5499	# check for existence - allows for generic/win/unix VPATH
5500	if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
5501	    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
5502	    -a ! -f "${srcdir}/macosx/$i" \
5503	    ; then
5504	    as_fn_error $? "could not find stub source file '$i'" "$LINENO" 5
5505	fi
5506	PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
5507	# this assumes it is in a VPATH dir
5508	i=`basename $i`
5509	# handle user calling this before or after TEA_SETUP_COMPILER
5510	if test x"${OBJEXT}" != x ; then
5511	    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
5512	else
5513	    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
5514	fi
5515	PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
5516    done
5517
5518
5519
5520
5521    vars=""
5522    for i in $vars; do
5523	# check for existence, be strict because it is installed
5524	if test ! -f "${srcdir}/$i" ; then
5525	    as_fn_error $? "could not find tcl source file '${srcdir}/$i'" "$LINENO" 5
5526	fi
5527	PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
5528    done
5529
5530
5531
5532PUP="`echo ${PACKAGE_NAME}| tr 'a-z' 'A-Z'`"
5533
5534sed < "`${CYGPATH} ${srcdir}/../init.c`" > "init.c"	\
5535	-e	"s/@CPACKAGE@/${CPACKAGE}/"		\
5536	-e	"s/%PACKAGE%/${PACKAGE_NAME}/"		\
5537	-e	"s/%PACKAGE_UP%/${PUP}/"		\
5538	-e	"s/%PHIMGTYPE%/${PHIMGTYPE}/"
5539
5540# init.c is an included source file, not a source by itself
5541# FUTURE: Do this through AC_OUTPUT!!
5542
5543#--------------------------------------------------------------------
5544# __CHANGE__
5545# Choose which headers you need.  Extension authors should try very
5546# hard to only rely on the Tcl public header files.  Internal headers
5547# contain private data structures and are subject to change without
5548# notice.
5549# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
5550#--------------------------------------------------------------------
5551
5552
5553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl public headers" >&5
5554$as_echo_n "checking for Tcl public headers... " >&6; }
5555
5556
5557# Check whether --with-tclinclude was given.
5558if test "${with_tclinclude+set}" = set; then :
5559  withval=$with_tclinclude; with_tclinclude=${withval}
5560fi
5561
5562
5563    if ${ac_cv_c_tclh+:} false; then :
5564  $as_echo_n "(cached) " >&6
5565else
5566
5567	# Use the value from --with-tclinclude, if it was given
5568
5569	if test x"${with_tclinclude}" != x ; then
5570	    if test -f "${with_tclinclude}/tcl.h" ; then
5571		ac_cv_c_tclh=${with_tclinclude}
5572	    else
5573		as_fn_error $? "${with_tclinclude} directory does not contain tcl.h" "$LINENO" 5
5574	    fi
5575	else
5576	    list=""
5577	    if test "`uname -s`" = "Darwin"; then
5578		# If Tcl was built as a framework, attempt to use
5579		# the framework's Headers directory
5580		case ${TCL_DEFS} in
5581		    *TCL_FRAMEWORK*)
5582			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
5583			;;
5584		esac
5585	    fi
5586
5587	    # Look in the source dir only if Tcl is not installed,
5588	    # and in that situation, look there before installed locations.
5589	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
5590		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
5591	    fi
5592
5593	    # Check order: pkg --prefix location, Tcl's --prefix location,
5594	    # relative to directory of tclConfig.sh.
5595
5596	    eval "temp_includedir=${includedir}"
5597	    list="$list \
5598		`ls -d ${temp_includedir}        2>/dev/null` \
5599		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
5600		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
5601	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
5602		list="$list /usr/local/include /usr/include"
5603		if test x"${TCL_INCLUDE_SPEC}" != x ; then
5604		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
5605		    list="$list `ls -d ${d} 2>/dev/null`"
5606		fi
5607	    fi
5608	    for i in $list ; do
5609		if test -f "$i/tcl.h" ; then
5610		    ac_cv_c_tclh=$i
5611		    break
5612		fi
5613	    done
5614	fi
5615
5616fi
5617
5618
5619    # Print a message based on how we determined the include path
5620
5621    if test x"${ac_cv_c_tclh}" = x ; then
5622	as_fn_error $? "tcl.h not found.  Please specify its location with --with-tclinclude" "$LINENO" 5
5623    else
5624	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5
5625$as_echo "${ac_cv_c_tclh}" >&6; }
5626    fi
5627
5628    # Convert to a native path and substitute into the output files.
5629
5630    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
5631
5632    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
5633
5634
5635
5636
5637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk public headers" >&5
5638$as_echo_n "checking for Tk public headers... " >&6; }
5639
5640
5641# Check whether --with-tkinclude was given.
5642if test "${with_tkinclude+set}" = set; then :
5643  withval=$with_tkinclude; with_tkinclude=${withval}
5644fi
5645
5646
5647    if ${ac_cv_c_tkh+:} false; then :
5648  $as_echo_n "(cached) " >&6
5649else
5650
5651	# Use the value from --with-tkinclude, if it was given
5652
5653	if test x"${with_tkinclude}" != x ; then
5654	    if test -f "${with_tkinclude}/tk.h" ; then
5655		ac_cv_c_tkh=${with_tkinclude}
5656	    else
5657		as_fn_error $? "${with_tkinclude} directory does not contain tk.h" "$LINENO" 5
5658	    fi
5659	else
5660	    list=""
5661	    if test "`uname -s`" = "Darwin"; then
5662		# If Tk was built as a framework, attempt to use
5663		# the framework's Headers directory.
5664		case ${TK_DEFS} in
5665		    *TK_FRAMEWORK*)
5666			list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
5667			;;
5668		esac
5669	    fi
5670
5671	    # Look in the source dir only if Tk is not installed,
5672	    # and in that situation, look there before installed locations.
5673	    if test -f "${TK_BIN_DIR}/Makefile" ; then
5674		list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
5675	    fi
5676
5677	    # Check order: pkg --prefix location, Tk's --prefix location,
5678	    # relative to directory of tkConfig.sh, Tcl's --prefix location,
5679	    # relative to directory of tclConfig.sh.
5680
5681	    eval "temp_includedir=${includedir}"
5682	    list="$list \
5683		`ls -d ${temp_includedir}        2>/dev/null` \
5684		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
5685		`ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
5686		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
5687		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
5688	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
5689		list="$list /usr/local/include /usr/include"
5690		if test x"${TK_INCLUDE_SPEC}" != x ; then
5691		    d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
5692		    list="$list `ls -d ${d} 2>/dev/null`"
5693		fi
5694	    fi
5695	    for i in $list ; do
5696		if test -f "$i/tk.h" ; then
5697		    ac_cv_c_tkh=$i
5698		    break
5699		fi
5700	    done
5701	fi
5702
5703fi
5704
5705
5706    # Print a message based on how we determined the include path
5707
5708    if test x"${ac_cv_c_tkh}" = x ; then
5709	as_fn_error $? "tk.h not found.  Please specify its location with --with-tkinclude" "$LINENO" 5
5710    else
5711	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tkh}" >&5
5712$as_echo "${ac_cv_c_tkh}" >&6; }
5713    fi
5714
5715    # Convert to a native path and substitute into the output files.
5716
5717    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
5718
5719    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
5720
5721
5722
5723    if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
5724	# On Windows and Aqua, we need the X compat headers
5725	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 header files" >&5
5726$as_echo_n "checking for X11 header files... " >&6; }
5727	if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
5728	    INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
5729	    TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
5730
5731	fi
5732	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${INCLUDE_DIR_NATIVE}" >&5
5733$as_echo "${INCLUDE_DIR_NATIVE}" >&6; }
5734    fi
5735
5736
5737#--------------------------------------------------------------------
5738# A few miscellaneous platform-specific items:
5739#
5740# Windows creates a few extra files that need to be cleaned up.
5741# We can add more files to clean if our extension creates any extra
5742# files in the future.
5743#
5744# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
5745# These will be appended to the current set of compiler flags for
5746# your system.
5747#--------------------------------------------------------------------
5748
5749if test "${TEA_PLATFORM}" = "windows" ; then
5750    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
5751fi
5752
5753
5754#--------------------------------------------------------------------
5755# Check whether --enable-threads or --disable-threads was given.
5756# So far only Tcl responds to this one.
5757#--------------------------------------------------------------------
5758
5759
5760    # Check whether --enable-threads was given.
5761if test "${enable_threads+set}" = set; then :
5762  enableval=$enable_threads; tcl_ok=$enableval
5763else
5764  tcl_ok=yes
5765fi
5766
5767
5768    if test "${enable_threads+set}" = set; then
5769	enableval="$enable_threads"
5770	tcl_ok=$enableval
5771    else
5772	tcl_ok=yes
5773    fi
5774
5775    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
5776	TCL_THREADS=1
5777
5778	if test "${TEA_PLATFORM}" != "windows" ; then
5779	    # We are always OK on Windows, so check what this platform wants:
5780
5781	    # USE_THREAD_ALLOC tells us to try the special thread-based
5782	    # allocator that significantly reduces lock contention
5783
5784$as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h
5785
5786
5787$as_echo "#define _REENTRANT 1" >>confdefs.h
5788
5789	    if test "`uname -s`" = "SunOS" ; then
5790
5791$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5792
5793	    fi
5794
5795$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
5796
5797	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5
5798$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; }
5799if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then :
5800  $as_echo_n "(cached) " >&6
5801else
5802  ac_check_lib_save_LIBS=$LIBS
5803LIBS="-lpthread  $LIBS"
5804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5805/* end confdefs.h.  */
5806
5807/* Override any GCC internal prototype to avoid an error.
5808   Use char because int might match the return type of a GCC
5809   builtin and then its argument prototype would still apply.  */
5810#ifdef __cplusplus
5811extern "C"
5812#endif
5813char pthread_mutex_init ();
5814int
5815main ()
5816{
5817return pthread_mutex_init ();
5818  ;
5819  return 0;
5820}
5821_ACEOF
5822if ac_fn_c_try_link "$LINENO"; then :
5823  ac_cv_lib_pthread_pthread_mutex_init=yes
5824else
5825  ac_cv_lib_pthread_pthread_mutex_init=no
5826fi
5827rm -f core conftest.err conftest.$ac_objext \
5828    conftest$ac_exeext conftest.$ac_ext
5829LIBS=$ac_check_lib_save_LIBS
5830fi
5831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
5832$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
5833if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then :
5834  tcl_ok=yes
5835else
5836  tcl_ok=no
5837fi
5838
5839	    if test "$tcl_ok" = "no"; then
5840		# Check a little harder for __pthread_mutex_init in the same
5841		# library, as some systems hide it there until pthread.h is
5842		# defined.  We could alternatively do an AC_TRY_COMPILE with
5843		# pthread.h, but that will work with libpthread really doesn't
5844		# exist, like AIX 4.2.  [Bug: 4359]
5845		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5
5846$as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; }
5847if ${ac_cv_lib_pthread___pthread_mutex_init+:} false; then :
5848  $as_echo_n "(cached) " >&6
5849else
5850  ac_check_lib_save_LIBS=$LIBS
5851LIBS="-lpthread  $LIBS"
5852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5853/* end confdefs.h.  */
5854
5855/* Override any GCC internal prototype to avoid an error.
5856   Use char because int might match the return type of a GCC
5857   builtin and then its argument prototype would still apply.  */
5858#ifdef __cplusplus
5859extern "C"
5860#endif
5861char __pthread_mutex_init ();
5862int
5863main ()
5864{
5865return __pthread_mutex_init ();
5866  ;
5867  return 0;
5868}
5869_ACEOF
5870if ac_fn_c_try_link "$LINENO"; then :
5871  ac_cv_lib_pthread___pthread_mutex_init=yes
5872else
5873  ac_cv_lib_pthread___pthread_mutex_init=no
5874fi
5875rm -f core conftest.err conftest.$ac_objext \
5876    conftest$ac_exeext conftest.$ac_ext
5877LIBS=$ac_check_lib_save_LIBS
5878fi
5879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
5880$as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
5881if test "x$ac_cv_lib_pthread___pthread_mutex_init" = xyes; then :
5882  tcl_ok=yes
5883else
5884  tcl_ok=no
5885fi
5886
5887	    fi
5888
5889	    if test "$tcl_ok" = "yes"; then
5890		# The space is needed
5891		THREADS_LIBS=" -lpthread"
5892	    else
5893		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5
5894$as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; }
5895if ${ac_cv_lib_pthreads_pthread_mutex_init+:} false; then :
5896  $as_echo_n "(cached) " >&6
5897else
5898  ac_check_lib_save_LIBS=$LIBS
5899LIBS="-lpthreads  $LIBS"
5900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5901/* end confdefs.h.  */
5902
5903/* Override any GCC internal prototype to avoid an error.
5904   Use char because int might match the return type of a GCC
5905   builtin and then its argument prototype would still apply.  */
5906#ifdef __cplusplus
5907extern "C"
5908#endif
5909char pthread_mutex_init ();
5910int
5911main ()
5912{
5913return pthread_mutex_init ();
5914  ;
5915  return 0;
5916}
5917_ACEOF
5918if ac_fn_c_try_link "$LINENO"; then :
5919  ac_cv_lib_pthreads_pthread_mutex_init=yes
5920else
5921  ac_cv_lib_pthreads_pthread_mutex_init=no
5922fi
5923rm -f core conftest.err conftest.$ac_objext \
5924    conftest$ac_exeext conftest.$ac_ext
5925LIBS=$ac_check_lib_save_LIBS
5926fi
5927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
5928$as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
5929if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = xyes; then :
5930  tcl_ok=yes
5931else
5932  tcl_ok=no
5933fi
5934
5935		if test "$tcl_ok" = "yes"; then
5936		    # The space is needed
5937		    THREADS_LIBS=" -lpthreads"
5938		else
5939		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5
5940$as_echo_n "checking for pthread_mutex_init in -lc... " >&6; }
5941if ${ac_cv_lib_c_pthread_mutex_init+:} false; then :
5942  $as_echo_n "(cached) " >&6
5943else
5944  ac_check_lib_save_LIBS=$LIBS
5945LIBS="-lc  $LIBS"
5946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5947/* end confdefs.h.  */
5948
5949/* Override any GCC internal prototype to avoid an error.
5950   Use char because int might match the return type of a GCC
5951   builtin and then its argument prototype would still apply.  */
5952#ifdef __cplusplus
5953extern "C"
5954#endif
5955char pthread_mutex_init ();
5956int
5957main ()
5958{
5959return pthread_mutex_init ();
5960  ;
5961  return 0;
5962}
5963_ACEOF
5964if ac_fn_c_try_link "$LINENO"; then :
5965  ac_cv_lib_c_pthread_mutex_init=yes
5966else
5967  ac_cv_lib_c_pthread_mutex_init=no
5968fi
5969rm -f core conftest.err conftest.$ac_objext \
5970    conftest$ac_exeext conftest.$ac_ext
5971LIBS=$ac_check_lib_save_LIBS
5972fi
5973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5
5974$as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; }
5975if test "x$ac_cv_lib_c_pthread_mutex_init" = xyes; then :
5976  tcl_ok=yes
5977else
5978  tcl_ok=no
5979fi
5980
5981		    if test "$tcl_ok" = "no"; then
5982			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5
5983$as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; }
5984if ${ac_cv_lib_c_r_pthread_mutex_init+:} false; then :
5985  $as_echo_n "(cached) " >&6
5986else
5987  ac_check_lib_save_LIBS=$LIBS
5988LIBS="-lc_r  $LIBS"
5989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5990/* end confdefs.h.  */
5991
5992/* Override any GCC internal prototype to avoid an error.
5993   Use char because int might match the return type of a GCC
5994   builtin and then its argument prototype would still apply.  */
5995#ifdef __cplusplus
5996extern "C"
5997#endif
5998char pthread_mutex_init ();
5999int
6000main ()
6001{
6002return pthread_mutex_init ();
6003  ;
6004  return 0;
6005}
6006_ACEOF
6007if ac_fn_c_try_link "$LINENO"; then :
6008  ac_cv_lib_c_r_pthread_mutex_init=yes
6009else
6010  ac_cv_lib_c_r_pthread_mutex_init=no
6011fi
6012rm -f core conftest.err conftest.$ac_objext \
6013    conftest$ac_exeext conftest.$ac_ext
6014LIBS=$ac_check_lib_save_LIBS
6015fi
6016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
6017$as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
6018if test "x$ac_cv_lib_c_r_pthread_mutex_init" = xyes; then :
6019  tcl_ok=yes
6020else
6021  tcl_ok=no
6022fi
6023
6024			if test "$tcl_ok" = "yes"; then
6025			    # The space is needed
6026			    THREADS_LIBS=" -pthread"
6027			else
6028			    TCL_THREADS=0
6029			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
6030$as_echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
6031			fi
6032		    fi
6033		fi
6034	    fi
6035	fi
6036    else
6037	TCL_THREADS=0
6038    fi
6039    # Do checking message here to not mess up interleaved configure output
6040    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5
6041$as_echo_n "checking for building with threads... " >&6; }
6042    if test "${TCL_THREADS}" = 1; then
6043
6044$as_echo "#define TCL_THREADS 1" >>confdefs.h
6045
6046	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
6047$as_echo "yes (default)" >&6; }
6048    else
6049	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6050$as_echo "no" >&6; }
6051    fi
6052    # TCL_THREADS sanity checking.  See if our request for building with
6053    # threads is the same as the way Tcl was built.  If not, warn the user.
6054    case ${TCL_DEFS} in
6055	*THREADS=1*)
6056	    if test "${TCL_THREADS}" = "0"; then
6057		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
6058    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
6059    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
6060$as_echo "$as_me: WARNING:
6061    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
6062    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
6063	    fi
6064	    ;;
6065    esac
6066
6067
6068
6069#--------------------------------------------------------------------
6070# The statement below defines a collection of symbols related to
6071# building as a shared library instead of a static library.
6072#--------------------------------------------------------------------
6073
6074
6075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
6076$as_echo_n "checking how to build libraries... " >&6; }
6077    # Check whether --enable-shared was given.
6078if test "${enable_shared+set}" = set; then :
6079  enableval=$enable_shared; shared_ok=$enableval
6080else
6081  shared_ok=yes
6082fi
6083
6084
6085    if test "${enable_shared+set}" = set; then
6086	enableval="$enable_shared"
6087	shared_ok=$enableval
6088    else
6089	shared_ok=yes
6090    fi
6091
6092    # Check whether --enable-stubs was given.
6093if test "${enable_stubs+set}" = set; then :
6094  enableval=$enable_stubs; stubs_ok=$enableval
6095else
6096  stubs_ok=yes
6097fi
6098
6099
6100    if test "${enable_stubs+set}" = set; then
6101	enableval="$enable_stubs"
6102	stubs_ok=$enableval
6103    else
6104	stubs_ok=yes
6105    fi
6106
6107    # Stubs are always enabled for shared builds
6108    if test "$shared_ok" = "yes" ; then
6109	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
6110$as_echo "shared" >&6; }
6111	SHARED_BUILD=1
6112        STUBS_BUILD=1
6113    else
6114	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
6115$as_echo "static" >&6; }
6116	SHARED_BUILD=0
6117
6118$as_echo "#define STATIC_BUILD 1" >>confdefs.h
6119
6120        if test "$stubs_ok" = "yes" ; then
6121          STUBS_BUILD=1
6122        else
6123          STUBS_BUILD=0
6124        fi
6125    fi
6126    if test "${STUBS_BUILD}" = "1" ; then
6127
6128$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h
6129
6130
6131$as_echo "#define USE_TCLOO_STUBS 1" >>confdefs.h
6132
6133      if test "${TEA_WINDOWINGSYSTEM}" != ""; then
6134
6135$as_echo "#define USE_TK_STUBS 1" >>confdefs.h
6136
6137      fi
6138    fi
6139
6140
6141
6142
6143
6144#--------------------------------------------------------------------
6145# This macro figures out what flags to use with the compiler/linker
6146# when building shared/static debug/optimized objects.  This information
6147# can be taken from the tclConfig.sh file, but this figures it all out.
6148#--------------------------------------------------------------------
6149
6150if test -n "$ac_tool_prefix"; then
6151  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6152set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6154$as_echo_n "checking for $ac_word... " >&6; }
6155if ${ac_cv_prog_RANLIB+:} false; then :
6156  $as_echo_n "(cached) " >&6
6157else
6158  if test -n "$RANLIB"; then
6159  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6160else
6161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6162for as_dir in $PATH
6163do
6164  IFS=$as_save_IFS
6165  test -z "$as_dir" && as_dir=.
6166    for ac_exec_ext in '' $ac_executable_extensions; do
6167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6168    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6170    break 2
6171  fi
6172done
6173  done
6174IFS=$as_save_IFS
6175
6176fi
6177fi
6178RANLIB=$ac_cv_prog_RANLIB
6179if test -n "$RANLIB"; then
6180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6181$as_echo "$RANLIB" >&6; }
6182else
6183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6184$as_echo "no" >&6; }
6185fi
6186
6187
6188fi
6189if test -z "$ac_cv_prog_RANLIB"; then
6190  ac_ct_RANLIB=$RANLIB
6191  # Extract the first word of "ranlib", so it can be a program name with args.
6192set dummy ranlib; ac_word=$2
6193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6194$as_echo_n "checking for $ac_word... " >&6; }
6195if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6196  $as_echo_n "(cached) " >&6
6197else
6198  if test -n "$ac_ct_RANLIB"; then
6199  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6200else
6201as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6202for as_dir in $PATH
6203do
6204  IFS=$as_save_IFS
6205  test -z "$as_dir" && as_dir=.
6206    for ac_exec_ext in '' $ac_executable_extensions; do
6207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6208    ac_cv_prog_ac_ct_RANLIB="ranlib"
6209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6210    break 2
6211  fi
6212done
6213  done
6214IFS=$as_save_IFS
6215
6216fi
6217fi
6218ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6219if test -n "$ac_ct_RANLIB"; then
6220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6221$as_echo "$ac_ct_RANLIB" >&6; }
6222else
6223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6224$as_echo "no" >&6; }
6225fi
6226
6227  if test "x$ac_ct_RANLIB" = x; then
6228    RANLIB=":"
6229  else
6230    case $cross_compiling:$ac_tool_warned in
6231yes:)
6232{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6233$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6234ac_tool_warned=yes ;;
6235esac
6236    RANLIB=$ac_ct_RANLIB
6237  fi
6238else
6239  RANLIB="$ac_cv_prog_RANLIB"
6240fi
6241
6242
6243
6244
6245    # Step 0.a: Enable 64 bit support?
6246
6247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5
6248$as_echo_n "checking if 64bit support is requested... " >&6; }
6249    # Check whether --enable-64bit was given.
6250if test "${enable_64bit+set}" = set; then :
6251  enableval=$enable_64bit; do64bit=$enableval
6252else
6253  do64bit=no
6254fi
6255
6256    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5
6257$as_echo "$do64bit" >&6; }
6258
6259    # Step 0.b: Enable Solaris 64 bit VIS support?
6260
6261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5
6262$as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; }
6263    # Check whether --enable-64bit-vis was given.
6264if test "${enable_64bit_vis+set}" = set; then :
6265  enableval=$enable_64bit_vis; do64bitVIS=$enableval
6266else
6267  do64bitVIS=no
6268fi
6269
6270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5
6271$as_echo "$do64bitVIS" >&6; }
6272    # Force 64bit on with VIS
6273    if test "$do64bitVIS" = "yes"; then :
6274  do64bit=yes
6275fi
6276
6277    # Step 0.c: Check if visibility support is available. Do this here so
6278    # that platform specific alternatives can be used below if this fails.
6279
6280    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5
6281$as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; }
6282if ${tcl_cv_cc_visibility_hidden+:} false; then :
6283  $as_echo_n "(cached) " >&6
6284else
6285
6286	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
6287	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6288/* end confdefs.h.  */
6289
6290	    extern __attribute__((__visibility__("hidden"))) void f(void);
6291	    void f(void) {}
6292int
6293main ()
6294{
6295f();
6296  ;
6297  return 0;
6298}
6299_ACEOF
6300if ac_fn_c_try_link "$LINENO"; then :
6301  tcl_cv_cc_visibility_hidden=yes
6302else
6303  tcl_cv_cc_visibility_hidden=no
6304fi
6305rm -f core conftest.err conftest.$ac_objext \
6306    conftest$ac_exeext conftest.$ac_ext
6307	CFLAGS=$hold_cflags
6308fi
6309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5
6310$as_echo "$tcl_cv_cc_visibility_hidden" >&6; }
6311    if test $tcl_cv_cc_visibility_hidden = yes; then :
6312
6313
6314$as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h
6315
6316
6317$as_echo "#define HAVE_HIDDEN 1" >>confdefs.h
6318
6319
6320fi
6321
6322    # Step 0.d: Disable -rpath support?
6323
6324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5
6325$as_echo_n "checking if rpath support is requested... " >&6; }
6326    # Check whether --enable-rpath was given.
6327if test "${enable_rpath+set}" = set; then :
6328  enableval=$enable_rpath; doRpath=$enableval
6329else
6330  doRpath=yes
6331fi
6332
6333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5
6334$as_echo "$doRpath" >&6; }
6335
6336    # Set the variable "system" to hold the name and version number
6337    # for the system.
6338
6339
6340    { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
6341$as_echo_n "checking system version... " >&6; }
6342if ${tcl_cv_sys_version+:} false; then :
6343  $as_echo_n "(cached) " >&6
6344else
6345
6346	# TEA specific:
6347	if test "${TEA_PLATFORM}" = "windows" ; then
6348	    tcl_cv_sys_version=windows
6349	else
6350	    tcl_cv_sys_version=`uname -s`-`uname -r`
6351	    if test "$?" -ne 0 ; then
6352		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
6353$as_echo "$as_me: WARNING: can't find uname command" >&2;}
6354		tcl_cv_sys_version=unknown
6355	    else
6356		if test "`uname -s`" = "AIX" ; then
6357		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
6358		fi
6359		if test "`uname -s`" = "NetBSD" -a -f /etc/debian_version ; then
6360		    tcl_cv_sys_version=NetBSD-Debian
6361		fi
6362	    fi
6363	fi
6364
6365fi
6366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
6367$as_echo "$tcl_cv_sys_version" >&6; }
6368    system=$tcl_cv_sys_version
6369
6370
6371    # Require ranlib early so we can override it in special cases below.
6372
6373
6374
6375    # Set configuration options based on system name and version.
6376    # This is similar to Tcl's unix/tcl.m4 except that we've added a
6377    # "windows" case and removed some core-only vars.
6378
6379    do64bit_ok=no
6380    # default to '{$LIBS}' and set to "" on per-platform necessary basis
6381    SHLIB_LD_LIBS='${LIBS}'
6382    # When ld needs options to work in 64-bit mode, put them in
6383    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
6384    # is disabled by the user. [Bug 1016796]
6385    LDFLAGS_ARCH=""
6386    UNSHARED_LIB_SUFFIX=""
6387    # TEA specific: use PACKAGE_VERSION instead of VERSION
6388    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
6389    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
6390    TCL_LIB_VERSIONS_OK=ok
6391    CFLAGS_DEBUG=-g
6392    if test "$GCC" = yes; then :
6393
6394	CFLAGS_OPTIMIZE=-O2
6395	CFLAGS_WARNING="-Wall"
6396
6397else
6398
6399	CFLAGS_OPTIMIZE=-O
6400	CFLAGS_WARNING=""
6401
6402fi
6403    if test -n "$ac_tool_prefix"; then
6404  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6405set dummy ${ac_tool_prefix}ar; ac_word=$2
6406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6407$as_echo_n "checking for $ac_word... " >&6; }
6408if ${ac_cv_prog_AR+:} false; then :
6409  $as_echo_n "(cached) " >&6
6410else
6411  if test -n "$AR"; then
6412  ac_cv_prog_AR="$AR" # Let the user override the test.
6413else
6414as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6415for as_dir in $PATH
6416do
6417  IFS=$as_save_IFS
6418  test -z "$as_dir" && as_dir=.
6419    for ac_exec_ext in '' $ac_executable_extensions; do
6420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6421    ac_cv_prog_AR="${ac_tool_prefix}ar"
6422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6423    break 2
6424  fi
6425done
6426  done
6427IFS=$as_save_IFS
6428
6429fi
6430fi
6431AR=$ac_cv_prog_AR
6432if test -n "$AR"; then
6433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6434$as_echo "$AR" >&6; }
6435else
6436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6437$as_echo "no" >&6; }
6438fi
6439
6440
6441fi
6442if test -z "$ac_cv_prog_AR"; then
6443  ac_ct_AR=$AR
6444  # Extract the first word of "ar", so it can be a program name with args.
6445set dummy ar; ac_word=$2
6446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6447$as_echo_n "checking for $ac_word... " >&6; }
6448if ${ac_cv_prog_ac_ct_AR+:} false; then :
6449  $as_echo_n "(cached) " >&6
6450else
6451  if test -n "$ac_ct_AR"; then
6452  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6453else
6454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6455for as_dir in $PATH
6456do
6457  IFS=$as_save_IFS
6458  test -z "$as_dir" && as_dir=.
6459    for ac_exec_ext in '' $ac_executable_extensions; do
6460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6461    ac_cv_prog_ac_ct_AR="ar"
6462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6463    break 2
6464  fi
6465done
6466  done
6467IFS=$as_save_IFS
6468
6469fi
6470fi
6471ac_ct_AR=$ac_cv_prog_ac_ct_AR
6472if test -n "$ac_ct_AR"; then
6473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6474$as_echo "$ac_ct_AR" >&6; }
6475else
6476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6477$as_echo "no" >&6; }
6478fi
6479
6480  if test "x$ac_ct_AR" = x; then
6481    AR=""
6482  else
6483    case $cross_compiling:$ac_tool_warned in
6484yes:)
6485{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6486$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6487ac_tool_warned=yes ;;
6488esac
6489    AR=$ac_ct_AR
6490  fi
6491else
6492  AR="$ac_cv_prog_AR"
6493fi
6494
6495    STLIB_LD='${AR} cr'
6496    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
6497    if test "x$SHLIB_VERSION" = x; then :
6498  SHLIB_VERSION=""
6499else
6500  SHLIB_VERSION=".$SHLIB_VERSION"
6501fi
6502    case $system in
6503	# TEA specific:
6504	windows)
6505	    MACHINE="X86"
6506	    if test "$do64bit" != "no" ; then
6507		case "$do64bit" in
6508		    amd64|x64|yes)
6509			MACHINE="AMD64" ; # default to AMD64 64-bit build
6510			;;
6511		    ia64)
6512			MACHINE="IA64"
6513			;;
6514		esac
6515	    fi
6516
6517	    if test "$GCC" != "yes" ; then
6518	        if test "${SHARED_BUILD}" = "0" ; then
6519		    runtime=-MT
6520	        else
6521		    runtime=-MD
6522	        fi
6523	        case "x`echo \${VisualStudioVersion}`" in
6524	            x1[4-9]*)
6525		        lflags="${lflags} -nodefaultlib:libucrt.lib"
6526
6527    vars="ucrt.lib"
6528    for i in $vars; do
6529	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6530	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6531	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
6532	fi
6533	PKG_LIBS="$PKG_LIBS $i"
6534    done
6535
6536
6537	            ;;
6538	            *)
6539	            ;;
6540	        esac
6541
6542                if test "$do64bit" != "no" ; then
6543		    CC="cl.exe"
6544		    RC="rc.exe"
6545		    lflags="${lflags} -nologo -MACHINE:${MACHINE} "
6546		    LINKBIN="link.exe"
6547		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
6548		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
6549		    # Avoid 'unresolved external symbol __security_cookie'
6550		    # errors, c.f. http://support.microsoft.com/?id=894573
6551
6552    vars="bufferoverflowU.lib"
6553    for i in $vars; do
6554	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6555	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6556	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
6557	fi
6558	PKG_LIBS="$PKG_LIBS $i"
6559    done
6560
6561
6562		else
6563		    RC="rc"
6564		    lflags="${lflags} -nologo"
6565		    LINKBIN="link"
6566		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
6567		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
6568		fi
6569	    fi
6570
6571	    if test "$GCC" = "yes"; then
6572		# mingw gcc mode
6573		if test -n "$ac_tool_prefix"; then
6574  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6575set dummy ${ac_tool_prefix}windres; ac_word=$2
6576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6577$as_echo_n "checking for $ac_word... " >&6; }
6578if ${ac_cv_prog_RC+:} false; then :
6579  $as_echo_n "(cached) " >&6
6580else
6581  if test -n "$RC"; then
6582  ac_cv_prog_RC="$RC" # Let the user override the test.
6583else
6584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6585for as_dir in $PATH
6586do
6587  IFS=$as_save_IFS
6588  test -z "$as_dir" && as_dir=.
6589    for ac_exec_ext in '' $ac_executable_extensions; do
6590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6591    ac_cv_prog_RC="${ac_tool_prefix}windres"
6592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6593    break 2
6594  fi
6595done
6596  done
6597IFS=$as_save_IFS
6598
6599fi
6600fi
6601RC=$ac_cv_prog_RC
6602if test -n "$RC"; then
6603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
6604$as_echo "$RC" >&6; }
6605else
6606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607$as_echo "no" >&6; }
6608fi
6609
6610
6611fi
6612if test -z "$ac_cv_prog_RC"; then
6613  ac_ct_RC=$RC
6614  # Extract the first word of "windres", so it can be a program name with args.
6615set dummy windres; ac_word=$2
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6617$as_echo_n "checking for $ac_word... " >&6; }
6618if ${ac_cv_prog_ac_ct_RC+:} false; then :
6619  $as_echo_n "(cached) " >&6
6620else
6621  if test -n "$ac_ct_RC"; then
6622  ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test.
6623else
6624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6625for as_dir in $PATH
6626do
6627  IFS=$as_save_IFS
6628  test -z "$as_dir" && as_dir=.
6629    for ac_exec_ext in '' $ac_executable_extensions; do
6630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6631    ac_cv_prog_ac_ct_RC="windres"
6632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6633    break 2
6634  fi
6635done
6636  done
6637IFS=$as_save_IFS
6638
6639fi
6640fi
6641ac_ct_RC=$ac_cv_prog_ac_ct_RC
6642if test -n "$ac_ct_RC"; then
6643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
6644$as_echo "$ac_ct_RC" >&6; }
6645else
6646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6647$as_echo "no" >&6; }
6648fi
6649
6650  if test "x$ac_ct_RC" = x; then
6651    RC=""
6652  else
6653    case $cross_compiling:$ac_tool_warned in
6654yes:)
6655{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6656$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6657ac_tool_warned=yes ;;
6658esac
6659    RC=$ac_ct_RC
6660  fi
6661else
6662  RC="$ac_cv_prog_RC"
6663fi
6664
6665		CFLAGS_DEBUG="-g"
6666		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
6667		SHLIB_LD='${CC} -shared'
6668		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
6669		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
6670		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
6671
6672		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cross-compile version of gcc" >&5
6673$as_echo_n "checking for cross-compile version of gcc... " >&6; }
6674if ${ac_cv_cross+:} false; then :
6675  $as_echo_n "(cached) " >&6
6676else
6677  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6678/* end confdefs.h.  */
6679
6680			    #ifdef _WIN32
6681				#error cross-compiler
6682			    #endif
6683
6684int
6685main ()
6686{
6687
6688  ;
6689  return 0;
6690}
6691_ACEOF
6692if ac_fn_c_try_compile "$LINENO"; then :
6693  ac_cv_cross=yes
6694else
6695  ac_cv_cross=no
6696fi
6697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6698
6699fi
6700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cross" >&5
6701$as_echo "$ac_cv_cross" >&6; }
6702		      if test "$ac_cv_cross" = "yes"; then
6703			case "$do64bit" in
6704			    amd64|x64|yes)
6705				CC="x86_64-w64-mingw32-${CC}"
6706				LD="x86_64-w64-mingw32-ld"
6707				AR="x86_64-w64-mingw32-ar"
6708				RANLIB="x86_64-w64-mingw32-ranlib"
6709				RC="x86_64-w64-mingw32-windres"
6710			    ;;
6711			    *)
6712				CC="i686-w64-mingw32-${CC}"
6713				LD="i686-w64-mingw32-ld"
6714				AR="i686-w64-mingw32-ar"
6715				RANLIB="i686-w64-mingw32-ranlib"
6716				RC="i686-w64-mingw32-windres"
6717			    ;;
6718			esac
6719		fi
6720
6721	    else
6722		SHLIB_LD="${LINKBIN} -dll ${lflags}"
6723		# link -lib only works when -lib is the first arg
6724		STLIB_LD="${LINKBIN} -lib ${lflags}"
6725		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
6726		PATHTYPE=-w
6727		# For information on what debugtype is most useful, see:
6728		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
6729		# and also
6730		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
6731		# This essentially turns it all on.
6732		LDFLAGS_DEBUG="-debug -debugtype:cv"
6733		LDFLAGS_OPTIMIZE="-release"
6734		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
6735		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
6736	    fi
6737
6738	    SHLIB_SUFFIX=".dll"
6739	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
6740
6741	    TCL_LIB_VERSIONS_OK=nodots
6742    	    ;;
6743	AIX-*)
6744	    if test "$GCC" != "yes"; then :
6745
6746		# AIX requires the _r compiler when gcc isn't being used
6747		case "${CC}" in
6748		    *_r|*_r\ *)
6749			# ok ...
6750			;;
6751		    *)
6752			# Make sure only first arg gets _r
6753		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
6754			;;
6755		esac
6756		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5
6757$as_echo "Using $CC for compiling with threads" >&6; }
6758
6759fi
6760	    LIBS="$LIBS -lc"
6761	    SHLIB_CFLAGS=""
6762	    SHLIB_SUFFIX=".so"
6763
6764	    LD_LIBRARY_PATH_VAR="LIBPATH"
6765
6766	    # Check to enable 64-bit flags for compiler/linker
6767	    if test "$do64bit" = yes; then :
6768
6769		if test "$GCC" = yes; then :
6770
6771		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
6772$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
6773
6774else
6775
6776		    do64bit_ok=yes
6777		    CFLAGS="$CFLAGS -q64"
6778		    LDFLAGS_ARCH="-q64"
6779		    RANLIB="${RANLIB} -X64"
6780		    AR="${AR} -X64"
6781		    SHLIB_LD_FLAGS="-b64"
6782
6783fi
6784
6785fi
6786
6787	    if test "`uname -m`" = ia64; then :
6788
6789		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
6790		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
6791		if test "$GCC" = yes; then :
6792
6793		    CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
6794
6795else
6796
6797		    CC_SEARCH_FLAGS='"-R${LIB_RUNTIME_DIR}"'
6798
6799fi
6800		LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
6801
6802else
6803
6804		if test "$GCC" = yes; then :
6805
6806		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
6807
6808else
6809
6810		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
6811		    LDFLAGS="$LDFLAGS -brtl"
6812
6813fi
6814		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
6815		CC_SEARCH_FLAGS='"-L${LIB_RUNTIME_DIR}"'
6816		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6817
6818fi
6819	    ;;
6820	BeOS*)
6821	    SHLIB_CFLAGS="-fPIC"
6822	    SHLIB_LD='${CC} -nostart'
6823	    SHLIB_SUFFIX=".so"
6824
6825	    #-----------------------------------------------------------
6826	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
6827	    # -lsocket, even if the network functions are in -lnet which
6828	    # is always linked to, for compatibility.
6829	    #-----------------------------------------------------------
6830	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5
6831$as_echo_n "checking for inet_ntoa in -lbind... " >&6; }
6832if ${ac_cv_lib_bind_inet_ntoa+:} false; then :
6833  $as_echo_n "(cached) " >&6
6834else
6835  ac_check_lib_save_LIBS=$LIBS
6836LIBS="-lbind  $LIBS"
6837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6838/* end confdefs.h.  */
6839
6840/* Override any GCC internal prototype to avoid an error.
6841   Use char because int might match the return type of a GCC
6842   builtin and then its argument prototype would still apply.  */
6843#ifdef __cplusplus
6844extern "C"
6845#endif
6846char inet_ntoa ();
6847int
6848main ()
6849{
6850return inet_ntoa ();
6851  ;
6852  return 0;
6853}
6854_ACEOF
6855if ac_fn_c_try_link "$LINENO"; then :
6856  ac_cv_lib_bind_inet_ntoa=yes
6857else
6858  ac_cv_lib_bind_inet_ntoa=no
6859fi
6860rm -f core conftest.err conftest.$ac_objext \
6861    conftest$ac_exeext conftest.$ac_ext
6862LIBS=$ac_check_lib_save_LIBS
6863fi
6864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5
6865$as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; }
6866if test "x$ac_cv_lib_bind_inet_ntoa" = xyes; then :
6867  LIBS="$LIBS -lbind -lsocket"
6868fi
6869
6870	    ;;
6871	BSD/OS-2.1*|BSD/OS-3*)
6872	    SHLIB_CFLAGS=""
6873	    SHLIB_LD="shlicc -r"
6874	    SHLIB_SUFFIX=".so"
6875	    CC_SEARCH_FLAGS=""
6876	    LD_SEARCH_FLAGS=""
6877	    ;;
6878	BSD/OS-4.*)
6879	    SHLIB_CFLAGS="-export-dynamic -fPIC"
6880	    SHLIB_LD='${CC} -shared'
6881	    SHLIB_SUFFIX=".so"
6882	    LDFLAGS="$LDFLAGS -export-dynamic"
6883	    CC_SEARCH_FLAGS=""
6884	    LD_SEARCH_FLAGS=""
6885	    ;;
6886	CYGWIN_*)
6887	    SHLIB_CFLAGS=""
6888	    SHLIB_LD='${CC} -shared'
6889	    SHLIB_SUFFIX=".dll"
6890	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
6891	    EXEEXT=".exe"
6892	    do64bit_ok=yes
6893	    CC_SEARCH_FLAGS=""
6894	    LD_SEARCH_FLAGS=""
6895	    ;;
6896	dgux*)
6897	    SHLIB_CFLAGS="-K PIC"
6898	    SHLIB_LD='${CC} -G'
6899	    SHLIB_LD_LIBS=""
6900	    SHLIB_SUFFIX=".so"
6901	    CC_SEARCH_FLAGS=""
6902	    LD_SEARCH_FLAGS=""
6903	    ;;
6904	Haiku*)
6905	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
6906	    SHLIB_CFLAGS="-fPIC"
6907	    SHLIB_SUFFIX=".so"
6908	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
6909	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5
6910$as_echo_n "checking for inet_ntoa in -lnetwork... " >&6; }
6911if ${ac_cv_lib_network_inet_ntoa+:} false; then :
6912  $as_echo_n "(cached) " >&6
6913else
6914  ac_check_lib_save_LIBS=$LIBS
6915LIBS="-lnetwork  $LIBS"
6916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6917/* end confdefs.h.  */
6918
6919/* Override any GCC internal prototype to avoid an error.
6920   Use char because int might match the return type of a GCC
6921   builtin and then its argument prototype would still apply.  */
6922#ifdef __cplusplus
6923extern "C"
6924#endif
6925char inet_ntoa ();
6926int
6927main ()
6928{
6929return inet_ntoa ();
6930  ;
6931  return 0;
6932}
6933_ACEOF
6934if ac_fn_c_try_link "$LINENO"; then :
6935  ac_cv_lib_network_inet_ntoa=yes
6936else
6937  ac_cv_lib_network_inet_ntoa=no
6938fi
6939rm -f core conftest.err conftest.$ac_objext \
6940    conftest$ac_exeext conftest.$ac_ext
6941LIBS=$ac_check_lib_save_LIBS
6942fi
6943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5
6944$as_echo "$ac_cv_lib_network_inet_ntoa" >&6; }
6945if test "x$ac_cv_lib_network_inet_ntoa" = xyes; then :
6946  LIBS="$LIBS -lnetwork"
6947fi
6948
6949	    ;;
6950	HP-UX-*.11.*)
6951	    # Use updated header definitions where possible
6952
6953$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
6954
6955	    # TEA specific: Needed by Tcl, but not most extensions
6956	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
6957	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
6958
6959	    if test "`uname -m`" = ia64; then :
6960
6961		SHLIB_SUFFIX=".so"
6962
6963else
6964
6965		SHLIB_SUFFIX=".sl"
6966
6967fi
6968	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
6969$as_echo_n "checking for shl_load in -ldld... " >&6; }
6970if ${ac_cv_lib_dld_shl_load+:} false; then :
6971  $as_echo_n "(cached) " >&6
6972else
6973  ac_check_lib_save_LIBS=$LIBS
6974LIBS="-ldld  $LIBS"
6975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6976/* end confdefs.h.  */
6977
6978/* Override any GCC internal prototype to avoid an error.
6979   Use char because int might match the return type of a GCC
6980   builtin and then its argument prototype would still apply.  */
6981#ifdef __cplusplus
6982extern "C"
6983#endif
6984char shl_load ();
6985int
6986main ()
6987{
6988return shl_load ();
6989  ;
6990  return 0;
6991}
6992_ACEOF
6993if ac_fn_c_try_link "$LINENO"; then :
6994  ac_cv_lib_dld_shl_load=yes
6995else
6996  ac_cv_lib_dld_shl_load=no
6997fi
6998rm -f core conftest.err conftest.$ac_objext \
6999    conftest$ac_exeext conftest.$ac_ext
7000LIBS=$ac_check_lib_save_LIBS
7001fi
7002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7003$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7004if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
7005  tcl_ok=yes
7006else
7007  tcl_ok=no
7008fi
7009
7010	    if test "$tcl_ok" = yes; then :
7011
7012		SHLIB_CFLAGS="+z"
7013		SHLIB_LD="ld -b"
7014		LDFLAGS="$LDFLAGS -Wl,-E"
7015		CC_SEARCH_FLAGS='"-Wl,+s,+b,${LIB_RUNTIME_DIR}:."'
7016		LD_SEARCH_FLAGS='+s +b "${LIB_RUNTIME_DIR}:."'
7017		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7018
7019fi
7020	    if test "$GCC" = yes; then :
7021
7022		SHLIB_LD='${CC} -shared'
7023		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7024
7025else
7026
7027		CFLAGS="$CFLAGS -z"
7028
7029fi
7030
7031	    # Check to enable 64-bit flags for compiler/linker
7032	    if test "$do64bit" = "yes"; then :
7033
7034		if test "$GCC" = yes; then :
7035
7036		    case `${CC} -dumpmachine` in
7037			hppa64*)
7038			    # 64-bit gcc in use.  Fix flags for GNU ld.
7039			    do64bit_ok=yes
7040			    SHLIB_LD='${CC} -shared'
7041			    if test $doRpath = yes; then :
7042
7043				CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7044fi
7045			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7046			    ;;
7047			*)
7048			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
7049$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7050			    ;;
7051		    esac
7052
7053else
7054
7055		    do64bit_ok=yes
7056		    CFLAGS="$CFLAGS +DD64"
7057		    LDFLAGS_ARCH="+DD64"
7058
7059fi
7060
7061fi ;;
7062	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
7063	    SHLIB_SUFFIX=".sl"
7064	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7065$as_echo_n "checking for shl_load in -ldld... " >&6; }
7066if ${ac_cv_lib_dld_shl_load+:} false; then :
7067  $as_echo_n "(cached) " >&6
7068else
7069  ac_check_lib_save_LIBS=$LIBS
7070LIBS="-ldld  $LIBS"
7071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7072/* end confdefs.h.  */
7073
7074/* Override any GCC internal prototype to avoid an error.
7075   Use char because int might match the return type of a GCC
7076   builtin and then its argument prototype would still apply.  */
7077#ifdef __cplusplus
7078extern "C"
7079#endif
7080char shl_load ();
7081int
7082main ()
7083{
7084return shl_load ();
7085  ;
7086  return 0;
7087}
7088_ACEOF
7089if ac_fn_c_try_link "$LINENO"; then :
7090  ac_cv_lib_dld_shl_load=yes
7091else
7092  ac_cv_lib_dld_shl_load=no
7093fi
7094rm -f core conftest.err conftest.$ac_objext \
7095    conftest$ac_exeext conftest.$ac_ext
7096LIBS=$ac_check_lib_save_LIBS
7097fi
7098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7099$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7100if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
7101  tcl_ok=yes
7102else
7103  tcl_ok=no
7104fi
7105
7106	    if test "$tcl_ok" = yes; then :
7107
7108		SHLIB_CFLAGS="+z"
7109		SHLIB_LD="ld -b"
7110		SHLIB_LD_LIBS=""
7111		LDFLAGS="$LDFLAGS -Wl,-E"
7112		CC_SEARCH_FLAGS='"-Wl,+s,+b,${LIB_RUNTIME_DIR}:."'
7113		LD_SEARCH_FLAGS='+s +b "${LIB_RUNTIME_DIR}:."'
7114		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7115
7116fi ;;
7117	IRIX-5.*)
7118	    SHLIB_CFLAGS=""
7119	    SHLIB_LD="ld -shared -rdata_shared"
7120	    SHLIB_SUFFIX=".so"
7121	    case " $LIBOBJS " in
7122  *" mkstemp.$ac_objext "* ) ;;
7123  *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext"
7124 ;;
7125esac
7126
7127	    if test $doRpath = yes; then :
7128
7129		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7130		LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'
7131fi
7132	    ;;
7133	IRIX-6.*)
7134	    SHLIB_CFLAGS=""
7135	    SHLIB_LD="ld -n32 -shared -rdata_shared"
7136	    SHLIB_SUFFIX=".so"
7137	    if test $doRpath = yes; then :
7138
7139		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7140		LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'
7141fi
7142	    if test "$GCC" = yes; then :
7143
7144		CFLAGS="$CFLAGS -mabi=n32"
7145		LDFLAGS="$LDFLAGS -mabi=n32"
7146
7147else
7148
7149		case $system in
7150		    IRIX-6.3)
7151			# Use to build 6.2 compatible binaries on 6.3.
7152			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
7153			;;
7154		    *)
7155			CFLAGS="$CFLAGS -n32"
7156			;;
7157		esac
7158		LDFLAGS="$LDFLAGS -n32"
7159
7160fi
7161	    ;;
7162	IRIX64-6.*)
7163	    SHLIB_CFLAGS=""
7164	    SHLIB_LD="ld -n32 -shared -rdata_shared"
7165	    SHLIB_SUFFIX=".so"
7166	    if test $doRpath = yes; then :
7167
7168		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7169		LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'
7170fi
7171
7172	    # Check to enable 64-bit flags for compiler/linker
7173
7174	    if test "$do64bit" = yes; then :
7175
7176	        if test "$GCC" = yes; then :
7177
7178	            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5
7179$as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
7180
7181else
7182
7183	            do64bit_ok=yes
7184	            SHLIB_LD="ld -64 -shared -rdata_shared"
7185	            CFLAGS="$CFLAGS -64"
7186	            LDFLAGS_ARCH="-64"
7187
7188fi
7189
7190fi
7191	    ;;
7192	Linux*|GNU*|NetBSD-Debian|DragonFly-*|DragonFly-*)
7193	    SHLIB_CFLAGS="-fPIC"
7194	    SHLIB_SUFFIX=".so"
7195
7196	    # TEA specific:
7197	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
7198
7199	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7200	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
7201	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7202
7203	    case $system in
7204	    DragonFly-*|DragonFly-*)
7205		if test "${TCL_THREADS}" = "1"; then :
7206
7207		    # The -pthread needs to go in the LDFLAGS, not LIBS
7208		    LIBS=`echo $LIBS | sed s/-pthread//`
7209		    CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7210		    LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
7211fi
7212	    ;;
7213            esac
7214
7215	    if test $doRpath = yes; then :
7216
7217		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7218fi
7219	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7220	    if test "`uname -m`" = "alpha"; then :
7221  CFLAGS="$CFLAGS -mieee"
7222fi
7223	    if test $do64bit = yes; then :
7224
7225		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5
7226$as_echo_n "checking if compiler accepts -m64 flag... " >&6; }
7227if ${tcl_cv_cc_m64+:} false; then :
7228  $as_echo_n "(cached) " >&6
7229else
7230
7231		    hold_cflags=$CFLAGS
7232		    CFLAGS="$CFLAGS -m64"
7233		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7234/* end confdefs.h.  */
7235
7236int
7237main ()
7238{
7239
7240  ;
7241  return 0;
7242}
7243_ACEOF
7244if ac_fn_c_try_link "$LINENO"; then :
7245  tcl_cv_cc_m64=yes
7246else
7247  tcl_cv_cc_m64=no
7248fi
7249rm -f core conftest.err conftest.$ac_objext \
7250    conftest$ac_exeext conftest.$ac_ext
7251		    CFLAGS=$hold_cflags
7252fi
7253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5
7254$as_echo "$tcl_cv_cc_m64" >&6; }
7255		if test $tcl_cv_cc_m64 = yes; then :
7256
7257		    CFLAGS="$CFLAGS -m64"
7258		    do64bit_ok=yes
7259
7260fi
7261
7262fi
7263
7264	    # The combo of gcc + glibc has a bug related to inlining of
7265	    # functions like strtod(). The -fno-builtin flag should address
7266	    # this problem but it does not work. The -fno-inline flag is kind
7267	    # of overkill but it works. Disable inlining only when one of the
7268	    # files in compat/*.c is being linked in.
7269
7270	    if test x"${USE_COMPAT}" != x; then :
7271  CFLAGS="$CFLAGS -fno-inline"
7272fi
7273	    ;;
7274	Lynx*)
7275	    SHLIB_CFLAGS="-fPIC"
7276	    SHLIB_SUFFIX=".so"
7277	    CFLAGS_OPTIMIZE=-02
7278	    SHLIB_LD='${CC} -shared'
7279	    LD_FLAGS="-Wl,--export-dynamic"
7280	    if test $doRpath = yes; then :
7281
7282		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7283		LD_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7284fi
7285	    ;;
7286	OpenBSD-*)
7287	    arch=`arch -s`
7288	    case "$arch" in
7289	    alpha|sparc64)
7290		SHLIB_CFLAGS="-fPIC"
7291		;;
7292	    *)
7293		SHLIB_CFLAGS="-fpic"
7294		;;
7295	    esac
7296	    SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared'
7297	    SHLIB_SUFFIX=".so"
7298	    if test $doRpath = yes; then :
7299
7300		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7301fi
7302	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7303	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
7304	    LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
7305	    CFLAGS_OPTIMIZE="-O2"
7306	    # On OpenBSD:	Compile with -pthread
7307	    #		Don't link with -lpthread
7308	    LIBS=`echo $LIBS | sed s/-lpthread//`
7309	    CFLAGS="$CFLAGS -pthread"
7310	    # OpenBSD doesn't do version numbers with dots.
7311	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7312	    TCL_LIB_VERSIONS_OK=nodots
7313	    ;;
7314	NetBSD-*)
7315	    # NetBSD has ELF and can use 'cc -shared' to build shared libs
7316	    SHLIB_CFLAGS="-fPIC"
7317	    SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared'
7318	    SHLIB_SUFFIX=".so"
7319	    LDFLAGS="$LDFLAGS -export-dynamic"
7320	    if test $doRpath = yes; then :
7321
7322		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7323fi
7324	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7325	    # The -pthread needs to go in the CFLAGS, not LIBS
7326	    LIBS=`echo $LIBS | sed s/-pthread//`
7327	    CFLAGS="$CFLAGS -pthread"
7328	    LDFLAGS="$LDFLAGS -pthread"
7329	    ;;
7330	Darwin-*)
7331	    CFLAGS_OPTIMIZE="-Os"
7332	    SHLIB_CFLAGS="-fno-common"
7333	    # To avoid discrepancies between what headers configure sees during
7334	    # preprocessing tests and compiling tests, move any -isysroot and
7335	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
7336	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
7337		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7338		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
7339	    CFLAGS="`echo " ${CFLAGS}" | \
7340		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7341		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
7342	    if test $do64bit = yes; then :
7343
7344		case `arch` in
7345		    ppc)
7346			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5
7347$as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; }
7348if ${tcl_cv_cc_arch_ppc64+:} false; then :
7349  $as_echo_n "(cached) " >&6
7350else
7351
7352			    hold_cflags=$CFLAGS
7353			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7354			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7355/* end confdefs.h.  */
7356
7357int
7358main ()
7359{
7360
7361  ;
7362  return 0;
7363}
7364_ACEOF
7365if ac_fn_c_try_link "$LINENO"; then :
7366  tcl_cv_cc_arch_ppc64=yes
7367else
7368  tcl_cv_cc_arch_ppc64=no
7369fi
7370rm -f core conftest.err conftest.$ac_objext \
7371    conftest$ac_exeext conftest.$ac_ext
7372			    CFLAGS=$hold_cflags
7373fi
7374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5
7375$as_echo "$tcl_cv_cc_arch_ppc64" >&6; }
7376			if test $tcl_cv_cc_arch_ppc64 = yes; then :
7377
7378			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7379			    do64bit_ok=yes
7380
7381fi;;
7382		    i386)
7383			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5
7384$as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; }
7385if ${tcl_cv_cc_arch_x86_64+:} false; then :
7386  $as_echo_n "(cached) " >&6
7387else
7388
7389			    hold_cflags=$CFLAGS
7390			    CFLAGS="$CFLAGS -arch x86_64"
7391			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7392/* end confdefs.h.  */
7393
7394int
7395main ()
7396{
7397
7398  ;
7399  return 0;
7400}
7401_ACEOF
7402if ac_fn_c_try_link "$LINENO"; then :
7403  tcl_cv_cc_arch_x86_64=yes
7404else
7405  tcl_cv_cc_arch_x86_64=no
7406fi
7407rm -f core conftest.err conftest.$ac_objext \
7408    conftest$ac_exeext conftest.$ac_ext
7409			    CFLAGS=$hold_cflags
7410fi
7411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5
7412$as_echo "$tcl_cv_cc_arch_x86_64" >&6; }
7413			if test $tcl_cv_cc_arch_x86_64 = yes; then :
7414
7415			    CFLAGS="$CFLAGS -arch x86_64"
7416			    do64bit_ok=yes
7417
7418fi;;
7419		    *)
7420			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
7421$as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
7422		esac
7423
7424else
7425
7426		# Check for combined 32-bit and 64-bit fat build
7427		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
7428		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then :
7429
7430		    fat_32_64=yes
7431fi
7432
7433fi
7434	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7435	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
7436	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
7437$as_echo_n "checking if ld accepts -single_module flag... " >&6; }
7438if ${tcl_cv_ld_single_module+:} false; then :
7439  $as_echo_n "(cached) " >&6
7440else
7441
7442		hold_ldflags=$LDFLAGS
7443		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
7444		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7445/* end confdefs.h.  */
7446
7447int
7448main ()
7449{
7450int i;
7451  ;
7452  return 0;
7453}
7454_ACEOF
7455if ac_fn_c_try_link "$LINENO"; then :
7456  tcl_cv_ld_single_module=yes
7457else
7458  tcl_cv_ld_single_module=no
7459fi
7460rm -f core conftest.err conftest.$ac_objext \
7461    conftest$ac_exeext conftest.$ac_ext
7462		LDFLAGS=$hold_ldflags
7463fi
7464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5
7465$as_echo "$tcl_cv_ld_single_module" >&6; }
7466	    if test $tcl_cv_ld_single_module = yes; then :
7467
7468		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
7469
7470fi
7471	    # TEA specific: link shlib with current and compatibility version flags
7472	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
7473	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
7474	    SHLIB_SUFFIX=".dylib"
7475	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
7476	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5
7477$as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; }
7478if ${tcl_cv_ld_search_paths_first+:} false; then :
7479  $as_echo_n "(cached) " >&6
7480else
7481
7482		hold_ldflags=$LDFLAGS
7483		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7484		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7485/* end confdefs.h.  */
7486
7487int
7488main ()
7489{
7490int i;
7491  ;
7492  return 0;
7493}
7494_ACEOF
7495if ac_fn_c_try_link "$LINENO"; then :
7496  tcl_cv_ld_search_paths_first=yes
7497else
7498  tcl_cv_ld_search_paths_first=no
7499fi
7500rm -f core conftest.err conftest.$ac_objext \
7501    conftest$ac_exeext conftest.$ac_ext
7502		LDFLAGS=$hold_ldflags
7503fi
7504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5
7505$as_echo "$tcl_cv_ld_search_paths_first" >&6; }
7506	    if test $tcl_cv_ld_search_paths_first = yes; then :
7507
7508		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7509
7510fi
7511	    if test "$tcl_cv_cc_visibility_hidden" != yes; then :
7512
7513
7514$as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h
7515
7516		tcl_cv_cc_visibility_hidden=yes
7517
7518fi
7519	    CC_SEARCH_FLAGS=""
7520	    LD_SEARCH_FLAGS=""
7521	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
7522	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
7523	    # extensions, verify that 64-bit build is possible.
7524	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then :
7525
7526		if test "${TEA_WINDOWINGSYSTEM}" = x11; then :
7527
7528		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5
7529$as_echo_n "checking for 64-bit X11... " >&6; }
7530if ${tcl_cv_lib_x11_64+:} false; then :
7531  $as_echo_n "(cached) " >&6
7532else
7533
7534			for v in CFLAGS CPPFLAGS LDFLAGS; do
7535			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
7536			done
7537			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
7538			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
7539			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7540/* end confdefs.h.  */
7541#include <X11/Xlib.h>
7542int
7543main ()
7544{
7545XrmInitialize();
7546  ;
7547  return 0;
7548}
7549_ACEOF
7550if ac_fn_c_try_link "$LINENO"; then :
7551  tcl_cv_lib_x11_64=yes
7552else
7553  tcl_cv_lib_x11_64=no
7554fi
7555rm -f core conftest.err conftest.$ac_objext \
7556    conftest$ac_exeext conftest.$ac_ext
7557			for v in CFLAGS CPPFLAGS LDFLAGS; do
7558			    eval $v'="$hold_'$v'"'
7559			done
7560fi
7561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5
7562$as_echo "$tcl_cv_lib_x11_64" >&6; }
7563
7564fi
7565		if test "${TEA_WINDOWINGSYSTEM}" = aqua; then :
7566
7567		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit Tk" >&5
7568$as_echo_n "checking for 64-bit Tk... " >&6; }
7569if ${tcl_cv_lib_tk_64+:} false; then :
7570  $as_echo_n "(cached) " >&6
7571else
7572
7573			for v in CFLAGS CPPFLAGS LDFLAGS; do
7574			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
7575			done
7576			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
7577			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
7578			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7579/* end confdefs.h.  */
7580#include <tk.h>
7581int
7582main ()
7583{
7584Tk_InitStubs(NULL, "", 0);
7585  ;
7586  return 0;
7587}
7588_ACEOF
7589if ac_fn_c_try_link "$LINENO"; then :
7590  tcl_cv_lib_tk_64=yes
7591else
7592  tcl_cv_lib_tk_64=no
7593fi
7594rm -f core conftest.err conftest.$ac_objext \
7595    conftest$ac_exeext conftest.$ac_ext
7596			for v in CFLAGS CPPFLAGS LDFLAGS; do
7597			    eval $v'="$hold_'$v'"'
7598			done
7599fi
7600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_tk_64" >&5
7601$as_echo "$tcl_cv_lib_tk_64" >&6; }
7602
7603fi
7604		# remove 64-bit arch flags from CFLAGS et al. if configuration
7605		# does not support 64-bit.
7606		if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then :
7607
7608		    { $as_echo "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5
7609$as_echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
7610		    for v in CFLAGS CPPFLAGS LDFLAGS; do
7611			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
7612		    done
7613fi
7614
7615fi
7616	    ;;
7617	OS/390-*)
7618	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
7619
7620$as_echo "#define _OE_SOCKETS 1" >>confdefs.h
7621
7622	    ;;
7623	OSF1-V*)
7624	    # Digital OSF/1
7625	    SHLIB_CFLAGS=""
7626	    if test "$SHARED_BUILD" = 1; then :
7627
7628	        SHLIB_LD='ld -shared -expect_unresolved "*"'
7629
7630else
7631
7632	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
7633
7634fi
7635	    SHLIB_SUFFIX=".so"
7636	    if test $doRpath = yes; then :
7637
7638		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7639		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7640fi
7641	    if test "$GCC" = yes; then :
7642  CFLAGS="$CFLAGS -mieee"
7643else
7644
7645		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
7646fi
7647	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
7648	    CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
7649	    CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
7650	    LIBS=`echo $LIBS | sed s/-lpthreads//`
7651	    if test "$GCC" = yes; then :
7652
7653		LIBS="$LIBS -lpthread -lmach -lexc"
7654
7655else
7656
7657		CFLAGS="$CFLAGS -pthread"
7658		LDFLAGS="$LDFLAGS -pthread"
7659
7660fi
7661	    ;;
7662	QNX-6*)
7663	    # QNX RTP
7664	    # This may work for all QNX, but it was only reported for v6.
7665	    SHLIB_CFLAGS="-fPIC"
7666	    SHLIB_LD="ld -Bshareable -x"
7667	    SHLIB_LD_LIBS=""
7668	    SHLIB_SUFFIX=".so"
7669	    CC_SEARCH_FLAGS=""
7670	    LD_SEARCH_FLAGS=""
7671	    ;;
7672	SCO_SV-3.2*)
7673	    if test "$GCC" = yes; then :
7674
7675		SHLIB_CFLAGS="-fPIC -melf"
7676		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
7677
7678else
7679
7680		SHLIB_CFLAGS="-Kpic -belf"
7681		LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
7682
7683fi
7684	    SHLIB_LD="ld -G"
7685	    SHLIB_LD_LIBS=""
7686	    SHLIB_SUFFIX=".so"
7687	    CC_SEARCH_FLAGS=""
7688	    LD_SEARCH_FLAGS=""
7689	    ;;
7690	SunOS-5.[0-6])
7691	    # Careful to not let 5.10+ fall into this case
7692
7693	    # Note: If _REENTRANT isn't defined, then Solaris
7694	    # won't define thread-safe library routines.
7695
7696
7697$as_echo "#define _REENTRANT 1" >>confdefs.h
7698
7699
7700$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
7701
7702
7703	    SHLIB_CFLAGS="-KPIC"
7704	    SHLIB_SUFFIX=".so"
7705	    if test "$GCC" = yes; then :
7706
7707		SHLIB_LD='${CC} -shared'
7708		CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
7709		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7710
7711else
7712
7713		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
7714		CC_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
7715		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7716
7717fi
7718	    ;;
7719	SunOS-5*)
7720	    # Note: If _REENTRANT isn't defined, then Solaris
7721	    # won't define thread-safe library routines.
7722
7723
7724$as_echo "#define _REENTRANT 1" >>confdefs.h
7725
7726
7727$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
7728
7729
7730	    SHLIB_CFLAGS="-KPIC"
7731
7732	    # Check to enable 64-bit flags for compiler/linker
7733	    if test "$do64bit" = yes; then :
7734
7735		arch=`isainfo`
7736		if test "$arch" = "sparcv9 sparc"; then :
7737
7738		    if test "$GCC" = yes; then :
7739
7740			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then :
7741
7742			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
7743$as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
7744
7745else
7746
7747			    do64bit_ok=yes
7748			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
7749			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
7750			    SHLIB_CFLAGS="-fPIC"
7751
7752fi
7753
7754else
7755
7756			do64bit_ok=yes
7757			if test "$do64bitVIS" = yes; then :
7758
7759			    CFLAGS="$CFLAGS -xarch=v9a"
7760			    LDFLAGS_ARCH="-xarch=v9a"
7761
7762else
7763
7764			    CFLAGS="$CFLAGS -xarch=v9"
7765			    LDFLAGS_ARCH="-xarch=v9"
7766
7767fi
7768			# Solaris 64 uses this as well
7769			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
7770
7771fi
7772
7773else
7774  if test "$arch" = "amd64 i386"; then :
7775
7776		    if test "$GCC" = yes; then :
7777
7778			case $system in
7779			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
7780				do64bit_ok=yes
7781				CFLAGS="$CFLAGS -m64"
7782				LDFLAGS="$LDFLAGS -m64";;
7783			    *)
7784				{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
7785$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
7786			esac
7787
7788else
7789
7790			do64bit_ok=yes
7791			case $system in
7792			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
7793				CFLAGS="$CFLAGS -m64"
7794				LDFLAGS="$LDFLAGS -m64";;
7795			    *)
7796				CFLAGS="$CFLAGS -xarch=amd64"
7797				LDFLAGS="$LDFLAGS -xarch=amd64";;
7798			esac
7799
7800fi
7801
7802else
7803  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5
7804$as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
7805fi
7806fi
7807
7808fi
7809
7810	    SHLIB_SUFFIX=".so"
7811	    if test "$GCC" = yes; then :
7812
7813		SHLIB_LD='${CC} -shared'
7814		CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
7815		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7816		if test "$do64bit_ok" = yes; then :
7817
7818		    if test "$arch" = "sparcv9 sparc"; then :
7819
7820			# We need to specify -static-libgcc or we need to
7821			# add the path to the sparv9 libgcc.
7822			# JH: static-libgcc is necessary for core Tcl, but may
7823			# not be necessary for extensions.
7824			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
7825			# for finding sparcv9 libgcc, get the regular libgcc
7826			# path, remove so name and append 'sparcv9'
7827			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
7828			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
7829
7830else
7831  if test "$arch" = "amd64 i386"; then :
7832
7833			# JH: static-libgcc is necessary for core Tcl, but may
7834			# not be necessary for extensions.
7835			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
7836
7837fi
7838fi
7839
7840fi
7841
7842else
7843
7844		case $system in
7845		    SunOS-5.[1-9][0-9]*)
7846			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7847			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
7848		    *)
7849			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
7850		esac
7851		CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
7852		LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
7853
7854fi
7855	    ;;
7856	UNIX_SV* | UnixWare-5*)
7857	    SHLIB_CFLAGS="-KPIC"
7858	    SHLIB_LD='${CC} -G'
7859	    SHLIB_LD_LIBS=""
7860	    SHLIB_SUFFIX=".so"
7861	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
7862	    # that don't grok the -Bexport option.  Test that it does.
7863	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5
7864$as_echo_n "checking for ld accepts -Bexport flag... " >&6; }
7865if ${tcl_cv_ld_Bexport+:} false; then :
7866  $as_echo_n "(cached) " >&6
7867else
7868
7869		hold_ldflags=$LDFLAGS
7870		LDFLAGS="$LDFLAGS -Wl,-Bexport"
7871		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7872/* end confdefs.h.  */
7873
7874int
7875main ()
7876{
7877int i;
7878  ;
7879  return 0;
7880}
7881_ACEOF
7882if ac_fn_c_try_link "$LINENO"; then :
7883  tcl_cv_ld_Bexport=yes
7884else
7885  tcl_cv_ld_Bexport=no
7886fi
7887rm -f core conftest.err conftest.$ac_objext \
7888    conftest$ac_exeext conftest.$ac_ext
7889	        LDFLAGS=$hold_ldflags
7890fi
7891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5
7892$as_echo "$tcl_cv_ld_Bexport" >&6; }
7893	    if test $tcl_cv_ld_Bexport = yes; then :
7894
7895		LDFLAGS="$LDFLAGS -Wl,-Bexport"
7896
7897fi
7898	    CC_SEARCH_FLAGS=""
7899	    LD_SEARCH_FLAGS=""
7900	    ;;
7901    esac
7902
7903    if test "$do64bit" = yes -a "$do64bit_ok" = no; then :
7904
7905	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
7906$as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
7907
7908fi
7909
7910
7911
7912    # Add in the arch flags late to ensure it wasn't removed.
7913    # Not necessary in TEA, but this is aligned with core
7914    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
7915
7916    # If we're running gcc, then change the C flags for compiling shared
7917    # libraries to the right flags for gcc, instead of those for the
7918    # standard manufacturer compiler.
7919
7920    if test "$GCC" = yes; then :
7921
7922	case $system in
7923	    AIX-*) ;;
7924	    BSD/OS*) ;;
7925	    CYGWIN_*|MINGW32_*|MINGW64_*|MSYS_*) ;;
7926	    IRIX*) ;;
7927	    NetBSD-*|DragonFly-*|DragonFly-*|OpenBSD-*) ;;
7928	    Darwin-*) ;;
7929	    SCO_SV-3.2*) ;;
7930	    windows) ;;
7931	    *) SHLIB_CFLAGS="-fPIC" ;;
7932	esac
7933fi
7934
7935    if test "$tcl_cv_cc_visibility_hidden" != yes; then :
7936
7937
7938$as_echo "#define MODULE_SCOPE extern" >>confdefs.h
7939
7940
7941fi
7942
7943    if test "$SHARED_LIB_SUFFIX" = ""; then :
7944
7945    # TEA specific: use PACKAGE_VERSION instead of VERSION
7946    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
7947fi
7948    if test "$UNSHARED_LIB_SUFFIX" = ""; then :
7949
7950    # TEA specific: use PACKAGE_VERSION instead of VERSION
7951    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
7952fi
7953
7954    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
7955	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5
7956$as_echo_n "checking for SEH support in compiler... " >&6; }
7957if ${tcl_cv_seh+:} false; then :
7958  $as_echo_n "(cached) " >&6
7959else
7960  if test "$cross_compiling" = yes; then :
7961  tcl_cv_seh=no
7962else
7963  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7964/* end confdefs.h.  */
7965
7966#define WIN32_LEAN_AND_MEAN
7967#include <windows.h>
7968#undef WIN32_LEAN_AND_MEAN
7969
7970	    int main(int argc, char** argv) {
7971		int a, b = 0;
7972		__try {
7973		    a = 666 / b;
7974		}
7975		__except (EXCEPTION_EXECUTE_HANDLER) {
7976		    return 0;
7977		}
7978		return 1;
7979	    }
7980
7981_ACEOF
7982if ac_fn_c_try_run "$LINENO"; then :
7983  tcl_cv_seh=yes
7984else
7985  tcl_cv_seh=no
7986fi
7987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7988  conftest.$ac_objext conftest.beam conftest.$ac_ext
7989fi
7990
7991
7992fi
7993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5
7994$as_echo "$tcl_cv_seh" >&6; }
7995	if test "$tcl_cv_seh" = "no" ; then
7996
7997$as_echo "#define HAVE_NO_SEH 1" >>confdefs.h
7998
7999	fi
8000
8001	#
8002	# Check to see if the excpt.h include file provided contains the
8003	# definition for EXCEPTION_DISPOSITION; if not, which is the case
8004	# with Cygwin's version as of 2002-04-10, define it to be int,
8005	# sufficient for getting the current code to work.
8006	#
8007	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5
8008$as_echo_n "checking for EXCEPTION_DISPOSITION support in include files... " >&6; }
8009if ${tcl_cv_eh_disposition+:} false; then :
8010  $as_echo_n "(cached) " >&6
8011else
8012  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8013/* end confdefs.h.  */
8014
8015#	    define WIN32_LEAN_AND_MEAN
8016#	    include <windows.h>
8017#	    undef WIN32_LEAN_AND_MEAN
8018
8019int
8020main ()
8021{
8022
8023		EXCEPTION_DISPOSITION x;
8024
8025  ;
8026  return 0;
8027}
8028_ACEOF
8029if ac_fn_c_try_compile "$LINENO"; then :
8030  tcl_cv_eh_disposition=yes
8031else
8032  tcl_cv_eh_disposition=no
8033fi
8034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8035
8036fi
8037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5
8038$as_echo "$tcl_cv_eh_disposition" >&6; }
8039	if test "$tcl_cv_eh_disposition" = "no" ; then
8040
8041$as_echo "#define EXCEPTION_DISPOSITION int" >>confdefs.h
8042
8043	fi
8044
8045	# Check to see if winnt.h defines CHAR, SHORT, and LONG
8046	# even if VOID has already been #defined. The win32api
8047	# used by mingw and cygwin is known to do this.
8048
8049	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5
8050$as_echo_n "checking for winnt.h that ignores VOID define... " >&6; }
8051if ${tcl_cv_winnt_ignore_void+:} false; then :
8052  $as_echo_n "(cached) " >&6
8053else
8054  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8055/* end confdefs.h.  */
8056
8057#define VOID void
8058#define WIN32_LEAN_AND_MEAN
8059#include <windows.h>
8060#undef WIN32_LEAN_AND_MEAN
8061
8062int
8063main ()
8064{
8065
8066		CHAR c;
8067		SHORT s;
8068		LONG l;
8069
8070  ;
8071  return 0;
8072}
8073_ACEOF
8074if ac_fn_c_try_compile "$LINENO"; then :
8075  tcl_cv_winnt_ignore_void=yes
8076else
8077  tcl_cv_winnt_ignore_void=no
8078fi
8079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8080
8081fi
8082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5
8083$as_echo "$tcl_cv_winnt_ignore_void" >&6; }
8084	if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
8085
8086$as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h
8087
8088	fi
8089    fi
8090
8091	# See if the compiler supports casting to a union type.
8092	# This is used to stop gcc from printing a compiler
8093	# warning when initializing a union member.
8094
8095	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
8096$as_echo_n "checking for cast to union support... " >&6; }
8097if ${tcl_cv_cast_to_union+:} false; then :
8098  $as_echo_n "(cached) " >&6
8099else
8100  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8101/* end confdefs.h.  */
8102
8103int
8104main ()
8105{
8106
8107		  union foo { int i; double d; };
8108		  union foo f = (union foo) (int) 0;
8109
8110  ;
8111  return 0;
8112}
8113_ACEOF
8114if ac_fn_c_try_compile "$LINENO"; then :
8115  tcl_cv_cast_to_union=yes
8116else
8117  tcl_cv_cast_to_union=no
8118fi
8119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8120
8121fi
8122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
8123$as_echo "$tcl_cv_cast_to_union" >&6; }
8124	if test "$tcl_cv_cast_to_union" = "yes"; then
8125
8126$as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h
8127
8128	fi
8129
8130	ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
8131if test "x$ac_cv_header_stdbool_h" = xyes; then :
8132
8133$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
8134
8135fi
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153    # These must be called after we do the basic CFLAGS checks and
8154    # verify any possible 64-bit or similar switches are necessary
8155
8156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5
8157$as_echo_n "checking for required early compiler flags... " >&6; }
8158    tcl_flags=""
8159
8160    if ${tcl_cv_flag__isoc99_source+:} false; then :
8161  $as_echo_n "(cached) " >&6
8162else
8163  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8164/* end confdefs.h.  */
8165#include <stdlib.h>
8166int
8167main ()
8168{
8169char *p = (char *)strtoll; char *q = (char *)strtoull;
8170  ;
8171  return 0;
8172}
8173_ACEOF
8174if ac_fn_c_try_compile "$LINENO"; then :
8175  tcl_cv_flag__isoc99_source=no
8176else
8177  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8178/* end confdefs.h.  */
8179#define _ISOC99_SOURCE 1
8180#include <stdlib.h>
8181int
8182main ()
8183{
8184char *p = (char *)strtoll; char *q = (char *)strtoull;
8185  ;
8186  return 0;
8187}
8188_ACEOF
8189if ac_fn_c_try_compile "$LINENO"; then :
8190  tcl_cv_flag__isoc99_source=yes
8191else
8192  tcl_cv_flag__isoc99_source=no
8193fi
8194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8195fi
8196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8197fi
8198
8199    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
8200
8201$as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h
8202
8203	tcl_flags="$tcl_flags _ISOC99_SOURCE"
8204    fi
8205
8206
8207    if ${tcl_cv_flag__largefile64_source+:} false; then :
8208  $as_echo_n "(cached) " >&6
8209else
8210  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8211/* end confdefs.h.  */
8212#include <sys/stat.h>
8213int
8214main ()
8215{
8216struct stat64 buf; int i = stat64("/", &buf);
8217  ;
8218  return 0;
8219}
8220_ACEOF
8221if ac_fn_c_try_compile "$LINENO"; then :
8222  tcl_cv_flag__largefile64_source=no
8223else
8224  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8225/* end confdefs.h.  */
8226#define _LARGEFILE64_SOURCE 1
8227#include <sys/stat.h>
8228int
8229main ()
8230{
8231struct stat64 buf; int i = stat64("/", &buf);
8232  ;
8233  return 0;
8234}
8235_ACEOF
8236if ac_fn_c_try_compile "$LINENO"; then :
8237  tcl_cv_flag__largefile64_source=yes
8238else
8239  tcl_cv_flag__largefile64_source=no
8240fi
8241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8242fi
8243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8244fi
8245
8246    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
8247
8248$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
8249
8250	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
8251    fi
8252
8253
8254    if ${tcl_cv_flag__largefile_source64+:} false; then :
8255  $as_echo_n "(cached) " >&6
8256else
8257  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8258/* end confdefs.h.  */
8259#include <sys/stat.h>
8260int
8261main ()
8262{
8263char *p = (char *)open64;
8264  ;
8265  return 0;
8266}
8267_ACEOF
8268if ac_fn_c_try_compile "$LINENO"; then :
8269  tcl_cv_flag__largefile_source64=no
8270else
8271  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8272/* end confdefs.h.  */
8273#define _LARGEFILE_SOURCE64 1
8274#include <sys/stat.h>
8275int
8276main ()
8277{
8278char *p = (char *)open64;
8279  ;
8280  return 0;
8281}
8282_ACEOF
8283if ac_fn_c_try_compile "$LINENO"; then :
8284  tcl_cv_flag__largefile_source64=yes
8285else
8286  tcl_cv_flag__largefile_source64=no
8287fi
8288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8289fi
8290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8291fi
8292
8293    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
8294
8295$as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h
8296
8297	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
8298    fi
8299
8300    if test "x${tcl_flags}" = "x" ; then
8301	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
8302$as_echo "none" >&6; }
8303    else
8304	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5
8305$as_echo "${tcl_flags}" >&6; }
8306    fi
8307
8308
8309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5
8310$as_echo_n "checking for 64-bit integer type... " >&6; }
8311    if ${tcl_cv_type_64bit+:} false; then :
8312  $as_echo_n "(cached) " >&6
8313else
8314
8315	tcl_cv_type_64bit=none
8316	# See if the compiler knows natively about __int64
8317	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8318/* end confdefs.h.  */
8319
8320int
8321main ()
8322{
8323__int64 value = (__int64) 0;
8324  ;
8325  return 0;
8326}
8327_ACEOF
8328if ac_fn_c_try_compile "$LINENO"; then :
8329  tcl_type_64bit=__int64
8330else
8331  tcl_type_64bit="long long"
8332fi
8333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8334	# See if we could use long anyway  Note that we substitute in the
8335	# type that is our current guess for a 64-bit type inside this check
8336	# program, so it should be modified only carefully...
8337        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8338/* end confdefs.h.  */
8339
8340int
8341main ()
8342{
8343switch (0) {
8344            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
8345        }
8346  ;
8347  return 0;
8348}
8349_ACEOF
8350if ac_fn_c_try_compile "$LINENO"; then :
8351  tcl_cv_type_64bit=${tcl_type_64bit}
8352fi
8353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8354fi
8355
8356    if test "${tcl_cv_type_64bit}" = none ; then
8357
8358$as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h
8359
8360	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8361$as_echo "yes" >&6; }
8362    elif test "${tcl_cv_type_64bit}" = "__int64" \
8363		-a "${TEA_PLATFORM}" = "windows" ; then
8364	# TEA specific: We actually want to use the default tcl.h checks in
8365	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
8366	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using Tcl header defaults" >&5
8367$as_echo "using Tcl header defaults" >&6; }
8368    else
8369
8370cat >>confdefs.h <<_ACEOF
8371#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
8372_ACEOF
8373
8374	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5
8375$as_echo "${tcl_cv_type_64bit}" >&6; }
8376
8377	# Now check for auxiliary declarations
8378	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5
8379$as_echo_n "checking for struct dirent64... " >&6; }
8380if ${tcl_cv_struct_dirent64+:} false; then :
8381  $as_echo_n "(cached) " >&6
8382else
8383
8384	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8385/* end confdefs.h.  */
8386#include <sys/types.h>
8387#include <dirent.h>
8388int
8389main ()
8390{
8391struct dirent64 p;
8392  ;
8393  return 0;
8394}
8395_ACEOF
8396if ac_fn_c_try_compile "$LINENO"; then :
8397  tcl_cv_struct_dirent64=yes
8398else
8399  tcl_cv_struct_dirent64=no
8400fi
8401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8402fi
8403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5
8404$as_echo "$tcl_cv_struct_dirent64" >&6; }
8405	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
8406
8407$as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h
8408
8409	fi
8410
8411	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIR64" >&5
8412$as_echo_n "checking for DIR64... " >&6; }
8413if ${tcl_cv_DIR64+:} false; then :
8414  $as_echo_n "(cached) " >&6
8415else
8416
8417	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8418/* end confdefs.h.  */
8419#include <sys/types.h>
8420#include <dirent.h>
8421int
8422main ()
8423{
8424struct dirent64 *p; DIR64 d = opendir64(".");
8425            p = readdir64(d); rewinddir64(d); closedir64(d);
8426  ;
8427  return 0;
8428}
8429_ACEOF
8430if ac_fn_c_try_compile "$LINENO"; then :
8431  tcl_cv_DIR64=yes
8432else
8433  tcl_cv_DIR64=no
8434fi
8435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8436fi
8437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_DIR64" >&5
8438$as_echo "$tcl_cv_DIR64" >&6; }
8439	if test "x${tcl_cv_DIR64}" = "xyes" ; then
8440
8441$as_echo "#define HAVE_DIR64 1" >>confdefs.h
8442
8443	fi
8444
8445	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5
8446$as_echo_n "checking for struct stat64... " >&6; }
8447if ${tcl_cv_struct_stat64+:} false; then :
8448  $as_echo_n "(cached) " >&6
8449else
8450
8451	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8452/* end confdefs.h.  */
8453#include <sys/stat.h>
8454int
8455main ()
8456{
8457struct stat64 p;
8458
8459  ;
8460  return 0;
8461}
8462_ACEOF
8463if ac_fn_c_try_compile "$LINENO"; then :
8464  tcl_cv_struct_stat64=yes
8465else
8466  tcl_cv_struct_stat64=no
8467fi
8468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8469fi
8470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5
8471$as_echo "$tcl_cv_struct_stat64" >&6; }
8472	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
8473
8474$as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h
8475
8476	fi
8477
8478	for ac_func in open64 lseek64
8479do :
8480  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8481ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8482if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8483  cat >>confdefs.h <<_ACEOF
8484#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8485_ACEOF
8486
8487fi
8488done
8489
8490	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5
8491$as_echo_n "checking for off64_t... " >&6; }
8492	if ${tcl_cv_type_off64_t+:} false; then :
8493  $as_echo_n "(cached) " >&6
8494else
8495
8496	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8497/* end confdefs.h.  */
8498#include <sys/types.h>
8499int
8500main ()
8501{
8502off64_t offset;
8503
8504  ;
8505  return 0;
8506}
8507_ACEOF
8508if ac_fn_c_try_compile "$LINENO"; then :
8509  tcl_cv_type_off64_t=yes
8510else
8511  tcl_cv_type_off64_t=no
8512fi
8513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8514fi
8515
8516			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
8517	        test "x${ac_cv_func_lseek64}" = "xyes" && \
8518	        test "x${ac_cv_func_open64}" = "xyes" ; then
8519
8520$as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h
8521
8522	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8523$as_echo "yes" >&6; }
8524	else
8525	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8526$as_echo "no" >&6; }
8527	fi
8528    fi
8529
8530
8531
8532#--------------------------------------------------------------------
8533# Set the default compiler switches based on the --enable-symbols option.
8534#--------------------------------------------------------------------
8535
8536
8537
8538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5
8539$as_echo_n "checking for build with symbols... " >&6; }
8540    # Check whether --enable-symbols was given.
8541if test "${enable_symbols+set}" = set; then :
8542  enableval=$enable_symbols; tcl_ok=$enableval
8543else
8544  tcl_ok=no
8545fi
8546
8547    if test "$tcl_ok" = "no"; then
8548	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
8549	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
8550	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8551$as_echo "no" >&6; }
8552    else
8553	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
8554	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
8555	if test "$tcl_ok" = "yes"; then
8556	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5
8557$as_echo "yes (standard debugging)" >&6; }
8558	fi
8559    fi
8560
8561
8562
8563    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
8564
8565$as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h
8566
8567    fi
8568
8569    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
8570	if test "$tcl_ok" = "all"; then
8571	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem debugging" >&5
8572$as_echo "enabled symbols mem debugging" >&6; }
8573	else
8574	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5
8575$as_echo "enabled $tcl_ok debugging" >&6; }
8576	fi
8577    fi
8578
8579
8580#--------------------------------------------------------------------
8581# For Unix/Tk builds, make sure that the X libraries/headers are found.
8582# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
8583#--------------------------------------------------------------------
8584
8585
8586    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
8587
8588    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
8589$as_echo_n "checking for X... " >&6; }
8590
8591
8592# Check whether --with-x was given.
8593if test "${with_x+set}" = set; then :
8594  withval=$with_x;
8595fi
8596
8597# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8598if test "x$with_x" = xno; then
8599  # The user explicitly disabled X.
8600  have_x=disabled
8601else
8602  case $x_includes,$x_libraries in #(
8603    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
8604    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
8605  $as_echo_n "(cached) " >&6
8606else
8607  # One or both of the vars are not set, and there is no cached value.
8608ac_x_includes=no ac_x_libraries=no
8609rm -f -r conftest.dir
8610if mkdir conftest.dir; then
8611  cd conftest.dir
8612  cat >Imakefile <<'_ACEOF'
8613incroot:
8614	@echo incroot='${INCROOT}'
8615usrlibdir:
8616	@echo usrlibdir='${USRLIBDIR}'
8617libdir:
8618	@echo libdir='${LIBDIR}'
8619_ACEOF
8620  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
8621    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
8622    for ac_var in incroot usrlibdir libdir; do
8623      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8624    done
8625    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8626    for ac_extension in a so sl dylib la dll; do
8627      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8628	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
8629	ac_im_usrlibdir=$ac_im_libdir; break
8630      fi
8631    done
8632    # Screen out bogus values from the imake configuration.  They are
8633    # bogus both because they are the default anyway, and because
8634    # using them would break gcc on systems where it needs fixed includes.
8635    case $ac_im_incroot in
8636	/usr/include) ac_x_includes= ;;
8637	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8638    esac
8639    case $ac_im_usrlibdir in
8640	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
8641	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8642    esac
8643  fi
8644  cd ..
8645  rm -f -r conftest.dir
8646fi
8647
8648# Standard set of common directories for X headers.
8649# Check X11 before X11Rn because it is often a symlink to the current release.
8650ac_x_header_dirs='
8651/usr/X11/include
8652/usr/X11R7/include
8653/usr/X11R6/include
8654/usr/X11R5/include
8655/usr/X11R4/include
8656
8657/usr/include/X11
8658/usr/include/X11R7
8659/usr/include/X11R6
8660/usr/include/X11R5
8661/usr/include/X11R4
8662
8663/usr/local/X11/include
8664/usr/local/X11R7/include
8665/usr/local/X11R6/include
8666/usr/local/X11R5/include
8667/usr/local/X11R4/include
8668
8669/usr/local/include/X11
8670/usr/local/include/X11R7
8671/usr/local/include/X11R6
8672/usr/local/include/X11R5
8673/usr/local/include/X11R4
8674
8675/usr/X386/include
8676/usr/x386/include
8677/usr/XFree86/include/X11
8678
8679/usr/include
8680/usr/local/include
8681/usr/unsupported/include
8682/usr/athena/include
8683/usr/local/x11r5/include
8684/usr/lpp/Xamples/include
8685
8686/usr/openwin/include
8687/usr/openwin/share/include'
8688
8689if test "$ac_x_includes" = no; then
8690  # Guess where to find include files, by looking for Xlib.h.
8691  # First, try using that file with no special directory specified.
8692  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8693/* end confdefs.h.  */
8694#include <X11/Xlib.h>
8695_ACEOF
8696if ac_fn_c_try_cpp "$LINENO"; then :
8697  # We can compile using X headers with no special include directory.
8698ac_x_includes=
8699else
8700  for ac_dir in $ac_x_header_dirs; do
8701  if test -r "$ac_dir/X11/Xlib.h"; then
8702    ac_x_includes=$ac_dir
8703    break
8704  fi
8705done
8706fi
8707rm -f conftest.err conftest.i conftest.$ac_ext
8708fi # $ac_x_includes = no
8709
8710if test "$ac_x_libraries" = no; then
8711  # Check for the libraries.
8712  # See if we find them without any special options.
8713  # Don't add to $LIBS permanently.
8714  ac_save_LIBS=$LIBS
8715  LIBS="-lX11 $LIBS"
8716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8717/* end confdefs.h.  */
8718#include <X11/Xlib.h>
8719int
8720main ()
8721{
8722XrmInitialize ()
8723  ;
8724  return 0;
8725}
8726_ACEOF
8727if ac_fn_c_try_link "$LINENO"; then :
8728  LIBS=$ac_save_LIBS
8729# We can link X programs with no special library path.
8730ac_x_libraries=
8731else
8732  LIBS=$ac_save_LIBS
8733for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8734do
8735  # Don't even attempt the hair of trying to link an X program!
8736  for ac_extension in a so sl dylib la dll; do
8737    if test -r "$ac_dir/libX11.$ac_extension"; then
8738      ac_x_libraries=$ac_dir
8739      break 2
8740    fi
8741  done
8742done
8743fi
8744rm -f core conftest.err conftest.$ac_objext \
8745    conftest$ac_exeext conftest.$ac_ext
8746fi # $ac_x_libraries = no
8747
8748case $ac_x_includes,$ac_x_libraries in #(
8749  no,* | *,no | *\'*)
8750    # Didn't find X, or a directory has "'" in its name.
8751    ac_cv_have_x="have_x=no";; #(
8752  *)
8753    # Record where we found X for the cache.
8754    ac_cv_have_x="have_x=yes\
8755	ac_x_includes='$ac_x_includes'\
8756	ac_x_libraries='$ac_x_libraries'"
8757esac
8758fi
8759;; #(
8760    *) have_x=yes;;
8761  esac
8762  eval "$ac_cv_have_x"
8763fi # $with_x != no
8764
8765if test "$have_x" != yes; then
8766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
8767$as_echo "$have_x" >&6; }
8768  no_x=yes
8769else
8770  # If each of the values was on the command line, it overrides each guess.
8771  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8772  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8773  # Update the cache value to reflect the command line values.
8774  ac_cv_have_x="have_x=yes\
8775	ac_x_includes='$x_includes'\
8776	ac_x_libraries='$x_libraries'"
8777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
8778$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
8779fi
8780
8781    not_really_there=""
8782    if test "$no_x" = ""; then
8783	if test "$x_includes" = ""; then
8784	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8785/* end confdefs.h.  */
8786#include <X11/Xlib.h>
8787_ACEOF
8788if ac_fn_c_try_cpp "$LINENO"; then :
8789
8790else
8791  not_really_there="yes"
8792fi
8793rm -f conftest.err conftest.i conftest.$ac_ext
8794	else
8795	    if test ! -r $x_includes/X11/Xlib.h; then
8796		not_really_there="yes"
8797	    fi
8798	fi
8799    fi
8800    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
8801	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 header files" >&5
8802$as_echo_n "checking for X11 header files... " >&6; }
8803	found_xincludes="no"
8804	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8805/* end confdefs.h.  */
8806#include <X11/Xlib.h>
8807_ACEOF
8808if ac_fn_c_try_cpp "$LINENO"; then :
8809  found_xincludes="yes"
8810else
8811  found_xincludes="no"
8812fi
8813rm -f conftest.err conftest.i conftest.$ac_ext
8814	if test "$found_xincludes" = "no"; then
8815	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
8816	    for i in $dirs ; do
8817		if test -r $i/X11/Xlib.h; then
8818		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i" >&5
8819$as_echo "$i" >&6; }
8820		    XINCLUDES=" -I$i"
8821		    found_xincludes="yes"
8822		    break
8823		fi
8824	    done
8825	fi
8826    else
8827	if test "$x_includes" != ""; then
8828	    XINCLUDES="-I$x_includes"
8829	    found_xincludes="yes"
8830	fi
8831    fi
8832    if test "$found_xincludes" = "no"; then
8833	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: couldn't find any!" >&5
8834$as_echo "couldn't find any!" >&6; }
8835    fi
8836
8837    if test "$no_x" = yes; then
8838	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 libraries" >&5
8839$as_echo_n "checking for X11 libraries... " >&6; }
8840	XLIBSW=nope
8841	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
8842	for i in $dirs ; do
8843	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then
8844		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i" >&5
8845$as_echo "$i" >&6; }
8846		XLIBSW="-L$i -lX11"
8847		x_libraries="$i"
8848		break
8849	    fi
8850	done
8851    else
8852	if test "$x_libraries" = ""; then
8853	    XLIBSW=-lX11
8854	else
8855	    XLIBSW="-L$x_libraries -lX11"
8856	fi
8857    fi
8858    if test "$XLIBSW" = nope ; then
8859	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCreateWindow in -lXwindow" >&5
8860$as_echo_n "checking for XCreateWindow in -lXwindow... " >&6; }
8861if ${ac_cv_lib_Xwindow_XCreateWindow+:} false; then :
8862  $as_echo_n "(cached) " >&6
8863else
8864  ac_check_lib_save_LIBS=$LIBS
8865LIBS="-lXwindow  $LIBS"
8866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8867/* end confdefs.h.  */
8868
8869/* Override any GCC internal prototype to avoid an error.
8870   Use char because int might match the return type of a GCC
8871   builtin and then its argument prototype would still apply.  */
8872#ifdef __cplusplus
8873extern "C"
8874#endif
8875char XCreateWindow ();
8876int
8877main ()
8878{
8879return XCreateWindow ();
8880  ;
8881  return 0;
8882}
8883_ACEOF
8884if ac_fn_c_try_link "$LINENO"; then :
8885  ac_cv_lib_Xwindow_XCreateWindow=yes
8886else
8887  ac_cv_lib_Xwindow_XCreateWindow=no
8888fi
8889rm -f core conftest.err conftest.$ac_objext \
8890    conftest$ac_exeext conftest.$ac_ext
8891LIBS=$ac_check_lib_save_LIBS
8892fi
8893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xwindow_XCreateWindow" >&5
8894$as_echo "$ac_cv_lib_Xwindow_XCreateWindow" >&6; }
8895if test "x$ac_cv_lib_Xwindow_XCreateWindow" = xyes; then :
8896  XLIBSW=-lXwindow
8897fi
8898
8899    fi
8900    if test "$XLIBSW" = nope ; then
8901	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find any!  Using -lX11." >&5
8902$as_echo "could not find any!  Using -lX11." >&6; }
8903	XLIBSW=-lX11
8904    fi
8905    # TEA specific:
8906    if test x"${XLIBSW}" != x ; then
8907	PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
8908    fi
8909
8910    fi
8911
8912
8913#--------------------------------------------------------------------
8914# Everyone should be linking against the Tcl stub library.  If you
8915# can't for some reason, remove this definition.  If you aren't using
8916# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
8917# link against the non-stubbed Tcl library.
8918#--------------------------------------------------------------------
8919
8920$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h
8921
8922$as_echo "#define USE_TK_STUBS 1" >>confdefs.h
8923
8924
8925#--------------------------------------------------------------------
8926# This macro generates a line to use when building a library.  It
8927# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
8928# and TEA_LOAD_TCLCONFIG macros above.
8929#--------------------------------------------------------------------
8930
8931
8932    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
8933	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
8934	MAKE_SHARED_LIB="\${SHLIB_LD} \${LDFLAGS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
8935	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8936/* end confdefs.h.  */
8937
8938#if defined(_MSC_VER) && _MSC_VER >= 1400
8939print("manifest needed")
8940#endif
8941
8942_ACEOF
8943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8944  $EGREP "manifest needed" >/dev/null 2>&1; then :
8945
8946	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
8947	VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi"
8948	VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1 ; fi"
8949	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
8950
8951    CLEANFILES="$CLEANFILES *.manifest"
8952
8953
8954fi
8955rm -f conftest*
8956
8957	MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\$@ \$(PKG_STUB_OBJECTS)"
8958    else
8959	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
8960	MAKE_SHARED_LIB="\${SHLIB_LD} \${LDFLAGS} \${LDFLAGS_DEFAULT} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
8961	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
8962    fi
8963
8964    if test "${SHARED_BUILD}" = "1" ; then
8965	MAKE_LIB="${MAKE_SHARED_LIB} "
8966    else
8967	MAKE_LIB="${MAKE_STATIC_LIB} "
8968    fi
8969
8970    #--------------------------------------------------------------------
8971    # Shared libraries and static libraries have different names.
8972    # Use the double eval to make sure any variables in the suffix is
8973    # substituted. (@@@ Might not be necessary anymore)
8974    #--------------------------------------------------------------------
8975
8976    if test "${TEA_PLATFORM}" = "windows" ; then
8977	if test "${SHARED_BUILD}" = "1" ; then
8978	    # We force the unresolved linking of symbols that are really in
8979	    # the private libraries of Tcl and Tk.
8980	    if test x"${TK_BIN_DIR}" != x ; then
8981		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
8982	    fi
8983	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
8984	    if test "$GCC" = "yes"; then
8985		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
8986	    fi
8987	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
8988	else
8989	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
8990	    if test "$GCC" = "yes"; then
8991		PKG_LIB_FILE=lib${PKG_LIB_FILE}
8992	    fi
8993	fi
8994	# Some packages build their own stubs libraries
8995	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
8996	if test "$GCC" = "yes"; then
8997	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
8998	fi
8999	# These aren't needed on Windows (either MSVC or gcc)
9000	RANLIB=:
9001	RANLIB_STUB=:
9002    else
9003	RANLIB_STUB="${RANLIB}"
9004	if test "${SHARED_BUILD}" = "1" ; then
9005	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
9006	    if test x"${TK_BIN_DIR}" != x ; then
9007		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
9008	    fi
9009	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
9010	    RANLIB=:
9011	else
9012	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
9013	fi
9014	# Some packages build their own stubs libraries
9015	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
9016    fi
9017
9018    # These are escaped so that only CFLAGS is picked up at configure time.
9019    # The other values will be substituted at make time.
9020    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
9021    if test "${SHARED_BUILD}" = "1" ; then
9022	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
9023    fi
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034#--------------------------------------------------------------------
9035# __CHANGE__
9036# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
9037#--------------------------------------------------------------------
9038
9039if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
9040
9041    vars="\"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
9042    for i in $vars; do
9043	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
9044	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
9045	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
9046	fi
9047	PKG_LIBS="$PKG_LIBS $i"
9048    done
9049
9050
9051else
9052
9053    vars="${tkimg_STUB_LIB_SPEC}"
9054    for i in $vars; do
9055	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
9056	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
9057	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
9058	fi
9059	PKG_LIBS="$PKG_LIBS $i"
9060    done
9061
9062
9063fi
9064
9065#--------------------------------------------------------------------
9066# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
9067# file during the install process.  Don't run the TCLSH_PROG through
9068# ${CYGPATH} because it's being used directly by make.
9069# Require that we use a tclsh shell version 8.2 or later since earlier
9070# versions have bugs in the pkg_mkIndex routine.
9071# Add WISH as well if this is a Tk extension.
9072#--------------------------------------------------------------------
9073
9074
9075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5
9076$as_echo_n "checking for tclsh... " >&6; }
9077    if test -f "${TCL_BIN_DIR}/Makefile" ; then
9078        # tclConfig.sh is in Tcl build directory
9079        if test "${TEA_PLATFORM}" = "windows"; then
9080          if test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}" ; then
9081            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}"
9082          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}" ; then
9083            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}"
9084          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}" ; then
9085            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}"
9086          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}" ; then
9087            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}"
9088          fi
9089        else
9090            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
9091        fi
9092    else
9093        # tclConfig.sh is in install location
9094        if test "${TEA_PLATFORM}" = "windows"; then
9095            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}"
9096        else
9097            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}"
9098        fi
9099        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
9100              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
9101              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
9102        for i in $list ; do
9103            if test -f "$i/${TCLSH_PROG}" ; then
9104                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
9105                break
9106            fi
9107        done
9108        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
9109    fi
9110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${TCLSH_PROG}" >&5
9111$as_echo "${TCLSH_PROG}" >&6; }
9112
9113
9114
9115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wish" >&5
9116$as_echo_n "checking for wish... " >&6; }
9117    if test -f "${TK_BIN_DIR}/Makefile" ; then
9118        # tkConfig.sh is in Tk build directory
9119        if test "${TEA_PLATFORM}" = "windows"; then
9120          if test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}" ; then
9121            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}"
9122          elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}s${EXEEXT}" ; then
9123            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}$s{EXEEXT}"
9124          elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}t${EXEEXT}" ; then
9125            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}t${EXEEXT}"
9126          elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}st${EXEEXT}" ; then
9127            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}st${EXEEXT}"
9128          fi
9129        else
9130            WISH_PROG="${TK_BIN_DIR}/wish"
9131        fi
9132    else
9133        # tkConfig.sh is in install location
9134        if test "${TEA_PLATFORM}" = "windows"; then
9135            WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}"
9136        else
9137            WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}"
9138        fi
9139        list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
9140              `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
9141              `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
9142        for i in $list ; do
9143            if test -f "$i/${WISH_PROG}" ; then
9144                REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
9145                break
9146            fi
9147        done
9148        WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
9149    fi
9150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WISH_PROG}" >&5
9151$as_echo "${WISH_PROG}" >&6; }
9152
9153
9154
9155#--------------------------------------------------------------------
9156# Finally, substitute all of the various values into the Makefile.
9157# You may alternatively have a special pkgIndex.tcl.in or other files
9158# which require substituting th AC variables in.  Include these here.
9159#--------------------------------------------------------------------
9160
9161ac_config_files="$ac_config_files Makefile"
9162
9163cat >confcache <<\_ACEOF
9164# This file is a shell script that caches the results of configure
9165# tests run on this system so they can be shared between configure
9166# scripts and configure runs, see configure's option --config-cache.
9167# It is not useful on other systems.  If it contains results you don't
9168# want to keep, you may remove or edit it.
9169#
9170# config.status only pays attention to the cache file if you give it
9171# the --recheck option to rerun configure.
9172#
9173# `ac_cv_env_foo' variables (set or unset) will be overridden when
9174# loading this file, other *unset* `ac_cv_foo' will be assigned the
9175# following values.
9176
9177_ACEOF
9178
9179# The following way of writing the cache mishandles newlines in values,
9180# but we know of no workaround that is simple, portable, and efficient.
9181# So, we kill variables containing newlines.
9182# Ultrix sh set writes to stderr and can't be redirected directly,
9183# and sets the high bit in the cache file unless we assign to the vars.
9184(
9185  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
9186    eval ac_val=\$$ac_var
9187    case $ac_val in #(
9188    *${as_nl}*)
9189      case $ac_var in #(
9190      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
9191$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
9192      esac
9193      case $ac_var in #(
9194      _ | IFS | as_nl) ;; #(
9195      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
9196      *) { eval $ac_var=; unset $ac_var;} ;;
9197      esac ;;
9198    esac
9199  done
9200
9201  (set) 2>&1 |
9202    case $as_nl`(ac_space=' '; set) 2>&1` in #(
9203    *${as_nl}ac_space=\ *)
9204      # `set' does not quote correctly, so add quotes: double-quote
9205      # substitution turns \\\\ into \\, and sed turns \\ into \.
9206      sed -n \
9207	"s/'/'\\\\''/g;
9208	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
9209      ;; #(
9210    *)
9211      # `set' quotes correctly as required by POSIX, so do not add quotes.
9212      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
9213      ;;
9214    esac |
9215    sort
9216) |
9217  sed '
9218     /^ac_cv_env_/b end
9219     t clear
9220     :clear
9221     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
9222     t end
9223     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
9224     :end' >>confcache
9225if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
9226  if test -w "$cache_file"; then
9227    if test "x$cache_file" != "x/dev/null"; then
9228      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
9229$as_echo "$as_me: updating cache $cache_file" >&6;}
9230      if test ! -f "$cache_file" || test -h "$cache_file"; then
9231	cat confcache >"$cache_file"
9232      else
9233        case $cache_file in #(
9234        */* | ?:*)
9235	  mv -f confcache "$cache_file"$$ &&
9236	  mv -f "$cache_file"$$ "$cache_file" ;; #(
9237        *)
9238	  mv -f confcache "$cache_file" ;;
9239	esac
9240      fi
9241    fi
9242  else
9243    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
9244$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
9245  fi
9246fi
9247rm -f confcache
9248
9249test "x$prefix" = xNONE && prefix=$ac_default_prefix
9250# Let make expand exec_prefix.
9251test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9252
9253# Transform confdefs.h into DEFS.
9254# Protect against shell expansion while executing Makefile rules.
9255# Protect against Makefile macro expansion.
9256#
9257# If the first sed substitution is executed (which looks for macros that
9258# take arguments), then branch to the quote section.  Otherwise,
9259# look for a macro that doesn't take arguments.
9260ac_script='
9261:mline
9262/\\$/{
9263 N
9264 s,\\\n,,
9265 b mline
9266}
9267t clear
9268:clear
9269s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
9270t quote
9271s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
9272t quote
9273b any
9274:quote
9275s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
9276s/\[/\\&/g
9277s/\]/\\&/g
9278s/\$/$$/g
9279H
9280:any
9281${
9282	g
9283	s/^\n//
9284	s/\n/ /g
9285	p
9286}
9287'
9288DEFS=`sed -n "$ac_script" confdefs.h`
9289
9290
9291ac_libobjs=
9292ac_ltlibobjs=
9293U=
9294for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
9295  # 1. Remove the extension, and $U if already installed.
9296  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
9297  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
9298  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
9299  #    will be set to the directory where LIBOBJS objects are built.
9300  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
9301  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
9302done
9303LIBOBJS=$ac_libobjs
9304
9305LTLIBOBJS=$ac_ltlibobjs
9306
9307
9308
9309CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
9310
9311: "${CONFIG_STATUS=./config.status}"
9312ac_write_fail=0
9313ac_clean_files_save=$ac_clean_files
9314ac_clean_files="$ac_clean_files $CONFIG_STATUS"
9315{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
9316$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
9317as_write_fail=0
9318cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
9319#! $SHELL
9320# Generated by $as_me.
9321# Run this file to recreate the current configuration.
9322# Compiler output produced by configure, useful for debugging
9323# configure, is in config.log if it exists.
9324
9325debug=false
9326ac_cs_recheck=false
9327ac_cs_silent=false
9328
9329SHELL=\${CONFIG_SHELL-$SHELL}
9330export SHELL
9331_ASEOF
9332cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
9333## -------------------- ##
9334## M4sh Initialization. ##
9335## -------------------- ##
9336
9337# Be more Bourne compatible
9338DUALCASE=1; export DUALCASE # for MKS sh
9339if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
9340  emulate sh
9341  NULLCMD=:
9342  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
9343  # is contrary to our usage.  Disable this feature.
9344  alias -g '${1+"$@"}'='"$@"'
9345  setopt NO_GLOB_SUBST
9346else
9347  case `(set -o) 2>/dev/null` in #(
9348  *posix*) :
9349    set -o posix ;; #(
9350  *) :
9351     ;;
9352esac
9353fi
9354
9355
9356as_nl='
9357'
9358export as_nl
9359# Printing a long string crashes Solaris 7 /usr/bin/printf.
9360as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
9361as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
9362as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
9363# Prefer a ksh shell builtin over an external printf program on Solaris,
9364# but without wasting forks for bash or zsh.
9365if test -z "$BASH_VERSION$ZSH_VERSION" \
9366    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
9367  as_echo='print -r --'
9368  as_echo_n='print -rn --'
9369elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
9370  as_echo='printf %s\n'
9371  as_echo_n='printf %s'
9372else
9373  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
9374    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
9375    as_echo_n='/usr/ucb/echo -n'
9376  else
9377    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
9378    as_echo_n_body='eval
9379      arg=$1;
9380      case $arg in #(
9381      *"$as_nl"*)
9382	expr "X$arg" : "X\\(.*\\)$as_nl";
9383	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
9384      esac;
9385      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
9386    '
9387    export as_echo_n_body
9388    as_echo_n='sh -c $as_echo_n_body as_echo'
9389  fi
9390  export as_echo_body
9391  as_echo='sh -c $as_echo_body as_echo'
9392fi
9393
9394# The user is always right.
9395if test "${PATH_SEPARATOR+set}" != set; then
9396  PATH_SEPARATOR=:
9397  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
9398    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
9399      PATH_SEPARATOR=';'
9400  }
9401fi
9402
9403
9404# IFS
9405# We need space, tab and new line, in precisely that order.  Quoting is
9406# there to prevent editors from complaining about space-tab.
9407# (If _AS_PATH_WALK were called with IFS unset, it would disable word
9408# splitting by setting IFS to empty value.)
9409IFS=" ""	$as_nl"
9410
9411# Find who we are.  Look in the path if we contain no directory separator.
9412as_myself=
9413case $0 in #((
9414  *[\\/]* ) as_myself=$0 ;;
9415  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9416for as_dir in $PATH
9417do
9418  IFS=$as_save_IFS
9419  test -z "$as_dir" && as_dir=.
9420    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
9421  done
9422IFS=$as_save_IFS
9423
9424     ;;
9425esac
9426# We did not find ourselves, most probably we were run as `sh COMMAND'
9427# in which case we are not to be found in the path.
9428if test "x$as_myself" = x; then
9429  as_myself=$0
9430fi
9431if test ! -f "$as_myself"; then
9432  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
9433  exit 1
9434fi
9435
9436# Unset variables that we do not need and which cause bugs (e.g. in
9437# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
9438# suppresses any "Segmentation fault" message there.  '((' could
9439# trigger a bug in pdksh 5.2.14.
9440for as_var in BASH_ENV ENV MAIL MAILPATH
9441do eval test x\${$as_var+set} = xset \
9442  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
9443done
9444PS1='$ '
9445PS2='> '
9446PS4='+ '
9447
9448# NLS nuisances.
9449LC_ALL=C
9450export LC_ALL
9451LANGUAGE=C
9452export LANGUAGE
9453
9454# CDPATH.
9455(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
9456
9457
9458# as_fn_error STATUS ERROR [LINENO LOG_FD]
9459# ----------------------------------------
9460# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
9461# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
9462# script with STATUS, using 1 if that was 0.
9463as_fn_error ()
9464{
9465  as_status=$1; test $as_status -eq 0 && as_status=1
9466  if test "$4"; then
9467    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
9468    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
9469  fi
9470  $as_echo "$as_me: error: $2" >&2
9471  as_fn_exit $as_status
9472} # as_fn_error
9473
9474
9475# as_fn_set_status STATUS
9476# -----------------------
9477# Set $? to STATUS, without forking.
9478as_fn_set_status ()
9479{
9480  return $1
9481} # as_fn_set_status
9482
9483# as_fn_exit STATUS
9484# -----------------
9485# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
9486as_fn_exit ()
9487{
9488  set +e
9489  as_fn_set_status $1
9490  exit $1
9491} # as_fn_exit
9492
9493# as_fn_unset VAR
9494# ---------------
9495# Portably unset VAR.
9496as_fn_unset ()
9497{
9498  { eval $1=; unset $1;}
9499}
9500as_unset=as_fn_unset
9501# as_fn_append VAR VALUE
9502# ----------------------
9503# Append the text in VALUE to the end of the definition contained in VAR. Take
9504# advantage of any shell optimizations that allow amortized linear growth over
9505# repeated appends, instead of the typical quadratic growth present in naive
9506# implementations.
9507if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
9508  eval 'as_fn_append ()
9509  {
9510    eval $1+=\$2
9511  }'
9512else
9513  as_fn_append ()
9514  {
9515    eval $1=\$$1\$2
9516  }
9517fi # as_fn_append
9518
9519# as_fn_arith ARG...
9520# ------------------
9521# Perform arithmetic evaluation on the ARGs, and store the result in the
9522# global $as_val. Take advantage of shells that can avoid forks. The arguments
9523# must be portable across $(()) and expr.
9524if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
9525  eval 'as_fn_arith ()
9526  {
9527    as_val=$(( $* ))
9528  }'
9529else
9530  as_fn_arith ()
9531  {
9532    as_val=`expr "$@" || test $? -eq 1`
9533  }
9534fi # as_fn_arith
9535
9536
9537if expr a : '\(a\)' >/dev/null 2>&1 &&
9538   test "X`expr 00001 : '.*\(...\)'`" = X001; then
9539  as_expr=expr
9540else
9541  as_expr=false
9542fi
9543
9544if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
9545  as_basename=basename
9546else
9547  as_basename=false
9548fi
9549
9550if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
9551  as_dirname=dirname
9552else
9553  as_dirname=false
9554fi
9555
9556as_me=`$as_basename -- "$0" ||
9557$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
9558	 X"$0" : 'X\(//\)$' \| \
9559	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
9560$as_echo X/"$0" |
9561    sed '/^.*\/\([^/][^/]*\)\/*$/{
9562	    s//\1/
9563	    q
9564	  }
9565	  /^X\/\(\/\/\)$/{
9566	    s//\1/
9567	    q
9568	  }
9569	  /^X\/\(\/\).*/{
9570	    s//\1/
9571	    q
9572	  }
9573	  s/.*/./; q'`
9574
9575# Avoid depending upon Character Ranges.
9576as_cr_letters='abcdefghijklmnopqrstuvwxyz'
9577as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
9578as_cr_Letters=$as_cr_letters$as_cr_LETTERS
9579as_cr_digits='0123456789'
9580as_cr_alnum=$as_cr_Letters$as_cr_digits
9581
9582ECHO_C= ECHO_N= ECHO_T=
9583case `echo -n x` in #(((((
9584-n*)
9585  case `echo 'xy\c'` in
9586  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
9587  xy)  ECHO_C='\c';;
9588  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
9589       ECHO_T='	';;
9590  esac;;
9591*)
9592  ECHO_N='-n';;
9593esac
9594
9595rm -f conf$$ conf$$.exe conf$$.file
9596if test -d conf$$.dir; then
9597  rm -f conf$$.dir/conf$$.file
9598else
9599  rm -f conf$$.dir
9600  mkdir conf$$.dir 2>/dev/null
9601fi
9602if (echo >conf$$.file) 2>/dev/null; then
9603  if ln -s conf$$.file conf$$ 2>/dev/null; then
9604    as_ln_s='ln -s'
9605    # ... but there are two gotchas:
9606    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
9607    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
9608    # In both cases, we have to default to `cp -pR'.
9609    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
9610      as_ln_s='cp -pR'
9611  elif ln conf$$.file conf$$ 2>/dev/null; then
9612    as_ln_s=ln
9613  else
9614    as_ln_s='cp -pR'
9615  fi
9616else
9617  as_ln_s='cp -pR'
9618fi
9619rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
9620rmdir conf$$.dir 2>/dev/null
9621
9622
9623# as_fn_mkdir_p
9624# -------------
9625# Create "$as_dir" as a directory, including parents if necessary.
9626as_fn_mkdir_p ()
9627{
9628
9629  case $as_dir in #(
9630  -*) as_dir=./$as_dir;;
9631  esac
9632  test -d "$as_dir" || eval $as_mkdir_p || {
9633    as_dirs=
9634    while :; do
9635      case $as_dir in #(
9636      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
9637      *) as_qdir=$as_dir;;
9638      esac
9639      as_dirs="'$as_qdir' $as_dirs"
9640      as_dir=`$as_dirname -- "$as_dir" ||
9641$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9642	 X"$as_dir" : 'X\(//\)[^/]' \| \
9643	 X"$as_dir" : 'X\(//\)$' \| \
9644	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
9645$as_echo X"$as_dir" |
9646    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9647	    s//\1/
9648	    q
9649	  }
9650	  /^X\(\/\/\)[^/].*/{
9651	    s//\1/
9652	    q
9653	  }
9654	  /^X\(\/\/\)$/{
9655	    s//\1/
9656	    q
9657	  }
9658	  /^X\(\/\).*/{
9659	    s//\1/
9660	    q
9661	  }
9662	  s/.*/./; q'`
9663      test -d "$as_dir" && break
9664    done
9665    test -z "$as_dirs" || eval "mkdir $as_dirs"
9666  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
9667
9668
9669} # as_fn_mkdir_p
9670if mkdir -p . 2>/dev/null; then
9671  as_mkdir_p='mkdir -p "$as_dir"'
9672else
9673  test -d ./-p && rmdir ./-p
9674  as_mkdir_p=false
9675fi
9676
9677
9678# as_fn_executable_p FILE
9679# -----------------------
9680# Test if FILE is an executable regular file.
9681as_fn_executable_p ()
9682{
9683  test -f "$1" && test -x "$1"
9684} # as_fn_executable_p
9685as_test_x='test -x'
9686as_executable_p=as_fn_executable_p
9687
9688# Sed expression to map a string onto a valid CPP name.
9689as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
9690
9691# Sed expression to map a string onto a valid variable name.
9692as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
9693
9694
9695exec 6>&1
9696## ----------------------------------- ##
9697## Main body of $CONFIG_STATUS script. ##
9698## ----------------------------------- ##
9699_ASEOF
9700test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
9701
9702cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9703# Save the log message, to keep $0 and so on meaningful, and to
9704# report actual input values of CONFIG_FILES etc. instead of their
9705# values after options handling.
9706ac_log="
9707This file was extended by tkimgxbm $as_me 1.4.12, which was
9708generated by GNU Autoconf 2.69.  Invocation command line was
9709
9710  CONFIG_FILES    = $CONFIG_FILES
9711  CONFIG_HEADERS  = $CONFIG_HEADERS
9712  CONFIG_LINKS    = $CONFIG_LINKS
9713  CONFIG_COMMANDS = $CONFIG_COMMANDS
9714  $ $0 $@
9715
9716on `(hostname || uname -n) 2>/dev/null | sed 1q`
9717"
9718
9719_ACEOF
9720
9721case $ac_config_files in *"
9722"*) set x $ac_config_files; shift; ac_config_files=$*;;
9723esac
9724
9725
9726
9727cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9728# Files that config.status was made for.
9729config_files="$ac_config_files"
9730
9731_ACEOF
9732
9733cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9734ac_cs_usage="\
9735\`$as_me' instantiates files and other configuration actions
9736from templates according to the current configuration.  Unless the files
9737and actions are specified as TAGs, all are instantiated by default.
9738
9739Usage: $0 [OPTION]... [TAG]...
9740
9741  -h, --help       print this help, then exit
9742  -V, --version    print version number and configuration settings, then exit
9743      --config     print configuration, then exit
9744  -q, --quiet, --silent
9745                   do not print progress messages
9746  -d, --debug      don't remove temporary files
9747      --recheck    update $as_me by reconfiguring in the same conditions
9748      --file=FILE[:TEMPLATE]
9749                   instantiate the configuration file FILE
9750
9751Configuration files:
9752$config_files
9753
9754Report bugs to the package provider."
9755
9756_ACEOF
9757cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9758ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
9759ac_cs_version="\\
9760tkimgxbm config.status 1.4.12
9761configured by $0, generated by GNU Autoconf 2.69,
9762  with options \\"\$ac_cs_config\\"
9763
9764Copyright (C) 2012 Free Software Foundation, Inc.
9765This config.status script is free software; the Free Software Foundation
9766gives unlimited permission to copy, distribute and modify it."
9767
9768ac_pwd='$ac_pwd'
9769srcdir='$srcdir'
9770test -n "\$AWK" || AWK=awk
9771_ACEOF
9772
9773cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9774# The default lists apply if the user does not specify any file.
9775ac_need_defaults=:
9776while test $# != 0
9777do
9778  case $1 in
9779  --*=?*)
9780    ac_option=`expr "X$1" : 'X\([^=]*\)='`
9781    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
9782    ac_shift=:
9783    ;;
9784  --*=)
9785    ac_option=`expr "X$1" : 'X\([^=]*\)='`
9786    ac_optarg=
9787    ac_shift=:
9788    ;;
9789  *)
9790    ac_option=$1
9791    ac_optarg=$2
9792    ac_shift=shift
9793    ;;
9794  esac
9795
9796  case $ac_option in
9797  # Handling of the options.
9798  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9799    ac_cs_recheck=: ;;
9800  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
9801    $as_echo "$ac_cs_version"; exit ;;
9802  --config | --confi | --conf | --con | --co | --c )
9803    $as_echo "$ac_cs_config"; exit ;;
9804  --debug | --debu | --deb | --de | --d | -d )
9805    debug=: ;;
9806  --file | --fil | --fi | --f )
9807    $ac_shift
9808    case $ac_optarg in
9809    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
9810    '') as_fn_error $? "missing file argument" ;;
9811    esac
9812    as_fn_append CONFIG_FILES " '$ac_optarg'"
9813    ac_need_defaults=false;;
9814  --he | --h |  --help | --hel | -h )
9815    $as_echo "$ac_cs_usage"; exit ;;
9816  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
9817  | -silent | --silent | --silen | --sile | --sil | --si | --s)
9818    ac_cs_silent=: ;;
9819
9820  # This is an error.
9821  -*) as_fn_error $? "unrecognized option: \`$1'
9822Try \`$0 --help' for more information." ;;
9823
9824  *) as_fn_append ac_config_targets " $1"
9825     ac_need_defaults=false ;;
9826
9827  esac
9828  shift
9829done
9830
9831ac_configure_extra_args=
9832
9833if $ac_cs_silent; then
9834  exec 6>/dev/null
9835  ac_configure_extra_args="$ac_configure_extra_args --silent"
9836fi
9837
9838_ACEOF
9839cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9840if \$ac_cs_recheck; then
9841  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
9842  shift
9843  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
9844  CONFIG_SHELL='$SHELL'
9845  export CONFIG_SHELL
9846  exec "\$@"
9847fi
9848
9849_ACEOF
9850cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9851exec 5>>config.log
9852{
9853  echo
9854  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
9855## Running $as_me. ##
9856_ASBOX
9857  $as_echo "$ac_log"
9858} >&5
9859
9860_ACEOF
9861cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9862_ACEOF
9863
9864cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9865
9866# Handling of arguments.
9867for ac_config_target in $ac_config_targets
9868do
9869  case $ac_config_target in
9870    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
9871
9872  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
9873  esac
9874done
9875
9876
9877# If the user did not use the arguments to specify the items to instantiate,
9878# then the envvar interface is used.  Set only those that are not.
9879# We use the long form for the default assignment because of an extremely
9880# bizarre bug on SunOS 4.1.3.
9881if $ac_need_defaults; then
9882  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
9883fi
9884
9885# Have a temporary directory for convenience.  Make it in the build tree
9886# simply because there is no reason against having it here, and in addition,
9887# creating and moving files from /tmp can sometimes cause problems.
9888# Hook for its removal unless debugging.
9889# Note that there is a small window in which the directory will not be cleaned:
9890# after its creation but before its name has been assigned to `$tmp'.
9891$debug ||
9892{
9893  tmp= ac_tmp=
9894  trap 'exit_status=$?
9895  : "${ac_tmp:=$tmp}"
9896  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
9897' 0
9898  trap 'as_fn_exit 1' 1 2 13 15
9899}
9900# Create a (secure) tmp directory for tmp files.
9901
9902{
9903  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
9904  test -d "$tmp"
9905}  ||
9906{
9907  tmp=./conf$$-$RANDOM
9908  (umask 077 && mkdir "$tmp")
9909} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
9910ac_tmp=$tmp
9911
9912# Set up the scripts for CONFIG_FILES section.
9913# No need to generate them if there are no CONFIG_FILES.
9914# This happens for instance with `./config.status config.h'.
9915if test -n "$CONFIG_FILES"; then
9916
9917
9918ac_cr=`echo X | tr X '\015'`
9919# On cygwin, bash can eat \r inside `` if the user requested igncr.
9920# But we know of no other shell where ac_cr would be empty at this
9921# point, so we can use a bashism as a fallback.
9922if test "x$ac_cr" = x; then
9923  eval ac_cr=\$\'\\r\'
9924fi
9925ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
9926if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
9927  ac_cs_awk_cr='\\r'
9928else
9929  ac_cs_awk_cr=$ac_cr
9930fi
9931
9932echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
9933_ACEOF
9934
9935
9936{
9937  echo "cat >conf$$subs.awk <<_ACEOF" &&
9938  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
9939  echo "_ACEOF"
9940} >conf$$subs.sh ||
9941  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9942ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
9943ac_delim='%!_!# '
9944for ac_last_try in false false false false false :; do
9945  . ./conf$$subs.sh ||
9946    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9947
9948  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
9949  if test $ac_delim_n = $ac_delim_num; then
9950    break
9951  elif $ac_last_try; then
9952    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9953  else
9954    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
9955  fi
9956done
9957rm -f conf$$subs.sh
9958
9959cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9960cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
9961_ACEOF
9962sed -n '
9963h
9964s/^/S["/; s/!.*/"]=/
9965p
9966g
9967s/^[^!]*!//
9968:repl
9969t repl
9970s/'"$ac_delim"'$//
9971t delim
9972:nl
9973h
9974s/\(.\{148\}\)..*/\1/
9975t more1
9976s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
9977p
9978n
9979b repl
9980:more1
9981s/["\\]/\\&/g; s/^/"/; s/$/"\\/
9982p
9983g
9984s/.\{148\}//
9985t nl
9986:delim
9987h
9988s/\(.\{148\}\)..*/\1/
9989t more2
9990s/["\\]/\\&/g; s/^/"/; s/$/"/
9991p
9992b
9993:more2
9994s/["\\]/\\&/g; s/^/"/; s/$/"\\/
9995p
9996g
9997s/.\{148\}//
9998t delim
9999' <conf$$subs.awk | sed '
10000/^[^""]/{
10001  N
10002  s/\n//
10003}
10004' >>$CONFIG_STATUS || ac_write_fail=1
10005rm -f conf$$subs.awk
10006cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10007_ACAWK
10008cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
10009  for (key in S) S_is_set[key] = 1
10010  FS = ""
10011
10012}
10013{
10014  line = $ 0
10015  nfields = split(line, field, "@")
10016  substed = 0
10017  len = length(field[1])
10018  for (i = 2; i < nfields; i++) {
10019    key = field[i]
10020    keylen = length(key)
10021    if (S_is_set[key]) {
10022      value = S[key]
10023      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
10024      len += length(value) + length(field[++i])
10025      substed = 1
10026    } else
10027      len += 1 + keylen
10028  }
10029
10030  print line
10031}
10032
10033_ACAWK
10034_ACEOF
10035cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10036if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
10037  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
10038else
10039  cat
10040fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
10041  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
10042_ACEOF
10043
10044# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
10045# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
10046# trailing colons and then remove the whole line if VPATH becomes empty
10047# (actually we leave an empty line to preserve line numbers).
10048if test "x$srcdir" = x.; then
10049  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
10050h
10051s///
10052s/^/:/
10053s/[	 ]*$/:/
10054s/:\$(srcdir):/:/g
10055s/:\${srcdir}:/:/g
10056s/:@srcdir@:/:/g
10057s/^:*//
10058s/:*$//
10059x
10060s/\(=[	 ]*\).*/\1/
10061G
10062s/\n//
10063s/^[^=]*=[	 ]*$//
10064}'
10065fi
10066
10067cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10068fi # test -n "$CONFIG_FILES"
10069
10070
10071eval set X "  :F $CONFIG_FILES      "
10072shift
10073for ac_tag
10074do
10075  case $ac_tag in
10076  :[FHLC]) ac_mode=$ac_tag; continue;;
10077  esac
10078  case $ac_mode$ac_tag in
10079  :[FHL]*:*);;
10080  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
10081  :[FH]-) ac_tag=-:-;;
10082  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
10083  esac
10084  ac_save_IFS=$IFS
10085  IFS=:
10086  set x $ac_tag
10087  IFS=$ac_save_IFS
10088  shift
10089  ac_file=$1
10090  shift
10091
10092  case $ac_mode in
10093  :L) ac_source=$1;;
10094  :[FH])
10095    ac_file_inputs=
10096    for ac_f
10097    do
10098      case $ac_f in
10099      -) ac_f="$ac_tmp/stdin";;
10100      *) # Look for the file first in the build tree, then in the source tree
10101	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
10102	 # because $ac_f cannot contain `:'.
10103	 test -f "$ac_f" ||
10104	   case $ac_f in
10105	   [\\/$]*) false;;
10106	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
10107	   esac ||
10108	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
10109      esac
10110      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
10111      as_fn_append ac_file_inputs " '$ac_f'"
10112    done
10113
10114    # Let's still pretend it is `configure' which instantiates (i.e., don't
10115    # use $as_me), people would be surprised to read:
10116    #    /* config.h.  Generated by config.status.  */
10117    configure_input='Generated from '`
10118	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
10119	`' by configure.'
10120    if test x"$ac_file" != x-; then
10121      configure_input="$ac_file.  $configure_input"
10122      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
10123$as_echo "$as_me: creating $ac_file" >&6;}
10124    fi
10125    # Neutralize special characters interpreted by sed in replacement strings.
10126    case $configure_input in #(
10127    *\&* | *\|* | *\\* )
10128       ac_sed_conf_input=`$as_echo "$configure_input" |
10129       sed 's/[\\\\&|]/\\\\&/g'`;; #(
10130    *) ac_sed_conf_input=$configure_input;;
10131    esac
10132
10133    case $ac_tag in
10134    *:-:* | *:-) cat >"$ac_tmp/stdin" \
10135      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
10136    esac
10137    ;;
10138  esac
10139
10140  ac_dir=`$as_dirname -- "$ac_file" ||
10141$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10142	 X"$ac_file" : 'X\(//\)[^/]' \| \
10143	 X"$ac_file" : 'X\(//\)$' \| \
10144	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
10145$as_echo X"$ac_file" |
10146    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
10147	    s//\1/
10148	    q
10149	  }
10150	  /^X\(\/\/\)[^/].*/{
10151	    s//\1/
10152	    q
10153	  }
10154	  /^X\(\/\/\)$/{
10155	    s//\1/
10156	    q
10157	  }
10158	  /^X\(\/\).*/{
10159	    s//\1/
10160	    q
10161	  }
10162	  s/.*/./; q'`
10163  as_dir="$ac_dir"; as_fn_mkdir_p
10164  ac_builddir=.
10165
10166case "$ac_dir" in
10167.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
10168*)
10169  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
10170  # A ".." for each directory in $ac_dir_suffix.
10171  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
10172  case $ac_top_builddir_sub in
10173  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
10174  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
10175  esac ;;
10176esac
10177ac_abs_top_builddir=$ac_pwd
10178ac_abs_builddir=$ac_pwd$ac_dir_suffix
10179# for backward compatibility:
10180ac_top_builddir=$ac_top_build_prefix
10181
10182case $srcdir in
10183  .)  # We are building in place.
10184    ac_srcdir=.
10185    ac_top_srcdir=$ac_top_builddir_sub
10186    ac_abs_top_srcdir=$ac_pwd ;;
10187  [\\/]* | ?:[\\/]* )  # Absolute name.
10188    ac_srcdir=$srcdir$ac_dir_suffix;
10189    ac_top_srcdir=$srcdir
10190    ac_abs_top_srcdir=$srcdir ;;
10191  *) # Relative name.
10192    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
10193    ac_top_srcdir=$ac_top_build_prefix$srcdir
10194    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
10195esac
10196ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
10197
10198
10199  case $ac_mode in
10200  :F)
10201  #
10202  # CONFIG_FILE
10203  #
10204
10205_ACEOF
10206
10207cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10208# If the template does not know about datarootdir, expand it.
10209# FIXME: This hack should be removed a few years after 2.60.
10210ac_datarootdir_hack=; ac_datarootdir_seen=
10211ac_sed_dataroot='
10212/datarootdir/ {
10213  p
10214  q
10215}
10216/@datadir@/p
10217/@docdir@/p
10218/@infodir@/p
10219/@localedir@/p
10220/@mandir@/p'
10221case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
10222*datarootdir*) ac_datarootdir_seen=yes;;
10223*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
10224  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
10225$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
10226_ACEOF
10227cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10228  ac_datarootdir_hack='
10229  s&@datadir@&$datadir&g
10230  s&@docdir@&$docdir&g
10231  s&@infodir@&$infodir&g
10232  s&@localedir@&$localedir&g
10233  s&@mandir@&$mandir&g
10234  s&\\\${datarootdir}&$datarootdir&g' ;;
10235esac
10236_ACEOF
10237
10238# Neutralize VPATH when `$srcdir' = `.'.
10239# Shell code in configure.ac might set extrasub.
10240# FIXME: do we really want to maintain this feature?
10241cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10242ac_sed_extra="$ac_vpsub
10243$extrasub
10244_ACEOF
10245cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10246:t
10247/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
10248s|@configure_input@|$ac_sed_conf_input|;t t
10249s&@top_builddir@&$ac_top_builddir_sub&;t t
10250s&@top_build_prefix@&$ac_top_build_prefix&;t t
10251s&@srcdir@&$ac_srcdir&;t t
10252s&@abs_srcdir@&$ac_abs_srcdir&;t t
10253s&@top_srcdir@&$ac_top_srcdir&;t t
10254s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
10255s&@builddir@&$ac_builddir&;t t
10256s&@abs_builddir@&$ac_abs_builddir&;t t
10257s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
10258$ac_datarootdir_hack
10259"
10260eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
10261  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10262
10263test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
10264  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
10265  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
10266      "$ac_tmp/out"`; test -z "$ac_out"; } &&
10267  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
10268which seems to be undefined.  Please make sure it is defined" >&5
10269$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
10270which seems to be undefined.  Please make sure it is defined" >&2;}
10271
10272  rm -f "$ac_tmp/stdin"
10273  case $ac_file in
10274  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
10275  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
10276  esac \
10277  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10278 ;;
10279
10280
10281
10282  esac
10283
10284done # for ac_tag
10285
10286
10287as_fn_exit 0
10288_ACEOF
10289ac_clean_files=$ac_clean_files_save
10290
10291test $ac_write_fail = 0 ||
10292  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
10293
10294
10295# configure is writing to config.log, and then calls config.status.
10296# config.status does its own redirection, appending to config.log.
10297# Unfortunately, on DOS this fails, as config.log is still kept open
10298# by configure, so config.status won't be able to write to it; its
10299# output is simply discarded.  So we exec the FD to /dev/null,
10300# effectively closing config.log, so it can be properly (re)opened and
10301# appended to by config.status.  When coming back to configure, we
10302# need to make the FD available again.
10303if test "$no_create" != yes; then
10304  ac_cs_success=:
10305  ac_config_status_args=
10306  test "$silent" = yes &&
10307    ac_config_status_args="$ac_config_status_args --quiet"
10308  exec 5>/dev/null
10309  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
10310  exec 5>>config.log
10311  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
10312  # would make configure fail if this is the last instruction.
10313  $ac_cs_success || as_fn_exit 1
10314fi
10315if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
10316  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
10317$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
10318fi
10319
10320
10321#--------------------------------------------------------------------
10322