1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for tkimgtiff 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='tkimgtiff'
579PACKAGE_TARNAME='tkimgtiff'
580PACKAGE_VERSION='1.4.12'
581PACKAGE_STRING='tkimgtiff 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
654zlibtcl_BUILD_PATH
655zlibtcl_SRC_PATH
656jpegtcl_BUILD_PATH
657jpegtcl_SRC_PATH
658tifftcl_BUILD_PATH
659tifftcl_SRC_PATH
660tkimg_BUILD_PATH
661tkimg_SRC_PATH
662zlibtcl_STUB_LIB_PATH
663zlibtcl_STUB_LIB_SPEC
664zlibtcl_STUB_LIB_FILE
665zlibtcl_LIB_SPEC
666zlibtcl_LIB_FILE
667zlibtcl_SRC_DIR
668zlibtcl_BIN_DIR
669zlibtcl_VERSION
670jpegtcl_STUB_LIB_PATH
671jpegtcl_STUB_LIB_SPEC
672jpegtcl_STUB_LIB_FILE
673jpegtcl_LIB_SPEC
674jpegtcl_LIB_FILE
675jpegtcl_SRC_DIR
676jpegtcl_BIN_DIR
677jpegtcl_VERSION
678tifftcl_STUB_LIB_PATH
679tifftcl_STUB_LIB_SPEC
680tifftcl_STUB_LIB_FILE
681tifftcl_LIB_SPEC
682tifftcl_LIB_FILE
683tifftcl_SRC_DIR
684tifftcl_BIN_DIR
685tifftcl_VERSION
686tkimg_STUB_LIB_PATH
687tkimg_STUB_LIB_SPEC
688tkimg_STUB_LIB_FILE
689tkimg_LIB_SPEC
690tkimg_LIB_FILE
691tkimg_SRC_DIR
692tkimg_BIN_DIR
693tkimg_VERSION
694EGREP
695GREP
696RANLIB
697SET_MAKE
698CPP
699TK_XINCLUDES
700TK_LIBS
701TK_STUB_LIB_SPEC
702TK_STUB_LIB_FLAG
703TK_STUB_LIB_FILE
704TK_LIB_SPEC
705TK_LIB_FLAG
706TK_LIB_FILE
707TK_SRC_DIR
708TK_BIN_DIR
709TK_VERSION
710TCL_SHLIB_LD_LIBS
711TCL_LD_FLAGS
712TCL_EXTRA_CFLAGS
713TCL_DEFS
714TCL_LIBS
715CLEANFILES
716OBJEXT
717ac_ct_CC
718CPPFLAGS
719LDFLAGS
720CFLAGS
721CC
722TCL_STUB_LIB_SPEC
723TCL_STUB_LIB_FLAG
724TCL_STUB_LIB_FILE
725TCL_LIB_SPEC
726TCL_LIB_FLAG
727TCL_LIB_FILE
728TCL_SRC_DIR
729TCL_BIN_DIR
730TCL_PATCH_LEVEL
731TCL_VERSION
732PACKAGE_TCLNAME
733PHIMGTYPE
734INSTALL_LIBRARY
735INSTALL_SCRIPT
736INSTALL_PROGRAM
737INSTALL_DATA
738INSTALL_DATA_DIR
739INSTALL
740PKG_CFLAGS
741PKG_LIBS
742PKG_INCLUDES
743PKG_HEADERS
744PKG_TCL_SOURCES
745PKG_STUB_OBJECTS
746PKG_STUB_SOURCES
747PKG_STUB_LIB_FILE
748PKG_LIB_FILE
749EXEEXT
750CYGPATH
751target_alias
752host_alias
753build_alias
754LIBS
755ECHO_T
756ECHO_N
757ECHO_C
758DEFS
759mandir
760localedir
761libdir
762psdir
763pdfdir
764dvidir
765htmldir
766infodir
767docdir
768oldincludedir
769includedir
770localstatedir
771sharedstatedir
772sysconfdir
773datadir
774datarootdir
775libexecdir
776sbindir
777bindir
778program_transform_name
779prefix
780exec_prefix
781PACKAGE_URL
782PACKAGE_BUGREPORT
783PACKAGE_STRING
784PACKAGE_VERSION
785PACKAGE_TARNAME
786PACKAGE_NAME
787PATH_SEPARATOR
788SHELL'
789ac_subst_files=''
790ac_user_opts='
791enable_option_checking
792with_tcl
793with_tk
794with_tkimg
795with_tifftcl
796with_jpegtcl
797with_zlibtcl
798with_tclinclude
799with_tkinclude
800enable_threads
801enable_shared
802enable_stubs
803enable_64bit
804enable_64bit_vis
805enable_rpath
806enable_symbols
807with_x
808'
809      ac_precious_vars='build_alias
810host_alias
811target_alias
812CC
813CFLAGS
814LDFLAGS
815LIBS
816CPPFLAGS
817CPP
818XMKMF'
819
820
821# Initialize some variables set by options.
822ac_init_help=
823ac_init_version=false
824ac_unrecognized_opts=
825ac_unrecognized_sep=
826# The variables have the same names as the options, with
827# dashes changed to underlines.
828cache_file=/dev/null
829exec_prefix=NONE
830no_create=
831no_recursion=
832prefix=NONE
833program_prefix=NONE
834program_suffix=NONE
835program_transform_name=s,x,x,
836silent=
837site=
838srcdir=
839verbose=
840x_includes=NONE
841x_libraries=NONE
842
843# Installation directory options.
844# These are left unexpanded so users can "make install exec_prefix=/foo"
845# and all the variables that are supposed to be based on exec_prefix
846# by default will actually change.
847# Use braces instead of parens because sh, perl, etc. also accept them.
848# (The list follows the same order as the GNU Coding Standards.)
849bindir='${exec_prefix}/bin'
850sbindir='${exec_prefix}/sbin'
851libexecdir='${exec_prefix}/libexec'
852datarootdir='${prefix}/share'
853datadir='${datarootdir}'
854sysconfdir='${prefix}/etc'
855sharedstatedir='${prefix}/com'
856localstatedir='${prefix}/var'
857includedir='${prefix}/include'
858oldincludedir='/usr/include'
859docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
860infodir='${datarootdir}/info'
861htmldir='${docdir}'
862dvidir='${docdir}'
863pdfdir='${docdir}'
864psdir='${docdir}'
865libdir='${exec_prefix}/lib'
866localedir='${datarootdir}/locale'
867mandir='${datarootdir}/man'
868
869ac_prev=
870ac_dashdash=
871for ac_option
872do
873  # If the previous option needs an argument, assign it.
874  if test -n "$ac_prev"; then
875    eval $ac_prev=\$ac_option
876    ac_prev=
877    continue
878  fi
879
880  case $ac_option in
881  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
882  *=)   ac_optarg= ;;
883  *)    ac_optarg=yes ;;
884  esac
885
886  # Accept the important Cygnus configure options, so we can diagnose typos.
887
888  case $ac_dashdash$ac_option in
889  --)
890    ac_dashdash=yes ;;
891
892  -bindir | --bindir | --bindi | --bind | --bin | --bi)
893    ac_prev=bindir ;;
894  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
895    bindir=$ac_optarg ;;
896
897  -build | --build | --buil | --bui | --bu)
898    ac_prev=build_alias ;;
899  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
900    build_alias=$ac_optarg ;;
901
902  -cache-file | --cache-file | --cache-fil | --cache-fi \
903  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
904    ac_prev=cache_file ;;
905  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
906  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
907    cache_file=$ac_optarg ;;
908
909  --config-cache | -C)
910    cache_file=config.cache ;;
911
912  -datadir | --datadir | --datadi | --datad)
913    ac_prev=datadir ;;
914  -datadir=* | --datadir=* | --datadi=* | --datad=*)
915    datadir=$ac_optarg ;;
916
917  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
918  | --dataroo | --dataro | --datar)
919    ac_prev=datarootdir ;;
920  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
921  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
922    datarootdir=$ac_optarg ;;
923
924  -disable-* | --disable-*)
925    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
926    # Reject names that are not valid shell variable names.
927    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
928      as_fn_error $? "invalid feature name: $ac_useropt"
929    ac_useropt_orig=$ac_useropt
930    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
931    case $ac_user_opts in
932      *"
933"enable_$ac_useropt"
934"*) ;;
935      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
936	 ac_unrecognized_sep=', ';;
937    esac
938    eval enable_$ac_useropt=no ;;
939
940  -docdir | --docdir | --docdi | --doc | --do)
941    ac_prev=docdir ;;
942  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
943    docdir=$ac_optarg ;;
944
945  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
946    ac_prev=dvidir ;;
947  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
948    dvidir=$ac_optarg ;;
949
950  -enable-* | --enable-*)
951    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
952    # Reject names that are not valid shell variable names.
953    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
954      as_fn_error $? "invalid feature name: $ac_useropt"
955    ac_useropt_orig=$ac_useropt
956    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
957    case $ac_user_opts in
958      *"
959"enable_$ac_useropt"
960"*) ;;
961      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
962	 ac_unrecognized_sep=', ';;
963    esac
964    eval enable_$ac_useropt=\$ac_optarg ;;
965
966  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
967  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
968  | --exec | --exe | --ex)
969    ac_prev=exec_prefix ;;
970  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
971  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
972  | --exec=* | --exe=* | --ex=*)
973    exec_prefix=$ac_optarg ;;
974
975  -gas | --gas | --ga | --g)
976    # Obsolete; use --with-gas.
977    with_gas=yes ;;
978
979  -help | --help | --hel | --he | -h)
980    ac_init_help=long ;;
981  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
982    ac_init_help=recursive ;;
983  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
984    ac_init_help=short ;;
985
986  -host | --host | --hos | --ho)
987    ac_prev=host_alias ;;
988  -host=* | --host=* | --hos=* | --ho=*)
989    host_alias=$ac_optarg ;;
990
991  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
992    ac_prev=htmldir ;;
993  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
994  | --ht=*)
995    htmldir=$ac_optarg ;;
996
997  -includedir | --includedir | --includedi | --included | --include \
998  | --includ | --inclu | --incl | --inc)
999    ac_prev=includedir ;;
1000  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1001  | --includ=* | --inclu=* | --incl=* | --inc=*)
1002    includedir=$ac_optarg ;;
1003
1004  -infodir | --infodir | --infodi | --infod | --info | --inf)
1005    ac_prev=infodir ;;
1006  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1007    infodir=$ac_optarg ;;
1008
1009  -libdir | --libdir | --libdi | --libd)
1010    ac_prev=libdir ;;
1011  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1012    libdir=$ac_optarg ;;
1013
1014  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1015  | --libexe | --libex | --libe)
1016    ac_prev=libexecdir ;;
1017  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1018  | --libexe=* | --libex=* | --libe=*)
1019    libexecdir=$ac_optarg ;;
1020
1021  -localedir | --localedir | --localedi | --localed | --locale)
1022    ac_prev=localedir ;;
1023  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1024    localedir=$ac_optarg ;;
1025
1026  -localstatedir | --localstatedir | --localstatedi | --localstated \
1027  | --localstate | --localstat | --localsta | --localst | --locals)
1028    ac_prev=localstatedir ;;
1029  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1030  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1031    localstatedir=$ac_optarg ;;
1032
1033  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1034    ac_prev=mandir ;;
1035  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1036    mandir=$ac_optarg ;;
1037
1038  -nfp | --nfp | --nf)
1039    # Obsolete; use --without-fp.
1040    with_fp=no ;;
1041
1042  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1043  | --no-cr | --no-c | -n)
1044    no_create=yes ;;
1045
1046  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1047  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1048    no_recursion=yes ;;
1049
1050  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1051  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1052  | --oldin | --oldi | --old | --ol | --o)
1053    ac_prev=oldincludedir ;;
1054  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1055  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1056  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1057    oldincludedir=$ac_optarg ;;
1058
1059  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1060    ac_prev=prefix ;;
1061  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1062    prefix=$ac_optarg ;;
1063
1064  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1065  | --program-pre | --program-pr | --program-p)
1066    ac_prev=program_prefix ;;
1067  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1068  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1069    program_prefix=$ac_optarg ;;
1070
1071  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1072  | --program-suf | --program-su | --program-s)
1073    ac_prev=program_suffix ;;
1074  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1075  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1076    program_suffix=$ac_optarg ;;
1077
1078  -program-transform-name | --program-transform-name \
1079  | --program-transform-nam | --program-transform-na \
1080  | --program-transform-n | --program-transform- \
1081  | --program-transform | --program-transfor \
1082  | --program-transfo | --program-transf \
1083  | --program-trans | --program-tran \
1084  | --progr-tra | --program-tr | --program-t)
1085    ac_prev=program_transform_name ;;
1086  -program-transform-name=* | --program-transform-name=* \
1087  | --program-transform-nam=* | --program-transform-na=* \
1088  | --program-transform-n=* | --program-transform-=* \
1089  | --program-transform=* | --program-transfor=* \
1090  | --program-transfo=* | --program-transf=* \
1091  | --program-trans=* | --program-tran=* \
1092  | --progr-tra=* | --program-tr=* | --program-t=*)
1093    program_transform_name=$ac_optarg ;;
1094
1095  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1096    ac_prev=pdfdir ;;
1097  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1098    pdfdir=$ac_optarg ;;
1099
1100  -psdir | --psdir | --psdi | --psd | --ps)
1101    ac_prev=psdir ;;
1102  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1103    psdir=$ac_optarg ;;
1104
1105  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1106  | -silent | --silent | --silen | --sile | --sil)
1107    silent=yes ;;
1108
1109  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1110    ac_prev=sbindir ;;
1111  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1112  | --sbi=* | --sb=*)
1113    sbindir=$ac_optarg ;;
1114
1115  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1116  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1117  | --sharedst | --shareds | --shared | --share | --shar \
1118  | --sha | --sh)
1119    ac_prev=sharedstatedir ;;
1120  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1121  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1122  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1123  | --sha=* | --sh=*)
1124    sharedstatedir=$ac_optarg ;;
1125
1126  -site | --site | --sit)
1127    ac_prev=site ;;
1128  -site=* | --site=* | --sit=*)
1129    site=$ac_optarg ;;
1130
1131  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1132    ac_prev=srcdir ;;
1133  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1134    srcdir=$ac_optarg ;;
1135
1136  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1137  | --syscon | --sysco | --sysc | --sys | --sy)
1138    ac_prev=sysconfdir ;;
1139  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1140  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1141    sysconfdir=$ac_optarg ;;
1142
1143  -target | --target | --targe | --targ | --tar | --ta | --t)
1144    ac_prev=target_alias ;;
1145  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1146    target_alias=$ac_optarg ;;
1147
1148  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1149    verbose=yes ;;
1150
1151  -version | --version | --versio | --versi | --vers | -V)
1152    ac_init_version=: ;;
1153
1154  -with-* | --with-*)
1155    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1156    # Reject names that are not valid shell variable names.
1157    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1158      as_fn_error $? "invalid package name: $ac_useropt"
1159    ac_useropt_orig=$ac_useropt
1160    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1161    case $ac_user_opts in
1162      *"
1163"with_$ac_useropt"
1164"*) ;;
1165      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1166	 ac_unrecognized_sep=', ';;
1167    esac
1168    eval with_$ac_useropt=\$ac_optarg ;;
1169
1170  -without-* | --without-*)
1171    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1172    # Reject names that are not valid shell variable names.
1173    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1174      as_fn_error $? "invalid package name: $ac_useropt"
1175    ac_useropt_orig=$ac_useropt
1176    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1177    case $ac_user_opts in
1178      *"
1179"with_$ac_useropt"
1180"*) ;;
1181      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1182	 ac_unrecognized_sep=', ';;
1183    esac
1184    eval with_$ac_useropt=no ;;
1185
1186  --x)
1187    # Obsolete; use --with-x.
1188    with_x=yes ;;
1189
1190  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1191  | --x-incl | --x-inc | --x-in | --x-i)
1192    ac_prev=x_includes ;;
1193  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1194  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1195    x_includes=$ac_optarg ;;
1196
1197  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1198  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1199    ac_prev=x_libraries ;;
1200  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1201  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1202    x_libraries=$ac_optarg ;;
1203
1204  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1205Try \`$0 --help' for more information"
1206    ;;
1207
1208  *=*)
1209    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1210    # Reject names that are not valid shell variable names.
1211    case $ac_envvar in #(
1212      '' | [0-9]* | *[!_$as_cr_alnum]* )
1213      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1214    esac
1215    eval $ac_envvar=\$ac_optarg
1216    export $ac_envvar ;;
1217
1218  *)
1219    # FIXME: should be removed in autoconf 3.0.
1220    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1221    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1222      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1223    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1224    ;;
1225
1226  esac
1227done
1228
1229if test -n "$ac_prev"; then
1230  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1231  as_fn_error $? "missing argument to $ac_option"
1232fi
1233
1234if test -n "$ac_unrecognized_opts"; then
1235  case $enable_option_checking in
1236    no) ;;
1237    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1238    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1239  esac
1240fi
1241
1242# Check all directory arguments for consistency.
1243for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1244		datadir sysconfdir sharedstatedir localstatedir includedir \
1245		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1246		libdir localedir mandir
1247do
1248  eval ac_val=\$$ac_var
1249  # Remove trailing slashes.
1250  case $ac_val in
1251    */ )
1252      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1253      eval $ac_var=\$ac_val;;
1254  esac
1255  # Be sure to have absolute directory names.
1256  case $ac_val in
1257    [\\/$]* | ?:[\\/]* )  continue;;
1258    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1259  esac
1260  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1261done
1262
1263# There might be people who depend on the old broken behavior: `$host'
1264# used to hold the argument of --host etc.
1265# FIXME: To remove some day.
1266build=$build_alias
1267host=$host_alias
1268target=$target_alias
1269
1270# FIXME: To remove some day.
1271if test "x$host_alias" != x; then
1272  if test "x$build_alias" = x; then
1273    cross_compiling=maybe
1274  elif test "x$build_alias" != "x$host_alias"; then
1275    cross_compiling=yes
1276  fi
1277fi
1278
1279ac_tool_prefix=
1280test -n "$host_alias" && ac_tool_prefix=$host_alias-
1281
1282test "$silent" = yes && exec 6>/dev/null
1283
1284
1285ac_pwd=`pwd` && test -n "$ac_pwd" &&
1286ac_ls_di=`ls -di .` &&
1287ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1288  as_fn_error $? "working directory cannot be determined"
1289test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1290  as_fn_error $? "pwd does not report name of working directory"
1291
1292
1293# Find the source files, if location was not specified.
1294if test -z "$srcdir"; then
1295  ac_srcdir_defaulted=yes
1296  # Try the directory containing this script, then the parent directory.
1297  ac_confdir=`$as_dirname -- "$as_myself" ||
1298$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1299	 X"$as_myself" : 'X\(//\)[^/]' \| \
1300	 X"$as_myself" : 'X\(//\)$' \| \
1301	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1302$as_echo X"$as_myself" |
1303    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1304	    s//\1/
1305	    q
1306	  }
1307	  /^X\(\/\/\)[^/].*/{
1308	    s//\1/
1309	    q
1310	  }
1311	  /^X\(\/\/\)$/{
1312	    s//\1/
1313	    q
1314	  }
1315	  /^X\(\/\).*/{
1316	    s//\1/
1317	    q
1318	  }
1319	  s/.*/./; q'`
1320  srcdir=$ac_confdir
1321  if test ! -r "$srcdir/$ac_unique_file"; then
1322    srcdir=..
1323  fi
1324else
1325  ac_srcdir_defaulted=no
1326fi
1327if test ! -r "$srcdir/$ac_unique_file"; then
1328  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1329  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1330fi
1331ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1332ac_abs_confdir=`(
1333	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1334	pwd)`
1335# When building in place, set srcdir=.
1336if test "$ac_abs_confdir" = "$ac_pwd"; then
1337  srcdir=.
1338fi
1339# Remove unnecessary trailing slashes from srcdir.
1340# Double slashes in file names in object file debugging info
1341# mess up M-x gdb in Emacs.
1342case $srcdir in
1343*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1344esac
1345for ac_var in $ac_precious_vars; do
1346  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1347  eval ac_env_${ac_var}_value=\$${ac_var}
1348  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1349  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1350done
1351
1352#
1353# Report the --help message.
1354#
1355if test "$ac_init_help" = "long"; then
1356  # Omit some internal or obsolete options to make the list less imposing.
1357  # This message is too long to be a string in the A/UX 3.1 sh.
1358  cat <<_ACEOF
1359\`configure' configures tkimgtiff 1.4.12 to adapt to many kinds of systems.
1360
1361Usage: $0 [OPTION]... [VAR=VALUE]...
1362
1363To assign environment variables (e.g., CC, CFLAGS...), specify them as
1364VAR=VALUE.  See below for descriptions of some of the useful variables.
1365
1366Defaults for the options are specified in brackets.
1367
1368Configuration:
1369  -h, --help              display this help and exit
1370      --help=short        display options specific to this package
1371      --help=recursive    display the short help of all the included packages
1372  -V, --version           display version information and exit
1373  -q, --quiet, --silent   do not print \`checking ...' messages
1374      --cache-file=FILE   cache test results in FILE [disabled]
1375  -C, --config-cache      alias for \`--cache-file=config.cache'
1376  -n, --no-create         do not create output files
1377      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1378
1379Installation directories:
1380  --prefix=PREFIX         install architecture-independent files in PREFIX
1381                          [$ac_default_prefix]
1382  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1383                          [PREFIX]
1384
1385By default, \`make install' will install all the files in
1386\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1387an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1388for instance \`--prefix=\$HOME'.
1389
1390For better control, use the options below.
1391
1392Fine tuning of the installation directories:
1393  --bindir=DIR            user executables [EPREFIX/bin]
1394  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1395  --libexecdir=DIR        program executables [EPREFIX/libexec]
1396  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1397  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1398  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1399  --libdir=DIR            object code libraries [EPREFIX/lib]
1400  --includedir=DIR        C header files [PREFIX/include]
1401  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1402  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1403  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1404  --infodir=DIR           info documentation [DATAROOTDIR/info]
1405  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1406  --mandir=DIR            man documentation [DATAROOTDIR/man]
1407  --docdir=DIR            documentation root [DATAROOTDIR/doc/tkimgtiff]
1408  --htmldir=DIR           html documentation [DOCDIR]
1409  --dvidir=DIR            dvi documentation [DOCDIR]
1410  --pdfdir=DIR            pdf documentation [DOCDIR]
1411  --psdir=DIR             ps documentation [DOCDIR]
1412_ACEOF
1413
1414  cat <<\_ACEOF
1415
1416X features:
1417  --x-includes=DIR    X include files are in DIR
1418  --x-libraries=DIR   X library files are in DIR
1419_ACEOF
1420fi
1421
1422if test -n "$ac_init_help"; then
1423  case $ac_init_help in
1424     short | recursive ) echo "Configuration of tkimgtiff 1.4.12:";;
1425   esac
1426  cat <<\_ACEOF
1427
1428Optional Features:
1429  --disable-option-checking  ignore unrecognized --enable/--with options
1430  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1431  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1432  --enable-threads        build with threads (default: on)
1433  --enable-shared         build and link with shared libraries (default: on)
1434  --enable-stubs          build and link with stub libraries. Always true for
1435                          shared builds (default: on)
1436  --enable-64bit          enable 64bit support (default: off)
1437  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1438  --disable-rpath         disable rpath support (default: on)
1439  --enable-symbols        build with debugging symbols (default: off)
1440
1441Optional Packages:
1442  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1443  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1444  --with-tcl              directory containing tcl configuration
1445                          (tclConfig.sh)
1446  --with-tk               directory containing tk configuration (tkConfig.sh)
1447  --with-tkimg              directory containing tkimg configuration (tkimgConfig.sh)
1448  --with-tifftcl              directory containing tifftcl configuration (tifftclConfig.sh)
1449  --with-jpegtcl              directory containing jpegtcl configuration (jpegtclConfig.sh)
1450  --with-zlibtcl              directory containing zlibtcl configuration (zlibtclConfig.sh)
1451  --with-tclinclude       directory containing the public Tcl header files
1452  --with-tkinclude        directory containing the public Tk header files
1453  --with-x                use the X Window System
1454
1455Some influential environment variables:
1456  CC          C compiler command
1457  CFLAGS      C compiler flags
1458  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1459              nonstandard directory <lib dir>
1460  LIBS        libraries to pass to the linker, e.g. -l<library>
1461  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1462              you have headers in a nonstandard directory <include dir>
1463  CPP         C preprocessor
1464  XMKMF       Path to xmkmf, Makefile generator for X Window System
1465
1466Use these variables to override the choices made by `configure' or to help
1467it to find libraries and programs with nonstandard names/locations.
1468
1469Report bugs to the package provider.
1470_ACEOF
1471ac_status=$?
1472fi
1473
1474if test "$ac_init_help" = "recursive"; then
1475  # If there are subdirs, report their specific --help.
1476  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1477    test -d "$ac_dir" ||
1478      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1479      continue
1480    ac_builddir=.
1481
1482case "$ac_dir" in
1483.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1484*)
1485  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1486  # A ".." for each directory in $ac_dir_suffix.
1487  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1488  case $ac_top_builddir_sub in
1489  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1490  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1491  esac ;;
1492esac
1493ac_abs_top_builddir=$ac_pwd
1494ac_abs_builddir=$ac_pwd$ac_dir_suffix
1495# for backward compatibility:
1496ac_top_builddir=$ac_top_build_prefix
1497
1498case $srcdir in
1499  .)  # We are building in place.
1500    ac_srcdir=.
1501    ac_top_srcdir=$ac_top_builddir_sub
1502    ac_abs_top_srcdir=$ac_pwd ;;
1503  [\\/]* | ?:[\\/]* )  # Absolute name.
1504    ac_srcdir=$srcdir$ac_dir_suffix;
1505    ac_top_srcdir=$srcdir
1506    ac_abs_top_srcdir=$srcdir ;;
1507  *) # Relative name.
1508    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1509    ac_top_srcdir=$ac_top_build_prefix$srcdir
1510    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1511esac
1512ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1513
1514    cd "$ac_dir" || { ac_status=$?; continue; }
1515    # Check for guested configure.
1516    if test -f "$ac_srcdir/configure.gnu"; then
1517      echo &&
1518      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1519    elif test -f "$ac_srcdir/configure"; then
1520      echo &&
1521      $SHELL "$ac_srcdir/configure" --help=recursive
1522    else
1523      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1524    fi || ac_status=$?
1525    cd "$ac_pwd" || { ac_status=$?; break; }
1526  done
1527fi
1528
1529test -n "$ac_init_help" && exit $ac_status
1530if $ac_init_version; then
1531  cat <<\_ACEOF
1532tkimgtiff configure 1.4.12
1533generated by GNU Autoconf 2.69
1534
1535Copyright (C) 2012 Free Software Foundation, Inc.
1536This configure script is free software; the Free Software Foundation
1537gives unlimited permission to copy, distribute and modify it.
1538_ACEOF
1539  exit
1540fi
1541
1542## ------------------------ ##
1543## Autoconf initialization. ##
1544## ------------------------ ##
1545
1546# ac_fn_c_try_compile LINENO
1547# --------------------------
1548# Try to compile conftest.$ac_ext, and return whether this succeeded.
1549ac_fn_c_try_compile ()
1550{
1551  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1552  rm -f conftest.$ac_objext
1553  if { { ac_try="$ac_compile"
1554case "(($ac_try" in
1555  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1556  *) ac_try_echo=$ac_try;;
1557esac
1558eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1559$as_echo "$ac_try_echo"; } >&5
1560  (eval "$ac_compile") 2>conftest.err
1561  ac_status=$?
1562  if test -s conftest.err; then
1563    grep -v '^ *+' conftest.err >conftest.er1
1564    cat conftest.er1 >&5
1565    mv -f conftest.er1 conftest.err
1566  fi
1567  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1568  test $ac_status = 0; } && {
1569	 test -z "$ac_c_werror_flag" ||
1570	 test ! -s conftest.err
1571       } && test -s conftest.$ac_objext; then :
1572  ac_retval=0
1573else
1574  $as_echo "$as_me: failed program was:" >&5
1575sed 's/^/| /' conftest.$ac_ext >&5
1576
1577	ac_retval=1
1578fi
1579  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1580  as_fn_set_status $ac_retval
1581
1582} # ac_fn_c_try_compile
1583
1584# ac_fn_c_try_cpp LINENO
1585# ----------------------
1586# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1587ac_fn_c_try_cpp ()
1588{
1589  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1590  if { { ac_try="$ac_cpp conftest.$ac_ext"
1591case "(($ac_try" in
1592  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1593  *) ac_try_echo=$ac_try;;
1594esac
1595eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1596$as_echo "$ac_try_echo"; } >&5
1597  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1598  ac_status=$?
1599  if test -s conftest.err; then
1600    grep -v '^ *+' conftest.err >conftest.er1
1601    cat conftest.er1 >&5
1602    mv -f conftest.er1 conftest.err
1603  fi
1604  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1605  test $ac_status = 0; } > conftest.i && {
1606	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1607	 test ! -s conftest.err
1608       }; then :
1609  ac_retval=0
1610else
1611  $as_echo "$as_me: failed program was:" >&5
1612sed 's/^/| /' conftest.$ac_ext >&5
1613
1614    ac_retval=1
1615fi
1616  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1617  as_fn_set_status $ac_retval
1618
1619} # ac_fn_c_try_cpp
1620
1621# ac_fn_c_try_run LINENO
1622# ----------------------
1623# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1624# that executables *can* be run.
1625ac_fn_c_try_run ()
1626{
1627  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1628  if { { ac_try="$ac_link"
1629case "(($ac_try" in
1630  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1631  *) ac_try_echo=$ac_try;;
1632esac
1633eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1634$as_echo "$ac_try_echo"; } >&5
1635  (eval "$ac_link") 2>&5
1636  ac_status=$?
1637  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1638  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1639  { { case "(($ac_try" in
1640  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1641  *) ac_try_echo=$ac_try;;
1642esac
1643eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1644$as_echo "$ac_try_echo"; } >&5
1645  (eval "$ac_try") 2>&5
1646  ac_status=$?
1647  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1648  test $ac_status = 0; }; }; then :
1649  ac_retval=0
1650else
1651  $as_echo "$as_me: program exited with status $ac_status" >&5
1652       $as_echo "$as_me: failed program was:" >&5
1653sed 's/^/| /' conftest.$ac_ext >&5
1654
1655       ac_retval=$ac_status
1656fi
1657  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1658  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1659  as_fn_set_status $ac_retval
1660
1661} # ac_fn_c_try_run
1662
1663# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1664# -------------------------------------------------------
1665# Tests whether HEADER exists and can be compiled using the include files in
1666# INCLUDES, setting the cache variable VAR accordingly.
1667ac_fn_c_check_header_compile ()
1668{
1669  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1671$as_echo_n "checking for $2... " >&6; }
1672if eval \${$3+:} false; then :
1673  $as_echo_n "(cached) " >&6
1674else
1675  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1676/* end confdefs.h.  */
1677$4
1678#include <$2>
1679_ACEOF
1680if ac_fn_c_try_compile "$LINENO"; then :
1681  eval "$3=yes"
1682else
1683  eval "$3=no"
1684fi
1685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1686fi
1687eval ac_res=\$$3
1688	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1689$as_echo "$ac_res" >&6; }
1690  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1691
1692} # ac_fn_c_check_header_compile
1693
1694# ac_fn_c_try_link LINENO
1695# -----------------------
1696# Try to link conftest.$ac_ext, and return whether this succeeded.
1697ac_fn_c_try_link ()
1698{
1699  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1700  rm -f conftest.$ac_objext conftest$ac_exeext
1701  if { { ac_try="$ac_link"
1702case "(($ac_try" in
1703  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1704  *) ac_try_echo=$ac_try;;
1705esac
1706eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1707$as_echo "$ac_try_echo"; } >&5
1708  (eval "$ac_link") 2>conftest.err
1709  ac_status=$?
1710  if test -s conftest.err; then
1711    grep -v '^ *+' conftest.err >conftest.er1
1712    cat conftest.er1 >&5
1713    mv -f conftest.er1 conftest.err
1714  fi
1715  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1716  test $ac_status = 0; } && {
1717	 test -z "$ac_c_werror_flag" ||
1718	 test ! -s conftest.err
1719       } && test -s conftest$ac_exeext && {
1720	 test "$cross_compiling" = yes ||
1721	 test -x conftest$ac_exeext
1722       }; then :
1723  ac_retval=0
1724else
1725  $as_echo "$as_me: failed program was:" >&5
1726sed 's/^/| /' conftest.$ac_ext >&5
1727
1728	ac_retval=1
1729fi
1730  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1731  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1732  # interfere with the next link command; also delete a directory that is
1733  # left behind by Apple's compiler.  We do this before executing the actions.
1734  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1735  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1736  as_fn_set_status $ac_retval
1737
1738} # ac_fn_c_try_link
1739
1740# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1741# -------------------------------------------------------
1742# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1743# the include files in INCLUDES and setting the cache variable VAR
1744# accordingly.
1745ac_fn_c_check_header_mongrel ()
1746{
1747  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1748  if eval \${$3+:} false; then :
1749  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1750$as_echo_n "checking for $2... " >&6; }
1751if eval \${$3+:} false; then :
1752  $as_echo_n "(cached) " >&6
1753fi
1754eval ac_res=\$$3
1755	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1756$as_echo "$ac_res" >&6; }
1757else
1758  # Is the header compilable?
1759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1760$as_echo_n "checking $2 usability... " >&6; }
1761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1762/* end confdefs.h.  */
1763$4
1764#include <$2>
1765_ACEOF
1766if ac_fn_c_try_compile "$LINENO"; then :
1767  ac_header_compiler=yes
1768else
1769  ac_header_compiler=no
1770fi
1771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1773$as_echo "$ac_header_compiler" >&6; }
1774
1775# Is the header present?
1776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1777$as_echo_n "checking $2 presence... " >&6; }
1778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1779/* end confdefs.h.  */
1780#include <$2>
1781_ACEOF
1782if ac_fn_c_try_cpp "$LINENO"; then :
1783  ac_header_preproc=yes
1784else
1785  ac_header_preproc=no
1786fi
1787rm -f conftest.err conftest.i conftest.$ac_ext
1788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1789$as_echo "$ac_header_preproc" >&6; }
1790
1791# So?  What about this header?
1792case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1793  yes:no: )
1794    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1795$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1796    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1797$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1798    ;;
1799  no:yes:* )
1800    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1801$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1802    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1803$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1804    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1805$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1806    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1807$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1808    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1809$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1810    ;;
1811esac
1812  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1813$as_echo_n "checking for $2... " >&6; }
1814if eval \${$3+:} false; then :
1815  $as_echo_n "(cached) " >&6
1816else
1817  eval "$3=\$ac_header_compiler"
1818fi
1819eval ac_res=\$$3
1820	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1821$as_echo "$ac_res" >&6; }
1822fi
1823  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1824
1825} # ac_fn_c_check_header_mongrel
1826
1827# ac_fn_c_check_func LINENO FUNC VAR
1828# ----------------------------------
1829# Tests whether FUNC exists, setting the cache variable VAR accordingly
1830ac_fn_c_check_func ()
1831{
1832  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1834$as_echo_n "checking for $2... " >&6; }
1835if eval \${$3+:} false; then :
1836  $as_echo_n "(cached) " >&6
1837else
1838  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1839/* end confdefs.h.  */
1840/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1841   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1842#define $2 innocuous_$2
1843
1844/* System header to define __stub macros and hopefully few prototypes,
1845    which can conflict with char $2 (); below.
1846    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1847    <limits.h> exists even on freestanding compilers.  */
1848
1849#ifdef __STDC__
1850# include <limits.h>
1851#else
1852# include <assert.h>
1853#endif
1854
1855#undef $2
1856
1857/* Override any GCC internal prototype to avoid an error.
1858   Use char because int might match the return type of a GCC
1859   builtin and then its argument prototype would still apply.  */
1860#ifdef __cplusplus
1861extern "C"
1862#endif
1863char $2 ();
1864/* The GNU C library defines this for functions which it implements
1865    to always fail with ENOSYS.  Some functions are actually named
1866    something starting with __ and the normal name is an alias.  */
1867#if defined __stub_$2 || defined __stub___$2
1868choke me
1869#endif
1870
1871int
1872main ()
1873{
1874return $2 ();
1875  ;
1876  return 0;
1877}
1878_ACEOF
1879if ac_fn_c_try_link "$LINENO"; then :
1880  eval "$3=yes"
1881else
1882  eval "$3=no"
1883fi
1884rm -f core conftest.err conftest.$ac_objext \
1885    conftest$ac_exeext conftest.$ac_ext
1886fi
1887eval ac_res=\$$3
1888	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1889$as_echo "$ac_res" >&6; }
1890  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1891
1892} # ac_fn_c_check_func
1893cat >config.log <<_ACEOF
1894This file contains any messages produced by compilers while
1895running configure, to aid debugging if configure makes a mistake.
1896
1897It was created by tkimgtiff $as_me 1.4.12, which was
1898generated by GNU Autoconf 2.69.  Invocation command line was
1899
1900  $ $0 $@
1901
1902_ACEOF
1903exec 5>>config.log
1904{
1905cat <<_ASUNAME
1906## --------- ##
1907## Platform. ##
1908## --------- ##
1909
1910hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1911uname -m = `(uname -m) 2>/dev/null || echo unknown`
1912uname -r = `(uname -r) 2>/dev/null || echo unknown`
1913uname -s = `(uname -s) 2>/dev/null || echo unknown`
1914uname -v = `(uname -v) 2>/dev/null || echo unknown`
1915
1916/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1917/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1918
1919/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1920/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1921/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1922/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1923/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1924/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1925/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1926
1927_ASUNAME
1928
1929as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1930for as_dir in $PATH
1931do
1932  IFS=$as_save_IFS
1933  test -z "$as_dir" && as_dir=.
1934    $as_echo "PATH: $as_dir"
1935  done
1936IFS=$as_save_IFS
1937
1938} >&5
1939
1940cat >&5 <<_ACEOF
1941
1942
1943## ----------- ##
1944## Core tests. ##
1945## ----------- ##
1946
1947_ACEOF
1948
1949
1950# Keep a trace of the command line.
1951# Strip out --no-create and --no-recursion so they do not pile up.
1952# Strip out --silent because we don't want to record it for future runs.
1953# Also quote any args containing shell meta-characters.
1954# Make two passes to allow for proper duplicate-argument suppression.
1955ac_configure_args=
1956ac_configure_args0=
1957ac_configure_args1=
1958ac_must_keep_next=false
1959for ac_pass in 1 2
1960do
1961  for ac_arg
1962  do
1963    case $ac_arg in
1964    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1965    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1966    | -silent | --silent | --silen | --sile | --sil)
1967      continue ;;
1968    *\'*)
1969      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1970    esac
1971    case $ac_pass in
1972    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1973    2)
1974      as_fn_append ac_configure_args1 " '$ac_arg'"
1975      if test $ac_must_keep_next = true; then
1976	ac_must_keep_next=false # Got value, back to normal.
1977      else
1978	case $ac_arg in
1979	  *=* | --config-cache | -C | -disable-* | --disable-* \
1980	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1981	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1982	  | -with-* | --with-* | -without-* | --without-* | --x)
1983	    case "$ac_configure_args0 " in
1984	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1985	    esac
1986	    ;;
1987	  -* ) ac_must_keep_next=true ;;
1988	esac
1989      fi
1990      as_fn_append ac_configure_args " '$ac_arg'"
1991      ;;
1992    esac
1993  done
1994done
1995{ ac_configure_args0=; unset ac_configure_args0;}
1996{ ac_configure_args1=; unset ac_configure_args1;}
1997
1998# When interrupted or exit'd, cleanup temporary files, and complete
1999# config.log.  We remove comments because anyway the quotes in there
2000# would cause problems or look ugly.
2001# WARNING: Use '\'' to represent an apostrophe within the trap.
2002# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2003trap 'exit_status=$?
2004  # Save into config.log some information that might help in debugging.
2005  {
2006    echo
2007
2008    $as_echo "## ---------------- ##
2009## Cache variables. ##
2010## ---------------- ##"
2011    echo
2012    # The following way of writing the cache mishandles newlines in values,
2013(
2014  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2015    eval ac_val=\$$ac_var
2016    case $ac_val in #(
2017    *${as_nl}*)
2018      case $ac_var in #(
2019      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2020$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2021      esac
2022      case $ac_var in #(
2023      _ | IFS | as_nl) ;; #(
2024      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2025      *) { eval $ac_var=; unset $ac_var;} ;;
2026      esac ;;
2027    esac
2028  done
2029  (set) 2>&1 |
2030    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2031    *${as_nl}ac_space=\ *)
2032      sed -n \
2033	"s/'\''/'\''\\\\'\'''\''/g;
2034	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2035      ;; #(
2036    *)
2037      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2038      ;;
2039    esac |
2040    sort
2041)
2042    echo
2043
2044    $as_echo "## ----------------- ##
2045## Output variables. ##
2046## ----------------- ##"
2047    echo
2048    for ac_var in $ac_subst_vars
2049    do
2050      eval ac_val=\$$ac_var
2051      case $ac_val in
2052      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2053      esac
2054      $as_echo "$ac_var='\''$ac_val'\''"
2055    done | sort
2056    echo
2057
2058    if test -n "$ac_subst_files"; then
2059      $as_echo "## ------------------- ##
2060## File substitutions. ##
2061## ------------------- ##"
2062      echo
2063      for ac_var in $ac_subst_files
2064      do
2065	eval ac_val=\$$ac_var
2066	case $ac_val in
2067	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2068	esac
2069	$as_echo "$ac_var='\''$ac_val'\''"
2070      done | sort
2071      echo
2072    fi
2073
2074    if test -s confdefs.h; then
2075      $as_echo "## ----------- ##
2076## confdefs.h. ##
2077## ----------- ##"
2078      echo
2079      cat confdefs.h
2080      echo
2081    fi
2082    test "$ac_signal" != 0 &&
2083      $as_echo "$as_me: caught signal $ac_signal"
2084    $as_echo "$as_me: exit $exit_status"
2085  } >&5
2086  rm -f core *.core core.conftest.* &&
2087    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2088    exit $exit_status
2089' 0
2090for ac_signal in 1 2 13 15; do
2091  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2092done
2093ac_signal=0
2094
2095# confdefs.h avoids OS command line length limits that DEFS can exceed.
2096rm -f -r conftest* confdefs.h
2097
2098$as_echo "/* confdefs.h */" > confdefs.h
2099
2100# Predefined preprocessor variables.
2101
2102cat >>confdefs.h <<_ACEOF
2103#define PACKAGE_NAME "$PACKAGE_NAME"
2104_ACEOF
2105
2106cat >>confdefs.h <<_ACEOF
2107#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2108_ACEOF
2109
2110cat >>confdefs.h <<_ACEOF
2111#define PACKAGE_VERSION "$PACKAGE_VERSION"
2112_ACEOF
2113
2114cat >>confdefs.h <<_ACEOF
2115#define PACKAGE_STRING "$PACKAGE_STRING"
2116_ACEOF
2117
2118cat >>confdefs.h <<_ACEOF
2119#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2120_ACEOF
2121
2122cat >>confdefs.h <<_ACEOF
2123#define PACKAGE_URL "$PACKAGE_URL"
2124_ACEOF
2125
2126
2127# Let the site file select an alternate cache file if it wants to.
2128# Prefer an explicitly selected file to automatically selected ones.
2129ac_site_file1=NONE
2130ac_site_file2=NONE
2131if test -n "$CONFIG_SITE"; then
2132  # We do not want a PATH search for config.site.
2133  case $CONFIG_SITE in #((
2134    -*)  ac_site_file1=./$CONFIG_SITE;;
2135    */*) ac_site_file1=$CONFIG_SITE;;
2136    *)   ac_site_file1=./$CONFIG_SITE;;
2137  esac
2138elif test "x$prefix" != xNONE; then
2139  ac_site_file1=$prefix/share/config.site
2140  ac_site_file2=$prefix/etc/config.site
2141else
2142  ac_site_file1=$ac_default_prefix/share/config.site
2143  ac_site_file2=$ac_default_prefix/etc/config.site
2144fi
2145for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2146do
2147  test "x$ac_site_file" = xNONE && continue
2148  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2149    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2150$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2151    sed 's/^/| /' "$ac_site_file" >&5
2152    . "$ac_site_file" \
2153      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2154$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2155as_fn_error $? "failed to load site script $ac_site_file
2156See \`config.log' for more details" "$LINENO" 5; }
2157  fi
2158done
2159
2160if test -r "$cache_file"; then
2161  # Some versions of bash will fail to source /dev/null (special files
2162  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2163  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2164    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2165$as_echo "$as_me: loading cache $cache_file" >&6;}
2166    case $cache_file in
2167      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2168      *)                      . "./$cache_file";;
2169    esac
2170  fi
2171else
2172  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2173$as_echo "$as_me: creating cache $cache_file" >&6;}
2174  >$cache_file
2175fi
2176
2177# Check that the precious variables saved in the cache have kept the same
2178# value.
2179ac_cache_corrupted=false
2180for ac_var in $ac_precious_vars; do
2181  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2182  eval ac_new_set=\$ac_env_${ac_var}_set
2183  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2184  eval ac_new_val=\$ac_env_${ac_var}_value
2185  case $ac_old_set,$ac_new_set in
2186    set,)
2187      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2188$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2189      ac_cache_corrupted=: ;;
2190    ,set)
2191      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2192$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2193      ac_cache_corrupted=: ;;
2194    ,);;
2195    *)
2196      if test "x$ac_old_val" != "x$ac_new_val"; then
2197	# differences in whitespace do not lead to failure.
2198	ac_old_val_w=`echo x $ac_old_val`
2199	ac_new_val_w=`echo x $ac_new_val`
2200	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2201	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2202$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2203	  ac_cache_corrupted=:
2204	else
2205	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2206$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2207	  eval $ac_var=\$ac_old_val
2208	fi
2209	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2210$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2211	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2212$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2213      fi;;
2214  esac
2215  # Pass precious variables to config.status.
2216  if test "$ac_new_set" = set; then
2217    case $ac_new_val in
2218    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2219    *) ac_arg=$ac_var=$ac_new_val ;;
2220    esac
2221    case " $ac_configure_args " in
2222      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2223      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2224    esac
2225  fi
2226done
2227if $ac_cache_corrupted; then
2228  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2229$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2230  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2231$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2232  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2233fi
2234## -------------------- ##
2235## Main body of script. ##
2236## -------------------- ##
2237
2238ac_ext=c
2239ac_cpp='$CPP $CPPFLAGS'
2240ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2241ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2242ac_compiler_gnu=$ac_cv_c_compiler_gnu
2243
2244
2245
2246
2247    TEA_VERSION="3.13"
2248
2249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking TEA configuration" >&5
2250$as_echo_n "checking TEA configuration... " >&6; }
2251    if test x"${PACKAGE_NAME}" = x ; then
2252	as_fn_error $? "
2253The PACKAGE_NAME variable must be defined by your TEA configure.ac" "$LINENO" 5
2254    fi
2255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5
2256$as_echo "ok (TEA ${TEA_VERSION})" >&6; }
2257
2258    # If the user did not set CFLAGS, set it now to keep macros
2259    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
2260    if test "${CFLAGS+set}" != "set" ; then
2261	CFLAGS=""
2262    fi
2263
2264    case "`uname -s`" in
2265	*win32*|*WIN32*|*MINGW32_*|*MINGW64_*|*MSYS_*)
2266	    # Extract the first word of "cygpath", so it can be a program name with args.
2267set dummy cygpath; ac_word=$2
2268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2269$as_echo_n "checking for $ac_word... " >&6; }
2270if ${ac_cv_prog_CYGPATH+:} false; then :
2271  $as_echo_n "(cached) " >&6
2272else
2273  if test -n "$CYGPATH"; then
2274  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
2275else
2276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2277for as_dir in $PATH
2278do
2279  IFS=$as_save_IFS
2280  test -z "$as_dir" && as_dir=.
2281    for ac_exec_ext in '' $ac_executable_extensions; do
2282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2283    ac_cv_prog_CYGPATH="cygpath -m"
2284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2285    break 2
2286  fi
2287done
2288  done
2289IFS=$as_save_IFS
2290
2291  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
2292fi
2293fi
2294CYGPATH=$ac_cv_prog_CYGPATH
2295if test -n "$CYGPATH"; then
2296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
2297$as_echo "$CYGPATH" >&6; }
2298else
2299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2300$as_echo "no" >&6; }
2301fi
2302
2303
2304	    EXEEXT=".exe"
2305	    TEA_PLATFORM="windows"
2306	    ;;
2307	*CYGWIN_*)
2308	    EXEEXT=".exe"
2309	    # CYGPATH and TEA_PLATFORM are determined later in LOAD_TCLCONFIG
2310	    ;;
2311	*)
2312	    CYGPATH=echo
2313	    # Maybe we are cross-compiling....
2314	    case ${host_alias} in
2315		*mingw32*)
2316		EXEEXT=".exe"
2317		TEA_PLATFORM="windows"
2318		;;
2319	    *)
2320		EXEEXT=""
2321		TEA_PLATFORM="unix"
2322		;;
2323	    esac
2324	    ;;
2325    esac
2326
2327    # Check if exec_prefix is set. If not use fall back to prefix.
2328    # Note when adjusted, so that TEA_PREFIX can correct for this.
2329    # This is needed for recursive configures, since autoconf propagates
2330    # $prefix, but not $exec_prefix (doh!).
2331    if test x$exec_prefix = xNONE ; then
2332	exec_prefix_default=yes
2333	exec_prefix=$prefix
2334    fi
2335
2336    { $as_echo "$as_me:${as_lineno-$LINENO}: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&5
2337$as_echo "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;}
2338
2339
2340
2341
2342    # This package name must be replaced statically for AC_SUBST to work
2343
2344    # Substitute STUB_LIB_FILE in case package creates a stub library too.
2345
2346
2347    # We AC_SUBST these here to ensure they are subst'ed,
2348    # in case the user doesn't call TEA_ADD_...
2349
2350
2351
2352
2353
2354
2355
2356
2357    # Configure the installer.
2358
2359    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
2360    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
2361    INSTALL_DATA='${INSTALL} -m 644'
2362    INSTALL_PROGRAM='${INSTALL} -m 755'
2363    INSTALL_SCRIPT='${INSTALL} -m 755'
2364
2365
2366    { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
2367$as_echo_n "checking system version... " >&6; }
2368if ${tcl_cv_sys_version+:} false; then :
2369  $as_echo_n "(cached) " >&6
2370else
2371
2372	# TEA specific:
2373	if test "${TEA_PLATFORM}" = "windows" ; then
2374	    tcl_cv_sys_version=windows
2375	else
2376	    tcl_cv_sys_version=`uname -s`-`uname -r`
2377	    if test "$?" -ne 0 ; then
2378		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
2379$as_echo "$as_me: WARNING: can't find uname command" >&2;}
2380		tcl_cv_sys_version=unknown
2381	    else
2382		if test "`uname -s`" = "AIX" ; then
2383		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
2384		fi
2385		if test "`uname -s`" = "NetBSD" -a -f /etc/debian_version ; then
2386		    tcl_cv_sys_version=NetBSD-Debian
2387		fi
2388	    fi
2389	fi
2390
2391fi
2392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
2393$as_echo "$tcl_cv_sys_version" >&6; }
2394    system=$tcl_cv_sys_version
2395
2396    case $system in
2397	HP-UX-*) INSTALL_LIBRARY='${INSTALL} -m 755' ;;
2398	      *) INSTALL_LIBRARY='${INSTALL} -m 644' ;;
2399    esac
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410ac_aux_dir=
2411for ac_dir in ../tclconfig "$srcdir"/../tclconfig; do
2412  if test -f "$ac_dir/install-sh"; then
2413    ac_aux_dir=$ac_dir
2414    ac_install_sh="$ac_aux_dir/install-sh -c"
2415    break
2416  elif test -f "$ac_dir/install.sh"; then
2417    ac_aux_dir=$ac_dir
2418    ac_install_sh="$ac_aux_dir/install.sh -c"
2419    break
2420  elif test -f "$ac_dir/shtool"; then
2421    ac_aux_dir=$ac_dir
2422    ac_install_sh="$ac_aux_dir/shtool install -c"
2423    break
2424  fi
2425done
2426if test -z "$ac_aux_dir"; then
2427  as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../tclconfig \"$srcdir\"/../tclconfig" "$LINENO" 5
2428fi
2429
2430# These three variables are undocumented and unsupported,
2431# and are intended to be withdrawn in a future Autoconf release.
2432# They can cause serious problems if a builder's source tree is in a directory
2433# whose full name contains unusual characters.
2434ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2435ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2436ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2437
2438
2439
2440PHIMGTYPE="tiff"
2441CPACKAGE="Tkimgtiff"
2442PACKAGE_TCLNAME="img::tiff"
2443
2444
2445
2446#--------------------------------------------------------------------
2447# Load the tclConfig.sh file
2448# Load the tkConfig.sh file
2449#--------------------------------------------------------------------
2450
2451
2452
2453    #
2454    # Ok, lets find the tcl configuration
2455    # First, look for one uninstalled.
2456    # the alternative search directory is invoked by --with-tcl
2457    #
2458
2459    if test x"${no_tcl}" = x ; then
2460	# we reset no_tcl in case something fails here
2461	no_tcl=true
2462
2463# Check whether --with-tcl was given.
2464if test "${with_tcl+set}" = set; then :
2465  withval=$with_tcl; with_tclconfig="${withval}"
2466fi
2467
2468	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
2469$as_echo_n "checking for Tcl configuration... " >&6; }
2470	if ${ac_cv_c_tclconfig+:} false; then :
2471  $as_echo_n "(cached) " >&6
2472else
2473
2474
2475	    # First check to see if --with-tcl was specified.
2476	    if test x"${with_tclconfig}" != x ; then
2477		case "${with_tclconfig}" in
2478		    */tclConfig.sh )
2479			if test -f "${with_tclconfig}"; then
2480			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
2481$as_echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
2482			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
2483			fi ;;
2484		esac
2485		if test -f "${with_tclconfig}/tclConfig.sh" ; then
2486		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
2487		else
2488		    as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
2489		fi
2490	    fi
2491
2492	    # then check for a private Tcl installation
2493	    if test x"${ac_cv_c_tclconfig}" = x ; then
2494		for i in \
2495			../tcl \
2496			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2497			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
2498			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
2499			../../tcl \
2500			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2501			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
2502			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
2503			../../../tcl \
2504			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2505			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
2506			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
2507		    if test "${TEA_PLATFORM}" = "windows" \
2508			    -a -f "$i/win/tclConfig.sh" ; then
2509			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2510			break
2511		    fi
2512		    if test -f "$i/unix/tclConfig.sh" ; then
2513			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2514			break
2515		    fi
2516		done
2517	    fi
2518
2519	    # on Darwin, check in Framework installation locations
2520	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
2521		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2522			`ls -d /Library/Frameworks 2>/dev/null` \
2523			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2524			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Library/Frameworks/Tcl.framework 2>/dev/null` \
2525			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Network/Library/Frameworks/Tcl.framework 2>/dev/null` \
2526			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tcl.framework 2>/dev/null` \
2527			; do
2528		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
2529			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
2530			break
2531		    fi
2532		done
2533	    fi
2534
2535	    # TEA specific: on Windows, check in common installation locations
2536	    if test "${TEA_PLATFORM}" = "windows" \
2537		-a x"${ac_cv_c_tclconfig}" = x ; then
2538		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2539			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2540			; do
2541		    if test -f "$i/tclConfig.sh" ; then
2542			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2543			break
2544		    fi
2545		done
2546	    fi
2547
2548	    # check in a few common install locations
2549	    if test x"${ac_cv_c_tclconfig}" = x ; then
2550		for i in `ls -d ${libdir} 2>/dev/null` \
2551			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2552			`ls -d ${prefix}/lib 2>/dev/null` \
2553			`ls -d /usr/local/lib 2>/dev/null` \
2554			`ls -d /usr/contrib/lib 2>/dev/null` \
2555			`ls -d /usr/pkg/lib 2>/dev/null` \
2556			`ls -d /usr/lib 2>/dev/null` \
2557			`ls -d /usr/lib64 2>/dev/null` \
2558			`ls -d /usr/lib/tcl8.6 2>/dev/null` \
2559			`ls -d /usr/lib/tcl8.5 2>/dev/null` \
2560			`ls -d /usr/local/lib/tcl8.6 2>/dev/null` \
2561			`ls -d /usr/local/lib/tcl8.5 2>/dev/null` \
2562			`ls -d /usr/local/lib/tcl/tcl8.6 2>/dev/null` \
2563			`ls -d /usr/local/lib/tcl/tcl8.5 2>/dev/null` \
2564			; do
2565		    if test -f "$i/tclConfig.sh" ; then
2566			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2567			break
2568		    fi
2569		done
2570	    fi
2571
2572	    # check in a few other private locations
2573	    if test x"${ac_cv_c_tclconfig}" = x ; then
2574		for i in \
2575			${srcdir}/../tcl \
2576			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2577			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2578			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2579		    if test "${TEA_PLATFORM}" = "windows" \
2580			    -a -f "$i/win/tclConfig.sh" ; then
2581			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2582			break
2583		    fi
2584		    if test -f "$i/unix/tclConfig.sh" ; then
2585			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2586			break
2587		    fi
2588		done
2589	    fi
2590
2591fi
2592
2593
2594	if test x"${ac_cv_c_tclconfig}" = x ; then
2595	    TCL_BIN_DIR="# no Tcl configs found"
2596	    as_fn_error $? "Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" "$LINENO" 5
2597	else
2598	    no_tcl=
2599	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
2600	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2601$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2602	fi
2603    fi
2604
2605ac_ext=c
2606ac_cpp='$CPP $CPPFLAGS'
2607ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2608ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2609ac_compiler_gnu=$ac_cv_c_compiler_gnu
2610if test -n "$ac_tool_prefix"; then
2611  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2612set dummy ${ac_tool_prefix}gcc; ac_word=$2
2613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2614$as_echo_n "checking for $ac_word... " >&6; }
2615if ${ac_cv_prog_CC+:} false; then :
2616  $as_echo_n "(cached) " >&6
2617else
2618  if test -n "$CC"; then
2619  ac_cv_prog_CC="$CC" # Let the user override the test.
2620else
2621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2622for as_dir in $PATH
2623do
2624  IFS=$as_save_IFS
2625  test -z "$as_dir" && as_dir=.
2626    for ac_exec_ext in '' $ac_executable_extensions; do
2627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2628    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2630    break 2
2631  fi
2632done
2633  done
2634IFS=$as_save_IFS
2635
2636fi
2637fi
2638CC=$ac_cv_prog_CC
2639if test -n "$CC"; then
2640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2641$as_echo "$CC" >&6; }
2642else
2643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2644$as_echo "no" >&6; }
2645fi
2646
2647
2648fi
2649if test -z "$ac_cv_prog_CC"; then
2650  ac_ct_CC=$CC
2651  # Extract the first word of "gcc", so it can be a program name with args.
2652set dummy gcc; ac_word=$2
2653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2654$as_echo_n "checking for $ac_word... " >&6; }
2655if ${ac_cv_prog_ac_ct_CC+:} false; then :
2656  $as_echo_n "(cached) " >&6
2657else
2658  if test -n "$ac_ct_CC"; then
2659  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2660else
2661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2662for as_dir in $PATH
2663do
2664  IFS=$as_save_IFS
2665  test -z "$as_dir" && as_dir=.
2666    for ac_exec_ext in '' $ac_executable_extensions; do
2667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2668    ac_cv_prog_ac_ct_CC="gcc"
2669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2670    break 2
2671  fi
2672done
2673  done
2674IFS=$as_save_IFS
2675
2676fi
2677fi
2678ac_ct_CC=$ac_cv_prog_ac_ct_CC
2679if test -n "$ac_ct_CC"; then
2680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2681$as_echo "$ac_ct_CC" >&6; }
2682else
2683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2684$as_echo "no" >&6; }
2685fi
2686
2687  if test "x$ac_ct_CC" = x; then
2688    CC=""
2689  else
2690    case $cross_compiling:$ac_tool_warned in
2691yes:)
2692{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2693$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2694ac_tool_warned=yes ;;
2695esac
2696    CC=$ac_ct_CC
2697  fi
2698else
2699  CC="$ac_cv_prog_CC"
2700fi
2701
2702if test -z "$CC"; then
2703          if test -n "$ac_tool_prefix"; then
2704    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2705set dummy ${ac_tool_prefix}cc; ac_word=$2
2706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2707$as_echo_n "checking for $ac_word... " >&6; }
2708if ${ac_cv_prog_CC+:} false; then :
2709  $as_echo_n "(cached) " >&6
2710else
2711  if test -n "$CC"; then
2712  ac_cv_prog_CC="$CC" # Let the user override the test.
2713else
2714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2715for as_dir in $PATH
2716do
2717  IFS=$as_save_IFS
2718  test -z "$as_dir" && as_dir=.
2719    for ac_exec_ext in '' $ac_executable_extensions; do
2720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2721    ac_cv_prog_CC="${ac_tool_prefix}cc"
2722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2723    break 2
2724  fi
2725done
2726  done
2727IFS=$as_save_IFS
2728
2729fi
2730fi
2731CC=$ac_cv_prog_CC
2732if test -n "$CC"; then
2733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2734$as_echo "$CC" >&6; }
2735else
2736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2737$as_echo "no" >&6; }
2738fi
2739
2740
2741  fi
2742fi
2743if test -z "$CC"; then
2744  # Extract the first word of "cc", so it can be a program name with args.
2745set dummy cc; ac_word=$2
2746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2747$as_echo_n "checking for $ac_word... " >&6; }
2748if ${ac_cv_prog_CC+:} false; then :
2749  $as_echo_n "(cached) " >&6
2750else
2751  if test -n "$CC"; then
2752  ac_cv_prog_CC="$CC" # Let the user override the test.
2753else
2754  ac_prog_rejected=no
2755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2756for as_dir in $PATH
2757do
2758  IFS=$as_save_IFS
2759  test -z "$as_dir" && as_dir=.
2760    for ac_exec_ext in '' $ac_executable_extensions; do
2761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2762    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2763       ac_prog_rejected=yes
2764       continue
2765     fi
2766    ac_cv_prog_CC="cc"
2767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2768    break 2
2769  fi
2770done
2771  done
2772IFS=$as_save_IFS
2773
2774if test $ac_prog_rejected = yes; then
2775  # We found a bogon in the path, so make sure we never use it.
2776  set dummy $ac_cv_prog_CC
2777  shift
2778  if test $# != 0; then
2779    # We chose a different compiler from the bogus one.
2780    # However, it has the same basename, so the bogon will be chosen
2781    # first if we set CC to just the basename; use the full file name.
2782    shift
2783    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2784  fi
2785fi
2786fi
2787fi
2788CC=$ac_cv_prog_CC
2789if test -n "$CC"; then
2790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2791$as_echo "$CC" >&6; }
2792else
2793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2794$as_echo "no" >&6; }
2795fi
2796
2797
2798fi
2799if test -z "$CC"; then
2800  if test -n "$ac_tool_prefix"; then
2801  for ac_prog in cl.exe
2802  do
2803    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2804set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2806$as_echo_n "checking for $ac_word... " >&6; }
2807if ${ac_cv_prog_CC+:} false; then :
2808  $as_echo_n "(cached) " >&6
2809else
2810  if test -n "$CC"; then
2811  ac_cv_prog_CC="$CC" # Let the user override the test.
2812else
2813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2814for as_dir in $PATH
2815do
2816  IFS=$as_save_IFS
2817  test -z "$as_dir" && as_dir=.
2818    for ac_exec_ext in '' $ac_executable_extensions; do
2819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2820    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2822    break 2
2823  fi
2824done
2825  done
2826IFS=$as_save_IFS
2827
2828fi
2829fi
2830CC=$ac_cv_prog_CC
2831if test -n "$CC"; then
2832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2833$as_echo "$CC" >&6; }
2834else
2835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2836$as_echo "no" >&6; }
2837fi
2838
2839
2840    test -n "$CC" && break
2841  done
2842fi
2843if test -z "$CC"; then
2844  ac_ct_CC=$CC
2845  for ac_prog in cl.exe
2846do
2847  # Extract the first word of "$ac_prog", so it can be a program name with args.
2848set dummy $ac_prog; ac_word=$2
2849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2850$as_echo_n "checking for $ac_word... " >&6; }
2851if ${ac_cv_prog_ac_ct_CC+:} false; then :
2852  $as_echo_n "(cached) " >&6
2853else
2854  if test -n "$ac_ct_CC"; then
2855  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2856else
2857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2858for as_dir in $PATH
2859do
2860  IFS=$as_save_IFS
2861  test -z "$as_dir" && as_dir=.
2862    for ac_exec_ext in '' $ac_executable_extensions; do
2863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2864    ac_cv_prog_ac_ct_CC="$ac_prog"
2865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2866    break 2
2867  fi
2868done
2869  done
2870IFS=$as_save_IFS
2871
2872fi
2873fi
2874ac_ct_CC=$ac_cv_prog_ac_ct_CC
2875if test -n "$ac_ct_CC"; then
2876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2877$as_echo "$ac_ct_CC" >&6; }
2878else
2879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2880$as_echo "no" >&6; }
2881fi
2882
2883
2884  test -n "$ac_ct_CC" && break
2885done
2886
2887  if test "x$ac_ct_CC" = x; then
2888    CC=""
2889  else
2890    case $cross_compiling:$ac_tool_warned in
2891yes:)
2892{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2893$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2894ac_tool_warned=yes ;;
2895esac
2896    CC=$ac_ct_CC
2897  fi
2898fi
2899
2900fi
2901
2902
2903test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2905as_fn_error $? "no acceptable C compiler found in \$PATH
2906See \`config.log' for more details" "$LINENO" 5; }
2907
2908# Provide some information about the compiler.
2909$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2910set X $ac_compile
2911ac_compiler=$2
2912for ac_option in --version -v -V -qversion; do
2913  { { ac_try="$ac_compiler $ac_option >&5"
2914case "(($ac_try" in
2915  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2916  *) ac_try_echo=$ac_try;;
2917esac
2918eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2919$as_echo "$ac_try_echo"; } >&5
2920  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2921  ac_status=$?
2922  if test -s conftest.err; then
2923    sed '10a\
2924... rest of stderr output deleted ...
2925         10q' conftest.err >conftest.er1
2926    cat conftest.er1 >&5
2927  fi
2928  rm -f conftest.er1 conftest.err
2929  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2930  test $ac_status = 0; }
2931done
2932
2933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2934/* end confdefs.h.  */
2935
2936int
2937main ()
2938{
2939
2940  ;
2941  return 0;
2942}
2943_ACEOF
2944ac_clean_files_save=$ac_clean_files
2945ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2946# Try to create an executable without -o first, disregard a.out.
2947# It will help us diagnose broken compilers, and finding out an intuition
2948# of exeext.
2949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2950$as_echo_n "checking whether the C compiler works... " >&6; }
2951ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2952
2953# The possible output files:
2954ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2955
2956ac_rmfiles=
2957for ac_file in $ac_files
2958do
2959  case $ac_file in
2960    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2961    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2962  esac
2963done
2964rm -f $ac_rmfiles
2965
2966if { { ac_try="$ac_link_default"
2967case "(($ac_try" in
2968  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2969  *) ac_try_echo=$ac_try;;
2970esac
2971eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2972$as_echo "$ac_try_echo"; } >&5
2973  (eval "$ac_link_default") 2>&5
2974  ac_status=$?
2975  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2976  test $ac_status = 0; }; then :
2977  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2978# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2979# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2980# so that the user can short-circuit this test for compilers unknown to
2981# Autoconf.
2982for ac_file in $ac_files ''
2983do
2984  test -f "$ac_file" || continue
2985  case $ac_file in
2986    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2987	;;
2988    [ab].out )
2989	# We found the default executable, but exeext='' is most
2990	# certainly right.
2991	break;;
2992    *.* )
2993	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2994	then :; else
2995	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2996	fi
2997	# We set ac_cv_exeext here because the later test for it is not
2998	# safe: cross compilers may not add the suffix if given an `-o'
2999	# argument, so we may need to know it at that point already.
3000	# Even if this section looks crufty: it has the advantage of
3001	# actually working.
3002	break;;
3003    * )
3004	break;;
3005  esac
3006done
3007test "$ac_cv_exeext" = no && ac_cv_exeext=
3008
3009else
3010  ac_file=''
3011fi
3012if test -z "$ac_file"; then :
3013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3014$as_echo "no" >&6; }
3015$as_echo "$as_me: failed program was:" >&5
3016sed 's/^/| /' conftest.$ac_ext >&5
3017
3018{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3020as_fn_error 77 "C compiler cannot create executables
3021See \`config.log' for more details" "$LINENO" 5; }
3022else
3023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3024$as_echo "yes" >&6; }
3025fi
3026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3027$as_echo_n "checking for C compiler default output file name... " >&6; }
3028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3029$as_echo "$ac_file" >&6; }
3030ac_exeext=$ac_cv_exeext
3031
3032rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3033ac_clean_files=$ac_clean_files_save
3034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3035$as_echo_n "checking for suffix of executables... " >&6; }
3036if { { ac_try="$ac_link"
3037case "(($ac_try" in
3038  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3039  *) ac_try_echo=$ac_try;;
3040esac
3041eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3042$as_echo "$ac_try_echo"; } >&5
3043  (eval "$ac_link") 2>&5
3044  ac_status=$?
3045  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3046  test $ac_status = 0; }; then :
3047  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3048# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3049# work properly (i.e., refer to `conftest.exe'), while it won't with
3050# `rm'.
3051for ac_file in conftest.exe conftest conftest.*; do
3052  test -f "$ac_file" || continue
3053  case $ac_file in
3054    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3055    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3056	  break;;
3057    * ) break;;
3058  esac
3059done
3060else
3061  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3062$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3063as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3064See \`config.log' for more details" "$LINENO" 5; }
3065fi
3066rm -f conftest conftest$ac_cv_exeext
3067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3068$as_echo "$ac_cv_exeext" >&6; }
3069
3070rm -f conftest.$ac_ext
3071EXEEXT=$ac_cv_exeext
3072ac_exeext=$EXEEXT
3073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3074/* end confdefs.h.  */
3075#include <stdio.h>
3076int
3077main ()
3078{
3079FILE *f = fopen ("conftest.out", "w");
3080 return ferror (f) || fclose (f) != 0;
3081
3082  ;
3083  return 0;
3084}
3085_ACEOF
3086ac_clean_files="$ac_clean_files conftest.out"
3087# Check that the compiler produces executables we can run.  If not, either
3088# the compiler is broken, or we cross compile.
3089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3090$as_echo_n "checking whether we are cross compiling... " >&6; }
3091if test "$cross_compiling" != yes; then
3092  { { ac_try="$ac_link"
3093case "(($ac_try" in
3094  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3095  *) ac_try_echo=$ac_try;;
3096esac
3097eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3098$as_echo "$ac_try_echo"; } >&5
3099  (eval "$ac_link") 2>&5
3100  ac_status=$?
3101  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3102  test $ac_status = 0; }
3103  if { ac_try='./conftest$ac_cv_exeext'
3104  { { case "(($ac_try" in
3105  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3106  *) ac_try_echo=$ac_try;;
3107esac
3108eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3109$as_echo "$ac_try_echo"; } >&5
3110  (eval "$ac_try") 2>&5
3111  ac_status=$?
3112  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3113  test $ac_status = 0; }; }; then
3114    cross_compiling=no
3115  else
3116    if test "$cross_compiling" = maybe; then
3117	cross_compiling=yes
3118    else
3119	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3120$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3121as_fn_error $? "cannot run C compiled programs.
3122If you meant to cross compile, use \`--host'.
3123See \`config.log' for more details" "$LINENO" 5; }
3124    fi
3125  fi
3126fi
3127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3128$as_echo "$cross_compiling" >&6; }
3129
3130rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3131ac_clean_files=$ac_clean_files_save
3132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3133$as_echo_n "checking for suffix of object files... " >&6; }
3134if ${ac_cv_objext+:} false; then :
3135  $as_echo_n "(cached) " >&6
3136else
3137  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3138/* end confdefs.h.  */
3139
3140int
3141main ()
3142{
3143
3144  ;
3145  return 0;
3146}
3147_ACEOF
3148rm -f conftest.o conftest.obj
3149if { { ac_try="$ac_compile"
3150case "(($ac_try" in
3151  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3152  *) ac_try_echo=$ac_try;;
3153esac
3154eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3155$as_echo "$ac_try_echo"; } >&5
3156  (eval "$ac_compile") 2>&5
3157  ac_status=$?
3158  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3159  test $ac_status = 0; }; then :
3160  for ac_file in conftest.o conftest.obj conftest.*; do
3161  test -f "$ac_file" || continue;
3162  case $ac_file in
3163    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3164    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3165       break;;
3166  esac
3167done
3168else
3169  $as_echo "$as_me: failed program was:" >&5
3170sed 's/^/| /' conftest.$ac_ext >&5
3171
3172{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3174as_fn_error $? "cannot compute suffix of object files: cannot compile
3175See \`config.log' for more details" "$LINENO" 5; }
3176fi
3177rm -f conftest.$ac_cv_objext conftest.$ac_ext
3178fi
3179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3180$as_echo "$ac_cv_objext" >&6; }
3181OBJEXT=$ac_cv_objext
3182ac_objext=$OBJEXT
3183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3184$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3185if ${ac_cv_c_compiler_gnu+:} false; then :
3186  $as_echo_n "(cached) " >&6
3187else
3188  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3189/* end confdefs.h.  */
3190
3191int
3192main ()
3193{
3194#ifndef __GNUC__
3195       choke me
3196#endif
3197
3198  ;
3199  return 0;
3200}
3201_ACEOF
3202if ac_fn_c_try_compile "$LINENO"; then :
3203  ac_compiler_gnu=yes
3204else
3205  ac_compiler_gnu=no
3206fi
3207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3208ac_cv_c_compiler_gnu=$ac_compiler_gnu
3209
3210fi
3211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3212$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3213if test $ac_compiler_gnu = yes; then
3214  GCC=yes
3215else
3216  GCC=
3217fi
3218ac_test_CFLAGS=${CFLAGS+set}
3219ac_save_CFLAGS=$CFLAGS
3220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3221$as_echo_n "checking whether $CC accepts -g... " >&6; }
3222if ${ac_cv_prog_cc_g+:} false; then :
3223  $as_echo_n "(cached) " >&6
3224else
3225  ac_save_c_werror_flag=$ac_c_werror_flag
3226   ac_c_werror_flag=yes
3227   ac_cv_prog_cc_g=no
3228   CFLAGS="-g"
3229   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3230/* end confdefs.h.  */
3231
3232int
3233main ()
3234{
3235
3236  ;
3237  return 0;
3238}
3239_ACEOF
3240if ac_fn_c_try_compile "$LINENO"; then :
3241  ac_cv_prog_cc_g=yes
3242else
3243  CFLAGS=""
3244      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3245/* end confdefs.h.  */
3246
3247int
3248main ()
3249{
3250
3251  ;
3252  return 0;
3253}
3254_ACEOF
3255if ac_fn_c_try_compile "$LINENO"; then :
3256
3257else
3258  ac_c_werror_flag=$ac_save_c_werror_flag
3259	 CFLAGS="-g"
3260	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3261/* end confdefs.h.  */
3262
3263int
3264main ()
3265{
3266
3267  ;
3268  return 0;
3269}
3270_ACEOF
3271if ac_fn_c_try_compile "$LINENO"; then :
3272  ac_cv_prog_cc_g=yes
3273fi
3274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3275fi
3276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3277fi
3278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3279   ac_c_werror_flag=$ac_save_c_werror_flag
3280fi
3281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3282$as_echo "$ac_cv_prog_cc_g" >&6; }
3283if test "$ac_test_CFLAGS" = set; then
3284  CFLAGS=$ac_save_CFLAGS
3285elif test $ac_cv_prog_cc_g = yes; then
3286  if test "$GCC" = yes; then
3287    CFLAGS="-g -O2"
3288  else
3289    CFLAGS="-g"
3290  fi
3291else
3292  if test "$GCC" = yes; then
3293    CFLAGS="-O2"
3294  else
3295    CFLAGS=
3296  fi
3297fi
3298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3299$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3300if ${ac_cv_prog_cc_c89+:} false; then :
3301  $as_echo_n "(cached) " >&6
3302else
3303  ac_cv_prog_cc_c89=no
3304ac_save_CC=$CC
3305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3306/* end confdefs.h.  */
3307#include <stdarg.h>
3308#include <stdio.h>
3309struct stat;
3310/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3311struct buf { int x; };
3312FILE * (*rcsopen) (struct buf *, struct stat *, int);
3313static char *e (p, i)
3314     char **p;
3315     int i;
3316{
3317  return p[i];
3318}
3319static char *f (char * (*g) (char **, int), char **p, ...)
3320{
3321  char *s;
3322  va_list v;
3323  va_start (v,p);
3324  s = g (p, va_arg (v,int));
3325  va_end (v);
3326  return s;
3327}
3328
3329/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3330   function prototypes and stuff, but not '\xHH' hex character constants.
3331   These don't provoke an error unfortunately, instead are silently treated
3332   as 'x'.  The following induces an error, until -std is added to get
3333   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3334   array size at least.  It's necessary to write '\x00'==0 to get something
3335   that's true only with -std.  */
3336int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3337
3338/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3339   inside strings and character constants.  */
3340#define FOO(x) 'x'
3341int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3342
3343int test (int i, double x);
3344struct s1 {int (*f) (int a);};
3345struct s2 {int (*f) (double a);};
3346int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3347int argc;
3348char **argv;
3349int
3350main ()
3351{
3352return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3353  ;
3354  return 0;
3355}
3356_ACEOF
3357for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3358	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3359do
3360  CC="$ac_save_CC $ac_arg"
3361  if ac_fn_c_try_compile "$LINENO"; then :
3362  ac_cv_prog_cc_c89=$ac_arg
3363fi
3364rm -f core conftest.err conftest.$ac_objext
3365  test "x$ac_cv_prog_cc_c89" != "xno" && break
3366done
3367rm -f conftest.$ac_ext
3368CC=$ac_save_CC
3369
3370fi
3371# AC_CACHE_VAL
3372case "x$ac_cv_prog_cc_c89" in
3373  x)
3374    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3375$as_echo "none needed" >&6; } ;;
3376  xno)
3377    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3378$as_echo "unsupported" >&6; } ;;
3379  *)
3380    CC="$CC $ac_cv_prog_cc_c89"
3381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3382$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3383esac
3384if test "x$ac_cv_prog_cc_c89" != xno; then :
3385
3386fi
3387
3388ac_ext=c
3389ac_cpp='$CPP $CPPFLAGS'
3390ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3391ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3392ac_compiler_gnu=$ac_cv_c_compiler_gnu
3393
3394
3395
3396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
3397$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
3398
3399    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
3400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
3401$as_echo "loading" >&6; }
3402	. "${TCL_BIN_DIR}/tclConfig.sh"
3403    else
3404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
3405$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
3406    fi
3407
3408    # If the TCL_BIN_DIR is the build directory (not the install directory),
3409    # then set the common variable name to the value of the build variables.
3410    # For example, the variable TCL_LIB_SPEC will be set to the value
3411    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
3412    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
3413    # installed and uninstalled version of Tcl.
3414    if test -f "${TCL_BIN_DIR}/Makefile" ; then
3415        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
3416        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
3417        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
3418    elif test "`uname -s`" = "Darwin"; then
3419	# If Tcl was built as a framework, attempt to use the libraries
3420	# from the framework at the given location so that linking works
3421	# against Tcl.framework installed in an arbitrary location.
3422	case ${TCL_DEFS} in
3423	    *TCL_FRAMEWORK*)
3424		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
3425		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
3426			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
3427			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
3428			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
3429			    break
3430			fi
3431		    done
3432		fi
3433		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
3434		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
3435		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
3436		fi
3437		;;
3438	esac
3439    fi
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking platform" >&5
3455$as_echo_n "checking platform... " >&6; }
3456    hold_cc=$CC; CC="$TCL_CC"
3457    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3458/* end confdefs.h.  */
3459
3460int
3461main ()
3462{
3463
3464	    #ifdef _WIN32
3465		#error win32
3466	    #endif
3467
3468  ;
3469  return 0;
3470}
3471_ACEOF
3472if ac_fn_c_try_compile "$LINENO"; then :
3473
3474	    # first test we've already retrieved platform (cross-compile), fallback to unix otherwise:
3475	    TEA_PLATFORM="${TEA_PLATFORM-unix}"
3476	    CYGPATH=echo
3477
3478else
3479
3480	    TEA_PLATFORM="windows"
3481	    # Extract the first word of "cygpath", so it can be a program name with args.
3482set dummy cygpath; ac_word=$2
3483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3484$as_echo_n "checking for $ac_word... " >&6; }
3485if ${ac_cv_prog_CYGPATH+:} false; then :
3486  $as_echo_n "(cached) " >&6
3487else
3488  if test -n "$CYGPATH"; then
3489  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
3490else
3491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3492for as_dir in $PATH
3493do
3494  IFS=$as_save_IFS
3495  test -z "$as_dir" && as_dir=.
3496    for ac_exec_ext in '' $ac_executable_extensions; do
3497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3498    ac_cv_prog_CYGPATH="cygpath -m"
3499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3500    break 2
3501  fi
3502done
3503  done
3504IFS=$as_save_IFS
3505
3506  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
3507fi
3508fi
3509CYGPATH=$ac_cv_prog_CYGPATH
3510if test -n "$CYGPATH"; then
3511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
3512$as_echo "$CYGPATH" >&6; }
3513else
3514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3515$as_echo "no" >&6; }
3516fi
3517
3518
3519
3520fi
3521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3522    CC=$hold_cc
3523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEA_PLATFORM" >&5
3524$as_echo "$TEA_PLATFORM" >&6; }
3525
3526    # The BUILD_$pkg is to define the correct extern storage class
3527    # handling when making this package
3528
3529cat >>confdefs.h <<_ACEOF
3530#define BUILD_${PACKAGE_NAME} /**/
3531_ACEOF
3532
3533    # Do this here as we have fully defined TEA_PLATFORM now
3534    if test "${TEA_PLATFORM}" = "windows" ; then
3535	EXEEXT=".exe"
3536	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
3537    fi
3538
3539    # TEA specific:
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549    #
3550    # Ok, lets find the tk configuration
3551    # First, look for one uninstalled.
3552    # the alternative search directory is invoked by --with-tk
3553    #
3554
3555    if test x"${no_tk}" = x ; then
3556	# we reset no_tk in case something fails here
3557	no_tk=true
3558
3559# Check whether --with-tk was given.
3560if test "${with_tk+set}" = set; then :
3561  withval=$with_tk; with_tkconfig="${withval}"
3562fi
3563
3564	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
3565$as_echo_n "checking for Tk configuration... " >&6; }
3566	if ${ac_cv_c_tkconfig+:} false; then :
3567  $as_echo_n "(cached) " >&6
3568else
3569
3570
3571	    # First check to see if --with-tkconfig was specified.
3572	    if test x"${with_tkconfig}" != x ; then
3573		case "${with_tkconfig}" in
3574		    */tkConfig.sh )
3575			if test -f "${with_tkconfig}"; then
3576			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&5
3577$as_echo "$as_me: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&2;}
3578			    with_tkconfig="`echo "${with_tkconfig}" | sed 's!/tkConfig\.sh$!!'`"
3579			fi ;;
3580		esac
3581		if test -f "${with_tkconfig}/tkConfig.sh" ; then
3582		    ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`"
3583		else
3584		    as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
3585		fi
3586	    fi
3587
3588	    # then check for a private Tk library
3589	    if test x"${ac_cv_c_tkconfig}" = x ; then
3590		for i in \
3591			../tk \
3592			`ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
3593			`ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
3594			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
3595			../../tk \
3596			`ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
3597			`ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
3598			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
3599			../../../tk \
3600			`ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
3601			`ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
3602			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
3603		    if test "${TEA_PLATFORM}" = "windows" \
3604			    -a -f "$i/win/tkConfig.sh" ; then
3605			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
3606			break
3607		    fi
3608		    if test -f "$i/unix/tkConfig.sh" ; then
3609			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
3610			break
3611		    fi
3612		done
3613	    fi
3614
3615	    # on Darwin, check in Framework installation locations
3616	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
3617		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
3618			`ls -d /Library/Frameworks 2>/dev/null` \
3619			`ls -d /Network/Library/Frameworks 2>/dev/null` \
3620			; do
3621		    if test -f "$i/Tk.framework/tkConfig.sh" ; then
3622			ac_cv_c_tkconfig="`(cd $i/Tk.framework; pwd)`"
3623			break
3624		    fi
3625		done
3626	    fi
3627
3628	    # check in a few common install locations
3629	    if test x"${ac_cv_c_tkconfig}" = x ; then
3630		for i in `ls -d ${libdir} 2>/dev/null` \
3631			`ls -d ${exec_prefix}/lib 2>/dev/null` \
3632			`ls -d ${prefix}/lib 2>/dev/null` \
3633			`ls -d /usr/local/lib 2>/dev/null` \
3634			`ls -d /usr/contrib/lib 2>/dev/null` \
3635			`ls -d /usr/pkg/lib 2>/dev/null` \
3636			`ls -d /usr/lib/tk8.6 2>/dev/null` \
3637			`ls -d /usr/lib/tk8.5 2>/dev/null` \
3638			`ls -d /usr/lib 2>/dev/null` \
3639			`ls -d /usr/lib64 2>/dev/null` \
3640			`ls -d /usr/local/lib/tk8.6 2>/dev/null` \
3641			`ls -d /usr/local/lib/tk8.5 2>/dev/null` \
3642			`ls -d /usr/local/lib/tcl/tk8.6 2>/dev/null` \
3643			`ls -d /usr/local/lib/tcl/tk8.5 2>/dev/null` \
3644			; do
3645		    if test -f "$i/tkConfig.sh" ; then
3646			ac_cv_c_tkconfig="`(cd $i; pwd)`"
3647			break
3648		    fi
3649		done
3650	    fi
3651
3652	    # TEA specific: on Windows, check in common installation locations
3653	    if test "${TEA_PLATFORM}" = "windows" \
3654		-a x"${ac_cv_c_tkconfig}" = x ; then
3655		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
3656			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
3657			; do
3658		    if test -f "$i/tkConfig.sh" ; then
3659			ac_cv_c_tkconfig="`(cd $i; pwd)`"
3660			break
3661		    fi
3662		done
3663	    fi
3664
3665	    # check in a few other private locations
3666	    if test x"${ac_cv_c_tkconfig}" = x ; then
3667		for i in \
3668			${srcdir}/../tk \
3669			`ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
3670			`ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
3671			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
3672		    if test "${TEA_PLATFORM}" = "windows" \
3673			    -a -f "$i/win/tkConfig.sh" ; then
3674			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
3675			break
3676		    fi
3677		    if test -f "$i/unix/tkConfig.sh" ; then
3678			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
3679			break
3680		    fi
3681		done
3682	    fi
3683
3684fi
3685
3686
3687	if test x"${ac_cv_c_tkconfig}" = x ; then
3688	    TK_BIN_DIR="# no Tk configs found"
3689	    as_fn_error $? "Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh" "$LINENO" 5
3690	else
3691	    no_tk=
3692	    TK_BIN_DIR="${ac_cv_c_tkconfig}"
3693	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
3694$as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3695	fi
3696    fi
3697
3698
3699    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
3700$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
3701
3702    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
3703        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
3704$as_echo "loading" >&6; }
3705	. "${TK_BIN_DIR}/tkConfig.sh"
3706    else
3707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
3708$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3709    fi
3710
3711    # If the TK_BIN_DIR is the build directory (not the install directory),
3712    # then set the common variable name to the value of the build variables.
3713    # For example, the variable TK_LIB_SPEC will be set to the value
3714    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
3715    # instead of TK_BUILD_LIB_SPEC since it will work with both an
3716    # installed and uninstalled version of Tcl.
3717    if test -f "${TK_BIN_DIR}/Makefile" ; then
3718        TK_LIB_SPEC="${TK_BUILD_LIB_SPEC}"
3719        TK_STUB_LIB_SPEC="${TK_BUILD_STUB_LIB_SPEC}"
3720        TK_STUB_LIB_PATH="${TK_BUILD_STUB_LIB_PATH}"
3721    elif test "`uname -s`" = "Darwin"; then
3722	# If Tk was built as a framework, attempt to use the libraries
3723	# from the framework at the given location so that linking works
3724	# against Tk.framework installed in an arbitrary location.
3725	case ${TK_DEFS} in
3726	    *TK_FRAMEWORK*)
3727		if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
3728		    for i in "`cd "${TK_BIN_DIR}"; pwd`" \
3729			     "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
3730			if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
3731			    TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
3732			    break
3733			fi
3734		    done
3735		fi
3736		if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
3737		    TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
3738		    TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
3739		fi
3740		;;
3741	esac
3742    fi
3743
3744    # TEA specific: Ensure windowingsystem is defined
3745    if test "${TEA_PLATFORM}" = "unix" ; then
3746	case ${TK_DEFS} in
3747	    *MAC_OSX_TK*)
3748
3749$as_echo "#define MAC_OSX_TK 1" >>confdefs.h
3750
3751		TEA_WINDOWINGSYSTEM="aqua"
3752		;;
3753	    *)
3754		TEA_WINDOWINGSYSTEM="x11"
3755		;;
3756	esac
3757    elif test "${TEA_PLATFORM}" = "windows" ; then
3758	TEA_WINDOWINGSYSTEM="win32"
3759    fi
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773    # TEA specific:
3774
3775
3776
3777
3778#-----------------------------------------------------------------------
3779# Handle the --prefix=... option by defaulting to what Tcl gave.
3780# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
3781#-----------------------------------------------------------------------
3782
3783
3784    if test "${prefix}" = "NONE"; then
3785	prefix_default=yes
3786	if test x"${TCL_PREFIX}" != x; then
3787	    { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
3788$as_echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
3789	    prefix=${TCL_PREFIX}
3790	else
3791	    { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to /usr/local" >&5
3792$as_echo "$as_me: --prefix defaulting to /usr/local" >&6;}
3793	    prefix=/usr/local
3794	fi
3795    fi
3796    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
3797	-o x"${exec_prefix_default}" = x"yes" ; then
3798	if test x"${TCL_EXEC_PREFIX}" != x; then
3799	    { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
3800$as_echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
3801	    exec_prefix=${TCL_EXEC_PREFIX}
3802	else
3803	    { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to ${prefix}" >&5
3804$as_echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
3805	    exec_prefix=$prefix
3806	fi
3807    fi
3808
3809
3810#-----------------------------------------------------------------------
3811# Standard compiler checks.
3812# This sets up CC by using the CC env var, or looks for gcc otherwise.
3813# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
3814# the basic setup necessary to compile executables.
3815#-----------------------------------------------------------------------
3816
3817
3818    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
3819    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
3820
3821    ac_ext=c
3822ac_cpp='$CPP $CPPFLAGS'
3823ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3824ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3825ac_compiler_gnu=$ac_cv_c_compiler_gnu
3826if test -n "$ac_tool_prefix"; then
3827  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3828set dummy ${ac_tool_prefix}gcc; ac_word=$2
3829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3830$as_echo_n "checking for $ac_word... " >&6; }
3831if ${ac_cv_prog_CC+:} false; then :
3832  $as_echo_n "(cached) " >&6
3833else
3834  if test -n "$CC"; then
3835  ac_cv_prog_CC="$CC" # Let the user override the test.
3836else
3837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3838for as_dir in $PATH
3839do
3840  IFS=$as_save_IFS
3841  test -z "$as_dir" && as_dir=.
3842    for ac_exec_ext in '' $ac_executable_extensions; do
3843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3844    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3846    break 2
3847  fi
3848done
3849  done
3850IFS=$as_save_IFS
3851
3852fi
3853fi
3854CC=$ac_cv_prog_CC
3855if test -n "$CC"; then
3856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3857$as_echo "$CC" >&6; }
3858else
3859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3860$as_echo "no" >&6; }
3861fi
3862
3863
3864fi
3865if test -z "$ac_cv_prog_CC"; then
3866  ac_ct_CC=$CC
3867  # Extract the first word of "gcc", so it can be a program name with args.
3868set dummy gcc; ac_word=$2
3869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3870$as_echo_n "checking for $ac_word... " >&6; }
3871if ${ac_cv_prog_ac_ct_CC+:} false; then :
3872  $as_echo_n "(cached) " >&6
3873else
3874  if test -n "$ac_ct_CC"; then
3875  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3876else
3877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3878for as_dir in $PATH
3879do
3880  IFS=$as_save_IFS
3881  test -z "$as_dir" && as_dir=.
3882    for ac_exec_ext in '' $ac_executable_extensions; do
3883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3884    ac_cv_prog_ac_ct_CC="gcc"
3885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3886    break 2
3887  fi
3888done
3889  done
3890IFS=$as_save_IFS
3891
3892fi
3893fi
3894ac_ct_CC=$ac_cv_prog_ac_ct_CC
3895if test -n "$ac_ct_CC"; then
3896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3897$as_echo "$ac_ct_CC" >&6; }
3898else
3899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3900$as_echo "no" >&6; }
3901fi
3902
3903  if test "x$ac_ct_CC" = x; then
3904    CC=""
3905  else
3906    case $cross_compiling:$ac_tool_warned in
3907yes:)
3908{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3909$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3910ac_tool_warned=yes ;;
3911esac
3912    CC=$ac_ct_CC
3913  fi
3914else
3915  CC="$ac_cv_prog_CC"
3916fi
3917
3918if test -z "$CC"; then
3919          if test -n "$ac_tool_prefix"; then
3920    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3921set dummy ${ac_tool_prefix}cc; ac_word=$2
3922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3923$as_echo_n "checking for $ac_word... " >&6; }
3924if ${ac_cv_prog_CC+:} false; then :
3925  $as_echo_n "(cached) " >&6
3926else
3927  if test -n "$CC"; then
3928  ac_cv_prog_CC="$CC" # Let the user override the test.
3929else
3930as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3931for as_dir in $PATH
3932do
3933  IFS=$as_save_IFS
3934  test -z "$as_dir" && as_dir=.
3935    for ac_exec_ext in '' $ac_executable_extensions; do
3936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3937    ac_cv_prog_CC="${ac_tool_prefix}cc"
3938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3939    break 2
3940  fi
3941done
3942  done
3943IFS=$as_save_IFS
3944
3945fi
3946fi
3947CC=$ac_cv_prog_CC
3948if test -n "$CC"; then
3949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3950$as_echo "$CC" >&6; }
3951else
3952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3953$as_echo "no" >&6; }
3954fi
3955
3956
3957  fi
3958fi
3959if test -z "$CC"; then
3960  # Extract the first word of "cc", so it can be a program name with args.
3961set dummy cc; ac_word=$2
3962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3963$as_echo_n "checking for $ac_word... " >&6; }
3964if ${ac_cv_prog_CC+:} false; then :
3965  $as_echo_n "(cached) " >&6
3966else
3967  if test -n "$CC"; then
3968  ac_cv_prog_CC="$CC" # Let the user override the test.
3969else
3970  ac_prog_rejected=no
3971as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3972for as_dir in $PATH
3973do
3974  IFS=$as_save_IFS
3975  test -z "$as_dir" && as_dir=.
3976    for ac_exec_ext in '' $ac_executable_extensions; do
3977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3978    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3979       ac_prog_rejected=yes
3980       continue
3981     fi
3982    ac_cv_prog_CC="cc"
3983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3984    break 2
3985  fi
3986done
3987  done
3988IFS=$as_save_IFS
3989
3990if test $ac_prog_rejected = yes; then
3991  # We found a bogon in the path, so make sure we never use it.
3992  set dummy $ac_cv_prog_CC
3993  shift
3994  if test $# != 0; then
3995    # We chose a different compiler from the bogus one.
3996    # However, it has the same basename, so the bogon will be chosen
3997    # first if we set CC to just the basename; use the full file name.
3998    shift
3999    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4000  fi
4001fi
4002fi
4003fi
4004CC=$ac_cv_prog_CC
4005if test -n "$CC"; then
4006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4007$as_echo "$CC" >&6; }
4008else
4009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4010$as_echo "no" >&6; }
4011fi
4012
4013
4014fi
4015if test -z "$CC"; then
4016  if test -n "$ac_tool_prefix"; then
4017  for ac_prog in cl.exe
4018  do
4019    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4020set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4022$as_echo_n "checking for $ac_word... " >&6; }
4023if ${ac_cv_prog_CC+:} false; then :
4024  $as_echo_n "(cached) " >&6
4025else
4026  if test -n "$CC"; then
4027  ac_cv_prog_CC="$CC" # Let the user override the test.
4028else
4029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4030for as_dir in $PATH
4031do
4032  IFS=$as_save_IFS
4033  test -z "$as_dir" && as_dir=.
4034    for ac_exec_ext in '' $ac_executable_extensions; do
4035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4036    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4038    break 2
4039  fi
4040done
4041  done
4042IFS=$as_save_IFS
4043
4044fi
4045fi
4046CC=$ac_cv_prog_CC
4047if test -n "$CC"; then
4048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4049$as_echo "$CC" >&6; }
4050else
4051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4052$as_echo "no" >&6; }
4053fi
4054
4055
4056    test -n "$CC" && break
4057  done
4058fi
4059if test -z "$CC"; then
4060  ac_ct_CC=$CC
4061  for ac_prog in cl.exe
4062do
4063  # Extract the first word of "$ac_prog", so it can be a program name with args.
4064set dummy $ac_prog; ac_word=$2
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4066$as_echo_n "checking for $ac_word... " >&6; }
4067if ${ac_cv_prog_ac_ct_CC+:} false; then :
4068  $as_echo_n "(cached) " >&6
4069else
4070  if test -n "$ac_ct_CC"; then
4071  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4072else
4073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4074for as_dir in $PATH
4075do
4076  IFS=$as_save_IFS
4077  test -z "$as_dir" && as_dir=.
4078    for ac_exec_ext in '' $ac_executable_extensions; do
4079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4080    ac_cv_prog_ac_ct_CC="$ac_prog"
4081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4082    break 2
4083  fi
4084done
4085  done
4086IFS=$as_save_IFS
4087
4088fi
4089fi
4090ac_ct_CC=$ac_cv_prog_ac_ct_CC
4091if test -n "$ac_ct_CC"; then
4092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4093$as_echo "$ac_ct_CC" >&6; }
4094else
4095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4096$as_echo "no" >&6; }
4097fi
4098
4099
4100  test -n "$ac_ct_CC" && break
4101done
4102
4103  if test "x$ac_ct_CC" = x; then
4104    CC=""
4105  else
4106    case $cross_compiling:$ac_tool_warned in
4107yes:)
4108{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4109$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4110ac_tool_warned=yes ;;
4111esac
4112    CC=$ac_ct_CC
4113  fi
4114fi
4115
4116fi
4117
4118
4119test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4120$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4121as_fn_error $? "no acceptable C compiler found in \$PATH
4122See \`config.log' for more details" "$LINENO" 5; }
4123
4124# Provide some information about the compiler.
4125$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4126set X $ac_compile
4127ac_compiler=$2
4128for ac_option in --version -v -V -qversion; do
4129  { { ac_try="$ac_compiler $ac_option >&5"
4130case "(($ac_try" in
4131  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4132  *) ac_try_echo=$ac_try;;
4133esac
4134eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4135$as_echo "$ac_try_echo"; } >&5
4136  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4137  ac_status=$?
4138  if test -s conftest.err; then
4139    sed '10a\
4140... rest of stderr output deleted ...
4141         10q' conftest.err >conftest.er1
4142    cat conftest.er1 >&5
4143  fi
4144  rm -f conftest.er1 conftest.err
4145  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4146  test $ac_status = 0; }
4147done
4148
4149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4150$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4151if ${ac_cv_c_compiler_gnu+:} false; then :
4152  $as_echo_n "(cached) " >&6
4153else
4154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4155/* end confdefs.h.  */
4156
4157int
4158main ()
4159{
4160#ifndef __GNUC__
4161       choke me
4162#endif
4163
4164  ;
4165  return 0;
4166}
4167_ACEOF
4168if ac_fn_c_try_compile "$LINENO"; then :
4169  ac_compiler_gnu=yes
4170else
4171  ac_compiler_gnu=no
4172fi
4173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4174ac_cv_c_compiler_gnu=$ac_compiler_gnu
4175
4176fi
4177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4178$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4179if test $ac_compiler_gnu = yes; then
4180  GCC=yes
4181else
4182  GCC=
4183fi
4184ac_test_CFLAGS=${CFLAGS+set}
4185ac_save_CFLAGS=$CFLAGS
4186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4187$as_echo_n "checking whether $CC accepts -g... " >&6; }
4188if ${ac_cv_prog_cc_g+:} false; then :
4189  $as_echo_n "(cached) " >&6
4190else
4191  ac_save_c_werror_flag=$ac_c_werror_flag
4192   ac_c_werror_flag=yes
4193   ac_cv_prog_cc_g=no
4194   CFLAGS="-g"
4195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4196/* end confdefs.h.  */
4197
4198int
4199main ()
4200{
4201
4202  ;
4203  return 0;
4204}
4205_ACEOF
4206if ac_fn_c_try_compile "$LINENO"; then :
4207  ac_cv_prog_cc_g=yes
4208else
4209  CFLAGS=""
4210      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4211/* end confdefs.h.  */
4212
4213int
4214main ()
4215{
4216
4217  ;
4218  return 0;
4219}
4220_ACEOF
4221if ac_fn_c_try_compile "$LINENO"; then :
4222
4223else
4224  ac_c_werror_flag=$ac_save_c_werror_flag
4225	 CFLAGS="-g"
4226	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4227/* end confdefs.h.  */
4228
4229int
4230main ()
4231{
4232
4233  ;
4234  return 0;
4235}
4236_ACEOF
4237if ac_fn_c_try_compile "$LINENO"; then :
4238  ac_cv_prog_cc_g=yes
4239fi
4240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4241fi
4242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4243fi
4244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4245   ac_c_werror_flag=$ac_save_c_werror_flag
4246fi
4247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4248$as_echo "$ac_cv_prog_cc_g" >&6; }
4249if test "$ac_test_CFLAGS" = set; then
4250  CFLAGS=$ac_save_CFLAGS
4251elif test $ac_cv_prog_cc_g = yes; then
4252  if test "$GCC" = yes; then
4253    CFLAGS="-g -O2"
4254  else
4255    CFLAGS="-g"
4256  fi
4257else
4258  if test "$GCC" = yes; then
4259    CFLAGS="-O2"
4260  else
4261    CFLAGS=
4262  fi
4263fi
4264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4265$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4266if ${ac_cv_prog_cc_c89+:} false; then :
4267  $as_echo_n "(cached) " >&6
4268else
4269  ac_cv_prog_cc_c89=no
4270ac_save_CC=$CC
4271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4272/* end confdefs.h.  */
4273#include <stdarg.h>
4274#include <stdio.h>
4275struct stat;
4276/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4277struct buf { int x; };
4278FILE * (*rcsopen) (struct buf *, struct stat *, int);
4279static char *e (p, i)
4280     char **p;
4281     int i;
4282{
4283  return p[i];
4284}
4285static char *f (char * (*g) (char **, int), char **p, ...)
4286{
4287  char *s;
4288  va_list v;
4289  va_start (v,p);
4290  s = g (p, va_arg (v,int));
4291  va_end (v);
4292  return s;
4293}
4294
4295/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4296   function prototypes and stuff, but not '\xHH' hex character constants.
4297   These don't provoke an error unfortunately, instead are silently treated
4298   as 'x'.  The following induces an error, until -std is added to get
4299   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4300   array size at least.  It's necessary to write '\x00'==0 to get something
4301   that's true only with -std.  */
4302int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4303
4304/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4305   inside strings and character constants.  */
4306#define FOO(x) 'x'
4307int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4308
4309int test (int i, double x);
4310struct s1 {int (*f) (int a);};
4311struct s2 {int (*f) (double a);};
4312int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4313int argc;
4314char **argv;
4315int
4316main ()
4317{
4318return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4319  ;
4320  return 0;
4321}
4322_ACEOF
4323for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4324	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4325do
4326  CC="$ac_save_CC $ac_arg"
4327  if ac_fn_c_try_compile "$LINENO"; then :
4328  ac_cv_prog_cc_c89=$ac_arg
4329fi
4330rm -f core conftest.err conftest.$ac_objext
4331  test "x$ac_cv_prog_cc_c89" != "xno" && break
4332done
4333rm -f conftest.$ac_ext
4334CC=$ac_save_CC
4335
4336fi
4337# AC_CACHE_VAL
4338case "x$ac_cv_prog_cc_c89" in
4339  x)
4340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4341$as_echo "none needed" >&6; } ;;
4342  xno)
4343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4344$as_echo "unsupported" >&6; } ;;
4345  *)
4346    CC="$CC $ac_cv_prog_cc_c89"
4347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4348$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4349esac
4350if test "x$ac_cv_prog_cc_c89" != xno; then :
4351
4352fi
4353
4354ac_ext=c
4355ac_cpp='$CPP $CPPFLAGS'
4356ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4357ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4358ac_compiler_gnu=$ac_cv_c_compiler_gnu
4359
4360    ac_ext=c
4361ac_cpp='$CPP $CPPFLAGS'
4362ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4363ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4364ac_compiler_gnu=$ac_cv_c_compiler_gnu
4365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4366$as_echo_n "checking how to run the C preprocessor... " >&6; }
4367# On Suns, sometimes $CPP names a directory.
4368if test -n "$CPP" && test -d "$CPP"; then
4369  CPP=
4370fi
4371if test -z "$CPP"; then
4372  if ${ac_cv_prog_CPP+:} false; then :
4373  $as_echo_n "(cached) " >&6
4374else
4375      # Double quotes because CPP needs to be expanded
4376    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4377    do
4378      ac_preproc_ok=false
4379for ac_c_preproc_warn_flag in '' yes
4380do
4381  # Use a header file that comes with gcc, so configuring glibc
4382  # with a fresh cross-compiler works.
4383  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4384  # <limits.h> exists even on freestanding compilers.
4385  # On the NeXT, cc -E runs the code through the compiler's parser,
4386  # not just through cpp. "Syntax error" is here to catch this case.
4387  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4388/* end confdefs.h.  */
4389#ifdef __STDC__
4390# include <limits.h>
4391#else
4392# include <assert.h>
4393#endif
4394		     Syntax error
4395_ACEOF
4396if ac_fn_c_try_cpp "$LINENO"; then :
4397
4398else
4399  # Broken: fails on valid input.
4400continue
4401fi
4402rm -f conftest.err conftest.i conftest.$ac_ext
4403
4404  # OK, works on sane cases.  Now check whether nonexistent headers
4405  # can be detected and how.
4406  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4407/* end confdefs.h.  */
4408#include <ac_nonexistent.h>
4409_ACEOF
4410if ac_fn_c_try_cpp "$LINENO"; then :
4411  # Broken: success on invalid input.
4412continue
4413else
4414  # Passes both tests.
4415ac_preproc_ok=:
4416break
4417fi
4418rm -f conftest.err conftest.i conftest.$ac_ext
4419
4420done
4421# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4422rm -f conftest.i conftest.err conftest.$ac_ext
4423if $ac_preproc_ok; then :
4424  break
4425fi
4426
4427    done
4428    ac_cv_prog_CPP=$CPP
4429
4430fi
4431  CPP=$ac_cv_prog_CPP
4432else
4433  ac_cv_prog_CPP=$CPP
4434fi
4435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4436$as_echo "$CPP" >&6; }
4437ac_preproc_ok=false
4438for ac_c_preproc_warn_flag in '' yes
4439do
4440  # Use a header file that comes with gcc, so configuring glibc
4441  # with a fresh cross-compiler works.
4442  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4443  # <limits.h> exists even on freestanding compilers.
4444  # On the NeXT, cc -E runs the code through the compiler's parser,
4445  # not just through cpp. "Syntax error" is here to catch this case.
4446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4447/* end confdefs.h.  */
4448#ifdef __STDC__
4449# include <limits.h>
4450#else
4451# include <assert.h>
4452#endif
4453		     Syntax error
4454_ACEOF
4455if ac_fn_c_try_cpp "$LINENO"; then :
4456
4457else
4458  # Broken: fails on valid input.
4459continue
4460fi
4461rm -f conftest.err conftest.i conftest.$ac_ext
4462
4463  # OK, works on sane cases.  Now check whether nonexistent headers
4464  # can be detected and how.
4465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h.  */
4467#include <ac_nonexistent.h>
4468_ACEOF
4469if ac_fn_c_try_cpp "$LINENO"; then :
4470  # Broken: success on invalid input.
4471continue
4472else
4473  # Passes both tests.
4474ac_preproc_ok=:
4475break
4476fi
4477rm -f conftest.err conftest.i conftest.$ac_ext
4478
4479done
4480# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4481rm -f conftest.i conftest.err conftest.$ac_ext
4482if $ac_preproc_ok; then :
4483
4484else
4485  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4486$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4487as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4488See \`config.log' for more details" "$LINENO" 5; }
4489fi
4490
4491ac_ext=c
4492ac_cpp='$CPP $CPPFLAGS'
4493ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4494ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4495ac_compiler_gnu=$ac_cv_c_compiler_gnu
4496
4497
4498    #--------------------------------------------------------------------
4499    # Checks to see if the make program sets the $MAKE variable.
4500    #--------------------------------------------------------------------
4501
4502    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4503$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4504set x ${MAKE-make}
4505ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4506if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4507  $as_echo_n "(cached) " >&6
4508else
4509  cat >conftest.make <<\_ACEOF
4510SHELL = /bin/sh
4511all:
4512	@echo '@@@%%%=$(MAKE)=@@@%%%'
4513_ACEOF
4514# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4515case `${MAKE-make} -f conftest.make 2>/dev/null` in
4516  *@@@%%%=?*=@@@%%%*)
4517    eval ac_cv_prog_make_${ac_make}_set=yes;;
4518  *)
4519    eval ac_cv_prog_make_${ac_make}_set=no;;
4520esac
4521rm -f conftest.make
4522fi
4523if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4525$as_echo "yes" >&6; }
4526  SET_MAKE=
4527else
4528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4529$as_echo "no" >&6; }
4530  SET_MAKE="MAKE=${MAKE-make}"
4531fi
4532
4533
4534    #--------------------------------------------------------------------
4535    # Find ranlib
4536    #--------------------------------------------------------------------
4537
4538    if test -n "$ac_tool_prefix"; then
4539  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4540set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4542$as_echo_n "checking for $ac_word... " >&6; }
4543if ${ac_cv_prog_RANLIB+:} false; then :
4544  $as_echo_n "(cached) " >&6
4545else
4546  if test -n "$RANLIB"; then
4547  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4548else
4549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4550for as_dir in $PATH
4551do
4552  IFS=$as_save_IFS
4553  test -z "$as_dir" && as_dir=.
4554    for ac_exec_ext in '' $ac_executable_extensions; do
4555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4556    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4558    break 2
4559  fi
4560done
4561  done
4562IFS=$as_save_IFS
4563
4564fi
4565fi
4566RANLIB=$ac_cv_prog_RANLIB
4567if test -n "$RANLIB"; then
4568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4569$as_echo "$RANLIB" >&6; }
4570else
4571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4572$as_echo "no" >&6; }
4573fi
4574
4575
4576fi
4577if test -z "$ac_cv_prog_RANLIB"; then
4578  ac_ct_RANLIB=$RANLIB
4579  # Extract the first word of "ranlib", so it can be a program name with args.
4580set dummy ranlib; ac_word=$2
4581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4582$as_echo_n "checking for $ac_word... " >&6; }
4583if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4584  $as_echo_n "(cached) " >&6
4585else
4586  if test -n "$ac_ct_RANLIB"; then
4587  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4588else
4589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4590for as_dir in $PATH
4591do
4592  IFS=$as_save_IFS
4593  test -z "$as_dir" && as_dir=.
4594    for ac_exec_ext in '' $ac_executable_extensions; do
4595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4596    ac_cv_prog_ac_ct_RANLIB="ranlib"
4597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4598    break 2
4599  fi
4600done
4601  done
4602IFS=$as_save_IFS
4603
4604fi
4605fi
4606ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4607if test -n "$ac_ct_RANLIB"; then
4608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4609$as_echo "$ac_ct_RANLIB" >&6; }
4610else
4611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4612$as_echo "no" >&6; }
4613fi
4614
4615  if test "x$ac_ct_RANLIB" = x; then
4616    RANLIB=""
4617  else
4618    case $cross_compiling:$ac_tool_warned in
4619yes:)
4620{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4621$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4622ac_tool_warned=yes ;;
4623esac
4624    RANLIB=$ac_ct_RANLIB
4625  fi
4626else
4627  RANLIB="$ac_cv_prog_RANLIB"
4628fi
4629
4630
4631    #--------------------------------------------------------------------
4632    # Determines the correct binary file extension (.o, .obj, .exe etc.)
4633    #--------------------------------------------------------------------
4634
4635
4636
4637
4638
4639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4640$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4641if ${ac_cv_path_GREP+:} false; then :
4642  $as_echo_n "(cached) " >&6
4643else
4644  if test -z "$GREP"; then
4645  ac_path_GREP_found=false
4646  # Loop through the user's path and test for each of PROGNAME-LIST
4647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4648for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4649do
4650  IFS=$as_save_IFS
4651  test -z "$as_dir" && as_dir=.
4652    for ac_prog in grep ggrep; do
4653    for ac_exec_ext in '' $ac_executable_extensions; do
4654      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4655      as_fn_executable_p "$ac_path_GREP" || continue
4656# Check for GNU ac_path_GREP and select it if it is found.
4657  # Check for GNU $ac_path_GREP
4658case `"$ac_path_GREP" --version 2>&1` in
4659*GNU*)
4660  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4661*)
4662  ac_count=0
4663  $as_echo_n 0123456789 >"conftest.in"
4664  while :
4665  do
4666    cat "conftest.in" "conftest.in" >"conftest.tmp"
4667    mv "conftest.tmp" "conftest.in"
4668    cp "conftest.in" "conftest.nl"
4669    $as_echo 'GREP' >> "conftest.nl"
4670    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4671    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4672    as_fn_arith $ac_count + 1 && ac_count=$as_val
4673    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4674      # Best one so far, save it but keep looking for a better one
4675      ac_cv_path_GREP="$ac_path_GREP"
4676      ac_path_GREP_max=$ac_count
4677    fi
4678    # 10*(2^10) chars as input seems more than enough
4679    test $ac_count -gt 10 && break
4680  done
4681  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4682esac
4683
4684      $ac_path_GREP_found && break 3
4685    done
4686  done
4687  done
4688IFS=$as_save_IFS
4689  if test -z "$ac_cv_path_GREP"; then
4690    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4691  fi
4692else
4693  ac_cv_path_GREP=$GREP
4694fi
4695
4696fi
4697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4698$as_echo "$ac_cv_path_GREP" >&6; }
4699 GREP="$ac_cv_path_GREP"
4700
4701
4702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4703$as_echo_n "checking for egrep... " >&6; }
4704if ${ac_cv_path_EGREP+:} false; then :
4705  $as_echo_n "(cached) " >&6
4706else
4707  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4708   then ac_cv_path_EGREP="$GREP -E"
4709   else
4710     if test -z "$EGREP"; then
4711  ac_path_EGREP_found=false
4712  # Loop through the user's path and test for each of PROGNAME-LIST
4713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4714for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4715do
4716  IFS=$as_save_IFS
4717  test -z "$as_dir" && as_dir=.
4718    for ac_prog in egrep; do
4719    for ac_exec_ext in '' $ac_executable_extensions; do
4720      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4721      as_fn_executable_p "$ac_path_EGREP" || continue
4722# Check for GNU ac_path_EGREP and select it if it is found.
4723  # Check for GNU $ac_path_EGREP
4724case `"$ac_path_EGREP" --version 2>&1` in
4725*GNU*)
4726  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4727*)
4728  ac_count=0
4729  $as_echo_n 0123456789 >"conftest.in"
4730  while :
4731  do
4732    cat "conftest.in" "conftest.in" >"conftest.tmp"
4733    mv "conftest.tmp" "conftest.in"
4734    cp "conftest.in" "conftest.nl"
4735    $as_echo 'EGREP' >> "conftest.nl"
4736    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4737    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4738    as_fn_arith $ac_count + 1 && ac_count=$as_val
4739    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4740      # Best one so far, save it but keep looking for a better one
4741      ac_cv_path_EGREP="$ac_path_EGREP"
4742      ac_path_EGREP_max=$ac_count
4743    fi
4744    # 10*(2^10) chars as input seems more than enough
4745    test $ac_count -gt 10 && break
4746  done
4747  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4748esac
4749
4750      $ac_path_EGREP_found && break 3
4751    done
4752  done
4753  done
4754IFS=$as_save_IFS
4755  if test -z "$ac_cv_path_EGREP"; then
4756    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4757  fi
4758else
4759  ac_cv_path_EGREP=$EGREP
4760fi
4761
4762   fi
4763fi
4764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4765$as_echo "$ac_cv_path_EGREP" >&6; }
4766 EGREP="$ac_cv_path_EGREP"
4767
4768
4769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4770$as_echo_n "checking for ANSI C header files... " >&6; }
4771if ${ac_cv_header_stdc+:} false; then :
4772  $as_echo_n "(cached) " >&6
4773else
4774  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4775/* end confdefs.h.  */
4776#include <stdlib.h>
4777#include <stdarg.h>
4778#include <string.h>
4779#include <float.h>
4780
4781int
4782main ()
4783{
4784
4785  ;
4786  return 0;
4787}
4788_ACEOF
4789if ac_fn_c_try_compile "$LINENO"; then :
4790  ac_cv_header_stdc=yes
4791else
4792  ac_cv_header_stdc=no
4793fi
4794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4795
4796if test $ac_cv_header_stdc = yes; then
4797  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4799/* end confdefs.h.  */
4800#include <string.h>
4801
4802_ACEOF
4803if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4804  $EGREP "memchr" >/dev/null 2>&1; then :
4805
4806else
4807  ac_cv_header_stdc=no
4808fi
4809rm -f conftest*
4810
4811fi
4812
4813if test $ac_cv_header_stdc = yes; then
4814  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4815  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4816/* end confdefs.h.  */
4817#include <stdlib.h>
4818
4819_ACEOF
4820if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4821  $EGREP "free" >/dev/null 2>&1; then :
4822
4823else
4824  ac_cv_header_stdc=no
4825fi
4826rm -f conftest*
4827
4828fi
4829
4830if test $ac_cv_header_stdc = yes; then
4831  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4832  if test "$cross_compiling" = yes; then :
4833  :
4834else
4835  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4836/* end confdefs.h.  */
4837#include <ctype.h>
4838#include <stdlib.h>
4839#if ((' ' & 0x0FF) == 0x020)
4840# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4841# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4842#else
4843# define ISLOWER(c) \
4844		   (('a' <= (c) && (c) <= 'i') \
4845		     || ('j' <= (c) && (c) <= 'r') \
4846		     || ('s' <= (c) && (c) <= 'z'))
4847# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4848#endif
4849
4850#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4851int
4852main ()
4853{
4854  int i;
4855  for (i = 0; i < 256; i++)
4856    if (XOR (islower (i), ISLOWER (i))
4857	|| toupper (i) != TOUPPER (i))
4858      return 2;
4859  return 0;
4860}
4861_ACEOF
4862if ac_fn_c_try_run "$LINENO"; then :
4863
4864else
4865  ac_cv_header_stdc=no
4866fi
4867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4868  conftest.$ac_objext conftest.beam conftest.$ac_ext
4869fi
4870
4871fi
4872fi
4873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4874$as_echo "$ac_cv_header_stdc" >&6; }
4875if test $ac_cv_header_stdc = yes; then
4876
4877$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4878
4879fi
4880
4881# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4882for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4883		  inttypes.h stdint.h unistd.h
4884do :
4885  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4886ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4887"
4888if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4889  cat >>confdefs.h <<_ACEOF
4890#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4891_ACEOF
4892
4893fi
4894
4895done
4896
4897
4898
4899    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4900
4901
4902    #------------------------------------------------------------------------
4903    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4904    # It makes compiling go faster.  (This is only a performance feature.)
4905    #------------------------------------------------------------------------
4906
4907    if test -z "$no_pipe" -a -n "$GCC"; then
4908	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5
4909$as_echo_n "checking if the compiler understands -pipe... " >&6; }
4910if ${tcl_cv_cc_pipe+:} false; then :
4911  $as_echo_n "(cached) " >&6
4912else
4913
4914	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4915	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4916/* end confdefs.h.  */
4917
4918int
4919main ()
4920{
4921
4922  ;
4923  return 0;
4924}
4925_ACEOF
4926if ac_fn_c_try_compile "$LINENO"; then :
4927  tcl_cv_cc_pipe=yes
4928else
4929  tcl_cv_cc_pipe=no
4930fi
4931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4932	    CFLAGS=$hold_cflags
4933fi
4934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5
4935$as_echo "$tcl_cv_cc_pipe" >&6; }
4936	if test $tcl_cv_cc_pipe = yes; then
4937	    CFLAGS="$CFLAGS -pipe"
4938	fi
4939    fi
4940
4941    #--------------------------------------------------------------------
4942    # Common compiler flag setup
4943    #--------------------------------------------------------------------
4944
4945     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
4946$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
4947if ${ac_cv_c_bigendian+:} false; then :
4948  $as_echo_n "(cached) " >&6
4949else
4950  ac_cv_c_bigendian=unknown
4951    # See if we're dealing with a universal compiler.
4952    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4953/* end confdefs.h.  */
4954#ifndef __APPLE_CC__
4955	       not a universal capable compiler
4956	     #endif
4957	     typedef int dummy;
4958
4959_ACEOF
4960if ac_fn_c_try_compile "$LINENO"; then :
4961
4962	# Check for potential -arch flags.  It is not universal unless
4963	# there are at least two -arch flags with different values.
4964	ac_arch=
4965	ac_prev=
4966	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
4967	 if test -n "$ac_prev"; then
4968	   case $ac_word in
4969	     i?86 | x86_64 | ppc | ppc64)
4970	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
4971		 ac_arch=$ac_word
4972	       else
4973		 ac_cv_c_bigendian=universal
4974		 break
4975	       fi
4976	       ;;
4977	   esac
4978	   ac_prev=
4979	 elif test "x$ac_word" = "x-arch"; then
4980	   ac_prev=arch
4981	 fi
4982       done
4983fi
4984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4985    if test $ac_cv_c_bigendian = unknown; then
4986      # See if sys/param.h defines the BYTE_ORDER macro.
4987      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4988/* end confdefs.h.  */
4989#include <sys/types.h>
4990	     #include <sys/param.h>
4991
4992int
4993main ()
4994{
4995#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
4996		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
4997		     && LITTLE_ENDIAN)
4998	      bogus endian macros
4999	     #endif
5000
5001  ;
5002  return 0;
5003}
5004_ACEOF
5005if ac_fn_c_try_compile "$LINENO"; then :
5006  # It does; now see whether it defined to BIG_ENDIAN or not.
5007	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5008/* end confdefs.h.  */
5009#include <sys/types.h>
5010		#include <sys/param.h>
5011
5012int
5013main ()
5014{
5015#if BYTE_ORDER != BIG_ENDIAN
5016		 not big endian
5017		#endif
5018
5019  ;
5020  return 0;
5021}
5022_ACEOF
5023if ac_fn_c_try_compile "$LINENO"; then :
5024  ac_cv_c_bigendian=yes
5025else
5026  ac_cv_c_bigendian=no
5027fi
5028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5029fi
5030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5031    fi
5032    if test $ac_cv_c_bigendian = unknown; then
5033      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
5034      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5035/* end confdefs.h.  */
5036#include <limits.h>
5037
5038int
5039main ()
5040{
5041#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
5042	      bogus endian macros
5043	     #endif
5044
5045  ;
5046  return 0;
5047}
5048_ACEOF
5049if ac_fn_c_try_compile "$LINENO"; then :
5050  # It does; now see whether it defined to _BIG_ENDIAN or not.
5051	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5052/* end confdefs.h.  */
5053#include <limits.h>
5054
5055int
5056main ()
5057{
5058#ifndef _BIG_ENDIAN
5059		 not big endian
5060		#endif
5061
5062  ;
5063  return 0;
5064}
5065_ACEOF
5066if ac_fn_c_try_compile "$LINENO"; then :
5067  ac_cv_c_bigendian=yes
5068else
5069  ac_cv_c_bigendian=no
5070fi
5071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5072fi
5073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5074    fi
5075    if test $ac_cv_c_bigendian = unknown; then
5076      # Compile a test program.
5077      if test "$cross_compiling" = yes; then :
5078  # Try to guess by grepping values from an object file.
5079	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5080/* end confdefs.h.  */
5081short int ascii_mm[] =
5082		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
5083		short int ascii_ii[] =
5084		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
5085		int use_ascii (int i) {
5086		  return ascii_mm[i] + ascii_ii[i];
5087		}
5088		short int ebcdic_ii[] =
5089		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
5090		short int ebcdic_mm[] =
5091		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
5092		int use_ebcdic (int i) {
5093		  return ebcdic_mm[i] + ebcdic_ii[i];
5094		}
5095		extern int foo;
5096
5097int
5098main ()
5099{
5100return use_ascii (foo) == use_ebcdic (foo);
5101  ;
5102  return 0;
5103}
5104_ACEOF
5105if ac_fn_c_try_compile "$LINENO"; then :
5106  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
5107	      ac_cv_c_bigendian=yes
5108	    fi
5109	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
5110	      if test "$ac_cv_c_bigendian" = unknown; then
5111		ac_cv_c_bigendian=no
5112	      else
5113		# finding both strings is unlikely to happen, but who knows?
5114		ac_cv_c_bigendian=unknown
5115	      fi
5116	    fi
5117fi
5118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5119else
5120  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5121/* end confdefs.h.  */
5122$ac_includes_default
5123int
5124main ()
5125{
5126
5127	     /* Are we little or big endian?  From Harbison&Steele.  */
5128	     union
5129	     {
5130	       long int l;
5131	       char c[sizeof (long int)];
5132	     } u;
5133	     u.l = 1;
5134	     return u.c[sizeof (long int) - 1] == 1;
5135
5136  ;
5137  return 0;
5138}
5139_ACEOF
5140if ac_fn_c_try_run "$LINENO"; then :
5141  ac_cv_c_bigendian=no
5142else
5143  ac_cv_c_bigendian=yes
5144fi
5145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5146  conftest.$ac_objext conftest.beam conftest.$ac_ext
5147fi
5148
5149    fi
5150fi
5151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
5152$as_echo "$ac_cv_c_bigendian" >&6; }
5153 case $ac_cv_c_bigendian in #(
5154   yes)
5155     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
5156;; #(
5157   no)
5158      ;; #(
5159   universal)
5160
5161$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5162
5163     ;; #(
5164   *)
5165     as_fn_error $? "unknown endianness
5166 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
5167 esac
5168
5169
5170
5171
5172    #
5173    # Ok, lets find the tkimg configuration
5174    # First, look for one uninstalled.
5175    # the alternative search directory is invoked by --with-tkimg
5176    #
5177
5178    if test x"${no_tkimg}" = x ; then
5179	# we reset no_tkimg in case something fails here
5180	no_tkimg=true
5181
5182# Check whether --with-tkimg was given.
5183if test "${with_tkimg+set}" = set; then :
5184  withval=$with_tkimg; with_tkimgconfig=${withval}
5185fi
5186
5187	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tkimg configuration" >&5
5188$as_echo_n "checking for tkimg configuration... " >&6; }
5189	if ${ac_cv_c_tkimgconfig+:} false; then :
5190  $as_echo_n "(cached) " >&6
5191else
5192
5193
5194	    # First check to see if --with-tkimg was specified.
5195	    if test x"${with_tkimgconfig}" != x ; then
5196		case ${with_tkimgconfig} in
5197		    */tkimgConfig.sh )
5198			if test -f ${with_tkimgconfig}; then
5199			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tkimg argument should refer to directory containing tkimgConfig.sh, not to tkimgConfig.sh itself" >&5
5200$as_echo "$as_me: WARNING: --with-tkimg argument should refer to directory containing tkimgConfig.sh, not to tkimgConfig.sh itself" >&2;}
5201			    with_tkimgconfig=`echo ${with_tkimgconfig} | sed 's!/tkimgConfig\.sh$!!'`
5202			fi;;
5203		esac
5204		if test -f "${with_tkimgconfig}/tkimgConfig.sh" ; then
5205		    ac_cv_c_tkimgconfig=`(cd ${with_tkimgconfig}; pwd)`
5206		else
5207		    as_fn_error $? "${with_tkimgconfig} directory doesn't contain tkimgConfig.sh" "$LINENO" 5
5208		fi
5209	    fi
5210
5211	    # then check for a private tkimg installation
5212	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
5213		for i in \
5214			../tkimg \
5215			`ls -dr ../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5216			`ls -dr ../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
5217			`ls -dr ../tkimg*[0-9].[0-9] 2>/dev/null` \
5218			`ls -dr ../tkimg*[0-9].[0-9]* 2>/dev/null` \
5219			../../tkimg \
5220			`ls -dr ../../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5221			`ls -dr ../../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
5222			`ls -dr ../../tkimg*[0-9].[0-9] 2>/dev/null` \
5223			`ls -dr ../../tkimg*[0-9].[0-9]* 2>/dev/null` \
5224			../../../tkimg \
5225			`ls -dr ../../../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5226			`ls -dr ../../../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
5227			`ls -dr ../../../tkimg*[0-9].[0-9] 2>/dev/null` \
5228			`ls -dr ../../../tkimg*[0-9].[0-9]* 2>/dev/null` \
5229			${srcdir}/../tkimg \
5230			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5231			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9][0-9] 2>/dev/null` \
5232			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9] 2>/dev/null` \
5233			`ls -dr ${srcdir}/../tkimg*[0-9].[0-9]* 2>/dev/null` \
5234			; do
5235		    if test -f "$i/tkimgConfig.sh" ; then
5236			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
5237			break
5238		    fi
5239		    if test -f "$i/unix/tkimgConfig.sh" ; then
5240			ac_cv_c_tkimgconfig=`(cd $i/unix; pwd)`
5241			break
5242		    fi
5243		done
5244	    fi
5245
5246	    # check in a few common install locations
5247	    if test x"${ac_cv_c_tkimgconfig}" = x ; then
5248		for i in `ls -d ${libdir} 2>/dev/null` \
5249			`ls -d ${exec_prefix}/lib 2>/dev/null` \
5250			`ls -d ${prefix}/lib 2>/dev/null` \
5251			`ls -d /usr/local/lib 2>/dev/null` \
5252			`ls -d /usr/contrib/lib 2>/dev/null` \
5253			`ls -d /usr/pkg/lib 2>/dev/null` \
5254			`ls -d /usr/lib 2>/dev/null` \
5255			`ls -d /usr/lib64 2>/dev/null` \
5256			; do
5257		    if test -f "$i/tkimgConfig.sh" ; then
5258			ac_cv_c_tkimgconfig=`(cd $i; pwd)`
5259			break
5260		    fi
5261		done
5262	    fi
5263
5264fi
5265
5266
5267	if test x"${ac_cv_c_tkimgconfig}" = x ; then
5268	    tkimg_BIN_DIR="# no tkimg configs found"
5269	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find tkimg configuration definitions" >&5
5270$as_echo "$as_me: WARNING: Cannot find tkimg configuration definitions" >&2;}
5271	    exit 0
5272	else
5273	    no_tkimg=
5274	    tkimg_BIN_DIR=${ac_cv_c_tkimgconfig}
5275	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $tkimg_BIN_DIR/tkimgConfig.sh" >&5
5276$as_echo "found $tkimg_BIN_DIR/tkimgConfig.sh" >&6; }
5277	fi
5278    fi
5279
5280
5281    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh" >&5
5282$as_echo_n "checking for existence of ${tkimg_BIN_DIR}/tkimgConfig.sh... " >&6; }
5283
5284    if test -f "${tkimg_BIN_DIR}/tkimgConfig.sh" ; then
5285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
5286$as_echo "loading" >&6; }
5287	. "${tkimg_BIN_DIR}/tkimgConfig.sh"
5288    else
5289        { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
5290$as_echo "file not found" >&6; }
5291    fi
5292
5293    #
5294    # If the tkimg_BIN_DIR is the build directory (not the install directory),
5295    # then set the common variable name to the value of the build variables.
5296    # For example, the variable tkimg_LIB_SPEC will be set to the value
5297    # of tkimg_BUILD_LIB_SPEC. An extension should make use of tkimg_LIB_SPEC
5298    # instead of tkimg_BUILD_LIB_SPEC since it will work with both an
5299    # installed and uninstalled version of Tcl.
5300    #
5301
5302    if test -f "${tkimg_BIN_DIR}/Makefile" ; then
5303	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found Makefile - using build library specs for tkimg" >&5
5304$as_echo "$as_me: WARNING: Found Makefile - using build library specs for tkimg" >&2;}
5305        tkimg_LIB_SPEC=${tkimg_BUILD_LIB_SPEC}
5306        tkimg_STUB_LIB_SPEC=${tkimg_BUILD_STUB_LIB_SPEC}
5307        tkimg_STUB_LIB_PATH=${tkimg_BUILD_STUB_LIB_PATH}
5308        tkimg_INCLUDE_SPEC=${tkimg_BUILD_INCLUDE_SPEC}
5309        tkimg_LIBRARY_PATH=${tkimg_LIBRARY_PATH}
5310    fi
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323    # Allow the caller to prevent this auto-check by specifying any 2nd arg
5324    if test "x" = x; then :
5325
5326	# Check both upper and lower-case variants
5327	# If a dev wanted non-stubs libs, this function could take an option
5328	# to not use _STUB in the paths below
5329	if test "x${tkimg_STUB_LIB_SPEC}" = x; then :
5330
5331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking For TKIMG_STUB library for LIBS" >&5
5332$as_echo_n "checking For TKIMG_STUB library for LIBS... " >&6; }
5333    # This simplifies the use of stub libraries by automatically adding
5334    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
5335    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
5336    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
5337    if test "x${TKIMG_STUB_LIB_SPEC}" != "x" ; then
5338	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
5339
5340    vars="\"`${CYGPATH} ${TKIMG_STUB_LIB_PATH}`\""
5341    for i in $vars; do
5342	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5343	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5344	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5345	fi
5346	PKG_LIBS="$PKG_LIBS $i"
5347    done
5348
5349
5350	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using TKIMG_STUB_LIB_PATH ${TKIMG_STUB_LIB_PATH}" >&5
5351$as_echo "using TKIMG_STUB_LIB_PATH ${TKIMG_STUB_LIB_PATH}" >&6; }
5352	else
5353
5354    vars="${TKIMG_STUB_LIB_SPEC}"
5355    for i in $vars; do
5356	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5357	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5358	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5359	fi
5360	PKG_LIBS="$PKG_LIBS $i"
5361    done
5362
5363
5364	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using TKIMG_STUB_LIB_SPEC ${TKIMG_STUB_LIB_SPEC}" >&5
5365$as_echo "using TKIMG_STUB_LIB_SPEC ${TKIMG_STUB_LIB_SPEC}" >&6; }
5366	fi
5367    else
5368	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
5369$as_echo "file not found" >&6; }
5370    fi
5371
5372else
5373
5374    { $as_echo "$as_me:${as_lineno-$LINENO}: checking For tkimg_STUB library for LIBS" >&5
5375$as_echo_n "checking For tkimg_STUB library for LIBS... " >&6; }
5376    # This simplifies the use of stub libraries by automatically adding
5377    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
5378    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
5379    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
5380    if test "x${tkimg_STUB_LIB_SPEC}" != "x" ; then
5381	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
5382
5383    vars="\"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
5384    for i in $vars; do
5385	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5386	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5387	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5388	fi
5389	PKG_LIBS="$PKG_LIBS $i"
5390    done
5391
5392
5393	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using tkimg_STUB_LIB_PATH ${tkimg_STUB_LIB_PATH}" >&5
5394$as_echo "using tkimg_STUB_LIB_PATH ${tkimg_STUB_LIB_PATH}" >&6; }
5395	else
5396
5397    vars="${tkimg_STUB_LIB_SPEC}"
5398    for i in $vars; do
5399	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5400	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5401	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5402	fi
5403	PKG_LIBS="$PKG_LIBS $i"
5404    done
5405
5406
5407	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using tkimg_STUB_LIB_SPEC ${tkimg_STUB_LIB_SPEC}" >&5
5408$as_echo "using tkimg_STUB_LIB_SPEC ${tkimg_STUB_LIB_SPEC}" >&6; }
5409	fi
5410    else
5411	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
5412$as_echo "file not found" >&6; }
5413    fi
5414
5415fi
5416
5417fi
5418
5419
5420
5421    #
5422    # Ok, lets find the tifftcl configuration
5423    # First, look for one uninstalled.
5424    # the alternative search directory is invoked by --with-tifftcl
5425    #
5426
5427    if test x"${no_tifftcl}" = x ; then
5428	# we reset no_tifftcl in case something fails here
5429	no_tifftcl=true
5430
5431# Check whether --with-tifftcl was given.
5432if test "${with_tifftcl+set}" = set; then :
5433  withval=$with_tifftcl; with_tifftclconfig=${withval}
5434fi
5435
5436	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tifftcl configuration" >&5
5437$as_echo_n "checking for tifftcl configuration... " >&6; }
5438	if ${ac_cv_c_tifftclconfig+:} false; then :
5439  $as_echo_n "(cached) " >&6
5440else
5441
5442
5443	    # First check to see if --with-tifftcl was specified.
5444	    if test x"${with_tifftclconfig}" != x ; then
5445		case ${with_tifftclconfig} in
5446		    */tifftclConfig.sh )
5447			if test -f ${with_tifftclconfig}; then
5448			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tifftcl argument should refer to directory containing tifftclConfig.sh, not to tifftclConfig.sh itself" >&5
5449$as_echo "$as_me: WARNING: --with-tifftcl argument should refer to directory containing tifftclConfig.sh, not to tifftclConfig.sh itself" >&2;}
5450			    with_tifftclconfig=`echo ${with_tifftclconfig} | sed 's!/tifftclConfig\.sh$!!'`
5451			fi;;
5452		esac
5453		if test -f "${with_tifftclconfig}/tifftclConfig.sh" ; then
5454		    ac_cv_c_tifftclconfig=`(cd ${with_tifftclconfig}; pwd)`
5455		else
5456		    as_fn_error $? "${with_tifftclconfig} directory doesn't contain tifftclConfig.sh" "$LINENO" 5
5457		fi
5458	    fi
5459
5460	    # then check for a private tifftcl installation
5461	    if test x"${ac_cv_c_tifftclconfig}" = x ; then
5462		for i in \
5463			../tifftcl \
5464			`ls -dr ../tifftcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5465			`ls -dr ../tifftcl*[0-9].[0-9][0-9] 2>/dev/null` \
5466			`ls -dr ../tifftcl*[0-9].[0-9] 2>/dev/null` \
5467			`ls -dr ../tifftcl*[0-9].[0-9]* 2>/dev/null` \
5468			../../tifftcl \
5469			`ls -dr ../../tifftcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5470			`ls -dr ../../tifftcl*[0-9].[0-9][0-9] 2>/dev/null` \
5471			`ls -dr ../../tifftcl*[0-9].[0-9] 2>/dev/null` \
5472			`ls -dr ../../tifftcl*[0-9].[0-9]* 2>/dev/null` \
5473			../../../tifftcl \
5474			`ls -dr ../../../tifftcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5475			`ls -dr ../../../tifftcl*[0-9].[0-9][0-9] 2>/dev/null` \
5476			`ls -dr ../../../tifftcl*[0-9].[0-9] 2>/dev/null` \
5477			`ls -dr ../../../tifftcl*[0-9].[0-9]* 2>/dev/null` \
5478			${srcdir}/../tifftcl \
5479			`ls -dr ${srcdir}/../tifftcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5480			`ls -dr ${srcdir}/../tifftcl*[0-9].[0-9][0-9] 2>/dev/null` \
5481			`ls -dr ${srcdir}/../tifftcl*[0-9].[0-9] 2>/dev/null` \
5482			`ls -dr ${srcdir}/../tifftcl*[0-9].[0-9]* 2>/dev/null` \
5483			; do
5484		    if test -f "$i/tifftclConfig.sh" ; then
5485			ac_cv_c_tifftclconfig=`(cd $i; pwd)`
5486			break
5487		    fi
5488		    if test -f "$i/unix/tifftclConfig.sh" ; then
5489			ac_cv_c_tifftclconfig=`(cd $i/unix; pwd)`
5490			break
5491		    fi
5492		done
5493	    fi
5494
5495	    # check in a few common install locations
5496	    if test x"${ac_cv_c_tifftclconfig}" = x ; then
5497		for i in `ls -d ${libdir} 2>/dev/null` \
5498			`ls -d ${exec_prefix}/lib 2>/dev/null` \
5499			`ls -d ${prefix}/lib 2>/dev/null` \
5500			`ls -d /usr/local/lib 2>/dev/null` \
5501			`ls -d /usr/contrib/lib 2>/dev/null` \
5502			`ls -d /usr/pkg/lib 2>/dev/null` \
5503			`ls -d /usr/lib 2>/dev/null` \
5504			`ls -d /usr/lib64 2>/dev/null` \
5505			; do
5506		    if test -f "$i/tifftclConfig.sh" ; then
5507			ac_cv_c_tifftclconfig=`(cd $i; pwd)`
5508			break
5509		    fi
5510		done
5511	    fi
5512
5513fi
5514
5515
5516	if test x"${ac_cv_c_tifftclconfig}" = x ; then
5517	    tifftcl_BIN_DIR="# no tifftcl configs found"
5518	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find tifftcl configuration definitions" >&5
5519$as_echo "$as_me: WARNING: Cannot find tifftcl configuration definitions" >&2;}
5520	    exit 0
5521	else
5522	    no_tifftcl=
5523	    tifftcl_BIN_DIR=${ac_cv_c_tifftclconfig}
5524	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $tifftcl_BIN_DIR/tifftclConfig.sh" >&5
5525$as_echo "found $tifftcl_BIN_DIR/tifftclConfig.sh" >&6; }
5526	fi
5527    fi
5528
5529
5530    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${tifftcl_BIN_DIR}/tifftclConfig.sh" >&5
5531$as_echo_n "checking for existence of ${tifftcl_BIN_DIR}/tifftclConfig.sh... " >&6; }
5532
5533    if test -f "${tifftcl_BIN_DIR}/tifftclConfig.sh" ; then
5534        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
5535$as_echo "loading" >&6; }
5536	. "${tifftcl_BIN_DIR}/tifftclConfig.sh"
5537    else
5538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
5539$as_echo "file not found" >&6; }
5540    fi
5541
5542    #
5543    # If the tifftcl_BIN_DIR is the build directory (not the install directory),
5544    # then set the common variable name to the value of the build variables.
5545    # For example, the variable tifftcl_LIB_SPEC will be set to the value
5546    # of tifftcl_BUILD_LIB_SPEC. An extension should make use of tifftcl_LIB_SPEC
5547    # instead of tifftcl_BUILD_LIB_SPEC since it will work with both an
5548    # installed and uninstalled version of Tcl.
5549    #
5550
5551    if test -f "${tifftcl_BIN_DIR}/Makefile" ; then
5552	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found Makefile - using build library specs for tifftcl" >&5
5553$as_echo "$as_me: WARNING: Found Makefile - using build library specs for tifftcl" >&2;}
5554        tifftcl_LIB_SPEC=${tifftcl_BUILD_LIB_SPEC}
5555        tifftcl_STUB_LIB_SPEC=${tifftcl_BUILD_STUB_LIB_SPEC}
5556        tifftcl_STUB_LIB_PATH=${tifftcl_BUILD_STUB_LIB_PATH}
5557        tifftcl_INCLUDE_SPEC=${tifftcl_BUILD_INCLUDE_SPEC}
5558        tifftcl_LIBRARY_PATH=${tifftcl_LIBRARY_PATH}
5559    fi
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572    # Allow the caller to prevent this auto-check by specifying any 2nd arg
5573    if test "x" = x; then :
5574
5575	# Check both upper and lower-case variants
5576	# If a dev wanted non-stubs libs, this function could take an option
5577	# to not use _STUB in the paths below
5578	if test "x${tifftcl_STUB_LIB_SPEC}" = x; then :
5579
5580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking For TIFFTCL_STUB library for LIBS" >&5
5581$as_echo_n "checking For TIFFTCL_STUB library for LIBS... " >&6; }
5582    # This simplifies the use of stub libraries by automatically adding
5583    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
5584    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
5585    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
5586    if test "x${TIFFTCL_STUB_LIB_SPEC}" != "x" ; then
5587	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
5588
5589    vars="\"`${CYGPATH} ${TIFFTCL_STUB_LIB_PATH}`\""
5590    for i in $vars; do
5591	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5592	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5593	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5594	fi
5595	PKG_LIBS="$PKG_LIBS $i"
5596    done
5597
5598
5599	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using TIFFTCL_STUB_LIB_PATH ${TIFFTCL_STUB_LIB_PATH}" >&5
5600$as_echo "using TIFFTCL_STUB_LIB_PATH ${TIFFTCL_STUB_LIB_PATH}" >&6; }
5601	else
5602
5603    vars="${TIFFTCL_STUB_LIB_SPEC}"
5604    for i in $vars; do
5605	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5606	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5607	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5608	fi
5609	PKG_LIBS="$PKG_LIBS $i"
5610    done
5611
5612
5613	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using TIFFTCL_STUB_LIB_SPEC ${TIFFTCL_STUB_LIB_SPEC}" >&5
5614$as_echo "using TIFFTCL_STUB_LIB_SPEC ${TIFFTCL_STUB_LIB_SPEC}" >&6; }
5615	fi
5616    else
5617	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
5618$as_echo "file not found" >&6; }
5619    fi
5620
5621else
5622
5623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking For tifftcl_STUB library for LIBS" >&5
5624$as_echo_n "checking For tifftcl_STUB library for LIBS... " >&6; }
5625    # This simplifies the use of stub libraries by automatically adding
5626    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
5627    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
5628    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
5629    if test "x${tifftcl_STUB_LIB_SPEC}" != "x" ; then
5630	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
5631
5632    vars="\"`${CYGPATH} ${tifftcl_STUB_LIB_PATH}`\""
5633    for i in $vars; do
5634	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5635	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5636	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5637	fi
5638	PKG_LIBS="$PKG_LIBS $i"
5639    done
5640
5641
5642	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using tifftcl_STUB_LIB_PATH ${tifftcl_STUB_LIB_PATH}" >&5
5643$as_echo "using tifftcl_STUB_LIB_PATH ${tifftcl_STUB_LIB_PATH}" >&6; }
5644	else
5645
5646    vars="${tifftcl_STUB_LIB_SPEC}"
5647    for i in $vars; do
5648	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5649	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5650	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5651	fi
5652	PKG_LIBS="$PKG_LIBS $i"
5653    done
5654
5655
5656	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using tifftcl_STUB_LIB_SPEC ${tifftcl_STUB_LIB_SPEC}" >&5
5657$as_echo "using tifftcl_STUB_LIB_SPEC ${tifftcl_STUB_LIB_SPEC}" >&6; }
5658	fi
5659    else
5660	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
5661$as_echo "file not found" >&6; }
5662    fi
5663
5664fi
5665
5666fi
5667
5668
5669
5670
5671    #
5672    # Ok, lets find the jpegtcl configuration
5673    # First, look for one uninstalled.
5674    # the alternative search directory is invoked by --with-jpegtcl
5675    #
5676
5677    if test x"${no_jpegtcl}" = x ; then
5678	# we reset no_jpegtcl in case something fails here
5679	no_jpegtcl=true
5680
5681# Check whether --with-jpegtcl was given.
5682if test "${with_jpegtcl+set}" = set; then :
5683  withval=$with_jpegtcl; with_jpegtclconfig=${withval}
5684fi
5685
5686	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpegtcl configuration" >&5
5687$as_echo_n "checking for jpegtcl configuration... " >&6; }
5688	if ${ac_cv_c_jpegtclconfig+:} false; then :
5689  $as_echo_n "(cached) " >&6
5690else
5691
5692
5693	    # First check to see if --with-jpegtcl was specified.
5694	    if test x"${with_jpegtclconfig}" != x ; then
5695		case ${with_jpegtclconfig} in
5696		    */jpegtclConfig.sh )
5697			if test -f ${with_jpegtclconfig}; then
5698			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-jpegtcl argument should refer to directory containing jpegtclConfig.sh, not to jpegtclConfig.sh itself" >&5
5699$as_echo "$as_me: WARNING: --with-jpegtcl argument should refer to directory containing jpegtclConfig.sh, not to jpegtclConfig.sh itself" >&2;}
5700			    with_jpegtclconfig=`echo ${with_jpegtclconfig} | sed 's!/jpegtclConfig\.sh$!!'`
5701			fi;;
5702		esac
5703		if test -f "${with_jpegtclconfig}/jpegtclConfig.sh" ; then
5704		    ac_cv_c_jpegtclconfig=`(cd ${with_jpegtclconfig}; pwd)`
5705		else
5706		    as_fn_error $? "${with_jpegtclconfig} directory doesn't contain jpegtclConfig.sh" "$LINENO" 5
5707		fi
5708	    fi
5709
5710	    # then check for a private jpegtcl installation
5711	    if test x"${ac_cv_c_jpegtclconfig}" = x ; then
5712		for i in \
5713			../jpegtcl \
5714			`ls -dr ../jpegtcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5715			`ls -dr ../jpegtcl*[0-9].[0-9][0-9] 2>/dev/null` \
5716			`ls -dr ../jpegtcl*[0-9].[0-9] 2>/dev/null` \
5717			`ls -dr ../jpegtcl*[0-9].[0-9]* 2>/dev/null` \
5718			../../jpegtcl \
5719			`ls -dr ../../jpegtcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5720			`ls -dr ../../jpegtcl*[0-9].[0-9][0-9] 2>/dev/null` \
5721			`ls -dr ../../jpegtcl*[0-9].[0-9] 2>/dev/null` \
5722			`ls -dr ../../jpegtcl*[0-9].[0-9]* 2>/dev/null` \
5723			../../../jpegtcl \
5724			`ls -dr ../../../jpegtcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5725			`ls -dr ../../../jpegtcl*[0-9].[0-9][0-9] 2>/dev/null` \
5726			`ls -dr ../../../jpegtcl*[0-9].[0-9] 2>/dev/null` \
5727			`ls -dr ../../../jpegtcl*[0-9].[0-9]* 2>/dev/null` \
5728			${srcdir}/../jpegtcl \
5729			`ls -dr ${srcdir}/../jpegtcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5730			`ls -dr ${srcdir}/../jpegtcl*[0-9].[0-9][0-9] 2>/dev/null` \
5731			`ls -dr ${srcdir}/../jpegtcl*[0-9].[0-9] 2>/dev/null` \
5732			`ls -dr ${srcdir}/../jpegtcl*[0-9].[0-9]* 2>/dev/null` \
5733			; do
5734		    if test -f "$i/jpegtclConfig.sh" ; then
5735			ac_cv_c_jpegtclconfig=`(cd $i; pwd)`
5736			break
5737		    fi
5738		    if test -f "$i/unix/jpegtclConfig.sh" ; then
5739			ac_cv_c_jpegtclconfig=`(cd $i/unix; pwd)`
5740			break
5741		    fi
5742		done
5743	    fi
5744
5745	    # check in a few common install locations
5746	    if test x"${ac_cv_c_jpegtclconfig}" = x ; then
5747		for i in `ls -d ${libdir} 2>/dev/null` \
5748			`ls -d ${exec_prefix}/lib 2>/dev/null` \
5749			`ls -d ${prefix}/lib 2>/dev/null` \
5750			`ls -d /usr/local/lib 2>/dev/null` \
5751			`ls -d /usr/contrib/lib 2>/dev/null` \
5752			`ls -d /usr/pkg/lib 2>/dev/null` \
5753			`ls -d /usr/lib 2>/dev/null` \
5754			`ls -d /usr/lib64 2>/dev/null` \
5755			; do
5756		    if test -f "$i/jpegtclConfig.sh" ; then
5757			ac_cv_c_jpegtclconfig=`(cd $i; pwd)`
5758			break
5759		    fi
5760		done
5761	    fi
5762
5763fi
5764
5765
5766	if test x"${ac_cv_c_jpegtclconfig}" = x ; then
5767	    jpegtcl_BIN_DIR="# no jpegtcl configs found"
5768	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find jpegtcl configuration definitions" >&5
5769$as_echo "$as_me: WARNING: Cannot find jpegtcl configuration definitions" >&2;}
5770	    exit 0
5771	else
5772	    no_jpegtcl=
5773	    jpegtcl_BIN_DIR=${ac_cv_c_jpegtclconfig}
5774	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $jpegtcl_BIN_DIR/jpegtclConfig.sh" >&5
5775$as_echo "found $jpegtcl_BIN_DIR/jpegtclConfig.sh" >&6; }
5776	fi
5777    fi
5778
5779
5780    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${jpegtcl_BIN_DIR}/jpegtclConfig.sh" >&5
5781$as_echo_n "checking for existence of ${jpegtcl_BIN_DIR}/jpegtclConfig.sh... " >&6; }
5782
5783    if test -f "${jpegtcl_BIN_DIR}/jpegtclConfig.sh" ; then
5784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
5785$as_echo "loading" >&6; }
5786	. "${jpegtcl_BIN_DIR}/jpegtclConfig.sh"
5787    else
5788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
5789$as_echo "file not found" >&6; }
5790    fi
5791
5792    #
5793    # If the jpegtcl_BIN_DIR is the build directory (not the install directory),
5794    # then set the common variable name to the value of the build variables.
5795    # For example, the variable jpegtcl_LIB_SPEC will be set to the value
5796    # of jpegtcl_BUILD_LIB_SPEC. An extension should make use of jpegtcl_LIB_SPEC
5797    # instead of jpegtcl_BUILD_LIB_SPEC since it will work with both an
5798    # installed and uninstalled version of Tcl.
5799    #
5800
5801    if test -f "${jpegtcl_BIN_DIR}/Makefile" ; then
5802	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found Makefile - using build library specs for jpegtcl" >&5
5803$as_echo "$as_me: WARNING: Found Makefile - using build library specs for jpegtcl" >&2;}
5804        jpegtcl_LIB_SPEC=${jpegtcl_BUILD_LIB_SPEC}
5805        jpegtcl_STUB_LIB_SPEC=${jpegtcl_BUILD_STUB_LIB_SPEC}
5806        jpegtcl_STUB_LIB_PATH=${jpegtcl_BUILD_STUB_LIB_PATH}
5807        jpegtcl_INCLUDE_SPEC=${jpegtcl_BUILD_INCLUDE_SPEC}
5808        jpegtcl_LIBRARY_PATH=${jpegtcl_LIBRARY_PATH}
5809    fi
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822    # Allow the caller to prevent this auto-check by specifying any 2nd arg
5823    if test "x" = x; then :
5824
5825	# Check both upper and lower-case variants
5826	# If a dev wanted non-stubs libs, this function could take an option
5827	# to not use _STUB in the paths below
5828	if test "x${jpegtcl_STUB_LIB_SPEC}" = x; then :
5829
5830    { $as_echo "$as_me:${as_lineno-$LINENO}: checking For JPEGTCL_STUB library for LIBS" >&5
5831$as_echo_n "checking For JPEGTCL_STUB library for LIBS... " >&6; }
5832    # This simplifies the use of stub libraries by automatically adding
5833    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
5834    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
5835    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
5836    if test "x${JPEGTCL_STUB_LIB_SPEC}" != "x" ; then
5837	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
5838
5839    vars="\"`${CYGPATH} ${JPEGTCL_STUB_LIB_PATH}`\""
5840    for i in $vars; do
5841	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5842	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5843	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5844	fi
5845	PKG_LIBS="$PKG_LIBS $i"
5846    done
5847
5848
5849	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using JPEGTCL_STUB_LIB_PATH ${JPEGTCL_STUB_LIB_PATH}" >&5
5850$as_echo "using JPEGTCL_STUB_LIB_PATH ${JPEGTCL_STUB_LIB_PATH}" >&6; }
5851	else
5852
5853    vars="${JPEGTCL_STUB_LIB_SPEC}"
5854    for i in $vars; do
5855	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5856	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5857	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5858	fi
5859	PKG_LIBS="$PKG_LIBS $i"
5860    done
5861
5862
5863	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using JPEGTCL_STUB_LIB_SPEC ${JPEGTCL_STUB_LIB_SPEC}" >&5
5864$as_echo "using JPEGTCL_STUB_LIB_SPEC ${JPEGTCL_STUB_LIB_SPEC}" >&6; }
5865	fi
5866    else
5867	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
5868$as_echo "file not found" >&6; }
5869    fi
5870
5871else
5872
5873    { $as_echo "$as_me:${as_lineno-$LINENO}: checking For jpegtcl_STUB library for LIBS" >&5
5874$as_echo_n "checking For jpegtcl_STUB library for LIBS... " >&6; }
5875    # This simplifies the use of stub libraries by automatically adding
5876    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
5877    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
5878    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
5879    if test "x${jpegtcl_STUB_LIB_SPEC}" != "x" ; then
5880	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
5881
5882    vars="\"`${CYGPATH} ${jpegtcl_STUB_LIB_PATH}`\""
5883    for i in $vars; do
5884	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5885	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5886	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5887	fi
5888	PKG_LIBS="$PKG_LIBS $i"
5889    done
5890
5891
5892	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using jpegtcl_STUB_LIB_PATH ${jpegtcl_STUB_LIB_PATH}" >&5
5893$as_echo "using jpegtcl_STUB_LIB_PATH ${jpegtcl_STUB_LIB_PATH}" >&6; }
5894	else
5895
5896    vars="${jpegtcl_STUB_LIB_SPEC}"
5897    for i in $vars; do
5898	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5899	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5900	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5901	fi
5902	PKG_LIBS="$PKG_LIBS $i"
5903    done
5904
5905
5906	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using jpegtcl_STUB_LIB_SPEC ${jpegtcl_STUB_LIB_SPEC}" >&5
5907$as_echo "using jpegtcl_STUB_LIB_SPEC ${jpegtcl_STUB_LIB_SPEC}" >&6; }
5908	fi
5909    else
5910	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
5911$as_echo "file not found" >&6; }
5912    fi
5913
5914fi
5915
5916fi
5917
5918
5919
5920
5921    #
5922    # Ok, lets find the zlibtcl configuration
5923    # First, look for one uninstalled.
5924    # the alternative search directory is invoked by --with-zlibtcl
5925    #
5926
5927    if test x"${no_zlibtcl}" = x ; then
5928	# we reset no_zlibtcl in case something fails here
5929	no_zlibtcl=true
5930
5931# Check whether --with-zlibtcl was given.
5932if test "${with_zlibtcl+set}" = set; then :
5933  withval=$with_zlibtcl; with_zlibtclconfig=${withval}
5934fi
5935
5936	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlibtcl configuration" >&5
5937$as_echo_n "checking for zlibtcl configuration... " >&6; }
5938	if ${ac_cv_c_zlibtclconfig+:} false; then :
5939  $as_echo_n "(cached) " >&6
5940else
5941
5942
5943	    # First check to see if --with-zlibtcl was specified.
5944	    if test x"${with_zlibtclconfig}" != x ; then
5945		case ${with_zlibtclconfig} in
5946		    */zlibtclConfig.sh )
5947			if test -f ${with_zlibtclconfig}; then
5948			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-zlibtcl argument should refer to directory containing zlibtclConfig.sh, not to zlibtclConfig.sh itself" >&5
5949$as_echo "$as_me: WARNING: --with-zlibtcl argument should refer to directory containing zlibtclConfig.sh, not to zlibtclConfig.sh itself" >&2;}
5950			    with_zlibtclconfig=`echo ${with_zlibtclconfig} | sed 's!/zlibtclConfig\.sh$!!'`
5951			fi;;
5952		esac
5953		if test -f "${with_zlibtclconfig}/zlibtclConfig.sh" ; then
5954		    ac_cv_c_zlibtclconfig=`(cd ${with_zlibtclconfig}; pwd)`
5955		else
5956		    as_fn_error $? "${with_zlibtclconfig} directory doesn't contain zlibtclConfig.sh" "$LINENO" 5
5957		fi
5958	    fi
5959
5960	    # then check for a private zlibtcl installation
5961	    if test x"${ac_cv_c_zlibtclconfig}" = x ; then
5962		for i in \
5963			../zlibtcl \
5964			`ls -dr ../zlibtcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5965			`ls -dr ../zlibtcl*[0-9].[0-9][0-9] 2>/dev/null` \
5966			`ls -dr ../zlibtcl*[0-9].[0-9] 2>/dev/null` \
5967			`ls -dr ../zlibtcl*[0-9].[0-9]* 2>/dev/null` \
5968			../../zlibtcl \
5969			`ls -dr ../../zlibtcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5970			`ls -dr ../../zlibtcl*[0-9].[0-9][0-9] 2>/dev/null` \
5971			`ls -dr ../../zlibtcl*[0-9].[0-9] 2>/dev/null` \
5972			`ls -dr ../../zlibtcl*[0-9].[0-9]* 2>/dev/null` \
5973			../../../zlibtcl \
5974			`ls -dr ../../../zlibtcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5975			`ls -dr ../../../zlibtcl*[0-9].[0-9][0-9] 2>/dev/null` \
5976			`ls -dr ../../../zlibtcl*[0-9].[0-9] 2>/dev/null` \
5977			`ls -dr ../../../zlibtcl*[0-9].[0-9]* 2>/dev/null` \
5978			${srcdir}/../zlibtcl \
5979			`ls -dr ${srcdir}/../zlibtcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
5980			`ls -dr ${srcdir}/../zlibtcl*[0-9].[0-9][0-9] 2>/dev/null` \
5981			`ls -dr ${srcdir}/../zlibtcl*[0-9].[0-9] 2>/dev/null` \
5982			`ls -dr ${srcdir}/../zlibtcl*[0-9].[0-9]* 2>/dev/null` \
5983			; do
5984		    if test -f "$i/zlibtclConfig.sh" ; then
5985			ac_cv_c_zlibtclconfig=`(cd $i; pwd)`
5986			break
5987		    fi
5988		    if test -f "$i/unix/zlibtclConfig.sh" ; then
5989			ac_cv_c_zlibtclconfig=`(cd $i/unix; pwd)`
5990			break
5991		    fi
5992		done
5993	    fi
5994
5995	    # check in a few common install locations
5996	    if test x"${ac_cv_c_zlibtclconfig}" = x ; then
5997		for i in `ls -d ${libdir} 2>/dev/null` \
5998			`ls -d ${exec_prefix}/lib 2>/dev/null` \
5999			`ls -d ${prefix}/lib 2>/dev/null` \
6000			`ls -d /usr/local/lib 2>/dev/null` \
6001			`ls -d /usr/contrib/lib 2>/dev/null` \
6002			`ls -d /usr/pkg/lib 2>/dev/null` \
6003			`ls -d /usr/lib 2>/dev/null` \
6004			`ls -d /usr/lib64 2>/dev/null` \
6005			; do
6006		    if test -f "$i/zlibtclConfig.sh" ; then
6007			ac_cv_c_zlibtclconfig=`(cd $i; pwd)`
6008			break
6009		    fi
6010		done
6011	    fi
6012
6013fi
6014
6015
6016	if test x"${ac_cv_c_zlibtclconfig}" = x ; then
6017	    zlibtcl_BIN_DIR="# no zlibtcl configs found"
6018	    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find zlibtcl configuration definitions" >&5
6019$as_echo "$as_me: WARNING: Cannot find zlibtcl configuration definitions" >&2;}
6020	    exit 0
6021	else
6022	    no_zlibtcl=
6023	    zlibtcl_BIN_DIR=${ac_cv_c_zlibtclconfig}
6024	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $zlibtcl_BIN_DIR/zlibtclConfig.sh" >&5
6025$as_echo "found $zlibtcl_BIN_DIR/zlibtclConfig.sh" >&6; }
6026	fi
6027    fi
6028
6029
6030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${zlibtcl_BIN_DIR}/zlibtclConfig.sh" >&5
6031$as_echo_n "checking for existence of ${zlibtcl_BIN_DIR}/zlibtclConfig.sh... " >&6; }
6032
6033    if test -f "${zlibtcl_BIN_DIR}/zlibtclConfig.sh" ; then
6034        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
6035$as_echo "loading" >&6; }
6036	. "${zlibtcl_BIN_DIR}/zlibtclConfig.sh"
6037    else
6038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
6039$as_echo "file not found" >&6; }
6040    fi
6041
6042    #
6043    # If the zlibtcl_BIN_DIR is the build directory (not the install directory),
6044    # then set the common variable name to the value of the build variables.
6045    # For example, the variable zlibtcl_LIB_SPEC will be set to the value
6046    # of zlibtcl_BUILD_LIB_SPEC. An extension should make use of zlibtcl_LIB_SPEC
6047    # instead of zlibtcl_BUILD_LIB_SPEC since it will work with both an
6048    # installed and uninstalled version of Tcl.
6049    #
6050
6051    if test -f "${zlibtcl_BIN_DIR}/Makefile" ; then
6052	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found Makefile - using build library specs for zlibtcl" >&5
6053$as_echo "$as_me: WARNING: Found Makefile - using build library specs for zlibtcl" >&2;}
6054        zlibtcl_LIB_SPEC=${zlibtcl_BUILD_LIB_SPEC}
6055        zlibtcl_STUB_LIB_SPEC=${zlibtcl_BUILD_STUB_LIB_SPEC}
6056        zlibtcl_STUB_LIB_PATH=${zlibtcl_BUILD_STUB_LIB_PATH}
6057        zlibtcl_INCLUDE_SPEC=${zlibtcl_BUILD_INCLUDE_SPEC}
6058        zlibtcl_LIBRARY_PATH=${zlibtcl_LIBRARY_PATH}
6059    fi
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072    # Allow the caller to prevent this auto-check by specifying any 2nd arg
6073    if test "x" = x; then :
6074
6075	# Check both upper and lower-case variants
6076	# If a dev wanted non-stubs libs, this function could take an option
6077	# to not use _STUB in the paths below
6078	if test "x${zlibtcl_STUB_LIB_SPEC}" = x; then :
6079
6080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking For ZLIBTCL_STUB library for LIBS" >&5
6081$as_echo_n "checking For ZLIBTCL_STUB library for LIBS... " >&6; }
6082    # This simplifies the use of stub libraries by automatically adding
6083    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
6084    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
6085    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
6086    if test "x${ZLIBTCL_STUB_LIB_SPEC}" != "x" ; then
6087	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
6088
6089    vars="\"`${CYGPATH} ${ZLIBTCL_STUB_LIB_PATH}`\""
6090    for i in $vars; do
6091	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6092	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6093	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
6094	fi
6095	PKG_LIBS="$PKG_LIBS $i"
6096    done
6097
6098
6099	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ZLIBTCL_STUB_LIB_PATH ${ZLIBTCL_STUB_LIB_PATH}" >&5
6100$as_echo "using ZLIBTCL_STUB_LIB_PATH ${ZLIBTCL_STUB_LIB_PATH}" >&6; }
6101	else
6102
6103    vars="${ZLIBTCL_STUB_LIB_SPEC}"
6104    for i in $vars; do
6105	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6106	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6107	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
6108	fi
6109	PKG_LIBS="$PKG_LIBS $i"
6110    done
6111
6112
6113	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ZLIBTCL_STUB_LIB_SPEC ${ZLIBTCL_STUB_LIB_SPEC}" >&5
6114$as_echo "using ZLIBTCL_STUB_LIB_SPEC ${ZLIBTCL_STUB_LIB_SPEC}" >&6; }
6115	fi
6116    else
6117	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
6118$as_echo "file not found" >&6; }
6119    fi
6120
6121else
6122
6123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking For zlibtcl_STUB library for LIBS" >&5
6124$as_echo_n "checking For zlibtcl_STUB library for LIBS... " >&6; }
6125    # This simplifies the use of stub libraries by automatically adding
6126    # the stub lib to your path.  Normally this would add to SHLIB_LD_LIBS,
6127    # but this is called before CONFIG_CFLAGS.  More importantly, this adds
6128    # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
6129    if test "x${zlibtcl_STUB_LIB_SPEC}" != "x" ; then
6130	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
6131
6132    vars="\"`${CYGPATH} ${zlibtcl_STUB_LIB_PATH}`\""
6133    for i in $vars; do
6134	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6135	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6136	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
6137	fi
6138	PKG_LIBS="$PKG_LIBS $i"
6139    done
6140
6141
6142	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using zlibtcl_STUB_LIB_PATH ${zlibtcl_STUB_LIB_PATH}" >&5
6143$as_echo "using zlibtcl_STUB_LIB_PATH ${zlibtcl_STUB_LIB_PATH}" >&6; }
6144	else
6145
6146    vars="${zlibtcl_STUB_LIB_SPEC}"
6147    for i in $vars; do
6148	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6149	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6150	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
6151	fi
6152	PKG_LIBS="$PKG_LIBS $i"
6153    done
6154
6155
6156	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using zlibtcl_STUB_LIB_SPEC ${zlibtcl_STUB_LIB_SPEC}" >&5
6157$as_echo "using zlibtcl_STUB_LIB_SPEC ${zlibtcl_STUB_LIB_SPEC}" >&6; }
6158	fi
6159    else
6160	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
6161$as_echo "file not found" >&6; }
6162    fi
6163
6164fi
6165
6166fi
6167
6168
6169
6170
6171#--------------------------------------------------------------------
6172# Compute an absolute path to the src directory of module 'tkimg' so
6173# that we are able to find its headers even if they are not installed.
6174#--------------------------------------------------------------------
6175
6176case $tkimg_SRC_DIR in
6177/*)	tkimg_SRC_PATH=$tkimg_SRC_DIR
6178	;;
6179*)	# SRC_DIR relative, splice with BUILD_PATH
6180	tkimg_SRC_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`/$tkimg_SRC_DIR"
6181esac
6182
6183tkimg_BUILD_PATH="`dirname $tkimg_BUILD_STUB_LIB_PATH`"
6184
6185if test "${TEA_PLATFORM}" = "windows" ; then
6186    tkimg_SRC_PATH="`$CYGPATH $tkimg_SRC_PATH`"
6187    tkimg_BUILD_PATH="`$CYGPATH $tkimg_BUILD_PATH`"
6188fi
6189
6190
6191
6192
6193
6194#--------------------------------------------------------------------
6195# Compute an absolute path to the src directory of module 'tifftcl' so
6196# that we are able to find its headers even if they are not installed.
6197#--------------------------------------------------------------------
6198
6199case $tifftcl_SRC_DIR in
6200/*)	tifftcl_SRC_PATH=$tifftcl_SRC_DIR
6201	;;
6202*)	# SRC_DIR relative, splice with BUILD_PATH
6203	tifftcl_SRC_PATH="`dirname $tifftcl_BUILD_STUB_LIB_PATH`/$tifftcl_SRC_DIR"
6204esac
6205
6206tifftcl_BUILD_PATH="`dirname $tifftcl_BUILD_STUB_LIB_PATH`"
6207
6208if test "${TEA_PLATFORM}" = "windows" ; then
6209    tifftcl_SRC_PATH="`$CYGPATH $tifftcl_SRC_PATH`"
6210    tifftcl_BUILD_PATH="`$CYGPATH $tifftcl_BUILD_PATH`"
6211fi
6212
6213
6214
6215
6216
6217#--------------------------------------------------------------------
6218# Compute an absolute path to the src directory of module 'jpegtcl' so
6219# that we are able to find its headers even if they are not installed.
6220#--------------------------------------------------------------------
6221
6222case $jpegtcl_SRC_DIR in
6223/*)	jpegtcl_SRC_PATH=$jpegtcl_SRC_DIR
6224	;;
6225*)	# SRC_DIR relative, splice with BUILD_PATH
6226	jpegtcl_SRC_PATH="`dirname $jpegtcl_BUILD_STUB_LIB_PATH`/$jpegtcl_SRC_DIR"
6227esac
6228
6229jpegtcl_BUILD_PATH="`dirname $jpegtcl_BUILD_STUB_LIB_PATH`"
6230
6231if test "${TEA_PLATFORM}" = "windows" ; then
6232    jpegtcl_SRC_PATH="`$CYGPATH $jpegtcl_SRC_PATH`"
6233    jpegtcl_BUILD_PATH="`$CYGPATH $jpegtcl_BUILD_PATH`"
6234fi
6235
6236
6237
6238
6239
6240#--------------------------------------------------------------------
6241# Compute an absolute path to the src directory of module 'zlibtcl' so
6242# that we are able to find its headers even if they are not installed.
6243#--------------------------------------------------------------------
6244
6245case $zlibtcl_SRC_DIR in
6246/*)	zlibtcl_SRC_PATH=$zlibtcl_SRC_DIR
6247	;;
6248*)	# SRC_DIR relative, splice with BUILD_PATH
6249	zlibtcl_SRC_PATH="`dirname $zlibtcl_BUILD_STUB_LIB_PATH`/$zlibtcl_SRC_DIR"
6250esac
6251
6252zlibtcl_BUILD_PATH="`dirname $zlibtcl_BUILD_STUB_LIB_PATH`"
6253
6254if test "${TEA_PLATFORM}" = "windows" ; then
6255    zlibtcl_SRC_PATH="`$CYGPATH $zlibtcl_SRC_PATH`"
6256    zlibtcl_BUILD_PATH="`$CYGPATH $zlibtcl_BUILD_PATH`"
6257fi
6258
6259
6260
6261
6262
6263#-----------------------------------------------------------------------
6264# Specify the C source files to compile in TEA_ADD_SOURCES,
6265# public headers that need to be installed in TEA_ADD_HEADERS,
6266# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
6267# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
6268# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
6269# and PKG_TCL_SOURCES.
6270#-----------------------------------------------------------------------
6271
6272
6273    vars="tiff.c"
6274    for i in $vars; do
6275	case $i in
6276	    \$*)
6277		# allow $-var names
6278		PKG_SOURCES="$PKG_SOURCES $i"
6279		PKG_OBJECTS="$PKG_OBJECTS $i"
6280		;;
6281	    *)
6282		# check for existence - allows for generic/win/unix VPATH
6283		# To add more dirs here (like 'src'), you have to update VPATH
6284		# in Makefile.in as well
6285		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6286		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6287		    -a ! -f "${srcdir}/macosx/$i" \
6288		    ; then
6289		    as_fn_error $? "could not find source file '$i'" "$LINENO" 5
6290		fi
6291		PKG_SOURCES="$PKG_SOURCES $i"
6292		# this assumes it is in a VPATH dir
6293		i=`basename $i`
6294		# handle user calling this before or after TEA_SETUP_COMPILER
6295		if test x"${OBJEXT}" != x ; then
6296		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6297		else
6298		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6299		fi
6300		PKG_OBJECTS="$PKG_OBJECTS $j"
6301		;;
6302	esac
6303    done
6304
6305
6306
6307
6308    vars=""
6309    for i in $vars; do
6310	# check for existence, be strict because it is installed
6311	if test ! -f "${srcdir}/$i" ; then
6312	    as_fn_error $? "could not find header file '${srcdir}/$i'" "$LINENO" 5
6313	fi
6314	PKG_HEADERS="$PKG_HEADERS $i"
6315    done
6316
6317
6318
6319    vars="-I\"`\${CYGPATH} \${srcdir}`\""
6320    for i in $vars; do
6321	PKG_INCLUDES="$PKG_INCLUDES $i"
6322    done
6323
6324
6325
6326    vars="-I\"`\${CYGPATH} \${tkimg_SRC_PATH}`\""
6327    for i in $vars; do
6328	PKG_INCLUDES="$PKG_INCLUDES $i"
6329    done
6330
6331
6332
6333    vars="-I\"`\${CYGPATH} \${tifftcl_SRC_PATH}`\""
6334    for i in $vars; do
6335	PKG_INCLUDES="$PKG_INCLUDES $i"
6336    done
6337
6338
6339
6340    vars="-I\"`\${CYGPATH} \${tifftcl_BUILD_PATH}/libtiff`\""
6341    for i in $vars; do
6342	PKG_INCLUDES="$PKG_INCLUDES $i"
6343    done
6344
6345
6346
6347    vars="-I\"`\${CYGPATH} \${jpegtcl_SRC_PATH}`\""
6348    for i in $vars; do
6349	PKG_INCLUDES="$PKG_INCLUDES $i"
6350    done
6351
6352
6353
6354    vars="-I\"`\${CYGPATH} \${jpegtcl_BUILD_PATH}/libjpeg`\""
6355    for i in $vars; do
6356	PKG_INCLUDES="$PKG_INCLUDES $i"
6357    done
6358
6359
6360
6361    vars="-I\"`\${CYGPATH} \${zlibtcl_SRC_PATH}`\""
6362    for i in $vars; do
6363	PKG_INCLUDES="$PKG_INCLUDES $i"
6364    done
6365
6366
6367
6368    vars="-I\"`\${CYGPATH} \${zlibtcl_BUILD_PATH}`\""
6369    for i in $vars; do
6370	PKG_INCLUDES="$PKG_INCLUDES $i"
6371    done
6372
6373
6374
6375    vars="-I."
6376    for i in $vars; do
6377	PKG_INCLUDES="$PKG_INCLUDES $i"
6378    done
6379
6380
6381
6382    vars="-lm"
6383    for i in $vars; do
6384	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6385	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6386	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
6387	fi
6388	PKG_LIBS="$PKG_LIBS $i"
6389    done
6390
6391
6392
6393    PKG_CFLAGS="$PKG_CFLAGS -DTKIMG_VERSION=\\\"\${tkimg_VERSION}\\\""
6394
6395
6396
6397    PKG_CFLAGS="$PKG_CFLAGS -DTIFFTCL_VERSION=\\\"\${tifftcl_VERSION}\\\""
6398
6399
6400
6401    PKG_CFLAGS="$PKG_CFLAGS -DJPEGTCL_VERSION=\\\"\${jpegtcl_VERSION}\\\""
6402
6403
6404
6405    PKG_CFLAGS="$PKG_CFLAGS -DZLIBTCL_VERSION=\\\"\${zlibtcl_VERSION}\\\""
6406
6407
6408
6409    vars=""
6410    for i in $vars; do
6411	# check for existence - allows for generic/win/unix VPATH
6412	if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6413	    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6414	    -a ! -f "${srcdir}/macosx/$i" \
6415	    ; then
6416	    as_fn_error $? "could not find stub source file '$i'" "$LINENO" 5
6417	fi
6418	PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
6419	# this assumes it is in a VPATH dir
6420	i=`basename $i`
6421	# handle user calling this before or after TEA_SETUP_COMPILER
6422	if test x"${OBJEXT}" != x ; then
6423	    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6424	else
6425	    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6426	fi
6427	PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
6428    done
6429
6430
6431
6432
6433    vars=""
6434    for i in $vars; do
6435	# check for existence, be strict because it is installed
6436	if test ! -f "${srcdir}/$i" ; then
6437	    as_fn_error $? "could not find tcl source file '${srcdir}/$i'" "$LINENO" 5
6438	fi
6439	PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
6440    done
6441
6442
6443
6444PUP="`echo ${PACKAGE_NAME}| tr 'a-z' 'A-Z'`"
6445
6446sed < "`${CYGPATH} ${srcdir}/../init.c`" > "init.c"	\
6447	-e	"s/@CPACKAGE@/${CPACKAGE}/"		\
6448	-e	"s/%PACKAGE%/${PACKAGE_NAME}/"		\
6449	-e	"s/%PACKAGE_UP%/${PUP}/"		\
6450	-e	"s/%PHIMGTYPE%/${PHIMGTYPE}/"
6451
6452# init.c is an included source file, not a source by itself
6453# FUTURE: Do this through AC_OUTPUT!!
6454
6455#--------------------------------------------------------------------
6456# __CHANGE__
6457# Choose which headers you need.  Extension authors should try very
6458# hard to only rely on the Tcl public header files.  Internal headers
6459# contain private data structures and are subject to change without
6460# notice.
6461# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
6462#--------------------------------------------------------------------
6463
6464
6465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl public headers" >&5
6466$as_echo_n "checking for Tcl public headers... " >&6; }
6467
6468
6469# Check whether --with-tclinclude was given.
6470if test "${with_tclinclude+set}" = set; then :
6471  withval=$with_tclinclude; with_tclinclude=${withval}
6472fi
6473
6474
6475    if ${ac_cv_c_tclh+:} false; then :
6476  $as_echo_n "(cached) " >&6
6477else
6478
6479	# Use the value from --with-tclinclude, if it was given
6480
6481	if test x"${with_tclinclude}" != x ; then
6482	    if test -f "${with_tclinclude}/tcl.h" ; then
6483		ac_cv_c_tclh=${with_tclinclude}
6484	    else
6485		as_fn_error $? "${with_tclinclude} directory does not contain tcl.h" "$LINENO" 5
6486	    fi
6487	else
6488	    list=""
6489	    if test "`uname -s`" = "Darwin"; then
6490		# If Tcl was built as a framework, attempt to use
6491		# the framework's Headers directory
6492		case ${TCL_DEFS} in
6493		    *TCL_FRAMEWORK*)
6494			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
6495			;;
6496		esac
6497	    fi
6498
6499	    # Look in the source dir only if Tcl is not installed,
6500	    # and in that situation, look there before installed locations.
6501	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
6502		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
6503	    fi
6504
6505	    # Check order: pkg --prefix location, Tcl's --prefix location,
6506	    # relative to directory of tclConfig.sh.
6507
6508	    eval "temp_includedir=${includedir}"
6509	    list="$list \
6510		`ls -d ${temp_includedir}        2>/dev/null` \
6511		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
6512		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
6513	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
6514		list="$list /usr/local/include /usr/include"
6515		if test x"${TCL_INCLUDE_SPEC}" != x ; then
6516		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
6517		    list="$list `ls -d ${d} 2>/dev/null`"
6518		fi
6519	    fi
6520	    for i in $list ; do
6521		if test -f "$i/tcl.h" ; then
6522		    ac_cv_c_tclh=$i
6523		    break
6524		fi
6525	    done
6526	fi
6527
6528fi
6529
6530
6531    # Print a message based on how we determined the include path
6532
6533    if test x"${ac_cv_c_tclh}" = x ; then
6534	as_fn_error $? "tcl.h not found.  Please specify its location with --with-tclinclude" "$LINENO" 5
6535    else
6536	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5
6537$as_echo "${ac_cv_c_tclh}" >&6; }
6538    fi
6539
6540    # Convert to a native path and substitute into the output files.
6541
6542    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
6543
6544    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
6545
6546
6547
6548
6549    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk public headers" >&5
6550$as_echo_n "checking for Tk public headers... " >&6; }
6551
6552
6553# Check whether --with-tkinclude was given.
6554if test "${with_tkinclude+set}" = set; then :
6555  withval=$with_tkinclude; with_tkinclude=${withval}
6556fi
6557
6558
6559    if ${ac_cv_c_tkh+:} false; then :
6560  $as_echo_n "(cached) " >&6
6561else
6562
6563	# Use the value from --with-tkinclude, if it was given
6564
6565	if test x"${with_tkinclude}" != x ; then
6566	    if test -f "${with_tkinclude}/tk.h" ; then
6567		ac_cv_c_tkh=${with_tkinclude}
6568	    else
6569		as_fn_error $? "${with_tkinclude} directory does not contain tk.h" "$LINENO" 5
6570	    fi
6571	else
6572	    list=""
6573	    if test "`uname -s`" = "Darwin"; then
6574		# If Tk was built as a framework, attempt to use
6575		# the framework's Headers directory.
6576		case ${TK_DEFS} in
6577		    *TK_FRAMEWORK*)
6578			list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
6579			;;
6580		esac
6581	    fi
6582
6583	    # Look in the source dir only if Tk is not installed,
6584	    # and in that situation, look there before installed locations.
6585	    if test -f "${TK_BIN_DIR}/Makefile" ; then
6586		list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
6587	    fi
6588
6589	    # Check order: pkg --prefix location, Tk's --prefix location,
6590	    # relative to directory of tkConfig.sh, Tcl's --prefix location,
6591	    # relative to directory of tclConfig.sh.
6592
6593	    eval "temp_includedir=${includedir}"
6594	    list="$list \
6595		`ls -d ${temp_includedir}        2>/dev/null` \
6596		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
6597		`ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
6598		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
6599		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
6600	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
6601		list="$list /usr/local/include /usr/include"
6602		if test x"${TK_INCLUDE_SPEC}" != x ; then
6603		    d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
6604		    list="$list `ls -d ${d} 2>/dev/null`"
6605		fi
6606	    fi
6607	    for i in $list ; do
6608		if test -f "$i/tk.h" ; then
6609		    ac_cv_c_tkh=$i
6610		    break
6611		fi
6612	    done
6613	fi
6614
6615fi
6616
6617
6618    # Print a message based on how we determined the include path
6619
6620    if test x"${ac_cv_c_tkh}" = x ; then
6621	as_fn_error $? "tk.h not found.  Please specify its location with --with-tkinclude" "$LINENO" 5
6622    else
6623	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tkh}" >&5
6624$as_echo "${ac_cv_c_tkh}" >&6; }
6625    fi
6626
6627    # Convert to a native path and substitute into the output files.
6628
6629    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
6630
6631    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
6632
6633
6634
6635    if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
6636	# On Windows and Aqua, we need the X compat headers
6637	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 header files" >&5
6638$as_echo_n "checking for X11 header files... " >&6; }
6639	if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
6640	    INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
6641	    TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
6642
6643	fi
6644	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${INCLUDE_DIR_NATIVE}" >&5
6645$as_echo "${INCLUDE_DIR_NATIVE}" >&6; }
6646    fi
6647
6648
6649#--------------------------------------------------------------------
6650# A few miscellaneous platform-specific items:
6651#
6652# Windows creates a few extra files that need to be cleaned up.
6653# We can add more files to clean if our extension creates any extra
6654# files in the future.
6655#
6656# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
6657# These will be appended to the current set of compiler flags for
6658# your system.
6659#--------------------------------------------------------------------
6660
6661if test "${TEA_PLATFORM}" = "windows" ; then
6662    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
6663fi
6664
6665
6666#--------------------------------------------------------------------
6667# Check whether --enable-threads or --disable-threads was given.
6668# So far only Tcl responds to this one.
6669#--------------------------------------------------------------------
6670
6671
6672    # Check whether --enable-threads was given.
6673if test "${enable_threads+set}" = set; then :
6674  enableval=$enable_threads; tcl_ok=$enableval
6675else
6676  tcl_ok=yes
6677fi
6678
6679
6680    if test "${enable_threads+set}" = set; then
6681	enableval="$enable_threads"
6682	tcl_ok=$enableval
6683    else
6684	tcl_ok=yes
6685    fi
6686
6687    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
6688	TCL_THREADS=1
6689
6690	if test "${TEA_PLATFORM}" != "windows" ; then
6691	    # We are always OK on Windows, so check what this platform wants:
6692
6693	    # USE_THREAD_ALLOC tells us to try the special thread-based
6694	    # allocator that significantly reduces lock contention
6695
6696$as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h
6697
6698
6699$as_echo "#define _REENTRANT 1" >>confdefs.h
6700
6701	    if test "`uname -s`" = "SunOS" ; then
6702
6703$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6704
6705	    fi
6706
6707$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
6708
6709	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5
6710$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; }
6711if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then :
6712  $as_echo_n "(cached) " >&6
6713else
6714  ac_check_lib_save_LIBS=$LIBS
6715LIBS="-lpthread  $LIBS"
6716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6717/* end confdefs.h.  */
6718
6719/* Override any GCC internal prototype to avoid an error.
6720   Use char because int might match the return type of a GCC
6721   builtin and then its argument prototype would still apply.  */
6722#ifdef __cplusplus
6723extern "C"
6724#endif
6725char pthread_mutex_init ();
6726int
6727main ()
6728{
6729return pthread_mutex_init ();
6730  ;
6731  return 0;
6732}
6733_ACEOF
6734if ac_fn_c_try_link "$LINENO"; then :
6735  ac_cv_lib_pthread_pthread_mutex_init=yes
6736else
6737  ac_cv_lib_pthread_pthread_mutex_init=no
6738fi
6739rm -f core conftest.err conftest.$ac_objext \
6740    conftest$ac_exeext conftest.$ac_ext
6741LIBS=$ac_check_lib_save_LIBS
6742fi
6743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
6744$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
6745if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then :
6746  tcl_ok=yes
6747else
6748  tcl_ok=no
6749fi
6750
6751	    if test "$tcl_ok" = "no"; then
6752		# Check a little harder for __pthread_mutex_init in the same
6753		# library, as some systems hide it there until pthread.h is
6754		# defined.  We could alternatively do an AC_TRY_COMPILE with
6755		# pthread.h, but that will work with libpthread really doesn't
6756		# exist, like AIX 4.2.  [Bug: 4359]
6757		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5
6758$as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; }
6759if ${ac_cv_lib_pthread___pthread_mutex_init+:} false; then :
6760  $as_echo_n "(cached) " >&6
6761else
6762  ac_check_lib_save_LIBS=$LIBS
6763LIBS="-lpthread  $LIBS"
6764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6765/* end confdefs.h.  */
6766
6767/* Override any GCC internal prototype to avoid an error.
6768   Use char because int might match the return type of a GCC
6769   builtin and then its argument prototype would still apply.  */
6770#ifdef __cplusplus
6771extern "C"
6772#endif
6773char __pthread_mutex_init ();
6774int
6775main ()
6776{
6777return __pthread_mutex_init ();
6778  ;
6779  return 0;
6780}
6781_ACEOF
6782if ac_fn_c_try_link "$LINENO"; then :
6783  ac_cv_lib_pthread___pthread_mutex_init=yes
6784else
6785  ac_cv_lib_pthread___pthread_mutex_init=no
6786fi
6787rm -f core conftest.err conftest.$ac_objext \
6788    conftest$ac_exeext conftest.$ac_ext
6789LIBS=$ac_check_lib_save_LIBS
6790fi
6791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
6792$as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
6793if test "x$ac_cv_lib_pthread___pthread_mutex_init" = xyes; then :
6794  tcl_ok=yes
6795else
6796  tcl_ok=no
6797fi
6798
6799	    fi
6800
6801	    if test "$tcl_ok" = "yes"; then
6802		# The space is needed
6803		THREADS_LIBS=" -lpthread"
6804	    else
6805		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5
6806$as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; }
6807if ${ac_cv_lib_pthreads_pthread_mutex_init+:} false; then :
6808  $as_echo_n "(cached) " >&6
6809else
6810  ac_check_lib_save_LIBS=$LIBS
6811LIBS="-lpthreads  $LIBS"
6812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6813/* end confdefs.h.  */
6814
6815/* Override any GCC internal prototype to avoid an error.
6816   Use char because int might match the return type of a GCC
6817   builtin and then its argument prototype would still apply.  */
6818#ifdef __cplusplus
6819extern "C"
6820#endif
6821char pthread_mutex_init ();
6822int
6823main ()
6824{
6825return pthread_mutex_init ();
6826  ;
6827  return 0;
6828}
6829_ACEOF
6830if ac_fn_c_try_link "$LINENO"; then :
6831  ac_cv_lib_pthreads_pthread_mutex_init=yes
6832else
6833  ac_cv_lib_pthreads_pthread_mutex_init=no
6834fi
6835rm -f core conftest.err conftest.$ac_objext \
6836    conftest$ac_exeext conftest.$ac_ext
6837LIBS=$ac_check_lib_save_LIBS
6838fi
6839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
6840$as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
6841if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = xyes; then :
6842  tcl_ok=yes
6843else
6844  tcl_ok=no
6845fi
6846
6847		if test "$tcl_ok" = "yes"; then
6848		    # The space is needed
6849		    THREADS_LIBS=" -lpthreads"
6850		else
6851		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5
6852$as_echo_n "checking for pthread_mutex_init in -lc... " >&6; }
6853if ${ac_cv_lib_c_pthread_mutex_init+:} false; then :
6854  $as_echo_n "(cached) " >&6
6855else
6856  ac_check_lib_save_LIBS=$LIBS
6857LIBS="-lc  $LIBS"
6858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6859/* end confdefs.h.  */
6860
6861/* Override any GCC internal prototype to avoid an error.
6862   Use char because int might match the return type of a GCC
6863   builtin and then its argument prototype would still apply.  */
6864#ifdef __cplusplus
6865extern "C"
6866#endif
6867char pthread_mutex_init ();
6868int
6869main ()
6870{
6871return pthread_mutex_init ();
6872  ;
6873  return 0;
6874}
6875_ACEOF
6876if ac_fn_c_try_link "$LINENO"; then :
6877  ac_cv_lib_c_pthread_mutex_init=yes
6878else
6879  ac_cv_lib_c_pthread_mutex_init=no
6880fi
6881rm -f core conftest.err conftest.$ac_objext \
6882    conftest$ac_exeext conftest.$ac_ext
6883LIBS=$ac_check_lib_save_LIBS
6884fi
6885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5
6886$as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; }
6887if test "x$ac_cv_lib_c_pthread_mutex_init" = xyes; then :
6888  tcl_ok=yes
6889else
6890  tcl_ok=no
6891fi
6892
6893		    if test "$tcl_ok" = "no"; then
6894			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5
6895$as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; }
6896if ${ac_cv_lib_c_r_pthread_mutex_init+:} false; then :
6897  $as_echo_n "(cached) " >&6
6898else
6899  ac_check_lib_save_LIBS=$LIBS
6900LIBS="-lc_r  $LIBS"
6901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6902/* end confdefs.h.  */
6903
6904/* Override any GCC internal prototype to avoid an error.
6905   Use char because int might match the return type of a GCC
6906   builtin and then its argument prototype would still apply.  */
6907#ifdef __cplusplus
6908extern "C"
6909#endif
6910char pthread_mutex_init ();
6911int
6912main ()
6913{
6914return pthread_mutex_init ();
6915  ;
6916  return 0;
6917}
6918_ACEOF
6919if ac_fn_c_try_link "$LINENO"; then :
6920  ac_cv_lib_c_r_pthread_mutex_init=yes
6921else
6922  ac_cv_lib_c_r_pthread_mutex_init=no
6923fi
6924rm -f core conftest.err conftest.$ac_objext \
6925    conftest$ac_exeext conftest.$ac_ext
6926LIBS=$ac_check_lib_save_LIBS
6927fi
6928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
6929$as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
6930if test "x$ac_cv_lib_c_r_pthread_mutex_init" = xyes; then :
6931  tcl_ok=yes
6932else
6933  tcl_ok=no
6934fi
6935
6936			if test "$tcl_ok" = "yes"; then
6937			    # The space is needed
6938			    THREADS_LIBS=" -pthread"
6939			else
6940			    TCL_THREADS=0
6941			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
6942$as_echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
6943			fi
6944		    fi
6945		fi
6946	    fi
6947	fi
6948    else
6949	TCL_THREADS=0
6950    fi
6951    # Do checking message here to not mess up interleaved configure output
6952    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5
6953$as_echo_n "checking for building with threads... " >&6; }
6954    if test "${TCL_THREADS}" = 1; then
6955
6956$as_echo "#define TCL_THREADS 1" >>confdefs.h
6957
6958	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
6959$as_echo "yes (default)" >&6; }
6960    else
6961	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6962$as_echo "no" >&6; }
6963    fi
6964    # TCL_THREADS sanity checking.  See if our request for building with
6965    # threads is the same as the way Tcl was built.  If not, warn the user.
6966    case ${TCL_DEFS} in
6967	*THREADS=1*)
6968	    if test "${TCL_THREADS}" = "0"; then
6969		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
6970    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
6971    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
6972$as_echo "$as_me: WARNING:
6973    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
6974    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
6975	    fi
6976	    ;;
6977    esac
6978
6979
6980
6981#--------------------------------------------------------------------
6982# The statement below defines a collection of symbols related to
6983# building as a shared library instead of a static library.
6984#--------------------------------------------------------------------
6985
6986
6987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
6988$as_echo_n "checking how to build libraries... " >&6; }
6989    # Check whether --enable-shared was given.
6990if test "${enable_shared+set}" = set; then :
6991  enableval=$enable_shared; shared_ok=$enableval
6992else
6993  shared_ok=yes
6994fi
6995
6996
6997    if test "${enable_shared+set}" = set; then
6998	enableval="$enable_shared"
6999	shared_ok=$enableval
7000    else
7001	shared_ok=yes
7002    fi
7003
7004    # Check whether --enable-stubs was given.
7005if test "${enable_stubs+set}" = set; then :
7006  enableval=$enable_stubs; stubs_ok=$enableval
7007else
7008  stubs_ok=yes
7009fi
7010
7011
7012    if test "${enable_stubs+set}" = set; then
7013	enableval="$enable_stubs"
7014	stubs_ok=$enableval
7015    else
7016	stubs_ok=yes
7017    fi
7018
7019    # Stubs are always enabled for shared builds
7020    if test "$shared_ok" = "yes" ; then
7021	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
7022$as_echo "shared" >&6; }
7023	SHARED_BUILD=1
7024        STUBS_BUILD=1
7025    else
7026	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
7027$as_echo "static" >&6; }
7028	SHARED_BUILD=0
7029
7030$as_echo "#define STATIC_BUILD 1" >>confdefs.h
7031
7032        if test "$stubs_ok" = "yes" ; then
7033          STUBS_BUILD=1
7034        else
7035          STUBS_BUILD=0
7036        fi
7037    fi
7038    if test "${STUBS_BUILD}" = "1" ; then
7039
7040$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h
7041
7042
7043$as_echo "#define USE_TCLOO_STUBS 1" >>confdefs.h
7044
7045      if test "${TEA_WINDOWINGSYSTEM}" != ""; then
7046
7047$as_echo "#define USE_TK_STUBS 1" >>confdefs.h
7048
7049      fi
7050    fi
7051
7052
7053
7054
7055
7056#--------------------------------------------------------------------
7057# This macro figures out what flags to use with the compiler/linker
7058# when building shared/static debug/optimized objects.  This information
7059# can be taken from the tclConfig.sh file, but this figures it all out.
7060#--------------------------------------------------------------------
7061
7062if test -n "$ac_tool_prefix"; then
7063  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7064set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7066$as_echo_n "checking for $ac_word... " >&6; }
7067if ${ac_cv_prog_RANLIB+:} false; then :
7068  $as_echo_n "(cached) " >&6
7069else
7070  if test -n "$RANLIB"; then
7071  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7072else
7073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7074for as_dir in $PATH
7075do
7076  IFS=$as_save_IFS
7077  test -z "$as_dir" && as_dir=.
7078    for ac_exec_ext in '' $ac_executable_extensions; do
7079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7080    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7082    break 2
7083  fi
7084done
7085  done
7086IFS=$as_save_IFS
7087
7088fi
7089fi
7090RANLIB=$ac_cv_prog_RANLIB
7091if test -n "$RANLIB"; then
7092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7093$as_echo "$RANLIB" >&6; }
7094else
7095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7096$as_echo "no" >&6; }
7097fi
7098
7099
7100fi
7101if test -z "$ac_cv_prog_RANLIB"; then
7102  ac_ct_RANLIB=$RANLIB
7103  # Extract the first word of "ranlib", so it can be a program name with args.
7104set dummy ranlib; ac_word=$2
7105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7106$as_echo_n "checking for $ac_word... " >&6; }
7107if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7108  $as_echo_n "(cached) " >&6
7109else
7110  if test -n "$ac_ct_RANLIB"; then
7111  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7112else
7113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7114for as_dir in $PATH
7115do
7116  IFS=$as_save_IFS
7117  test -z "$as_dir" && as_dir=.
7118    for ac_exec_ext in '' $ac_executable_extensions; do
7119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7120    ac_cv_prog_ac_ct_RANLIB="ranlib"
7121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7122    break 2
7123  fi
7124done
7125  done
7126IFS=$as_save_IFS
7127
7128fi
7129fi
7130ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7131if test -n "$ac_ct_RANLIB"; then
7132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7133$as_echo "$ac_ct_RANLIB" >&6; }
7134else
7135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7136$as_echo "no" >&6; }
7137fi
7138
7139  if test "x$ac_ct_RANLIB" = x; then
7140    RANLIB=":"
7141  else
7142    case $cross_compiling:$ac_tool_warned in
7143yes:)
7144{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7145$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7146ac_tool_warned=yes ;;
7147esac
7148    RANLIB=$ac_ct_RANLIB
7149  fi
7150else
7151  RANLIB="$ac_cv_prog_RANLIB"
7152fi
7153
7154
7155
7156
7157    # Step 0.a: Enable 64 bit support?
7158
7159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5
7160$as_echo_n "checking if 64bit support is requested... " >&6; }
7161    # Check whether --enable-64bit was given.
7162if test "${enable_64bit+set}" = set; then :
7163  enableval=$enable_64bit; do64bit=$enableval
7164else
7165  do64bit=no
7166fi
7167
7168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5
7169$as_echo "$do64bit" >&6; }
7170
7171    # Step 0.b: Enable Solaris 64 bit VIS support?
7172
7173    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5
7174$as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; }
7175    # Check whether --enable-64bit-vis was given.
7176if test "${enable_64bit_vis+set}" = set; then :
7177  enableval=$enable_64bit_vis; do64bitVIS=$enableval
7178else
7179  do64bitVIS=no
7180fi
7181
7182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5
7183$as_echo "$do64bitVIS" >&6; }
7184    # Force 64bit on with VIS
7185    if test "$do64bitVIS" = "yes"; then :
7186  do64bit=yes
7187fi
7188
7189    # Step 0.c: Check if visibility support is available. Do this here so
7190    # that platform specific alternatives can be used below if this fails.
7191
7192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5
7193$as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; }
7194if ${tcl_cv_cc_visibility_hidden+:} false; then :
7195  $as_echo_n "(cached) " >&6
7196else
7197
7198	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
7199	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7200/* end confdefs.h.  */
7201
7202	    extern __attribute__((__visibility__("hidden"))) void f(void);
7203	    void f(void) {}
7204int
7205main ()
7206{
7207f();
7208  ;
7209  return 0;
7210}
7211_ACEOF
7212if ac_fn_c_try_link "$LINENO"; then :
7213  tcl_cv_cc_visibility_hidden=yes
7214else
7215  tcl_cv_cc_visibility_hidden=no
7216fi
7217rm -f core conftest.err conftest.$ac_objext \
7218    conftest$ac_exeext conftest.$ac_ext
7219	CFLAGS=$hold_cflags
7220fi
7221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5
7222$as_echo "$tcl_cv_cc_visibility_hidden" >&6; }
7223    if test $tcl_cv_cc_visibility_hidden = yes; then :
7224
7225
7226$as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h
7227
7228
7229$as_echo "#define HAVE_HIDDEN 1" >>confdefs.h
7230
7231
7232fi
7233
7234    # Step 0.d: Disable -rpath support?
7235
7236    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5
7237$as_echo_n "checking if rpath support is requested... " >&6; }
7238    # Check whether --enable-rpath was given.
7239if test "${enable_rpath+set}" = set; then :
7240  enableval=$enable_rpath; doRpath=$enableval
7241else
7242  doRpath=yes
7243fi
7244
7245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5
7246$as_echo "$doRpath" >&6; }
7247
7248    # Set the variable "system" to hold the name and version number
7249    # for the system.
7250
7251
7252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
7253$as_echo_n "checking system version... " >&6; }
7254if ${tcl_cv_sys_version+:} false; then :
7255  $as_echo_n "(cached) " >&6
7256else
7257
7258	# TEA specific:
7259	if test "${TEA_PLATFORM}" = "windows" ; then
7260	    tcl_cv_sys_version=windows
7261	else
7262	    tcl_cv_sys_version=`uname -s`-`uname -r`
7263	    if test "$?" -ne 0 ; then
7264		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
7265$as_echo "$as_me: WARNING: can't find uname command" >&2;}
7266		tcl_cv_sys_version=unknown
7267	    else
7268		if test "`uname -s`" = "AIX" ; then
7269		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
7270		fi
7271		if test "`uname -s`" = "NetBSD" -a -f /etc/debian_version ; then
7272		    tcl_cv_sys_version=NetBSD-Debian
7273		fi
7274	    fi
7275	fi
7276
7277fi
7278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
7279$as_echo "$tcl_cv_sys_version" >&6; }
7280    system=$tcl_cv_sys_version
7281
7282
7283    # Require ranlib early so we can override it in special cases below.
7284
7285
7286
7287    # Set configuration options based on system name and version.
7288    # This is similar to Tcl's unix/tcl.m4 except that we've added a
7289    # "windows" case and removed some core-only vars.
7290
7291    do64bit_ok=no
7292    # default to '{$LIBS}' and set to "" on per-platform necessary basis
7293    SHLIB_LD_LIBS='${LIBS}'
7294    # When ld needs options to work in 64-bit mode, put them in
7295    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
7296    # is disabled by the user. [Bug 1016796]
7297    LDFLAGS_ARCH=""
7298    UNSHARED_LIB_SUFFIX=""
7299    # TEA specific: use PACKAGE_VERSION instead of VERSION
7300    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
7301    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
7302    TCL_LIB_VERSIONS_OK=ok
7303    CFLAGS_DEBUG=-g
7304    if test "$GCC" = yes; then :
7305
7306	CFLAGS_OPTIMIZE=-O2
7307	CFLAGS_WARNING="-Wall"
7308
7309else
7310
7311	CFLAGS_OPTIMIZE=-O
7312	CFLAGS_WARNING=""
7313
7314fi
7315    if test -n "$ac_tool_prefix"; then
7316  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7317set dummy ${ac_tool_prefix}ar; ac_word=$2
7318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7319$as_echo_n "checking for $ac_word... " >&6; }
7320if ${ac_cv_prog_AR+:} false; then :
7321  $as_echo_n "(cached) " >&6
7322else
7323  if test -n "$AR"; then
7324  ac_cv_prog_AR="$AR" # Let the user override the test.
7325else
7326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7327for as_dir in $PATH
7328do
7329  IFS=$as_save_IFS
7330  test -z "$as_dir" && as_dir=.
7331    for ac_exec_ext in '' $ac_executable_extensions; do
7332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7333    ac_cv_prog_AR="${ac_tool_prefix}ar"
7334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7335    break 2
7336  fi
7337done
7338  done
7339IFS=$as_save_IFS
7340
7341fi
7342fi
7343AR=$ac_cv_prog_AR
7344if test -n "$AR"; then
7345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7346$as_echo "$AR" >&6; }
7347else
7348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7349$as_echo "no" >&6; }
7350fi
7351
7352
7353fi
7354if test -z "$ac_cv_prog_AR"; then
7355  ac_ct_AR=$AR
7356  # Extract the first word of "ar", so it can be a program name with args.
7357set dummy ar; ac_word=$2
7358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7359$as_echo_n "checking for $ac_word... " >&6; }
7360if ${ac_cv_prog_ac_ct_AR+:} false; then :
7361  $as_echo_n "(cached) " >&6
7362else
7363  if test -n "$ac_ct_AR"; then
7364  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7365else
7366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7367for as_dir in $PATH
7368do
7369  IFS=$as_save_IFS
7370  test -z "$as_dir" && as_dir=.
7371    for ac_exec_ext in '' $ac_executable_extensions; do
7372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7373    ac_cv_prog_ac_ct_AR="ar"
7374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7375    break 2
7376  fi
7377done
7378  done
7379IFS=$as_save_IFS
7380
7381fi
7382fi
7383ac_ct_AR=$ac_cv_prog_ac_ct_AR
7384if test -n "$ac_ct_AR"; then
7385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7386$as_echo "$ac_ct_AR" >&6; }
7387else
7388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7389$as_echo "no" >&6; }
7390fi
7391
7392  if test "x$ac_ct_AR" = x; then
7393    AR=""
7394  else
7395    case $cross_compiling:$ac_tool_warned in
7396yes:)
7397{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7398$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7399ac_tool_warned=yes ;;
7400esac
7401    AR=$ac_ct_AR
7402  fi
7403else
7404  AR="$ac_cv_prog_AR"
7405fi
7406
7407    STLIB_LD='${AR} cr'
7408    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
7409    if test "x$SHLIB_VERSION" = x; then :
7410  SHLIB_VERSION=""
7411else
7412  SHLIB_VERSION=".$SHLIB_VERSION"
7413fi
7414    case $system in
7415	# TEA specific:
7416	windows)
7417	    MACHINE="X86"
7418	    if test "$do64bit" != "no" ; then
7419		case "$do64bit" in
7420		    amd64|x64|yes)
7421			MACHINE="AMD64" ; # default to AMD64 64-bit build
7422			;;
7423		    ia64)
7424			MACHINE="IA64"
7425			;;
7426		esac
7427	    fi
7428
7429	    if test "$GCC" != "yes" ; then
7430	        if test "${SHARED_BUILD}" = "0" ; then
7431		    runtime=-MT
7432	        else
7433		    runtime=-MD
7434	        fi
7435	        case "x`echo \${VisualStudioVersion}`" in
7436	            x1[4-9]*)
7437		        lflags="${lflags} -nodefaultlib:libucrt.lib"
7438
7439    vars="ucrt.lib"
7440    for i in $vars; do
7441	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7442	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7443	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
7444	fi
7445	PKG_LIBS="$PKG_LIBS $i"
7446    done
7447
7448
7449	            ;;
7450	            *)
7451	            ;;
7452	        esac
7453
7454                if test "$do64bit" != "no" ; then
7455		    CC="cl.exe"
7456		    RC="rc.exe"
7457		    lflags="${lflags} -nologo -MACHINE:${MACHINE} "
7458		    LINKBIN="link.exe"
7459		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
7460		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
7461		    # Avoid 'unresolved external symbol __security_cookie'
7462		    # errors, c.f. http://support.microsoft.com/?id=894573
7463
7464    vars="bufferoverflowU.lib"
7465    for i in $vars; do
7466	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7467	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7468	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
7469	fi
7470	PKG_LIBS="$PKG_LIBS $i"
7471    done
7472
7473
7474		else
7475		    RC="rc"
7476		    lflags="${lflags} -nologo"
7477		    LINKBIN="link"
7478		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
7479		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
7480		fi
7481	    fi
7482
7483	    if test "$GCC" = "yes"; then
7484		# mingw gcc mode
7485		if test -n "$ac_tool_prefix"; then
7486  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7487set dummy ${ac_tool_prefix}windres; ac_word=$2
7488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7489$as_echo_n "checking for $ac_word... " >&6; }
7490if ${ac_cv_prog_RC+:} false; then :
7491  $as_echo_n "(cached) " >&6
7492else
7493  if test -n "$RC"; then
7494  ac_cv_prog_RC="$RC" # Let the user override the test.
7495else
7496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7497for as_dir in $PATH
7498do
7499  IFS=$as_save_IFS
7500  test -z "$as_dir" && as_dir=.
7501    for ac_exec_ext in '' $ac_executable_extensions; do
7502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7503    ac_cv_prog_RC="${ac_tool_prefix}windres"
7504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7505    break 2
7506  fi
7507done
7508  done
7509IFS=$as_save_IFS
7510
7511fi
7512fi
7513RC=$ac_cv_prog_RC
7514if test -n "$RC"; then
7515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
7516$as_echo "$RC" >&6; }
7517else
7518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7519$as_echo "no" >&6; }
7520fi
7521
7522
7523fi
7524if test -z "$ac_cv_prog_RC"; then
7525  ac_ct_RC=$RC
7526  # Extract the first word of "windres", so it can be a program name with args.
7527set dummy windres; ac_word=$2
7528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7529$as_echo_n "checking for $ac_word... " >&6; }
7530if ${ac_cv_prog_ac_ct_RC+:} false; then :
7531  $as_echo_n "(cached) " >&6
7532else
7533  if test -n "$ac_ct_RC"; then
7534  ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test.
7535else
7536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7537for as_dir in $PATH
7538do
7539  IFS=$as_save_IFS
7540  test -z "$as_dir" && as_dir=.
7541    for ac_exec_ext in '' $ac_executable_extensions; do
7542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7543    ac_cv_prog_ac_ct_RC="windres"
7544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7545    break 2
7546  fi
7547done
7548  done
7549IFS=$as_save_IFS
7550
7551fi
7552fi
7553ac_ct_RC=$ac_cv_prog_ac_ct_RC
7554if test -n "$ac_ct_RC"; then
7555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
7556$as_echo "$ac_ct_RC" >&6; }
7557else
7558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7559$as_echo "no" >&6; }
7560fi
7561
7562  if test "x$ac_ct_RC" = x; then
7563    RC=""
7564  else
7565    case $cross_compiling:$ac_tool_warned in
7566yes:)
7567{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7568$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7569ac_tool_warned=yes ;;
7570esac
7571    RC=$ac_ct_RC
7572  fi
7573else
7574  RC="$ac_cv_prog_RC"
7575fi
7576
7577		CFLAGS_DEBUG="-g"
7578		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
7579		SHLIB_LD='${CC} -shared'
7580		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7581		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
7582		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
7583
7584		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cross-compile version of gcc" >&5
7585$as_echo_n "checking for cross-compile version of gcc... " >&6; }
7586if ${ac_cv_cross+:} false; then :
7587  $as_echo_n "(cached) " >&6
7588else
7589  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7590/* end confdefs.h.  */
7591
7592			    #ifdef _WIN32
7593				#error cross-compiler
7594			    #endif
7595
7596int
7597main ()
7598{
7599
7600  ;
7601  return 0;
7602}
7603_ACEOF
7604if ac_fn_c_try_compile "$LINENO"; then :
7605  ac_cv_cross=yes
7606else
7607  ac_cv_cross=no
7608fi
7609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7610
7611fi
7612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cross" >&5
7613$as_echo "$ac_cv_cross" >&6; }
7614		      if test "$ac_cv_cross" = "yes"; then
7615			case "$do64bit" in
7616			    amd64|x64|yes)
7617				CC="x86_64-w64-mingw32-${CC}"
7618				LD="x86_64-w64-mingw32-ld"
7619				AR="x86_64-w64-mingw32-ar"
7620				RANLIB="x86_64-w64-mingw32-ranlib"
7621				RC="x86_64-w64-mingw32-windres"
7622			    ;;
7623			    *)
7624				CC="i686-w64-mingw32-${CC}"
7625				LD="i686-w64-mingw32-ld"
7626				AR="i686-w64-mingw32-ar"
7627				RANLIB="i686-w64-mingw32-ranlib"
7628				RC="i686-w64-mingw32-windres"
7629			    ;;
7630			esac
7631		fi
7632
7633	    else
7634		SHLIB_LD="${LINKBIN} -dll ${lflags}"
7635		# link -lib only works when -lib is the first arg
7636		STLIB_LD="${LINKBIN} -lib ${lflags}"
7637		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
7638		PATHTYPE=-w
7639		# For information on what debugtype is most useful, see:
7640		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
7641		# and also
7642		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
7643		# This essentially turns it all on.
7644		LDFLAGS_DEBUG="-debug -debugtype:cv"
7645		LDFLAGS_OPTIMIZE="-release"
7646		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
7647		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
7648	    fi
7649
7650	    SHLIB_SUFFIX=".dll"
7651	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
7652
7653	    TCL_LIB_VERSIONS_OK=nodots
7654    	    ;;
7655	AIX-*)
7656	    if test "$GCC" != "yes"; then :
7657
7658		# AIX requires the _r compiler when gcc isn't being used
7659		case "${CC}" in
7660		    *_r|*_r\ *)
7661			# ok ...
7662			;;
7663		    *)
7664			# Make sure only first arg gets _r
7665		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
7666			;;
7667		esac
7668		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5
7669$as_echo "Using $CC for compiling with threads" >&6; }
7670
7671fi
7672	    LIBS="$LIBS -lc"
7673	    SHLIB_CFLAGS=""
7674	    SHLIB_SUFFIX=".so"
7675
7676	    LD_LIBRARY_PATH_VAR="LIBPATH"
7677
7678	    # Check to enable 64-bit flags for compiler/linker
7679	    if test "$do64bit" = yes; then :
7680
7681		if test "$GCC" = yes; then :
7682
7683		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
7684$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7685
7686else
7687
7688		    do64bit_ok=yes
7689		    CFLAGS="$CFLAGS -q64"
7690		    LDFLAGS_ARCH="-q64"
7691		    RANLIB="${RANLIB} -X64"
7692		    AR="${AR} -X64"
7693		    SHLIB_LD_FLAGS="-b64"
7694
7695fi
7696
7697fi
7698
7699	    if test "`uname -m`" = ia64; then :
7700
7701		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
7702		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
7703		if test "$GCC" = yes; then :
7704
7705		    CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
7706
7707else
7708
7709		    CC_SEARCH_FLAGS='"-R${LIB_RUNTIME_DIR}"'
7710
7711fi
7712		LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
7713
7714else
7715
7716		if test "$GCC" = yes; then :
7717
7718		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
7719
7720else
7721
7722		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
7723		    LDFLAGS="$LDFLAGS -brtl"
7724
7725fi
7726		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
7727		CC_SEARCH_FLAGS='"-L${LIB_RUNTIME_DIR}"'
7728		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7729
7730fi
7731	    ;;
7732	BeOS*)
7733	    SHLIB_CFLAGS="-fPIC"
7734	    SHLIB_LD='${CC} -nostart'
7735	    SHLIB_SUFFIX=".so"
7736
7737	    #-----------------------------------------------------------
7738	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
7739	    # -lsocket, even if the network functions are in -lnet which
7740	    # is always linked to, for compatibility.
7741	    #-----------------------------------------------------------
7742	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5
7743$as_echo_n "checking for inet_ntoa in -lbind... " >&6; }
7744if ${ac_cv_lib_bind_inet_ntoa+:} false; then :
7745  $as_echo_n "(cached) " >&6
7746else
7747  ac_check_lib_save_LIBS=$LIBS
7748LIBS="-lbind  $LIBS"
7749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7750/* end confdefs.h.  */
7751
7752/* Override any GCC internal prototype to avoid an error.
7753   Use char because int might match the return type of a GCC
7754   builtin and then its argument prototype would still apply.  */
7755#ifdef __cplusplus
7756extern "C"
7757#endif
7758char inet_ntoa ();
7759int
7760main ()
7761{
7762return inet_ntoa ();
7763  ;
7764  return 0;
7765}
7766_ACEOF
7767if ac_fn_c_try_link "$LINENO"; then :
7768  ac_cv_lib_bind_inet_ntoa=yes
7769else
7770  ac_cv_lib_bind_inet_ntoa=no
7771fi
7772rm -f core conftest.err conftest.$ac_objext \
7773    conftest$ac_exeext conftest.$ac_ext
7774LIBS=$ac_check_lib_save_LIBS
7775fi
7776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5
7777$as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; }
7778if test "x$ac_cv_lib_bind_inet_ntoa" = xyes; then :
7779  LIBS="$LIBS -lbind -lsocket"
7780fi
7781
7782	    ;;
7783	BSD/OS-2.1*|BSD/OS-3*)
7784	    SHLIB_CFLAGS=""
7785	    SHLIB_LD="shlicc -r"
7786	    SHLIB_SUFFIX=".so"
7787	    CC_SEARCH_FLAGS=""
7788	    LD_SEARCH_FLAGS=""
7789	    ;;
7790	BSD/OS-4.*)
7791	    SHLIB_CFLAGS="-export-dynamic -fPIC"
7792	    SHLIB_LD='${CC} -shared'
7793	    SHLIB_SUFFIX=".so"
7794	    LDFLAGS="$LDFLAGS -export-dynamic"
7795	    CC_SEARCH_FLAGS=""
7796	    LD_SEARCH_FLAGS=""
7797	    ;;
7798	CYGWIN_*)
7799	    SHLIB_CFLAGS=""
7800	    SHLIB_LD='${CC} -shared'
7801	    SHLIB_SUFFIX=".dll"
7802	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
7803	    EXEEXT=".exe"
7804	    do64bit_ok=yes
7805	    CC_SEARCH_FLAGS=""
7806	    LD_SEARCH_FLAGS=""
7807	    ;;
7808	dgux*)
7809	    SHLIB_CFLAGS="-K PIC"
7810	    SHLIB_LD='${CC} -G'
7811	    SHLIB_LD_LIBS=""
7812	    SHLIB_SUFFIX=".so"
7813	    CC_SEARCH_FLAGS=""
7814	    LD_SEARCH_FLAGS=""
7815	    ;;
7816	Haiku*)
7817	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7818	    SHLIB_CFLAGS="-fPIC"
7819	    SHLIB_SUFFIX=".so"
7820	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
7821	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5
7822$as_echo_n "checking for inet_ntoa in -lnetwork... " >&6; }
7823if ${ac_cv_lib_network_inet_ntoa+:} false; then :
7824  $as_echo_n "(cached) " >&6
7825else
7826  ac_check_lib_save_LIBS=$LIBS
7827LIBS="-lnetwork  $LIBS"
7828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7829/* end confdefs.h.  */
7830
7831/* Override any GCC internal prototype to avoid an error.
7832   Use char because int might match the return type of a GCC
7833   builtin and then its argument prototype would still apply.  */
7834#ifdef __cplusplus
7835extern "C"
7836#endif
7837char inet_ntoa ();
7838int
7839main ()
7840{
7841return inet_ntoa ();
7842  ;
7843  return 0;
7844}
7845_ACEOF
7846if ac_fn_c_try_link "$LINENO"; then :
7847  ac_cv_lib_network_inet_ntoa=yes
7848else
7849  ac_cv_lib_network_inet_ntoa=no
7850fi
7851rm -f core conftest.err conftest.$ac_objext \
7852    conftest$ac_exeext conftest.$ac_ext
7853LIBS=$ac_check_lib_save_LIBS
7854fi
7855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5
7856$as_echo "$ac_cv_lib_network_inet_ntoa" >&6; }
7857if test "x$ac_cv_lib_network_inet_ntoa" = xyes; then :
7858  LIBS="$LIBS -lnetwork"
7859fi
7860
7861	    ;;
7862	HP-UX-*.11.*)
7863	    # Use updated header definitions where possible
7864
7865$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
7866
7867	    # TEA specific: Needed by Tcl, but not most extensions
7868	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
7869	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
7870
7871	    if test "`uname -m`" = ia64; then :
7872
7873		SHLIB_SUFFIX=".so"
7874
7875else
7876
7877		SHLIB_SUFFIX=".sl"
7878
7879fi
7880	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7881$as_echo_n "checking for shl_load in -ldld... " >&6; }
7882if ${ac_cv_lib_dld_shl_load+:} false; then :
7883  $as_echo_n "(cached) " >&6
7884else
7885  ac_check_lib_save_LIBS=$LIBS
7886LIBS="-ldld  $LIBS"
7887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7888/* end confdefs.h.  */
7889
7890/* Override any GCC internal prototype to avoid an error.
7891   Use char because int might match the return type of a GCC
7892   builtin and then its argument prototype would still apply.  */
7893#ifdef __cplusplus
7894extern "C"
7895#endif
7896char shl_load ();
7897int
7898main ()
7899{
7900return shl_load ();
7901  ;
7902  return 0;
7903}
7904_ACEOF
7905if ac_fn_c_try_link "$LINENO"; then :
7906  ac_cv_lib_dld_shl_load=yes
7907else
7908  ac_cv_lib_dld_shl_load=no
7909fi
7910rm -f core conftest.err conftest.$ac_objext \
7911    conftest$ac_exeext conftest.$ac_ext
7912LIBS=$ac_check_lib_save_LIBS
7913fi
7914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7915$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7916if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
7917  tcl_ok=yes
7918else
7919  tcl_ok=no
7920fi
7921
7922	    if test "$tcl_ok" = yes; then :
7923
7924		SHLIB_CFLAGS="+z"
7925		SHLIB_LD="ld -b"
7926		LDFLAGS="$LDFLAGS -Wl,-E"
7927		CC_SEARCH_FLAGS='"-Wl,+s,+b,${LIB_RUNTIME_DIR}:."'
7928		LD_SEARCH_FLAGS='+s +b "${LIB_RUNTIME_DIR}:."'
7929		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7930
7931fi
7932	    if test "$GCC" = yes; then :
7933
7934		SHLIB_LD='${CC} -shared'
7935		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7936
7937else
7938
7939		CFLAGS="$CFLAGS -z"
7940
7941fi
7942
7943	    # Check to enable 64-bit flags for compiler/linker
7944	    if test "$do64bit" = "yes"; then :
7945
7946		if test "$GCC" = yes; then :
7947
7948		    case `${CC} -dumpmachine` in
7949			hppa64*)
7950			    # 64-bit gcc in use.  Fix flags for GNU ld.
7951			    do64bit_ok=yes
7952			    SHLIB_LD='${CC} -shared'
7953			    if test $doRpath = yes; then :
7954
7955				CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7956fi
7957			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7958			    ;;
7959			*)
7960			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
7961$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7962			    ;;
7963		    esac
7964
7965else
7966
7967		    do64bit_ok=yes
7968		    CFLAGS="$CFLAGS +DD64"
7969		    LDFLAGS_ARCH="+DD64"
7970
7971fi
7972
7973fi ;;
7974	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
7975	    SHLIB_SUFFIX=".sl"
7976	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7977$as_echo_n "checking for shl_load in -ldld... " >&6; }
7978if ${ac_cv_lib_dld_shl_load+:} false; then :
7979  $as_echo_n "(cached) " >&6
7980else
7981  ac_check_lib_save_LIBS=$LIBS
7982LIBS="-ldld  $LIBS"
7983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7984/* end confdefs.h.  */
7985
7986/* Override any GCC internal prototype to avoid an error.
7987   Use char because int might match the return type of a GCC
7988   builtin and then its argument prototype would still apply.  */
7989#ifdef __cplusplus
7990extern "C"
7991#endif
7992char shl_load ();
7993int
7994main ()
7995{
7996return shl_load ();
7997  ;
7998  return 0;
7999}
8000_ACEOF
8001if ac_fn_c_try_link "$LINENO"; then :
8002  ac_cv_lib_dld_shl_load=yes
8003else
8004  ac_cv_lib_dld_shl_load=no
8005fi
8006rm -f core conftest.err conftest.$ac_objext \
8007    conftest$ac_exeext conftest.$ac_ext
8008LIBS=$ac_check_lib_save_LIBS
8009fi
8010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8011$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
8012if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
8013  tcl_ok=yes
8014else
8015  tcl_ok=no
8016fi
8017
8018	    if test "$tcl_ok" = yes; then :
8019
8020		SHLIB_CFLAGS="+z"
8021		SHLIB_LD="ld -b"
8022		SHLIB_LD_LIBS=""
8023		LDFLAGS="$LDFLAGS -Wl,-E"
8024		CC_SEARCH_FLAGS='"-Wl,+s,+b,${LIB_RUNTIME_DIR}:."'
8025		LD_SEARCH_FLAGS='+s +b "${LIB_RUNTIME_DIR}:."'
8026		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
8027
8028fi ;;
8029	IRIX-5.*)
8030	    SHLIB_CFLAGS=""
8031	    SHLIB_LD="ld -shared -rdata_shared"
8032	    SHLIB_SUFFIX=".so"
8033	    case " $LIBOBJS " in
8034  *" mkstemp.$ac_objext "* ) ;;
8035  *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext"
8036 ;;
8037esac
8038
8039	    if test $doRpath = yes; then :
8040
8041		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
8042		LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'
8043fi
8044	    ;;
8045	IRIX-6.*)
8046	    SHLIB_CFLAGS=""
8047	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8048	    SHLIB_SUFFIX=".so"
8049	    if test $doRpath = yes; then :
8050
8051		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
8052		LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'
8053fi
8054	    if test "$GCC" = yes; then :
8055
8056		CFLAGS="$CFLAGS -mabi=n32"
8057		LDFLAGS="$LDFLAGS -mabi=n32"
8058
8059else
8060
8061		case $system in
8062		    IRIX-6.3)
8063			# Use to build 6.2 compatible binaries on 6.3.
8064			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
8065			;;
8066		    *)
8067			CFLAGS="$CFLAGS -n32"
8068			;;
8069		esac
8070		LDFLAGS="$LDFLAGS -n32"
8071
8072fi
8073	    ;;
8074	IRIX64-6.*)
8075	    SHLIB_CFLAGS=""
8076	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8077	    SHLIB_SUFFIX=".so"
8078	    if test $doRpath = yes; then :
8079
8080		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
8081		LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'
8082fi
8083
8084	    # Check to enable 64-bit flags for compiler/linker
8085
8086	    if test "$do64bit" = yes; then :
8087
8088	        if test "$GCC" = yes; then :
8089
8090	            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5
8091$as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
8092
8093else
8094
8095	            do64bit_ok=yes
8096	            SHLIB_LD="ld -64 -shared -rdata_shared"
8097	            CFLAGS="$CFLAGS -64"
8098	            LDFLAGS_ARCH="-64"
8099
8100fi
8101
8102fi
8103	    ;;
8104	Linux*|GNU*|NetBSD-Debian|DragonFly-*|DragonFly-*)
8105	    SHLIB_CFLAGS="-fPIC"
8106	    SHLIB_SUFFIX=".so"
8107
8108	    # TEA specific:
8109	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8110
8111	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8112	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
8113	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8114
8115	    case $system in
8116	    DragonFly-*|DragonFly-*)
8117		if test "${TCL_THREADS}" = "1"; then :
8118
8119		    # The -pthread needs to go in the LDFLAGS, not LIBS
8120		    LIBS=`echo $LIBS | sed s/-pthread//`
8121		    CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8122		    LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
8123fi
8124	    ;;
8125            esac
8126
8127	    if test $doRpath = yes; then :
8128
8129		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
8130fi
8131	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8132	    if test "`uname -m`" = "alpha"; then :
8133  CFLAGS="$CFLAGS -mieee"
8134fi
8135	    if test $do64bit = yes; then :
8136
8137		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5
8138$as_echo_n "checking if compiler accepts -m64 flag... " >&6; }
8139if ${tcl_cv_cc_m64+:} false; then :
8140  $as_echo_n "(cached) " >&6
8141else
8142
8143		    hold_cflags=$CFLAGS
8144		    CFLAGS="$CFLAGS -m64"
8145		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8146/* end confdefs.h.  */
8147
8148int
8149main ()
8150{
8151
8152  ;
8153  return 0;
8154}
8155_ACEOF
8156if ac_fn_c_try_link "$LINENO"; then :
8157  tcl_cv_cc_m64=yes
8158else
8159  tcl_cv_cc_m64=no
8160fi
8161rm -f core conftest.err conftest.$ac_objext \
8162    conftest$ac_exeext conftest.$ac_ext
8163		    CFLAGS=$hold_cflags
8164fi
8165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5
8166$as_echo "$tcl_cv_cc_m64" >&6; }
8167		if test $tcl_cv_cc_m64 = yes; then :
8168
8169		    CFLAGS="$CFLAGS -m64"
8170		    do64bit_ok=yes
8171
8172fi
8173
8174fi
8175
8176	    # The combo of gcc + glibc has a bug related to inlining of
8177	    # functions like strtod(). The -fno-builtin flag should address
8178	    # this problem but it does not work. The -fno-inline flag is kind
8179	    # of overkill but it works. Disable inlining only when one of the
8180	    # files in compat/*.c is being linked in.
8181
8182	    if test x"${USE_COMPAT}" != x; then :
8183  CFLAGS="$CFLAGS -fno-inline"
8184fi
8185	    ;;
8186	Lynx*)
8187	    SHLIB_CFLAGS="-fPIC"
8188	    SHLIB_SUFFIX=".so"
8189	    CFLAGS_OPTIMIZE=-02
8190	    SHLIB_LD='${CC} -shared'
8191	    LD_FLAGS="-Wl,--export-dynamic"
8192	    if test $doRpath = yes; then :
8193
8194		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
8195		LD_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
8196fi
8197	    ;;
8198	OpenBSD-*)
8199	    arch=`arch -s`
8200	    case "$arch" in
8201	    alpha|sparc64)
8202		SHLIB_CFLAGS="-fPIC"
8203		;;
8204	    *)
8205		SHLIB_CFLAGS="-fpic"
8206		;;
8207	    esac
8208	    SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared'
8209	    SHLIB_SUFFIX=".so"
8210	    if test $doRpath = yes; then :
8211
8212		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
8213fi
8214	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8215	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
8216	    LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
8217	    CFLAGS_OPTIMIZE="-O2"
8218	    # On OpenBSD:	Compile with -pthread
8219	    #		Don't link with -lpthread
8220	    LIBS=`echo $LIBS | sed s/-lpthread//`
8221	    CFLAGS="$CFLAGS -pthread"
8222	    # OpenBSD doesn't do version numbers with dots.
8223	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8224	    TCL_LIB_VERSIONS_OK=nodots
8225	    ;;
8226	NetBSD-*)
8227	    # NetBSD has ELF and can use 'cc -shared' to build shared libs
8228	    SHLIB_CFLAGS="-fPIC"
8229	    SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared'
8230	    SHLIB_SUFFIX=".so"
8231	    LDFLAGS="$LDFLAGS -export-dynamic"
8232	    if test $doRpath = yes; then :
8233
8234		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
8235fi
8236	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8237	    # The -pthread needs to go in the CFLAGS, not LIBS
8238	    LIBS=`echo $LIBS | sed s/-pthread//`
8239	    CFLAGS="$CFLAGS -pthread"
8240	    LDFLAGS="$LDFLAGS -pthread"
8241	    ;;
8242	Darwin-*)
8243	    CFLAGS_OPTIMIZE="-Os"
8244	    SHLIB_CFLAGS="-fno-common"
8245	    # To avoid discrepancies between what headers configure sees during
8246	    # preprocessing tests and compiling tests, move any -isysroot and
8247	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
8248	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
8249		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8250		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
8251	    CFLAGS="`echo " ${CFLAGS}" | \
8252		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8253		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
8254	    if test $do64bit = yes; then :
8255
8256		case `arch` in
8257		    ppc)
8258			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5
8259$as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; }
8260if ${tcl_cv_cc_arch_ppc64+:} false; then :
8261  $as_echo_n "(cached) " >&6
8262else
8263
8264			    hold_cflags=$CFLAGS
8265			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8266			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8267/* end confdefs.h.  */
8268
8269int
8270main ()
8271{
8272
8273  ;
8274  return 0;
8275}
8276_ACEOF
8277if ac_fn_c_try_link "$LINENO"; then :
8278  tcl_cv_cc_arch_ppc64=yes
8279else
8280  tcl_cv_cc_arch_ppc64=no
8281fi
8282rm -f core conftest.err conftest.$ac_objext \
8283    conftest$ac_exeext conftest.$ac_ext
8284			    CFLAGS=$hold_cflags
8285fi
8286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5
8287$as_echo "$tcl_cv_cc_arch_ppc64" >&6; }
8288			if test $tcl_cv_cc_arch_ppc64 = yes; then :
8289
8290			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8291			    do64bit_ok=yes
8292
8293fi;;
8294		    i386)
8295			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5
8296$as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; }
8297if ${tcl_cv_cc_arch_x86_64+:} false; then :
8298  $as_echo_n "(cached) " >&6
8299else
8300
8301			    hold_cflags=$CFLAGS
8302			    CFLAGS="$CFLAGS -arch x86_64"
8303			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8304/* end confdefs.h.  */
8305
8306int
8307main ()
8308{
8309
8310  ;
8311  return 0;
8312}
8313_ACEOF
8314if ac_fn_c_try_link "$LINENO"; then :
8315  tcl_cv_cc_arch_x86_64=yes
8316else
8317  tcl_cv_cc_arch_x86_64=no
8318fi
8319rm -f core conftest.err conftest.$ac_objext \
8320    conftest$ac_exeext conftest.$ac_ext
8321			    CFLAGS=$hold_cflags
8322fi
8323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5
8324$as_echo "$tcl_cv_cc_arch_x86_64" >&6; }
8325			if test $tcl_cv_cc_arch_x86_64 = yes; then :
8326
8327			    CFLAGS="$CFLAGS -arch x86_64"
8328			    do64bit_ok=yes
8329
8330fi;;
8331		    *)
8332			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
8333$as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
8334		esac
8335
8336else
8337
8338		# Check for combined 32-bit and 64-bit fat build
8339		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
8340		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then :
8341
8342		    fat_32_64=yes
8343fi
8344
8345fi
8346	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8347	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
8348	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
8349$as_echo_n "checking if ld accepts -single_module flag... " >&6; }
8350if ${tcl_cv_ld_single_module+:} false; then :
8351  $as_echo_n "(cached) " >&6
8352else
8353
8354		hold_ldflags=$LDFLAGS
8355		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
8356		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8357/* end confdefs.h.  */
8358
8359int
8360main ()
8361{
8362int i;
8363  ;
8364  return 0;
8365}
8366_ACEOF
8367if ac_fn_c_try_link "$LINENO"; then :
8368  tcl_cv_ld_single_module=yes
8369else
8370  tcl_cv_ld_single_module=no
8371fi
8372rm -f core conftest.err conftest.$ac_objext \
8373    conftest$ac_exeext conftest.$ac_ext
8374		LDFLAGS=$hold_ldflags
8375fi
8376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5
8377$as_echo "$tcl_cv_ld_single_module" >&6; }
8378	    if test $tcl_cv_ld_single_module = yes; then :
8379
8380		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
8381
8382fi
8383	    # TEA specific: link shlib with current and compatibility version flags
8384	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
8385	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
8386	    SHLIB_SUFFIX=".dylib"
8387	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
8388	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5
8389$as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; }
8390if ${tcl_cv_ld_search_paths_first+:} false; then :
8391  $as_echo_n "(cached) " >&6
8392else
8393
8394		hold_ldflags=$LDFLAGS
8395		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
8396		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8397/* end confdefs.h.  */
8398
8399int
8400main ()
8401{
8402int i;
8403  ;
8404  return 0;
8405}
8406_ACEOF
8407if ac_fn_c_try_link "$LINENO"; then :
8408  tcl_cv_ld_search_paths_first=yes
8409else
8410  tcl_cv_ld_search_paths_first=no
8411fi
8412rm -f core conftest.err conftest.$ac_objext \
8413    conftest$ac_exeext conftest.$ac_ext
8414		LDFLAGS=$hold_ldflags
8415fi
8416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5
8417$as_echo "$tcl_cv_ld_search_paths_first" >&6; }
8418	    if test $tcl_cv_ld_search_paths_first = yes; then :
8419
8420		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
8421
8422fi
8423	    if test "$tcl_cv_cc_visibility_hidden" != yes; then :
8424
8425
8426$as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h
8427
8428		tcl_cv_cc_visibility_hidden=yes
8429
8430fi
8431	    CC_SEARCH_FLAGS=""
8432	    LD_SEARCH_FLAGS=""
8433	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
8434	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
8435	    # extensions, verify that 64-bit build is possible.
8436	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then :
8437
8438		if test "${TEA_WINDOWINGSYSTEM}" = x11; then :
8439
8440		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5
8441$as_echo_n "checking for 64-bit X11... " >&6; }
8442if ${tcl_cv_lib_x11_64+:} false; then :
8443  $as_echo_n "(cached) " >&6
8444else
8445
8446			for v in CFLAGS CPPFLAGS LDFLAGS; do
8447			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
8448			done
8449			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
8450			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
8451			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8452/* end confdefs.h.  */
8453#include <X11/Xlib.h>
8454int
8455main ()
8456{
8457XrmInitialize();
8458  ;
8459  return 0;
8460}
8461_ACEOF
8462if ac_fn_c_try_link "$LINENO"; then :
8463  tcl_cv_lib_x11_64=yes
8464else
8465  tcl_cv_lib_x11_64=no
8466fi
8467rm -f core conftest.err conftest.$ac_objext \
8468    conftest$ac_exeext conftest.$ac_ext
8469			for v in CFLAGS CPPFLAGS LDFLAGS; do
8470			    eval $v'="$hold_'$v'"'
8471			done
8472fi
8473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5
8474$as_echo "$tcl_cv_lib_x11_64" >&6; }
8475
8476fi
8477		if test "${TEA_WINDOWINGSYSTEM}" = aqua; then :
8478
8479		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit Tk" >&5
8480$as_echo_n "checking for 64-bit Tk... " >&6; }
8481if ${tcl_cv_lib_tk_64+:} false; then :
8482  $as_echo_n "(cached) " >&6
8483else
8484
8485			for v in CFLAGS CPPFLAGS LDFLAGS; do
8486			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
8487			done
8488			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
8489			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
8490			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8491/* end confdefs.h.  */
8492#include <tk.h>
8493int
8494main ()
8495{
8496Tk_InitStubs(NULL, "", 0);
8497  ;
8498  return 0;
8499}
8500_ACEOF
8501if ac_fn_c_try_link "$LINENO"; then :
8502  tcl_cv_lib_tk_64=yes
8503else
8504  tcl_cv_lib_tk_64=no
8505fi
8506rm -f core conftest.err conftest.$ac_objext \
8507    conftest$ac_exeext conftest.$ac_ext
8508			for v in CFLAGS CPPFLAGS LDFLAGS; do
8509			    eval $v'="$hold_'$v'"'
8510			done
8511fi
8512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_tk_64" >&5
8513$as_echo "$tcl_cv_lib_tk_64" >&6; }
8514
8515fi
8516		# remove 64-bit arch flags from CFLAGS et al. if configuration
8517		# does not support 64-bit.
8518		if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then :
8519
8520		    { $as_echo "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5
8521$as_echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
8522		    for v in CFLAGS CPPFLAGS LDFLAGS; do
8523			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
8524		    done
8525fi
8526
8527fi
8528	    ;;
8529	OS/390-*)
8530	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
8531
8532$as_echo "#define _OE_SOCKETS 1" >>confdefs.h
8533
8534	    ;;
8535	OSF1-V*)
8536	    # Digital OSF/1
8537	    SHLIB_CFLAGS=""
8538	    if test "$SHARED_BUILD" = 1; then :
8539
8540	        SHLIB_LD='ld -shared -expect_unresolved "*"'
8541
8542else
8543
8544	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
8545
8546fi
8547	    SHLIB_SUFFIX=".so"
8548	    if test $doRpath = yes; then :
8549
8550		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
8551		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8552fi
8553	    if test "$GCC" = yes; then :
8554  CFLAGS="$CFLAGS -mieee"
8555else
8556
8557		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
8558fi
8559	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
8560	    CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
8561	    CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
8562	    LIBS=`echo $LIBS | sed s/-lpthreads//`
8563	    if test "$GCC" = yes; then :
8564
8565		LIBS="$LIBS -lpthread -lmach -lexc"
8566
8567else
8568
8569		CFLAGS="$CFLAGS -pthread"
8570		LDFLAGS="$LDFLAGS -pthread"
8571
8572fi
8573	    ;;
8574	QNX-6*)
8575	    # QNX RTP
8576	    # This may work for all QNX, but it was only reported for v6.
8577	    SHLIB_CFLAGS="-fPIC"
8578	    SHLIB_LD="ld -Bshareable -x"
8579	    SHLIB_LD_LIBS=""
8580	    SHLIB_SUFFIX=".so"
8581	    CC_SEARCH_FLAGS=""
8582	    LD_SEARCH_FLAGS=""
8583	    ;;
8584	SCO_SV-3.2*)
8585	    if test "$GCC" = yes; then :
8586
8587		SHLIB_CFLAGS="-fPIC -melf"
8588		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
8589
8590else
8591
8592		SHLIB_CFLAGS="-Kpic -belf"
8593		LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
8594
8595fi
8596	    SHLIB_LD="ld -G"
8597	    SHLIB_LD_LIBS=""
8598	    SHLIB_SUFFIX=".so"
8599	    CC_SEARCH_FLAGS=""
8600	    LD_SEARCH_FLAGS=""
8601	    ;;
8602	SunOS-5.[0-6])
8603	    # Careful to not let 5.10+ fall into this case
8604
8605	    # Note: If _REENTRANT isn't defined, then Solaris
8606	    # won't define thread-safe library routines.
8607
8608
8609$as_echo "#define _REENTRANT 1" >>confdefs.h
8610
8611
8612$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
8613
8614
8615	    SHLIB_CFLAGS="-KPIC"
8616	    SHLIB_SUFFIX=".so"
8617	    if test "$GCC" = yes; then :
8618
8619		SHLIB_LD='${CC} -shared'
8620		CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
8621		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8622
8623else
8624
8625		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8626		CC_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
8627		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8628
8629fi
8630	    ;;
8631	SunOS-5*)
8632	    # Note: If _REENTRANT isn't defined, then Solaris
8633	    # won't define thread-safe library routines.
8634
8635
8636$as_echo "#define _REENTRANT 1" >>confdefs.h
8637
8638
8639$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
8640
8641
8642	    SHLIB_CFLAGS="-KPIC"
8643
8644	    # Check to enable 64-bit flags for compiler/linker
8645	    if test "$do64bit" = yes; then :
8646
8647		arch=`isainfo`
8648		if test "$arch" = "sparcv9 sparc"; then :
8649
8650		    if test "$GCC" = yes; then :
8651
8652			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then :
8653
8654			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
8655$as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
8656
8657else
8658
8659			    do64bit_ok=yes
8660			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
8661			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
8662			    SHLIB_CFLAGS="-fPIC"
8663
8664fi
8665
8666else
8667
8668			do64bit_ok=yes
8669			if test "$do64bitVIS" = yes; then :
8670
8671			    CFLAGS="$CFLAGS -xarch=v9a"
8672			    LDFLAGS_ARCH="-xarch=v9a"
8673
8674else
8675
8676			    CFLAGS="$CFLAGS -xarch=v9"
8677			    LDFLAGS_ARCH="-xarch=v9"
8678
8679fi
8680			# Solaris 64 uses this as well
8681			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
8682
8683fi
8684
8685else
8686  if test "$arch" = "amd64 i386"; then :
8687
8688		    if test "$GCC" = yes; then :
8689
8690			case $system in
8691			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
8692				do64bit_ok=yes
8693				CFLAGS="$CFLAGS -m64"
8694				LDFLAGS="$LDFLAGS -m64";;
8695			    *)
8696				{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
8697$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
8698			esac
8699
8700else
8701
8702			do64bit_ok=yes
8703			case $system in
8704			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
8705				CFLAGS="$CFLAGS -m64"
8706				LDFLAGS="$LDFLAGS -m64";;
8707			    *)
8708				CFLAGS="$CFLAGS -xarch=amd64"
8709				LDFLAGS="$LDFLAGS -xarch=amd64";;
8710			esac
8711
8712fi
8713
8714else
8715  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5
8716$as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
8717fi
8718fi
8719
8720fi
8721
8722	    SHLIB_SUFFIX=".so"
8723	    if test "$GCC" = yes; then :
8724
8725		SHLIB_LD='${CC} -shared'
8726		CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
8727		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8728		if test "$do64bit_ok" = yes; then :
8729
8730		    if test "$arch" = "sparcv9 sparc"; then :
8731
8732			# We need to specify -static-libgcc or we need to
8733			# add the path to the sparv9 libgcc.
8734			# JH: static-libgcc is necessary for core Tcl, but may
8735			# not be necessary for extensions.
8736			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
8737			# for finding sparcv9 libgcc, get the regular libgcc
8738			# path, remove so name and append 'sparcv9'
8739			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
8740			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
8741
8742else
8743  if test "$arch" = "amd64 i386"; then :
8744
8745			# JH: static-libgcc is necessary for core Tcl, but may
8746			# not be necessary for extensions.
8747			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
8748
8749fi
8750fi
8751
8752fi
8753
8754else
8755
8756		case $system in
8757		    SunOS-5.[1-9][0-9]*)
8758			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8759			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
8760		    *)
8761			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
8762		esac
8763		CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
8764		LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
8765
8766fi
8767	    ;;
8768	UNIX_SV* | UnixWare-5*)
8769	    SHLIB_CFLAGS="-KPIC"
8770	    SHLIB_LD='${CC} -G'
8771	    SHLIB_LD_LIBS=""
8772	    SHLIB_SUFFIX=".so"
8773	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
8774	    # that don't grok the -Bexport option.  Test that it does.
8775	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5
8776$as_echo_n "checking for ld accepts -Bexport flag... " >&6; }
8777if ${tcl_cv_ld_Bexport+:} false; then :
8778  $as_echo_n "(cached) " >&6
8779else
8780
8781		hold_ldflags=$LDFLAGS
8782		LDFLAGS="$LDFLAGS -Wl,-Bexport"
8783		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8784/* end confdefs.h.  */
8785
8786int
8787main ()
8788{
8789int i;
8790  ;
8791  return 0;
8792}
8793_ACEOF
8794if ac_fn_c_try_link "$LINENO"; then :
8795  tcl_cv_ld_Bexport=yes
8796else
8797  tcl_cv_ld_Bexport=no
8798fi
8799rm -f core conftest.err conftest.$ac_objext \
8800    conftest$ac_exeext conftest.$ac_ext
8801	        LDFLAGS=$hold_ldflags
8802fi
8803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5
8804$as_echo "$tcl_cv_ld_Bexport" >&6; }
8805	    if test $tcl_cv_ld_Bexport = yes; then :
8806
8807		LDFLAGS="$LDFLAGS -Wl,-Bexport"
8808
8809fi
8810	    CC_SEARCH_FLAGS=""
8811	    LD_SEARCH_FLAGS=""
8812	    ;;
8813    esac
8814
8815    if test "$do64bit" = yes -a "$do64bit_ok" = no; then :
8816
8817	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
8818$as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
8819
8820fi
8821
8822
8823
8824    # Add in the arch flags late to ensure it wasn't removed.
8825    # Not necessary in TEA, but this is aligned with core
8826    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
8827
8828    # If we're running gcc, then change the C flags for compiling shared
8829    # libraries to the right flags for gcc, instead of those for the
8830    # standard manufacturer compiler.
8831
8832    if test "$GCC" = yes; then :
8833
8834	case $system in
8835	    AIX-*) ;;
8836	    BSD/OS*) ;;
8837	    CYGWIN_*|MINGW32_*|MINGW64_*|MSYS_*) ;;
8838	    IRIX*) ;;
8839	    NetBSD-*|DragonFly-*|DragonFly-*|OpenBSD-*) ;;
8840	    Darwin-*) ;;
8841	    SCO_SV-3.2*) ;;
8842	    windows) ;;
8843	    *) SHLIB_CFLAGS="-fPIC" ;;
8844	esac
8845fi
8846
8847    if test "$tcl_cv_cc_visibility_hidden" != yes; then :
8848
8849
8850$as_echo "#define MODULE_SCOPE extern" >>confdefs.h
8851
8852
8853fi
8854
8855    if test "$SHARED_LIB_SUFFIX" = ""; then :
8856
8857    # TEA specific: use PACKAGE_VERSION instead of VERSION
8858    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
8859fi
8860    if test "$UNSHARED_LIB_SUFFIX" = ""; then :
8861
8862    # TEA specific: use PACKAGE_VERSION instead of VERSION
8863    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
8864fi
8865
8866    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
8867	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5
8868$as_echo_n "checking for SEH support in compiler... " >&6; }
8869if ${tcl_cv_seh+:} false; then :
8870  $as_echo_n "(cached) " >&6
8871else
8872  if test "$cross_compiling" = yes; then :
8873  tcl_cv_seh=no
8874else
8875  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8876/* end confdefs.h.  */
8877
8878#define WIN32_LEAN_AND_MEAN
8879#include <windows.h>
8880#undef WIN32_LEAN_AND_MEAN
8881
8882	    int main(int argc, char** argv) {
8883		int a, b = 0;
8884		__try {
8885		    a = 666 / b;
8886		}
8887		__except (EXCEPTION_EXECUTE_HANDLER) {
8888		    return 0;
8889		}
8890		return 1;
8891	    }
8892
8893_ACEOF
8894if ac_fn_c_try_run "$LINENO"; then :
8895  tcl_cv_seh=yes
8896else
8897  tcl_cv_seh=no
8898fi
8899rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8900  conftest.$ac_objext conftest.beam conftest.$ac_ext
8901fi
8902
8903
8904fi
8905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5
8906$as_echo "$tcl_cv_seh" >&6; }
8907	if test "$tcl_cv_seh" = "no" ; then
8908
8909$as_echo "#define HAVE_NO_SEH 1" >>confdefs.h
8910
8911	fi
8912
8913	#
8914	# Check to see if the excpt.h include file provided contains the
8915	# definition for EXCEPTION_DISPOSITION; if not, which is the case
8916	# with Cygwin's version as of 2002-04-10, define it to be int,
8917	# sufficient for getting the current code to work.
8918	#
8919	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5
8920$as_echo_n "checking for EXCEPTION_DISPOSITION support in include files... " >&6; }
8921if ${tcl_cv_eh_disposition+:} false; then :
8922  $as_echo_n "(cached) " >&6
8923else
8924  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8925/* end confdefs.h.  */
8926
8927#	    define WIN32_LEAN_AND_MEAN
8928#	    include <windows.h>
8929#	    undef WIN32_LEAN_AND_MEAN
8930
8931int
8932main ()
8933{
8934
8935		EXCEPTION_DISPOSITION x;
8936
8937  ;
8938  return 0;
8939}
8940_ACEOF
8941if ac_fn_c_try_compile "$LINENO"; then :
8942  tcl_cv_eh_disposition=yes
8943else
8944  tcl_cv_eh_disposition=no
8945fi
8946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8947
8948fi
8949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5
8950$as_echo "$tcl_cv_eh_disposition" >&6; }
8951	if test "$tcl_cv_eh_disposition" = "no" ; then
8952
8953$as_echo "#define EXCEPTION_DISPOSITION int" >>confdefs.h
8954
8955	fi
8956
8957	# Check to see if winnt.h defines CHAR, SHORT, and LONG
8958	# even if VOID has already been #defined. The win32api
8959	# used by mingw and cygwin is known to do this.
8960
8961	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5
8962$as_echo_n "checking for winnt.h that ignores VOID define... " >&6; }
8963if ${tcl_cv_winnt_ignore_void+:} false; then :
8964  $as_echo_n "(cached) " >&6
8965else
8966  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8967/* end confdefs.h.  */
8968
8969#define VOID void
8970#define WIN32_LEAN_AND_MEAN
8971#include <windows.h>
8972#undef WIN32_LEAN_AND_MEAN
8973
8974int
8975main ()
8976{
8977
8978		CHAR c;
8979		SHORT s;
8980		LONG l;
8981
8982  ;
8983  return 0;
8984}
8985_ACEOF
8986if ac_fn_c_try_compile "$LINENO"; then :
8987  tcl_cv_winnt_ignore_void=yes
8988else
8989  tcl_cv_winnt_ignore_void=no
8990fi
8991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8992
8993fi
8994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5
8995$as_echo "$tcl_cv_winnt_ignore_void" >&6; }
8996	if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
8997
8998$as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h
8999
9000	fi
9001    fi
9002
9003	# See if the compiler supports casting to a union type.
9004	# This is used to stop gcc from printing a compiler
9005	# warning when initializing a union member.
9006
9007	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
9008$as_echo_n "checking for cast to union support... " >&6; }
9009if ${tcl_cv_cast_to_union+:} false; then :
9010  $as_echo_n "(cached) " >&6
9011else
9012  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9013/* end confdefs.h.  */
9014
9015int
9016main ()
9017{
9018
9019		  union foo { int i; double d; };
9020		  union foo f = (union foo) (int) 0;
9021
9022  ;
9023  return 0;
9024}
9025_ACEOF
9026if ac_fn_c_try_compile "$LINENO"; then :
9027  tcl_cv_cast_to_union=yes
9028else
9029  tcl_cv_cast_to_union=no
9030fi
9031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9032
9033fi
9034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
9035$as_echo "$tcl_cv_cast_to_union" >&6; }
9036	if test "$tcl_cv_cast_to_union" = "yes"; then
9037
9038$as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h
9039
9040	fi
9041
9042	ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
9043if test "x$ac_cv_header_stdbool_h" = xyes; then :
9044
9045$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
9046
9047fi
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065    # These must be called after we do the basic CFLAGS checks and
9066    # verify any possible 64-bit or similar switches are necessary
9067
9068    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5
9069$as_echo_n "checking for required early compiler flags... " >&6; }
9070    tcl_flags=""
9071
9072    if ${tcl_cv_flag__isoc99_source+:} false; then :
9073  $as_echo_n "(cached) " >&6
9074else
9075  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9076/* end confdefs.h.  */
9077#include <stdlib.h>
9078int
9079main ()
9080{
9081char *p = (char *)strtoll; char *q = (char *)strtoull;
9082  ;
9083  return 0;
9084}
9085_ACEOF
9086if ac_fn_c_try_compile "$LINENO"; then :
9087  tcl_cv_flag__isoc99_source=no
9088else
9089  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9090/* end confdefs.h.  */
9091#define _ISOC99_SOURCE 1
9092#include <stdlib.h>
9093int
9094main ()
9095{
9096char *p = (char *)strtoll; char *q = (char *)strtoull;
9097  ;
9098  return 0;
9099}
9100_ACEOF
9101if ac_fn_c_try_compile "$LINENO"; then :
9102  tcl_cv_flag__isoc99_source=yes
9103else
9104  tcl_cv_flag__isoc99_source=no
9105fi
9106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9107fi
9108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9109fi
9110
9111    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
9112
9113$as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h
9114
9115	tcl_flags="$tcl_flags _ISOC99_SOURCE"
9116    fi
9117
9118
9119    if ${tcl_cv_flag__largefile64_source+:} false; then :
9120  $as_echo_n "(cached) " >&6
9121else
9122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9123/* end confdefs.h.  */
9124#include <sys/stat.h>
9125int
9126main ()
9127{
9128struct stat64 buf; int i = stat64("/", &buf);
9129  ;
9130  return 0;
9131}
9132_ACEOF
9133if ac_fn_c_try_compile "$LINENO"; then :
9134  tcl_cv_flag__largefile64_source=no
9135else
9136  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9137/* end confdefs.h.  */
9138#define _LARGEFILE64_SOURCE 1
9139#include <sys/stat.h>
9140int
9141main ()
9142{
9143struct stat64 buf; int i = stat64("/", &buf);
9144  ;
9145  return 0;
9146}
9147_ACEOF
9148if ac_fn_c_try_compile "$LINENO"; then :
9149  tcl_cv_flag__largefile64_source=yes
9150else
9151  tcl_cv_flag__largefile64_source=no
9152fi
9153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9154fi
9155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9156fi
9157
9158    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
9159
9160$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
9161
9162	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
9163    fi
9164
9165
9166    if ${tcl_cv_flag__largefile_source64+:} false; then :
9167  $as_echo_n "(cached) " >&6
9168else
9169  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9170/* end confdefs.h.  */
9171#include <sys/stat.h>
9172int
9173main ()
9174{
9175char *p = (char *)open64;
9176  ;
9177  return 0;
9178}
9179_ACEOF
9180if ac_fn_c_try_compile "$LINENO"; then :
9181  tcl_cv_flag__largefile_source64=no
9182else
9183  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9184/* end confdefs.h.  */
9185#define _LARGEFILE_SOURCE64 1
9186#include <sys/stat.h>
9187int
9188main ()
9189{
9190char *p = (char *)open64;
9191  ;
9192  return 0;
9193}
9194_ACEOF
9195if ac_fn_c_try_compile "$LINENO"; then :
9196  tcl_cv_flag__largefile_source64=yes
9197else
9198  tcl_cv_flag__largefile_source64=no
9199fi
9200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9201fi
9202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9203fi
9204
9205    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
9206
9207$as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h
9208
9209	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
9210    fi
9211
9212    if test "x${tcl_flags}" = "x" ; then
9213	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
9214$as_echo "none" >&6; }
9215    else
9216	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5
9217$as_echo "${tcl_flags}" >&6; }
9218    fi
9219
9220
9221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5
9222$as_echo_n "checking for 64-bit integer type... " >&6; }
9223    if ${tcl_cv_type_64bit+:} false; then :
9224  $as_echo_n "(cached) " >&6
9225else
9226
9227	tcl_cv_type_64bit=none
9228	# See if the compiler knows natively about __int64
9229	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9230/* end confdefs.h.  */
9231
9232int
9233main ()
9234{
9235__int64 value = (__int64) 0;
9236  ;
9237  return 0;
9238}
9239_ACEOF
9240if ac_fn_c_try_compile "$LINENO"; then :
9241  tcl_type_64bit=__int64
9242else
9243  tcl_type_64bit="long long"
9244fi
9245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9246	# See if we could use long anyway  Note that we substitute in the
9247	# type that is our current guess for a 64-bit type inside this check
9248	# program, so it should be modified only carefully...
9249        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9250/* end confdefs.h.  */
9251
9252int
9253main ()
9254{
9255switch (0) {
9256            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
9257        }
9258  ;
9259  return 0;
9260}
9261_ACEOF
9262if ac_fn_c_try_compile "$LINENO"; then :
9263  tcl_cv_type_64bit=${tcl_type_64bit}
9264fi
9265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9266fi
9267
9268    if test "${tcl_cv_type_64bit}" = none ; then
9269
9270$as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h
9271
9272	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9273$as_echo "yes" >&6; }
9274    elif test "${tcl_cv_type_64bit}" = "__int64" \
9275		-a "${TEA_PLATFORM}" = "windows" ; then
9276	# TEA specific: We actually want to use the default tcl.h checks in
9277	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
9278	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using Tcl header defaults" >&5
9279$as_echo "using Tcl header defaults" >&6; }
9280    else
9281
9282cat >>confdefs.h <<_ACEOF
9283#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
9284_ACEOF
9285
9286	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5
9287$as_echo "${tcl_cv_type_64bit}" >&6; }
9288
9289	# Now check for auxiliary declarations
9290	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5
9291$as_echo_n "checking for struct dirent64... " >&6; }
9292if ${tcl_cv_struct_dirent64+:} false; then :
9293  $as_echo_n "(cached) " >&6
9294else
9295
9296	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9297/* end confdefs.h.  */
9298#include <sys/types.h>
9299#include <dirent.h>
9300int
9301main ()
9302{
9303struct dirent64 p;
9304  ;
9305  return 0;
9306}
9307_ACEOF
9308if ac_fn_c_try_compile "$LINENO"; then :
9309  tcl_cv_struct_dirent64=yes
9310else
9311  tcl_cv_struct_dirent64=no
9312fi
9313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9314fi
9315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5
9316$as_echo "$tcl_cv_struct_dirent64" >&6; }
9317	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
9318
9319$as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h
9320
9321	fi
9322
9323	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIR64" >&5
9324$as_echo_n "checking for DIR64... " >&6; }
9325if ${tcl_cv_DIR64+:} false; then :
9326  $as_echo_n "(cached) " >&6
9327else
9328
9329	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9330/* end confdefs.h.  */
9331#include <sys/types.h>
9332#include <dirent.h>
9333int
9334main ()
9335{
9336struct dirent64 *p; DIR64 d = opendir64(".");
9337            p = readdir64(d); rewinddir64(d); closedir64(d);
9338  ;
9339  return 0;
9340}
9341_ACEOF
9342if ac_fn_c_try_compile "$LINENO"; then :
9343  tcl_cv_DIR64=yes
9344else
9345  tcl_cv_DIR64=no
9346fi
9347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9348fi
9349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_DIR64" >&5
9350$as_echo "$tcl_cv_DIR64" >&6; }
9351	if test "x${tcl_cv_DIR64}" = "xyes" ; then
9352
9353$as_echo "#define HAVE_DIR64 1" >>confdefs.h
9354
9355	fi
9356
9357	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5
9358$as_echo_n "checking for struct stat64... " >&6; }
9359if ${tcl_cv_struct_stat64+:} false; then :
9360  $as_echo_n "(cached) " >&6
9361else
9362
9363	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9364/* end confdefs.h.  */
9365#include <sys/stat.h>
9366int
9367main ()
9368{
9369struct stat64 p;
9370
9371  ;
9372  return 0;
9373}
9374_ACEOF
9375if ac_fn_c_try_compile "$LINENO"; then :
9376  tcl_cv_struct_stat64=yes
9377else
9378  tcl_cv_struct_stat64=no
9379fi
9380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9381fi
9382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5
9383$as_echo "$tcl_cv_struct_stat64" >&6; }
9384	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
9385
9386$as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h
9387
9388	fi
9389
9390	for ac_func in open64 lseek64
9391do :
9392  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9393ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9394if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9395  cat >>confdefs.h <<_ACEOF
9396#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9397_ACEOF
9398
9399fi
9400done
9401
9402	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5
9403$as_echo_n "checking for off64_t... " >&6; }
9404	if ${tcl_cv_type_off64_t+:} false; then :
9405  $as_echo_n "(cached) " >&6
9406else
9407
9408	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9409/* end confdefs.h.  */
9410#include <sys/types.h>
9411int
9412main ()
9413{
9414off64_t offset;
9415
9416  ;
9417  return 0;
9418}
9419_ACEOF
9420if ac_fn_c_try_compile "$LINENO"; then :
9421  tcl_cv_type_off64_t=yes
9422else
9423  tcl_cv_type_off64_t=no
9424fi
9425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9426fi
9427
9428			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
9429	        test "x${ac_cv_func_lseek64}" = "xyes" && \
9430	        test "x${ac_cv_func_open64}" = "xyes" ; then
9431
9432$as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h
9433
9434	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9435$as_echo "yes" >&6; }
9436	else
9437	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9438$as_echo "no" >&6; }
9439	fi
9440    fi
9441
9442
9443
9444#--------------------------------------------------------------------
9445# Set the default compiler switches based on the --enable-symbols option.
9446#--------------------------------------------------------------------
9447
9448
9449
9450    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5
9451$as_echo_n "checking for build with symbols... " >&6; }
9452    # Check whether --enable-symbols was given.
9453if test "${enable_symbols+set}" = set; then :
9454  enableval=$enable_symbols; tcl_ok=$enableval
9455else
9456  tcl_ok=no
9457fi
9458
9459    if test "$tcl_ok" = "no"; then
9460	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
9461	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
9462	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9463$as_echo "no" >&6; }
9464    else
9465	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
9466	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
9467	if test "$tcl_ok" = "yes"; then
9468	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5
9469$as_echo "yes (standard debugging)" >&6; }
9470	fi
9471    fi
9472
9473
9474
9475    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
9476
9477$as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h
9478
9479    fi
9480
9481    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
9482	if test "$tcl_ok" = "all"; then
9483	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem debugging" >&5
9484$as_echo "enabled symbols mem debugging" >&6; }
9485	else
9486	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5
9487$as_echo "enabled $tcl_ok debugging" >&6; }
9488	fi
9489    fi
9490
9491
9492#--------------------------------------------------------------------
9493# For Unix/Tk builds, make sure that the X libraries/headers are found.
9494# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
9495#--------------------------------------------------------------------
9496
9497
9498    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
9499
9500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9501$as_echo_n "checking for X... " >&6; }
9502
9503
9504# Check whether --with-x was given.
9505if test "${with_x+set}" = set; then :
9506  withval=$with_x;
9507fi
9508
9509# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9510if test "x$with_x" = xno; then
9511  # The user explicitly disabled X.
9512  have_x=disabled
9513else
9514  case $x_includes,$x_libraries in #(
9515    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
9516    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
9517  $as_echo_n "(cached) " >&6
9518else
9519  # One or both of the vars are not set, and there is no cached value.
9520ac_x_includes=no ac_x_libraries=no
9521rm -f -r conftest.dir
9522if mkdir conftest.dir; then
9523  cd conftest.dir
9524  cat >Imakefile <<'_ACEOF'
9525incroot:
9526	@echo incroot='${INCROOT}'
9527usrlibdir:
9528	@echo usrlibdir='${USRLIBDIR}'
9529libdir:
9530	@echo libdir='${LIBDIR}'
9531_ACEOF
9532  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9533    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
9534    for ac_var in incroot usrlibdir libdir; do
9535      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9536    done
9537    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9538    for ac_extension in a so sl dylib la dll; do
9539      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9540	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9541	ac_im_usrlibdir=$ac_im_libdir; break
9542      fi
9543    done
9544    # Screen out bogus values from the imake configuration.  They are
9545    # bogus both because they are the default anyway, and because
9546    # using them would break gcc on systems where it needs fixed includes.
9547    case $ac_im_incroot in
9548	/usr/include) ac_x_includes= ;;
9549	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9550    esac
9551    case $ac_im_usrlibdir in
9552	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
9553	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9554    esac
9555  fi
9556  cd ..
9557  rm -f -r conftest.dir
9558fi
9559
9560# Standard set of common directories for X headers.
9561# Check X11 before X11Rn because it is often a symlink to the current release.
9562ac_x_header_dirs='
9563/usr/X11/include
9564/usr/X11R7/include
9565/usr/X11R6/include
9566/usr/X11R5/include
9567/usr/X11R4/include
9568
9569/usr/include/X11
9570/usr/include/X11R7
9571/usr/include/X11R6
9572/usr/include/X11R5
9573/usr/include/X11R4
9574
9575/usr/local/X11/include
9576/usr/local/X11R7/include
9577/usr/local/X11R6/include
9578/usr/local/X11R5/include
9579/usr/local/X11R4/include
9580
9581/usr/local/include/X11
9582/usr/local/include/X11R7
9583/usr/local/include/X11R6
9584/usr/local/include/X11R5
9585/usr/local/include/X11R4
9586
9587/usr/X386/include
9588/usr/x386/include
9589/usr/XFree86/include/X11
9590
9591/usr/include
9592/usr/local/include
9593/usr/unsupported/include
9594/usr/athena/include
9595/usr/local/x11r5/include
9596/usr/lpp/Xamples/include
9597
9598/usr/openwin/include
9599/usr/openwin/share/include'
9600
9601if test "$ac_x_includes" = no; then
9602  # Guess where to find include files, by looking for Xlib.h.
9603  # First, try using that file with no special directory specified.
9604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9605/* end confdefs.h.  */
9606#include <X11/Xlib.h>
9607_ACEOF
9608if ac_fn_c_try_cpp "$LINENO"; then :
9609  # We can compile using X headers with no special include directory.
9610ac_x_includes=
9611else
9612  for ac_dir in $ac_x_header_dirs; do
9613  if test -r "$ac_dir/X11/Xlib.h"; then
9614    ac_x_includes=$ac_dir
9615    break
9616  fi
9617done
9618fi
9619rm -f conftest.err conftest.i conftest.$ac_ext
9620fi # $ac_x_includes = no
9621
9622if test "$ac_x_libraries" = no; then
9623  # Check for the libraries.
9624  # See if we find them without any special options.
9625  # Don't add to $LIBS permanently.
9626  ac_save_LIBS=$LIBS
9627  LIBS="-lX11 $LIBS"
9628  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9629/* end confdefs.h.  */
9630#include <X11/Xlib.h>
9631int
9632main ()
9633{
9634XrmInitialize ()
9635  ;
9636  return 0;
9637}
9638_ACEOF
9639if ac_fn_c_try_link "$LINENO"; then :
9640  LIBS=$ac_save_LIBS
9641# We can link X programs with no special library path.
9642ac_x_libraries=
9643else
9644  LIBS=$ac_save_LIBS
9645for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9646do
9647  # Don't even attempt the hair of trying to link an X program!
9648  for ac_extension in a so sl dylib la dll; do
9649    if test -r "$ac_dir/libX11.$ac_extension"; then
9650      ac_x_libraries=$ac_dir
9651      break 2
9652    fi
9653  done
9654done
9655fi
9656rm -f core conftest.err conftest.$ac_objext \
9657    conftest$ac_exeext conftest.$ac_ext
9658fi # $ac_x_libraries = no
9659
9660case $ac_x_includes,$ac_x_libraries in #(
9661  no,* | *,no | *\'*)
9662    # Didn't find X, or a directory has "'" in its name.
9663    ac_cv_have_x="have_x=no";; #(
9664  *)
9665    # Record where we found X for the cache.
9666    ac_cv_have_x="have_x=yes\
9667	ac_x_includes='$ac_x_includes'\
9668	ac_x_libraries='$ac_x_libraries'"
9669esac
9670fi
9671;; #(
9672    *) have_x=yes;;
9673  esac
9674  eval "$ac_cv_have_x"
9675fi # $with_x != no
9676
9677if test "$have_x" != yes; then
9678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9679$as_echo "$have_x" >&6; }
9680  no_x=yes
9681else
9682  # If each of the values was on the command line, it overrides each guess.
9683  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9684  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9685  # Update the cache value to reflect the command line values.
9686  ac_cv_have_x="have_x=yes\
9687	ac_x_includes='$x_includes'\
9688	ac_x_libraries='$x_libraries'"
9689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9690$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9691fi
9692
9693    not_really_there=""
9694    if test "$no_x" = ""; then
9695	if test "$x_includes" = ""; then
9696	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9697/* end confdefs.h.  */
9698#include <X11/Xlib.h>
9699_ACEOF
9700if ac_fn_c_try_cpp "$LINENO"; then :
9701
9702else
9703  not_really_there="yes"
9704fi
9705rm -f conftest.err conftest.i conftest.$ac_ext
9706	else
9707	    if test ! -r $x_includes/X11/Xlib.h; then
9708		not_really_there="yes"
9709	    fi
9710	fi
9711    fi
9712    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
9713	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 header files" >&5
9714$as_echo_n "checking for X11 header files... " >&6; }
9715	found_xincludes="no"
9716	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9717/* end confdefs.h.  */
9718#include <X11/Xlib.h>
9719_ACEOF
9720if ac_fn_c_try_cpp "$LINENO"; then :
9721  found_xincludes="yes"
9722else
9723  found_xincludes="no"
9724fi
9725rm -f conftest.err conftest.i conftest.$ac_ext
9726	if test "$found_xincludes" = "no"; then
9727	    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"
9728	    for i in $dirs ; do
9729		if test -r $i/X11/Xlib.h; then
9730		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i" >&5
9731$as_echo "$i" >&6; }
9732		    XINCLUDES=" -I$i"
9733		    found_xincludes="yes"
9734		    break
9735		fi
9736	    done
9737	fi
9738    else
9739	if test "$x_includes" != ""; then
9740	    XINCLUDES="-I$x_includes"
9741	    found_xincludes="yes"
9742	fi
9743    fi
9744    if test "$found_xincludes" = "no"; then
9745	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: couldn't find any!" >&5
9746$as_echo "couldn't find any!" >&6; }
9747    fi
9748
9749    if test "$no_x" = yes; then
9750	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 libraries" >&5
9751$as_echo_n "checking for X11 libraries... " >&6; }
9752	XLIBSW=nope
9753	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"
9754	for i in $dirs ; do
9755	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then
9756		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i" >&5
9757$as_echo "$i" >&6; }
9758		XLIBSW="-L$i -lX11"
9759		x_libraries="$i"
9760		break
9761	    fi
9762	done
9763    else
9764	if test "$x_libraries" = ""; then
9765	    XLIBSW=-lX11
9766	else
9767	    XLIBSW="-L$x_libraries -lX11"
9768	fi
9769    fi
9770    if test "$XLIBSW" = nope ; then
9771	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCreateWindow in -lXwindow" >&5
9772$as_echo_n "checking for XCreateWindow in -lXwindow... " >&6; }
9773if ${ac_cv_lib_Xwindow_XCreateWindow+:} false; then :
9774  $as_echo_n "(cached) " >&6
9775else
9776  ac_check_lib_save_LIBS=$LIBS
9777LIBS="-lXwindow  $LIBS"
9778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9779/* end confdefs.h.  */
9780
9781/* Override any GCC internal prototype to avoid an error.
9782   Use char because int might match the return type of a GCC
9783   builtin and then its argument prototype would still apply.  */
9784#ifdef __cplusplus
9785extern "C"
9786#endif
9787char XCreateWindow ();
9788int
9789main ()
9790{
9791return XCreateWindow ();
9792  ;
9793  return 0;
9794}
9795_ACEOF
9796if ac_fn_c_try_link "$LINENO"; then :
9797  ac_cv_lib_Xwindow_XCreateWindow=yes
9798else
9799  ac_cv_lib_Xwindow_XCreateWindow=no
9800fi
9801rm -f core conftest.err conftest.$ac_objext \
9802    conftest$ac_exeext conftest.$ac_ext
9803LIBS=$ac_check_lib_save_LIBS
9804fi
9805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xwindow_XCreateWindow" >&5
9806$as_echo "$ac_cv_lib_Xwindow_XCreateWindow" >&6; }
9807if test "x$ac_cv_lib_Xwindow_XCreateWindow" = xyes; then :
9808  XLIBSW=-lXwindow
9809fi
9810
9811    fi
9812    if test "$XLIBSW" = nope ; then
9813	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find any!  Using -lX11." >&5
9814$as_echo "could not find any!  Using -lX11." >&6; }
9815	XLIBSW=-lX11
9816    fi
9817    # TEA specific:
9818    if test x"${XLIBSW}" != x ; then
9819	PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
9820    fi
9821
9822    fi
9823
9824
9825#--------------------------------------------------------------------
9826# Everyone should be linking against the Tcl stub library.  If you
9827# can't for some reason, remove this definition.  If you aren't using
9828# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
9829# link against the non-stubbed Tcl library.
9830#--------------------------------------------------------------------
9831
9832$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h
9833
9834$as_echo "#define USE_TK_STUBS 1" >>confdefs.h
9835
9836
9837#--------------------------------------------------------------------
9838# This macro generates a line to use when building a library.  It
9839# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
9840# and TEA_LOAD_TCLCONFIG macros above.
9841#--------------------------------------------------------------------
9842
9843
9844    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
9845	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
9846	MAKE_SHARED_LIB="\${SHLIB_LD} \${LDFLAGS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
9847	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9848/* end confdefs.h.  */
9849
9850#if defined(_MSC_VER) && _MSC_VER >= 1400
9851print("manifest needed")
9852#endif
9853
9854_ACEOF
9855if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9856  $EGREP "manifest needed" >/dev/null 2>&1; then :
9857
9858	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
9859	VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi"
9860	VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1 ; fi"
9861	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
9862
9863    CLEANFILES="$CLEANFILES *.manifest"
9864
9865
9866fi
9867rm -f conftest*
9868
9869	MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\$@ \$(PKG_STUB_OBJECTS)"
9870    else
9871	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
9872	MAKE_SHARED_LIB="\${SHLIB_LD} \${LDFLAGS} \${LDFLAGS_DEFAULT} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
9873	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
9874    fi
9875
9876    if test "${SHARED_BUILD}" = "1" ; then
9877	MAKE_LIB="${MAKE_SHARED_LIB} "
9878    else
9879	MAKE_LIB="${MAKE_STATIC_LIB} "
9880    fi
9881
9882    #--------------------------------------------------------------------
9883    # Shared libraries and static libraries have different names.
9884    # Use the double eval to make sure any variables in the suffix is
9885    # substituted. (@@@ Might not be necessary anymore)
9886    #--------------------------------------------------------------------
9887
9888    if test "${TEA_PLATFORM}" = "windows" ; then
9889	if test "${SHARED_BUILD}" = "1" ; then
9890	    # We force the unresolved linking of symbols that are really in
9891	    # the private libraries of Tcl and Tk.
9892	    if test x"${TK_BIN_DIR}" != x ; then
9893		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
9894	    fi
9895	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
9896	    if test "$GCC" = "yes"; then
9897		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
9898	    fi
9899	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
9900	else
9901	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
9902	    if test "$GCC" = "yes"; then
9903		PKG_LIB_FILE=lib${PKG_LIB_FILE}
9904	    fi
9905	fi
9906	# Some packages build their own stubs libraries
9907	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
9908	if test "$GCC" = "yes"; then
9909	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
9910	fi
9911	# These aren't needed on Windows (either MSVC or gcc)
9912	RANLIB=:
9913	RANLIB_STUB=:
9914    else
9915	RANLIB_STUB="${RANLIB}"
9916	if test "${SHARED_BUILD}" = "1" ; then
9917	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
9918	    if test x"${TK_BIN_DIR}" != x ; then
9919		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
9920	    fi
9921	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
9922	    RANLIB=:
9923	else
9924	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
9925	fi
9926	# Some packages build their own stubs libraries
9927	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
9928    fi
9929
9930    # These are escaped so that only CFLAGS is picked up at configure time.
9931    # The other values will be substituted at make time.
9932    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
9933    if test "${SHARED_BUILD}" = "1" ; then
9934	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
9935    fi
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946#--------------------------------------------------------------------
9947# __CHANGE__
9948# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
9949#--------------------------------------------------------------------
9950
9951if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
9952
9953    vars="\"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
9954    for i in $vars; do
9955	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
9956	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
9957	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
9958	fi
9959	PKG_LIBS="$PKG_LIBS $i"
9960    done
9961
9962
9963
9964    vars="\"`${CYGPATH} ${tifftcl_STUB_LIB_PATH}`\""
9965    for i in $vars; do
9966	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
9967	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
9968	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
9969	fi
9970	PKG_LIBS="$PKG_LIBS $i"
9971    done
9972
9973
9974
9975    vars="\"`${CYGPATH} ${jpegtcl_STUB_LIB_PATH}`\""
9976    for i in $vars; do
9977	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
9978	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
9979	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
9980	fi
9981	PKG_LIBS="$PKG_LIBS $i"
9982    done
9983
9984
9985
9986    vars="\"`${CYGPATH} ${zlibtcl_STUB_LIB_PATH}`\""
9987    for i in $vars; do
9988	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
9989	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
9990	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
9991	fi
9992	PKG_LIBS="$PKG_LIBS $i"
9993    done
9994
9995
9996else
9997
9998    vars="${tkimg_STUB_LIB_SPEC}"
9999    for i in $vars; do
10000	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
10001	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
10002	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
10003	fi
10004	PKG_LIBS="$PKG_LIBS $i"
10005    done
10006
10007
10008
10009    vars="${tifftcl_STUB_LIB_SPEC}"
10010    for i in $vars; do
10011	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
10012	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
10013	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
10014	fi
10015	PKG_LIBS="$PKG_LIBS $i"
10016    done
10017
10018
10019
10020    vars="${jpegtcl_STUB_LIB_SPEC}"
10021    for i in $vars; do
10022	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
10023	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
10024	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
10025	fi
10026	PKG_LIBS="$PKG_LIBS $i"
10027    done
10028
10029
10030
10031    vars="${zlibtcl_STUB_LIB_SPEC}"
10032    for i in $vars; do
10033	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
10034	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
10035	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
10036	fi
10037	PKG_LIBS="$PKG_LIBS $i"
10038    done
10039
10040
10041fi
10042
10043#--------------------------------------------------------------------
10044# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
10045# file during the install process.  Don't run the TCLSH_PROG through
10046# ${CYGPATH} because it's being used directly by make.
10047# Require that we use a tclsh shell version 8.2 or later since earlier
10048# versions have bugs in the pkg_mkIndex routine.
10049# Add WISH as well if this is a Tk extension.
10050#--------------------------------------------------------------------
10051
10052
10053    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5
10054$as_echo_n "checking for tclsh... " >&6; }
10055    if test -f "${TCL_BIN_DIR}/Makefile" ; then
10056        # tclConfig.sh is in Tcl build directory
10057        if test "${TEA_PLATFORM}" = "windows"; then
10058          if test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}" ; then
10059            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}"
10060          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}" ; then
10061            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}"
10062          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}" ; then
10063            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}"
10064          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}" ; then
10065            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}"
10066          fi
10067        else
10068            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
10069        fi
10070    else
10071        # tclConfig.sh is in install location
10072        if test "${TEA_PLATFORM}" = "windows"; then
10073            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}"
10074        else
10075            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}"
10076        fi
10077        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
10078              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
10079              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
10080        for i in $list ; do
10081            if test -f "$i/${TCLSH_PROG}" ; then
10082                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
10083                break
10084            fi
10085        done
10086        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
10087    fi
10088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${TCLSH_PROG}" >&5
10089$as_echo "${TCLSH_PROG}" >&6; }
10090
10091
10092
10093    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wish" >&5
10094$as_echo_n "checking for wish... " >&6; }
10095    if test -f "${TK_BIN_DIR}/Makefile" ; then
10096        # tkConfig.sh is in Tk build directory
10097        if test "${TEA_PLATFORM}" = "windows"; then
10098          if test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}" ; then
10099            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}"
10100          elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}s${EXEEXT}" ; then
10101            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}$s{EXEEXT}"
10102          elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}t${EXEEXT}" ; then
10103            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}t${EXEEXT}"
10104          elif test -f "${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}st${EXEEXT}" ; then
10105            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}st${EXEEXT}"
10106          fi
10107        else
10108            WISH_PROG="${TK_BIN_DIR}/wish"
10109        fi
10110    else
10111        # tkConfig.sh is in install location
10112        if test "${TEA_PLATFORM}" = "windows"; then
10113            WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${EXEEXT}"
10114        else
10115            WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}"
10116        fi
10117        list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
10118              `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
10119              `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
10120        for i in $list ; do
10121            if test -f "$i/${WISH_PROG}" ; then
10122                REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
10123                break
10124            fi
10125        done
10126        WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
10127    fi
10128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WISH_PROG}" >&5
10129$as_echo "${WISH_PROG}" >&6; }
10130
10131
10132
10133#--------------------------------------------------------------------
10134# Finally, substitute all of the various values into the Makefile.
10135# You may alternatively have a special pkgIndex.tcl.in or other files
10136# which require substituting th AC variables in.  Include these here.
10137#--------------------------------------------------------------------
10138
10139ac_config_files="$ac_config_files Makefile"
10140
10141cat >confcache <<\_ACEOF
10142# This file is a shell script that caches the results of configure
10143# tests run on this system so they can be shared between configure
10144# scripts and configure runs, see configure's option --config-cache.
10145# It is not useful on other systems.  If it contains results you don't
10146# want to keep, you may remove or edit it.
10147#
10148# config.status only pays attention to the cache file if you give it
10149# the --recheck option to rerun configure.
10150#
10151# `ac_cv_env_foo' variables (set or unset) will be overridden when
10152# loading this file, other *unset* `ac_cv_foo' will be assigned the
10153# following values.
10154
10155_ACEOF
10156
10157# The following way of writing the cache mishandles newlines in values,
10158# but we know of no workaround that is simple, portable, and efficient.
10159# So, we kill variables containing newlines.
10160# Ultrix sh set writes to stderr and can't be redirected directly,
10161# and sets the high bit in the cache file unless we assign to the vars.
10162(
10163  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
10164    eval ac_val=\$$ac_var
10165    case $ac_val in #(
10166    *${as_nl}*)
10167      case $ac_var in #(
10168      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
10169$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
10170      esac
10171      case $ac_var in #(
10172      _ | IFS | as_nl) ;; #(
10173      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
10174      *) { eval $ac_var=; unset $ac_var;} ;;
10175      esac ;;
10176    esac
10177  done
10178
10179  (set) 2>&1 |
10180    case $as_nl`(ac_space=' '; set) 2>&1` in #(
10181    *${as_nl}ac_space=\ *)
10182      # `set' does not quote correctly, so add quotes: double-quote
10183      # substitution turns \\\\ into \\, and sed turns \\ into \.
10184      sed -n \
10185	"s/'/'\\\\''/g;
10186	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
10187      ;; #(
10188    *)
10189      # `set' quotes correctly as required by POSIX, so do not add quotes.
10190      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
10191      ;;
10192    esac |
10193    sort
10194) |
10195  sed '
10196     /^ac_cv_env_/b end
10197     t clear
10198     :clear
10199     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10200     t end
10201     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10202     :end' >>confcache
10203if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
10204  if test -w "$cache_file"; then
10205    if test "x$cache_file" != "x/dev/null"; then
10206      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
10207$as_echo "$as_me: updating cache $cache_file" >&6;}
10208      if test ! -f "$cache_file" || test -h "$cache_file"; then
10209	cat confcache >"$cache_file"
10210      else
10211        case $cache_file in #(
10212        */* | ?:*)
10213	  mv -f confcache "$cache_file"$$ &&
10214	  mv -f "$cache_file"$$ "$cache_file" ;; #(
10215        *)
10216	  mv -f confcache "$cache_file" ;;
10217	esac
10218      fi
10219    fi
10220  else
10221    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
10222$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
10223  fi
10224fi
10225rm -f confcache
10226
10227test "x$prefix" = xNONE && prefix=$ac_default_prefix
10228# Let make expand exec_prefix.
10229test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10230
10231# Transform confdefs.h into DEFS.
10232# Protect against shell expansion while executing Makefile rules.
10233# Protect against Makefile macro expansion.
10234#
10235# If the first sed substitution is executed (which looks for macros that
10236# take arguments), then branch to the quote section.  Otherwise,
10237# look for a macro that doesn't take arguments.
10238ac_script='
10239:mline
10240/\\$/{
10241 N
10242 s,\\\n,,
10243 b mline
10244}
10245t clear
10246:clear
10247s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
10248t quote
10249s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
10250t quote
10251b any
10252:quote
10253s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
10254s/\[/\\&/g
10255s/\]/\\&/g
10256s/\$/$$/g
10257H
10258:any
10259${
10260	g
10261	s/^\n//
10262	s/\n/ /g
10263	p
10264}
10265'
10266DEFS=`sed -n "$ac_script" confdefs.h`
10267
10268
10269ac_libobjs=
10270ac_ltlibobjs=
10271U=
10272for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
10273  # 1. Remove the extension, and $U if already installed.
10274  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
10275  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
10276  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
10277  #    will be set to the directory where LIBOBJS objects are built.
10278  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
10279  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
10280done
10281LIBOBJS=$ac_libobjs
10282
10283LTLIBOBJS=$ac_ltlibobjs
10284
10285
10286
10287CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
10288
10289: "${CONFIG_STATUS=./config.status}"
10290ac_write_fail=0
10291ac_clean_files_save=$ac_clean_files
10292ac_clean_files="$ac_clean_files $CONFIG_STATUS"
10293{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
10294$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
10295as_write_fail=0
10296cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
10297#! $SHELL
10298# Generated by $as_me.
10299# Run this file to recreate the current configuration.
10300# Compiler output produced by configure, useful for debugging
10301# configure, is in config.log if it exists.
10302
10303debug=false
10304ac_cs_recheck=false
10305ac_cs_silent=false
10306
10307SHELL=\${CONFIG_SHELL-$SHELL}
10308export SHELL
10309_ASEOF
10310cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
10311## -------------------- ##
10312## M4sh Initialization. ##
10313## -------------------- ##
10314
10315# Be more Bourne compatible
10316DUALCASE=1; export DUALCASE # for MKS sh
10317if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
10318  emulate sh
10319  NULLCMD=:
10320  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
10321  # is contrary to our usage.  Disable this feature.
10322  alias -g '${1+"$@"}'='"$@"'
10323  setopt NO_GLOB_SUBST
10324else
10325  case `(set -o) 2>/dev/null` in #(
10326  *posix*) :
10327    set -o posix ;; #(
10328  *) :
10329     ;;
10330esac
10331fi
10332
10333
10334as_nl='
10335'
10336export as_nl
10337# Printing a long string crashes Solaris 7 /usr/bin/printf.
10338as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
10339as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
10340as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
10341# Prefer a ksh shell builtin over an external printf program on Solaris,
10342# but without wasting forks for bash or zsh.
10343if test -z "$BASH_VERSION$ZSH_VERSION" \
10344    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
10345  as_echo='print -r --'
10346  as_echo_n='print -rn --'
10347elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
10348  as_echo='printf %s\n'
10349  as_echo_n='printf %s'
10350else
10351  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
10352    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
10353    as_echo_n='/usr/ucb/echo -n'
10354  else
10355    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
10356    as_echo_n_body='eval
10357      arg=$1;
10358      case $arg in #(
10359      *"$as_nl"*)
10360	expr "X$arg" : "X\\(.*\\)$as_nl";
10361	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
10362      esac;
10363      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
10364    '
10365    export as_echo_n_body
10366    as_echo_n='sh -c $as_echo_n_body as_echo'
10367  fi
10368  export as_echo_body
10369  as_echo='sh -c $as_echo_body as_echo'
10370fi
10371
10372# The user is always right.
10373if test "${PATH_SEPARATOR+set}" != set; then
10374  PATH_SEPARATOR=:
10375  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
10376    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
10377      PATH_SEPARATOR=';'
10378  }
10379fi
10380
10381
10382# IFS
10383# We need space, tab and new line, in precisely that order.  Quoting is
10384# there to prevent editors from complaining about space-tab.
10385# (If _AS_PATH_WALK were called with IFS unset, it would disable word
10386# splitting by setting IFS to empty value.)
10387IFS=" ""	$as_nl"
10388
10389# Find who we are.  Look in the path if we contain no directory separator.
10390as_myself=
10391case $0 in #((
10392  *[\\/]* ) as_myself=$0 ;;
10393  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10394for as_dir in $PATH
10395do
10396  IFS=$as_save_IFS
10397  test -z "$as_dir" && as_dir=.
10398    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
10399  done
10400IFS=$as_save_IFS
10401
10402     ;;
10403esac
10404# We did not find ourselves, most probably we were run as `sh COMMAND'
10405# in which case we are not to be found in the path.
10406if test "x$as_myself" = x; then
10407  as_myself=$0
10408fi
10409if test ! -f "$as_myself"; then
10410  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
10411  exit 1
10412fi
10413
10414# Unset variables that we do not need and which cause bugs (e.g. in
10415# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
10416# suppresses any "Segmentation fault" message there.  '((' could
10417# trigger a bug in pdksh 5.2.14.
10418for as_var in BASH_ENV ENV MAIL MAILPATH
10419do eval test x\${$as_var+set} = xset \
10420  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
10421done
10422PS1='$ '
10423PS2='> '
10424PS4='+ '
10425
10426# NLS nuisances.
10427LC_ALL=C
10428export LC_ALL
10429LANGUAGE=C
10430export LANGUAGE
10431
10432# CDPATH.
10433(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10434
10435
10436# as_fn_error STATUS ERROR [LINENO LOG_FD]
10437# ----------------------------------------
10438# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
10439# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
10440# script with STATUS, using 1 if that was 0.
10441as_fn_error ()
10442{
10443  as_status=$1; test $as_status -eq 0 && as_status=1
10444  if test "$4"; then
10445    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
10446    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
10447  fi
10448  $as_echo "$as_me: error: $2" >&2
10449  as_fn_exit $as_status
10450} # as_fn_error
10451
10452
10453# as_fn_set_status STATUS
10454# -----------------------
10455# Set $? to STATUS, without forking.
10456as_fn_set_status ()
10457{
10458  return $1
10459} # as_fn_set_status
10460
10461# as_fn_exit STATUS
10462# -----------------
10463# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
10464as_fn_exit ()
10465{
10466  set +e
10467  as_fn_set_status $1
10468  exit $1
10469} # as_fn_exit
10470
10471# as_fn_unset VAR
10472# ---------------
10473# Portably unset VAR.
10474as_fn_unset ()
10475{
10476  { eval $1=; unset $1;}
10477}
10478as_unset=as_fn_unset
10479# as_fn_append VAR VALUE
10480# ----------------------
10481# Append the text in VALUE to the end of the definition contained in VAR. Take
10482# advantage of any shell optimizations that allow amortized linear growth over
10483# repeated appends, instead of the typical quadratic growth present in naive
10484# implementations.
10485if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
10486  eval 'as_fn_append ()
10487  {
10488    eval $1+=\$2
10489  }'
10490else
10491  as_fn_append ()
10492  {
10493    eval $1=\$$1\$2
10494  }
10495fi # as_fn_append
10496
10497# as_fn_arith ARG...
10498# ------------------
10499# Perform arithmetic evaluation on the ARGs, and store the result in the
10500# global $as_val. Take advantage of shells that can avoid forks. The arguments
10501# must be portable across $(()) and expr.
10502if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
10503  eval 'as_fn_arith ()
10504  {
10505    as_val=$(( $* ))
10506  }'
10507else
10508  as_fn_arith ()
10509  {
10510    as_val=`expr "$@" || test $? -eq 1`
10511  }
10512fi # as_fn_arith
10513
10514
10515if expr a : '\(a\)' >/dev/null 2>&1 &&
10516   test "X`expr 00001 : '.*\(...\)'`" = X001; then
10517  as_expr=expr
10518else
10519  as_expr=false
10520fi
10521
10522if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
10523  as_basename=basename
10524else
10525  as_basename=false
10526fi
10527
10528if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
10529  as_dirname=dirname
10530else
10531  as_dirname=false
10532fi
10533
10534as_me=`$as_basename -- "$0" ||
10535$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
10536	 X"$0" : 'X\(//\)$' \| \
10537	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
10538$as_echo X/"$0" |
10539    sed '/^.*\/\([^/][^/]*\)\/*$/{
10540	    s//\1/
10541	    q
10542	  }
10543	  /^X\/\(\/\/\)$/{
10544	    s//\1/
10545	    q
10546	  }
10547	  /^X\/\(\/\).*/{
10548	    s//\1/
10549	    q
10550	  }
10551	  s/.*/./; q'`
10552
10553# Avoid depending upon Character Ranges.
10554as_cr_letters='abcdefghijklmnopqrstuvwxyz'
10555as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
10556as_cr_Letters=$as_cr_letters$as_cr_LETTERS
10557as_cr_digits='0123456789'
10558as_cr_alnum=$as_cr_Letters$as_cr_digits
10559
10560ECHO_C= ECHO_N= ECHO_T=
10561case `echo -n x` in #(((((
10562-n*)
10563  case `echo 'xy\c'` in
10564  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
10565  xy)  ECHO_C='\c';;
10566  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
10567       ECHO_T='	';;
10568  esac;;
10569*)
10570  ECHO_N='-n';;
10571esac
10572
10573rm -f conf$$ conf$$.exe conf$$.file
10574if test -d conf$$.dir; then
10575  rm -f conf$$.dir/conf$$.file
10576else
10577  rm -f conf$$.dir
10578  mkdir conf$$.dir 2>/dev/null
10579fi
10580if (echo >conf$$.file) 2>/dev/null; then
10581  if ln -s conf$$.file conf$$ 2>/dev/null; then
10582    as_ln_s='ln -s'
10583    # ... but there are two gotchas:
10584    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
10585    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
10586    # In both cases, we have to default to `cp -pR'.
10587    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
10588      as_ln_s='cp -pR'
10589  elif ln conf$$.file conf$$ 2>/dev/null; then
10590    as_ln_s=ln
10591  else
10592    as_ln_s='cp -pR'
10593  fi
10594else
10595  as_ln_s='cp -pR'
10596fi
10597rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
10598rmdir conf$$.dir 2>/dev/null
10599
10600
10601# as_fn_mkdir_p
10602# -------------
10603# Create "$as_dir" as a directory, including parents if necessary.
10604as_fn_mkdir_p ()
10605{
10606
10607  case $as_dir in #(
10608  -*) as_dir=./$as_dir;;
10609  esac
10610  test -d "$as_dir" || eval $as_mkdir_p || {
10611    as_dirs=
10612    while :; do
10613      case $as_dir in #(
10614      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
10615      *) as_qdir=$as_dir;;
10616      esac
10617      as_dirs="'$as_qdir' $as_dirs"
10618      as_dir=`$as_dirname -- "$as_dir" ||
10619$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10620	 X"$as_dir" : 'X\(//\)[^/]' \| \
10621	 X"$as_dir" : 'X\(//\)$' \| \
10622	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
10623$as_echo X"$as_dir" |
10624    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
10625	    s//\1/
10626	    q
10627	  }
10628	  /^X\(\/\/\)[^/].*/{
10629	    s//\1/
10630	    q
10631	  }
10632	  /^X\(\/\/\)$/{
10633	    s//\1/
10634	    q
10635	  }
10636	  /^X\(\/\).*/{
10637	    s//\1/
10638	    q
10639	  }
10640	  s/.*/./; q'`
10641      test -d "$as_dir" && break
10642    done
10643    test -z "$as_dirs" || eval "mkdir $as_dirs"
10644  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
10645
10646
10647} # as_fn_mkdir_p
10648if mkdir -p . 2>/dev/null; then
10649  as_mkdir_p='mkdir -p "$as_dir"'
10650else
10651  test -d ./-p && rmdir ./-p
10652  as_mkdir_p=false
10653fi
10654
10655
10656# as_fn_executable_p FILE
10657# -----------------------
10658# Test if FILE is an executable regular file.
10659as_fn_executable_p ()
10660{
10661  test -f "$1" && test -x "$1"
10662} # as_fn_executable_p
10663as_test_x='test -x'
10664as_executable_p=as_fn_executable_p
10665
10666# Sed expression to map a string onto a valid CPP name.
10667as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
10668
10669# Sed expression to map a string onto a valid variable name.
10670as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
10671
10672
10673exec 6>&1
10674## ----------------------------------- ##
10675## Main body of $CONFIG_STATUS script. ##
10676## ----------------------------------- ##
10677_ASEOF
10678test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
10679
10680cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10681# Save the log message, to keep $0 and so on meaningful, and to
10682# report actual input values of CONFIG_FILES etc. instead of their
10683# values after options handling.
10684ac_log="
10685This file was extended by tkimgtiff $as_me 1.4.12, which was
10686generated by GNU Autoconf 2.69.  Invocation command line was
10687
10688  CONFIG_FILES    = $CONFIG_FILES
10689  CONFIG_HEADERS  = $CONFIG_HEADERS
10690  CONFIG_LINKS    = $CONFIG_LINKS
10691  CONFIG_COMMANDS = $CONFIG_COMMANDS
10692  $ $0 $@
10693
10694on `(hostname || uname -n) 2>/dev/null | sed 1q`
10695"
10696
10697_ACEOF
10698
10699case $ac_config_files in *"
10700"*) set x $ac_config_files; shift; ac_config_files=$*;;
10701esac
10702
10703
10704
10705cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10706# Files that config.status was made for.
10707config_files="$ac_config_files"
10708
10709_ACEOF
10710
10711cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10712ac_cs_usage="\
10713\`$as_me' instantiates files and other configuration actions
10714from templates according to the current configuration.  Unless the files
10715and actions are specified as TAGs, all are instantiated by default.
10716
10717Usage: $0 [OPTION]... [TAG]...
10718
10719  -h, --help       print this help, then exit
10720  -V, --version    print version number and configuration settings, then exit
10721      --config     print configuration, then exit
10722  -q, --quiet, --silent
10723                   do not print progress messages
10724  -d, --debug      don't remove temporary files
10725      --recheck    update $as_me by reconfiguring in the same conditions
10726      --file=FILE[:TEMPLATE]
10727                   instantiate the configuration file FILE
10728
10729Configuration files:
10730$config_files
10731
10732Report bugs to the package provider."
10733
10734_ACEOF
10735cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10736ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
10737ac_cs_version="\\
10738tkimgtiff config.status 1.4.12
10739configured by $0, generated by GNU Autoconf 2.69,
10740  with options \\"\$ac_cs_config\\"
10741
10742Copyright (C) 2012 Free Software Foundation, Inc.
10743This config.status script is free software; the Free Software Foundation
10744gives unlimited permission to copy, distribute and modify it."
10745
10746ac_pwd='$ac_pwd'
10747srcdir='$srcdir'
10748test -n "\$AWK" || AWK=awk
10749_ACEOF
10750
10751cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10752# The default lists apply if the user does not specify any file.
10753ac_need_defaults=:
10754while test $# != 0
10755do
10756  case $1 in
10757  --*=?*)
10758    ac_option=`expr "X$1" : 'X\([^=]*\)='`
10759    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
10760    ac_shift=:
10761    ;;
10762  --*=)
10763    ac_option=`expr "X$1" : 'X\([^=]*\)='`
10764    ac_optarg=
10765    ac_shift=:
10766    ;;
10767  *)
10768    ac_option=$1
10769    ac_optarg=$2
10770    ac_shift=shift
10771    ;;
10772  esac
10773
10774  case $ac_option in
10775  # Handling of the options.
10776  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10777    ac_cs_recheck=: ;;
10778  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
10779    $as_echo "$ac_cs_version"; exit ;;
10780  --config | --confi | --conf | --con | --co | --c )
10781    $as_echo "$ac_cs_config"; exit ;;
10782  --debug | --debu | --deb | --de | --d | -d )
10783    debug=: ;;
10784  --file | --fil | --fi | --f )
10785    $ac_shift
10786    case $ac_optarg in
10787    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
10788    '') as_fn_error $? "missing file argument" ;;
10789    esac
10790    as_fn_append CONFIG_FILES " '$ac_optarg'"
10791    ac_need_defaults=false;;
10792  --he | --h |  --help | --hel | -h )
10793    $as_echo "$ac_cs_usage"; exit ;;
10794  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
10795  | -silent | --silent | --silen | --sile | --sil | --si | --s)
10796    ac_cs_silent=: ;;
10797
10798  # This is an error.
10799  -*) as_fn_error $? "unrecognized option: \`$1'
10800Try \`$0 --help' for more information." ;;
10801
10802  *) as_fn_append ac_config_targets " $1"
10803     ac_need_defaults=false ;;
10804
10805  esac
10806  shift
10807done
10808
10809ac_configure_extra_args=
10810
10811if $ac_cs_silent; then
10812  exec 6>/dev/null
10813  ac_configure_extra_args="$ac_configure_extra_args --silent"
10814fi
10815
10816_ACEOF
10817cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10818if \$ac_cs_recheck; then
10819  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
10820  shift
10821  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
10822  CONFIG_SHELL='$SHELL'
10823  export CONFIG_SHELL
10824  exec "\$@"
10825fi
10826
10827_ACEOF
10828cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10829exec 5>>config.log
10830{
10831  echo
10832  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
10833## Running $as_me. ##
10834_ASBOX
10835  $as_echo "$ac_log"
10836} >&5
10837
10838_ACEOF
10839cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10840_ACEOF
10841
10842cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10843
10844# Handling of arguments.
10845for ac_config_target in $ac_config_targets
10846do
10847  case $ac_config_target in
10848    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
10849
10850  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
10851  esac
10852done
10853
10854
10855# If the user did not use the arguments to specify the items to instantiate,
10856# then the envvar interface is used.  Set only those that are not.
10857# We use the long form for the default assignment because of an extremely
10858# bizarre bug on SunOS 4.1.3.
10859if $ac_need_defaults; then
10860  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
10861fi
10862
10863# Have a temporary directory for convenience.  Make it in the build tree
10864# simply because there is no reason against having it here, and in addition,
10865# creating and moving files from /tmp can sometimes cause problems.
10866# Hook for its removal unless debugging.
10867# Note that there is a small window in which the directory will not be cleaned:
10868# after its creation but before its name has been assigned to `$tmp'.
10869$debug ||
10870{
10871  tmp= ac_tmp=
10872  trap 'exit_status=$?
10873  : "${ac_tmp:=$tmp}"
10874  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
10875' 0
10876  trap 'as_fn_exit 1' 1 2 13 15
10877}
10878# Create a (secure) tmp directory for tmp files.
10879
10880{
10881  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
10882  test -d "$tmp"
10883}  ||
10884{
10885  tmp=./conf$$-$RANDOM
10886  (umask 077 && mkdir "$tmp")
10887} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
10888ac_tmp=$tmp
10889
10890# Set up the scripts for CONFIG_FILES section.
10891# No need to generate them if there are no CONFIG_FILES.
10892# This happens for instance with `./config.status config.h'.
10893if test -n "$CONFIG_FILES"; then
10894
10895
10896ac_cr=`echo X | tr X '\015'`
10897# On cygwin, bash can eat \r inside `` if the user requested igncr.
10898# But we know of no other shell where ac_cr would be empty at this
10899# point, so we can use a bashism as a fallback.
10900if test "x$ac_cr" = x; then
10901  eval ac_cr=\$\'\\r\'
10902fi
10903ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
10904if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
10905  ac_cs_awk_cr='\\r'
10906else
10907  ac_cs_awk_cr=$ac_cr
10908fi
10909
10910echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
10911_ACEOF
10912
10913
10914{
10915  echo "cat >conf$$subs.awk <<_ACEOF" &&
10916  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
10917  echo "_ACEOF"
10918} >conf$$subs.sh ||
10919  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
10920ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
10921ac_delim='%!_!# '
10922for ac_last_try in false false false false false :; do
10923  . ./conf$$subs.sh ||
10924    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
10925
10926  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
10927  if test $ac_delim_n = $ac_delim_num; then
10928    break
10929  elif $ac_last_try; then
10930    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
10931  else
10932    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
10933  fi
10934done
10935rm -f conf$$subs.sh
10936
10937cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10938cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
10939_ACEOF
10940sed -n '
10941h
10942s/^/S["/; s/!.*/"]=/
10943p
10944g
10945s/^[^!]*!//
10946:repl
10947t repl
10948s/'"$ac_delim"'$//
10949t delim
10950:nl
10951h
10952s/\(.\{148\}\)..*/\1/
10953t more1
10954s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
10955p
10956n
10957b repl
10958:more1
10959s/["\\]/\\&/g; s/^/"/; s/$/"\\/
10960p
10961g
10962s/.\{148\}//
10963t nl
10964:delim
10965h
10966s/\(.\{148\}\)..*/\1/
10967t more2
10968s/["\\]/\\&/g; s/^/"/; s/$/"/
10969p
10970b
10971:more2
10972s/["\\]/\\&/g; s/^/"/; s/$/"\\/
10973p
10974g
10975s/.\{148\}//
10976t delim
10977' <conf$$subs.awk | sed '
10978/^[^""]/{
10979  N
10980  s/\n//
10981}
10982' >>$CONFIG_STATUS || ac_write_fail=1
10983rm -f conf$$subs.awk
10984cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10985_ACAWK
10986cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
10987  for (key in S) S_is_set[key] = 1
10988  FS = ""
10989
10990}
10991{
10992  line = $ 0
10993  nfields = split(line, field, "@")
10994  substed = 0
10995  len = length(field[1])
10996  for (i = 2; i < nfields; i++) {
10997    key = field[i]
10998    keylen = length(key)
10999    if (S_is_set[key]) {
11000      value = S[key]
11001      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
11002      len += length(value) + length(field[++i])
11003      substed = 1
11004    } else
11005      len += 1 + keylen
11006  }
11007
11008  print line
11009}
11010
11011_ACAWK
11012_ACEOF
11013cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11014if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
11015  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
11016else
11017  cat
11018fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
11019  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
11020_ACEOF
11021
11022# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
11023# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
11024# trailing colons and then remove the whole line if VPATH becomes empty
11025# (actually we leave an empty line to preserve line numbers).
11026if test "x$srcdir" = x.; then
11027  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
11028h
11029s///
11030s/^/:/
11031s/[	 ]*$/:/
11032s/:\$(srcdir):/:/g
11033s/:\${srcdir}:/:/g
11034s/:@srcdir@:/:/g
11035s/^:*//
11036s/:*$//
11037x
11038s/\(=[	 ]*\).*/\1/
11039G
11040s/\n//
11041s/^[^=]*=[	 ]*$//
11042}'
11043fi
11044
11045cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11046fi # test -n "$CONFIG_FILES"
11047
11048
11049eval set X "  :F $CONFIG_FILES      "
11050shift
11051for ac_tag
11052do
11053  case $ac_tag in
11054  :[FHLC]) ac_mode=$ac_tag; continue;;
11055  esac
11056  case $ac_mode$ac_tag in
11057  :[FHL]*:*);;
11058  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
11059  :[FH]-) ac_tag=-:-;;
11060  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
11061  esac
11062  ac_save_IFS=$IFS
11063  IFS=:
11064  set x $ac_tag
11065  IFS=$ac_save_IFS
11066  shift
11067  ac_file=$1
11068  shift
11069
11070  case $ac_mode in
11071  :L) ac_source=$1;;
11072  :[FH])
11073    ac_file_inputs=
11074    for ac_f
11075    do
11076      case $ac_f in
11077      -) ac_f="$ac_tmp/stdin";;
11078      *) # Look for the file first in the build tree, then in the source tree
11079	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
11080	 # because $ac_f cannot contain `:'.
11081	 test -f "$ac_f" ||
11082	   case $ac_f in
11083	   [\\/$]*) false;;
11084	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
11085	   esac ||
11086	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
11087      esac
11088      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
11089      as_fn_append ac_file_inputs " '$ac_f'"
11090    done
11091
11092    # Let's still pretend it is `configure' which instantiates (i.e., don't
11093    # use $as_me), people would be surprised to read:
11094    #    /* config.h.  Generated by config.status.  */
11095    configure_input='Generated from '`
11096	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
11097	`' by configure.'
11098    if test x"$ac_file" != x-; then
11099      configure_input="$ac_file.  $configure_input"
11100      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
11101$as_echo "$as_me: creating $ac_file" >&6;}
11102    fi
11103    # Neutralize special characters interpreted by sed in replacement strings.
11104    case $configure_input in #(
11105    *\&* | *\|* | *\\* )
11106       ac_sed_conf_input=`$as_echo "$configure_input" |
11107       sed 's/[\\\\&|]/\\\\&/g'`;; #(
11108    *) ac_sed_conf_input=$configure_input;;
11109    esac
11110
11111    case $ac_tag in
11112    *:-:* | *:-) cat >"$ac_tmp/stdin" \
11113      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
11114    esac
11115    ;;
11116  esac
11117
11118  ac_dir=`$as_dirname -- "$ac_file" ||
11119$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11120	 X"$ac_file" : 'X\(//\)[^/]' \| \
11121	 X"$ac_file" : 'X\(//\)$' \| \
11122	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11123$as_echo X"$ac_file" |
11124    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11125	    s//\1/
11126	    q
11127	  }
11128	  /^X\(\/\/\)[^/].*/{
11129	    s//\1/
11130	    q
11131	  }
11132	  /^X\(\/\/\)$/{
11133	    s//\1/
11134	    q
11135	  }
11136	  /^X\(\/\).*/{
11137	    s//\1/
11138	    q
11139	  }
11140	  s/.*/./; q'`
11141  as_dir="$ac_dir"; as_fn_mkdir_p
11142  ac_builddir=.
11143
11144case "$ac_dir" in
11145.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
11146*)
11147  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
11148  # A ".." for each directory in $ac_dir_suffix.
11149  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
11150  case $ac_top_builddir_sub in
11151  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
11152  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
11153  esac ;;
11154esac
11155ac_abs_top_builddir=$ac_pwd
11156ac_abs_builddir=$ac_pwd$ac_dir_suffix
11157# for backward compatibility:
11158ac_top_builddir=$ac_top_build_prefix
11159
11160case $srcdir in
11161  .)  # We are building in place.
11162    ac_srcdir=.
11163    ac_top_srcdir=$ac_top_builddir_sub
11164    ac_abs_top_srcdir=$ac_pwd ;;
11165  [\\/]* | ?:[\\/]* )  # Absolute name.
11166    ac_srcdir=$srcdir$ac_dir_suffix;
11167    ac_top_srcdir=$srcdir
11168    ac_abs_top_srcdir=$srcdir ;;
11169  *) # Relative name.
11170    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
11171    ac_top_srcdir=$ac_top_build_prefix$srcdir
11172    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
11173esac
11174ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
11175
11176
11177  case $ac_mode in
11178  :F)
11179  #
11180  # CONFIG_FILE
11181  #
11182
11183_ACEOF
11184
11185cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11186# If the template does not know about datarootdir, expand it.
11187# FIXME: This hack should be removed a few years after 2.60.
11188ac_datarootdir_hack=; ac_datarootdir_seen=
11189ac_sed_dataroot='
11190/datarootdir/ {
11191  p
11192  q
11193}
11194/@datadir@/p
11195/@docdir@/p
11196/@infodir@/p
11197/@localedir@/p
11198/@mandir@/p'
11199case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
11200*datarootdir*) ac_datarootdir_seen=yes;;
11201*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
11202  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
11203$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
11204_ACEOF
11205cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11206  ac_datarootdir_hack='
11207  s&@datadir@&$datadir&g
11208  s&@docdir@&$docdir&g
11209  s&@infodir@&$infodir&g
11210  s&@localedir@&$localedir&g
11211  s&@mandir@&$mandir&g
11212  s&\\\${datarootdir}&$datarootdir&g' ;;
11213esac
11214_ACEOF
11215
11216# Neutralize VPATH when `$srcdir' = `.'.
11217# Shell code in configure.ac might set extrasub.
11218# FIXME: do we really want to maintain this feature?
11219cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11220ac_sed_extra="$ac_vpsub
11221$extrasub
11222_ACEOF
11223cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11224:t
11225/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11226s|@configure_input@|$ac_sed_conf_input|;t t
11227s&@top_builddir@&$ac_top_builddir_sub&;t t
11228s&@top_build_prefix@&$ac_top_build_prefix&;t t
11229s&@srcdir@&$ac_srcdir&;t t
11230s&@abs_srcdir@&$ac_abs_srcdir&;t t
11231s&@top_srcdir@&$ac_top_srcdir&;t t
11232s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
11233s&@builddir@&$ac_builddir&;t t
11234s&@abs_builddir@&$ac_abs_builddir&;t t
11235s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
11236$ac_datarootdir_hack
11237"
11238eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
11239  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
11240
11241test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
11242  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
11243  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
11244      "$ac_tmp/out"`; test -z "$ac_out"; } &&
11245  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11246which seems to be undefined.  Please make sure it is defined" >&5
11247$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11248which seems to be undefined.  Please make sure it is defined" >&2;}
11249
11250  rm -f "$ac_tmp/stdin"
11251  case $ac_file in
11252  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
11253  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
11254  esac \
11255  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
11256 ;;
11257
11258
11259
11260  esac
11261
11262done # for ac_tag
11263
11264
11265as_fn_exit 0
11266_ACEOF
11267ac_clean_files=$ac_clean_files_save
11268
11269test $ac_write_fail = 0 ||
11270  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
11271
11272
11273# configure is writing to config.log, and then calls config.status.
11274# config.status does its own redirection, appending to config.log.
11275# Unfortunately, on DOS this fails, as config.log is still kept open
11276# by configure, so config.status won't be able to write to it; its
11277# output is simply discarded.  So we exec the FD to /dev/null,
11278# effectively closing config.log, so it can be properly (re)opened and
11279# appended to by config.status.  When coming back to configure, we
11280# need to make the FD available again.
11281if test "$no_create" != yes; then
11282  ac_cs_success=:
11283  ac_config_status_args=
11284  test "$silent" = yes &&
11285    ac_config_status_args="$ac_config_status_args --quiet"
11286  exec 5>/dev/null
11287  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
11288  exec 5>>config.log
11289  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
11290  # would make configure fail if this is the last instruction.
11291  $ac_cs_success || as_fn_exit 1
11292fi
11293if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
11294  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
11295$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
11296fi
11297
11298
11299#--------------------------------------------------------------------
11300