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