1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for tkimgps 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='tkimgps'
579PACKAGE_TARNAME='tkimgps'
580PACKAGE_VERSION='1.4.12'
581PACKAGE_STRING='tkimgps 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 tkimgps 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/tkimgps]
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 tkimgps 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
1496tkimgps 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 tkimgps $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="ps"
2405PHIMGTYPE_BETA="pdf"
2406CPACKAGE="Tkimgps"
2407PACKAGE_TCLNAME="img::ps"
2408
2409
2410
2411#--------------------------------------------------------------------
2412# Load the tclConfig.sh file
2413# Load the tkConfig.sh file
2414#--------------------------------------------------------------------
2415
2416
2417
2418    #
2419    # Ok, lets find the tcl configuration
2420    # First, look for one uninstalled.
2421    # the alternative search directory is invoked by --with-tcl
2422    #
2423
2424    if test x"${no_tcl}" = x ; then
2425	# we reset no_tcl in case something fails here
2426	no_tcl=true
2427
2428# Check whether --with-tcl was given.
2429if test "${with_tcl+set}" = set; then :
2430  withval=$with_tcl; with_tclconfig="${withval}"
2431fi
2432
2433	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
2434$as_echo_n "checking for Tcl configuration... " >&6; }
2435	if ${ac_cv_c_tclconfig+:} false; then :
2436  $as_echo_n "(cached) " >&6
2437else
2438
2439
2440	    # First check to see if --with-tcl was specified.
2441	    if test x"${with_tclconfig}" != x ; then
2442		case "${with_tclconfig}" in
2443		    */tclConfig.sh )
2444			if test -f "${with_tclconfig}"; then
2445			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
2446$as_echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
2447			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
2448			fi ;;
2449		esac
2450		if test -f "${with_tclconfig}/tclConfig.sh" ; then
2451		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
2452		else
2453		    as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
2454		fi
2455	    fi
2456
2457	    # then check for a private Tcl installation
2458	    if test x"${ac_cv_c_tclconfig}" = x ; then
2459		for i in \
2460			../tcl \
2461			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2462			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
2463			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
2464			../../tcl \
2465			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2466			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
2467			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
2468			../../../tcl \
2469			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2470			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
2471			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
2472		    if test "${TEA_PLATFORM}" = "windows" \
2473			    -a -f "$i/win/tclConfig.sh" ; then
2474			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2475			break
2476		    fi
2477		    if test -f "$i/unix/tclConfig.sh" ; then
2478			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2479			break
2480		    fi
2481		done
2482	    fi
2483
2484	    # on Darwin, check in Framework installation locations
2485	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
2486		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2487			`ls -d /Library/Frameworks 2>/dev/null` \
2488			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2489			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Library/Frameworks/Tcl.framework 2>/dev/null` \
2490			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Network/Library/Frameworks/Tcl.framework 2>/dev/null` \
2491			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tcl.framework 2>/dev/null` \
2492			; do
2493		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
2494			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
2495			break
2496		    fi
2497		done
2498	    fi
2499
2500	    # TEA specific: on Windows, check in common installation locations
2501	    if test "${TEA_PLATFORM}" = "windows" \
2502		-a x"${ac_cv_c_tclconfig}" = x ; then
2503		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2504			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2505			; do
2506		    if test -f "$i/tclConfig.sh" ; then
2507			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2508			break
2509		    fi
2510		done
2511	    fi
2512
2513	    # check in a few common install locations
2514	    if test x"${ac_cv_c_tclconfig}" = x ; then
2515		for i in `ls -d ${libdir} 2>/dev/null` \
2516			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2517			`ls -d ${prefix}/lib 2>/dev/null` \
2518			`ls -d /usr/local/lib 2>/dev/null` \
2519			`ls -d /usr/contrib/lib 2>/dev/null` \
2520			`ls -d /usr/pkg/lib 2>/dev/null` \
2521			`ls -d /usr/lib 2>/dev/null` \
2522			`ls -d /usr/lib64 2>/dev/null` \
2523			`ls -d /usr/lib/tcl8.6 2>/dev/null` \
2524			`ls -d /usr/lib/tcl8.5 2>/dev/null` \
2525			`ls -d /usr/local/lib/tcl8.6 2>/dev/null` \
2526			`ls -d /usr/local/lib/tcl8.5 2>/dev/null` \
2527			`ls -d /usr/local/lib/tcl/tcl8.6 2>/dev/null` \
2528			`ls -d /usr/local/lib/tcl/tcl8.5 2>/dev/null` \
2529			; do
2530		    if test -f "$i/tclConfig.sh" ; then
2531			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2532			break
2533		    fi
2534		done
2535	    fi
2536
2537	    # check in a few other private locations
2538	    if test x"${ac_cv_c_tclconfig}" = x ; then
2539		for i in \
2540			${srcdir}/../tcl \
2541			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2542			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2543			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2544		    if test "${TEA_PLATFORM}" = "windows" \
2545			    -a -f "$i/win/tclConfig.sh" ; then
2546			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2547			break
2548		    fi
2549		    if test -f "$i/unix/tclConfig.sh" ; then
2550			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2551			break
2552		    fi
2553		done
2554	    fi
2555
2556fi
2557
2558
2559	if test x"${ac_cv_c_tclconfig}" = x ; then
2560	    TCL_BIN_DIR="# no Tcl configs found"
2561	    as_fn_error $? "Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" "$LINENO" 5
2562	else
2563	    no_tcl=
2564	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
2565	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2566$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2567	fi
2568    fi
2569
2570ac_ext=c
2571ac_cpp='$CPP $CPPFLAGS'
2572ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2573ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2574ac_compiler_gnu=$ac_cv_c_compiler_gnu
2575if test -n "$ac_tool_prefix"; then
2576  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2577set dummy ${ac_tool_prefix}gcc; ac_word=$2
2578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2579$as_echo_n "checking for $ac_word... " >&6; }
2580if ${ac_cv_prog_CC+:} false; then :
2581  $as_echo_n "(cached) " >&6
2582else
2583  if test -n "$CC"; then
2584  ac_cv_prog_CC="$CC" # Let the user override the test.
2585else
2586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2587for as_dir in $PATH
2588do
2589  IFS=$as_save_IFS
2590  test -z "$as_dir" && as_dir=.
2591    for ac_exec_ext in '' $ac_executable_extensions; do
2592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2593    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2595    break 2
2596  fi
2597done
2598  done
2599IFS=$as_save_IFS
2600
2601fi
2602fi
2603CC=$ac_cv_prog_CC
2604if test -n "$CC"; then
2605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2606$as_echo "$CC" >&6; }
2607else
2608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2609$as_echo "no" >&6; }
2610fi
2611
2612
2613fi
2614if test -z "$ac_cv_prog_CC"; then
2615  ac_ct_CC=$CC
2616  # Extract the first word of "gcc", so it can be a program name with args.
2617set dummy gcc; ac_word=$2
2618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2619$as_echo_n "checking for $ac_word... " >&6; }
2620if ${ac_cv_prog_ac_ct_CC+:} false; then :
2621  $as_echo_n "(cached) " >&6
2622else
2623  if test -n "$ac_ct_CC"; then
2624  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2625else
2626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2627for as_dir in $PATH
2628do
2629  IFS=$as_save_IFS
2630  test -z "$as_dir" && as_dir=.
2631    for ac_exec_ext in '' $ac_executable_extensions; do
2632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2633    ac_cv_prog_ac_ct_CC="gcc"
2634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2635    break 2
2636  fi
2637done
2638  done
2639IFS=$as_save_IFS
2640
2641fi
2642fi
2643ac_ct_CC=$ac_cv_prog_ac_ct_CC
2644if test -n "$ac_ct_CC"; then
2645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2646$as_echo "$ac_ct_CC" >&6; }
2647else
2648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2649$as_echo "no" >&6; }
2650fi
2651
2652  if test "x$ac_ct_CC" = x; then
2653    CC=""
2654  else
2655    case $cross_compiling:$ac_tool_warned in
2656yes:)
2657{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2658$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2659ac_tool_warned=yes ;;
2660esac
2661    CC=$ac_ct_CC
2662  fi
2663else
2664  CC="$ac_cv_prog_CC"
2665fi
2666
2667if test -z "$CC"; then
2668          if test -n "$ac_tool_prefix"; then
2669    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2670set dummy ${ac_tool_prefix}cc; ac_word=$2
2671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2672$as_echo_n "checking for $ac_word... " >&6; }
2673if ${ac_cv_prog_CC+:} false; then :
2674  $as_echo_n "(cached) " >&6
2675else
2676  if test -n "$CC"; then
2677  ac_cv_prog_CC="$CC" # Let the user override the test.
2678else
2679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2680for as_dir in $PATH
2681do
2682  IFS=$as_save_IFS
2683  test -z "$as_dir" && as_dir=.
2684    for ac_exec_ext in '' $ac_executable_extensions; do
2685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2686    ac_cv_prog_CC="${ac_tool_prefix}cc"
2687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2688    break 2
2689  fi
2690done
2691  done
2692IFS=$as_save_IFS
2693
2694fi
2695fi
2696CC=$ac_cv_prog_CC
2697if test -n "$CC"; then
2698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2699$as_echo "$CC" >&6; }
2700else
2701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2702$as_echo "no" >&6; }
2703fi
2704
2705
2706  fi
2707fi
2708if test -z "$CC"; then
2709  # Extract the first word of "cc", so it can be a program name with args.
2710set dummy cc; ac_word=$2
2711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2712$as_echo_n "checking for $ac_word... " >&6; }
2713if ${ac_cv_prog_CC+:} false; then :
2714  $as_echo_n "(cached) " >&6
2715else
2716  if test -n "$CC"; then
2717  ac_cv_prog_CC="$CC" # Let the user override the test.
2718else
2719  ac_prog_rejected=no
2720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2721for as_dir in $PATH
2722do
2723  IFS=$as_save_IFS
2724  test -z "$as_dir" && as_dir=.
2725    for ac_exec_ext in '' $ac_executable_extensions; do
2726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2727    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2728       ac_prog_rejected=yes
2729       continue
2730     fi
2731    ac_cv_prog_CC="cc"
2732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2733    break 2
2734  fi
2735done
2736  done
2737IFS=$as_save_IFS
2738
2739if test $ac_prog_rejected = yes; then
2740  # We found a bogon in the path, so make sure we never use it.
2741  set dummy $ac_cv_prog_CC
2742  shift
2743  if test $# != 0; then
2744    # We chose a different compiler from the bogus one.
2745    # However, it has the same basename, so the bogon will be chosen
2746    # first if we set CC to just the basename; use the full file name.
2747    shift
2748    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2749  fi
2750fi
2751fi
2752fi
2753CC=$ac_cv_prog_CC
2754if test -n "$CC"; then
2755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2756$as_echo "$CC" >&6; }
2757else
2758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2759$as_echo "no" >&6; }
2760fi
2761
2762
2763fi
2764if test -z "$CC"; then
2765  if test -n "$ac_tool_prefix"; then
2766  for ac_prog in cl.exe
2767  do
2768    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2769set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2771$as_echo_n "checking for $ac_word... " >&6; }
2772if ${ac_cv_prog_CC+:} false; then :
2773  $as_echo_n "(cached) " >&6
2774else
2775  if test -n "$CC"; then
2776  ac_cv_prog_CC="$CC" # Let the user override the test.
2777else
2778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2779for as_dir in $PATH
2780do
2781  IFS=$as_save_IFS
2782  test -z "$as_dir" && as_dir=.
2783    for ac_exec_ext in '' $ac_executable_extensions; do
2784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2785    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2787    break 2
2788  fi
2789done
2790  done
2791IFS=$as_save_IFS
2792
2793fi
2794fi
2795CC=$ac_cv_prog_CC
2796if test -n "$CC"; then
2797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2798$as_echo "$CC" >&6; }
2799else
2800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2801$as_echo "no" >&6; }
2802fi
2803
2804
2805    test -n "$CC" && break
2806  done
2807fi
2808if test -z "$CC"; then
2809  ac_ct_CC=$CC
2810  for ac_prog in cl.exe
2811do
2812  # Extract the first word of "$ac_prog", so it can be a program name with args.
2813set dummy $ac_prog; ac_word=$2
2814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2815$as_echo_n "checking for $ac_word... " >&6; }
2816if ${ac_cv_prog_ac_ct_CC+:} false; then :
2817  $as_echo_n "(cached) " >&6
2818else
2819  if test -n "$ac_ct_CC"; then
2820  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2821else
2822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2823for as_dir in $PATH
2824do
2825  IFS=$as_save_IFS
2826  test -z "$as_dir" && as_dir=.
2827    for ac_exec_ext in '' $ac_executable_extensions; do
2828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2829    ac_cv_prog_ac_ct_CC="$ac_prog"
2830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2831    break 2
2832  fi
2833done
2834  done
2835IFS=$as_save_IFS
2836
2837fi
2838fi
2839ac_ct_CC=$ac_cv_prog_ac_ct_CC
2840if test -n "$ac_ct_CC"; then
2841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2842$as_echo "$ac_ct_CC" >&6; }
2843else
2844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2845$as_echo "no" >&6; }
2846fi
2847
2848
2849  test -n "$ac_ct_CC" && break
2850done
2851
2852  if test "x$ac_ct_CC" = x; then
2853    CC=""
2854  else
2855    case $cross_compiling:$ac_tool_warned in
2856yes:)
2857{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2858$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2859ac_tool_warned=yes ;;
2860esac
2861    CC=$ac_ct_CC
2862  fi
2863fi
2864
2865fi
2866
2867
2868test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2870as_fn_error $? "no acceptable C compiler found in \$PATH
2871See \`config.log' for more details" "$LINENO" 5; }
2872
2873# Provide some information about the compiler.
2874$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2875set X $ac_compile
2876ac_compiler=$2
2877for ac_option in --version -v -V -qversion; do
2878  { { ac_try="$ac_compiler $ac_option >&5"
2879case "(($ac_try" in
2880  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2881  *) ac_try_echo=$ac_try;;
2882esac
2883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2884$as_echo "$ac_try_echo"; } >&5
2885  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2886  ac_status=$?
2887  if test -s conftest.err; then
2888    sed '10a\
2889... rest of stderr output deleted ...
2890         10q' conftest.err >conftest.er1
2891    cat conftest.er1 >&5
2892  fi
2893  rm -f conftest.er1 conftest.err
2894  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2895  test $ac_status = 0; }
2896done
2897
2898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2899/* end confdefs.h.  */
2900
2901int
2902main ()
2903{
2904
2905  ;
2906  return 0;
2907}
2908_ACEOF
2909ac_clean_files_save=$ac_clean_files
2910ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2911# Try to create an executable without -o first, disregard a.out.
2912# It will help us diagnose broken compilers, and finding out an intuition
2913# of exeext.
2914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2915$as_echo_n "checking whether the C compiler works... " >&6; }
2916ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2917
2918# The possible output files:
2919ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2920
2921ac_rmfiles=
2922for ac_file in $ac_files
2923do
2924  case $ac_file in
2925    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2926    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2927  esac
2928done
2929rm -f $ac_rmfiles
2930
2931if { { ac_try="$ac_link_default"
2932case "(($ac_try" in
2933  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2934  *) ac_try_echo=$ac_try;;
2935esac
2936eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2937$as_echo "$ac_try_echo"; } >&5
2938  (eval "$ac_link_default") 2>&5
2939  ac_status=$?
2940  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2941  test $ac_status = 0; }; then :
2942  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2943# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2944# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2945# so that the user can short-circuit this test for compilers unknown to
2946# Autoconf.
2947for ac_file in $ac_files ''
2948do
2949  test -f "$ac_file" || continue
2950  case $ac_file in
2951    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2952	;;
2953    [ab].out )
2954	# We found the default executable, but exeext='' is most
2955	# certainly right.
2956	break;;
2957    *.* )
2958	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2959	then :; else
2960	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2961	fi
2962	# We set ac_cv_exeext here because the later test for it is not
2963	# safe: cross compilers may not add the suffix if given an `-o'
2964	# argument, so we may need to know it at that point already.
2965	# Even if this section looks crufty: it has the advantage of
2966	# actually working.
2967	break;;
2968    * )
2969	break;;
2970  esac
2971done
2972test "$ac_cv_exeext" = no && ac_cv_exeext=
2973
2974else
2975  ac_file=''
2976fi
2977if test -z "$ac_file"; then :
2978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2979$as_echo "no" >&6; }
2980$as_echo "$as_me: failed program was:" >&5
2981sed 's/^/| /' conftest.$ac_ext >&5
2982
2983{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2984$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2985as_fn_error 77 "C compiler cannot create executables
2986See \`config.log' for more details" "$LINENO" 5; }
2987else
2988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2989$as_echo "yes" >&6; }
2990fi
2991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2992$as_echo_n "checking for C compiler default output file name... " >&6; }
2993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2994$as_echo "$ac_file" >&6; }
2995ac_exeext=$ac_cv_exeext
2996
2997rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2998ac_clean_files=$ac_clean_files_save
2999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3000$as_echo_n "checking for suffix of executables... " >&6; }
3001if { { ac_try="$ac_link"
3002case "(($ac_try" in
3003  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3004  *) ac_try_echo=$ac_try;;
3005esac
3006eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3007$as_echo "$ac_try_echo"; } >&5
3008  (eval "$ac_link") 2>&5
3009  ac_status=$?
3010  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3011  test $ac_status = 0; }; then :
3012  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3013# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3014# work properly (i.e., refer to `conftest.exe'), while it won't with
3015# `rm'.
3016for ac_file in conftest.exe conftest conftest.*; do
3017  test -f "$ac_file" || continue
3018  case $ac_file in
3019    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3020    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3021	  break;;
3022    * ) break;;
3023  esac
3024done
3025else
3026  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3028as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3029See \`config.log' for more details" "$LINENO" 5; }
3030fi
3031rm -f conftest conftest$ac_cv_exeext
3032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3033$as_echo "$ac_cv_exeext" >&6; }
3034
3035rm -f conftest.$ac_ext
3036EXEEXT=$ac_cv_exeext
3037ac_exeext=$EXEEXT
3038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3039/* end confdefs.h.  */
3040#include <stdio.h>
3041int
3042main ()
3043{
3044FILE *f = fopen ("conftest.out", "w");
3045 return ferror (f) || fclose (f) != 0;
3046
3047  ;
3048  return 0;
3049}
3050_ACEOF
3051ac_clean_files="$ac_clean_files conftest.out"
3052# Check that the compiler produces executables we can run.  If not, either
3053# the compiler is broken, or we cross compile.
3054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3055$as_echo_n "checking whether we are cross compiling... " >&6; }
3056if test "$cross_compiling" != yes; then
3057  { { ac_try="$ac_link"
3058case "(($ac_try" in
3059  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3060  *) ac_try_echo=$ac_try;;
3061esac
3062eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3063$as_echo "$ac_try_echo"; } >&5
3064  (eval "$ac_link") 2>&5
3065  ac_status=$?
3066  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3067  test $ac_status = 0; }
3068  if { ac_try='./conftest$ac_cv_exeext'
3069  { { case "(($ac_try" in
3070  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3071  *) ac_try_echo=$ac_try;;
3072esac
3073eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3074$as_echo "$ac_try_echo"; } >&5
3075  (eval "$ac_try") 2>&5
3076  ac_status=$?
3077  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3078  test $ac_status = 0; }; }; then
3079    cross_compiling=no
3080  else
3081    if test "$cross_compiling" = maybe; then
3082	cross_compiling=yes
3083    else
3084	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3086as_fn_error $? "cannot run C compiled programs.
3087If you meant to cross compile, use \`--host'.
3088See \`config.log' for more details" "$LINENO" 5; }
3089    fi
3090  fi
3091fi
3092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3093$as_echo "$cross_compiling" >&6; }
3094
3095rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3096ac_clean_files=$ac_clean_files_save
3097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3098$as_echo_n "checking for suffix of object files... " >&6; }
3099if ${ac_cv_objext+:} false; then :
3100  $as_echo_n "(cached) " >&6
3101else
3102  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3103/* end confdefs.h.  */
3104
3105int
3106main ()
3107{
3108
3109  ;
3110  return 0;
3111}
3112_ACEOF
3113rm -f conftest.o conftest.obj
3114if { { ac_try="$ac_compile"
3115case "(($ac_try" in
3116  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3117  *) ac_try_echo=$ac_try;;
3118esac
3119eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3120$as_echo "$ac_try_echo"; } >&5
3121  (eval "$ac_compile") 2>&5
3122  ac_status=$?
3123  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3124  test $ac_status = 0; }; then :
3125  for ac_file in conftest.o conftest.obj conftest.*; do
3126  test -f "$ac_file" || continue;
3127  case $ac_file in
3128    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3129    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3130       break;;
3131  esac
3132done
3133else
3134  $as_echo "$as_me: failed program was:" >&5
3135sed 's/^/| /' conftest.$ac_ext >&5
3136
3137{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3138$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3139as_fn_error $? "cannot compute suffix of object files: cannot compile
3140See \`config.log' for more details" "$LINENO" 5; }
3141fi
3142rm -f conftest.$ac_cv_objext conftest.$ac_ext
3143fi
3144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3145$as_echo "$ac_cv_objext" >&6; }
3146OBJEXT=$ac_cv_objext
3147ac_objext=$OBJEXT
3148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3149$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3150if ${ac_cv_c_compiler_gnu+:} false; then :
3151  $as_echo_n "(cached) " >&6
3152else
3153  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3154/* end confdefs.h.  */
3155
3156int
3157main ()
3158{
3159#ifndef __GNUC__
3160       choke me
3161#endif
3162
3163  ;
3164  return 0;
3165}
3166_ACEOF
3167if ac_fn_c_try_compile "$LINENO"; then :
3168  ac_compiler_gnu=yes
3169else
3170  ac_compiler_gnu=no
3171fi
3172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3173ac_cv_c_compiler_gnu=$ac_compiler_gnu
3174
3175fi
3176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3177$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3178if test $ac_compiler_gnu = yes; then
3179  GCC=yes
3180else
3181  GCC=
3182fi
3183ac_test_CFLAGS=${CFLAGS+set}
3184ac_save_CFLAGS=$CFLAGS
3185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3186$as_echo_n "checking whether $CC accepts -g... " >&6; }
3187if ${ac_cv_prog_cc_g+:} false; then :
3188  $as_echo_n "(cached) " >&6
3189else
3190  ac_save_c_werror_flag=$ac_c_werror_flag
3191   ac_c_werror_flag=yes
3192   ac_cv_prog_cc_g=no
3193   CFLAGS="-g"
3194   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3195/* end confdefs.h.  */
3196
3197int
3198main ()
3199{
3200
3201  ;
3202  return 0;
3203}
3204_ACEOF
3205if ac_fn_c_try_compile "$LINENO"; then :
3206  ac_cv_prog_cc_g=yes
3207else
3208  CFLAGS=""
3209      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3210/* end confdefs.h.  */
3211
3212int
3213main ()
3214{
3215
3216  ;
3217  return 0;
3218}
3219_ACEOF
3220if ac_fn_c_try_compile "$LINENO"; then :
3221
3222else
3223  ac_c_werror_flag=$ac_save_c_werror_flag
3224	 CFLAGS="-g"
3225	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3226/* end confdefs.h.  */
3227
3228int
3229main ()
3230{
3231
3232  ;
3233  return 0;
3234}
3235_ACEOF
3236if ac_fn_c_try_compile "$LINENO"; then :
3237  ac_cv_prog_cc_g=yes
3238fi
3239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3240fi
3241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3242fi
3243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3244   ac_c_werror_flag=$ac_save_c_werror_flag
3245fi
3246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3247$as_echo "$ac_cv_prog_cc_g" >&6; }
3248if test "$ac_test_CFLAGS" = set; then
3249  CFLAGS=$ac_save_CFLAGS
3250elif test $ac_cv_prog_cc_g = yes; then
3251  if test "$GCC" = yes; then
3252    CFLAGS="-g -O2"
3253  else
3254    CFLAGS="-g"
3255  fi
3256else
3257  if test "$GCC" = yes; then
3258    CFLAGS="-O2"
3259  else
3260    CFLAGS=
3261  fi
3262fi
3263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3264$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3265if ${ac_cv_prog_cc_c89+:} false; then :
3266  $as_echo_n "(cached) " >&6
3267else
3268  ac_cv_prog_cc_c89=no
3269ac_save_CC=$CC
3270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3271/* end confdefs.h.  */
3272#include <stdarg.h>
3273#include <stdio.h>
3274struct stat;
3275/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3276struct buf { int x; };
3277FILE * (*rcsopen) (struct buf *, struct stat *, int);
3278static char *e (p, i)
3279     char **p;
3280     int i;
3281{
3282  return p[i];
3283}
3284static char *f (char * (*g) (char **, int), char **p, ...)
3285{
3286  char *s;
3287  va_list v;
3288  va_start (v,p);
3289  s = g (p, va_arg (v,int));
3290  va_end (v);
3291  return s;
3292}
3293
3294/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3295   function prototypes and stuff, but not '\xHH' hex character constants.
3296   These don't provoke an error unfortunately, instead are silently treated
3297   as 'x'.  The following induces an error, until -std is added to get
3298   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3299   array size at least.  It's necessary to write '\x00'==0 to get something
3300   that's true only with -std.  */
3301int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3302
3303/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3304   inside strings and character constants.  */
3305#define FOO(x) 'x'
3306int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3307
3308int test (int i, double x);
3309struct s1 {int (*f) (int a);};
3310struct s2 {int (*f) (double a);};
3311int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3312int argc;
3313char **argv;
3314int
3315main ()
3316{
3317return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3318  ;
3319  return 0;
3320}
3321_ACEOF
3322for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3323	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3324do
3325  CC="$ac_save_CC $ac_arg"
3326  if ac_fn_c_try_compile "$LINENO"; then :
3327  ac_cv_prog_cc_c89=$ac_arg
3328fi
3329rm -f core conftest.err conftest.$ac_objext
3330  test "x$ac_cv_prog_cc_c89" != "xno" && break
3331done
3332rm -f conftest.$ac_ext
3333CC=$ac_save_CC
3334
3335fi
3336# AC_CACHE_VAL
3337case "x$ac_cv_prog_cc_c89" in
3338  x)
3339    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3340$as_echo "none needed" >&6; } ;;
3341  xno)
3342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3343$as_echo "unsupported" >&6; } ;;
3344  *)
3345    CC="$CC $ac_cv_prog_cc_c89"
3346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3347$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3348esac
3349if test "x$ac_cv_prog_cc_c89" != xno; then :
3350
3351fi
3352
3353ac_ext=c
3354ac_cpp='$CPP $CPPFLAGS'
3355ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3356ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3357ac_compiler_gnu=$ac_cv_c_compiler_gnu
3358
3359
3360
3361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
3362$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
3363
3364    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
3365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
3366$as_echo "loading" >&6; }
3367	. "${TCL_BIN_DIR}/tclConfig.sh"
3368    else
3369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
3370$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
3371    fi
3372
3373    # If the TCL_BIN_DIR is the build directory (not the install directory),
3374    # then set the common variable name to the value of the build variables.
3375    # For example, the variable TCL_LIB_SPEC will be set to the value
3376    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
3377    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
3378    # installed and uninstalled version of Tcl.
3379    if test -f "${TCL_BIN_DIR}/Makefile" ; then
3380        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
3381        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
3382        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
3383    elif test "`uname -s`" = "Darwin"; then
3384	# If Tcl was built as a framework, attempt to use the libraries
3385	# from the framework at the given location so that linking works
3386	# against Tcl.framework installed in an arbitrary location.
3387	case ${TCL_DEFS} in
3388	    *TCL_FRAMEWORK*)
3389		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
3390		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
3391			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
3392			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
3393			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
3394			    break
3395			fi
3396		    done
3397		fi
3398		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
3399		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
3400		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
3401		fi
3402		;;
3403	esac
3404    fi
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419    { $as_echo "$as_me:${as_lineno-$LINENO}: checking platform" >&5
3420$as_echo_n "checking platform... " >&6; }
3421    hold_cc=$CC; CC="$TCL_CC"
3422    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3423/* end confdefs.h.  */
3424
3425int
3426main ()
3427{
3428
3429	    #ifdef _WIN32
3430		#error win32
3431	    #endif
3432
3433  ;
3434  return 0;
3435}
3436_ACEOF
3437if ac_fn_c_try_compile "$LINENO"; then :
3438
3439	    # first test we've already retrieved platform (cross-compile), fallback to unix otherwise:
3440	    TEA_PLATFORM="${TEA_PLATFORM-unix}"
3441	    CYGPATH=echo
3442
3443else
3444
3445	    TEA_PLATFORM="windows"
3446	    # Extract the first word of "cygpath", so it can be a program name with args.
3447set dummy cygpath; ac_word=$2
3448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3449$as_echo_n "checking for $ac_word... " >&6; }
3450if ${ac_cv_prog_CYGPATH+:} false; then :
3451  $as_echo_n "(cached) " >&6
3452else
3453  if test -n "$CYGPATH"; then
3454  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
3455else
3456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3457for as_dir in $PATH
3458do
3459  IFS=$as_save_IFS
3460  test -z "$as_dir" && as_dir=.
3461    for ac_exec_ext in '' $ac_executable_extensions; do
3462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3463    ac_cv_prog_CYGPATH="cygpath -m"
3464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3465    break 2
3466  fi
3467done
3468  done
3469IFS=$as_save_IFS
3470
3471  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
3472fi
3473fi
3474CYGPATH=$ac_cv_prog_CYGPATH
3475if test -n "$CYGPATH"; then
3476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
3477$as_echo "$CYGPATH" >&6; }
3478else
3479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3480$as_echo "no" >&6; }
3481fi
3482
3483
3484
3485fi
3486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3487    CC=$hold_cc
3488    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEA_PLATFORM" >&5
3489$as_echo "$TEA_PLATFORM" >&6; }
3490
3491    # The BUILD_$pkg is to define the correct extern storage class
3492    # handling when making this package
3493
3494cat >>confdefs.h <<_ACEOF
3495#define BUILD_${PACKAGE_NAME} /**/
3496_ACEOF
3497
3498    # Do this here as we have fully defined TEA_PLATFORM now
3499    if test "${TEA_PLATFORM}" = "windows" ; then
3500	EXEEXT=".exe"
3501	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
3502    fi
3503
3504    # TEA specific:
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514    #
3515    # Ok, lets find the tk configuration
3516    # First, look for one uninstalled.
3517    # the alternative search directory is invoked by --with-tk
3518    #
3519
3520    if test x"${no_tk}" = x ; then
3521	# we reset no_tk in case something fails here
3522	no_tk=true
3523
3524# Check whether --with-tk was given.
3525if test "${with_tk+set}" = set; then :
3526  withval=$with_tk; with_tkconfig="${withval}"
3527fi
3528
3529	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
3530$as_echo_n "checking for Tk configuration... " >&6; }
3531	if ${ac_cv_c_tkconfig+:} false; then :
3532  $as_echo_n "(cached) " >&6
3533else
3534
3535
3536	    # First check to see if --with-tkconfig was specified.
3537	    if test x"${with_tkconfig}" != x ; then
3538		case "${with_tkconfig}" in
3539		    */tkConfig.sh )
3540			if test -f "${with_tkconfig}"; then
3541			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&5
3542$as_echo "$as_me: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&2;}
3543			    with_tkconfig="`echo "${with_tkconfig}" | sed 's!/tkConfig\.sh$!!'`"
3544			fi ;;
3545		esac
3546		if test -f "${with_tkconfig}/tkConfig.sh" ; then
3547		    ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`"
3548		else
3549		    as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
3550		fi
3551	    fi
3552
3553	    # then check for a private Tk library
3554	    if test x"${ac_cv_c_tkconfig}" = x ; then
3555		for i in \
3556			../tk \
3557			`ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
3558			`ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
3559			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
3560			../../tk \
3561			`ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
3562			`ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
3563			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
3564			../../../tk \
3565			`ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
3566			`ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
3567			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
3568		    if test "${TEA_PLATFORM}" = "windows" \
3569			    -a -f "$i/win/tkConfig.sh" ; then
3570			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
3571			break
3572		    fi
3573		    if test -f "$i/unix/tkConfig.sh" ; then
3574			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
3575			break
3576		    fi
3577		done
3578	    fi
3579
3580	    # on Darwin, check in Framework installation locations
3581	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
3582		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
3583			`ls -d /Library/Frameworks 2>/dev/null` \
3584			`ls -d /Network/Library/Frameworks 2>/dev/null` \
3585			; do
3586		    if test -f "$i/Tk.framework/tkConfig.sh" ; then
3587			ac_cv_c_tkconfig="`(cd $i/Tk.framework; pwd)`"
3588			break
3589		    fi
3590		done
3591	    fi
3592
3593	    # check in a few common install locations
3594	    if test x"${ac_cv_c_tkconfig}" = x ; then
3595		for i in `ls -d ${libdir} 2>/dev/null` \
3596			`ls -d ${exec_prefix}/lib 2>/dev/null` \
3597			`ls -d ${prefix}/lib 2>/dev/null` \
3598			`ls -d /usr/local/lib 2>/dev/null` \
3599			`ls -d /usr/contrib/lib 2>/dev/null` \
3600			`ls -d /usr/pkg/lib 2>/dev/null` \
3601			`ls -d /usr/lib/tk8.6 2>/dev/null` \
3602			`ls -d /usr/lib/tk8.5 2>/dev/null` \
3603			`ls -d /usr/lib 2>/dev/null` \
3604			`ls -d /usr/lib64 2>/dev/null` \
3605			`ls -d /usr/local/lib/tk8.6 2>/dev/null` \
3606			`ls -d /usr/local/lib/tk8.5 2>/dev/null` \
3607			`ls -d /usr/local/lib/tcl/tk8.6 2>/dev/null` \
3608			`ls -d /usr/local/lib/tcl/tk8.5 2>/dev/null` \
3609			; do
3610		    if test -f "$i/tkConfig.sh" ; then
3611			ac_cv_c_tkconfig="`(cd $i; pwd)`"
3612			break
3613		    fi
3614		done
3615	    fi
3616
3617	    # TEA specific: on Windows, check in common installation locations
3618	    if test "${TEA_PLATFORM}" = "windows" \
3619		-a x"${ac_cv_c_tkconfig}" = x ; then
3620		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
3621			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
3622			; do
3623		    if test -f "$i/tkConfig.sh" ; then
3624			ac_cv_c_tkconfig="`(cd $i; pwd)`"
3625			break
3626		    fi
3627		done
3628	    fi
3629
3630	    # check in a few other private locations
3631	    if test x"${ac_cv_c_tkconfig}" = x ; then
3632		for i in \
3633			${srcdir}/../tk \
3634			`ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
3635			`ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
3636			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
3637		    if test "${TEA_PLATFORM}" = "windows" \
3638			    -a -f "$i/win/tkConfig.sh" ; then
3639			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
3640			break
3641		    fi
3642		    if test -f "$i/unix/tkConfig.sh" ; then
3643			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
3644			break
3645		    fi
3646		done
3647	    fi
3648
3649fi
3650
3651
3652	if test x"${ac_cv_c_tkconfig}" = x ; then
3653	    TK_BIN_DIR="# no Tk configs found"
3654	    as_fn_error $? "Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh" "$LINENO" 5
3655	else
3656	    no_tk=
3657	    TK_BIN_DIR="${ac_cv_c_tkconfig}"
3658	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
3659$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3660	fi
3661    fi
3662
3663
3664    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
3665$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
3666
3667    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
3668        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
3669$as_echo "loading" >&6; }
3670	. "${TK_BIN_DIR}/tkConfig.sh"
3671    else
3672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
3673$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3674    fi
3675
3676    # If the TK_BIN_DIR is the build directory (not the install directory),
3677    # then set the common variable name to the value of the build variables.
3678    # For example, the variable TK_LIB_SPEC will be set to the value
3679    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
3680    # instead of TK_BUILD_LIB_SPEC since it will work with both an
3681    # installed and uninstalled version of Tcl.
3682    if test -f "${TK_BIN_DIR}/Makefile" ; then
3683        TK_LIB_SPEC="${TK_BUILD_LIB_SPEC}"
3684        TK_STUB_LIB_SPEC="${TK_BUILD_STUB_LIB_SPEC}"
3685        TK_STUB_LIB_PATH="${TK_BUILD_STUB_LIB_PATH}"
3686    elif test "`uname -s`" = "Darwin"; then
3687	# If Tk was built as a framework, attempt to use the libraries
3688	# from the framework at the given location so that linking works
3689	# against Tk.framework installed in an arbitrary location.
3690	case ${TK_DEFS} in
3691	    *TK_FRAMEWORK*)
3692		if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
3693		    for i in "`cd "${TK_BIN_DIR}"; pwd`" \
3694			     "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
3695			if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
3696			    TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
3697			    break
3698			fi
3699		    done
3700		fi
3701		if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
3702		    TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
3703		    TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
3704		fi
3705		;;
3706	esac
3707    fi
3708
3709    # TEA specific: Ensure windowingsystem is defined
3710    if test "${TEA_PLATFORM}" = "unix" ; then
3711	case ${TK_DEFS} in
3712	    *MAC_OSX_TK*)
3713
3714$as_echo "#define MAC_OSX_TK 1" >>confdefs.h
3715
3716		TEA_WINDOWINGSYSTEM="aqua"
3717		;;
3718	    *)
3719		TEA_WINDOWINGSYSTEM="x11"
3720		;;
3721	esac
3722    elif test "${TEA_PLATFORM}" = "windows" ; then
3723	TEA_WINDOWINGSYSTEM="win32"
3724    fi
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738    # TEA specific:
3739
3740
3741
3742
3743#-----------------------------------------------------------------------
3744# Handle the --prefix=... option by defaulting to what Tcl gave.
3745# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
3746#-----------------------------------------------------------------------
3747
3748
3749    if test "${prefix}" = "NONE"; then
3750	prefix_default=yes
3751	if test x"${TCL_PREFIX}" != x; then
3752	    { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
3753$as_echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
3754	    prefix=${TCL_PREFIX}
3755	else
3756	    { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to /usr/local" >&5
3757$as_echo "$as_me: --prefix defaulting to /usr/local" >&6;}
3758	    prefix=/usr/local
3759	fi
3760    fi
3761    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
3762	-o x"${exec_prefix_default}" = x"yes" ; then
3763	if test x"${TCL_EXEC_PREFIX}" != x; then
3764	    { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
3765$as_echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
3766	    exec_prefix=${TCL_EXEC_PREFIX}
3767	else
3768	    { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to ${prefix}" >&5
3769$as_echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
3770	    exec_prefix=$prefix
3771	fi
3772    fi
3773
3774
3775#-----------------------------------------------------------------------
3776# Standard compiler checks.
3777# This sets up CC by using the CC env var, or looks for gcc otherwise.
3778# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
3779# the basic setup necessary to compile executables.
3780#-----------------------------------------------------------------------
3781
3782
3783    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
3784    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
3785
3786    ac_ext=c
3787ac_cpp='$CPP $CPPFLAGS'
3788ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3789ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3790ac_compiler_gnu=$ac_cv_c_compiler_gnu
3791if test -n "$ac_tool_prefix"; then
3792  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3793set dummy ${ac_tool_prefix}gcc; ac_word=$2
3794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3795$as_echo_n "checking for $ac_word... " >&6; }
3796if ${ac_cv_prog_CC+:} false; then :
3797  $as_echo_n "(cached) " >&6
3798else
3799  if test -n "$CC"; then
3800  ac_cv_prog_CC="$CC" # Let the user override the test.
3801else
3802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3803for as_dir in $PATH
3804do
3805  IFS=$as_save_IFS
3806  test -z "$as_dir" && as_dir=.
3807    for ac_exec_ext in '' $ac_executable_extensions; do
3808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3809    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3811    break 2
3812  fi
3813done
3814  done
3815IFS=$as_save_IFS
3816
3817fi
3818fi
3819CC=$ac_cv_prog_CC
3820if test -n "$CC"; then
3821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3822$as_echo "$CC" >&6; }
3823else
3824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3825$as_echo "no" >&6; }
3826fi
3827
3828
3829fi
3830if test -z "$ac_cv_prog_CC"; then
3831  ac_ct_CC=$CC
3832  # Extract the first word of "gcc", so it can be a program name with args.
3833set dummy gcc; ac_word=$2
3834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3835$as_echo_n "checking for $ac_word... " >&6; }
3836if ${ac_cv_prog_ac_ct_CC+:} false; then :
3837  $as_echo_n "(cached) " >&6
3838else
3839  if test -n "$ac_ct_CC"; then
3840  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3841else
3842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3843for as_dir in $PATH
3844do
3845  IFS=$as_save_IFS
3846  test -z "$as_dir" && as_dir=.
3847    for ac_exec_ext in '' $ac_executable_extensions; do
3848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3849    ac_cv_prog_ac_ct_CC="gcc"
3850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3851    break 2
3852  fi
3853done
3854  done
3855IFS=$as_save_IFS
3856
3857fi
3858fi
3859ac_ct_CC=$ac_cv_prog_ac_ct_CC
3860if test -n "$ac_ct_CC"; then
3861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3862$as_echo "$ac_ct_CC" >&6; }
3863else
3864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3865$as_echo "no" >&6; }
3866fi
3867
3868  if test "x$ac_ct_CC" = x; then
3869    CC=""
3870  else
3871    case $cross_compiling:$ac_tool_warned in
3872yes:)
3873{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3874$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3875ac_tool_warned=yes ;;
3876esac
3877    CC=$ac_ct_CC
3878  fi
3879else
3880  CC="$ac_cv_prog_CC"
3881fi
3882
3883if test -z "$CC"; then
3884          if test -n "$ac_tool_prefix"; then
3885    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3886set dummy ${ac_tool_prefix}cc; ac_word=$2
3887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3888$as_echo_n "checking for $ac_word... " >&6; }
3889if ${ac_cv_prog_CC+:} false; then :
3890  $as_echo_n "(cached) " >&6
3891else
3892  if test -n "$CC"; then
3893  ac_cv_prog_CC="$CC" # Let the user override the test.
3894else
3895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3896for as_dir in $PATH
3897do
3898  IFS=$as_save_IFS
3899  test -z "$as_dir" && as_dir=.
3900    for ac_exec_ext in '' $ac_executable_extensions; do
3901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3902    ac_cv_prog_CC="${ac_tool_prefix}cc"
3903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3904    break 2
3905  fi
3906done
3907  done
3908IFS=$as_save_IFS
3909
3910fi
3911fi
3912CC=$ac_cv_prog_CC
3913if test -n "$CC"; then
3914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3915$as_echo "$CC" >&6; }
3916else
3917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3918$as_echo "no" >&6; }
3919fi
3920
3921
3922  fi
3923fi
3924if test -z "$CC"; then
3925  # Extract the first word of "cc", so it can be a program name with args.
3926set dummy cc; ac_word=$2
3927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3928$as_echo_n "checking for $ac_word... " >&6; }
3929if ${ac_cv_prog_CC+:} false; then :
3930  $as_echo_n "(cached) " >&6
3931else
3932  if test -n "$CC"; then
3933  ac_cv_prog_CC="$CC" # Let the user override the test.
3934else
3935  ac_prog_rejected=no
3936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3937for as_dir in $PATH
3938do
3939  IFS=$as_save_IFS
3940  test -z "$as_dir" && as_dir=.
3941    for ac_exec_ext in '' $ac_executable_extensions; do
3942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3943    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3944       ac_prog_rejected=yes
3945       continue
3946     fi
3947    ac_cv_prog_CC="cc"
3948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3949    break 2
3950  fi
3951done
3952  done
3953IFS=$as_save_IFS
3954
3955if test $ac_prog_rejected = yes; then
3956  # We found a bogon in the path, so make sure we never use it.
3957  set dummy $ac_cv_prog_CC
3958  shift
3959  if test $# != 0; then
3960    # We chose a different compiler from the bogus one.
3961    # However, it has the same basename, so the bogon will be chosen
3962    # first if we set CC to just the basename; use the full file name.
3963    shift
3964    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3965  fi
3966fi
3967fi
3968fi
3969CC=$ac_cv_prog_CC
3970if test -n "$CC"; then
3971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3972$as_echo "$CC" >&6; }
3973else
3974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3975$as_echo "no" >&6; }
3976fi
3977
3978
3979fi
3980if test -z "$CC"; then
3981  if test -n "$ac_tool_prefix"; then
3982  for ac_prog in cl.exe
3983  do
3984    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3985set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3987$as_echo_n "checking for $ac_word... " >&6; }
3988if ${ac_cv_prog_CC+:} false; then :
3989  $as_echo_n "(cached) " >&6
3990else
3991  if test -n "$CC"; then
3992  ac_cv_prog_CC="$CC" # Let the user override the test.
3993else
3994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3995for as_dir in $PATH
3996do
3997  IFS=$as_save_IFS
3998  test -z "$as_dir" && as_dir=.
3999    for ac_exec_ext in '' $ac_executable_extensions; do
4000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4001    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4003    break 2
4004  fi
4005done
4006  done
4007IFS=$as_save_IFS
4008
4009fi
4010fi
4011CC=$ac_cv_prog_CC
4012if test -n "$CC"; then
4013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4014$as_echo "$CC" >&6; }
4015else
4016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4017$as_echo "no" >&6; }
4018fi
4019
4020
4021    test -n "$CC" && break
4022  done
4023fi
4024if test -z "$CC"; then
4025  ac_ct_CC=$CC
4026  for ac_prog in cl.exe
4027do
4028  # Extract the first word of "$ac_prog", so it can be a program name with args.
4029set dummy $ac_prog; ac_word=$2
4030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4031$as_echo_n "checking for $ac_word... " >&6; }
4032if ${ac_cv_prog_ac_ct_CC+:} false; then :
4033  $as_echo_n "(cached) " >&6
4034else
4035  if test -n "$ac_ct_CC"; then
4036  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4037else
4038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4039for as_dir in $PATH
4040do
4041  IFS=$as_save_IFS
4042  test -z "$as_dir" && as_dir=.
4043    for ac_exec_ext in '' $ac_executable_extensions; do
4044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4045    ac_cv_prog_ac_ct_CC="$ac_prog"
4046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4047    break 2
4048  fi
4049done
4050  done
4051IFS=$as_save_IFS
4052
4053fi
4054fi
4055ac_ct_CC=$ac_cv_prog_ac_ct_CC
4056if test -n "$ac_ct_CC"; then
4057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4058$as_echo "$ac_ct_CC" >&6; }
4059else
4060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4061$as_echo "no" >&6; }
4062fi
4063
4064
4065  test -n "$ac_ct_CC" && break
4066done
4067
4068  if test "x$ac_ct_CC" = x; then
4069    CC=""
4070  else
4071    case $cross_compiling:$ac_tool_warned in
4072yes:)
4073{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4074$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4075ac_tool_warned=yes ;;
4076esac
4077    CC=$ac_ct_CC
4078  fi
4079fi
4080
4081fi
4082
4083
4084test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4086as_fn_error $? "no acceptable C compiler found in \$PATH
4087See \`config.log' for more details" "$LINENO" 5; }
4088
4089# Provide some information about the compiler.
4090$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4091set X $ac_compile
4092ac_compiler=$2
4093for ac_option in --version -v -V -qversion; do
4094  { { ac_try="$ac_compiler $ac_option >&5"
4095case "(($ac_try" in
4096  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4097  *) ac_try_echo=$ac_try;;
4098esac
4099eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4100$as_echo "$ac_try_echo"; } >&5
4101  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4102  ac_status=$?
4103  if test -s conftest.err; then
4104    sed '10a\
4105... rest of stderr output deleted ...
4106         10q' conftest.err >conftest.er1
4107    cat conftest.er1 >&5
4108  fi
4109  rm -f conftest.er1 conftest.err
4110  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4111  test $ac_status = 0; }
4112done
4113
4114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4115$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4116if ${ac_cv_c_compiler_gnu+:} false; then :
4117  $as_echo_n "(cached) " >&6
4118else
4119  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4120/* end confdefs.h.  */
4121
4122int
4123main ()
4124{
4125#ifndef __GNUC__
4126       choke me
4127#endif
4128
4129  ;
4130  return 0;
4131}
4132_ACEOF
4133if ac_fn_c_try_compile "$LINENO"; then :
4134  ac_compiler_gnu=yes
4135else
4136  ac_compiler_gnu=no
4137fi
4138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4139ac_cv_c_compiler_gnu=$ac_compiler_gnu
4140
4141fi
4142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4143$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4144if test $ac_compiler_gnu = yes; then
4145  GCC=yes
4146else
4147  GCC=
4148fi
4149ac_test_CFLAGS=${CFLAGS+set}
4150ac_save_CFLAGS=$CFLAGS
4151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4152$as_echo_n "checking whether $CC accepts -g... " >&6; }
4153if ${ac_cv_prog_cc_g+:} false; then :
4154  $as_echo_n "(cached) " >&6
4155else
4156  ac_save_c_werror_flag=$ac_c_werror_flag
4157   ac_c_werror_flag=yes
4158   ac_cv_prog_cc_g=no
4159   CFLAGS="-g"
4160   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4161/* end confdefs.h.  */
4162
4163int
4164main ()
4165{
4166
4167  ;
4168  return 0;
4169}
4170_ACEOF
4171if ac_fn_c_try_compile "$LINENO"; then :
4172  ac_cv_prog_cc_g=yes
4173else
4174  CFLAGS=""
4175      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4176/* end confdefs.h.  */
4177
4178int
4179main ()
4180{
4181
4182  ;
4183  return 0;
4184}
4185_ACEOF
4186if ac_fn_c_try_compile "$LINENO"; then :
4187
4188else
4189  ac_c_werror_flag=$ac_save_c_werror_flag
4190	 CFLAGS="-g"
4191	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4192/* end confdefs.h.  */
4193
4194int
4195main ()
4196{
4197
4198  ;
4199  return 0;
4200}
4201_ACEOF
4202if ac_fn_c_try_compile "$LINENO"; then :
4203  ac_cv_prog_cc_g=yes
4204fi
4205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4206fi
4207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4208fi
4209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4210   ac_c_werror_flag=$ac_save_c_werror_flag
4211fi
4212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4213$as_echo "$ac_cv_prog_cc_g" >&6; }
4214if test "$ac_test_CFLAGS" = set; then
4215  CFLAGS=$ac_save_CFLAGS
4216elif test $ac_cv_prog_cc_g = yes; then
4217  if test "$GCC" = yes; then
4218    CFLAGS="-g -O2"
4219  else
4220    CFLAGS="-g"
4221  fi
4222else
4223  if test "$GCC" = yes; then
4224    CFLAGS="-O2"
4225  else
4226    CFLAGS=
4227  fi
4228fi
4229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4230$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4231if ${ac_cv_prog_cc_c89+:} false; then :
4232  $as_echo_n "(cached) " >&6
4233else
4234  ac_cv_prog_cc_c89=no
4235ac_save_CC=$CC
4236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237/* end confdefs.h.  */
4238#include <stdarg.h>
4239#include <stdio.h>
4240struct stat;
4241/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4242struct buf { int x; };
4243FILE * (*rcsopen) (struct buf *, struct stat *, int);
4244static char *e (p, i)
4245     char **p;
4246     int i;
4247{
4248  return p[i];
4249}
4250static char *f (char * (*g) (char **, int), char **p, ...)
4251{
4252  char *s;
4253  va_list v;
4254  va_start (v,p);
4255  s = g (p, va_arg (v,int));
4256  va_end (v);
4257  return s;
4258}
4259
4260/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4261   function prototypes and stuff, but not '\xHH' hex character constants.
4262   These don't provoke an error unfortunately, instead are silently treated
4263   as 'x'.  The following induces an error, until -std is added to get
4264   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4265   array size at least.  It's necessary to write '\x00'==0 to get something
4266   that's true only with -std.  */
4267int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4268
4269/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4270   inside strings and character constants.  */
4271#define FOO(x) 'x'
4272int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4273
4274int test (int i, double x);
4275struct s1 {int (*f) (int a);};
4276struct s2 {int (*f) (double a);};
4277int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4278int argc;
4279char **argv;
4280int
4281main ()
4282{
4283return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4284  ;
4285  return 0;
4286}
4287_ACEOF
4288for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4289	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4290do
4291  CC="$ac_save_CC $ac_arg"
4292  if ac_fn_c_try_compile "$LINENO"; then :
4293  ac_cv_prog_cc_c89=$ac_arg
4294fi
4295rm -f core conftest.err conftest.$ac_objext
4296  test "x$ac_cv_prog_cc_c89" != "xno" && break
4297done
4298rm -f conftest.$ac_ext
4299CC=$ac_save_CC
4300
4301fi
4302# AC_CACHE_VAL
4303case "x$ac_cv_prog_cc_c89" in
4304  x)
4305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4306$as_echo "none needed" >&6; } ;;
4307  xno)
4308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4309$as_echo "unsupported" >&6; } ;;
4310  *)
4311    CC="$CC $ac_cv_prog_cc_c89"
4312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4313$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4314esac
4315if test "x$ac_cv_prog_cc_c89" != xno; then :
4316
4317fi
4318
4319ac_ext=c
4320ac_cpp='$CPP $CPPFLAGS'
4321ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4322ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4323ac_compiler_gnu=$ac_cv_c_compiler_gnu
4324
4325    ac_ext=c
4326ac_cpp='$CPP $CPPFLAGS'
4327ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4328ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4329ac_compiler_gnu=$ac_cv_c_compiler_gnu
4330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4331$as_echo_n "checking how to run the C preprocessor... " >&6; }
4332# On Suns, sometimes $CPP names a directory.
4333if test -n "$CPP" && test -d "$CPP"; then
4334  CPP=
4335fi
4336if test -z "$CPP"; then
4337  if ${ac_cv_prog_CPP+:} false; then :
4338  $as_echo_n "(cached) " >&6
4339else
4340      # Double quotes because CPP needs to be expanded
4341    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4342    do
4343      ac_preproc_ok=false
4344for ac_c_preproc_warn_flag in '' yes
4345do
4346  # Use a header file that comes with gcc, so configuring glibc
4347  # with a fresh cross-compiler works.
4348  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4349  # <limits.h> exists even on freestanding compilers.
4350  # On the NeXT, cc -E runs the code through the compiler's parser,
4351  # not just through cpp. "Syntax error" is here to catch this case.
4352  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4353/* end confdefs.h.  */
4354#ifdef __STDC__
4355# include <limits.h>
4356#else
4357# include <assert.h>
4358#endif
4359		     Syntax error
4360_ACEOF
4361if ac_fn_c_try_cpp "$LINENO"; then :
4362
4363else
4364  # Broken: fails on valid input.
4365continue
4366fi
4367rm -f conftest.err conftest.i conftest.$ac_ext
4368
4369  # OK, works on sane cases.  Now check whether nonexistent headers
4370  # can be detected and how.
4371  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4372/* end confdefs.h.  */
4373#include <ac_nonexistent.h>
4374_ACEOF
4375if ac_fn_c_try_cpp "$LINENO"; then :
4376  # Broken: success on invalid input.
4377continue
4378else
4379  # Passes both tests.
4380ac_preproc_ok=:
4381break
4382fi
4383rm -f conftest.err conftest.i conftest.$ac_ext
4384
4385done
4386# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4387rm -f conftest.i conftest.err conftest.$ac_ext
4388if $ac_preproc_ok; then :
4389  break
4390fi
4391
4392    done
4393    ac_cv_prog_CPP=$CPP
4394
4395fi
4396  CPP=$ac_cv_prog_CPP
4397else
4398  ac_cv_prog_CPP=$CPP
4399fi
4400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4401$as_echo "$CPP" >&6; }
4402ac_preproc_ok=false
4403for ac_c_preproc_warn_flag in '' yes
4404do
4405  # Use a header file that comes with gcc, so configuring glibc
4406  # with a fresh cross-compiler works.
4407  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4408  # <limits.h> exists even on freestanding compilers.
4409  # On the NeXT, cc -E runs the code through the compiler's parser,
4410  # not just through cpp. "Syntax error" is here to catch this case.
4411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4412/* end confdefs.h.  */
4413#ifdef __STDC__
4414# include <limits.h>
4415#else
4416# include <assert.h>
4417#endif
4418		     Syntax error
4419_ACEOF
4420if ac_fn_c_try_cpp "$LINENO"; then :
4421
4422else
4423  # Broken: fails on valid input.
4424continue
4425fi
4426rm -f conftest.err conftest.i conftest.$ac_ext
4427
4428  # OK, works on sane cases.  Now check whether nonexistent headers
4429  # can be detected and how.
4430  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4431/* end confdefs.h.  */
4432#include <ac_nonexistent.h>
4433_ACEOF
4434if ac_fn_c_try_cpp "$LINENO"; then :
4435  # Broken: success on invalid input.
4436continue
4437else
4438  # Passes both tests.
4439ac_preproc_ok=:
4440break
4441fi
4442rm -f conftest.err conftest.i conftest.$ac_ext
4443
4444done
4445# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4446rm -f conftest.i conftest.err conftest.$ac_ext
4447if $ac_preproc_ok; then :
4448
4449else
4450  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4451$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4452as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4453See \`config.log' for more details" "$LINENO" 5; }
4454fi
4455
4456ac_ext=c
4457ac_cpp='$CPP $CPPFLAGS'
4458ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4459ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4460ac_compiler_gnu=$ac_cv_c_compiler_gnu
4461
4462
4463    #--------------------------------------------------------------------
4464    # Checks to see if the make program sets the $MAKE variable.
4465    #--------------------------------------------------------------------
4466
4467    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4468$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4469set x ${MAKE-make}
4470ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4471if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4472  $as_echo_n "(cached) " >&6
4473else
4474  cat >conftest.make <<\_ACEOF
4475SHELL = /bin/sh
4476all:
4477	@echo '@@@%%%=$(MAKE)=@@@%%%'
4478_ACEOF
4479# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4480case `${MAKE-make} -f conftest.make 2>/dev/null` in
4481  *@@@%%%=?*=@@@%%%*)
4482    eval ac_cv_prog_make_${ac_make}_set=yes;;
4483  *)
4484    eval ac_cv_prog_make_${ac_make}_set=no;;
4485esac
4486rm -f conftest.make
4487fi
4488if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4490$as_echo "yes" >&6; }
4491  SET_MAKE=
4492else
4493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4494$as_echo "no" >&6; }
4495  SET_MAKE="MAKE=${MAKE-make}"
4496fi
4497
4498
4499    #--------------------------------------------------------------------
4500    # Find ranlib
4501    #--------------------------------------------------------------------
4502
4503    if test -n "$ac_tool_prefix"; then
4504  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4505set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4507$as_echo_n "checking for $ac_word... " >&6; }
4508if ${ac_cv_prog_RANLIB+:} false; then :
4509  $as_echo_n "(cached) " >&6
4510else
4511  if test -n "$RANLIB"; then
4512  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4513else
4514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4515for as_dir in $PATH
4516do
4517  IFS=$as_save_IFS
4518  test -z "$as_dir" && as_dir=.
4519    for ac_exec_ext in '' $ac_executable_extensions; do
4520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4521    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4523    break 2
4524  fi
4525done
4526  done
4527IFS=$as_save_IFS
4528
4529fi
4530fi
4531RANLIB=$ac_cv_prog_RANLIB
4532if test -n "$RANLIB"; then
4533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4534$as_echo "$RANLIB" >&6; }
4535else
4536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4537$as_echo "no" >&6; }
4538fi
4539
4540
4541fi
4542if test -z "$ac_cv_prog_RANLIB"; then
4543  ac_ct_RANLIB=$RANLIB
4544  # Extract the first word of "ranlib", so it can be a program name with args.
4545set dummy ranlib; ac_word=$2
4546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4547$as_echo_n "checking for $ac_word... " >&6; }
4548if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4549  $as_echo_n "(cached) " >&6
4550else
4551  if test -n "$ac_ct_RANLIB"; then
4552  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4553else
4554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4555for as_dir in $PATH
4556do
4557  IFS=$as_save_IFS
4558  test -z "$as_dir" && as_dir=.
4559    for ac_exec_ext in '' $ac_executable_extensions; do
4560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4561    ac_cv_prog_ac_ct_RANLIB="ranlib"
4562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4563    break 2
4564  fi
4565done
4566  done
4567IFS=$as_save_IFS
4568
4569fi
4570fi
4571ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4572if test -n "$ac_ct_RANLIB"; then
4573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4574$as_echo "$ac_ct_RANLIB" >&6; }
4575else
4576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4577$as_echo "no" >&6; }
4578fi
4579
4580  if test "x$ac_ct_RANLIB" = x; then
4581    RANLIB=""
4582  else
4583    case $cross_compiling:$ac_tool_warned in
4584yes:)
4585{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4586$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4587ac_tool_warned=yes ;;
4588esac
4589    RANLIB=$ac_ct_RANLIB
4590  fi
4591else
4592  RANLIB="$ac_cv_prog_RANLIB"
4593fi
4594
4595
4596    #--------------------------------------------------------------------
4597    # Determines the correct binary file extension (.o, .obj, .exe etc.)
4598    #--------------------------------------------------------------------
4599
4600
4601
4602
4603
4604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4605$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4606if ${ac_cv_path_GREP+:} false; then :
4607  $as_echo_n "(cached) " >&6
4608else
4609  if test -z "$GREP"; then
4610  ac_path_GREP_found=false
4611  # Loop through the user's path and test for each of PROGNAME-LIST
4612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4613for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4614do
4615  IFS=$as_save_IFS
4616  test -z "$as_dir" && as_dir=.
4617    for ac_prog in grep ggrep; do
4618    for ac_exec_ext in '' $ac_executable_extensions; do
4619      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4620      as_fn_executable_p "$ac_path_GREP" || continue
4621# Check for GNU ac_path_GREP and select it if it is found.
4622  # Check for GNU $ac_path_GREP
4623case `"$ac_path_GREP" --version 2>&1` in
4624*GNU*)
4625  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4626*)
4627  ac_count=0
4628  $as_echo_n 0123456789 >"conftest.in"
4629  while :
4630  do
4631    cat "conftest.in" "conftest.in" >"conftest.tmp"
4632    mv "conftest.tmp" "conftest.in"
4633    cp "conftest.in" "conftest.nl"
4634    $as_echo 'GREP' >> "conftest.nl"
4635    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4636    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4637    as_fn_arith $ac_count + 1 && ac_count=$as_val
4638    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4639      # Best one so far, save it but keep looking for a better one
4640      ac_cv_path_GREP="$ac_path_GREP"
4641      ac_path_GREP_max=$ac_count
4642    fi
4643    # 10*(2^10) chars as input seems more than enough
4644    test $ac_count -gt 10 && break
4645  done
4646  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4647esac
4648
4649      $ac_path_GREP_found && break 3
4650    done
4651  done
4652  done
4653IFS=$as_save_IFS
4654  if test -z "$ac_cv_path_GREP"; then
4655    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4656  fi
4657else
4658  ac_cv_path_GREP=$GREP
4659fi
4660
4661fi
4662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4663$as_echo "$ac_cv_path_GREP" >&6; }
4664 GREP="$ac_cv_path_GREP"
4665
4666
4667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4668$as_echo_n "checking for egrep... " >&6; }
4669if ${ac_cv_path_EGREP+:} false; then :
4670  $as_echo_n "(cached) " >&6
4671else
4672  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4673   then ac_cv_path_EGREP="$GREP -E"
4674   else
4675     if test -z "$EGREP"; then
4676  ac_path_EGREP_found=false
4677  # Loop through the user's path and test for each of PROGNAME-LIST
4678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4679for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4680do
4681  IFS=$as_save_IFS
4682  test -z "$as_dir" && as_dir=.
4683    for ac_prog in egrep; do
4684    for ac_exec_ext in '' $ac_executable_extensions; do
4685      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4686      as_fn_executable_p "$ac_path_EGREP" || continue
4687# Check for GNU ac_path_EGREP and select it if it is found.
4688  # Check for GNU $ac_path_EGREP
4689case `"$ac_path_EGREP" --version 2>&1` in
4690*GNU*)
4691  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4692*)
4693  ac_count=0
4694  $as_echo_n 0123456789 >"conftest.in"
4695  while :
4696  do
4697    cat "conftest.in" "conftest.in" >"conftest.tmp"
4698    mv "conftest.tmp" "conftest.in"
4699    cp "conftest.in" "conftest.nl"
4700    $as_echo 'EGREP' >> "conftest.nl"
4701    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4702    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4703    as_fn_arith $ac_count + 1 && ac_count=$as_val
4704    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4705      # Best one so far, save it but keep looking for a better one
4706      ac_cv_path_EGREP="$ac_path_EGREP"
4707      ac_path_EGREP_max=$ac_count
4708    fi
4709    # 10*(2^10) chars as input seems more than enough
4710    test $ac_count -gt 10 && break
4711  done
4712  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4713esac
4714
4715      $ac_path_EGREP_found && break 3
4716    done
4717  done
4718  done
4719IFS=$as_save_IFS
4720  if test -z "$ac_cv_path_EGREP"; then
4721    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4722  fi
4723else
4724  ac_cv_path_EGREP=$EGREP
4725fi
4726
4727   fi
4728fi
4729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4730$as_echo "$ac_cv_path_EGREP" >&6; }
4731 EGREP="$ac_cv_path_EGREP"
4732
4733
4734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4735$as_echo_n "checking for ANSI C header files... " >&6; }
4736if ${ac_cv_header_stdc+:} false; then :
4737  $as_echo_n "(cached) " >&6
4738else
4739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4740/* end confdefs.h.  */
4741#include <stdlib.h>
4742#include <stdarg.h>
4743#include <string.h>
4744#include <float.h>
4745
4746int
4747main ()
4748{
4749
4750  ;
4751  return 0;
4752}
4753_ACEOF
4754if ac_fn_c_try_compile "$LINENO"; then :
4755  ac_cv_header_stdc=yes
4756else
4757  ac_cv_header_stdc=no
4758fi
4759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4760
4761if test $ac_cv_header_stdc = yes; then
4762  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4763  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4764/* end confdefs.h.  */
4765#include <string.h>
4766
4767_ACEOF
4768if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4769  $EGREP "memchr" >/dev/null 2>&1; then :
4770
4771else
4772  ac_cv_header_stdc=no
4773fi
4774rm -f conftest*
4775
4776fi
4777
4778if test $ac_cv_header_stdc = yes; then
4779  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4781/* end confdefs.h.  */
4782#include <stdlib.h>
4783
4784_ACEOF
4785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4786  $EGREP "free" >/dev/null 2>&1; then :
4787
4788else
4789  ac_cv_header_stdc=no
4790fi
4791rm -f conftest*
4792
4793fi
4794
4795if test $ac_cv_header_stdc = yes; then
4796  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4797  if test "$cross_compiling" = yes; then :
4798  :
4799else
4800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4801/* end confdefs.h.  */
4802#include <ctype.h>
4803#include <stdlib.h>
4804#if ((' ' & 0x0FF) == 0x020)
4805# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4806# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4807#else
4808# define ISLOWER(c) \
4809		   (('a' <= (c) && (c) <= 'i') \
4810		     || ('j' <= (c) && (c) <= 'r') \
4811		     || ('s' <= (c) && (c) <= 'z'))
4812# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4813#endif
4814
4815#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4816int
4817main ()
4818{
4819  int i;
4820  for (i = 0; i < 256; i++)
4821    if (XOR (islower (i), ISLOWER (i))
4822	|| toupper (i) != TOUPPER (i))
4823      return 2;
4824  return 0;
4825}
4826_ACEOF
4827if ac_fn_c_try_run "$LINENO"; then :
4828
4829else
4830  ac_cv_header_stdc=no
4831fi
4832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4833  conftest.$ac_objext conftest.beam conftest.$ac_ext
4834fi
4835
4836fi
4837fi
4838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4839$as_echo "$ac_cv_header_stdc" >&6; }
4840if test $ac_cv_header_stdc = yes; then
4841
4842$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4843
4844fi
4845
4846# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4847for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4848		  inttypes.h stdint.h unistd.h
4849do :
4850  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4851ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4852"
4853if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4854  cat >>confdefs.h <<_ACEOF
4855#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4856_ACEOF
4857
4858fi
4859
4860done
4861
4862
4863
4864    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4865
4866
4867    #------------------------------------------------------------------------
4868    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4869    # It makes compiling go faster.  (This is only a performance feature.)
4870    #------------------------------------------------------------------------
4871
4872    if test -z "$no_pipe" -a -n "$GCC"; then
4873	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5
4874$as_echo_n "checking if the compiler understands -pipe... " >&6; }
4875if ${tcl_cv_cc_pipe+:} false; then :
4876  $as_echo_n "(cached) " >&6
4877else
4878
4879	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4880	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4881/* end confdefs.h.  */
4882
4883int
4884main ()
4885{
4886
4887  ;
4888  return 0;
4889}
4890_ACEOF
4891if ac_fn_c_try_compile "$LINENO"; then :
4892  tcl_cv_cc_pipe=yes
4893else
4894  tcl_cv_cc_pipe=no
4895fi
4896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4897	    CFLAGS=$hold_cflags
4898fi
4899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5
4900$as_echo "$tcl_cv_cc_pipe" >&6; }
4901	if test $tcl_cv_cc_pipe = yes; then
4902	    CFLAGS="$CFLAGS -pipe"
4903	fi
4904    fi
4905
4906    #--------------------------------------------------------------------
4907    # Common compiler flag setup
4908    #--------------------------------------------------------------------
4909
4910     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
4911$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
4912if ${ac_cv_c_bigendian+:} false; then :
4913  $as_echo_n "(cached) " >&6
4914else
4915  ac_cv_c_bigendian=unknown
4916    # See if we're dealing with a universal compiler.
4917    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4918/* end confdefs.h.  */
4919#ifndef __APPLE_CC__
4920	       not a universal capable compiler
4921	     #endif
4922	     typedef int dummy;
4923
4924_ACEOF
4925if ac_fn_c_try_compile "$LINENO"; then :
4926
4927	# Check for potential -arch flags.  It is not universal unless
4928	# there are at least two -arch flags with different values.
4929	ac_arch=
4930	ac_prev=
4931	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
4932	 if test -n "$ac_prev"; then
4933	   case $ac_word in
4934	     i?86 | x86_64 | ppc | ppc64)
4935	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
4936		 ac_arch=$ac_word
4937	       else
4938		 ac_cv_c_bigendian=universal
4939		 break
4940	       fi
4941	       ;;
4942	   esac
4943	   ac_prev=
4944	 elif test "x$ac_word" = "x-arch"; then
4945	   ac_prev=arch
4946	 fi
4947       done
4948fi
4949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4950    if test $ac_cv_c_bigendian = unknown; then
4951      # See if sys/param.h defines the BYTE_ORDER macro.
4952      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4953/* end confdefs.h.  */
4954#include <sys/types.h>
4955	     #include <sys/param.h>
4956
4957int
4958main ()
4959{
4960#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
4961		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
4962		     && LITTLE_ENDIAN)
4963	      bogus endian macros
4964	     #endif
4965
4966  ;
4967  return 0;
4968}
4969_ACEOF
4970if ac_fn_c_try_compile "$LINENO"; then :
4971  # It does; now see whether it defined to BIG_ENDIAN or not.
4972	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4973/* end confdefs.h.  */
4974#include <sys/types.h>
4975		#include <sys/param.h>
4976
4977int
4978main ()
4979{
4980#if BYTE_ORDER != BIG_ENDIAN
4981		 not big endian
4982		#endif
4983
4984  ;
4985  return 0;
4986}
4987_ACEOF
4988if ac_fn_c_try_compile "$LINENO"; then :
4989  ac_cv_c_bigendian=yes
4990else
4991  ac_cv_c_bigendian=no
4992fi
4993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4994fi
4995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4996    fi
4997    if test $ac_cv_c_bigendian = unknown; then
4998      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
4999      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5000/* end confdefs.h.  */
5001#include <limits.h>
5002
5003int
5004main ()
5005{
5006#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
5007	      bogus endian macros
5008	     #endif
5009
5010  ;
5011  return 0;
5012}
5013_ACEOF
5014if ac_fn_c_try_compile "$LINENO"; then :
5015  # It does; now see whether it defined to _BIG_ENDIAN or not.
5016	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5017/* end confdefs.h.  */
5018#include <limits.h>
5019
5020int
5021main ()
5022{
5023#ifndef _BIG_ENDIAN
5024		 not big endian
5025		#endif
5026
5027  ;
5028  return 0;
5029}
5030_ACEOF
5031if ac_fn_c_try_compile "$LINENO"; then :
5032  ac_cv_c_bigendian=yes
5033else
5034  ac_cv_c_bigendian=no
5035fi
5036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5037fi
5038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5039    fi
5040    if test $ac_cv_c_bigendian = unknown; then
5041      # Compile a test program.
5042      if test "$cross_compiling" = yes; then :
5043  # Try to guess by grepping values from an object file.
5044	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5045/* end confdefs.h.  */
5046short int ascii_mm[] =
5047		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
5048		short int ascii_ii[] =
5049		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
5050		int use_ascii (int i) {
5051		  return ascii_mm[i] + ascii_ii[i];
5052		}
5053		short int ebcdic_ii[] =
5054		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
5055		short int ebcdic_mm[] =
5056		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
5057		int use_ebcdic (int i) {
5058		  return ebcdic_mm[i] + ebcdic_ii[i];
5059		}
5060		extern int foo;
5061
5062int
5063main ()
5064{
5065return use_ascii (foo) == use_ebcdic (foo);
5066  ;
5067  return 0;
5068}
5069_ACEOF
5070if ac_fn_c_try_compile "$LINENO"; then :
5071  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
5072	      ac_cv_c_bigendian=yes
5073	    fi
5074	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
5075	      if test "$ac_cv_c_bigendian" = unknown; then
5076		ac_cv_c_bigendian=no
5077	      else
5078		# finding both strings is unlikely to happen, but who knows?
5079		ac_cv_c_bigendian=unknown
5080	      fi
5081	    fi
5082fi
5083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5084else
5085  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5086/* end confdefs.h.  */
5087$ac_includes_default
5088int
5089main ()
5090{
5091
5092	     /* Are we little or big endian?  From Harbison&Steele.  */
5093	     union
5094	     {
5095	       long int l;
5096	       char c[sizeof (long int)];
5097	     } u;
5098	     u.l = 1;
5099	     return u.c[sizeof (long int) - 1] == 1;
5100
5101  ;
5102  return 0;
5103}
5104_ACEOF
5105if ac_fn_c_try_run "$LINENO"; then :
5106  ac_cv_c_bigendian=no
5107else
5108  ac_cv_c_bigendian=yes
5109fi
5110rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5111  conftest.$ac_objext conftest.beam conftest.$ac_ext
5112fi
5113
5114    fi
5115fi
5116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
5117$as_echo "$ac_cv_c_bigendian" >&6; }
5118 case $ac_cv_c_bigendian in #(
5119   yes)
5120     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
5121;; #(
5122   no)
5123      ;; #(
5124   universal)
5125
5126$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5127
5128     ;; #(
5129   *)
5130     as_fn_error $? "unknown endianness
5131 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
5132 esac
5133
5134
5135
5136
5137    #
5138    # Ok, lets find the tkimg configuration
5139    # First, look for one uninstalled.
5140    # the alternative search directory is invoked by --with-tkimg
5141    #
5142
5143    if test x"${no_tkimg}" = x ; then
5144	# we reset no_tkimg in case something fails here
5145	no_tkimg=true
5146
5147# Check whether --with-tkimg was given.
5148if test "${with_tkimg+set}" = set; then :
5149  withval=$with_tkimg; with_tkimgconfig=${withval}
5150fi
5151
5152	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tkimg configuration" >&5
5153$as_echo_n "checking for tkimg configuration... " >&6; }
5154	if ${ac_cv_c_tkimgconfig+:} false; then :
5155  $as_echo_n "(cached) " >&6
5156else
5157
5158
5159	    # First check to see if --with-tkimg was specified.
5160	    if test x"${with_tkimgconfig}" != x ; then
5161		case ${with_tkimgconfig} in
5162		    */tkimgConfig.sh )
5163			if test -f ${with_tkimgconfig}; then
5164			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tkimg argument should refer to directory containing tkimgConfig.sh, not to tkimgConfig.sh itself" >&5
5165$as_echo "$as_me: WARNING: --with-tkimg argument should refer to directory containing tkimgConfig.sh, not to tkimgConfig.sh itself" >&2;}
5166			    with_tkimgconfig=`echo ${with_tkimgconfig} | sed 's!/tkimgConfig\.sh$!!'`
5167			fi;;
5168		esac
5169		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
5170		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
5171		else
5172		    as_fn_error $? "${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" "$LINENO" 5
5173		fi
5174	    fi
5175
5176	    # then check for a private tkimg installation
5177	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
5178		for i in \
5179			../tkimg \
5180			`ls -dr ../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5181			`ls -dr ../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
5182			`ls -dr ../tkimg*[0-9].[0-9] 2>/dev/null` \
5183			`ls -dr ../tkimg*[0-9].[0-9]* 2>/dev/null` \
5184			../../tkimg \
5185			`ls -dr ../../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5186			`ls -dr ../../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
5187			`ls -dr ../../tkimg*[0-9].[0-9] 2>/dev/null` \
5188			`ls -dr ../../tkimg*[0-9].[0-9]* 2>/dev/null` \
5189			../../../tkimg \
5190			`ls -dr ../../../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5191			`ls -dr ../../../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
5192			`ls -dr ../../../tkimg*[0-9].[0-9] 2>/dev/null` \
5193			`ls -dr ../../../tkimg*[0-9].[0-9]* 2>/dev/null` \
5194			${srcdir}/../tkimg \
5195			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5196			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
5197			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9] 2>/dev/null` \
5198			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9]* 2>/dev/null` \
5199			; do
5200		    if test -f "$i/tkimgConfig.sh" ; then
5201			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
5202			break
5203		    fi
5204		    if test -f "$i/unix/tkimgConfig.sh" ; then
5205			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
5206			break
5207		    fi
5208		done
5209	    fi
5210
5211	    # check in a few common install locations
5212	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
5213		for i in `ls -d ${libdir} 2>/dev/null` \
5214			`ls -d ${exec_prefix}/lib 2>/dev/null` \
5215			`ls -d ${prefix}/lib 2>/dev/null` \
5216			`ls -d /usr/local/lib 2>/dev/null` \
5217			`ls -d /usr/contrib/lib 2>/dev/null` \
5218			`ls -d /usr/pkg/lib 2>/dev/null` \
5219			`ls -d /usr/lib 2>/dev/null` \
5220			`ls -d /usr/lib64 2>/dev/null` \
5221			; do
5222		    if test -f "$i/tkimgConfig.sh" ; then
5223			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
5224			break
5225		    fi
5226		done
5227	    fi
5228
5229fi
5230
5231
5232	if test x"${ac_cv_c_tkimgconfig}" = x ; then
5233	    tkimg_BIN_DIR="# no tkimg configs found"
5234	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find tkimg configuration definitions" >&5
5235$as_echo "$as_me: WARNING: Cannot find tkimg configuration definitions" >&2;}
5236	    exit 0
5237	else
5238	    no_tkimg=
5239	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
5240	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $tkimg_BIN_DIR/tkimgConfig.sh" >&5
5241$as_echo "found $tkimg_BIN_DIR/tkimgConfig.sh" >&6; }
5242	fi
5243    fi
5244
5245
5246    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
5247$as_echo_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh... " >&6; }
5248
5249    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
5250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
5251$as_echo "loading" >&6; }
5252	. "${tkimg_BIN_DIR}/tkimgConfig.sh"
5253    else
5254        { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
5255$as_echo "file not found" >&6; }
5256    fi
5257
5258    #
5259    # If the tkimg_BIN_DIR is the build directory (not the install directory),
5260    # then set the common variable name to the value of the build variables.
5261    # For example, the variable tkimg_LIB_SPEC will be set to the value
5262    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
5263    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
5264    # installed and uninstalled version of Tcl.
5265    #
5266
5267    if test -f "${tkimg_BIN_DIR}/Makefile" ; then
5268	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found Makefile - using build library specs for tkimg" >&5
5269$as_echo "$as_me: WARNING: Found Makefile - using build library specs for tkimg" >&2;}
5270        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
5271        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
5272        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
5273        tkimg_INCLUDE_SPEC=${tkimg_BUILD_INCLUDE_SPEC}
5274        tkimg_LIBRARY_PATH=${tkimg_LIBRARY_PATH}
5275    fi
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288    # Allow the caller to prevent this auto-check by specifying any 2nd arg
5289    if test "x" = x; then :
5290
5291	# Check both upper and lower-case variants
5292	# If a dev wanted non-stubs libs, this function could take an option
5293	# to not use _STUB in the paths below
5294	if test "x${tkimg_STUB_LIB_SPEC}" = x; then :
5295
5296    { $as_echo "$as_me:${as_lineno-$LINENO}: checking For TKIMG_STUB library for LIBS" >&5
5297$as_echo_n "checking For TKIMG_STUB library for LIBS... " >&6; }
5298    # This simplifies the use of stub libraries by automatically adding
5299    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
5300    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
5301    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
5302    if test "x${TKIMG_STUB_LIB_SPEC}" != "x" ; then
5303	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
5304
5305    vars="\"`${CYGPATH} ${TKIMG_STUB_LIB_PATH}`\""
5306    for i in $vars; do
5307	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5308	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5309	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5310	fi
5311	PKG_LIBS="$PKG_LIBS $i"
5312    done
5313
5314
5315	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using TKIMG_STUB_LIB_PATH ${TKIMG_STUB_LIB_PATH}" >&5
5316$as_echo "using TKIMG_STUB_LIB_PATH ${TKIMG_STUB_LIB_PATH}" >&6; }
5317	else
5318
5319    vars="${TKIMG_STUB_LIB_SPEC}"
5320    for i in $vars; do
5321	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5322	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5323	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5324	fi
5325	PKG_LIBS="$PKG_LIBS $i"
5326    done
5327
5328
5329	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using TKIMG_STUB_LIB_SPEC ${TKIMG_STUB_LIB_SPEC}" >&5
5330$as_echo "using TKIMG_STUB_LIB_SPEC ${TKIMG_STUB_LIB_SPEC}" >&6; }
5331	fi
5332    else
5333	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
5334$as_echo "file not found" >&6; }
5335    fi
5336
5337else
5338
5339    { $as_echo "$as_me:${as_lineno-$LINENO}: checking For tkimg_STUB library for LIBS" >&5
5340$as_echo_n "checking For tkimg_STUB library for LIBS... " >&6; }
5341    # This simplifies the use of stub libraries by automatically adding
5342    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
5343    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
5344    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
5345    if test "x${tkimg_STUB_LIB_SPEC}" != "x" ; then
5346	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
5347
5348    vars="\"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
5349    for i in $vars; do
5350	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5351	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5352	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5353	fi
5354	PKG_LIBS="$PKG_LIBS $i"
5355    done
5356
5357
5358	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using tkimg_STUB_LIB_PATH ${tkimg_STUB_LIB_PATH}" >&5
5359$as_echo "using tkimg_STUB_LIB_PATH ${tkimg_STUB_LIB_PATH}" >&6; }
5360	else
5361
5362    vars="${tkimg_STUB_LIB_SPEC}"
5363    for i in $vars; do
5364	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5365	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5366	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5367	fi
5368	PKG_LIBS="$PKG_LIBS $i"
5369    done
5370
5371
5372	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using tkimg_STUB_LIB_SPEC ${tkimg_STUB_LIB_SPEC}" >&5
5373$as_echo "using tkimg_STUB_LIB_SPEC ${tkimg_STUB_LIB_SPEC}" >&6; }
5374	fi
5375    else
5376	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
5377$as_echo "file not found" >&6; }
5378    fi
5379
5380fi
5381
5382fi
5383
5384
5385
5386#--------------------------------------------------------------------
5387# Compute an absolute path to the src directory of module 'tkimg' so
5388# that we are able to find its headers even if they are not installed.
5389#--------------------------------------------------------------------
5390
5391case $tkimg_SRC_DIR in
5392/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
5393	;;
5394*)	# SRC_DIR relative, splice with BUILD_PATH
5395	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
5396esac
5397
5398tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
5399
5400if test "${TEA_PLATFORM}" = "windows" ; then
5401    tkimg_SRC_PATH="`$CYGPATH $tkimg_SRC_PATH`"
5402    tkimg_BUILD_PATH="`$CYGPATH $tkimg_BUILD_PATH`"
5403fi
5404
5405
5406
5407
5408
5409#-----------------------------------------------------------------------
5410# Specify the C source files to compile in TEA_ADD_SOURCES,
5411# public headers that need to be installed in TEA_ADD_HEADERS,
5412# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
5413# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
5414# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
5415# and PKG_TCL_SOURCES.
5416#-----------------------------------------------------------------------
5417
5418
5419    vars="ps.c"
5420    for i in $vars; do
5421	case $i in
5422	    \$*)
5423		# allow $-var names
5424		PKG_SOURCES="$PKG_SOURCES $i"
5425		PKG_OBJECTS="$PKG_OBJECTS $i"
5426		;;
5427	    *)
5428		# check for existence - allows for generic/win/unix VPATH
5429		# To add more dirs here (like 'src'), you have to update VPATH
5430		# in Makefile.in as well
5431		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
5432		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
5433		    -a ! -f "${srcdir}/macosx/$i" \
5434		    ; then
5435		    as_fn_error $? "could not find source file '$i'" "$LINENO" 5
5436		fi
5437		PKG_SOURCES="$PKG_SOURCES $i"
5438		# this assumes it is in a VPATH dir
5439		i=`basename $i`
5440		# handle user calling this before or after TEA_SETUP_COMPILER
5441		if test x"${OBJEXT}" != x ; then
5442		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
5443		else
5444		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
5445		fi
5446		PKG_OBJECTS="$PKG_OBJECTS $j"
5447		;;
5448	esac
5449    done
5450
5451
5452
5453
5454    vars=""
5455    for i in $vars; do
5456	# check for existence, be strict because it is installed
5457	if test ! -f "${srcdir}/$i" ; then
5458	    as_fn_error $? "could not find header file '${srcdir}/$i'" "$LINENO" 5
5459	fi
5460	PKG_HEADERS="$PKG_HEADERS $i"
5461    done
5462
5463
5464
5465    vars="-I\"`\${CYGPATH} \${tkimg_SRC_PATH}`\""
5466    for i in $vars; do
5467	PKG_INCLUDES="$PKG_INCLUDES $i"
5468    done
5469
5470
5471
5472    vars="-I."
5473    for i in $vars; do
5474	PKG_INCLUDES="$PKG_INCLUDES $i"
5475    done
5476
5477
5478
5479    vars=""
5480    for i in $vars; do
5481	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5482	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5483	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5484	fi
5485	PKG_LIBS="$PKG_LIBS $i"
5486    done
5487
5488
5489
5490    PKG_CFLAGS="$PKG_CFLAGS "
5491
5492
5493
5494    PKG_CFLAGS="$PKG_CFLAGS -DTKIMG_VERSION=\\\"\${tkimg_VERSION}\\\""
5495
5496
5497
5498    vars=""
5499    for i in $vars; do
5500	# check for existence - allows for generic/win/unix VPATH
5501	if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
5502	    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
5503	    -a ! -f "${srcdir}/macosx/$i" \
5504	    ; then
5505	    as_fn_error $? "could not find stub source file '$i'" "$LINENO" 5
5506	fi
5507	PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
5508	# this assumes it is in a VPATH dir
5509	i=`basename $i`
5510	# handle user calling this before or after TEA_SETUP_COMPILER
5511	if test x"${OBJEXT}" != x ; then
5512	    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
5513	else
5514	    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
5515	fi
5516	PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
5517    done
5518
5519
5520
5521
5522    vars=""
5523    for i in $vars; do
5524	# check for existence, be strict because it is installed
5525	if test ! -f "${srcdir}/$i" ; then
5526	    as_fn_error $? "could not find tcl source file '${srcdir}/$i'" "$LINENO" 5
5527	fi
5528	PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
5529    done
5530
5531
5532
5533PUP="`echo ${PACKAGE_NAME}| tr 'a-z' 'A-Z'`"
5534
5535sed < "`${CYGPATH} ${srcdir}/../init.c`" > "init.c"	\
5536	-e	"s/@CPACKAGE@/${CPACKAGE}/"		\
5537	-e	"s/%PACKAGE%/${PACKAGE_NAME}/"		\
5538	-e	"s/%PACKAGE_UP%/${PUP}/"		\
5539	-e	"s/%PHIMGTYPE%/${PHIMGTYPE}/"           \
5540	-e	"s/%PHIMGTYPE_BETA%/${PHIMGTYPE_BETA}/"
5541
5542# init.c is an included source file, not a source by itself
5543# FUTURE: Do this through AC_OUTPUT!!
5544
5545#--------------------------------------------------------------------
5546# __CHANGE__
5547# Choose which headers you need.  Extension authors should try very
5548# hard to only rely on the Tcl public header files.  Internal headers
5549# contain private data structures and are subject to change without
5550# notice.
5551# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
5552#--------------------------------------------------------------------
5553
5554
5555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl public headers" >&5
5556$as_echo_n "checking for Tcl public headers... " >&6; }
5557
5558
5559# Check whether --with-tclinclude was given.
5560if test "${with_tclinclude+set}" = set; then :
5561  withval=$with_tclinclude; with_tclinclude=${withval}
5562fi
5563
5564
5565    if ${ac_cv_c_tclh+:} false; then :
5566  $as_echo_n "(cached) " >&6
5567else
5568
5569	# Use the value from --with-tclinclude, if it was given
5570
5571	if test x"${with_tclinclude}" != x ; then
5572	    if test -f "${with_tclinclude}/tcl.h" ; then
5573		ac_cv_c_tclh=${with_tclinclude}
5574	    else
5575		as_fn_error $? "${with_tclinclude} directory does not contain tcl.h" "$LINENO" 5
5576	    fi
5577	else
5578	    list=""
5579	    if test "`uname -s`" = "Darwin"; then
5580		# If Tcl was built as a framework, attempt to use
5581		# the framework's Headers directory
5582		case ${TCL_DEFS} in
5583		    *TCL_FRAMEWORK*)
5584			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
5585			;;
5586		esac
5587	    fi
5588
5589	    # Look in the source dir only if Tcl is not installed,
5590	    # and in that situation, look there before installed locations.
5591	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
5592		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
5593	    fi
5594
5595	    # Check order: pkg --prefix location, Tcl's --prefix location,
5596	    # relative to directory of tclConfig.sh.
5597
5598	    eval "temp_includedir=${includedir}"
5599	    list="$list \
5600		`ls -d ${temp_includedir}        2>/dev/null` \
5601		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
5602		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
5603	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
5604		list="$list /usr/local/include /usr/include"
5605		if test x"${TCL_INCLUDE_SPEC}" != x ; then
5606		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
5607		    list="$list `ls -d ${d} 2>/dev/null`"
5608		fi
5609	    fi
5610	    for i in $list ; do
5611		if test -f "$i/tcl.h" ; then
5612		    ac_cv_c_tclh=$i
5613		    break
5614		fi
5615	    done
5616	fi
5617
5618fi
5619
5620
5621    # Print a message based on how we determined the include path
5622
5623    if test x"${ac_cv_c_tclh}" = x ; then
5624	as_fn_error $? "tcl.h not found.  Please specify its location with --with-tclinclude" "$LINENO" 5
5625    else
5626	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5
5627$as_echo "${ac_cv_c_tclh}" >&6; }
5628    fi
5629
5630    # Convert to a native path and substitute into the output files.
5631
5632    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
5633
5634    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
5635
5636
5637
5638
5639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk public headers" >&5
5640$as_echo_n "checking for Tk public headers... " >&6; }
5641
5642
5643# Check whether --with-tkinclude was given.
5644if test "${with_tkinclude+set}" = set; then :
5645  withval=$with_tkinclude; with_tkinclude=${withval}
5646fi
5647
5648
5649    if ${ac_cv_c_tkh+:} false; then :
5650  $as_echo_n "(cached) " >&6
5651else
5652
5653	# Use the value from --with-tkinclude, if it was given
5654
5655	if test x"${with_tkinclude}" != x ; then
5656	    if test -f "${with_tkinclude}/tk.h" ; then
5657		ac_cv_c_tkh=${with_tkinclude}
5658	    else
5659		as_fn_error $? "${with_tkinclude} directory does not contain tk.h" "$LINENO" 5
5660	    fi
5661	else
5662	    list=""
5663	    if test "`uname -s`" = "Darwin"; then
5664		# If Tk was built as a framework, attempt to use
5665		# the framework's Headers directory.
5666		case ${TK_DEFS} in
5667		    *TK_FRAMEWORK*)
5668			list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
5669			;;
5670		esac
5671	    fi
5672
5673	    # Look in the source dir only if Tk is not installed,
5674	    # and in that situation, look there before installed locations.
5675	    if test -f "${TK_BIN_DIR}/Makefile" ; then
5676		list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
5677	    fi
5678
5679	    # Check order: pkg --prefix location, Tk's --prefix location,
5680	    # relative to directory of tkConfig.sh, Tcl's --prefix location,
5681	    # relative to directory of tclConfig.sh.
5682
5683	    eval "temp_includedir=${includedir}"
5684	    list="$list \
5685		`ls -d ${temp_includedir}        2>/dev/null` \
5686		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
5687		`ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
5688		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
5689		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
5690	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
5691		list="$list /usr/local/include /usr/include"
5692		if test x"${TK_INCLUDE_SPEC}" != x ; then
5693		    d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
5694		    list="$list `ls -d ${d} 2>/dev/null`"
5695		fi
5696	    fi
5697	    for i in $list ; do
5698		if test -f "$i/tk.h" ; then
5699		    ac_cv_c_tkh=$i
5700		    break
5701		fi
5702	    done
5703	fi
5704
5705fi
5706
5707
5708    # Print a message based on how we determined the include path
5709
5710    if test x"${ac_cv_c_tkh}" = x ; then
5711	as_fn_error $? "tk.h not found.  Please specify its location with --with-tkinclude" "$LINENO" 5
5712    else
5713	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tkh}" >&5
5714$as_echo "${ac_cv_c_tkh}" >&6; }
5715    fi
5716
5717    # Convert to a native path and substitute into the output files.
5718
5719    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
5720
5721    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
5722
5723
5724
5725    if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
5726	# On Windows and Aqua, we need the X compat headers
5727	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 header files" >&5
5728$as_echo_n "checking for X11 header files... " >&6; }
5729	if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
5730	    INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
5731	    TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
5732
5733	fi
5734	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${INCLUDE_DIR_NATIVE}" >&5
5735$as_echo "${INCLUDE_DIR_NATIVE}" >&6; }
5736    fi
5737
5738
5739#--------------------------------------------------------------------
5740# A few miscellaneous platform-specific items:
5741#
5742# Windows creates a few extra files that need to be cleaned up.
5743# We can add more files to clean if our extension creates any extra
5744# files in the future.
5745#
5746# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
5747# These will be appended to the current set of compiler flags for
5748# your system.
5749#--------------------------------------------------------------------
5750
5751if test "${TEA_PLATFORM}" = "windows" ; then
5752    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
5753fi
5754
5755
5756#--------------------------------------------------------------------
5757# Check whether --enable-threads or --disable-threads was given.
5758# So far only Tcl responds to this one.
5759#--------------------------------------------------------------------
5760
5761
5762    # Check whether --enable-threads was given.
5763if test "${enable_threads+set}" = set; then :
5764  enableval=$enable_threads; tcl_ok=$enableval
5765else
5766  tcl_ok=yes
5767fi
5768
5769
5770    if test "${enable_threads+set}" = set; then
5771	enableval="$enable_threads"
5772	tcl_ok=$enableval
5773    else
5774	tcl_ok=yes
5775    fi
5776
5777    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
5778	TCL_THREADS=1
5779
5780	if test "${TEA_PLATFORM}" != "windows" ; then
5781	    # We are always OK on Windows, so check what this platform wants:
5782
5783	    # USE_THREAD_ALLOC tells us to try the special thread-based
5784	    # allocator that significantly reduces lock contention
5785
5786$as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h
5787
5788
5789$as_echo "#define _REENTRANT 1" >>confdefs.h
5790
5791	    if test "`uname -s`" = "SunOS" ; then
5792
5793$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5794
5795	    fi
5796
5797$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
5798
5799	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5
5800$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; }
5801if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then :
5802  $as_echo_n "(cached) " >&6
5803else
5804  ac_check_lib_save_LIBS=$LIBS
5805LIBS="-lpthread  $LIBS"
5806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5807/* end confdefs.h.  */
5808
5809/* Override any GCC internal prototype to avoid an error.
5810   Use char because int might match the return type of a GCC
5811   builtin and then its argument prototype would still apply.  */
5812#ifdef __cplusplus
5813extern "C"
5814#endif
5815char pthread_mutex_init ();
5816int
5817main ()
5818{
5819return pthread_mutex_init ();
5820  ;
5821  return 0;
5822}
5823_ACEOF
5824if ac_fn_c_try_link "$LINENO"; then :
5825  ac_cv_lib_pthread_pthread_mutex_init=yes
5826else
5827  ac_cv_lib_pthread_pthread_mutex_init=no
5828fi
5829rm -f core conftest.err conftest.$ac_objext \
5830    conftest$ac_exeext conftest.$ac_ext
5831LIBS=$ac_check_lib_save_LIBS
5832fi
5833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
5834$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
5835if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then :
5836  tcl_ok=yes
5837else
5838  tcl_ok=no
5839fi
5840
5841	    if test "$tcl_ok" = "no"; then
5842		# Check a little harder for __pthread_mutex_init in the same
5843		# library, as some systems hide it there until pthread.h is
5844		# defined.  We could alternatively do an AC_TRY_COMPILE with
5845		# pthread.h, but that will work with libpthread really doesn't
5846		# exist, like AIX 4.2.  [Bug: 4359]
5847		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5
5848$as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; }
5849if ${ac_cv_lib_pthread___pthread_mutex_init+:} false; then :
5850  $as_echo_n "(cached) " >&6
5851else
5852  ac_check_lib_save_LIBS=$LIBS
5853LIBS="-lpthread  $LIBS"
5854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5855/* end confdefs.h.  */
5856
5857/* Override any GCC internal prototype to avoid an error.
5858   Use char because int might match the return type of a GCC
5859   builtin and then its argument prototype would still apply.  */
5860#ifdef __cplusplus
5861extern "C"
5862#endif
5863char __pthread_mutex_init ();
5864int
5865main ()
5866{
5867return __pthread_mutex_init ();
5868  ;
5869  return 0;
5870}
5871_ACEOF
5872if ac_fn_c_try_link "$LINENO"; then :
5873  ac_cv_lib_pthread___pthread_mutex_init=yes
5874else
5875  ac_cv_lib_pthread___pthread_mutex_init=no
5876fi
5877rm -f core conftest.err conftest.$ac_objext \
5878    conftest$ac_exeext conftest.$ac_ext
5879LIBS=$ac_check_lib_save_LIBS
5880fi
5881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
5882$as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
5883if test "x$ac_cv_lib_pthread___pthread_mutex_init" = xyes; then :
5884  tcl_ok=yes
5885else
5886  tcl_ok=no
5887fi
5888
5889	    fi
5890
5891	    if test "$tcl_ok" = "yes"; then
5892		# The space is needed
5893		THREADS_LIBS=" -lpthread"
5894	    else
5895		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5
5896$as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; }
5897if ${ac_cv_lib_pthreads_pthread_mutex_init+:} false; then :
5898  $as_echo_n "(cached) " >&6
5899else
5900  ac_check_lib_save_LIBS=$LIBS
5901LIBS="-lpthreads  $LIBS"
5902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5903/* end confdefs.h.  */
5904
5905/* Override any GCC internal prototype to avoid an error.
5906   Use char because int might match the return type of a GCC
5907   builtin and then its argument prototype would still apply.  */
5908#ifdef __cplusplus
5909extern "C"
5910#endif
5911char pthread_mutex_init ();
5912int
5913main ()
5914{
5915return pthread_mutex_init ();
5916  ;
5917  return 0;
5918}
5919_ACEOF
5920if ac_fn_c_try_link "$LINENO"; then :
5921  ac_cv_lib_pthreads_pthread_mutex_init=yes
5922else
5923  ac_cv_lib_pthreads_pthread_mutex_init=no
5924fi
5925rm -f core conftest.err conftest.$ac_objext \
5926    conftest$ac_exeext conftest.$ac_ext
5927LIBS=$ac_check_lib_save_LIBS
5928fi
5929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
5930$as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
5931if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = xyes; then :
5932  tcl_ok=yes
5933else
5934  tcl_ok=no
5935fi
5936
5937		if test "$tcl_ok" = "yes"; then
5938		    # The space is needed
5939		    THREADS_LIBS=" -lpthreads"
5940		else
5941		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5
5942$as_echo_n "checking for pthread_mutex_init in -lc... " >&6; }
5943if ${ac_cv_lib_c_pthread_mutex_init+:} false; then :
5944  $as_echo_n "(cached) " >&6
5945else
5946  ac_check_lib_save_LIBS=$LIBS
5947LIBS="-lc  $LIBS"
5948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5949/* end confdefs.h.  */
5950
5951/* Override any GCC internal prototype to avoid an error.
5952   Use char because int might match the return type of a GCC
5953   builtin and then its argument prototype would still apply.  */
5954#ifdef __cplusplus
5955extern "C"
5956#endif
5957char pthread_mutex_init ();
5958int
5959main ()
5960{
5961return pthread_mutex_init ();
5962  ;
5963  return 0;
5964}
5965_ACEOF
5966if ac_fn_c_try_link "$LINENO"; then :
5967  ac_cv_lib_c_pthread_mutex_init=yes
5968else
5969  ac_cv_lib_c_pthread_mutex_init=no
5970fi
5971rm -f core conftest.err conftest.$ac_objext \
5972    conftest$ac_exeext conftest.$ac_ext
5973LIBS=$ac_check_lib_save_LIBS
5974fi
5975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5
5976$as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; }
5977if test "x$ac_cv_lib_c_pthread_mutex_init" = xyes; then :
5978  tcl_ok=yes
5979else
5980  tcl_ok=no
5981fi
5982
5983		    if test "$tcl_ok" = "no"; then
5984			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5
5985$as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; }
5986if ${ac_cv_lib_c_r_pthread_mutex_init+:} false; then :
5987  $as_echo_n "(cached) " >&6
5988else
5989  ac_check_lib_save_LIBS=$LIBS
5990LIBS="-lc_r  $LIBS"
5991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5992/* end confdefs.h.  */
5993
5994/* Override any GCC internal prototype to avoid an error.
5995   Use char because int might match the return type of a GCC
5996   builtin and then its argument prototype would still apply.  */
5997#ifdef __cplusplus
5998extern "C"
5999#endif
6000char pthread_mutex_init ();
6001int
6002main ()
6003{
6004return pthread_mutex_init ();
6005  ;
6006  return 0;
6007}
6008_ACEOF
6009if ac_fn_c_try_link "$LINENO"; then :
6010  ac_cv_lib_c_r_pthread_mutex_init=yes
6011else
6012  ac_cv_lib_c_r_pthread_mutex_init=no
6013fi
6014rm -f core conftest.err conftest.$ac_objext \
6015    conftest$ac_exeext conftest.$ac_ext
6016LIBS=$ac_check_lib_save_LIBS
6017fi
6018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
6019$as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
6020if test "x$ac_cv_lib_c_r_pthread_mutex_init" = xyes; then :
6021  tcl_ok=yes
6022else
6023  tcl_ok=no
6024fi
6025
6026			if test "$tcl_ok" = "yes"; then
6027			    # The space is needed
6028			    THREADS_LIBS=" -pthread"
6029			else
6030			    TCL_THREADS=0
6031			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
6032$as_echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
6033			fi
6034		    fi
6035		fi
6036	    fi
6037	fi
6038    else
6039	TCL_THREADS=0
6040    fi
6041    # Do checking message here to not mess up interleaved configure output
6042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5
6043$as_echo_n "checking for building with threads... " >&6; }
6044    if test "${TCL_THREADS}" = 1; then
6045
6046$as_echo "#define TCL_THREADS 1" >>confdefs.h
6047
6048	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
6049$as_echo "yes (default)" >&6; }
6050    else
6051	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6052$as_echo "no" >&6; }
6053    fi
6054    # TCL_THREADS sanity checking.  See if our request for building with
6055    # threads is the same as the way Tcl was built.  If not, warn the user.
6056    case ${TCL_DEFS} in
6057	*THREADS=1*)
6058	    if test "${TCL_THREADS}" = "0"; then
6059		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
6060    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
6061    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
6062$as_echo "$as_me: WARNING:
6063    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
6064    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
6065	    fi
6066	    ;;
6067    esac
6068
6069
6070
6071#--------------------------------------------------------------------
6072# The statement below defines a collection of symbols related to
6073# building as a shared library instead of a static library.
6074#--------------------------------------------------------------------
6075
6076
6077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
6078$as_echo_n "checking how to build libraries... " >&6; }
6079    # Check whether --enable-shared was given.
6080if test "${enable_shared+set}" = set; then :
6081  enableval=$enable_shared; shared_ok=$enableval
6082else
6083  shared_ok=yes
6084fi
6085
6086
6087    if test "${enable_shared+set}" = set; then
6088	enableval="$enable_shared"
6089	shared_ok=$enableval
6090    else
6091	shared_ok=yes
6092    fi
6093
6094    # Check whether --enable-stubs was given.
6095if test "${enable_stubs+set}" = set; then :
6096  enableval=$enable_stubs; stubs_ok=$enableval
6097else
6098  stubs_ok=yes
6099fi
6100
6101
6102    if test "${enable_stubs+set}" = set; then
6103	enableval="$enable_stubs"
6104	stubs_ok=$enableval
6105    else
6106	stubs_ok=yes
6107    fi
6108
6109    # Stubs are always enabled for shared builds
6110    if test "$shared_ok" = "yes" ; then
6111	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
6112$as_echo "shared" >&6; }
6113	SHARED_BUILD=1
6114        STUBS_BUILD=1
6115    else
6116	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
6117$as_echo "static" >&6; }
6118	SHARED_BUILD=0
6119
6120$as_echo "#define STATIC_BUILD 1" >>confdefs.h
6121
6122        if test "$stubs_ok" = "yes" ; then
6123          STUBS_BUILD=1
6124        else
6125          STUBS_BUILD=0
6126        fi
6127    fi
6128    if test "${STUBS_BUILD}" = "1" ; then
6129
6130$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h
6131
6132
6133$as_echo "#define USE_TCLOO_STUBS 1" >>confdefs.h
6134
6135      if test "${TEA_WINDOWINGSYSTEM}" != ""; then
6136
6137$as_echo "#define USE_TK_STUBS 1" >>confdefs.h
6138
6139      fi
6140    fi
6141
6142
6143
6144
6145
6146#--------------------------------------------------------------------
6147# This macro figures out what flags to use with the compiler/linker
6148# when building shared/static debug/optimized objects.  This information
6149# can be taken from the tclConfig.sh file, but this figures it all out.
6150#--------------------------------------------------------------------
6151
6152if test -n "$ac_tool_prefix"; then
6153  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6154set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6156$as_echo_n "checking for $ac_word... " >&6; }
6157if ${ac_cv_prog_RANLIB+:} false; then :
6158  $as_echo_n "(cached) " >&6
6159else
6160  if test -n "$RANLIB"; then
6161  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6162else
6163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6164for as_dir in $PATH
6165do
6166  IFS=$as_save_IFS
6167  test -z "$as_dir" && as_dir=.
6168    for ac_exec_ext in '' $ac_executable_extensions; do
6169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6170    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6172    break 2
6173  fi
6174done
6175  done
6176IFS=$as_save_IFS
6177
6178fi
6179fi
6180RANLIB=$ac_cv_prog_RANLIB
6181if test -n "$RANLIB"; then
6182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6183$as_echo "$RANLIB" >&6; }
6184else
6185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6186$as_echo "no" >&6; }
6187fi
6188
6189
6190fi
6191if test -z "$ac_cv_prog_RANLIB"; then
6192  ac_ct_RANLIB=$RANLIB
6193  # Extract the first word of "ranlib", so it can be a program name with args.
6194set dummy ranlib; ac_word=$2
6195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6196$as_echo_n "checking for $ac_word... " >&6; }
6197if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6198  $as_echo_n "(cached) " >&6
6199else
6200  if test -n "$ac_ct_RANLIB"; then
6201  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6202else
6203as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6204for as_dir in $PATH
6205do
6206  IFS=$as_save_IFS
6207  test -z "$as_dir" && as_dir=.
6208    for ac_exec_ext in '' $ac_executable_extensions; do
6209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6210    ac_cv_prog_ac_ct_RANLIB="ranlib"
6211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6212    break 2
6213  fi
6214done
6215  done
6216IFS=$as_save_IFS
6217
6218fi
6219fi
6220ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6221if test -n "$ac_ct_RANLIB"; then
6222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6223$as_echo "$ac_ct_RANLIB" >&6; }
6224else
6225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6226$as_echo "no" >&6; }
6227fi
6228
6229  if test "x$ac_ct_RANLIB" = x; then
6230    RANLIB=":"
6231  else
6232    case $cross_compiling:$ac_tool_warned in
6233yes:)
6234{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6235$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6236ac_tool_warned=yes ;;
6237esac
6238    RANLIB=$ac_ct_RANLIB
6239  fi
6240else
6241  RANLIB="$ac_cv_prog_RANLIB"
6242fi
6243
6244
6245
6246
6247    # Step 0.a: Enable 64 bit support?
6248
6249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5
6250$as_echo_n "checking if 64bit support is requested... " >&6; }
6251    # Check whether --enable-64bit was given.
6252if test "${enable_64bit+set}" = set; then :
6253  enableval=$enable_64bit; do64bit=$enableval
6254else
6255  do64bit=no
6256fi
6257
6258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5
6259$as_echo "$do64bit" >&6; }
6260
6261    # Step 0.b: Enable Solaris 64 bit VIS support?
6262
6263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5
6264$as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; }
6265    # Check whether --enable-64bit-vis was given.
6266if test "${enable_64bit_vis+set}" = set; then :
6267  enableval=$enable_64bit_vis; do64bitVIS=$enableval
6268else
6269  do64bitVIS=no
6270fi
6271
6272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5
6273$as_echo "$do64bitVIS" >&6; }
6274    # Force 64bit on with VIS
6275    if test "$do64bitVIS" = "yes"; then :
6276  do64bit=yes
6277fi
6278
6279    # Step 0.c: Check if visibility support is available. Do this here so
6280    # that platform specific alternatives can be used below if this fails.
6281
6282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5
6283$as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; }
6284if ${tcl_cv_cc_visibility_hidden+:} false; then :
6285  $as_echo_n "(cached) " >&6
6286else
6287
6288	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
6289	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6290/* end confdefs.h.  */
6291
6292	    extern __attribute__((__visibility__("hidden"))) void f(void);
6293	    void f(void) {}
6294int
6295main ()
6296{
6297f();
6298  ;
6299  return 0;
6300}
6301_ACEOF
6302if ac_fn_c_try_link "$LINENO"; then :
6303  tcl_cv_cc_visibility_hidden=yes
6304else
6305  tcl_cv_cc_visibility_hidden=no
6306fi
6307rm -f core conftest.err conftest.$ac_objext \
6308    conftest$ac_exeext conftest.$ac_ext
6309	CFLAGS=$hold_cflags
6310fi
6311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5
6312$as_echo "$tcl_cv_cc_visibility_hidden" >&6; }
6313    if test $tcl_cv_cc_visibility_hidden = yes; then :
6314
6315
6316$as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h
6317
6318
6319$as_echo "#define HAVE_HIDDEN 1" >>confdefs.h
6320
6321
6322fi
6323
6324    # Step 0.d: Disable -rpath support?
6325
6326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5
6327$as_echo_n "checking if rpath support is requested... " >&6; }
6328    # Check whether --enable-rpath was given.
6329if test "${enable_rpath+set}" = set; then :
6330  enableval=$enable_rpath; doRpath=$enableval
6331else
6332  doRpath=yes
6333fi
6334
6335    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5
6336$as_echo "$doRpath" >&6; }
6337
6338    # Set the variable "system" to hold the name and version number
6339    # for the system.
6340
6341
6342    { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
6343$as_echo_n "checking system version... " >&6; }
6344if ${tcl_cv_sys_version+:} false; then :
6345  $as_echo_n "(cached) " >&6
6346else
6347
6348	# TEA specific:
6349	if test "${TEA_PLATFORM}" = "windows" ; then
6350	    tcl_cv_sys_version=windows
6351	else
6352	    tcl_cv_sys_version=`uname -s`-`uname -r`
6353	    if test "$?" -ne 0 ; then
6354		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
6355$as_echo "$as_me: WARNING: can't find uname command" >&2;}
6356		tcl_cv_sys_version=unknown
6357	    else
6358		if test "`uname -s`" = "AIX" ; then
6359		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
6360		fi
6361		if test "`uname -s`" = "NetBSD" -a -f /etc/debian_version ; then
6362		    tcl_cv_sys_version=NetBSD-Debian
6363		fi
6364	    fi
6365	fi
6366
6367fi
6368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
6369$as_echo "$tcl_cv_sys_version" >&6; }
6370    system=$tcl_cv_sys_version
6371
6372
6373    # Require ranlib early so we can override it in special cases below.
6374
6375
6376
6377    # Set configuration options based on system name and version.
6378    # This is similar to Tcl's unix/tcl.m4 except that we've added a
6379    # "windows" case and removed some core-only vars.
6380
6381    do64bit_ok=no
6382    # default to '{$LIBS}' and set to "" on per-platform necessary basis
6383    SHLIB_LD_LIBS='${LIBS}'
6384    # When ld needs options to work in 64-bit mode, put them in
6385    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
6386    # is disabled by the user. [Bug 1016796]
6387    LDFLAGS_ARCH=""
6388    UNSHARED_LIB_SUFFIX=""
6389    # TEA specific: use PACKAGE_VERSION instead of VERSION
6390    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
6391    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
6392    TCL_LIB_VERSIONS_OK=ok
6393    CFLAGS_DEBUG=-g
6394    if test "$GCC" = yes; then :
6395
6396	CFLAGS_OPTIMIZE=-O2
6397	CFLAGS_WARNING="-Wall"
6398
6399else
6400
6401	CFLAGS_OPTIMIZE=-O
6402	CFLAGS_WARNING=""
6403
6404fi
6405    if test -n "$ac_tool_prefix"; then
6406  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6407set dummy ${ac_tool_prefix}ar; ac_word=$2
6408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6409$as_echo_n "checking for $ac_word... " >&6; }
6410if ${ac_cv_prog_AR+:} false; then :
6411  $as_echo_n "(cached) " >&6
6412else
6413  if test -n "$AR"; then
6414  ac_cv_prog_AR="$AR" # Let the user override the test.
6415else
6416as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6417for as_dir in $PATH
6418do
6419  IFS=$as_save_IFS
6420  test -z "$as_dir" && as_dir=.
6421    for ac_exec_ext in '' $ac_executable_extensions; do
6422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6423    ac_cv_prog_AR="${ac_tool_prefix}ar"
6424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6425    break 2
6426  fi
6427done
6428  done
6429IFS=$as_save_IFS
6430
6431fi
6432fi
6433AR=$ac_cv_prog_AR
6434if test -n "$AR"; then
6435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6436$as_echo "$AR" >&6; }
6437else
6438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6439$as_echo "no" >&6; }
6440fi
6441
6442
6443fi
6444if test -z "$ac_cv_prog_AR"; then
6445  ac_ct_AR=$AR
6446  # Extract the first word of "ar", so it can be a program name with args.
6447set dummy ar; ac_word=$2
6448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6449$as_echo_n "checking for $ac_word... " >&6; }
6450if ${ac_cv_prog_ac_ct_AR+:} false; then :
6451  $as_echo_n "(cached) " >&6
6452else
6453  if test -n "$ac_ct_AR"; then
6454  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6455else
6456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6457for as_dir in $PATH
6458do
6459  IFS=$as_save_IFS
6460  test -z "$as_dir" && as_dir=.
6461    for ac_exec_ext in '' $ac_executable_extensions; do
6462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6463    ac_cv_prog_ac_ct_AR="ar"
6464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6465    break 2
6466  fi
6467done
6468  done
6469IFS=$as_save_IFS
6470
6471fi
6472fi
6473ac_ct_AR=$ac_cv_prog_ac_ct_AR
6474if test -n "$ac_ct_AR"; then
6475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6476$as_echo "$ac_ct_AR" >&6; }
6477else
6478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6479$as_echo "no" >&6; }
6480fi
6481
6482  if test "x$ac_ct_AR" = x; then
6483    AR=""
6484  else
6485    case $cross_compiling:$ac_tool_warned in
6486yes:)
6487{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6488$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6489ac_tool_warned=yes ;;
6490esac
6491    AR=$ac_ct_AR
6492  fi
6493else
6494  AR="$ac_cv_prog_AR"
6495fi
6496
6497    STLIB_LD='${AR} cr'
6498    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
6499    if test "x$SHLIB_VERSION" = x; then :
6500  SHLIB_VERSION=""
6501else
6502  SHLIB_VERSION=".$SHLIB_VERSION"
6503fi
6504    case $system in
6505	# TEA specific:
6506	windows)
6507	    MACHINE="X86"
6508	    if test "$do64bit" != "no" ; then
6509		case "$do64bit" in
6510		    amd64|x64|yes)
6511			MACHINE="AMD64" ; # default to AMD64 64-bit build
6512			;;
6513		    ia64)
6514			MACHINE="IA64"
6515			;;
6516		esac
6517	    fi
6518
6519	    if test "$GCC" != "yes" ; then
6520	        if test "${SHARED_BUILD}" = "0" ; then
6521		    runtime=-MT
6522	        else
6523		    runtime=-MD
6524	        fi
6525	        case "x`echo \${VisualStudioVersion}`" in
6526	            x1[4-9]*)
6527		        lflags="${lflags} -nodefaultlib:libucrt.lib"
6528
6529    vars="ucrt.lib"
6530    for i in $vars; do
6531	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6532	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6533	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
6534	fi
6535	PKG_LIBS="$PKG_LIBS $i"
6536    done
6537
6538
6539	            ;;
6540	            *)
6541	            ;;
6542	        esac
6543
6544                if test "$do64bit" != "no" ; then
6545		    CC="cl.exe"
6546		    RC="rc.exe"
6547		    lflags="${lflags} -nologo -MACHINE:${MACHINE} "
6548		    LINKBIN="link.exe"
6549		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
6550		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
6551		    # Avoid 'unresolved external symbol __security_cookie'
6552		    # errors, c.f. http://support.microsoft.com/?id=894573
6553
6554    vars="bufferoverflowU.lib"
6555    for i in $vars; do
6556	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6557	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6558	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
6559	fi
6560	PKG_LIBS="$PKG_LIBS $i"
6561    done
6562
6563
6564		else
6565		    RC="rc"
6566		    lflags="${lflags} -nologo"
6567		    LINKBIN="link"
6568		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
6569		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
6570		fi
6571	    fi
6572
6573	    if test "$GCC" = "yes"; then
6574		# mingw gcc mode
6575		if test -n "$ac_tool_prefix"; then
6576  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6577set dummy ${ac_tool_prefix}windres; ac_word=$2
6578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6579$as_echo_n "checking for $ac_word... " >&6; }
6580if ${ac_cv_prog_RC+:} false; then :
6581  $as_echo_n "(cached) " >&6
6582else
6583  if test -n "$RC"; then
6584  ac_cv_prog_RC="$RC" # Let the user override the test.
6585else
6586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6587for as_dir in $PATH
6588do
6589  IFS=$as_save_IFS
6590  test -z "$as_dir" && as_dir=.
6591    for ac_exec_ext in '' $ac_executable_extensions; do
6592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6593    ac_cv_prog_RC="${ac_tool_prefix}windres"
6594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6595    break 2
6596  fi
6597done
6598  done
6599IFS=$as_save_IFS
6600
6601fi
6602fi
6603RC=$ac_cv_prog_RC
6604if test -n "$RC"; then
6605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
6606$as_echo "$RC" >&6; }
6607else
6608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6609$as_echo "no" >&6; }
6610fi
6611
6612
6613fi
6614if test -z "$ac_cv_prog_RC"; then
6615  ac_ct_RC=$RC
6616  # Extract the first word of "windres", so it can be a program name with args.
6617set dummy windres; ac_word=$2
6618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6619$as_echo_n "checking for $ac_word... " >&6; }
6620if ${ac_cv_prog_ac_ct_RC+:} false; then :
6621  $as_echo_n "(cached) " >&6
6622else
6623  if test -n "$ac_ct_RC"; then
6624  ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test.
6625else
6626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6627for as_dir in $PATH
6628do
6629  IFS=$as_save_IFS
6630  test -z "$as_dir" && as_dir=.
6631    for ac_exec_ext in '' $ac_executable_extensions; do
6632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6633    ac_cv_prog_ac_ct_RC="windres"
6634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6635    break 2
6636  fi
6637done
6638  done
6639IFS=$as_save_IFS
6640
6641fi
6642fi
6643ac_ct_RC=$ac_cv_prog_ac_ct_RC
6644if test -n "$ac_ct_RC"; then
6645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
6646$as_echo "$ac_ct_RC" >&6; }
6647else
6648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6649$as_echo "no" >&6; }
6650fi
6651
6652  if test "x$ac_ct_RC" = x; then
6653    RC=""
6654  else
6655    case $cross_compiling:$ac_tool_warned in
6656yes:)
6657{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6658$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6659ac_tool_warned=yes ;;
6660esac
6661    RC=$ac_ct_RC
6662  fi
6663else
6664  RC="$ac_cv_prog_RC"
6665fi
6666
6667		CFLAGS_DEBUG="-g"
6668		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
6669		SHLIB_LD='${CC} -shared'
6670		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
6671		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
6672		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
6673
6674		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cross-compile version of gcc" >&5
6675$as_echo_n "checking for cross-compile version of gcc... " >&6; }
6676if ${ac_cv_cross+:} false; then :
6677  $as_echo_n "(cached) " >&6
6678else
6679  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6680/* end confdefs.h.  */
6681
6682			    #ifdef _WIN32
6683				#error cross-compiler
6684			    #endif
6685
6686int
6687main ()
6688{
6689
6690  ;
6691  return 0;
6692}
6693_ACEOF
6694if ac_fn_c_try_compile "$LINENO"; then :
6695  ac_cv_cross=yes
6696else
6697  ac_cv_cross=no
6698fi
6699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6700
6701fi
6702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cross" >&5
6703$as_echo "$ac_cv_cross" >&6; }
6704		      if test "$ac_cv_cross" = "yes"; then
6705			case "$do64bit" in
6706			    amd64|x64|yes)
6707				CC="x86_64-w64-mingw32-${CC}"
6708				LD="x86_64-w64-mingw32-ld"
6709				AR="x86_64-w64-mingw32-ar"
6710				RANLIB="x86_64-w64-mingw32-ranlib"
6711				RC="x86_64-w64-mingw32-windres"
6712			    ;;
6713			    *)
6714				CC="i686-w64-mingw32-${CC}"
6715				LD="i686-w64-mingw32-ld"
6716				AR="i686-w64-mingw32-ar"
6717				RANLIB="i686-w64-mingw32-ranlib"
6718				RC="i686-w64-mingw32-windres"
6719			    ;;
6720			esac
6721		fi
6722
6723	    else
6724		SHLIB_LD="${LINKBIN} -dll ${lflags}"
6725		# link -lib only works when -lib is the first arg
6726		STLIB_LD="${LINKBIN} -lib ${lflags}"
6727		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
6728		PATHTYPE=-w
6729		# For information on what debugtype is most useful, see:
6730		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
6731		# and also
6732		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
6733		# This essentially turns it all on.
6734		LDFLAGS_DEBUG="-debug -debugtype:cv"
6735		LDFLAGS_OPTIMIZE="-release"
6736		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
6737		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
6738	    fi
6739
6740	    SHLIB_SUFFIX=".dll"
6741	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
6742
6743	    TCL_LIB_VERSIONS_OK=nodots
6744    	    ;;
6745	AIX-*)
6746	    if test "$GCC" != "yes"; then :
6747
6748		# AIX requires the _r compiler when gcc isn't being used
6749		case "${CC}" in
6750		    *_r|*_r\ *)
6751			# ok ...
6752			;;
6753		    *)
6754			# Make sure only first arg gets _r
6755		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
6756			;;
6757		esac
6758		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5
6759$as_echo "Using $CC for compiling with threads" >&6; }
6760
6761fi
6762	    LIBS="$LIBS -lc"
6763	    SHLIB_CFLAGS=""
6764	    SHLIB_SUFFIX=".so"
6765
6766	    LD_LIBRARY_PATH_VAR="LIBPATH"
6767
6768	    # Check to enable 64-bit flags for compiler/linker
6769	    if test "$do64bit" = yes; then :
6770
6771		if test "$GCC" = yes; then :
6772
6773		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
6774$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
6775
6776else
6777
6778		    do64bit_ok=yes
6779		    CFLAGS="$CFLAGS -q64"
6780		    LDFLAGS_ARCH="-q64"
6781		    RANLIB="${RANLIB} -X64"
6782		    AR="${AR} -X64"
6783		    SHLIB_LD_FLAGS="-b64"
6784
6785fi
6786
6787fi
6788
6789	    if test "`uname -m`" = ia64; then :
6790
6791		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
6792		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
6793		if test "$GCC" = yes; then :
6794
6795		    CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
6796
6797else
6798
6799		    CC_SEARCH_FLAGS='"-R${LIB_RUNTIME_DIR}"'
6800
6801fi
6802		LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
6803
6804else
6805
6806		if test "$GCC" = yes; then :
6807
6808		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
6809
6810else
6811
6812		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
6813		    LDFLAGS="$LDFLAGS -brtl"
6814
6815fi
6816		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
6817		CC_SEARCH_FLAGS='"-L${LIB_RUNTIME_DIR}"'
6818		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6819
6820fi
6821	    ;;
6822	BeOS*)
6823	    SHLIB_CFLAGS="-fPIC"
6824	    SHLIB_LD='${CC} -nostart'
6825	    SHLIB_SUFFIX=".so"
6826
6827	    #-----------------------------------------------------------
6828	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
6829	    # -lsocket, even if the network functions are in -lnet which
6830	    # is always linked to, for compatibility.
6831	    #-----------------------------------------------------------
6832	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5
6833$as_echo_n "checking for inet_ntoa in -lbind... " >&6; }
6834if ${ac_cv_lib_bind_inet_ntoa+:} false; then :
6835  $as_echo_n "(cached) " >&6
6836else
6837  ac_check_lib_save_LIBS=$LIBS
6838LIBS="-lbind  $LIBS"
6839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6840/* end confdefs.h.  */
6841
6842/* Override any GCC internal prototype to avoid an error.
6843   Use char because int might match the return type of a GCC
6844   builtin and then its argument prototype would still apply.  */
6845#ifdef __cplusplus
6846extern "C"
6847#endif
6848char inet_ntoa ();
6849int
6850main ()
6851{
6852return inet_ntoa ();
6853  ;
6854  return 0;
6855}
6856_ACEOF
6857if ac_fn_c_try_link "$LINENO"; then :
6858  ac_cv_lib_bind_inet_ntoa=yes
6859else
6860  ac_cv_lib_bind_inet_ntoa=no
6861fi
6862rm -f core conftest.err conftest.$ac_objext \
6863    conftest$ac_exeext conftest.$ac_ext
6864LIBS=$ac_check_lib_save_LIBS
6865fi
6866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5
6867$as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; }
6868if test "x$ac_cv_lib_bind_inet_ntoa" = xyes; then :
6869  LIBS="$LIBS -lbind -lsocket"
6870fi
6871
6872	    ;;
6873	BSD/OS-2.1*|BSD/OS-3*)
6874	    SHLIB_CFLAGS=""
6875	    SHLIB_LD="shlicc -r"
6876	    SHLIB_SUFFIX=".so"
6877	    CC_SEARCH_FLAGS=""
6878	    LD_SEARCH_FLAGS=""
6879	    ;;
6880	BSD/OS-4.*)
6881	    SHLIB_CFLAGS="-export-dynamic -fPIC"
6882	    SHLIB_LD='${CC} -shared'
6883	    SHLIB_SUFFIX=".so"
6884	    LDFLAGS="$LDFLAGS -export-dynamic"
6885	    CC_SEARCH_FLAGS=""
6886	    LD_SEARCH_FLAGS=""
6887	    ;;
6888	CYGWIN_*)
6889	    SHLIB_CFLAGS=""
6890	    SHLIB_LD='${CC} -shared'
6891	    SHLIB_SUFFIX=".dll"
6892	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
6893	    EXEEXT=".exe"
6894	    do64bit_ok=yes
6895	    CC_SEARCH_FLAGS=""
6896	    LD_SEARCH_FLAGS=""
6897	    ;;
6898	dgux*)
6899	    SHLIB_CFLAGS="-K PIC"
6900	    SHLIB_LD='${CC} -G'
6901	    SHLIB_LD_LIBS=""
6902	    SHLIB_SUFFIX=".so"
6903	    CC_SEARCH_FLAGS=""
6904	    LD_SEARCH_FLAGS=""
6905	    ;;
6906	Haiku*)
6907	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
6908	    SHLIB_CFLAGS="-fPIC"
6909	    SHLIB_SUFFIX=".so"
6910	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
6911	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5
6912$as_echo_n "checking for inet_ntoa in -lnetwork... " >&6; }
6913if ${ac_cv_lib_network_inet_ntoa+:} false; then :
6914  $as_echo_n "(cached) " >&6
6915else
6916  ac_check_lib_save_LIBS=$LIBS
6917LIBS="-lnetwork  $LIBS"
6918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6919/* end confdefs.h.  */
6920
6921/* Override any GCC internal prototype to avoid an error.
6922   Use char because int might match the return type of a GCC
6923   builtin and then its argument prototype would still apply.  */
6924#ifdef __cplusplus
6925extern "C"
6926#endif
6927char inet_ntoa ();
6928int
6929main ()
6930{
6931return inet_ntoa ();
6932  ;
6933  return 0;
6934}
6935_ACEOF
6936if ac_fn_c_try_link "$LINENO"; then :
6937  ac_cv_lib_network_inet_ntoa=yes
6938else
6939  ac_cv_lib_network_inet_ntoa=no
6940fi
6941rm -f core conftest.err conftest.$ac_objext \
6942    conftest$ac_exeext conftest.$ac_ext
6943LIBS=$ac_check_lib_save_LIBS
6944fi
6945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5
6946$as_echo "$ac_cv_lib_network_inet_ntoa" >&6; }
6947if test "x$ac_cv_lib_network_inet_ntoa" = xyes; then :
6948  LIBS="$LIBS -lnetwork"
6949fi
6950
6951	    ;;
6952	HP-UX-*.11.*)
6953	    # Use updated header definitions where possible
6954
6955$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
6956
6957	    # TEA specific: Needed by Tcl, but not most extensions
6958	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
6959	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
6960
6961	    if test "`uname -m`" = ia64; then :
6962
6963		SHLIB_SUFFIX=".so"
6964
6965else
6966
6967		SHLIB_SUFFIX=".sl"
6968
6969fi
6970	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
6971$as_echo_n "checking for shl_load in -ldld... " >&6; }
6972if ${ac_cv_lib_dld_shl_load+:} false; then :
6973  $as_echo_n "(cached) " >&6
6974else
6975  ac_check_lib_save_LIBS=$LIBS
6976LIBS="-ldld  $LIBS"
6977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6978/* end confdefs.h.  */
6979
6980/* Override any GCC internal prototype to avoid an error.
6981   Use char because int might match the return type of a GCC
6982   builtin and then its argument prototype would still apply.  */
6983#ifdef __cplusplus
6984extern "C"
6985#endif
6986char shl_load ();
6987int
6988main ()
6989{
6990return shl_load ();
6991  ;
6992  return 0;
6993}
6994_ACEOF
6995if ac_fn_c_try_link "$LINENO"; then :
6996  ac_cv_lib_dld_shl_load=yes
6997else
6998  ac_cv_lib_dld_shl_load=no
6999fi
7000rm -f core conftest.err conftest.$ac_objext \
7001    conftest$ac_exeext conftest.$ac_ext
7002LIBS=$ac_check_lib_save_LIBS
7003fi
7004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7005$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7006if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
7007  tcl_ok=yes
7008else
7009  tcl_ok=no
7010fi
7011
7012	    if test "$tcl_ok" = yes; then :
7013
7014		SHLIB_CFLAGS="+z"
7015		SHLIB_LD="ld -b"
7016		LDFLAGS="$LDFLAGS -Wl,-E"
7017		CC_SEARCH_FLAGS='"-Wl,+s,+b,${LIB_RUNTIME_DIR}:."'
7018		LD_SEARCH_FLAGS='+s +b "${LIB_RUNTIME_DIR}:."'
7019		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7020
7021fi
7022	    if test "$GCC" = yes; then :
7023
7024		SHLIB_LD='${CC} -shared'
7025		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7026
7027else
7028
7029		CFLAGS="$CFLAGS -z"
7030
7031fi
7032
7033	    # Check to enable 64-bit flags for compiler/linker
7034	    if test "$do64bit" = "yes"; then :
7035
7036		if test "$GCC" = yes; then :
7037
7038		    case `${CC} -dumpmachine` in
7039			hppa64*)
7040			    # 64-bit gcc in use.  Fix flags for GNU ld.
7041			    do64bit_ok=yes
7042			    SHLIB_LD='${CC} -shared'
7043			    if test $doRpath = yes; then :
7044
7045				CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7046fi
7047			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7048			    ;;
7049			*)
7050			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
7051$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7052			    ;;
7053		    esac
7054
7055else
7056
7057		    do64bit_ok=yes
7058		    CFLAGS="$CFLAGS +DD64"
7059		    LDFLAGS_ARCH="+DD64"
7060
7061fi
7062
7063fi ;;
7064	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
7065	    SHLIB_SUFFIX=".sl"
7066	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7067$as_echo_n "checking for shl_load in -ldld... " >&6; }
7068if ${ac_cv_lib_dld_shl_load+:} false; then :
7069  $as_echo_n "(cached) " >&6
7070else
7071  ac_check_lib_save_LIBS=$LIBS
7072LIBS="-ldld  $LIBS"
7073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7074/* end confdefs.h.  */
7075
7076/* Override any GCC internal prototype to avoid an error.
7077   Use char because int might match the return type of a GCC
7078   builtin and then its argument prototype would still apply.  */
7079#ifdef __cplusplus
7080extern "C"
7081#endif
7082char shl_load ();
7083int
7084main ()
7085{
7086return shl_load ();
7087  ;
7088  return 0;
7089}
7090_ACEOF
7091if ac_fn_c_try_link "$LINENO"; then :
7092  ac_cv_lib_dld_shl_load=yes
7093else
7094  ac_cv_lib_dld_shl_load=no
7095fi
7096rm -f core conftest.err conftest.$ac_objext \
7097    conftest$ac_exeext conftest.$ac_ext
7098LIBS=$ac_check_lib_save_LIBS
7099fi
7100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7101$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7102if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
7103  tcl_ok=yes
7104else
7105  tcl_ok=no
7106fi
7107
7108	    if test "$tcl_ok" = yes; then :
7109
7110		SHLIB_CFLAGS="+z"
7111		SHLIB_LD="ld -b"
7112		SHLIB_LD_LIBS=""
7113		LDFLAGS="$LDFLAGS -Wl,-E"
7114		CC_SEARCH_FLAGS='"-Wl,+s,+b,${LIB_RUNTIME_DIR}:."'
7115		LD_SEARCH_FLAGS='+s +b "${LIB_RUNTIME_DIR}:."'
7116		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7117
7118fi ;;
7119	IRIX-5.*)
7120	    SHLIB_CFLAGS=""
7121	    SHLIB_LD="ld -shared -rdata_shared"
7122	    SHLIB_SUFFIX=".so"
7123	    case " $LIBOBJS " in
7124  *" mkstemp.$ac_objext "* ) ;;
7125  *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext"
7126 ;;
7127esac
7128
7129	    if test $doRpath = yes; then :
7130
7131		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7132		LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'
7133fi
7134	    ;;
7135	IRIX-6.*)
7136	    SHLIB_CFLAGS=""
7137	    SHLIB_LD="ld -n32 -shared -rdata_shared"
7138	    SHLIB_SUFFIX=".so"
7139	    if test $doRpath = yes; then :
7140
7141		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7142		LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'
7143fi
7144	    if test "$GCC" = yes; then :
7145
7146		CFLAGS="$CFLAGS -mabi=n32"
7147		LDFLAGS="$LDFLAGS -mabi=n32"
7148
7149else
7150
7151		case $system in
7152		    IRIX-6.3)
7153			# Use to build 6.2 compatible binaries on 6.3.
7154			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
7155			;;
7156		    *)
7157			CFLAGS="$CFLAGS -n32"
7158			;;
7159		esac
7160		LDFLAGS="$LDFLAGS -n32"
7161
7162fi
7163	    ;;
7164	IRIX64-6.*)
7165	    SHLIB_CFLAGS=""
7166	    SHLIB_LD="ld -n32 -shared -rdata_shared"
7167	    SHLIB_SUFFIX=".so"
7168	    if test $doRpath = yes; then :
7169
7170		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7171		LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'
7172fi
7173
7174	    # Check to enable 64-bit flags for compiler/linker
7175
7176	    if test "$do64bit" = yes; then :
7177
7178	        if test "$GCC" = yes; then :
7179
7180	            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5
7181$as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
7182
7183else
7184
7185	            do64bit_ok=yes
7186	            SHLIB_LD="ld -64 -shared -rdata_shared"
7187	            CFLAGS="$CFLAGS -64"
7188	            LDFLAGS_ARCH="-64"
7189
7190fi
7191
7192fi
7193	    ;;
7194	Linux*|GNU*|NetBSD-Debian|DragonFly-*|DragonFly-*)
7195	    SHLIB_CFLAGS="-fPIC"
7196	    SHLIB_SUFFIX=".so"
7197
7198	    # TEA specific:
7199	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
7200
7201	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7202	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
7203	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7204
7205	    case $system in
7206	    DragonFly-*|DragonFly-*)
7207		if test "${TCL_THREADS}" = "1"; then :
7208
7209		    # The -pthread needs to go in the LDFLAGS, not LIBS
7210		    LIBS=`echo $LIBS | sed s/-pthread//`
7211		    CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7212		    LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
7213fi
7214	    ;;
7215            esac
7216
7217	    if test $doRpath = yes; then :
7218
7219		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7220fi
7221	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7222	    if test "`uname -m`" = "alpha"; then :
7223  CFLAGS="$CFLAGS -mieee"
7224fi
7225	    if test $do64bit = yes; then :
7226
7227		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5
7228$as_echo_n "checking if compiler accepts -m64 flag... " >&6; }
7229if ${tcl_cv_cc_m64+:} false; then :
7230  $as_echo_n "(cached) " >&6
7231else
7232
7233		    hold_cflags=$CFLAGS
7234		    CFLAGS="$CFLAGS -m64"
7235		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7236/* end confdefs.h.  */
7237
7238int
7239main ()
7240{
7241
7242  ;
7243  return 0;
7244}
7245_ACEOF
7246if ac_fn_c_try_link "$LINENO"; then :
7247  tcl_cv_cc_m64=yes
7248else
7249  tcl_cv_cc_m64=no
7250fi
7251rm -f core conftest.err conftest.$ac_objext \
7252    conftest$ac_exeext conftest.$ac_ext
7253		    CFLAGS=$hold_cflags
7254fi
7255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5
7256$as_echo "$tcl_cv_cc_m64" >&6; }
7257		if test $tcl_cv_cc_m64 = yes; then :
7258
7259		    CFLAGS="$CFLAGS -m64"
7260		    do64bit_ok=yes
7261
7262fi
7263
7264fi
7265
7266	    # The combo of gcc + glibc has a bug related to inlining of
7267	    # functions like strtod(). The -fno-builtin flag should address
7268	    # this problem but it does not work. The -fno-inline flag is kind
7269	    # of overkill but it works. Disable inlining only when one of the
7270	    # files in compat/*.c is being linked in.
7271
7272	    if test x"${USE_COMPAT}" != x; then :
7273  CFLAGS="$CFLAGS -fno-inline"
7274fi
7275	    ;;
7276	Lynx*)
7277	    SHLIB_CFLAGS="-fPIC"
7278	    SHLIB_SUFFIX=".so"
7279	    CFLAGS_OPTIMIZE=-02
7280	    SHLIB_LD='${CC} -shared'
7281	    LD_FLAGS="-Wl,--export-dynamic"
7282	    if test $doRpath = yes; then :
7283
7284		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7285		LD_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7286fi
7287	    ;;
7288	OpenBSD-*)
7289	    arch=`arch -s`
7290	    case "$arch" in
7291	    alpha|sparc64)
7292		SHLIB_CFLAGS="-fPIC"
7293		;;
7294	    *)
7295		SHLIB_CFLAGS="-fpic"
7296		;;
7297	    esac
7298	    SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared'
7299	    SHLIB_SUFFIX=".so"
7300	    if test $doRpath = yes; then :
7301
7302		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7303fi
7304	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7305	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
7306	    LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
7307	    CFLAGS_OPTIMIZE="-O2"
7308	    # On OpenBSD:	Compile with -pthread
7309	    #		Don't link with -lpthread
7310	    LIBS=`echo $LIBS | sed s/-lpthread//`
7311	    CFLAGS="$CFLAGS -pthread"
7312	    # OpenBSD doesn't do version numbers with dots.
7313	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7314	    TCL_LIB_VERSIONS_OK=nodots
7315	    ;;
7316	NetBSD-*)
7317	    # NetBSD has ELF and can use 'cc -shared' to build shared libs
7318	    SHLIB_CFLAGS="-fPIC"
7319	    SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared'
7320	    SHLIB_SUFFIX=".so"
7321	    LDFLAGS="$LDFLAGS -export-dynamic"
7322	    if test $doRpath = yes; then :
7323
7324		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7325fi
7326	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7327	    # The -pthread needs to go in the CFLAGS, not LIBS
7328	    LIBS=`echo $LIBS | sed s/-pthread//`
7329	    CFLAGS="$CFLAGS -pthread"
7330	    LDFLAGS="$LDFLAGS -pthread"
7331	    ;;
7332	Darwin-*)
7333	    CFLAGS_OPTIMIZE="-Os"
7334	    SHLIB_CFLAGS="-fno-common"
7335	    # To avoid discrepancies between what headers configure sees during
7336	    # preprocessing tests and compiling tests, move any -isysroot and
7337	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
7338	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
7339		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7340		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
7341	    CFLAGS="`echo " ${CFLAGS}" | \
7342		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7343		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
7344	    if test $do64bit = yes; then :
7345
7346		case `arch` in
7347		    ppc)
7348			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5
7349$as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; }
7350if ${tcl_cv_cc_arch_ppc64+:} false; then :
7351  $as_echo_n "(cached) " >&6
7352else
7353
7354			    hold_cflags=$CFLAGS
7355			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7356			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7357/* end confdefs.h.  */
7358
7359int
7360main ()
7361{
7362
7363  ;
7364  return 0;
7365}
7366_ACEOF
7367if ac_fn_c_try_link "$LINENO"; then :
7368  tcl_cv_cc_arch_ppc64=yes
7369else
7370  tcl_cv_cc_arch_ppc64=no
7371fi
7372rm -f core conftest.err conftest.$ac_objext \
7373    conftest$ac_exeext conftest.$ac_ext
7374			    CFLAGS=$hold_cflags
7375fi
7376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5
7377$as_echo "$tcl_cv_cc_arch_ppc64" >&6; }
7378			if test $tcl_cv_cc_arch_ppc64 = yes; then :
7379
7380			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7381			    do64bit_ok=yes
7382
7383fi;;
7384		    i386)
7385			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5
7386$as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; }
7387if ${tcl_cv_cc_arch_x86_64+:} false; then :
7388  $as_echo_n "(cached) " >&6
7389else
7390
7391			    hold_cflags=$CFLAGS
7392			    CFLAGS="$CFLAGS -arch x86_64"
7393			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7394/* end confdefs.h.  */
7395
7396int
7397main ()
7398{
7399
7400  ;
7401  return 0;
7402}
7403_ACEOF
7404if ac_fn_c_try_link "$LINENO"; then :
7405  tcl_cv_cc_arch_x86_64=yes
7406else
7407  tcl_cv_cc_arch_x86_64=no
7408fi
7409rm -f core conftest.err conftest.$ac_objext \
7410    conftest$ac_exeext conftest.$ac_ext
7411			    CFLAGS=$hold_cflags
7412fi
7413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5
7414$as_echo "$tcl_cv_cc_arch_x86_64" >&6; }
7415			if test $tcl_cv_cc_arch_x86_64 = yes; then :
7416
7417			    CFLAGS="$CFLAGS -arch x86_64"
7418			    do64bit_ok=yes
7419
7420fi;;
7421		    *)
7422			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
7423$as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
7424		esac
7425
7426else
7427
7428		# Check for combined 32-bit and 64-bit fat build
7429		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
7430		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then :
7431
7432		    fat_32_64=yes
7433fi
7434
7435fi
7436	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7437	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
7438	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
7439$as_echo_n "checking if ld accepts -single_module flag... " >&6; }
7440if ${tcl_cv_ld_single_module+:} false; then :
7441  $as_echo_n "(cached) " >&6
7442else
7443
7444		hold_ldflags=$LDFLAGS
7445		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
7446		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7447/* end confdefs.h.  */
7448
7449int
7450main ()
7451{
7452int i;
7453  ;
7454  return 0;
7455}
7456_ACEOF
7457if ac_fn_c_try_link "$LINENO"; then :
7458  tcl_cv_ld_single_module=yes
7459else
7460  tcl_cv_ld_single_module=no
7461fi
7462rm -f core conftest.err conftest.$ac_objext \
7463    conftest$ac_exeext conftest.$ac_ext
7464		LDFLAGS=$hold_ldflags
7465fi
7466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5
7467$as_echo "$tcl_cv_ld_single_module" >&6; }
7468	    if test $tcl_cv_ld_single_module = yes; then :
7469
7470		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
7471
7472fi
7473	    # TEA specific: link shlib with current and compatibility version flags
7474	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
7475	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
7476	    SHLIB_SUFFIX=".dylib"
7477	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
7478	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5
7479$as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; }
7480if ${tcl_cv_ld_search_paths_first+:} false; then :
7481  $as_echo_n "(cached) " >&6
7482else
7483
7484		hold_ldflags=$LDFLAGS
7485		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7486		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7487/* end confdefs.h.  */
7488
7489int
7490main ()
7491{
7492int i;
7493  ;
7494  return 0;
7495}
7496_ACEOF
7497if ac_fn_c_try_link "$LINENO"; then :
7498  tcl_cv_ld_search_paths_first=yes
7499else
7500  tcl_cv_ld_search_paths_first=no
7501fi
7502rm -f core conftest.err conftest.$ac_objext \
7503    conftest$ac_exeext conftest.$ac_ext
7504		LDFLAGS=$hold_ldflags
7505fi
7506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5
7507$as_echo "$tcl_cv_ld_search_paths_first" >&6; }
7508	    if test $tcl_cv_ld_search_paths_first = yes; then :
7509
7510		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7511
7512fi
7513	    if test "$tcl_cv_cc_visibility_hidden" != yes; then :
7514
7515
7516$as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h
7517
7518		tcl_cv_cc_visibility_hidden=yes
7519
7520fi
7521	    CC_SEARCH_FLAGS=""
7522	    LD_SEARCH_FLAGS=""
7523	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
7524	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
7525	    # extensions, verify that 64-bit build is possible.
7526	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then :
7527
7528		if test "${TEA_WINDOWINGSYSTEM}" = x11; then :
7529
7530		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5
7531$as_echo_n "checking for 64-bit X11... " >&6; }
7532if ${tcl_cv_lib_x11_64+:} false; then :
7533  $as_echo_n "(cached) " >&6
7534else
7535
7536			for v in CFLAGS CPPFLAGS LDFLAGS; do
7537			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
7538			done
7539			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
7540			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
7541			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7542/* end confdefs.h.  */
7543#include <X11/Xlib.h>
7544int
7545main ()
7546{
7547XrmInitialize();
7548  ;
7549  return 0;
7550}
7551_ACEOF
7552if ac_fn_c_try_link "$LINENO"; then :
7553  tcl_cv_lib_x11_64=yes
7554else
7555  tcl_cv_lib_x11_64=no
7556fi
7557rm -f core conftest.err conftest.$ac_objext \
7558    conftest$ac_exeext conftest.$ac_ext
7559			for v in CFLAGS CPPFLAGS LDFLAGS; do
7560			    eval $v'="$hold_'$v'"'
7561			done
7562fi
7563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5
7564$as_echo "$tcl_cv_lib_x11_64" >&6; }
7565
7566fi
7567		if test "${TEA_WINDOWINGSYSTEM}" = aqua; then :
7568
7569		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit Tk" >&5
7570$as_echo_n "checking for 64-bit Tk... " >&6; }
7571if ${tcl_cv_lib_tk_64+:} false; then :
7572  $as_echo_n "(cached) " >&6
7573else
7574
7575			for v in CFLAGS CPPFLAGS LDFLAGS; do
7576			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
7577			done
7578			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
7579			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
7580			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7581/* end confdefs.h.  */
7582#include <tk.h>
7583int
7584main ()
7585{
7586Tk_InitStubs(NULL, "", 0);
7587  ;
7588  return 0;
7589}
7590_ACEOF
7591if ac_fn_c_try_link "$LINENO"; then :
7592  tcl_cv_lib_tk_64=yes
7593else
7594  tcl_cv_lib_tk_64=no
7595fi
7596rm -f core conftest.err conftest.$ac_objext \
7597    conftest$ac_exeext conftest.$ac_ext
7598			for v in CFLAGS CPPFLAGS LDFLAGS; do
7599			    eval $v'="$hold_'$v'"'
7600			done
7601fi
7602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_tk_64" >&5
7603$as_echo "$tcl_cv_lib_tk_64" >&6; }
7604
7605fi
7606		# remove 64-bit arch flags from CFLAGS et al. if configuration
7607		# does not support 64-bit.
7608		if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then :
7609
7610		    { $as_echo "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5
7611$as_echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
7612		    for v in CFLAGS CPPFLAGS LDFLAGS; do
7613			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
7614		    done
7615fi
7616
7617fi
7618	    ;;
7619	OS/390-*)
7620	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
7621
7622$as_echo "#define _OE_SOCKETS 1" >>confdefs.h
7623
7624	    ;;
7625	OSF1-V*)
7626	    # Digital OSF/1
7627	    SHLIB_CFLAGS=""
7628	    if test "$SHARED_BUILD" = 1; then :
7629
7630	        SHLIB_LD='ld -shared -expect_unresolved "*"'
7631
7632else
7633
7634	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
7635
7636fi
7637	    SHLIB_SUFFIX=".so"
7638	    if test $doRpath = yes; then :
7639
7640		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7641		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7642fi
7643	    if test "$GCC" = yes; then :
7644  CFLAGS="$CFLAGS -mieee"
7645else
7646
7647		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
7648fi
7649	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
7650	    CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
7651	    CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
7652	    LIBS=`echo $LIBS | sed s/-lpthreads//`
7653	    if test "$GCC" = yes; then :
7654
7655		LIBS="$LIBS -lpthread -lmach -lexc"
7656
7657else
7658
7659		CFLAGS="$CFLAGS -pthread"
7660		LDFLAGS="$LDFLAGS -pthread"
7661
7662fi
7663	    ;;
7664	QNX-6*)
7665	    # QNX RTP
7666	    # This may work for all QNX, but it was only reported for v6.
7667	    SHLIB_CFLAGS="-fPIC"
7668	    SHLIB_LD="ld -Bshareable -x"
7669	    SHLIB_LD_LIBS=""
7670	    SHLIB_SUFFIX=".so"
7671	    CC_SEARCH_FLAGS=""
7672	    LD_SEARCH_FLAGS=""
7673	    ;;
7674	SCO_SV-3.2*)
7675	    if test "$GCC" = yes; then :
7676
7677		SHLIB_CFLAGS="-fPIC -melf"
7678		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
7679
7680else
7681
7682		SHLIB_CFLAGS="-Kpic -belf"
7683		LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
7684
7685fi
7686	    SHLIB_LD="ld -G"
7687	    SHLIB_LD_LIBS=""
7688	    SHLIB_SUFFIX=".so"
7689	    CC_SEARCH_FLAGS=""
7690	    LD_SEARCH_FLAGS=""
7691	    ;;
7692	SunOS-5.[0-6])
7693	    # Careful to not let 5.10+ fall into this case
7694
7695	    # Note: If _REENTRANT isn't defined, then Solaris
7696	    # won't define thread-safe library routines.
7697
7698
7699$as_echo "#define _REENTRANT 1" >>confdefs.h
7700
7701
7702$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
7703
7704
7705	    SHLIB_CFLAGS="-KPIC"
7706	    SHLIB_SUFFIX=".so"
7707	    if test "$GCC" = yes; then :
7708
7709		SHLIB_LD='${CC} -shared'
7710		CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
7711		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7712
7713else
7714
7715		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
7716		CC_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
7717		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7718
7719fi
7720	    ;;
7721	SunOS-5*)
7722	    # Note: If _REENTRANT isn't defined, then Solaris
7723	    # won't define thread-safe library routines.
7724
7725
7726$as_echo "#define _REENTRANT 1" >>confdefs.h
7727
7728
7729$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
7730
7731
7732	    SHLIB_CFLAGS="-KPIC"
7733
7734	    # Check to enable 64-bit flags for compiler/linker
7735	    if test "$do64bit" = yes; then :
7736
7737		arch=`isainfo`
7738		if test "$arch" = "sparcv9 sparc"; then :
7739
7740		    if test "$GCC" = yes; then :
7741
7742			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then :
7743
7744			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
7745$as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
7746
7747else
7748
7749			    do64bit_ok=yes
7750			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
7751			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
7752			    SHLIB_CFLAGS="-fPIC"
7753
7754fi
7755
7756else
7757
7758			do64bit_ok=yes
7759			if test "$do64bitVIS" = yes; then :
7760
7761			    CFLAGS="$CFLAGS -xarch=v9a"
7762			    LDFLAGS_ARCH="-xarch=v9a"
7763
7764else
7765
7766			    CFLAGS="$CFLAGS -xarch=v9"
7767			    LDFLAGS_ARCH="-xarch=v9"
7768
7769fi
7770			# Solaris 64 uses this as well
7771			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
7772
7773fi
7774
7775else
7776  if test "$arch" = "amd64 i386"; then :
7777
7778		    if test "$GCC" = yes; then :
7779
7780			case $system in
7781			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
7782				do64bit_ok=yes
7783				CFLAGS="$CFLAGS -m64"
7784				LDFLAGS="$LDFLAGS -m64";;
7785			    *)
7786				{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
7787$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
7788			esac
7789
7790else
7791
7792			do64bit_ok=yes
7793			case $system in
7794			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
7795				CFLAGS="$CFLAGS -m64"
7796				LDFLAGS="$LDFLAGS -m64";;
7797			    *)
7798				CFLAGS="$CFLAGS -xarch=amd64"
7799				LDFLAGS="$LDFLAGS -xarch=amd64";;
7800			esac
7801
7802fi
7803
7804else
7805  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5
7806$as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
7807fi
7808fi
7809
7810fi
7811
7812	    SHLIB_SUFFIX=".so"
7813	    if test "$GCC" = yes; then :
7814
7815		SHLIB_LD='${CC} -shared'
7816		CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
7817		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7818		if test "$do64bit_ok" = yes; then :
7819
7820		    if test "$arch" = "sparcv9 sparc"; then :
7821
7822			# We need to specify -static-libgcc or we need to
7823			# add the path to the sparv9 libgcc.
7824			# JH: static-libgcc is necessary for core Tcl, but may
7825			# not be necessary for extensions.
7826			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
7827			# for finding sparcv9 libgcc, get the regular libgcc
7828			# path, remove so name and append 'sparcv9'
7829			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
7830			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
7831
7832else
7833  if test "$arch" = "amd64 i386"; then :
7834
7835			# JH: static-libgcc is necessary for core Tcl, but may
7836			# not be necessary for extensions.
7837			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
7838
7839fi
7840fi
7841
7842fi
7843
7844else
7845
7846		case $system in
7847		    SunOS-5.[1-9][0-9]*)
7848			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7849			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
7850		    *)
7851			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
7852		esac
7853		CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
7854		LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
7855
7856fi
7857	    ;;
7858	UNIX_SV* | UnixWare-5*)
7859	    SHLIB_CFLAGS="-KPIC"
7860	    SHLIB_LD='${CC} -G'
7861	    SHLIB_LD_LIBS=""
7862	    SHLIB_SUFFIX=".so"
7863	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
7864	    # that don't grok the -Bexport option.  Test that it does.
7865	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5
7866$as_echo_n "checking for ld accepts -Bexport flag... " >&6; }
7867if ${tcl_cv_ld_Bexport+:} false; then :
7868  $as_echo_n "(cached) " >&6
7869else
7870
7871		hold_ldflags=$LDFLAGS
7872		LDFLAGS="$LDFLAGS -Wl,-Bexport"
7873		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7874/* end confdefs.h.  */
7875
7876int
7877main ()
7878{
7879int i;
7880  ;
7881  return 0;
7882}
7883_ACEOF
7884if ac_fn_c_try_link "$LINENO"; then :
7885  tcl_cv_ld_Bexport=yes
7886else
7887  tcl_cv_ld_Bexport=no
7888fi
7889rm -f core conftest.err conftest.$ac_objext \
7890    conftest$ac_exeext conftest.$ac_ext
7891	        LDFLAGS=$hold_ldflags
7892fi
7893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5
7894$as_echo "$tcl_cv_ld_Bexport" >&6; }
7895	    if test $tcl_cv_ld_Bexport = yes; then :
7896
7897		LDFLAGS="$LDFLAGS -Wl,-Bexport"
7898
7899fi
7900	    CC_SEARCH_FLAGS=""
7901	    LD_SEARCH_FLAGS=""
7902	    ;;
7903    esac
7904
7905    if test "$do64bit" = yes -a "$do64bit_ok" = no; then :
7906
7907	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
7908$as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
7909
7910fi
7911
7912
7913
7914    # Add in the arch flags late to ensure it wasn't removed.
7915    # Not necessary in TEA, but this is aligned with core
7916    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
7917
7918    # If we're running gcc, then change the C flags for compiling shared
7919    # libraries to the right flags for gcc, instead of those for the
7920    # standard manufacturer compiler.
7921
7922    if test "$GCC" = yes; then :
7923
7924	case $system in
7925	    AIX-*) ;;
7926	    BSD/OS*) ;;
7927	    CYGWIN_*|MINGW32_*|MINGW64_*|MSYS_*) ;;
7928	    IRIX*) ;;
7929	    NetBSD-*|DragonFly-*|DragonFly-*|OpenBSD-*) ;;
7930	    Darwin-*) ;;
7931	    SCO_SV-3.2*) ;;
7932	    windows) ;;
7933	    *) SHLIB_CFLAGS="-fPIC" ;;
7934	esac
7935fi
7936
7937    if test "$tcl_cv_cc_visibility_hidden" != yes; then :
7938
7939
7940$as_echo "#define MODULE_SCOPE extern" >>confdefs.h
7941
7942
7943fi
7944
7945    if test "$SHARED_LIB_SUFFIX" = ""; then :
7946
7947    # TEA specific: use PACKAGE_VERSION instead of VERSION
7948    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
7949fi
7950    if test "$UNSHARED_LIB_SUFFIX" = ""; then :
7951
7952    # TEA specific: use PACKAGE_VERSION instead of VERSION
7953    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
7954fi
7955
7956    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
7957	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5
7958$as_echo_n "checking for SEH support in compiler... " >&6; }
7959if ${tcl_cv_seh+:} false; then :
7960  $as_echo_n "(cached) " >&6
7961else
7962  if test "$cross_compiling" = yes; then :
7963  tcl_cv_seh=no
7964else
7965  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7966/* end confdefs.h.  */
7967
7968#define WIN32_LEAN_AND_MEAN
7969#include <windows.h>
7970#undef WIN32_LEAN_AND_MEAN
7971
7972	    int main(int argc, char** argv) {
7973		int a, b = 0;
7974		__try {
7975		    a = 666 / b;
7976		}
7977		__except (EXCEPTION_EXECUTE_HANDLER) {
7978		    return 0;
7979		}
7980		return 1;
7981	    }
7982
7983_ACEOF
7984if ac_fn_c_try_run "$LINENO"; then :
7985  tcl_cv_seh=yes
7986else
7987  tcl_cv_seh=no
7988fi
7989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7990  conftest.$ac_objext conftest.beam conftest.$ac_ext
7991fi
7992
7993
7994fi
7995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5
7996$as_echo "$tcl_cv_seh" >&6; }
7997	if test "$tcl_cv_seh" = "no" ; then
7998
7999$as_echo "#define HAVE_NO_SEH 1" >>confdefs.h
8000
8001	fi
8002
8003	#
8004	# Check to see if the excpt.h include file provided contains the
8005	# definition for EXCEPTION_DISPOSITION; if not, which is the case
8006	# with Cygwin's version as of 2002-04-10, define it to be int,
8007	# sufficient for getting the current code to work.
8008	#
8009	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5
8010$as_echo_n "checking for EXCEPTION_DISPOSITION support in include files... " >&6; }
8011if ${tcl_cv_eh_disposition+:} false; then :
8012  $as_echo_n "(cached) " >&6
8013else
8014  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8015/* end confdefs.h.  */
8016
8017#	    define WIN32_LEAN_AND_MEAN
8018#	    include <windows.h>
8019#	    undef WIN32_LEAN_AND_MEAN
8020
8021int
8022main ()
8023{
8024
8025		EXCEPTION_DISPOSITION x;
8026
8027  ;
8028  return 0;
8029}
8030_ACEOF
8031if ac_fn_c_try_compile "$LINENO"; then :
8032  tcl_cv_eh_disposition=yes
8033else
8034  tcl_cv_eh_disposition=no
8035fi
8036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8037
8038fi
8039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5
8040$as_echo "$tcl_cv_eh_disposition" >&6; }
8041	if test "$tcl_cv_eh_disposition" = "no" ; then
8042
8043$as_echo "#define EXCEPTION_DISPOSITION int" >>confdefs.h
8044
8045	fi
8046
8047	# Check to see if winnt.h defines CHAR, SHORT, and LONG
8048	# even if VOID has already been #defined. The win32api
8049	# used by mingw and cygwin is known to do this.
8050
8051	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5
8052$as_echo_n "checking for winnt.h that ignores VOID define... " >&6; }
8053if ${tcl_cv_winnt_ignore_void+:} false; then :
8054  $as_echo_n "(cached) " >&6
8055else
8056  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8057/* end confdefs.h.  */
8058
8059#define VOID void
8060#define WIN32_LEAN_AND_MEAN
8061#include <windows.h>
8062#undef WIN32_LEAN_AND_MEAN
8063
8064int
8065main ()
8066{
8067
8068		CHAR c;
8069		SHORT s;
8070		LONG l;
8071
8072  ;
8073  return 0;
8074}
8075_ACEOF
8076if ac_fn_c_try_compile "$LINENO"; then :
8077  tcl_cv_winnt_ignore_void=yes
8078else
8079  tcl_cv_winnt_ignore_void=no
8080fi
8081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8082
8083fi
8084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5
8085$as_echo "$tcl_cv_winnt_ignore_void" >&6; }
8086	if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
8087
8088$as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h
8089
8090	fi
8091    fi
8092
8093	# See if the compiler supports casting to a union type.
8094	# This is used to stop gcc from printing a compiler
8095	# warning when initializing a union member.
8096
8097	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
8098$as_echo_n "checking for cast to union support... " >&6; }
8099if ${tcl_cv_cast_to_union+:} false; then :
8100  $as_echo_n "(cached) " >&6
8101else
8102  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8103/* end confdefs.h.  */
8104
8105int
8106main ()
8107{
8108
8109		  union foo { int i; double d; };
8110		  union foo f = (union foo) (int) 0;
8111
8112  ;
8113  return 0;
8114}
8115_ACEOF
8116if ac_fn_c_try_compile "$LINENO"; then :
8117  tcl_cv_cast_to_union=yes
8118else
8119  tcl_cv_cast_to_union=no
8120fi
8121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8122
8123fi
8124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
8125$as_echo "$tcl_cv_cast_to_union" >&6; }
8126	if test "$tcl_cv_cast_to_union" = "yes"; then
8127
8128$as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h
8129
8130	fi
8131
8132	ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
8133if test "x$ac_cv_header_stdbool_h" = xyes; then :
8134
8135$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
8136
8137fi
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155    # These must be called after we do the basic CFLAGS checks and
8156    # verify any possible 64-bit or similar switches are necessary
8157
8158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5
8159$as_echo_n "checking for required early compiler flags... " >&6; }
8160    tcl_flags=""
8161
8162    if ${tcl_cv_flag__isoc99_source+:} false; then :
8163  $as_echo_n "(cached) " >&6
8164else
8165  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8166/* end confdefs.h.  */
8167#include <stdlib.h>
8168int
8169main ()
8170{
8171char *p = (char *)strtoll; char *q = (char *)strtoull;
8172  ;
8173  return 0;
8174}
8175_ACEOF
8176if ac_fn_c_try_compile "$LINENO"; then :
8177  tcl_cv_flag__isoc99_source=no
8178else
8179  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8180/* end confdefs.h.  */
8181#define _ISOC99_SOURCE 1
8182#include <stdlib.h>
8183int
8184main ()
8185{
8186char *p = (char *)strtoll; char *q = (char *)strtoull;
8187  ;
8188  return 0;
8189}
8190_ACEOF
8191if ac_fn_c_try_compile "$LINENO"; then :
8192  tcl_cv_flag__isoc99_source=yes
8193else
8194  tcl_cv_flag__isoc99_source=no
8195fi
8196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8197fi
8198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8199fi
8200
8201    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
8202
8203$as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h
8204
8205	tcl_flags="$tcl_flags _ISOC99_SOURCE"
8206    fi
8207
8208
8209    if ${tcl_cv_flag__largefile64_source+:} false; then :
8210  $as_echo_n "(cached) " >&6
8211else
8212  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8213/* end confdefs.h.  */
8214#include <sys/stat.h>
8215int
8216main ()
8217{
8218struct stat64 buf; int i = stat64("/", &buf);
8219  ;
8220  return 0;
8221}
8222_ACEOF
8223if ac_fn_c_try_compile "$LINENO"; then :
8224  tcl_cv_flag__largefile64_source=no
8225else
8226  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8227/* end confdefs.h.  */
8228#define _LARGEFILE64_SOURCE 1
8229#include <sys/stat.h>
8230int
8231main ()
8232{
8233struct stat64 buf; int i = stat64("/", &buf);
8234  ;
8235  return 0;
8236}
8237_ACEOF
8238if ac_fn_c_try_compile "$LINENO"; then :
8239  tcl_cv_flag__largefile64_source=yes
8240else
8241  tcl_cv_flag__largefile64_source=no
8242fi
8243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8244fi
8245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8246fi
8247
8248    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
8249
8250$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
8251
8252	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
8253    fi
8254
8255
8256    if ${tcl_cv_flag__largefile_source64+:} false; then :
8257  $as_echo_n "(cached) " >&6
8258else
8259  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8260/* end confdefs.h.  */
8261#include <sys/stat.h>
8262int
8263main ()
8264{
8265char *p = (char *)open64;
8266  ;
8267  return 0;
8268}
8269_ACEOF
8270if ac_fn_c_try_compile "$LINENO"; then :
8271  tcl_cv_flag__largefile_source64=no
8272else
8273  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8274/* end confdefs.h.  */
8275#define _LARGEFILE_SOURCE64 1
8276#include <sys/stat.h>
8277int
8278main ()
8279{
8280char *p = (char *)open64;
8281  ;
8282  return 0;
8283}
8284_ACEOF
8285if ac_fn_c_try_compile "$LINENO"; then :
8286  tcl_cv_flag__largefile_source64=yes
8287else
8288  tcl_cv_flag__largefile_source64=no
8289fi
8290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8291fi
8292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8293fi
8294
8295    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
8296
8297$as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h
8298
8299	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
8300    fi
8301
8302    if test "x${tcl_flags}" = "x" ; then
8303	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
8304$as_echo "none" >&6; }
8305    else
8306	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5
8307$as_echo "${tcl_flags}" >&6; }
8308    fi
8309
8310
8311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5
8312$as_echo_n "checking for 64-bit integer type... " >&6; }
8313    if ${tcl_cv_type_64bit+:} false; then :
8314  $as_echo_n "(cached) " >&6
8315else
8316
8317	tcl_cv_type_64bit=none
8318	# See if the compiler knows natively about __int64
8319	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8320/* end confdefs.h.  */
8321
8322int
8323main ()
8324{
8325__int64 value = (__int64) 0;
8326  ;
8327  return 0;
8328}
8329_ACEOF
8330if ac_fn_c_try_compile "$LINENO"; then :
8331  tcl_type_64bit=__int64
8332else
8333  tcl_type_64bit="long long"
8334fi
8335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8336	# See if we could use long anyway  Note that we substitute in the
8337	# type that is our current guess for a 64-bit type inside this check
8338	# program, so it should be modified only carefully...
8339        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8340/* end confdefs.h.  */
8341
8342int
8343main ()
8344{
8345switch (0) {
8346            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
8347        }
8348  ;
8349  return 0;
8350}
8351_ACEOF
8352if ac_fn_c_try_compile "$LINENO"; then :
8353  tcl_cv_type_64bit=${tcl_type_64bit}
8354fi
8355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8356fi
8357
8358    if test "${tcl_cv_type_64bit}" = none ; then
8359
8360$as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h
8361
8362	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8363$as_echo "yes" >&6; }
8364    elif test "${tcl_cv_type_64bit}" = "__int64" \
8365		-a "${TEA_PLATFORM}" = "windows" ; then
8366	# TEA specific: We actually want to use the default tcl.h checks in
8367	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
8368	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using Tcl header defaults" >&5
8369$as_echo "using Tcl header defaults" >&6; }
8370    else
8371
8372cat >>confdefs.h <<_ACEOF
8373#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
8374_ACEOF
8375
8376	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5
8377$as_echo "${tcl_cv_type_64bit}" >&6; }
8378
8379	# Now check for auxiliary declarations
8380	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5
8381$as_echo_n "checking for struct dirent64... " >&6; }
8382if ${tcl_cv_struct_dirent64+:} false; then :
8383  $as_echo_n "(cached) " >&6
8384else
8385
8386	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8387/* end confdefs.h.  */
8388#include <sys/types.h>
8389#include <dirent.h>
8390int
8391main ()
8392{
8393struct dirent64 p;
8394  ;
8395  return 0;
8396}
8397_ACEOF
8398if ac_fn_c_try_compile "$LINENO"; then :
8399  tcl_cv_struct_dirent64=yes
8400else
8401  tcl_cv_struct_dirent64=no
8402fi
8403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8404fi
8405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5
8406$as_echo "$tcl_cv_struct_dirent64" >&6; }
8407	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
8408
8409$as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h
8410
8411	fi
8412
8413	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIR64" >&5
8414$as_echo_n "checking for DIR64... " >&6; }
8415if ${tcl_cv_DIR64+:} false; then :
8416  $as_echo_n "(cached) " >&6
8417else
8418
8419	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8420/* end confdefs.h.  */
8421#include <sys/types.h>
8422#include <dirent.h>
8423int
8424main ()
8425{
8426struct dirent64 *p; DIR64 d = opendir64(".");
8427            p = readdir64(d); rewinddir64(d); closedir64(d);
8428  ;
8429  return 0;
8430}
8431_ACEOF
8432if ac_fn_c_try_compile "$LINENO"; then :
8433  tcl_cv_DIR64=yes
8434else
8435  tcl_cv_DIR64=no
8436fi
8437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8438fi
8439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_DIR64" >&5
8440$as_echo "$tcl_cv_DIR64" >&6; }
8441	if test "x${tcl_cv_DIR64}" = "xyes" ; then
8442
8443$as_echo "#define HAVE_DIR64 1" >>confdefs.h
8444
8445	fi
8446
8447	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5
8448$as_echo_n "checking for struct stat64... " >&6; }
8449if ${tcl_cv_struct_stat64+:} false; then :
8450  $as_echo_n "(cached) " >&6
8451else
8452
8453	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8454/* end confdefs.h.  */
8455#include <sys/stat.h>
8456int
8457main ()
8458{
8459struct stat64 p;
8460
8461  ;
8462  return 0;
8463}
8464_ACEOF
8465if ac_fn_c_try_compile "$LINENO"; then :
8466  tcl_cv_struct_stat64=yes
8467else
8468  tcl_cv_struct_stat64=no
8469fi
8470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8471fi
8472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5
8473$as_echo "$tcl_cv_struct_stat64" >&6; }
8474	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
8475
8476$as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h
8477
8478	fi
8479
8480	for ac_func in open64 lseek64
8481do :
8482  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8483ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8484if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8485  cat >>confdefs.h <<_ACEOF
8486#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8487_ACEOF
8488
8489fi
8490done
8491
8492	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5
8493$as_echo_n "checking for off64_t... " >&6; }
8494	if ${tcl_cv_type_off64_t+:} false; then :
8495  $as_echo_n "(cached) " >&6
8496else
8497
8498	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8499/* end confdefs.h.  */
8500#include <sys/types.h>
8501int
8502main ()
8503{
8504off64_t offset;
8505
8506  ;
8507  return 0;
8508}
8509_ACEOF
8510if ac_fn_c_try_compile "$LINENO"; then :
8511  tcl_cv_type_off64_t=yes
8512else
8513  tcl_cv_type_off64_t=no
8514fi
8515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8516fi
8517
8518			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
8519	        test "x${ac_cv_func_lseek64}" = "xyes" && \
8520	        test "x${ac_cv_func_open64}" = "xyes" ; then
8521
8522$as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h
8523
8524	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8525$as_echo "yes" >&6; }
8526	else
8527	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8528$as_echo "no" >&6; }
8529	fi
8530    fi
8531
8532
8533
8534#--------------------------------------------------------------------
8535# Set the default compiler switches based on the --enable-symbols option.
8536#--------------------------------------------------------------------
8537
8538
8539
8540    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5
8541$as_echo_n "checking for build with symbols... " >&6; }
8542    # Check whether --enable-symbols was given.
8543if test "${enable_symbols+set}" = set; then :
8544  enableval=$enable_symbols; tcl_ok=$enableval
8545else
8546  tcl_ok=no
8547fi
8548
8549    if test "$tcl_ok" = "no"; then
8550	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
8551	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
8552	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8553$as_echo "no" >&6; }
8554    else
8555	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
8556	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
8557	if test "$tcl_ok" = "yes"; then
8558	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5
8559$as_echo "yes (standard debugging)" >&6; }
8560	fi
8561    fi
8562
8563
8564
8565    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
8566
8567$as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h
8568
8569    fi
8570
8571    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
8572	if test "$tcl_ok" = "all"; then
8573	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem debugging" >&5
8574$as_echo "enabled symbols mem debugging" >&6; }
8575	else
8576	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5
8577$as_echo "enabled $tcl_ok debugging" >&6; }
8578	fi
8579    fi
8580
8581
8582#--------------------------------------------------------------------
8583# For Unix/Tk builds, make sure that the X libraries/headers are found.
8584# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
8585#--------------------------------------------------------------------
8586
8587
8588    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
8589
8590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
8591$as_echo_n "checking for X... " >&6; }
8592
8593
8594# Check whether --with-x was given.
8595if test "${with_x+set}" = set; then :
8596  withval=$with_x;
8597fi
8598
8599# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8600if test "x$with_x" = xno; then
8601  # The user explicitly disabled X.
8602  have_x=disabled
8603else
8604  case $x_includes,$x_libraries in #(
8605    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
8606    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
8607  $as_echo_n "(cached) " >&6
8608else
8609  # One or both of the vars are not set, and there is no cached value.
8610ac_x_includes=no ac_x_libraries=no
8611rm -f -r conftest.dir
8612if mkdir conftest.dir; then
8613  cd conftest.dir
8614  cat >Imakefile <<'_ACEOF'
8615incroot:
8616	@echo incroot='${INCROOT}'
8617usrlibdir:
8618	@echo usrlibdir='${USRLIBDIR}'
8619libdir:
8620	@echo libdir='${LIBDIR}'
8621_ACEOF
8622  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
8623    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
8624    for ac_var in incroot usrlibdir libdir; do
8625      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8626    done
8627    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8628    for ac_extension in a so sl dylib la dll; do
8629      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8630	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
8631	ac_im_usrlibdir=$ac_im_libdir; break
8632      fi
8633    done
8634    # Screen out bogus values from the imake configuration.  They are
8635    # bogus both because they are the default anyway, and because
8636    # using them would break gcc on systems where it needs fixed includes.
8637    case $ac_im_incroot in
8638	/usr/include) ac_x_includes= ;;
8639	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8640    esac
8641    case $ac_im_usrlibdir in
8642	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
8643	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8644    esac
8645  fi
8646  cd ..
8647  rm -f -r conftest.dir
8648fi
8649
8650# Standard set of common directories for X headers.
8651# Check X11 before X11Rn because it is often a symlink to the current release.
8652ac_x_header_dirs='
8653/usr/X11/include
8654/usr/X11R7/include
8655/usr/X11R6/include
8656/usr/X11R5/include
8657/usr/X11R4/include
8658
8659/usr/include/X11
8660/usr/include/X11R7
8661/usr/include/X11R6
8662/usr/include/X11R5
8663/usr/include/X11R4
8664
8665/usr/local/X11/include
8666/usr/local/X11R7/include
8667/usr/local/X11R6/include
8668/usr/local/X11R5/include
8669/usr/local/X11R4/include
8670
8671/usr/local/include/X11
8672/usr/local/include/X11R7
8673/usr/local/include/X11R6
8674/usr/local/include/X11R5
8675/usr/local/include/X11R4
8676
8677/usr/X386/include
8678/usr/x386/include
8679/usr/XFree86/include/X11
8680
8681/usr/include
8682/usr/local/include
8683/usr/unsupported/include
8684/usr/athena/include
8685/usr/local/x11r5/include
8686/usr/lpp/Xamples/include
8687
8688/usr/openwin/include
8689/usr/openwin/share/include'
8690
8691if test "$ac_x_includes" = no; then
8692  # Guess where to find include files, by looking for Xlib.h.
8693  # First, try using that file with no special directory specified.
8694  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8695/* end confdefs.h.  */
8696#include <X11/Xlib.h>
8697_ACEOF
8698if ac_fn_c_try_cpp "$LINENO"; then :
8699  # We can compile using X headers with no special include directory.
8700ac_x_includes=
8701else
8702  for ac_dir in $ac_x_header_dirs; do
8703  if test -r "$ac_dir/X11/Xlib.h"; then
8704    ac_x_includes=$ac_dir
8705    break
8706  fi
8707done
8708fi
8709rm -f conftest.err conftest.i conftest.$ac_ext
8710fi # $ac_x_includes = no
8711
8712if test "$ac_x_libraries" = no; then
8713  # Check for the libraries.
8714  # See if we find them without any special options.
8715  # Don't add to $LIBS permanently.
8716  ac_save_LIBS=$LIBS
8717  LIBS="-lX11 $LIBS"
8718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8719/* end confdefs.h.  */
8720#include <X11/Xlib.h>
8721int
8722main ()
8723{
8724XrmInitialize ()
8725  ;
8726  return 0;
8727}
8728_ACEOF
8729if ac_fn_c_try_link "$LINENO"; then :
8730  LIBS=$ac_save_LIBS
8731# We can link X programs with no special library path.
8732ac_x_libraries=
8733else
8734  LIBS=$ac_save_LIBS
8735for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8736do
8737  # Don't even attempt the hair of trying to link an X program!
8738  for ac_extension in a so sl dylib la dll; do
8739    if test -r "$ac_dir/libX11.$ac_extension"; then
8740      ac_x_libraries=$ac_dir
8741      break 2
8742    fi
8743  done
8744done
8745fi
8746rm -f core conftest.err conftest.$ac_objext \
8747    conftest$ac_exeext conftest.$ac_ext
8748fi # $ac_x_libraries = no
8749
8750case $ac_x_includes,$ac_x_libraries in #(
8751  no,* | *,no | *\'*)
8752    # Didn't find X, or a directory has "'" in its name.
8753    ac_cv_have_x="have_x=no";; #(
8754  *)
8755    # Record where we found X for the cache.
8756    ac_cv_have_x="have_x=yes\
8757	ac_x_includes='$ac_x_includes'\
8758	ac_x_libraries='$ac_x_libraries'"
8759esac
8760fi
8761;; #(
8762    *) have_x=yes;;
8763  esac
8764  eval "$ac_cv_have_x"
8765fi # $with_x != no
8766
8767if test "$have_x" != yes; then
8768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
8769$as_echo "$have_x" >&6; }
8770  no_x=yes
8771else
8772  # If each of the values was on the command line, it overrides each guess.
8773  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8774  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8775  # Update the cache value to reflect the command line values.
8776  ac_cv_have_x="have_x=yes\
8777	ac_x_includes='$x_includes'\
8778	ac_x_libraries='$x_libraries'"
8779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
8780$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
8781fi
8782
8783    not_really_there=""
8784    if test "$no_x" = ""; then
8785	if test "$x_includes" = ""; then
8786	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8787/* end confdefs.h.  */
8788#include <X11/Xlib.h>
8789_ACEOF
8790if ac_fn_c_try_cpp "$LINENO"; then :
8791
8792else
8793  not_really_there="yes"
8794fi
8795rm -f conftest.err conftest.i conftest.$ac_ext
8796	else
8797	    if test ! -r $x_includes/X11/Xlib.h; then
8798		not_really_there="yes"
8799	    fi
8800	fi
8801    fi
8802    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
8803	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 header files" >&5
8804$as_echo_n "checking for X11 header files... " >&6; }
8805	found_xincludes="no"
8806	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8807/* end confdefs.h.  */
8808#include <X11/Xlib.h>
8809_ACEOF
8810if ac_fn_c_try_cpp "$LINENO"; then :
8811  found_xincludes="yes"
8812else
8813  found_xincludes="no"
8814fi
8815rm -f conftest.err conftest.i conftest.$ac_ext
8816	if test "$found_xincludes" = "no"; then
8817	    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"
8818	    for i in $dirs ; do
8819		if test -r $i/X11/Xlib.h; then
8820		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i" >&5
8821$as_echo "$i" >&6; }
8822		    XINCLUDES=" -I$i"
8823		    found_xincludes="yes"
8824		    break
8825		fi
8826	    done
8827	fi
8828    else
8829	if test "$x_includes" != ""; then
8830	    XINCLUDES="-I$x_includes"
8831	    found_xincludes="yes"
8832	fi
8833    fi
8834    if test "$found_xincludes" = "no"; then
8835	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: couldn't find any!" >&5
8836$as_echo "couldn't find any!" >&6; }
8837    fi
8838
8839    if test "$no_x" = yes; then
8840	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 libraries" >&5
8841$as_echo_n "checking for X11 libraries... " >&6; }
8842	XLIBSW=nope
8843	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"
8844	for i in $dirs ; do
8845	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then
8846		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i" >&5
8847$as_echo "$i" >&6; }
8848		XLIBSW="-L$i -lX11"
8849		x_libraries="$i"
8850		break
8851	    fi
8852	done
8853    else
8854	if test "$x_libraries" = ""; then
8855	    XLIBSW=-lX11
8856	else
8857	    XLIBSW="-L$x_libraries -lX11"
8858	fi
8859    fi
8860    if test "$XLIBSW" = nope ; then
8861	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCreateWindow in -lXwindow" >&5
8862$as_echo_n "checking for XCreateWindow in -lXwindow... " >&6; }
8863if ${ac_cv_lib_Xwindow_XCreateWindow+:} false; then :
8864  $as_echo_n "(cached) " >&6
8865else
8866  ac_check_lib_save_LIBS=$LIBS
8867LIBS="-lXwindow  $LIBS"
8868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8869/* end confdefs.h.  */
8870
8871/* Override any GCC internal prototype to avoid an error.
8872   Use char because int might match the return type of a GCC
8873   builtin and then its argument prototype would still apply.  */
8874#ifdef __cplusplus
8875extern "C"
8876#endif
8877char XCreateWindow ();
8878int
8879main ()
8880{
8881return XCreateWindow ();
8882  ;
8883  return 0;
8884}
8885_ACEOF
8886if ac_fn_c_try_link "$LINENO"; then :
8887  ac_cv_lib_Xwindow_XCreateWindow=yes
8888else
8889  ac_cv_lib_Xwindow_XCreateWindow=no
8890fi
8891rm -f core conftest.err conftest.$ac_objext \
8892    conftest$ac_exeext conftest.$ac_ext
8893LIBS=$ac_check_lib_save_LIBS
8894fi
8895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xwindow_XCreateWindow" >&5
8896$as_echo "$ac_cv_lib_Xwindow_XCreateWindow" >&6; }
8897if test "x$ac_cv_lib_Xwindow_XCreateWindow" = xyes; then :
8898  XLIBSW=-lXwindow
8899fi
8900
8901    fi
8902    if test "$XLIBSW" = nope ; then
8903	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find any!  Using -lX11." >&5
8904$as_echo "could not find any!  Using -lX11." >&6; }
8905	XLIBSW=-lX11
8906    fi
8907    # TEA specific:
8908    if test x"${XLIBSW}" != x ; then
8909	PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
8910    fi
8911
8912    fi
8913
8914
8915#--------------------------------------------------------------------
8916# Everyone should be linking against the Tcl stub library.  If you
8917# can't for some reason, remove this definition.  If you aren't using
8918# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
8919# link against the non-stubbed Tcl library.
8920#--------------------------------------------------------------------
8921
8922$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h
8923
8924$as_echo "#define USE_TK_STUBS 1" >>confdefs.h
8925
8926
8927#--------------------------------------------------------------------
8928# This macro generates a line to use when building a library.  It
8929# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
8930# and TEA_LOAD_TCLCONFIG macros above.
8931#--------------------------------------------------------------------
8932
8933
8934    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
8935	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
8936	MAKE_SHARED_LIB="\${SHLIB_LD} \${LDFLAGS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
8937	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8938/* end confdefs.h.  */
8939
8940#if defined(_MSC_VER) && _MSC_VER >= 1400
8941print("manifest needed")
8942#endif
8943
8944_ACEOF
8945if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8946  $EGREP "manifest needed" >/dev/null 2>&1; then :
8947
8948	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
8949	VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi"
8950	VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1 ; fi"
8951	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
8952
8953    CLEANFILES="$CLEANFILES *.manifest"
8954
8955
8956fi
8957rm -f conftest*
8958
8959	MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\$@ \$(PKG_STUB_OBJECTS)"
8960    else
8961	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
8962	MAKE_SHARED_LIB="\${SHLIB_LD} \${LDFLAGS} \${LDFLAGS_DEFAULT} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
8963	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
8964    fi
8965
8966    if test "${SHARED_BUILD}" = "1" ; then
8967	MAKE_LIB="${MAKE_SHARED_LIB} "
8968    else
8969	MAKE_LIB="${MAKE_STATIC_LIB} "
8970    fi
8971
8972    #--------------------------------------------------------------------
8973    # Shared libraries and static libraries have different names.
8974    # Use the double eval to make sure any variables in the suffix is
8975    # substituted. (@@@ Might not be necessary anymore)
8976    #--------------------------------------------------------------------
8977
8978    if test "${TEA_PLATFORM}" = "windows" ; then
8979	if test "${SHARED_BUILD}" = "1" ; then
8980	    # We force the unresolved linking of symbols that are really in
8981	    # the private libraries of Tcl and Tk.
8982	    if test x"${TK_BIN_DIR}" != x ; then
8983		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
8984	    fi
8985	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
8986	    if test "$GCC" = "yes"; then
8987		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
8988	    fi
8989	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
8990	else
8991	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
8992	    if test "$GCC" = "yes"; then
8993		PKG_LIB_FILE=lib${PKG_LIB_FILE}
8994	    fi
8995	fi
8996	# Some packages build their own stubs libraries
8997	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
8998	if test "$GCC" = "yes"; then
8999	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
9000	fi
9001	# These aren't needed on Windows (either MSVC or gcc)
9002	RANLIB=:
9003	RANLIB_STUB=:
9004    else
9005	RANLIB_STUB="${RANLIB}"
9006	if test "${SHARED_BUILD}" = "1" ; then
9007	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
9008	    if test x"${TK_BIN_DIR}" != x ; then
9009		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
9010	    fi
9011	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
9012	    RANLIB=:
9013	else
9014	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
9015	fi
9016	# Some packages build their own stubs libraries
9017	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
9018    fi
9019
9020    # These are escaped so that only CFLAGS is picked up at configure time.
9021    # The other values will be substituted at make time.
9022    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
9023    if test "${SHARED_BUILD}" = "1" ; then
9024	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
9025    fi
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036#--------------------------------------------------------------------
9037# __CHANGE__
9038# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
9039#--------------------------------------------------------------------
9040
9041if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
9042
9043    vars="\"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
9044    for i in $vars; do
9045	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
9046	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
9047	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
9048	fi
9049	PKG_LIBS="$PKG_LIBS $i"
9050    done
9051
9052
9053else
9054
9055    vars="${tkimg_STUB_LIB_SPEC}"
9056    for i in $vars; do
9057	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
9058	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
9059	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
9060	fi
9061	PKG_LIBS="$PKG_LIBS $i"
9062    done
9063
9064
9065fi
9066
9067#--------------------------------------------------------------------
9068# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
9069# file during the install process.  Don't run the TCLSH_PROG through
9070# ${CYGPATH} because it's being used directly by make.
9071# Require that we use a tclsh shell version 8.2 or later since earlier
9072# versions have bugs in the pkg_mkIndex routine.
9073# Add WISH as well if this is a Tk extension.
9074#--------------------------------------------------------------------
9075
9076
9077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5
9078$as_echo_n "checking for tclsh... " >&6; }
9079    if test -f "${TCL_BIN_DIR}/Makefile" ; then
9080        # tclConfig.sh is in Tcl build directory
9081        if test "${TEA_PLATFORM}" = "windows"; then
9082          if test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}" ; then
9083            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}"
9084          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}" ; then
9085            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}"
9086          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}" ; then
9087            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}"
9088          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}" ; then
9089            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}"
9090          fi
9091        else
9092            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
9093        fi
9094    else
9095        # tclConfig.sh is in install location
9096        if test "${TEA_PLATFORM}" = "windows"; then
9097            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}"
9098        else
9099            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}"
9100        fi
9101        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
9102              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
9103              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
9104        for i in $list ; do
9105            if test -f "$i/${TCLSH_PROG}" ; then
9106                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
9107                break
9108            fi
9109        done
9110        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
9111    fi
9112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${TCLSH_PROG}" >&5
9113$as_echo "${TCLSH_PROG}" >&6; }
9114
9115
9116
9117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wish" >&5
9118$as_echo_n "checking for wish... " >&6; }
9119    if test -f "${TK_BIN_DIR}/Makefile" ; then
9120        # tkConfig.sh is in Tk build directory
9121        if test "${TEA_PLATFORM}" = "windows"; then
9122          if test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}" ; then
9123            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}"
9124          elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}s${EXEEXT}" ; then
9125            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}$s{EXEEXT}"
9126          elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}t${EXEEXT}" ; then
9127            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}t${EXEEXT}"
9128          elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}st${EXEEXT}" ; then
9129            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}st${EXEEXT}"
9130          fi
9131        else
9132            WISH_PROG="${TK_BIN_DIR}/wish"
9133        fi
9134    else
9135        # tkConfig.sh is in install location
9136        if test "${TEA_PLATFORM}" = "windows"; then
9137            WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}"
9138        else
9139            WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}"
9140        fi
9141        list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
9142              `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
9143              `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
9144        for i in $list ; do
9145            if test -f "$i/${WISH_PROG}" ; then
9146                REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
9147                break
9148            fi
9149        done
9150        WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
9151    fi
9152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WISH_PROG}" >&5
9153$as_echo "${WISH_PROG}" >&6; }
9154
9155
9156
9157#--------------------------------------------------------------------
9158# Finally, substitute all of the various values into the Makefile.
9159# You may alternatively have a special pkgIndex.tcl.in or other files
9160# which require substituting th AC variables in.  Include these here.
9161#--------------------------------------------------------------------
9162
9163ac_config_files="$ac_config_files Makefile"
9164
9165cat >confcache <<\_ACEOF
9166# This file is a shell script that caches the results of configure
9167# tests run on this system so they can be shared between configure
9168# scripts and configure runs, see configure's option --config-cache.
9169# It is not useful on other systems.  If it contains results you don't
9170# want to keep, you may remove or edit it.
9171#
9172# config.status only pays attention to the cache file if you give it
9173# the --recheck option to rerun configure.
9174#
9175# `ac_cv_env_foo' variables (set or unset) will be overridden when
9176# loading this file, other *unset* `ac_cv_foo' will be assigned the
9177# following values.
9178
9179_ACEOF
9180
9181# The following way of writing the cache mishandles newlines in values,
9182# but we know of no workaround that is simple, portable, and efficient.
9183# So, we kill variables containing newlines.
9184# Ultrix sh set writes to stderr and can't be redirected directly,
9185# and sets the high bit in the cache file unless we assign to the vars.
9186(
9187  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
9188    eval ac_val=\$$ac_var
9189    case $ac_val in #(
9190    *${as_nl}*)
9191      case $ac_var in #(
9192      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
9193$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
9194      esac
9195      case $ac_var in #(
9196      _ | IFS | as_nl) ;; #(
9197      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
9198      *) { eval $ac_var=; unset $ac_var;} ;;
9199      esac ;;
9200    esac
9201  done
9202
9203  (set) 2>&1 |
9204    case $as_nl`(ac_space=' '; set) 2>&1` in #(
9205    *${as_nl}ac_space=\ *)
9206      # `set' does not quote correctly, so add quotes: double-quote
9207      # substitution turns \\\\ into \\, and sed turns \\ into \.
9208      sed -n \
9209	"s/'/'\\\\''/g;
9210	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
9211      ;; #(
9212    *)
9213      # `set' quotes correctly as required by POSIX, so do not add quotes.
9214      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
9215      ;;
9216    esac |
9217    sort
9218) |
9219  sed '
9220     /^ac_cv_env_/b end
9221     t clear
9222     :clear
9223     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
9224     t end
9225     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
9226     :end' >>confcache
9227if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
9228  if test -w "$cache_file"; then
9229    if test "x$cache_file" != "x/dev/null"; then
9230      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
9231$as_echo "$as_me: updating cache $cache_file" >&6;}
9232      if test ! -f "$cache_file" || test -h "$cache_file"; then
9233	cat confcache >"$cache_file"
9234      else
9235        case $cache_file in #(
9236        */* | ?:*)
9237	  mv -f confcache "$cache_file"$$ &&
9238	  mv -f "$cache_file"$$ "$cache_file" ;; #(
9239        *)
9240	  mv -f confcache "$cache_file" ;;
9241	esac
9242      fi
9243    fi
9244  else
9245    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
9246$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
9247  fi
9248fi
9249rm -f confcache
9250
9251test "x$prefix" = xNONE && prefix=$ac_default_prefix
9252# Let make expand exec_prefix.
9253test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9254
9255# Transform confdefs.h into DEFS.
9256# Protect against shell expansion while executing Makefile rules.
9257# Protect against Makefile macro expansion.
9258#
9259# If the first sed substitution is executed (which looks for macros that
9260# take arguments), then branch to the quote section.  Otherwise,
9261# look for a macro that doesn't take arguments.
9262ac_script='
9263:mline
9264/\\$/{
9265 N
9266 s,\\\n,,
9267 b mline
9268}
9269t clear
9270:clear
9271s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
9272t quote
9273s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
9274t quote
9275b any
9276:quote
9277s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
9278s/\[/\\&/g
9279s/\]/\\&/g
9280s/\$/$$/g
9281H
9282:any
9283${
9284	g
9285	s/^\n//
9286	s/\n/ /g
9287	p
9288}
9289'
9290DEFS=`sed -n "$ac_script" confdefs.h`
9291
9292
9293ac_libobjs=
9294ac_ltlibobjs=
9295U=
9296for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
9297  # 1. Remove the extension, and $U if already installed.
9298  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
9299  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
9300  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
9301  #    will be set to the directory where LIBOBJS objects are built.
9302  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
9303  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
9304done
9305LIBOBJS=$ac_libobjs
9306
9307LTLIBOBJS=$ac_ltlibobjs
9308
9309
9310
9311CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
9312
9313: "${CONFIG_STATUS=./config.status}"
9314ac_write_fail=0
9315ac_clean_files_save=$ac_clean_files
9316ac_clean_files="$ac_clean_files $CONFIG_STATUS"
9317{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
9318$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
9319as_write_fail=0
9320cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
9321#! $SHELL
9322# Generated by $as_me.
9323# Run this file to recreate the current configuration.
9324# Compiler output produced by configure, useful for debugging
9325# configure, is in config.log if it exists.
9326
9327debug=false
9328ac_cs_recheck=false
9329ac_cs_silent=false
9330
9331SHELL=\${CONFIG_SHELL-$SHELL}
9332export SHELL
9333_ASEOF
9334cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
9335## -------------------- ##
9336## M4sh Initialization. ##
9337## -------------------- ##
9338
9339# Be more Bourne compatible
9340DUALCASE=1; export DUALCASE # for MKS sh
9341if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
9342  emulate sh
9343  NULLCMD=:
9344  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
9345  # is contrary to our usage.  Disable this feature.
9346  alias -g '${1+"$@"}'='"$@"'
9347  setopt NO_GLOB_SUBST
9348else
9349  case `(set -o) 2>/dev/null` in #(
9350  *posix*) :
9351    set -o posix ;; #(
9352  *) :
9353     ;;
9354esac
9355fi
9356
9357
9358as_nl='
9359'
9360export as_nl
9361# Printing a long string crashes Solaris 7 /usr/bin/printf.
9362as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
9363as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
9364as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
9365# Prefer a ksh shell builtin over an external printf program on Solaris,
9366# but without wasting forks for bash or zsh.
9367if test -z "$BASH_VERSION$ZSH_VERSION" \
9368    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
9369  as_echo='print -r --'
9370  as_echo_n='print -rn --'
9371elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
9372  as_echo='printf %s\n'
9373  as_echo_n='printf %s'
9374else
9375  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
9376    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
9377    as_echo_n='/usr/ucb/echo -n'
9378  else
9379    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
9380    as_echo_n_body='eval
9381      arg=$1;
9382      case $arg in #(
9383      *"$as_nl"*)
9384	expr "X$arg" : "X\\(.*\\)$as_nl";
9385	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
9386      esac;
9387      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
9388    '
9389    export as_echo_n_body
9390    as_echo_n='sh -c $as_echo_n_body as_echo'
9391  fi
9392  export as_echo_body
9393  as_echo='sh -c $as_echo_body as_echo'
9394fi
9395
9396# The user is always right.
9397if test "${PATH_SEPARATOR+set}" != set; then
9398  PATH_SEPARATOR=:
9399  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
9400    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
9401      PATH_SEPARATOR=';'
9402  }
9403fi
9404
9405
9406# IFS
9407# We need space, tab and new line, in precisely that order.  Quoting is
9408# there to prevent editors from complaining about space-tab.
9409# (If _AS_PATH_WALK were called with IFS unset, it would disable word
9410# splitting by setting IFS to empty value.)
9411IFS=" ""	$as_nl"
9412
9413# Find who we are.  Look in the path if we contain no directory separator.
9414as_myself=
9415case $0 in #((
9416  *[\\/]* ) as_myself=$0 ;;
9417  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9418for as_dir in $PATH
9419do
9420  IFS=$as_save_IFS
9421  test -z "$as_dir" && as_dir=.
9422    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
9423  done
9424IFS=$as_save_IFS
9425
9426     ;;
9427esac
9428# We did not find ourselves, most probably we were run as `sh COMMAND'
9429# in which case we are not to be found in the path.
9430if test "x$as_myself" = x; then
9431  as_myself=$0
9432fi
9433if test ! -f "$as_myself"; then
9434  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
9435  exit 1
9436fi
9437
9438# Unset variables that we do not need and which cause bugs (e.g. in
9439# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
9440# suppresses any "Segmentation fault" message there.  '((' could
9441# trigger a bug in pdksh 5.2.14.
9442for as_var in BASH_ENV ENV MAIL MAILPATH
9443do eval test x\${$as_var+set} = xset \
9444  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
9445done
9446PS1='$ '
9447PS2='> '
9448PS4='+ '
9449
9450# NLS nuisances.
9451LC_ALL=C
9452export LC_ALL
9453LANGUAGE=C
9454export LANGUAGE
9455
9456# CDPATH.
9457(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
9458
9459
9460# as_fn_error STATUS ERROR [LINENO LOG_FD]
9461# ----------------------------------------
9462# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
9463# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
9464# script with STATUS, using 1 if that was 0.
9465as_fn_error ()
9466{
9467  as_status=$1; test $as_status -eq 0 && as_status=1
9468  if test "$4"; then
9469    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
9470    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
9471  fi
9472  $as_echo "$as_me: error: $2" >&2
9473  as_fn_exit $as_status
9474} # as_fn_error
9475
9476
9477# as_fn_set_status STATUS
9478# -----------------------
9479# Set $? to STATUS, without forking.
9480as_fn_set_status ()
9481{
9482  return $1
9483} # as_fn_set_status
9484
9485# as_fn_exit STATUS
9486# -----------------
9487# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
9488as_fn_exit ()
9489{
9490  set +e
9491  as_fn_set_status $1
9492  exit $1
9493} # as_fn_exit
9494
9495# as_fn_unset VAR
9496# ---------------
9497# Portably unset VAR.
9498as_fn_unset ()
9499{
9500  { eval $1=; unset $1;}
9501}
9502as_unset=as_fn_unset
9503# as_fn_append VAR VALUE
9504# ----------------------
9505# Append the text in VALUE to the end of the definition contained in VAR. Take
9506# advantage of any shell optimizations that allow amortized linear growth over
9507# repeated appends, instead of the typical quadratic growth present in naive
9508# implementations.
9509if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
9510  eval 'as_fn_append ()
9511  {
9512    eval $1+=\$2
9513  }'
9514else
9515  as_fn_append ()
9516  {
9517    eval $1=\$$1\$2
9518  }
9519fi # as_fn_append
9520
9521# as_fn_arith ARG...
9522# ------------------
9523# Perform arithmetic evaluation on the ARGs, and store the result in the
9524# global $as_val. Take advantage of shells that can avoid forks. The arguments
9525# must be portable across $(()) and expr.
9526if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
9527  eval 'as_fn_arith ()
9528  {
9529    as_val=$(( $* ))
9530  }'
9531else
9532  as_fn_arith ()
9533  {
9534    as_val=`expr "$@" || test $? -eq 1`
9535  }
9536fi # as_fn_arith
9537
9538
9539if expr a : '\(a\)' >/dev/null 2>&1 &&
9540   test "X`expr 00001 : '.*\(...\)'`" = X001; then
9541  as_expr=expr
9542else
9543  as_expr=false
9544fi
9545
9546if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
9547  as_basename=basename
9548else
9549  as_basename=false
9550fi
9551
9552if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
9553  as_dirname=dirname
9554else
9555  as_dirname=false
9556fi
9557
9558as_me=`$as_basename -- "$0" ||
9559$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
9560	 X"$0" : 'X\(//\)$' \| \
9561	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
9562$as_echo X/"$0" |
9563    sed '/^.*\/\([^/][^/]*\)\/*$/{
9564	    s//\1/
9565	    q
9566	  }
9567	  /^X\/\(\/\/\)$/{
9568	    s//\1/
9569	    q
9570	  }
9571	  /^X\/\(\/\).*/{
9572	    s//\1/
9573	    q
9574	  }
9575	  s/.*/./; q'`
9576
9577# Avoid depending upon Character Ranges.
9578as_cr_letters='abcdefghijklmnopqrstuvwxyz'
9579as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
9580as_cr_Letters=$as_cr_letters$as_cr_LETTERS
9581as_cr_digits='0123456789'
9582as_cr_alnum=$as_cr_Letters$as_cr_digits
9583
9584ECHO_C= ECHO_N= ECHO_T=
9585case `echo -n x` in #(((((
9586-n*)
9587  case `echo 'xy\c'` in
9588  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
9589  xy)  ECHO_C='\c';;
9590  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
9591       ECHO_T='	';;
9592  esac;;
9593*)
9594  ECHO_N='-n';;
9595esac
9596
9597rm -f conf$$ conf$$.exe conf$$.file
9598if test -d conf$$.dir; then
9599  rm -f conf$$.dir/conf$$.file
9600else
9601  rm -f conf$$.dir
9602  mkdir conf$$.dir 2>/dev/null
9603fi
9604if (echo >conf$$.file) 2>/dev/null; then
9605  if ln -s conf$$.file conf$$ 2>/dev/null; then
9606    as_ln_s='ln -s'
9607    # ... but there are two gotchas:
9608    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
9609    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
9610    # In both cases, we have to default to `cp -pR'.
9611    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
9612      as_ln_s='cp -pR'
9613  elif ln conf$$.file conf$$ 2>/dev/null; then
9614    as_ln_s=ln
9615  else
9616    as_ln_s='cp -pR'
9617  fi
9618else
9619  as_ln_s='cp -pR'
9620fi
9621rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
9622rmdir conf$$.dir 2>/dev/null
9623
9624
9625# as_fn_mkdir_p
9626# -------------
9627# Create "$as_dir" as a directory, including parents if necessary.
9628as_fn_mkdir_p ()
9629{
9630
9631  case $as_dir in #(
9632  -*) as_dir=./$as_dir;;
9633  esac
9634  test -d "$as_dir" || eval $as_mkdir_p || {
9635    as_dirs=
9636    while :; do
9637      case $as_dir in #(
9638      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
9639      *) as_qdir=$as_dir;;
9640      esac
9641      as_dirs="'$as_qdir' $as_dirs"
9642      as_dir=`$as_dirname -- "$as_dir" ||
9643$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9644	 X"$as_dir" : 'X\(//\)[^/]' \| \
9645	 X"$as_dir" : 'X\(//\)$' \| \
9646	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
9647$as_echo X"$as_dir" |
9648    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9649	    s//\1/
9650	    q
9651	  }
9652	  /^X\(\/\/\)[^/].*/{
9653	    s//\1/
9654	    q
9655	  }
9656	  /^X\(\/\/\)$/{
9657	    s//\1/
9658	    q
9659	  }
9660	  /^X\(\/\).*/{
9661	    s//\1/
9662	    q
9663	  }
9664	  s/.*/./; q'`
9665      test -d "$as_dir" && break
9666    done
9667    test -z "$as_dirs" || eval "mkdir $as_dirs"
9668  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
9669
9670
9671} # as_fn_mkdir_p
9672if mkdir -p . 2>/dev/null; then
9673  as_mkdir_p='mkdir -p "$as_dir"'
9674else
9675  test -d ./-p && rmdir ./-p
9676  as_mkdir_p=false
9677fi
9678
9679
9680# as_fn_executable_p FILE
9681# -----------------------
9682# Test if FILE is an executable regular file.
9683as_fn_executable_p ()
9684{
9685  test -f "$1" && test -x "$1"
9686} # as_fn_executable_p
9687as_test_x='test -x'
9688as_executable_p=as_fn_executable_p
9689
9690# Sed expression to map a string onto a valid CPP name.
9691as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
9692
9693# Sed expression to map a string onto a valid variable name.
9694as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
9695
9696
9697exec 6>&1
9698## ----------------------------------- ##
9699## Main body of $CONFIG_STATUS script. ##
9700## ----------------------------------- ##
9701_ASEOF
9702test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
9703
9704cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9705# Save the log message, to keep $0 and so on meaningful, and to
9706# report actual input values of CONFIG_FILES etc. instead of their
9707# values after options handling.
9708ac_log="
9709This file was extended by tkimgps $as_me 1.4.12, which was
9710generated by GNU Autoconf 2.69.  Invocation command line was
9711
9712  CONFIG_FILES    = $CONFIG_FILES
9713  CONFIG_HEADERS  = $CONFIG_HEADERS
9714  CONFIG_LINKS    = $CONFIG_LINKS
9715  CONFIG_COMMANDS = $CONFIG_COMMANDS
9716  $ $0 $@
9717
9718on `(hostname || uname -n) 2>/dev/null | sed 1q`
9719"
9720
9721_ACEOF
9722
9723case $ac_config_files in *"
9724"*) set x $ac_config_files; shift; ac_config_files=$*;;
9725esac
9726
9727
9728
9729cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9730# Files that config.status was made for.
9731config_files="$ac_config_files"
9732
9733_ACEOF
9734
9735cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9736ac_cs_usage="\
9737\`$as_me' instantiates files and other configuration actions
9738from templates according to the current configuration.  Unless the files
9739and actions are specified as TAGs, all are instantiated by default.
9740
9741Usage: $0 [OPTION]... [TAG]...
9742
9743  -h, --help       print this help, then exit
9744  -V, --version    print version number and configuration settings, then exit
9745      --config     print configuration, then exit
9746  -q, --quiet, --silent
9747                   do not print progress messages
9748  -d, --debug      don't remove temporary files
9749      --recheck    update $as_me by reconfiguring in the same conditions
9750      --file=FILE[:TEMPLATE]
9751                   instantiate the configuration file FILE
9752
9753Configuration files:
9754$config_files
9755
9756Report bugs to the package provider."
9757
9758_ACEOF
9759cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9760ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
9761ac_cs_version="\\
9762tkimgps config.status 1.4.12
9763configured by $0, generated by GNU Autoconf 2.69,
9764  with options \\"\$ac_cs_config\\"
9765
9766Copyright (C) 2012 Free Software Foundation, Inc.
9767This config.status script is free software; the Free Software Foundation
9768gives unlimited permission to copy, distribute and modify it."
9769
9770ac_pwd='$ac_pwd'
9771srcdir='$srcdir'
9772test -n "\$AWK" || AWK=awk
9773_ACEOF
9774
9775cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9776# The default lists apply if the user does not specify any file.
9777ac_need_defaults=:
9778while test $# != 0
9779do
9780  case $1 in
9781  --*=?*)
9782    ac_option=`expr "X$1" : 'X\([^=]*\)='`
9783    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
9784    ac_shift=:
9785    ;;
9786  --*=)
9787    ac_option=`expr "X$1" : 'X\([^=]*\)='`
9788    ac_optarg=
9789    ac_shift=:
9790    ;;
9791  *)
9792    ac_option=$1
9793    ac_optarg=$2
9794    ac_shift=shift
9795    ;;
9796  esac
9797
9798  case $ac_option in
9799  # Handling of the options.
9800  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9801    ac_cs_recheck=: ;;
9802  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
9803    $as_echo "$ac_cs_version"; exit ;;
9804  --config | --confi | --conf | --con | --co | --c )
9805    $as_echo "$ac_cs_config"; exit ;;
9806  --debug | --debu | --deb | --de | --d | -d )
9807    debug=: ;;
9808  --file | --fil | --fi | --f )
9809    $ac_shift
9810    case $ac_optarg in
9811    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
9812    '') as_fn_error $? "missing file argument" ;;
9813    esac
9814    as_fn_append CONFIG_FILES " '$ac_optarg'"
9815    ac_need_defaults=false;;
9816  --he | --h |  --help | --hel | -h )
9817    $as_echo "$ac_cs_usage"; exit ;;
9818  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
9819  | -silent | --silent | --silen | --sile | --sil | --si | --s)
9820    ac_cs_silent=: ;;
9821
9822  # This is an error.
9823  -*) as_fn_error $? "unrecognized option: \`$1'
9824Try \`$0 --help' for more information." ;;
9825
9826  *) as_fn_append ac_config_targets " $1"
9827     ac_need_defaults=false ;;
9828
9829  esac
9830  shift
9831done
9832
9833ac_configure_extra_args=
9834
9835if $ac_cs_silent; then
9836  exec 6>/dev/null
9837  ac_configure_extra_args="$ac_configure_extra_args --silent"
9838fi
9839
9840_ACEOF
9841cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9842if \$ac_cs_recheck; then
9843  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
9844  shift
9845  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
9846  CONFIG_SHELL='$SHELL'
9847  export CONFIG_SHELL
9848  exec "\$@"
9849fi
9850
9851_ACEOF
9852cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9853exec 5>>config.log
9854{
9855  echo
9856  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
9857## Running $as_me. ##
9858_ASBOX
9859  $as_echo "$ac_log"
9860} >&5
9861
9862_ACEOF
9863cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9864_ACEOF
9865
9866cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9867
9868# Handling of arguments.
9869for ac_config_target in $ac_config_targets
9870do
9871  case $ac_config_target in
9872    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
9873
9874  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
9875  esac
9876done
9877
9878
9879# If the user did not use the arguments to specify the items to instantiate,
9880# then the envvar interface is used.  Set only those that are not.
9881# We use the long form for the default assignment because of an extremely
9882# bizarre bug on SunOS 4.1.3.
9883if $ac_need_defaults; then
9884  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
9885fi
9886
9887# Have a temporary directory for convenience.  Make it in the build tree
9888# simply because there is no reason against having it here, and in addition,
9889# creating and moving files from /tmp can sometimes cause problems.
9890# Hook for its removal unless debugging.
9891# Note that there is a small window in which the directory will not be cleaned:
9892# after its creation but before its name has been assigned to `$tmp'.
9893$debug ||
9894{
9895  tmp= ac_tmp=
9896  trap 'exit_status=$?
9897  : "${ac_tmp:=$tmp}"
9898  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
9899' 0
9900  trap 'as_fn_exit 1' 1 2 13 15
9901}
9902# Create a (secure) tmp directory for tmp files.
9903
9904{
9905  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
9906  test -d "$tmp"
9907}  ||
9908{
9909  tmp=./conf$$-$RANDOM
9910  (umask 077 && mkdir "$tmp")
9911} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
9912ac_tmp=$tmp
9913
9914# Set up the scripts for CONFIG_FILES section.
9915# No need to generate them if there are no CONFIG_FILES.
9916# This happens for instance with `./config.status config.h'.
9917if test -n "$CONFIG_FILES"; then
9918
9919
9920ac_cr=`echo X | tr X '\015'`
9921# On cygwin, bash can eat \r inside `` if the user requested igncr.
9922# But we know of no other shell where ac_cr would be empty at this
9923# point, so we can use a bashism as a fallback.
9924if test "x$ac_cr" = x; then
9925  eval ac_cr=\$\'\\r\'
9926fi
9927ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
9928if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
9929  ac_cs_awk_cr='\\r'
9930else
9931  ac_cs_awk_cr=$ac_cr
9932fi
9933
9934echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
9935_ACEOF
9936
9937
9938{
9939  echo "cat >conf$$subs.awk <<_ACEOF" &&
9940  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
9941  echo "_ACEOF"
9942} >conf$$subs.sh ||
9943  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9944ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
9945ac_delim='%!_!# '
9946for ac_last_try in false false false false false :; do
9947  . ./conf$$subs.sh ||
9948    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9949
9950  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
9951  if test $ac_delim_n = $ac_delim_num; then
9952    break
9953  elif $ac_last_try; then
9954    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9955  else
9956    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
9957  fi
9958done
9959rm -f conf$$subs.sh
9960
9961cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9962cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
9963_ACEOF
9964sed -n '
9965h
9966s/^/S["/; s/!.*/"]=/
9967p
9968g
9969s/^[^!]*!//
9970:repl
9971t repl
9972s/'"$ac_delim"'$//
9973t delim
9974:nl
9975h
9976s/\(.\{148\}\)..*/\1/
9977t more1
9978s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
9979p
9980n
9981b repl
9982:more1
9983s/["\\]/\\&/g; s/^/"/; s/$/"\\/
9984p
9985g
9986s/.\{148\}//
9987t nl
9988:delim
9989h
9990s/\(.\{148\}\)..*/\1/
9991t more2
9992s/["\\]/\\&/g; s/^/"/; s/$/"/
9993p
9994b
9995:more2
9996s/["\\]/\\&/g; s/^/"/; s/$/"\\/
9997p
9998g
9999s/.\{148\}//
10000t delim
10001' <conf$$subs.awk | sed '
10002/^[^""]/{
10003  N
10004  s/\n//
10005}
10006' >>$CONFIG_STATUS || ac_write_fail=1
10007rm -f conf$$subs.awk
10008cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10009_ACAWK
10010cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
10011  for (key in S) S_is_set[key] = 1
10012  FS = ""
10013
10014}
10015{
10016  line = $ 0
10017  nfields = split(line, field, "@")
10018  substed = 0
10019  len = length(field[1])
10020  for (i = 2; i < nfields; i++) {
10021    key = field[i]
10022    keylen = length(key)
10023    if (S_is_set[key]) {
10024      value = S[key]
10025      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
10026      len += length(value) + length(field[++i])
10027      substed = 1
10028    } else
10029      len += 1 + keylen
10030  }
10031
10032  print line
10033}
10034
10035_ACAWK
10036_ACEOF
10037cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10038if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
10039  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
10040else
10041  cat
10042fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
10043  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
10044_ACEOF
10045
10046# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
10047# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
10048# trailing colons and then remove the whole line if VPATH becomes empty
10049# (actually we leave an empty line to preserve line numbers).
10050if test "x$srcdir" = x.; then
10051  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
10052h
10053s///
10054s/^/:/
10055s/[	 ]*$/:/
10056s/:\$(srcdir):/:/g
10057s/:\${srcdir}:/:/g
10058s/:@srcdir@:/:/g
10059s/^:*//
10060s/:*$//
10061x
10062s/\(=[	 ]*\).*/\1/
10063G
10064s/\n//
10065s/^[^=]*=[	 ]*$//
10066}'
10067fi
10068
10069cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10070fi # test -n "$CONFIG_FILES"
10071
10072
10073eval set X "  :F $CONFIG_FILES      "
10074shift
10075for ac_tag
10076do
10077  case $ac_tag in
10078  :[FHLC]) ac_mode=$ac_tag; continue;;
10079  esac
10080  case $ac_mode$ac_tag in
10081  :[FHL]*:*);;
10082  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
10083  :[FH]-) ac_tag=-:-;;
10084  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
10085  esac
10086  ac_save_IFS=$IFS
10087  IFS=:
10088  set x $ac_tag
10089  IFS=$ac_save_IFS
10090  shift
10091  ac_file=$1
10092  shift
10093
10094  case $ac_mode in
10095  :L) ac_source=$1;;
10096  :[FH])
10097    ac_file_inputs=
10098    for ac_f
10099    do
10100      case $ac_f in
10101      -) ac_f="$ac_tmp/stdin";;
10102      *) # Look for the file first in the build tree, then in the source tree
10103	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
10104	 # because $ac_f cannot contain `:'.
10105	 test -f "$ac_f" ||
10106	   case $ac_f in
10107	   [\\/$]*) false;;
10108	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
10109	   esac ||
10110	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
10111      esac
10112      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
10113      as_fn_append ac_file_inputs " '$ac_f'"
10114    done
10115
10116    # Let's still pretend it is `configure' which instantiates (i.e., don't
10117    # use $as_me), people would be surprised to read:
10118    #    /* config.h.  Generated by config.status.  */
10119    configure_input='Generated from '`
10120	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
10121	`' by configure.'
10122    if test x"$ac_file" != x-; then
10123      configure_input="$ac_file.  $configure_input"
10124      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
10125$as_echo "$as_me: creating $ac_file" >&6;}
10126    fi
10127    # Neutralize special characters interpreted by sed in replacement strings.
10128    case $configure_input in #(
10129    *\&* | *\|* | *\\* )
10130       ac_sed_conf_input=`$as_echo "$configure_input" |
10131       sed 's/[\\\\&|]/\\\\&/g'`;; #(
10132    *) ac_sed_conf_input=$configure_input;;
10133    esac
10134
10135    case $ac_tag in
10136    *:-:* | *:-) cat >"$ac_tmp/stdin" \
10137      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
10138    esac
10139    ;;
10140  esac
10141
10142  ac_dir=`$as_dirname -- "$ac_file" ||
10143$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10144	 X"$ac_file" : 'X\(//\)[^/]' \| \
10145	 X"$ac_file" : 'X\(//\)$' \| \
10146	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
10147$as_echo X"$ac_file" |
10148    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
10149	    s//\1/
10150	    q
10151	  }
10152	  /^X\(\/\/\)[^/].*/{
10153	    s//\1/
10154	    q
10155	  }
10156	  /^X\(\/\/\)$/{
10157	    s//\1/
10158	    q
10159	  }
10160	  /^X\(\/\).*/{
10161	    s//\1/
10162	    q
10163	  }
10164	  s/.*/./; q'`
10165  as_dir="$ac_dir"; as_fn_mkdir_p
10166  ac_builddir=.
10167
10168case "$ac_dir" in
10169.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
10170*)
10171  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
10172  # A ".." for each directory in $ac_dir_suffix.
10173  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
10174  case $ac_top_builddir_sub in
10175  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
10176  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
10177  esac ;;
10178esac
10179ac_abs_top_builddir=$ac_pwd
10180ac_abs_builddir=$ac_pwd$ac_dir_suffix
10181# for backward compatibility:
10182ac_top_builddir=$ac_top_build_prefix
10183
10184case $srcdir in
10185  .)  # We are building in place.
10186    ac_srcdir=.
10187    ac_top_srcdir=$ac_top_builddir_sub
10188    ac_abs_top_srcdir=$ac_pwd ;;
10189  [\\/]* | ?:[\\/]* )  # Absolute name.
10190    ac_srcdir=$srcdir$ac_dir_suffix;
10191    ac_top_srcdir=$srcdir
10192    ac_abs_top_srcdir=$srcdir ;;
10193  *) # Relative name.
10194    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
10195    ac_top_srcdir=$ac_top_build_prefix$srcdir
10196    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
10197esac
10198ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
10199
10200
10201  case $ac_mode in
10202  :F)
10203  #
10204  # CONFIG_FILE
10205  #
10206
10207_ACEOF
10208
10209cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10210# If the template does not know about datarootdir, expand it.
10211# FIXME: This hack should be removed a few years after 2.60.
10212ac_datarootdir_hack=; ac_datarootdir_seen=
10213ac_sed_dataroot='
10214/datarootdir/ {
10215  p
10216  q
10217}
10218/@datadir@/p
10219/@docdir@/p
10220/@infodir@/p
10221/@localedir@/p
10222/@mandir@/p'
10223case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
10224*datarootdir*) ac_datarootdir_seen=yes;;
10225*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
10226  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
10227$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
10228_ACEOF
10229cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10230  ac_datarootdir_hack='
10231  s&@datadir@&$datadir&g
10232  s&@docdir@&$docdir&g
10233  s&@infodir@&$infodir&g
10234  s&@localedir@&$localedir&g
10235  s&@mandir@&$mandir&g
10236  s&\\\${datarootdir}&$datarootdir&g' ;;
10237esac
10238_ACEOF
10239
10240# Neutralize VPATH when `$srcdir' = `.'.
10241# Shell code in configure.ac might set extrasub.
10242# FIXME: do we really want to maintain this feature?
10243cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10244ac_sed_extra="$ac_vpsub
10245$extrasub
10246_ACEOF
10247cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10248:t
10249/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
10250s|@configure_input@|$ac_sed_conf_input|;t t
10251s&@top_builddir@&$ac_top_builddir_sub&;t t
10252s&@top_build_prefix@&$ac_top_build_prefix&;t t
10253s&@srcdir@&$ac_srcdir&;t t
10254s&@abs_srcdir@&$ac_abs_srcdir&;t t
10255s&@top_srcdir@&$ac_top_srcdir&;t t
10256s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
10257s&@builddir@&$ac_builddir&;t t
10258s&@abs_builddir@&$ac_abs_builddir&;t t
10259s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
10260$ac_datarootdir_hack
10261"
10262eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
10263  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10264
10265test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
10266  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
10267  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
10268      "$ac_tmp/out"`; test -z "$ac_out"; } &&
10269  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
10270which seems to be undefined.  Please make sure it is defined" >&5
10271$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
10272which seems to be undefined.  Please make sure it is defined" >&2;}
10273
10274  rm -f "$ac_tmp/stdin"
10275  case $ac_file in
10276  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
10277  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
10278  esac \
10279  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10280 ;;
10281
10282
10283
10284  esac
10285
10286done # for ac_tag
10287
10288
10289as_fn_exit 0
10290_ACEOF
10291ac_clean_files=$ac_clean_files_save
10292
10293test $ac_write_fail = 0 ||
10294  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
10295
10296
10297# configure is writing to config.log, and then calls config.status.
10298# config.status does its own redirection, appending to config.log.
10299# Unfortunately, on DOS this fails, as config.log is still kept open
10300# by configure, so config.status won't be able to write to it; its
10301# output is simply discarded.  So we exec the FD to /dev/null,
10302# effectively closing config.log, so it can be properly (re)opened and
10303# appended to by config.status.  When coming back to configure, we
10304# need to make the FD available again.
10305if test "$no_create" != yes; then
10306  ac_cs_success=:
10307  ac_config_status_args=
10308  test "$silent" = yes &&
10309    ac_config_status_args="$ac_config_status_args --quiet"
10310  exec 5>/dev/null
10311  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
10312  exec 5>>config.log
10313  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
10314  # would make configure fail if this is the last instruction.
10315  $ac_cs_success || as_fn_exit 1
10316fi
10317if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
10318  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
10319$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
10320fi
10321
10322
10323#--------------------------------------------------------------------
10324