1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.61 for xotclgdbm 1.2.
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='xotclgdbm'
574PACKAGE_TARNAME='xotclgdbm'
575PACKAGE_VERSION='1.2'
576PACKAGE_STRING='xotclgdbm 1.2'
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
679CC
680CFLAGS
681LDFLAGS
682CPPFLAGS
683ac_ct_CC
684OBJEXT
685CPP
686INSTALL_PROGRAM
687INSTALL_SCRIPT
688INSTALL_DATA
689SET_MAKE
690RANLIB
691GREP
692EGREP
693MATH_LIBS
694PKG_SOURCES
695PKG_OBJECTS
696TCL_INCLUDES
697TCL_THREADS
698SHARED_BUILD
699AR
700CELIB_DIR
701CFLAGS_DEBUG
702CFLAGS_OPTIMIZE
703CFLAGS_WARNING
704STLIB_LD
705SHLIB_LD
706SHLIB_LD_LIBS
707SHLIB_CFLAGS
708LD_LIBRARY_PATH_VAR
709CFLAGS_DEFAULT
710LDFLAGS_DEFAULT
711TCL_DBGX
712MAKE_LIB
713MAKE_SHARED_LIB
714MAKE_STATIC_LIB
715MAKE_STUB_LIB
716RANLIB_STUB
717VC_MANIFEST_EMBED_DLL
718VC_MANIFEST_EMBED_EXE
719TCLSH_PROG
720LIBOBJS
721LTLIBOBJS'
722ac_subst_files=''
723      ac_precious_vars='build_alias
724host_alias
725target_alias
726CC
727CFLAGS
728LDFLAGS
729LIBS
730CPPFLAGS
731CPP'
732
733
734# Initialize some variables set by options.
735ac_init_help=
736ac_init_version=false
737# The variables have the same names as the options, with
738# dashes changed to underlines.
739cache_file=/dev/null
740exec_prefix=NONE
741no_create=
742no_recursion=
743prefix=NONE
744program_prefix=NONE
745program_suffix=NONE
746program_transform_name=s,x,x,
747silent=
748site=
749srcdir=
750verbose=
751x_includes=NONE
752x_libraries=NONE
753
754# Installation directory options.
755# These are left unexpanded so users can "make install exec_prefix=/foo"
756# and all the variables that are supposed to be based on exec_prefix
757# by default will actually change.
758# Use braces instead of parens because sh, perl, etc. also accept them.
759# (The list follows the same order as the GNU Coding Standards.)
760bindir='${exec_prefix}/bin'
761sbindir='${exec_prefix}/sbin'
762libexecdir='${exec_prefix}/libexec'
763datarootdir='${prefix}/share'
764datadir='${datarootdir}'
765sysconfdir='${prefix}/etc'
766sharedstatedir='${prefix}/com'
767localstatedir='${prefix}/var'
768includedir='${prefix}/include'
769oldincludedir='/usr/include'
770docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
771infodir='${datarootdir}/info'
772htmldir='${docdir}'
773dvidir='${docdir}'
774pdfdir='${docdir}'
775psdir='${docdir}'
776libdir='${exec_prefix}/lib'
777localedir='${datarootdir}/locale'
778mandir='${datarootdir}/man'
779
780ac_prev=
781ac_dashdash=
782for ac_option
783do
784  # If the previous option needs an argument, assign it.
785  if test -n "$ac_prev"; then
786    eval $ac_prev=\$ac_option
787    ac_prev=
788    continue
789  fi
790
791  case $ac_option in
792  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
793  *)	ac_optarg=yes ;;
794  esac
795
796  # Accept the important Cygnus configure options, so we can diagnose typos.
797
798  case $ac_dashdash$ac_option in
799  --)
800    ac_dashdash=yes ;;
801
802  -bindir | --bindir | --bindi | --bind | --bin | --bi)
803    ac_prev=bindir ;;
804  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
805    bindir=$ac_optarg ;;
806
807  -build | --build | --buil | --bui | --bu)
808    ac_prev=build_alias ;;
809  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
810    build_alias=$ac_optarg ;;
811
812  -cache-file | --cache-file | --cache-fil | --cache-fi \
813  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
814    ac_prev=cache_file ;;
815  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
816  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
817    cache_file=$ac_optarg ;;
818
819  --config-cache | -C)
820    cache_file=config.cache ;;
821
822  -datadir | --datadir | --datadi | --datad)
823    ac_prev=datadir ;;
824  -datadir=* | --datadir=* | --datadi=* | --datad=*)
825    datadir=$ac_optarg ;;
826
827  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
828  | --dataroo | --dataro | --datar)
829    ac_prev=datarootdir ;;
830  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
831  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
832    datarootdir=$ac_optarg ;;
833
834  -disable-* | --disable-*)
835    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
836    # Reject names that are not valid shell variable names.
837    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
838      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
839   { (exit 1); exit 1; }; }
840    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
841    eval enable_$ac_feature=no ;;
842
843  -docdir | --docdir | --docdi | --doc | --do)
844    ac_prev=docdir ;;
845  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
846    docdir=$ac_optarg ;;
847
848  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
849    ac_prev=dvidir ;;
850  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
851    dvidir=$ac_optarg ;;
852
853  -enable-* | --enable-*)
854    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
855    # Reject names that are not valid shell variable names.
856    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
857      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
858   { (exit 1); exit 1; }; }
859    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
860    eval enable_$ac_feature=\$ac_optarg ;;
861
862  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
863  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
864  | --exec | --exe | --ex)
865    ac_prev=exec_prefix ;;
866  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
867  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
868  | --exec=* | --exe=* | --ex=*)
869    exec_prefix=$ac_optarg ;;
870
871  -gas | --gas | --ga | --g)
872    # Obsolete; use --with-gas.
873    with_gas=yes ;;
874
875  -help | --help | --hel | --he | -h)
876    ac_init_help=long ;;
877  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
878    ac_init_help=recursive ;;
879  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
880    ac_init_help=short ;;
881
882  -host | --host | --hos | --ho)
883    ac_prev=host_alias ;;
884  -host=* | --host=* | --hos=* | --ho=*)
885    host_alias=$ac_optarg ;;
886
887  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
888    ac_prev=htmldir ;;
889  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
890  | --ht=*)
891    htmldir=$ac_optarg ;;
892
893  -includedir | --includedir | --includedi | --included | --include \
894  | --includ | --inclu | --incl | --inc)
895    ac_prev=includedir ;;
896  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
897  | --includ=* | --inclu=* | --incl=* | --inc=*)
898    includedir=$ac_optarg ;;
899
900  -infodir | --infodir | --infodi | --infod | --info | --inf)
901    ac_prev=infodir ;;
902  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
903    infodir=$ac_optarg ;;
904
905  -libdir | --libdir | --libdi | --libd)
906    ac_prev=libdir ;;
907  -libdir=* | --libdir=* | --libdi=* | --libd=*)
908    libdir=$ac_optarg ;;
909
910  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
911  | --libexe | --libex | --libe)
912    ac_prev=libexecdir ;;
913  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
914  | --libexe=* | --libex=* | --libe=*)
915    libexecdir=$ac_optarg ;;
916
917  -localedir | --localedir | --localedi | --localed | --locale)
918    ac_prev=localedir ;;
919  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
920    localedir=$ac_optarg ;;
921
922  -localstatedir | --localstatedir | --localstatedi | --localstated \
923  | --localstate | --localstat | --localsta | --localst | --locals)
924    ac_prev=localstatedir ;;
925  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
926  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
927    localstatedir=$ac_optarg ;;
928
929  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
930    ac_prev=mandir ;;
931  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
932    mandir=$ac_optarg ;;
933
934  -nfp | --nfp | --nf)
935    # Obsolete; use --without-fp.
936    with_fp=no ;;
937
938  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
939  | --no-cr | --no-c | -n)
940    no_create=yes ;;
941
942  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
943  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
944    no_recursion=yes ;;
945
946  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
947  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
948  | --oldin | --oldi | --old | --ol | --o)
949    ac_prev=oldincludedir ;;
950  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
951  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
952  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
953    oldincludedir=$ac_optarg ;;
954
955  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
956    ac_prev=prefix ;;
957  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
958    prefix=$ac_optarg ;;
959
960  -program-prefix | --program-prefix | --program-prefi | --program-pref \
961  | --program-pre | --program-pr | --program-p)
962    ac_prev=program_prefix ;;
963  -program-prefix=* | --program-prefix=* | --program-prefi=* \
964  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
965    program_prefix=$ac_optarg ;;
966
967  -program-suffix | --program-suffix | --program-suffi | --program-suff \
968  | --program-suf | --program-su | --program-s)
969    ac_prev=program_suffix ;;
970  -program-suffix=* | --program-suffix=* | --program-suffi=* \
971  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
972    program_suffix=$ac_optarg ;;
973
974  -program-transform-name | --program-transform-name \
975  | --program-transform-nam | --program-transform-na \
976  | --program-transform-n | --program-transform- \
977  | --program-transform | --program-transfor \
978  | --program-transfo | --program-transf \
979  | --program-trans | --program-tran \
980  | --progr-tra | --program-tr | --program-t)
981    ac_prev=program_transform_name ;;
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    program_transform_name=$ac_optarg ;;
990
991  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
992    ac_prev=pdfdir ;;
993  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
994    pdfdir=$ac_optarg ;;
995
996  -psdir | --psdir | --psdi | --psd | --ps)
997    ac_prev=psdir ;;
998  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
999    psdir=$ac_optarg ;;
1000
1001  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1002  | -silent | --silent | --silen | --sile | --sil)
1003    silent=yes ;;
1004
1005  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1006    ac_prev=sbindir ;;
1007  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1008  | --sbi=* | --sb=*)
1009    sbindir=$ac_optarg ;;
1010
1011  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1012  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1013  | --sharedst | --shareds | --shared | --share | --shar \
1014  | --sha | --sh)
1015    ac_prev=sharedstatedir ;;
1016  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1017  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1018  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1019  | --sha=* | --sh=*)
1020    sharedstatedir=$ac_optarg ;;
1021
1022  -site | --site | --sit)
1023    ac_prev=site ;;
1024  -site=* | --site=* | --sit=*)
1025    site=$ac_optarg ;;
1026
1027  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1028    ac_prev=srcdir ;;
1029  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1030    srcdir=$ac_optarg ;;
1031
1032  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1033  | --syscon | --sysco | --sysc | --sys | --sy)
1034    ac_prev=sysconfdir ;;
1035  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1036  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1037    sysconfdir=$ac_optarg ;;
1038
1039  -target | --target | --targe | --targ | --tar | --ta | --t)
1040    ac_prev=target_alias ;;
1041  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1042    target_alias=$ac_optarg ;;
1043
1044  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1045    verbose=yes ;;
1046
1047  -version | --version | --versio | --versi | --vers | -V)
1048    ac_init_version=: ;;
1049
1050  -with-* | --with-*)
1051    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1052    # Reject names that are not valid shell variable names.
1053    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1054      { echo "$as_me: error: invalid package name: $ac_package" >&2
1055   { (exit 1); exit 1; }; }
1056    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1057    eval with_$ac_package=\$ac_optarg ;;
1058
1059  -without-* | --without-*)
1060    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1061    # Reject names that are not valid shell variable names.
1062    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1063      { echo "$as_me: error: invalid package name: $ac_package" >&2
1064   { (exit 1); exit 1; }; }
1065    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1066    eval with_$ac_package=no ;;
1067
1068  --x)
1069    # Obsolete; use --with-x.
1070    with_x=yes ;;
1071
1072  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1073  | --x-incl | --x-inc | --x-in | --x-i)
1074    ac_prev=x_includes ;;
1075  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1076  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1077    x_includes=$ac_optarg ;;
1078
1079  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1080  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1081    ac_prev=x_libraries ;;
1082  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1083  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1084    x_libraries=$ac_optarg ;;
1085
1086  -*) { echo "$as_me: error: unrecognized option: $ac_option
1087Try \`$0 --help' for more information." >&2
1088   { (exit 1); exit 1; }; }
1089    ;;
1090
1091  *=*)
1092    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1093    # Reject names that are not valid shell variable names.
1094    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1095      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1096   { (exit 1); exit 1; }; }
1097    eval $ac_envvar=\$ac_optarg
1098    export $ac_envvar ;;
1099
1100  *)
1101    # FIXME: should be removed in autoconf 3.0.
1102    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1103    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1104      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1105    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1106    ;;
1107
1108  esac
1109done
1110
1111if test -n "$ac_prev"; then
1112  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1113  { echo "$as_me: error: missing argument to $ac_option" >&2
1114   { (exit 1); exit 1; }; }
1115fi
1116
1117# Be sure to have absolute directory names.
1118for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1119		datadir sysconfdir sharedstatedir localstatedir includedir \
1120		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1121		libdir localedir mandir
1122do
1123  eval ac_val=\$$ac_var
1124  case $ac_val in
1125    [\\/$]* | ?:[\\/]* )  continue;;
1126    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1127  esac
1128  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1129   { (exit 1); exit 1; }; }
1130done
1131
1132# There might be people who depend on the old broken behavior: `$host'
1133# used to hold the argument of --host etc.
1134# FIXME: To remove some day.
1135build=$build_alias
1136host=$host_alias
1137target=$target_alias
1138
1139# FIXME: To remove some day.
1140if test "x$host_alias" != x; then
1141  if test "x$build_alias" = x; then
1142    cross_compiling=maybe
1143    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1144    If a cross compiler is detected then cross compile mode will be used." >&2
1145  elif test "x$build_alias" != "x$host_alias"; then
1146    cross_compiling=yes
1147  fi
1148fi
1149
1150ac_tool_prefix=
1151test -n "$host_alias" && ac_tool_prefix=$host_alias-
1152
1153test "$silent" = yes && exec 6>/dev/null
1154
1155
1156ac_pwd=`pwd` && test -n "$ac_pwd" &&
1157ac_ls_di=`ls -di .` &&
1158ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1159  { echo "$as_me: error: Working directory cannot be determined" >&2
1160   { (exit 1); exit 1; }; }
1161test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1162  { echo "$as_me: error: pwd does not report name of working directory" >&2
1163   { (exit 1); exit 1; }; }
1164
1165
1166# Find the source files, if location was not specified.
1167if test -z "$srcdir"; then
1168  ac_srcdir_defaulted=yes
1169  # Try the directory containing this script, then the parent directory.
1170  ac_confdir=`$as_dirname -- "$0" ||
1171$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1172	 X"$0" : 'X\(//\)[^/]' \| \
1173	 X"$0" : 'X\(//\)$' \| \
1174	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1175echo X"$0" |
1176    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1177	    s//\1/
1178	    q
1179	  }
1180	  /^X\(\/\/\)[^/].*/{
1181	    s//\1/
1182	    q
1183	  }
1184	  /^X\(\/\/\)$/{
1185	    s//\1/
1186	    q
1187	  }
1188	  /^X\(\/\).*/{
1189	    s//\1/
1190	    q
1191	  }
1192	  s/.*/./; q'`
1193  srcdir=$ac_confdir
1194  if test ! -r "$srcdir/$ac_unique_file"; then
1195    srcdir=..
1196  fi
1197else
1198  ac_srcdir_defaulted=no
1199fi
1200if test ! -r "$srcdir/$ac_unique_file"; then
1201  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1202  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1203   { (exit 1); exit 1; }; }
1204fi
1205ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1206ac_abs_confdir=`(
1207	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1208   { (exit 1); exit 1; }; }
1209	pwd)`
1210# When building in place, set srcdir=.
1211if test "$ac_abs_confdir" = "$ac_pwd"; then
1212  srcdir=.
1213fi
1214# Remove unnecessary trailing slashes from srcdir.
1215# Double slashes in file names in object file debugging info
1216# mess up M-x gdb in Emacs.
1217case $srcdir in
1218*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1219esac
1220for ac_var in $ac_precious_vars; do
1221  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1222  eval ac_env_${ac_var}_value=\$${ac_var}
1223  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1224  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1225done
1226
1227#
1228# Report the --help message.
1229#
1230if test "$ac_init_help" = "long"; then
1231  # Omit some internal or obsolete options to make the list less imposing.
1232  # This message is too long to be a string in the A/UX 3.1 sh.
1233  cat <<_ACEOF
1234\`configure' configures xotclgdbm 1.2 to adapt to many kinds of systems.
1235
1236Usage: $0 [OPTION]... [VAR=VALUE]...
1237
1238To assign environment variables (e.g., CC, CFLAGS...), specify them as
1239VAR=VALUE.  See below for descriptions of some of the useful variables.
1240
1241Defaults for the options are specified in brackets.
1242
1243Configuration:
1244  -h, --help              display this help and exit
1245      --help=short        display options specific to this package
1246      --help=recursive    display the short help of all the included packages
1247  -V, --version           display version information and exit
1248  -q, --quiet, --silent   do not print \`checking...' messages
1249      --cache-file=FILE   cache test results in FILE [disabled]
1250  -C, --config-cache      alias for \`--cache-file=config.cache'
1251  -n, --no-create         do not create output files
1252      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1253
1254Installation directories:
1255  --prefix=PREFIX         install architecture-independent files in PREFIX
1256			  [$ac_default_prefix]
1257  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1258			  [PREFIX]
1259
1260By default, \`make install' will install all the files in
1261\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1262an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1263for instance \`--prefix=\$HOME'.
1264
1265For better control, use the options below.
1266
1267Fine tuning of the installation directories:
1268  --bindir=DIR           user executables [EPREFIX/bin]
1269  --sbindir=DIR          system admin executables [EPREFIX/sbin]
1270  --libexecdir=DIR       program executables [EPREFIX/libexec]
1271  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1272  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1273  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1274  --libdir=DIR           object code libraries [EPREFIX/lib]
1275  --includedir=DIR       C header files [PREFIX/include]
1276  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1277  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1278  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1279  --infodir=DIR          info documentation [DATAROOTDIR/info]
1280  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1281  --mandir=DIR           man documentation [DATAROOTDIR/man]
1282  --docdir=DIR           documentation root [DATAROOTDIR/doc/xotclgdbm]
1283  --htmldir=DIR          html documentation [DOCDIR]
1284  --dvidir=DIR           dvi documentation [DOCDIR]
1285  --pdfdir=DIR           pdf documentation [DOCDIR]
1286  --psdir=DIR            ps documentation [DOCDIR]
1287_ACEOF
1288
1289  cat <<\_ACEOF
1290_ACEOF
1291fi
1292
1293if test -n "$ac_init_help"; then
1294  case $ac_init_help in
1295     short | recursive ) echo "Configuration of xotclgdbm 1.2:";;
1296   esac
1297  cat <<\_ACEOF
1298
1299Optional Features:
1300  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1301  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1302  --enable-threads        build with threads
1303  --enable-shared         build and link with shared libraries (default: on)
1304  --enable-64bit          enable 64bit support (default: off)
1305  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1306  --disable-rpath         disable rpath support (default: on)
1307  --enable-wince          enable Win/CE support (where applicable)
1308  --enable-symbols        build with debugging symbols (default: off)
1309
1310Optional Packages:
1311  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1312  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1313  --with-gdbm=GDBM_INCLUDE_DIR,GDBM_LIB_DIR
1314            absolute path to gdbm.h and optionally the path to the library,
1315           --without-gdbm disables build of Tcl Gdbm
1316  --with-xotcl=DIR_CONTAINING_XOTCLCONFIG_SH
1317            absolute path to xotclConfig.sh,
1318           --without-xotcl disables, but this is pointless
1319  --with-tcl              directory containing tcl configuration
1320                          (tclConfig.sh)
1321  --with-tclinclude       directory containing the public Tcl header files
1322  --with-celib=DIR        use Windows/CE support library from DIR
1323
1324Some influential environment variables:
1325  CC          C compiler command
1326  CFLAGS      C compiler flags
1327  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1328              nonstandard directory <lib dir>
1329  LIBS        libraries to pass to the linker, e.g. -l<library>
1330  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1331              you have headers in a nonstandard directory <include dir>
1332  CPP         C preprocessor
1333
1334Use these variables to override the choices made by `configure' or to help
1335it to find libraries and programs with nonstandard names/locations.
1336
1337_ACEOF
1338ac_status=$?
1339fi
1340
1341if test "$ac_init_help" = "recursive"; then
1342  # If there are subdirs, report their specific --help.
1343  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1344    test -d "$ac_dir" || continue
1345    ac_builddir=.
1346
1347case "$ac_dir" in
1348.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1349*)
1350  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1351  # A ".." for each directory in $ac_dir_suffix.
1352  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1353  case $ac_top_builddir_sub in
1354  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1355  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1356  esac ;;
1357esac
1358ac_abs_top_builddir=$ac_pwd
1359ac_abs_builddir=$ac_pwd$ac_dir_suffix
1360# for backward compatibility:
1361ac_top_builddir=$ac_top_build_prefix
1362
1363case $srcdir in
1364  .)  # We are building in place.
1365    ac_srcdir=.
1366    ac_top_srcdir=$ac_top_builddir_sub
1367    ac_abs_top_srcdir=$ac_pwd ;;
1368  [\\/]* | ?:[\\/]* )  # Absolute name.
1369    ac_srcdir=$srcdir$ac_dir_suffix;
1370    ac_top_srcdir=$srcdir
1371    ac_abs_top_srcdir=$srcdir ;;
1372  *) # Relative name.
1373    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1374    ac_top_srcdir=$ac_top_build_prefix$srcdir
1375    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1376esac
1377ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1378
1379    cd "$ac_dir" || { ac_status=$?; continue; }
1380    # Check for guested configure.
1381    if test -f "$ac_srcdir/configure.gnu"; then
1382      echo &&
1383      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1384    elif test -f "$ac_srcdir/configure"; then
1385      echo &&
1386      $SHELL "$ac_srcdir/configure" --help=recursive
1387    else
1388      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1389    fi || ac_status=$?
1390    cd "$ac_pwd" || { ac_status=$?; break; }
1391  done
1392fi
1393
1394test -n "$ac_init_help" && exit $ac_status
1395if $ac_init_version; then
1396  cat <<\_ACEOF
1397xotclgdbm configure 1.2
1398generated by GNU Autoconf 2.61
1399
1400Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14012002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1402This configure script is free software; the Free Software Foundation
1403gives unlimited permission to copy, distribute and modify it.
1404_ACEOF
1405  exit
1406fi
1407cat >config.log <<_ACEOF
1408This file contains any messages produced by compilers while
1409running configure, to aid debugging if configure makes a mistake.
1410
1411It was created by xotclgdbm $as_me 1.2, which was
1412generated by GNU Autoconf 2.61.  Invocation command line was
1413
1414  $ $0 $@
1415
1416_ACEOF
1417exec 5>>config.log
1418{
1419cat <<_ASUNAME
1420## --------- ##
1421## Platform. ##
1422## --------- ##
1423
1424hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1425uname -m = `(uname -m) 2>/dev/null || echo unknown`
1426uname -r = `(uname -r) 2>/dev/null || echo unknown`
1427uname -s = `(uname -s) 2>/dev/null || echo unknown`
1428uname -v = `(uname -v) 2>/dev/null || echo unknown`
1429
1430/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1431/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1432
1433/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1434/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1435/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1436/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1437/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1438/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1439/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1440
1441_ASUNAME
1442
1443as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1444for as_dir in $PATH
1445do
1446  IFS=$as_save_IFS
1447  test -z "$as_dir" && as_dir=.
1448  echo "PATH: $as_dir"
1449done
1450IFS=$as_save_IFS
1451
1452} >&5
1453
1454cat >&5 <<_ACEOF
1455
1456
1457## ----------- ##
1458## Core tests. ##
1459## ----------- ##
1460
1461_ACEOF
1462
1463
1464# Keep a trace of the command line.
1465# Strip out --no-create and --no-recursion so they do not pile up.
1466# Strip out --silent because we don't want to record it for future runs.
1467# Also quote any args containing shell meta-characters.
1468# Make two passes to allow for proper duplicate-argument suppression.
1469ac_configure_args=
1470ac_configure_args0=
1471ac_configure_args1=
1472ac_must_keep_next=false
1473for ac_pass in 1 2
1474do
1475  for ac_arg
1476  do
1477    case $ac_arg in
1478    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1479    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1480    | -silent | --silent | --silen | --sile | --sil)
1481      continue ;;
1482    *\'*)
1483      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1484    esac
1485    case $ac_pass in
1486    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1487    2)
1488      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1489      if test $ac_must_keep_next = true; then
1490	ac_must_keep_next=false # Got value, back to normal.
1491      else
1492	case $ac_arg in
1493	  *=* | --config-cache | -C | -disable-* | --disable-* \
1494	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1495	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1496	  | -with-* | --with-* | -without-* | --without-* | --x)
1497	    case "$ac_configure_args0 " in
1498	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1499	    esac
1500	    ;;
1501	  -* ) ac_must_keep_next=true ;;
1502	esac
1503      fi
1504      ac_configure_args="$ac_configure_args '$ac_arg'"
1505      ;;
1506    esac
1507  done
1508done
1509$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1510$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1511
1512# When interrupted or exit'd, cleanup temporary files, and complete
1513# config.log.  We remove comments because anyway the quotes in there
1514# would cause problems or look ugly.
1515# WARNING: Use '\'' to represent an apostrophe within the trap.
1516# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1517trap 'exit_status=$?
1518  # Save into config.log some information that might help in debugging.
1519  {
1520    echo
1521
1522    cat <<\_ASBOX
1523## ---------------- ##
1524## Cache variables. ##
1525## ---------------- ##
1526_ASBOX
1527    echo
1528    # The following way of writing the cache mishandles newlines in values,
1529(
1530  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1531    eval ac_val=\$$ac_var
1532    case $ac_val in #(
1533    *${as_nl}*)
1534      case $ac_var in #(
1535      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1536echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1537      esac
1538      case $ac_var in #(
1539      _ | IFS | as_nl) ;; #(
1540      *) $as_unset $ac_var ;;
1541      esac ;;
1542    esac
1543  done
1544  (set) 2>&1 |
1545    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1546    *${as_nl}ac_space=\ *)
1547      sed -n \
1548	"s/'\''/'\''\\\\'\'''\''/g;
1549	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1550      ;; #(
1551    *)
1552      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1553      ;;
1554    esac |
1555    sort
1556)
1557    echo
1558
1559    cat <<\_ASBOX
1560## ----------------- ##
1561## Output variables. ##
1562## ----------------- ##
1563_ASBOX
1564    echo
1565    for ac_var in $ac_subst_vars
1566    do
1567      eval ac_val=\$$ac_var
1568      case $ac_val in
1569      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1570      esac
1571      echo "$ac_var='\''$ac_val'\''"
1572    done | sort
1573    echo
1574
1575    if test -n "$ac_subst_files"; then
1576      cat <<\_ASBOX
1577## ------------------- ##
1578## File substitutions. ##
1579## ------------------- ##
1580_ASBOX
1581      echo
1582      for ac_var in $ac_subst_files
1583      do
1584	eval ac_val=\$$ac_var
1585	case $ac_val in
1586	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1587	esac
1588	echo "$ac_var='\''$ac_val'\''"
1589      done | sort
1590      echo
1591    fi
1592
1593    if test -s confdefs.h; then
1594      cat <<\_ASBOX
1595## ----------- ##
1596## confdefs.h. ##
1597## ----------- ##
1598_ASBOX
1599      echo
1600      cat confdefs.h
1601      echo
1602    fi
1603    test "$ac_signal" != 0 &&
1604      echo "$as_me: caught signal $ac_signal"
1605    echo "$as_me: exit $exit_status"
1606  } >&5
1607  rm -f core *.core core.conftest.* &&
1608    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1609    exit $exit_status
1610' 0
1611for ac_signal in 1 2 13 15; do
1612  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1613done
1614ac_signal=0
1615
1616# confdefs.h avoids OS command line length limits that DEFS can exceed.
1617rm -f -r conftest* confdefs.h
1618
1619# Predefined preprocessor variables.
1620
1621cat >>confdefs.h <<_ACEOF
1622#define PACKAGE_NAME "$PACKAGE_NAME"
1623_ACEOF
1624
1625
1626cat >>confdefs.h <<_ACEOF
1627#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1628_ACEOF
1629
1630
1631cat >>confdefs.h <<_ACEOF
1632#define PACKAGE_VERSION "$PACKAGE_VERSION"
1633_ACEOF
1634
1635
1636cat >>confdefs.h <<_ACEOF
1637#define PACKAGE_STRING "$PACKAGE_STRING"
1638_ACEOF
1639
1640
1641cat >>confdefs.h <<_ACEOF
1642#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1643_ACEOF
1644
1645
1646# Let the site file select an alternate cache file if it wants to.
1647# Prefer explicitly selected file to automatically selected ones.
1648if test -n "$CONFIG_SITE"; then
1649  set x "$CONFIG_SITE"
1650elif test "x$prefix" != xNONE; then
1651  set x "$prefix/share/config.site" "$prefix/etc/config.site"
1652else
1653  set x "$ac_default_prefix/share/config.site" \
1654	"$ac_default_prefix/etc/config.site"
1655fi
1656shift
1657for ac_site_file
1658do
1659  if test -r "$ac_site_file"; then
1660    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1661echo "$as_me: loading site script $ac_site_file" >&6;}
1662    sed 's/^/| /' "$ac_site_file" >&5
1663    . "$ac_site_file"
1664  fi
1665done
1666
1667if test -r "$cache_file"; then
1668  # Some versions of bash will fail to source /dev/null (special
1669  # files actually), so we avoid doing that.
1670  if test -f "$cache_file"; then
1671    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1672echo "$as_me: loading cache $cache_file" >&6;}
1673    case $cache_file in
1674      [\\/]* | ?:[\\/]* ) . "$cache_file";;
1675      *)                      . "./$cache_file";;
1676    esac
1677  fi
1678else
1679  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1680echo "$as_me: creating cache $cache_file" >&6;}
1681  >$cache_file
1682fi
1683
1684# Check that the precious variables saved in the cache have kept the same
1685# value.
1686ac_cache_corrupted=false
1687for ac_var in $ac_precious_vars; do
1688  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1689  eval ac_new_set=\$ac_env_${ac_var}_set
1690  eval ac_old_val=\$ac_cv_env_${ac_var}_value
1691  eval ac_new_val=\$ac_env_${ac_var}_value
1692  case $ac_old_set,$ac_new_set in
1693    set,)
1694      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1695echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1696      ac_cache_corrupted=: ;;
1697    ,set)
1698      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1699echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1700      ac_cache_corrupted=: ;;
1701    ,);;
1702    *)
1703      if test "x$ac_old_val" != "x$ac_new_val"; then
1704	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1705echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1706	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1707echo "$as_me:   former value:  $ac_old_val" >&2;}
1708	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1709echo "$as_me:   current value: $ac_new_val" >&2;}
1710	ac_cache_corrupted=:
1711      fi;;
1712  esac
1713  # Pass precious variables to config.status.
1714  if test "$ac_new_set" = set; then
1715    case $ac_new_val in
1716    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1717    *) ac_arg=$ac_var=$ac_new_val ;;
1718    esac
1719    case " $ac_configure_args " in
1720      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1721      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1722    esac
1723  fi
1724done
1725if $ac_cache_corrupted; then
1726  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1727echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1728  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1729echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1730   { (exit 1); exit 1; }; }
1731fi
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757ac_ext=c
1758ac_cpp='$CPP $CPPFLAGS'
1759ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1760ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1761ac_compiler_gnu=$ac_cv_c_compiler_gnu
1762
1763
1764
1765#--------------------------------------------------------------------
1766# Call TEA_INIT as the first TEA_ macro to set up initial vars.
1767# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
1768# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
1769#--------------------------------------------------------------------
1770
1771
1772    # TEA extensions pass this us the version of TEA they think they
1773    # are compatible with.
1774    TEA_VERSION="3.9"
1775
1776    { echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
1777echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6; }
1778    if test x"${PACKAGE_NAME}" = x ; then
1779	{ { echo "$as_me:$LINENO: error:
1780The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
1781echo "$as_me: error:
1782The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
1783   { (exit 1); exit 1; }; }
1784    fi
1785    if test x"3.9" = x ; then
1786	{ { echo "$as_me:$LINENO: error:
1787TEA version not specified." >&5
1788echo "$as_me: error:
1789TEA version not specified." >&2;}
1790   { (exit 1); exit 1; }; }
1791    elif test "3.9" != "${TEA_VERSION}" ; then
1792	{ echo "$as_me:$LINENO: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
1793echo "${ECHO_T}warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
1794    else
1795	{ echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
1796echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6; }
1797    fi
1798    case "`uname -s`" in
1799	*win32*|*WIN32*|*MINGW32_*)
1800	    # Extract the first word of "cygpath", so it can be a program name with args.
1801set dummy cygpath; ac_word=$2
1802{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1803echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1804if test "${ac_cv_prog_CYGPATH+set}" = set; then
1805  echo $ECHO_N "(cached) $ECHO_C" >&6
1806else
1807  if test -n "$CYGPATH"; then
1808  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1809else
1810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1811for as_dir in $PATH
1812do
1813  IFS=$as_save_IFS
1814  test -z "$as_dir" && as_dir=.
1815  for ac_exec_ext in '' $ac_executable_extensions; do
1816  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1817    ac_cv_prog_CYGPATH="cygpath -w"
1818    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1819    break 2
1820  fi
1821done
1822done
1823IFS=$as_save_IFS
1824
1825  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1826fi
1827fi
1828CYGPATH=$ac_cv_prog_CYGPATH
1829if test -n "$CYGPATH"; then
1830  { echo "$as_me:$LINENO: result: $CYGPATH" >&5
1831echo "${ECHO_T}$CYGPATH" >&6; }
1832else
1833  { echo "$as_me:$LINENO: result: no" >&5
1834echo "${ECHO_T}no" >&6; }
1835fi
1836
1837
1838	    EXEEXT=".exe"
1839	    TEA_PLATFORM="windows"
1840	    ;;
1841	*CYGWIN_*)
1842	    CYGPATH=echo
1843	    EXEEXT=".exe"
1844	    # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
1845	    ;;
1846	*)
1847	    CYGPATH=echo
1848	    EXEEXT=""
1849	    TEA_PLATFORM="unix"
1850	    ;;
1851    esac
1852
1853    # Check if exec_prefix is set. If not use fall back to prefix.
1854    # Note when adjusted, so that TEA_PREFIX can correct for this.
1855    # This is needed for recursive configures, since autoconf propagates
1856    # $prefix, but not $exec_prefix (doh!).
1857    if test x$exec_prefix = xNONE ; then
1858	exec_prefix_default=yes
1859	exec_prefix=$prefix
1860    fi
1861
1862
1863
1864
1865    # This package name must be replaced statically for AC_SUBST to work
1866
1867    # Substitute STUB_LIB_FILE in case package creates a stub library too.
1868
1869
1870    # We AC_SUBST these here to ensure they are subst'ed,
1871    # in case the user doesn't call TEA_ADD_...
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881ac_aux_dir=
1882for ac_dir in ../../../config "$srcdir"/../../../config; do
1883  if test -f "$ac_dir/install-sh"; then
1884    ac_aux_dir=$ac_dir
1885    ac_install_sh="$ac_aux_dir/install-sh -c"
1886    break
1887  elif 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/shtool"; then
1892    ac_aux_dir=$ac_dir
1893    ac_install_sh="$ac_aux_dir/shtool install -c"
1894    break
1895  fi
1896done
1897if test -z "$ac_aux_dir"; then
1898  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../../../config \"$srcdir\"/../../../config" >&5
1899echo "$as_me: error: cannot find install-sh or install.sh in ../../../config \"$srcdir\"/../../../config" >&2;}
1900   { (exit 1); exit 1; }; }
1901fi
1902
1903# These three variables are undocumented and unsupported,
1904# and are intended to be withdrawn in a future Autoconf release.
1905# They can cause serious problems if a builder's source tree is in a directory
1906# whose full name contains unusual characters.
1907ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1908ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1909ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1910
1911
1912
1913#--------------------------------------------------------------------
1914# specify some extra flags
1915#--------------------------------------------------------------------
1916
1917# Check whether --with-gdbm was given.
1918if test "${with_gdbm+set}" = set; then
1919  withval=$with_gdbm; with_gdbm=$withval
1920else
1921  with_gdbm=no
1922fi
1923
1924
1925
1926# Check whether --with-xotcl was given.
1927if test "${with_xotcl+set}" = set; then
1928  withval=$with_xotcl; with_xotcl=$withval
1929else
1930  { { echo "$as_me:$LINENO: error: --with-xotcl is required" >&5
1931echo "$as_me: error: --with-xotcl is required" >&2;}
1932   { (exit 1); exit 1; }; }
1933fi
1934
1935
1936#--------------------------------------------------------------------
1937# Load the tclConfig.sh file
1938#--------------------------------------------------------------------
1939
1940
1941
1942    #
1943    # Ok, lets find the tcl configuration
1944    # First, look for one uninstalled.
1945    # the alternative search directory is invoked by --with-tcl
1946    #
1947
1948    if test x"${no_tcl}" = x ; then
1949	# we reset no_tcl in case something fails here
1950	no_tcl=true
1951
1952# Check whether --with-tcl was given.
1953if test "${with_tcl+set}" = set; then
1954  withval=$with_tcl; with_tclconfig="${withval}"
1955fi
1956
1957	{ echo "$as_me:$LINENO: checking for Tcl configuration" >&5
1958echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6; }
1959	if test "${ac_cv_c_tclconfig+set}" = set; then
1960  echo $ECHO_N "(cached) $ECHO_C" >&6
1961else
1962
1963
1964	    # First check to see if --with-tcl was specified.
1965	    if test x"${with_tclconfig}" != x ; then
1966		case "${with_tclconfig}" in
1967		    */tclConfig.sh )
1968			if test -f "${with_tclconfig}"; then
1969			    { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
1970echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
1971			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
1972			fi ;;
1973		esac
1974		if test -f "${with_tclconfig}/tclConfig.sh" ; then
1975		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
1976		else
1977		    { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
1978echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
1979   { (exit 1); exit 1; }; }
1980		fi
1981	    fi
1982
1983	    # then check for a private Tcl installation
1984	    if test x"${ac_cv_c_tclconfig}" = x ; then
1985		for i in \
1986			../tcl \
1987			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1988			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
1989			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
1990			../../tcl \
1991			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1992			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
1993			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
1994			../../../tcl \
1995			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1996			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
1997			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
1998		    if test "${TEA_PLATFORM}" = "windows" \
1999			    -a -f "$i/win/tclConfig.sh" ; then
2000			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2001			break
2002		    fi
2003		    if test -f "$i/unix/tclConfig.sh" ; then
2004			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2005			break
2006		    fi
2007		done
2008	    fi
2009
2010	    # on Darwin, check in Framework installation locations
2011	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
2012		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2013			`ls -d /Library/Frameworks 2>/dev/null` \
2014			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2015			`ls -d /System/Library/Frameworks 2>/dev/null` \
2016			; do
2017		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
2018			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
2019			break
2020		    fi
2021		done
2022	    fi
2023
2024	    # TEA specific: on Windows, check in common installation locations
2025	    if test "${TEA_PLATFORM}" = "windows" \
2026		-a x"${ac_cv_c_tclconfig}" = x ; then
2027		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2028			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2029			; do
2030		    if test -f "$i/tclConfig.sh" ; then
2031			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2032			break
2033		    fi
2034		done
2035	    fi
2036
2037	    # check in a few common install locations
2038	    if test x"${ac_cv_c_tclconfig}" = x ; then
2039		for i in `ls -d ${libdir} 2>/dev/null` \
2040			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2041			`ls -d ${prefix}/lib 2>/dev/null` \
2042			`ls -d /usr/local/lib 2>/dev/null` \
2043			`ls -d /usr/contrib/lib 2>/dev/null` \
2044			`ls -d /usr/lib 2>/dev/null` \
2045			`ls -d /usr/lib64 2>/dev/null` \
2046			; do
2047		    if test -f "$i/tclConfig.sh" ; then
2048			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2049			break
2050		    fi
2051		done
2052	    fi
2053
2054	    # check in a few other private locations
2055	    if test x"${ac_cv_c_tclconfig}" = x ; then
2056		for i in \
2057			${srcdir}/../tcl \
2058			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2059			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2060			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2061		    if test "${TEA_PLATFORM}" = "windows" \
2062			    -a -f "$i/win/tclConfig.sh" ; then
2063			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2064			break
2065		    fi
2066		    if test -f "$i/unix/tclConfig.sh" ; then
2067			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2068			break
2069		    fi
2070		done
2071	    fi
2072
2073fi
2074
2075
2076	if test x"${ac_cv_c_tclconfig}" = x ; then
2077	    TCL_BIN_DIR="# no Tcl configs found"
2078	    { { echo "$as_me:$LINENO: error: Can't find Tcl configuration definitions" >&5
2079echo "$as_me: error: Can't find Tcl configuration definitions" >&2;}
2080   { (exit 1); exit 1; }; }
2081	else
2082	    no_tcl=
2083	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
2084	    { echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2085echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2086	fi
2087    fi
2088
2089
2090    { echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
2091echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6; }
2092
2093    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
2094        { echo "$as_me:$LINENO: result: loading" >&5
2095echo "${ECHO_T}loading" >&6; }
2096	. "${TCL_BIN_DIR}/tclConfig.sh"
2097    else
2098        { echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
2099echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2100    fi
2101
2102    # eval is required to do the TCL_DBGX substitution
2103    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
2104    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
2105
2106    # If the TCL_BIN_DIR is the build directory (not the install directory),
2107    # then set the common variable name to the value of the build variables.
2108    # For example, the variable TCL_LIB_SPEC will be set to the value
2109    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
2110    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
2111    # installed and uninstalled version of Tcl.
2112    if test -f "${TCL_BIN_DIR}/Makefile" ; then
2113        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
2114        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
2115        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
2116    elif test "`uname -s`" = "Darwin"; then
2117	# If Tcl was built as a framework, attempt to use the libraries
2118	# from the framework at the given location so that linking works
2119	# against Tcl.framework installed in an arbitrary location.
2120	case ${TCL_DEFS} in
2121	    *TCL_FRAMEWORK*)
2122		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
2123		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
2124			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
2125			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
2126			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
2127			    break
2128			fi
2129		    done
2130		fi
2131		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
2132		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
2133		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
2134		fi
2135		;;
2136	esac
2137    fi
2138
2139    # eval is required to do the TCL_DBGX substitution
2140    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
2141    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
2142    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
2143    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158    case "`uname -s`" in
2159	*CYGWIN_*)
2160	    { echo "$as_me:$LINENO: checking for cygwin variant" >&5
2161echo $ECHO_N "checking for cygwin variant... $ECHO_C" >&6; }
2162	    case ${TCL_EXTRA_CFLAGS} in
2163		*-mwin32*|*-mno-cygwin*)
2164		    TEA_PLATFORM="windows"
2165		    CFLAGS="$CFLAGS -mwin32"
2166		    { echo "$as_me:$LINENO: result: win32" >&5
2167echo "${ECHO_T}win32" >&6; }
2168		    ;;
2169		*)
2170		    TEA_PLATFORM="unix"
2171		    { echo "$as_me:$LINENO: result: unix" >&5
2172echo "${ECHO_T}unix" >&6; }
2173		    ;;
2174	    esac
2175	    EXEEXT=".exe"
2176	    ;;
2177	*)
2178	    ;;
2179    esac
2180
2181    # Do this here as we have fully defined TEA_PLATFORM now
2182    if test "${TEA_PLATFORM}" = "windows" ; then
2183	# The BUILD_$pkg is to define the correct extern storage class
2184	# handling when making this package
2185
2186cat >>confdefs.h <<_ACEOF
2187#define BUILD_${PACKAGE_NAME}
2188_ACEOF
2189
2190	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
2191    fi
2192
2193    # TEA specific:
2194
2195
2196
2197
2198
2199
2200
2201
2202#--------------------------------------------------------------------
2203# Load the tkConfig.sh file if necessary (Tk extension)
2204#--------------------------------------------------------------------
2205
2206#TEA_PATH_TKCONFIG
2207#TEA_LOAD_TKCONFIG
2208
2209#-----------------------------------------------------------------------
2210# Handle the --prefix=... option by defaulting to what Tcl gave.
2211# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
2212#-----------------------------------------------------------------------
2213
2214
2215    if test "${prefix}" = "NONE"; then
2216	prefix_default=yes
2217	if test x"${TCL_PREFIX}" != x; then
2218	    { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
2219echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
2220	    prefix=${TCL_PREFIX}
2221	else
2222	    { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
2223echo "$as_me: --prefix defaulting to /usr/local" >&6;}
2224	    prefix=/usr/local
2225	fi
2226    fi
2227    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
2228	-o x"${exec_prefix_default}" = x"yes" ; then
2229	if test x"${TCL_EXEC_PREFIX}" != x; then
2230	    { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
2231echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
2232	    exec_prefix=${TCL_EXEC_PREFIX}
2233	else
2234	    { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
2235echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
2236	    exec_prefix=$prefix
2237	fi
2238    fi
2239
2240
2241#-----------------------------------------------------------------------
2242# Standard compiler checks.
2243# This sets up CC by using the CC env var, or looks for gcc otherwise.
2244# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
2245# the basic setup necessary to compile executables.
2246#-----------------------------------------------------------------------
2247
2248
2249    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
2250    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
2251
2252    # If the user did not set CFLAGS, set it now to keep
2253    # the AC_PROG_CC macro from adding "-g -O2".
2254    if test "${CFLAGS+set}" != "set" ; then
2255	CFLAGS=""
2256    fi
2257
2258    ac_ext=c
2259ac_cpp='$CPP $CPPFLAGS'
2260ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2261ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2262ac_compiler_gnu=$ac_cv_c_compiler_gnu
2263if test -n "$ac_tool_prefix"; then
2264  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2265set dummy ${ac_tool_prefix}gcc; ac_word=$2
2266{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2267echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2268if test "${ac_cv_prog_CC+set}" = set; then
2269  echo $ECHO_N "(cached) $ECHO_C" >&6
2270else
2271  if test -n "$CC"; then
2272  ac_cv_prog_CC="$CC" # Let the user override the test.
2273else
2274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2275for as_dir in $PATH
2276do
2277  IFS=$as_save_IFS
2278  test -z "$as_dir" && as_dir=.
2279  for ac_exec_ext in '' $ac_executable_extensions; do
2280  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2281    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2282    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2283    break 2
2284  fi
2285done
2286done
2287IFS=$as_save_IFS
2288
2289fi
2290fi
2291CC=$ac_cv_prog_CC
2292if test -n "$CC"; then
2293  { echo "$as_me:$LINENO: result: $CC" >&5
2294echo "${ECHO_T}$CC" >&6; }
2295else
2296  { echo "$as_me:$LINENO: result: no" >&5
2297echo "${ECHO_T}no" >&6; }
2298fi
2299
2300
2301fi
2302if test -z "$ac_cv_prog_CC"; then
2303  ac_ct_CC=$CC
2304  # Extract the first word of "gcc", so it can be a program name with args.
2305set dummy gcc; ac_word=$2
2306{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2307echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2308if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2309  echo $ECHO_N "(cached) $ECHO_C" >&6
2310else
2311  if test -n "$ac_ct_CC"; then
2312  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2313else
2314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2315for as_dir in $PATH
2316do
2317  IFS=$as_save_IFS
2318  test -z "$as_dir" && as_dir=.
2319  for ac_exec_ext in '' $ac_executable_extensions; do
2320  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2321    ac_cv_prog_ac_ct_CC="gcc"
2322    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2323    break 2
2324  fi
2325done
2326done
2327IFS=$as_save_IFS
2328
2329fi
2330fi
2331ac_ct_CC=$ac_cv_prog_ac_ct_CC
2332if test -n "$ac_ct_CC"; then
2333  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2334echo "${ECHO_T}$ac_ct_CC" >&6; }
2335else
2336  { echo "$as_me:$LINENO: result: no" >&5
2337echo "${ECHO_T}no" >&6; }
2338fi
2339
2340  if test "x$ac_ct_CC" = x; then
2341    CC=""
2342  else
2343    case $cross_compiling:$ac_tool_warned in
2344yes:)
2345{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2346whose name does not start with the host triplet.  If you think this
2347configuration is useful to you, please write to autoconf@gnu.org." >&5
2348echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2349whose name does not start with the host triplet.  If you think this
2350configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2351ac_tool_warned=yes ;;
2352esac
2353    CC=$ac_ct_CC
2354  fi
2355else
2356  CC="$ac_cv_prog_CC"
2357fi
2358
2359if test -z "$CC"; then
2360          if test -n "$ac_tool_prefix"; then
2361    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2362set dummy ${ac_tool_prefix}cc; ac_word=$2
2363{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2364echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2365if test "${ac_cv_prog_CC+set}" = set; then
2366  echo $ECHO_N "(cached) $ECHO_C" >&6
2367else
2368  if test -n "$CC"; then
2369  ac_cv_prog_CC="$CC" # Let the user override the test.
2370else
2371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2372for as_dir in $PATH
2373do
2374  IFS=$as_save_IFS
2375  test -z "$as_dir" && as_dir=.
2376  for ac_exec_ext in '' $ac_executable_extensions; do
2377  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2378    ac_cv_prog_CC="${ac_tool_prefix}cc"
2379    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2380    break 2
2381  fi
2382done
2383done
2384IFS=$as_save_IFS
2385
2386fi
2387fi
2388CC=$ac_cv_prog_CC
2389if test -n "$CC"; then
2390  { echo "$as_me:$LINENO: result: $CC" >&5
2391echo "${ECHO_T}$CC" >&6; }
2392else
2393  { echo "$as_me:$LINENO: result: no" >&5
2394echo "${ECHO_T}no" >&6; }
2395fi
2396
2397
2398  fi
2399fi
2400if test -z "$CC"; then
2401  # Extract the first word of "cc", so it can be a program name with args.
2402set dummy cc; ac_word=$2
2403{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2404echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2405if test "${ac_cv_prog_CC+set}" = set; then
2406  echo $ECHO_N "(cached) $ECHO_C" >&6
2407else
2408  if test -n "$CC"; then
2409  ac_cv_prog_CC="$CC" # Let the user override the test.
2410else
2411  ac_prog_rejected=no
2412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2413for as_dir in $PATH
2414do
2415  IFS=$as_save_IFS
2416  test -z "$as_dir" && as_dir=.
2417  for ac_exec_ext in '' $ac_executable_extensions; do
2418  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2419    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2420       ac_prog_rejected=yes
2421       continue
2422     fi
2423    ac_cv_prog_CC="cc"
2424    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2425    break 2
2426  fi
2427done
2428done
2429IFS=$as_save_IFS
2430
2431if test $ac_prog_rejected = yes; then
2432  # We found a bogon in the path, so make sure we never use it.
2433  set dummy $ac_cv_prog_CC
2434  shift
2435  if test $# != 0; then
2436    # We chose a different compiler from the bogus one.
2437    # However, it has the same basename, so the bogon will be chosen
2438    # first if we set CC to just the basename; use the full file name.
2439    shift
2440    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2441  fi
2442fi
2443fi
2444fi
2445CC=$ac_cv_prog_CC
2446if test -n "$CC"; then
2447  { echo "$as_me:$LINENO: result: $CC" >&5
2448echo "${ECHO_T}$CC" >&6; }
2449else
2450  { echo "$as_me:$LINENO: result: no" >&5
2451echo "${ECHO_T}no" >&6; }
2452fi
2453
2454
2455fi
2456if test -z "$CC"; then
2457  if test -n "$ac_tool_prefix"; then
2458  for ac_prog in cl.exe
2459  do
2460    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2461set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2462{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2463echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2464if test "${ac_cv_prog_CC+set}" = set; then
2465  echo $ECHO_N "(cached) $ECHO_C" >&6
2466else
2467  if test -n "$CC"; then
2468  ac_cv_prog_CC="$CC" # Let the user override the test.
2469else
2470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2471for as_dir in $PATH
2472do
2473  IFS=$as_save_IFS
2474  test -z "$as_dir" && as_dir=.
2475  for ac_exec_ext in '' $ac_executable_extensions; do
2476  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2477    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2478    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2479    break 2
2480  fi
2481done
2482done
2483IFS=$as_save_IFS
2484
2485fi
2486fi
2487CC=$ac_cv_prog_CC
2488if test -n "$CC"; then
2489  { echo "$as_me:$LINENO: result: $CC" >&5
2490echo "${ECHO_T}$CC" >&6; }
2491else
2492  { echo "$as_me:$LINENO: result: no" >&5
2493echo "${ECHO_T}no" >&6; }
2494fi
2495
2496
2497    test -n "$CC" && break
2498  done
2499fi
2500if test -z "$CC"; then
2501  ac_ct_CC=$CC
2502  for ac_prog in cl.exe
2503do
2504  # Extract the first word of "$ac_prog", so it can be a program name with args.
2505set dummy $ac_prog; ac_word=$2
2506{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2507echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2508if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2509  echo $ECHO_N "(cached) $ECHO_C" >&6
2510else
2511  if test -n "$ac_ct_CC"; then
2512  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2513else
2514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2515for as_dir in $PATH
2516do
2517  IFS=$as_save_IFS
2518  test -z "$as_dir" && as_dir=.
2519  for ac_exec_ext in '' $ac_executable_extensions; do
2520  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2521    ac_cv_prog_ac_ct_CC="$ac_prog"
2522    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2523    break 2
2524  fi
2525done
2526done
2527IFS=$as_save_IFS
2528
2529fi
2530fi
2531ac_ct_CC=$ac_cv_prog_ac_ct_CC
2532if test -n "$ac_ct_CC"; then
2533  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2534echo "${ECHO_T}$ac_ct_CC" >&6; }
2535else
2536  { echo "$as_me:$LINENO: result: no" >&5
2537echo "${ECHO_T}no" >&6; }
2538fi
2539
2540
2541  test -n "$ac_ct_CC" && break
2542done
2543
2544  if test "x$ac_ct_CC" = x; then
2545    CC=""
2546  else
2547    case $cross_compiling:$ac_tool_warned in
2548yes:)
2549{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2550whose name does not start with the host triplet.  If you think this
2551configuration is useful to you, please write to autoconf@gnu.org." >&5
2552echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2553whose name does not start with the host triplet.  If you think this
2554configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2555ac_tool_warned=yes ;;
2556esac
2557    CC=$ac_ct_CC
2558  fi
2559fi
2560
2561fi
2562
2563
2564test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2565See \`config.log' for more details." >&5
2566echo "$as_me: error: no acceptable C compiler found in \$PATH
2567See \`config.log' for more details." >&2;}
2568   { (exit 1); exit 1; }; }
2569
2570# Provide some information about the compiler.
2571echo "$as_me:$LINENO: checking for C compiler version" >&5
2572ac_compiler=`set X $ac_compile; echo $2`
2573{ (ac_try="$ac_compiler --version >&5"
2574case "(($ac_try" in
2575  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2576  *) ac_try_echo=$ac_try;;
2577esac
2578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2579  (eval "$ac_compiler --version >&5") 2>&5
2580  ac_status=$?
2581  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2582  (exit $ac_status); }
2583{ (ac_try="$ac_compiler -v >&5"
2584case "(($ac_try" in
2585  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2586  *) ac_try_echo=$ac_try;;
2587esac
2588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2589  (eval "$ac_compiler -v >&5") 2>&5
2590  ac_status=$?
2591  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2592  (exit $ac_status); }
2593{ (ac_try="$ac_compiler -V >&5"
2594case "(($ac_try" in
2595  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2596  *) ac_try_echo=$ac_try;;
2597esac
2598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2599  (eval "$ac_compiler -V >&5") 2>&5
2600  ac_status=$?
2601  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2602  (exit $ac_status); }
2603
2604cat >conftest.$ac_ext <<_ACEOF
2605/* confdefs.h.  */
2606_ACEOF
2607cat confdefs.h >>conftest.$ac_ext
2608cat >>conftest.$ac_ext <<_ACEOF
2609/* end confdefs.h.  */
2610
2611int
2612main ()
2613{
2614
2615  ;
2616  return 0;
2617}
2618_ACEOF
2619ac_clean_files_save=$ac_clean_files
2620ac_clean_files="$ac_clean_files a.out a.exe b.out"
2621# Try to create an executable without -o first, disregard a.out.
2622# It will help us diagnose broken compilers, and finding out an intuition
2623# of exeext.
2624{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2625echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2626ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2627#
2628# List of possible output files, starting from the most likely.
2629# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2630# only as a last resort.  b.out is created by i960 compilers.
2631ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2632#
2633# The IRIX 6 linker writes into existing files which may not be
2634# executable, retaining their permissions.  Remove them first so a
2635# subsequent execution test works.
2636ac_rmfiles=
2637for ac_file in $ac_files
2638do
2639  case $ac_file in
2640    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2641    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2642  esac
2643done
2644rm -f $ac_rmfiles
2645
2646if { (ac_try="$ac_link_default"
2647case "(($ac_try" in
2648  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2649  *) ac_try_echo=$ac_try;;
2650esac
2651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2652  (eval "$ac_link_default") 2>&5
2653  ac_status=$?
2654  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2655  (exit $ac_status); }; then
2656  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2657# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2658# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2659# so that the user can short-circuit this test for compilers unknown to
2660# Autoconf.
2661for ac_file in $ac_files ''
2662do
2663  test -f "$ac_file" || continue
2664  case $ac_file in
2665    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2666	;;
2667    [ab].out )
2668	# We found the default executable, but exeext='' is most
2669	# certainly right.
2670	break;;
2671    *.* )
2672        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2673	then :; else
2674	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2675	fi
2676	# We set ac_cv_exeext here because the later test for it is not
2677	# safe: cross compilers may not add the suffix if given an `-o'
2678	# argument, so we may need to know it at that point already.
2679	# Even if this section looks crufty: it has the advantage of
2680	# actually working.
2681	break;;
2682    * )
2683	break;;
2684  esac
2685done
2686test "$ac_cv_exeext" = no && ac_cv_exeext=
2687
2688else
2689  ac_file=''
2690fi
2691
2692{ echo "$as_me:$LINENO: result: $ac_file" >&5
2693echo "${ECHO_T}$ac_file" >&6; }
2694if test -z "$ac_file"; then
2695  echo "$as_me: failed program was:" >&5
2696sed 's/^/| /' conftest.$ac_ext >&5
2697
2698{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2699See \`config.log' for more details." >&5
2700echo "$as_me: error: C compiler cannot create executables
2701See \`config.log' for more details." >&2;}
2702   { (exit 77); exit 77; }; }
2703fi
2704
2705ac_exeext=$ac_cv_exeext
2706
2707# Check that the compiler produces executables we can run.  If not, either
2708# the compiler is broken, or we cross compile.
2709{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2710echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2711# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2712# If not cross compiling, check that we can run a simple program.
2713if test "$cross_compiling" != yes; then
2714  if { ac_try='./$ac_file'
2715  { (case "(($ac_try" in
2716  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2717  *) ac_try_echo=$ac_try;;
2718esac
2719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2720  (eval "$ac_try") 2>&5
2721  ac_status=$?
2722  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2723  (exit $ac_status); }; }; then
2724    cross_compiling=no
2725  else
2726    if test "$cross_compiling" = maybe; then
2727	cross_compiling=yes
2728    else
2729	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2730If you meant to cross compile, use \`--host'.
2731See \`config.log' for more details." >&5
2732echo "$as_me: error: cannot run C compiled programs.
2733If you meant to cross compile, use \`--host'.
2734See \`config.log' for more details." >&2;}
2735   { (exit 1); exit 1; }; }
2736    fi
2737  fi
2738fi
2739{ echo "$as_me:$LINENO: result: yes" >&5
2740echo "${ECHO_T}yes" >&6; }
2741
2742rm -f a.out a.exe conftest$ac_cv_exeext b.out
2743ac_clean_files=$ac_clean_files_save
2744# Check that the compiler produces executables we can run.  If not, either
2745# the compiler is broken, or we cross compile.
2746{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2747echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2748{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2749echo "${ECHO_T}$cross_compiling" >&6; }
2750
2751{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2752echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2753if { (ac_try="$ac_link"
2754case "(($ac_try" in
2755  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2756  *) ac_try_echo=$ac_try;;
2757esac
2758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2759  (eval "$ac_link") 2>&5
2760  ac_status=$?
2761  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2762  (exit $ac_status); }; then
2763  # If both `conftest.exe' and `conftest' are `present' (well, observable)
2764# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2765# work properly (i.e., refer to `conftest.exe'), while it won't with
2766# `rm'.
2767for ac_file in conftest.exe conftest conftest.*; do
2768  test -f "$ac_file" || continue
2769  case $ac_file in
2770    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2771    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2772	  break;;
2773    * ) break;;
2774  esac
2775done
2776else
2777  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2778See \`config.log' for more details." >&5
2779echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2780See \`config.log' for more details." >&2;}
2781   { (exit 1); exit 1; }; }
2782fi
2783
2784rm -f conftest$ac_cv_exeext
2785{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2786echo "${ECHO_T}$ac_cv_exeext" >&6; }
2787
2788rm -f conftest.$ac_ext
2789EXEEXT=$ac_cv_exeext
2790ac_exeext=$EXEEXT
2791{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2792echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2793if test "${ac_cv_objext+set}" = set; then
2794  echo $ECHO_N "(cached) $ECHO_C" >&6
2795else
2796  cat >conftest.$ac_ext <<_ACEOF
2797/* confdefs.h.  */
2798_ACEOF
2799cat confdefs.h >>conftest.$ac_ext
2800cat >>conftest.$ac_ext <<_ACEOF
2801/* end confdefs.h.  */
2802
2803int
2804main ()
2805{
2806
2807  ;
2808  return 0;
2809}
2810_ACEOF
2811rm -f conftest.o conftest.obj
2812if { (ac_try="$ac_compile"
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_compile") 2>&5
2819  ac_status=$?
2820  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2821  (exit $ac_status); }; then
2822  for ac_file in conftest.o conftest.obj conftest.*; do
2823  test -f "$ac_file" || continue;
2824  case $ac_file in
2825    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2826    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2827       break;;
2828  esac
2829done
2830else
2831  echo "$as_me: failed program was:" >&5
2832sed 's/^/| /' conftest.$ac_ext >&5
2833
2834{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2835See \`config.log' for more details." >&5
2836echo "$as_me: error: cannot compute suffix of object files: cannot compile
2837See \`config.log' for more details." >&2;}
2838   { (exit 1); exit 1; }; }
2839fi
2840
2841rm -f conftest.$ac_cv_objext conftest.$ac_ext
2842fi
2843{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2844echo "${ECHO_T}$ac_cv_objext" >&6; }
2845OBJEXT=$ac_cv_objext
2846ac_objext=$OBJEXT
2847{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2848echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
2849if test "${ac_cv_c_compiler_gnu+set}" = set; then
2850  echo $ECHO_N "(cached) $ECHO_C" >&6
2851else
2852  cat >conftest.$ac_ext <<_ACEOF
2853/* confdefs.h.  */
2854_ACEOF
2855cat confdefs.h >>conftest.$ac_ext
2856cat >>conftest.$ac_ext <<_ACEOF
2857/* end confdefs.h.  */
2858
2859int
2860main ()
2861{
2862#ifndef __GNUC__
2863       choke me
2864#endif
2865
2866  ;
2867  return 0;
2868}
2869_ACEOF
2870rm -f conftest.$ac_objext
2871if { (ac_try="$ac_compile"
2872case "(($ac_try" in
2873  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2874  *) ac_try_echo=$ac_try;;
2875esac
2876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2877  (eval "$ac_compile") 2>conftest.er1
2878  ac_status=$?
2879  grep -v '^ *+' conftest.er1 >conftest.err
2880  rm -f conftest.er1
2881  cat conftest.err >&5
2882  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2883  (exit $ac_status); } && {
2884	 test -z "$ac_c_werror_flag" ||
2885	 test ! -s conftest.err
2886       } && test -s conftest.$ac_objext; then
2887  ac_compiler_gnu=yes
2888else
2889  echo "$as_me: failed program was:" >&5
2890sed 's/^/| /' conftest.$ac_ext >&5
2891
2892	ac_compiler_gnu=no
2893fi
2894
2895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2896ac_cv_c_compiler_gnu=$ac_compiler_gnu
2897
2898fi
2899{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2900echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2901GCC=`test $ac_compiler_gnu = yes && echo yes`
2902ac_test_CFLAGS=${CFLAGS+set}
2903ac_save_CFLAGS=$CFLAGS
2904{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2905echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
2906if test "${ac_cv_prog_cc_g+set}" = set; then
2907  echo $ECHO_N "(cached) $ECHO_C" >&6
2908else
2909  ac_save_c_werror_flag=$ac_c_werror_flag
2910   ac_c_werror_flag=yes
2911   ac_cv_prog_cc_g=no
2912   CFLAGS="-g"
2913   cat >conftest.$ac_ext <<_ACEOF
2914/* confdefs.h.  */
2915_ACEOF
2916cat confdefs.h >>conftest.$ac_ext
2917cat >>conftest.$ac_ext <<_ACEOF
2918/* end confdefs.h.  */
2919
2920int
2921main ()
2922{
2923
2924  ;
2925  return 0;
2926}
2927_ACEOF
2928rm -f conftest.$ac_objext
2929if { (ac_try="$ac_compile"
2930case "(($ac_try" in
2931  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2932  *) ac_try_echo=$ac_try;;
2933esac
2934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2935  (eval "$ac_compile") 2>conftest.er1
2936  ac_status=$?
2937  grep -v '^ *+' conftest.er1 >conftest.err
2938  rm -f conftest.er1
2939  cat conftest.err >&5
2940  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2941  (exit $ac_status); } && {
2942	 test -z "$ac_c_werror_flag" ||
2943	 test ! -s conftest.err
2944       } && test -s conftest.$ac_objext; then
2945  ac_cv_prog_cc_g=yes
2946else
2947  echo "$as_me: failed program was:" >&5
2948sed 's/^/| /' conftest.$ac_ext >&5
2949
2950	CFLAGS=""
2951      cat >conftest.$ac_ext <<_ACEOF
2952/* confdefs.h.  */
2953_ACEOF
2954cat confdefs.h >>conftest.$ac_ext
2955cat >>conftest.$ac_ext <<_ACEOF
2956/* end confdefs.h.  */
2957
2958int
2959main ()
2960{
2961
2962  ;
2963  return 0;
2964}
2965_ACEOF
2966rm -f conftest.$ac_objext
2967if { (ac_try="$ac_compile"
2968case "(($ac_try" in
2969  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2970  *) ac_try_echo=$ac_try;;
2971esac
2972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2973  (eval "$ac_compile") 2>conftest.er1
2974  ac_status=$?
2975  grep -v '^ *+' conftest.er1 >conftest.err
2976  rm -f conftest.er1
2977  cat conftest.err >&5
2978  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2979  (exit $ac_status); } && {
2980	 test -z "$ac_c_werror_flag" ||
2981	 test ! -s conftest.err
2982       } && test -s conftest.$ac_objext; then
2983  :
2984else
2985  echo "$as_me: failed program was:" >&5
2986sed 's/^/| /' conftest.$ac_ext >&5
2987
2988	ac_c_werror_flag=$ac_save_c_werror_flag
2989	 CFLAGS="-g"
2990	 cat >conftest.$ac_ext <<_ACEOF
2991/* confdefs.h.  */
2992_ACEOF
2993cat confdefs.h >>conftest.$ac_ext
2994cat >>conftest.$ac_ext <<_ACEOF
2995/* end confdefs.h.  */
2996
2997int
2998main ()
2999{
3000
3001  ;
3002  return 0;
3003}
3004_ACEOF
3005rm -f conftest.$ac_objext
3006if { (ac_try="$ac_compile"
3007case "(($ac_try" in
3008  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3009  *) ac_try_echo=$ac_try;;
3010esac
3011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3012  (eval "$ac_compile") 2>conftest.er1
3013  ac_status=$?
3014  grep -v '^ *+' conftest.er1 >conftest.err
3015  rm -f conftest.er1
3016  cat conftest.err >&5
3017  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3018  (exit $ac_status); } && {
3019	 test -z "$ac_c_werror_flag" ||
3020	 test ! -s conftest.err
3021       } && test -s conftest.$ac_objext; then
3022  ac_cv_prog_cc_g=yes
3023else
3024  echo "$as_me: failed program was:" >&5
3025sed 's/^/| /' conftest.$ac_ext >&5
3026
3027
3028fi
3029
3030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3031fi
3032
3033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3034fi
3035
3036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3037   ac_c_werror_flag=$ac_save_c_werror_flag
3038fi
3039{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3040echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3041if test "$ac_test_CFLAGS" = set; then
3042  CFLAGS=$ac_save_CFLAGS
3043elif test $ac_cv_prog_cc_g = yes; then
3044  if test "$GCC" = yes; then
3045    CFLAGS="-g -O2"
3046  else
3047    CFLAGS="-g"
3048  fi
3049else
3050  if test "$GCC" = yes; then
3051    CFLAGS="-O2"
3052  else
3053    CFLAGS=
3054  fi
3055fi
3056{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3057echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3058if test "${ac_cv_prog_cc_c89+set}" = set; then
3059  echo $ECHO_N "(cached) $ECHO_C" >&6
3060else
3061  ac_cv_prog_cc_c89=no
3062ac_save_CC=$CC
3063cat >conftest.$ac_ext <<_ACEOF
3064/* confdefs.h.  */
3065_ACEOF
3066cat confdefs.h >>conftest.$ac_ext
3067cat >>conftest.$ac_ext <<_ACEOF
3068/* end confdefs.h.  */
3069#include <stdarg.h>
3070#include <stdio.h>
3071#include <sys/types.h>
3072#include <sys/stat.h>
3073/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3074struct buf { int x; };
3075FILE * (*rcsopen) (struct buf *, struct stat *, int);
3076static char *e (p, i)
3077     char **p;
3078     int i;
3079{
3080  return p[i];
3081}
3082static char *f (char * (*g) (char **, int), char **p, ...)
3083{
3084  char *s;
3085  va_list v;
3086  va_start (v,p);
3087  s = g (p, va_arg (v,int));
3088  va_end (v);
3089  return s;
3090}
3091
3092/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3093   function prototypes and stuff, but not '\xHH' hex character constants.
3094   These don't provoke an error unfortunately, instead are silently treated
3095   as 'x'.  The following induces an error, until -std is added to get
3096   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3097   array size at least.  It's necessary to write '\x00'==0 to get something
3098   that's true only with -std.  */
3099int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3100
3101/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3102   inside strings and character constants.  */
3103#define FOO(x) 'x'
3104int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3105
3106int test (int i, double x);
3107struct s1 {int (*f) (int a);};
3108struct s2 {int (*f) (double a);};
3109int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3110int argc;
3111char **argv;
3112int
3113main ()
3114{
3115return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3116  ;
3117  return 0;
3118}
3119_ACEOF
3120for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3121	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3122do
3123  CC="$ac_save_CC $ac_arg"
3124  rm -f conftest.$ac_objext
3125if { (ac_try="$ac_compile"
3126case "(($ac_try" in
3127  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3128  *) ac_try_echo=$ac_try;;
3129esac
3130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3131  (eval "$ac_compile") 2>conftest.er1
3132  ac_status=$?
3133  grep -v '^ *+' conftest.er1 >conftest.err
3134  rm -f conftest.er1
3135  cat conftest.err >&5
3136  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3137  (exit $ac_status); } && {
3138	 test -z "$ac_c_werror_flag" ||
3139	 test ! -s conftest.err
3140       } && test -s conftest.$ac_objext; then
3141  ac_cv_prog_cc_c89=$ac_arg
3142else
3143  echo "$as_me: failed program was:" >&5
3144sed 's/^/| /' conftest.$ac_ext >&5
3145
3146
3147fi
3148
3149rm -f core conftest.err conftest.$ac_objext
3150  test "x$ac_cv_prog_cc_c89" != "xno" && break
3151done
3152rm -f conftest.$ac_ext
3153CC=$ac_save_CC
3154
3155fi
3156# AC_CACHE_VAL
3157case "x$ac_cv_prog_cc_c89" in
3158  x)
3159    { echo "$as_me:$LINENO: result: none needed" >&5
3160echo "${ECHO_T}none needed" >&6; } ;;
3161  xno)
3162    { echo "$as_me:$LINENO: result: unsupported" >&5
3163echo "${ECHO_T}unsupported" >&6; } ;;
3164  *)
3165    CC="$CC $ac_cv_prog_cc_c89"
3166    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3167echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3168esac
3169
3170
3171ac_ext=c
3172ac_cpp='$CPP $CPPFLAGS'
3173ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3174ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3175ac_compiler_gnu=$ac_cv_c_compiler_gnu
3176
3177    ac_ext=c
3178ac_cpp='$CPP $CPPFLAGS'
3179ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3180ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3181ac_compiler_gnu=$ac_cv_c_compiler_gnu
3182{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3183echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3184# On Suns, sometimes $CPP names a directory.
3185if test -n "$CPP" && test -d "$CPP"; then
3186  CPP=
3187fi
3188if test -z "$CPP"; then
3189  if test "${ac_cv_prog_CPP+set}" = set; then
3190  echo $ECHO_N "(cached) $ECHO_C" >&6
3191else
3192      # Double quotes because CPP needs to be expanded
3193    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3194    do
3195      ac_preproc_ok=false
3196for ac_c_preproc_warn_flag in '' yes
3197do
3198  # Use a header file that comes with gcc, so configuring glibc
3199  # with a fresh cross-compiler works.
3200  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3201  # <limits.h> exists even on freestanding compilers.
3202  # On the NeXT, cc -E runs the code through the compiler's parser,
3203  # not just through cpp. "Syntax error" is here to catch this case.
3204  cat >conftest.$ac_ext <<_ACEOF
3205/* confdefs.h.  */
3206_ACEOF
3207cat confdefs.h >>conftest.$ac_ext
3208cat >>conftest.$ac_ext <<_ACEOF
3209/* end confdefs.h.  */
3210#ifdef __STDC__
3211# include <limits.h>
3212#else
3213# include <assert.h>
3214#endif
3215		     Syntax error
3216_ACEOF
3217if { (ac_try="$ac_cpp conftest.$ac_ext"
3218case "(($ac_try" in
3219  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3220  *) ac_try_echo=$ac_try;;
3221esac
3222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3223  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3224  ac_status=$?
3225  grep -v '^ *+' conftest.er1 >conftest.err
3226  rm -f conftest.er1
3227  cat conftest.err >&5
3228  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3229  (exit $ac_status); } >/dev/null && {
3230	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3231	 test ! -s conftest.err
3232       }; then
3233  :
3234else
3235  echo "$as_me: failed program was:" >&5
3236sed 's/^/| /' conftest.$ac_ext >&5
3237
3238  # Broken: fails on valid input.
3239continue
3240fi
3241
3242rm -f conftest.err conftest.$ac_ext
3243
3244  # OK, works on sane cases.  Now check whether nonexistent headers
3245  # can be detected and how.
3246  cat >conftest.$ac_ext <<_ACEOF
3247/* confdefs.h.  */
3248_ACEOF
3249cat confdefs.h >>conftest.$ac_ext
3250cat >>conftest.$ac_ext <<_ACEOF
3251/* end confdefs.h.  */
3252#include <ac_nonexistent.h>
3253_ACEOF
3254if { (ac_try="$ac_cpp conftest.$ac_ext"
3255case "(($ac_try" in
3256  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3257  *) ac_try_echo=$ac_try;;
3258esac
3259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3260  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3261  ac_status=$?
3262  grep -v '^ *+' conftest.er1 >conftest.err
3263  rm -f conftest.er1
3264  cat conftest.err >&5
3265  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3266  (exit $ac_status); } >/dev/null && {
3267	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3268	 test ! -s conftest.err
3269       }; then
3270  # Broken: success on invalid input.
3271continue
3272else
3273  echo "$as_me: failed program was:" >&5
3274sed 's/^/| /' conftest.$ac_ext >&5
3275
3276  # Passes both tests.
3277ac_preproc_ok=:
3278break
3279fi
3280
3281rm -f conftest.err conftest.$ac_ext
3282
3283done
3284# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3285rm -f conftest.err conftest.$ac_ext
3286if $ac_preproc_ok; then
3287  break
3288fi
3289
3290    done
3291    ac_cv_prog_CPP=$CPP
3292
3293fi
3294  CPP=$ac_cv_prog_CPP
3295else
3296  ac_cv_prog_CPP=$CPP
3297fi
3298{ echo "$as_me:$LINENO: result: $CPP" >&5
3299echo "${ECHO_T}$CPP" >&6; }
3300ac_preproc_ok=false
3301for ac_c_preproc_warn_flag in '' yes
3302do
3303  # Use a header file that comes with gcc, so configuring glibc
3304  # with a fresh cross-compiler works.
3305  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3306  # <limits.h> exists even on freestanding compilers.
3307  # On the NeXT, cc -E runs the code through the compiler's parser,
3308  # not just through cpp. "Syntax error" is here to catch this case.
3309  cat >conftest.$ac_ext <<_ACEOF
3310/* confdefs.h.  */
3311_ACEOF
3312cat confdefs.h >>conftest.$ac_ext
3313cat >>conftest.$ac_ext <<_ACEOF
3314/* end confdefs.h.  */
3315#ifdef __STDC__
3316# include <limits.h>
3317#else
3318# include <assert.h>
3319#endif
3320		     Syntax error
3321_ACEOF
3322if { (ac_try="$ac_cpp conftest.$ac_ext"
3323case "(($ac_try" in
3324  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3325  *) ac_try_echo=$ac_try;;
3326esac
3327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3328  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3329  ac_status=$?
3330  grep -v '^ *+' conftest.er1 >conftest.err
3331  rm -f conftest.er1
3332  cat conftest.err >&5
3333  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3334  (exit $ac_status); } >/dev/null && {
3335	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3336	 test ! -s conftest.err
3337       }; then
3338  :
3339else
3340  echo "$as_me: failed program was:" >&5
3341sed 's/^/| /' conftest.$ac_ext >&5
3342
3343  # Broken: fails on valid input.
3344continue
3345fi
3346
3347rm -f conftest.err conftest.$ac_ext
3348
3349  # OK, works on sane cases.  Now check whether nonexistent headers
3350  # can be detected and how.
3351  cat >conftest.$ac_ext <<_ACEOF
3352/* confdefs.h.  */
3353_ACEOF
3354cat confdefs.h >>conftest.$ac_ext
3355cat >>conftest.$ac_ext <<_ACEOF
3356/* end confdefs.h.  */
3357#include <ac_nonexistent.h>
3358_ACEOF
3359if { (ac_try="$ac_cpp conftest.$ac_ext"
3360case "(($ac_try" in
3361  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3362  *) ac_try_echo=$ac_try;;
3363esac
3364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3365  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3366  ac_status=$?
3367  grep -v '^ *+' conftest.er1 >conftest.err
3368  rm -f conftest.er1
3369  cat conftest.err >&5
3370  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3371  (exit $ac_status); } >/dev/null && {
3372	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3373	 test ! -s conftest.err
3374       }; then
3375  # Broken: success on invalid input.
3376continue
3377else
3378  echo "$as_me: failed program was:" >&5
3379sed 's/^/| /' conftest.$ac_ext >&5
3380
3381  # Passes both tests.
3382ac_preproc_ok=:
3383break
3384fi
3385
3386rm -f conftest.err conftest.$ac_ext
3387
3388done
3389# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3390rm -f conftest.err conftest.$ac_ext
3391if $ac_preproc_ok; then
3392  :
3393else
3394  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3395See \`config.log' for more details." >&5
3396echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3397See \`config.log' for more details." >&2;}
3398   { (exit 1); exit 1; }; }
3399fi
3400
3401ac_ext=c
3402ac_cpp='$CPP $CPPFLAGS'
3403ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3404ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3405ac_compiler_gnu=$ac_cv_c_compiler_gnu
3406
3407
3408    # Find a good install program.  We prefer a C program (faster),
3409# so one script is as good as another.  But avoid the broken or
3410# incompatible versions:
3411# SysV /etc/install, /usr/sbin/install
3412# SunOS /usr/etc/install
3413# IRIX /sbin/install
3414# AIX /bin/install
3415# AmigaOS /C/install, which installs bootblocks on floppy discs
3416# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3417# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3418# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3419# OS/2's system install, which has a completely different semantic
3420# ./install, which can be erroneously created by make from ./install.sh.
3421{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3422echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
3423if test -z "$INSTALL"; then
3424if test "${ac_cv_path_install+set}" = set; then
3425  echo $ECHO_N "(cached) $ECHO_C" >&6
3426else
3427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3428for as_dir in $PATH
3429do
3430  IFS=$as_save_IFS
3431  test -z "$as_dir" && as_dir=.
3432  # Account for people who put trailing slashes in PATH elements.
3433case $as_dir/ in
3434  ./ | .// | /cC/* | \
3435  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3436  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3437  /usr/ucb/* ) ;;
3438  *)
3439    # OSF1 and SCO ODT 3.0 have their own names for install.
3440    # Don't use installbsd from OSF since it installs stuff as root
3441    # by default.
3442    for ac_prog in ginstall scoinst install; do
3443      for ac_exec_ext in '' $ac_executable_extensions; do
3444	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3445	  if test $ac_prog = install &&
3446	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3447	    # AIX install.  It has an incompatible calling convention.
3448	    :
3449	  elif test $ac_prog = install &&
3450	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3451	    # program-specific install script used by HP pwplus--don't use.
3452	    :
3453	  else
3454	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3455	    break 3
3456	  fi
3457	fi
3458      done
3459    done
3460    ;;
3461esac
3462done
3463IFS=$as_save_IFS
3464
3465
3466fi
3467  if test "${ac_cv_path_install+set}" = set; then
3468    INSTALL=$ac_cv_path_install
3469  else
3470    # As a last resort, use the slow shell script.  Don't cache a
3471    # value for INSTALL within a source directory, because that will
3472    # break other packages using the cache if that directory is
3473    # removed, or if the value is a relative name.
3474    INSTALL=$ac_install_sh
3475  fi
3476fi
3477{ echo "$as_me:$LINENO: result: $INSTALL" >&5
3478echo "${ECHO_T}$INSTALL" >&6; }
3479
3480# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3481# It thinks the first close brace ends the variable substitution.
3482test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3483
3484test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3485
3486test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3487
3488
3489    #--------------------------------------------------------------------
3490    # Checks to see if the make program sets the $MAKE variable.
3491    #--------------------------------------------------------------------
3492
3493    { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3494echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
3495set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3496if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
3497  echo $ECHO_N "(cached) $ECHO_C" >&6
3498else
3499  cat >conftest.make <<\_ACEOF
3500SHELL = /bin/sh
3501all:
3502	@echo '@@@%%%=$(MAKE)=@@@%%%'
3503_ACEOF
3504# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3505case `${MAKE-make} -f conftest.make 2>/dev/null` in
3506  *@@@%%%=?*=@@@%%%*)
3507    eval ac_cv_prog_make_${ac_make}_set=yes;;
3508  *)
3509    eval ac_cv_prog_make_${ac_make}_set=no;;
3510esac
3511rm -f conftest.make
3512fi
3513if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3514  { echo "$as_me:$LINENO: result: yes" >&5
3515echo "${ECHO_T}yes" >&6; }
3516  SET_MAKE=
3517else
3518  { echo "$as_me:$LINENO: result: no" >&5
3519echo "${ECHO_T}no" >&6; }
3520  SET_MAKE="MAKE=${MAKE-make}"
3521fi
3522
3523
3524    #--------------------------------------------------------------------
3525    # Find ranlib
3526    #--------------------------------------------------------------------
3527
3528    if test -n "$ac_tool_prefix"; then
3529  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3530set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3531{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3532echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3533if test "${ac_cv_prog_RANLIB+set}" = set; then
3534  echo $ECHO_N "(cached) $ECHO_C" >&6
3535else
3536  if test -n "$RANLIB"; then
3537  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3538else
3539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3540for as_dir in $PATH
3541do
3542  IFS=$as_save_IFS
3543  test -z "$as_dir" && as_dir=.
3544  for ac_exec_ext in '' $ac_executable_extensions; do
3545  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3546    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3547    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3548    break 2
3549  fi
3550done
3551done
3552IFS=$as_save_IFS
3553
3554fi
3555fi
3556RANLIB=$ac_cv_prog_RANLIB
3557if test -n "$RANLIB"; then
3558  { echo "$as_me:$LINENO: result: $RANLIB" >&5
3559echo "${ECHO_T}$RANLIB" >&6; }
3560else
3561  { echo "$as_me:$LINENO: result: no" >&5
3562echo "${ECHO_T}no" >&6; }
3563fi
3564
3565
3566fi
3567if test -z "$ac_cv_prog_RANLIB"; then
3568  ac_ct_RANLIB=$RANLIB
3569  # Extract the first word of "ranlib", so it can be a program name with args.
3570set dummy ranlib; ac_word=$2
3571{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3572echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3573if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3574  echo $ECHO_N "(cached) $ECHO_C" >&6
3575else
3576  if test -n "$ac_ct_RANLIB"; then
3577  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3578else
3579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3580for as_dir in $PATH
3581do
3582  IFS=$as_save_IFS
3583  test -z "$as_dir" && as_dir=.
3584  for ac_exec_ext in '' $ac_executable_extensions; do
3585  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3586    ac_cv_prog_ac_ct_RANLIB="ranlib"
3587    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3588    break 2
3589  fi
3590done
3591done
3592IFS=$as_save_IFS
3593
3594fi
3595fi
3596ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3597if test -n "$ac_ct_RANLIB"; then
3598  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3599echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
3600else
3601  { echo "$as_me:$LINENO: result: no" >&5
3602echo "${ECHO_T}no" >&6; }
3603fi
3604
3605  if test "x$ac_ct_RANLIB" = x; then
3606    RANLIB=":"
3607  else
3608    case $cross_compiling:$ac_tool_warned in
3609yes:)
3610{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3611whose name does not start with the host triplet.  If you think this
3612configuration is useful to you, please write to autoconf@gnu.org." >&5
3613echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3614whose name does not start with the host triplet.  If you think this
3615configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3616ac_tool_warned=yes ;;
3617esac
3618    RANLIB=$ac_ct_RANLIB
3619  fi
3620else
3621  RANLIB="$ac_cv_prog_RANLIB"
3622fi
3623
3624
3625    #--------------------------------------------------------------------
3626    # Determines the correct binary file extension (.o, .obj, .exe etc.)
3627    #--------------------------------------------------------------------
3628
3629
3630
3631
3632
3633
3634{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3635echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3636if test "${ac_cv_path_GREP+set}" = set; then
3637  echo $ECHO_N "(cached) $ECHO_C" >&6
3638else
3639  # Extract the first word of "grep ggrep" to use in msg output
3640if test -z "$GREP"; then
3641set dummy grep ggrep; ac_prog_name=$2
3642if test "${ac_cv_path_GREP+set}" = set; then
3643  echo $ECHO_N "(cached) $ECHO_C" >&6
3644else
3645  ac_path_GREP_found=false
3646# Loop through the user's path and test for each of PROGNAME-LIST
3647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3648for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3649do
3650  IFS=$as_save_IFS
3651  test -z "$as_dir" && as_dir=.
3652  for ac_prog in grep ggrep; do
3653  for ac_exec_ext in '' $ac_executable_extensions; do
3654    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3655    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3656    # Check for GNU ac_path_GREP and select it if it is found.
3657  # Check for GNU $ac_path_GREP
3658case `"$ac_path_GREP" --version 2>&1` in
3659*GNU*)
3660  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3661*)
3662  ac_count=0
3663  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3664  while :
3665  do
3666    cat "conftest.in" "conftest.in" >"conftest.tmp"
3667    mv "conftest.tmp" "conftest.in"
3668    cp "conftest.in" "conftest.nl"
3669    echo 'GREP' >> "conftest.nl"
3670    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3671    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3672    ac_count=`expr $ac_count + 1`
3673    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3674      # Best one so far, save it but keep looking for a better one
3675      ac_cv_path_GREP="$ac_path_GREP"
3676      ac_path_GREP_max=$ac_count
3677    fi
3678    # 10*(2^10) chars as input seems more than enough
3679    test $ac_count -gt 10 && break
3680  done
3681  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3682esac
3683
3684
3685    $ac_path_GREP_found && break 3
3686  done
3687done
3688
3689done
3690IFS=$as_save_IFS
3691
3692
3693fi
3694
3695GREP="$ac_cv_path_GREP"
3696if test -z "$GREP"; then
3697  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3698echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3699   { (exit 1); exit 1; }; }
3700fi
3701
3702else
3703  ac_cv_path_GREP=$GREP
3704fi
3705
3706
3707fi
3708{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3709echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3710 GREP="$ac_cv_path_GREP"
3711
3712
3713{ echo "$as_me:$LINENO: checking for egrep" >&5
3714echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3715if test "${ac_cv_path_EGREP+set}" = set; then
3716  echo $ECHO_N "(cached) $ECHO_C" >&6
3717else
3718  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3719   then ac_cv_path_EGREP="$GREP -E"
3720   else
3721     # Extract the first word of "egrep" to use in msg output
3722if test -z "$EGREP"; then
3723set dummy egrep; ac_prog_name=$2
3724if test "${ac_cv_path_EGREP+set}" = set; then
3725  echo $ECHO_N "(cached) $ECHO_C" >&6
3726else
3727  ac_path_EGREP_found=false
3728# Loop through the user's path and test for each of PROGNAME-LIST
3729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3730for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3731do
3732  IFS=$as_save_IFS
3733  test -z "$as_dir" && as_dir=.
3734  for ac_prog in egrep; do
3735  for ac_exec_ext in '' $ac_executable_extensions; do
3736    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3737    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3738    # Check for GNU ac_path_EGREP and select it if it is found.
3739  # Check for GNU $ac_path_EGREP
3740case `"$ac_path_EGREP" --version 2>&1` in
3741*GNU*)
3742  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3743*)
3744  ac_count=0
3745  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3746  while :
3747  do
3748    cat "conftest.in" "conftest.in" >"conftest.tmp"
3749    mv "conftest.tmp" "conftest.in"
3750    cp "conftest.in" "conftest.nl"
3751    echo 'EGREP' >> "conftest.nl"
3752    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3753    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3754    ac_count=`expr $ac_count + 1`
3755    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3756      # Best one so far, save it but keep looking for a better one
3757      ac_cv_path_EGREP="$ac_path_EGREP"
3758      ac_path_EGREP_max=$ac_count
3759    fi
3760    # 10*(2^10) chars as input seems more than enough
3761    test $ac_count -gt 10 && break
3762  done
3763  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3764esac
3765
3766
3767    $ac_path_EGREP_found && break 3
3768  done
3769done
3770
3771done
3772IFS=$as_save_IFS
3773
3774
3775fi
3776
3777EGREP="$ac_cv_path_EGREP"
3778if test -z "$EGREP"; then
3779  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3780echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3781   { (exit 1); exit 1; }; }
3782fi
3783
3784else
3785  ac_cv_path_EGREP=$EGREP
3786fi
3787
3788
3789   fi
3790fi
3791{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3792echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3793 EGREP="$ac_cv_path_EGREP"
3794
3795
3796{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3797echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
3798if test "${ac_cv_header_stdc+set}" = set; then
3799  echo $ECHO_N "(cached) $ECHO_C" >&6
3800else
3801  cat >conftest.$ac_ext <<_ACEOF
3802/* confdefs.h.  */
3803_ACEOF
3804cat confdefs.h >>conftest.$ac_ext
3805cat >>conftest.$ac_ext <<_ACEOF
3806/* end confdefs.h.  */
3807#include <stdlib.h>
3808#include <stdarg.h>
3809#include <string.h>
3810#include <float.h>
3811
3812int
3813main ()
3814{
3815
3816  ;
3817  return 0;
3818}
3819_ACEOF
3820rm -f conftest.$ac_objext
3821if { (ac_try="$ac_compile"
3822case "(($ac_try" in
3823  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3824  *) ac_try_echo=$ac_try;;
3825esac
3826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3827  (eval "$ac_compile") 2>conftest.er1
3828  ac_status=$?
3829  grep -v '^ *+' conftest.er1 >conftest.err
3830  rm -f conftest.er1
3831  cat conftest.err >&5
3832  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3833  (exit $ac_status); } && {
3834	 test -z "$ac_c_werror_flag" ||
3835	 test ! -s conftest.err
3836       } && test -s conftest.$ac_objext; then
3837  ac_cv_header_stdc=yes
3838else
3839  echo "$as_me: failed program was:" >&5
3840sed 's/^/| /' conftest.$ac_ext >&5
3841
3842	ac_cv_header_stdc=no
3843fi
3844
3845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3846
3847if test $ac_cv_header_stdc = yes; then
3848  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3849  cat >conftest.$ac_ext <<_ACEOF
3850/* confdefs.h.  */
3851_ACEOF
3852cat confdefs.h >>conftest.$ac_ext
3853cat >>conftest.$ac_ext <<_ACEOF
3854/* end confdefs.h.  */
3855#include <string.h>
3856
3857_ACEOF
3858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3859  $EGREP "memchr" >/dev/null 2>&1; then
3860  :
3861else
3862  ac_cv_header_stdc=no
3863fi
3864rm -f -r conftest*
3865
3866fi
3867
3868if test $ac_cv_header_stdc = yes; then
3869  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3870  cat >conftest.$ac_ext <<_ACEOF
3871/* confdefs.h.  */
3872_ACEOF
3873cat confdefs.h >>conftest.$ac_ext
3874cat >>conftest.$ac_ext <<_ACEOF
3875/* end confdefs.h.  */
3876#include <stdlib.h>
3877
3878_ACEOF
3879if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3880  $EGREP "free" >/dev/null 2>&1; then
3881  :
3882else
3883  ac_cv_header_stdc=no
3884fi
3885rm -f -r conftest*
3886
3887fi
3888
3889if test $ac_cv_header_stdc = yes; then
3890  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3891  if test "$cross_compiling" = yes; then
3892  :
3893else
3894  cat >conftest.$ac_ext <<_ACEOF
3895/* confdefs.h.  */
3896_ACEOF
3897cat confdefs.h >>conftest.$ac_ext
3898cat >>conftest.$ac_ext <<_ACEOF
3899/* end confdefs.h.  */
3900#include <ctype.h>
3901#include <stdlib.h>
3902#if ((' ' & 0x0FF) == 0x020)
3903# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3904# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3905#else
3906# define ISLOWER(c) \
3907		   (('a' <= (c) && (c) <= 'i') \
3908		     || ('j' <= (c) && (c) <= 'r') \
3909		     || ('s' <= (c) && (c) <= 'z'))
3910# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3911#endif
3912
3913#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3914int
3915main ()
3916{
3917  int i;
3918  for (i = 0; i < 256; i++)
3919    if (XOR (islower (i), ISLOWER (i))
3920	|| toupper (i) != TOUPPER (i))
3921      return 2;
3922  return 0;
3923}
3924_ACEOF
3925rm -f conftest$ac_exeext
3926if { (ac_try="$ac_link"
3927case "(($ac_try" in
3928  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3929  *) ac_try_echo=$ac_try;;
3930esac
3931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3932  (eval "$ac_link") 2>&5
3933  ac_status=$?
3934  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3935  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3936  { (case "(($ac_try" in
3937  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3938  *) ac_try_echo=$ac_try;;
3939esac
3940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3941  (eval "$ac_try") 2>&5
3942  ac_status=$?
3943  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3944  (exit $ac_status); }; }; then
3945  :
3946else
3947  echo "$as_me: program exited with status $ac_status" >&5
3948echo "$as_me: failed program was:" >&5
3949sed 's/^/| /' conftest.$ac_ext >&5
3950
3951( exit $ac_status )
3952ac_cv_header_stdc=no
3953fi
3954rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3955fi
3956
3957
3958fi
3959fi
3960{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3961echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
3962if test $ac_cv_header_stdc = yes; then
3963
3964cat >>confdefs.h <<\_ACEOF
3965#define STDC_HEADERS 1
3966_ACEOF
3967
3968fi
3969
3970# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3981		  inttypes.h stdint.h unistd.h
3982do
3983as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3984{ echo "$as_me:$LINENO: checking for $ac_header" >&5
3985echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
3986if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
3987  echo $ECHO_N "(cached) $ECHO_C" >&6
3988else
3989  cat >conftest.$ac_ext <<_ACEOF
3990/* confdefs.h.  */
3991_ACEOF
3992cat confdefs.h >>conftest.$ac_ext
3993cat >>conftest.$ac_ext <<_ACEOF
3994/* end confdefs.h.  */
3995$ac_includes_default
3996
3997#include <$ac_header>
3998_ACEOF
3999rm -f conftest.$ac_objext
4000if { (ac_try="$ac_compile"
4001case "(($ac_try" in
4002  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4003  *) ac_try_echo=$ac_try;;
4004esac
4005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4006  (eval "$ac_compile") 2>conftest.er1
4007  ac_status=$?
4008  grep -v '^ *+' conftest.er1 >conftest.err
4009  rm -f conftest.er1
4010  cat conftest.err >&5
4011  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4012  (exit $ac_status); } && {
4013	 test -z "$ac_c_werror_flag" ||
4014	 test ! -s conftest.err
4015       } && test -s conftest.$ac_objext; then
4016  eval "$as_ac_Header=yes"
4017else
4018  echo "$as_me: failed program was:" >&5
4019sed 's/^/| /' conftest.$ac_ext >&5
4020
4021	eval "$as_ac_Header=no"
4022fi
4023
4024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4025fi
4026ac_res=`eval echo '${'$as_ac_Header'}'`
4027	       { echo "$as_me:$LINENO: result: $ac_res" >&5
4028echo "${ECHO_T}$ac_res" >&6; }
4029if test `eval echo '${'$as_ac_Header'}'` = yes; then
4030  cat >>confdefs.h <<_ACEOF
4031#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4032_ACEOF
4033
4034fi
4035
4036done
4037
4038
4039
4040    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4041
4042
4043    #------------------------------------------------------------------------
4044    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4045    # It makes compiling go faster.  (This is only a performance feature.)
4046    #------------------------------------------------------------------------
4047
4048    if test -z "$no_pipe" -a -n "$GCC"; then
4049	{ echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
4050echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; }
4051if test "${tcl_cv_cc_pipe+set}" = set; then
4052  echo $ECHO_N "(cached) $ECHO_C" >&6
4053else
4054
4055	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4056	    cat >conftest.$ac_ext <<_ACEOF
4057/* confdefs.h.  */
4058_ACEOF
4059cat confdefs.h >>conftest.$ac_ext
4060cat >>conftest.$ac_ext <<_ACEOF
4061/* end confdefs.h.  */
4062
4063int
4064main ()
4065{
4066
4067  ;
4068  return 0;
4069}
4070_ACEOF
4071rm -f conftest.$ac_objext
4072if { (ac_try="$ac_compile"
4073case "(($ac_try" in
4074  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4075  *) ac_try_echo=$ac_try;;
4076esac
4077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4078  (eval "$ac_compile") 2>conftest.er1
4079  ac_status=$?
4080  grep -v '^ *+' conftest.er1 >conftest.err
4081  rm -f conftest.er1
4082  cat conftest.err >&5
4083  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4084  (exit $ac_status); } && {
4085	 test -z "$ac_c_werror_flag" ||
4086	 test ! -s conftest.err
4087       } && test -s conftest.$ac_objext; then
4088  tcl_cv_cc_pipe=yes
4089else
4090  echo "$as_me: failed program was:" >&5
4091sed 's/^/| /' conftest.$ac_ext >&5
4092
4093	tcl_cv_cc_pipe=no
4094fi
4095
4096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4097	    CFLAGS=$hold_cflags
4098fi
4099{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
4100echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; }
4101	if test $tcl_cv_cc_pipe = yes; then
4102	    CFLAGS="$CFLAGS -pipe"
4103	fi
4104    fi
4105
4106    #--------------------------------------------------------------------
4107    # Common compiler flag setup
4108    #--------------------------------------------------------------------
4109
4110    { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
4111echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
4112if test "${ac_cv_c_bigendian+set}" = set; then
4113  echo $ECHO_N "(cached) $ECHO_C" >&6
4114else
4115  # See if sys/param.h defines the BYTE_ORDER macro.
4116cat >conftest.$ac_ext <<_ACEOF
4117/* confdefs.h.  */
4118_ACEOF
4119cat confdefs.h >>conftest.$ac_ext
4120cat >>conftest.$ac_ext <<_ACEOF
4121/* end confdefs.h.  */
4122#include <sys/types.h>
4123#include <sys/param.h>
4124
4125int
4126main ()
4127{
4128#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
4129	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
4130 bogus endian macros
4131#endif
4132
4133  ;
4134  return 0;
4135}
4136_ACEOF
4137rm -f conftest.$ac_objext
4138if { (ac_try="$ac_compile"
4139case "(($ac_try" in
4140  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4141  *) ac_try_echo=$ac_try;;
4142esac
4143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4144  (eval "$ac_compile") 2>conftest.er1
4145  ac_status=$?
4146  grep -v '^ *+' conftest.er1 >conftest.err
4147  rm -f conftest.er1
4148  cat conftest.err >&5
4149  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4150  (exit $ac_status); } && {
4151	 test -z "$ac_c_werror_flag" ||
4152	 test ! -s conftest.err
4153       } && test -s conftest.$ac_objext; then
4154  # It does; now see whether it defined to BIG_ENDIAN or not.
4155cat >conftest.$ac_ext <<_ACEOF
4156/* confdefs.h.  */
4157_ACEOF
4158cat confdefs.h >>conftest.$ac_ext
4159cat >>conftest.$ac_ext <<_ACEOF
4160/* end confdefs.h.  */
4161#include <sys/types.h>
4162#include <sys/param.h>
4163
4164int
4165main ()
4166{
4167#if BYTE_ORDER != BIG_ENDIAN
4168 not big endian
4169#endif
4170
4171  ;
4172  return 0;
4173}
4174_ACEOF
4175rm -f conftest.$ac_objext
4176if { (ac_try="$ac_compile"
4177case "(($ac_try" in
4178  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4179  *) ac_try_echo=$ac_try;;
4180esac
4181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4182  (eval "$ac_compile") 2>conftest.er1
4183  ac_status=$?
4184  grep -v '^ *+' conftest.er1 >conftest.err
4185  rm -f conftest.er1
4186  cat conftest.err >&5
4187  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4188  (exit $ac_status); } && {
4189	 test -z "$ac_c_werror_flag" ||
4190	 test ! -s conftest.err
4191       } && test -s conftest.$ac_objext; then
4192  ac_cv_c_bigendian=yes
4193else
4194  echo "$as_me: failed program was:" >&5
4195sed 's/^/| /' conftest.$ac_ext >&5
4196
4197	ac_cv_c_bigendian=no
4198fi
4199
4200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4201else
4202  echo "$as_me: failed program was:" >&5
4203sed 's/^/| /' conftest.$ac_ext >&5
4204
4205	# It does not; compile a test program.
4206if test "$cross_compiling" = yes; then
4207  # try to guess the endianness by grepping values into an object file
4208  ac_cv_c_bigendian=unknown
4209  cat >conftest.$ac_ext <<_ACEOF
4210/* confdefs.h.  */
4211_ACEOF
4212cat confdefs.h >>conftest.$ac_ext
4213cat >>conftest.$ac_ext <<_ACEOF
4214/* end confdefs.h.  */
4215short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4216short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4217void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
4218short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4219short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4220void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
4221int
4222main ()
4223{
4224 _ascii (); _ebcdic ();
4225  ;
4226  return 0;
4227}
4228_ACEOF
4229rm -f conftest.$ac_objext
4230if { (ac_try="$ac_compile"
4231case "(($ac_try" in
4232  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4233  *) ac_try_echo=$ac_try;;
4234esac
4235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4236  (eval "$ac_compile") 2>conftest.er1
4237  ac_status=$?
4238  grep -v '^ *+' conftest.er1 >conftest.err
4239  rm -f conftest.er1
4240  cat conftest.err >&5
4241  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4242  (exit $ac_status); } && {
4243	 test -z "$ac_c_werror_flag" ||
4244	 test ! -s conftest.err
4245       } && test -s conftest.$ac_objext; then
4246  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
4247  ac_cv_c_bigendian=yes
4248fi
4249if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4250  if test "$ac_cv_c_bigendian" = unknown; then
4251    ac_cv_c_bigendian=no
4252  else
4253    # finding both strings is unlikely to happen, but who knows?
4254    ac_cv_c_bigendian=unknown
4255  fi
4256fi
4257else
4258  echo "$as_me: failed program was:" >&5
4259sed 's/^/| /' conftest.$ac_ext >&5
4260
4261
4262fi
4263
4264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4265else
4266  cat >conftest.$ac_ext <<_ACEOF
4267/* confdefs.h.  */
4268_ACEOF
4269cat confdefs.h >>conftest.$ac_ext
4270cat >>conftest.$ac_ext <<_ACEOF
4271/* end confdefs.h.  */
4272$ac_includes_default
4273int
4274main ()
4275{
4276
4277  /* Are we little or big endian?  From Harbison&Steele.  */
4278  union
4279  {
4280    long int l;
4281    char c[sizeof (long int)];
4282  } u;
4283  u.l = 1;
4284  return u.c[sizeof (long int) - 1] == 1;
4285
4286  ;
4287  return 0;
4288}
4289_ACEOF
4290rm -f conftest$ac_exeext
4291if { (ac_try="$ac_link"
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_link") 2>&5
4298  ac_status=$?
4299  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4300  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4301  { (case "(($ac_try" in
4302  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4303  *) ac_try_echo=$ac_try;;
4304esac
4305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4306  (eval "$ac_try") 2>&5
4307  ac_status=$?
4308  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4309  (exit $ac_status); }; }; then
4310  ac_cv_c_bigendian=no
4311else
4312  echo "$as_me: program exited with status $ac_status" >&5
4313echo "$as_me: failed program was:" >&5
4314sed 's/^/| /' conftest.$ac_ext >&5
4315
4316( exit $ac_status )
4317ac_cv_c_bigendian=yes
4318fi
4319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4320fi
4321
4322
4323fi
4324
4325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4326fi
4327{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
4328echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
4329case $ac_cv_c_bigendian in
4330  yes)
4331
4332cat >>confdefs.h <<\_ACEOF
4333#define WORDS_BIGENDIAN 1
4334_ACEOF
4335 ;;
4336  no)
4337     ;;
4338  *)
4339    { { echo "$as_me:$LINENO: error: unknown endianness
4340presetting ac_cv_c_bigendian=no (or yes) will help" >&5
4341echo "$as_me: error: unknown endianness
4342presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
4343   { (exit 1); exit 1; }; } ;;
4344esac
4345
4346    if test "${TEA_PLATFORM}" = "unix" ; then
4347
4348    #--------------------------------------------------------------------
4349    # On a few very rare systems, all of the libm.a stuff is
4350    # already in libc.a.  Set compiler flags accordingly.
4351    # Also, Linux requires the "ieee" library for math to work
4352    # right (and it must appear before "-lm").
4353    #--------------------------------------------------------------------
4354
4355    { echo "$as_me:$LINENO: checking for sin" >&5
4356echo $ECHO_N "checking for sin... $ECHO_C" >&6; }
4357if test "${ac_cv_func_sin+set}" = set; then
4358  echo $ECHO_N "(cached) $ECHO_C" >&6
4359else
4360  cat >conftest.$ac_ext <<_ACEOF
4361/* confdefs.h.  */
4362_ACEOF
4363cat confdefs.h >>conftest.$ac_ext
4364cat >>conftest.$ac_ext <<_ACEOF
4365/* end confdefs.h.  */
4366/* Define sin to an innocuous variant, in case <limits.h> declares sin.
4367   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4368#define sin innocuous_sin
4369
4370/* System header to define __stub macros and hopefully few prototypes,
4371    which can conflict with char sin (); below.
4372    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4373    <limits.h> exists even on freestanding compilers.  */
4374
4375#ifdef __STDC__
4376# include <limits.h>
4377#else
4378# include <assert.h>
4379#endif
4380
4381#undef sin
4382
4383/* Override any GCC internal prototype to avoid an error.
4384   Use char because int might match the return type of a GCC
4385   builtin and then its argument prototype would still apply.  */
4386#ifdef __cplusplus
4387extern "C"
4388#endif
4389char sin ();
4390/* The GNU C library defines this for functions which it implements
4391    to always fail with ENOSYS.  Some functions are actually named
4392    something starting with __ and the normal name is an alias.  */
4393#if defined __stub_sin || defined __stub___sin
4394choke me
4395#endif
4396
4397int
4398main ()
4399{
4400return sin ();
4401  ;
4402  return 0;
4403}
4404_ACEOF
4405rm -f conftest.$ac_objext conftest$ac_exeext
4406if { (ac_try="$ac_link"
4407case "(($ac_try" in
4408  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4409  *) ac_try_echo=$ac_try;;
4410esac
4411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4412  (eval "$ac_link") 2>conftest.er1
4413  ac_status=$?
4414  grep -v '^ *+' conftest.er1 >conftest.err
4415  rm -f conftest.er1
4416  cat conftest.err >&5
4417  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4418  (exit $ac_status); } && {
4419	 test -z "$ac_c_werror_flag" ||
4420	 test ! -s conftest.err
4421       } && test -s conftest$ac_exeext &&
4422       $as_test_x conftest$ac_exeext; then
4423  ac_cv_func_sin=yes
4424else
4425  echo "$as_me: failed program was:" >&5
4426sed 's/^/| /' conftest.$ac_ext >&5
4427
4428	ac_cv_func_sin=no
4429fi
4430
4431rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4432      conftest$ac_exeext conftest.$ac_ext
4433fi
4434{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
4435echo "${ECHO_T}$ac_cv_func_sin" >&6; }
4436if test $ac_cv_func_sin = yes; then
4437  MATH_LIBS=""
4438else
4439  MATH_LIBS="-lm"
4440fi
4441
4442    { echo "$as_me:$LINENO: checking for main in -lieee" >&5
4443echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; }
4444if test "${ac_cv_lib_ieee_main+set}" = set; then
4445  echo $ECHO_N "(cached) $ECHO_C" >&6
4446else
4447  ac_check_lib_save_LIBS=$LIBS
4448LIBS="-lieee  $LIBS"
4449cat >conftest.$ac_ext <<_ACEOF
4450/* confdefs.h.  */
4451_ACEOF
4452cat confdefs.h >>conftest.$ac_ext
4453cat >>conftest.$ac_ext <<_ACEOF
4454/* end confdefs.h.  */
4455
4456
4457int
4458main ()
4459{
4460return main ();
4461  ;
4462  return 0;
4463}
4464_ACEOF
4465rm -f conftest.$ac_objext conftest$ac_exeext
4466if { (ac_try="$ac_link"
4467case "(($ac_try" in
4468  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4469  *) ac_try_echo=$ac_try;;
4470esac
4471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4472  (eval "$ac_link") 2>conftest.er1
4473  ac_status=$?
4474  grep -v '^ *+' conftest.er1 >conftest.err
4475  rm -f conftest.er1
4476  cat conftest.err >&5
4477  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4478  (exit $ac_status); } && {
4479	 test -z "$ac_c_werror_flag" ||
4480	 test ! -s conftest.err
4481       } && test -s conftest$ac_exeext &&
4482       $as_test_x conftest$ac_exeext; then
4483  ac_cv_lib_ieee_main=yes
4484else
4485  echo "$as_me: failed program was:" >&5
4486sed 's/^/| /' conftest.$ac_ext >&5
4487
4488	ac_cv_lib_ieee_main=no
4489fi
4490
4491rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4492      conftest$ac_exeext conftest.$ac_ext
4493LIBS=$ac_check_lib_save_LIBS
4494fi
4495{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
4496echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; }
4497if test $ac_cv_lib_ieee_main = yes; then
4498  MATH_LIBS="-lieee $MATH_LIBS"
4499fi
4500
4501
4502    #--------------------------------------------------------------------
4503    # Interactive UNIX requires -linet instead of -lsocket, plus it
4504    # needs net/errno.h to define the socket-related error codes.
4505    #--------------------------------------------------------------------
4506
4507    { echo "$as_me:$LINENO: checking for main in -linet" >&5
4508echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; }
4509if test "${ac_cv_lib_inet_main+set}" = set; then
4510  echo $ECHO_N "(cached) $ECHO_C" >&6
4511else
4512  ac_check_lib_save_LIBS=$LIBS
4513LIBS="-linet  $LIBS"
4514cat >conftest.$ac_ext <<_ACEOF
4515/* confdefs.h.  */
4516_ACEOF
4517cat confdefs.h >>conftest.$ac_ext
4518cat >>conftest.$ac_ext <<_ACEOF
4519/* end confdefs.h.  */
4520
4521
4522int
4523main ()
4524{
4525return main ();
4526  ;
4527  return 0;
4528}
4529_ACEOF
4530rm -f conftest.$ac_objext conftest$ac_exeext
4531if { (ac_try="$ac_link"
4532case "(($ac_try" in
4533  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4534  *) ac_try_echo=$ac_try;;
4535esac
4536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4537  (eval "$ac_link") 2>conftest.er1
4538  ac_status=$?
4539  grep -v '^ *+' conftest.er1 >conftest.err
4540  rm -f conftest.er1
4541  cat conftest.err >&5
4542  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4543  (exit $ac_status); } && {
4544	 test -z "$ac_c_werror_flag" ||
4545	 test ! -s conftest.err
4546       } && test -s conftest$ac_exeext &&
4547       $as_test_x conftest$ac_exeext; then
4548  ac_cv_lib_inet_main=yes
4549else
4550  echo "$as_me: failed program was:" >&5
4551sed 's/^/| /' conftest.$ac_ext >&5
4552
4553	ac_cv_lib_inet_main=no
4554fi
4555
4556rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4557      conftest$ac_exeext conftest.$ac_ext
4558LIBS=$ac_check_lib_save_LIBS
4559fi
4560{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
4561echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; }
4562if test $ac_cv_lib_inet_main = yes; then
4563  LIBS="$LIBS -linet"
4564fi
4565
4566    if test "${ac_cv_header_net_errno_h+set}" = set; then
4567  { echo "$as_me:$LINENO: checking for net/errno.h" >&5
4568echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4569if test "${ac_cv_header_net_errno_h+set}" = set; then
4570  echo $ECHO_N "(cached) $ECHO_C" >&6
4571fi
4572{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4573echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4574else
4575  # Is the header compilable?
4576{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5
4577echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; }
4578cat >conftest.$ac_ext <<_ACEOF
4579/* confdefs.h.  */
4580_ACEOF
4581cat confdefs.h >>conftest.$ac_ext
4582cat >>conftest.$ac_ext <<_ACEOF
4583/* end confdefs.h.  */
4584$ac_includes_default
4585#include <net/errno.h>
4586_ACEOF
4587rm -f conftest.$ac_objext
4588if { (ac_try="$ac_compile"
4589case "(($ac_try" in
4590  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4591  *) ac_try_echo=$ac_try;;
4592esac
4593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4594  (eval "$ac_compile") 2>conftest.er1
4595  ac_status=$?
4596  grep -v '^ *+' conftest.er1 >conftest.err
4597  rm -f conftest.er1
4598  cat conftest.err >&5
4599  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4600  (exit $ac_status); } && {
4601	 test -z "$ac_c_werror_flag" ||
4602	 test ! -s conftest.err
4603       } && test -s conftest.$ac_objext; then
4604  ac_header_compiler=yes
4605else
4606  echo "$as_me: failed program was:" >&5
4607sed 's/^/| /' conftest.$ac_ext >&5
4608
4609	ac_header_compiler=no
4610fi
4611
4612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4613{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4614echo "${ECHO_T}$ac_header_compiler" >&6; }
4615
4616# Is the header present?
4617{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5
4618echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; }
4619cat >conftest.$ac_ext <<_ACEOF
4620/* confdefs.h.  */
4621_ACEOF
4622cat confdefs.h >>conftest.$ac_ext
4623cat >>conftest.$ac_ext <<_ACEOF
4624/* end confdefs.h.  */
4625#include <net/errno.h>
4626_ACEOF
4627if { (ac_try="$ac_cpp conftest.$ac_ext"
4628case "(($ac_try" in
4629  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4630  *) ac_try_echo=$ac_try;;
4631esac
4632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4633  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4634  ac_status=$?
4635  grep -v '^ *+' conftest.er1 >conftest.err
4636  rm -f conftest.er1
4637  cat conftest.err >&5
4638  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4639  (exit $ac_status); } >/dev/null && {
4640	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4641	 test ! -s conftest.err
4642       }; then
4643  ac_header_preproc=yes
4644else
4645  echo "$as_me: failed program was:" >&5
4646sed 's/^/| /' conftest.$ac_ext >&5
4647
4648  ac_header_preproc=no
4649fi
4650
4651rm -f conftest.err conftest.$ac_ext
4652{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4653echo "${ECHO_T}$ac_header_preproc" >&6; }
4654
4655# So?  What about this header?
4656case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4657  yes:no: )
4658    { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
4659echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4660    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
4661echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
4662    ac_header_preproc=yes
4663    ;;
4664  no:yes:* )
4665    { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
4666echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
4667    { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
4668echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
4669    { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
4670echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
4671    { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
4672echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4673    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
4674echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
4675    { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
4676echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
4677
4678    ;;
4679esac
4680{ echo "$as_me:$LINENO: checking for net/errno.h" >&5
4681echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4682if test "${ac_cv_header_net_errno_h+set}" = set; then
4683  echo $ECHO_N "(cached) $ECHO_C" >&6
4684else
4685  ac_cv_header_net_errno_h=$ac_header_preproc
4686fi
4687{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4688echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4689
4690fi
4691if test $ac_cv_header_net_errno_h = yes; then
4692
4693
4694cat >>confdefs.h <<\_ACEOF
4695#define HAVE_NET_ERRNO_H 1
4696_ACEOF
4697
4698fi
4699
4700
4701
4702    #--------------------------------------------------------------------
4703    #	Check for the existence of the -lsocket and -lnsl libraries.
4704    #	The order here is important, so that they end up in the right
4705    #	order in the command line generated by make.  Here are some
4706    #	special considerations:
4707    #	1. Use "connect" and "accept" to check for -lsocket, and
4708    #	   "gethostbyname" to check for -lnsl.
4709    #	2. Use each function name only once:  can't redo a check because
4710    #	   autoconf caches the results of the last check and won't redo it.
4711    #	3. Use -lnsl and -lsocket only if they supply procedures that
4712    #	   aren't already present in the normal libraries.  This is because
4713    #	   IRIX 5.2 has libraries, but they aren't needed and they're
4714    #	   bogus:  they goof up name resolution if used.
4715    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4716    #	   To get around this problem, check for both libraries together
4717    #	   if -lsocket doesn't work by itself.
4718    #--------------------------------------------------------------------
4719
4720    tcl_checkBoth=0
4721    { echo "$as_me:$LINENO: checking for connect" >&5
4722echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
4723if test "${ac_cv_func_connect+set}" = set; then
4724  echo $ECHO_N "(cached) $ECHO_C" >&6
4725else
4726  cat >conftest.$ac_ext <<_ACEOF
4727/* confdefs.h.  */
4728_ACEOF
4729cat confdefs.h >>conftest.$ac_ext
4730cat >>conftest.$ac_ext <<_ACEOF
4731/* end confdefs.h.  */
4732/* Define connect to an innocuous variant, in case <limits.h> declares connect.
4733   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4734#define connect innocuous_connect
4735
4736/* System header to define __stub macros and hopefully few prototypes,
4737    which can conflict with char connect (); below.
4738    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4739    <limits.h> exists even on freestanding compilers.  */
4740
4741#ifdef __STDC__
4742# include <limits.h>
4743#else
4744# include <assert.h>
4745#endif
4746
4747#undef connect
4748
4749/* Override any GCC internal prototype to avoid an error.
4750   Use char because int might match the return type of a GCC
4751   builtin and then its argument prototype would still apply.  */
4752#ifdef __cplusplus
4753extern "C"
4754#endif
4755char connect ();
4756/* The GNU C library defines this for functions which it implements
4757    to always fail with ENOSYS.  Some functions are actually named
4758    something starting with __ and the normal name is an alias.  */
4759#if defined __stub_connect || defined __stub___connect
4760choke me
4761#endif
4762
4763int
4764main ()
4765{
4766return connect ();
4767  ;
4768  return 0;
4769}
4770_ACEOF
4771rm -f conftest.$ac_objext conftest$ac_exeext
4772if { (ac_try="$ac_link"
4773case "(($ac_try" in
4774  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4775  *) ac_try_echo=$ac_try;;
4776esac
4777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4778  (eval "$ac_link") 2>conftest.er1
4779  ac_status=$?
4780  grep -v '^ *+' conftest.er1 >conftest.err
4781  rm -f conftest.er1
4782  cat conftest.err >&5
4783  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4784  (exit $ac_status); } && {
4785	 test -z "$ac_c_werror_flag" ||
4786	 test ! -s conftest.err
4787       } && test -s conftest$ac_exeext &&
4788       $as_test_x conftest$ac_exeext; then
4789  ac_cv_func_connect=yes
4790else
4791  echo "$as_me: failed program was:" >&5
4792sed 's/^/| /' conftest.$ac_ext >&5
4793
4794	ac_cv_func_connect=no
4795fi
4796
4797rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4798      conftest$ac_exeext conftest.$ac_ext
4799fi
4800{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
4801echo "${ECHO_T}$ac_cv_func_connect" >&6; }
4802if test $ac_cv_func_connect = yes; then
4803  tcl_checkSocket=0
4804else
4805  tcl_checkSocket=1
4806fi
4807
4808    if test "$tcl_checkSocket" = 1; then
4809	{ echo "$as_me:$LINENO: checking for setsockopt" >&5
4810echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; }
4811if test "${ac_cv_func_setsockopt+set}" = set; then
4812  echo $ECHO_N "(cached) $ECHO_C" >&6
4813else
4814  cat >conftest.$ac_ext <<_ACEOF
4815/* confdefs.h.  */
4816_ACEOF
4817cat confdefs.h >>conftest.$ac_ext
4818cat >>conftest.$ac_ext <<_ACEOF
4819/* end confdefs.h.  */
4820/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
4821   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4822#define setsockopt innocuous_setsockopt
4823
4824/* System header to define __stub macros and hopefully few prototypes,
4825    which can conflict with char setsockopt (); below.
4826    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4827    <limits.h> exists even on freestanding compilers.  */
4828
4829#ifdef __STDC__
4830# include <limits.h>
4831#else
4832# include <assert.h>
4833#endif
4834
4835#undef setsockopt
4836
4837/* Override any GCC internal prototype to avoid an error.
4838   Use char because int might match the return type of a GCC
4839   builtin and then its argument prototype would still apply.  */
4840#ifdef __cplusplus
4841extern "C"
4842#endif
4843char setsockopt ();
4844/* The GNU C library defines this for functions which it implements
4845    to always fail with ENOSYS.  Some functions are actually named
4846    something starting with __ and the normal name is an alias.  */
4847#if defined __stub_setsockopt || defined __stub___setsockopt
4848choke me
4849#endif
4850
4851int
4852main ()
4853{
4854return setsockopt ();
4855  ;
4856  return 0;
4857}
4858_ACEOF
4859rm -f conftest.$ac_objext conftest$ac_exeext
4860if { (ac_try="$ac_link"
4861case "(($ac_try" in
4862  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4863  *) ac_try_echo=$ac_try;;
4864esac
4865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4866  (eval "$ac_link") 2>conftest.er1
4867  ac_status=$?
4868  grep -v '^ *+' conftest.er1 >conftest.err
4869  rm -f conftest.er1
4870  cat conftest.err >&5
4871  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4872  (exit $ac_status); } && {
4873	 test -z "$ac_c_werror_flag" ||
4874	 test ! -s conftest.err
4875       } && test -s conftest$ac_exeext &&
4876       $as_test_x conftest$ac_exeext; then
4877  ac_cv_func_setsockopt=yes
4878else
4879  echo "$as_me: failed program was:" >&5
4880sed 's/^/| /' conftest.$ac_ext >&5
4881
4882	ac_cv_func_setsockopt=no
4883fi
4884
4885rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4886      conftest$ac_exeext conftest.$ac_ext
4887fi
4888{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
4889echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
4890if test $ac_cv_func_setsockopt = yes; then
4891  :
4892else
4893  { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
4894echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
4895if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
4896  echo $ECHO_N "(cached) $ECHO_C" >&6
4897else
4898  ac_check_lib_save_LIBS=$LIBS
4899LIBS="-lsocket  $LIBS"
4900cat >conftest.$ac_ext <<_ACEOF
4901/* confdefs.h.  */
4902_ACEOF
4903cat confdefs.h >>conftest.$ac_ext
4904cat >>conftest.$ac_ext <<_ACEOF
4905/* end confdefs.h.  */
4906
4907/* Override any GCC internal prototype to avoid an error.
4908   Use char because int might match the return type of a GCC
4909   builtin and then its argument prototype would still apply.  */
4910#ifdef __cplusplus
4911extern "C"
4912#endif
4913char setsockopt ();
4914int
4915main ()
4916{
4917return setsockopt ();
4918  ;
4919  return 0;
4920}
4921_ACEOF
4922rm -f conftest.$ac_objext conftest$ac_exeext
4923if { (ac_try="$ac_link"
4924case "(($ac_try" in
4925  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4926  *) ac_try_echo=$ac_try;;
4927esac
4928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4929  (eval "$ac_link") 2>conftest.er1
4930  ac_status=$?
4931  grep -v '^ *+' conftest.er1 >conftest.err
4932  rm -f conftest.er1
4933  cat conftest.err >&5
4934  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4935  (exit $ac_status); } && {
4936	 test -z "$ac_c_werror_flag" ||
4937	 test ! -s conftest.err
4938       } && test -s conftest$ac_exeext &&
4939       $as_test_x conftest$ac_exeext; then
4940  ac_cv_lib_socket_setsockopt=yes
4941else
4942  echo "$as_me: failed program was:" >&5
4943sed 's/^/| /' conftest.$ac_ext >&5
4944
4945	ac_cv_lib_socket_setsockopt=no
4946fi
4947
4948rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4949      conftest$ac_exeext conftest.$ac_ext
4950LIBS=$ac_check_lib_save_LIBS
4951fi
4952{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
4953echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; }
4954if test $ac_cv_lib_socket_setsockopt = yes; then
4955  LIBS="$LIBS -lsocket"
4956else
4957  tcl_checkBoth=1
4958fi
4959
4960fi
4961
4962    fi
4963    if test "$tcl_checkBoth" = 1; then
4964	tk_oldLibs=$LIBS
4965	LIBS="$LIBS -lsocket -lnsl"
4966	{ echo "$as_me:$LINENO: checking for accept" >&5
4967echo $ECHO_N "checking for accept... $ECHO_C" >&6; }
4968if test "${ac_cv_func_accept+set}" = set; then
4969  echo $ECHO_N "(cached) $ECHO_C" >&6
4970else
4971  cat >conftest.$ac_ext <<_ACEOF
4972/* confdefs.h.  */
4973_ACEOF
4974cat confdefs.h >>conftest.$ac_ext
4975cat >>conftest.$ac_ext <<_ACEOF
4976/* end confdefs.h.  */
4977/* Define accept to an innocuous variant, in case <limits.h> declares accept.
4978   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4979#define accept innocuous_accept
4980
4981/* System header to define __stub macros and hopefully few prototypes,
4982    which can conflict with char accept (); below.
4983    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4984    <limits.h> exists even on freestanding compilers.  */
4985
4986#ifdef __STDC__
4987# include <limits.h>
4988#else
4989# include <assert.h>
4990#endif
4991
4992#undef accept
4993
4994/* Override any GCC internal prototype to avoid an error.
4995   Use char because int might match the return type of a GCC
4996   builtin and then its argument prototype would still apply.  */
4997#ifdef __cplusplus
4998extern "C"
4999#endif
5000char accept ();
5001/* The GNU C library defines this for functions which it implements
5002    to always fail with ENOSYS.  Some functions are actually named
5003    something starting with __ and the normal name is an alias.  */
5004#if defined __stub_accept || defined __stub___accept
5005choke me
5006#endif
5007
5008int
5009main ()
5010{
5011return accept ();
5012  ;
5013  return 0;
5014}
5015_ACEOF
5016rm -f conftest.$ac_objext conftest$ac_exeext
5017if { (ac_try="$ac_link"
5018case "(($ac_try" in
5019  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5020  *) ac_try_echo=$ac_try;;
5021esac
5022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5023  (eval "$ac_link") 2>conftest.er1
5024  ac_status=$?
5025  grep -v '^ *+' conftest.er1 >conftest.err
5026  rm -f conftest.er1
5027  cat conftest.err >&5
5028  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5029  (exit $ac_status); } && {
5030	 test -z "$ac_c_werror_flag" ||
5031	 test ! -s conftest.err
5032       } && test -s conftest$ac_exeext &&
5033       $as_test_x conftest$ac_exeext; then
5034  ac_cv_func_accept=yes
5035else
5036  echo "$as_me: failed program was:" >&5
5037sed 's/^/| /' conftest.$ac_ext >&5
5038
5039	ac_cv_func_accept=no
5040fi
5041
5042rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5043      conftest$ac_exeext conftest.$ac_ext
5044fi
5045{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
5046echo "${ECHO_T}$ac_cv_func_accept" >&6; }
5047if test $ac_cv_func_accept = yes; then
5048  tcl_checkNsl=0
5049else
5050  LIBS=$tk_oldLibs
5051fi
5052
5053    fi
5054    { echo "$as_me:$LINENO: checking for gethostbyname" >&5
5055echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
5056if test "${ac_cv_func_gethostbyname+set}" = set; then
5057  echo $ECHO_N "(cached) $ECHO_C" >&6
5058else
5059  cat >conftest.$ac_ext <<_ACEOF
5060/* confdefs.h.  */
5061_ACEOF
5062cat confdefs.h >>conftest.$ac_ext
5063cat >>conftest.$ac_ext <<_ACEOF
5064/* end confdefs.h.  */
5065/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5066   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5067#define gethostbyname innocuous_gethostbyname
5068
5069/* System header to define __stub macros and hopefully few prototypes,
5070    which can conflict with char gethostbyname (); below.
5071    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5072    <limits.h> exists even on freestanding compilers.  */
5073
5074#ifdef __STDC__
5075# include <limits.h>
5076#else
5077# include <assert.h>
5078#endif
5079
5080#undef gethostbyname
5081
5082/* Override any GCC internal prototype to avoid an error.
5083   Use char because int might match the return type of a GCC
5084   builtin and then its argument prototype would still apply.  */
5085#ifdef __cplusplus
5086extern "C"
5087#endif
5088char gethostbyname ();
5089/* The GNU C library defines this for functions which it implements
5090    to always fail with ENOSYS.  Some functions are actually named
5091    something starting with __ and the normal name is an alias.  */
5092#if defined __stub_gethostbyname || defined __stub___gethostbyname
5093choke me
5094#endif
5095
5096int
5097main ()
5098{
5099return gethostbyname ();
5100  ;
5101  return 0;
5102}
5103_ACEOF
5104rm -f conftest.$ac_objext conftest$ac_exeext
5105if { (ac_try="$ac_link"
5106case "(($ac_try" in
5107  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5108  *) ac_try_echo=$ac_try;;
5109esac
5110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5111  (eval "$ac_link") 2>conftest.er1
5112  ac_status=$?
5113  grep -v '^ *+' conftest.er1 >conftest.err
5114  rm -f conftest.er1
5115  cat conftest.err >&5
5116  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5117  (exit $ac_status); } && {
5118	 test -z "$ac_c_werror_flag" ||
5119	 test ! -s conftest.err
5120       } && test -s conftest$ac_exeext &&
5121       $as_test_x conftest$ac_exeext; then
5122  ac_cv_func_gethostbyname=yes
5123else
5124  echo "$as_me: failed program was:" >&5
5125sed 's/^/| /' conftest.$ac_ext >&5
5126
5127	ac_cv_func_gethostbyname=no
5128fi
5129
5130rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5131      conftest$ac_exeext conftest.$ac_ext
5132fi
5133{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5134echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
5135if test $ac_cv_func_gethostbyname = yes; then
5136  :
5137else
5138  { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5139echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
5140if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5141  echo $ECHO_N "(cached) $ECHO_C" >&6
5142else
5143  ac_check_lib_save_LIBS=$LIBS
5144LIBS="-lnsl  $LIBS"
5145cat >conftest.$ac_ext <<_ACEOF
5146/* confdefs.h.  */
5147_ACEOF
5148cat confdefs.h >>conftest.$ac_ext
5149cat >>conftest.$ac_ext <<_ACEOF
5150/* end confdefs.h.  */
5151
5152/* Override any GCC internal prototype to avoid an error.
5153   Use char because int might match the return type of a GCC
5154   builtin and then its argument prototype would still apply.  */
5155#ifdef __cplusplus
5156extern "C"
5157#endif
5158char gethostbyname ();
5159int
5160main ()
5161{
5162return gethostbyname ();
5163  ;
5164  return 0;
5165}
5166_ACEOF
5167rm -f conftest.$ac_objext conftest$ac_exeext
5168if { (ac_try="$ac_link"
5169case "(($ac_try" in
5170  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5171  *) ac_try_echo=$ac_try;;
5172esac
5173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5174  (eval "$ac_link") 2>conftest.er1
5175  ac_status=$?
5176  grep -v '^ *+' conftest.er1 >conftest.err
5177  rm -f conftest.er1
5178  cat conftest.err >&5
5179  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5180  (exit $ac_status); } && {
5181	 test -z "$ac_c_werror_flag" ||
5182	 test ! -s conftest.err
5183       } && test -s conftest$ac_exeext &&
5184       $as_test_x conftest$ac_exeext; then
5185  ac_cv_lib_nsl_gethostbyname=yes
5186else
5187  echo "$as_me: failed program was:" >&5
5188sed 's/^/| /' conftest.$ac_ext >&5
5189
5190	ac_cv_lib_nsl_gethostbyname=no
5191fi
5192
5193rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5194      conftest$ac_exeext conftest.$ac_ext
5195LIBS=$ac_check_lib_save_LIBS
5196fi
5197{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5198echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
5199if test $ac_cv_lib_nsl_gethostbyname = yes; then
5200  LIBS="$LIBS -lnsl"
5201fi
5202
5203fi
5204
5205
5206    # TEA specific: Don't perform the eval of the libraries here because
5207    # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
5208
5209    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
5210
5211
5212
5213
5214    { echo "$as_me:$LINENO: checking dirent.h" >&5
5215echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; }
5216if test "${tcl_cv_dirent_h+set}" = set; then
5217  echo $ECHO_N "(cached) $ECHO_C" >&6
5218else
5219
5220    cat >conftest.$ac_ext <<_ACEOF
5221/* confdefs.h.  */
5222_ACEOF
5223cat confdefs.h >>conftest.$ac_ext
5224cat >>conftest.$ac_ext <<_ACEOF
5225/* end confdefs.h.  */
5226#include <sys/types.h>
5227#include <dirent.h>
5228int
5229main ()
5230{
5231
5232#ifndef _POSIX_SOURCE
5233#   ifdef __Lynx__
5234	/*
5235	 * Generate compilation error to make the test fail:  Lynx headers
5236	 * are only valid if really in the POSIX environment.
5237	 */
5238
5239	missing_procedure();
5240#   endif
5241#endif
5242DIR *d;
5243struct dirent *entryPtr;
5244char *p;
5245d = opendir("foobar");
5246entryPtr = readdir(d);
5247p = entryPtr->d_name;
5248closedir(d);
5249
5250  ;
5251  return 0;
5252}
5253_ACEOF
5254rm -f conftest.$ac_objext conftest$ac_exeext
5255if { (ac_try="$ac_link"
5256case "(($ac_try" in
5257  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5258  *) ac_try_echo=$ac_try;;
5259esac
5260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5261  (eval "$ac_link") 2>conftest.er1
5262  ac_status=$?
5263  grep -v '^ *+' conftest.er1 >conftest.err
5264  rm -f conftest.er1
5265  cat conftest.err >&5
5266  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5267  (exit $ac_status); } && {
5268	 test -z "$ac_c_werror_flag" ||
5269	 test ! -s conftest.err
5270       } && test -s conftest$ac_exeext &&
5271       $as_test_x conftest$ac_exeext; then
5272  tcl_cv_dirent_h=yes
5273else
5274  echo "$as_me: failed program was:" >&5
5275sed 's/^/| /' conftest.$ac_ext >&5
5276
5277	tcl_cv_dirent_h=no
5278fi
5279
5280rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5281      conftest$ac_exeext conftest.$ac_ext
5282fi
5283{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
5284echo "${ECHO_T}$tcl_cv_dirent_h" >&6; }
5285
5286    if test $tcl_cv_dirent_h = no; then
5287
5288cat >>confdefs.h <<\_ACEOF
5289#define NO_DIRENT_H 1
5290_ACEOF
5291
5292    fi
5293
5294    # TEA specific:
5295    if test "${ac_cv_header_errno_h+set}" = set; then
5296  { echo "$as_me:$LINENO: checking for errno.h" >&5
5297echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5298if test "${ac_cv_header_errno_h+set}" = set; then
5299  echo $ECHO_N "(cached) $ECHO_C" >&6
5300fi
5301{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5302echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5303else
5304  # Is the header compilable?
5305{ echo "$as_me:$LINENO: checking errno.h usability" >&5
5306echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6; }
5307cat >conftest.$ac_ext <<_ACEOF
5308/* confdefs.h.  */
5309_ACEOF
5310cat confdefs.h >>conftest.$ac_ext
5311cat >>conftest.$ac_ext <<_ACEOF
5312/* end confdefs.h.  */
5313$ac_includes_default
5314#include <errno.h>
5315_ACEOF
5316rm -f conftest.$ac_objext
5317if { (ac_try="$ac_compile"
5318case "(($ac_try" in
5319  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5320  *) ac_try_echo=$ac_try;;
5321esac
5322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5323  (eval "$ac_compile") 2>conftest.er1
5324  ac_status=$?
5325  grep -v '^ *+' conftest.er1 >conftest.err
5326  rm -f conftest.er1
5327  cat conftest.err >&5
5328  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5329  (exit $ac_status); } && {
5330	 test -z "$ac_c_werror_flag" ||
5331	 test ! -s conftest.err
5332       } && test -s conftest.$ac_objext; then
5333  ac_header_compiler=yes
5334else
5335  echo "$as_me: failed program was:" >&5
5336sed 's/^/| /' conftest.$ac_ext >&5
5337
5338	ac_header_compiler=no
5339fi
5340
5341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5342{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5343echo "${ECHO_T}$ac_header_compiler" >&6; }
5344
5345# Is the header present?
5346{ echo "$as_me:$LINENO: checking errno.h presence" >&5
5347echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6; }
5348cat >conftest.$ac_ext <<_ACEOF
5349/* confdefs.h.  */
5350_ACEOF
5351cat confdefs.h >>conftest.$ac_ext
5352cat >>conftest.$ac_ext <<_ACEOF
5353/* end confdefs.h.  */
5354#include <errno.h>
5355_ACEOF
5356if { (ac_try="$ac_cpp conftest.$ac_ext"
5357case "(($ac_try" in
5358  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5359  *) ac_try_echo=$ac_try;;
5360esac
5361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5362  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5363  ac_status=$?
5364  grep -v '^ *+' conftest.er1 >conftest.err
5365  rm -f conftest.er1
5366  cat conftest.err >&5
5367  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5368  (exit $ac_status); } >/dev/null && {
5369	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5370	 test ! -s conftest.err
5371       }; then
5372  ac_header_preproc=yes
5373else
5374  echo "$as_me: failed program was:" >&5
5375sed 's/^/| /' conftest.$ac_ext >&5
5376
5377  ac_header_preproc=no
5378fi
5379
5380rm -f conftest.err conftest.$ac_ext
5381{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5382echo "${ECHO_T}$ac_header_preproc" >&6; }
5383
5384# So?  What about this header?
5385case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5386  yes:no: )
5387    { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5388echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5389    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
5390echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
5391    ac_header_preproc=yes
5392    ;;
5393  no:yes:* )
5394    { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
5395echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
5396    { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
5397echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
5398    { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
5399echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
5400    { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5401echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5402    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
5403echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
5404    { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
5405echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
5406
5407    ;;
5408esac
5409{ echo "$as_me:$LINENO: checking for errno.h" >&5
5410echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5411if test "${ac_cv_header_errno_h+set}" = set; then
5412  echo $ECHO_N "(cached) $ECHO_C" >&6
5413else
5414  ac_cv_header_errno_h=$ac_header_preproc
5415fi
5416{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5417echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5418
5419fi
5420if test $ac_cv_header_errno_h = yes; then
5421  :
5422else
5423
5424cat >>confdefs.h <<\_ACEOF
5425#define NO_ERRNO_H 1
5426_ACEOF
5427
5428fi
5429
5430
5431    if test "${ac_cv_header_float_h+set}" = set; then
5432  { echo "$as_me:$LINENO: checking for float.h" >&5
5433echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5434if test "${ac_cv_header_float_h+set}" = set; then
5435  echo $ECHO_N "(cached) $ECHO_C" >&6
5436fi
5437{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5438echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5439else
5440  # Is the header compilable?
5441{ echo "$as_me:$LINENO: checking float.h usability" >&5
5442echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; }
5443cat >conftest.$ac_ext <<_ACEOF
5444/* confdefs.h.  */
5445_ACEOF
5446cat confdefs.h >>conftest.$ac_ext
5447cat >>conftest.$ac_ext <<_ACEOF
5448/* end confdefs.h.  */
5449$ac_includes_default
5450#include <float.h>
5451_ACEOF
5452rm -f conftest.$ac_objext
5453if { (ac_try="$ac_compile"
5454case "(($ac_try" in
5455  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5456  *) ac_try_echo=$ac_try;;
5457esac
5458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5459  (eval "$ac_compile") 2>conftest.er1
5460  ac_status=$?
5461  grep -v '^ *+' conftest.er1 >conftest.err
5462  rm -f conftest.er1
5463  cat conftest.err >&5
5464  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5465  (exit $ac_status); } && {
5466	 test -z "$ac_c_werror_flag" ||
5467	 test ! -s conftest.err
5468       } && test -s conftest.$ac_objext; then
5469  ac_header_compiler=yes
5470else
5471  echo "$as_me: failed program was:" >&5
5472sed 's/^/| /' conftest.$ac_ext >&5
5473
5474	ac_header_compiler=no
5475fi
5476
5477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5478{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5479echo "${ECHO_T}$ac_header_compiler" >&6; }
5480
5481# Is the header present?
5482{ echo "$as_me:$LINENO: checking float.h presence" >&5
5483echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; }
5484cat >conftest.$ac_ext <<_ACEOF
5485/* confdefs.h.  */
5486_ACEOF
5487cat confdefs.h >>conftest.$ac_ext
5488cat >>conftest.$ac_ext <<_ACEOF
5489/* end confdefs.h.  */
5490#include <float.h>
5491_ACEOF
5492if { (ac_try="$ac_cpp conftest.$ac_ext"
5493case "(($ac_try" in
5494  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5495  *) ac_try_echo=$ac_try;;
5496esac
5497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5498  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5499  ac_status=$?
5500  grep -v '^ *+' conftest.er1 >conftest.err
5501  rm -f conftest.er1
5502  cat conftest.err >&5
5503  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5504  (exit $ac_status); } >/dev/null && {
5505	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5506	 test ! -s conftest.err
5507       }; then
5508  ac_header_preproc=yes
5509else
5510  echo "$as_me: failed program was:" >&5
5511sed 's/^/| /' conftest.$ac_ext >&5
5512
5513  ac_header_preproc=no
5514fi
5515
5516rm -f conftest.err conftest.$ac_ext
5517{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5518echo "${ECHO_T}$ac_header_preproc" >&6; }
5519
5520# So?  What about this header?
5521case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5522  yes:no: )
5523    { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
5524echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5525    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
5526echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
5527    ac_header_preproc=yes
5528    ;;
5529  no:yes:* )
5530    { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
5531echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
5532    { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
5533echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
5534    { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
5535echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
5536    { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
5537echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5538    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
5539echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
5540    { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
5541echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
5542
5543    ;;
5544esac
5545{ echo "$as_me:$LINENO: checking for float.h" >&5
5546echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5547if test "${ac_cv_header_float_h+set}" = set; then
5548  echo $ECHO_N "(cached) $ECHO_C" >&6
5549else
5550  ac_cv_header_float_h=$ac_header_preproc
5551fi
5552{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5553echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5554
5555fi
5556if test $ac_cv_header_float_h = yes; then
5557  :
5558else
5559
5560cat >>confdefs.h <<\_ACEOF
5561#define NO_FLOAT_H 1
5562_ACEOF
5563
5564fi
5565
5566
5567    if test "${ac_cv_header_values_h+set}" = set; then
5568  { echo "$as_me:$LINENO: checking for values.h" >&5
5569echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5570if test "${ac_cv_header_values_h+set}" = set; then
5571  echo $ECHO_N "(cached) $ECHO_C" >&6
5572fi
5573{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5574echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5575else
5576  # Is the header compilable?
5577{ echo "$as_me:$LINENO: checking values.h usability" >&5
5578echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; }
5579cat >conftest.$ac_ext <<_ACEOF
5580/* confdefs.h.  */
5581_ACEOF
5582cat confdefs.h >>conftest.$ac_ext
5583cat >>conftest.$ac_ext <<_ACEOF
5584/* end confdefs.h.  */
5585$ac_includes_default
5586#include <values.h>
5587_ACEOF
5588rm -f conftest.$ac_objext
5589if { (ac_try="$ac_compile"
5590case "(($ac_try" in
5591  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5592  *) ac_try_echo=$ac_try;;
5593esac
5594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5595  (eval "$ac_compile") 2>conftest.er1
5596  ac_status=$?
5597  grep -v '^ *+' conftest.er1 >conftest.err
5598  rm -f conftest.er1
5599  cat conftest.err >&5
5600  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5601  (exit $ac_status); } && {
5602	 test -z "$ac_c_werror_flag" ||
5603	 test ! -s conftest.err
5604       } && test -s conftest.$ac_objext; then
5605  ac_header_compiler=yes
5606else
5607  echo "$as_me: failed program was:" >&5
5608sed 's/^/| /' conftest.$ac_ext >&5
5609
5610	ac_header_compiler=no
5611fi
5612
5613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5614{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5615echo "${ECHO_T}$ac_header_compiler" >&6; }
5616
5617# Is the header present?
5618{ echo "$as_me:$LINENO: checking values.h presence" >&5
5619echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; }
5620cat >conftest.$ac_ext <<_ACEOF
5621/* confdefs.h.  */
5622_ACEOF
5623cat confdefs.h >>conftest.$ac_ext
5624cat >>conftest.$ac_ext <<_ACEOF
5625/* end confdefs.h.  */
5626#include <values.h>
5627_ACEOF
5628if { (ac_try="$ac_cpp conftest.$ac_ext"
5629case "(($ac_try" in
5630  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5631  *) ac_try_echo=$ac_try;;
5632esac
5633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5634  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5635  ac_status=$?
5636  grep -v '^ *+' conftest.er1 >conftest.err
5637  rm -f conftest.er1
5638  cat conftest.err >&5
5639  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5640  (exit $ac_status); } >/dev/null && {
5641	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5642	 test ! -s conftest.err
5643       }; then
5644  ac_header_preproc=yes
5645else
5646  echo "$as_me: failed program was:" >&5
5647sed 's/^/| /' conftest.$ac_ext >&5
5648
5649  ac_header_preproc=no
5650fi
5651
5652rm -f conftest.err conftest.$ac_ext
5653{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5654echo "${ECHO_T}$ac_header_preproc" >&6; }
5655
5656# So?  What about this header?
5657case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5658  yes:no: )
5659    { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
5660echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5661    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
5662echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
5663    ac_header_preproc=yes
5664    ;;
5665  no:yes:* )
5666    { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
5667echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
5668    { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
5669echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
5670    { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
5671echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
5672    { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
5673echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5674    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
5675echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
5676    { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
5677echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
5678
5679    ;;
5680esac
5681{ echo "$as_me:$LINENO: checking for values.h" >&5
5682echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5683if test "${ac_cv_header_values_h+set}" = set; then
5684  echo $ECHO_N "(cached) $ECHO_C" >&6
5685else
5686  ac_cv_header_values_h=$ac_header_preproc
5687fi
5688{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5689echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5690
5691fi
5692if test $ac_cv_header_values_h = yes; then
5693  :
5694else
5695
5696cat >>confdefs.h <<\_ACEOF
5697#define NO_VALUES_H 1
5698_ACEOF
5699
5700fi
5701
5702
5703    if test "${ac_cv_header_limits_h+set}" = set; then
5704  { echo "$as_me:$LINENO: checking for limits.h" >&5
5705echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5706if test "${ac_cv_header_limits_h+set}" = set; then
5707  echo $ECHO_N "(cached) $ECHO_C" >&6
5708fi
5709{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5710echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5711else
5712  # Is the header compilable?
5713{ echo "$as_me:$LINENO: checking limits.h usability" >&5
5714echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; }
5715cat >conftest.$ac_ext <<_ACEOF
5716/* confdefs.h.  */
5717_ACEOF
5718cat confdefs.h >>conftest.$ac_ext
5719cat >>conftest.$ac_ext <<_ACEOF
5720/* end confdefs.h.  */
5721$ac_includes_default
5722#include <limits.h>
5723_ACEOF
5724rm -f conftest.$ac_objext
5725if { (ac_try="$ac_compile"
5726case "(($ac_try" in
5727  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5728  *) ac_try_echo=$ac_try;;
5729esac
5730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5731  (eval "$ac_compile") 2>conftest.er1
5732  ac_status=$?
5733  grep -v '^ *+' conftest.er1 >conftest.err
5734  rm -f conftest.er1
5735  cat conftest.err >&5
5736  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5737  (exit $ac_status); } && {
5738	 test -z "$ac_c_werror_flag" ||
5739	 test ! -s conftest.err
5740       } && test -s conftest.$ac_objext; then
5741  ac_header_compiler=yes
5742else
5743  echo "$as_me: failed program was:" >&5
5744sed 's/^/| /' conftest.$ac_ext >&5
5745
5746	ac_header_compiler=no
5747fi
5748
5749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5750{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5751echo "${ECHO_T}$ac_header_compiler" >&6; }
5752
5753# Is the header present?
5754{ echo "$as_me:$LINENO: checking limits.h presence" >&5
5755echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; }
5756cat >conftest.$ac_ext <<_ACEOF
5757/* confdefs.h.  */
5758_ACEOF
5759cat confdefs.h >>conftest.$ac_ext
5760cat >>conftest.$ac_ext <<_ACEOF
5761/* end confdefs.h.  */
5762#include <limits.h>
5763_ACEOF
5764if { (ac_try="$ac_cpp conftest.$ac_ext"
5765case "(($ac_try" in
5766  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5767  *) ac_try_echo=$ac_try;;
5768esac
5769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5770  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5771  ac_status=$?
5772  grep -v '^ *+' conftest.er1 >conftest.err
5773  rm -f conftest.er1
5774  cat conftest.err >&5
5775  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5776  (exit $ac_status); } >/dev/null && {
5777	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5778	 test ! -s conftest.err
5779       }; then
5780  ac_header_preproc=yes
5781else
5782  echo "$as_me: failed program was:" >&5
5783sed 's/^/| /' conftest.$ac_ext >&5
5784
5785  ac_header_preproc=no
5786fi
5787
5788rm -f conftest.err conftest.$ac_ext
5789{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5790echo "${ECHO_T}$ac_header_preproc" >&6; }
5791
5792# So?  What about this header?
5793case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5794  yes:no: )
5795    { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
5796echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5797    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
5798echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
5799    ac_header_preproc=yes
5800    ;;
5801  no:yes:* )
5802    { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
5803echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
5804    { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
5805echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
5806    { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
5807echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
5808    { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
5809echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5810    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
5811echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
5812    { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
5813echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
5814
5815    ;;
5816esac
5817{ echo "$as_me:$LINENO: checking for limits.h" >&5
5818echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5819if test "${ac_cv_header_limits_h+set}" = set; then
5820  echo $ECHO_N "(cached) $ECHO_C" >&6
5821else
5822  ac_cv_header_limits_h=$ac_header_preproc
5823fi
5824{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5825echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5826
5827fi
5828if test $ac_cv_header_limits_h = yes; then
5829
5830cat >>confdefs.h <<\_ACEOF
5831#define HAVE_LIMITS_H 1
5832_ACEOF
5833
5834else
5835
5836cat >>confdefs.h <<\_ACEOF
5837#define NO_LIMITS_H 1
5838_ACEOF
5839
5840fi
5841
5842
5843    if test "${ac_cv_header_stdlib_h+set}" = set; then
5844  { echo "$as_me:$LINENO: checking for stdlib.h" >&5
5845echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
5846if test "${ac_cv_header_stdlib_h+set}" = set; then
5847  echo $ECHO_N "(cached) $ECHO_C" >&6
5848fi
5849{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
5850echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
5851else
5852  # Is the header compilable?
5853{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5
5854echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; }
5855cat >conftest.$ac_ext <<_ACEOF
5856/* confdefs.h.  */
5857_ACEOF
5858cat confdefs.h >>conftest.$ac_ext
5859cat >>conftest.$ac_ext <<_ACEOF
5860/* end confdefs.h.  */
5861$ac_includes_default
5862#include <stdlib.h>
5863_ACEOF
5864rm -f conftest.$ac_objext
5865if { (ac_try="$ac_compile"
5866case "(($ac_try" in
5867  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5868  *) ac_try_echo=$ac_try;;
5869esac
5870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5871  (eval "$ac_compile") 2>conftest.er1
5872  ac_status=$?
5873  grep -v '^ *+' conftest.er1 >conftest.err
5874  rm -f conftest.er1
5875  cat conftest.err >&5
5876  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5877  (exit $ac_status); } && {
5878	 test -z "$ac_c_werror_flag" ||
5879	 test ! -s conftest.err
5880       } && test -s conftest.$ac_objext; then
5881  ac_header_compiler=yes
5882else
5883  echo "$as_me: failed program was:" >&5
5884sed 's/^/| /' conftest.$ac_ext >&5
5885
5886	ac_header_compiler=no
5887fi
5888
5889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5890{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5891echo "${ECHO_T}$ac_header_compiler" >&6; }
5892
5893# Is the header present?
5894{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5
5895echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; }
5896cat >conftest.$ac_ext <<_ACEOF
5897/* confdefs.h.  */
5898_ACEOF
5899cat confdefs.h >>conftest.$ac_ext
5900cat >>conftest.$ac_ext <<_ACEOF
5901/* end confdefs.h.  */
5902#include <stdlib.h>
5903_ACEOF
5904if { (ac_try="$ac_cpp conftest.$ac_ext"
5905case "(($ac_try" in
5906  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5907  *) ac_try_echo=$ac_try;;
5908esac
5909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5910  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5911  ac_status=$?
5912  grep -v '^ *+' conftest.er1 >conftest.err
5913  rm -f conftest.er1
5914  cat conftest.err >&5
5915  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5916  (exit $ac_status); } >/dev/null && {
5917	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5918	 test ! -s conftest.err
5919       }; then
5920  ac_header_preproc=yes
5921else
5922  echo "$as_me: failed program was:" >&5
5923sed 's/^/| /' conftest.$ac_ext >&5
5924
5925  ac_header_preproc=no
5926fi
5927
5928rm -f conftest.err conftest.$ac_ext
5929{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5930echo "${ECHO_T}$ac_header_preproc" >&6; }
5931
5932# So?  What about this header?
5933case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5934  yes:no: )
5935    { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
5936echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5937    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
5938echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
5939    ac_header_preproc=yes
5940    ;;
5941  no:yes:* )
5942    { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
5943echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
5944    { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
5945echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
5946    { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
5947echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
5948    { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
5949echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5950    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
5951echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
5952    { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
5953echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
5954
5955    ;;
5956esac
5957{ echo "$as_me:$LINENO: checking for stdlib.h" >&5
5958echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
5959if test "${ac_cv_header_stdlib_h+set}" = set; then
5960  echo $ECHO_N "(cached) $ECHO_C" >&6
5961else
5962  ac_cv_header_stdlib_h=$ac_header_preproc
5963fi
5964{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
5965echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
5966
5967fi
5968if test $ac_cv_header_stdlib_h = yes; then
5969  tcl_ok=1
5970else
5971  tcl_ok=0
5972fi
5973
5974
5975    cat >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 <stdlib.h>
5982
5983_ACEOF
5984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5985  $EGREP "strtol" >/dev/null 2>&1; then
5986  :
5987else
5988  tcl_ok=0
5989fi
5990rm -f -r conftest*
5991
5992    cat >conftest.$ac_ext <<_ACEOF
5993/* confdefs.h.  */
5994_ACEOF
5995cat confdefs.h >>conftest.$ac_ext
5996cat >>conftest.$ac_ext <<_ACEOF
5997/* end confdefs.h.  */
5998#include <stdlib.h>
5999
6000_ACEOF
6001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6002  $EGREP "strtoul" >/dev/null 2>&1; then
6003  :
6004else
6005  tcl_ok=0
6006fi
6007rm -f -r conftest*
6008
6009    cat >conftest.$ac_ext <<_ACEOF
6010/* confdefs.h.  */
6011_ACEOF
6012cat confdefs.h >>conftest.$ac_ext
6013cat >>conftest.$ac_ext <<_ACEOF
6014/* end confdefs.h.  */
6015#include <stdlib.h>
6016
6017_ACEOF
6018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6019  $EGREP "strtod" >/dev/null 2>&1; then
6020  :
6021else
6022  tcl_ok=0
6023fi
6024rm -f -r conftest*
6025
6026    if test $tcl_ok = 0; then
6027
6028cat >>confdefs.h <<\_ACEOF
6029#define NO_STDLIB_H 1
6030_ACEOF
6031
6032    fi
6033    if test "${ac_cv_header_string_h+set}" = set; then
6034  { echo "$as_me:$LINENO: checking for string.h" >&5
6035echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6036if test "${ac_cv_header_string_h+set}" = set; then
6037  echo $ECHO_N "(cached) $ECHO_C" >&6
6038fi
6039{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6040echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6041else
6042  # Is the header compilable?
6043{ echo "$as_me:$LINENO: checking string.h usability" >&5
6044echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; }
6045cat >conftest.$ac_ext <<_ACEOF
6046/* confdefs.h.  */
6047_ACEOF
6048cat confdefs.h >>conftest.$ac_ext
6049cat >>conftest.$ac_ext <<_ACEOF
6050/* end confdefs.h.  */
6051$ac_includes_default
6052#include <string.h>
6053_ACEOF
6054rm -f conftest.$ac_objext
6055if { (ac_try="$ac_compile"
6056case "(($ac_try" in
6057  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6058  *) ac_try_echo=$ac_try;;
6059esac
6060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6061  (eval "$ac_compile") 2>conftest.er1
6062  ac_status=$?
6063  grep -v '^ *+' conftest.er1 >conftest.err
6064  rm -f conftest.er1
6065  cat conftest.err >&5
6066  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6067  (exit $ac_status); } && {
6068	 test -z "$ac_c_werror_flag" ||
6069	 test ! -s conftest.err
6070       } && test -s conftest.$ac_objext; then
6071  ac_header_compiler=yes
6072else
6073  echo "$as_me: failed program was:" >&5
6074sed 's/^/| /' conftest.$ac_ext >&5
6075
6076	ac_header_compiler=no
6077fi
6078
6079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6080{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6081echo "${ECHO_T}$ac_header_compiler" >&6; }
6082
6083# Is the header present?
6084{ echo "$as_me:$LINENO: checking string.h presence" >&5
6085echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; }
6086cat >conftest.$ac_ext <<_ACEOF
6087/* confdefs.h.  */
6088_ACEOF
6089cat confdefs.h >>conftest.$ac_ext
6090cat >>conftest.$ac_ext <<_ACEOF
6091/* end confdefs.h.  */
6092#include <string.h>
6093_ACEOF
6094if { (ac_try="$ac_cpp conftest.$ac_ext"
6095case "(($ac_try" in
6096  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6097  *) ac_try_echo=$ac_try;;
6098esac
6099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6100  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6101  ac_status=$?
6102  grep -v '^ *+' conftest.er1 >conftest.err
6103  rm -f conftest.er1
6104  cat conftest.err >&5
6105  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6106  (exit $ac_status); } >/dev/null && {
6107	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6108	 test ! -s conftest.err
6109       }; then
6110  ac_header_preproc=yes
6111else
6112  echo "$as_me: failed program was:" >&5
6113sed 's/^/| /' conftest.$ac_ext >&5
6114
6115  ac_header_preproc=no
6116fi
6117
6118rm -f conftest.err conftest.$ac_ext
6119{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6120echo "${ECHO_T}$ac_header_preproc" >&6; }
6121
6122# So?  What about this header?
6123case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6124  yes:no: )
6125    { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
6126echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6127    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
6128echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
6129    ac_header_preproc=yes
6130    ;;
6131  no:yes:* )
6132    { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
6133echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
6134    { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
6135echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
6136    { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
6137echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
6138    { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
6139echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6140    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
6141echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
6142    { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
6143echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
6144
6145    ;;
6146esac
6147{ echo "$as_me:$LINENO: checking for string.h" >&5
6148echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6149if test "${ac_cv_header_string_h+set}" = set; then
6150  echo $ECHO_N "(cached) $ECHO_C" >&6
6151else
6152  ac_cv_header_string_h=$ac_header_preproc
6153fi
6154{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6155echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6156
6157fi
6158if test $ac_cv_header_string_h = yes; then
6159  tcl_ok=1
6160else
6161  tcl_ok=0
6162fi
6163
6164
6165    cat >conftest.$ac_ext <<_ACEOF
6166/* confdefs.h.  */
6167_ACEOF
6168cat confdefs.h >>conftest.$ac_ext
6169cat >>conftest.$ac_ext <<_ACEOF
6170/* end confdefs.h.  */
6171#include <string.h>
6172
6173_ACEOF
6174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6175  $EGREP "strstr" >/dev/null 2>&1; then
6176  :
6177else
6178  tcl_ok=0
6179fi
6180rm -f -r conftest*
6181
6182    cat >conftest.$ac_ext <<_ACEOF
6183/* confdefs.h.  */
6184_ACEOF
6185cat confdefs.h >>conftest.$ac_ext
6186cat >>conftest.$ac_ext <<_ACEOF
6187/* end confdefs.h.  */
6188#include <string.h>
6189
6190_ACEOF
6191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6192  $EGREP "strerror" >/dev/null 2>&1; then
6193  :
6194else
6195  tcl_ok=0
6196fi
6197rm -f -r conftest*
6198
6199
6200    # See also memmove check below for a place where NO_STRING_H can be
6201    # set and why.
6202
6203    if test $tcl_ok = 0; then
6204
6205cat >>confdefs.h <<\_ACEOF
6206#define NO_STRING_H 1
6207_ACEOF
6208
6209    fi
6210
6211    if test "${ac_cv_header_sys_wait_h+set}" = set; then
6212  { echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6213echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6214if test "${ac_cv_header_sys_wait_h+set}" = set; then
6215  echo $ECHO_N "(cached) $ECHO_C" >&6
6216fi
6217{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6218echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6219else
6220  # Is the header compilable?
6221{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
6222echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; }
6223cat >conftest.$ac_ext <<_ACEOF
6224/* confdefs.h.  */
6225_ACEOF
6226cat confdefs.h >>conftest.$ac_ext
6227cat >>conftest.$ac_ext <<_ACEOF
6228/* end confdefs.h.  */
6229$ac_includes_default
6230#include <sys/wait.h>
6231_ACEOF
6232rm -f conftest.$ac_objext
6233if { (ac_try="$ac_compile"
6234case "(($ac_try" in
6235  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6236  *) ac_try_echo=$ac_try;;
6237esac
6238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6239  (eval "$ac_compile") 2>conftest.er1
6240  ac_status=$?
6241  grep -v '^ *+' conftest.er1 >conftest.err
6242  rm -f conftest.er1
6243  cat conftest.err >&5
6244  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6245  (exit $ac_status); } && {
6246	 test -z "$ac_c_werror_flag" ||
6247	 test ! -s conftest.err
6248       } && test -s conftest.$ac_objext; then
6249  ac_header_compiler=yes
6250else
6251  echo "$as_me: failed program was:" >&5
6252sed 's/^/| /' conftest.$ac_ext >&5
6253
6254	ac_header_compiler=no
6255fi
6256
6257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6258{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6259echo "${ECHO_T}$ac_header_compiler" >&6; }
6260
6261# Is the header present?
6262{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
6263echo $ECHO_N "checking sys/wait.h presence... $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#include <sys/wait.h>
6271_ACEOF
6272if { (ac_try="$ac_cpp conftest.$ac_ext"
6273case "(($ac_try" in
6274  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6275  *) ac_try_echo=$ac_try;;
6276esac
6277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6278  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6279  ac_status=$?
6280  grep -v '^ *+' conftest.er1 >conftest.err
6281  rm -f conftest.er1
6282  cat conftest.err >&5
6283  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6284  (exit $ac_status); } >/dev/null && {
6285	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6286	 test ! -s conftest.err
6287       }; then
6288  ac_header_preproc=yes
6289else
6290  echo "$as_me: failed program was:" >&5
6291sed 's/^/| /' conftest.$ac_ext >&5
6292
6293  ac_header_preproc=no
6294fi
6295
6296rm -f conftest.err conftest.$ac_ext
6297{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6298echo "${ECHO_T}$ac_header_preproc" >&6; }
6299
6300# So?  What about this header?
6301case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6302  yes:no: )
6303    { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
6304echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6305    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
6306echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
6307    ac_header_preproc=yes
6308    ;;
6309  no:yes:* )
6310    { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
6311echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
6312    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
6313echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
6314    { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
6315echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
6316    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
6317echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6318    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
6319echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
6320    { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
6321echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
6322
6323    ;;
6324esac
6325{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6326echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6327if test "${ac_cv_header_sys_wait_h+set}" = set; then
6328  echo $ECHO_N "(cached) $ECHO_C" >&6
6329else
6330  ac_cv_header_sys_wait_h=$ac_header_preproc
6331fi
6332{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6333echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6334
6335fi
6336if test $ac_cv_header_sys_wait_h = yes; then
6337  :
6338else
6339
6340cat >>confdefs.h <<\_ACEOF
6341#define NO_SYS_WAIT_H 1
6342_ACEOF
6343
6344fi
6345
6346
6347    if test "${ac_cv_header_dlfcn_h+set}" = set; then
6348  { echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6349echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6350if test "${ac_cv_header_dlfcn_h+set}" = set; then
6351  echo $ECHO_N "(cached) $ECHO_C" >&6
6352fi
6353{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6354echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6355else
6356  # Is the header compilable?
6357{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
6358echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; }
6359cat >conftest.$ac_ext <<_ACEOF
6360/* confdefs.h.  */
6361_ACEOF
6362cat confdefs.h >>conftest.$ac_ext
6363cat >>conftest.$ac_ext <<_ACEOF
6364/* end confdefs.h.  */
6365$ac_includes_default
6366#include <dlfcn.h>
6367_ACEOF
6368rm -f conftest.$ac_objext
6369if { (ac_try="$ac_compile"
6370case "(($ac_try" in
6371  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6372  *) ac_try_echo=$ac_try;;
6373esac
6374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6375  (eval "$ac_compile") 2>conftest.er1
6376  ac_status=$?
6377  grep -v '^ *+' conftest.er1 >conftest.err
6378  rm -f conftest.er1
6379  cat conftest.err >&5
6380  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6381  (exit $ac_status); } && {
6382	 test -z "$ac_c_werror_flag" ||
6383	 test ! -s conftest.err
6384       } && test -s conftest.$ac_objext; then
6385  ac_header_compiler=yes
6386else
6387  echo "$as_me: failed program was:" >&5
6388sed 's/^/| /' conftest.$ac_ext >&5
6389
6390	ac_header_compiler=no
6391fi
6392
6393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6394{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6395echo "${ECHO_T}$ac_header_compiler" >&6; }
6396
6397# Is the header present?
6398{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
6399echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; }
6400cat >conftest.$ac_ext <<_ACEOF
6401/* confdefs.h.  */
6402_ACEOF
6403cat confdefs.h >>conftest.$ac_ext
6404cat >>conftest.$ac_ext <<_ACEOF
6405/* end confdefs.h.  */
6406#include <dlfcn.h>
6407_ACEOF
6408if { (ac_try="$ac_cpp conftest.$ac_ext"
6409case "(($ac_try" in
6410  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6411  *) ac_try_echo=$ac_try;;
6412esac
6413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6414  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6415  ac_status=$?
6416  grep -v '^ *+' conftest.er1 >conftest.err
6417  rm -f conftest.er1
6418  cat conftest.err >&5
6419  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6420  (exit $ac_status); } >/dev/null && {
6421	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6422	 test ! -s conftest.err
6423       }; then
6424  ac_header_preproc=yes
6425else
6426  echo "$as_me: failed program was:" >&5
6427sed 's/^/| /' conftest.$ac_ext >&5
6428
6429  ac_header_preproc=no
6430fi
6431
6432rm -f conftest.err conftest.$ac_ext
6433{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6434echo "${ECHO_T}$ac_header_preproc" >&6; }
6435
6436# So?  What about this header?
6437case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6438  yes:no: )
6439    { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
6440echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6441    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
6442echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
6443    ac_header_preproc=yes
6444    ;;
6445  no:yes:* )
6446    { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
6447echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
6448    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
6449echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
6450    { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
6451echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
6452    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
6453echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6454    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
6455echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
6456    { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
6457echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
6458
6459    ;;
6460esac
6461{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6462echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6463if test "${ac_cv_header_dlfcn_h+set}" = set; then
6464  echo $ECHO_N "(cached) $ECHO_C" >&6
6465else
6466  ac_cv_header_dlfcn_h=$ac_header_preproc
6467fi
6468{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6469echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6470
6471fi
6472if test $ac_cv_header_dlfcn_h = yes; then
6473  :
6474else
6475
6476cat >>confdefs.h <<\_ACEOF
6477#define NO_DLFCN_H 1
6478_ACEOF
6479
6480fi
6481
6482
6483
6484    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
6485
6486for ac_header in sys/param.h
6487do
6488as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6489if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6490  { echo "$as_me:$LINENO: checking for $ac_header" >&5
6491echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6492if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6493  echo $ECHO_N "(cached) $ECHO_C" >&6
6494fi
6495ac_res=`eval echo '${'$as_ac_Header'}'`
6496	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6497echo "${ECHO_T}$ac_res" >&6; }
6498else
6499  # Is the header compilable?
6500{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6501echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6502cat >conftest.$ac_ext <<_ACEOF
6503/* confdefs.h.  */
6504_ACEOF
6505cat confdefs.h >>conftest.$ac_ext
6506cat >>conftest.$ac_ext <<_ACEOF
6507/* end confdefs.h.  */
6508$ac_includes_default
6509#include <$ac_header>
6510_ACEOF
6511rm -f conftest.$ac_objext
6512if { (ac_try="$ac_compile"
6513case "(($ac_try" in
6514  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6515  *) ac_try_echo=$ac_try;;
6516esac
6517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6518  (eval "$ac_compile") 2>conftest.er1
6519  ac_status=$?
6520  grep -v '^ *+' conftest.er1 >conftest.err
6521  rm -f conftest.er1
6522  cat conftest.err >&5
6523  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6524  (exit $ac_status); } && {
6525	 test -z "$ac_c_werror_flag" ||
6526	 test ! -s conftest.err
6527       } && test -s conftest.$ac_objext; then
6528  ac_header_compiler=yes
6529else
6530  echo "$as_me: failed program was:" >&5
6531sed 's/^/| /' conftest.$ac_ext >&5
6532
6533	ac_header_compiler=no
6534fi
6535
6536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6537{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6538echo "${ECHO_T}$ac_header_compiler" >&6; }
6539
6540# Is the header present?
6541{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6542echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6543cat >conftest.$ac_ext <<_ACEOF
6544/* confdefs.h.  */
6545_ACEOF
6546cat confdefs.h >>conftest.$ac_ext
6547cat >>conftest.$ac_ext <<_ACEOF
6548/* end confdefs.h.  */
6549#include <$ac_header>
6550_ACEOF
6551if { (ac_try="$ac_cpp conftest.$ac_ext"
6552case "(($ac_try" in
6553  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6554  *) ac_try_echo=$ac_try;;
6555esac
6556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6557  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6558  ac_status=$?
6559  grep -v '^ *+' conftest.er1 >conftest.err
6560  rm -f conftest.er1
6561  cat conftest.err >&5
6562  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6563  (exit $ac_status); } >/dev/null && {
6564	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6565	 test ! -s conftest.err
6566       }; then
6567  ac_header_preproc=yes
6568else
6569  echo "$as_me: failed program was:" >&5
6570sed 's/^/| /' conftest.$ac_ext >&5
6571
6572  ac_header_preproc=no
6573fi
6574
6575rm -f conftest.err conftest.$ac_ext
6576{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6577echo "${ECHO_T}$ac_header_preproc" >&6; }
6578
6579# So?  What about this header?
6580case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6581  yes:no: )
6582    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6583echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6584    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6585echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6586    ac_header_preproc=yes
6587    ;;
6588  no:yes:* )
6589    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6590echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6591    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6592echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6593    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6594echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6595    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6596echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6597    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6598echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6599    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6600echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6601
6602    ;;
6603esac
6604{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6605echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6606if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6607  echo $ECHO_N "(cached) $ECHO_C" >&6
6608else
6609  eval "$as_ac_Header=\$ac_header_preproc"
6610fi
6611ac_res=`eval echo '${'$as_ac_Header'}'`
6612	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6613echo "${ECHO_T}$ac_res" >&6; }
6614
6615fi
6616if test `eval echo '${'$as_ac_Header'}'` = yes; then
6617  cat >>confdefs.h <<_ACEOF
6618#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6619_ACEOF
6620
6621fi
6622
6623done
6624
6625
6626	# Let the user call this, because if it triggers, they will
6627	# need a compat/strtod.c that is correct.  Users can also
6628	# use Tcl_GetDouble(FromObj) instead.
6629	#TEA_BUGGY_STRTOD
6630    fi
6631
6632
6633#-----------------------------------------------------------------------
6634# __CHANGE__
6635# Specify the C source files to compile in TEA_ADD_SOURCES,
6636# public headers that need to be installed in TEA_ADD_HEADERS,
6637# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
6638# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
6639# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
6640# and PKG_TCL_SOURCES.
6641#-----------------------------------------------------------------------
6642if test ! "${with_gdbm}" = no; then
6643        GDBM_INC_DIR="`echo $with_gdbm |cut -f1 -d,`"
6644        GDBM_LIB_DIR="`echo $with_gdbm |cut -f2 -d, -s`"
6645fi
6646if test -z "$GDBM_INC_DIR" ; then
6647        gdbm_h_ok=1
6648        GDBM_INC_SPEC=""
6649else
6650        GDBM_INC_SPEC="-I${GDBM_INC_DIR}"
6651        echo "Checking ${GDBM_INC_DIR}/gdbm.h"
6652        if test -f "${GDBM_INC_DIR}/gdbm.h" ; then
6653                gdbm_h_ok=1
6654        else
6655                gdbm_h_ok=0
6656        fi
6657fi
6658
6659if test "${gdbm_h_ok}" == "0" ; then
6660      { { echo "$as_me:$LINENO: error:
6661        Could not locate gdbm.h on your machine to build XOTclGdbm.
6662        You can download a precompiled lib 'libgdbm'
6663        and the header file 'gdbm.h' from http://www.gnu.org/software/gdbm/
6664        and compile again. Alternatively, you can compile XOTcl without gdbm.
6665        " >&5
6666echo "$as_me: error:
6667        Could not locate gdbm.h on your machine to build XOTclGdbm.
6668        You can download a precompiled lib 'libgdbm'
6669        and the header file 'gdbm.h' from http://www.gnu.org/software/gdbm/
6670        and compile again. Alternatively, you can compile XOTcl without gdbm.
6671        " >&2;}
6672   { (exit 1); exit 1; }; }
6673fi
6674
6675if test -z "${GDBM_LIB_DIR}" ; then
6676        GDBM_LIB_SPEC=""
6677else
6678        GDBM_LIB_SPEC="-L${GDBM_LIB_DIR}"
6679fi
6680
6681#echo "Gdbm include spec = '${GDBM_INC_SPEC}'"
6682#echo "Gdbm lib spec = '${GDBM_LIB_SPEC}'"
6683
6684#--------------------------------------------------------------------
6685# Load the xotclConfig.sh file
6686#--------------------------------------------------------------------
6687
6688{ echo "$as_me:$LINENO: Reading file ${with_xotcl}/xotclConfig.sh" >&5
6689echo "$as_me: Reading file ${with_xotcl}/xotclConfig.sh" >&6;}
6690source ${with_xotcl}/xotclConfig.sh
6691
6692
6693    vars="xotclgdbm.c"
6694    for i in $vars; do
6695	case $i in
6696	    \$*)
6697		# allow $-var names
6698		PKG_SOURCES="$PKG_SOURCES $i"
6699		PKG_OBJECTS="$PKG_OBJECTS $i"
6700		;;
6701	    *)
6702		# check for existence - allows for generic/win/unix VPATH
6703		# To add more dirs here (like 'src'), you have to update VPATH
6704		# in Makefile.in as well
6705		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6706		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6707		    -a ! -f "${srcdir}/macosx/$i" \
6708		    ; then
6709		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
6710echo "$as_me: error: could not find source file '$i'" >&2;}
6711   { (exit 1); exit 1; }; }
6712		fi
6713		PKG_SOURCES="$PKG_SOURCES $i"
6714		# this assumes it is in a VPATH dir
6715		i=`basename $i`
6716		# handle user calling this before or after TEA_SETUP_COMPILER
6717		if test x"${OBJEXT}" != x ; then
6718		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6719		else
6720		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6721		fi
6722		PKG_OBJECTS="$PKG_OBJECTS $j"
6723		;;
6724	esac
6725    done
6726
6727
6728
6729
6730    vars=""
6731    for i in $vars; do
6732	# check for existence, be strict because it is installed
6733	if test ! -f "${srcdir}/$i" ; then
6734	    { { echo "$as_me:$LINENO: error: could not find header file '${srcdir}/$i'" >&5
6735echo "$as_me: error: could not find header file '${srcdir}/$i'" >&2;}
6736   { (exit 1); exit 1; }; }
6737	fi
6738	PKG_HEADERS="$PKG_HEADERS $i"
6739    done
6740
6741
6742
6743    vars="-I${with_xotcl}/generic ${XOTCL_BUILD_INCLUDE_SPEC} ${GDBM_INC_SPEC}"
6744    for i in $vars; do
6745	PKG_INCLUDES="$PKG_INCLUDES $i"
6746    done
6747
6748
6749
6750    vars="$XOTCL_BUILD_STUB_LIB_SPEC $XOTCL_BUILD_LIB_SPEC $GDBM_LIB_SPEC -lgdbm"
6751    for i in $vars; do
6752	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6753	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6754	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
6755	fi
6756	PKG_LIBS="$PKG_LIBS $i"
6757    done
6758
6759
6760
6761    PKG_CFLAGS="$PKG_CFLAGS "
6762
6763
6764
6765    vars=""
6766    for i in $vars; do
6767	# check for existence - allows for generic/win/unix VPATH
6768	if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6769	    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6770	    -a ! -f "${srcdir}/macosx/$i" \
6771	    ; then
6772	    { { echo "$as_me:$LINENO: error: could not find stub source file '$i'" >&5
6773echo "$as_me: error: could not find stub source file '$i'" >&2;}
6774   { (exit 1); exit 1; }; }
6775	fi
6776	PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
6777	# this assumes it is in a VPATH dir
6778	i=`basename $i`
6779	# handle user calling this before or after TEA_SETUP_COMPILER
6780	if test x"${OBJEXT}" != x ; then
6781	    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6782	else
6783	    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6784	fi
6785	PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
6786    done
6787
6788
6789
6790
6791    vars=""
6792    for i in $vars; do
6793	# check for existence, be strict because it is installed
6794	if test ! -f "${srcdir}/$i" ; then
6795	    { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
6796echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
6797   { (exit 1); exit 1; }; }
6798	fi
6799	PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
6800    done
6801
6802
6803
6804#--------------------------------------------------------------------
6805# __CHANGE__
6806# A few miscellaneous platform-specific items:
6807#
6808# Define a special symbol for Windows (BUILD_sample in this case) so
6809# that we create the export library with the dll.
6810#
6811# Windows creates a few extra files that need to be cleaned up.
6812# You can add more files to clean if your extension creates any extra
6813# files.
6814#
6815# TEA_ADD_* any platform specific compiler/build info here.
6816#--------------------------------------------------------------------
6817
6818if test "${TEA_PLATFORM}" = "windows" ; then
6819    cat >>confdefs.h <<\_ACEOF
6820#define BUILD_sample 1
6821_ACEOF
6822
6823    CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
6824    #TEA_ADD_SOURCES([win/winFile.c])
6825    #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
6826else
6827    CLEANFILES="pkgIndex.tcl"
6828    #TEA_ADD_SOURCES([unix/unixFile.c])
6829    #TEA_ADD_LIBS([-lsuperfly])
6830fi
6831
6832
6833#--------------------------------------------------------------------
6834# __CHANGE__
6835# Choose which headers you need.  Extension authors should try very
6836# hard to only rely on the Tcl public header files.  Internal headers
6837# contain private data structures and are subject to change without
6838# notice.
6839# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
6840#--------------------------------------------------------------------
6841
6842
6843    { echo "$as_me:$LINENO: checking for Tcl public headers" >&5
6844echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6; }
6845
6846
6847# Check whether --with-tclinclude was given.
6848if test "${with_tclinclude+set}" = set; then
6849  withval=$with_tclinclude; with_tclinclude=${withval}
6850fi
6851
6852
6853    if test "${ac_cv_c_tclh+set}" = set; then
6854  echo $ECHO_N "(cached) $ECHO_C" >&6
6855else
6856
6857	# Use the value from --with-tclinclude, if it was given
6858
6859	if test x"${with_tclinclude}" != x ; then
6860	    if test -f "${with_tclinclude}/tcl.h" ; then
6861		ac_cv_c_tclh=${with_tclinclude}
6862	    else
6863		{ { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
6864echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
6865   { (exit 1); exit 1; }; }
6866	    fi
6867	else
6868	    list=""
6869	    if test "`uname -s`" = "Darwin"; then
6870		# If Tcl was built as a framework, attempt to use
6871		# the framework's Headers directory
6872		case ${TCL_DEFS} in
6873		    *TCL_FRAMEWORK*)
6874			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
6875			;;
6876		esac
6877	    fi
6878
6879	    # Look in the source dir only if Tcl is not installed,
6880	    # and in that situation, look there before installed locations.
6881	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
6882		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
6883	    fi
6884
6885	    # Check order: pkg --prefix location, Tcl's --prefix location,
6886	    # relative to directory of tclConfig.sh.
6887
6888	    eval "temp_includedir=${includedir}"
6889	    list="$list \
6890		`ls -d ${temp_includedir}        2>/dev/null` \
6891		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
6892		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
6893	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
6894		list="$list /usr/local/include /usr/include"
6895		if test x"${TCL_INCLUDE_SPEC}" != x ; then
6896		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
6897		    list="$list `ls -d ${d} 2>/dev/null`"
6898		fi
6899	    fi
6900	    for i in $list ; do
6901		if test -f "$i/tcl.h" ; then
6902		    ac_cv_c_tclh=$i
6903		    break
6904		fi
6905	    done
6906	fi
6907
6908fi
6909
6910
6911    # Print a message based on how we determined the include path
6912
6913    if test x"${ac_cv_c_tclh}" = x ; then
6914	{ { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
6915echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
6916   { (exit 1); exit 1; }; }
6917    else
6918	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
6919echo "${ECHO_T}${ac_cv_c_tclh}" >&6; }
6920    fi
6921
6922    # Convert to a native path and substitute into the output files.
6923
6924    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
6925
6926    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
6927
6928
6929
6930#TEA_PRIVATE_TCL_HEADERS
6931
6932#TEA_PUBLIC_TK_HEADERS
6933#TEA_PRIVATE_TK_HEADERS
6934#TEA_PATH_X
6935
6936#--------------------------------------------------------------------
6937# Check whether --enable-threads or --disable-threads was given.
6938#--------------------------------------------------------------------
6939
6940
6941    # Check whether --enable-threads was given.
6942if test "${enable_threads+set}" = set; then
6943  enableval=$enable_threads; tcl_ok=$enableval
6944else
6945  tcl_ok=yes
6946fi
6947
6948
6949    if test "${enable_threads+set}" = set; then
6950	enableval="$enable_threads"
6951	tcl_ok=$enableval
6952    else
6953	tcl_ok=yes
6954    fi
6955
6956    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
6957	TCL_THREADS=1
6958
6959	if test "${TEA_PLATFORM}" != "windows" ; then
6960	    # We are always OK on Windows, so check what this platform wants:
6961
6962	    # USE_THREAD_ALLOC tells us to try the special thread-based
6963	    # allocator that significantly reduces lock contention
6964
6965cat >>confdefs.h <<\_ACEOF
6966#define USE_THREAD_ALLOC 1
6967_ACEOF
6968
6969
6970cat >>confdefs.h <<\_ACEOF
6971#define _REENTRANT 1
6972_ACEOF
6973
6974	    if test "`uname -s`" = "SunOS" ; then
6975
6976cat >>confdefs.h <<\_ACEOF
6977#define _POSIX_PTHREAD_SEMANTICS 1
6978_ACEOF
6979
6980	    fi
6981
6982cat >>confdefs.h <<\_ACEOF
6983#define _THREAD_SAFE 1
6984_ACEOF
6985
6986	    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
6987echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
6988if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
6989  echo $ECHO_N "(cached) $ECHO_C" >&6
6990else
6991  ac_check_lib_save_LIBS=$LIBS
6992LIBS="-lpthread  $LIBS"
6993cat >conftest.$ac_ext <<_ACEOF
6994/* confdefs.h.  */
6995_ACEOF
6996cat confdefs.h >>conftest.$ac_ext
6997cat >>conftest.$ac_ext <<_ACEOF
6998/* end confdefs.h.  */
6999
7000/* Override any GCC internal prototype to avoid an error.
7001   Use char because int might match the return type of a GCC
7002   builtin and then its argument prototype would still apply.  */
7003#ifdef __cplusplus
7004extern "C"
7005#endif
7006char pthread_mutex_init ();
7007int
7008main ()
7009{
7010return pthread_mutex_init ();
7011  ;
7012  return 0;
7013}
7014_ACEOF
7015rm -f conftest.$ac_objext conftest$ac_exeext
7016if { (ac_try="$ac_link"
7017case "(($ac_try" in
7018  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7019  *) ac_try_echo=$ac_try;;
7020esac
7021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7022  (eval "$ac_link") 2>conftest.er1
7023  ac_status=$?
7024  grep -v '^ *+' conftest.er1 >conftest.err
7025  rm -f conftest.er1
7026  cat conftest.err >&5
7027  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7028  (exit $ac_status); } && {
7029	 test -z "$ac_c_werror_flag" ||
7030	 test ! -s conftest.err
7031       } && test -s conftest$ac_exeext &&
7032       $as_test_x conftest$ac_exeext; then
7033  ac_cv_lib_pthread_pthread_mutex_init=yes
7034else
7035  echo "$as_me: failed program was:" >&5
7036sed 's/^/| /' conftest.$ac_ext >&5
7037
7038	ac_cv_lib_pthread_pthread_mutex_init=no
7039fi
7040
7041rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7042      conftest$ac_exeext conftest.$ac_ext
7043LIBS=$ac_check_lib_save_LIBS
7044fi
7045{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
7046echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
7047if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
7048  tcl_ok=yes
7049else
7050  tcl_ok=no
7051fi
7052
7053	    if test "$tcl_ok" = "no"; then
7054		# Check a little harder for __pthread_mutex_init in the same
7055		# library, as some systems hide it there until pthread.h is
7056		# defined.  We could alternatively do an AC_TRY_COMPILE with
7057		# pthread.h, but that will work with libpthread really doesn't
7058		# exist, like AIX 4.2.  [Bug: 4359]
7059		{ echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
7060echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
7061if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
7062  echo $ECHO_N "(cached) $ECHO_C" >&6
7063else
7064  ac_check_lib_save_LIBS=$LIBS
7065LIBS="-lpthread  $LIBS"
7066cat >conftest.$ac_ext <<_ACEOF
7067/* confdefs.h.  */
7068_ACEOF
7069cat confdefs.h >>conftest.$ac_ext
7070cat >>conftest.$ac_ext <<_ACEOF
7071/* end confdefs.h.  */
7072
7073/* Override any GCC internal prototype to avoid an error.
7074   Use char because int might match the return type of a GCC
7075   builtin and then its argument prototype would still apply.  */
7076#ifdef __cplusplus
7077extern "C"
7078#endif
7079char __pthread_mutex_init ();
7080int
7081main ()
7082{
7083return __pthread_mutex_init ();
7084  ;
7085  return 0;
7086}
7087_ACEOF
7088rm -f conftest.$ac_objext conftest$ac_exeext
7089if { (ac_try="$ac_link"
7090case "(($ac_try" in
7091  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7092  *) ac_try_echo=$ac_try;;
7093esac
7094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7095  (eval "$ac_link") 2>conftest.er1
7096  ac_status=$?
7097  grep -v '^ *+' conftest.er1 >conftest.err
7098  rm -f conftest.er1
7099  cat conftest.err >&5
7100  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7101  (exit $ac_status); } && {
7102	 test -z "$ac_c_werror_flag" ||
7103	 test ! -s conftest.err
7104       } && test -s conftest$ac_exeext &&
7105       $as_test_x conftest$ac_exeext; then
7106  ac_cv_lib_pthread___pthread_mutex_init=yes
7107else
7108  echo "$as_me: failed program was:" >&5
7109sed 's/^/| /' conftest.$ac_ext >&5
7110
7111	ac_cv_lib_pthread___pthread_mutex_init=no
7112fi
7113
7114rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7115      conftest$ac_exeext conftest.$ac_ext
7116LIBS=$ac_check_lib_save_LIBS
7117fi
7118{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
7119echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
7120if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
7121  tcl_ok=yes
7122else
7123  tcl_ok=no
7124fi
7125
7126	    fi
7127
7128	    if test "$tcl_ok" = "yes"; then
7129		# The space is needed
7130		THREADS_LIBS=" -lpthread"
7131	    else
7132		{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
7133echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; }
7134if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
7135  echo $ECHO_N "(cached) $ECHO_C" >&6
7136else
7137  ac_check_lib_save_LIBS=$LIBS
7138LIBS="-lpthreads  $LIBS"
7139cat >conftest.$ac_ext <<_ACEOF
7140/* confdefs.h.  */
7141_ACEOF
7142cat confdefs.h >>conftest.$ac_ext
7143cat >>conftest.$ac_ext <<_ACEOF
7144/* end confdefs.h.  */
7145
7146/* Override any GCC internal prototype to avoid an error.
7147   Use char because int might match the return type of a GCC
7148   builtin and then its argument prototype would still apply.  */
7149#ifdef __cplusplus
7150extern "C"
7151#endif
7152char pthread_mutex_init ();
7153int
7154main ()
7155{
7156return pthread_mutex_init ();
7157  ;
7158  return 0;
7159}
7160_ACEOF
7161rm -f conftest.$ac_objext conftest$ac_exeext
7162if { (ac_try="$ac_link"
7163case "(($ac_try" in
7164  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7165  *) ac_try_echo=$ac_try;;
7166esac
7167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7168  (eval "$ac_link") 2>conftest.er1
7169  ac_status=$?
7170  grep -v '^ *+' conftest.er1 >conftest.err
7171  rm -f conftest.er1
7172  cat conftest.err >&5
7173  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7174  (exit $ac_status); } && {
7175	 test -z "$ac_c_werror_flag" ||
7176	 test ! -s conftest.err
7177       } && test -s conftest$ac_exeext &&
7178       $as_test_x conftest$ac_exeext; then
7179  ac_cv_lib_pthreads_pthread_mutex_init=yes
7180else
7181  echo "$as_me: failed program was:" >&5
7182sed 's/^/| /' conftest.$ac_ext >&5
7183
7184	ac_cv_lib_pthreads_pthread_mutex_init=no
7185fi
7186
7187rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7188      conftest$ac_exeext conftest.$ac_ext
7189LIBS=$ac_check_lib_save_LIBS
7190fi
7191{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
7192echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
7193if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
7194  tcl_ok=yes
7195else
7196  tcl_ok=no
7197fi
7198
7199		if test "$tcl_ok" = "yes"; then
7200		    # The space is needed
7201		    THREADS_LIBS=" -lpthreads"
7202		else
7203		    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
7204echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; }
7205if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
7206  echo $ECHO_N "(cached) $ECHO_C" >&6
7207else
7208  ac_check_lib_save_LIBS=$LIBS
7209LIBS="-lc  $LIBS"
7210cat >conftest.$ac_ext <<_ACEOF
7211/* confdefs.h.  */
7212_ACEOF
7213cat confdefs.h >>conftest.$ac_ext
7214cat >>conftest.$ac_ext <<_ACEOF
7215/* end confdefs.h.  */
7216
7217/* Override any GCC internal prototype to avoid an error.
7218   Use char because int might match the return type of a GCC
7219   builtin and then its argument prototype would still apply.  */
7220#ifdef __cplusplus
7221extern "C"
7222#endif
7223char pthread_mutex_init ();
7224int
7225main ()
7226{
7227return pthread_mutex_init ();
7228  ;
7229  return 0;
7230}
7231_ACEOF
7232rm -f conftest.$ac_objext conftest$ac_exeext
7233if { (ac_try="$ac_link"
7234case "(($ac_try" in
7235  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7236  *) ac_try_echo=$ac_try;;
7237esac
7238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7239  (eval "$ac_link") 2>conftest.er1
7240  ac_status=$?
7241  grep -v '^ *+' conftest.er1 >conftest.err
7242  rm -f conftest.er1
7243  cat conftest.err >&5
7244  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7245  (exit $ac_status); } && {
7246	 test -z "$ac_c_werror_flag" ||
7247	 test ! -s conftest.err
7248       } && test -s conftest$ac_exeext &&
7249       $as_test_x conftest$ac_exeext; then
7250  ac_cv_lib_c_pthread_mutex_init=yes
7251else
7252  echo "$as_me: failed program was:" >&5
7253sed 's/^/| /' conftest.$ac_ext >&5
7254
7255	ac_cv_lib_c_pthread_mutex_init=no
7256fi
7257
7258rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7259      conftest$ac_exeext conftest.$ac_ext
7260LIBS=$ac_check_lib_save_LIBS
7261fi
7262{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
7263echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; }
7264if test $ac_cv_lib_c_pthread_mutex_init = yes; then
7265  tcl_ok=yes
7266else
7267  tcl_ok=no
7268fi
7269
7270		    if test "$tcl_ok" = "no"; then
7271			{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
7272echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; }
7273if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
7274  echo $ECHO_N "(cached) $ECHO_C" >&6
7275else
7276  ac_check_lib_save_LIBS=$LIBS
7277LIBS="-lc_r  $LIBS"
7278cat >conftest.$ac_ext <<_ACEOF
7279/* confdefs.h.  */
7280_ACEOF
7281cat confdefs.h >>conftest.$ac_ext
7282cat >>conftest.$ac_ext <<_ACEOF
7283/* end confdefs.h.  */
7284
7285/* Override any GCC internal prototype to avoid an error.
7286   Use char because int might match the return type of a GCC
7287   builtin and then its argument prototype would still apply.  */
7288#ifdef __cplusplus
7289extern "C"
7290#endif
7291char pthread_mutex_init ();
7292int
7293main ()
7294{
7295return pthread_mutex_init ();
7296  ;
7297  return 0;
7298}
7299_ACEOF
7300rm -f conftest.$ac_objext conftest$ac_exeext
7301if { (ac_try="$ac_link"
7302case "(($ac_try" in
7303  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7304  *) ac_try_echo=$ac_try;;
7305esac
7306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7307  (eval "$ac_link") 2>conftest.er1
7308  ac_status=$?
7309  grep -v '^ *+' conftest.er1 >conftest.err
7310  rm -f conftest.er1
7311  cat conftest.err >&5
7312  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7313  (exit $ac_status); } && {
7314	 test -z "$ac_c_werror_flag" ||
7315	 test ! -s conftest.err
7316       } && test -s conftest$ac_exeext &&
7317       $as_test_x conftest$ac_exeext; then
7318  ac_cv_lib_c_r_pthread_mutex_init=yes
7319else
7320  echo "$as_me: failed program was:" >&5
7321sed 's/^/| /' conftest.$ac_ext >&5
7322
7323	ac_cv_lib_c_r_pthread_mutex_init=no
7324fi
7325
7326rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7327      conftest$ac_exeext conftest.$ac_ext
7328LIBS=$ac_check_lib_save_LIBS
7329fi
7330{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
7331echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
7332if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
7333  tcl_ok=yes
7334else
7335  tcl_ok=no
7336fi
7337
7338			if test "$tcl_ok" = "yes"; then
7339			    # The space is needed
7340			    THREADS_LIBS=" -pthread"
7341			else
7342			    TCL_THREADS=0
7343			    { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
7344echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
7345			fi
7346		    fi
7347		fi
7348	    fi
7349	fi
7350    else
7351	TCL_THREADS=0
7352    fi
7353    # Do checking message here to not mess up interleaved configure output
7354    { echo "$as_me:$LINENO: checking for building with threads" >&5
7355echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; }
7356    if test "${TCL_THREADS}" = 1; then
7357
7358cat >>confdefs.h <<\_ACEOF
7359#define TCL_THREADS 1
7360_ACEOF
7361
7362	{ echo "$as_me:$LINENO: result: yes (default)" >&5
7363echo "${ECHO_T}yes (default)" >&6; }
7364    else
7365	{ echo "$as_me:$LINENO: result: no" >&5
7366echo "${ECHO_T}no" >&6; }
7367    fi
7368    # TCL_THREADS sanity checking.  See if our request for building with
7369    # threads is the same as the way Tcl was built.  If not, warn the user.
7370    case ${TCL_DEFS} in
7371	*THREADS=1*)
7372	    if test "${TCL_THREADS}" = "0"; then
7373		{ echo "$as_me:$LINENO: WARNING:
7374    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7375    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
7376echo "$as_me: WARNING:
7377    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7378    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
7379	    fi
7380	    ;;
7381	*)
7382	    if test "${TCL_THREADS}" = "1"; then
7383		{ echo "$as_me:$LINENO: WARNING:
7384    --enable-threads requested, but building against a Tcl that is NOT
7385    thread-enabled.  This is an OK configuration that will also run in
7386    a thread-enabled core." >&5
7387echo "$as_me: WARNING:
7388    --enable-threads requested, but building against a Tcl that is NOT
7389    thread-enabled.  This is an OK configuration that will also run in
7390    a thread-enabled core." >&2;}
7391	    fi
7392	    ;;
7393    esac
7394
7395
7396
7397#--------------------------------------------------------------------
7398# The statement below defines a collection of symbols related to
7399# building as a shared library instead of a static library.
7400#--------------------------------------------------------------------
7401
7402
7403    { echo "$as_me:$LINENO: checking how to build libraries" >&5
7404echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; }
7405    # Check whether --enable-shared was given.
7406if test "${enable_shared+set}" = set; then
7407  enableval=$enable_shared; tcl_ok=$enableval
7408else
7409  tcl_ok=yes
7410fi
7411
7412
7413    if test "${enable_shared+set}" = set; then
7414	enableval="$enable_shared"
7415	tcl_ok=$enableval
7416    else
7417	tcl_ok=yes
7418    fi
7419
7420    if test "$tcl_ok" = "yes" ; then
7421	{ echo "$as_me:$LINENO: result: shared" >&5
7422echo "${ECHO_T}shared" >&6; }
7423	SHARED_BUILD=1
7424    else
7425	{ echo "$as_me:$LINENO: result: static" >&5
7426echo "${ECHO_T}static" >&6; }
7427	SHARED_BUILD=0
7428
7429cat >>confdefs.h <<\_ACEOF
7430#define STATIC_BUILD 1
7431_ACEOF
7432
7433    fi
7434
7435
7436
7437#--------------------------------------------------------------------
7438# This macro figures out what flags to use with the compiler/linker
7439# when building shared/static debug/optimized objects.  This information
7440# can be taken from the tclConfig.sh file, but this figures it all out.
7441#--------------------------------------------------------------------
7442
7443
7444
7445
7446    # Step 0.a: Enable 64 bit support?
7447
7448    { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
7449echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; }
7450    # Check whether --enable-64bit was given.
7451if test "${enable_64bit+set}" = set; then
7452  enableval=$enable_64bit; do64bit=$enableval
7453else
7454  do64bit=no
7455fi
7456
7457    { echo "$as_me:$LINENO: result: $do64bit" >&5
7458echo "${ECHO_T}$do64bit" >&6; }
7459
7460    # Step 0.b: Enable Solaris 64 bit VIS support?
7461
7462    { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
7463echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; }
7464    # Check whether --enable-64bit-vis was given.
7465if test "${enable_64bit_vis+set}" = set; then
7466  enableval=$enable_64bit_vis; do64bitVIS=$enableval
7467else
7468  do64bitVIS=no
7469fi
7470
7471    { echo "$as_me:$LINENO: result: $do64bitVIS" >&5
7472echo "${ECHO_T}$do64bitVIS" >&6; }
7473    # Force 64bit on with VIS
7474    if test "$do64bitVIS" = "yes"; then
7475  do64bit=yes
7476fi
7477
7478
7479    # Step 0.c: Check if visibility support is available. Do this here so
7480    # that platform specific alternatives can be used below if this fails.
7481
7482    { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
7483echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; }
7484if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
7485  echo $ECHO_N "(cached) $ECHO_C" >&6
7486else
7487
7488	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
7489	cat >conftest.$ac_ext <<_ACEOF
7490/* confdefs.h.  */
7491_ACEOF
7492cat confdefs.h >>conftest.$ac_ext
7493cat >>conftest.$ac_ext <<_ACEOF
7494/* end confdefs.h.  */
7495
7496	    extern __attribute__((__visibility__("hidden"))) void f(void);
7497	    void f(void) {}
7498int
7499main ()
7500{
7501f();
7502  ;
7503  return 0;
7504}
7505_ACEOF
7506rm -f conftest.$ac_objext conftest$ac_exeext
7507if { (ac_try="$ac_link"
7508case "(($ac_try" in
7509  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7510  *) ac_try_echo=$ac_try;;
7511esac
7512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7513  (eval "$ac_link") 2>conftest.er1
7514  ac_status=$?
7515  grep -v '^ *+' conftest.er1 >conftest.err
7516  rm -f conftest.er1
7517  cat conftest.err >&5
7518  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7519  (exit $ac_status); } && {
7520	 test -z "$ac_c_werror_flag" ||
7521	 test ! -s conftest.err
7522       } && test -s conftest$ac_exeext &&
7523       $as_test_x conftest$ac_exeext; then
7524  tcl_cv_cc_visibility_hidden=yes
7525else
7526  echo "$as_me: failed program was:" >&5
7527sed 's/^/| /' conftest.$ac_ext >&5
7528
7529	tcl_cv_cc_visibility_hidden=no
7530fi
7531
7532rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7533      conftest$ac_exeext conftest.$ac_ext
7534	CFLAGS=$hold_cflags
7535fi
7536{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
7537echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; }
7538    if test $tcl_cv_cc_visibility_hidden = yes; then
7539
7540
7541cat >>confdefs.h <<\_ACEOF
7542#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
7543_ACEOF
7544
7545
7546fi
7547
7548
7549    # Step 0.d: Disable -rpath support?
7550
7551    { echo "$as_me:$LINENO: checking if rpath support is requested" >&5
7552echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; }
7553    # Check whether --enable-rpath was given.
7554if test "${enable_rpath+set}" = set; then
7555  enableval=$enable_rpath; doRpath=$enableval
7556else
7557  doRpath=yes
7558fi
7559
7560    { echo "$as_me:$LINENO: result: $doRpath" >&5
7561echo "${ECHO_T}$doRpath" >&6; }
7562
7563    # TEA specific: Cross-compiling options for Windows/CE builds?
7564
7565    if test "${TEA_PLATFORM}" = windows; then
7566
7567	{ echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
7568echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6; }
7569	# Check whether --enable-wince was given.
7570if test "${enable_wince+set}" = set; then
7571  enableval=$enable_wince; doWince=$enableval
7572else
7573  doWince=no
7574fi
7575
7576	{ echo "$as_me:$LINENO: result: $doWince" >&5
7577echo "${ECHO_T}$doWince" >&6; }
7578
7579fi
7580
7581
7582    # Set the variable "system" to hold the name and version number
7583    # for the system.
7584
7585
7586    { echo "$as_me:$LINENO: checking system version" >&5
7587echo $ECHO_N "checking system version... $ECHO_C" >&6; }
7588if test "${tcl_cv_sys_version+set}" = set; then
7589  echo $ECHO_N "(cached) $ECHO_C" >&6
7590else
7591
7592	# TEA specific:
7593	if test "${TEA_PLATFORM}" = "windows" ; then
7594	    tcl_cv_sys_version=windows
7595	else
7596	    tcl_cv_sys_version=`uname -s`-`uname -r`
7597	    if test "$?" -ne 0 ; then
7598		{ echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
7599echo "$as_me: WARNING: can't find uname command" >&2;}
7600		tcl_cv_sys_version=unknown
7601	    else
7602		if test "`uname -s`" = "AIX" ; then
7603		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
7604		fi
7605	    fi
7606	fi
7607
7608fi
7609{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
7610echo "${ECHO_T}$tcl_cv_sys_version" >&6; }
7611    system=$tcl_cv_sys_version
7612
7613
7614    # Require ranlib early so we can override it in special cases below.
7615
7616
7617
7618    # Set configuration options based on system name and version.
7619    # This is similar to Tcl's unix/tcl.m4 except that we've added a
7620    # "windows" case and removed some core-only vars.
7621
7622    do64bit_ok=no
7623    # default to '{$LIBS}' and set to "" on per-platform necessary basis
7624    SHLIB_LD_LIBS='${LIBS}'
7625    # When ld needs options to work in 64-bit mode, put them in
7626    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
7627    # is disabled by the user. [Bug 1016796]
7628    LDFLAGS_ARCH=""
7629    UNSHARED_LIB_SUFFIX=""
7630    # TEA specific: use PACKAGE_VERSION instead of VERSION
7631    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
7632    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
7633    TCL_LIB_VERSIONS_OK=ok
7634    CFLAGS_DEBUG=-g
7635    CFLAGS_OPTIMIZE=-O
7636    if test "$GCC" = yes; then
7637
7638	# TEA specific:
7639	CFLAGS_OPTIMIZE=-O2
7640	CFLAGS_WARNING="-Wall"
7641
7642else
7643  CFLAGS_WARNING=""
7644fi
7645
7646    # Extract the first word of "ar", so it can be a program name with args.
7647set dummy ar; ac_word=$2
7648{ echo "$as_me:$LINENO: checking for $ac_word" >&5
7649echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7650if test "${ac_cv_prog_AR+set}" = set; then
7651  echo $ECHO_N "(cached) $ECHO_C" >&6
7652else
7653  if test -n "$AR"; then
7654  ac_cv_prog_AR="$AR" # Let the user override the test.
7655else
7656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7657for as_dir in $PATH
7658do
7659  IFS=$as_save_IFS
7660  test -z "$as_dir" && as_dir=.
7661  for ac_exec_ext in '' $ac_executable_extensions; do
7662  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7663    ac_cv_prog_AR="ar"
7664    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7665    break 2
7666  fi
7667done
7668done
7669IFS=$as_save_IFS
7670
7671fi
7672fi
7673AR=$ac_cv_prog_AR
7674if test -n "$AR"; then
7675  { echo "$as_me:$LINENO: result: $AR" >&5
7676echo "${ECHO_T}$AR" >&6; }
7677else
7678  { echo "$as_me:$LINENO: result: no" >&5
7679echo "${ECHO_T}no" >&6; }
7680fi
7681
7682
7683    STLIB_LD='${AR} cr'
7684    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
7685    if test "x$SHLIB_VERSION" = x; then
7686  SHLIB_VERSION="1.0"
7687fi
7688
7689    case $system in
7690	# TEA specific:
7691	windows)
7692	    # This is a 2-stage check to make sure we have the 64-bit SDK
7693	    # We have to know where the SDK is installed.
7694	    # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
7695	    # MACHINE is IX86 for LINK, but this is used by the manifest,
7696	    # which requires x86|amd64|ia64.
7697	    MACHINE="X86"
7698	    if test "$do64bit" != "no" ; then
7699		if test "x${MSSDK}x" = "xx" ; then
7700		    MSSDK="C:/Progra~1/Microsoft Platform SDK"
7701		fi
7702		MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
7703		PATH64=""
7704		case "$do64bit" in
7705		    amd64|x64|yes)
7706			MACHINE="AMD64" ; # default to AMD64 64-bit build
7707			PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
7708			;;
7709		    ia64)
7710			MACHINE="IA64"
7711			PATH64="${MSSDK}/Bin/Win64"
7712			;;
7713		esac
7714		if test ! -d "${PATH64}" ; then
7715		    { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
7716echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
7717		    { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
7718echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
7719		    do64bit="no"
7720		else
7721		    { echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
7722echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6; }
7723		    do64bit_ok="yes"
7724		fi
7725	    fi
7726
7727	    if test "$doWince" != "no" ; then
7728		if test "$do64bit" != "no" ; then
7729		    { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
7730echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
7731   { (exit 1); exit 1; }; }
7732		fi
7733		if test "$GCC" = "yes" ; then
7734		    { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
7735echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
7736   { (exit 1); exit 1; }; }
7737		fi
7738
7739    # First, look for one uninstalled.
7740    # the alternative search directory is invoked by --with-celib
7741
7742    if test x"${no_celib}" = x ; then
7743	# we reset no_celib in case something fails here
7744	no_celib=true
7745
7746# Check whether --with-celib was given.
7747if test "${with_celib+set}" = set; then
7748  withval=$with_celib; with_celibconfig=${withval}
7749fi
7750
7751	{ echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
7752echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6; }
7753	if test "${ac_cv_c_celibconfig+set}" = set; then
7754  echo $ECHO_N "(cached) $ECHO_C" >&6
7755else
7756
7757	    # First check to see if --with-celibconfig was specified.
7758	    if test x"${with_celibconfig}" != x ; then
7759		if test -d "${with_celibconfig}/inc" ; then
7760		    ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
7761		else
7762		    { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
7763echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
7764   { (exit 1); exit 1; }; }
7765		fi
7766	    fi
7767
7768	    # then check for a celib library
7769	    if test x"${ac_cv_c_celibconfig}" = x ; then
7770		for i in \
7771			../celib-palm-3.0 \
7772			../celib \
7773			../../celib-palm-3.0 \
7774			../../celib \
7775			`ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
7776			${srcdir}/../celib-palm-3.0 \
7777			${srcdir}/../celib \
7778			`ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
7779			; do
7780		    if test -d "$i/inc" ; then
7781			ac_cv_c_celibconfig=`(cd $i; pwd)`
7782			break
7783		    fi
7784		done
7785	    fi
7786
7787fi
7788
7789	if test x"${ac_cv_c_celibconfig}" = x ; then
7790	    { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
7791echo "$as_me: error: Cannot find celib support library directory" >&2;}
7792   { (exit 1); exit 1; }; }
7793	else
7794	    no_celib=
7795	    CELIB_DIR=${ac_cv_c_celibconfig}
7796	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
7797	    { echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
7798echo "${ECHO_T}found $CELIB_DIR" >&6; }
7799	fi
7800    fi
7801
7802		# Set defaults for common evc4/PPC2003 setup
7803		# Currently Tcl requires 300+, possibly 420+ for sockets
7804		CEVERSION=420; 		# could be 211 300 301 400 420 ...
7805		TARGETCPU=ARMV4;	# could be ARMV4 ARM MIPS SH3 X86 ...
7806		ARCH=ARM;		# could be ARM MIPS X86EM ...
7807		PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
7808		if test "$doWince" != "yes"; then
7809		    # If !yes then the user specified something
7810		    # Reset ARCH to allow user to skip specifying it
7811		    ARCH=
7812		    eval `echo $doWince | awk -F, '{ \
7813	    if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
7814	    if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
7815	    if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
7816	    if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
7817	    if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
7818		    }'`
7819		    if test "x${ARCH}" = "x" ; then
7820			ARCH=$TARGETCPU;
7821		    fi
7822		fi
7823		OSVERSION=WCE$CEVERSION;
7824	    	if test "x${WCEROOT}" = "x" ; then
7825			WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
7826		    if test ! -d "${WCEROOT}" ; then
7827			WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
7828		    fi
7829		fi
7830		if test "x${SDKROOT}" = "x" ; then
7831		    SDKROOT="C:/Program Files/Windows CE Tools"
7832		    if test ! -d "${SDKROOT}" ; then
7833			SDKROOT="C:/Windows CE Tools"
7834		    fi
7835		fi
7836		WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
7837		SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
7838		if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
7839		    -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
7840		    { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
7841echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
7842   { (exit 1); exit 1; }; }
7843		    doWince="no"
7844		else
7845		    # We could PATH_NOSPACE these, but that's not important,
7846		    # as long as we quote them when used.
7847		    CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
7848		    if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
7849			CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
7850		    fi
7851		    CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
7852    		fi
7853	    fi
7854
7855	    if test "$GCC" != "yes" ; then
7856	        if test "${SHARED_BUILD}" = "0" ; then
7857		    runtime=-MT
7858	        else
7859		    runtime=-MD
7860	        fi
7861
7862                if test "$do64bit" != "no" ; then
7863		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
7864		    CC="\"${PATH64}/cl.exe\""
7865		    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
7866		    RC="\"${MSSDK}/bin/rc.exe\""
7867		    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
7868		    LINKBIN="\"${PATH64}/link.exe\""
7869		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
7870		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
7871		    # Avoid 'unresolved external symbol __security_cookie'
7872		    # errors, c.f. http://support.microsoft.com/?id=894573
7873
7874    vars="bufferoverflowU.lib"
7875    for i in $vars; do
7876	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7877	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7878	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7879	fi
7880	PKG_LIBS="$PKG_LIBS $i"
7881    done
7882
7883
7884		elif test "$doWince" != "no" ; then
7885		    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
7886		    if test "${TARGETCPU}" = "X86"; then
7887			CC="\"${CEBINROOT}/cl.exe\""
7888		    else
7889			CC="\"${CEBINROOT}/cl${ARCH}.exe\""
7890		    fi
7891		    CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
7892		    RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
7893		    arch=`echo ${ARCH} | awk '{print tolower($0)}'`
7894		    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
7895		    if test "${SHARED_BUILD}" = "1" ; then
7896			# Static CE builds require static celib as well
7897		    	defs="${defs} _DLL"
7898		    fi
7899		    for i in $defs ; do
7900
7901cat >>confdefs.h <<_ACEOF
7902#define $i 1
7903_ACEOF
7904
7905		    done
7906
7907cat >>confdefs.h <<_ACEOF
7908#define _WIN32_WCE $CEVERSION
7909_ACEOF
7910
7911
7912cat >>confdefs.h <<_ACEOF
7913#define UNDER_CE $CEVERSION
7914_ACEOF
7915
7916		    CFLAGS_DEBUG="-nologo -Zi -Od"
7917		    CFLAGS_OPTIMIZE="-nologo -Ox"
7918		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
7919		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
7920		    LINKBIN="\"${CEBINROOT}/link.exe\""
7921
7922		else
7923		    RC="rc"
7924		    lflags="-nologo"
7925    		    LINKBIN="link"
7926		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
7927		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
7928		fi
7929	    fi
7930
7931	    if test "$GCC" = "yes"; then
7932		# mingw gcc mode
7933		RC="windres"
7934		CFLAGS_DEBUG="-g"
7935		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
7936		SHLIB_LD="$CC -shared"
7937		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7938		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
7939		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
7940	    else
7941		SHLIB_LD="${LINKBIN} -dll ${lflags}"
7942		# link -lib only works when -lib is the first arg
7943		STLIB_LD="${LINKBIN} -lib ${lflags}"
7944		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
7945		PATHTYPE=-w
7946		# For information on what debugtype is most useful, see:
7947		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
7948		# and also
7949		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
7950		# This essentially turns it all on.
7951		LDFLAGS_DEBUG="-debug -debugtype:cv"
7952		LDFLAGS_OPTIMIZE="-release"
7953		if test "$doWince" != "no" ; then
7954		    LDFLAGS_CONSOLE="-link ${lflags}"
7955		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
7956		else
7957		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
7958		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
7959		fi
7960	    fi
7961
7962	    SHLIB_SUFFIX=".dll"
7963	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
7964
7965	    TCL_LIB_VERSIONS_OK=nodots
7966    	    ;;
7967	AIX-*)
7968	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
7969
7970		# AIX requires the _r compiler when gcc isn't being used
7971		case "${CC}" in
7972		    *_r|*_r\ *)
7973			# ok ...
7974			;;
7975		    *)
7976			# Make sure only first arg gets _r
7977		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
7978			;;
7979		esac
7980		{ echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
7981echo "${ECHO_T}Using $CC for compiling with threads" >&6; }
7982
7983fi
7984
7985	    LIBS="$LIBS -lc"
7986	    SHLIB_CFLAGS=""
7987	    SHLIB_SUFFIX=".so"
7988
7989	    LD_LIBRARY_PATH_VAR="LIBPATH"
7990
7991	    # Check to enable 64-bit flags for compiler/linker
7992	    if test "$do64bit" = yes; then
7993
7994		if test "$GCC" = yes; then
7995
7996		    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
7997echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7998
7999else
8000
8001		    do64bit_ok=yes
8002		    CFLAGS="$CFLAGS -q64"
8003		    LDFLAGS_ARCH="-q64"
8004		    RANLIB="${RANLIB} -X64"
8005		    AR="${AR} -X64"
8006		    SHLIB_LD_FLAGS="-b64"
8007
8008fi
8009
8010
8011fi
8012
8013
8014	    if test "`uname -m`" = ia64; then
8015
8016		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
8017		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8018		if test "$GCC" = yes; then
8019
8020		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8021
8022else
8023
8024		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
8025
8026fi
8027
8028		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8029
8030else
8031
8032		if test "$GCC" = yes; then
8033
8034		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
8035
8036else
8037
8038		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
8039		    LDFLAGS="$LDFLAGS -brtl"
8040
8041fi
8042
8043		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
8044		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
8045		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8046
8047fi
8048
8049	    ;;
8050	BeOS*)
8051	    SHLIB_CFLAGS="-fPIC"
8052	    SHLIB_LD='${CC} -nostart'
8053	    SHLIB_SUFFIX=".so"
8054
8055	    #-----------------------------------------------------------
8056	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
8057	    # -lsocket, even if the network functions are in -lnet which
8058	    # is always linked to, for compatibility.
8059	    #-----------------------------------------------------------
8060	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
8061echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; }
8062if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
8063  echo $ECHO_N "(cached) $ECHO_C" >&6
8064else
8065  ac_check_lib_save_LIBS=$LIBS
8066LIBS="-lbind  $LIBS"
8067cat >conftest.$ac_ext <<_ACEOF
8068/* confdefs.h.  */
8069_ACEOF
8070cat confdefs.h >>conftest.$ac_ext
8071cat >>conftest.$ac_ext <<_ACEOF
8072/* end confdefs.h.  */
8073
8074/* Override any GCC internal prototype to avoid an error.
8075   Use char because int might match the return type of a GCC
8076   builtin and then its argument prototype would still apply.  */
8077#ifdef __cplusplus
8078extern "C"
8079#endif
8080char inet_ntoa ();
8081int
8082main ()
8083{
8084return inet_ntoa ();
8085  ;
8086  return 0;
8087}
8088_ACEOF
8089rm -f conftest.$ac_objext conftest$ac_exeext
8090if { (ac_try="$ac_link"
8091case "(($ac_try" in
8092  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8093  *) ac_try_echo=$ac_try;;
8094esac
8095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8096  (eval "$ac_link") 2>conftest.er1
8097  ac_status=$?
8098  grep -v '^ *+' conftest.er1 >conftest.err
8099  rm -f conftest.er1
8100  cat conftest.err >&5
8101  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8102  (exit $ac_status); } && {
8103	 test -z "$ac_c_werror_flag" ||
8104	 test ! -s conftest.err
8105       } && test -s conftest$ac_exeext &&
8106       $as_test_x conftest$ac_exeext; then
8107  ac_cv_lib_bind_inet_ntoa=yes
8108else
8109  echo "$as_me: failed program was:" >&5
8110sed 's/^/| /' conftest.$ac_ext >&5
8111
8112	ac_cv_lib_bind_inet_ntoa=no
8113fi
8114
8115rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8116      conftest$ac_exeext conftest.$ac_ext
8117LIBS=$ac_check_lib_save_LIBS
8118fi
8119{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
8120echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; }
8121if test $ac_cv_lib_bind_inet_ntoa = yes; then
8122  LIBS="$LIBS -lbind -lsocket"
8123fi
8124
8125	    ;;
8126	BSD/OS-4.*)
8127	    SHLIB_CFLAGS="-export-dynamic -fPIC"
8128	    SHLIB_LD='${CC} -shared'
8129	    SHLIB_SUFFIX=".so"
8130	    LDFLAGS="$LDFLAGS -export-dynamic"
8131	    CC_SEARCH_FLAGS=""
8132	    LD_SEARCH_FLAGS=""
8133	    ;;
8134	CYGWIN_*)
8135	    SHLIB_CFLAGS=""
8136	    SHLIB_LD='${CC} -shared'
8137	    SHLIB_SUFFIX=".dll"
8138	    EXE_SUFFIX=".exe"
8139	    CC_SEARCH_FLAGS=""
8140	    LD_SEARCH_FLAGS=""
8141	    ;;
8142	Haiku*)
8143	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8144	    SHLIB_CFLAGS="-fPIC"
8145	    SHLIB_SUFFIX=".so"
8146	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
8147	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
8148echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6; }
8149if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
8150  echo $ECHO_N "(cached) $ECHO_C" >&6
8151else
8152  ac_check_lib_save_LIBS=$LIBS
8153LIBS="-lnetwork  $LIBS"
8154cat >conftest.$ac_ext <<_ACEOF
8155/* confdefs.h.  */
8156_ACEOF
8157cat confdefs.h >>conftest.$ac_ext
8158cat >>conftest.$ac_ext <<_ACEOF
8159/* end confdefs.h.  */
8160
8161/* Override any GCC internal prototype to avoid an error.
8162   Use char because int might match the return type of a GCC
8163   builtin and then its argument prototype would still apply.  */
8164#ifdef __cplusplus
8165extern "C"
8166#endif
8167char inet_ntoa ();
8168int
8169main ()
8170{
8171return inet_ntoa ();
8172  ;
8173  return 0;
8174}
8175_ACEOF
8176rm -f conftest.$ac_objext conftest$ac_exeext
8177if { (ac_try="$ac_link"
8178case "(($ac_try" in
8179  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8180  *) ac_try_echo=$ac_try;;
8181esac
8182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8183  (eval "$ac_link") 2>conftest.er1
8184  ac_status=$?
8185  grep -v '^ *+' conftest.er1 >conftest.err
8186  rm -f conftest.er1
8187  cat conftest.err >&5
8188  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8189  (exit $ac_status); } && {
8190	 test -z "$ac_c_werror_flag" ||
8191	 test ! -s conftest.err
8192       } && test -s conftest$ac_exeext &&
8193       $as_test_x conftest$ac_exeext; then
8194  ac_cv_lib_network_inet_ntoa=yes
8195else
8196  echo "$as_me: failed program was:" >&5
8197sed 's/^/| /' conftest.$ac_ext >&5
8198
8199	ac_cv_lib_network_inet_ntoa=no
8200fi
8201
8202rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8203      conftest$ac_exeext conftest.$ac_ext
8204LIBS=$ac_check_lib_save_LIBS
8205fi
8206{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5
8207echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6; }
8208if test $ac_cv_lib_network_inet_ntoa = yes; then
8209  LIBS="$LIBS -lnetwork"
8210fi
8211
8212	    ;;
8213	HP-UX-*.11.*)
8214	    # Use updated header definitions where possible
8215
8216cat >>confdefs.h <<\_ACEOF
8217#define _XOPEN_SOURCE_EXTENDED 1
8218_ACEOF
8219
8220	    # TEA specific: Needed by Tcl, but not most extensions
8221	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
8222	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
8223
8224	    if test "`uname -m`" = ia64; then
8225
8226		SHLIB_SUFFIX=".so"
8227		# Use newer C++ library for C++ extensions
8228		#if test "$GCC" != "yes" ; then
8229		#   CPPFLAGS="-AA"
8230		#fi
8231
8232else
8233
8234		SHLIB_SUFFIX=".sl"
8235
8236fi
8237
8238	    { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8239echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
8240if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8241  echo $ECHO_N "(cached) $ECHO_C" >&6
8242else
8243  ac_check_lib_save_LIBS=$LIBS
8244LIBS="-ldld  $LIBS"
8245cat >conftest.$ac_ext <<_ACEOF
8246/* confdefs.h.  */
8247_ACEOF
8248cat confdefs.h >>conftest.$ac_ext
8249cat >>conftest.$ac_ext <<_ACEOF
8250/* end confdefs.h.  */
8251
8252/* Override any GCC internal prototype to avoid an error.
8253   Use char because int might match the return type of a GCC
8254   builtin and then its argument prototype would still apply.  */
8255#ifdef __cplusplus
8256extern "C"
8257#endif
8258char shl_load ();
8259int
8260main ()
8261{
8262return shl_load ();
8263  ;
8264  return 0;
8265}
8266_ACEOF
8267rm -f conftest.$ac_objext conftest$ac_exeext
8268if { (ac_try="$ac_link"
8269case "(($ac_try" in
8270  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8271  *) ac_try_echo=$ac_try;;
8272esac
8273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8274  (eval "$ac_link") 2>conftest.er1
8275  ac_status=$?
8276  grep -v '^ *+' conftest.er1 >conftest.err
8277  rm -f conftest.er1
8278  cat conftest.err >&5
8279  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8280  (exit $ac_status); } && {
8281	 test -z "$ac_c_werror_flag" ||
8282	 test ! -s conftest.err
8283       } && test -s conftest$ac_exeext &&
8284       $as_test_x conftest$ac_exeext; then
8285  ac_cv_lib_dld_shl_load=yes
8286else
8287  echo "$as_me: failed program was:" >&5
8288sed 's/^/| /' conftest.$ac_ext >&5
8289
8290	ac_cv_lib_dld_shl_load=no
8291fi
8292
8293rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8294      conftest$ac_exeext conftest.$ac_ext
8295LIBS=$ac_check_lib_save_LIBS
8296fi
8297{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
8298echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
8299if test $ac_cv_lib_dld_shl_load = yes; then
8300  tcl_ok=yes
8301else
8302  tcl_ok=no
8303fi
8304
8305	    if test "$tcl_ok" = yes; then
8306
8307		LDFLAGS="$LDFLAGS -E"
8308		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
8309		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
8310		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
8311
8312fi
8313
8314	    if test "$GCC" = yes; then
8315
8316		SHLIB_LD='${CC} -shared'
8317		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8318
8319else
8320
8321		CFLAGS="$CFLAGS -z"
8322		# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
8323		#CFLAGS="$CFLAGS +DAportable"
8324		SHLIB_CFLAGS="+z"
8325		SHLIB_LD="ld -b"
8326
8327fi
8328
8329
8330	    # Check to enable 64-bit flags for compiler/linker
8331	    if test "$do64bit" = "yes"; then
8332
8333		if test "$GCC" = yes; then
8334
8335		    case `${CC} -dumpmachine` in
8336			hppa64*)
8337			    # 64-bit gcc in use.  Fix flags for GNU ld.
8338			    do64bit_ok=yes
8339			    SHLIB_LD='${CC} -shared'
8340			    if test $doRpath = yes; then
8341
8342				CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8343fi
8344
8345			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8346			    ;;
8347			*)
8348			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8349echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8350			    ;;
8351		    esac
8352
8353else
8354
8355		    do64bit_ok=yes
8356		    CFLAGS="$CFLAGS +DD64"
8357		    LDFLAGS_ARCH="+DD64"
8358
8359fi
8360
8361
8362fi
8363 ;;
8364	IRIX-6.*)
8365	    SHLIB_CFLAGS=""
8366	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8367	    SHLIB_SUFFIX=".so"
8368	    if test $doRpath = yes; then
8369
8370		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8371		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8372fi
8373
8374	    if test "$GCC" = yes; then
8375
8376		CFLAGS="$CFLAGS -mabi=n32"
8377		LDFLAGS="$LDFLAGS -mabi=n32"
8378
8379else
8380
8381		case $system in
8382		    IRIX-6.3)
8383			# Use to build 6.2 compatible binaries on 6.3.
8384			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
8385			;;
8386		    *)
8387			CFLAGS="$CFLAGS -n32"
8388			;;
8389		esac
8390		LDFLAGS="$LDFLAGS -n32"
8391
8392fi
8393
8394	    ;;
8395	IRIX64-6.*)
8396	    SHLIB_CFLAGS=""
8397	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8398	    SHLIB_SUFFIX=".so"
8399	    if test $doRpath = yes; then
8400
8401		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8402		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8403fi
8404
8405
8406	    # Check to enable 64-bit flags for compiler/linker
8407
8408	    if test "$do64bit" = yes; then
8409
8410	        if test "$GCC" = yes; then
8411
8412	            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
8413echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
8414
8415else
8416
8417	            do64bit_ok=yes
8418	            SHLIB_LD="ld -64 -shared -rdata_shared"
8419	            CFLAGS="$CFLAGS -64"
8420	            LDFLAGS_ARCH="-64"
8421
8422fi
8423
8424
8425fi
8426
8427	    ;;
8428	Linux*)
8429	    SHLIB_CFLAGS="-fPIC"
8430	    SHLIB_SUFFIX=".so"
8431
8432	    # TEA specific:
8433	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8434
8435	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8436	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
8437	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8438	    if test $doRpath = yes; then
8439
8440		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8441fi
8442
8443	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8444	    if test "`uname -m`" = "alpha"; then
8445  CFLAGS="$CFLAGS -mieee"
8446fi
8447
8448	    if test $do64bit = yes; then
8449
8450		{ echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
8451echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; }
8452if test "${tcl_cv_cc_m64+set}" = set; then
8453  echo $ECHO_N "(cached) $ECHO_C" >&6
8454else
8455
8456		    hold_cflags=$CFLAGS
8457		    CFLAGS="$CFLAGS -m64"
8458		    cat >conftest.$ac_ext <<_ACEOF
8459/* confdefs.h.  */
8460_ACEOF
8461cat confdefs.h >>conftest.$ac_ext
8462cat >>conftest.$ac_ext <<_ACEOF
8463/* end confdefs.h.  */
8464
8465int
8466main ()
8467{
8468
8469  ;
8470  return 0;
8471}
8472_ACEOF
8473rm -f conftest.$ac_objext conftest$ac_exeext
8474if { (ac_try="$ac_link"
8475case "(($ac_try" in
8476  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8477  *) ac_try_echo=$ac_try;;
8478esac
8479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8480  (eval "$ac_link") 2>conftest.er1
8481  ac_status=$?
8482  grep -v '^ *+' conftest.er1 >conftest.err
8483  rm -f conftest.er1
8484  cat conftest.err >&5
8485  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8486  (exit $ac_status); } && {
8487	 test -z "$ac_c_werror_flag" ||
8488	 test ! -s conftest.err
8489       } && test -s conftest$ac_exeext &&
8490       $as_test_x conftest$ac_exeext; then
8491  tcl_cv_cc_m64=yes
8492else
8493  echo "$as_me: failed program was:" >&5
8494sed 's/^/| /' conftest.$ac_ext >&5
8495
8496	tcl_cv_cc_m64=no
8497fi
8498
8499rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8500      conftest$ac_exeext conftest.$ac_ext
8501		    CFLAGS=$hold_cflags
8502fi
8503{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
8504echo "${ECHO_T}$tcl_cv_cc_m64" >&6; }
8505		if test $tcl_cv_cc_m64 = yes; then
8506
8507		    CFLAGS="$CFLAGS -m64"
8508		    do64bit_ok=yes
8509
8510fi
8511
8512
8513fi
8514
8515
8516	    # The combo of gcc + glibc has a bug related to inlining of
8517	    # functions like strtod(). The -fno-builtin flag should address
8518	    # this problem but it does not work. The -fno-inline flag is kind
8519	    # of overkill but it works. Disable inlining only when one of the
8520	    # files in compat/*.c is being linked in.
8521
8522	    if test x"${USE_COMPAT}" != x; then
8523  CFLAGS="$CFLAGS -fno-inline"
8524fi
8525
8526
8527	    ;;
8528	GNU*)
8529	    SHLIB_CFLAGS="-fPIC"
8530	    SHLIB_SUFFIX=".so"
8531
8532	    SHLIB_LD='${CC} -shared'
8533	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8534	    CC_SEARCH_FLAGS=""
8535	    LD_SEARCH_FLAGS=""
8536	    if test "`uname -m`" = "alpha"; then
8537  CFLAGS="$CFLAGS -mieee"
8538fi
8539
8540	    ;;
8541	Lynx*)
8542	    SHLIB_CFLAGS="-fPIC"
8543	    SHLIB_SUFFIX=".so"
8544	    CFLAGS_OPTIMIZE=-02
8545	    SHLIB_LD='${CC} -shared'
8546	    LD_FLAGS="-Wl,--export-dynamic"
8547	    if test $doRpath = yes; then
8548
8549		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8550		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8551fi
8552
8553	    ;;
8554	OpenBSD-*)
8555	    SHLIB_CFLAGS="-fPIC"
8556	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8557	    SHLIB_SUFFIX=".so"
8558	    if test $doRpath = yes; then
8559
8560		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8561fi
8562
8563	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8564	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
8565	    { echo "$as_me:$LINENO: checking for ELF" >&5
8566echo $ECHO_N "checking for ELF... $ECHO_C" >&6; }
8567if test "${tcl_cv_ld_elf+set}" = set; then
8568  echo $ECHO_N "(cached) $ECHO_C" >&6
8569else
8570
8571		cat >conftest.$ac_ext <<_ACEOF
8572/* confdefs.h.  */
8573_ACEOF
8574cat confdefs.h >>conftest.$ac_ext
8575cat >>conftest.$ac_ext <<_ACEOF
8576/* end confdefs.h.  */
8577
8578#ifdef __ELF__
8579	yes
8580#endif
8581
8582_ACEOF
8583if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8584  $EGREP "yes" >/dev/null 2>&1; then
8585  tcl_cv_ld_elf=yes
8586else
8587  tcl_cv_ld_elf=no
8588fi
8589rm -f -r conftest*
8590
8591fi
8592{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
8593echo "${ECHO_T}$tcl_cv_ld_elf" >&6; }
8594	    if test $tcl_cv_ld_elf = yes; then
8595
8596		LDFLAGS=-Wl,-export-dynamic
8597
8598else
8599  LDFLAGS=""
8600fi
8601
8602	    if test "${TCL_THREADS}" = "1"; then
8603
8604		# OpenBSD builds and links with -pthread, never -lpthread.
8605		LIBS=`echo $LIBS | sed s/-lpthread//`
8606		CFLAGS="$CFLAGS -pthread"
8607		SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread"
8608
8609fi
8610
8611	    # OpenBSD doesn't do version numbers with dots.
8612	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8613	    TCL_LIB_VERSIONS_OK=nodots
8614	    ;;
8615	NetBSD-*|FreeBSD-[3-4].*)
8616	    # FreeBSD 3.* and greater have ELF.
8617	    # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
8618	    SHLIB_CFLAGS="-fPIC"
8619	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8620	    SHLIB_SUFFIX=".so"
8621	    LDFLAGS="$LDFLAGS -export-dynamic"
8622	    if test $doRpath = yes; then
8623
8624		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8625fi
8626
8627	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8628	    if test "${TCL_THREADS}" = "1"; then
8629
8630		# The -pthread needs to go in the CFLAGS, not LIBS
8631		LIBS=`echo $LIBS | sed s/-pthread//`
8632		CFLAGS="$CFLAGS -pthread"
8633	    	LDFLAGS="$LDFLAGS -pthread"
8634
8635fi
8636
8637	    case $system in
8638	    FreeBSD-3.*)
8639	    	# FreeBSD-3 doesn't handle version numbers with dots.
8640	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8641	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
8642	    	TCL_LIB_VERSIONS_OK=nodots
8643		;;
8644	    esac
8645	    ;;
8646	FreeBSD-*)
8647	    # This configuration from FreeBSD Ports.
8648	    SHLIB_CFLAGS="-fPIC"
8649	    SHLIB_LD="${CC} -shared"
8650	    TCL_SHLIB_LD_EXTRAS="-soname \$@"
8651	    SHLIB_SUFFIX=".so"
8652	    LDFLAGS=""
8653	    if test $doRpath = yes; then
8654
8655		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8656		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8657fi
8658
8659	    if test "${TCL_THREADS}" = "1"; then
8660
8661		# The -pthread needs to go in the LDFLAGS, not LIBS
8662		LIBS=`echo $LIBS | sed s/-pthread//`
8663		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8664		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
8665fi
8666
8667	    # Version numbers are dot-stripped by system policy.
8668	    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
8669	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8670	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
8671	    TCL_LIB_VERSIONS_OK=nodots
8672	    ;;
8673	Darwin-*)
8674	    CFLAGS_OPTIMIZE="-Os"
8675	    SHLIB_CFLAGS="-fno-common"
8676	    # To avoid discrepancies between what headers configure sees during
8677	    # preprocessing tests and compiling tests, move any -isysroot and
8678	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
8679	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
8680		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8681		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
8682	    CFLAGS="`echo " ${CFLAGS}" | \
8683		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8684		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
8685	    if test $do64bit = yes; then
8686
8687		case `arch` in
8688		    ppc)
8689			{ echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
8690echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; }
8691if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
8692  echo $ECHO_N "(cached) $ECHO_C" >&6
8693else
8694
8695			    hold_cflags=$CFLAGS
8696			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8697			    cat >conftest.$ac_ext <<_ACEOF
8698/* confdefs.h.  */
8699_ACEOF
8700cat confdefs.h >>conftest.$ac_ext
8701cat >>conftest.$ac_ext <<_ACEOF
8702/* end confdefs.h.  */
8703
8704int
8705main ()
8706{
8707
8708  ;
8709  return 0;
8710}
8711_ACEOF
8712rm -f conftest.$ac_objext conftest$ac_exeext
8713if { (ac_try="$ac_link"
8714case "(($ac_try" in
8715  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8716  *) ac_try_echo=$ac_try;;
8717esac
8718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8719  (eval "$ac_link") 2>conftest.er1
8720  ac_status=$?
8721  grep -v '^ *+' conftest.er1 >conftest.err
8722  rm -f conftest.er1
8723  cat conftest.err >&5
8724  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8725  (exit $ac_status); } && {
8726	 test -z "$ac_c_werror_flag" ||
8727	 test ! -s conftest.err
8728       } && test -s conftest$ac_exeext &&
8729       $as_test_x conftest$ac_exeext; then
8730  tcl_cv_cc_arch_ppc64=yes
8731else
8732  echo "$as_me: failed program was:" >&5
8733sed 's/^/| /' conftest.$ac_ext >&5
8734
8735	tcl_cv_cc_arch_ppc64=no
8736fi
8737
8738rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8739      conftest$ac_exeext conftest.$ac_ext
8740			    CFLAGS=$hold_cflags
8741fi
8742{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
8743echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; }
8744			if test $tcl_cv_cc_arch_ppc64 = yes; then
8745
8746			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8747			    do64bit_ok=yes
8748
8749fi
8750;;
8751		    i386)
8752			{ echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
8753echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; }
8754if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
8755  echo $ECHO_N "(cached) $ECHO_C" >&6
8756else
8757
8758			    hold_cflags=$CFLAGS
8759			    CFLAGS="$CFLAGS -arch x86_64"
8760			    cat >conftest.$ac_ext <<_ACEOF
8761/* confdefs.h.  */
8762_ACEOF
8763cat confdefs.h >>conftest.$ac_ext
8764cat >>conftest.$ac_ext <<_ACEOF
8765/* end confdefs.h.  */
8766
8767int
8768main ()
8769{
8770
8771  ;
8772  return 0;
8773}
8774_ACEOF
8775rm -f conftest.$ac_objext conftest$ac_exeext
8776if { (ac_try="$ac_link"
8777case "(($ac_try" in
8778  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8779  *) ac_try_echo=$ac_try;;
8780esac
8781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8782  (eval "$ac_link") 2>conftest.er1
8783  ac_status=$?
8784  grep -v '^ *+' conftest.er1 >conftest.err
8785  rm -f conftest.er1
8786  cat conftest.err >&5
8787  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8788  (exit $ac_status); } && {
8789	 test -z "$ac_c_werror_flag" ||
8790	 test ! -s conftest.err
8791       } && test -s conftest$ac_exeext &&
8792       $as_test_x conftest$ac_exeext; then
8793  tcl_cv_cc_arch_x86_64=yes
8794else
8795  echo "$as_me: failed program was:" >&5
8796sed 's/^/| /' conftest.$ac_ext >&5
8797
8798	tcl_cv_cc_arch_x86_64=no
8799fi
8800
8801rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8802      conftest$ac_exeext conftest.$ac_ext
8803			    CFLAGS=$hold_cflags
8804fi
8805{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
8806echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; }
8807			if test $tcl_cv_cc_arch_x86_64 = yes; then
8808
8809			    CFLAGS="$CFLAGS -arch x86_64"
8810			    do64bit_ok=yes
8811
8812fi
8813;;
8814		    *)
8815			{ echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
8816echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
8817		esac
8818
8819else
8820
8821		# Check for combined 32-bit and 64-bit fat build
8822		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
8823		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
8824
8825		    fat_32_64=yes
8826fi
8827
8828
8829fi
8830
8831	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8832	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
8833	    { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
8834echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; }
8835if test "${tcl_cv_ld_single_module+set}" = set; then
8836  echo $ECHO_N "(cached) $ECHO_C" >&6
8837else
8838
8839		hold_ldflags=$LDFLAGS
8840		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
8841		cat >conftest.$ac_ext <<_ACEOF
8842/* confdefs.h.  */
8843_ACEOF
8844cat confdefs.h >>conftest.$ac_ext
8845cat >>conftest.$ac_ext <<_ACEOF
8846/* end confdefs.h.  */
8847
8848int
8849main ()
8850{
8851int i;
8852  ;
8853  return 0;
8854}
8855_ACEOF
8856rm -f conftest.$ac_objext conftest$ac_exeext
8857if { (ac_try="$ac_link"
8858case "(($ac_try" in
8859  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8860  *) ac_try_echo=$ac_try;;
8861esac
8862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8863  (eval "$ac_link") 2>conftest.er1
8864  ac_status=$?
8865  grep -v '^ *+' conftest.er1 >conftest.err
8866  rm -f conftest.er1
8867  cat conftest.err >&5
8868  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8869  (exit $ac_status); } && {
8870	 test -z "$ac_c_werror_flag" ||
8871	 test ! -s conftest.err
8872       } && test -s conftest$ac_exeext &&
8873       $as_test_x conftest$ac_exeext; then
8874  tcl_cv_ld_single_module=yes
8875else
8876  echo "$as_me: failed program was:" >&5
8877sed 's/^/| /' conftest.$ac_ext >&5
8878
8879	tcl_cv_ld_single_module=no
8880fi
8881
8882rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8883      conftest$ac_exeext conftest.$ac_ext
8884		LDFLAGS=$hold_ldflags
8885fi
8886{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
8887echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; }
8888	    if test $tcl_cv_ld_single_module = yes; then
8889
8890		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
8891
8892fi
8893
8894	    # TEA specific: link shlib with current and compatiblity version flags
8895	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
8896	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
8897	    SHLIB_SUFFIX=".dylib"
8898	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
8899	    if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
8900		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
8901
8902		LDFLAGS="$LDFLAGS -prebind"
8903fi
8904
8905	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
8906	    { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
8907echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; }
8908if test "${tcl_cv_ld_search_paths_first+set}" = set; then
8909  echo $ECHO_N "(cached) $ECHO_C" >&6
8910else
8911
8912		hold_ldflags=$LDFLAGS
8913		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
8914		cat >conftest.$ac_ext <<_ACEOF
8915/* confdefs.h.  */
8916_ACEOF
8917cat confdefs.h >>conftest.$ac_ext
8918cat >>conftest.$ac_ext <<_ACEOF
8919/* end confdefs.h.  */
8920
8921int
8922main ()
8923{
8924int i;
8925  ;
8926  return 0;
8927}
8928_ACEOF
8929rm -f conftest.$ac_objext conftest$ac_exeext
8930if { (ac_try="$ac_link"
8931case "(($ac_try" in
8932  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8933  *) ac_try_echo=$ac_try;;
8934esac
8935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8936  (eval "$ac_link") 2>conftest.er1
8937  ac_status=$?
8938  grep -v '^ *+' conftest.er1 >conftest.err
8939  rm -f conftest.er1
8940  cat conftest.err >&5
8941  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8942  (exit $ac_status); } && {
8943	 test -z "$ac_c_werror_flag" ||
8944	 test ! -s conftest.err
8945       } && test -s conftest$ac_exeext &&
8946       $as_test_x conftest$ac_exeext; then
8947  tcl_cv_ld_search_paths_first=yes
8948else
8949  echo "$as_me: failed program was:" >&5
8950sed 's/^/| /' conftest.$ac_ext >&5
8951
8952	tcl_cv_ld_search_paths_first=no
8953fi
8954
8955rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8956      conftest$ac_exeext conftest.$ac_ext
8957		LDFLAGS=$hold_ldflags
8958fi
8959{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
8960echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; }
8961	    if test $tcl_cv_ld_search_paths_first = yes; then
8962
8963		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
8964
8965fi
8966
8967	    if test "$tcl_cv_cc_visibility_hidden" != yes; then
8968
8969
8970cat >>confdefs.h <<\_ACEOF
8971#define MODULE_SCOPE __private_extern__
8972_ACEOF
8973
8974		tcl_cv_cc_visibility_hidden=yes
8975
8976fi
8977
8978	    CC_SEARCH_FLAGS=""
8979	    LD_SEARCH_FLAGS=""
8980	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
8981	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
8982	    # extensions, verify that 64-bit build is possible.
8983	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then
8984
8985		if test "${TEA_WINDOWINGSYSTEM}" = x11; then
8986
8987		    { echo "$as_me:$LINENO: checking for 64-bit X11" >&5
8988echo $ECHO_N "checking for 64-bit X11... $ECHO_C" >&6; }
8989if test "${tcl_cv_lib_x11_64+set}" = set; then
8990  echo $ECHO_N "(cached) $ECHO_C" >&6
8991else
8992
8993			for v in CFLAGS CPPFLAGS LDFLAGS; do
8994			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
8995			done
8996			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
8997			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
8998			cat >conftest.$ac_ext <<_ACEOF
8999/* confdefs.h.  */
9000_ACEOF
9001cat confdefs.h >>conftest.$ac_ext
9002cat >>conftest.$ac_ext <<_ACEOF
9003/* end confdefs.h.  */
9004#include <X11/Xlib.h>
9005int
9006main ()
9007{
9008XrmInitialize();
9009  ;
9010  return 0;
9011}
9012_ACEOF
9013rm -f conftest.$ac_objext conftest$ac_exeext
9014if { (ac_try="$ac_link"
9015case "(($ac_try" in
9016  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9017  *) ac_try_echo=$ac_try;;
9018esac
9019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9020  (eval "$ac_link") 2>conftest.er1
9021  ac_status=$?
9022  grep -v '^ *+' conftest.er1 >conftest.err
9023  rm -f conftest.er1
9024  cat conftest.err >&5
9025  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9026  (exit $ac_status); } && {
9027	 test -z "$ac_c_werror_flag" ||
9028	 test ! -s conftest.err
9029       } && test -s conftest$ac_exeext &&
9030       $as_test_x conftest$ac_exeext; then
9031  tcl_cv_lib_x11_64=yes
9032else
9033  echo "$as_me: failed program was:" >&5
9034sed 's/^/| /' conftest.$ac_ext >&5
9035
9036	tcl_cv_lib_x11_64=no
9037fi
9038
9039rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9040      conftest$ac_exeext conftest.$ac_ext
9041			for v in CFLAGS CPPFLAGS LDFLAGS; do
9042			    eval $v'="$hold_'$v'"'
9043			done
9044fi
9045{ echo "$as_me:$LINENO: result: $tcl_cv_lib_x11_64" >&5
9046echo "${ECHO_T}$tcl_cv_lib_x11_64" >&6; }
9047
9048fi
9049
9050		if test "${TEA_WINDOWINGSYSTEM}" = aqua; then
9051
9052		    { echo "$as_me:$LINENO: checking for 64-bit Tk" >&5
9053echo $ECHO_N "checking for 64-bit Tk... $ECHO_C" >&6; }
9054if test "${tcl_cv_lib_tk_64+set}" = set; then
9055  echo $ECHO_N "(cached) $ECHO_C" >&6
9056else
9057
9058			for v in CFLAGS CPPFLAGS LDFLAGS; do
9059			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
9060			done
9061			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 `eval "echo ${TCL_INCLUDES} ${TK_INCLUDES}"`"
9062			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
9063			cat >conftest.$ac_ext <<_ACEOF
9064/* confdefs.h.  */
9065_ACEOF
9066cat confdefs.h >>conftest.$ac_ext
9067cat >>conftest.$ac_ext <<_ACEOF
9068/* end confdefs.h.  */
9069#include <tk.h>
9070int
9071main ()
9072{
9073Tk_InitStubs(NULL, "", 0);
9074  ;
9075  return 0;
9076}
9077_ACEOF
9078rm -f conftest.$ac_objext conftest$ac_exeext
9079if { (ac_try="$ac_link"
9080case "(($ac_try" in
9081  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9082  *) ac_try_echo=$ac_try;;
9083esac
9084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9085  (eval "$ac_link") 2>conftest.er1
9086  ac_status=$?
9087  grep -v '^ *+' conftest.er1 >conftest.err
9088  rm -f conftest.er1
9089  cat conftest.err >&5
9090  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9091  (exit $ac_status); } && {
9092	 test -z "$ac_c_werror_flag" ||
9093	 test ! -s conftest.err
9094       } && test -s conftest$ac_exeext &&
9095       $as_test_x conftest$ac_exeext; then
9096  tcl_cv_lib_tk_64=yes
9097else
9098  echo "$as_me: failed program was:" >&5
9099sed 's/^/| /' conftest.$ac_ext >&5
9100
9101	tcl_cv_lib_tk_64=no
9102fi
9103
9104rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9105      conftest$ac_exeext conftest.$ac_ext
9106			for v in CFLAGS CPPFLAGS LDFLAGS; do
9107			    eval $v'="$hold_'$v'"'
9108			done
9109fi
9110{ echo "$as_me:$LINENO: result: $tcl_cv_lib_tk_64" >&5
9111echo "${ECHO_T}$tcl_cv_lib_tk_64" >&6; }
9112
9113fi
9114
9115		# remove 64-bit arch flags from CFLAGS et al. if configuration
9116		# does not support 64-bit.
9117		if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then
9118
9119		    { echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
9120echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
9121		    for v in CFLAGS CPPFLAGS LDFLAGS; do
9122			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
9123		    done
9124fi
9125
9126
9127fi
9128
9129	    ;;
9130	OS/390-*)
9131	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
9132
9133cat >>confdefs.h <<\_ACEOF
9134#define _OE_SOCKETS 1
9135_ACEOF
9136
9137	    ;;
9138	OSF1-V*)
9139	    # Digital OSF/1
9140	    SHLIB_CFLAGS=""
9141	    if test "$SHARED_BUILD" = 1; then
9142
9143	        SHLIB_LD='ld -shared -expect_unresolved "*"'
9144
9145else
9146
9147	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
9148
9149fi
9150
9151	    SHLIB_SUFFIX=".so"
9152	    if test $doRpath = yes; then
9153
9154		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9155		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9156fi
9157
9158	    if test "$GCC" = yes; then
9159  CFLAGS="$CFLAGS -mieee"
9160else
9161
9162		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
9163fi
9164
9165	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
9166	    if test "${TCL_THREADS}" = 1; then
9167
9168		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
9169		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
9170		LIBS=`echo $LIBS | sed s/-lpthreads//`
9171		if test "$GCC" = yes; then
9172
9173		    LIBS="$LIBS -lpthread -lmach -lexc"
9174
9175else
9176
9177		    CFLAGS="$CFLAGS -pthread"
9178		    LDFLAGS="$LDFLAGS -pthread"
9179
9180fi
9181
9182
9183fi
9184
9185	    ;;
9186	QNX-6*)
9187	    # QNX RTP
9188	    # This may work for all QNX, but it was only reported for v6.
9189	    SHLIB_CFLAGS="-fPIC"
9190	    SHLIB_LD="ld -Bshareable -x"
9191	    SHLIB_LD_LIBS=""
9192	    SHLIB_SUFFIX=".so"
9193	    CC_SEARCH_FLAGS=""
9194	    LD_SEARCH_FLAGS=""
9195	    ;;
9196	SCO_SV-3.2*)
9197	    if test "$GCC" = yes; then
9198
9199		SHLIB_CFLAGS="-fPIC -melf"
9200		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
9201
9202else
9203
9204	       SHLIB_CFLAGS="-Kpic -belf"
9205	       LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
9206
9207fi
9208
9209	    SHLIB_LD="ld -G"
9210	    SHLIB_LD_LIBS=""
9211	    SHLIB_SUFFIX=".so"
9212	    CC_SEARCH_FLAGS=""
9213	    LD_SEARCH_FLAGS=""
9214	    ;;
9215	SunOS-5.[0-6])
9216	    # Careful to not let 5.10+ fall into this case
9217
9218	    # Note: If _REENTRANT isn't defined, then Solaris
9219	    # won't define thread-safe library routines.
9220
9221
9222cat >>confdefs.h <<\_ACEOF
9223#define _REENTRANT 1
9224_ACEOF
9225
9226
9227cat >>confdefs.h <<\_ACEOF
9228#define _POSIX_PTHREAD_SEMANTICS 1
9229_ACEOF
9230
9231
9232	    SHLIB_CFLAGS="-KPIC"
9233	    SHLIB_SUFFIX=".so"
9234	    if test "$GCC" = yes; then
9235
9236		SHLIB_LD='${CC} -shared'
9237		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9238		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9239
9240else
9241
9242		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
9243		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9244		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9245
9246fi
9247
9248	    ;;
9249	SunOS-5*)
9250	    # Note: If _REENTRANT isn't defined, then Solaris
9251	    # won't define thread-safe library routines.
9252
9253
9254cat >>confdefs.h <<\_ACEOF
9255#define _REENTRANT 1
9256_ACEOF
9257
9258
9259cat >>confdefs.h <<\_ACEOF
9260#define _POSIX_PTHREAD_SEMANTICS 1
9261_ACEOF
9262
9263
9264	    SHLIB_CFLAGS="-KPIC"
9265
9266	    # Check to enable 64-bit flags for compiler/linker
9267	    if test "$do64bit" = yes; then
9268
9269		arch=`isainfo`
9270		if test "$arch" = "sparcv9 sparc"; then
9271
9272		    if test "$GCC" = yes; then
9273
9274			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
9275
9276			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
9277echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
9278
9279else
9280
9281			    do64bit_ok=yes
9282			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
9283			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
9284			    SHLIB_CFLAGS="-fPIC"
9285
9286fi
9287
9288
9289else
9290
9291			do64bit_ok=yes
9292			if test "$do64bitVIS" = yes; then
9293
9294			    CFLAGS="$CFLAGS -xarch=v9a"
9295			    LDFLAGS_ARCH="-xarch=v9a"
9296
9297else
9298
9299			    CFLAGS="$CFLAGS -xarch=v9"
9300			    LDFLAGS_ARCH="-xarch=v9"
9301
9302fi
9303
9304			# Solaris 64 uses this as well
9305			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
9306
9307fi
9308
9309
9310else
9311  if test "$arch" = "amd64 i386"; then
9312
9313		    if test "$GCC" = yes; then
9314
9315			case $system in
9316			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
9317				do64bit_ok=yes
9318				CFLAGS="$CFLAGS -m64"
9319				LDFLAGS="$LDFLAGS -m64";;
9320			    *)
9321				{ echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
9322echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
9323			esac
9324
9325else
9326
9327			do64bit_ok=yes
9328			case $system in
9329			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
9330				CFLAGS="$CFLAGS -m64"
9331				LDFLAGS="$LDFLAGS -m64";;
9332			    *)
9333				CFLAGS="$CFLAGS -xarch=amd64"
9334				LDFLAGS="$LDFLAGS -xarch=amd64";;
9335			esac
9336
9337fi
9338
9339
9340else
9341  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
9342echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
9343fi
9344
9345fi
9346
9347
9348fi
9349
9350
9351	    SHLIB_SUFFIX=".so"
9352	    if test "$GCC" = yes; then
9353
9354		SHLIB_LD='${CC} -shared'
9355		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9356		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9357		if test "$do64bit_ok" = yes; then
9358
9359		    if test "$arch" = "sparcv9 sparc"; then
9360
9361			# We need to specify -static-libgcc or we need to
9362			# add the path to the sparv9 libgcc.
9363			# JH: static-libgcc is necessary for core Tcl, but may
9364			# not be necessary for extensions.
9365			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
9366			# for finding sparcv9 libgcc, get the regular libgcc
9367			# path, remove so name and append 'sparcv9'
9368			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
9369			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
9370
9371else
9372  if test "$arch" = "amd64 i386"; then
9373
9374			# JH: static-libgcc is necessary for core Tcl, but may
9375			# not be necessary for extensions.
9376			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
9377
9378fi
9379
9380fi
9381
9382
9383fi
9384
9385
9386else
9387
9388		case $system in
9389		    SunOS-5.[1-9][0-9]*)
9390			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9391			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
9392		    *)
9393			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
9394		esac
9395		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9396		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9397
9398fi
9399
9400	    ;;
9401    esac
9402
9403    if test "$do64bit" = yes -a "$do64bit_ok" = no; then
9404
9405	{ echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
9406echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
9407
9408fi
9409
9410
9411
9412
9413    # Add in the arch flags late to ensure it wasn't removed.
9414    # Not necessary in TEA, but this is aligned with core
9415    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
9416
9417    # If we're running gcc, then change the C flags for compiling shared
9418    # libraries to the right flags for gcc, instead of those for the
9419    # standard manufacturer compiler.
9420
9421    if test "$GCC" = yes; then
9422
9423	case $system in
9424	    AIX-*) ;;
9425	    BSD/OS*) ;;
9426	    CYGWIN_*) ;;
9427	    IRIX*) ;;
9428	    NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
9429	    Darwin-*) ;;
9430	    SCO_SV-3.2*) ;;
9431	    windows) ;;
9432	    *) SHLIB_CFLAGS="-fPIC" ;;
9433	esac
9434fi
9435
9436
9437    if test "$tcl_cv_cc_visibility_hidden" != yes; then
9438
9439
9440cat >>confdefs.h <<\_ACEOF
9441#define MODULE_SCOPE extern
9442_ACEOF
9443
9444
9445cat >>confdefs.h <<\_ACEOF
9446#define NO_VIZ
9447_ACEOF
9448
9449
9450fi
9451
9452
9453    if test "$SHARED_LIB_SUFFIX" = ""; then
9454
9455	# TEA specific: use PACKAGE_VERSION instead of VERSION
9456	SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
9457fi
9458
9459    if test "$UNSHARED_LIB_SUFFIX" = ""; then
9460
9461	# TEA specific: use PACKAGE_VERSION instead of VERSION
9462	UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
9463fi
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478    # These must be called after we do the basic CFLAGS checks and
9479    # verify any possible 64-bit or similar switches are necessary
9480
9481    { echo "$as_me:$LINENO: checking for required early compiler flags" >&5
9482echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; }
9483    tcl_flags=""
9484
9485    if test "${tcl_cv_flag__isoc99_source+set}" = set; then
9486  echo $ECHO_N "(cached) $ECHO_C" >&6
9487else
9488  cat >conftest.$ac_ext <<_ACEOF
9489/* confdefs.h.  */
9490_ACEOF
9491cat confdefs.h >>conftest.$ac_ext
9492cat >>conftest.$ac_ext <<_ACEOF
9493/* end confdefs.h.  */
9494#include <stdlib.h>
9495int
9496main ()
9497{
9498char *p = (char *)strtoll; char *q = (char *)strtoull;
9499  ;
9500  return 0;
9501}
9502_ACEOF
9503rm -f conftest.$ac_objext
9504if { (ac_try="$ac_compile"
9505case "(($ac_try" in
9506  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9507  *) ac_try_echo=$ac_try;;
9508esac
9509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9510  (eval "$ac_compile") 2>conftest.er1
9511  ac_status=$?
9512  grep -v '^ *+' conftest.er1 >conftest.err
9513  rm -f conftest.er1
9514  cat conftest.err >&5
9515  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9516  (exit $ac_status); } && {
9517	 test -z "$ac_c_werror_flag" ||
9518	 test ! -s conftest.err
9519       } && test -s conftest.$ac_objext; then
9520  tcl_cv_flag__isoc99_source=no
9521else
9522  echo "$as_me: failed program was:" >&5
9523sed 's/^/| /' conftest.$ac_ext >&5
9524
9525	cat >conftest.$ac_ext <<_ACEOF
9526/* confdefs.h.  */
9527_ACEOF
9528cat confdefs.h >>conftest.$ac_ext
9529cat >>conftest.$ac_ext <<_ACEOF
9530/* end confdefs.h.  */
9531#define _ISOC99_SOURCE 1
9532#include <stdlib.h>
9533int
9534main ()
9535{
9536char *p = (char *)strtoll; char *q = (char *)strtoull;
9537  ;
9538  return 0;
9539}
9540_ACEOF
9541rm -f conftest.$ac_objext
9542if { (ac_try="$ac_compile"
9543case "(($ac_try" in
9544  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9545  *) ac_try_echo=$ac_try;;
9546esac
9547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9548  (eval "$ac_compile") 2>conftest.er1
9549  ac_status=$?
9550  grep -v '^ *+' conftest.er1 >conftest.err
9551  rm -f conftest.er1
9552  cat conftest.err >&5
9553  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9554  (exit $ac_status); } && {
9555	 test -z "$ac_c_werror_flag" ||
9556	 test ! -s conftest.err
9557       } && test -s conftest.$ac_objext; then
9558  tcl_cv_flag__isoc99_source=yes
9559else
9560  echo "$as_me: failed program was:" >&5
9561sed 's/^/| /' conftest.$ac_ext >&5
9562
9563	tcl_cv_flag__isoc99_source=no
9564fi
9565
9566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9567fi
9568
9569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9570fi
9571
9572    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
9573
9574cat >>confdefs.h <<\_ACEOF
9575#define _ISOC99_SOURCE 1
9576_ACEOF
9577
9578	tcl_flags="$tcl_flags _ISOC99_SOURCE"
9579    fi
9580
9581
9582    if test "${tcl_cv_flag__largefile64_source+set}" = set; then
9583  echo $ECHO_N "(cached) $ECHO_C" >&6
9584else
9585  cat >conftest.$ac_ext <<_ACEOF
9586/* confdefs.h.  */
9587_ACEOF
9588cat confdefs.h >>conftest.$ac_ext
9589cat >>conftest.$ac_ext <<_ACEOF
9590/* end confdefs.h.  */
9591#include <sys/stat.h>
9592int
9593main ()
9594{
9595struct stat64 buf; int i = stat64("/", &buf);
9596  ;
9597  return 0;
9598}
9599_ACEOF
9600rm -f conftest.$ac_objext
9601if { (ac_try="$ac_compile"
9602case "(($ac_try" in
9603  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9604  *) ac_try_echo=$ac_try;;
9605esac
9606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9607  (eval "$ac_compile") 2>conftest.er1
9608  ac_status=$?
9609  grep -v '^ *+' conftest.er1 >conftest.err
9610  rm -f conftest.er1
9611  cat conftest.err >&5
9612  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9613  (exit $ac_status); } && {
9614	 test -z "$ac_c_werror_flag" ||
9615	 test ! -s conftest.err
9616       } && test -s conftest.$ac_objext; then
9617  tcl_cv_flag__largefile64_source=no
9618else
9619  echo "$as_me: failed program was:" >&5
9620sed 's/^/| /' conftest.$ac_ext >&5
9621
9622	cat >conftest.$ac_ext <<_ACEOF
9623/* confdefs.h.  */
9624_ACEOF
9625cat confdefs.h >>conftest.$ac_ext
9626cat >>conftest.$ac_ext <<_ACEOF
9627/* end confdefs.h.  */
9628#define _LARGEFILE64_SOURCE 1
9629#include <sys/stat.h>
9630int
9631main ()
9632{
9633struct stat64 buf; int i = stat64("/", &buf);
9634  ;
9635  return 0;
9636}
9637_ACEOF
9638rm -f conftest.$ac_objext
9639if { (ac_try="$ac_compile"
9640case "(($ac_try" in
9641  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9642  *) ac_try_echo=$ac_try;;
9643esac
9644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9645  (eval "$ac_compile") 2>conftest.er1
9646  ac_status=$?
9647  grep -v '^ *+' conftest.er1 >conftest.err
9648  rm -f conftest.er1
9649  cat conftest.err >&5
9650  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9651  (exit $ac_status); } && {
9652	 test -z "$ac_c_werror_flag" ||
9653	 test ! -s conftest.err
9654       } && test -s conftest.$ac_objext; then
9655  tcl_cv_flag__largefile64_source=yes
9656else
9657  echo "$as_me: failed program was:" >&5
9658sed 's/^/| /' conftest.$ac_ext >&5
9659
9660	tcl_cv_flag__largefile64_source=no
9661fi
9662
9663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9664fi
9665
9666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9667fi
9668
9669    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
9670
9671cat >>confdefs.h <<\_ACEOF
9672#define _LARGEFILE64_SOURCE 1
9673_ACEOF
9674
9675	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
9676    fi
9677
9678
9679    if test "${tcl_cv_flag__largefile_source64+set}" = set; then
9680  echo $ECHO_N "(cached) $ECHO_C" >&6
9681else
9682  cat >conftest.$ac_ext <<_ACEOF
9683/* confdefs.h.  */
9684_ACEOF
9685cat confdefs.h >>conftest.$ac_ext
9686cat >>conftest.$ac_ext <<_ACEOF
9687/* end confdefs.h.  */
9688#include <sys/stat.h>
9689int
9690main ()
9691{
9692char *p = (char *)open64;
9693  ;
9694  return 0;
9695}
9696_ACEOF
9697rm -f conftest.$ac_objext
9698if { (ac_try="$ac_compile"
9699case "(($ac_try" in
9700  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9701  *) ac_try_echo=$ac_try;;
9702esac
9703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9704  (eval "$ac_compile") 2>conftest.er1
9705  ac_status=$?
9706  grep -v '^ *+' conftest.er1 >conftest.err
9707  rm -f conftest.er1
9708  cat conftest.err >&5
9709  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9710  (exit $ac_status); } && {
9711	 test -z "$ac_c_werror_flag" ||
9712	 test ! -s conftest.err
9713       } && test -s conftest.$ac_objext; then
9714  tcl_cv_flag__largefile_source64=no
9715else
9716  echo "$as_me: failed program was:" >&5
9717sed 's/^/| /' conftest.$ac_ext >&5
9718
9719	cat >conftest.$ac_ext <<_ACEOF
9720/* confdefs.h.  */
9721_ACEOF
9722cat confdefs.h >>conftest.$ac_ext
9723cat >>conftest.$ac_ext <<_ACEOF
9724/* end confdefs.h.  */
9725#define _LARGEFILE_SOURCE64 1
9726#include <sys/stat.h>
9727int
9728main ()
9729{
9730char *p = (char *)open64;
9731  ;
9732  return 0;
9733}
9734_ACEOF
9735rm -f conftest.$ac_objext
9736if { (ac_try="$ac_compile"
9737case "(($ac_try" in
9738  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9739  *) ac_try_echo=$ac_try;;
9740esac
9741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9742  (eval "$ac_compile") 2>conftest.er1
9743  ac_status=$?
9744  grep -v '^ *+' conftest.er1 >conftest.err
9745  rm -f conftest.er1
9746  cat conftest.err >&5
9747  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9748  (exit $ac_status); } && {
9749	 test -z "$ac_c_werror_flag" ||
9750	 test ! -s conftest.err
9751       } && test -s conftest.$ac_objext; then
9752  tcl_cv_flag__largefile_source64=yes
9753else
9754  echo "$as_me: failed program was:" >&5
9755sed 's/^/| /' conftest.$ac_ext >&5
9756
9757	tcl_cv_flag__largefile_source64=no
9758fi
9759
9760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9761fi
9762
9763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9764fi
9765
9766    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
9767
9768cat >>confdefs.h <<\_ACEOF
9769#define _LARGEFILE_SOURCE64 1
9770_ACEOF
9771
9772	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
9773    fi
9774
9775    if test "x${tcl_flags}" = "x" ; then
9776	{ echo "$as_me:$LINENO: result: none" >&5
9777echo "${ECHO_T}none" >&6; }
9778    else
9779	{ echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
9780echo "${ECHO_T}${tcl_flags}" >&6; }
9781    fi
9782
9783
9784    { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
9785echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; }
9786    if test "${tcl_cv_type_64bit+set}" = set; then
9787  echo $ECHO_N "(cached) $ECHO_C" >&6
9788else
9789
9790	tcl_cv_type_64bit=none
9791	# See if the compiler knows natively about __int64
9792	cat >conftest.$ac_ext <<_ACEOF
9793/* confdefs.h.  */
9794_ACEOF
9795cat confdefs.h >>conftest.$ac_ext
9796cat >>conftest.$ac_ext <<_ACEOF
9797/* end confdefs.h.  */
9798
9799int
9800main ()
9801{
9802__int64 value = (__int64) 0;
9803  ;
9804  return 0;
9805}
9806_ACEOF
9807rm -f conftest.$ac_objext
9808if { (ac_try="$ac_compile"
9809case "(($ac_try" in
9810  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9811  *) ac_try_echo=$ac_try;;
9812esac
9813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9814  (eval "$ac_compile") 2>conftest.er1
9815  ac_status=$?
9816  grep -v '^ *+' conftest.er1 >conftest.err
9817  rm -f conftest.er1
9818  cat conftest.err >&5
9819  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9820  (exit $ac_status); } && {
9821	 test -z "$ac_c_werror_flag" ||
9822	 test ! -s conftest.err
9823       } && test -s conftest.$ac_objext; then
9824  tcl_type_64bit=__int64
9825else
9826  echo "$as_me: failed program was:" >&5
9827sed 's/^/| /' conftest.$ac_ext >&5
9828
9829	tcl_type_64bit="long long"
9830fi
9831
9832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9833	# See if we should use long anyway  Note that we substitute in the
9834	# type that is our current guess for a 64-bit type inside this check
9835	# program, so it should be modified only carefully...
9836        cat >conftest.$ac_ext <<_ACEOF
9837/* confdefs.h.  */
9838_ACEOF
9839cat confdefs.h >>conftest.$ac_ext
9840cat >>conftest.$ac_ext <<_ACEOF
9841/* end confdefs.h.  */
9842
9843int
9844main ()
9845{
9846switch (0) {
9847            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
9848        }
9849  ;
9850  return 0;
9851}
9852_ACEOF
9853rm -f conftest.$ac_objext
9854if { (ac_try="$ac_compile"
9855case "(($ac_try" in
9856  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9857  *) ac_try_echo=$ac_try;;
9858esac
9859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9860  (eval "$ac_compile") 2>conftest.er1
9861  ac_status=$?
9862  grep -v '^ *+' conftest.er1 >conftest.err
9863  rm -f conftest.er1
9864  cat conftest.err >&5
9865  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9866  (exit $ac_status); } && {
9867	 test -z "$ac_c_werror_flag" ||
9868	 test ! -s conftest.err
9869       } && test -s conftest.$ac_objext; then
9870  tcl_cv_type_64bit=${tcl_type_64bit}
9871else
9872  echo "$as_me: failed program was:" >&5
9873sed 's/^/| /' conftest.$ac_ext >&5
9874
9875
9876fi
9877
9878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9879fi
9880
9881    if test "${tcl_cv_type_64bit}" = none ; then
9882
9883cat >>confdefs.h <<\_ACEOF
9884#define TCL_WIDE_INT_IS_LONG 1
9885_ACEOF
9886
9887	{ echo "$as_me:$LINENO: result: using long" >&5
9888echo "${ECHO_T}using long" >&6; }
9889    elif test "${tcl_cv_type_64bit}" = "__int64" \
9890		-a "${TEA_PLATFORM}" = "windows" ; then
9891	# TEA specific: We actually want to use the default tcl.h checks in
9892	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
9893	{ echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
9894echo "${ECHO_T}using Tcl header defaults" >&6; }
9895    else
9896
9897cat >>confdefs.h <<_ACEOF
9898#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
9899_ACEOF
9900
9901	{ echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
9902echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; }
9903
9904	# Now check for auxiliary declarations
9905	{ echo "$as_me:$LINENO: checking for struct dirent64" >&5
9906echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; }
9907if test "${tcl_cv_struct_dirent64+set}" = set; then
9908  echo $ECHO_N "(cached) $ECHO_C" >&6
9909else
9910
9911	    cat >conftest.$ac_ext <<_ACEOF
9912/* confdefs.h.  */
9913_ACEOF
9914cat confdefs.h >>conftest.$ac_ext
9915cat >>conftest.$ac_ext <<_ACEOF
9916/* end confdefs.h.  */
9917#include <sys/types.h>
9918#include <sys/dirent.h>
9919int
9920main ()
9921{
9922struct dirent64 p;
9923  ;
9924  return 0;
9925}
9926_ACEOF
9927rm -f conftest.$ac_objext
9928if { (ac_try="$ac_compile"
9929case "(($ac_try" in
9930  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9931  *) ac_try_echo=$ac_try;;
9932esac
9933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9934  (eval "$ac_compile") 2>conftest.er1
9935  ac_status=$?
9936  grep -v '^ *+' conftest.er1 >conftest.err
9937  rm -f conftest.er1
9938  cat conftest.err >&5
9939  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9940  (exit $ac_status); } && {
9941	 test -z "$ac_c_werror_flag" ||
9942	 test ! -s conftest.err
9943       } && test -s conftest.$ac_objext; then
9944  tcl_cv_struct_dirent64=yes
9945else
9946  echo "$as_me: failed program was:" >&5
9947sed 's/^/| /' conftest.$ac_ext >&5
9948
9949	tcl_cv_struct_dirent64=no
9950fi
9951
9952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9953fi
9954{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
9955echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; }
9956	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
9957
9958cat >>confdefs.h <<\_ACEOF
9959#define HAVE_STRUCT_DIRENT64 1
9960_ACEOF
9961
9962	fi
9963
9964	{ echo "$as_me:$LINENO: checking for struct stat64" >&5
9965echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; }
9966if test "${tcl_cv_struct_stat64+set}" = set; then
9967  echo $ECHO_N "(cached) $ECHO_C" >&6
9968else
9969
9970	    cat >conftest.$ac_ext <<_ACEOF
9971/* confdefs.h.  */
9972_ACEOF
9973cat confdefs.h >>conftest.$ac_ext
9974cat >>conftest.$ac_ext <<_ACEOF
9975/* end confdefs.h.  */
9976#include <sys/stat.h>
9977int
9978main ()
9979{
9980struct stat64 p;
9981
9982  ;
9983  return 0;
9984}
9985_ACEOF
9986rm -f conftest.$ac_objext
9987if { (ac_try="$ac_compile"
9988case "(($ac_try" in
9989  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9990  *) ac_try_echo=$ac_try;;
9991esac
9992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9993  (eval "$ac_compile") 2>conftest.er1
9994  ac_status=$?
9995  grep -v '^ *+' conftest.er1 >conftest.err
9996  rm -f conftest.er1
9997  cat conftest.err >&5
9998  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9999  (exit $ac_status); } && {
10000	 test -z "$ac_c_werror_flag" ||
10001	 test ! -s conftest.err
10002       } && test -s conftest.$ac_objext; then
10003  tcl_cv_struct_stat64=yes
10004else
10005  echo "$as_me: failed program was:" >&5
10006sed 's/^/| /' conftest.$ac_ext >&5
10007
10008	tcl_cv_struct_stat64=no
10009fi
10010
10011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10012fi
10013{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
10014echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; }
10015	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
10016
10017cat >>confdefs.h <<\_ACEOF
10018#define HAVE_STRUCT_STAT64 1
10019_ACEOF
10020
10021	fi
10022
10023
10024
10025for ac_func in open64 lseek64
10026do
10027as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10028{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10029echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10030if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10031  echo $ECHO_N "(cached) $ECHO_C" >&6
10032else
10033  cat >conftest.$ac_ext <<_ACEOF
10034/* confdefs.h.  */
10035_ACEOF
10036cat confdefs.h >>conftest.$ac_ext
10037cat >>conftest.$ac_ext <<_ACEOF
10038/* end confdefs.h.  */
10039/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10040   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10041#define $ac_func innocuous_$ac_func
10042
10043/* System header to define __stub macros and hopefully few prototypes,
10044    which can conflict with char $ac_func (); below.
10045    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10046    <limits.h> exists even on freestanding compilers.  */
10047
10048#ifdef __STDC__
10049# include <limits.h>
10050#else
10051# include <assert.h>
10052#endif
10053
10054#undef $ac_func
10055
10056/* Override any GCC internal prototype to avoid an error.
10057   Use char because int might match the return type of a GCC
10058   builtin and then its argument prototype would still apply.  */
10059#ifdef __cplusplus
10060extern "C"
10061#endif
10062char $ac_func ();
10063/* The GNU C library defines this for functions which it implements
10064    to always fail with ENOSYS.  Some functions are actually named
10065    something starting with __ and the normal name is an alias.  */
10066#if defined __stub_$ac_func || defined __stub___$ac_func
10067choke me
10068#endif
10069
10070int
10071main ()
10072{
10073return $ac_func ();
10074  ;
10075  return 0;
10076}
10077_ACEOF
10078rm -f conftest.$ac_objext conftest$ac_exeext
10079if { (ac_try="$ac_link"
10080case "(($ac_try" in
10081  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10082  *) ac_try_echo=$ac_try;;
10083esac
10084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10085  (eval "$ac_link") 2>conftest.er1
10086  ac_status=$?
10087  grep -v '^ *+' conftest.er1 >conftest.err
10088  rm -f conftest.er1
10089  cat conftest.err >&5
10090  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10091  (exit $ac_status); } && {
10092	 test -z "$ac_c_werror_flag" ||
10093	 test ! -s conftest.err
10094       } && test -s conftest$ac_exeext &&
10095       $as_test_x conftest$ac_exeext; then
10096  eval "$as_ac_var=yes"
10097else
10098  echo "$as_me: failed program was:" >&5
10099sed 's/^/| /' conftest.$ac_ext >&5
10100
10101	eval "$as_ac_var=no"
10102fi
10103
10104rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10105      conftest$ac_exeext conftest.$ac_ext
10106fi
10107ac_res=`eval echo '${'$as_ac_var'}'`
10108	       { echo "$as_me:$LINENO: result: $ac_res" >&5
10109echo "${ECHO_T}$ac_res" >&6; }
10110if test `eval echo '${'$as_ac_var'}'` = yes; then
10111  cat >>confdefs.h <<_ACEOF
10112#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10113_ACEOF
10114
10115fi
10116done
10117
10118	{ echo "$as_me:$LINENO: checking for off64_t" >&5
10119echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; }
10120	if test "${tcl_cv_type_off64_t+set}" = set; then
10121  echo $ECHO_N "(cached) $ECHO_C" >&6
10122else
10123
10124	    cat >conftest.$ac_ext <<_ACEOF
10125/* confdefs.h.  */
10126_ACEOF
10127cat confdefs.h >>conftest.$ac_ext
10128cat >>conftest.$ac_ext <<_ACEOF
10129/* end confdefs.h.  */
10130#include <sys/types.h>
10131int
10132main ()
10133{
10134off64_t offset;
10135
10136  ;
10137  return 0;
10138}
10139_ACEOF
10140rm -f conftest.$ac_objext
10141if { (ac_try="$ac_compile"
10142case "(($ac_try" in
10143  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10144  *) ac_try_echo=$ac_try;;
10145esac
10146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10147  (eval "$ac_compile") 2>conftest.er1
10148  ac_status=$?
10149  grep -v '^ *+' conftest.er1 >conftest.err
10150  rm -f conftest.er1
10151  cat conftest.err >&5
10152  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10153  (exit $ac_status); } && {
10154	 test -z "$ac_c_werror_flag" ||
10155	 test ! -s conftest.err
10156       } && test -s conftest.$ac_objext; then
10157  tcl_cv_type_off64_t=yes
10158else
10159  echo "$as_me: failed program was:" >&5
10160sed 's/^/| /' conftest.$ac_ext >&5
10161
10162	tcl_cv_type_off64_t=no
10163fi
10164
10165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10166fi
10167
10168			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
10169	        test "x${ac_cv_func_lseek64}" = "xyes" && \
10170	        test "x${ac_cv_func_open64}" = "xyes" ; then
10171
10172cat >>confdefs.h <<\_ACEOF
10173#define HAVE_TYPE_OFF64_T 1
10174_ACEOF
10175
10176	    { echo "$as_me:$LINENO: result: yes" >&5
10177echo "${ECHO_T}yes" >&6; }
10178	else
10179	    { echo "$as_me:$LINENO: result: no" >&5
10180echo "${ECHO_T}no" >&6; }
10181	fi
10182    fi
10183
10184
10185
10186#--------------------------------------------------------------------
10187# Set the default compiler switches based on the --enable-symbols option.
10188#--------------------------------------------------------------------
10189
10190
10191
10192    { echo "$as_me:$LINENO: checking for build with symbols" >&5
10193echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; }
10194    # Check whether --enable-symbols was given.
10195if test "${enable_symbols+set}" = set; then
10196  enableval=$enable_symbols; tcl_ok=$enableval
10197else
10198  tcl_ok=no
10199fi
10200
10201    DBGX=""
10202    if test "$tcl_ok" = "no"; then
10203	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
10204	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
10205	{ echo "$as_me:$LINENO: result: no" >&5
10206echo "${ECHO_T}no" >&6; }
10207    else
10208	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
10209	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
10210	if test "$tcl_ok" = "yes"; then
10211	    { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
10212echo "${ECHO_T}yes (standard debugging)" >&6; }
10213	fi
10214    fi
10215    # TEA specific:
10216    if test "${TEA_PLATFORM}" != "windows" ; then
10217	LDFLAGS_DEFAULT="${LDFLAGS}"
10218    fi
10219
10220
10221
10222
10223    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
10224
10225cat >>confdefs.h <<\_ACEOF
10226#define TCL_MEM_DEBUG 1
10227_ACEOF
10228
10229    fi
10230
10231    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
10232	if test "$tcl_ok" = "all"; then
10233	    { echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
10234echo "${ECHO_T}enabled symbols mem debugging" >&6; }
10235	else
10236	    { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
10237echo "${ECHO_T}enabled $tcl_ok debugging" >&6; }
10238	fi
10239    fi
10240
10241
10242#--------------------------------------------------------------------
10243# Everyone should be linking against the Tcl stub library.  If you
10244# can't for some reason, remove this definition.  If you aren't using
10245# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
10246# link against the non-stubbed Tcl library.  Add Tk too if necessary.
10247#--------------------------------------------------------------------
10248
10249cat >>confdefs.h <<\_ACEOF
10250#define USE_TCL_STUBS 1
10251_ACEOF
10252
10253#AC_DEFINE(USE_TK_STUBS)
10254
10255#--------------------------------------------------------------------
10256# This macro generates a line to use when building a library.  It
10257# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
10258# and TEA_LOAD_TCLCONFIG macros above.
10259#--------------------------------------------------------------------
10260
10261
10262    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
10263	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
10264	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
10265	cat >conftest.$ac_ext <<_ACEOF
10266/* confdefs.h.  */
10267_ACEOF
10268cat confdefs.h >>conftest.$ac_ext
10269cat >>conftest.$ac_ext <<_ACEOF
10270/* end confdefs.h.  */
10271
10272#if defined(_MSC_VER) && _MSC_VER >= 1400
10273print("manifest needed")
10274#endif
10275
10276_ACEOF
10277if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10278  $EGREP "manifest needed" >/dev/null 2>&1; then
10279
10280	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
10281	VC_MANIFEST_EMBED_DLL="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2"
10282	VC_MANIFEST_EMBED_EXE="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1"
10283	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
10284
10285    CLEANFILES="$CLEANFILES *.manifest"
10286
10287
10288fi
10289rm -f -r conftest*
10290
10291	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
10292    else
10293	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
10294	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
10295	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
10296    fi
10297
10298    if test "${SHARED_BUILD}" = "1" ; then
10299	MAKE_LIB="${MAKE_SHARED_LIB} "
10300    else
10301	MAKE_LIB="${MAKE_STATIC_LIB} "
10302    fi
10303
10304    #--------------------------------------------------------------------
10305    # Shared libraries and static libraries have different names.
10306    # Use the double eval to make sure any variables in the suffix is
10307    # substituted. (@@@ Might not be necessary anymore)
10308    #--------------------------------------------------------------------
10309
10310    if test "${TEA_PLATFORM}" = "windows" ; then
10311	if test "${SHARED_BUILD}" = "1" ; then
10312	    # We force the unresolved linking of symbols that are really in
10313	    # the private libraries of Tcl and Tk.
10314	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
10315	    if test x"${TK_BIN_DIR}" != x ; then
10316		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
10317	    fi
10318	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
10319	else
10320	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
10321	fi
10322	# Some packages build their own stubs libraries
10323	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
10324	if test "$GCC" = "yes"; then
10325	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
10326	fi
10327	# These aren't needed on Windows (either MSVC or gcc)
10328	RANLIB=:
10329	RANLIB_STUB=:
10330    else
10331	RANLIB_STUB="${RANLIB}"
10332	if test "${SHARED_BUILD}" = "1" ; then
10333	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
10334	    if test x"${TK_BIN_DIR}" != x ; then
10335		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
10336	    fi
10337	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
10338	    RANLIB=:
10339	else
10340	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
10341	fi
10342	# Some packages build their own stubs libraries
10343	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
10344    fi
10345
10346    # These are escaped so that only CFLAGS is picked up at configure time.
10347    # The other values will be substituted at make time.
10348    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
10349    if test "${SHARED_BUILD}" = "1" ; then
10350	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
10351    fi
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362#--------------------------------------------------------------------
10363# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
10364# file during the install process.  Don't run the TCLSH_PROG through
10365# ${CYGPATH} because it's being used directly by make.
10366# Require that we use a tclsh shell version 8.2 or later since earlier
10367# versions have bugs in the pkg_mkIndex routine.
10368# Add WISH as well if this is a Tk extension.
10369#--------------------------------------------------------------------
10370
10371
10372    { echo "$as_me:$LINENO: checking for tclsh" >&5
10373echo $ECHO_N "checking for tclsh... $ECHO_C" >&6; }
10374    if test -f "${TCL_BIN_DIR}/Makefile" ; then
10375        # tclConfig.sh is in Tcl build directory
10376        if test "${TEA_PLATFORM}" = "windows"; then
10377            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
10378        else
10379            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
10380        fi
10381    else
10382        # tclConfig.sh is in install location
10383        if test "${TEA_PLATFORM}" = "windows"; then
10384            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
10385        else
10386            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
10387        fi
10388        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
10389              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
10390              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
10391        for i in $list ; do
10392            if test -f "$i/${TCLSH_PROG}" ; then
10393                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
10394                break
10395            fi
10396        done
10397        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
10398    fi
10399    { echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
10400echo "${ECHO_T}${TCLSH_PROG}" >&6; }
10401
10402
10403#TEA_PROG_WISH
10404
10405#--------------------------------------------------------------------
10406# Finally, substitute all of the various values into the Makefile.
10407# You may alternatively have a special pkgIndex.tcl.in or other files
10408# which require substituting th AC variables in.  Include these here.
10409#--------------------------------------------------------------------
10410
10411ac_config_files="$ac_config_files Makefile"
10412
10413
10414cat >confcache <<\_ACEOF
10415# This file is a shell script that caches the results of configure
10416# tests run on this system so they can be shared between configure
10417# scripts and configure runs, see configure's option --config-cache.
10418# It is not useful on other systems.  If it contains results you don't
10419# want to keep, you may remove or edit it.
10420#
10421# config.status only pays attention to the cache file if you give it
10422# the --recheck option to rerun configure.
10423#
10424# `ac_cv_env_foo' variables (set or unset) will be overridden when
10425# loading this file, other *unset* `ac_cv_foo' will be assigned the
10426# following values.
10427
10428_ACEOF
10429
10430# The following way of writing the cache mishandles newlines in values,
10431# but we know of no workaround that is simple, portable, and efficient.
10432# So, we kill variables containing newlines.
10433# Ultrix sh set writes to stderr and can't be redirected directly,
10434# and sets the high bit in the cache file unless we assign to the vars.
10435(
10436  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
10437    eval ac_val=\$$ac_var
10438    case $ac_val in #(
10439    *${as_nl}*)
10440      case $ac_var in #(
10441      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
10442echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
10443      esac
10444      case $ac_var in #(
10445      _ | IFS | as_nl) ;; #(
10446      *) $as_unset $ac_var ;;
10447      esac ;;
10448    esac
10449  done
10450
10451  (set) 2>&1 |
10452    case $as_nl`(ac_space=' '; set) 2>&1` in #(
10453    *${as_nl}ac_space=\ *)
10454      # `set' does not quote correctly, so add quotes (double-quote
10455      # substitution turns \\\\ into \\, and sed turns \\ into \).
10456      sed -n \
10457	"s/'/'\\\\''/g;
10458	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
10459      ;; #(
10460    *)
10461      # `set' quotes correctly as required by POSIX, so do not add quotes.
10462      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
10463      ;;
10464    esac |
10465    sort
10466) |
10467  sed '
10468     /^ac_cv_env_/b end
10469     t clear
10470     :clear
10471     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10472     t end
10473     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10474     :end' >>confcache
10475if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
10476  if test -w "$cache_file"; then
10477    test "x$cache_file" != "x/dev/null" &&
10478      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
10479echo "$as_me: updating cache $cache_file" >&6;}
10480    cat confcache >$cache_file
10481  else
10482    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
10483echo "$as_me: not updating unwritable cache $cache_file" >&6;}
10484  fi
10485fi
10486rm -f confcache
10487
10488test "x$prefix" = xNONE && prefix=$ac_default_prefix
10489# Let make expand exec_prefix.
10490test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10491
10492# Transform confdefs.h into DEFS.
10493# Protect against shell expansion while executing Makefile rules.
10494# Protect against Makefile macro expansion.
10495#
10496# If the first sed substitution is executed (which looks for macros that
10497# take arguments), then branch to the quote section.  Otherwise,
10498# look for a macro that doesn't take arguments.
10499ac_script='
10500t clear
10501:clear
10502s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
10503t quote
10504s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
10505t quote
10506b any
10507:quote
10508s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
10509s/\[/\\&/g
10510s/\]/\\&/g
10511s/\$/$$/g
10512H
10513:any
10514${
10515	g
10516	s/^\n//
10517	s/\n/ /g
10518	p
10519}
10520'
10521DEFS=`sed -n "$ac_script" confdefs.h`
10522
10523
10524ac_libobjs=
10525ac_ltlibobjs=
10526for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
10527  # 1. Remove the extension, and $U if already installed.
10528  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
10529  ac_i=`echo "$ac_i" | sed "$ac_script"`
10530  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
10531  #    will be set to the directory where LIBOBJS objects are built.
10532  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
10533  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
10534done
10535LIBOBJS=$ac_libobjs
10536
10537LTLIBOBJS=$ac_ltlibobjs
10538
10539
10540CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
10541
10542: ${CONFIG_STATUS=./config.status}
10543ac_clean_files_save=$ac_clean_files
10544ac_clean_files="$ac_clean_files $CONFIG_STATUS"
10545{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
10546echo "$as_me: creating $CONFIG_STATUS" >&6;}
10547cat >$CONFIG_STATUS <<_ACEOF
10548#! $SHELL
10549# Generated by $as_me.
10550# Run this file to recreate the current configuration.
10551# Compiler output produced by configure, useful for debugging
10552# configure, is in config.log if it exists.
10553
10554debug=false
10555ac_cs_recheck=false
10556ac_cs_silent=false
10557SHELL=\${CONFIG_SHELL-$SHELL}
10558_ACEOF
10559
10560cat >>$CONFIG_STATUS <<\_ACEOF
10561## --------------------- ##
10562## M4sh Initialization.  ##
10563## --------------------- ##
10564
10565# Be more Bourne compatible
10566DUALCASE=1; export DUALCASE # for MKS sh
10567if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
10568  emulate sh
10569  NULLCMD=:
10570  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
10571  # is contrary to our usage.  Disable this feature.
10572  alias -g '${1+"$@"}'='"$@"'
10573  setopt NO_GLOB_SUBST
10574else
10575  case `(set -o) 2>/dev/null` in
10576  *posix*) set -o posix ;;
10577esac
10578
10579fi
10580
10581
10582
10583
10584# PATH needs CR
10585# Avoid depending upon Character Ranges.
10586as_cr_letters='abcdefghijklmnopqrstuvwxyz'
10587as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
10588as_cr_Letters=$as_cr_letters$as_cr_LETTERS
10589as_cr_digits='0123456789'
10590as_cr_alnum=$as_cr_Letters$as_cr_digits
10591
10592# The user is always right.
10593if test "${PATH_SEPARATOR+set}" != set; then
10594  echo "#! /bin/sh" >conf$$.sh
10595  echo  "exit 0"   >>conf$$.sh
10596  chmod +x conf$$.sh
10597  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10598    PATH_SEPARATOR=';'
10599  else
10600    PATH_SEPARATOR=:
10601  fi
10602  rm -f conf$$.sh
10603fi
10604
10605# Support unset when possible.
10606if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
10607  as_unset=unset
10608else
10609  as_unset=false
10610fi
10611
10612
10613# IFS
10614# We need space, tab and new line, in precisely that order.  Quoting is
10615# there to prevent editors from complaining about space-tab.
10616# (If _AS_PATH_WALK were called with IFS unset, it would disable word
10617# splitting by setting IFS to empty value.)
10618as_nl='
10619'
10620IFS=" ""	$as_nl"
10621
10622# Find who we are.  Look in the path if we contain no directory separator.
10623case $0 in
10624  *[\\/]* ) as_myself=$0 ;;
10625  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10626for as_dir in $PATH
10627do
10628  IFS=$as_save_IFS
10629  test -z "$as_dir" && as_dir=.
10630  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
10631done
10632IFS=$as_save_IFS
10633
10634     ;;
10635esac
10636# We did not find ourselves, most probably we were run as `sh COMMAND'
10637# in which case we are not to be found in the path.
10638if test "x$as_myself" = x; then
10639  as_myself=$0
10640fi
10641if test ! -f "$as_myself"; then
10642  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
10643  { (exit 1); exit 1; }
10644fi
10645
10646# Work around bugs in pre-3.0 UWIN ksh.
10647for as_var in ENV MAIL MAILPATH
10648do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
10649done
10650PS1='$ '
10651PS2='> '
10652PS4='+ '
10653
10654# NLS nuisances.
10655for as_var in \
10656  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
10657  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
10658  LC_TELEPHONE LC_TIME
10659do
10660  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
10661    eval $as_var=C; export $as_var
10662  else
10663    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
10664  fi
10665done
10666
10667# Required to use basename.
10668if expr a : '\(a\)' >/dev/null 2>&1 &&
10669   test "X`expr 00001 : '.*\(...\)'`" = X001; then
10670  as_expr=expr
10671else
10672  as_expr=false
10673fi
10674
10675if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
10676  as_basename=basename
10677else
10678  as_basename=false
10679fi
10680
10681
10682# Name of the executable.
10683as_me=`$as_basename -- "$0" ||
10684$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
10685	 X"$0" : 'X\(//\)$' \| \
10686	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
10687echo X/"$0" |
10688    sed '/^.*\/\([^/][^/]*\)\/*$/{
10689	    s//\1/
10690	    q
10691	  }
10692	  /^X\/\(\/\/\)$/{
10693	    s//\1/
10694	    q
10695	  }
10696	  /^X\/\(\/\).*/{
10697	    s//\1/
10698	    q
10699	  }
10700	  s/.*/./; q'`
10701
10702# CDPATH.
10703$as_unset CDPATH
10704
10705
10706
10707  as_lineno_1=$LINENO
10708  as_lineno_2=$LINENO
10709  test "x$as_lineno_1" != "x$as_lineno_2" &&
10710  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
10711
10712  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
10713  # uniformly replaced by the line number.  The first 'sed' inserts a
10714  # line-number line after each line using $LINENO; the second 'sed'
10715  # does the real work.  The second script uses 'N' to pair each
10716  # line-number line with the line containing $LINENO, and appends
10717  # trailing '-' during substitution so that $LINENO is not a special
10718  # case at line end.
10719  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
10720  # scripts with optimization help from Paolo Bonzini.  Blame Lee
10721  # E. McMahon (1931-1989) for sed's syntax.  :-)
10722  sed -n '
10723    p
10724    /[$]LINENO/=
10725  ' <$as_myself |
10726    sed '
10727      s/[$]LINENO.*/&-/
10728      t lineno
10729      b
10730      :lineno
10731      N
10732      :loop
10733      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
10734      t loop
10735      s/-\n.*//
10736    ' >$as_me.lineno &&
10737  chmod +x "$as_me.lineno" ||
10738    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
10739   { (exit 1); exit 1; }; }
10740
10741  # Don't try to exec as it changes $[0], causing all sort of problems
10742  # (the dirname of $[0] is not the place where we might find the
10743  # original and so on.  Autoconf is especially sensitive to this).
10744  . "./$as_me.lineno"
10745  # Exit status is that of the last command.
10746  exit
10747}
10748
10749
10750if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
10751  as_dirname=dirname
10752else
10753  as_dirname=false
10754fi
10755
10756ECHO_C= ECHO_N= ECHO_T=
10757case `echo -n x` in
10758-n*)
10759  case `echo 'x\c'` in
10760  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
10761  *)   ECHO_C='\c';;
10762  esac;;
10763*)
10764  ECHO_N='-n';;
10765esac
10766
10767if expr a : '\(a\)' >/dev/null 2>&1 &&
10768   test "X`expr 00001 : '.*\(...\)'`" = X001; then
10769  as_expr=expr
10770else
10771  as_expr=false
10772fi
10773
10774rm -f conf$$ conf$$.exe conf$$.file
10775if test -d conf$$.dir; then
10776  rm -f conf$$.dir/conf$$.file
10777else
10778  rm -f conf$$.dir
10779  mkdir conf$$.dir
10780fi
10781echo >conf$$.file
10782if ln -s conf$$.file conf$$ 2>/dev/null; then
10783  as_ln_s='ln -s'
10784  # ... but there are two gotchas:
10785  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
10786  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
10787  # In both cases, we have to default to `cp -p'.
10788  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
10789    as_ln_s='cp -p'
10790elif ln conf$$.file conf$$ 2>/dev/null; then
10791  as_ln_s=ln
10792else
10793  as_ln_s='cp -p'
10794fi
10795rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
10796rmdir conf$$.dir 2>/dev/null
10797
10798if mkdir -p . 2>/dev/null; then
10799  as_mkdir_p=:
10800else
10801  test -d ./-p && rmdir ./-p
10802  as_mkdir_p=false
10803fi
10804
10805if test -x / >/dev/null 2>&1; then
10806  as_test_x='test -x'
10807else
10808  if ls -dL / >/dev/null 2>&1; then
10809    as_ls_L_option=L
10810  else
10811    as_ls_L_option=
10812  fi
10813  as_test_x='
10814    eval sh -c '\''
10815      if test -d "$1"; then
10816        test -d "$1/.";
10817      else
10818	case $1 in
10819        -*)set "./$1";;
10820	esac;
10821	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
10822	???[sx]*):;;*)false;;esac;fi
10823    '\'' sh
10824  '
10825fi
10826as_executable_p=$as_test_x
10827
10828# Sed expression to map a string onto a valid CPP name.
10829as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
10830
10831# Sed expression to map a string onto a valid variable name.
10832as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
10833
10834
10835exec 6>&1
10836
10837# Save the log message, to keep $[0] and so on meaningful, and to
10838# report actual input values of CONFIG_FILES etc. instead of their
10839# values after options handling.
10840ac_log="
10841This file was extended by xotclgdbm $as_me 1.2, which was
10842generated by GNU Autoconf 2.61.  Invocation command line was
10843
10844  CONFIG_FILES    = $CONFIG_FILES
10845  CONFIG_HEADERS  = $CONFIG_HEADERS
10846  CONFIG_LINKS    = $CONFIG_LINKS
10847  CONFIG_COMMANDS = $CONFIG_COMMANDS
10848  $ $0 $@
10849
10850on `(hostname || uname -n) 2>/dev/null | sed 1q`
10851"
10852
10853_ACEOF
10854
10855cat >>$CONFIG_STATUS <<_ACEOF
10856# Files that config.status was made for.
10857config_files="$ac_config_files"
10858
10859_ACEOF
10860
10861cat >>$CONFIG_STATUS <<\_ACEOF
10862ac_cs_usage="\
10863\`$as_me' instantiates files from templates according to the
10864current configuration.
10865
10866Usage: $0 [OPTIONS] [FILE]...
10867
10868  -h, --help       print this help, then exit
10869  -V, --version    print version number and configuration settings, then exit
10870  -q, --quiet      do not print progress messages
10871  -d, --debug      don't remove temporary files
10872      --recheck    update $as_me by reconfiguring in the same conditions
10873  --file=FILE[:TEMPLATE]
10874		   instantiate the configuration file FILE
10875
10876Configuration files:
10877$config_files
10878
10879Report bugs to <bug-autoconf@gnu.org>."
10880
10881_ACEOF
10882cat >>$CONFIG_STATUS <<_ACEOF
10883ac_cs_version="\\
10884xotclgdbm config.status 1.2
10885configured by $0, generated by GNU Autoconf 2.61,
10886  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
10887
10888Copyright (C) 2006 Free Software Foundation, Inc.
10889This config.status script is free software; the Free Software Foundation
10890gives unlimited permission to copy, distribute and modify it."
10891
10892ac_pwd='$ac_pwd'
10893srcdir='$srcdir'
10894INSTALL='$INSTALL'
10895_ACEOF
10896
10897cat >>$CONFIG_STATUS <<\_ACEOF
10898# If no file are specified by the user, then we need to provide default
10899# value.  By we need to know if files were specified by the user.
10900ac_need_defaults=:
10901while test $# != 0
10902do
10903  case $1 in
10904  --*=*)
10905    ac_option=`expr "X$1" : 'X\([^=]*\)='`
10906    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
10907    ac_shift=:
10908    ;;
10909  *)
10910    ac_option=$1
10911    ac_optarg=$2
10912    ac_shift=shift
10913    ;;
10914  esac
10915
10916  case $ac_option in
10917  # Handling of the options.
10918  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10919    ac_cs_recheck=: ;;
10920  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
10921    echo "$ac_cs_version"; exit ;;
10922  --debug | --debu | --deb | --de | --d | -d )
10923    debug=: ;;
10924  --file | --fil | --fi | --f )
10925    $ac_shift
10926    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
10927    ac_need_defaults=false;;
10928  --he | --h |  --help | --hel | -h )
10929    echo "$ac_cs_usage"; exit ;;
10930  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
10931  | -silent | --silent | --silen | --sile | --sil | --si | --s)
10932    ac_cs_silent=: ;;
10933
10934  # This is an error.
10935  -*) { echo "$as_me: error: unrecognized option: $1
10936Try \`$0 --help' for more information." >&2
10937   { (exit 1); exit 1; }; } ;;
10938
10939  *) ac_config_targets="$ac_config_targets $1"
10940     ac_need_defaults=false ;;
10941
10942  esac
10943  shift
10944done
10945
10946ac_configure_extra_args=
10947
10948if $ac_cs_silent; then
10949  exec 6>/dev/null
10950  ac_configure_extra_args="$ac_configure_extra_args --silent"
10951fi
10952
10953_ACEOF
10954cat >>$CONFIG_STATUS <<_ACEOF
10955if \$ac_cs_recheck; then
10956  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
10957  CONFIG_SHELL=$SHELL
10958  export CONFIG_SHELL
10959  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
10960fi
10961
10962_ACEOF
10963cat >>$CONFIG_STATUS <<\_ACEOF
10964exec 5>>config.log
10965{
10966  echo
10967  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
10968## Running $as_me. ##
10969_ASBOX
10970  echo "$ac_log"
10971} >&5
10972
10973_ACEOF
10974cat >>$CONFIG_STATUS <<_ACEOF
10975_ACEOF
10976
10977cat >>$CONFIG_STATUS <<\_ACEOF
10978
10979# Handling of arguments.
10980for ac_config_target in $ac_config_targets
10981do
10982  case $ac_config_target in
10983    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
10984
10985  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
10986echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
10987   { (exit 1); exit 1; }; };;
10988  esac
10989done
10990
10991
10992# If the user did not use the arguments to specify the items to instantiate,
10993# then the envvar interface is used.  Set only those that are not.
10994# We use the long form for the default assignment because of an extremely
10995# bizarre bug on SunOS 4.1.3.
10996if $ac_need_defaults; then
10997  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
10998fi
10999
11000# Have a temporary directory for convenience.  Make it in the build tree
11001# simply because there is no reason against having it here, and in addition,
11002# creating and moving files from /tmp can sometimes cause problems.
11003# Hook for its removal unless debugging.
11004# Note that there is a small window in which the directory will not be cleaned:
11005# after its creation but before its name has been assigned to `$tmp'.
11006$debug ||
11007{
11008  tmp=
11009  trap 'exit_status=$?
11010  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
11011' 0
11012  trap '{ (exit 1); exit 1; }' 1 2 13 15
11013}
11014# Create a (secure) tmp directory for tmp files.
11015
11016{
11017  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
11018  test -n "$tmp" && test -d "$tmp"
11019}  ||
11020{
11021  tmp=./conf$$-$RANDOM
11022  (umask 077 && mkdir "$tmp")
11023} ||
11024{
11025   echo "$me: cannot create a temporary directory in ." >&2
11026   { (exit 1); exit 1; }
11027}
11028
11029#
11030# Set up the sed scripts for CONFIG_FILES section.
11031#
11032
11033# No need to generate the scripts if there are no CONFIG_FILES.
11034# This happens for instance when ./config.status config.h
11035if test -n "$CONFIG_FILES"; then
11036
11037_ACEOF
11038
11039
11040
11041ac_delim='%!_!# '
11042for ac_last_try in false false false false false :; do
11043  cat >conf$$subs.sed <<_ACEOF
11044SHELL!$SHELL$ac_delim
11045PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
11046PACKAGE_NAME!$PACKAGE_NAME$ac_delim
11047PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
11048PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
11049PACKAGE_STRING!$PACKAGE_STRING$ac_delim
11050PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
11051exec_prefix!$exec_prefix$ac_delim
11052prefix!$prefix$ac_delim
11053program_transform_name!$program_transform_name$ac_delim
11054bindir!$bindir$ac_delim
11055sbindir!$sbindir$ac_delim
11056libexecdir!$libexecdir$ac_delim
11057datarootdir!$datarootdir$ac_delim
11058datadir!$datadir$ac_delim
11059sysconfdir!$sysconfdir$ac_delim
11060sharedstatedir!$sharedstatedir$ac_delim
11061localstatedir!$localstatedir$ac_delim
11062includedir!$includedir$ac_delim
11063oldincludedir!$oldincludedir$ac_delim
11064docdir!$docdir$ac_delim
11065infodir!$infodir$ac_delim
11066htmldir!$htmldir$ac_delim
11067dvidir!$dvidir$ac_delim
11068pdfdir!$pdfdir$ac_delim
11069psdir!$psdir$ac_delim
11070libdir!$libdir$ac_delim
11071localedir!$localedir$ac_delim
11072mandir!$mandir$ac_delim
11073DEFS!$DEFS$ac_delim
11074ECHO_C!$ECHO_C$ac_delim
11075ECHO_N!$ECHO_N$ac_delim
11076ECHO_T!$ECHO_T$ac_delim
11077LIBS!$LIBS$ac_delim
11078build_alias!$build_alias$ac_delim
11079host_alias!$host_alias$ac_delim
11080target_alias!$target_alias$ac_delim
11081CYGPATH!$CYGPATH$ac_delim
11082EXEEXT!$EXEEXT$ac_delim
11083PKG_LIB_FILE!$PKG_LIB_FILE$ac_delim
11084PKG_STUB_LIB_FILE!$PKG_STUB_LIB_FILE$ac_delim
11085PKG_STUB_SOURCES!$PKG_STUB_SOURCES$ac_delim
11086PKG_STUB_OBJECTS!$PKG_STUB_OBJECTS$ac_delim
11087PKG_TCL_SOURCES!$PKG_TCL_SOURCES$ac_delim
11088PKG_HEADERS!$PKG_HEADERS$ac_delim
11089PKG_INCLUDES!$PKG_INCLUDES$ac_delim
11090PKG_LIBS!$PKG_LIBS$ac_delim
11091PKG_CFLAGS!$PKG_CFLAGS$ac_delim
11092TCL_VERSION!$TCL_VERSION$ac_delim
11093TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim
11094TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim
11095TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim
11096TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
11097TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim
11098TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
11099TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim
11100TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim
11101TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim
11102CLEANFILES!$CLEANFILES$ac_delim
11103TCL_LIBS!$TCL_LIBS$ac_delim
11104TCL_DEFS!$TCL_DEFS$ac_delim
11105TCL_EXTRA_CFLAGS!$TCL_EXTRA_CFLAGS$ac_delim
11106TCL_LD_FLAGS!$TCL_LD_FLAGS$ac_delim
11107TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
11108CC!$CC$ac_delim
11109CFLAGS!$CFLAGS$ac_delim
11110LDFLAGS!$LDFLAGS$ac_delim
11111CPPFLAGS!$CPPFLAGS$ac_delim
11112ac_ct_CC!$ac_ct_CC$ac_delim
11113OBJEXT!$OBJEXT$ac_delim
11114CPP!$CPP$ac_delim
11115INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
11116INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
11117INSTALL_DATA!$INSTALL_DATA$ac_delim
11118SET_MAKE!$SET_MAKE$ac_delim
11119RANLIB!$RANLIB$ac_delim
11120GREP!$GREP$ac_delim
11121EGREP!$EGREP$ac_delim
11122MATH_LIBS!$MATH_LIBS$ac_delim
11123PKG_SOURCES!$PKG_SOURCES$ac_delim
11124PKG_OBJECTS!$PKG_OBJECTS$ac_delim
11125TCL_INCLUDES!$TCL_INCLUDES$ac_delim
11126TCL_THREADS!$TCL_THREADS$ac_delim
11127SHARED_BUILD!$SHARED_BUILD$ac_delim
11128AR!$AR$ac_delim
11129CELIB_DIR!$CELIB_DIR$ac_delim
11130CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim
11131CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim
11132CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim
11133STLIB_LD!$STLIB_LD$ac_delim
11134SHLIB_LD!$SHLIB_LD$ac_delim
11135SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim
11136SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim
11137LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim
11138CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim
11139LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim
11140TCL_DBGX!$TCL_DBGX$ac_delim
11141_ACEOF
11142
11143  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
11144    break
11145  elif $ac_last_try; then
11146    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
11147echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
11148   { (exit 1); exit 1; }; }
11149  else
11150    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11151  fi
11152done
11153
11154ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
11155if test -n "$ac_eof"; then
11156  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
11157  ac_eof=`expr $ac_eof + 1`
11158fi
11159
11160cat >>$CONFIG_STATUS <<_ACEOF
11161cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
11162/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11163_ACEOF
11164sed '
11165s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
11166s/^/s,@/; s/!/@,|#_!!_#|/
11167:n
11168t n
11169s/'"$ac_delim"'$/,g/; t
11170s/$/\\/; p
11171N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
11172' >>$CONFIG_STATUS <conf$$subs.sed
11173rm -f conf$$subs.sed
11174cat >>$CONFIG_STATUS <<_ACEOF
11175CEOF$ac_eof
11176_ACEOF
11177
11178
11179ac_delim='%!_!# '
11180for ac_last_try in false false false false false :; do
11181  cat >conf$$subs.sed <<_ACEOF
11182MAKE_LIB!$MAKE_LIB$ac_delim
11183MAKE_SHARED_LIB!$MAKE_SHARED_LIB$ac_delim
11184MAKE_STATIC_LIB!$MAKE_STATIC_LIB$ac_delim
11185MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim
11186RANLIB_STUB!$RANLIB_STUB$ac_delim
11187VC_MANIFEST_EMBED_DLL!$VC_MANIFEST_EMBED_DLL$ac_delim
11188VC_MANIFEST_EMBED_EXE!$VC_MANIFEST_EMBED_EXE$ac_delim
11189TCLSH_PROG!$TCLSH_PROG$ac_delim
11190LIBOBJS!$LIBOBJS$ac_delim
11191LTLIBOBJS!$LTLIBOBJS$ac_delim
11192_ACEOF
11193
11194  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 10; then
11195    break
11196  elif $ac_last_try; then
11197    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
11198echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
11199   { (exit 1); exit 1; }; }
11200  else
11201    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11202  fi
11203done
11204
11205ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
11206if test -n "$ac_eof"; then
11207  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
11208  ac_eof=`expr $ac_eof + 1`
11209fi
11210
11211cat >>$CONFIG_STATUS <<_ACEOF
11212cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
11213/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
11214_ACEOF
11215sed '
11216s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
11217s/^/s,@/; s/!/@,|#_!!_#|/
11218:n
11219t n
11220s/'"$ac_delim"'$/,g/; t
11221s/$/\\/; p
11222N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
11223' >>$CONFIG_STATUS <conf$$subs.sed
11224rm -f conf$$subs.sed
11225cat >>$CONFIG_STATUS <<_ACEOF
11226:end
11227s/|#_!!_#|//g
11228CEOF$ac_eof
11229_ACEOF
11230
11231
11232# VPATH may cause trouble with some makes, so we remove $(srcdir),
11233# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11234# trailing colons and then remove the whole line if VPATH becomes empty
11235# (actually we leave an empty line to preserve line numbers).
11236if test "x$srcdir" = x.; then
11237  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
11238s/:*\$(srcdir):*/:/
11239s/:*\${srcdir}:*/:/
11240s/:*@srcdir@:*/:/
11241s/^\([^=]*=[	 ]*\):*/\1/
11242s/:*$//
11243s/^[^=]*=[	 ]*$//
11244}'
11245fi
11246
11247cat >>$CONFIG_STATUS <<\_ACEOF
11248fi # test -n "$CONFIG_FILES"
11249
11250
11251for ac_tag in  :F $CONFIG_FILES
11252do
11253  case $ac_tag in
11254  :[FHLC]) ac_mode=$ac_tag; continue;;
11255  esac
11256  case $ac_mode$ac_tag in
11257  :[FHL]*:*);;
11258  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
11259echo "$as_me: error: Invalid tag $ac_tag." >&2;}
11260   { (exit 1); exit 1; }; };;
11261  :[FH]-) ac_tag=-:-;;
11262  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
11263  esac
11264  ac_save_IFS=$IFS
11265  IFS=:
11266  set x $ac_tag
11267  IFS=$ac_save_IFS
11268  shift
11269  ac_file=$1
11270  shift
11271
11272  case $ac_mode in
11273  :L) ac_source=$1;;
11274  :[FH])
11275    ac_file_inputs=
11276    for ac_f
11277    do
11278      case $ac_f in
11279      -) ac_f="$tmp/stdin";;
11280      *) # Look for the file first in the build tree, then in the source tree
11281	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
11282	 # because $ac_f cannot contain `:'.
11283	 test -f "$ac_f" ||
11284	   case $ac_f in
11285	   [\\/$]*) false;;
11286	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
11287	   esac ||
11288	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
11289echo "$as_me: error: cannot find input file: $ac_f" >&2;}
11290   { (exit 1); exit 1; }; };;
11291      esac
11292      ac_file_inputs="$ac_file_inputs $ac_f"
11293    done
11294
11295    # Let's still pretend it is `configure' which instantiates (i.e., don't
11296    # use $as_me), people would be surprised to read:
11297    #    /* config.h.  Generated by config.status.  */
11298    configure_input="Generated from "`IFS=:
11299	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
11300    if test x"$ac_file" != x-; then
11301      configure_input="$ac_file.  $configure_input"
11302      { echo "$as_me:$LINENO: creating $ac_file" >&5
11303echo "$as_me: creating $ac_file" >&6;}
11304    fi
11305
11306    case $ac_tag in
11307    *:-:* | *:-) cat >"$tmp/stdin";;
11308    esac
11309    ;;
11310  esac
11311
11312  ac_dir=`$as_dirname -- "$ac_file" ||
11313$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11314	 X"$ac_file" : 'X\(//\)[^/]' \| \
11315	 X"$ac_file" : 'X\(//\)$' \| \
11316	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11317echo X"$ac_file" |
11318    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11319	    s//\1/
11320	    q
11321	  }
11322	  /^X\(\/\/\)[^/].*/{
11323	    s//\1/
11324	    q
11325	  }
11326	  /^X\(\/\/\)$/{
11327	    s//\1/
11328	    q
11329	  }
11330	  /^X\(\/\).*/{
11331	    s//\1/
11332	    q
11333	  }
11334	  s/.*/./; q'`
11335  { as_dir="$ac_dir"
11336  case $as_dir in #(
11337  -*) as_dir=./$as_dir;;
11338  esac
11339  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
11340    as_dirs=
11341    while :; do
11342      case $as_dir in #(
11343      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
11344      *) as_qdir=$as_dir;;
11345      esac
11346      as_dirs="'$as_qdir' $as_dirs"
11347      as_dir=`$as_dirname -- "$as_dir" ||
11348$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11349	 X"$as_dir" : 'X\(//\)[^/]' \| \
11350	 X"$as_dir" : 'X\(//\)$' \| \
11351	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
11352echo X"$as_dir" |
11353    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11354	    s//\1/
11355	    q
11356	  }
11357	  /^X\(\/\/\)[^/].*/{
11358	    s//\1/
11359	    q
11360	  }
11361	  /^X\(\/\/\)$/{
11362	    s//\1/
11363	    q
11364	  }
11365	  /^X\(\/\).*/{
11366	    s//\1/
11367	    q
11368	  }
11369	  s/.*/./; q'`
11370      test -d "$as_dir" && break
11371    done
11372    test -z "$as_dirs" || eval "mkdir $as_dirs"
11373  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
11374echo "$as_me: error: cannot create directory $as_dir" >&2;}
11375   { (exit 1); exit 1; }; }; }
11376  ac_builddir=.
11377
11378case "$ac_dir" in
11379.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
11380*)
11381  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
11382  # A ".." for each directory in $ac_dir_suffix.
11383  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
11384  case $ac_top_builddir_sub in
11385  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
11386  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
11387  esac ;;
11388esac
11389ac_abs_top_builddir=$ac_pwd
11390ac_abs_builddir=$ac_pwd$ac_dir_suffix
11391# for backward compatibility:
11392ac_top_builddir=$ac_top_build_prefix
11393
11394case $srcdir in
11395  .)  # We are building in place.
11396    ac_srcdir=.
11397    ac_top_srcdir=$ac_top_builddir_sub
11398    ac_abs_top_srcdir=$ac_pwd ;;
11399  [\\/]* | ?:[\\/]* )  # Absolute name.
11400    ac_srcdir=$srcdir$ac_dir_suffix;
11401    ac_top_srcdir=$srcdir
11402    ac_abs_top_srcdir=$srcdir ;;
11403  *) # Relative name.
11404    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
11405    ac_top_srcdir=$ac_top_build_prefix$srcdir
11406    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
11407esac
11408ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
11409
11410
11411  case $ac_mode in
11412  :F)
11413  #
11414  # CONFIG_FILE
11415  #
11416
11417  case $INSTALL in
11418  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11419  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
11420  esac
11421_ACEOF
11422
11423cat >>$CONFIG_STATUS <<\_ACEOF
11424# If the template does not know about datarootdir, expand it.
11425# FIXME: This hack should be removed a few years after 2.60.
11426ac_datarootdir_hack=; ac_datarootdir_seen=
11427
11428case `sed -n '/datarootdir/ {
11429  p
11430  q
11431}
11432/@datadir@/p
11433/@docdir@/p
11434/@infodir@/p
11435/@localedir@/p
11436/@mandir@/p
11437' $ac_file_inputs` in
11438*datarootdir*) ac_datarootdir_seen=yes;;
11439*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
11440  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
11441echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
11442_ACEOF
11443cat >>$CONFIG_STATUS <<_ACEOF
11444  ac_datarootdir_hack='
11445  s&@datadir@&$datadir&g
11446  s&@docdir@&$docdir&g
11447  s&@infodir@&$infodir&g
11448  s&@localedir@&$localedir&g
11449  s&@mandir@&$mandir&g
11450    s&\\\${datarootdir}&$datarootdir&g' ;;
11451esac
11452_ACEOF
11453
11454# Neutralize VPATH when `$srcdir' = `.'.
11455# Shell code in configure.ac might set extrasub.
11456# FIXME: do we really want to maintain this feature?
11457cat >>$CONFIG_STATUS <<_ACEOF
11458  sed "$ac_vpsub
11459$extrasub
11460_ACEOF
11461cat >>$CONFIG_STATUS <<\_ACEOF
11462:t
11463/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11464s&@configure_input@&$configure_input&;t t
11465s&@top_builddir@&$ac_top_builddir_sub&;t t
11466s&@srcdir@&$ac_srcdir&;t t
11467s&@abs_srcdir@&$ac_abs_srcdir&;t t
11468s&@top_srcdir@&$ac_top_srcdir&;t t
11469s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
11470s&@builddir@&$ac_builddir&;t t
11471s&@abs_builddir@&$ac_abs_builddir&;t t
11472s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
11473s&@INSTALL@&$ac_INSTALL&;t t
11474$ac_datarootdir_hack
11475" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
11476
11477test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
11478  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
11479  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
11480  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11481which seems to be undefined.  Please make sure it is defined." >&5
11482echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11483which seems to be undefined.  Please make sure it is defined." >&2;}
11484
11485  rm -f "$tmp/stdin"
11486  case $ac_file in
11487  -) cat "$tmp/out"; rm -f "$tmp/out";;
11488  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
11489  esac
11490 ;;
11491
11492
11493
11494  esac
11495
11496done # for ac_tag
11497
11498
11499{ (exit 0); exit 0; }
11500_ACEOF
11501chmod +x $CONFIG_STATUS
11502ac_clean_files=$ac_clean_files_save
11503
11504
11505# configure is writing to config.log, and then calls config.status.
11506# config.status does its own redirection, appending to config.log.
11507# Unfortunately, on DOS this fails, as config.log is still kept open
11508# by configure, so config.status won't be able to write to it; its
11509# output is simply discarded.  So we exec the FD to /dev/null,
11510# effectively closing config.log, so it can be properly (re)opened and
11511# appended to by config.status.  When coming back to configure, we
11512# need to make the FD available again.
11513if test "$no_create" != yes; then
11514  ac_cs_success=:
11515  ac_config_status_args=
11516  test "$silent" = yes &&
11517    ac_config_status_args="$ac_config_status_args --quiet"
11518  exec 5>/dev/null
11519  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
11520  exec 5>>config.log
11521  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
11522  # would make configure fail if this is the last instruction.
11523  $ac_cs_success || { (exit 1); exit 1; }
11524fi
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582