1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.61 for Img 1.4.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9## --------------------- ##
10## M4sh Initialization.  ##
11## --------------------- ##
12
13# Be more Bourne compatible
14DUALCASE=1; export DUALCASE # for MKS sh
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16  emulate sh
17  NULLCMD=:
18  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19  # is contrary to our usage.  Disable this feature.
20  alias -g '${1+"$@"}'='"$@"'
21  setopt NO_GLOB_SUBST
22else
23  case `(set -o) 2>/dev/null` in
24  *posix*) set -o posix ;;
25esac
26
27fi
28
29
30
31
32# PATH needs CR
33# Avoid depending upon Character Ranges.
34as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37as_cr_digits='0123456789'
38as_cr_alnum=$as_cr_Letters$as_cr_digits
39
40# The user is always right.
41if test "${PATH_SEPARATOR+set}" != set; then
42  echo "#! /bin/sh" >conf$$.sh
43  echo  "exit 0"   >>conf$$.sh
44  chmod +x conf$$.sh
45  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
46    PATH_SEPARATOR=';'
47  else
48    PATH_SEPARATOR=:
49  fi
50  rm -f conf$$.sh
51fi
52
53# Support unset when possible.
54if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
55  as_unset=unset
56else
57  as_unset=false
58fi
59
60
61# IFS
62# We need space, tab and new line, in precisely that order.  Quoting is
63# there to prevent editors from complaining about space-tab.
64# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65# splitting by setting IFS to empty value.)
66as_nl='
67'
68IFS=" ""	$as_nl"
69
70# Find who we are.  Look in the path if we contain no directory separator.
71case $0 in
72  *[\\/]* ) as_myself=$0 ;;
73  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
74for as_dir in $PATH
75do
76  IFS=$as_save_IFS
77  test -z "$as_dir" && as_dir=.
78  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
79done
80IFS=$as_save_IFS
81
82     ;;
83esac
84# We did not find ourselves, most probably we were run as `sh COMMAND'
85# in which case we are not to be found in the path.
86if test "x$as_myself" = x; then
87  as_myself=$0
88fi
89if test ! -f "$as_myself"; then
90  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
91  { (exit 1); exit 1; }
92fi
93
94# Work around bugs in pre-3.0 UWIN ksh.
95for as_var in ENV MAIL MAILPATH
96do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
97done
98PS1='$ '
99PS2='> '
100PS4='+ '
101
102# NLS nuisances.
103for as_var in \
104  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
105  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
106  LC_TELEPHONE LC_TIME
107do
108  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
109    eval $as_var=C; export $as_var
110  else
111    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
112  fi
113done
114
115# Required to use basename.
116if expr a : '\(a\)' >/dev/null 2>&1 &&
117   test "X`expr 00001 : '.*\(...\)'`" = X001; then
118  as_expr=expr
119else
120  as_expr=false
121fi
122
123if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
124  as_basename=basename
125else
126  as_basename=false
127fi
128
129
130# Name of the executable.
131as_me=`$as_basename -- "$0" ||
132$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133	 X"$0" : 'X\(//\)$' \| \
134	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
135echo X/"$0" |
136    sed '/^.*\/\([^/][^/]*\)\/*$/{
137	    s//\1/
138	    q
139	  }
140	  /^X\/\(\/\/\)$/{
141	    s//\1/
142	    q
143	  }
144	  /^X\/\(\/\).*/{
145	    s//\1/
146	    q
147	  }
148	  s/.*/./; q'`
149
150# CDPATH.
151$as_unset CDPATH
152
153
154if test "x$CONFIG_SHELL" = x; then
155  if (eval ":") 2>/dev/null; then
156  as_have_required=yes
157else
158  as_have_required=no
159fi
160
161  if test $as_have_required = yes && 	 (eval ":
162(as_func_return () {
163  (exit \$1)
164}
165as_func_success () {
166  as_func_return 0
167}
168as_func_failure () {
169  as_func_return 1
170}
171as_func_ret_success () {
172  return 0
173}
174as_func_ret_failure () {
175  return 1
176}
177
178exitcode=0
179if as_func_success; then
180  :
181else
182  exitcode=1
183  echo as_func_success failed.
184fi
185
186if as_func_failure; then
187  exitcode=1
188  echo as_func_failure succeeded.
189fi
190
191if as_func_ret_success; then
192  :
193else
194  exitcode=1
195  echo as_func_ret_success failed.
196fi
197
198if as_func_ret_failure; then
199  exitcode=1
200  echo as_func_ret_failure succeeded.
201fi
202
203if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
204  :
205else
206  exitcode=1
207  echo positional parameters were not saved.
208fi
209
210test \$exitcode = 0) || { (exit 1); exit 1; }
211
212(
213  as_lineno_1=\$LINENO
214  as_lineno_2=\$LINENO
215  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
216  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
217") 2> /dev/null; then
218  :
219else
220  as_candidate_shells=
221    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
222for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
223do
224  IFS=$as_save_IFS
225  test -z "$as_dir" && as_dir=.
226  case $as_dir in
227	 /*)
228	   for as_base in sh bash ksh sh5; do
229	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
230	   done;;
231       esac
232done
233IFS=$as_save_IFS
234
235
236      for as_shell in $as_candidate_shells $SHELL; do
237	 # Try only shells that exist, to save several forks.
238	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
239		{ ("$as_shell") 2> /dev/null <<\_ASEOF
240if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241  emulate sh
242  NULLCMD=:
243  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244  # is contrary to our usage.  Disable this feature.
245  alias -g '${1+"$@"}'='"$@"'
246  setopt NO_GLOB_SUBST
247else
248  case `(set -o) 2>/dev/null` in
249  *posix*) set -o posix ;;
250esac
251
252fi
253
254
255:
256_ASEOF
257}; then
258  CONFIG_SHELL=$as_shell
259	       as_have_required=yes
260	       if { "$as_shell" 2> /dev/null <<\_ASEOF
261if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262  emulate sh
263  NULLCMD=:
264  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
265  # is contrary to our usage.  Disable this feature.
266  alias -g '${1+"$@"}'='"$@"'
267  setopt NO_GLOB_SUBST
268else
269  case `(set -o) 2>/dev/null` in
270  *posix*) set -o posix ;;
271esac
272
273fi
274
275
276:
277(as_func_return () {
278  (exit $1)
279}
280as_func_success () {
281  as_func_return 0
282}
283as_func_failure () {
284  as_func_return 1
285}
286as_func_ret_success () {
287  return 0
288}
289as_func_ret_failure () {
290  return 1
291}
292
293exitcode=0
294if as_func_success; then
295  :
296else
297  exitcode=1
298  echo as_func_success failed.
299fi
300
301if as_func_failure; then
302  exitcode=1
303  echo as_func_failure succeeded.
304fi
305
306if as_func_ret_success; then
307  :
308else
309  exitcode=1
310  echo as_func_ret_success failed.
311fi
312
313if as_func_ret_failure; then
314  exitcode=1
315  echo as_func_ret_failure succeeded.
316fi
317
318if ( set x; as_func_ret_success y && test x = "$1" ); then
319  :
320else
321  exitcode=1
322  echo positional parameters were not saved.
323fi
324
325test $exitcode = 0) || { (exit 1); exit 1; }
326
327(
328  as_lineno_1=$LINENO
329  as_lineno_2=$LINENO
330  test "x$as_lineno_1" != "x$as_lineno_2" &&
331  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
332
333_ASEOF
334}; then
335  break
336fi
337
338fi
339
340      done
341
342      if test "x$CONFIG_SHELL" != x; then
343  for as_var in BASH_ENV ENV
344        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
345        done
346        export CONFIG_SHELL
347        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
348fi
349
350
351    if test $as_have_required = no; then
352  echo This script requires a shell more modern than all the
353      echo shells that I found on your system.  Please install a
354      echo modern shell, or manually run the script under such a
355      echo shell if you do have one.
356      { (exit 1); exit 1; }
357fi
358
359
360fi
361
362fi
363
364
365
366(eval "as_func_return () {
367  (exit \$1)
368}
369as_func_success () {
370  as_func_return 0
371}
372as_func_failure () {
373  as_func_return 1
374}
375as_func_ret_success () {
376  return 0
377}
378as_func_ret_failure () {
379  return 1
380}
381
382exitcode=0
383if as_func_success; then
384  :
385else
386  exitcode=1
387  echo as_func_success failed.
388fi
389
390if as_func_failure; then
391  exitcode=1
392  echo as_func_failure succeeded.
393fi
394
395if as_func_ret_success; then
396  :
397else
398  exitcode=1
399  echo as_func_ret_success failed.
400fi
401
402if as_func_ret_failure; then
403  exitcode=1
404  echo as_func_ret_failure succeeded.
405fi
406
407if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
408  :
409else
410  exitcode=1
411  echo positional parameters were not saved.
412fi
413
414test \$exitcode = 0") || {
415  echo No shell found that supports shell functions.
416  echo Please tell autoconf@gnu.org about your system,
417  echo including any error possibly output before this
418  echo message
419}
420
421
422
423  as_lineno_1=$LINENO
424  as_lineno_2=$LINENO
425  test "x$as_lineno_1" != "x$as_lineno_2" &&
426  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
427
428  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
429  # uniformly replaced by the line number.  The first 'sed' inserts a
430  # line-number line after each line using $LINENO; the second 'sed'
431  # does the real work.  The second script uses 'N' to pair each
432  # line-number line with the line containing $LINENO, and appends
433  # trailing '-' during substitution so that $LINENO is not a special
434  # case at line end.
435  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
436  # scripts with optimization help from Paolo Bonzini.  Blame Lee
437  # E. McMahon (1931-1989) for sed's syntax.  :-)
438  sed -n '
439    p
440    /[$]LINENO/=
441  ' <$as_myself |
442    sed '
443      s/[$]LINENO.*/&-/
444      t lineno
445      b
446      :lineno
447      N
448      :loop
449      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
450      t loop
451      s/-\n.*//
452    ' >$as_me.lineno &&
453  chmod +x "$as_me.lineno" ||
454    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
455   { (exit 1); exit 1; }; }
456
457  # Don't try to exec as it changes $[0], causing all sort of problems
458  # (the dirname of $[0] is not the place where we might find the
459  # original and so on.  Autoconf is especially sensitive to this).
460  . "./$as_me.lineno"
461  # Exit status is that of the last command.
462  exit
463}
464
465
466if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
467  as_dirname=dirname
468else
469  as_dirname=false
470fi
471
472ECHO_C= ECHO_N= ECHO_T=
473case `echo -n x` in
474-n*)
475  case `echo 'x\c'` in
476  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
477  *)   ECHO_C='\c';;
478  esac;;
479*)
480  ECHO_N='-n';;
481esac
482
483if expr a : '\(a\)' >/dev/null 2>&1 &&
484   test "X`expr 00001 : '.*\(...\)'`" = X001; then
485  as_expr=expr
486else
487  as_expr=false
488fi
489
490rm -f conf$$ conf$$.exe conf$$.file
491if test -d conf$$.dir; then
492  rm -f conf$$.dir/conf$$.file
493else
494  rm -f conf$$.dir
495  mkdir conf$$.dir
496fi
497echo >conf$$.file
498if ln -s conf$$.file conf$$ 2>/dev/null; then
499  as_ln_s='ln -s'
500  # ... but there are two gotchas:
501  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
502  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
503  # In both cases, we have to default to `cp -p'.
504  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
505    as_ln_s='cp -p'
506elif ln conf$$.file conf$$ 2>/dev/null; then
507  as_ln_s=ln
508else
509  as_ln_s='cp -p'
510fi
511rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
512rmdir conf$$.dir 2>/dev/null
513
514if mkdir -p . 2>/dev/null; then
515  as_mkdir_p=:
516else
517  test -d ./-p && rmdir ./-p
518  as_mkdir_p=false
519fi
520
521if test -x / >/dev/null 2>&1; then
522  as_test_x='test -x'
523else
524  if ls -dL / >/dev/null 2>&1; then
525    as_ls_L_option=L
526  else
527    as_ls_L_option=
528  fi
529  as_test_x='
530    eval sh -c '\''
531      if test -d "$1"; then
532        test -d "$1/.";
533      else
534	case $1 in
535        -*)set "./$1";;
536	esac;
537	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
538	???[sx]*):;;*)false;;esac;fi
539    '\'' sh
540  '
541fi
542as_executable_p=$as_test_x
543
544# Sed expression to map a string onto a valid CPP name.
545as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
546
547# Sed expression to map a string onto a valid variable name.
548as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
549
550
551
552exec 7<&0 </dev/null 6>&1
553
554# Name of the host.
555# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
556# so uname gets run too.
557ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
558
559#
560# Initializations.
561#
562ac_default_prefix=/usr/local
563ac_clean_files=
564ac_config_libobj_dir=.
565LIBOBJS=
566cross_compiling=no
567subdirs=
568MFLAGS=
569MAKEFLAGS=
570SHELL=${CONFIG_SHELL-/bin/sh}
571
572# Identity of this package.
573PACKAGE_NAME='Img'
574PACKAGE_TARNAME='img'
575PACKAGE_VERSION='1.4'
576PACKAGE_STRING='Img 1.4'
577PACKAGE_BUGREPORT=''
578
579# Factoring default headers for most tests.
580ac_includes_default="\
581#include <stdio.h>
582#ifdef HAVE_SYS_TYPES_H
583# include <sys/types.h>
584#endif
585#ifdef HAVE_SYS_STAT_H
586# include <sys/stat.h>
587#endif
588#ifdef STDC_HEADERS
589# include <stdlib.h>
590# include <stddef.h>
591#else
592# ifdef HAVE_STDLIB_H
593#  include <stdlib.h>
594# endif
595#endif
596#ifdef HAVE_STRING_H
597# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
598#  include <memory.h>
599# endif
600# include <string.h>
601#endif
602#ifdef HAVE_STRINGS_H
603# include <strings.h>
604#endif
605#ifdef HAVE_INTTYPES_H
606# include <inttypes.h>
607#endif
608#ifdef HAVE_STDINT_H
609# include <stdint.h>
610#endif
611#ifdef HAVE_UNISTD_H
612# include <unistd.h>
613#endif"
614
615ac_subst_vars='SHELL
616PATH_SEPARATOR
617PACKAGE_NAME
618PACKAGE_TARNAME
619PACKAGE_VERSION
620PACKAGE_STRING
621PACKAGE_BUGREPORT
622exec_prefix
623prefix
624program_transform_name
625bindir
626sbindir
627libexecdir
628datarootdir
629datadir
630sysconfdir
631sharedstatedir
632localstatedir
633includedir
634oldincludedir
635docdir
636infodir
637htmldir
638dvidir
639pdfdir
640psdir
641libdir
642localedir
643mandir
644DEFS
645ECHO_C
646ECHO_N
647ECHO_T
648LIBS
649build_alias
650host_alias
651target_alias
652CYGPATH
653EXEEXT
654PKG_LIB_FILE
655PKG_STUB_LIB_FILE
656PKG_STUB_SOURCES
657PKG_STUB_OBJECTS
658PKG_TCL_SOURCES
659PKG_HEADERS
660PKG_INCLUDES
661PKG_LIBS
662PKG_CFLAGS
663TCL_VERSION
664TCL_PATCH_LEVEL
665TCL_BIN_DIR
666TCL_SRC_DIR
667TCL_LIB_FILE
668TCL_LIB_FLAG
669TCL_LIB_SPEC
670TCL_STUB_LIB_FILE
671TCL_STUB_LIB_FLAG
672TCL_STUB_LIB_SPEC
673CLEANFILES
674TCL_LIBS
675TCL_DEFS
676TCL_EXTRA_CFLAGS
677TCL_LD_FLAGS
678TCL_SHLIB_LD_LIBS
679TK_VERSION
680TK_BIN_DIR
681TK_SRC_DIR
682TK_LIB_FILE
683TK_LIB_FLAG
684TK_LIB_SPEC
685TK_STUB_LIB_FILE
686TK_STUB_LIB_FLAG
687TK_STUB_LIB_SPEC
688TK_LIBS
689TK_XINCLUDES
690CC
691CFLAGS
692LDFLAGS
693CPPFLAGS
694ac_ct_CC
695OBJEXT
696CPP
697INSTALL_PROGRAM
698INSTALL_SCRIPT
699INSTALL_DATA
700SET_MAKE
701RANLIB
702GREP
703EGREP
704MATH_LIBS
705TCL_INCLUDES
706TCL_TOP_DIR_NATIVE
707TK_INCLUDES
708TK_TOP_DIR_NATIVE
709TK_XLIB_DIR_NATIVE
710TCL_THREADS
711SHARED_BUILD
712AR
713CELIB_DIR
714CFLAGS_DEBUG
715CFLAGS_OPTIMIZE
716CFLAGS_WARNING
717STLIB_LD
718SHLIB_LD
719SHLIB_LD_LIBS
720SHLIB_CFLAGS
721LD_LIBRARY_PATH_VAR
722CFLAGS_DEFAULT
723LDFLAGS_DEFAULT
724TCL_DBGX
725XMKMF
726subdirs
727LIBOBJS
728LTLIBOBJS'
729ac_subst_files=''
730      ac_precious_vars='build_alias
731host_alias
732target_alias
733CC
734CFLAGS
735LDFLAGS
736LIBS
737CPPFLAGS
738CPP
739XMKMF'
740
741
742# Initialize some variables set by options.
743ac_init_help=
744ac_init_version=false
745# The variables have the same names as the options, with
746# dashes changed to underlines.
747cache_file=/dev/null
748exec_prefix=NONE
749no_create=
750no_recursion=
751prefix=NONE
752program_prefix=NONE
753program_suffix=NONE
754program_transform_name=s,x,x,
755silent=
756site=
757srcdir=
758verbose=
759x_includes=NONE
760x_libraries=NONE
761
762# Installation directory options.
763# These are left unexpanded so users can "make install exec_prefix=/foo"
764# and all the variables that are supposed to be based on exec_prefix
765# by default will actually change.
766# Use braces instead of parens because sh, perl, etc. also accept them.
767# (The list follows the same order as the GNU Coding Standards.)
768bindir='${exec_prefix}/bin'
769sbindir='${exec_prefix}/sbin'
770libexecdir='${exec_prefix}/libexec'
771datarootdir='${prefix}/share'
772datadir='${datarootdir}'
773sysconfdir='${prefix}/etc'
774sharedstatedir='${prefix}/com'
775localstatedir='${prefix}/var'
776includedir='${prefix}/include'
777oldincludedir='/usr/include'
778docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
779infodir='${datarootdir}/info'
780htmldir='${docdir}'
781dvidir='${docdir}'
782pdfdir='${docdir}'
783psdir='${docdir}'
784libdir='${exec_prefix}/lib'
785localedir='${datarootdir}/locale'
786mandir='${datarootdir}/man'
787
788ac_prev=
789ac_dashdash=
790for ac_option
791do
792  # If the previous option needs an argument, assign it.
793  if test -n "$ac_prev"; then
794    eval $ac_prev=\$ac_option
795    ac_prev=
796    continue
797  fi
798
799  case $ac_option in
800  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
801  *)	ac_optarg=yes ;;
802  esac
803
804  # Accept the important Cygnus configure options, so we can diagnose typos.
805
806  case $ac_dashdash$ac_option in
807  --)
808    ac_dashdash=yes ;;
809
810  -bindir | --bindir | --bindi | --bind | --bin | --bi)
811    ac_prev=bindir ;;
812  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
813    bindir=$ac_optarg ;;
814
815  -build | --build | --buil | --bui | --bu)
816    ac_prev=build_alias ;;
817  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
818    build_alias=$ac_optarg ;;
819
820  -cache-file | --cache-file | --cache-fil | --cache-fi \
821  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
822    ac_prev=cache_file ;;
823  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
824  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
825    cache_file=$ac_optarg ;;
826
827  --config-cache | -C)
828    cache_file=config.cache ;;
829
830  -datadir | --datadir | --datadi | --datad)
831    ac_prev=datadir ;;
832  -datadir=* | --datadir=* | --datadi=* | --datad=*)
833    datadir=$ac_optarg ;;
834
835  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
836  | --dataroo | --dataro | --datar)
837    ac_prev=datarootdir ;;
838  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
839  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
840    datarootdir=$ac_optarg ;;
841
842  -disable-* | --disable-*)
843    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
844    # Reject names that are not valid shell variable names.
845    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
846      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
847   { (exit 1); exit 1; }; }
848    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
849    eval enable_$ac_feature=no ;;
850
851  -docdir | --docdir | --docdi | --doc | --do)
852    ac_prev=docdir ;;
853  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
854    docdir=$ac_optarg ;;
855
856  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
857    ac_prev=dvidir ;;
858  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
859    dvidir=$ac_optarg ;;
860
861  -enable-* | --enable-*)
862    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
863    # Reject names that are not valid shell variable names.
864    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
865      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
866   { (exit 1); exit 1; }; }
867    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
868    eval enable_$ac_feature=\$ac_optarg ;;
869
870  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
871  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
872  | --exec | --exe | --ex)
873    ac_prev=exec_prefix ;;
874  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
875  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
876  | --exec=* | --exe=* | --ex=*)
877    exec_prefix=$ac_optarg ;;
878
879  -gas | --gas | --ga | --g)
880    # Obsolete; use --with-gas.
881    with_gas=yes ;;
882
883  -help | --help | --hel | --he | -h)
884    ac_init_help=long ;;
885  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
886    ac_init_help=recursive ;;
887  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
888    ac_init_help=short ;;
889
890  -host | --host | --hos | --ho)
891    ac_prev=host_alias ;;
892  -host=* | --host=* | --hos=* | --ho=*)
893    host_alias=$ac_optarg ;;
894
895  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
896    ac_prev=htmldir ;;
897  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
898  | --ht=*)
899    htmldir=$ac_optarg ;;
900
901  -includedir | --includedir | --includedi | --included | --include \
902  | --includ | --inclu | --incl | --inc)
903    ac_prev=includedir ;;
904  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
905  | --includ=* | --inclu=* | --incl=* | --inc=*)
906    includedir=$ac_optarg ;;
907
908  -infodir | --infodir | --infodi | --infod | --info | --inf)
909    ac_prev=infodir ;;
910  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
911    infodir=$ac_optarg ;;
912
913  -libdir | --libdir | --libdi | --libd)
914    ac_prev=libdir ;;
915  -libdir=* | --libdir=* | --libdi=* | --libd=*)
916    libdir=$ac_optarg ;;
917
918  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
919  | --libexe | --libex | --libe)
920    ac_prev=libexecdir ;;
921  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
922  | --libexe=* | --libex=* | --libe=*)
923    libexecdir=$ac_optarg ;;
924
925  -localedir | --localedir | --localedi | --localed | --locale)
926    ac_prev=localedir ;;
927  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
928    localedir=$ac_optarg ;;
929
930  -localstatedir | --localstatedir | --localstatedi | --localstated \
931  | --localstate | --localstat | --localsta | --localst | --locals)
932    ac_prev=localstatedir ;;
933  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
934  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
935    localstatedir=$ac_optarg ;;
936
937  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
938    ac_prev=mandir ;;
939  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
940    mandir=$ac_optarg ;;
941
942  -nfp | --nfp | --nf)
943    # Obsolete; use --without-fp.
944    with_fp=no ;;
945
946  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
947  | --no-cr | --no-c | -n)
948    no_create=yes ;;
949
950  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
951  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
952    no_recursion=yes ;;
953
954  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
955  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
956  | --oldin | --oldi | --old | --ol | --o)
957    ac_prev=oldincludedir ;;
958  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
959  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
960  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
961    oldincludedir=$ac_optarg ;;
962
963  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
964    ac_prev=prefix ;;
965  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
966    prefix=$ac_optarg ;;
967
968  -program-prefix | --program-prefix | --program-prefi | --program-pref \
969  | --program-pre | --program-pr | --program-p)
970    ac_prev=program_prefix ;;
971  -program-prefix=* | --program-prefix=* | --program-prefi=* \
972  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
973    program_prefix=$ac_optarg ;;
974
975  -program-suffix | --program-suffix | --program-suffi | --program-suff \
976  | --program-suf | --program-su | --program-s)
977    ac_prev=program_suffix ;;
978  -program-suffix=* | --program-suffix=* | --program-suffi=* \
979  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
980    program_suffix=$ac_optarg ;;
981
982  -program-transform-name | --program-transform-name \
983  | --program-transform-nam | --program-transform-na \
984  | --program-transform-n | --program-transform- \
985  | --program-transform | --program-transfor \
986  | --program-transfo | --program-transf \
987  | --program-trans | --program-tran \
988  | --progr-tra | --program-tr | --program-t)
989    ac_prev=program_transform_name ;;
990  -program-transform-name=* | --program-transform-name=* \
991  | --program-transform-nam=* | --program-transform-na=* \
992  | --program-transform-n=* | --program-transform-=* \
993  | --program-transform=* | --program-transfor=* \
994  | --program-transfo=* | --program-transf=* \
995  | --program-trans=* | --program-tran=* \
996  | --progr-tra=* | --program-tr=* | --program-t=*)
997    program_transform_name=$ac_optarg ;;
998
999  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1000    ac_prev=pdfdir ;;
1001  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1002    pdfdir=$ac_optarg ;;
1003
1004  -psdir | --psdir | --psdi | --psd | --ps)
1005    ac_prev=psdir ;;
1006  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1007    psdir=$ac_optarg ;;
1008
1009  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1010  | -silent | --silent | --silen | --sile | --sil)
1011    silent=yes ;;
1012
1013  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1014    ac_prev=sbindir ;;
1015  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1016  | --sbi=* | --sb=*)
1017    sbindir=$ac_optarg ;;
1018
1019  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1020  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1021  | --sharedst | --shareds | --shared | --share | --shar \
1022  | --sha | --sh)
1023    ac_prev=sharedstatedir ;;
1024  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1025  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1026  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1027  | --sha=* | --sh=*)
1028    sharedstatedir=$ac_optarg ;;
1029
1030  -site | --site | --sit)
1031    ac_prev=site ;;
1032  -site=* | --site=* | --sit=*)
1033    site=$ac_optarg ;;
1034
1035  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1036    ac_prev=srcdir ;;
1037  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1038    srcdir=$ac_optarg ;;
1039
1040  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1041  | --syscon | --sysco | --sysc | --sys | --sy)
1042    ac_prev=sysconfdir ;;
1043  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1044  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1045    sysconfdir=$ac_optarg ;;
1046
1047  -target | --target | --targe | --targ | --tar | --ta | --t)
1048    ac_prev=target_alias ;;
1049  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1050    target_alias=$ac_optarg ;;
1051
1052  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1053    verbose=yes ;;
1054
1055  -version | --version | --versio | --versi | --vers | -V)
1056    ac_init_version=: ;;
1057
1058  -with-* | --with-*)
1059    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1060    # Reject names that are not valid shell variable names.
1061    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1062      { echo "$as_me: error: invalid package name: $ac_package" >&2
1063   { (exit 1); exit 1; }; }
1064    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1065    eval with_$ac_package=\$ac_optarg ;;
1066
1067  -without-* | --without-*)
1068    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1069    # Reject names that are not valid shell variable names.
1070    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1071      { echo "$as_me: error: invalid package name: $ac_package" >&2
1072   { (exit 1); exit 1; }; }
1073    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1074    eval with_$ac_package=no ;;
1075
1076  --x)
1077    # Obsolete; use --with-x.
1078    with_x=yes ;;
1079
1080  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1081  | --x-incl | --x-inc | --x-in | --x-i)
1082    ac_prev=x_includes ;;
1083  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1084  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1085    x_includes=$ac_optarg ;;
1086
1087  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1088  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1089    ac_prev=x_libraries ;;
1090  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1091  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1092    x_libraries=$ac_optarg ;;
1093
1094  -*) { echo "$as_me: error: unrecognized option: $ac_option
1095Try \`$0 --help' for more information." >&2
1096   { (exit 1); exit 1; }; }
1097    ;;
1098
1099  *=*)
1100    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1101    # Reject names that are not valid shell variable names.
1102    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1103      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1104   { (exit 1); exit 1; }; }
1105    eval $ac_envvar=\$ac_optarg
1106    export $ac_envvar ;;
1107
1108  *)
1109    # FIXME: should be removed in autoconf 3.0.
1110    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1111    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1112      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1113    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1114    ;;
1115
1116  esac
1117done
1118
1119if test -n "$ac_prev"; then
1120  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1121  { echo "$as_me: error: missing argument to $ac_option" >&2
1122   { (exit 1); exit 1; }; }
1123fi
1124
1125# Be sure to have absolute directory names.
1126for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1127		datadir sysconfdir sharedstatedir localstatedir includedir \
1128		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1129		libdir localedir mandir
1130do
1131  eval ac_val=\$$ac_var
1132  case $ac_val in
1133    [\\/$]* | ?:[\\/]* )  continue;;
1134    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1135  esac
1136  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1137   { (exit 1); exit 1; }; }
1138done
1139
1140# There might be people who depend on the old broken behavior: `$host'
1141# used to hold the argument of --host etc.
1142# FIXME: To remove some day.
1143build=$build_alias
1144host=$host_alias
1145target=$target_alias
1146
1147# FIXME: To remove some day.
1148if test "x$host_alias" != x; then
1149  if test "x$build_alias" = x; then
1150    cross_compiling=maybe
1151    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1152    If a cross compiler is detected then cross compile mode will be used." >&2
1153  elif test "x$build_alias" != "x$host_alias"; then
1154    cross_compiling=yes
1155  fi
1156fi
1157
1158ac_tool_prefix=
1159test -n "$host_alias" && ac_tool_prefix=$host_alias-
1160
1161test "$silent" = yes && exec 6>/dev/null
1162
1163
1164ac_pwd=`pwd` && test -n "$ac_pwd" &&
1165ac_ls_di=`ls -di .` &&
1166ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1167  { echo "$as_me: error: Working directory cannot be determined" >&2
1168   { (exit 1); exit 1; }; }
1169test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1170  { echo "$as_me: error: pwd does not report name of working directory" >&2
1171   { (exit 1); exit 1; }; }
1172
1173
1174# Find the source files, if location was not specified.
1175if test -z "$srcdir"; then
1176  ac_srcdir_defaulted=yes
1177  # Try the directory containing this script, then the parent directory.
1178  ac_confdir=`$as_dirname -- "$0" ||
1179$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1180	 X"$0" : 'X\(//\)[^/]' \| \
1181	 X"$0" : 'X\(//\)$' \| \
1182	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1183echo X"$0" |
1184    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1185	    s//\1/
1186	    q
1187	  }
1188	  /^X\(\/\/\)[^/].*/{
1189	    s//\1/
1190	    q
1191	  }
1192	  /^X\(\/\/\)$/{
1193	    s//\1/
1194	    q
1195	  }
1196	  /^X\(\/\).*/{
1197	    s//\1/
1198	    q
1199	  }
1200	  s/.*/./; q'`
1201  srcdir=$ac_confdir
1202  if test ! -r "$srcdir/$ac_unique_file"; then
1203    srcdir=..
1204  fi
1205else
1206  ac_srcdir_defaulted=no
1207fi
1208if test ! -r "$srcdir/$ac_unique_file"; then
1209  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1210  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1211   { (exit 1); exit 1; }; }
1212fi
1213ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1214ac_abs_confdir=`(
1215	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1216   { (exit 1); exit 1; }; }
1217	pwd)`
1218# When building in place, set srcdir=.
1219if test "$ac_abs_confdir" = "$ac_pwd"; then
1220  srcdir=.
1221fi
1222# Remove unnecessary trailing slashes from srcdir.
1223# Double slashes in file names in object file debugging info
1224# mess up M-x gdb in Emacs.
1225case $srcdir in
1226*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1227esac
1228for ac_var in $ac_precious_vars; do
1229  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1230  eval ac_env_${ac_var}_value=\$${ac_var}
1231  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1232  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1233done
1234
1235#
1236# Report the --help message.
1237#
1238if test "$ac_init_help" = "long"; then
1239  # Omit some internal or obsolete options to make the list less imposing.
1240  # This message is too long to be a string in the A/UX 3.1 sh.
1241  cat <<_ACEOF
1242\`configure' configures Img 1.4 to adapt to many kinds of systems.
1243
1244Usage: $0 [OPTION]... [VAR=VALUE]...
1245
1246To assign environment variables (e.g., CC, CFLAGS...), specify them as
1247VAR=VALUE.  See below for descriptions of some of the useful variables.
1248
1249Defaults for the options are specified in brackets.
1250
1251Configuration:
1252  -h, --help              display this help and exit
1253      --help=short        display options specific to this package
1254      --help=recursive    display the short help of all the included packages
1255  -V, --version           display version information and exit
1256  -q, --quiet, --silent   do not print \`checking...' messages
1257      --cache-file=FILE   cache test results in FILE [disabled]
1258  -C, --config-cache      alias for \`--cache-file=config.cache'
1259  -n, --no-create         do not create output files
1260      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1261
1262Installation directories:
1263  --prefix=PREFIX         install architecture-independent files in PREFIX
1264			  [$ac_default_prefix]
1265  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1266			  [PREFIX]
1267
1268By default, \`make install' will install all the files in
1269\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1270an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1271for instance \`--prefix=\$HOME'.
1272
1273For better control, use the options below.
1274
1275Fine tuning of the installation directories:
1276  --bindir=DIR           user executables [EPREFIX/bin]
1277  --sbindir=DIR          system admin executables [EPREFIX/sbin]
1278  --libexecdir=DIR       program executables [EPREFIX/libexec]
1279  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1280  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1281  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1282  --libdir=DIR           object code libraries [EPREFIX/lib]
1283  --includedir=DIR       C header files [PREFIX/include]
1284  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1285  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1286  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1287  --infodir=DIR          info documentation [DATAROOTDIR/info]
1288  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1289  --mandir=DIR           man documentation [DATAROOTDIR/man]
1290  --docdir=DIR           documentation root [DATAROOTDIR/doc/img]
1291  --htmldir=DIR          html documentation [DOCDIR]
1292  --dvidir=DIR           dvi documentation [DOCDIR]
1293  --pdfdir=DIR           pdf documentation [DOCDIR]
1294  --psdir=DIR            ps documentation [DOCDIR]
1295_ACEOF
1296
1297  cat <<\_ACEOF
1298
1299X features:
1300  --x-includes=DIR    X include files are in DIR
1301  --x-libraries=DIR   X library files are in DIR
1302_ACEOF
1303fi
1304
1305if test -n "$ac_init_help"; then
1306  case $ac_init_help in
1307     short | recursive ) echo "Configuration of Img 1.4:";;
1308   esac
1309  cat <<\_ACEOF
1310
1311Optional Features:
1312  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1313  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1314  --enable-threads        build with threads
1315  --enable-shared         build and link with shared libraries (default: on)
1316  --enable-64bit          enable 64bit support (default: off)
1317  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1318  --disable-rpath         disable rpath support (default: on)
1319  --enable-wince          enable Win/CE support (where applicable)
1320  --enable-symbols        build with debugging symbols (default: off)
1321
1322Optional Packages:
1323  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1324  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1325  --with-tcl              directory containing tcl configuration
1326                          (tclConfig.sh)
1327  --with-tk               directory containing tk configuration (tkConfig.sh)
1328  --with-tclinclude       directory containing the public Tcl header files
1329  --with-tkinclude        directory containing the public Tk header files
1330  --with-celib=DIR        use Windows/CE support library from DIR
1331  --with-x                use the X Window System
1332
1333Some influential environment variables:
1334  CC          C compiler command
1335  CFLAGS      C compiler flags
1336  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1337              nonstandard directory <lib dir>
1338  LIBS        libraries to pass to the linker, e.g. -l<library>
1339  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1340              you have headers in a nonstandard directory <include dir>
1341  CPP         C preprocessor
1342  XMKMF       Path to xmkmf, Makefile generator for X Window System
1343
1344Use these variables to override the choices made by `configure' or to help
1345it to find libraries and programs with nonstandard names/locations.
1346
1347_ACEOF
1348ac_status=$?
1349fi
1350
1351if test "$ac_init_help" = "recursive"; then
1352  # If there are subdirs, report their specific --help.
1353  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1354    test -d "$ac_dir" || continue
1355    ac_builddir=.
1356
1357case "$ac_dir" in
1358.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1359*)
1360  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1361  # A ".." for each directory in $ac_dir_suffix.
1362  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1363  case $ac_top_builddir_sub in
1364  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1365  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1366  esac ;;
1367esac
1368ac_abs_top_builddir=$ac_pwd
1369ac_abs_builddir=$ac_pwd$ac_dir_suffix
1370# for backward compatibility:
1371ac_top_builddir=$ac_top_build_prefix
1372
1373case $srcdir in
1374  .)  # We are building in place.
1375    ac_srcdir=.
1376    ac_top_srcdir=$ac_top_builddir_sub
1377    ac_abs_top_srcdir=$ac_pwd ;;
1378  [\\/]* | ?:[\\/]* )  # Absolute name.
1379    ac_srcdir=$srcdir$ac_dir_suffix;
1380    ac_top_srcdir=$srcdir
1381    ac_abs_top_srcdir=$srcdir ;;
1382  *) # Relative name.
1383    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1384    ac_top_srcdir=$ac_top_build_prefix$srcdir
1385    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1386esac
1387ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1388
1389    cd "$ac_dir" || { ac_status=$?; continue; }
1390    # Check for guested configure.
1391    if test -f "$ac_srcdir/configure.gnu"; then
1392      echo &&
1393      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1394    elif test -f "$ac_srcdir/configure"; then
1395      echo &&
1396      $SHELL "$ac_srcdir/configure" --help=recursive
1397    else
1398      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1399    fi || ac_status=$?
1400    cd "$ac_pwd" || { ac_status=$?; break; }
1401  done
1402fi
1403
1404test -n "$ac_init_help" && exit $ac_status
1405if $ac_init_version; then
1406  cat <<\_ACEOF
1407Img configure 1.4
1408generated by GNU Autoconf 2.61
1409
1410Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14112002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1412This configure script is free software; the Free Software Foundation
1413gives unlimited permission to copy, distribute and modify it.
1414_ACEOF
1415  exit
1416fi
1417cat >config.log <<_ACEOF
1418This file contains any messages produced by compilers while
1419running configure, to aid debugging if configure makes a mistake.
1420
1421It was created by Img $as_me 1.4, which was
1422generated by GNU Autoconf 2.61.  Invocation command line was
1423
1424  $ $0 $@
1425
1426_ACEOF
1427exec 5>>config.log
1428{
1429cat <<_ASUNAME
1430## --------- ##
1431## Platform. ##
1432## --------- ##
1433
1434hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1435uname -m = `(uname -m) 2>/dev/null || echo unknown`
1436uname -r = `(uname -r) 2>/dev/null || echo unknown`
1437uname -s = `(uname -s) 2>/dev/null || echo unknown`
1438uname -v = `(uname -v) 2>/dev/null || echo unknown`
1439
1440/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1441/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1442
1443/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1444/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1445/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1446/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1447/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1448/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1449/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1450
1451_ASUNAME
1452
1453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1454for as_dir in $PATH
1455do
1456  IFS=$as_save_IFS
1457  test -z "$as_dir" && as_dir=.
1458  echo "PATH: $as_dir"
1459done
1460IFS=$as_save_IFS
1461
1462} >&5
1463
1464cat >&5 <<_ACEOF
1465
1466
1467## ----------- ##
1468## Core tests. ##
1469## ----------- ##
1470
1471_ACEOF
1472
1473
1474# Keep a trace of the command line.
1475# Strip out --no-create and --no-recursion so they do not pile up.
1476# Strip out --silent because we don't want to record it for future runs.
1477# Also quote any args containing shell meta-characters.
1478# Make two passes to allow for proper duplicate-argument suppression.
1479ac_configure_args=
1480ac_configure_args0=
1481ac_configure_args1=
1482ac_must_keep_next=false
1483for ac_pass in 1 2
1484do
1485  for ac_arg
1486  do
1487    case $ac_arg in
1488    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1489    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1490    | -silent | --silent | --silen | --sile | --sil)
1491      continue ;;
1492    *\'*)
1493      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1494    esac
1495    case $ac_pass in
1496    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1497    2)
1498      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1499      if test $ac_must_keep_next = true; then
1500	ac_must_keep_next=false # Got value, back to normal.
1501      else
1502	case $ac_arg in
1503	  *=* | --config-cache | -C | -disable-* | --disable-* \
1504	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1505	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1506	  | -with-* | --with-* | -without-* | --without-* | --x)
1507	    case "$ac_configure_args0 " in
1508	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1509	    esac
1510	    ;;
1511	  -* ) ac_must_keep_next=true ;;
1512	esac
1513      fi
1514      ac_configure_args="$ac_configure_args '$ac_arg'"
1515      ;;
1516    esac
1517  done
1518done
1519$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1520$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1521
1522# When interrupted or exit'd, cleanup temporary files, and complete
1523# config.log.  We remove comments because anyway the quotes in there
1524# would cause problems or look ugly.
1525# WARNING: Use '\'' to represent an apostrophe within the trap.
1526# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1527trap 'exit_status=$?
1528  # Save into config.log some information that might help in debugging.
1529  {
1530    echo
1531
1532    cat <<\_ASBOX
1533## ---------------- ##
1534## Cache variables. ##
1535## ---------------- ##
1536_ASBOX
1537    echo
1538    # The following way of writing the cache mishandles newlines in values,
1539(
1540  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1541    eval ac_val=\$$ac_var
1542    case $ac_val in #(
1543    *${as_nl}*)
1544      case $ac_var in #(
1545      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1546echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1547      esac
1548      case $ac_var in #(
1549      _ | IFS | as_nl) ;; #(
1550      *) $as_unset $ac_var ;;
1551      esac ;;
1552    esac
1553  done
1554  (set) 2>&1 |
1555    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1556    *${as_nl}ac_space=\ *)
1557      sed -n \
1558	"s/'\''/'\''\\\\'\'''\''/g;
1559	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1560      ;; #(
1561    *)
1562      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1563      ;;
1564    esac |
1565    sort
1566)
1567    echo
1568
1569    cat <<\_ASBOX
1570## ----------------- ##
1571## Output variables. ##
1572## ----------------- ##
1573_ASBOX
1574    echo
1575    for ac_var in $ac_subst_vars
1576    do
1577      eval ac_val=\$$ac_var
1578      case $ac_val in
1579      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1580      esac
1581      echo "$ac_var='\''$ac_val'\''"
1582    done | sort
1583    echo
1584
1585    if test -n "$ac_subst_files"; then
1586      cat <<\_ASBOX
1587## ------------------- ##
1588## File substitutions. ##
1589## ------------------- ##
1590_ASBOX
1591      echo
1592      for ac_var in $ac_subst_files
1593      do
1594	eval ac_val=\$$ac_var
1595	case $ac_val in
1596	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1597	esac
1598	echo "$ac_var='\''$ac_val'\''"
1599      done | sort
1600      echo
1601    fi
1602
1603    if test -s confdefs.h; then
1604      cat <<\_ASBOX
1605## ----------- ##
1606## confdefs.h. ##
1607## ----------- ##
1608_ASBOX
1609      echo
1610      cat confdefs.h
1611      echo
1612    fi
1613    test "$ac_signal" != 0 &&
1614      echo "$as_me: caught signal $ac_signal"
1615    echo "$as_me: exit $exit_status"
1616  } >&5
1617  rm -f core *.core core.conftest.* &&
1618    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1619    exit $exit_status
1620' 0
1621for ac_signal in 1 2 13 15; do
1622  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1623done
1624ac_signal=0
1625
1626# confdefs.h avoids OS command line length limits that DEFS can exceed.
1627rm -f -r conftest* confdefs.h
1628
1629# Predefined preprocessor variables.
1630
1631cat >>confdefs.h <<_ACEOF
1632#define PACKAGE_NAME "$PACKAGE_NAME"
1633_ACEOF
1634
1635
1636cat >>confdefs.h <<_ACEOF
1637#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1638_ACEOF
1639
1640
1641cat >>confdefs.h <<_ACEOF
1642#define PACKAGE_VERSION "$PACKAGE_VERSION"
1643_ACEOF
1644
1645
1646cat >>confdefs.h <<_ACEOF
1647#define PACKAGE_STRING "$PACKAGE_STRING"
1648_ACEOF
1649
1650
1651cat >>confdefs.h <<_ACEOF
1652#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1653_ACEOF
1654
1655
1656# Let the site file select an alternate cache file if it wants to.
1657# Prefer explicitly selected file to automatically selected ones.
1658if test -n "$CONFIG_SITE"; then
1659  set x "$CONFIG_SITE"
1660elif test "x$prefix" != xNONE; then
1661  set x "$prefix/share/config.site" "$prefix/etc/config.site"
1662else
1663  set x "$ac_default_prefix/share/config.site" \
1664	"$ac_default_prefix/etc/config.site"
1665fi
1666shift
1667for ac_site_file
1668do
1669  if test -r "$ac_site_file"; then
1670    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1671echo "$as_me: loading site script $ac_site_file" >&6;}
1672    sed 's/^/| /' "$ac_site_file" >&5
1673    . "$ac_site_file"
1674  fi
1675done
1676
1677if test -r "$cache_file"; then
1678  # Some versions of bash will fail to source /dev/null (special
1679  # files actually), so we avoid doing that.
1680  if test -f "$cache_file"; then
1681    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1682echo "$as_me: loading cache $cache_file" >&6;}
1683    case $cache_file in
1684      [\\/]* | ?:[\\/]* ) . "$cache_file";;
1685      *)                      . "./$cache_file";;
1686    esac
1687  fi
1688else
1689  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1690echo "$as_me: creating cache $cache_file" >&6;}
1691  >$cache_file
1692fi
1693
1694# Check that the precious variables saved in the cache have kept the same
1695# value.
1696ac_cache_corrupted=false
1697for ac_var in $ac_precious_vars; do
1698  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1699  eval ac_new_set=\$ac_env_${ac_var}_set
1700  eval ac_old_val=\$ac_cv_env_${ac_var}_value
1701  eval ac_new_val=\$ac_env_${ac_var}_value
1702  case $ac_old_set,$ac_new_set in
1703    set,)
1704      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1705echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1706      ac_cache_corrupted=: ;;
1707    ,set)
1708      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1709echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1710      ac_cache_corrupted=: ;;
1711    ,);;
1712    *)
1713      if test "x$ac_old_val" != "x$ac_new_val"; then
1714	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1715echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1716	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1717echo "$as_me:   former value:  $ac_old_val" >&2;}
1718	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1719echo "$as_me:   current value: $ac_new_val" >&2;}
1720	ac_cache_corrupted=:
1721      fi;;
1722  esac
1723  # Pass precious variables to config.status.
1724  if test "$ac_new_set" = set; then
1725    case $ac_new_val in
1726    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1727    *) ac_arg=$ac_var=$ac_new_val ;;
1728    esac
1729    case " $ac_configure_args " in
1730      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1731      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1732    esac
1733  fi
1734done
1735if $ac_cache_corrupted; then
1736  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1737echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1738  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1739echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1740   { (exit 1); exit 1; }; }
1741fi
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767ac_ext=c
1768ac_cpp='$CPP $CPPFLAGS'
1769ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1770ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1771ac_compiler_gnu=$ac_cv_c_compiler_gnu
1772
1773
1774
1775
1776    # TEA extensions pass this us the version of TEA they think they
1777    # are compatible with.
1778    TEA_VERSION="3.9"
1779
1780    { echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
1781echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6; }
1782    if test x"${PACKAGE_NAME}" = x ; then
1783	{ { echo "$as_me:$LINENO: error:
1784The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
1785echo "$as_me: error:
1786The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
1787   { (exit 1); exit 1; }; }
1788    fi
1789    if test x"3.9" = x ; then
1790	{ { echo "$as_me:$LINENO: error:
1791TEA version not specified." >&5
1792echo "$as_me: error:
1793TEA version not specified." >&2;}
1794   { (exit 1); exit 1; }; }
1795    elif test "3.9" != "${TEA_VERSION}" ; then
1796	{ echo "$as_me:$LINENO: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
1797echo "${ECHO_T}warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
1798    else
1799	{ echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
1800echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6; }
1801    fi
1802    case "`uname -s`" in
1803	*win32*|*WIN32*|*MINGW32_*)
1804	    # Extract the first word of "cygpath", so it can be a program name with args.
1805set dummy cygpath; ac_word=$2
1806{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1807echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1808if test "${ac_cv_prog_CYGPATH+set}" = set; then
1809  echo $ECHO_N "(cached) $ECHO_C" >&6
1810else
1811  if test -n "$CYGPATH"; then
1812  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1813else
1814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1815for as_dir in $PATH
1816do
1817  IFS=$as_save_IFS
1818  test -z "$as_dir" && as_dir=.
1819  for ac_exec_ext in '' $ac_executable_extensions; do
1820  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1821    ac_cv_prog_CYGPATH="cygpath -w"
1822    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1823    break 2
1824  fi
1825done
1826done
1827IFS=$as_save_IFS
1828
1829  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1830fi
1831fi
1832CYGPATH=$ac_cv_prog_CYGPATH
1833if test -n "$CYGPATH"; then
1834  { echo "$as_me:$LINENO: result: $CYGPATH" >&5
1835echo "${ECHO_T}$CYGPATH" >&6; }
1836else
1837  { echo "$as_me:$LINENO: result: no" >&5
1838echo "${ECHO_T}no" >&6; }
1839fi
1840
1841
1842	    EXEEXT=".exe"
1843	    TEA_PLATFORM="windows"
1844	    ;;
1845	*CYGWIN_*)
1846	    CYGPATH=echo
1847	    EXEEXT=".exe"
1848	    # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
1849	    ;;
1850	*)
1851	    CYGPATH=echo
1852	    EXEEXT=""
1853	    TEA_PLATFORM="unix"
1854	    ;;
1855    esac
1856
1857    # Check if exec_prefix is set. If not use fall back to prefix.
1858    # Note when adjusted, so that TEA_PREFIX can correct for this.
1859    # This is needed for recursive configures, since autoconf propagates
1860    # $prefix, but not $exec_prefix (doh!).
1861    if test x$exec_prefix = xNONE ; then
1862	exec_prefix_default=yes
1863	exec_prefix=$prefix
1864    fi
1865
1866
1867
1868
1869    # This package name must be replaced statically for AC_SUBST to work
1870
1871    # Substitute STUB_LIB_FILE in case package creates a stub library too.
1872
1873
1874    # We AC_SUBST these here to ensure they are subst'ed,
1875    # in case the user doesn't call TEA_ADD_...
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885ac_aux_dir=
1886for ac_dir in tclconfig "$srcdir"/tclconfig; do
1887  if test -f "$ac_dir/install-sh"; then
1888    ac_aux_dir=$ac_dir
1889    ac_install_sh="$ac_aux_dir/install-sh -c"
1890    break
1891  elif test -f "$ac_dir/install.sh"; then
1892    ac_aux_dir=$ac_dir
1893    ac_install_sh="$ac_aux_dir/install.sh -c"
1894    break
1895  elif test -f "$ac_dir/shtool"; then
1896    ac_aux_dir=$ac_dir
1897    ac_install_sh="$ac_aux_dir/shtool install -c"
1898    break
1899  fi
1900done
1901if test -z "$ac_aux_dir"; then
1902  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in tclconfig \"$srcdir\"/tclconfig" >&5
1903echo "$as_me: error: cannot find install-sh or install.sh in tclconfig \"$srcdir\"/tclconfig" >&2;}
1904   { (exit 1); exit 1; }; }
1905fi
1906
1907# These three variables are undocumented and unsupported,
1908# and are intended to be withdrawn in a future Autoconf release.
1909# They can cause serious problems if a builder's source tree is in a directory
1910# whose full name contains unusual characters.
1911ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1912ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1913ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1914
1915
1916
1917#--------------------------------------------------------------------
1918# Configure script for package 'Img', as distributed at March 18, 2005.
1919# TEA compliant.
1920#--------------------------------------------------------------------
1921
1922#--------------------------------------------------------------------
1923# Load the tclConfig.sh file
1924#--------------------------------------------------------------------
1925
1926
1927
1928    #
1929    # Ok, lets find the tcl configuration
1930    # First, look for one uninstalled.
1931    # the alternative search directory is invoked by --with-tcl
1932    #
1933
1934    if test x"${no_tcl}" = x ; then
1935	# we reset no_tcl in case something fails here
1936	no_tcl=true
1937
1938# Check whether --with-tcl was given.
1939if test "${with_tcl+set}" = set; then
1940  withval=$with_tcl; with_tclconfig="${withval}"
1941fi
1942
1943	{ echo "$as_me:$LINENO: checking for Tcl configuration" >&5
1944echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6; }
1945	if test "${ac_cv_c_tclconfig+set}" = set; then
1946  echo $ECHO_N "(cached) $ECHO_C" >&6
1947else
1948
1949
1950	    # First check to see if --with-tcl was specified.
1951	    if test x"${with_tclconfig}" != x ; then
1952		case "${with_tclconfig}" in
1953		    */tclConfig.sh )
1954			if test -f "${with_tclconfig}"; then
1955			    { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
1956echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
1957			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
1958			fi ;;
1959		esac
1960		if test -f "${with_tclconfig}/tclConfig.sh" ; then
1961		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
1962		else
1963		    { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
1964echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
1965   { (exit 1); exit 1; }; }
1966		fi
1967	    fi
1968
1969	    # then check for a private Tcl installation
1970	    if test x"${ac_cv_c_tclconfig}" = x ; then
1971		for i in \
1972			../tcl \
1973			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1974			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
1975			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
1976			../../tcl \
1977			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1978			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
1979			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
1980			../../../tcl \
1981			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1982			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
1983			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
1984		    if test "${TEA_PLATFORM}" = "windows" \
1985			    -a -f "$i/win/tclConfig.sh" ; then
1986			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
1987			break
1988		    fi
1989		    if test -f "$i/unix/tclConfig.sh" ; then
1990			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
1991			break
1992		    fi
1993		done
1994	    fi
1995
1996	    # on Darwin, check in Framework installation locations
1997	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
1998		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
1999			`ls -d /Library/Frameworks 2>/dev/null` \
2000			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2001			`ls -d /System/Library/Frameworks 2>/dev/null` \
2002			; do
2003		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
2004			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
2005			break
2006		    fi
2007		done
2008	    fi
2009
2010	    # TEA specific: on Windows, check in common installation locations
2011	    if test "${TEA_PLATFORM}" = "windows" \
2012		-a x"${ac_cv_c_tclconfig}" = x ; then
2013		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2014			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2015			; do
2016		    if test -f "$i/tclConfig.sh" ; then
2017			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2018			break
2019		    fi
2020		done
2021	    fi
2022
2023	    # check in a few common install locations
2024	    if test x"${ac_cv_c_tclconfig}" = x ; then
2025		for i in `ls -d ${libdir} 2>/dev/null` \
2026			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2027			`ls -d ${prefix}/lib 2>/dev/null` \
2028			`ls -d /usr/local/lib 2>/dev/null` \
2029			`ls -d /usr/contrib/lib 2>/dev/null` \
2030			`ls -d /usr/lib 2>/dev/null` \
2031			`ls -d /usr/lib64 2>/dev/null` \
2032			; do
2033		    if test -f "$i/tclConfig.sh" ; then
2034			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2035			break
2036		    fi
2037		done
2038	    fi
2039
2040	    # check in a few other private locations
2041	    if test x"${ac_cv_c_tclconfig}" = x ; then
2042		for i in \
2043			${srcdir}/../tcl \
2044			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2045			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2046			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2047		    if test "${TEA_PLATFORM}" = "windows" \
2048			    -a -f "$i/win/tclConfig.sh" ; then
2049			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2050			break
2051		    fi
2052		    if test -f "$i/unix/tclConfig.sh" ; then
2053			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2054			break
2055		    fi
2056		done
2057	    fi
2058
2059fi
2060
2061
2062	if test x"${ac_cv_c_tclconfig}" = x ; then
2063	    TCL_BIN_DIR="# no Tcl configs found"
2064	    { { echo "$as_me:$LINENO: error: Can't find Tcl configuration definitions" >&5
2065echo "$as_me: error: Can't find Tcl configuration definitions" >&2;}
2066   { (exit 1); exit 1; }; }
2067	else
2068	    no_tcl=
2069	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
2070	    { echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2071echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2072	fi
2073    fi
2074
2075
2076    { echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
2077echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6; }
2078
2079    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
2080        { echo "$as_me:$LINENO: result: loading" >&5
2081echo "${ECHO_T}loading" >&6; }
2082	. "${TCL_BIN_DIR}/tclConfig.sh"
2083    else
2084        { echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
2085echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2086    fi
2087
2088    # eval is required to do the TCL_DBGX substitution
2089    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
2090    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
2091
2092    # If the TCL_BIN_DIR is the build directory (not the install directory),
2093    # then set the common variable name to the value of the build variables.
2094    # For example, the variable TCL_LIB_SPEC will be set to the value
2095    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
2096    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
2097    # installed and uninstalled version of Tcl.
2098    if test -f "${TCL_BIN_DIR}/Makefile" ; then
2099        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
2100        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
2101        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
2102    elif test "`uname -s`" = "Darwin"; then
2103	# If Tcl was built as a framework, attempt to use the libraries
2104	# from the framework at the given location so that linking works
2105	# against Tcl.framework installed in an arbitrary location.
2106	case ${TCL_DEFS} in
2107	    *TCL_FRAMEWORK*)
2108		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
2109		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
2110			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
2111			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
2112			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
2113			    break
2114			fi
2115		    done
2116		fi
2117		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
2118		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
2119		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
2120		fi
2121		;;
2122	esac
2123    fi
2124
2125    # eval is required to do the TCL_DBGX substitution
2126    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
2127    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
2128    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
2129    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144    case "`uname -s`" in
2145	*CYGWIN_*)
2146	    { echo "$as_me:$LINENO: checking for cygwin variant" >&5
2147echo $ECHO_N "checking for cygwin variant... $ECHO_C" >&6; }
2148	    case ${TCL_EXTRA_CFLAGS} in
2149		*-mwin32*|*-mno-cygwin*)
2150		    TEA_PLATFORM="windows"
2151		    CFLAGS="$CFLAGS -mwin32"
2152		    { echo "$as_me:$LINENO: result: win32" >&5
2153echo "${ECHO_T}win32" >&6; }
2154		    ;;
2155		*)
2156		    TEA_PLATFORM="unix"
2157		    { echo "$as_me:$LINENO: result: unix" >&5
2158echo "${ECHO_T}unix" >&6; }
2159		    ;;
2160	    esac
2161	    EXEEXT=".exe"
2162	    ;;
2163	*)
2164	    ;;
2165    esac
2166
2167    # Do this here as we have fully defined TEA_PLATFORM now
2168    if test "${TEA_PLATFORM}" = "windows" ; then
2169	# The BUILD_$pkg is to define the correct extern storage class
2170	# handling when making this package
2171
2172cat >>confdefs.h <<_ACEOF
2173#define BUILD_${PACKAGE_NAME}
2174_ACEOF
2175
2176	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
2177    fi
2178
2179    # TEA specific:
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189    #
2190    # Ok, lets find the tk configuration
2191    # First, look for one uninstalled.
2192    # the alternative search directory is invoked by --with-tk
2193    #
2194
2195    if test x"${no_tk}" = x ; then
2196	# we reset no_tk in case something fails here
2197	no_tk=true
2198
2199# Check whether --with-tk was given.
2200if test "${with_tk+set}" = set; then
2201  withval=$with_tk; with_tkconfig="${withval}"
2202fi
2203
2204	{ echo "$as_me:$LINENO: checking for Tk configuration" >&5
2205echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6; }
2206	if test "${ac_cv_c_tkconfig+set}" = set; then
2207  echo $ECHO_N "(cached) $ECHO_C" >&6
2208else
2209
2210
2211	    # First check to see if --with-tkconfig was specified.
2212	    if test x"${with_tkconfig}" != x ; then
2213		case "${with_tkconfig}" in
2214		    */tkConfig.sh )
2215			if test -f "${with_tkconfig}"; then
2216			    { echo "$as_me:$LINENO: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&5
2217echo "$as_me: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&2;}
2218			    with_tkconfig="`echo "${with_tkconfig}" | sed 's!/tkConfig\.sh$!!'`"
2219			fi ;;
2220		esac
2221		if test -f "${with_tkconfig}/tkConfig.sh" ; then
2222		    ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`"
2223		else
2224		    { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
2225echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
2226   { (exit 1); exit 1; }; }
2227		fi
2228	    fi
2229
2230	    # then check for a private Tk library
2231	    if test x"${ac_cv_c_tkconfig}" = x ; then
2232		for i in \
2233			../tk \
2234			`ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2235			`ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
2236			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
2237			../../tk \
2238			`ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2239			`ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
2240			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
2241			../../../tk \
2242			`ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2243			`ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
2244			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
2245		    if test "${TEA_PLATFORM}" = "windows" \
2246			    -a -f "$i/win/tkConfig.sh" ; then
2247			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
2248			break
2249		    fi
2250		    if test -f "$i/unix/tkConfig.sh" ; then
2251			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
2252			break
2253		    fi
2254		done
2255	    fi
2256
2257	    # on Darwin, check in Framework installation locations
2258	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
2259		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2260			`ls -d /Library/Frameworks 2>/dev/null` \
2261			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2262			`ls -d /System/Library/Frameworks 2>/dev/null` \
2263			; do
2264		    if test -f "$i/Tk.framework/tkConfig.sh" ; then
2265			ac_cv_c_tkconfig="`(cd $i/Tk.framework; pwd)`"
2266			break
2267		    fi
2268		done
2269	    fi
2270
2271	    # check in a few common install locations
2272	    if test x"${ac_cv_c_tkconfig}" = x ; then
2273		for i in `ls -d ${libdir} 2>/dev/null` \
2274			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2275			`ls -d ${prefix}/lib 2>/dev/null` \
2276			`ls -d /usr/local/lib 2>/dev/null` \
2277			`ls -d /usr/contrib/lib 2>/dev/null` \
2278			`ls -d /usr/lib 2>/dev/null` \
2279			`ls -d /usr/lib64 2>/dev/null` \
2280			; do
2281		    if test -f "$i/tkConfig.sh" ; then
2282			ac_cv_c_tkconfig="`(cd $i; pwd)`"
2283			break
2284		    fi
2285		done
2286	    fi
2287
2288	    # TEA specific: on Windows, check in common installation locations
2289	    if test "${TEA_PLATFORM}" = "windows" \
2290		-a x"${ac_cv_c_tkconfig}" = x ; then
2291		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2292			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2293			; do
2294		    if test -f "$i/tkConfig.sh" ; then
2295			ac_cv_c_tkconfig="`(cd $i; pwd)`"
2296			break
2297		    fi
2298		done
2299	    fi
2300
2301	    # check in a few other private locations
2302	    if test x"${ac_cv_c_tkconfig}" = x ; then
2303		for i in \
2304			${srcdir}/../tk \
2305			`ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2306			`ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
2307			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
2308		    if test "${TEA_PLATFORM}" = "windows" \
2309			    -a -f "$i/win/tkConfig.sh" ; then
2310			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
2311			break
2312		    fi
2313		    if test -f "$i/unix/tkConfig.sh" ; then
2314			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
2315			break
2316		    fi
2317		done
2318	    fi
2319
2320fi
2321
2322
2323	if test x"${ac_cv_c_tkconfig}" = x ; then
2324	    TK_BIN_DIR="# no Tk configs found"
2325	    { { echo "$as_me:$LINENO: error: Can't find Tk configuration definitions" >&5
2326echo "$as_me: error: Can't find Tk configuration definitions" >&2;}
2327   { (exit 1); exit 1; }; }
2328	else
2329	    no_tk=
2330	    TK_BIN_DIR="${ac_cv_c_tkconfig}"
2331	    { echo "$as_me:$LINENO: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
2332echo "${ECHO_T}found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
2333	fi
2334    fi
2335
2336
2337    { echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
2338echo $ECHO_N "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... $ECHO_C" >&6; }
2339
2340    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
2341        { echo "$as_me:$LINENO: result: loading" >&5
2342echo "${ECHO_T}loading" >&6; }
2343	. "${TK_BIN_DIR}/tkConfig.sh"
2344    else
2345        { echo "$as_me:$LINENO: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
2346echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
2347    fi
2348
2349    # eval is required to do the TK_DBGX substitution
2350    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
2351    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
2352
2353    # If the TK_BIN_DIR is the build directory (not the install directory),
2354    # then set the common variable name to the value of the build variables.
2355    # For example, the variable TK_LIB_SPEC will be set to the value
2356    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
2357    # instead of TK_BUILD_LIB_SPEC since it will work with both an
2358    # installed and uninstalled version of Tcl.
2359    if test -f "${TK_BIN_DIR}/Makefile" ; then
2360        TK_LIB_SPEC="${TK_BUILD_LIB_SPEC}"
2361        TK_STUB_LIB_SPEC="${TK_BUILD_STUB_LIB_SPEC}"
2362        TK_STUB_LIB_PATH="${TK_BUILD_STUB_LIB_PATH}"
2363    elif test "`uname -s`" = "Darwin"; then
2364	# If Tk was built as a framework, attempt to use the libraries
2365	# from the framework at the given location so that linking works
2366	# against Tk.framework installed in an arbitrary location.
2367	case ${TK_DEFS} in
2368	    *TK_FRAMEWORK*)
2369		if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
2370		    for i in "`cd "${TK_BIN_DIR}"; pwd`" \
2371			     "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
2372			if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
2373			    TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
2374			    break
2375			fi
2376		    done
2377		fi
2378		if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
2379		    TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
2380		    TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
2381		fi
2382		;;
2383	esac
2384    fi
2385
2386    # eval is required to do the TK_DBGX substitution
2387    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
2388    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
2389    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
2390    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
2391
2392    # TEA specific: Ensure windowingsystem is defined
2393    if test "${TEA_PLATFORM}" = "unix" ; then
2394	case ${TK_DEFS} in
2395	    *MAC_OSX_TK*)
2396
2397cat >>confdefs.h <<\_ACEOF
2398#define MAC_OSX_TK 1
2399_ACEOF
2400
2401		TEA_WINDOWINGSYSTEM="aqua"
2402		;;
2403	    *)
2404		TEA_WINDOWINGSYSTEM="x11"
2405		;;
2406	esac
2407    elif test "${TEA_PLATFORM}" = "windows" ; then
2408	TEA_WINDOWINGSYSTEM="win32"
2409    fi
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423    # TEA specific:
2424
2425
2426
2427
2428#-----------------------------------------------------------------------
2429# Handle the --prefix=... option by defaulting to what Tcl gave.
2430# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
2431#-----------------------------------------------------------------------
2432
2433
2434    if test "${prefix}" = "NONE"; then
2435	prefix_default=yes
2436	if test x"${TCL_PREFIX}" != x; then
2437	    { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
2438echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
2439	    prefix=${TCL_PREFIX}
2440	else
2441	    { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
2442echo "$as_me: --prefix defaulting to /usr/local" >&6;}
2443	    prefix=/usr/local
2444	fi
2445    fi
2446    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
2447	-o x"${exec_prefix_default}" = x"yes" ; then
2448	if test x"${TCL_EXEC_PREFIX}" != x; then
2449	    { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
2450echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
2451	    exec_prefix=${TCL_EXEC_PREFIX}
2452	else
2453	    { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
2454echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
2455	    exec_prefix=$prefix
2456	fi
2457    fi
2458
2459
2460#-----------------------------------------------------------------------
2461# Standard compiler checks.
2462# This sets up CC by using the CC env var, or looks for gcc otherwise.
2463# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
2464# the basic setup necessary to compile executables.
2465#-----------------------------------------------------------------------
2466
2467
2468    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
2469    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
2470
2471    # If the user did not set CFLAGS, set it now to keep
2472    # the AC_PROG_CC macro from adding "-g -O2".
2473    if test "${CFLAGS+set}" != "set" ; then
2474	CFLAGS=""
2475    fi
2476
2477    ac_ext=c
2478ac_cpp='$CPP $CPPFLAGS'
2479ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2480ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2481ac_compiler_gnu=$ac_cv_c_compiler_gnu
2482if test -n "$ac_tool_prefix"; then
2483  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2484set dummy ${ac_tool_prefix}gcc; ac_word=$2
2485{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2486echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2487if test "${ac_cv_prog_CC+set}" = set; then
2488  echo $ECHO_N "(cached) $ECHO_C" >&6
2489else
2490  if test -n "$CC"; then
2491  ac_cv_prog_CC="$CC" # Let the user override the test.
2492else
2493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2494for as_dir in $PATH
2495do
2496  IFS=$as_save_IFS
2497  test -z "$as_dir" && as_dir=.
2498  for ac_exec_ext in '' $ac_executable_extensions; do
2499  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2500    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2501    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2502    break 2
2503  fi
2504done
2505done
2506IFS=$as_save_IFS
2507
2508fi
2509fi
2510CC=$ac_cv_prog_CC
2511if test -n "$CC"; then
2512  { echo "$as_me:$LINENO: result: $CC" >&5
2513echo "${ECHO_T}$CC" >&6; }
2514else
2515  { echo "$as_me:$LINENO: result: no" >&5
2516echo "${ECHO_T}no" >&6; }
2517fi
2518
2519
2520fi
2521if test -z "$ac_cv_prog_CC"; then
2522  ac_ct_CC=$CC
2523  # Extract the first word of "gcc", so it can be a program name with args.
2524set dummy gcc; ac_word=$2
2525{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2526echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2527if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2528  echo $ECHO_N "(cached) $ECHO_C" >&6
2529else
2530  if test -n "$ac_ct_CC"; then
2531  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2532else
2533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2534for as_dir in $PATH
2535do
2536  IFS=$as_save_IFS
2537  test -z "$as_dir" && as_dir=.
2538  for ac_exec_ext in '' $ac_executable_extensions; do
2539  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2540    ac_cv_prog_ac_ct_CC="gcc"
2541    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2542    break 2
2543  fi
2544done
2545done
2546IFS=$as_save_IFS
2547
2548fi
2549fi
2550ac_ct_CC=$ac_cv_prog_ac_ct_CC
2551if test -n "$ac_ct_CC"; then
2552  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2553echo "${ECHO_T}$ac_ct_CC" >&6; }
2554else
2555  { echo "$as_me:$LINENO: result: no" >&5
2556echo "${ECHO_T}no" >&6; }
2557fi
2558
2559  if test "x$ac_ct_CC" = x; then
2560    CC=""
2561  else
2562    case $cross_compiling:$ac_tool_warned in
2563yes:)
2564{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2565whose name does not start with the host triplet.  If you think this
2566configuration is useful to you, please write to autoconf@gnu.org." >&5
2567echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2568whose name does not start with the host triplet.  If you think this
2569configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2570ac_tool_warned=yes ;;
2571esac
2572    CC=$ac_ct_CC
2573  fi
2574else
2575  CC="$ac_cv_prog_CC"
2576fi
2577
2578if test -z "$CC"; then
2579          if test -n "$ac_tool_prefix"; then
2580    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2581set dummy ${ac_tool_prefix}cc; ac_word=$2
2582{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2583echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2584if test "${ac_cv_prog_CC+set}" = set; then
2585  echo $ECHO_N "(cached) $ECHO_C" >&6
2586else
2587  if test -n "$CC"; then
2588  ac_cv_prog_CC="$CC" # Let the user override the test.
2589else
2590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2591for as_dir in $PATH
2592do
2593  IFS=$as_save_IFS
2594  test -z "$as_dir" && as_dir=.
2595  for ac_exec_ext in '' $ac_executable_extensions; do
2596  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2597    ac_cv_prog_CC="${ac_tool_prefix}cc"
2598    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2599    break 2
2600  fi
2601done
2602done
2603IFS=$as_save_IFS
2604
2605fi
2606fi
2607CC=$ac_cv_prog_CC
2608if test -n "$CC"; then
2609  { echo "$as_me:$LINENO: result: $CC" >&5
2610echo "${ECHO_T}$CC" >&6; }
2611else
2612  { echo "$as_me:$LINENO: result: no" >&5
2613echo "${ECHO_T}no" >&6; }
2614fi
2615
2616
2617  fi
2618fi
2619if test -z "$CC"; then
2620  # Extract the first word of "cc", so it can be a program name with args.
2621set dummy cc; ac_word=$2
2622{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2623echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2624if test "${ac_cv_prog_CC+set}" = set; then
2625  echo $ECHO_N "(cached) $ECHO_C" >&6
2626else
2627  if test -n "$CC"; then
2628  ac_cv_prog_CC="$CC" # Let the user override the test.
2629else
2630  ac_prog_rejected=no
2631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2632for as_dir in $PATH
2633do
2634  IFS=$as_save_IFS
2635  test -z "$as_dir" && as_dir=.
2636  for ac_exec_ext in '' $ac_executable_extensions; do
2637  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2638    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2639       ac_prog_rejected=yes
2640       continue
2641     fi
2642    ac_cv_prog_CC="cc"
2643    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2644    break 2
2645  fi
2646done
2647done
2648IFS=$as_save_IFS
2649
2650if test $ac_prog_rejected = yes; then
2651  # We found a bogon in the path, so make sure we never use it.
2652  set dummy $ac_cv_prog_CC
2653  shift
2654  if test $# != 0; then
2655    # We chose a different compiler from the bogus one.
2656    # However, it has the same basename, so the bogon will be chosen
2657    # first if we set CC to just the basename; use the full file name.
2658    shift
2659    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2660  fi
2661fi
2662fi
2663fi
2664CC=$ac_cv_prog_CC
2665if test -n "$CC"; then
2666  { echo "$as_me:$LINENO: result: $CC" >&5
2667echo "${ECHO_T}$CC" >&6; }
2668else
2669  { echo "$as_me:$LINENO: result: no" >&5
2670echo "${ECHO_T}no" >&6; }
2671fi
2672
2673
2674fi
2675if test -z "$CC"; then
2676  if test -n "$ac_tool_prefix"; then
2677  for ac_prog in cl.exe
2678  do
2679    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2680set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2681{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2682echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2683if test "${ac_cv_prog_CC+set}" = set; then
2684  echo $ECHO_N "(cached) $ECHO_C" >&6
2685else
2686  if test -n "$CC"; then
2687  ac_cv_prog_CC="$CC" # Let the user override the test.
2688else
2689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2690for as_dir in $PATH
2691do
2692  IFS=$as_save_IFS
2693  test -z "$as_dir" && as_dir=.
2694  for ac_exec_ext in '' $ac_executable_extensions; do
2695  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2696    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2697    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2698    break 2
2699  fi
2700done
2701done
2702IFS=$as_save_IFS
2703
2704fi
2705fi
2706CC=$ac_cv_prog_CC
2707if test -n "$CC"; then
2708  { echo "$as_me:$LINENO: result: $CC" >&5
2709echo "${ECHO_T}$CC" >&6; }
2710else
2711  { echo "$as_me:$LINENO: result: no" >&5
2712echo "${ECHO_T}no" >&6; }
2713fi
2714
2715
2716    test -n "$CC" && break
2717  done
2718fi
2719if test -z "$CC"; then
2720  ac_ct_CC=$CC
2721  for ac_prog in cl.exe
2722do
2723  # Extract the first word of "$ac_prog", so it can be a program name with args.
2724set dummy $ac_prog; ac_word=$2
2725{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2726echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2727if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2728  echo $ECHO_N "(cached) $ECHO_C" >&6
2729else
2730  if test -n "$ac_ct_CC"; then
2731  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2732else
2733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2734for as_dir in $PATH
2735do
2736  IFS=$as_save_IFS
2737  test -z "$as_dir" && as_dir=.
2738  for ac_exec_ext in '' $ac_executable_extensions; do
2739  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2740    ac_cv_prog_ac_ct_CC="$ac_prog"
2741    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2742    break 2
2743  fi
2744done
2745done
2746IFS=$as_save_IFS
2747
2748fi
2749fi
2750ac_ct_CC=$ac_cv_prog_ac_ct_CC
2751if test -n "$ac_ct_CC"; then
2752  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2753echo "${ECHO_T}$ac_ct_CC" >&6; }
2754else
2755  { echo "$as_me:$LINENO: result: no" >&5
2756echo "${ECHO_T}no" >&6; }
2757fi
2758
2759
2760  test -n "$ac_ct_CC" && break
2761done
2762
2763  if test "x$ac_ct_CC" = x; then
2764    CC=""
2765  else
2766    case $cross_compiling:$ac_tool_warned in
2767yes:)
2768{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2769whose name does not start with the host triplet.  If you think this
2770configuration is useful to you, please write to autoconf@gnu.org." >&5
2771echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2772whose name does not start with the host triplet.  If you think this
2773configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2774ac_tool_warned=yes ;;
2775esac
2776    CC=$ac_ct_CC
2777  fi
2778fi
2779
2780fi
2781
2782
2783test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2784See \`config.log' for more details." >&5
2785echo "$as_me: error: no acceptable C compiler found in \$PATH
2786See \`config.log' for more details." >&2;}
2787   { (exit 1); exit 1; }; }
2788
2789# Provide some information about the compiler.
2790echo "$as_me:$LINENO: checking for C compiler version" >&5
2791ac_compiler=`set X $ac_compile; echo $2`
2792{ (ac_try="$ac_compiler --version >&5"
2793case "(($ac_try" in
2794  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2795  *) ac_try_echo=$ac_try;;
2796esac
2797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2798  (eval "$ac_compiler --version >&5") 2>&5
2799  ac_status=$?
2800  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2801  (exit $ac_status); }
2802{ (ac_try="$ac_compiler -v >&5"
2803case "(($ac_try" in
2804  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2805  *) ac_try_echo=$ac_try;;
2806esac
2807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2808  (eval "$ac_compiler -v >&5") 2>&5
2809  ac_status=$?
2810  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2811  (exit $ac_status); }
2812{ (ac_try="$ac_compiler -V >&5"
2813case "(($ac_try" in
2814  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2815  *) ac_try_echo=$ac_try;;
2816esac
2817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2818  (eval "$ac_compiler -V >&5") 2>&5
2819  ac_status=$?
2820  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2821  (exit $ac_status); }
2822
2823cat >conftest.$ac_ext <<_ACEOF
2824/* confdefs.h.  */
2825_ACEOF
2826cat confdefs.h >>conftest.$ac_ext
2827cat >>conftest.$ac_ext <<_ACEOF
2828/* end confdefs.h.  */
2829
2830int
2831main ()
2832{
2833
2834  ;
2835  return 0;
2836}
2837_ACEOF
2838ac_clean_files_save=$ac_clean_files
2839ac_clean_files="$ac_clean_files a.out a.exe b.out"
2840# Try to create an executable without -o first, disregard a.out.
2841# It will help us diagnose broken compilers, and finding out an intuition
2842# of exeext.
2843{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2844echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2845ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2846#
2847# List of possible output files, starting from the most likely.
2848# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2849# only as a last resort.  b.out is created by i960 compilers.
2850ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2851#
2852# The IRIX 6 linker writes into existing files which may not be
2853# executable, retaining their permissions.  Remove them first so a
2854# subsequent execution test works.
2855ac_rmfiles=
2856for ac_file in $ac_files
2857do
2858  case $ac_file in
2859    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2860    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2861  esac
2862done
2863rm -f $ac_rmfiles
2864
2865if { (ac_try="$ac_link_default"
2866case "(($ac_try" in
2867  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2868  *) ac_try_echo=$ac_try;;
2869esac
2870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2871  (eval "$ac_link_default") 2>&5
2872  ac_status=$?
2873  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2874  (exit $ac_status); }; then
2875  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2876# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2877# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2878# so that the user can short-circuit this test for compilers unknown to
2879# Autoconf.
2880for ac_file in $ac_files ''
2881do
2882  test -f "$ac_file" || continue
2883  case $ac_file in
2884    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2885	;;
2886    [ab].out )
2887	# We found the default executable, but exeext='' is most
2888	# certainly right.
2889	break;;
2890    *.* )
2891        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2892	then :; else
2893	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2894	fi
2895	# We set ac_cv_exeext here because the later test for it is not
2896	# safe: cross compilers may not add the suffix if given an `-o'
2897	# argument, so we may need to know it at that point already.
2898	# Even if this section looks crufty: it has the advantage of
2899	# actually working.
2900	break;;
2901    * )
2902	break;;
2903  esac
2904done
2905test "$ac_cv_exeext" = no && ac_cv_exeext=
2906
2907else
2908  ac_file=''
2909fi
2910
2911{ echo "$as_me:$LINENO: result: $ac_file" >&5
2912echo "${ECHO_T}$ac_file" >&6; }
2913if test -z "$ac_file"; then
2914  echo "$as_me: failed program was:" >&5
2915sed 's/^/| /' conftest.$ac_ext >&5
2916
2917{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2918See \`config.log' for more details." >&5
2919echo "$as_me: error: C compiler cannot create executables
2920See \`config.log' for more details." >&2;}
2921   { (exit 77); exit 77; }; }
2922fi
2923
2924ac_exeext=$ac_cv_exeext
2925
2926# Check that the compiler produces executables we can run.  If not, either
2927# the compiler is broken, or we cross compile.
2928{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2929echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2930# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2931# If not cross compiling, check that we can run a simple program.
2932if test "$cross_compiling" != yes; then
2933  if { ac_try='./$ac_file'
2934  { (case "(($ac_try" in
2935  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2936  *) ac_try_echo=$ac_try;;
2937esac
2938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2939  (eval "$ac_try") 2>&5
2940  ac_status=$?
2941  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2942  (exit $ac_status); }; }; then
2943    cross_compiling=no
2944  else
2945    if test "$cross_compiling" = maybe; then
2946	cross_compiling=yes
2947    else
2948	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2949If you meant to cross compile, use \`--host'.
2950See \`config.log' for more details." >&5
2951echo "$as_me: error: cannot run C compiled programs.
2952If you meant to cross compile, use \`--host'.
2953See \`config.log' for more details." >&2;}
2954   { (exit 1); exit 1; }; }
2955    fi
2956  fi
2957fi
2958{ echo "$as_me:$LINENO: result: yes" >&5
2959echo "${ECHO_T}yes" >&6; }
2960
2961rm -f a.out a.exe conftest$ac_cv_exeext b.out
2962ac_clean_files=$ac_clean_files_save
2963# Check that the compiler produces executables we can run.  If not, either
2964# the compiler is broken, or we cross compile.
2965{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2966echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2967{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2968echo "${ECHO_T}$cross_compiling" >&6; }
2969
2970{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2971echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2972if { (ac_try="$ac_link"
2973case "(($ac_try" in
2974  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2975  *) ac_try_echo=$ac_try;;
2976esac
2977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2978  (eval "$ac_link") 2>&5
2979  ac_status=$?
2980  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2981  (exit $ac_status); }; then
2982  # If both `conftest.exe' and `conftest' are `present' (well, observable)
2983# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2984# work properly (i.e., refer to `conftest.exe'), while it won't with
2985# `rm'.
2986for ac_file in conftest.exe conftest conftest.*; do
2987  test -f "$ac_file" || continue
2988  case $ac_file in
2989    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2990    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2991	  break;;
2992    * ) break;;
2993  esac
2994done
2995else
2996  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2997See \`config.log' for more details." >&5
2998echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2999See \`config.log' for more details." >&2;}
3000   { (exit 1); exit 1; }; }
3001fi
3002
3003rm -f conftest$ac_cv_exeext
3004{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3005echo "${ECHO_T}$ac_cv_exeext" >&6; }
3006
3007rm -f conftest.$ac_ext
3008EXEEXT=$ac_cv_exeext
3009ac_exeext=$EXEEXT
3010{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3011echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
3012if test "${ac_cv_objext+set}" = set; then
3013  echo $ECHO_N "(cached) $ECHO_C" >&6
3014else
3015  cat >conftest.$ac_ext <<_ACEOF
3016/* confdefs.h.  */
3017_ACEOF
3018cat confdefs.h >>conftest.$ac_ext
3019cat >>conftest.$ac_ext <<_ACEOF
3020/* end confdefs.h.  */
3021
3022int
3023main ()
3024{
3025
3026  ;
3027  return 0;
3028}
3029_ACEOF
3030rm -f conftest.o conftest.obj
3031if { (ac_try="$ac_compile"
3032case "(($ac_try" in
3033  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3034  *) ac_try_echo=$ac_try;;
3035esac
3036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3037  (eval "$ac_compile") 2>&5
3038  ac_status=$?
3039  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3040  (exit $ac_status); }; then
3041  for ac_file in conftest.o conftest.obj conftest.*; do
3042  test -f "$ac_file" || continue;
3043  case $ac_file in
3044    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
3045    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3046       break;;
3047  esac
3048done
3049else
3050  echo "$as_me: failed program was:" >&5
3051sed 's/^/| /' conftest.$ac_ext >&5
3052
3053{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3054See \`config.log' for more details." >&5
3055echo "$as_me: error: cannot compute suffix of object files: cannot compile
3056See \`config.log' for more details." >&2;}
3057   { (exit 1); exit 1; }; }
3058fi
3059
3060rm -f conftest.$ac_cv_objext conftest.$ac_ext
3061fi
3062{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3063echo "${ECHO_T}$ac_cv_objext" >&6; }
3064OBJEXT=$ac_cv_objext
3065ac_objext=$OBJEXT
3066{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3067echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
3068if test "${ac_cv_c_compiler_gnu+set}" = set; then
3069  echo $ECHO_N "(cached) $ECHO_C" >&6
3070else
3071  cat >conftest.$ac_ext <<_ACEOF
3072/* confdefs.h.  */
3073_ACEOF
3074cat confdefs.h >>conftest.$ac_ext
3075cat >>conftest.$ac_ext <<_ACEOF
3076/* end confdefs.h.  */
3077
3078int
3079main ()
3080{
3081#ifndef __GNUC__
3082       choke me
3083#endif
3084
3085  ;
3086  return 0;
3087}
3088_ACEOF
3089rm -f conftest.$ac_objext
3090if { (ac_try="$ac_compile"
3091case "(($ac_try" in
3092  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3093  *) ac_try_echo=$ac_try;;
3094esac
3095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3096  (eval "$ac_compile") 2>conftest.er1
3097  ac_status=$?
3098  grep -v '^ *+' conftest.er1 >conftest.err
3099  rm -f conftest.er1
3100  cat conftest.err >&5
3101  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3102  (exit $ac_status); } && {
3103	 test -z "$ac_c_werror_flag" ||
3104	 test ! -s conftest.err
3105       } && test -s conftest.$ac_objext; then
3106  ac_compiler_gnu=yes
3107else
3108  echo "$as_me: failed program was:" >&5
3109sed 's/^/| /' conftest.$ac_ext >&5
3110
3111	ac_compiler_gnu=no
3112fi
3113
3114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3115ac_cv_c_compiler_gnu=$ac_compiler_gnu
3116
3117fi
3118{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3119echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3120GCC=`test $ac_compiler_gnu = yes && echo yes`
3121ac_test_CFLAGS=${CFLAGS+set}
3122ac_save_CFLAGS=$CFLAGS
3123{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3124echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3125if test "${ac_cv_prog_cc_g+set}" = set; then
3126  echo $ECHO_N "(cached) $ECHO_C" >&6
3127else
3128  ac_save_c_werror_flag=$ac_c_werror_flag
3129   ac_c_werror_flag=yes
3130   ac_cv_prog_cc_g=no
3131   CFLAGS="-g"
3132   cat >conftest.$ac_ext <<_ACEOF
3133/* confdefs.h.  */
3134_ACEOF
3135cat confdefs.h >>conftest.$ac_ext
3136cat >>conftest.$ac_ext <<_ACEOF
3137/* end confdefs.h.  */
3138
3139int
3140main ()
3141{
3142
3143  ;
3144  return 0;
3145}
3146_ACEOF
3147rm -f conftest.$ac_objext
3148if { (ac_try="$ac_compile"
3149case "(($ac_try" in
3150  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3151  *) ac_try_echo=$ac_try;;
3152esac
3153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3154  (eval "$ac_compile") 2>conftest.er1
3155  ac_status=$?
3156  grep -v '^ *+' conftest.er1 >conftest.err
3157  rm -f conftest.er1
3158  cat conftest.err >&5
3159  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3160  (exit $ac_status); } && {
3161	 test -z "$ac_c_werror_flag" ||
3162	 test ! -s conftest.err
3163       } && test -s conftest.$ac_objext; then
3164  ac_cv_prog_cc_g=yes
3165else
3166  echo "$as_me: failed program was:" >&5
3167sed 's/^/| /' conftest.$ac_ext >&5
3168
3169	CFLAGS=""
3170      cat >conftest.$ac_ext <<_ACEOF
3171/* confdefs.h.  */
3172_ACEOF
3173cat confdefs.h >>conftest.$ac_ext
3174cat >>conftest.$ac_ext <<_ACEOF
3175/* end confdefs.h.  */
3176
3177int
3178main ()
3179{
3180
3181  ;
3182  return 0;
3183}
3184_ACEOF
3185rm -f conftest.$ac_objext
3186if { (ac_try="$ac_compile"
3187case "(($ac_try" in
3188  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3189  *) ac_try_echo=$ac_try;;
3190esac
3191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3192  (eval "$ac_compile") 2>conftest.er1
3193  ac_status=$?
3194  grep -v '^ *+' conftest.er1 >conftest.err
3195  rm -f conftest.er1
3196  cat conftest.err >&5
3197  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3198  (exit $ac_status); } && {
3199	 test -z "$ac_c_werror_flag" ||
3200	 test ! -s conftest.err
3201       } && test -s conftest.$ac_objext; then
3202  :
3203else
3204  echo "$as_me: failed program was:" >&5
3205sed 's/^/| /' conftest.$ac_ext >&5
3206
3207	ac_c_werror_flag=$ac_save_c_werror_flag
3208	 CFLAGS="-g"
3209	 cat >conftest.$ac_ext <<_ACEOF
3210/* confdefs.h.  */
3211_ACEOF
3212cat confdefs.h >>conftest.$ac_ext
3213cat >>conftest.$ac_ext <<_ACEOF
3214/* end confdefs.h.  */
3215
3216int
3217main ()
3218{
3219
3220  ;
3221  return 0;
3222}
3223_ACEOF
3224rm -f conftest.$ac_objext
3225if { (ac_try="$ac_compile"
3226case "(($ac_try" in
3227  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3228  *) ac_try_echo=$ac_try;;
3229esac
3230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3231  (eval "$ac_compile") 2>conftest.er1
3232  ac_status=$?
3233  grep -v '^ *+' conftest.er1 >conftest.err
3234  rm -f conftest.er1
3235  cat conftest.err >&5
3236  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3237  (exit $ac_status); } && {
3238	 test -z "$ac_c_werror_flag" ||
3239	 test ! -s conftest.err
3240       } && test -s conftest.$ac_objext; then
3241  ac_cv_prog_cc_g=yes
3242else
3243  echo "$as_me: failed program was:" >&5
3244sed 's/^/| /' conftest.$ac_ext >&5
3245
3246
3247fi
3248
3249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3250fi
3251
3252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3253fi
3254
3255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3256   ac_c_werror_flag=$ac_save_c_werror_flag
3257fi
3258{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3259echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3260if test "$ac_test_CFLAGS" = set; then
3261  CFLAGS=$ac_save_CFLAGS
3262elif test $ac_cv_prog_cc_g = yes; then
3263  if test "$GCC" = yes; then
3264    CFLAGS="-g -O2"
3265  else
3266    CFLAGS="-g"
3267  fi
3268else
3269  if test "$GCC" = yes; then
3270    CFLAGS="-O2"
3271  else
3272    CFLAGS=
3273  fi
3274fi
3275{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3276echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3277if test "${ac_cv_prog_cc_c89+set}" = set; then
3278  echo $ECHO_N "(cached) $ECHO_C" >&6
3279else
3280  ac_cv_prog_cc_c89=no
3281ac_save_CC=$CC
3282cat >conftest.$ac_ext <<_ACEOF
3283/* confdefs.h.  */
3284_ACEOF
3285cat confdefs.h >>conftest.$ac_ext
3286cat >>conftest.$ac_ext <<_ACEOF
3287/* end confdefs.h.  */
3288#include <stdarg.h>
3289#include <stdio.h>
3290#include <sys/types.h>
3291#include <sys/stat.h>
3292/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3293struct buf { int x; };
3294FILE * (*rcsopen) (struct buf *, struct stat *, int);
3295static char *e (p, i)
3296     char **p;
3297     int i;
3298{
3299  return p[i];
3300}
3301static char *f (char * (*g) (char **, int), char **p, ...)
3302{
3303  char *s;
3304  va_list v;
3305  va_start (v,p);
3306  s = g (p, va_arg (v,int));
3307  va_end (v);
3308  return s;
3309}
3310
3311/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3312   function prototypes and stuff, but not '\xHH' hex character constants.
3313   These don't provoke an error unfortunately, instead are silently treated
3314   as 'x'.  The following induces an error, until -std is added to get
3315   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3316   array size at least.  It's necessary to write '\x00'==0 to get something
3317   that's true only with -std.  */
3318int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3319
3320/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3321   inside strings and character constants.  */
3322#define FOO(x) 'x'
3323int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3324
3325int test (int i, double x);
3326struct s1 {int (*f) (int a);};
3327struct s2 {int (*f) (double a);};
3328int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3329int argc;
3330char **argv;
3331int
3332main ()
3333{
3334return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3335  ;
3336  return 0;
3337}
3338_ACEOF
3339for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3340	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3341do
3342  CC="$ac_save_CC $ac_arg"
3343  rm -f conftest.$ac_objext
3344if { (ac_try="$ac_compile"
3345case "(($ac_try" in
3346  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3347  *) ac_try_echo=$ac_try;;
3348esac
3349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3350  (eval "$ac_compile") 2>conftest.er1
3351  ac_status=$?
3352  grep -v '^ *+' conftest.er1 >conftest.err
3353  rm -f conftest.er1
3354  cat conftest.err >&5
3355  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3356  (exit $ac_status); } && {
3357	 test -z "$ac_c_werror_flag" ||
3358	 test ! -s conftest.err
3359       } && test -s conftest.$ac_objext; then
3360  ac_cv_prog_cc_c89=$ac_arg
3361else
3362  echo "$as_me: failed program was:" >&5
3363sed 's/^/| /' conftest.$ac_ext >&5
3364
3365
3366fi
3367
3368rm -f core conftest.err conftest.$ac_objext
3369  test "x$ac_cv_prog_cc_c89" != "xno" && break
3370done
3371rm -f conftest.$ac_ext
3372CC=$ac_save_CC
3373
3374fi
3375# AC_CACHE_VAL
3376case "x$ac_cv_prog_cc_c89" in
3377  x)
3378    { echo "$as_me:$LINENO: result: none needed" >&5
3379echo "${ECHO_T}none needed" >&6; } ;;
3380  xno)
3381    { echo "$as_me:$LINENO: result: unsupported" >&5
3382echo "${ECHO_T}unsupported" >&6; } ;;
3383  *)
3384    CC="$CC $ac_cv_prog_cc_c89"
3385    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3386echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3387esac
3388
3389
3390ac_ext=c
3391ac_cpp='$CPP $CPPFLAGS'
3392ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3393ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3394ac_compiler_gnu=$ac_cv_c_compiler_gnu
3395
3396    ac_ext=c
3397ac_cpp='$CPP $CPPFLAGS'
3398ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3399ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3400ac_compiler_gnu=$ac_cv_c_compiler_gnu
3401{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3402echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3403# On Suns, sometimes $CPP names a directory.
3404if test -n "$CPP" && test -d "$CPP"; then
3405  CPP=
3406fi
3407if test -z "$CPP"; then
3408  if test "${ac_cv_prog_CPP+set}" = set; then
3409  echo $ECHO_N "(cached) $ECHO_C" >&6
3410else
3411      # Double quotes because CPP needs to be expanded
3412    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3413    do
3414      ac_preproc_ok=false
3415for ac_c_preproc_warn_flag in '' yes
3416do
3417  # Use a header file that comes with gcc, so configuring glibc
3418  # with a fresh cross-compiler works.
3419  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3420  # <limits.h> exists even on freestanding compilers.
3421  # On the NeXT, cc -E runs the code through the compiler's parser,
3422  # not just through cpp. "Syntax error" is here to catch this case.
3423  cat >conftest.$ac_ext <<_ACEOF
3424/* confdefs.h.  */
3425_ACEOF
3426cat confdefs.h >>conftest.$ac_ext
3427cat >>conftest.$ac_ext <<_ACEOF
3428/* end confdefs.h.  */
3429#ifdef __STDC__
3430# include <limits.h>
3431#else
3432# include <assert.h>
3433#endif
3434		     Syntax error
3435_ACEOF
3436if { (ac_try="$ac_cpp conftest.$ac_ext"
3437case "(($ac_try" in
3438  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3439  *) ac_try_echo=$ac_try;;
3440esac
3441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3442  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3443  ac_status=$?
3444  grep -v '^ *+' conftest.er1 >conftest.err
3445  rm -f conftest.er1
3446  cat conftest.err >&5
3447  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3448  (exit $ac_status); } >/dev/null && {
3449	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3450	 test ! -s conftest.err
3451       }; then
3452  :
3453else
3454  echo "$as_me: failed program was:" >&5
3455sed 's/^/| /' conftest.$ac_ext >&5
3456
3457  # Broken: fails on valid input.
3458continue
3459fi
3460
3461rm -f conftest.err conftest.$ac_ext
3462
3463  # OK, works on sane cases.  Now check whether nonexistent headers
3464  # can be detected and how.
3465  cat >conftest.$ac_ext <<_ACEOF
3466/* confdefs.h.  */
3467_ACEOF
3468cat confdefs.h >>conftest.$ac_ext
3469cat >>conftest.$ac_ext <<_ACEOF
3470/* end confdefs.h.  */
3471#include <ac_nonexistent.h>
3472_ACEOF
3473if { (ac_try="$ac_cpp conftest.$ac_ext"
3474case "(($ac_try" in
3475  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3476  *) ac_try_echo=$ac_try;;
3477esac
3478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3479  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3480  ac_status=$?
3481  grep -v '^ *+' conftest.er1 >conftest.err
3482  rm -f conftest.er1
3483  cat conftest.err >&5
3484  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3485  (exit $ac_status); } >/dev/null && {
3486	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3487	 test ! -s conftest.err
3488       }; then
3489  # Broken: success on invalid input.
3490continue
3491else
3492  echo "$as_me: failed program was:" >&5
3493sed 's/^/| /' conftest.$ac_ext >&5
3494
3495  # Passes both tests.
3496ac_preproc_ok=:
3497break
3498fi
3499
3500rm -f conftest.err conftest.$ac_ext
3501
3502done
3503# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3504rm -f conftest.err conftest.$ac_ext
3505if $ac_preproc_ok; then
3506  break
3507fi
3508
3509    done
3510    ac_cv_prog_CPP=$CPP
3511
3512fi
3513  CPP=$ac_cv_prog_CPP
3514else
3515  ac_cv_prog_CPP=$CPP
3516fi
3517{ echo "$as_me:$LINENO: result: $CPP" >&5
3518echo "${ECHO_T}$CPP" >&6; }
3519ac_preproc_ok=false
3520for ac_c_preproc_warn_flag in '' yes
3521do
3522  # Use a header file that comes with gcc, so configuring glibc
3523  # with a fresh cross-compiler works.
3524  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3525  # <limits.h> exists even on freestanding compilers.
3526  # On the NeXT, cc -E runs the code through the compiler's parser,
3527  # not just through cpp. "Syntax error" is here to catch this case.
3528  cat >conftest.$ac_ext <<_ACEOF
3529/* confdefs.h.  */
3530_ACEOF
3531cat confdefs.h >>conftest.$ac_ext
3532cat >>conftest.$ac_ext <<_ACEOF
3533/* end confdefs.h.  */
3534#ifdef __STDC__
3535# include <limits.h>
3536#else
3537# include <assert.h>
3538#endif
3539		     Syntax error
3540_ACEOF
3541if { (ac_try="$ac_cpp conftest.$ac_ext"
3542case "(($ac_try" in
3543  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3544  *) ac_try_echo=$ac_try;;
3545esac
3546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3547  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3548  ac_status=$?
3549  grep -v '^ *+' conftest.er1 >conftest.err
3550  rm -f conftest.er1
3551  cat conftest.err >&5
3552  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3553  (exit $ac_status); } >/dev/null && {
3554	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3555	 test ! -s conftest.err
3556       }; then
3557  :
3558else
3559  echo "$as_me: failed program was:" >&5
3560sed 's/^/| /' conftest.$ac_ext >&5
3561
3562  # Broken: fails on valid input.
3563continue
3564fi
3565
3566rm -f conftest.err conftest.$ac_ext
3567
3568  # OK, works on sane cases.  Now check whether nonexistent headers
3569  # can be detected and how.
3570  cat >conftest.$ac_ext <<_ACEOF
3571/* confdefs.h.  */
3572_ACEOF
3573cat confdefs.h >>conftest.$ac_ext
3574cat >>conftest.$ac_ext <<_ACEOF
3575/* end confdefs.h.  */
3576#include <ac_nonexistent.h>
3577_ACEOF
3578if { (ac_try="$ac_cpp conftest.$ac_ext"
3579case "(($ac_try" in
3580  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3581  *) ac_try_echo=$ac_try;;
3582esac
3583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3584  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3585  ac_status=$?
3586  grep -v '^ *+' conftest.er1 >conftest.err
3587  rm -f conftest.er1
3588  cat conftest.err >&5
3589  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3590  (exit $ac_status); } >/dev/null && {
3591	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3592	 test ! -s conftest.err
3593       }; then
3594  # Broken: success on invalid input.
3595continue
3596else
3597  echo "$as_me: failed program was:" >&5
3598sed 's/^/| /' conftest.$ac_ext >&5
3599
3600  # Passes both tests.
3601ac_preproc_ok=:
3602break
3603fi
3604
3605rm -f conftest.err conftest.$ac_ext
3606
3607done
3608# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3609rm -f conftest.err conftest.$ac_ext
3610if $ac_preproc_ok; then
3611  :
3612else
3613  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3614See \`config.log' for more details." >&5
3615echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3616See \`config.log' for more details." >&2;}
3617   { (exit 1); exit 1; }; }
3618fi
3619
3620ac_ext=c
3621ac_cpp='$CPP $CPPFLAGS'
3622ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3623ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3624ac_compiler_gnu=$ac_cv_c_compiler_gnu
3625
3626
3627    # Find a good install program.  We prefer a C program (faster),
3628# so one script is as good as another.  But avoid the broken or
3629# incompatible versions:
3630# SysV /etc/install, /usr/sbin/install
3631# SunOS /usr/etc/install
3632# IRIX /sbin/install
3633# AIX /bin/install
3634# AmigaOS /C/install, which installs bootblocks on floppy discs
3635# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3636# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3637# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3638# OS/2's system install, which has a completely different semantic
3639# ./install, which can be erroneously created by make from ./install.sh.
3640{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3641echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
3642if test -z "$INSTALL"; then
3643if test "${ac_cv_path_install+set}" = set; then
3644  echo $ECHO_N "(cached) $ECHO_C" >&6
3645else
3646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3647for as_dir in $PATH
3648do
3649  IFS=$as_save_IFS
3650  test -z "$as_dir" && as_dir=.
3651  # Account for people who put trailing slashes in PATH elements.
3652case $as_dir/ in
3653  ./ | .// | /cC/* | \
3654  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3655  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3656  /usr/ucb/* ) ;;
3657  *)
3658    # OSF1 and SCO ODT 3.0 have their own names for install.
3659    # Don't use installbsd from OSF since it installs stuff as root
3660    # by default.
3661    for ac_prog in ginstall scoinst install; do
3662      for ac_exec_ext in '' $ac_executable_extensions; do
3663	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3664	  if test $ac_prog = install &&
3665	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3666	    # AIX install.  It has an incompatible calling convention.
3667	    :
3668	  elif test $ac_prog = install &&
3669	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3670	    # program-specific install script used by HP pwplus--don't use.
3671	    :
3672	  else
3673	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3674	    break 3
3675	  fi
3676	fi
3677      done
3678    done
3679    ;;
3680esac
3681done
3682IFS=$as_save_IFS
3683
3684
3685fi
3686  if test "${ac_cv_path_install+set}" = set; then
3687    INSTALL=$ac_cv_path_install
3688  else
3689    # As a last resort, use the slow shell script.  Don't cache a
3690    # value for INSTALL within a source directory, because that will
3691    # break other packages using the cache if that directory is
3692    # removed, or if the value is a relative name.
3693    INSTALL=$ac_install_sh
3694  fi
3695fi
3696{ echo "$as_me:$LINENO: result: $INSTALL" >&5
3697echo "${ECHO_T}$INSTALL" >&6; }
3698
3699# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3700# It thinks the first close brace ends the variable substitution.
3701test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3702
3703test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3704
3705test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3706
3707
3708    #--------------------------------------------------------------------
3709    # Checks to see if the make program sets the $MAKE variable.
3710    #--------------------------------------------------------------------
3711
3712    { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3713echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
3714set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3715if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
3716  echo $ECHO_N "(cached) $ECHO_C" >&6
3717else
3718  cat >conftest.make <<\_ACEOF
3719SHELL = /bin/sh
3720all:
3721	@echo '@@@%%%=$(MAKE)=@@@%%%'
3722_ACEOF
3723# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3724case `${MAKE-make} -f conftest.make 2>/dev/null` in
3725  *@@@%%%=?*=@@@%%%*)
3726    eval ac_cv_prog_make_${ac_make}_set=yes;;
3727  *)
3728    eval ac_cv_prog_make_${ac_make}_set=no;;
3729esac
3730rm -f conftest.make
3731fi
3732if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3733  { echo "$as_me:$LINENO: result: yes" >&5
3734echo "${ECHO_T}yes" >&6; }
3735  SET_MAKE=
3736else
3737  { echo "$as_me:$LINENO: result: no" >&5
3738echo "${ECHO_T}no" >&6; }
3739  SET_MAKE="MAKE=${MAKE-make}"
3740fi
3741
3742
3743    #--------------------------------------------------------------------
3744    # Find ranlib
3745    #--------------------------------------------------------------------
3746
3747    if test -n "$ac_tool_prefix"; then
3748  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3749set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3750{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3751echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3752if test "${ac_cv_prog_RANLIB+set}" = set; then
3753  echo $ECHO_N "(cached) $ECHO_C" >&6
3754else
3755  if test -n "$RANLIB"; then
3756  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3757else
3758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3759for as_dir in $PATH
3760do
3761  IFS=$as_save_IFS
3762  test -z "$as_dir" && as_dir=.
3763  for ac_exec_ext in '' $ac_executable_extensions; do
3764  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3765    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3766    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3767    break 2
3768  fi
3769done
3770done
3771IFS=$as_save_IFS
3772
3773fi
3774fi
3775RANLIB=$ac_cv_prog_RANLIB
3776if test -n "$RANLIB"; then
3777  { echo "$as_me:$LINENO: result: $RANLIB" >&5
3778echo "${ECHO_T}$RANLIB" >&6; }
3779else
3780  { echo "$as_me:$LINENO: result: no" >&5
3781echo "${ECHO_T}no" >&6; }
3782fi
3783
3784
3785fi
3786if test -z "$ac_cv_prog_RANLIB"; then
3787  ac_ct_RANLIB=$RANLIB
3788  # Extract the first word of "ranlib", so it can be a program name with args.
3789set dummy ranlib; ac_word=$2
3790{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3791echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3792if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3793  echo $ECHO_N "(cached) $ECHO_C" >&6
3794else
3795  if test -n "$ac_ct_RANLIB"; then
3796  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3797else
3798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3799for as_dir in $PATH
3800do
3801  IFS=$as_save_IFS
3802  test -z "$as_dir" && as_dir=.
3803  for ac_exec_ext in '' $ac_executable_extensions; do
3804  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3805    ac_cv_prog_ac_ct_RANLIB="ranlib"
3806    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3807    break 2
3808  fi
3809done
3810done
3811IFS=$as_save_IFS
3812
3813fi
3814fi
3815ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3816if test -n "$ac_ct_RANLIB"; then
3817  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3818echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
3819else
3820  { echo "$as_me:$LINENO: result: no" >&5
3821echo "${ECHO_T}no" >&6; }
3822fi
3823
3824  if test "x$ac_ct_RANLIB" = x; then
3825    RANLIB=":"
3826  else
3827    case $cross_compiling:$ac_tool_warned in
3828yes:)
3829{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3830whose name does not start with the host triplet.  If you think this
3831configuration is useful to you, please write to autoconf@gnu.org." >&5
3832echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3833whose name does not start with the host triplet.  If you think this
3834configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3835ac_tool_warned=yes ;;
3836esac
3837    RANLIB=$ac_ct_RANLIB
3838  fi
3839else
3840  RANLIB="$ac_cv_prog_RANLIB"
3841fi
3842
3843
3844    #--------------------------------------------------------------------
3845    # Determines the correct binary file extension (.o, .obj, .exe etc.)
3846    #--------------------------------------------------------------------
3847
3848
3849
3850
3851
3852
3853{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3854echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3855if test "${ac_cv_path_GREP+set}" = set; then
3856  echo $ECHO_N "(cached) $ECHO_C" >&6
3857else
3858  # Extract the first word of "grep ggrep" to use in msg output
3859if test -z "$GREP"; then
3860set dummy grep ggrep; ac_prog_name=$2
3861if test "${ac_cv_path_GREP+set}" = set; then
3862  echo $ECHO_N "(cached) $ECHO_C" >&6
3863else
3864  ac_path_GREP_found=false
3865# Loop through the user's path and test for each of PROGNAME-LIST
3866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3867for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3868do
3869  IFS=$as_save_IFS
3870  test -z "$as_dir" && as_dir=.
3871  for ac_prog in grep ggrep; do
3872  for ac_exec_ext in '' $ac_executable_extensions; do
3873    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3874    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3875    # Check for GNU ac_path_GREP and select it if it is found.
3876  # Check for GNU $ac_path_GREP
3877case `"$ac_path_GREP" --version 2>&1` in
3878*GNU*)
3879  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3880*)
3881  ac_count=0
3882  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3883  while :
3884  do
3885    cat "conftest.in" "conftest.in" >"conftest.tmp"
3886    mv "conftest.tmp" "conftest.in"
3887    cp "conftest.in" "conftest.nl"
3888    echo 'GREP' >> "conftest.nl"
3889    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3890    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3891    ac_count=`expr $ac_count + 1`
3892    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3893      # Best one so far, save it but keep looking for a better one
3894      ac_cv_path_GREP="$ac_path_GREP"
3895      ac_path_GREP_max=$ac_count
3896    fi
3897    # 10*(2^10) chars as input seems more than enough
3898    test $ac_count -gt 10 && break
3899  done
3900  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3901esac
3902
3903
3904    $ac_path_GREP_found && break 3
3905  done
3906done
3907
3908done
3909IFS=$as_save_IFS
3910
3911
3912fi
3913
3914GREP="$ac_cv_path_GREP"
3915if test -z "$GREP"; then
3916  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3917echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3918   { (exit 1); exit 1; }; }
3919fi
3920
3921else
3922  ac_cv_path_GREP=$GREP
3923fi
3924
3925
3926fi
3927{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3928echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3929 GREP="$ac_cv_path_GREP"
3930
3931
3932{ echo "$as_me:$LINENO: checking for egrep" >&5
3933echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3934if test "${ac_cv_path_EGREP+set}" = set; then
3935  echo $ECHO_N "(cached) $ECHO_C" >&6
3936else
3937  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3938   then ac_cv_path_EGREP="$GREP -E"
3939   else
3940     # Extract the first word of "egrep" to use in msg output
3941if test -z "$EGREP"; then
3942set dummy egrep; ac_prog_name=$2
3943if test "${ac_cv_path_EGREP+set}" = set; then
3944  echo $ECHO_N "(cached) $ECHO_C" >&6
3945else
3946  ac_path_EGREP_found=false
3947# Loop through the user's path and test for each of PROGNAME-LIST
3948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3949for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3950do
3951  IFS=$as_save_IFS
3952  test -z "$as_dir" && as_dir=.
3953  for ac_prog in egrep; do
3954  for ac_exec_ext in '' $ac_executable_extensions; do
3955    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3956    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3957    # Check for GNU ac_path_EGREP and select it if it is found.
3958  # Check for GNU $ac_path_EGREP
3959case `"$ac_path_EGREP" --version 2>&1` in
3960*GNU*)
3961  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3962*)
3963  ac_count=0
3964  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3965  while :
3966  do
3967    cat "conftest.in" "conftest.in" >"conftest.tmp"
3968    mv "conftest.tmp" "conftest.in"
3969    cp "conftest.in" "conftest.nl"
3970    echo 'EGREP' >> "conftest.nl"
3971    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3972    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3973    ac_count=`expr $ac_count + 1`
3974    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3975      # Best one so far, save it but keep looking for a better one
3976      ac_cv_path_EGREP="$ac_path_EGREP"
3977      ac_path_EGREP_max=$ac_count
3978    fi
3979    # 10*(2^10) chars as input seems more than enough
3980    test $ac_count -gt 10 && break
3981  done
3982  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3983esac
3984
3985
3986    $ac_path_EGREP_found && break 3
3987  done
3988done
3989
3990done
3991IFS=$as_save_IFS
3992
3993
3994fi
3995
3996EGREP="$ac_cv_path_EGREP"
3997if test -z "$EGREP"; then
3998  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3999echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4000   { (exit 1); exit 1; }; }
4001fi
4002
4003else
4004  ac_cv_path_EGREP=$EGREP
4005fi
4006
4007
4008   fi
4009fi
4010{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4011echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4012 EGREP="$ac_cv_path_EGREP"
4013
4014
4015{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4016echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4017if test "${ac_cv_header_stdc+set}" = set; then
4018  echo $ECHO_N "(cached) $ECHO_C" >&6
4019else
4020  cat >conftest.$ac_ext <<_ACEOF
4021/* confdefs.h.  */
4022_ACEOF
4023cat confdefs.h >>conftest.$ac_ext
4024cat >>conftest.$ac_ext <<_ACEOF
4025/* end confdefs.h.  */
4026#include <stdlib.h>
4027#include <stdarg.h>
4028#include <string.h>
4029#include <float.h>
4030
4031int
4032main ()
4033{
4034
4035  ;
4036  return 0;
4037}
4038_ACEOF
4039rm -f conftest.$ac_objext
4040if { (ac_try="$ac_compile"
4041case "(($ac_try" in
4042  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4043  *) ac_try_echo=$ac_try;;
4044esac
4045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4046  (eval "$ac_compile") 2>conftest.er1
4047  ac_status=$?
4048  grep -v '^ *+' conftest.er1 >conftest.err
4049  rm -f conftest.er1
4050  cat conftest.err >&5
4051  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4052  (exit $ac_status); } && {
4053	 test -z "$ac_c_werror_flag" ||
4054	 test ! -s conftest.err
4055       } && test -s conftest.$ac_objext; then
4056  ac_cv_header_stdc=yes
4057else
4058  echo "$as_me: failed program was:" >&5
4059sed 's/^/| /' conftest.$ac_ext >&5
4060
4061	ac_cv_header_stdc=no
4062fi
4063
4064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4065
4066if test $ac_cv_header_stdc = yes; then
4067  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4068  cat >conftest.$ac_ext <<_ACEOF
4069/* confdefs.h.  */
4070_ACEOF
4071cat confdefs.h >>conftest.$ac_ext
4072cat >>conftest.$ac_ext <<_ACEOF
4073/* end confdefs.h.  */
4074#include <string.h>
4075
4076_ACEOF
4077if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4078  $EGREP "memchr" >/dev/null 2>&1; then
4079  :
4080else
4081  ac_cv_header_stdc=no
4082fi
4083rm -f -r conftest*
4084
4085fi
4086
4087if test $ac_cv_header_stdc = yes; then
4088  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4089  cat >conftest.$ac_ext <<_ACEOF
4090/* confdefs.h.  */
4091_ACEOF
4092cat confdefs.h >>conftest.$ac_ext
4093cat >>conftest.$ac_ext <<_ACEOF
4094/* end confdefs.h.  */
4095#include <stdlib.h>
4096
4097_ACEOF
4098if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4099  $EGREP "free" >/dev/null 2>&1; then
4100  :
4101else
4102  ac_cv_header_stdc=no
4103fi
4104rm -f -r conftest*
4105
4106fi
4107
4108if test $ac_cv_header_stdc = yes; then
4109  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4110  if test "$cross_compiling" = yes; then
4111  :
4112else
4113  cat >conftest.$ac_ext <<_ACEOF
4114/* confdefs.h.  */
4115_ACEOF
4116cat confdefs.h >>conftest.$ac_ext
4117cat >>conftest.$ac_ext <<_ACEOF
4118/* end confdefs.h.  */
4119#include <ctype.h>
4120#include <stdlib.h>
4121#if ((' ' & 0x0FF) == 0x020)
4122# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4123# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4124#else
4125# define ISLOWER(c) \
4126		   (('a' <= (c) && (c) <= 'i') \
4127		     || ('j' <= (c) && (c) <= 'r') \
4128		     || ('s' <= (c) && (c) <= 'z'))
4129# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4130#endif
4131
4132#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4133int
4134main ()
4135{
4136  int i;
4137  for (i = 0; i < 256; i++)
4138    if (XOR (islower (i), ISLOWER (i))
4139	|| toupper (i) != TOUPPER (i))
4140      return 2;
4141  return 0;
4142}
4143_ACEOF
4144rm -f conftest$ac_exeext
4145if { (ac_try="$ac_link"
4146case "(($ac_try" in
4147  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4148  *) ac_try_echo=$ac_try;;
4149esac
4150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4151  (eval "$ac_link") 2>&5
4152  ac_status=$?
4153  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4154  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4155  { (case "(($ac_try" in
4156  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4157  *) ac_try_echo=$ac_try;;
4158esac
4159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4160  (eval "$ac_try") 2>&5
4161  ac_status=$?
4162  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4163  (exit $ac_status); }; }; then
4164  :
4165else
4166  echo "$as_me: program exited with status $ac_status" >&5
4167echo "$as_me: failed program was:" >&5
4168sed 's/^/| /' conftest.$ac_ext >&5
4169
4170( exit $ac_status )
4171ac_cv_header_stdc=no
4172fi
4173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4174fi
4175
4176
4177fi
4178fi
4179{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4180echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4181if test $ac_cv_header_stdc = yes; then
4182
4183cat >>confdefs.h <<\_ACEOF
4184#define STDC_HEADERS 1
4185_ACEOF
4186
4187fi
4188
4189# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4200		  inttypes.h stdint.h unistd.h
4201do
4202as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4203{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4204echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4205if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4206  echo $ECHO_N "(cached) $ECHO_C" >&6
4207else
4208  cat >conftest.$ac_ext <<_ACEOF
4209/* confdefs.h.  */
4210_ACEOF
4211cat confdefs.h >>conftest.$ac_ext
4212cat >>conftest.$ac_ext <<_ACEOF
4213/* end confdefs.h.  */
4214$ac_includes_default
4215
4216#include <$ac_header>
4217_ACEOF
4218rm -f conftest.$ac_objext
4219if { (ac_try="$ac_compile"
4220case "(($ac_try" in
4221  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4222  *) ac_try_echo=$ac_try;;
4223esac
4224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4225  (eval "$ac_compile") 2>conftest.er1
4226  ac_status=$?
4227  grep -v '^ *+' conftest.er1 >conftest.err
4228  rm -f conftest.er1
4229  cat conftest.err >&5
4230  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4231  (exit $ac_status); } && {
4232	 test -z "$ac_c_werror_flag" ||
4233	 test ! -s conftest.err
4234       } && test -s conftest.$ac_objext; then
4235  eval "$as_ac_Header=yes"
4236else
4237  echo "$as_me: failed program was:" >&5
4238sed 's/^/| /' conftest.$ac_ext >&5
4239
4240	eval "$as_ac_Header=no"
4241fi
4242
4243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4244fi
4245ac_res=`eval echo '${'$as_ac_Header'}'`
4246	       { echo "$as_me:$LINENO: result: $ac_res" >&5
4247echo "${ECHO_T}$ac_res" >&6; }
4248if test `eval echo '${'$as_ac_Header'}'` = yes; then
4249  cat >>confdefs.h <<_ACEOF
4250#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4251_ACEOF
4252
4253fi
4254
4255done
4256
4257
4258
4259    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4260
4261
4262    #------------------------------------------------------------------------
4263    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4264    # It makes compiling go faster.  (This is only a performance feature.)
4265    #------------------------------------------------------------------------
4266
4267    if test -z "$no_pipe" -a -n "$GCC"; then
4268	{ echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
4269echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; }
4270if test "${tcl_cv_cc_pipe+set}" = set; then
4271  echo $ECHO_N "(cached) $ECHO_C" >&6
4272else
4273
4274	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4275	    cat >conftest.$ac_ext <<_ACEOF
4276/* confdefs.h.  */
4277_ACEOF
4278cat confdefs.h >>conftest.$ac_ext
4279cat >>conftest.$ac_ext <<_ACEOF
4280/* end confdefs.h.  */
4281
4282int
4283main ()
4284{
4285
4286  ;
4287  return 0;
4288}
4289_ACEOF
4290rm -f conftest.$ac_objext
4291if { (ac_try="$ac_compile"
4292case "(($ac_try" in
4293  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4294  *) ac_try_echo=$ac_try;;
4295esac
4296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4297  (eval "$ac_compile") 2>conftest.er1
4298  ac_status=$?
4299  grep -v '^ *+' conftest.er1 >conftest.err
4300  rm -f conftest.er1
4301  cat conftest.err >&5
4302  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4303  (exit $ac_status); } && {
4304	 test -z "$ac_c_werror_flag" ||
4305	 test ! -s conftest.err
4306       } && test -s conftest.$ac_objext; then
4307  tcl_cv_cc_pipe=yes
4308else
4309  echo "$as_me: failed program was:" >&5
4310sed 's/^/| /' conftest.$ac_ext >&5
4311
4312	tcl_cv_cc_pipe=no
4313fi
4314
4315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4316	    CFLAGS=$hold_cflags
4317fi
4318{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
4319echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; }
4320	if test $tcl_cv_cc_pipe = yes; then
4321	    CFLAGS="$CFLAGS -pipe"
4322	fi
4323    fi
4324
4325    #--------------------------------------------------------------------
4326    # Common compiler flag setup
4327    #--------------------------------------------------------------------
4328
4329    { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
4330echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
4331if test "${ac_cv_c_bigendian+set}" = set; then
4332  echo $ECHO_N "(cached) $ECHO_C" >&6
4333else
4334  # See if sys/param.h defines the BYTE_ORDER macro.
4335cat >conftest.$ac_ext <<_ACEOF
4336/* confdefs.h.  */
4337_ACEOF
4338cat confdefs.h >>conftest.$ac_ext
4339cat >>conftest.$ac_ext <<_ACEOF
4340/* end confdefs.h.  */
4341#include <sys/types.h>
4342#include <sys/param.h>
4343
4344int
4345main ()
4346{
4347#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
4348	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
4349 bogus endian macros
4350#endif
4351
4352  ;
4353  return 0;
4354}
4355_ACEOF
4356rm -f conftest.$ac_objext
4357if { (ac_try="$ac_compile"
4358case "(($ac_try" in
4359  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4360  *) ac_try_echo=$ac_try;;
4361esac
4362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4363  (eval "$ac_compile") 2>conftest.er1
4364  ac_status=$?
4365  grep -v '^ *+' conftest.er1 >conftest.err
4366  rm -f conftest.er1
4367  cat conftest.err >&5
4368  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4369  (exit $ac_status); } && {
4370	 test -z "$ac_c_werror_flag" ||
4371	 test ! -s conftest.err
4372       } && test -s conftest.$ac_objext; then
4373  # It does; now see whether it defined to BIG_ENDIAN or not.
4374cat >conftest.$ac_ext <<_ACEOF
4375/* confdefs.h.  */
4376_ACEOF
4377cat confdefs.h >>conftest.$ac_ext
4378cat >>conftest.$ac_ext <<_ACEOF
4379/* end confdefs.h.  */
4380#include <sys/types.h>
4381#include <sys/param.h>
4382
4383int
4384main ()
4385{
4386#if BYTE_ORDER != BIG_ENDIAN
4387 not big endian
4388#endif
4389
4390  ;
4391  return 0;
4392}
4393_ACEOF
4394rm -f conftest.$ac_objext
4395if { (ac_try="$ac_compile"
4396case "(($ac_try" in
4397  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4398  *) ac_try_echo=$ac_try;;
4399esac
4400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4401  (eval "$ac_compile") 2>conftest.er1
4402  ac_status=$?
4403  grep -v '^ *+' conftest.er1 >conftest.err
4404  rm -f conftest.er1
4405  cat conftest.err >&5
4406  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4407  (exit $ac_status); } && {
4408	 test -z "$ac_c_werror_flag" ||
4409	 test ! -s conftest.err
4410       } && test -s conftest.$ac_objext; then
4411  ac_cv_c_bigendian=yes
4412else
4413  echo "$as_me: failed program was:" >&5
4414sed 's/^/| /' conftest.$ac_ext >&5
4415
4416	ac_cv_c_bigendian=no
4417fi
4418
4419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4420else
4421  echo "$as_me: failed program was:" >&5
4422sed 's/^/| /' conftest.$ac_ext >&5
4423
4424	# It does not; compile a test program.
4425if test "$cross_compiling" = yes; then
4426  # try to guess the endianness by grepping values into an object file
4427  ac_cv_c_bigendian=unknown
4428  cat >conftest.$ac_ext <<_ACEOF
4429/* confdefs.h.  */
4430_ACEOF
4431cat confdefs.h >>conftest.$ac_ext
4432cat >>conftest.$ac_ext <<_ACEOF
4433/* end confdefs.h.  */
4434short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4435short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4436void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
4437short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4438short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4439void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
4440int
4441main ()
4442{
4443 _ascii (); _ebcdic ();
4444  ;
4445  return 0;
4446}
4447_ACEOF
4448rm -f conftest.$ac_objext
4449if { (ac_try="$ac_compile"
4450case "(($ac_try" in
4451  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4452  *) ac_try_echo=$ac_try;;
4453esac
4454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4455  (eval "$ac_compile") 2>conftest.er1
4456  ac_status=$?
4457  grep -v '^ *+' conftest.er1 >conftest.err
4458  rm -f conftest.er1
4459  cat conftest.err >&5
4460  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4461  (exit $ac_status); } && {
4462	 test -z "$ac_c_werror_flag" ||
4463	 test ! -s conftest.err
4464       } && test -s conftest.$ac_objext; then
4465  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
4466  ac_cv_c_bigendian=yes
4467fi
4468if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4469  if test "$ac_cv_c_bigendian" = unknown; then
4470    ac_cv_c_bigendian=no
4471  else
4472    # finding both strings is unlikely to happen, but who knows?
4473    ac_cv_c_bigendian=unknown
4474  fi
4475fi
4476else
4477  echo "$as_me: failed program was:" >&5
4478sed 's/^/| /' conftest.$ac_ext >&5
4479
4480
4481fi
4482
4483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4484else
4485  cat >conftest.$ac_ext <<_ACEOF
4486/* confdefs.h.  */
4487_ACEOF
4488cat confdefs.h >>conftest.$ac_ext
4489cat >>conftest.$ac_ext <<_ACEOF
4490/* end confdefs.h.  */
4491$ac_includes_default
4492int
4493main ()
4494{
4495
4496  /* Are we little or big endian?  From Harbison&Steele.  */
4497  union
4498  {
4499    long int l;
4500    char c[sizeof (long int)];
4501  } u;
4502  u.l = 1;
4503  return u.c[sizeof (long int) - 1] == 1;
4504
4505  ;
4506  return 0;
4507}
4508_ACEOF
4509rm -f conftest$ac_exeext
4510if { (ac_try="$ac_link"
4511case "(($ac_try" in
4512  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4513  *) ac_try_echo=$ac_try;;
4514esac
4515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4516  (eval "$ac_link") 2>&5
4517  ac_status=$?
4518  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4519  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4520  { (case "(($ac_try" in
4521  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4522  *) ac_try_echo=$ac_try;;
4523esac
4524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4525  (eval "$ac_try") 2>&5
4526  ac_status=$?
4527  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4528  (exit $ac_status); }; }; then
4529  ac_cv_c_bigendian=no
4530else
4531  echo "$as_me: program exited with status $ac_status" >&5
4532echo "$as_me: failed program was:" >&5
4533sed 's/^/| /' conftest.$ac_ext >&5
4534
4535( exit $ac_status )
4536ac_cv_c_bigendian=yes
4537fi
4538rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4539fi
4540
4541
4542fi
4543
4544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4545fi
4546{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
4547echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
4548case $ac_cv_c_bigendian in
4549  yes)
4550
4551cat >>confdefs.h <<\_ACEOF
4552#define WORDS_BIGENDIAN 1
4553_ACEOF
4554 ;;
4555  no)
4556     ;;
4557  *)
4558    { { echo "$as_me:$LINENO: error: unknown endianness
4559presetting ac_cv_c_bigendian=no (or yes) will help" >&5
4560echo "$as_me: error: unknown endianness
4561presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
4562   { (exit 1); exit 1; }; } ;;
4563esac
4564
4565    if test "${TEA_PLATFORM}" = "unix" ; then
4566
4567    #--------------------------------------------------------------------
4568    # On a few very rare systems, all of the libm.a stuff is
4569    # already in libc.a.  Set compiler flags accordingly.
4570    # Also, Linux requires the "ieee" library for math to work
4571    # right (and it must appear before "-lm").
4572    #--------------------------------------------------------------------
4573
4574    { echo "$as_me:$LINENO: checking for sin" >&5
4575echo $ECHO_N "checking for sin... $ECHO_C" >&6; }
4576if test "${ac_cv_func_sin+set}" = set; then
4577  echo $ECHO_N "(cached) $ECHO_C" >&6
4578else
4579  cat >conftest.$ac_ext <<_ACEOF
4580/* confdefs.h.  */
4581_ACEOF
4582cat confdefs.h >>conftest.$ac_ext
4583cat >>conftest.$ac_ext <<_ACEOF
4584/* end confdefs.h.  */
4585/* Define sin to an innocuous variant, in case <limits.h> declares sin.
4586   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4587#define sin innocuous_sin
4588
4589/* System header to define __stub macros and hopefully few prototypes,
4590    which can conflict with char sin (); below.
4591    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4592    <limits.h> exists even on freestanding compilers.  */
4593
4594#ifdef __STDC__
4595# include <limits.h>
4596#else
4597# include <assert.h>
4598#endif
4599
4600#undef sin
4601
4602/* Override any GCC internal prototype to avoid an error.
4603   Use char because int might match the return type of a GCC
4604   builtin and then its argument prototype would still apply.  */
4605#ifdef __cplusplus
4606extern "C"
4607#endif
4608char sin ();
4609/* The GNU C library defines this for functions which it implements
4610    to always fail with ENOSYS.  Some functions are actually named
4611    something starting with __ and the normal name is an alias.  */
4612#if defined __stub_sin || defined __stub___sin
4613choke me
4614#endif
4615
4616int
4617main ()
4618{
4619return sin ();
4620  ;
4621  return 0;
4622}
4623_ACEOF
4624rm -f conftest.$ac_objext conftest$ac_exeext
4625if { (ac_try="$ac_link"
4626case "(($ac_try" in
4627  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4628  *) ac_try_echo=$ac_try;;
4629esac
4630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4631  (eval "$ac_link") 2>conftest.er1
4632  ac_status=$?
4633  grep -v '^ *+' conftest.er1 >conftest.err
4634  rm -f conftest.er1
4635  cat conftest.err >&5
4636  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4637  (exit $ac_status); } && {
4638	 test -z "$ac_c_werror_flag" ||
4639	 test ! -s conftest.err
4640       } && test -s conftest$ac_exeext &&
4641       $as_test_x conftest$ac_exeext; then
4642  ac_cv_func_sin=yes
4643else
4644  echo "$as_me: failed program was:" >&5
4645sed 's/^/| /' conftest.$ac_ext >&5
4646
4647	ac_cv_func_sin=no
4648fi
4649
4650rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4651      conftest$ac_exeext conftest.$ac_ext
4652fi
4653{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
4654echo "${ECHO_T}$ac_cv_func_sin" >&6; }
4655if test $ac_cv_func_sin = yes; then
4656  MATH_LIBS=""
4657else
4658  MATH_LIBS="-lm"
4659fi
4660
4661    { echo "$as_me:$LINENO: checking for main in -lieee" >&5
4662echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; }
4663if test "${ac_cv_lib_ieee_main+set}" = set; then
4664  echo $ECHO_N "(cached) $ECHO_C" >&6
4665else
4666  ac_check_lib_save_LIBS=$LIBS
4667LIBS="-lieee  $LIBS"
4668cat >conftest.$ac_ext <<_ACEOF
4669/* confdefs.h.  */
4670_ACEOF
4671cat confdefs.h >>conftest.$ac_ext
4672cat >>conftest.$ac_ext <<_ACEOF
4673/* end confdefs.h.  */
4674
4675
4676int
4677main ()
4678{
4679return main ();
4680  ;
4681  return 0;
4682}
4683_ACEOF
4684rm -f conftest.$ac_objext conftest$ac_exeext
4685if { (ac_try="$ac_link"
4686case "(($ac_try" in
4687  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4688  *) ac_try_echo=$ac_try;;
4689esac
4690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4691  (eval "$ac_link") 2>conftest.er1
4692  ac_status=$?
4693  grep -v '^ *+' conftest.er1 >conftest.err
4694  rm -f conftest.er1
4695  cat conftest.err >&5
4696  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4697  (exit $ac_status); } && {
4698	 test -z "$ac_c_werror_flag" ||
4699	 test ! -s conftest.err
4700       } && test -s conftest$ac_exeext &&
4701       $as_test_x conftest$ac_exeext; then
4702  ac_cv_lib_ieee_main=yes
4703else
4704  echo "$as_me: failed program was:" >&5
4705sed 's/^/| /' conftest.$ac_ext >&5
4706
4707	ac_cv_lib_ieee_main=no
4708fi
4709
4710rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4711      conftest$ac_exeext conftest.$ac_ext
4712LIBS=$ac_check_lib_save_LIBS
4713fi
4714{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
4715echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; }
4716if test $ac_cv_lib_ieee_main = yes; then
4717  MATH_LIBS="-lieee $MATH_LIBS"
4718fi
4719
4720
4721    #--------------------------------------------------------------------
4722    # Interactive UNIX requires -linet instead of -lsocket, plus it
4723    # needs net/errno.h to define the socket-related error codes.
4724    #--------------------------------------------------------------------
4725
4726    { echo "$as_me:$LINENO: checking for main in -linet" >&5
4727echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; }
4728if test "${ac_cv_lib_inet_main+set}" = set; then
4729  echo $ECHO_N "(cached) $ECHO_C" >&6
4730else
4731  ac_check_lib_save_LIBS=$LIBS
4732LIBS="-linet  $LIBS"
4733cat >conftest.$ac_ext <<_ACEOF
4734/* confdefs.h.  */
4735_ACEOF
4736cat confdefs.h >>conftest.$ac_ext
4737cat >>conftest.$ac_ext <<_ACEOF
4738/* end confdefs.h.  */
4739
4740
4741int
4742main ()
4743{
4744return main ();
4745  ;
4746  return 0;
4747}
4748_ACEOF
4749rm -f conftest.$ac_objext conftest$ac_exeext
4750if { (ac_try="$ac_link"
4751case "(($ac_try" in
4752  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4753  *) ac_try_echo=$ac_try;;
4754esac
4755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4756  (eval "$ac_link") 2>conftest.er1
4757  ac_status=$?
4758  grep -v '^ *+' conftest.er1 >conftest.err
4759  rm -f conftest.er1
4760  cat conftest.err >&5
4761  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4762  (exit $ac_status); } && {
4763	 test -z "$ac_c_werror_flag" ||
4764	 test ! -s conftest.err
4765       } && test -s conftest$ac_exeext &&
4766       $as_test_x conftest$ac_exeext; then
4767  ac_cv_lib_inet_main=yes
4768else
4769  echo "$as_me: failed program was:" >&5
4770sed 's/^/| /' conftest.$ac_ext >&5
4771
4772	ac_cv_lib_inet_main=no
4773fi
4774
4775rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4776      conftest$ac_exeext conftest.$ac_ext
4777LIBS=$ac_check_lib_save_LIBS
4778fi
4779{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
4780echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; }
4781if test $ac_cv_lib_inet_main = yes; then
4782  LIBS="$LIBS -linet"
4783fi
4784
4785    if test "${ac_cv_header_net_errno_h+set}" = set; then
4786  { echo "$as_me:$LINENO: checking for net/errno.h" >&5
4787echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4788if test "${ac_cv_header_net_errno_h+set}" = set; then
4789  echo $ECHO_N "(cached) $ECHO_C" >&6
4790fi
4791{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4792echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4793else
4794  # Is the header compilable?
4795{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5
4796echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; }
4797cat >conftest.$ac_ext <<_ACEOF
4798/* confdefs.h.  */
4799_ACEOF
4800cat confdefs.h >>conftest.$ac_ext
4801cat >>conftest.$ac_ext <<_ACEOF
4802/* end confdefs.h.  */
4803$ac_includes_default
4804#include <net/errno.h>
4805_ACEOF
4806rm -f conftest.$ac_objext
4807if { (ac_try="$ac_compile"
4808case "(($ac_try" in
4809  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4810  *) ac_try_echo=$ac_try;;
4811esac
4812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4813  (eval "$ac_compile") 2>conftest.er1
4814  ac_status=$?
4815  grep -v '^ *+' conftest.er1 >conftest.err
4816  rm -f conftest.er1
4817  cat conftest.err >&5
4818  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4819  (exit $ac_status); } && {
4820	 test -z "$ac_c_werror_flag" ||
4821	 test ! -s conftest.err
4822       } && test -s conftest.$ac_objext; then
4823  ac_header_compiler=yes
4824else
4825  echo "$as_me: failed program was:" >&5
4826sed 's/^/| /' conftest.$ac_ext >&5
4827
4828	ac_header_compiler=no
4829fi
4830
4831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4832{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4833echo "${ECHO_T}$ac_header_compiler" >&6; }
4834
4835# Is the header present?
4836{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5
4837echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; }
4838cat >conftest.$ac_ext <<_ACEOF
4839/* confdefs.h.  */
4840_ACEOF
4841cat confdefs.h >>conftest.$ac_ext
4842cat >>conftest.$ac_ext <<_ACEOF
4843/* end confdefs.h.  */
4844#include <net/errno.h>
4845_ACEOF
4846if { (ac_try="$ac_cpp conftest.$ac_ext"
4847case "(($ac_try" in
4848  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4849  *) ac_try_echo=$ac_try;;
4850esac
4851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4852  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4853  ac_status=$?
4854  grep -v '^ *+' conftest.er1 >conftest.err
4855  rm -f conftest.er1
4856  cat conftest.err >&5
4857  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4858  (exit $ac_status); } >/dev/null && {
4859	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4860	 test ! -s conftest.err
4861       }; then
4862  ac_header_preproc=yes
4863else
4864  echo "$as_me: failed program was:" >&5
4865sed 's/^/| /' conftest.$ac_ext >&5
4866
4867  ac_header_preproc=no
4868fi
4869
4870rm -f conftest.err conftest.$ac_ext
4871{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4872echo "${ECHO_T}$ac_header_preproc" >&6; }
4873
4874# So?  What about this header?
4875case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4876  yes:no: )
4877    { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
4878echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4879    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
4880echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
4881    ac_header_preproc=yes
4882    ;;
4883  no:yes:* )
4884    { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
4885echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
4886    { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
4887echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
4888    { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
4889echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
4890    { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
4891echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4892    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
4893echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
4894    { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
4895echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
4896
4897    ;;
4898esac
4899{ echo "$as_me:$LINENO: checking for net/errno.h" >&5
4900echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4901if test "${ac_cv_header_net_errno_h+set}" = set; then
4902  echo $ECHO_N "(cached) $ECHO_C" >&6
4903else
4904  ac_cv_header_net_errno_h=$ac_header_preproc
4905fi
4906{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4907echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4908
4909fi
4910if test $ac_cv_header_net_errno_h = yes; then
4911
4912
4913cat >>confdefs.h <<\_ACEOF
4914#define HAVE_NET_ERRNO_H 1
4915_ACEOF
4916
4917fi
4918
4919
4920
4921    #--------------------------------------------------------------------
4922    #	Check for the existence of the -lsocket and -lnsl libraries.
4923    #	The order here is important, so that they end up in the right
4924    #	order in the command line generated by make.  Here are some
4925    #	special considerations:
4926    #	1. Use "connect" and "accept" to check for -lsocket, and
4927    #	   "gethostbyname" to check for -lnsl.
4928    #	2. Use each function name only once:  can't redo a check because
4929    #	   autoconf caches the results of the last check and won't redo it.
4930    #	3. Use -lnsl and -lsocket only if they supply procedures that
4931    #	   aren't already present in the normal libraries.  This is because
4932    #	   IRIX 5.2 has libraries, but they aren't needed and they're
4933    #	   bogus:  they goof up name resolution if used.
4934    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4935    #	   To get around this problem, check for both libraries together
4936    #	   if -lsocket doesn't work by itself.
4937    #--------------------------------------------------------------------
4938
4939    tcl_checkBoth=0
4940    { echo "$as_me:$LINENO: checking for connect" >&5
4941echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
4942if test "${ac_cv_func_connect+set}" = set; then
4943  echo $ECHO_N "(cached) $ECHO_C" >&6
4944else
4945  cat >conftest.$ac_ext <<_ACEOF
4946/* confdefs.h.  */
4947_ACEOF
4948cat confdefs.h >>conftest.$ac_ext
4949cat >>conftest.$ac_ext <<_ACEOF
4950/* end confdefs.h.  */
4951/* Define connect to an innocuous variant, in case <limits.h> declares connect.
4952   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4953#define connect innocuous_connect
4954
4955/* System header to define __stub macros and hopefully few prototypes,
4956    which can conflict with char connect (); below.
4957    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4958    <limits.h> exists even on freestanding compilers.  */
4959
4960#ifdef __STDC__
4961# include <limits.h>
4962#else
4963# include <assert.h>
4964#endif
4965
4966#undef connect
4967
4968/* Override any GCC internal prototype to avoid an error.
4969   Use char because int might match the return type of a GCC
4970   builtin and then its argument prototype would still apply.  */
4971#ifdef __cplusplus
4972extern "C"
4973#endif
4974char connect ();
4975/* The GNU C library defines this for functions which it implements
4976    to always fail with ENOSYS.  Some functions are actually named
4977    something starting with __ and the normal name is an alias.  */
4978#if defined __stub_connect || defined __stub___connect
4979choke me
4980#endif
4981
4982int
4983main ()
4984{
4985return connect ();
4986  ;
4987  return 0;
4988}
4989_ACEOF
4990rm -f conftest.$ac_objext conftest$ac_exeext
4991if { (ac_try="$ac_link"
4992case "(($ac_try" in
4993  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4994  *) ac_try_echo=$ac_try;;
4995esac
4996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4997  (eval "$ac_link") 2>conftest.er1
4998  ac_status=$?
4999  grep -v '^ *+' conftest.er1 >conftest.err
5000  rm -f conftest.er1
5001  cat conftest.err >&5
5002  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5003  (exit $ac_status); } && {
5004	 test -z "$ac_c_werror_flag" ||
5005	 test ! -s conftest.err
5006       } && test -s conftest$ac_exeext &&
5007       $as_test_x conftest$ac_exeext; then
5008  ac_cv_func_connect=yes
5009else
5010  echo "$as_me: failed program was:" >&5
5011sed 's/^/| /' conftest.$ac_ext >&5
5012
5013	ac_cv_func_connect=no
5014fi
5015
5016rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5017      conftest$ac_exeext conftest.$ac_ext
5018fi
5019{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5020echo "${ECHO_T}$ac_cv_func_connect" >&6; }
5021if test $ac_cv_func_connect = yes; then
5022  tcl_checkSocket=0
5023else
5024  tcl_checkSocket=1
5025fi
5026
5027    if test "$tcl_checkSocket" = 1; then
5028	{ echo "$as_me:$LINENO: checking for setsockopt" >&5
5029echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; }
5030if test "${ac_cv_func_setsockopt+set}" = set; then
5031  echo $ECHO_N "(cached) $ECHO_C" >&6
5032else
5033  cat >conftest.$ac_ext <<_ACEOF
5034/* confdefs.h.  */
5035_ACEOF
5036cat confdefs.h >>conftest.$ac_ext
5037cat >>conftest.$ac_ext <<_ACEOF
5038/* end confdefs.h.  */
5039/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
5040   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5041#define setsockopt innocuous_setsockopt
5042
5043/* System header to define __stub macros and hopefully few prototypes,
5044    which can conflict with char setsockopt (); below.
5045    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5046    <limits.h> exists even on freestanding compilers.  */
5047
5048#ifdef __STDC__
5049# include <limits.h>
5050#else
5051# include <assert.h>
5052#endif
5053
5054#undef setsockopt
5055
5056/* Override any GCC internal prototype to avoid an error.
5057   Use char because int might match the return type of a GCC
5058   builtin and then its argument prototype would still apply.  */
5059#ifdef __cplusplus
5060extern "C"
5061#endif
5062char setsockopt ();
5063/* The GNU C library defines this for functions which it implements
5064    to always fail with ENOSYS.  Some functions are actually named
5065    something starting with __ and the normal name is an alias.  */
5066#if defined __stub_setsockopt || defined __stub___setsockopt
5067choke me
5068#endif
5069
5070int
5071main ()
5072{
5073return setsockopt ();
5074  ;
5075  return 0;
5076}
5077_ACEOF
5078rm -f conftest.$ac_objext conftest$ac_exeext
5079if { (ac_try="$ac_link"
5080case "(($ac_try" in
5081  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5082  *) ac_try_echo=$ac_try;;
5083esac
5084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5085  (eval "$ac_link") 2>conftest.er1
5086  ac_status=$?
5087  grep -v '^ *+' conftest.er1 >conftest.err
5088  rm -f conftest.er1
5089  cat conftest.err >&5
5090  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5091  (exit $ac_status); } && {
5092	 test -z "$ac_c_werror_flag" ||
5093	 test ! -s conftest.err
5094       } && test -s conftest$ac_exeext &&
5095       $as_test_x conftest$ac_exeext; then
5096  ac_cv_func_setsockopt=yes
5097else
5098  echo "$as_me: failed program was:" >&5
5099sed 's/^/| /' conftest.$ac_ext >&5
5100
5101	ac_cv_func_setsockopt=no
5102fi
5103
5104rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5105      conftest$ac_exeext conftest.$ac_ext
5106fi
5107{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
5108echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
5109if test $ac_cv_func_setsockopt = yes; then
5110  :
5111else
5112  { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
5113echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
5114if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
5115  echo $ECHO_N "(cached) $ECHO_C" >&6
5116else
5117  ac_check_lib_save_LIBS=$LIBS
5118LIBS="-lsocket  $LIBS"
5119cat >conftest.$ac_ext <<_ACEOF
5120/* confdefs.h.  */
5121_ACEOF
5122cat confdefs.h >>conftest.$ac_ext
5123cat >>conftest.$ac_ext <<_ACEOF
5124/* end confdefs.h.  */
5125
5126/* Override any GCC internal prototype to avoid an error.
5127   Use char because int might match the return type of a GCC
5128   builtin and then its argument prototype would still apply.  */
5129#ifdef __cplusplus
5130extern "C"
5131#endif
5132char setsockopt ();
5133int
5134main ()
5135{
5136return setsockopt ();
5137  ;
5138  return 0;
5139}
5140_ACEOF
5141rm -f conftest.$ac_objext conftest$ac_exeext
5142if { (ac_try="$ac_link"
5143case "(($ac_try" in
5144  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5145  *) ac_try_echo=$ac_try;;
5146esac
5147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5148  (eval "$ac_link") 2>conftest.er1
5149  ac_status=$?
5150  grep -v '^ *+' conftest.er1 >conftest.err
5151  rm -f conftest.er1
5152  cat conftest.err >&5
5153  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5154  (exit $ac_status); } && {
5155	 test -z "$ac_c_werror_flag" ||
5156	 test ! -s conftest.err
5157       } && test -s conftest$ac_exeext &&
5158       $as_test_x conftest$ac_exeext; then
5159  ac_cv_lib_socket_setsockopt=yes
5160else
5161  echo "$as_me: failed program was:" >&5
5162sed 's/^/| /' conftest.$ac_ext >&5
5163
5164	ac_cv_lib_socket_setsockopt=no
5165fi
5166
5167rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5168      conftest$ac_exeext conftest.$ac_ext
5169LIBS=$ac_check_lib_save_LIBS
5170fi
5171{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
5172echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; }
5173if test $ac_cv_lib_socket_setsockopt = yes; then
5174  LIBS="$LIBS -lsocket"
5175else
5176  tcl_checkBoth=1
5177fi
5178
5179fi
5180
5181    fi
5182    if test "$tcl_checkBoth" = 1; then
5183	tk_oldLibs=$LIBS
5184	LIBS="$LIBS -lsocket -lnsl"
5185	{ echo "$as_me:$LINENO: checking for accept" >&5
5186echo $ECHO_N "checking for accept... $ECHO_C" >&6; }
5187if test "${ac_cv_func_accept+set}" = set; then
5188  echo $ECHO_N "(cached) $ECHO_C" >&6
5189else
5190  cat >conftest.$ac_ext <<_ACEOF
5191/* confdefs.h.  */
5192_ACEOF
5193cat confdefs.h >>conftest.$ac_ext
5194cat >>conftest.$ac_ext <<_ACEOF
5195/* end confdefs.h.  */
5196/* Define accept to an innocuous variant, in case <limits.h> declares accept.
5197   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5198#define accept innocuous_accept
5199
5200/* System header to define __stub macros and hopefully few prototypes,
5201    which can conflict with char accept (); below.
5202    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5203    <limits.h> exists even on freestanding compilers.  */
5204
5205#ifdef __STDC__
5206# include <limits.h>
5207#else
5208# include <assert.h>
5209#endif
5210
5211#undef accept
5212
5213/* Override any GCC internal prototype to avoid an error.
5214   Use char because int might match the return type of a GCC
5215   builtin and then its argument prototype would still apply.  */
5216#ifdef __cplusplus
5217extern "C"
5218#endif
5219char accept ();
5220/* The GNU C library defines this for functions which it implements
5221    to always fail with ENOSYS.  Some functions are actually named
5222    something starting with __ and the normal name is an alias.  */
5223#if defined __stub_accept || defined __stub___accept
5224choke me
5225#endif
5226
5227int
5228main ()
5229{
5230return accept ();
5231  ;
5232  return 0;
5233}
5234_ACEOF
5235rm -f conftest.$ac_objext conftest$ac_exeext
5236if { (ac_try="$ac_link"
5237case "(($ac_try" in
5238  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5239  *) ac_try_echo=$ac_try;;
5240esac
5241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5242  (eval "$ac_link") 2>conftest.er1
5243  ac_status=$?
5244  grep -v '^ *+' conftest.er1 >conftest.err
5245  rm -f conftest.er1
5246  cat conftest.err >&5
5247  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5248  (exit $ac_status); } && {
5249	 test -z "$ac_c_werror_flag" ||
5250	 test ! -s conftest.err
5251       } && test -s conftest$ac_exeext &&
5252       $as_test_x conftest$ac_exeext; then
5253  ac_cv_func_accept=yes
5254else
5255  echo "$as_me: failed program was:" >&5
5256sed 's/^/| /' conftest.$ac_ext >&5
5257
5258	ac_cv_func_accept=no
5259fi
5260
5261rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5262      conftest$ac_exeext conftest.$ac_ext
5263fi
5264{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
5265echo "${ECHO_T}$ac_cv_func_accept" >&6; }
5266if test $ac_cv_func_accept = yes; then
5267  tcl_checkNsl=0
5268else
5269  LIBS=$tk_oldLibs
5270fi
5271
5272    fi
5273    { echo "$as_me:$LINENO: checking for gethostbyname" >&5
5274echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
5275if test "${ac_cv_func_gethostbyname+set}" = set; then
5276  echo $ECHO_N "(cached) $ECHO_C" >&6
5277else
5278  cat >conftest.$ac_ext <<_ACEOF
5279/* confdefs.h.  */
5280_ACEOF
5281cat confdefs.h >>conftest.$ac_ext
5282cat >>conftest.$ac_ext <<_ACEOF
5283/* end confdefs.h.  */
5284/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5285   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5286#define gethostbyname innocuous_gethostbyname
5287
5288/* System header to define __stub macros and hopefully few prototypes,
5289    which can conflict with char gethostbyname (); below.
5290    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5291    <limits.h> exists even on freestanding compilers.  */
5292
5293#ifdef __STDC__
5294# include <limits.h>
5295#else
5296# include <assert.h>
5297#endif
5298
5299#undef gethostbyname
5300
5301/* Override any GCC internal prototype to avoid an error.
5302   Use char because int might match the return type of a GCC
5303   builtin and then its argument prototype would still apply.  */
5304#ifdef __cplusplus
5305extern "C"
5306#endif
5307char gethostbyname ();
5308/* The GNU C library defines this for functions which it implements
5309    to always fail with ENOSYS.  Some functions are actually named
5310    something starting with __ and the normal name is an alias.  */
5311#if defined __stub_gethostbyname || defined __stub___gethostbyname
5312choke me
5313#endif
5314
5315int
5316main ()
5317{
5318return gethostbyname ();
5319  ;
5320  return 0;
5321}
5322_ACEOF
5323rm -f conftest.$ac_objext conftest$ac_exeext
5324if { (ac_try="$ac_link"
5325case "(($ac_try" in
5326  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5327  *) ac_try_echo=$ac_try;;
5328esac
5329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5330  (eval "$ac_link") 2>conftest.er1
5331  ac_status=$?
5332  grep -v '^ *+' conftest.er1 >conftest.err
5333  rm -f conftest.er1
5334  cat conftest.err >&5
5335  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5336  (exit $ac_status); } && {
5337	 test -z "$ac_c_werror_flag" ||
5338	 test ! -s conftest.err
5339       } && test -s conftest$ac_exeext &&
5340       $as_test_x conftest$ac_exeext; then
5341  ac_cv_func_gethostbyname=yes
5342else
5343  echo "$as_me: failed program was:" >&5
5344sed 's/^/| /' conftest.$ac_ext >&5
5345
5346	ac_cv_func_gethostbyname=no
5347fi
5348
5349rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5350      conftest$ac_exeext conftest.$ac_ext
5351fi
5352{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5353echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
5354if test $ac_cv_func_gethostbyname = yes; then
5355  :
5356else
5357  { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5358echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
5359if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5360  echo $ECHO_N "(cached) $ECHO_C" >&6
5361else
5362  ac_check_lib_save_LIBS=$LIBS
5363LIBS="-lnsl  $LIBS"
5364cat >conftest.$ac_ext <<_ACEOF
5365/* confdefs.h.  */
5366_ACEOF
5367cat confdefs.h >>conftest.$ac_ext
5368cat >>conftest.$ac_ext <<_ACEOF
5369/* end confdefs.h.  */
5370
5371/* Override any GCC internal prototype to avoid an error.
5372   Use char because int might match the return type of a GCC
5373   builtin and then its argument prototype would still apply.  */
5374#ifdef __cplusplus
5375extern "C"
5376#endif
5377char gethostbyname ();
5378int
5379main ()
5380{
5381return gethostbyname ();
5382  ;
5383  return 0;
5384}
5385_ACEOF
5386rm -f conftest.$ac_objext conftest$ac_exeext
5387if { (ac_try="$ac_link"
5388case "(($ac_try" in
5389  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5390  *) ac_try_echo=$ac_try;;
5391esac
5392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5393  (eval "$ac_link") 2>conftest.er1
5394  ac_status=$?
5395  grep -v '^ *+' conftest.er1 >conftest.err
5396  rm -f conftest.er1
5397  cat conftest.err >&5
5398  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5399  (exit $ac_status); } && {
5400	 test -z "$ac_c_werror_flag" ||
5401	 test ! -s conftest.err
5402       } && test -s conftest$ac_exeext &&
5403       $as_test_x conftest$ac_exeext; then
5404  ac_cv_lib_nsl_gethostbyname=yes
5405else
5406  echo "$as_me: failed program was:" >&5
5407sed 's/^/| /' conftest.$ac_ext >&5
5408
5409	ac_cv_lib_nsl_gethostbyname=no
5410fi
5411
5412rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5413      conftest$ac_exeext conftest.$ac_ext
5414LIBS=$ac_check_lib_save_LIBS
5415fi
5416{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5417echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
5418if test $ac_cv_lib_nsl_gethostbyname = yes; then
5419  LIBS="$LIBS -lnsl"
5420fi
5421
5422fi
5423
5424
5425    # TEA specific: Don't perform the eval of the libraries here because
5426    # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
5427
5428    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
5429
5430
5431
5432
5433    { echo "$as_me:$LINENO: checking dirent.h" >&5
5434echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; }
5435if test "${tcl_cv_dirent_h+set}" = set; then
5436  echo $ECHO_N "(cached) $ECHO_C" >&6
5437else
5438
5439    cat >conftest.$ac_ext <<_ACEOF
5440/* confdefs.h.  */
5441_ACEOF
5442cat confdefs.h >>conftest.$ac_ext
5443cat >>conftest.$ac_ext <<_ACEOF
5444/* end confdefs.h.  */
5445#include <sys/types.h>
5446#include <dirent.h>
5447int
5448main ()
5449{
5450
5451#ifndef _POSIX_SOURCE
5452#   ifdef __Lynx__
5453	/*
5454	 * Generate compilation error to make the test fail:  Lynx headers
5455	 * are only valid if really in the POSIX environment.
5456	 */
5457
5458	missing_procedure();
5459#   endif
5460#endif
5461DIR *d;
5462struct dirent *entryPtr;
5463char *p;
5464d = opendir("foobar");
5465entryPtr = readdir(d);
5466p = entryPtr->d_name;
5467closedir(d);
5468
5469  ;
5470  return 0;
5471}
5472_ACEOF
5473rm -f conftest.$ac_objext conftest$ac_exeext
5474if { (ac_try="$ac_link"
5475case "(($ac_try" in
5476  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5477  *) ac_try_echo=$ac_try;;
5478esac
5479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5480  (eval "$ac_link") 2>conftest.er1
5481  ac_status=$?
5482  grep -v '^ *+' conftest.er1 >conftest.err
5483  rm -f conftest.er1
5484  cat conftest.err >&5
5485  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5486  (exit $ac_status); } && {
5487	 test -z "$ac_c_werror_flag" ||
5488	 test ! -s conftest.err
5489       } && test -s conftest$ac_exeext &&
5490       $as_test_x conftest$ac_exeext; then
5491  tcl_cv_dirent_h=yes
5492else
5493  echo "$as_me: failed program was:" >&5
5494sed 's/^/| /' conftest.$ac_ext >&5
5495
5496	tcl_cv_dirent_h=no
5497fi
5498
5499rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5500      conftest$ac_exeext conftest.$ac_ext
5501fi
5502{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
5503echo "${ECHO_T}$tcl_cv_dirent_h" >&6; }
5504
5505    if test $tcl_cv_dirent_h = no; then
5506
5507cat >>confdefs.h <<\_ACEOF
5508#define NO_DIRENT_H 1
5509_ACEOF
5510
5511    fi
5512
5513    # TEA specific:
5514    if test "${ac_cv_header_errno_h+set}" = set; then
5515  { echo "$as_me:$LINENO: checking for errno.h" >&5
5516echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5517if test "${ac_cv_header_errno_h+set}" = set; then
5518  echo $ECHO_N "(cached) $ECHO_C" >&6
5519fi
5520{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5521echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5522else
5523  # Is the header compilable?
5524{ echo "$as_me:$LINENO: checking errno.h usability" >&5
5525echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6; }
5526cat >conftest.$ac_ext <<_ACEOF
5527/* confdefs.h.  */
5528_ACEOF
5529cat confdefs.h >>conftest.$ac_ext
5530cat >>conftest.$ac_ext <<_ACEOF
5531/* end confdefs.h.  */
5532$ac_includes_default
5533#include <errno.h>
5534_ACEOF
5535rm -f conftest.$ac_objext
5536if { (ac_try="$ac_compile"
5537case "(($ac_try" in
5538  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5539  *) ac_try_echo=$ac_try;;
5540esac
5541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5542  (eval "$ac_compile") 2>conftest.er1
5543  ac_status=$?
5544  grep -v '^ *+' conftest.er1 >conftest.err
5545  rm -f conftest.er1
5546  cat conftest.err >&5
5547  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5548  (exit $ac_status); } && {
5549	 test -z "$ac_c_werror_flag" ||
5550	 test ! -s conftest.err
5551       } && test -s conftest.$ac_objext; then
5552  ac_header_compiler=yes
5553else
5554  echo "$as_me: failed program was:" >&5
5555sed 's/^/| /' conftest.$ac_ext >&5
5556
5557	ac_header_compiler=no
5558fi
5559
5560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5561{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5562echo "${ECHO_T}$ac_header_compiler" >&6; }
5563
5564# Is the header present?
5565{ echo "$as_me:$LINENO: checking errno.h presence" >&5
5566echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6; }
5567cat >conftest.$ac_ext <<_ACEOF
5568/* confdefs.h.  */
5569_ACEOF
5570cat confdefs.h >>conftest.$ac_ext
5571cat >>conftest.$ac_ext <<_ACEOF
5572/* end confdefs.h.  */
5573#include <errno.h>
5574_ACEOF
5575if { (ac_try="$ac_cpp conftest.$ac_ext"
5576case "(($ac_try" in
5577  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5578  *) ac_try_echo=$ac_try;;
5579esac
5580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5581  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5582  ac_status=$?
5583  grep -v '^ *+' conftest.er1 >conftest.err
5584  rm -f conftest.er1
5585  cat conftest.err >&5
5586  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5587  (exit $ac_status); } >/dev/null && {
5588	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5589	 test ! -s conftest.err
5590       }; then
5591  ac_header_preproc=yes
5592else
5593  echo "$as_me: failed program was:" >&5
5594sed 's/^/| /' conftest.$ac_ext >&5
5595
5596  ac_header_preproc=no
5597fi
5598
5599rm -f conftest.err conftest.$ac_ext
5600{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5601echo "${ECHO_T}$ac_header_preproc" >&6; }
5602
5603# So?  What about this header?
5604case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5605  yes:no: )
5606    { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5607echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5608    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
5609echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
5610    ac_header_preproc=yes
5611    ;;
5612  no:yes:* )
5613    { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
5614echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
5615    { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
5616echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
5617    { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
5618echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
5619    { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5620echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5621    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
5622echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
5623    { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
5624echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
5625
5626    ;;
5627esac
5628{ echo "$as_me:$LINENO: checking for errno.h" >&5
5629echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5630if test "${ac_cv_header_errno_h+set}" = set; then
5631  echo $ECHO_N "(cached) $ECHO_C" >&6
5632else
5633  ac_cv_header_errno_h=$ac_header_preproc
5634fi
5635{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5636echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5637
5638fi
5639if test $ac_cv_header_errno_h = yes; then
5640  :
5641else
5642
5643cat >>confdefs.h <<\_ACEOF
5644#define NO_ERRNO_H 1
5645_ACEOF
5646
5647fi
5648
5649
5650    if test "${ac_cv_header_float_h+set}" = set; then
5651  { echo "$as_me:$LINENO: checking for float.h" >&5
5652echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5653if test "${ac_cv_header_float_h+set}" = set; then
5654  echo $ECHO_N "(cached) $ECHO_C" >&6
5655fi
5656{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5657echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5658else
5659  # Is the header compilable?
5660{ echo "$as_me:$LINENO: checking float.h usability" >&5
5661echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; }
5662cat >conftest.$ac_ext <<_ACEOF
5663/* confdefs.h.  */
5664_ACEOF
5665cat confdefs.h >>conftest.$ac_ext
5666cat >>conftest.$ac_ext <<_ACEOF
5667/* end confdefs.h.  */
5668$ac_includes_default
5669#include <float.h>
5670_ACEOF
5671rm -f conftest.$ac_objext
5672if { (ac_try="$ac_compile"
5673case "(($ac_try" in
5674  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5675  *) ac_try_echo=$ac_try;;
5676esac
5677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5678  (eval "$ac_compile") 2>conftest.er1
5679  ac_status=$?
5680  grep -v '^ *+' conftest.er1 >conftest.err
5681  rm -f conftest.er1
5682  cat conftest.err >&5
5683  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5684  (exit $ac_status); } && {
5685	 test -z "$ac_c_werror_flag" ||
5686	 test ! -s conftest.err
5687       } && test -s conftest.$ac_objext; then
5688  ac_header_compiler=yes
5689else
5690  echo "$as_me: failed program was:" >&5
5691sed 's/^/| /' conftest.$ac_ext >&5
5692
5693	ac_header_compiler=no
5694fi
5695
5696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5697{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5698echo "${ECHO_T}$ac_header_compiler" >&6; }
5699
5700# Is the header present?
5701{ echo "$as_me:$LINENO: checking float.h presence" >&5
5702echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; }
5703cat >conftest.$ac_ext <<_ACEOF
5704/* confdefs.h.  */
5705_ACEOF
5706cat confdefs.h >>conftest.$ac_ext
5707cat >>conftest.$ac_ext <<_ACEOF
5708/* end confdefs.h.  */
5709#include <float.h>
5710_ACEOF
5711if { (ac_try="$ac_cpp conftest.$ac_ext"
5712case "(($ac_try" in
5713  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5714  *) ac_try_echo=$ac_try;;
5715esac
5716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5717  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5718  ac_status=$?
5719  grep -v '^ *+' conftest.er1 >conftest.err
5720  rm -f conftest.er1
5721  cat conftest.err >&5
5722  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5723  (exit $ac_status); } >/dev/null && {
5724	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5725	 test ! -s conftest.err
5726       }; then
5727  ac_header_preproc=yes
5728else
5729  echo "$as_me: failed program was:" >&5
5730sed 's/^/| /' conftest.$ac_ext >&5
5731
5732  ac_header_preproc=no
5733fi
5734
5735rm -f conftest.err conftest.$ac_ext
5736{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5737echo "${ECHO_T}$ac_header_preproc" >&6; }
5738
5739# So?  What about this header?
5740case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5741  yes:no: )
5742    { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
5743echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5744    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
5745echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
5746    ac_header_preproc=yes
5747    ;;
5748  no:yes:* )
5749    { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
5750echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
5751    { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
5752echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
5753    { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
5754echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
5755    { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
5756echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5757    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
5758echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
5759    { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
5760echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
5761
5762    ;;
5763esac
5764{ echo "$as_me:$LINENO: checking for float.h" >&5
5765echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5766if test "${ac_cv_header_float_h+set}" = set; then
5767  echo $ECHO_N "(cached) $ECHO_C" >&6
5768else
5769  ac_cv_header_float_h=$ac_header_preproc
5770fi
5771{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5772echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5773
5774fi
5775if test $ac_cv_header_float_h = yes; then
5776  :
5777else
5778
5779cat >>confdefs.h <<\_ACEOF
5780#define NO_FLOAT_H 1
5781_ACEOF
5782
5783fi
5784
5785
5786    if test "${ac_cv_header_values_h+set}" = set; then
5787  { echo "$as_me:$LINENO: checking for values.h" >&5
5788echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5789if test "${ac_cv_header_values_h+set}" = set; then
5790  echo $ECHO_N "(cached) $ECHO_C" >&6
5791fi
5792{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5793echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5794else
5795  # Is the header compilable?
5796{ echo "$as_me:$LINENO: checking values.h usability" >&5
5797echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; }
5798cat >conftest.$ac_ext <<_ACEOF
5799/* confdefs.h.  */
5800_ACEOF
5801cat confdefs.h >>conftest.$ac_ext
5802cat >>conftest.$ac_ext <<_ACEOF
5803/* end confdefs.h.  */
5804$ac_includes_default
5805#include <values.h>
5806_ACEOF
5807rm -f conftest.$ac_objext
5808if { (ac_try="$ac_compile"
5809case "(($ac_try" in
5810  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5811  *) ac_try_echo=$ac_try;;
5812esac
5813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5814  (eval "$ac_compile") 2>conftest.er1
5815  ac_status=$?
5816  grep -v '^ *+' conftest.er1 >conftest.err
5817  rm -f conftest.er1
5818  cat conftest.err >&5
5819  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820  (exit $ac_status); } && {
5821	 test -z "$ac_c_werror_flag" ||
5822	 test ! -s conftest.err
5823       } && test -s conftest.$ac_objext; then
5824  ac_header_compiler=yes
5825else
5826  echo "$as_me: failed program was:" >&5
5827sed 's/^/| /' conftest.$ac_ext >&5
5828
5829	ac_header_compiler=no
5830fi
5831
5832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5833{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5834echo "${ECHO_T}$ac_header_compiler" >&6; }
5835
5836# Is the header present?
5837{ echo "$as_me:$LINENO: checking values.h presence" >&5
5838echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; }
5839cat >conftest.$ac_ext <<_ACEOF
5840/* confdefs.h.  */
5841_ACEOF
5842cat confdefs.h >>conftest.$ac_ext
5843cat >>conftest.$ac_ext <<_ACEOF
5844/* end confdefs.h.  */
5845#include <values.h>
5846_ACEOF
5847if { (ac_try="$ac_cpp conftest.$ac_ext"
5848case "(($ac_try" in
5849  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5850  *) ac_try_echo=$ac_try;;
5851esac
5852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5853  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5854  ac_status=$?
5855  grep -v '^ *+' conftest.er1 >conftest.err
5856  rm -f conftest.er1
5857  cat conftest.err >&5
5858  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5859  (exit $ac_status); } >/dev/null && {
5860	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5861	 test ! -s conftest.err
5862       }; then
5863  ac_header_preproc=yes
5864else
5865  echo "$as_me: failed program was:" >&5
5866sed 's/^/| /' conftest.$ac_ext >&5
5867
5868  ac_header_preproc=no
5869fi
5870
5871rm -f conftest.err conftest.$ac_ext
5872{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5873echo "${ECHO_T}$ac_header_preproc" >&6; }
5874
5875# So?  What about this header?
5876case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5877  yes:no: )
5878    { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
5879echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5880    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
5881echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
5882    ac_header_preproc=yes
5883    ;;
5884  no:yes:* )
5885    { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
5886echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
5887    { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
5888echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
5889    { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
5890echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
5891    { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
5892echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5893    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
5894echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
5895    { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
5896echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
5897
5898    ;;
5899esac
5900{ echo "$as_me:$LINENO: checking for values.h" >&5
5901echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5902if test "${ac_cv_header_values_h+set}" = set; then
5903  echo $ECHO_N "(cached) $ECHO_C" >&6
5904else
5905  ac_cv_header_values_h=$ac_header_preproc
5906fi
5907{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5908echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5909
5910fi
5911if test $ac_cv_header_values_h = yes; then
5912  :
5913else
5914
5915cat >>confdefs.h <<\_ACEOF
5916#define NO_VALUES_H 1
5917_ACEOF
5918
5919fi
5920
5921
5922    if test "${ac_cv_header_limits_h+set}" = set; then
5923  { echo "$as_me:$LINENO: checking for limits.h" >&5
5924echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5925if test "${ac_cv_header_limits_h+set}" = set; then
5926  echo $ECHO_N "(cached) $ECHO_C" >&6
5927fi
5928{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5929echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5930else
5931  # Is the header compilable?
5932{ echo "$as_me:$LINENO: checking limits.h usability" >&5
5933echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; }
5934cat >conftest.$ac_ext <<_ACEOF
5935/* confdefs.h.  */
5936_ACEOF
5937cat confdefs.h >>conftest.$ac_ext
5938cat >>conftest.$ac_ext <<_ACEOF
5939/* end confdefs.h.  */
5940$ac_includes_default
5941#include <limits.h>
5942_ACEOF
5943rm -f conftest.$ac_objext
5944if { (ac_try="$ac_compile"
5945case "(($ac_try" in
5946  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5947  *) ac_try_echo=$ac_try;;
5948esac
5949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5950  (eval "$ac_compile") 2>conftest.er1
5951  ac_status=$?
5952  grep -v '^ *+' conftest.er1 >conftest.err
5953  rm -f conftest.er1
5954  cat conftest.err >&5
5955  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5956  (exit $ac_status); } && {
5957	 test -z "$ac_c_werror_flag" ||
5958	 test ! -s conftest.err
5959       } && test -s conftest.$ac_objext; then
5960  ac_header_compiler=yes
5961else
5962  echo "$as_me: failed program was:" >&5
5963sed 's/^/| /' conftest.$ac_ext >&5
5964
5965	ac_header_compiler=no
5966fi
5967
5968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5969{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5970echo "${ECHO_T}$ac_header_compiler" >&6; }
5971
5972# Is the header present?
5973{ echo "$as_me:$LINENO: checking limits.h presence" >&5
5974echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; }
5975cat >conftest.$ac_ext <<_ACEOF
5976/* confdefs.h.  */
5977_ACEOF
5978cat confdefs.h >>conftest.$ac_ext
5979cat >>conftest.$ac_ext <<_ACEOF
5980/* end confdefs.h.  */
5981#include <limits.h>
5982_ACEOF
5983if { (ac_try="$ac_cpp conftest.$ac_ext"
5984case "(($ac_try" in
5985  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5986  *) ac_try_echo=$ac_try;;
5987esac
5988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5989  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5990  ac_status=$?
5991  grep -v '^ *+' conftest.er1 >conftest.err
5992  rm -f conftest.er1
5993  cat conftest.err >&5
5994  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5995  (exit $ac_status); } >/dev/null && {
5996	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5997	 test ! -s conftest.err
5998       }; then
5999  ac_header_preproc=yes
6000else
6001  echo "$as_me: failed program was:" >&5
6002sed 's/^/| /' conftest.$ac_ext >&5
6003
6004  ac_header_preproc=no
6005fi
6006
6007rm -f conftest.err conftest.$ac_ext
6008{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6009echo "${ECHO_T}$ac_header_preproc" >&6; }
6010
6011# So?  What about this header?
6012case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6013  yes:no: )
6014    { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
6015echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6016    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
6017echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
6018    ac_header_preproc=yes
6019    ;;
6020  no:yes:* )
6021    { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
6022echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
6023    { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
6024echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
6025    { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
6026echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
6027    { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
6028echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6029    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
6030echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
6031    { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
6032echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
6033
6034    ;;
6035esac
6036{ echo "$as_me:$LINENO: checking for limits.h" >&5
6037echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
6038if test "${ac_cv_header_limits_h+set}" = set; then
6039  echo $ECHO_N "(cached) $ECHO_C" >&6
6040else
6041  ac_cv_header_limits_h=$ac_header_preproc
6042fi
6043{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
6044echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
6045
6046fi
6047if test $ac_cv_header_limits_h = yes; then
6048
6049cat >>confdefs.h <<\_ACEOF
6050#define HAVE_LIMITS_H 1
6051_ACEOF
6052
6053else
6054
6055cat >>confdefs.h <<\_ACEOF
6056#define NO_LIMITS_H 1
6057_ACEOF
6058
6059fi
6060
6061
6062    if test "${ac_cv_header_stdlib_h+set}" = set; then
6063  { echo "$as_me:$LINENO: checking for stdlib.h" >&5
6064echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
6065if test "${ac_cv_header_stdlib_h+set}" = set; then
6066  echo $ECHO_N "(cached) $ECHO_C" >&6
6067fi
6068{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
6069echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
6070else
6071  # Is the header compilable?
6072{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5
6073echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; }
6074cat >conftest.$ac_ext <<_ACEOF
6075/* confdefs.h.  */
6076_ACEOF
6077cat confdefs.h >>conftest.$ac_ext
6078cat >>conftest.$ac_ext <<_ACEOF
6079/* end confdefs.h.  */
6080$ac_includes_default
6081#include <stdlib.h>
6082_ACEOF
6083rm -f conftest.$ac_objext
6084if { (ac_try="$ac_compile"
6085case "(($ac_try" in
6086  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6087  *) ac_try_echo=$ac_try;;
6088esac
6089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6090  (eval "$ac_compile") 2>conftest.er1
6091  ac_status=$?
6092  grep -v '^ *+' conftest.er1 >conftest.err
6093  rm -f conftest.er1
6094  cat conftest.err >&5
6095  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6096  (exit $ac_status); } && {
6097	 test -z "$ac_c_werror_flag" ||
6098	 test ! -s conftest.err
6099       } && test -s conftest.$ac_objext; then
6100  ac_header_compiler=yes
6101else
6102  echo "$as_me: failed program was:" >&5
6103sed 's/^/| /' conftest.$ac_ext >&5
6104
6105	ac_header_compiler=no
6106fi
6107
6108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6109{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6110echo "${ECHO_T}$ac_header_compiler" >&6; }
6111
6112# Is the header present?
6113{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5
6114echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; }
6115cat >conftest.$ac_ext <<_ACEOF
6116/* confdefs.h.  */
6117_ACEOF
6118cat confdefs.h >>conftest.$ac_ext
6119cat >>conftest.$ac_ext <<_ACEOF
6120/* end confdefs.h.  */
6121#include <stdlib.h>
6122_ACEOF
6123if { (ac_try="$ac_cpp conftest.$ac_ext"
6124case "(($ac_try" in
6125  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6126  *) ac_try_echo=$ac_try;;
6127esac
6128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6129  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6130  ac_status=$?
6131  grep -v '^ *+' conftest.er1 >conftest.err
6132  rm -f conftest.er1
6133  cat conftest.err >&5
6134  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6135  (exit $ac_status); } >/dev/null && {
6136	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6137	 test ! -s conftest.err
6138       }; then
6139  ac_header_preproc=yes
6140else
6141  echo "$as_me: failed program was:" >&5
6142sed 's/^/| /' conftest.$ac_ext >&5
6143
6144  ac_header_preproc=no
6145fi
6146
6147rm -f conftest.err conftest.$ac_ext
6148{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6149echo "${ECHO_T}$ac_header_preproc" >&6; }
6150
6151# So?  What about this header?
6152case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6153  yes:no: )
6154    { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
6155echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6156    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
6157echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
6158    ac_header_preproc=yes
6159    ;;
6160  no:yes:* )
6161    { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
6162echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
6163    { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
6164echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
6165    { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
6166echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
6167    { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
6168echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6169    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
6170echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
6171    { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
6172echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
6173
6174    ;;
6175esac
6176{ echo "$as_me:$LINENO: checking for stdlib.h" >&5
6177echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
6178if test "${ac_cv_header_stdlib_h+set}" = set; then
6179  echo $ECHO_N "(cached) $ECHO_C" >&6
6180else
6181  ac_cv_header_stdlib_h=$ac_header_preproc
6182fi
6183{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
6184echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
6185
6186fi
6187if test $ac_cv_header_stdlib_h = yes; then
6188  tcl_ok=1
6189else
6190  tcl_ok=0
6191fi
6192
6193
6194    cat >conftest.$ac_ext <<_ACEOF
6195/* confdefs.h.  */
6196_ACEOF
6197cat confdefs.h >>conftest.$ac_ext
6198cat >>conftest.$ac_ext <<_ACEOF
6199/* end confdefs.h.  */
6200#include <stdlib.h>
6201
6202_ACEOF
6203if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6204  $EGREP "strtol" >/dev/null 2>&1; then
6205  :
6206else
6207  tcl_ok=0
6208fi
6209rm -f -r conftest*
6210
6211    cat >conftest.$ac_ext <<_ACEOF
6212/* confdefs.h.  */
6213_ACEOF
6214cat confdefs.h >>conftest.$ac_ext
6215cat >>conftest.$ac_ext <<_ACEOF
6216/* end confdefs.h.  */
6217#include <stdlib.h>
6218
6219_ACEOF
6220if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6221  $EGREP "strtoul" >/dev/null 2>&1; then
6222  :
6223else
6224  tcl_ok=0
6225fi
6226rm -f -r conftest*
6227
6228    cat >conftest.$ac_ext <<_ACEOF
6229/* confdefs.h.  */
6230_ACEOF
6231cat confdefs.h >>conftest.$ac_ext
6232cat >>conftest.$ac_ext <<_ACEOF
6233/* end confdefs.h.  */
6234#include <stdlib.h>
6235
6236_ACEOF
6237if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6238  $EGREP "strtod" >/dev/null 2>&1; then
6239  :
6240else
6241  tcl_ok=0
6242fi
6243rm -f -r conftest*
6244
6245    if test $tcl_ok = 0; then
6246
6247cat >>confdefs.h <<\_ACEOF
6248#define NO_STDLIB_H 1
6249_ACEOF
6250
6251    fi
6252    if test "${ac_cv_header_string_h+set}" = set; then
6253  { echo "$as_me:$LINENO: checking for string.h" >&5
6254echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6255if test "${ac_cv_header_string_h+set}" = set; then
6256  echo $ECHO_N "(cached) $ECHO_C" >&6
6257fi
6258{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6259echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6260else
6261  # Is the header compilable?
6262{ echo "$as_me:$LINENO: checking string.h usability" >&5
6263echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; }
6264cat >conftest.$ac_ext <<_ACEOF
6265/* confdefs.h.  */
6266_ACEOF
6267cat confdefs.h >>conftest.$ac_ext
6268cat >>conftest.$ac_ext <<_ACEOF
6269/* end confdefs.h.  */
6270$ac_includes_default
6271#include <string.h>
6272_ACEOF
6273rm -f conftest.$ac_objext
6274if { (ac_try="$ac_compile"
6275case "(($ac_try" in
6276  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6277  *) ac_try_echo=$ac_try;;
6278esac
6279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6280  (eval "$ac_compile") 2>conftest.er1
6281  ac_status=$?
6282  grep -v '^ *+' conftest.er1 >conftest.err
6283  rm -f conftest.er1
6284  cat conftest.err >&5
6285  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6286  (exit $ac_status); } && {
6287	 test -z "$ac_c_werror_flag" ||
6288	 test ! -s conftest.err
6289       } && test -s conftest.$ac_objext; then
6290  ac_header_compiler=yes
6291else
6292  echo "$as_me: failed program was:" >&5
6293sed 's/^/| /' conftest.$ac_ext >&5
6294
6295	ac_header_compiler=no
6296fi
6297
6298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6299{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6300echo "${ECHO_T}$ac_header_compiler" >&6; }
6301
6302# Is the header present?
6303{ echo "$as_me:$LINENO: checking string.h presence" >&5
6304echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; }
6305cat >conftest.$ac_ext <<_ACEOF
6306/* confdefs.h.  */
6307_ACEOF
6308cat confdefs.h >>conftest.$ac_ext
6309cat >>conftest.$ac_ext <<_ACEOF
6310/* end confdefs.h.  */
6311#include <string.h>
6312_ACEOF
6313if { (ac_try="$ac_cpp conftest.$ac_ext"
6314case "(($ac_try" in
6315  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6316  *) ac_try_echo=$ac_try;;
6317esac
6318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6319  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6320  ac_status=$?
6321  grep -v '^ *+' conftest.er1 >conftest.err
6322  rm -f conftest.er1
6323  cat conftest.err >&5
6324  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6325  (exit $ac_status); } >/dev/null && {
6326	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6327	 test ! -s conftest.err
6328       }; then
6329  ac_header_preproc=yes
6330else
6331  echo "$as_me: failed program was:" >&5
6332sed 's/^/| /' conftest.$ac_ext >&5
6333
6334  ac_header_preproc=no
6335fi
6336
6337rm -f conftest.err conftest.$ac_ext
6338{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6339echo "${ECHO_T}$ac_header_preproc" >&6; }
6340
6341# So?  What about this header?
6342case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6343  yes:no: )
6344    { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
6345echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6346    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
6347echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
6348    ac_header_preproc=yes
6349    ;;
6350  no:yes:* )
6351    { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
6352echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
6353    { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
6354echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
6355    { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
6356echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
6357    { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
6358echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6359    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
6360echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
6361    { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
6362echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
6363
6364    ;;
6365esac
6366{ echo "$as_me:$LINENO: checking for string.h" >&5
6367echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6368if test "${ac_cv_header_string_h+set}" = set; then
6369  echo $ECHO_N "(cached) $ECHO_C" >&6
6370else
6371  ac_cv_header_string_h=$ac_header_preproc
6372fi
6373{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6374echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6375
6376fi
6377if test $ac_cv_header_string_h = yes; then
6378  tcl_ok=1
6379else
6380  tcl_ok=0
6381fi
6382
6383
6384    cat >conftest.$ac_ext <<_ACEOF
6385/* confdefs.h.  */
6386_ACEOF
6387cat confdefs.h >>conftest.$ac_ext
6388cat >>conftest.$ac_ext <<_ACEOF
6389/* end confdefs.h.  */
6390#include <string.h>
6391
6392_ACEOF
6393if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6394  $EGREP "strstr" >/dev/null 2>&1; then
6395  :
6396else
6397  tcl_ok=0
6398fi
6399rm -f -r conftest*
6400
6401    cat >conftest.$ac_ext <<_ACEOF
6402/* confdefs.h.  */
6403_ACEOF
6404cat confdefs.h >>conftest.$ac_ext
6405cat >>conftest.$ac_ext <<_ACEOF
6406/* end confdefs.h.  */
6407#include <string.h>
6408
6409_ACEOF
6410if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6411  $EGREP "strerror" >/dev/null 2>&1; then
6412  :
6413else
6414  tcl_ok=0
6415fi
6416rm -f -r conftest*
6417
6418
6419    # See also memmove check below for a place where NO_STRING_H can be
6420    # set and why.
6421
6422    if test $tcl_ok = 0; then
6423
6424cat >>confdefs.h <<\_ACEOF
6425#define NO_STRING_H 1
6426_ACEOF
6427
6428    fi
6429
6430    if test "${ac_cv_header_sys_wait_h+set}" = set; then
6431  { echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6432echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6433if test "${ac_cv_header_sys_wait_h+set}" = set; then
6434  echo $ECHO_N "(cached) $ECHO_C" >&6
6435fi
6436{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6437echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6438else
6439  # Is the header compilable?
6440{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
6441echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; }
6442cat >conftest.$ac_ext <<_ACEOF
6443/* confdefs.h.  */
6444_ACEOF
6445cat confdefs.h >>conftest.$ac_ext
6446cat >>conftest.$ac_ext <<_ACEOF
6447/* end confdefs.h.  */
6448$ac_includes_default
6449#include <sys/wait.h>
6450_ACEOF
6451rm -f conftest.$ac_objext
6452if { (ac_try="$ac_compile"
6453case "(($ac_try" in
6454  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6455  *) ac_try_echo=$ac_try;;
6456esac
6457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6458  (eval "$ac_compile") 2>conftest.er1
6459  ac_status=$?
6460  grep -v '^ *+' conftest.er1 >conftest.err
6461  rm -f conftest.er1
6462  cat conftest.err >&5
6463  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6464  (exit $ac_status); } && {
6465	 test -z "$ac_c_werror_flag" ||
6466	 test ! -s conftest.err
6467       } && test -s conftest.$ac_objext; then
6468  ac_header_compiler=yes
6469else
6470  echo "$as_me: failed program was:" >&5
6471sed 's/^/| /' conftest.$ac_ext >&5
6472
6473	ac_header_compiler=no
6474fi
6475
6476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6477{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6478echo "${ECHO_T}$ac_header_compiler" >&6; }
6479
6480# Is the header present?
6481{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
6482echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; }
6483cat >conftest.$ac_ext <<_ACEOF
6484/* confdefs.h.  */
6485_ACEOF
6486cat confdefs.h >>conftest.$ac_ext
6487cat >>conftest.$ac_ext <<_ACEOF
6488/* end confdefs.h.  */
6489#include <sys/wait.h>
6490_ACEOF
6491if { (ac_try="$ac_cpp conftest.$ac_ext"
6492case "(($ac_try" in
6493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6494  *) ac_try_echo=$ac_try;;
6495esac
6496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6497  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6498  ac_status=$?
6499  grep -v '^ *+' conftest.er1 >conftest.err
6500  rm -f conftest.er1
6501  cat conftest.err >&5
6502  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6503  (exit $ac_status); } >/dev/null && {
6504	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6505	 test ! -s conftest.err
6506       }; then
6507  ac_header_preproc=yes
6508else
6509  echo "$as_me: failed program was:" >&5
6510sed 's/^/| /' conftest.$ac_ext >&5
6511
6512  ac_header_preproc=no
6513fi
6514
6515rm -f conftest.err conftest.$ac_ext
6516{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6517echo "${ECHO_T}$ac_header_preproc" >&6; }
6518
6519# So?  What about this header?
6520case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6521  yes:no: )
6522    { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
6523echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6524    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
6525echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
6526    ac_header_preproc=yes
6527    ;;
6528  no:yes:* )
6529    { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
6530echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
6531    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
6532echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
6533    { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
6534echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
6535    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
6536echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6537    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
6538echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
6539    { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
6540echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
6541
6542    ;;
6543esac
6544{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6545echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6546if test "${ac_cv_header_sys_wait_h+set}" = set; then
6547  echo $ECHO_N "(cached) $ECHO_C" >&6
6548else
6549  ac_cv_header_sys_wait_h=$ac_header_preproc
6550fi
6551{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6552echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6553
6554fi
6555if test $ac_cv_header_sys_wait_h = yes; then
6556  :
6557else
6558
6559cat >>confdefs.h <<\_ACEOF
6560#define NO_SYS_WAIT_H 1
6561_ACEOF
6562
6563fi
6564
6565
6566    if test "${ac_cv_header_dlfcn_h+set}" = set; then
6567  { echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6568echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6569if test "${ac_cv_header_dlfcn_h+set}" = set; then
6570  echo $ECHO_N "(cached) $ECHO_C" >&6
6571fi
6572{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6573echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6574else
6575  # Is the header compilable?
6576{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
6577echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; }
6578cat >conftest.$ac_ext <<_ACEOF
6579/* confdefs.h.  */
6580_ACEOF
6581cat confdefs.h >>conftest.$ac_ext
6582cat >>conftest.$ac_ext <<_ACEOF
6583/* end confdefs.h.  */
6584$ac_includes_default
6585#include <dlfcn.h>
6586_ACEOF
6587rm -f conftest.$ac_objext
6588if { (ac_try="$ac_compile"
6589case "(($ac_try" in
6590  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6591  *) ac_try_echo=$ac_try;;
6592esac
6593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6594  (eval "$ac_compile") 2>conftest.er1
6595  ac_status=$?
6596  grep -v '^ *+' conftest.er1 >conftest.err
6597  rm -f conftest.er1
6598  cat conftest.err >&5
6599  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6600  (exit $ac_status); } && {
6601	 test -z "$ac_c_werror_flag" ||
6602	 test ! -s conftest.err
6603       } && test -s conftest.$ac_objext; then
6604  ac_header_compiler=yes
6605else
6606  echo "$as_me: failed program was:" >&5
6607sed 's/^/| /' conftest.$ac_ext >&5
6608
6609	ac_header_compiler=no
6610fi
6611
6612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6613{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6614echo "${ECHO_T}$ac_header_compiler" >&6; }
6615
6616# Is the header present?
6617{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
6618echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; }
6619cat >conftest.$ac_ext <<_ACEOF
6620/* confdefs.h.  */
6621_ACEOF
6622cat confdefs.h >>conftest.$ac_ext
6623cat >>conftest.$ac_ext <<_ACEOF
6624/* end confdefs.h.  */
6625#include <dlfcn.h>
6626_ACEOF
6627if { (ac_try="$ac_cpp conftest.$ac_ext"
6628case "(($ac_try" in
6629  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6630  *) ac_try_echo=$ac_try;;
6631esac
6632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6633  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6634  ac_status=$?
6635  grep -v '^ *+' conftest.er1 >conftest.err
6636  rm -f conftest.er1
6637  cat conftest.err >&5
6638  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6639  (exit $ac_status); } >/dev/null && {
6640	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6641	 test ! -s conftest.err
6642       }; then
6643  ac_header_preproc=yes
6644else
6645  echo "$as_me: failed program was:" >&5
6646sed 's/^/| /' conftest.$ac_ext >&5
6647
6648  ac_header_preproc=no
6649fi
6650
6651rm -f conftest.err conftest.$ac_ext
6652{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6653echo "${ECHO_T}$ac_header_preproc" >&6; }
6654
6655# So?  What about this header?
6656case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6657  yes:no: )
6658    { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
6659echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6660    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
6661echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
6662    ac_header_preproc=yes
6663    ;;
6664  no:yes:* )
6665    { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
6666echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
6667    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
6668echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
6669    { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
6670echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
6671    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
6672echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6673    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
6674echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
6675    { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
6676echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
6677
6678    ;;
6679esac
6680{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6681echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6682if test "${ac_cv_header_dlfcn_h+set}" = set; then
6683  echo $ECHO_N "(cached) $ECHO_C" >&6
6684else
6685  ac_cv_header_dlfcn_h=$ac_header_preproc
6686fi
6687{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6688echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6689
6690fi
6691if test $ac_cv_header_dlfcn_h = yes; then
6692  :
6693else
6694
6695cat >>confdefs.h <<\_ACEOF
6696#define NO_DLFCN_H 1
6697_ACEOF
6698
6699fi
6700
6701
6702
6703    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
6704
6705for ac_header in sys/param.h
6706do
6707as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6708if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6709  { echo "$as_me:$LINENO: checking for $ac_header" >&5
6710echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6711if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6712  echo $ECHO_N "(cached) $ECHO_C" >&6
6713fi
6714ac_res=`eval echo '${'$as_ac_Header'}'`
6715	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6716echo "${ECHO_T}$ac_res" >&6; }
6717else
6718  # Is the header compilable?
6719{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6720echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6721cat >conftest.$ac_ext <<_ACEOF
6722/* confdefs.h.  */
6723_ACEOF
6724cat confdefs.h >>conftest.$ac_ext
6725cat >>conftest.$ac_ext <<_ACEOF
6726/* end confdefs.h.  */
6727$ac_includes_default
6728#include <$ac_header>
6729_ACEOF
6730rm -f conftest.$ac_objext
6731if { (ac_try="$ac_compile"
6732case "(($ac_try" in
6733  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6734  *) ac_try_echo=$ac_try;;
6735esac
6736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6737  (eval "$ac_compile") 2>conftest.er1
6738  ac_status=$?
6739  grep -v '^ *+' conftest.er1 >conftest.err
6740  rm -f conftest.er1
6741  cat conftest.err >&5
6742  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6743  (exit $ac_status); } && {
6744	 test -z "$ac_c_werror_flag" ||
6745	 test ! -s conftest.err
6746       } && test -s conftest.$ac_objext; then
6747  ac_header_compiler=yes
6748else
6749  echo "$as_me: failed program was:" >&5
6750sed 's/^/| /' conftest.$ac_ext >&5
6751
6752	ac_header_compiler=no
6753fi
6754
6755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6756{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6757echo "${ECHO_T}$ac_header_compiler" >&6; }
6758
6759# Is the header present?
6760{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6761echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6762cat >conftest.$ac_ext <<_ACEOF
6763/* confdefs.h.  */
6764_ACEOF
6765cat confdefs.h >>conftest.$ac_ext
6766cat >>conftest.$ac_ext <<_ACEOF
6767/* end confdefs.h.  */
6768#include <$ac_header>
6769_ACEOF
6770if { (ac_try="$ac_cpp conftest.$ac_ext"
6771case "(($ac_try" in
6772  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6773  *) ac_try_echo=$ac_try;;
6774esac
6775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6776  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6777  ac_status=$?
6778  grep -v '^ *+' conftest.er1 >conftest.err
6779  rm -f conftest.er1
6780  cat conftest.err >&5
6781  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6782  (exit $ac_status); } >/dev/null && {
6783	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6784	 test ! -s conftest.err
6785       }; then
6786  ac_header_preproc=yes
6787else
6788  echo "$as_me: failed program was:" >&5
6789sed 's/^/| /' conftest.$ac_ext >&5
6790
6791  ac_header_preproc=no
6792fi
6793
6794rm -f conftest.err conftest.$ac_ext
6795{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6796echo "${ECHO_T}$ac_header_preproc" >&6; }
6797
6798# So?  What about this header?
6799case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6800  yes:no: )
6801    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6802echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6803    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6804echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6805    ac_header_preproc=yes
6806    ;;
6807  no:yes:* )
6808    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6809echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6810    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6811echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6812    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6813echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6814    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6815echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6816    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6817echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6818    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6819echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6820
6821    ;;
6822esac
6823{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6824echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6825if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6826  echo $ECHO_N "(cached) $ECHO_C" >&6
6827else
6828  eval "$as_ac_Header=\$ac_header_preproc"
6829fi
6830ac_res=`eval echo '${'$as_ac_Header'}'`
6831	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6832echo "${ECHO_T}$ac_res" >&6; }
6833
6834fi
6835if test `eval echo '${'$as_ac_Header'}'` = yes; then
6836  cat >>confdefs.h <<_ACEOF
6837#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6838_ACEOF
6839
6840fi
6841
6842done
6843
6844
6845	# Let the user call this, because if it triggers, they will
6846	# need a compat/strtod.c that is correct.  Users can also
6847	# use Tcl_GetDouble(FromObj) instead.
6848	#TEA_BUGGY_STRTOD
6849    fi
6850
6851
6852#--------------------------------------------------------------------
6853# __CHANGE__
6854# Choose which headers you need.  Extension authors should try very
6855# hard to only rely on the Tcl public header files.  Internal headers
6856# contain private data structures and are subject to change without
6857# notice.
6858# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
6859#--------------------------------------------------------------------
6860
6861# This module is special. On windows it requires access to the
6862# internal headers of Tk and thus tcl to implement its functionality
6863# (TkWinReleaseDrawableDC).
6864
6865if test "${TEA_PLATFORM}" = "windows" ; then
6866
6867    { echo "$as_me:$LINENO: checking for Tcl public headers" >&5
6868echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6; }
6869
6870
6871# Check whether --with-tclinclude was given.
6872if test "${with_tclinclude+set}" = set; then
6873  withval=$with_tclinclude; with_tclinclude=${withval}
6874fi
6875
6876
6877    if test "${ac_cv_c_tclh+set}" = set; then
6878  echo $ECHO_N "(cached) $ECHO_C" >&6
6879else
6880
6881	# Use the value from --with-tclinclude, if it was given
6882
6883	if test x"${with_tclinclude}" != x ; then
6884	    if test -f "${with_tclinclude}/tcl.h" ; then
6885		ac_cv_c_tclh=${with_tclinclude}
6886	    else
6887		{ { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
6888echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
6889   { (exit 1); exit 1; }; }
6890	    fi
6891	else
6892	    list=""
6893	    if test "`uname -s`" = "Darwin"; then
6894		# If Tcl was built as a framework, attempt to use
6895		# the framework's Headers directory
6896		case ${TCL_DEFS} in
6897		    *TCL_FRAMEWORK*)
6898			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
6899			;;
6900		esac
6901	    fi
6902
6903	    # Look in the source dir only if Tcl is not installed,
6904	    # and in that situation, look there before installed locations.
6905	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
6906		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
6907	    fi
6908
6909	    # Check order: pkg --prefix location, Tcl's --prefix location,
6910	    # relative to directory of tclConfig.sh.
6911
6912	    eval "temp_includedir=${includedir}"
6913	    list="$list \
6914		`ls -d ${temp_includedir}        2>/dev/null` \
6915		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
6916		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
6917	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
6918		list="$list /usr/local/include /usr/include"
6919		if test x"${TCL_INCLUDE_SPEC}" != x ; then
6920		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
6921		    list="$list `ls -d ${d} 2>/dev/null`"
6922		fi
6923	    fi
6924	    for i in $list ; do
6925		if test -f "$i/tcl.h" ; then
6926		    ac_cv_c_tclh=$i
6927		    break
6928		fi
6929	    done
6930	fi
6931
6932fi
6933
6934
6935    # Print a message based on how we determined the include path
6936
6937    if test x"${ac_cv_c_tclh}" = x ; then
6938	{ { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
6939echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
6940   { (exit 1); exit 1; }; }
6941    else
6942	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
6943echo "${ECHO_T}${ac_cv_c_tclh}" >&6; }
6944    fi
6945
6946    # Convert to a native path and substitute into the output files.
6947
6948    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
6949
6950    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
6951
6952
6953
6954
6955    # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
6956
6957    { echo "$as_me:$LINENO: checking for Tcl private include files" >&5
6958echo $ECHO_N "checking for Tcl private include files... $ECHO_C" >&6; }
6959
6960    TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
6961    TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
6962
6963    # Check to see if tcl<Plat>Port.h isn't already with the public headers
6964    # Don't look for tclInt.h because that resides with tcl.h in the core
6965    # sources, but the <plat>Port headers are in a different directory
6966    if test "${TEA_PLATFORM}" = "windows" -a \
6967	-f "${ac_cv_c_tclh}/tclWinPort.h"; then
6968	result="private headers found with public headers"
6969    elif test "${TEA_PLATFORM}" = "unix" -a \
6970	-f "${ac_cv_c_tclh}/tclUnixPort.h"; then
6971	result="private headers found with public headers"
6972    else
6973	TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
6974	if test "${TEA_PLATFORM}" = "windows"; then
6975	    TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
6976	else
6977	    TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
6978	fi
6979	# Overwrite the previous TCL_INCLUDES as this should capture both
6980	# public and private headers in the same set.
6981	# We want to ensure these are substituted so as not to require
6982	# any *_NATIVE vars be defined in the Makefile
6983	TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
6984	if test "`uname -s`" = "Darwin"; then
6985            # If Tcl was built as a framework, attempt to use
6986            # the framework's Headers and PrivateHeaders directories
6987            case ${TCL_DEFS} in
6988	    	*TCL_FRAMEWORK*)
6989		    if test -d "${TCL_BIN_DIR}/Headers" -a \
6990			    -d "${TCL_BIN_DIR}/PrivateHeaders"; then
6991			TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
6992		    else
6993			TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
6994		    fi
6995	            ;;
6996	    esac
6997	    result="Using ${TCL_INCLUDES}"
6998	else
6999	    if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
7000		{ { echo "$as_me:$LINENO: error: Cannot find private header tclInt.h in ${TCL_SRC_DIR}" >&5
7001echo "$as_me: error: Cannot find private header tclInt.h in ${TCL_SRC_DIR}" >&2;}
7002   { (exit 1); exit 1; }; }
7003	    fi
7004	    result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}"
7005	fi
7006    fi
7007
7008
7009
7010
7011    { echo "$as_me:$LINENO: result: ${result}" >&5
7012echo "${ECHO_T}${result}" >&6; }
7013
7014
7015    { echo "$as_me:$LINENO: checking for Tk public headers" >&5
7016echo $ECHO_N "checking for Tk public headers... $ECHO_C" >&6; }
7017
7018
7019# Check whether --with-tkinclude was given.
7020if test "${with_tkinclude+set}" = set; then
7021  withval=$with_tkinclude; with_tkinclude=${withval}
7022fi
7023
7024
7025    if test "${ac_cv_c_tkh+set}" = set; then
7026  echo $ECHO_N "(cached) $ECHO_C" >&6
7027else
7028
7029	# Use the value from --with-tkinclude, if it was given
7030
7031	if test x"${with_tkinclude}" != x ; then
7032	    if test -f "${with_tkinclude}/tk.h" ; then
7033		ac_cv_c_tkh=${with_tkinclude}
7034	    else
7035		{ { echo "$as_me:$LINENO: error: ${with_tkinclude} directory does not contain tk.h" >&5
7036echo "$as_me: error: ${with_tkinclude} directory does not contain tk.h" >&2;}
7037   { (exit 1); exit 1; }; }
7038	    fi
7039	else
7040	    list=""
7041	    if test "`uname -s`" = "Darwin"; then
7042		# If Tk was built as a framework, attempt to use
7043		# the framework's Headers directory.
7044		case ${TK_DEFS} in
7045		    *TK_FRAMEWORK*)
7046			list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
7047			;;
7048		esac
7049	    fi
7050
7051	    # Look in the source dir only if Tk is not installed,
7052	    # and in that situation, look there before installed locations.
7053	    if test -f "${TK_BIN_DIR}/Makefile" ; then
7054		list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
7055	    fi
7056
7057	    # Check order: pkg --prefix location, Tk's --prefix location,
7058	    # relative to directory of tkConfig.sh, Tcl's --prefix location,
7059	    # relative to directory of tclConfig.sh.
7060
7061	    eval "temp_includedir=${includedir}"
7062	    list="$list \
7063		`ls -d ${temp_includedir}        2>/dev/null` \
7064		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
7065		`ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
7066		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7067		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
7068	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7069		list="$list /usr/local/include /usr/include"
7070		if test x"${TK_INCLUDE_SPEC}" != x ; then
7071		    d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
7072		    list="$list `ls -d ${d} 2>/dev/null`"
7073		fi
7074	    fi
7075	    for i in $list ; do
7076		if test -f "$i/tk.h" ; then
7077		    ac_cv_c_tkh=$i
7078		    break
7079		fi
7080	    done
7081	fi
7082
7083fi
7084
7085
7086    # Print a message based on how we determined the include path
7087
7088    if test x"${ac_cv_c_tkh}" = x ; then
7089	{ { echo "$as_me:$LINENO: error: tk.h not found.  Please specify its location with --with-tkinclude" >&5
7090echo "$as_me: error: tk.h not found.  Please specify its location with --with-tkinclude" >&2;}
7091   { (exit 1); exit 1; }; }
7092    else
7093	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tkh}" >&5
7094echo "${ECHO_T}${ac_cv_c_tkh}" >&6; }
7095    fi
7096
7097    # Convert to a native path and substitute into the output files.
7098
7099    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
7100
7101    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7102
7103
7104
7105    if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
7106	# On Windows and Aqua, we need the X compat headers
7107	{ echo "$as_me:$LINENO: checking for X11 header files" >&5
7108echo $ECHO_N "checking for X11 header files... $ECHO_C" >&6; }
7109	if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
7110	    INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
7111	    TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7112
7113	fi
7114	{ echo "$as_me:$LINENO: result: ${INCLUDE_DIR_NATIVE}" >&5
7115echo "${ECHO_T}${INCLUDE_DIR_NATIVE}" >&6; }
7116    fi
7117
7118
7119    # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh}
7120
7121    { echo "$as_me:$LINENO: checking for Tk private include files" >&5
7122echo $ECHO_N "checking for Tk private include files... $ECHO_C" >&6; }
7123
7124    TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
7125    TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
7126
7127    # Check to see if tk<Plat>Port.h isn't already with the public headers
7128    # Don't look for tkInt.h because that resides with tk.h in the core
7129    # sources, but the <plat>Port headers are in a different directory
7130    if test "${TEA_PLATFORM}" = "windows" -a \
7131	-f "${ac_cv_c_tkh}/tkWinPort.h"; then
7132	result="private headers found with public headers"
7133    elif test "${TEA_PLATFORM}" = "unix" -a \
7134	-f "${ac_cv_c_tkh}/tkUnixPort.h"; then
7135	result="private headers found with public headers"
7136    else
7137	TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
7138	TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
7139	if test "${TEA_PLATFORM}" = "windows"; then
7140	    TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
7141	else
7142	    TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
7143	fi
7144	# Overwrite the previous TK_INCLUDES as this should capture both
7145	# public and private headers in the same set.
7146	# We want to ensure these are substituted so as not to require
7147	# any *_NATIVE vars be defined in the Makefile
7148	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
7149	# Detect and add ttk subdir
7150	if test -d "${TK_SRC_DIR}/generic/ttk"; then
7151	   TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\""
7152	fi
7153	if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
7154	   TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}"
7155	fi
7156	if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
7157	   TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\""
7158	fi
7159	if test "`uname -s`" = "Darwin"; then
7160	    # If Tk was built as a framework, attempt to use
7161	    # the framework's Headers and PrivateHeaders directories
7162	    case ${TK_DEFS} in
7163		*TK_FRAMEWORK*)
7164			if test -d "${TK_BIN_DIR}/Headers" -a \
7165				-d "${TK_BIN_DIR}/PrivateHeaders"; then
7166			    TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"
7167			else
7168			    TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
7169			fi
7170			;;
7171	    esac
7172	    result="Using ${TK_INCLUDES}"
7173	else
7174	    if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
7175	       { { echo "$as_me:$LINENO: error: Cannot find private header tkInt.h in ${TK_SRC_DIR}" >&5
7176echo "$as_me: error: Cannot find private header tkInt.h in ${TK_SRC_DIR}" >&2;}
7177   { (exit 1); exit 1; }; }
7178	    fi
7179	    result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}"
7180	fi
7181    fi
7182
7183
7184
7185
7186
7187    { echo "$as_me:$LINENO: result: ${result}" >&5
7188echo "${ECHO_T}${result}" >&6; }
7189
7190else
7191
7192    { echo "$as_me:$LINENO: checking for Tcl public headers" >&5
7193echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6; }
7194
7195
7196# Check whether --with-tclinclude was given.
7197if test "${with_tclinclude+set}" = set; then
7198  withval=$with_tclinclude; with_tclinclude=${withval}
7199fi
7200
7201
7202    if test "${ac_cv_c_tclh+set}" = set; then
7203  echo $ECHO_N "(cached) $ECHO_C" >&6
7204else
7205
7206	# Use the value from --with-tclinclude, if it was given
7207
7208	if test x"${with_tclinclude}" != x ; then
7209	    if test -f "${with_tclinclude}/tcl.h" ; then
7210		ac_cv_c_tclh=${with_tclinclude}
7211	    else
7212		{ { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
7213echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
7214   { (exit 1); exit 1; }; }
7215	    fi
7216	else
7217	    list=""
7218	    if test "`uname -s`" = "Darwin"; then
7219		# If Tcl was built as a framework, attempt to use
7220		# the framework's Headers directory
7221		case ${TCL_DEFS} in
7222		    *TCL_FRAMEWORK*)
7223			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
7224			;;
7225		esac
7226	    fi
7227
7228	    # Look in the source dir only if Tcl is not installed,
7229	    # and in that situation, look there before installed locations.
7230	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
7231		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
7232	    fi
7233
7234	    # Check order: pkg --prefix location, Tcl's --prefix location,
7235	    # relative to directory of tclConfig.sh.
7236
7237	    eval "temp_includedir=${includedir}"
7238	    list="$list \
7239		`ls -d ${temp_includedir}        2>/dev/null` \
7240		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7241		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
7242	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7243		list="$list /usr/local/include /usr/include"
7244		if test x"${TCL_INCLUDE_SPEC}" != x ; then
7245		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
7246		    list="$list `ls -d ${d} 2>/dev/null`"
7247		fi
7248	    fi
7249	    for i in $list ; do
7250		if test -f "$i/tcl.h" ; then
7251		    ac_cv_c_tclh=$i
7252		    break
7253		fi
7254	    done
7255	fi
7256
7257fi
7258
7259
7260    # Print a message based on how we determined the include path
7261
7262    if test x"${ac_cv_c_tclh}" = x ; then
7263	{ { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
7264echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
7265   { (exit 1); exit 1; }; }
7266    else
7267	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
7268echo "${ECHO_T}${ac_cv_c_tclh}" >&6; }
7269    fi
7270
7271    # Convert to a native path and substitute into the output files.
7272
7273    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
7274
7275    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7276
7277
7278
7279
7280    { echo "$as_me:$LINENO: checking for Tk public headers" >&5
7281echo $ECHO_N "checking for Tk public headers... $ECHO_C" >&6; }
7282
7283
7284# Check whether --with-tkinclude was given.
7285if test "${with_tkinclude+set}" = set; then
7286  withval=$with_tkinclude; with_tkinclude=${withval}
7287fi
7288
7289
7290    if test "${ac_cv_c_tkh+set}" = set; then
7291  echo $ECHO_N "(cached) $ECHO_C" >&6
7292else
7293
7294	# Use the value from --with-tkinclude, if it was given
7295
7296	if test x"${with_tkinclude}" != x ; then
7297	    if test -f "${with_tkinclude}/tk.h" ; then
7298		ac_cv_c_tkh=${with_tkinclude}
7299	    else
7300		{ { echo "$as_me:$LINENO: error: ${with_tkinclude} directory does not contain tk.h" >&5
7301echo "$as_me: error: ${with_tkinclude} directory does not contain tk.h" >&2;}
7302   { (exit 1); exit 1; }; }
7303	    fi
7304	else
7305	    list=""
7306	    if test "`uname -s`" = "Darwin"; then
7307		# If Tk was built as a framework, attempt to use
7308		# the framework's Headers directory.
7309		case ${TK_DEFS} in
7310		    *TK_FRAMEWORK*)
7311			list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
7312			;;
7313		esac
7314	    fi
7315
7316	    # Look in the source dir only if Tk is not installed,
7317	    # and in that situation, look there before installed locations.
7318	    if test -f "${TK_BIN_DIR}/Makefile" ; then
7319		list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
7320	    fi
7321
7322	    # Check order: pkg --prefix location, Tk's --prefix location,
7323	    # relative to directory of tkConfig.sh, Tcl's --prefix location,
7324	    # relative to directory of tclConfig.sh.
7325
7326	    eval "temp_includedir=${includedir}"
7327	    list="$list \
7328		`ls -d ${temp_includedir}        2>/dev/null` \
7329		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
7330		`ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
7331		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7332		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
7333	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7334		list="$list /usr/local/include /usr/include"
7335		if test x"${TK_INCLUDE_SPEC}" != x ; then
7336		    d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
7337		    list="$list `ls -d ${d} 2>/dev/null`"
7338		fi
7339	    fi
7340	    for i in $list ; do
7341		if test -f "$i/tk.h" ; then
7342		    ac_cv_c_tkh=$i
7343		    break
7344		fi
7345	    done
7346	fi
7347
7348fi
7349
7350
7351    # Print a message based on how we determined the include path
7352
7353    if test x"${ac_cv_c_tkh}" = x ; then
7354	{ { echo "$as_me:$LINENO: error: tk.h not found.  Please specify its location with --with-tkinclude" >&5
7355echo "$as_me: error: tk.h not found.  Please specify its location with --with-tkinclude" >&2;}
7356   { (exit 1); exit 1; }; }
7357    else
7358	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tkh}" >&5
7359echo "${ECHO_T}${ac_cv_c_tkh}" >&6; }
7360    fi
7361
7362    # Convert to a native path and substitute into the output files.
7363
7364    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
7365
7366    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7367
7368
7369
7370    if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
7371	# On Windows and Aqua, we need the X compat headers
7372	{ echo "$as_me:$LINENO: checking for X11 header files" >&5
7373echo $ECHO_N "checking for X11 header files... $ECHO_C" >&6; }
7374	if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
7375	    INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
7376	    TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7377
7378	fi
7379	{ echo "$as_me:$LINENO: result: ${INCLUDE_DIR_NATIVE}" >&5
7380echo "${ECHO_T}${INCLUDE_DIR_NATIVE}" >&6; }
7381    fi
7382
7383fi
7384
7385#--------------------------------------------------------------------
7386# Check whether --enable-threads or --disable-threads was given.
7387# So far only Tcl responds to this one.
7388#--------------------------------------------------------------------
7389
7390
7391    # Check whether --enable-threads was given.
7392if test "${enable_threads+set}" = set; then
7393  enableval=$enable_threads; tcl_ok=$enableval
7394else
7395  tcl_ok=yes
7396fi
7397
7398
7399    if test "${enable_threads+set}" = set; then
7400	enableval="$enable_threads"
7401	tcl_ok=$enableval
7402    else
7403	tcl_ok=yes
7404    fi
7405
7406    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
7407	TCL_THREADS=1
7408
7409	if test "${TEA_PLATFORM}" != "windows" ; then
7410	    # We are always OK on Windows, so check what this platform wants:
7411
7412	    # USE_THREAD_ALLOC tells us to try the special thread-based
7413	    # allocator that significantly reduces lock contention
7414
7415cat >>confdefs.h <<\_ACEOF
7416#define USE_THREAD_ALLOC 1
7417_ACEOF
7418
7419
7420cat >>confdefs.h <<\_ACEOF
7421#define _REENTRANT 1
7422_ACEOF
7423
7424	    if test "`uname -s`" = "SunOS" ; then
7425
7426cat >>confdefs.h <<\_ACEOF
7427#define _POSIX_PTHREAD_SEMANTICS 1
7428_ACEOF
7429
7430	    fi
7431
7432cat >>confdefs.h <<\_ACEOF
7433#define _THREAD_SAFE 1
7434_ACEOF
7435
7436	    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
7437echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
7438if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
7439  echo $ECHO_N "(cached) $ECHO_C" >&6
7440else
7441  ac_check_lib_save_LIBS=$LIBS
7442LIBS="-lpthread  $LIBS"
7443cat >conftest.$ac_ext <<_ACEOF
7444/* confdefs.h.  */
7445_ACEOF
7446cat confdefs.h >>conftest.$ac_ext
7447cat >>conftest.$ac_ext <<_ACEOF
7448/* end confdefs.h.  */
7449
7450/* Override any GCC internal prototype to avoid an error.
7451   Use char because int might match the return type of a GCC
7452   builtin and then its argument prototype would still apply.  */
7453#ifdef __cplusplus
7454extern "C"
7455#endif
7456char pthread_mutex_init ();
7457int
7458main ()
7459{
7460return pthread_mutex_init ();
7461  ;
7462  return 0;
7463}
7464_ACEOF
7465rm -f conftest.$ac_objext conftest$ac_exeext
7466if { (ac_try="$ac_link"
7467case "(($ac_try" in
7468  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7469  *) ac_try_echo=$ac_try;;
7470esac
7471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7472  (eval "$ac_link") 2>conftest.er1
7473  ac_status=$?
7474  grep -v '^ *+' conftest.er1 >conftest.err
7475  rm -f conftest.er1
7476  cat conftest.err >&5
7477  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7478  (exit $ac_status); } && {
7479	 test -z "$ac_c_werror_flag" ||
7480	 test ! -s conftest.err
7481       } && test -s conftest$ac_exeext &&
7482       $as_test_x conftest$ac_exeext; then
7483  ac_cv_lib_pthread_pthread_mutex_init=yes
7484else
7485  echo "$as_me: failed program was:" >&5
7486sed 's/^/| /' conftest.$ac_ext >&5
7487
7488	ac_cv_lib_pthread_pthread_mutex_init=no
7489fi
7490
7491rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7492      conftest$ac_exeext conftest.$ac_ext
7493LIBS=$ac_check_lib_save_LIBS
7494fi
7495{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
7496echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
7497if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
7498  tcl_ok=yes
7499else
7500  tcl_ok=no
7501fi
7502
7503	    if test "$tcl_ok" = "no"; then
7504		# Check a little harder for __pthread_mutex_init in the same
7505		# library, as some systems hide it there until pthread.h is
7506		# defined.  We could alternatively do an AC_TRY_COMPILE with
7507		# pthread.h, but that will work with libpthread really doesn't
7508		# exist, like AIX 4.2.  [Bug: 4359]
7509		{ echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
7510echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
7511if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
7512  echo $ECHO_N "(cached) $ECHO_C" >&6
7513else
7514  ac_check_lib_save_LIBS=$LIBS
7515LIBS="-lpthread  $LIBS"
7516cat >conftest.$ac_ext <<_ACEOF
7517/* confdefs.h.  */
7518_ACEOF
7519cat confdefs.h >>conftest.$ac_ext
7520cat >>conftest.$ac_ext <<_ACEOF
7521/* end confdefs.h.  */
7522
7523/* Override any GCC internal prototype to avoid an error.
7524   Use char because int might match the return type of a GCC
7525   builtin and then its argument prototype would still apply.  */
7526#ifdef __cplusplus
7527extern "C"
7528#endif
7529char __pthread_mutex_init ();
7530int
7531main ()
7532{
7533return __pthread_mutex_init ();
7534  ;
7535  return 0;
7536}
7537_ACEOF
7538rm -f conftest.$ac_objext conftest$ac_exeext
7539if { (ac_try="$ac_link"
7540case "(($ac_try" in
7541  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7542  *) ac_try_echo=$ac_try;;
7543esac
7544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7545  (eval "$ac_link") 2>conftest.er1
7546  ac_status=$?
7547  grep -v '^ *+' conftest.er1 >conftest.err
7548  rm -f conftest.er1
7549  cat conftest.err >&5
7550  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7551  (exit $ac_status); } && {
7552	 test -z "$ac_c_werror_flag" ||
7553	 test ! -s conftest.err
7554       } && test -s conftest$ac_exeext &&
7555       $as_test_x conftest$ac_exeext; then
7556  ac_cv_lib_pthread___pthread_mutex_init=yes
7557else
7558  echo "$as_me: failed program was:" >&5
7559sed 's/^/| /' conftest.$ac_ext >&5
7560
7561	ac_cv_lib_pthread___pthread_mutex_init=no
7562fi
7563
7564rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7565      conftest$ac_exeext conftest.$ac_ext
7566LIBS=$ac_check_lib_save_LIBS
7567fi
7568{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
7569echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
7570if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
7571  tcl_ok=yes
7572else
7573  tcl_ok=no
7574fi
7575
7576	    fi
7577
7578	    if test "$tcl_ok" = "yes"; then
7579		# The space is needed
7580		THREADS_LIBS=" -lpthread"
7581	    else
7582		{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
7583echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; }
7584if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
7585  echo $ECHO_N "(cached) $ECHO_C" >&6
7586else
7587  ac_check_lib_save_LIBS=$LIBS
7588LIBS="-lpthreads  $LIBS"
7589cat >conftest.$ac_ext <<_ACEOF
7590/* confdefs.h.  */
7591_ACEOF
7592cat confdefs.h >>conftest.$ac_ext
7593cat >>conftest.$ac_ext <<_ACEOF
7594/* end confdefs.h.  */
7595
7596/* Override any GCC internal prototype to avoid an error.
7597   Use char because int might match the return type of a GCC
7598   builtin and then its argument prototype would still apply.  */
7599#ifdef __cplusplus
7600extern "C"
7601#endif
7602char pthread_mutex_init ();
7603int
7604main ()
7605{
7606return pthread_mutex_init ();
7607  ;
7608  return 0;
7609}
7610_ACEOF
7611rm -f conftest.$ac_objext conftest$ac_exeext
7612if { (ac_try="$ac_link"
7613case "(($ac_try" in
7614  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7615  *) ac_try_echo=$ac_try;;
7616esac
7617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7618  (eval "$ac_link") 2>conftest.er1
7619  ac_status=$?
7620  grep -v '^ *+' conftest.er1 >conftest.err
7621  rm -f conftest.er1
7622  cat conftest.err >&5
7623  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624  (exit $ac_status); } && {
7625	 test -z "$ac_c_werror_flag" ||
7626	 test ! -s conftest.err
7627       } && test -s conftest$ac_exeext &&
7628       $as_test_x conftest$ac_exeext; then
7629  ac_cv_lib_pthreads_pthread_mutex_init=yes
7630else
7631  echo "$as_me: failed program was:" >&5
7632sed 's/^/| /' conftest.$ac_ext >&5
7633
7634	ac_cv_lib_pthreads_pthread_mutex_init=no
7635fi
7636
7637rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7638      conftest$ac_exeext conftest.$ac_ext
7639LIBS=$ac_check_lib_save_LIBS
7640fi
7641{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
7642echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
7643if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
7644  tcl_ok=yes
7645else
7646  tcl_ok=no
7647fi
7648
7649		if test "$tcl_ok" = "yes"; then
7650		    # The space is needed
7651		    THREADS_LIBS=" -lpthreads"
7652		else
7653		    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
7654echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; }
7655if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
7656  echo $ECHO_N "(cached) $ECHO_C" >&6
7657else
7658  ac_check_lib_save_LIBS=$LIBS
7659LIBS="-lc  $LIBS"
7660cat >conftest.$ac_ext <<_ACEOF
7661/* confdefs.h.  */
7662_ACEOF
7663cat confdefs.h >>conftest.$ac_ext
7664cat >>conftest.$ac_ext <<_ACEOF
7665/* end confdefs.h.  */
7666
7667/* Override any GCC internal prototype to avoid an error.
7668   Use char because int might match the return type of a GCC
7669   builtin and then its argument prototype would still apply.  */
7670#ifdef __cplusplus
7671extern "C"
7672#endif
7673char pthread_mutex_init ();
7674int
7675main ()
7676{
7677return pthread_mutex_init ();
7678  ;
7679  return 0;
7680}
7681_ACEOF
7682rm -f conftest.$ac_objext conftest$ac_exeext
7683if { (ac_try="$ac_link"
7684case "(($ac_try" in
7685  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7686  *) ac_try_echo=$ac_try;;
7687esac
7688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7689  (eval "$ac_link") 2>conftest.er1
7690  ac_status=$?
7691  grep -v '^ *+' conftest.er1 >conftest.err
7692  rm -f conftest.er1
7693  cat conftest.err >&5
7694  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7695  (exit $ac_status); } && {
7696	 test -z "$ac_c_werror_flag" ||
7697	 test ! -s conftest.err
7698       } && test -s conftest$ac_exeext &&
7699       $as_test_x conftest$ac_exeext; then
7700  ac_cv_lib_c_pthread_mutex_init=yes
7701else
7702  echo "$as_me: failed program was:" >&5
7703sed 's/^/| /' conftest.$ac_ext >&5
7704
7705	ac_cv_lib_c_pthread_mutex_init=no
7706fi
7707
7708rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7709      conftest$ac_exeext conftest.$ac_ext
7710LIBS=$ac_check_lib_save_LIBS
7711fi
7712{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
7713echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; }
7714if test $ac_cv_lib_c_pthread_mutex_init = yes; then
7715  tcl_ok=yes
7716else
7717  tcl_ok=no
7718fi
7719
7720		    if test "$tcl_ok" = "no"; then
7721			{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
7722echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; }
7723if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
7724  echo $ECHO_N "(cached) $ECHO_C" >&6
7725else
7726  ac_check_lib_save_LIBS=$LIBS
7727LIBS="-lc_r  $LIBS"
7728cat >conftest.$ac_ext <<_ACEOF
7729/* confdefs.h.  */
7730_ACEOF
7731cat confdefs.h >>conftest.$ac_ext
7732cat >>conftest.$ac_ext <<_ACEOF
7733/* end confdefs.h.  */
7734
7735/* Override any GCC internal prototype to avoid an error.
7736   Use char because int might match the return type of a GCC
7737   builtin and then its argument prototype would still apply.  */
7738#ifdef __cplusplus
7739extern "C"
7740#endif
7741char pthread_mutex_init ();
7742int
7743main ()
7744{
7745return pthread_mutex_init ();
7746  ;
7747  return 0;
7748}
7749_ACEOF
7750rm -f conftest.$ac_objext conftest$ac_exeext
7751if { (ac_try="$ac_link"
7752case "(($ac_try" in
7753  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7754  *) ac_try_echo=$ac_try;;
7755esac
7756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7757  (eval "$ac_link") 2>conftest.er1
7758  ac_status=$?
7759  grep -v '^ *+' conftest.er1 >conftest.err
7760  rm -f conftest.er1
7761  cat conftest.err >&5
7762  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7763  (exit $ac_status); } && {
7764	 test -z "$ac_c_werror_flag" ||
7765	 test ! -s conftest.err
7766       } && test -s conftest$ac_exeext &&
7767       $as_test_x conftest$ac_exeext; then
7768  ac_cv_lib_c_r_pthread_mutex_init=yes
7769else
7770  echo "$as_me: failed program was:" >&5
7771sed 's/^/| /' conftest.$ac_ext >&5
7772
7773	ac_cv_lib_c_r_pthread_mutex_init=no
7774fi
7775
7776rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7777      conftest$ac_exeext conftest.$ac_ext
7778LIBS=$ac_check_lib_save_LIBS
7779fi
7780{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
7781echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
7782if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
7783  tcl_ok=yes
7784else
7785  tcl_ok=no
7786fi
7787
7788			if test "$tcl_ok" = "yes"; then
7789			    # The space is needed
7790			    THREADS_LIBS=" -pthread"
7791			else
7792			    TCL_THREADS=0
7793			    { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
7794echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
7795			fi
7796		    fi
7797		fi
7798	    fi
7799	fi
7800    else
7801	TCL_THREADS=0
7802    fi
7803    # Do checking message here to not mess up interleaved configure output
7804    { echo "$as_me:$LINENO: checking for building with threads" >&5
7805echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; }
7806    if test "${TCL_THREADS}" = 1; then
7807
7808cat >>confdefs.h <<\_ACEOF
7809#define TCL_THREADS 1
7810_ACEOF
7811
7812	{ echo "$as_me:$LINENO: result: yes (default)" >&5
7813echo "${ECHO_T}yes (default)" >&6; }
7814    else
7815	{ echo "$as_me:$LINENO: result: no" >&5
7816echo "${ECHO_T}no" >&6; }
7817    fi
7818    # TCL_THREADS sanity checking.  See if our request for building with
7819    # threads is the same as the way Tcl was built.  If not, warn the user.
7820    case ${TCL_DEFS} in
7821	*THREADS=1*)
7822	    if test "${TCL_THREADS}" = "0"; then
7823		{ echo "$as_me:$LINENO: WARNING:
7824    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7825    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
7826echo "$as_me: WARNING:
7827    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7828    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
7829	    fi
7830	    ;;
7831	*)
7832	    if test "${TCL_THREADS}" = "1"; then
7833		{ echo "$as_me:$LINENO: WARNING:
7834    --enable-threads requested, but building against a Tcl that is NOT
7835    thread-enabled.  This is an OK configuration that will also run in
7836    a thread-enabled core." >&5
7837echo "$as_me: WARNING:
7838    --enable-threads requested, but building against a Tcl that is NOT
7839    thread-enabled.  This is an OK configuration that will also run in
7840    a thread-enabled core." >&2;}
7841	    fi
7842	    ;;
7843    esac
7844
7845
7846
7847#--------------------------------------------------------------------
7848# The statement below defines a collection of symbols related to
7849# building as a shared library instead of a static library.
7850#--------------------------------------------------------------------
7851
7852
7853    { echo "$as_me:$LINENO: checking how to build libraries" >&5
7854echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; }
7855    # Check whether --enable-shared was given.
7856if test "${enable_shared+set}" = set; then
7857  enableval=$enable_shared; tcl_ok=$enableval
7858else
7859  tcl_ok=yes
7860fi
7861
7862
7863    if test "${enable_shared+set}" = set; then
7864	enableval="$enable_shared"
7865	tcl_ok=$enableval
7866    else
7867	tcl_ok=yes
7868    fi
7869
7870    if test "$tcl_ok" = "yes" ; then
7871	{ echo "$as_me:$LINENO: result: shared" >&5
7872echo "${ECHO_T}shared" >&6; }
7873	SHARED_BUILD=1
7874    else
7875	{ echo "$as_me:$LINENO: result: static" >&5
7876echo "${ECHO_T}static" >&6; }
7877	SHARED_BUILD=0
7878
7879cat >>confdefs.h <<\_ACEOF
7880#define STATIC_BUILD 1
7881_ACEOF
7882
7883    fi
7884
7885
7886
7887#--------------------------------------------------------------------
7888# This macro figures out what flags to use with the compiler/linker
7889# when building shared/static debug/optimized objects.  This information
7890# can be taken from the tclConfig.sh file, but this figures it all out.
7891#--------------------------------------------------------------------
7892
7893
7894
7895
7896    # Step 0.a: Enable 64 bit support?
7897
7898    { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
7899echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; }
7900    # Check whether --enable-64bit was given.
7901if test "${enable_64bit+set}" = set; then
7902  enableval=$enable_64bit; do64bit=$enableval
7903else
7904  do64bit=no
7905fi
7906
7907    { echo "$as_me:$LINENO: result: $do64bit" >&5
7908echo "${ECHO_T}$do64bit" >&6; }
7909
7910    # Step 0.b: Enable Solaris 64 bit VIS support?
7911
7912    { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
7913echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; }
7914    # Check whether --enable-64bit-vis was given.
7915if test "${enable_64bit_vis+set}" = set; then
7916  enableval=$enable_64bit_vis; do64bitVIS=$enableval
7917else
7918  do64bitVIS=no
7919fi
7920
7921    { echo "$as_me:$LINENO: result: $do64bitVIS" >&5
7922echo "${ECHO_T}$do64bitVIS" >&6; }
7923    # Force 64bit on with VIS
7924    if test "$do64bitVIS" = "yes"; then
7925  do64bit=yes
7926fi
7927
7928
7929    # Step 0.c: Check if visibility support is available. Do this here so
7930    # that platform specific alternatives can be used below if this fails.
7931
7932    { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
7933echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; }
7934if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
7935  echo $ECHO_N "(cached) $ECHO_C" >&6
7936else
7937
7938	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
7939	cat >conftest.$ac_ext <<_ACEOF
7940/* confdefs.h.  */
7941_ACEOF
7942cat confdefs.h >>conftest.$ac_ext
7943cat >>conftest.$ac_ext <<_ACEOF
7944/* end confdefs.h.  */
7945
7946	    extern __attribute__((__visibility__("hidden"))) void f(void);
7947	    void f(void) {}
7948int
7949main ()
7950{
7951f();
7952  ;
7953  return 0;
7954}
7955_ACEOF
7956rm -f conftest.$ac_objext conftest$ac_exeext
7957if { (ac_try="$ac_link"
7958case "(($ac_try" in
7959  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7960  *) ac_try_echo=$ac_try;;
7961esac
7962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7963  (eval "$ac_link") 2>conftest.er1
7964  ac_status=$?
7965  grep -v '^ *+' conftest.er1 >conftest.err
7966  rm -f conftest.er1
7967  cat conftest.err >&5
7968  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7969  (exit $ac_status); } && {
7970	 test -z "$ac_c_werror_flag" ||
7971	 test ! -s conftest.err
7972       } && test -s conftest$ac_exeext &&
7973       $as_test_x conftest$ac_exeext; then
7974  tcl_cv_cc_visibility_hidden=yes
7975else
7976  echo "$as_me: failed program was:" >&5
7977sed 's/^/| /' conftest.$ac_ext >&5
7978
7979	tcl_cv_cc_visibility_hidden=no
7980fi
7981
7982rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7983      conftest$ac_exeext conftest.$ac_ext
7984	CFLAGS=$hold_cflags
7985fi
7986{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
7987echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; }
7988    if test $tcl_cv_cc_visibility_hidden = yes; then
7989
7990
7991cat >>confdefs.h <<\_ACEOF
7992#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
7993_ACEOF
7994
7995
7996fi
7997
7998
7999    # Step 0.d: Disable -rpath support?
8000
8001    { echo "$as_me:$LINENO: checking if rpath support is requested" >&5
8002echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; }
8003    # Check whether --enable-rpath was given.
8004if test "${enable_rpath+set}" = set; then
8005  enableval=$enable_rpath; doRpath=$enableval
8006else
8007  doRpath=yes
8008fi
8009
8010    { echo "$as_me:$LINENO: result: $doRpath" >&5
8011echo "${ECHO_T}$doRpath" >&6; }
8012
8013    # TEA specific: Cross-compiling options for Windows/CE builds?
8014
8015    if test "${TEA_PLATFORM}" = windows; then
8016
8017	{ echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
8018echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6; }
8019	# Check whether --enable-wince was given.
8020if test "${enable_wince+set}" = set; then
8021  enableval=$enable_wince; doWince=$enableval
8022else
8023  doWince=no
8024fi
8025
8026	{ echo "$as_me:$LINENO: result: $doWince" >&5
8027echo "${ECHO_T}$doWince" >&6; }
8028
8029fi
8030
8031
8032    # Set the variable "system" to hold the name and version number
8033    # for the system.
8034
8035
8036    { echo "$as_me:$LINENO: checking system version" >&5
8037echo $ECHO_N "checking system version... $ECHO_C" >&6; }
8038if test "${tcl_cv_sys_version+set}" = set; then
8039  echo $ECHO_N "(cached) $ECHO_C" >&6
8040else
8041
8042	# TEA specific:
8043	if test "${TEA_PLATFORM}" = "windows" ; then
8044	    tcl_cv_sys_version=windows
8045	else
8046	    tcl_cv_sys_version=`uname -s`-`uname -r`
8047	    if test "$?" -ne 0 ; then
8048		{ echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
8049echo "$as_me: WARNING: can't find uname command" >&2;}
8050		tcl_cv_sys_version=unknown
8051	    else
8052		if test "`uname -s`" = "AIX" ; then
8053		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
8054		fi
8055	    fi
8056	fi
8057
8058fi
8059{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
8060echo "${ECHO_T}$tcl_cv_sys_version" >&6; }
8061    system=$tcl_cv_sys_version
8062
8063
8064    # Require ranlib early so we can override it in special cases below.
8065
8066
8067
8068    # Set configuration options based on system name and version.
8069    # This is similar to Tcl's unix/tcl.m4 except that we've added a
8070    # "windows" case and removed some core-only vars.
8071
8072    do64bit_ok=no
8073    # default to '{$LIBS}' and set to "" on per-platform necessary basis
8074    SHLIB_LD_LIBS='${LIBS}'
8075    # When ld needs options to work in 64-bit mode, put them in
8076    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
8077    # is disabled by the user. [Bug 1016796]
8078    LDFLAGS_ARCH=""
8079    UNSHARED_LIB_SUFFIX=""
8080    # TEA specific: use PACKAGE_VERSION instead of VERSION
8081    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
8082    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
8083    TCL_LIB_VERSIONS_OK=ok
8084    CFLAGS_DEBUG=-g
8085    CFLAGS_OPTIMIZE=-O
8086    if test "$GCC" = yes; then
8087
8088	# TEA specific:
8089	CFLAGS_OPTIMIZE=-O2
8090	CFLAGS_WARNING="-Wall"
8091
8092else
8093  CFLAGS_WARNING=""
8094fi
8095
8096    # Extract the first word of "ar", so it can be a program name with args.
8097set dummy ar; ac_word=$2
8098{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8099echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
8100if test "${ac_cv_prog_AR+set}" = set; then
8101  echo $ECHO_N "(cached) $ECHO_C" >&6
8102else
8103  if test -n "$AR"; then
8104  ac_cv_prog_AR="$AR" # Let the user override the test.
8105else
8106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8107for as_dir in $PATH
8108do
8109  IFS=$as_save_IFS
8110  test -z "$as_dir" && as_dir=.
8111  for ac_exec_ext in '' $ac_executable_extensions; do
8112  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8113    ac_cv_prog_AR="ar"
8114    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8115    break 2
8116  fi
8117done
8118done
8119IFS=$as_save_IFS
8120
8121fi
8122fi
8123AR=$ac_cv_prog_AR
8124if test -n "$AR"; then
8125  { echo "$as_me:$LINENO: result: $AR" >&5
8126echo "${ECHO_T}$AR" >&6; }
8127else
8128  { echo "$as_me:$LINENO: result: no" >&5
8129echo "${ECHO_T}no" >&6; }
8130fi
8131
8132
8133    STLIB_LD='${AR} cr'
8134    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
8135    if test "x$SHLIB_VERSION" = x; then
8136  SHLIB_VERSION="1.0"
8137fi
8138
8139    case $system in
8140	# TEA specific:
8141	windows)
8142	    # This is a 2-stage check to make sure we have the 64-bit SDK
8143	    # We have to know where the SDK is installed.
8144	    # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
8145	    # MACHINE is IX86 for LINK, but this is used by the manifest,
8146	    # which requires x86|amd64|ia64.
8147	    MACHINE="X86"
8148	    if test "$do64bit" != "no" ; then
8149		if test "x${MSSDK}x" = "xx" ; then
8150		    MSSDK="C:/Progra~1/Microsoft Platform SDK"
8151		fi
8152		MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
8153		PATH64=""
8154		case "$do64bit" in
8155		    amd64|x64|yes)
8156			MACHINE="AMD64" ; # default to AMD64 64-bit build
8157			PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
8158			;;
8159		    ia64)
8160			MACHINE="IA64"
8161			PATH64="${MSSDK}/Bin/Win64"
8162			;;
8163		esac
8164		if test ! -d "${PATH64}" ; then
8165		    { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
8166echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
8167		    { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
8168echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
8169		    do64bit="no"
8170		else
8171		    { echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
8172echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6; }
8173		    do64bit_ok="yes"
8174		fi
8175	    fi
8176
8177	    if test "$doWince" != "no" ; then
8178		if test "$do64bit" != "no" ; then
8179		    { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
8180echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
8181   { (exit 1); exit 1; }; }
8182		fi
8183		if test "$GCC" = "yes" ; then
8184		    { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
8185echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
8186   { (exit 1); exit 1; }; }
8187		fi
8188
8189    # First, look for one uninstalled.
8190    # the alternative search directory is invoked by --with-celib
8191
8192    if test x"${no_celib}" = x ; then
8193	# we reset no_celib in case something fails here
8194	no_celib=true
8195
8196# Check whether --with-celib was given.
8197if test "${with_celib+set}" = set; then
8198  withval=$with_celib; with_celibconfig=${withval}
8199fi
8200
8201	{ echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
8202echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6; }
8203	if test "${ac_cv_c_celibconfig+set}" = set; then
8204  echo $ECHO_N "(cached) $ECHO_C" >&6
8205else
8206
8207	    # First check to see if --with-celibconfig was specified.
8208	    if test x"${with_celibconfig}" != x ; then
8209		if test -d "${with_celibconfig}/inc" ; then
8210		    ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
8211		else
8212		    { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
8213echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
8214   { (exit 1); exit 1; }; }
8215		fi
8216	    fi
8217
8218	    # then check for a celib library
8219	    if test x"${ac_cv_c_celibconfig}" = x ; then
8220		for i in \
8221			../celib-palm-3.0 \
8222			../celib \
8223			../../celib-palm-3.0 \
8224			../../celib \
8225			`ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
8226			${srcdir}/../celib-palm-3.0 \
8227			${srcdir}/../celib \
8228			`ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
8229			; do
8230		    if test -d "$i/inc" ; then
8231			ac_cv_c_celibconfig=`(cd $i; pwd)`
8232			break
8233		    fi
8234		done
8235	    fi
8236
8237fi
8238
8239	if test x"${ac_cv_c_celibconfig}" = x ; then
8240	    { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
8241echo "$as_me: error: Cannot find celib support library directory" >&2;}
8242   { (exit 1); exit 1; }; }
8243	else
8244	    no_celib=
8245	    CELIB_DIR=${ac_cv_c_celibconfig}
8246	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
8247	    { echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
8248echo "${ECHO_T}found $CELIB_DIR" >&6; }
8249	fi
8250    fi
8251
8252		# Set defaults for common evc4/PPC2003 setup
8253		# Currently Tcl requires 300+, possibly 420+ for sockets
8254		CEVERSION=420; 		# could be 211 300 301 400 420 ...
8255		TARGETCPU=ARMV4;	# could be ARMV4 ARM MIPS SH3 X86 ...
8256		ARCH=ARM;		# could be ARM MIPS X86EM ...
8257		PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
8258		if test "$doWince" != "yes"; then
8259		    # If !yes then the user specified something
8260		    # Reset ARCH to allow user to skip specifying it
8261		    ARCH=
8262		    eval `echo $doWince | awk -F, '{ \
8263	    if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
8264	    if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
8265	    if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
8266	    if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
8267	    if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
8268		    }'`
8269		    if test "x${ARCH}" = "x" ; then
8270			ARCH=$TARGETCPU;
8271		    fi
8272		fi
8273		OSVERSION=WCE$CEVERSION;
8274	    	if test "x${WCEROOT}" = "x" ; then
8275			WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
8276		    if test ! -d "${WCEROOT}" ; then
8277			WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
8278		    fi
8279		fi
8280		if test "x${SDKROOT}" = "x" ; then
8281		    SDKROOT="C:/Program Files/Windows CE Tools"
8282		    if test ! -d "${SDKROOT}" ; then
8283			SDKROOT="C:/Windows CE Tools"
8284		    fi
8285		fi
8286		WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
8287		SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
8288		if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
8289		    -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
8290		    { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
8291echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
8292   { (exit 1); exit 1; }; }
8293		    doWince="no"
8294		else
8295		    # We could PATH_NOSPACE these, but that's not important,
8296		    # as long as we quote them when used.
8297		    CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
8298		    if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
8299			CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
8300		    fi
8301		    CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
8302    		fi
8303	    fi
8304
8305	    if test "$GCC" != "yes" ; then
8306	        if test "${SHARED_BUILD}" = "0" ; then
8307		    runtime=-MT
8308	        else
8309		    runtime=-MD
8310	        fi
8311
8312                if test "$do64bit" != "no" ; then
8313		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
8314		    CC="\"${PATH64}/cl.exe\""
8315		    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
8316		    RC="\"${MSSDK}/bin/rc.exe\""
8317		    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
8318		    LINKBIN="\"${PATH64}/link.exe\""
8319		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
8320		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
8321		    # Avoid 'unresolved external symbol __security_cookie'
8322		    # errors, c.f. http://support.microsoft.com/?id=894573
8323
8324    vars="bufferoverflowU.lib"
8325    for i in $vars; do
8326	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
8327	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
8328	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
8329	fi
8330	PKG_LIBS="$PKG_LIBS $i"
8331    done
8332
8333
8334		elif test "$doWince" != "no" ; then
8335		    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
8336		    if test "${TARGETCPU}" = "X86"; then
8337			CC="\"${CEBINROOT}/cl.exe\""
8338		    else
8339			CC="\"${CEBINROOT}/cl${ARCH}.exe\""
8340		    fi
8341		    CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
8342		    RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
8343		    arch=`echo ${ARCH} | awk '{print tolower($0)}'`
8344		    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
8345		    if test "${SHARED_BUILD}" = "1" ; then
8346			# Static CE builds require static celib as well
8347		    	defs="${defs} _DLL"
8348		    fi
8349		    for i in $defs ; do
8350
8351cat >>confdefs.h <<_ACEOF
8352#define $i 1
8353_ACEOF
8354
8355		    done
8356
8357cat >>confdefs.h <<_ACEOF
8358#define _WIN32_WCE $CEVERSION
8359_ACEOF
8360
8361
8362cat >>confdefs.h <<_ACEOF
8363#define UNDER_CE $CEVERSION
8364_ACEOF
8365
8366		    CFLAGS_DEBUG="-nologo -Zi -Od"
8367		    CFLAGS_OPTIMIZE="-nologo -Ox"
8368		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
8369		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
8370		    LINKBIN="\"${CEBINROOT}/link.exe\""
8371
8372		else
8373		    RC="rc"
8374		    lflags="-nologo"
8375    		    LINKBIN="link"
8376		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
8377		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
8378		fi
8379	    fi
8380
8381	    if test "$GCC" = "yes"; then
8382		# mingw gcc mode
8383		RC="windres"
8384		CFLAGS_DEBUG="-g"
8385		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8386		SHLIB_LD="$CC -shared"
8387		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8388		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
8389		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
8390	    else
8391		SHLIB_LD="${LINKBIN} -dll ${lflags}"
8392		# link -lib only works when -lib is the first arg
8393		STLIB_LD="${LINKBIN} -lib ${lflags}"
8394		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
8395		PATHTYPE=-w
8396		# For information on what debugtype is most useful, see:
8397		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
8398		# and also
8399		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
8400		# This essentially turns it all on.
8401		LDFLAGS_DEBUG="-debug -debugtype:cv"
8402		LDFLAGS_OPTIMIZE="-release"
8403		if test "$doWince" != "no" ; then
8404		    LDFLAGS_CONSOLE="-link ${lflags}"
8405		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
8406		else
8407		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
8408		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
8409		fi
8410	    fi
8411
8412	    SHLIB_SUFFIX=".dll"
8413	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
8414
8415	    TCL_LIB_VERSIONS_OK=nodots
8416    	    ;;
8417	AIX-*)
8418	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
8419
8420		# AIX requires the _r compiler when gcc isn't being used
8421		case "${CC}" in
8422		    *_r|*_r\ *)
8423			# ok ...
8424			;;
8425		    *)
8426			# Make sure only first arg gets _r
8427		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
8428			;;
8429		esac
8430		{ echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
8431echo "${ECHO_T}Using $CC for compiling with threads" >&6; }
8432
8433fi
8434
8435	    LIBS="$LIBS -lc"
8436	    SHLIB_CFLAGS=""
8437	    SHLIB_SUFFIX=".so"
8438
8439	    LD_LIBRARY_PATH_VAR="LIBPATH"
8440
8441	    # Check to enable 64-bit flags for compiler/linker
8442	    if test "$do64bit" = yes; then
8443
8444		if test "$GCC" = yes; then
8445
8446		    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8447echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8448
8449else
8450
8451		    do64bit_ok=yes
8452		    CFLAGS="$CFLAGS -q64"
8453		    LDFLAGS_ARCH="-q64"
8454		    RANLIB="${RANLIB} -X64"
8455		    AR="${AR} -X64"
8456		    SHLIB_LD_FLAGS="-b64"
8457
8458fi
8459
8460
8461fi
8462
8463
8464	    if test "`uname -m`" = ia64; then
8465
8466		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
8467		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8468		if test "$GCC" = yes; then
8469
8470		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8471
8472else
8473
8474		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
8475
8476fi
8477
8478		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8479
8480else
8481
8482		if test "$GCC" = yes; then
8483
8484		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
8485
8486else
8487
8488		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
8489		    LDFLAGS="$LDFLAGS -brtl"
8490
8491fi
8492
8493		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
8494		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
8495		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8496
8497fi
8498
8499	    ;;
8500	BeOS*)
8501	    SHLIB_CFLAGS="-fPIC"
8502	    SHLIB_LD='${CC} -nostart'
8503	    SHLIB_SUFFIX=".so"
8504
8505	    #-----------------------------------------------------------
8506	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
8507	    # -lsocket, even if the network functions are in -lnet which
8508	    # is always linked to, for compatibility.
8509	    #-----------------------------------------------------------
8510	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
8511echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; }
8512if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
8513  echo $ECHO_N "(cached) $ECHO_C" >&6
8514else
8515  ac_check_lib_save_LIBS=$LIBS
8516LIBS="-lbind  $LIBS"
8517cat >conftest.$ac_ext <<_ACEOF
8518/* confdefs.h.  */
8519_ACEOF
8520cat confdefs.h >>conftest.$ac_ext
8521cat >>conftest.$ac_ext <<_ACEOF
8522/* end confdefs.h.  */
8523
8524/* Override any GCC internal prototype to avoid an error.
8525   Use char because int might match the return type of a GCC
8526   builtin and then its argument prototype would still apply.  */
8527#ifdef __cplusplus
8528extern "C"
8529#endif
8530char inet_ntoa ();
8531int
8532main ()
8533{
8534return inet_ntoa ();
8535  ;
8536  return 0;
8537}
8538_ACEOF
8539rm -f conftest.$ac_objext conftest$ac_exeext
8540if { (ac_try="$ac_link"
8541case "(($ac_try" in
8542  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8543  *) ac_try_echo=$ac_try;;
8544esac
8545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8546  (eval "$ac_link") 2>conftest.er1
8547  ac_status=$?
8548  grep -v '^ *+' conftest.er1 >conftest.err
8549  rm -f conftest.er1
8550  cat conftest.err >&5
8551  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8552  (exit $ac_status); } && {
8553	 test -z "$ac_c_werror_flag" ||
8554	 test ! -s conftest.err
8555       } && test -s conftest$ac_exeext &&
8556       $as_test_x conftest$ac_exeext; then
8557  ac_cv_lib_bind_inet_ntoa=yes
8558else
8559  echo "$as_me: failed program was:" >&5
8560sed 's/^/| /' conftest.$ac_ext >&5
8561
8562	ac_cv_lib_bind_inet_ntoa=no
8563fi
8564
8565rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8566      conftest$ac_exeext conftest.$ac_ext
8567LIBS=$ac_check_lib_save_LIBS
8568fi
8569{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
8570echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; }
8571if test $ac_cv_lib_bind_inet_ntoa = yes; then
8572  LIBS="$LIBS -lbind -lsocket"
8573fi
8574
8575	    ;;
8576	BSD/OS-4.*)
8577	    SHLIB_CFLAGS="-export-dynamic -fPIC"
8578	    SHLIB_LD='${CC} -shared'
8579	    SHLIB_SUFFIX=".so"
8580	    LDFLAGS="$LDFLAGS -export-dynamic"
8581	    CC_SEARCH_FLAGS=""
8582	    LD_SEARCH_FLAGS=""
8583	    ;;
8584	CYGWIN_*)
8585	    SHLIB_CFLAGS=""
8586	    SHLIB_LD='${CC} -shared'
8587	    SHLIB_SUFFIX=".dll"
8588	    EXE_SUFFIX=".exe"
8589	    CC_SEARCH_FLAGS=""
8590	    LD_SEARCH_FLAGS=""
8591	    ;;
8592	Haiku*)
8593	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8594	    SHLIB_CFLAGS="-fPIC"
8595	    SHLIB_SUFFIX=".so"
8596	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
8597	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
8598echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6; }
8599if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
8600  echo $ECHO_N "(cached) $ECHO_C" >&6
8601else
8602  ac_check_lib_save_LIBS=$LIBS
8603LIBS="-lnetwork  $LIBS"
8604cat >conftest.$ac_ext <<_ACEOF
8605/* confdefs.h.  */
8606_ACEOF
8607cat confdefs.h >>conftest.$ac_ext
8608cat >>conftest.$ac_ext <<_ACEOF
8609/* end confdefs.h.  */
8610
8611/* Override any GCC internal prototype to avoid an error.
8612   Use char because int might match the return type of a GCC
8613   builtin and then its argument prototype would still apply.  */
8614#ifdef __cplusplus
8615extern "C"
8616#endif
8617char inet_ntoa ();
8618int
8619main ()
8620{
8621return inet_ntoa ();
8622  ;
8623  return 0;
8624}
8625_ACEOF
8626rm -f conftest.$ac_objext conftest$ac_exeext
8627if { (ac_try="$ac_link"
8628case "(($ac_try" in
8629  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8630  *) ac_try_echo=$ac_try;;
8631esac
8632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8633  (eval "$ac_link") 2>conftest.er1
8634  ac_status=$?
8635  grep -v '^ *+' conftest.er1 >conftest.err
8636  rm -f conftest.er1
8637  cat conftest.err >&5
8638  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8639  (exit $ac_status); } && {
8640	 test -z "$ac_c_werror_flag" ||
8641	 test ! -s conftest.err
8642       } && test -s conftest$ac_exeext &&
8643       $as_test_x conftest$ac_exeext; then
8644  ac_cv_lib_network_inet_ntoa=yes
8645else
8646  echo "$as_me: failed program was:" >&5
8647sed 's/^/| /' conftest.$ac_ext >&5
8648
8649	ac_cv_lib_network_inet_ntoa=no
8650fi
8651
8652rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8653      conftest$ac_exeext conftest.$ac_ext
8654LIBS=$ac_check_lib_save_LIBS
8655fi
8656{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5
8657echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6; }
8658if test $ac_cv_lib_network_inet_ntoa = yes; then
8659  LIBS="$LIBS -lnetwork"
8660fi
8661
8662	    ;;
8663	HP-UX-*.11.*)
8664	    # Use updated header definitions where possible
8665
8666cat >>confdefs.h <<\_ACEOF
8667#define _XOPEN_SOURCE_EXTENDED 1
8668_ACEOF
8669
8670	    # TEA specific: Needed by Tcl, but not most extensions
8671	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
8672	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
8673
8674	    if test "`uname -m`" = ia64; then
8675
8676		SHLIB_SUFFIX=".so"
8677		# Use newer C++ library for C++ extensions
8678		#if test "$GCC" != "yes" ; then
8679		#   CPPFLAGS="-AA"
8680		#fi
8681
8682else
8683
8684		SHLIB_SUFFIX=".sl"
8685
8686fi
8687
8688	    { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8689echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
8690if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8691  echo $ECHO_N "(cached) $ECHO_C" >&6
8692else
8693  ac_check_lib_save_LIBS=$LIBS
8694LIBS="-ldld  $LIBS"
8695cat >conftest.$ac_ext <<_ACEOF
8696/* confdefs.h.  */
8697_ACEOF
8698cat confdefs.h >>conftest.$ac_ext
8699cat >>conftest.$ac_ext <<_ACEOF
8700/* end confdefs.h.  */
8701
8702/* Override any GCC internal prototype to avoid an error.
8703   Use char because int might match the return type of a GCC
8704   builtin and then its argument prototype would still apply.  */
8705#ifdef __cplusplus
8706extern "C"
8707#endif
8708char shl_load ();
8709int
8710main ()
8711{
8712return shl_load ();
8713  ;
8714  return 0;
8715}
8716_ACEOF
8717rm -f conftest.$ac_objext conftest$ac_exeext
8718if { (ac_try="$ac_link"
8719case "(($ac_try" in
8720  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8721  *) ac_try_echo=$ac_try;;
8722esac
8723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8724  (eval "$ac_link") 2>conftest.er1
8725  ac_status=$?
8726  grep -v '^ *+' conftest.er1 >conftest.err
8727  rm -f conftest.er1
8728  cat conftest.err >&5
8729  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8730  (exit $ac_status); } && {
8731	 test -z "$ac_c_werror_flag" ||
8732	 test ! -s conftest.err
8733       } && test -s conftest$ac_exeext &&
8734       $as_test_x conftest$ac_exeext; then
8735  ac_cv_lib_dld_shl_load=yes
8736else
8737  echo "$as_me: failed program was:" >&5
8738sed 's/^/| /' conftest.$ac_ext >&5
8739
8740	ac_cv_lib_dld_shl_load=no
8741fi
8742
8743rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8744      conftest$ac_exeext conftest.$ac_ext
8745LIBS=$ac_check_lib_save_LIBS
8746fi
8747{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
8748echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
8749if test $ac_cv_lib_dld_shl_load = yes; then
8750  tcl_ok=yes
8751else
8752  tcl_ok=no
8753fi
8754
8755	    if test "$tcl_ok" = yes; then
8756
8757		LDFLAGS="$LDFLAGS -E"
8758		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
8759		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
8760		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
8761
8762fi
8763
8764	    if test "$GCC" = yes; then
8765
8766		SHLIB_LD='${CC} -shared'
8767		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8768
8769else
8770
8771		CFLAGS="$CFLAGS -z"
8772		# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
8773		#CFLAGS="$CFLAGS +DAportable"
8774		SHLIB_CFLAGS="+z"
8775		SHLIB_LD="ld -b"
8776
8777fi
8778
8779
8780	    # Check to enable 64-bit flags for compiler/linker
8781	    if test "$do64bit" = "yes"; then
8782
8783		if test "$GCC" = yes; then
8784
8785		    case `${CC} -dumpmachine` in
8786			hppa64*)
8787			    # 64-bit gcc in use.  Fix flags for GNU ld.
8788			    do64bit_ok=yes
8789			    SHLIB_LD='${CC} -shared'
8790			    if test $doRpath = yes; then
8791
8792				CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8793fi
8794
8795			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8796			    ;;
8797			*)
8798			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8799echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8800			    ;;
8801		    esac
8802
8803else
8804
8805		    do64bit_ok=yes
8806		    CFLAGS="$CFLAGS +DD64"
8807		    LDFLAGS_ARCH="+DD64"
8808
8809fi
8810
8811
8812fi
8813 ;;
8814	IRIX-6.*)
8815	    SHLIB_CFLAGS=""
8816	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8817	    SHLIB_SUFFIX=".so"
8818	    if test $doRpath = yes; then
8819
8820		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8821		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8822fi
8823
8824	    if test "$GCC" = yes; then
8825
8826		CFLAGS="$CFLAGS -mabi=n32"
8827		LDFLAGS="$LDFLAGS -mabi=n32"
8828
8829else
8830
8831		case $system in
8832		    IRIX-6.3)
8833			# Use to build 6.2 compatible binaries on 6.3.
8834			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
8835			;;
8836		    *)
8837			CFLAGS="$CFLAGS -n32"
8838			;;
8839		esac
8840		LDFLAGS="$LDFLAGS -n32"
8841
8842fi
8843
8844	    ;;
8845	IRIX64-6.*)
8846	    SHLIB_CFLAGS=""
8847	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8848	    SHLIB_SUFFIX=".so"
8849	    if test $doRpath = yes; then
8850
8851		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8852		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8853fi
8854
8855
8856	    # Check to enable 64-bit flags for compiler/linker
8857
8858	    if test "$do64bit" = yes; then
8859
8860	        if test "$GCC" = yes; then
8861
8862	            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
8863echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
8864
8865else
8866
8867	            do64bit_ok=yes
8868	            SHLIB_LD="ld -64 -shared -rdata_shared"
8869	            CFLAGS="$CFLAGS -64"
8870	            LDFLAGS_ARCH="-64"
8871
8872fi
8873
8874
8875fi
8876
8877	    ;;
8878	Linux*)
8879	    SHLIB_CFLAGS="-fPIC"
8880	    SHLIB_SUFFIX=".so"
8881
8882	    # TEA specific:
8883	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8884
8885	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8886	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
8887	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8888	    if test $doRpath = yes; then
8889
8890		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8891fi
8892
8893	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8894	    if test "`uname -m`" = "alpha"; then
8895  CFLAGS="$CFLAGS -mieee"
8896fi
8897
8898	    if test $do64bit = yes; then
8899
8900		{ echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
8901echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; }
8902if test "${tcl_cv_cc_m64+set}" = set; then
8903  echo $ECHO_N "(cached) $ECHO_C" >&6
8904else
8905
8906		    hold_cflags=$CFLAGS
8907		    CFLAGS="$CFLAGS -m64"
8908		    cat >conftest.$ac_ext <<_ACEOF
8909/* confdefs.h.  */
8910_ACEOF
8911cat confdefs.h >>conftest.$ac_ext
8912cat >>conftest.$ac_ext <<_ACEOF
8913/* end confdefs.h.  */
8914
8915int
8916main ()
8917{
8918
8919  ;
8920  return 0;
8921}
8922_ACEOF
8923rm -f conftest.$ac_objext conftest$ac_exeext
8924if { (ac_try="$ac_link"
8925case "(($ac_try" in
8926  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8927  *) ac_try_echo=$ac_try;;
8928esac
8929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8930  (eval "$ac_link") 2>conftest.er1
8931  ac_status=$?
8932  grep -v '^ *+' conftest.er1 >conftest.err
8933  rm -f conftest.er1
8934  cat conftest.err >&5
8935  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8936  (exit $ac_status); } && {
8937	 test -z "$ac_c_werror_flag" ||
8938	 test ! -s conftest.err
8939       } && test -s conftest$ac_exeext &&
8940       $as_test_x conftest$ac_exeext; then
8941  tcl_cv_cc_m64=yes
8942else
8943  echo "$as_me: failed program was:" >&5
8944sed 's/^/| /' conftest.$ac_ext >&5
8945
8946	tcl_cv_cc_m64=no
8947fi
8948
8949rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8950      conftest$ac_exeext conftest.$ac_ext
8951		    CFLAGS=$hold_cflags
8952fi
8953{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
8954echo "${ECHO_T}$tcl_cv_cc_m64" >&6; }
8955		if test $tcl_cv_cc_m64 = yes; then
8956
8957		    CFLAGS="$CFLAGS -m64"
8958		    do64bit_ok=yes
8959
8960fi
8961
8962
8963fi
8964
8965
8966	    # The combo of gcc + glibc has a bug related to inlining of
8967	    # functions like strtod(). The -fno-builtin flag should address
8968	    # this problem but it does not work. The -fno-inline flag is kind
8969	    # of overkill but it works. Disable inlining only when one of the
8970	    # files in compat/*.c is being linked in.
8971
8972	    if test x"${USE_COMPAT}" != x; then
8973  CFLAGS="$CFLAGS -fno-inline"
8974fi
8975
8976
8977	    ;;
8978	GNU*)
8979	    SHLIB_CFLAGS="-fPIC"
8980	    SHLIB_SUFFIX=".so"
8981
8982	    SHLIB_LD='${CC} -shared'
8983	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8984	    CC_SEARCH_FLAGS=""
8985	    LD_SEARCH_FLAGS=""
8986	    if test "`uname -m`" = "alpha"; then
8987  CFLAGS="$CFLAGS -mieee"
8988fi
8989
8990	    ;;
8991	Lynx*)
8992	    SHLIB_CFLAGS="-fPIC"
8993	    SHLIB_SUFFIX=".so"
8994	    CFLAGS_OPTIMIZE=-02
8995	    SHLIB_LD='${CC} -shared'
8996	    LD_FLAGS="-Wl,--export-dynamic"
8997	    if test $doRpath = yes; then
8998
8999		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9000		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9001fi
9002
9003	    ;;
9004	OpenBSD-*)
9005	    SHLIB_CFLAGS="-fPIC"
9006	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
9007	    SHLIB_SUFFIX=".so"
9008	    if test $doRpath = yes; then
9009
9010		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9011fi
9012
9013	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9014	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
9015	    { echo "$as_me:$LINENO: checking for ELF" >&5
9016echo $ECHO_N "checking for ELF... $ECHO_C" >&6; }
9017if test "${tcl_cv_ld_elf+set}" = set; then
9018  echo $ECHO_N "(cached) $ECHO_C" >&6
9019else
9020
9021		cat >conftest.$ac_ext <<_ACEOF
9022/* confdefs.h.  */
9023_ACEOF
9024cat confdefs.h >>conftest.$ac_ext
9025cat >>conftest.$ac_ext <<_ACEOF
9026/* end confdefs.h.  */
9027
9028#ifdef __ELF__
9029	yes
9030#endif
9031
9032_ACEOF
9033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9034  $EGREP "yes" >/dev/null 2>&1; then
9035  tcl_cv_ld_elf=yes
9036else
9037  tcl_cv_ld_elf=no
9038fi
9039rm -f -r conftest*
9040
9041fi
9042{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
9043echo "${ECHO_T}$tcl_cv_ld_elf" >&6; }
9044	    if test $tcl_cv_ld_elf = yes; then
9045
9046		LDFLAGS=-Wl,-export-dynamic
9047
9048else
9049  LDFLAGS=""
9050fi
9051
9052	    if test "${TCL_THREADS}" = "1"; then
9053
9054		# OpenBSD builds and links with -pthread, never -lpthread.
9055		LIBS=`echo $LIBS | sed s/-lpthread//`
9056		CFLAGS="$CFLAGS -pthread"
9057		SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread"
9058
9059fi
9060
9061	    # OpenBSD doesn't do version numbers with dots.
9062	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9063	    TCL_LIB_VERSIONS_OK=nodots
9064	    ;;
9065	NetBSD-*|FreeBSD-[3-4].*)
9066	    # FreeBSD 3.* and greater have ELF.
9067	    # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
9068	    SHLIB_CFLAGS="-fPIC"
9069	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
9070	    SHLIB_SUFFIX=".so"
9071	    LDFLAGS="$LDFLAGS -export-dynamic"
9072	    if test $doRpath = yes; then
9073
9074		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9075fi
9076
9077	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9078	    if test "${TCL_THREADS}" = "1"; then
9079
9080		# The -pthread needs to go in the CFLAGS, not LIBS
9081		LIBS=`echo $LIBS | sed s/-pthread//`
9082		CFLAGS="$CFLAGS -pthread"
9083	    	LDFLAGS="$LDFLAGS -pthread"
9084
9085fi
9086
9087	    case $system in
9088	    FreeBSD-3.*)
9089	    	# FreeBSD-3 doesn't handle version numbers with dots.
9090	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9091	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
9092	    	TCL_LIB_VERSIONS_OK=nodots
9093		;;
9094	    esac
9095	    ;;
9096	FreeBSD-*)
9097	    # This configuration from FreeBSD Ports.
9098	    SHLIB_CFLAGS="-fPIC"
9099	    SHLIB_LD="${CC} -shared"
9100	    TCL_SHLIB_LD_EXTRAS="-soname \$@"
9101	    SHLIB_SUFFIX=".so"
9102	    LDFLAGS=""
9103	    if test $doRpath = yes; then
9104
9105		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9106		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9107fi
9108
9109	    if test "${TCL_THREADS}" = "1"; then
9110
9111		# The -pthread needs to go in the LDFLAGS, not LIBS
9112		LIBS=`echo $LIBS | sed s/-pthread//`
9113		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9114		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
9115fi
9116
9117	    # Version numbers are dot-stripped by system policy.
9118	    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
9119	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9120	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
9121	    TCL_LIB_VERSIONS_OK=nodots
9122	    ;;
9123	Darwin-*)
9124	    CFLAGS_OPTIMIZE="-Os"
9125	    SHLIB_CFLAGS="-fno-common"
9126	    # To avoid discrepancies between what headers configure sees during
9127	    # preprocessing tests and compiling tests, move any -isysroot and
9128	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
9129	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
9130		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
9131		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
9132	    CFLAGS="`echo " ${CFLAGS}" | \
9133		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
9134		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
9135	    if test $do64bit = yes; then
9136
9137		case `arch` in
9138		    ppc)
9139			{ echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
9140echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; }
9141if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
9142  echo $ECHO_N "(cached) $ECHO_C" >&6
9143else
9144
9145			    hold_cflags=$CFLAGS
9146			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
9147			    cat >conftest.$ac_ext <<_ACEOF
9148/* confdefs.h.  */
9149_ACEOF
9150cat confdefs.h >>conftest.$ac_ext
9151cat >>conftest.$ac_ext <<_ACEOF
9152/* end confdefs.h.  */
9153
9154int
9155main ()
9156{
9157
9158  ;
9159  return 0;
9160}
9161_ACEOF
9162rm -f conftest.$ac_objext conftest$ac_exeext
9163if { (ac_try="$ac_link"
9164case "(($ac_try" in
9165  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9166  *) ac_try_echo=$ac_try;;
9167esac
9168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9169  (eval "$ac_link") 2>conftest.er1
9170  ac_status=$?
9171  grep -v '^ *+' conftest.er1 >conftest.err
9172  rm -f conftest.er1
9173  cat conftest.err >&5
9174  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9175  (exit $ac_status); } && {
9176	 test -z "$ac_c_werror_flag" ||
9177	 test ! -s conftest.err
9178       } && test -s conftest$ac_exeext &&
9179       $as_test_x conftest$ac_exeext; then
9180  tcl_cv_cc_arch_ppc64=yes
9181else
9182  echo "$as_me: failed program was:" >&5
9183sed 's/^/| /' conftest.$ac_ext >&5
9184
9185	tcl_cv_cc_arch_ppc64=no
9186fi
9187
9188rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9189      conftest$ac_exeext conftest.$ac_ext
9190			    CFLAGS=$hold_cflags
9191fi
9192{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
9193echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; }
9194			if test $tcl_cv_cc_arch_ppc64 = yes; then
9195
9196			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
9197			    do64bit_ok=yes
9198
9199fi
9200;;
9201		    i386)
9202			{ echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
9203echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; }
9204if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
9205  echo $ECHO_N "(cached) $ECHO_C" >&6
9206else
9207
9208			    hold_cflags=$CFLAGS
9209			    CFLAGS="$CFLAGS -arch x86_64"
9210			    cat >conftest.$ac_ext <<_ACEOF
9211/* confdefs.h.  */
9212_ACEOF
9213cat confdefs.h >>conftest.$ac_ext
9214cat >>conftest.$ac_ext <<_ACEOF
9215/* end confdefs.h.  */
9216
9217int
9218main ()
9219{
9220
9221  ;
9222  return 0;
9223}
9224_ACEOF
9225rm -f conftest.$ac_objext conftest$ac_exeext
9226if { (ac_try="$ac_link"
9227case "(($ac_try" in
9228  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9229  *) ac_try_echo=$ac_try;;
9230esac
9231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9232  (eval "$ac_link") 2>conftest.er1
9233  ac_status=$?
9234  grep -v '^ *+' conftest.er1 >conftest.err
9235  rm -f conftest.er1
9236  cat conftest.err >&5
9237  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9238  (exit $ac_status); } && {
9239	 test -z "$ac_c_werror_flag" ||
9240	 test ! -s conftest.err
9241       } && test -s conftest$ac_exeext &&
9242       $as_test_x conftest$ac_exeext; then
9243  tcl_cv_cc_arch_x86_64=yes
9244else
9245  echo "$as_me: failed program was:" >&5
9246sed 's/^/| /' conftest.$ac_ext >&5
9247
9248	tcl_cv_cc_arch_x86_64=no
9249fi
9250
9251rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9252      conftest$ac_exeext conftest.$ac_ext
9253			    CFLAGS=$hold_cflags
9254fi
9255{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
9256echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; }
9257			if test $tcl_cv_cc_arch_x86_64 = yes; then
9258
9259			    CFLAGS="$CFLAGS -arch x86_64"
9260			    do64bit_ok=yes
9261
9262fi
9263;;
9264		    *)
9265			{ echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
9266echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
9267		esac
9268
9269else
9270
9271		# Check for combined 32-bit and 64-bit fat build
9272		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
9273		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
9274
9275		    fat_32_64=yes
9276fi
9277
9278
9279fi
9280
9281	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9282	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
9283	    { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
9284echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; }
9285if test "${tcl_cv_ld_single_module+set}" = set; then
9286  echo $ECHO_N "(cached) $ECHO_C" >&6
9287else
9288
9289		hold_ldflags=$LDFLAGS
9290		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
9291		cat >conftest.$ac_ext <<_ACEOF
9292/* confdefs.h.  */
9293_ACEOF
9294cat confdefs.h >>conftest.$ac_ext
9295cat >>conftest.$ac_ext <<_ACEOF
9296/* end confdefs.h.  */
9297
9298int
9299main ()
9300{
9301int i;
9302  ;
9303  return 0;
9304}
9305_ACEOF
9306rm -f conftest.$ac_objext conftest$ac_exeext
9307if { (ac_try="$ac_link"
9308case "(($ac_try" in
9309  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9310  *) ac_try_echo=$ac_try;;
9311esac
9312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9313  (eval "$ac_link") 2>conftest.er1
9314  ac_status=$?
9315  grep -v '^ *+' conftest.er1 >conftest.err
9316  rm -f conftest.er1
9317  cat conftest.err >&5
9318  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9319  (exit $ac_status); } && {
9320	 test -z "$ac_c_werror_flag" ||
9321	 test ! -s conftest.err
9322       } && test -s conftest$ac_exeext &&
9323       $as_test_x conftest$ac_exeext; then
9324  tcl_cv_ld_single_module=yes
9325else
9326  echo "$as_me: failed program was:" >&5
9327sed 's/^/| /' conftest.$ac_ext >&5
9328
9329	tcl_cv_ld_single_module=no
9330fi
9331
9332rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9333      conftest$ac_exeext conftest.$ac_ext
9334		LDFLAGS=$hold_ldflags
9335fi
9336{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
9337echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; }
9338	    if test $tcl_cv_ld_single_module = yes; then
9339
9340		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
9341
9342fi
9343
9344	    # TEA specific: link shlib with current and compatiblity version flags
9345	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
9346	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
9347	    SHLIB_SUFFIX=".dylib"
9348	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
9349	    if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
9350		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
9351
9352		LDFLAGS="$LDFLAGS -prebind"
9353fi
9354
9355	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
9356	    { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
9357echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; }
9358if test "${tcl_cv_ld_search_paths_first+set}" = set; then
9359  echo $ECHO_N "(cached) $ECHO_C" >&6
9360else
9361
9362		hold_ldflags=$LDFLAGS
9363		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9364		cat >conftest.$ac_ext <<_ACEOF
9365/* confdefs.h.  */
9366_ACEOF
9367cat confdefs.h >>conftest.$ac_ext
9368cat >>conftest.$ac_ext <<_ACEOF
9369/* end confdefs.h.  */
9370
9371int
9372main ()
9373{
9374int i;
9375  ;
9376  return 0;
9377}
9378_ACEOF
9379rm -f conftest.$ac_objext conftest$ac_exeext
9380if { (ac_try="$ac_link"
9381case "(($ac_try" in
9382  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9383  *) ac_try_echo=$ac_try;;
9384esac
9385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9386  (eval "$ac_link") 2>conftest.er1
9387  ac_status=$?
9388  grep -v '^ *+' conftest.er1 >conftest.err
9389  rm -f conftest.er1
9390  cat conftest.err >&5
9391  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9392  (exit $ac_status); } && {
9393	 test -z "$ac_c_werror_flag" ||
9394	 test ! -s conftest.err
9395       } && test -s conftest$ac_exeext &&
9396       $as_test_x conftest$ac_exeext; then
9397  tcl_cv_ld_search_paths_first=yes
9398else
9399  echo "$as_me: failed program was:" >&5
9400sed 's/^/| /' conftest.$ac_ext >&5
9401
9402	tcl_cv_ld_search_paths_first=no
9403fi
9404
9405rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9406      conftest$ac_exeext conftest.$ac_ext
9407		LDFLAGS=$hold_ldflags
9408fi
9409{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
9410echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; }
9411	    if test $tcl_cv_ld_search_paths_first = yes; then
9412
9413		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9414
9415fi
9416
9417	    if test "$tcl_cv_cc_visibility_hidden" != yes; then
9418
9419
9420cat >>confdefs.h <<\_ACEOF
9421#define MODULE_SCOPE __private_extern__
9422_ACEOF
9423
9424		tcl_cv_cc_visibility_hidden=yes
9425
9426fi
9427
9428	    CC_SEARCH_FLAGS=""
9429	    LD_SEARCH_FLAGS=""
9430	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
9431	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
9432	    # extensions, verify that 64-bit build is possible.
9433	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then
9434
9435		if test "${TEA_WINDOWINGSYSTEM}" = x11; then
9436
9437		    { echo "$as_me:$LINENO: checking for 64-bit X11" >&5
9438echo $ECHO_N "checking for 64-bit X11... $ECHO_C" >&6; }
9439if test "${tcl_cv_lib_x11_64+set}" = set; then
9440  echo $ECHO_N "(cached) $ECHO_C" >&6
9441else
9442
9443			for v in CFLAGS CPPFLAGS LDFLAGS; do
9444			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
9445			done
9446			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
9447			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
9448			cat >conftest.$ac_ext <<_ACEOF
9449/* confdefs.h.  */
9450_ACEOF
9451cat confdefs.h >>conftest.$ac_ext
9452cat >>conftest.$ac_ext <<_ACEOF
9453/* end confdefs.h.  */
9454#include <X11/Xlib.h>
9455int
9456main ()
9457{
9458XrmInitialize();
9459  ;
9460  return 0;
9461}
9462_ACEOF
9463rm -f conftest.$ac_objext conftest$ac_exeext
9464if { (ac_try="$ac_link"
9465case "(($ac_try" in
9466  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9467  *) ac_try_echo=$ac_try;;
9468esac
9469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9470  (eval "$ac_link") 2>conftest.er1
9471  ac_status=$?
9472  grep -v '^ *+' conftest.er1 >conftest.err
9473  rm -f conftest.er1
9474  cat conftest.err >&5
9475  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9476  (exit $ac_status); } && {
9477	 test -z "$ac_c_werror_flag" ||
9478	 test ! -s conftest.err
9479       } && test -s conftest$ac_exeext &&
9480       $as_test_x conftest$ac_exeext; then
9481  tcl_cv_lib_x11_64=yes
9482else
9483  echo "$as_me: failed program was:" >&5
9484sed 's/^/| /' conftest.$ac_ext >&5
9485
9486	tcl_cv_lib_x11_64=no
9487fi
9488
9489rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9490      conftest$ac_exeext conftest.$ac_ext
9491			for v in CFLAGS CPPFLAGS LDFLAGS; do
9492			    eval $v'="$hold_'$v'"'
9493			done
9494fi
9495{ echo "$as_me:$LINENO: result: $tcl_cv_lib_x11_64" >&5
9496echo "${ECHO_T}$tcl_cv_lib_x11_64" >&6; }
9497
9498fi
9499
9500		if test "${TEA_WINDOWINGSYSTEM}" = aqua; then
9501
9502		    { echo "$as_me:$LINENO: checking for 64-bit Tk" >&5
9503echo $ECHO_N "checking for 64-bit Tk... $ECHO_C" >&6; }
9504if test "${tcl_cv_lib_tk_64+set}" = set; then
9505  echo $ECHO_N "(cached) $ECHO_C" >&6
9506else
9507
9508			for v in CFLAGS CPPFLAGS LDFLAGS; do
9509			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
9510			done
9511			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 `eval "echo ${TCL_INCLUDES} ${TK_INCLUDES}"`"
9512			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
9513			cat >conftest.$ac_ext <<_ACEOF
9514/* confdefs.h.  */
9515_ACEOF
9516cat confdefs.h >>conftest.$ac_ext
9517cat >>conftest.$ac_ext <<_ACEOF
9518/* end confdefs.h.  */
9519#include <tk.h>
9520int
9521main ()
9522{
9523Tk_InitStubs(NULL, "", 0);
9524  ;
9525  return 0;
9526}
9527_ACEOF
9528rm -f conftest.$ac_objext conftest$ac_exeext
9529if { (ac_try="$ac_link"
9530case "(($ac_try" in
9531  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9532  *) ac_try_echo=$ac_try;;
9533esac
9534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9535  (eval "$ac_link") 2>conftest.er1
9536  ac_status=$?
9537  grep -v '^ *+' conftest.er1 >conftest.err
9538  rm -f conftest.er1
9539  cat conftest.err >&5
9540  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9541  (exit $ac_status); } && {
9542	 test -z "$ac_c_werror_flag" ||
9543	 test ! -s conftest.err
9544       } && test -s conftest$ac_exeext &&
9545       $as_test_x conftest$ac_exeext; then
9546  tcl_cv_lib_tk_64=yes
9547else
9548  echo "$as_me: failed program was:" >&5
9549sed 's/^/| /' conftest.$ac_ext >&5
9550
9551	tcl_cv_lib_tk_64=no
9552fi
9553
9554rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9555      conftest$ac_exeext conftest.$ac_ext
9556			for v in CFLAGS CPPFLAGS LDFLAGS; do
9557			    eval $v'="$hold_'$v'"'
9558			done
9559fi
9560{ echo "$as_me:$LINENO: result: $tcl_cv_lib_tk_64" >&5
9561echo "${ECHO_T}$tcl_cv_lib_tk_64" >&6; }
9562
9563fi
9564
9565		# remove 64-bit arch flags from CFLAGS et al. if configuration
9566		# does not support 64-bit.
9567		if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then
9568
9569		    { echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
9570echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
9571		    for v in CFLAGS CPPFLAGS LDFLAGS; do
9572			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
9573		    done
9574fi
9575
9576
9577fi
9578
9579	    ;;
9580	OS/390-*)
9581	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
9582
9583cat >>confdefs.h <<\_ACEOF
9584#define _OE_SOCKETS 1
9585_ACEOF
9586
9587	    ;;
9588	OSF1-V*)
9589	    # Digital OSF/1
9590	    SHLIB_CFLAGS=""
9591	    if test "$SHARED_BUILD" = 1; then
9592
9593	        SHLIB_LD='ld -shared -expect_unresolved "*"'
9594
9595else
9596
9597	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
9598
9599fi
9600
9601	    SHLIB_SUFFIX=".so"
9602	    if test $doRpath = yes; then
9603
9604		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9605		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9606fi
9607
9608	    if test "$GCC" = yes; then
9609  CFLAGS="$CFLAGS -mieee"
9610else
9611
9612		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
9613fi
9614
9615	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
9616	    if test "${TCL_THREADS}" = 1; then
9617
9618		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
9619		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
9620		LIBS=`echo $LIBS | sed s/-lpthreads//`
9621		if test "$GCC" = yes; then
9622
9623		    LIBS="$LIBS -lpthread -lmach -lexc"
9624
9625else
9626
9627		    CFLAGS="$CFLAGS -pthread"
9628		    LDFLAGS="$LDFLAGS -pthread"
9629
9630fi
9631
9632
9633fi
9634
9635	    ;;
9636	QNX-6*)
9637	    # QNX RTP
9638	    # This may work for all QNX, but it was only reported for v6.
9639	    SHLIB_CFLAGS="-fPIC"
9640	    SHLIB_LD="ld -Bshareable -x"
9641	    SHLIB_LD_LIBS=""
9642	    SHLIB_SUFFIX=".so"
9643	    CC_SEARCH_FLAGS=""
9644	    LD_SEARCH_FLAGS=""
9645	    ;;
9646	SCO_SV-3.2*)
9647	    if test "$GCC" = yes; then
9648
9649		SHLIB_CFLAGS="-fPIC -melf"
9650		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
9651
9652else
9653
9654	       SHLIB_CFLAGS="-Kpic -belf"
9655	       LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
9656
9657fi
9658
9659	    SHLIB_LD="ld -G"
9660	    SHLIB_LD_LIBS=""
9661	    SHLIB_SUFFIX=".so"
9662	    CC_SEARCH_FLAGS=""
9663	    LD_SEARCH_FLAGS=""
9664	    ;;
9665	SunOS-5.[0-6])
9666	    # Careful to not let 5.10+ fall into this case
9667
9668	    # Note: If _REENTRANT isn't defined, then Solaris
9669	    # won't define thread-safe library routines.
9670
9671
9672cat >>confdefs.h <<\_ACEOF
9673#define _REENTRANT 1
9674_ACEOF
9675
9676
9677cat >>confdefs.h <<\_ACEOF
9678#define _POSIX_PTHREAD_SEMANTICS 1
9679_ACEOF
9680
9681
9682	    SHLIB_CFLAGS="-KPIC"
9683	    SHLIB_SUFFIX=".so"
9684	    if test "$GCC" = yes; then
9685
9686		SHLIB_LD='${CC} -shared'
9687		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9688		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9689
9690else
9691
9692		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
9693		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9694		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9695
9696fi
9697
9698	    ;;
9699	SunOS-5*)
9700	    # Note: If _REENTRANT isn't defined, then Solaris
9701	    # won't define thread-safe library routines.
9702
9703
9704cat >>confdefs.h <<\_ACEOF
9705#define _REENTRANT 1
9706_ACEOF
9707
9708
9709cat >>confdefs.h <<\_ACEOF
9710#define _POSIX_PTHREAD_SEMANTICS 1
9711_ACEOF
9712
9713
9714	    SHLIB_CFLAGS="-KPIC"
9715
9716	    # Check to enable 64-bit flags for compiler/linker
9717	    if test "$do64bit" = yes; then
9718
9719		arch=`isainfo`
9720		if test "$arch" = "sparcv9 sparc"; then
9721
9722		    if test "$GCC" = yes; then
9723
9724			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
9725
9726			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
9727echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
9728
9729else
9730
9731			    do64bit_ok=yes
9732			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
9733			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
9734			    SHLIB_CFLAGS="-fPIC"
9735
9736fi
9737
9738
9739else
9740
9741			do64bit_ok=yes
9742			if test "$do64bitVIS" = yes; then
9743
9744			    CFLAGS="$CFLAGS -xarch=v9a"
9745			    LDFLAGS_ARCH="-xarch=v9a"
9746
9747else
9748
9749			    CFLAGS="$CFLAGS -xarch=v9"
9750			    LDFLAGS_ARCH="-xarch=v9"
9751
9752fi
9753
9754			# Solaris 64 uses this as well
9755			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
9756
9757fi
9758
9759
9760else
9761  if test "$arch" = "amd64 i386"; then
9762
9763		    if test "$GCC" = yes; then
9764
9765			case $system in
9766			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
9767				do64bit_ok=yes
9768				CFLAGS="$CFLAGS -m64"
9769				LDFLAGS="$LDFLAGS -m64";;
9770			    *)
9771				{ echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
9772echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
9773			esac
9774
9775else
9776
9777			do64bit_ok=yes
9778			case $system in
9779			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
9780				CFLAGS="$CFLAGS -m64"
9781				LDFLAGS="$LDFLAGS -m64";;
9782			    *)
9783				CFLAGS="$CFLAGS -xarch=amd64"
9784				LDFLAGS="$LDFLAGS -xarch=amd64";;
9785			esac
9786
9787fi
9788
9789
9790else
9791  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
9792echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
9793fi
9794
9795fi
9796
9797
9798fi
9799
9800
9801	    SHLIB_SUFFIX=".so"
9802	    if test "$GCC" = yes; then
9803
9804		SHLIB_LD='${CC} -shared'
9805		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9806		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9807		if test "$do64bit_ok" = yes; then
9808
9809		    if test "$arch" = "sparcv9 sparc"; then
9810
9811			# We need to specify -static-libgcc or we need to
9812			# add the path to the sparv9 libgcc.
9813			# JH: static-libgcc is necessary for core Tcl, but may
9814			# not be necessary for extensions.
9815			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
9816			# for finding sparcv9 libgcc, get the regular libgcc
9817			# path, remove so name and append 'sparcv9'
9818			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
9819			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
9820
9821else
9822  if test "$arch" = "amd64 i386"; then
9823
9824			# JH: static-libgcc is necessary for core Tcl, but may
9825			# not be necessary for extensions.
9826			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
9827
9828fi
9829
9830fi
9831
9832
9833fi
9834
9835
9836else
9837
9838		case $system in
9839		    SunOS-5.[1-9][0-9]*)
9840			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9841			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
9842		    *)
9843			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
9844		esac
9845		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9846		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9847
9848fi
9849
9850	    ;;
9851    esac
9852
9853    if test "$do64bit" = yes -a "$do64bit_ok" = no; then
9854
9855	{ echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
9856echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
9857
9858fi
9859
9860
9861
9862
9863    # Add in the arch flags late to ensure it wasn't removed.
9864    # Not necessary in TEA, but this is aligned with core
9865    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
9866
9867    # If we're running gcc, then change the C flags for compiling shared
9868    # libraries to the right flags for gcc, instead of those for the
9869    # standard manufacturer compiler.
9870
9871    if test "$GCC" = yes; then
9872
9873	case $system in
9874	    AIX-*) ;;
9875	    BSD/OS*) ;;
9876	    CYGWIN_*) ;;
9877	    IRIX*) ;;
9878	    NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
9879	    Darwin-*) ;;
9880	    SCO_SV-3.2*) ;;
9881	    windows) ;;
9882	    *) SHLIB_CFLAGS="-fPIC" ;;
9883	esac
9884fi
9885
9886
9887    if test "$tcl_cv_cc_visibility_hidden" != yes; then
9888
9889
9890cat >>confdefs.h <<\_ACEOF
9891#define MODULE_SCOPE extern
9892_ACEOF
9893
9894
9895cat >>confdefs.h <<\_ACEOF
9896#define NO_VIZ
9897_ACEOF
9898
9899
9900fi
9901
9902
9903    if test "$SHARED_LIB_SUFFIX" = ""; then
9904
9905	# TEA specific: use PACKAGE_VERSION instead of VERSION
9906	SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
9907fi
9908
9909    if test "$UNSHARED_LIB_SUFFIX" = ""; then
9910
9911	# TEA specific: use PACKAGE_VERSION instead of VERSION
9912	UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
9913fi
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928    # These must be called after we do the basic CFLAGS checks and
9929    # verify any possible 64-bit or similar switches are necessary
9930
9931    { echo "$as_me:$LINENO: checking for required early compiler flags" >&5
9932echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; }
9933    tcl_flags=""
9934
9935    if test "${tcl_cv_flag__isoc99_source+set}" = set; then
9936  echo $ECHO_N "(cached) $ECHO_C" >&6
9937else
9938  cat >conftest.$ac_ext <<_ACEOF
9939/* confdefs.h.  */
9940_ACEOF
9941cat confdefs.h >>conftest.$ac_ext
9942cat >>conftest.$ac_ext <<_ACEOF
9943/* end confdefs.h.  */
9944#include <stdlib.h>
9945int
9946main ()
9947{
9948char *p = (char *)strtoll; char *q = (char *)strtoull;
9949  ;
9950  return 0;
9951}
9952_ACEOF
9953rm -f conftest.$ac_objext
9954if { (ac_try="$ac_compile"
9955case "(($ac_try" in
9956  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9957  *) ac_try_echo=$ac_try;;
9958esac
9959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9960  (eval "$ac_compile") 2>conftest.er1
9961  ac_status=$?
9962  grep -v '^ *+' conftest.er1 >conftest.err
9963  rm -f conftest.er1
9964  cat conftest.err >&5
9965  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9966  (exit $ac_status); } && {
9967	 test -z "$ac_c_werror_flag" ||
9968	 test ! -s conftest.err
9969       } && test -s conftest.$ac_objext; then
9970  tcl_cv_flag__isoc99_source=no
9971else
9972  echo "$as_me: failed program was:" >&5
9973sed 's/^/| /' conftest.$ac_ext >&5
9974
9975	cat >conftest.$ac_ext <<_ACEOF
9976/* confdefs.h.  */
9977_ACEOF
9978cat confdefs.h >>conftest.$ac_ext
9979cat >>conftest.$ac_ext <<_ACEOF
9980/* end confdefs.h.  */
9981#define _ISOC99_SOURCE 1
9982#include <stdlib.h>
9983int
9984main ()
9985{
9986char *p = (char *)strtoll; char *q = (char *)strtoull;
9987  ;
9988  return 0;
9989}
9990_ACEOF
9991rm -f conftest.$ac_objext
9992if { (ac_try="$ac_compile"
9993case "(($ac_try" in
9994  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9995  *) ac_try_echo=$ac_try;;
9996esac
9997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9998  (eval "$ac_compile") 2>conftest.er1
9999  ac_status=$?
10000  grep -v '^ *+' conftest.er1 >conftest.err
10001  rm -f conftest.er1
10002  cat conftest.err >&5
10003  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10004  (exit $ac_status); } && {
10005	 test -z "$ac_c_werror_flag" ||
10006	 test ! -s conftest.err
10007       } && test -s conftest.$ac_objext; then
10008  tcl_cv_flag__isoc99_source=yes
10009else
10010  echo "$as_me: failed program was:" >&5
10011sed 's/^/| /' conftest.$ac_ext >&5
10012
10013	tcl_cv_flag__isoc99_source=no
10014fi
10015
10016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10017fi
10018
10019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10020fi
10021
10022    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
10023
10024cat >>confdefs.h <<\_ACEOF
10025#define _ISOC99_SOURCE 1
10026_ACEOF
10027
10028	tcl_flags="$tcl_flags _ISOC99_SOURCE"
10029    fi
10030
10031
10032    if test "${tcl_cv_flag__largefile64_source+set}" = set; then
10033  echo $ECHO_N "(cached) $ECHO_C" >&6
10034else
10035  cat >conftest.$ac_ext <<_ACEOF
10036/* confdefs.h.  */
10037_ACEOF
10038cat confdefs.h >>conftest.$ac_ext
10039cat >>conftest.$ac_ext <<_ACEOF
10040/* end confdefs.h.  */
10041#include <sys/stat.h>
10042int
10043main ()
10044{
10045struct stat64 buf; int i = stat64("/", &buf);
10046  ;
10047  return 0;
10048}
10049_ACEOF
10050rm -f conftest.$ac_objext
10051if { (ac_try="$ac_compile"
10052case "(($ac_try" in
10053  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10054  *) ac_try_echo=$ac_try;;
10055esac
10056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10057  (eval "$ac_compile") 2>conftest.er1
10058  ac_status=$?
10059  grep -v '^ *+' conftest.er1 >conftest.err
10060  rm -f conftest.er1
10061  cat conftest.err >&5
10062  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10063  (exit $ac_status); } && {
10064	 test -z "$ac_c_werror_flag" ||
10065	 test ! -s conftest.err
10066       } && test -s conftest.$ac_objext; then
10067  tcl_cv_flag__largefile64_source=no
10068else
10069  echo "$as_me: failed program was:" >&5
10070sed 's/^/| /' conftest.$ac_ext >&5
10071
10072	cat >conftest.$ac_ext <<_ACEOF
10073/* confdefs.h.  */
10074_ACEOF
10075cat confdefs.h >>conftest.$ac_ext
10076cat >>conftest.$ac_ext <<_ACEOF
10077/* end confdefs.h.  */
10078#define _LARGEFILE64_SOURCE 1
10079#include <sys/stat.h>
10080int
10081main ()
10082{
10083struct stat64 buf; int i = stat64("/", &buf);
10084  ;
10085  return 0;
10086}
10087_ACEOF
10088rm -f conftest.$ac_objext
10089if { (ac_try="$ac_compile"
10090case "(($ac_try" in
10091  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10092  *) ac_try_echo=$ac_try;;
10093esac
10094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10095  (eval "$ac_compile") 2>conftest.er1
10096  ac_status=$?
10097  grep -v '^ *+' conftest.er1 >conftest.err
10098  rm -f conftest.er1
10099  cat conftest.err >&5
10100  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10101  (exit $ac_status); } && {
10102	 test -z "$ac_c_werror_flag" ||
10103	 test ! -s conftest.err
10104       } && test -s conftest.$ac_objext; then
10105  tcl_cv_flag__largefile64_source=yes
10106else
10107  echo "$as_me: failed program was:" >&5
10108sed 's/^/| /' conftest.$ac_ext >&5
10109
10110	tcl_cv_flag__largefile64_source=no
10111fi
10112
10113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10114fi
10115
10116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10117fi
10118
10119    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
10120
10121cat >>confdefs.h <<\_ACEOF
10122#define _LARGEFILE64_SOURCE 1
10123_ACEOF
10124
10125	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
10126    fi
10127
10128
10129    if test "${tcl_cv_flag__largefile_source64+set}" = set; then
10130  echo $ECHO_N "(cached) $ECHO_C" >&6
10131else
10132  cat >conftest.$ac_ext <<_ACEOF
10133/* confdefs.h.  */
10134_ACEOF
10135cat confdefs.h >>conftest.$ac_ext
10136cat >>conftest.$ac_ext <<_ACEOF
10137/* end confdefs.h.  */
10138#include <sys/stat.h>
10139int
10140main ()
10141{
10142char *p = (char *)open64;
10143  ;
10144  return 0;
10145}
10146_ACEOF
10147rm -f conftest.$ac_objext
10148if { (ac_try="$ac_compile"
10149case "(($ac_try" in
10150  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10151  *) ac_try_echo=$ac_try;;
10152esac
10153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10154  (eval "$ac_compile") 2>conftest.er1
10155  ac_status=$?
10156  grep -v '^ *+' conftest.er1 >conftest.err
10157  rm -f conftest.er1
10158  cat conftest.err >&5
10159  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10160  (exit $ac_status); } && {
10161	 test -z "$ac_c_werror_flag" ||
10162	 test ! -s conftest.err
10163       } && test -s conftest.$ac_objext; then
10164  tcl_cv_flag__largefile_source64=no
10165else
10166  echo "$as_me: failed program was:" >&5
10167sed 's/^/| /' conftest.$ac_ext >&5
10168
10169	cat >conftest.$ac_ext <<_ACEOF
10170/* confdefs.h.  */
10171_ACEOF
10172cat confdefs.h >>conftest.$ac_ext
10173cat >>conftest.$ac_ext <<_ACEOF
10174/* end confdefs.h.  */
10175#define _LARGEFILE_SOURCE64 1
10176#include <sys/stat.h>
10177int
10178main ()
10179{
10180char *p = (char *)open64;
10181  ;
10182  return 0;
10183}
10184_ACEOF
10185rm -f conftest.$ac_objext
10186if { (ac_try="$ac_compile"
10187case "(($ac_try" in
10188  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10189  *) ac_try_echo=$ac_try;;
10190esac
10191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10192  (eval "$ac_compile") 2>conftest.er1
10193  ac_status=$?
10194  grep -v '^ *+' conftest.er1 >conftest.err
10195  rm -f conftest.er1
10196  cat conftest.err >&5
10197  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10198  (exit $ac_status); } && {
10199	 test -z "$ac_c_werror_flag" ||
10200	 test ! -s conftest.err
10201       } && test -s conftest.$ac_objext; then
10202  tcl_cv_flag__largefile_source64=yes
10203else
10204  echo "$as_me: failed program was:" >&5
10205sed 's/^/| /' conftest.$ac_ext >&5
10206
10207	tcl_cv_flag__largefile_source64=no
10208fi
10209
10210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10211fi
10212
10213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10214fi
10215
10216    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
10217
10218cat >>confdefs.h <<\_ACEOF
10219#define _LARGEFILE_SOURCE64 1
10220_ACEOF
10221
10222	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
10223    fi
10224
10225    if test "x${tcl_flags}" = "x" ; then
10226	{ echo "$as_me:$LINENO: result: none" >&5
10227echo "${ECHO_T}none" >&6; }
10228    else
10229	{ echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
10230echo "${ECHO_T}${tcl_flags}" >&6; }
10231    fi
10232
10233
10234    { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
10235echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; }
10236    if test "${tcl_cv_type_64bit+set}" = set; then
10237  echo $ECHO_N "(cached) $ECHO_C" >&6
10238else
10239
10240	tcl_cv_type_64bit=none
10241	# See if the compiler knows natively about __int64
10242	cat >conftest.$ac_ext <<_ACEOF
10243/* confdefs.h.  */
10244_ACEOF
10245cat confdefs.h >>conftest.$ac_ext
10246cat >>conftest.$ac_ext <<_ACEOF
10247/* end confdefs.h.  */
10248
10249int
10250main ()
10251{
10252__int64 value = (__int64) 0;
10253  ;
10254  return 0;
10255}
10256_ACEOF
10257rm -f conftest.$ac_objext
10258if { (ac_try="$ac_compile"
10259case "(($ac_try" in
10260  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10261  *) ac_try_echo=$ac_try;;
10262esac
10263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10264  (eval "$ac_compile") 2>conftest.er1
10265  ac_status=$?
10266  grep -v '^ *+' conftest.er1 >conftest.err
10267  rm -f conftest.er1
10268  cat conftest.err >&5
10269  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10270  (exit $ac_status); } && {
10271	 test -z "$ac_c_werror_flag" ||
10272	 test ! -s conftest.err
10273       } && test -s conftest.$ac_objext; then
10274  tcl_type_64bit=__int64
10275else
10276  echo "$as_me: failed program was:" >&5
10277sed 's/^/| /' conftest.$ac_ext >&5
10278
10279	tcl_type_64bit="long long"
10280fi
10281
10282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10283	# See if we should use long anyway  Note that we substitute in the
10284	# type that is our current guess for a 64-bit type inside this check
10285	# program, so it should be modified only carefully...
10286        cat >conftest.$ac_ext <<_ACEOF
10287/* confdefs.h.  */
10288_ACEOF
10289cat confdefs.h >>conftest.$ac_ext
10290cat >>conftest.$ac_ext <<_ACEOF
10291/* end confdefs.h.  */
10292
10293int
10294main ()
10295{
10296switch (0) {
10297            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
10298        }
10299  ;
10300  return 0;
10301}
10302_ACEOF
10303rm -f conftest.$ac_objext
10304if { (ac_try="$ac_compile"
10305case "(($ac_try" in
10306  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10307  *) ac_try_echo=$ac_try;;
10308esac
10309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10310  (eval "$ac_compile") 2>conftest.er1
10311  ac_status=$?
10312  grep -v '^ *+' conftest.er1 >conftest.err
10313  rm -f conftest.er1
10314  cat conftest.err >&5
10315  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10316  (exit $ac_status); } && {
10317	 test -z "$ac_c_werror_flag" ||
10318	 test ! -s conftest.err
10319       } && test -s conftest.$ac_objext; then
10320  tcl_cv_type_64bit=${tcl_type_64bit}
10321else
10322  echo "$as_me: failed program was:" >&5
10323sed 's/^/| /' conftest.$ac_ext >&5
10324
10325
10326fi
10327
10328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10329fi
10330
10331    if test "${tcl_cv_type_64bit}" = none ; then
10332
10333cat >>confdefs.h <<\_ACEOF
10334#define TCL_WIDE_INT_IS_LONG 1
10335_ACEOF
10336
10337	{ echo "$as_me:$LINENO: result: using long" >&5
10338echo "${ECHO_T}using long" >&6; }
10339    elif test "${tcl_cv_type_64bit}" = "__int64" \
10340		-a "${TEA_PLATFORM}" = "windows" ; then
10341	# TEA specific: We actually want to use the default tcl.h checks in
10342	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
10343	{ echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
10344echo "${ECHO_T}using Tcl header defaults" >&6; }
10345    else
10346
10347cat >>confdefs.h <<_ACEOF
10348#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
10349_ACEOF
10350
10351	{ echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
10352echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; }
10353
10354	# Now check for auxiliary declarations
10355	{ echo "$as_me:$LINENO: checking for struct dirent64" >&5
10356echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; }
10357if test "${tcl_cv_struct_dirent64+set}" = set; then
10358  echo $ECHO_N "(cached) $ECHO_C" >&6
10359else
10360
10361	    cat >conftest.$ac_ext <<_ACEOF
10362/* confdefs.h.  */
10363_ACEOF
10364cat confdefs.h >>conftest.$ac_ext
10365cat >>conftest.$ac_ext <<_ACEOF
10366/* end confdefs.h.  */
10367#include <sys/types.h>
10368#include <sys/dirent.h>
10369int
10370main ()
10371{
10372struct dirent64 p;
10373  ;
10374  return 0;
10375}
10376_ACEOF
10377rm -f conftest.$ac_objext
10378if { (ac_try="$ac_compile"
10379case "(($ac_try" in
10380  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10381  *) ac_try_echo=$ac_try;;
10382esac
10383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10384  (eval "$ac_compile") 2>conftest.er1
10385  ac_status=$?
10386  grep -v '^ *+' conftest.er1 >conftest.err
10387  rm -f conftest.er1
10388  cat conftest.err >&5
10389  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10390  (exit $ac_status); } && {
10391	 test -z "$ac_c_werror_flag" ||
10392	 test ! -s conftest.err
10393       } && test -s conftest.$ac_objext; then
10394  tcl_cv_struct_dirent64=yes
10395else
10396  echo "$as_me: failed program was:" >&5
10397sed 's/^/| /' conftest.$ac_ext >&5
10398
10399	tcl_cv_struct_dirent64=no
10400fi
10401
10402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10403fi
10404{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
10405echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; }
10406	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
10407
10408cat >>confdefs.h <<\_ACEOF
10409#define HAVE_STRUCT_DIRENT64 1
10410_ACEOF
10411
10412	fi
10413
10414	{ echo "$as_me:$LINENO: checking for struct stat64" >&5
10415echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; }
10416if test "${tcl_cv_struct_stat64+set}" = set; then
10417  echo $ECHO_N "(cached) $ECHO_C" >&6
10418else
10419
10420	    cat >conftest.$ac_ext <<_ACEOF
10421/* confdefs.h.  */
10422_ACEOF
10423cat confdefs.h >>conftest.$ac_ext
10424cat >>conftest.$ac_ext <<_ACEOF
10425/* end confdefs.h.  */
10426#include <sys/stat.h>
10427int
10428main ()
10429{
10430struct stat64 p;
10431
10432  ;
10433  return 0;
10434}
10435_ACEOF
10436rm -f conftest.$ac_objext
10437if { (ac_try="$ac_compile"
10438case "(($ac_try" in
10439  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10440  *) ac_try_echo=$ac_try;;
10441esac
10442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10443  (eval "$ac_compile") 2>conftest.er1
10444  ac_status=$?
10445  grep -v '^ *+' conftest.er1 >conftest.err
10446  rm -f conftest.er1
10447  cat conftest.err >&5
10448  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10449  (exit $ac_status); } && {
10450	 test -z "$ac_c_werror_flag" ||
10451	 test ! -s conftest.err
10452       } && test -s conftest.$ac_objext; then
10453  tcl_cv_struct_stat64=yes
10454else
10455  echo "$as_me: failed program was:" >&5
10456sed 's/^/| /' conftest.$ac_ext >&5
10457
10458	tcl_cv_struct_stat64=no
10459fi
10460
10461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10462fi
10463{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
10464echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; }
10465	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
10466
10467cat >>confdefs.h <<\_ACEOF
10468#define HAVE_STRUCT_STAT64 1
10469_ACEOF
10470
10471	fi
10472
10473
10474
10475for ac_func in open64 lseek64
10476do
10477as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10478{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10479echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10480if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10481  echo $ECHO_N "(cached) $ECHO_C" >&6
10482else
10483  cat >conftest.$ac_ext <<_ACEOF
10484/* confdefs.h.  */
10485_ACEOF
10486cat confdefs.h >>conftest.$ac_ext
10487cat >>conftest.$ac_ext <<_ACEOF
10488/* end confdefs.h.  */
10489/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10490   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10491#define $ac_func innocuous_$ac_func
10492
10493/* System header to define __stub macros and hopefully few prototypes,
10494    which can conflict with char $ac_func (); below.
10495    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10496    <limits.h> exists even on freestanding compilers.  */
10497
10498#ifdef __STDC__
10499# include <limits.h>
10500#else
10501# include <assert.h>
10502#endif
10503
10504#undef $ac_func
10505
10506/* Override any GCC internal prototype to avoid an error.
10507   Use char because int might match the return type of a GCC
10508   builtin and then its argument prototype would still apply.  */
10509#ifdef __cplusplus
10510extern "C"
10511#endif
10512char $ac_func ();
10513/* The GNU C library defines this for functions which it implements
10514    to always fail with ENOSYS.  Some functions are actually named
10515    something starting with __ and the normal name is an alias.  */
10516#if defined __stub_$ac_func || defined __stub___$ac_func
10517choke me
10518#endif
10519
10520int
10521main ()
10522{
10523return $ac_func ();
10524  ;
10525  return 0;
10526}
10527_ACEOF
10528rm -f conftest.$ac_objext conftest$ac_exeext
10529if { (ac_try="$ac_link"
10530case "(($ac_try" in
10531  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10532  *) ac_try_echo=$ac_try;;
10533esac
10534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10535  (eval "$ac_link") 2>conftest.er1
10536  ac_status=$?
10537  grep -v '^ *+' conftest.er1 >conftest.err
10538  rm -f conftest.er1
10539  cat conftest.err >&5
10540  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10541  (exit $ac_status); } && {
10542	 test -z "$ac_c_werror_flag" ||
10543	 test ! -s conftest.err
10544       } && test -s conftest$ac_exeext &&
10545       $as_test_x conftest$ac_exeext; then
10546  eval "$as_ac_var=yes"
10547else
10548  echo "$as_me: failed program was:" >&5
10549sed 's/^/| /' conftest.$ac_ext >&5
10550
10551	eval "$as_ac_var=no"
10552fi
10553
10554rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10555      conftest$ac_exeext conftest.$ac_ext
10556fi
10557ac_res=`eval echo '${'$as_ac_var'}'`
10558	       { echo "$as_me:$LINENO: result: $ac_res" >&5
10559echo "${ECHO_T}$ac_res" >&6; }
10560if test `eval echo '${'$as_ac_var'}'` = yes; then
10561  cat >>confdefs.h <<_ACEOF
10562#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10563_ACEOF
10564
10565fi
10566done
10567
10568	{ echo "$as_me:$LINENO: checking for off64_t" >&5
10569echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; }
10570	if test "${tcl_cv_type_off64_t+set}" = set; then
10571  echo $ECHO_N "(cached) $ECHO_C" >&6
10572else
10573
10574	    cat >conftest.$ac_ext <<_ACEOF
10575/* confdefs.h.  */
10576_ACEOF
10577cat confdefs.h >>conftest.$ac_ext
10578cat >>conftest.$ac_ext <<_ACEOF
10579/* end confdefs.h.  */
10580#include <sys/types.h>
10581int
10582main ()
10583{
10584off64_t offset;
10585
10586  ;
10587  return 0;
10588}
10589_ACEOF
10590rm -f conftest.$ac_objext
10591if { (ac_try="$ac_compile"
10592case "(($ac_try" in
10593  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10594  *) ac_try_echo=$ac_try;;
10595esac
10596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10597  (eval "$ac_compile") 2>conftest.er1
10598  ac_status=$?
10599  grep -v '^ *+' conftest.er1 >conftest.err
10600  rm -f conftest.er1
10601  cat conftest.err >&5
10602  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10603  (exit $ac_status); } && {
10604	 test -z "$ac_c_werror_flag" ||
10605	 test ! -s conftest.err
10606       } && test -s conftest.$ac_objext; then
10607  tcl_cv_type_off64_t=yes
10608else
10609  echo "$as_me: failed program was:" >&5
10610sed 's/^/| /' conftest.$ac_ext >&5
10611
10612	tcl_cv_type_off64_t=no
10613fi
10614
10615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10616fi
10617
10618			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
10619	        test "x${ac_cv_func_lseek64}" = "xyes" && \
10620	        test "x${ac_cv_func_open64}" = "xyes" ; then
10621
10622cat >>confdefs.h <<\_ACEOF
10623#define HAVE_TYPE_OFF64_T 1
10624_ACEOF
10625
10626	    { echo "$as_me:$LINENO: result: yes" >&5
10627echo "${ECHO_T}yes" >&6; }
10628	else
10629	    { echo "$as_me:$LINENO: result: no" >&5
10630echo "${ECHO_T}no" >&6; }
10631	fi
10632    fi
10633
10634
10635
10636#--------------------------------------------------------------------
10637# Set the default compiler switches based on the --enable-symbols option.
10638#--------------------------------------------------------------------
10639
10640
10641
10642    { echo "$as_me:$LINENO: checking for build with symbols" >&5
10643echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; }
10644    # Check whether --enable-symbols was given.
10645if test "${enable_symbols+set}" = set; then
10646  enableval=$enable_symbols; tcl_ok=$enableval
10647else
10648  tcl_ok=no
10649fi
10650
10651    DBGX=""
10652    if test "$tcl_ok" = "no"; then
10653	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
10654	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
10655	{ echo "$as_me:$LINENO: result: no" >&5
10656echo "${ECHO_T}no" >&6; }
10657    else
10658	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
10659	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
10660	if test "$tcl_ok" = "yes"; then
10661	    { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
10662echo "${ECHO_T}yes (standard debugging)" >&6; }
10663	fi
10664    fi
10665    # TEA specific:
10666    if test "${TEA_PLATFORM}" != "windows" ; then
10667	LDFLAGS_DEFAULT="${LDFLAGS}"
10668    fi
10669
10670
10671
10672
10673    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
10674
10675cat >>confdefs.h <<\_ACEOF
10676#define TCL_MEM_DEBUG 1
10677_ACEOF
10678
10679    fi
10680
10681    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
10682	if test "$tcl_ok" = "all"; then
10683	    { echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
10684echo "${ECHO_T}enabled symbols mem debugging" >&6; }
10685	else
10686	    { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
10687echo "${ECHO_T}enabled $tcl_ok debugging" >&6; }
10688	fi
10689    fi
10690
10691
10692#--------------------------------------------------------------------
10693# For Unix/Tk builds, make sure that the X libraries/headers are found.
10694# This must be called after TEA_CONFIG_CFLAGS as it adjusts LIBS.
10695#--------------------------------------------------------------------
10696
10697
10698    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
10699
10700    { echo "$as_me:$LINENO: checking for X" >&5
10701echo $ECHO_N "checking for X... $ECHO_C" >&6; }
10702
10703
10704# Check whether --with-x was given.
10705if test "${with_x+set}" = set; then
10706  withval=$with_x;
10707fi
10708
10709# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10710if test "x$with_x" = xno; then
10711  # The user explicitly disabled X.
10712  have_x=disabled
10713else
10714  case $x_includes,$x_libraries in #(
10715    *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
10716echo "$as_me: error: Cannot use X directory names containing '" >&2;}
10717   { (exit 1); exit 1; }; };; #(
10718    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
10719  echo $ECHO_N "(cached) $ECHO_C" >&6
10720else
10721  # One or both of the vars are not set, and there is no cached value.
10722ac_x_includes=no ac_x_libraries=no
10723rm -f -r conftest.dir
10724if mkdir conftest.dir; then
10725  cd conftest.dir
10726  cat >Imakefile <<'_ACEOF'
10727incroot:
10728	@echo incroot='${INCROOT}'
10729usrlibdir:
10730	@echo usrlibdir='${USRLIBDIR}'
10731libdir:
10732	@echo libdir='${LIBDIR}'
10733_ACEOF
10734  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
10735    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10736    for ac_var in incroot usrlibdir libdir; do
10737      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
10738    done
10739    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10740    for ac_extension in a so sl dylib la dll; do
10741      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
10742	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
10743	ac_im_usrlibdir=$ac_im_libdir; break
10744      fi
10745    done
10746    # Screen out bogus values from the imake configuration.  They are
10747    # bogus both because they are the default anyway, and because
10748    # using them would break gcc on systems where it needs fixed includes.
10749    case $ac_im_incroot in
10750	/usr/include) ac_x_includes= ;;
10751	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
10752    esac
10753    case $ac_im_usrlibdir in
10754	/usr/lib | /lib) ;;
10755	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
10756    esac
10757  fi
10758  cd ..
10759  rm -f -r conftest.dir
10760fi
10761
10762# Standard set of common directories for X headers.
10763# Check X11 before X11Rn because it is often a symlink to the current release.
10764ac_x_header_dirs='
10765/usr/X11/include
10766/usr/X11R6/include
10767/usr/X11R5/include
10768/usr/X11R4/include
10769
10770/usr/include/X11
10771/usr/include/X11R6
10772/usr/include/X11R5
10773/usr/include/X11R4
10774
10775/usr/local/X11/include
10776/usr/local/X11R6/include
10777/usr/local/X11R5/include
10778/usr/local/X11R4/include
10779
10780/usr/local/include/X11
10781/usr/local/include/X11R6
10782/usr/local/include/X11R5
10783/usr/local/include/X11R4
10784
10785/usr/X386/include
10786/usr/x386/include
10787/usr/XFree86/include/X11
10788
10789/usr/include
10790/usr/local/include
10791/usr/unsupported/include
10792/usr/athena/include
10793/usr/local/x11r5/include
10794/usr/lpp/Xamples/include
10795
10796/usr/openwin/include
10797/usr/openwin/share/include'
10798
10799if test "$ac_x_includes" = no; then
10800  # Guess where to find include files, by looking for Xlib.h.
10801  # First, try using that file with no special directory specified.
10802  cat >conftest.$ac_ext <<_ACEOF
10803/* confdefs.h.  */
10804_ACEOF
10805cat confdefs.h >>conftest.$ac_ext
10806cat >>conftest.$ac_ext <<_ACEOF
10807/* end confdefs.h.  */
10808#include <X11/Xlib.h>
10809_ACEOF
10810if { (ac_try="$ac_cpp conftest.$ac_ext"
10811case "(($ac_try" in
10812  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10813  *) ac_try_echo=$ac_try;;
10814esac
10815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10816  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10817  ac_status=$?
10818  grep -v '^ *+' conftest.er1 >conftest.err
10819  rm -f conftest.er1
10820  cat conftest.err >&5
10821  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10822  (exit $ac_status); } >/dev/null && {
10823	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10824	 test ! -s conftest.err
10825       }; then
10826  # We can compile using X headers with no special include directory.
10827ac_x_includes=
10828else
10829  echo "$as_me: failed program was:" >&5
10830sed 's/^/| /' conftest.$ac_ext >&5
10831
10832  for ac_dir in $ac_x_header_dirs; do
10833  if test -r "$ac_dir/X11/Xlib.h"; then
10834    ac_x_includes=$ac_dir
10835    break
10836  fi
10837done
10838fi
10839
10840rm -f conftest.err conftest.$ac_ext
10841fi # $ac_x_includes = no
10842
10843if test "$ac_x_libraries" = no; then
10844  # Check for the libraries.
10845  # See if we find them without any special options.
10846  # Don't add to $LIBS permanently.
10847  ac_save_LIBS=$LIBS
10848  LIBS="-lX11 $LIBS"
10849  cat >conftest.$ac_ext <<_ACEOF
10850/* confdefs.h.  */
10851_ACEOF
10852cat confdefs.h >>conftest.$ac_ext
10853cat >>conftest.$ac_ext <<_ACEOF
10854/* end confdefs.h.  */
10855#include <X11/Xlib.h>
10856int
10857main ()
10858{
10859XrmInitialize ()
10860  ;
10861  return 0;
10862}
10863_ACEOF
10864rm -f conftest.$ac_objext conftest$ac_exeext
10865if { (ac_try="$ac_link"
10866case "(($ac_try" in
10867  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10868  *) ac_try_echo=$ac_try;;
10869esac
10870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10871  (eval "$ac_link") 2>conftest.er1
10872  ac_status=$?
10873  grep -v '^ *+' conftest.er1 >conftest.err
10874  rm -f conftest.er1
10875  cat conftest.err >&5
10876  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10877  (exit $ac_status); } && {
10878	 test -z "$ac_c_werror_flag" ||
10879	 test ! -s conftest.err
10880       } && test -s conftest$ac_exeext &&
10881       $as_test_x conftest$ac_exeext; then
10882  LIBS=$ac_save_LIBS
10883# We can link X programs with no special library path.
10884ac_x_libraries=
10885else
10886  echo "$as_me: failed program was:" >&5
10887sed 's/^/| /' conftest.$ac_ext >&5
10888
10889	LIBS=$ac_save_LIBS
10890for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
10891do
10892  # Don't even attempt the hair of trying to link an X program!
10893  for ac_extension in a so sl dylib la dll; do
10894    if test -r "$ac_dir/libX11.$ac_extension"; then
10895      ac_x_libraries=$ac_dir
10896      break 2
10897    fi
10898  done
10899done
10900fi
10901
10902rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10903      conftest$ac_exeext conftest.$ac_ext
10904fi # $ac_x_libraries = no
10905
10906case $ac_x_includes,$ac_x_libraries in #(
10907  no,* | *,no | *\'*)
10908    # Didn't find X, or a directory has "'" in its name.
10909    ac_cv_have_x="have_x=no";; #(
10910  *)
10911    # Record where we found X for the cache.
10912    ac_cv_have_x="have_x=yes\
10913	ac_x_includes='$ac_x_includes'\
10914	ac_x_libraries='$ac_x_libraries'"
10915esac
10916fi
10917;; #(
10918    *) have_x=yes;;
10919  esac
10920  eval "$ac_cv_have_x"
10921fi # $with_x != no
10922
10923if test "$have_x" != yes; then
10924  { echo "$as_me:$LINENO: result: $have_x" >&5
10925echo "${ECHO_T}$have_x" >&6; }
10926  no_x=yes
10927else
10928  # If each of the values was on the command line, it overrides each guess.
10929  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10930  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10931  # Update the cache value to reflect the command line values.
10932  ac_cv_have_x="have_x=yes\
10933	ac_x_includes='$x_includes'\
10934	ac_x_libraries='$x_libraries'"
10935  { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
10936echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
10937fi
10938
10939    not_really_there=""
10940    if test "$no_x" = ""; then
10941	if test "$x_includes" = ""; then
10942	    cat >conftest.$ac_ext <<_ACEOF
10943/* confdefs.h.  */
10944_ACEOF
10945cat confdefs.h >>conftest.$ac_ext
10946cat >>conftest.$ac_ext <<_ACEOF
10947/* end confdefs.h.  */
10948#include <X11/XIntrinsic.h>
10949_ACEOF
10950if { (ac_try="$ac_cpp conftest.$ac_ext"
10951case "(($ac_try" in
10952  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10953  *) ac_try_echo=$ac_try;;
10954esac
10955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10956  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10957  ac_status=$?
10958  grep -v '^ *+' conftest.er1 >conftest.err
10959  rm -f conftest.er1
10960  cat conftest.err >&5
10961  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10962  (exit $ac_status); } >/dev/null && {
10963	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10964	 test ! -s conftest.err
10965       }; then
10966  :
10967else
10968  echo "$as_me: failed program was:" >&5
10969sed 's/^/| /' conftest.$ac_ext >&5
10970
10971  not_really_there="yes"
10972fi
10973
10974rm -f conftest.err conftest.$ac_ext
10975	else
10976	    if test ! -r $x_includes/X11/Intrinsic.h; then
10977		not_really_there="yes"
10978	    fi
10979	fi
10980    fi
10981    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
10982	{ echo "$as_me:$LINENO: checking for X11 header files" >&5
10983echo $ECHO_N "checking for X11 header files... $ECHO_C" >&6; }
10984	found_xincludes="no"
10985	cat >conftest.$ac_ext <<_ACEOF
10986/* confdefs.h.  */
10987_ACEOF
10988cat confdefs.h >>conftest.$ac_ext
10989cat >>conftest.$ac_ext <<_ACEOF
10990/* end confdefs.h.  */
10991#include <X11/Intrinsic.h>
10992_ACEOF
10993if { (ac_try="$ac_cpp conftest.$ac_ext"
10994case "(($ac_try" in
10995  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10996  *) ac_try_echo=$ac_try;;
10997esac
10998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10999  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11000  ac_status=$?
11001  grep -v '^ *+' conftest.er1 >conftest.err
11002  rm -f conftest.er1
11003  cat conftest.err >&5
11004  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11005  (exit $ac_status); } >/dev/null && {
11006	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11007	 test ! -s conftest.err
11008       }; then
11009  found_xincludes="yes"
11010else
11011  echo "$as_me: failed program was:" >&5
11012sed 's/^/| /' conftest.$ac_ext >&5
11013
11014  found_xincludes="no"
11015fi
11016
11017rm -f conftest.err conftest.$ac_ext
11018	if test "$found_xincludes" = "no"; then
11019	    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"
11020	    for i in $dirs ; do
11021		if test -r $i/X11/Intrinsic.h; then
11022		    { echo "$as_me:$LINENO: result: $i" >&5
11023echo "${ECHO_T}$i" >&6; }
11024		    XINCLUDES=" -I$i"
11025		    found_xincludes="yes"
11026		    break
11027		fi
11028	    done
11029	fi
11030    else
11031	if test "$x_includes" != ""; then
11032	    XINCLUDES="-I$x_includes"
11033	    found_xincludes="yes"
11034	fi
11035    fi
11036    if test "$found_xincludes" = "no"; then
11037	{ echo "$as_me:$LINENO: result: couldn't find any!" >&5
11038echo "${ECHO_T}couldn't find any!" >&6; }
11039    fi
11040
11041    if test "$no_x" = yes; then
11042	{ echo "$as_me:$LINENO: checking for X11 libraries" >&5
11043echo $ECHO_N "checking for X11 libraries... $ECHO_C" >&6; }
11044	XLIBSW=nope
11045	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"
11046	for i in $dirs ; do
11047	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then
11048		{ echo "$as_me:$LINENO: result: $i" >&5
11049echo "${ECHO_T}$i" >&6; }
11050		XLIBSW="-L$i -lX11"
11051		x_libraries="$i"
11052		break
11053	    fi
11054	done
11055    else
11056	if test "$x_libraries" = ""; then
11057	    XLIBSW=-lX11
11058	else
11059	    XLIBSW="-L$x_libraries -lX11"
11060	fi
11061    fi
11062    if test "$XLIBSW" = nope ; then
11063	{ echo "$as_me:$LINENO: checking for XCreateWindow in -lXwindow" >&5
11064echo $ECHO_N "checking for XCreateWindow in -lXwindow... $ECHO_C" >&6; }
11065if test "${ac_cv_lib_Xwindow_XCreateWindow+set}" = set; then
11066  echo $ECHO_N "(cached) $ECHO_C" >&6
11067else
11068  ac_check_lib_save_LIBS=$LIBS
11069LIBS="-lXwindow  $LIBS"
11070cat >conftest.$ac_ext <<_ACEOF
11071/* confdefs.h.  */
11072_ACEOF
11073cat confdefs.h >>conftest.$ac_ext
11074cat >>conftest.$ac_ext <<_ACEOF
11075/* end confdefs.h.  */
11076
11077/* Override any GCC internal prototype to avoid an error.
11078   Use char because int might match the return type of a GCC
11079   builtin and then its argument prototype would still apply.  */
11080#ifdef __cplusplus
11081extern "C"
11082#endif
11083char XCreateWindow ();
11084int
11085main ()
11086{
11087return XCreateWindow ();
11088  ;
11089  return 0;
11090}
11091_ACEOF
11092rm -f conftest.$ac_objext conftest$ac_exeext
11093if { (ac_try="$ac_link"
11094case "(($ac_try" in
11095  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11096  *) ac_try_echo=$ac_try;;
11097esac
11098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11099  (eval "$ac_link") 2>conftest.er1
11100  ac_status=$?
11101  grep -v '^ *+' conftest.er1 >conftest.err
11102  rm -f conftest.er1
11103  cat conftest.err >&5
11104  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11105  (exit $ac_status); } && {
11106	 test -z "$ac_c_werror_flag" ||
11107	 test ! -s conftest.err
11108       } && test -s conftest$ac_exeext &&
11109       $as_test_x conftest$ac_exeext; then
11110  ac_cv_lib_Xwindow_XCreateWindow=yes
11111else
11112  echo "$as_me: failed program was:" >&5
11113sed 's/^/| /' conftest.$ac_ext >&5
11114
11115	ac_cv_lib_Xwindow_XCreateWindow=no
11116fi
11117
11118rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11119      conftest$ac_exeext conftest.$ac_ext
11120LIBS=$ac_check_lib_save_LIBS
11121fi
11122{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xwindow_XCreateWindow" >&5
11123echo "${ECHO_T}$ac_cv_lib_Xwindow_XCreateWindow" >&6; }
11124if test $ac_cv_lib_Xwindow_XCreateWindow = yes; then
11125  XLIBSW=-lXwindow
11126fi
11127
11128    fi
11129    if test "$XLIBSW" = nope ; then
11130	{ echo "$as_me:$LINENO: result: could not find any!  Using -lX11." >&5
11131echo "${ECHO_T}could not find any!  Using -lX11." >&6; }
11132	XLIBSW=-lX11
11133    fi
11134    # TEA specific:
11135    if test x"${XLIBSW}" != x ; then
11136	PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
11137    fi
11138
11139    fi
11140
11141
11142#-----------------------------------------------------------------------
11143# All relevant packages are configuration subdirectories.
11144#-----------------------------------------------------------------------
11145
11146# I. Support
11147
11148# Remove all arguments after the command name. Without doing that we
11149# might transmit something like 'gcc -pipe' down to the sub
11150# configure's, and they may hang in 'which gcc -pipe' (platform
11151# dependent. So far only seen for Linux).
11152
11153CC=`echo $CC | sed -e 's/ .*$//'`
11154
11155
11156  tea_sub_configure_args=
11157  tea_prev=
11158  for tea_arg in $ac_configure_args; do
11159    if test -n "$tea_prev"; then
11160      tea_prev=
11161      continue
11162    fi
11163    case "$tea_arg" in
11164    -cache-file | --cache-file | --cache-fil | --cache-fi \
11165    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
11166      tea_prev=cache_file ;;
11167    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
11168    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
11169      ;;
11170    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
11171      tea_prev=srcdir ;;
11172    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
11173      ;;
11174    *) tea_sub_configure_args="$tea_sub_configure_args $tea_arg" ;;
11175    esac
11176  done
11177
11178
11179    tea_config_dir="zlib"
11180    tea_config_arguments="--disable-option-checking"
11181    subdirs="$subdirs $tea_config_dir"
11182
11183
11184    # Do not complain, so a configure script can configure whichever
11185    # parts of a large source tree are present.
11186    if test ! -d $srcdir/$tea_config_dir; then
11187      continue
11188    fi
11189
11190    echo configuring in $tea_config_dir
11191
11192    case "$srcdir" in
11193    .) ;;
11194    *)
11195      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
11196      else
11197        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
11198      fi
11199      ;;
11200    esac
11201
11202    tea_popdir=`pwd`
11203    cd $tea_config_dir
11204
11205      # A "../" for each directory in /$tea_config_dir.
11206      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11207
11208    case "$srcdir" in
11209    .) # No --srcdir option.  We are building in place.
11210      tea_sub_srcdir=$srcdir ;;
11211    /*) # Absolute path.
11212      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
11213    *) # Relative path.
11214      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
11215    esac
11216
11217    # Check for guested configure; otherwise get Cygnus style configure.
11218    if test -f $tea_sub_srcdir/configure; then
11219      tea_sub_configure=$tea_sub_srcdir/configure
11220    elif test -f $tea_sub_srcdir/configure.in; then
11221      tea_sub_configure=$tea_configure
11222    else
11223      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
11224      tea_sub_configure=
11225    fi
11226
11227    # The recursion is here.
11228    if test -n "$tea_sub_configure"; then
11229
11230      # Force usage of a cache file.
11231      if test "X$cache_file" = "X/dev/null" ; then
11232	cache_file=config.cache
11233      fi
11234
11235      # Make the cache file name correct relative to the subdirectory.
11236      case "$cache_file" in
11237      /*) tea_sub_cache_file=$cache_file ;;
11238      *) # Relative path.
11239        tea_sub_cache_file="$tea_dots$cache_file" ;;
11240      esac
11241
11242      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
11243      # The eval makes quoting arguments work.
11244      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
11245      then :
11246      else
11247        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
11248      fi
11249    fi
11250
11251    cd $tea_popdir
11252
11253
11254    tea_config_dir="libpng"
11255    tea_config_arguments="--with-zlibtcl=`pwd`/zlib --disable-option-checking"
11256    subdirs="$subdirs $tea_config_dir"
11257
11258
11259    # Do not complain, so a configure script can configure whichever
11260    # parts of a large source tree are present.
11261    if test ! -d $srcdir/$tea_config_dir; then
11262      continue
11263    fi
11264
11265    echo configuring in $tea_config_dir
11266
11267    case "$srcdir" in
11268    .) ;;
11269    *)
11270      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
11271      else
11272        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
11273      fi
11274      ;;
11275    esac
11276
11277    tea_popdir=`pwd`
11278    cd $tea_config_dir
11279
11280      # A "../" for each directory in /$tea_config_dir.
11281      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11282
11283    case "$srcdir" in
11284    .) # No --srcdir option.  We are building in place.
11285      tea_sub_srcdir=$srcdir ;;
11286    /*) # Absolute path.
11287      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
11288    *) # Relative path.
11289      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
11290    esac
11291
11292    # Check for guested configure; otherwise get Cygnus style configure.
11293    if test -f $tea_sub_srcdir/configure; then
11294      tea_sub_configure=$tea_sub_srcdir/configure
11295    elif test -f $tea_sub_srcdir/configure.in; then
11296      tea_sub_configure=$tea_configure
11297    else
11298      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
11299      tea_sub_configure=
11300    fi
11301
11302    # The recursion is here.
11303    if test -n "$tea_sub_configure"; then
11304
11305      # Force usage of a cache file.
11306      if test "X$cache_file" = "X/dev/null" ; then
11307	cache_file=config.cache
11308      fi
11309
11310      # Make the cache file name correct relative to the subdirectory.
11311      case "$cache_file" in
11312      /*) tea_sub_cache_file=$cache_file ;;
11313      *) # Relative path.
11314        tea_sub_cache_file="$tea_dots$cache_file" ;;
11315      esac
11316
11317      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
11318      # The eval makes quoting arguments work.
11319      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
11320      then :
11321      else
11322        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
11323      fi
11324    fi
11325
11326    cd $tea_popdir
11327
11328
11329    tea_config_dir="libtiff"
11330    tea_config_arguments="--disable-option-checking"
11331    subdirs="$subdirs $tea_config_dir"
11332
11333
11334    # Do not complain, so a configure script can configure whichever
11335    # parts of a large source tree are present.
11336    if test ! -d $srcdir/$tea_config_dir; then
11337      continue
11338    fi
11339
11340    echo configuring in $tea_config_dir
11341
11342    case "$srcdir" in
11343    .) ;;
11344    *)
11345      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
11346      else
11347        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
11348      fi
11349      ;;
11350    esac
11351
11352    tea_popdir=`pwd`
11353    cd $tea_config_dir
11354
11355      # A "../" for each directory in /$tea_config_dir.
11356      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11357
11358    case "$srcdir" in
11359    .) # No --srcdir option.  We are building in place.
11360      tea_sub_srcdir=$srcdir ;;
11361    /*) # Absolute path.
11362      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
11363    *) # Relative path.
11364      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
11365    esac
11366
11367    # Check for guested configure; otherwise get Cygnus style configure.
11368    if test -f $tea_sub_srcdir/configure; then
11369      tea_sub_configure=$tea_sub_srcdir/configure
11370    elif test -f $tea_sub_srcdir/configure.in; then
11371      tea_sub_configure=$tea_configure
11372    else
11373      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
11374      tea_sub_configure=
11375    fi
11376
11377    # The recursion is here.
11378    if test -n "$tea_sub_configure"; then
11379
11380      # Force usage of a cache file.
11381      if test "X$cache_file" = "X/dev/null" ; then
11382	cache_file=config.cache
11383      fi
11384
11385      # Make the cache file name correct relative to the subdirectory.
11386      case "$cache_file" in
11387      /*) tea_sub_cache_file=$cache_file ;;
11388      *) # Relative path.
11389        tea_sub_cache_file="$tea_dots$cache_file" ;;
11390      esac
11391
11392      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
11393      # The eval makes quoting arguments work.
11394      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
11395      then :
11396      else
11397        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
11398      fi
11399    fi
11400
11401    cd $tea_popdir
11402
11403
11404    tea_config_dir="libjpeg"
11405    tea_config_arguments="--disable-option-checking"
11406    subdirs="$subdirs $tea_config_dir"
11407
11408
11409    # Do not complain, so a configure script can configure whichever
11410    # parts of a large source tree are present.
11411    if test ! -d $srcdir/$tea_config_dir; then
11412      continue
11413    fi
11414
11415    echo configuring in $tea_config_dir
11416
11417    case "$srcdir" in
11418    .) ;;
11419    *)
11420      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
11421      else
11422        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
11423      fi
11424      ;;
11425    esac
11426
11427    tea_popdir=`pwd`
11428    cd $tea_config_dir
11429
11430      # A "../" for each directory in /$tea_config_dir.
11431      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11432
11433    case "$srcdir" in
11434    .) # No --srcdir option.  We are building in place.
11435      tea_sub_srcdir=$srcdir ;;
11436    /*) # Absolute path.
11437      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
11438    *) # Relative path.
11439      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
11440    esac
11441
11442    # Check for guested configure; otherwise get Cygnus style configure.
11443    if test -f $tea_sub_srcdir/configure; then
11444      tea_sub_configure=$tea_sub_srcdir/configure
11445    elif test -f $tea_sub_srcdir/configure.in; then
11446      tea_sub_configure=$tea_configure
11447    else
11448      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
11449      tea_sub_configure=
11450    fi
11451
11452    # The recursion is here.
11453    if test -n "$tea_sub_configure"; then
11454
11455      # Force usage of a cache file.
11456      if test "X$cache_file" = "X/dev/null" ; then
11457	cache_file=config.cache
11458      fi
11459
11460      # Make the cache file name correct relative to the subdirectory.
11461      case "$cache_file" in
11462      /*) tea_sub_cache_file=$cache_file ;;
11463      *) # Relative path.
11464        tea_sub_cache_file="$tea_dots$cache_file" ;;
11465      esac
11466
11467      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
11468      # The eval makes quoting arguments work.
11469      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
11470      then :
11471      else
11472        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
11473      fi
11474    fi
11475
11476    cd $tea_popdir
11477
11478
11479    tea_config_dir="base"
11480    tea_config_arguments="--disable-option-checking"
11481    subdirs="$subdirs $tea_config_dir"
11482
11483
11484    # Do not complain, so a configure script can configure whichever
11485    # parts of a large source tree are present.
11486    if test ! -d $srcdir/$tea_config_dir; then
11487      continue
11488    fi
11489
11490    echo configuring in $tea_config_dir
11491
11492    case "$srcdir" in
11493    .) ;;
11494    *)
11495      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
11496      else
11497        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
11498      fi
11499      ;;
11500    esac
11501
11502    tea_popdir=`pwd`
11503    cd $tea_config_dir
11504
11505      # A "../" for each directory in /$tea_config_dir.
11506      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11507
11508    case "$srcdir" in
11509    .) # No --srcdir option.  We are building in place.
11510      tea_sub_srcdir=$srcdir ;;
11511    /*) # Absolute path.
11512      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
11513    *) # Relative path.
11514      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
11515    esac
11516
11517    # Check for guested configure; otherwise get Cygnus style configure.
11518    if test -f $tea_sub_srcdir/configure; then
11519      tea_sub_configure=$tea_sub_srcdir/configure
11520    elif test -f $tea_sub_srcdir/configure.in; then
11521      tea_sub_configure=$tea_configure
11522    else
11523      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
11524      tea_sub_configure=
11525    fi
11526
11527    # The recursion is here.
11528    if test -n "$tea_sub_configure"; then
11529
11530      # Force usage of a cache file.
11531      if test "X$cache_file" = "X/dev/null" ; then
11532	cache_file=config.cache
11533      fi
11534
11535      # Make the cache file name correct relative to the subdirectory.
11536      case "$cache_file" in
11537      /*) tea_sub_cache_file=$cache_file ;;
11538      *) # Relative path.
11539        tea_sub_cache_file="$tea_dots$cache_file" ;;
11540      esac
11541
11542      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
11543      # The eval makes quoting arguments work.
11544      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
11545      then :
11546      else
11547        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
11548      fi
11549    fi
11550
11551    cd $tea_popdir
11552
11553
11554    tea_config_dir="bmp"
11555    tea_config_arguments="--with-tkimg=`pwd`/base --disable-option-checking"
11556    subdirs="$subdirs $tea_config_dir"
11557
11558
11559    # Do not complain, so a configure script can configure whichever
11560    # parts of a large source tree are present.
11561    if test ! -d $srcdir/$tea_config_dir; then
11562      continue
11563    fi
11564
11565    echo configuring in $tea_config_dir
11566
11567    case "$srcdir" in
11568    .) ;;
11569    *)
11570      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
11571      else
11572        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
11573      fi
11574      ;;
11575    esac
11576
11577    tea_popdir=`pwd`
11578    cd $tea_config_dir
11579
11580      # A "../" for each directory in /$tea_config_dir.
11581      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11582
11583    case "$srcdir" in
11584    .) # No --srcdir option.  We are building in place.
11585      tea_sub_srcdir=$srcdir ;;
11586    /*) # Absolute path.
11587      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
11588    *) # Relative path.
11589      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
11590    esac
11591
11592    # Check for guested configure; otherwise get Cygnus style configure.
11593    if test -f $tea_sub_srcdir/configure; then
11594      tea_sub_configure=$tea_sub_srcdir/configure
11595    elif test -f $tea_sub_srcdir/configure.in; then
11596      tea_sub_configure=$tea_configure
11597    else
11598      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
11599      tea_sub_configure=
11600    fi
11601
11602    # The recursion is here.
11603    if test -n "$tea_sub_configure"; then
11604
11605      # Force usage of a cache file.
11606      if test "X$cache_file" = "X/dev/null" ; then
11607	cache_file=config.cache
11608      fi
11609
11610      # Make the cache file name correct relative to the subdirectory.
11611      case "$cache_file" in
11612      /*) tea_sub_cache_file=$cache_file ;;
11613      *) # Relative path.
11614        tea_sub_cache_file="$tea_dots$cache_file" ;;
11615      esac
11616
11617      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
11618      # The eval makes quoting arguments work.
11619      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
11620      then :
11621      else
11622        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
11623      fi
11624    fi
11625
11626    cd $tea_popdir
11627
11628
11629    tea_config_dir="gif"
11630    tea_config_arguments="--with-tkimg=`pwd`/base --disable-option-checking"
11631    subdirs="$subdirs $tea_config_dir"
11632
11633
11634    # Do not complain, so a configure script can configure whichever
11635    # parts of a large source tree are present.
11636    if test ! -d $srcdir/$tea_config_dir; then
11637      continue
11638    fi
11639
11640    echo configuring in $tea_config_dir
11641
11642    case "$srcdir" in
11643    .) ;;
11644    *)
11645      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
11646      else
11647        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
11648      fi
11649      ;;
11650    esac
11651
11652    tea_popdir=`pwd`
11653    cd $tea_config_dir
11654
11655      # A "../" for each directory in /$tea_config_dir.
11656      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11657
11658    case "$srcdir" in
11659    .) # No --srcdir option.  We are building in place.
11660      tea_sub_srcdir=$srcdir ;;
11661    /*) # Absolute path.
11662      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
11663    *) # Relative path.
11664      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
11665    esac
11666
11667    # Check for guested configure; otherwise get Cygnus style configure.
11668    if test -f $tea_sub_srcdir/configure; then
11669      tea_sub_configure=$tea_sub_srcdir/configure
11670    elif test -f $tea_sub_srcdir/configure.in; then
11671      tea_sub_configure=$tea_configure
11672    else
11673      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
11674      tea_sub_configure=
11675    fi
11676
11677    # The recursion is here.
11678    if test -n "$tea_sub_configure"; then
11679
11680      # Force usage of a cache file.
11681      if test "X$cache_file" = "X/dev/null" ; then
11682	cache_file=config.cache
11683      fi
11684
11685      # Make the cache file name correct relative to the subdirectory.
11686      case "$cache_file" in
11687      /*) tea_sub_cache_file=$cache_file ;;
11688      *) # Relative path.
11689        tea_sub_cache_file="$tea_dots$cache_file" ;;
11690      esac
11691
11692      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
11693      # The eval makes quoting arguments work.
11694      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
11695      then :
11696      else
11697        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
11698      fi
11699    fi
11700
11701    cd $tea_popdir
11702
11703
11704    tea_config_dir="ico"
11705    tea_config_arguments="--with-tkimg=`pwd`/base --disable-option-checking"
11706    subdirs="$subdirs $tea_config_dir"
11707
11708
11709    # Do not complain, so a configure script can configure whichever
11710    # parts of a large source tree are present.
11711    if test ! -d $srcdir/$tea_config_dir; then
11712      continue
11713    fi
11714
11715    echo configuring in $tea_config_dir
11716
11717    case "$srcdir" in
11718    .) ;;
11719    *)
11720      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
11721      else
11722        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
11723      fi
11724      ;;
11725    esac
11726
11727    tea_popdir=`pwd`
11728    cd $tea_config_dir
11729
11730      # A "../" for each directory in /$tea_config_dir.
11731      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11732
11733    case "$srcdir" in
11734    .) # No --srcdir option.  We are building in place.
11735      tea_sub_srcdir=$srcdir ;;
11736    /*) # Absolute path.
11737      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
11738    *) # Relative path.
11739      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
11740    esac
11741
11742    # Check for guested configure; otherwise get Cygnus style configure.
11743    if test -f $tea_sub_srcdir/configure; then
11744      tea_sub_configure=$tea_sub_srcdir/configure
11745    elif test -f $tea_sub_srcdir/configure.in; then
11746      tea_sub_configure=$tea_configure
11747    else
11748      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
11749      tea_sub_configure=
11750    fi
11751
11752    # The recursion is here.
11753    if test -n "$tea_sub_configure"; then
11754
11755      # Force usage of a cache file.
11756      if test "X$cache_file" = "X/dev/null" ; then
11757	cache_file=config.cache
11758      fi
11759
11760      # Make the cache file name correct relative to the subdirectory.
11761      case "$cache_file" in
11762      /*) tea_sub_cache_file=$cache_file ;;
11763      *) # Relative path.
11764        tea_sub_cache_file="$tea_dots$cache_file" ;;
11765      esac
11766
11767      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
11768      # The eval makes quoting arguments work.
11769      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
11770      then :
11771      else
11772        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
11773      fi
11774    fi
11775
11776    cd $tea_popdir
11777
11778
11779    tea_config_dir="jpeg"
11780    tea_config_arguments="--with-tkimg=`pwd`/base --with-jpegtcl=`pwd`/libjpeg --disable-option-checking"
11781    subdirs="$subdirs $tea_config_dir"
11782
11783
11784    # Do not complain, so a configure script can configure whichever
11785    # parts of a large source tree are present.
11786    if test ! -d $srcdir/$tea_config_dir; then
11787      continue
11788    fi
11789
11790    echo configuring in $tea_config_dir
11791
11792    case "$srcdir" in
11793    .) ;;
11794    *)
11795      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
11796      else
11797        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
11798      fi
11799      ;;
11800    esac
11801
11802    tea_popdir=`pwd`
11803    cd $tea_config_dir
11804
11805      # A "../" for each directory in /$tea_config_dir.
11806      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11807
11808    case "$srcdir" in
11809    .) # No --srcdir option.  We are building in place.
11810      tea_sub_srcdir=$srcdir ;;
11811    /*) # Absolute path.
11812      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
11813    *) # Relative path.
11814      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
11815    esac
11816
11817    # Check for guested configure; otherwise get Cygnus style configure.
11818    if test -f $tea_sub_srcdir/configure; then
11819      tea_sub_configure=$tea_sub_srcdir/configure
11820    elif test -f $tea_sub_srcdir/configure.in; then
11821      tea_sub_configure=$tea_configure
11822    else
11823      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
11824      tea_sub_configure=
11825    fi
11826
11827    # The recursion is here.
11828    if test -n "$tea_sub_configure"; then
11829
11830      # Force usage of a cache file.
11831      if test "X$cache_file" = "X/dev/null" ; then
11832	cache_file=config.cache
11833      fi
11834
11835      # Make the cache file name correct relative to the subdirectory.
11836      case "$cache_file" in
11837      /*) tea_sub_cache_file=$cache_file ;;
11838      *) # Relative path.
11839        tea_sub_cache_file="$tea_dots$cache_file" ;;
11840      esac
11841
11842      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
11843      # The eval makes quoting arguments work.
11844      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
11845      then :
11846      else
11847        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
11848      fi
11849    fi
11850
11851    cd $tea_popdir
11852
11853
11854    tea_config_dir="pcx"
11855    tea_config_arguments="--with-tkimg=`pwd`/base --disable-option-checking"
11856    subdirs="$subdirs $tea_config_dir"
11857
11858
11859    # Do not complain, so a configure script can configure whichever
11860    # parts of a large source tree are present.
11861    if test ! -d $srcdir/$tea_config_dir; then
11862      continue
11863    fi
11864
11865    echo configuring in $tea_config_dir
11866
11867    case "$srcdir" in
11868    .) ;;
11869    *)
11870      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
11871      else
11872        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
11873      fi
11874      ;;
11875    esac
11876
11877    tea_popdir=`pwd`
11878    cd $tea_config_dir
11879
11880      # A "../" for each directory in /$tea_config_dir.
11881      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11882
11883    case "$srcdir" in
11884    .) # No --srcdir option.  We are building in place.
11885      tea_sub_srcdir=$srcdir ;;
11886    /*) # Absolute path.
11887      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
11888    *) # Relative path.
11889      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
11890    esac
11891
11892    # Check for guested configure; otherwise get Cygnus style configure.
11893    if test -f $tea_sub_srcdir/configure; then
11894      tea_sub_configure=$tea_sub_srcdir/configure
11895    elif test -f $tea_sub_srcdir/configure.in; then
11896      tea_sub_configure=$tea_configure
11897    else
11898      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
11899      tea_sub_configure=
11900    fi
11901
11902    # The recursion is here.
11903    if test -n "$tea_sub_configure"; then
11904
11905      # Force usage of a cache file.
11906      if test "X$cache_file" = "X/dev/null" ; then
11907	cache_file=config.cache
11908      fi
11909
11910      # Make the cache file name correct relative to the subdirectory.
11911      case "$cache_file" in
11912      /*) tea_sub_cache_file=$cache_file ;;
11913      *) # Relative path.
11914        tea_sub_cache_file="$tea_dots$cache_file" ;;
11915      esac
11916
11917      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
11918      # The eval makes quoting arguments work.
11919      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
11920      then :
11921      else
11922        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
11923      fi
11924    fi
11925
11926    cd $tea_popdir
11927
11928
11929    tea_config_dir="pixmap"
11930    tea_config_arguments="--with-tkimg=`pwd`/base --disable-option-checking"
11931    subdirs="$subdirs $tea_config_dir"
11932
11933
11934    # Do not complain, so a configure script can configure whichever
11935    # parts of a large source tree are present.
11936    if test ! -d $srcdir/$tea_config_dir; then
11937      continue
11938    fi
11939
11940    echo configuring in $tea_config_dir
11941
11942    case "$srcdir" in
11943    .) ;;
11944    *)
11945      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
11946      else
11947        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
11948      fi
11949      ;;
11950    esac
11951
11952    tea_popdir=`pwd`
11953    cd $tea_config_dir
11954
11955      # A "../" for each directory in /$tea_config_dir.
11956      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11957
11958    case "$srcdir" in
11959    .) # No --srcdir option.  We are building in place.
11960      tea_sub_srcdir=$srcdir ;;
11961    /*) # Absolute path.
11962      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
11963    *) # Relative path.
11964      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
11965    esac
11966
11967    # Check for guested configure; otherwise get Cygnus style configure.
11968    if test -f $tea_sub_srcdir/configure; then
11969      tea_sub_configure=$tea_sub_srcdir/configure
11970    elif test -f $tea_sub_srcdir/configure.in; then
11971      tea_sub_configure=$tea_configure
11972    else
11973      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
11974      tea_sub_configure=
11975    fi
11976
11977    # The recursion is here.
11978    if test -n "$tea_sub_configure"; then
11979
11980      # Force usage of a cache file.
11981      if test "X$cache_file" = "X/dev/null" ; then
11982	cache_file=config.cache
11983      fi
11984
11985      # Make the cache file name correct relative to the subdirectory.
11986      case "$cache_file" in
11987      /*) tea_sub_cache_file=$cache_file ;;
11988      *) # Relative path.
11989        tea_sub_cache_file="$tea_dots$cache_file" ;;
11990      esac
11991
11992      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
11993      # The eval makes quoting arguments work.
11994      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
11995      then :
11996      else
11997        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
11998      fi
11999    fi
12000
12001    cd $tea_popdir
12002
12003
12004    tea_config_dir="png"
12005    tea_config_arguments="--with-tkimg=`pwd`/base --with-pngtcl=`pwd`/libpng --with-zlibtcl=`pwd`/zlib --disable-option-checking"
12006    subdirs="$subdirs $tea_config_dir"
12007
12008
12009    # Do not complain, so a configure script can configure whichever
12010    # parts of a large source tree are present.
12011    if test ! -d $srcdir/$tea_config_dir; then
12012      continue
12013    fi
12014
12015    echo configuring in $tea_config_dir
12016
12017    case "$srcdir" in
12018    .) ;;
12019    *)
12020      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
12021      else
12022        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
12023      fi
12024      ;;
12025    esac
12026
12027    tea_popdir=`pwd`
12028    cd $tea_config_dir
12029
12030      # A "../" for each directory in /$tea_config_dir.
12031      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
12032
12033    case "$srcdir" in
12034    .) # No --srcdir option.  We are building in place.
12035      tea_sub_srcdir=$srcdir ;;
12036    /*) # Absolute path.
12037      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
12038    *) # Relative path.
12039      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
12040    esac
12041
12042    # Check for guested configure; otherwise get Cygnus style configure.
12043    if test -f $tea_sub_srcdir/configure; then
12044      tea_sub_configure=$tea_sub_srcdir/configure
12045    elif test -f $tea_sub_srcdir/configure.in; then
12046      tea_sub_configure=$tea_configure
12047    else
12048      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
12049      tea_sub_configure=
12050    fi
12051
12052    # The recursion is here.
12053    if test -n "$tea_sub_configure"; then
12054
12055      # Force usage of a cache file.
12056      if test "X$cache_file" = "X/dev/null" ; then
12057	cache_file=config.cache
12058      fi
12059
12060      # Make the cache file name correct relative to the subdirectory.
12061      case "$cache_file" in
12062      /*) tea_sub_cache_file=$cache_file ;;
12063      *) # Relative path.
12064        tea_sub_cache_file="$tea_dots$cache_file" ;;
12065      esac
12066
12067      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
12068      # The eval makes quoting arguments work.
12069      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
12070      then :
12071      else
12072        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
12073      fi
12074    fi
12075
12076    cd $tea_popdir
12077
12078
12079    tea_config_dir="ppm"
12080    tea_config_arguments="--with-tkimg=`pwd`/base --disable-option-checking"
12081    subdirs="$subdirs $tea_config_dir"
12082
12083
12084    # Do not complain, so a configure script can configure whichever
12085    # parts of a large source tree are present.
12086    if test ! -d $srcdir/$tea_config_dir; then
12087      continue
12088    fi
12089
12090    echo configuring in $tea_config_dir
12091
12092    case "$srcdir" in
12093    .) ;;
12094    *)
12095      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
12096      else
12097        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
12098      fi
12099      ;;
12100    esac
12101
12102    tea_popdir=`pwd`
12103    cd $tea_config_dir
12104
12105      # A "../" for each directory in /$tea_config_dir.
12106      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
12107
12108    case "$srcdir" in
12109    .) # No --srcdir option.  We are building in place.
12110      tea_sub_srcdir=$srcdir ;;
12111    /*) # Absolute path.
12112      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
12113    *) # Relative path.
12114      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
12115    esac
12116
12117    # Check for guested configure; otherwise get Cygnus style configure.
12118    if test -f $tea_sub_srcdir/configure; then
12119      tea_sub_configure=$tea_sub_srcdir/configure
12120    elif test -f $tea_sub_srcdir/configure.in; then
12121      tea_sub_configure=$tea_configure
12122    else
12123      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
12124      tea_sub_configure=
12125    fi
12126
12127    # The recursion is here.
12128    if test -n "$tea_sub_configure"; then
12129
12130      # Force usage of a cache file.
12131      if test "X$cache_file" = "X/dev/null" ; then
12132	cache_file=config.cache
12133      fi
12134
12135      # Make the cache file name correct relative to the subdirectory.
12136      case "$cache_file" in
12137      /*) tea_sub_cache_file=$cache_file ;;
12138      *) # Relative path.
12139        tea_sub_cache_file="$tea_dots$cache_file" ;;
12140      esac
12141
12142      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
12143      # The eval makes quoting arguments work.
12144      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
12145      then :
12146      else
12147        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
12148      fi
12149    fi
12150
12151    cd $tea_popdir
12152
12153
12154    tea_config_dir="ps"
12155    tea_config_arguments="--with-tkimg=`pwd`/base --disable-option-checking"
12156    subdirs="$subdirs $tea_config_dir"
12157
12158
12159    # Do not complain, so a configure script can configure whichever
12160    # parts of a large source tree are present.
12161    if test ! -d $srcdir/$tea_config_dir; then
12162      continue
12163    fi
12164
12165    echo configuring in $tea_config_dir
12166
12167    case "$srcdir" in
12168    .) ;;
12169    *)
12170      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
12171      else
12172        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
12173      fi
12174      ;;
12175    esac
12176
12177    tea_popdir=`pwd`
12178    cd $tea_config_dir
12179
12180      # A "../" for each directory in /$tea_config_dir.
12181      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
12182
12183    case "$srcdir" in
12184    .) # No --srcdir option.  We are building in place.
12185      tea_sub_srcdir=$srcdir ;;
12186    /*) # Absolute path.
12187      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
12188    *) # Relative path.
12189      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
12190    esac
12191
12192    # Check for guested configure; otherwise get Cygnus style configure.
12193    if test -f $tea_sub_srcdir/configure; then
12194      tea_sub_configure=$tea_sub_srcdir/configure
12195    elif test -f $tea_sub_srcdir/configure.in; then
12196      tea_sub_configure=$tea_configure
12197    else
12198      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
12199      tea_sub_configure=
12200    fi
12201
12202    # The recursion is here.
12203    if test -n "$tea_sub_configure"; then
12204
12205      # Force usage of a cache file.
12206      if test "X$cache_file" = "X/dev/null" ; then
12207	cache_file=config.cache
12208      fi
12209
12210      # Make the cache file name correct relative to the subdirectory.
12211      case "$cache_file" in
12212      /*) tea_sub_cache_file=$cache_file ;;
12213      *) # Relative path.
12214        tea_sub_cache_file="$tea_dots$cache_file" ;;
12215      esac
12216
12217      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
12218      # The eval makes quoting arguments work.
12219      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
12220      then :
12221      else
12222        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
12223      fi
12224    fi
12225
12226    cd $tea_popdir
12227
12228
12229    tea_config_dir="sgi"
12230    tea_config_arguments="--with-tkimg=`pwd`/base --disable-option-checking"
12231    subdirs="$subdirs $tea_config_dir"
12232
12233
12234    # Do not complain, so a configure script can configure whichever
12235    # parts of a large source tree are present.
12236    if test ! -d $srcdir/$tea_config_dir; then
12237      continue
12238    fi
12239
12240    echo configuring in $tea_config_dir
12241
12242    case "$srcdir" in
12243    .) ;;
12244    *)
12245      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
12246      else
12247        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
12248      fi
12249      ;;
12250    esac
12251
12252    tea_popdir=`pwd`
12253    cd $tea_config_dir
12254
12255      # A "../" for each directory in /$tea_config_dir.
12256      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
12257
12258    case "$srcdir" in
12259    .) # No --srcdir option.  We are building in place.
12260      tea_sub_srcdir=$srcdir ;;
12261    /*) # Absolute path.
12262      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
12263    *) # Relative path.
12264      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
12265    esac
12266
12267    # Check for guested configure; otherwise get Cygnus style configure.
12268    if test -f $tea_sub_srcdir/configure; then
12269      tea_sub_configure=$tea_sub_srcdir/configure
12270    elif test -f $tea_sub_srcdir/configure.in; then
12271      tea_sub_configure=$tea_configure
12272    else
12273      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
12274      tea_sub_configure=
12275    fi
12276
12277    # The recursion is here.
12278    if test -n "$tea_sub_configure"; then
12279
12280      # Force usage of a cache file.
12281      if test "X$cache_file" = "X/dev/null" ; then
12282	cache_file=config.cache
12283      fi
12284
12285      # Make the cache file name correct relative to the subdirectory.
12286      case "$cache_file" in
12287      /*) tea_sub_cache_file=$cache_file ;;
12288      *) # Relative path.
12289        tea_sub_cache_file="$tea_dots$cache_file" ;;
12290      esac
12291
12292      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
12293      # The eval makes quoting arguments work.
12294      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
12295      then :
12296      else
12297        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
12298      fi
12299    fi
12300
12301    cd $tea_popdir
12302
12303
12304    tea_config_dir="sun"
12305    tea_config_arguments="--with-tkimg=`pwd`/base --disable-option-checking"
12306    subdirs="$subdirs $tea_config_dir"
12307
12308
12309    # Do not complain, so a configure script can configure whichever
12310    # parts of a large source tree are present.
12311    if test ! -d $srcdir/$tea_config_dir; then
12312      continue
12313    fi
12314
12315    echo configuring in $tea_config_dir
12316
12317    case "$srcdir" in
12318    .) ;;
12319    *)
12320      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
12321      else
12322        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
12323      fi
12324      ;;
12325    esac
12326
12327    tea_popdir=`pwd`
12328    cd $tea_config_dir
12329
12330      # A "../" for each directory in /$tea_config_dir.
12331      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
12332
12333    case "$srcdir" in
12334    .) # No --srcdir option.  We are building in place.
12335      tea_sub_srcdir=$srcdir ;;
12336    /*) # Absolute path.
12337      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
12338    *) # Relative path.
12339      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
12340    esac
12341
12342    # Check for guested configure; otherwise get Cygnus style configure.
12343    if test -f $tea_sub_srcdir/configure; then
12344      tea_sub_configure=$tea_sub_srcdir/configure
12345    elif test -f $tea_sub_srcdir/configure.in; then
12346      tea_sub_configure=$tea_configure
12347    else
12348      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
12349      tea_sub_configure=
12350    fi
12351
12352    # The recursion is here.
12353    if test -n "$tea_sub_configure"; then
12354
12355      # Force usage of a cache file.
12356      if test "X$cache_file" = "X/dev/null" ; then
12357	cache_file=config.cache
12358      fi
12359
12360      # Make the cache file name correct relative to the subdirectory.
12361      case "$cache_file" in
12362      /*) tea_sub_cache_file=$cache_file ;;
12363      *) # Relative path.
12364        tea_sub_cache_file="$tea_dots$cache_file" ;;
12365      esac
12366
12367      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
12368      # The eval makes quoting arguments work.
12369      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
12370      then :
12371      else
12372        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
12373      fi
12374    fi
12375
12376    cd $tea_popdir
12377
12378
12379    tea_config_dir="tga"
12380    tea_config_arguments="--with-tkimg=`pwd`/base --disable-option-checking"
12381    subdirs="$subdirs $tea_config_dir"
12382
12383
12384    # Do not complain, so a configure script can configure whichever
12385    # parts of a large source tree are present.
12386    if test ! -d $srcdir/$tea_config_dir; then
12387      continue
12388    fi
12389
12390    echo configuring in $tea_config_dir
12391
12392    case "$srcdir" in
12393    .) ;;
12394    *)
12395      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
12396      else
12397        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
12398      fi
12399      ;;
12400    esac
12401
12402    tea_popdir=`pwd`
12403    cd $tea_config_dir
12404
12405      # A "../" for each directory in /$tea_config_dir.
12406      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
12407
12408    case "$srcdir" in
12409    .) # No --srcdir option.  We are building in place.
12410      tea_sub_srcdir=$srcdir ;;
12411    /*) # Absolute path.
12412      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
12413    *) # Relative path.
12414      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
12415    esac
12416
12417    # Check for guested configure; otherwise get Cygnus style configure.
12418    if test -f $tea_sub_srcdir/configure; then
12419      tea_sub_configure=$tea_sub_srcdir/configure
12420    elif test -f $tea_sub_srcdir/configure.in; then
12421      tea_sub_configure=$tea_configure
12422    else
12423      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
12424      tea_sub_configure=
12425    fi
12426
12427    # The recursion is here.
12428    if test -n "$tea_sub_configure"; then
12429
12430      # Force usage of a cache file.
12431      if test "X$cache_file" = "X/dev/null" ; then
12432	cache_file=config.cache
12433      fi
12434
12435      # Make the cache file name correct relative to the subdirectory.
12436      case "$cache_file" in
12437      /*) tea_sub_cache_file=$cache_file ;;
12438      *) # Relative path.
12439        tea_sub_cache_file="$tea_dots$cache_file" ;;
12440      esac
12441
12442      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
12443      # The eval makes quoting arguments work.
12444      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
12445      then :
12446      else
12447        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
12448      fi
12449    fi
12450
12451    cd $tea_popdir
12452
12453
12454    tea_config_dir="tiff"
12455    tea_config_arguments="--with-tkimg=`pwd`/base --with-tifftcl=`pwd`/libtiff --with-zlibtcl=`pwd`/zlib --with-jpegtcl=`pwd`/libjpeg --disable-option-checking"
12456    subdirs="$subdirs $tea_config_dir"
12457
12458
12459    # Do not complain, so a configure script can configure whichever
12460    # parts of a large source tree are present.
12461    if test ! -d $srcdir/$tea_config_dir; then
12462      continue
12463    fi
12464
12465    echo configuring in $tea_config_dir
12466
12467    case "$srcdir" in
12468    .) ;;
12469    *)
12470      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
12471      else
12472        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
12473      fi
12474      ;;
12475    esac
12476
12477    tea_popdir=`pwd`
12478    cd $tea_config_dir
12479
12480      # A "../" for each directory in /$tea_config_dir.
12481      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
12482
12483    case "$srcdir" in
12484    .) # No --srcdir option.  We are building in place.
12485      tea_sub_srcdir=$srcdir ;;
12486    /*) # Absolute path.
12487      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
12488    *) # Relative path.
12489      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
12490    esac
12491
12492    # Check for guested configure; otherwise get Cygnus style configure.
12493    if test -f $tea_sub_srcdir/configure; then
12494      tea_sub_configure=$tea_sub_srcdir/configure
12495    elif test -f $tea_sub_srcdir/configure.in; then
12496      tea_sub_configure=$tea_configure
12497    else
12498      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
12499      tea_sub_configure=
12500    fi
12501
12502    # The recursion is here.
12503    if test -n "$tea_sub_configure"; then
12504
12505      # Force usage of a cache file.
12506      if test "X$cache_file" = "X/dev/null" ; then
12507	cache_file=config.cache
12508      fi
12509
12510      # Make the cache file name correct relative to the subdirectory.
12511      case "$cache_file" in
12512      /*) tea_sub_cache_file=$cache_file ;;
12513      *) # Relative path.
12514        tea_sub_cache_file="$tea_dots$cache_file" ;;
12515      esac
12516
12517      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
12518      # The eval makes quoting arguments work.
12519      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
12520      then :
12521      else
12522        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
12523      fi
12524    fi
12525
12526    cd $tea_popdir
12527
12528
12529    tea_config_dir="window"
12530    tea_config_arguments="--with-tkimg=`pwd`/base --disable-option-checking"
12531    subdirs="$subdirs $tea_config_dir"
12532
12533
12534    # Do not complain, so a configure script can configure whichever
12535    # parts of a large source tree are present.
12536    if test ! -d $srcdir/$tea_config_dir; then
12537      continue
12538    fi
12539
12540    echo configuring in $tea_config_dir
12541
12542    case "$srcdir" in
12543    .) ;;
12544    *)
12545      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
12546      else
12547        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
12548      fi
12549      ;;
12550    esac
12551
12552    tea_popdir=`pwd`
12553    cd $tea_config_dir
12554
12555      # A "../" for each directory in /$tea_config_dir.
12556      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
12557
12558    case "$srcdir" in
12559    .) # No --srcdir option.  We are building in place.
12560      tea_sub_srcdir=$srcdir ;;
12561    /*) # Absolute path.
12562      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
12563    *) # Relative path.
12564      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
12565    esac
12566
12567    # Check for guested configure; otherwise get Cygnus style configure.
12568    if test -f $tea_sub_srcdir/configure; then
12569      tea_sub_configure=$tea_sub_srcdir/configure
12570    elif test -f $tea_sub_srcdir/configure.in; then
12571      tea_sub_configure=$tea_configure
12572    else
12573      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
12574      tea_sub_configure=
12575    fi
12576
12577    # The recursion is here.
12578    if test -n "$tea_sub_configure"; then
12579
12580      # Force usage of a cache file.
12581      if test "X$cache_file" = "X/dev/null" ; then
12582	cache_file=config.cache
12583      fi
12584
12585      # Make the cache file name correct relative to the subdirectory.
12586      case "$cache_file" in
12587      /*) tea_sub_cache_file=$cache_file ;;
12588      *) # Relative path.
12589        tea_sub_cache_file="$tea_dots$cache_file" ;;
12590      esac
12591
12592      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
12593      # The eval makes quoting arguments work.
12594      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
12595      then :
12596      else
12597        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
12598      fi
12599    fi
12600
12601    cd $tea_popdir
12602
12603
12604    tea_config_dir="xbm"
12605    tea_config_arguments="--with-tkimg=`pwd`/base --disable-option-checking"
12606    subdirs="$subdirs $tea_config_dir"
12607
12608
12609    # Do not complain, so a configure script can configure whichever
12610    # parts of a large source tree are present.
12611    if test ! -d $srcdir/$tea_config_dir; then
12612      continue
12613    fi
12614
12615    echo configuring in $tea_config_dir
12616
12617    case "$srcdir" in
12618    .) ;;
12619    *)
12620      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
12621      else
12622        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
12623      fi
12624      ;;
12625    esac
12626
12627    tea_popdir=`pwd`
12628    cd $tea_config_dir
12629
12630      # A "../" for each directory in /$tea_config_dir.
12631      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
12632
12633    case "$srcdir" in
12634    .) # No --srcdir option.  We are building in place.
12635      tea_sub_srcdir=$srcdir ;;
12636    /*) # Absolute path.
12637      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
12638    *) # Relative path.
12639      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
12640    esac
12641
12642    # Check for guested configure; otherwise get Cygnus style configure.
12643    if test -f $tea_sub_srcdir/configure; then
12644      tea_sub_configure=$tea_sub_srcdir/configure
12645    elif test -f $tea_sub_srcdir/configure.in; then
12646      tea_sub_configure=$tea_configure
12647    else
12648      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
12649      tea_sub_configure=
12650    fi
12651
12652    # The recursion is here.
12653    if test -n "$tea_sub_configure"; then
12654
12655      # Force usage of a cache file.
12656      if test "X$cache_file" = "X/dev/null" ; then
12657	cache_file=config.cache
12658      fi
12659
12660      # Make the cache file name correct relative to the subdirectory.
12661      case "$cache_file" in
12662      /*) tea_sub_cache_file=$cache_file ;;
12663      *) # Relative path.
12664        tea_sub_cache_file="$tea_dots$cache_file" ;;
12665      esac
12666
12667      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
12668      # The eval makes quoting arguments work.
12669      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
12670      then :
12671      else
12672        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
12673      fi
12674    fi
12675
12676    cd $tea_popdir
12677
12678
12679    tea_config_dir="xpm"
12680    tea_config_arguments="--with-tkimg=`pwd`/base --disable-option-checking"
12681    subdirs="$subdirs $tea_config_dir"
12682
12683
12684    # Do not complain, so a configure script can configure whichever
12685    # parts of a large source tree are present.
12686    if test ! -d $srcdir/$tea_config_dir; then
12687      continue
12688    fi
12689
12690    echo configuring in $tea_config_dir
12691
12692    case "$srcdir" in
12693    .) ;;
12694    *)
12695      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
12696      else
12697        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
12698      fi
12699      ;;
12700    esac
12701
12702    tea_popdir=`pwd`
12703    cd $tea_config_dir
12704
12705      # A "../" for each directory in /$tea_config_dir.
12706      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
12707
12708    case "$srcdir" in
12709    .) # No --srcdir option.  We are building in place.
12710      tea_sub_srcdir=$srcdir ;;
12711    /*) # Absolute path.
12712      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
12713    *) # Relative path.
12714      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
12715    esac
12716
12717    # Check for guested configure; otherwise get Cygnus style configure.
12718    if test -f $tea_sub_srcdir/configure; then
12719      tea_sub_configure=$tea_sub_srcdir/configure
12720    elif test -f $tea_sub_srcdir/configure.in; then
12721      tea_sub_configure=$tea_configure
12722    else
12723      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
12724      tea_sub_configure=
12725    fi
12726
12727    # The recursion is here.
12728    if test -n "$tea_sub_configure"; then
12729
12730      # Force usage of a cache file.
12731      if test "X$cache_file" = "X/dev/null" ; then
12732	cache_file=config.cache
12733      fi
12734
12735      # Make the cache file name correct relative to the subdirectory.
12736      case "$cache_file" in
12737      /*) tea_sub_cache_file=$cache_file ;;
12738      *) # Relative path.
12739        tea_sub_cache_file="$tea_dots$cache_file" ;;
12740      esac
12741
12742      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
12743      # The eval makes quoting arguments work.
12744      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
12745      then :
12746      else
12747        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
12748      fi
12749    fi
12750
12751    cd $tea_popdir
12752
12753
12754    tea_config_dir="dted"
12755    tea_config_arguments="--with-tkimg=`pwd`/base --disable-option-checking"
12756    subdirs="$subdirs $tea_config_dir"
12757
12758
12759    # Do not complain, so a configure script can configure whichever
12760    # parts of a large source tree are present.
12761    if test ! -d $srcdir/$tea_config_dir; then
12762      continue
12763    fi
12764
12765    echo configuring in $tea_config_dir
12766
12767    case "$srcdir" in
12768    .) ;;
12769    *)
12770      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
12771      else
12772        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
12773      fi
12774      ;;
12775    esac
12776
12777    tea_popdir=`pwd`
12778    cd $tea_config_dir
12779
12780      # A "../" for each directory in /$tea_config_dir.
12781      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
12782
12783    case "$srcdir" in
12784    .) # No --srcdir option.  We are building in place.
12785      tea_sub_srcdir=$srcdir ;;
12786    /*) # Absolute path.
12787      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
12788    *) # Relative path.
12789      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
12790    esac
12791
12792    # Check for guested configure; otherwise get Cygnus style configure.
12793    if test -f $tea_sub_srcdir/configure; then
12794      tea_sub_configure=$tea_sub_srcdir/configure
12795    elif test -f $tea_sub_srcdir/configure.in; then
12796      tea_sub_configure=$tea_configure
12797    else
12798      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
12799      tea_sub_configure=
12800    fi
12801
12802    # The recursion is here.
12803    if test -n "$tea_sub_configure"; then
12804
12805      # Force usage of a cache file.
12806      if test "X$cache_file" = "X/dev/null" ; then
12807	cache_file=config.cache
12808      fi
12809
12810      # Make the cache file name correct relative to the subdirectory.
12811      case "$cache_file" in
12812      /*) tea_sub_cache_file=$cache_file ;;
12813      *) # Relative path.
12814        tea_sub_cache_file="$tea_dots$cache_file" ;;
12815      esac
12816
12817      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
12818      # The eval makes quoting arguments work.
12819      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
12820      then :
12821      else
12822        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
12823      fi
12824    fi
12825
12826    cd $tea_popdir
12827
12828
12829    tea_config_dir="raw"
12830    tea_config_arguments="--with-tkimg=`pwd`/base --disable-option-checking"
12831    subdirs="$subdirs $tea_config_dir"
12832
12833
12834    # Do not complain, so a configure script can configure whichever
12835    # parts of a large source tree are present.
12836    if test ! -d $srcdir/$tea_config_dir; then
12837      continue
12838    fi
12839
12840    echo configuring in $tea_config_dir
12841
12842    case "$srcdir" in
12843    .) ;;
12844    *)
12845      if test -d ./$tea_config_dir || mkdir -p ./$tea_config_dir; then :;
12846      else
12847        { echo "configure: error: can not create `pwd`/$tea_config_dir" 1>&2; exit 1; }
12848      fi
12849      ;;
12850    esac
12851
12852    tea_popdir=`pwd`
12853    cd $tea_config_dir
12854
12855      # A "../" for each directory in /$tea_config_dir.
12856      tea_dots=`echo $tea_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
12857
12858    case "$srcdir" in
12859    .) # No --srcdir option.  We are building in place.
12860      tea_sub_srcdir=$srcdir ;;
12861    /*) # Absolute path.
12862      tea_sub_srcdir=$srcdir/$tea_config_dir ;;
12863    *) # Relative path.
12864      tea_sub_srcdir=$tea_dots$srcdir/$tea_config_dir ;;
12865    esac
12866
12867    # Check for guested configure; otherwise get Cygnus style configure.
12868    if test -f $tea_sub_srcdir/configure; then
12869      tea_sub_configure=$tea_sub_srcdir/configure
12870    elif test -f $tea_sub_srcdir/configure.in; then
12871      tea_sub_configure=$tea_configure
12872    else
12873      echo "configure: warning: no configuration information is in $tea_config_dir" 1>&2
12874      tea_sub_configure=
12875    fi
12876
12877    # The recursion is here.
12878    if test -n "$tea_sub_configure"; then
12879
12880      # Force usage of a cache file.
12881      if test "X$cache_file" = "X/dev/null" ; then
12882	cache_file=config.cache
12883      fi
12884
12885      # Make the cache file name correct relative to the subdirectory.
12886      case "$cache_file" in
12887      /*) tea_sub_cache_file=$cache_file ;;
12888      *) # Relative path.
12889        tea_sub_cache_file="$tea_dots$cache_file" ;;
12890      esac
12891
12892      echo "running ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments"
12893      # The eval makes quoting arguments work.
12894      if eval ${CONFIG_SHELL-/bin/sh} $tea_sub_configure $tea_sub_configure_args --cache-file=$tea_sub_cache_file --srcdir=$tea_sub_srcdir $tea_config_arguments
12895      then :
12896      else
12897        { echo "configure: error: $tea_sub_configure failed for $tea_config_dir" 1>&2; exit 1; }
12898      fi
12899    fi
12900
12901    cd $tea_popdir
12902
12903
12904#--------------------------------------------------------------------
12905#	Finally
12906#--------------------------------------------------------------------
12907
12908ac_config_files="$ac_config_files Makefile"
12909
12910cat >confcache <<\_ACEOF
12911# This file is a shell script that caches the results of configure
12912# tests run on this system so they can be shared between configure
12913# scripts and configure runs, see configure's option --config-cache.
12914# It is not useful on other systems.  If it contains results you don't
12915# want to keep, you may remove or edit it.
12916#
12917# config.status only pays attention to the cache file if you give it
12918# the --recheck option to rerun configure.
12919#
12920# `ac_cv_env_foo' variables (set or unset) will be overridden when
12921# loading this file, other *unset* `ac_cv_foo' will be assigned the
12922# following values.
12923
12924_ACEOF
12925
12926# The following way of writing the cache mishandles newlines in values,
12927# but we know of no workaround that is simple, portable, and efficient.
12928# So, we kill variables containing newlines.
12929# Ultrix sh set writes to stderr and can't be redirected directly,
12930# and sets the high bit in the cache file unless we assign to the vars.
12931(
12932  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
12933    eval ac_val=\$$ac_var
12934    case $ac_val in #(
12935    *${as_nl}*)
12936      case $ac_var in #(
12937      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
12938echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
12939      esac
12940      case $ac_var in #(
12941      _ | IFS | as_nl) ;; #(
12942      *) $as_unset $ac_var ;;
12943      esac ;;
12944    esac
12945  done
12946
12947  (set) 2>&1 |
12948    case $as_nl`(ac_space=' '; set) 2>&1` in #(
12949    *${as_nl}ac_space=\ *)
12950      # `set' does not quote correctly, so add quotes (double-quote
12951      # substitution turns \\\\ into \\, and sed turns \\ into \).
12952      sed -n \
12953	"s/'/'\\\\''/g;
12954	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12955      ;; #(
12956    *)
12957      # `set' quotes correctly as required by POSIX, so do not add quotes.
12958      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
12959      ;;
12960    esac |
12961    sort
12962) |
12963  sed '
12964     /^ac_cv_env_/b end
12965     t clear
12966     :clear
12967     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12968     t end
12969     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12970     :end' >>confcache
12971if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
12972  if test -w "$cache_file"; then
12973    test "x$cache_file" != "x/dev/null" &&
12974      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
12975echo "$as_me: updating cache $cache_file" >&6;}
12976    cat confcache >$cache_file
12977  else
12978    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
12979echo "$as_me: not updating unwritable cache $cache_file" >&6;}
12980  fi
12981fi
12982rm -f confcache
12983
12984test "x$prefix" = xNONE && prefix=$ac_default_prefix
12985# Let make expand exec_prefix.
12986test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12987
12988# Transform confdefs.h into DEFS.
12989# Protect against shell expansion while executing Makefile rules.
12990# Protect against Makefile macro expansion.
12991#
12992# If the first sed substitution is executed (which looks for macros that
12993# take arguments), then branch to the quote section.  Otherwise,
12994# look for a macro that doesn't take arguments.
12995ac_script='
12996t clear
12997:clear
12998s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
12999t quote
13000s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
13001t quote
13002b any
13003:quote
13004s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
13005s/\[/\\&/g
13006s/\]/\\&/g
13007s/\$/$$/g
13008H
13009:any
13010${
13011	g
13012	s/^\n//
13013	s/\n/ /g
13014	p
13015}
13016'
13017DEFS=`sed -n "$ac_script" confdefs.h`
13018
13019
13020ac_libobjs=
13021ac_ltlibobjs=
13022for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13023  # 1. Remove the extension, and $U if already installed.
13024  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
13025  ac_i=`echo "$ac_i" | sed "$ac_script"`
13026  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
13027  #    will be set to the directory where LIBOBJS objects are built.
13028  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13029  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
13030done
13031LIBOBJS=$ac_libobjs
13032
13033LTLIBOBJS=$ac_ltlibobjs
13034
13035
13036CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
13037
13038: ${CONFIG_STATUS=./config.status}
13039ac_clean_files_save=$ac_clean_files
13040ac_clean_files="$ac_clean_files $CONFIG_STATUS"
13041{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
13042echo "$as_me: creating $CONFIG_STATUS" >&6;}
13043cat >$CONFIG_STATUS <<_ACEOF
13044#! $SHELL
13045# Generated by $as_me.
13046# Run this file to recreate the current configuration.
13047# Compiler output produced by configure, useful for debugging
13048# configure, is in config.log if it exists.
13049
13050debug=false
13051ac_cs_recheck=false
13052ac_cs_silent=false
13053SHELL=\${CONFIG_SHELL-$SHELL}
13054_ACEOF
13055
13056cat >>$CONFIG_STATUS <<\_ACEOF
13057## --------------------- ##
13058## M4sh Initialization.  ##
13059## --------------------- ##
13060
13061# Be more Bourne compatible
13062DUALCASE=1; export DUALCASE # for MKS sh
13063if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
13064  emulate sh
13065  NULLCMD=:
13066  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
13067  # is contrary to our usage.  Disable this feature.
13068  alias -g '${1+"$@"}'='"$@"'
13069  setopt NO_GLOB_SUBST
13070else
13071  case `(set -o) 2>/dev/null` in
13072  *posix*) set -o posix ;;
13073esac
13074
13075fi
13076
13077
13078
13079
13080# PATH needs CR
13081# Avoid depending upon Character Ranges.
13082as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13083as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13084as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13085as_cr_digits='0123456789'
13086as_cr_alnum=$as_cr_Letters$as_cr_digits
13087
13088# The user is always right.
13089if test "${PATH_SEPARATOR+set}" != set; then
13090  echo "#! /bin/sh" >conf$$.sh
13091  echo  "exit 0"   >>conf$$.sh
13092  chmod +x conf$$.sh
13093  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
13094    PATH_SEPARATOR=';'
13095  else
13096    PATH_SEPARATOR=:
13097  fi
13098  rm -f conf$$.sh
13099fi
13100
13101# Support unset when possible.
13102if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
13103  as_unset=unset
13104else
13105  as_unset=false
13106fi
13107
13108
13109# IFS
13110# We need space, tab and new line, in precisely that order.  Quoting is
13111# there to prevent editors from complaining about space-tab.
13112# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13113# splitting by setting IFS to empty value.)
13114as_nl='
13115'
13116IFS=" ""	$as_nl"
13117
13118# Find who we are.  Look in the path if we contain no directory separator.
13119case $0 in
13120  *[\\/]* ) as_myself=$0 ;;
13121  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13122for as_dir in $PATH
13123do
13124  IFS=$as_save_IFS
13125  test -z "$as_dir" && as_dir=.
13126  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13127done
13128IFS=$as_save_IFS
13129
13130     ;;
13131esac
13132# We did not find ourselves, most probably we were run as `sh COMMAND'
13133# in which case we are not to be found in the path.
13134if test "x$as_myself" = x; then
13135  as_myself=$0
13136fi
13137if test ! -f "$as_myself"; then
13138  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13139  { (exit 1); exit 1; }
13140fi
13141
13142# Work around bugs in pre-3.0 UWIN ksh.
13143for as_var in ENV MAIL MAILPATH
13144do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
13145done
13146PS1='$ '
13147PS2='> '
13148PS4='+ '
13149
13150# NLS nuisances.
13151for as_var in \
13152  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
13153  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
13154  LC_TELEPHONE LC_TIME
13155do
13156  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
13157    eval $as_var=C; export $as_var
13158  else
13159    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
13160  fi
13161done
13162
13163# Required to use basename.
13164if expr a : '\(a\)' >/dev/null 2>&1 &&
13165   test "X`expr 00001 : '.*\(...\)'`" = X001; then
13166  as_expr=expr
13167else
13168  as_expr=false
13169fi
13170
13171if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13172  as_basename=basename
13173else
13174  as_basename=false
13175fi
13176
13177
13178# Name of the executable.
13179as_me=`$as_basename -- "$0" ||
13180$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13181	 X"$0" : 'X\(//\)$' \| \
13182	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
13183echo X/"$0" |
13184    sed '/^.*\/\([^/][^/]*\)\/*$/{
13185	    s//\1/
13186	    q
13187	  }
13188	  /^X\/\(\/\/\)$/{
13189	    s//\1/
13190	    q
13191	  }
13192	  /^X\/\(\/\).*/{
13193	    s//\1/
13194	    q
13195	  }
13196	  s/.*/./; q'`
13197
13198# CDPATH.
13199$as_unset CDPATH
13200
13201
13202
13203  as_lineno_1=$LINENO
13204  as_lineno_2=$LINENO
13205  test "x$as_lineno_1" != "x$as_lineno_2" &&
13206  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
13207
13208  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
13209  # uniformly replaced by the line number.  The first 'sed' inserts a
13210  # line-number line after each line using $LINENO; the second 'sed'
13211  # does the real work.  The second script uses 'N' to pair each
13212  # line-number line with the line containing $LINENO, and appends
13213  # trailing '-' during substitution so that $LINENO is not a special
13214  # case at line end.
13215  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
13216  # scripts with optimization help from Paolo Bonzini.  Blame Lee
13217  # E. McMahon (1931-1989) for sed's syntax.  :-)
13218  sed -n '
13219    p
13220    /[$]LINENO/=
13221  ' <$as_myself |
13222    sed '
13223      s/[$]LINENO.*/&-/
13224      t lineno
13225      b
13226      :lineno
13227      N
13228      :loop
13229      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
13230      t loop
13231      s/-\n.*//
13232    ' >$as_me.lineno &&
13233  chmod +x "$as_me.lineno" ||
13234    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
13235   { (exit 1); exit 1; }; }
13236
13237  # Don't try to exec as it changes $[0], causing all sort of problems
13238  # (the dirname of $[0] is not the place where we might find the
13239  # original and so on.  Autoconf is especially sensitive to this).
13240  . "./$as_me.lineno"
13241  # Exit status is that of the last command.
13242  exit
13243}
13244
13245
13246if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13247  as_dirname=dirname
13248else
13249  as_dirname=false
13250fi
13251
13252ECHO_C= ECHO_N= ECHO_T=
13253case `echo -n x` in
13254-n*)
13255  case `echo 'x\c'` in
13256  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
13257  *)   ECHO_C='\c';;
13258  esac;;
13259*)
13260  ECHO_N='-n';;
13261esac
13262
13263if expr a : '\(a\)' >/dev/null 2>&1 &&
13264   test "X`expr 00001 : '.*\(...\)'`" = X001; then
13265  as_expr=expr
13266else
13267  as_expr=false
13268fi
13269
13270rm -f conf$$ conf$$.exe conf$$.file
13271if test -d conf$$.dir; then
13272  rm -f conf$$.dir/conf$$.file
13273else
13274  rm -f conf$$.dir
13275  mkdir conf$$.dir
13276fi
13277echo >conf$$.file
13278if ln -s conf$$.file conf$$ 2>/dev/null; then
13279  as_ln_s='ln -s'
13280  # ... but there are two gotchas:
13281  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13282  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13283  # In both cases, we have to default to `cp -p'.
13284  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13285    as_ln_s='cp -p'
13286elif ln conf$$.file conf$$ 2>/dev/null; then
13287  as_ln_s=ln
13288else
13289  as_ln_s='cp -p'
13290fi
13291rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13292rmdir conf$$.dir 2>/dev/null
13293
13294if mkdir -p . 2>/dev/null; then
13295  as_mkdir_p=:
13296else
13297  test -d ./-p && rmdir ./-p
13298  as_mkdir_p=false
13299fi
13300
13301if test -x / >/dev/null 2>&1; then
13302  as_test_x='test -x'
13303else
13304  if ls -dL / >/dev/null 2>&1; then
13305    as_ls_L_option=L
13306  else
13307    as_ls_L_option=
13308  fi
13309  as_test_x='
13310    eval sh -c '\''
13311      if test -d "$1"; then
13312        test -d "$1/.";
13313      else
13314	case $1 in
13315        -*)set "./$1";;
13316	esac;
13317	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
13318	???[sx]*):;;*)false;;esac;fi
13319    '\'' sh
13320  '
13321fi
13322as_executable_p=$as_test_x
13323
13324# Sed expression to map a string onto a valid CPP name.
13325as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
13326
13327# Sed expression to map a string onto a valid variable name.
13328as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
13329
13330
13331exec 6>&1
13332
13333# Save the log message, to keep $[0] and so on meaningful, and to
13334# report actual input values of CONFIG_FILES etc. instead of their
13335# values after options handling.
13336ac_log="
13337This file was extended by Img $as_me 1.4, which was
13338generated by GNU Autoconf 2.61.  Invocation command line was
13339
13340  CONFIG_FILES    = $CONFIG_FILES
13341  CONFIG_HEADERS  = $CONFIG_HEADERS
13342  CONFIG_LINKS    = $CONFIG_LINKS
13343  CONFIG_COMMANDS = $CONFIG_COMMANDS
13344  $ $0 $@
13345
13346on `(hostname || uname -n) 2>/dev/null | sed 1q`
13347"
13348
13349_ACEOF
13350
13351cat >>$CONFIG_STATUS <<_ACEOF
13352# Files that config.status was made for.
13353config_files="$ac_config_files"
13354
13355_ACEOF
13356
13357cat >>$CONFIG_STATUS <<\_ACEOF
13358ac_cs_usage="\
13359\`$as_me' instantiates files from templates according to the
13360current configuration.
13361
13362Usage: $0 [OPTIONS] [FILE]...
13363
13364  -h, --help       print this help, then exit
13365  -V, --version    print version number and configuration settings, then exit
13366  -q, --quiet      do not print progress messages
13367  -d, --debug      don't remove temporary files
13368      --recheck    update $as_me by reconfiguring in the same conditions
13369  --file=FILE[:TEMPLATE]
13370		   instantiate the configuration file FILE
13371
13372Configuration files:
13373$config_files
13374
13375Report bugs to <bug-autoconf@gnu.org>."
13376
13377_ACEOF
13378cat >>$CONFIG_STATUS <<_ACEOF
13379ac_cs_version="\\
13380Img config.status 1.4
13381configured by $0, generated by GNU Autoconf 2.61,
13382  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
13383
13384Copyright (C) 2006 Free Software Foundation, Inc.
13385This config.status script is free software; the Free Software Foundation
13386gives unlimited permission to copy, distribute and modify it."
13387
13388ac_pwd='$ac_pwd'
13389srcdir='$srcdir'
13390INSTALL='$INSTALL'
13391_ACEOF
13392
13393cat >>$CONFIG_STATUS <<\_ACEOF
13394# If no file are specified by the user, then we need to provide default
13395# value.  By we need to know if files were specified by the user.
13396ac_need_defaults=:
13397while test $# != 0
13398do
13399  case $1 in
13400  --*=*)
13401    ac_option=`expr "X$1" : 'X\([^=]*\)='`
13402    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
13403    ac_shift=:
13404    ;;
13405  *)
13406    ac_option=$1
13407    ac_optarg=$2
13408    ac_shift=shift
13409    ;;
13410  esac
13411
13412  case $ac_option in
13413  # Handling of the options.
13414  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13415    ac_cs_recheck=: ;;
13416  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
13417    echo "$ac_cs_version"; exit ;;
13418  --debug | --debu | --deb | --de | --d | -d )
13419    debug=: ;;
13420  --file | --fil | --fi | --f )
13421    $ac_shift
13422    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
13423    ac_need_defaults=false;;
13424  --he | --h |  --help | --hel | -h )
13425    echo "$ac_cs_usage"; exit ;;
13426  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
13427  | -silent | --silent | --silen | --sile | --sil | --si | --s)
13428    ac_cs_silent=: ;;
13429
13430  # This is an error.
13431  -*) { echo "$as_me: error: unrecognized option: $1
13432Try \`$0 --help' for more information." >&2
13433   { (exit 1); exit 1; }; } ;;
13434
13435  *) ac_config_targets="$ac_config_targets $1"
13436     ac_need_defaults=false ;;
13437
13438  esac
13439  shift
13440done
13441
13442ac_configure_extra_args=
13443
13444if $ac_cs_silent; then
13445  exec 6>/dev/null
13446  ac_configure_extra_args="$ac_configure_extra_args --silent"
13447fi
13448
13449_ACEOF
13450cat >>$CONFIG_STATUS <<_ACEOF
13451if \$ac_cs_recheck; then
13452  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
13453  CONFIG_SHELL=$SHELL
13454  export CONFIG_SHELL
13455  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
13456fi
13457
13458_ACEOF
13459cat >>$CONFIG_STATUS <<\_ACEOF
13460exec 5>>config.log
13461{
13462  echo
13463  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
13464## Running $as_me. ##
13465_ASBOX
13466  echo "$ac_log"
13467} >&5
13468
13469_ACEOF
13470cat >>$CONFIG_STATUS <<_ACEOF
13471_ACEOF
13472
13473cat >>$CONFIG_STATUS <<\_ACEOF
13474
13475# Handling of arguments.
13476for ac_config_target in $ac_config_targets
13477do
13478  case $ac_config_target in
13479    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
13480
13481  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
13482echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
13483   { (exit 1); exit 1; }; };;
13484  esac
13485done
13486
13487
13488# If the user did not use the arguments to specify the items to instantiate,
13489# then the envvar interface is used.  Set only those that are not.
13490# We use the long form for the default assignment because of an extremely
13491# bizarre bug on SunOS 4.1.3.
13492if $ac_need_defaults; then
13493  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
13494fi
13495
13496# Have a temporary directory for convenience.  Make it in the build tree
13497# simply because there is no reason against having it here, and in addition,
13498# creating and moving files from /tmp can sometimes cause problems.
13499# Hook for its removal unless debugging.
13500# Note that there is a small window in which the directory will not be cleaned:
13501# after its creation but before its name has been assigned to `$tmp'.
13502$debug ||
13503{
13504  tmp=
13505  trap 'exit_status=$?
13506  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
13507' 0
13508  trap '{ (exit 1); exit 1; }' 1 2 13 15
13509}
13510# Create a (secure) tmp directory for tmp files.
13511
13512{
13513  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
13514  test -n "$tmp" && test -d "$tmp"
13515}  ||
13516{
13517  tmp=./conf$$-$RANDOM
13518  (umask 077 && mkdir "$tmp")
13519} ||
13520{
13521   echo "$me: cannot create a temporary directory in ." >&2
13522   { (exit 1); exit 1; }
13523}
13524
13525#
13526# Set up the sed scripts for CONFIG_FILES section.
13527#
13528
13529# No need to generate the scripts if there are no CONFIG_FILES.
13530# This happens for instance when ./config.status config.h
13531if test -n "$CONFIG_FILES"; then
13532
13533_ACEOF
13534
13535
13536
13537ac_delim='%!_!# '
13538for ac_last_try in false false false false false :; do
13539  cat >conf$$subs.sed <<_ACEOF
13540SHELL!$SHELL$ac_delim
13541PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
13542PACKAGE_NAME!$PACKAGE_NAME$ac_delim
13543PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
13544PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
13545PACKAGE_STRING!$PACKAGE_STRING$ac_delim
13546PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
13547exec_prefix!$exec_prefix$ac_delim
13548prefix!$prefix$ac_delim
13549program_transform_name!$program_transform_name$ac_delim
13550bindir!$bindir$ac_delim
13551sbindir!$sbindir$ac_delim
13552libexecdir!$libexecdir$ac_delim
13553datarootdir!$datarootdir$ac_delim
13554datadir!$datadir$ac_delim
13555sysconfdir!$sysconfdir$ac_delim
13556sharedstatedir!$sharedstatedir$ac_delim
13557localstatedir!$localstatedir$ac_delim
13558includedir!$includedir$ac_delim
13559oldincludedir!$oldincludedir$ac_delim
13560docdir!$docdir$ac_delim
13561infodir!$infodir$ac_delim
13562htmldir!$htmldir$ac_delim
13563dvidir!$dvidir$ac_delim
13564pdfdir!$pdfdir$ac_delim
13565psdir!$psdir$ac_delim
13566libdir!$libdir$ac_delim
13567localedir!$localedir$ac_delim
13568mandir!$mandir$ac_delim
13569DEFS!$DEFS$ac_delim
13570ECHO_C!$ECHO_C$ac_delim
13571ECHO_N!$ECHO_N$ac_delim
13572ECHO_T!$ECHO_T$ac_delim
13573LIBS!$LIBS$ac_delim
13574build_alias!$build_alias$ac_delim
13575host_alias!$host_alias$ac_delim
13576target_alias!$target_alias$ac_delim
13577CYGPATH!$CYGPATH$ac_delim
13578EXEEXT!$EXEEXT$ac_delim
13579PKG_LIB_FILE!$PKG_LIB_FILE$ac_delim
13580PKG_STUB_LIB_FILE!$PKG_STUB_LIB_FILE$ac_delim
13581PKG_STUB_SOURCES!$PKG_STUB_SOURCES$ac_delim
13582PKG_STUB_OBJECTS!$PKG_STUB_OBJECTS$ac_delim
13583PKG_TCL_SOURCES!$PKG_TCL_SOURCES$ac_delim
13584PKG_HEADERS!$PKG_HEADERS$ac_delim
13585PKG_INCLUDES!$PKG_INCLUDES$ac_delim
13586PKG_LIBS!$PKG_LIBS$ac_delim
13587PKG_CFLAGS!$PKG_CFLAGS$ac_delim
13588TCL_VERSION!$TCL_VERSION$ac_delim
13589TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim
13590TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim
13591TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim
13592TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
13593TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim
13594TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
13595TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim
13596TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim
13597TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim
13598CLEANFILES!$CLEANFILES$ac_delim
13599TCL_LIBS!$TCL_LIBS$ac_delim
13600TCL_DEFS!$TCL_DEFS$ac_delim
13601TCL_EXTRA_CFLAGS!$TCL_EXTRA_CFLAGS$ac_delim
13602TCL_LD_FLAGS!$TCL_LD_FLAGS$ac_delim
13603TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
13604TK_VERSION!$TK_VERSION$ac_delim
13605TK_BIN_DIR!$TK_BIN_DIR$ac_delim
13606TK_SRC_DIR!$TK_SRC_DIR$ac_delim
13607TK_LIB_FILE!$TK_LIB_FILE$ac_delim
13608TK_LIB_FLAG!$TK_LIB_FLAG$ac_delim
13609TK_LIB_SPEC!$TK_LIB_SPEC$ac_delim
13610TK_STUB_LIB_FILE!$TK_STUB_LIB_FILE$ac_delim
13611TK_STUB_LIB_FLAG!$TK_STUB_LIB_FLAG$ac_delim
13612TK_STUB_LIB_SPEC!$TK_STUB_LIB_SPEC$ac_delim
13613TK_LIBS!$TK_LIBS$ac_delim
13614TK_XINCLUDES!$TK_XINCLUDES$ac_delim
13615CC!$CC$ac_delim
13616CFLAGS!$CFLAGS$ac_delim
13617LDFLAGS!$LDFLAGS$ac_delim
13618CPPFLAGS!$CPPFLAGS$ac_delim
13619ac_ct_CC!$ac_ct_CC$ac_delim
13620OBJEXT!$OBJEXT$ac_delim
13621CPP!$CPP$ac_delim
13622INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
13623INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
13624INSTALL_DATA!$INSTALL_DATA$ac_delim
13625SET_MAKE!$SET_MAKE$ac_delim
13626RANLIB!$RANLIB$ac_delim
13627GREP!$GREP$ac_delim
13628EGREP!$EGREP$ac_delim
13629MATH_LIBS!$MATH_LIBS$ac_delim
13630TCL_INCLUDES!$TCL_INCLUDES$ac_delim
13631TCL_TOP_DIR_NATIVE!$TCL_TOP_DIR_NATIVE$ac_delim
13632TK_INCLUDES!$TK_INCLUDES$ac_delim
13633TK_TOP_DIR_NATIVE!$TK_TOP_DIR_NATIVE$ac_delim
13634TK_XLIB_DIR_NATIVE!$TK_XLIB_DIR_NATIVE$ac_delim
13635TCL_THREADS!$TCL_THREADS$ac_delim
13636SHARED_BUILD!$SHARED_BUILD$ac_delim
13637_ACEOF
13638
13639  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
13640    break
13641  elif $ac_last_try; then
13642    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
13643echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
13644   { (exit 1); exit 1; }; }
13645  else
13646    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
13647  fi
13648done
13649
13650ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
13651if test -n "$ac_eof"; then
13652  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
13653  ac_eof=`expr $ac_eof + 1`
13654fi
13655
13656cat >>$CONFIG_STATUS <<_ACEOF
13657cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
13658/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13659_ACEOF
13660sed '
13661s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
13662s/^/s,@/; s/!/@,|#_!!_#|/
13663:n
13664t n
13665s/'"$ac_delim"'$/,g/; t
13666s/$/\\/; p
13667N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
13668' >>$CONFIG_STATUS <conf$$subs.sed
13669rm -f conf$$subs.sed
13670cat >>$CONFIG_STATUS <<_ACEOF
13671CEOF$ac_eof
13672_ACEOF
13673
13674
13675ac_delim='%!_!# '
13676for ac_last_try in false false false false false :; do
13677  cat >conf$$subs.sed <<_ACEOF
13678AR!$AR$ac_delim
13679CELIB_DIR!$CELIB_DIR$ac_delim
13680CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim
13681CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim
13682CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim
13683STLIB_LD!$STLIB_LD$ac_delim
13684SHLIB_LD!$SHLIB_LD$ac_delim
13685SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim
13686SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim
13687LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim
13688CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim
13689LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim
13690TCL_DBGX!$TCL_DBGX$ac_delim
13691XMKMF!$XMKMF$ac_delim
13692subdirs!$subdirs$ac_delim
13693LIBOBJS!$LIBOBJS$ac_delim
13694LTLIBOBJS!$LTLIBOBJS$ac_delim
13695_ACEOF
13696
13697  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 17; then
13698    break
13699  elif $ac_last_try; then
13700    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
13701echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
13702   { (exit 1); exit 1; }; }
13703  else
13704    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
13705  fi
13706done
13707
13708ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
13709if test -n "$ac_eof"; then
13710  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
13711  ac_eof=`expr $ac_eof + 1`
13712fi
13713
13714cat >>$CONFIG_STATUS <<_ACEOF
13715cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
13716/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
13717_ACEOF
13718sed '
13719s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
13720s/^/s,@/; s/!/@,|#_!!_#|/
13721:n
13722t n
13723s/'"$ac_delim"'$/,g/; t
13724s/$/\\/; p
13725N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
13726' >>$CONFIG_STATUS <conf$$subs.sed
13727rm -f conf$$subs.sed
13728cat >>$CONFIG_STATUS <<_ACEOF
13729:end
13730s/|#_!!_#|//g
13731CEOF$ac_eof
13732_ACEOF
13733
13734
13735# VPATH may cause trouble with some makes, so we remove $(srcdir),
13736# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
13737# trailing colons and then remove the whole line if VPATH becomes empty
13738# (actually we leave an empty line to preserve line numbers).
13739if test "x$srcdir" = x.; then
13740  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
13741s/:*\$(srcdir):*/:/
13742s/:*\${srcdir}:*/:/
13743s/:*@srcdir@:*/:/
13744s/^\([^=]*=[	 ]*\):*/\1/
13745s/:*$//
13746s/^[^=]*=[	 ]*$//
13747}'
13748fi
13749
13750cat >>$CONFIG_STATUS <<\_ACEOF
13751fi # test -n "$CONFIG_FILES"
13752
13753
13754for ac_tag in  :F $CONFIG_FILES
13755do
13756  case $ac_tag in
13757  :[FHLC]) ac_mode=$ac_tag; continue;;
13758  esac
13759  case $ac_mode$ac_tag in
13760  :[FHL]*:*);;
13761  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
13762echo "$as_me: error: Invalid tag $ac_tag." >&2;}
13763   { (exit 1); exit 1; }; };;
13764  :[FH]-) ac_tag=-:-;;
13765  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
13766  esac
13767  ac_save_IFS=$IFS
13768  IFS=:
13769  set x $ac_tag
13770  IFS=$ac_save_IFS
13771  shift
13772  ac_file=$1
13773  shift
13774
13775  case $ac_mode in
13776  :L) ac_source=$1;;
13777  :[FH])
13778    ac_file_inputs=
13779    for ac_f
13780    do
13781      case $ac_f in
13782      -) ac_f="$tmp/stdin";;
13783      *) # Look for the file first in the build tree, then in the source tree
13784	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
13785	 # because $ac_f cannot contain `:'.
13786	 test -f "$ac_f" ||
13787	   case $ac_f in
13788	   [\\/$]*) false;;
13789	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
13790	   esac ||
13791	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
13792echo "$as_me: error: cannot find input file: $ac_f" >&2;}
13793   { (exit 1); exit 1; }; };;
13794      esac
13795      ac_file_inputs="$ac_file_inputs $ac_f"
13796    done
13797
13798    # Let's still pretend it is `configure' which instantiates (i.e., don't
13799    # use $as_me), people would be surprised to read:
13800    #    /* config.h.  Generated by config.status.  */
13801    configure_input="Generated from "`IFS=:
13802	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
13803    if test x"$ac_file" != x-; then
13804      configure_input="$ac_file.  $configure_input"
13805      { echo "$as_me:$LINENO: creating $ac_file" >&5
13806echo "$as_me: creating $ac_file" >&6;}
13807    fi
13808
13809    case $ac_tag in
13810    *:-:* | *:-) cat >"$tmp/stdin";;
13811    esac
13812    ;;
13813  esac
13814
13815  ac_dir=`$as_dirname -- "$ac_file" ||
13816$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13817	 X"$ac_file" : 'X\(//\)[^/]' \| \
13818	 X"$ac_file" : 'X\(//\)$' \| \
13819	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
13820echo X"$ac_file" |
13821    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13822	    s//\1/
13823	    q
13824	  }
13825	  /^X\(\/\/\)[^/].*/{
13826	    s//\1/
13827	    q
13828	  }
13829	  /^X\(\/\/\)$/{
13830	    s//\1/
13831	    q
13832	  }
13833	  /^X\(\/\).*/{
13834	    s//\1/
13835	    q
13836	  }
13837	  s/.*/./; q'`
13838  { as_dir="$ac_dir"
13839  case $as_dir in #(
13840  -*) as_dir=./$as_dir;;
13841  esac
13842  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
13843    as_dirs=
13844    while :; do
13845      case $as_dir in #(
13846      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
13847      *) as_qdir=$as_dir;;
13848      esac
13849      as_dirs="'$as_qdir' $as_dirs"
13850      as_dir=`$as_dirname -- "$as_dir" ||
13851$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13852	 X"$as_dir" : 'X\(//\)[^/]' \| \
13853	 X"$as_dir" : 'X\(//\)$' \| \
13854	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13855echo X"$as_dir" |
13856    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13857	    s//\1/
13858	    q
13859	  }
13860	  /^X\(\/\/\)[^/].*/{
13861	    s//\1/
13862	    q
13863	  }
13864	  /^X\(\/\/\)$/{
13865	    s//\1/
13866	    q
13867	  }
13868	  /^X\(\/\).*/{
13869	    s//\1/
13870	    q
13871	  }
13872	  s/.*/./; q'`
13873      test -d "$as_dir" && break
13874    done
13875    test -z "$as_dirs" || eval "mkdir $as_dirs"
13876  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
13877echo "$as_me: error: cannot create directory $as_dir" >&2;}
13878   { (exit 1); exit 1; }; }; }
13879  ac_builddir=.
13880
13881case "$ac_dir" in
13882.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
13883*)
13884  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
13885  # A ".." for each directory in $ac_dir_suffix.
13886  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
13887  case $ac_top_builddir_sub in
13888  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
13889  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
13890  esac ;;
13891esac
13892ac_abs_top_builddir=$ac_pwd
13893ac_abs_builddir=$ac_pwd$ac_dir_suffix
13894# for backward compatibility:
13895ac_top_builddir=$ac_top_build_prefix
13896
13897case $srcdir in
13898  .)  # We are building in place.
13899    ac_srcdir=.
13900    ac_top_srcdir=$ac_top_builddir_sub
13901    ac_abs_top_srcdir=$ac_pwd ;;
13902  [\\/]* | ?:[\\/]* )  # Absolute name.
13903    ac_srcdir=$srcdir$ac_dir_suffix;
13904    ac_top_srcdir=$srcdir
13905    ac_abs_top_srcdir=$srcdir ;;
13906  *) # Relative name.
13907    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
13908    ac_top_srcdir=$ac_top_build_prefix$srcdir
13909    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
13910esac
13911ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
13912
13913
13914  case $ac_mode in
13915  :F)
13916  #
13917  # CONFIG_FILE
13918  #
13919
13920  case $INSTALL in
13921  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
13922  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
13923  esac
13924_ACEOF
13925
13926cat >>$CONFIG_STATUS <<\_ACEOF
13927# If the template does not know about datarootdir, expand it.
13928# FIXME: This hack should be removed a few years after 2.60.
13929ac_datarootdir_hack=; ac_datarootdir_seen=
13930
13931case `sed -n '/datarootdir/ {
13932  p
13933  q
13934}
13935/@datadir@/p
13936/@docdir@/p
13937/@infodir@/p
13938/@localedir@/p
13939/@mandir@/p
13940' $ac_file_inputs` in
13941*datarootdir*) ac_datarootdir_seen=yes;;
13942*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
13943  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
13944echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
13945_ACEOF
13946cat >>$CONFIG_STATUS <<_ACEOF
13947  ac_datarootdir_hack='
13948  s&@datadir@&$datadir&g
13949  s&@docdir@&$docdir&g
13950  s&@infodir@&$infodir&g
13951  s&@localedir@&$localedir&g
13952  s&@mandir@&$mandir&g
13953    s&\\\${datarootdir}&$datarootdir&g' ;;
13954esac
13955_ACEOF
13956
13957# Neutralize VPATH when `$srcdir' = `.'.
13958# Shell code in configure.ac might set extrasub.
13959# FIXME: do we really want to maintain this feature?
13960cat >>$CONFIG_STATUS <<_ACEOF
13961  sed "$ac_vpsub
13962$extrasub
13963_ACEOF
13964cat >>$CONFIG_STATUS <<\_ACEOF
13965:t
13966/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13967s&@configure_input@&$configure_input&;t t
13968s&@top_builddir@&$ac_top_builddir_sub&;t t
13969s&@srcdir@&$ac_srcdir&;t t
13970s&@abs_srcdir@&$ac_abs_srcdir&;t t
13971s&@top_srcdir@&$ac_top_srcdir&;t t
13972s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
13973s&@builddir@&$ac_builddir&;t t
13974s&@abs_builddir@&$ac_abs_builddir&;t t
13975s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
13976s&@INSTALL@&$ac_INSTALL&;t t
13977$ac_datarootdir_hack
13978" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
13979
13980test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
13981  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
13982  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
13983  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13984which seems to be undefined.  Please make sure it is defined." >&5
13985echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13986which seems to be undefined.  Please make sure it is defined." >&2;}
13987
13988  rm -f "$tmp/stdin"
13989  case $ac_file in
13990  -) cat "$tmp/out"; rm -f "$tmp/out";;
13991  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
13992  esac
13993 ;;
13994
13995
13996
13997  esac
13998
13999done # for ac_tag
14000
14001
14002{ (exit 0); exit 0; }
14003_ACEOF
14004chmod +x $CONFIG_STATUS
14005ac_clean_files=$ac_clean_files_save
14006
14007
14008# configure is writing to config.log, and then calls config.status.
14009# config.status does its own redirection, appending to config.log.
14010# Unfortunately, on DOS this fails, as config.log is still kept open
14011# by configure, so config.status won't be able to write to it; its
14012# output is simply discarded.  So we exec the FD to /dev/null,
14013# effectively closing config.log, so it can be properly (re)opened and
14014# appended to by config.status.  When coming back to configure, we
14015# need to make the FD available again.
14016if test "$no_create" != yes; then
14017  ac_cs_success=:
14018  ac_config_status_args=
14019  test "$silent" = yes &&
14020    ac_config_status_args="$ac_config_status_args --quiet"
14021  exec 5>/dev/null
14022  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
14023  exec 5>>config.log
14024  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14025  # would make configure fail if this is the last instruction.
14026  $ac_cs_success || { (exit 1); exit 1; }
14027fi
14028
14029