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