1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.61 for mmap 1.1.
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='mmap'
574PACKAGE_TARNAME='mmap'
575PACKAGE_VERSION='1.1'
576PACKAGE_STRING='mmap 1.1'
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_BIN_DIR
665TCL_SRC_DIR
666TCL_LIB_FILE
667TCL_LIB_FLAG
668TCL_LIB_SPEC
669TCL_STUB_LIB_FILE
670TCL_STUB_LIB_FLAG
671TCL_STUB_LIB_SPEC
672TCL_LIBS
673TCL_DEFS
674TCL_EXTRA_CFLAGS
675TCL_LD_FLAGS
676TCL_SHLIB_LD_LIBS
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682OBJEXT
683CPP
684INSTALL_PROGRAM
685INSTALL_SCRIPT
686INSTALL_DATA
687SET_MAKE
688RANLIB
689GREP
690EGREP
691MATH_LIBS
692PKG_SOURCES
693PKG_OBJECTS
694CLEANFILES
695TCL_INCLUDES
696TCL_THREADS
697SHARED_BUILD
698AR
699CELIB_DIR
700LIBOBJS
701DL_LIBS
702CFLAGS_DEBUG
703CFLAGS_OPTIMIZE
704CFLAGS_WARNING
705STLIB_LD
706SHLIB_LD
707SHLIB_LD_LIBS
708SHLIB_CFLAGS
709LD_LIBRARY_PATH_VAR
710CFLAGS_DEFAULT
711LDFLAGS_DEFAULT
712TCL_DBGX
713MAKE_LIB
714MAKE_SHARED_LIB
715MAKE_STATIC_LIB
716MAKE_STUB_LIB
717RANLIB_STUB
718TCLSH_PROG
719LTLIBOBJS'
720ac_subst_files=''
721      ac_precious_vars='build_alias
722host_alias
723target_alias
724CC
725CFLAGS
726LDFLAGS
727LIBS
728CPPFLAGS
729CPP'
730
731
732# Initialize some variables set by options.
733ac_init_help=
734ac_init_version=false
735# The variables have the same names as the options, with
736# dashes changed to underlines.
737cache_file=/dev/null
738exec_prefix=NONE
739no_create=
740no_recursion=
741prefix=NONE
742program_prefix=NONE
743program_suffix=NONE
744program_transform_name=s,x,x,
745silent=
746site=
747srcdir=
748verbose=
749x_includes=NONE
750x_libraries=NONE
751
752# Installation directory options.
753# These are left unexpanded so users can "make install exec_prefix=/foo"
754# and all the variables that are supposed to be based on exec_prefix
755# by default will actually change.
756# Use braces instead of parens because sh, perl, etc. also accept them.
757# (The list follows the same order as the GNU Coding Standards.)
758bindir='${exec_prefix}/bin'
759sbindir='${exec_prefix}/sbin'
760libexecdir='${exec_prefix}/libexec'
761datarootdir='${prefix}/share'
762datadir='${datarootdir}'
763sysconfdir='${prefix}/etc'
764sharedstatedir='${prefix}/com'
765localstatedir='${prefix}/var'
766includedir='${prefix}/include'
767oldincludedir='/usr/include'
768docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
769infodir='${datarootdir}/info'
770htmldir='${docdir}'
771dvidir='${docdir}'
772pdfdir='${docdir}'
773psdir='${docdir}'
774libdir='${exec_prefix}/lib'
775localedir='${datarootdir}/locale'
776mandir='${datarootdir}/man'
777
778ac_prev=
779ac_dashdash=
780for ac_option
781do
782  # If the previous option needs an argument, assign it.
783  if test -n "$ac_prev"; then
784    eval $ac_prev=\$ac_option
785    ac_prev=
786    continue
787  fi
788
789  case $ac_option in
790  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
791  *)	ac_optarg=yes ;;
792  esac
793
794  # Accept the important Cygnus configure options, so we can diagnose typos.
795
796  case $ac_dashdash$ac_option in
797  --)
798    ac_dashdash=yes ;;
799
800  -bindir | --bindir | --bindi | --bind | --bin | --bi)
801    ac_prev=bindir ;;
802  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
803    bindir=$ac_optarg ;;
804
805  -build | --build | --buil | --bui | --bu)
806    ac_prev=build_alias ;;
807  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
808    build_alias=$ac_optarg ;;
809
810  -cache-file | --cache-file | --cache-fil | --cache-fi \
811  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
812    ac_prev=cache_file ;;
813  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
814  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
815    cache_file=$ac_optarg ;;
816
817  --config-cache | -C)
818    cache_file=config.cache ;;
819
820  -datadir | --datadir | --datadi | --datad)
821    ac_prev=datadir ;;
822  -datadir=* | --datadir=* | --datadi=* | --datad=*)
823    datadir=$ac_optarg ;;
824
825  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
826  | --dataroo | --dataro | --datar)
827    ac_prev=datarootdir ;;
828  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
829  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
830    datarootdir=$ac_optarg ;;
831
832  -disable-* | --disable-*)
833    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
834    # Reject names that are not valid shell variable names.
835    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
836      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
837   { (exit 1); exit 1; }; }
838    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
839    eval enable_$ac_feature=no ;;
840
841  -docdir | --docdir | --docdi | --doc | --do)
842    ac_prev=docdir ;;
843  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
844    docdir=$ac_optarg ;;
845
846  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
847    ac_prev=dvidir ;;
848  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
849    dvidir=$ac_optarg ;;
850
851  -enable-* | --enable-*)
852    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
853    # Reject names that are not valid shell variable names.
854    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
855      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
856   { (exit 1); exit 1; }; }
857    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
858    eval enable_$ac_feature=\$ac_optarg ;;
859
860  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
861  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
862  | --exec | --exe | --ex)
863    ac_prev=exec_prefix ;;
864  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
865  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
866  | --exec=* | --exe=* | --ex=*)
867    exec_prefix=$ac_optarg ;;
868
869  -gas | --gas | --ga | --g)
870    # Obsolete; use --with-gas.
871    with_gas=yes ;;
872
873  -help | --help | --hel | --he | -h)
874    ac_init_help=long ;;
875  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
876    ac_init_help=recursive ;;
877  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
878    ac_init_help=short ;;
879
880  -host | --host | --hos | --ho)
881    ac_prev=host_alias ;;
882  -host=* | --host=* | --hos=* | --ho=*)
883    host_alias=$ac_optarg ;;
884
885  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
886    ac_prev=htmldir ;;
887  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
888  | --ht=*)
889    htmldir=$ac_optarg ;;
890
891  -includedir | --includedir | --includedi | --included | --include \
892  | --includ | --inclu | --incl | --inc)
893    ac_prev=includedir ;;
894  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
895  | --includ=* | --inclu=* | --incl=* | --inc=*)
896    includedir=$ac_optarg ;;
897
898  -infodir | --infodir | --infodi | --infod | --info | --inf)
899    ac_prev=infodir ;;
900  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
901    infodir=$ac_optarg ;;
902
903  -libdir | --libdir | --libdi | --libd)
904    ac_prev=libdir ;;
905  -libdir=* | --libdir=* | --libdi=* | --libd=*)
906    libdir=$ac_optarg ;;
907
908  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
909  | --libexe | --libex | --libe)
910    ac_prev=libexecdir ;;
911  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
912  | --libexe=* | --libex=* | --libe=*)
913    libexecdir=$ac_optarg ;;
914
915  -localedir | --localedir | --localedi | --localed | --locale)
916    ac_prev=localedir ;;
917  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
918    localedir=$ac_optarg ;;
919
920  -localstatedir | --localstatedir | --localstatedi | --localstated \
921  | --localstate | --localstat | --localsta | --localst | --locals)
922    ac_prev=localstatedir ;;
923  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
924  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
925    localstatedir=$ac_optarg ;;
926
927  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
928    ac_prev=mandir ;;
929  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
930    mandir=$ac_optarg ;;
931
932  -nfp | --nfp | --nf)
933    # Obsolete; use --without-fp.
934    with_fp=no ;;
935
936  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
937  | --no-cr | --no-c | -n)
938    no_create=yes ;;
939
940  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
941  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
942    no_recursion=yes ;;
943
944  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
945  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
946  | --oldin | --oldi | --old | --ol | --o)
947    ac_prev=oldincludedir ;;
948  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
949  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
950  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
951    oldincludedir=$ac_optarg ;;
952
953  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
954    ac_prev=prefix ;;
955  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
956    prefix=$ac_optarg ;;
957
958  -program-prefix | --program-prefix | --program-prefi | --program-pref \
959  | --program-pre | --program-pr | --program-p)
960    ac_prev=program_prefix ;;
961  -program-prefix=* | --program-prefix=* | --program-prefi=* \
962  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
963    program_prefix=$ac_optarg ;;
964
965  -program-suffix | --program-suffix | --program-suffi | --program-suff \
966  | --program-suf | --program-su | --program-s)
967    ac_prev=program_suffix ;;
968  -program-suffix=* | --program-suffix=* | --program-suffi=* \
969  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
970    program_suffix=$ac_optarg ;;
971
972  -program-transform-name | --program-transform-name \
973  | --program-transform-nam | --program-transform-na \
974  | --program-transform-n | --program-transform- \
975  | --program-transform | --program-transfor \
976  | --program-transfo | --program-transf \
977  | --program-trans | --program-tran \
978  | --progr-tra | --program-tr | --program-t)
979    ac_prev=program_transform_name ;;
980  -program-transform-name=* | --program-transform-name=* \
981  | --program-transform-nam=* | --program-transform-na=* \
982  | --program-transform-n=* | --program-transform-=* \
983  | --program-transform=* | --program-transfor=* \
984  | --program-transfo=* | --program-transf=* \
985  | --program-trans=* | --program-tran=* \
986  | --progr-tra=* | --program-tr=* | --program-t=*)
987    program_transform_name=$ac_optarg ;;
988
989  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
990    ac_prev=pdfdir ;;
991  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
992    pdfdir=$ac_optarg ;;
993
994  -psdir | --psdir | --psdi | --psd | --ps)
995    ac_prev=psdir ;;
996  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
997    psdir=$ac_optarg ;;
998
999  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1000  | -silent | --silent | --silen | --sile | --sil)
1001    silent=yes ;;
1002
1003  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1004    ac_prev=sbindir ;;
1005  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1006  | --sbi=* | --sb=*)
1007    sbindir=$ac_optarg ;;
1008
1009  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1010  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1011  | --sharedst | --shareds | --shared | --share | --shar \
1012  | --sha | --sh)
1013    ac_prev=sharedstatedir ;;
1014  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1015  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1016  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1017  | --sha=* | --sh=*)
1018    sharedstatedir=$ac_optarg ;;
1019
1020  -site | --site | --sit)
1021    ac_prev=site ;;
1022  -site=* | --site=* | --sit=*)
1023    site=$ac_optarg ;;
1024
1025  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1026    ac_prev=srcdir ;;
1027  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1028    srcdir=$ac_optarg ;;
1029
1030  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1031  | --syscon | --sysco | --sysc | --sys | --sy)
1032    ac_prev=sysconfdir ;;
1033  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1034  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1035    sysconfdir=$ac_optarg ;;
1036
1037  -target | --target | --targe | --targ | --tar | --ta | --t)
1038    ac_prev=target_alias ;;
1039  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1040    target_alias=$ac_optarg ;;
1041
1042  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1043    verbose=yes ;;
1044
1045  -version | --version | --versio | --versi | --vers | -V)
1046    ac_init_version=: ;;
1047
1048  -with-* | --with-*)
1049    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1050    # Reject names that are not valid shell variable names.
1051    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1052      { echo "$as_me: error: invalid package name: $ac_package" >&2
1053   { (exit 1); exit 1; }; }
1054    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1055    eval with_$ac_package=\$ac_optarg ;;
1056
1057  -without-* | --without-*)
1058    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1059    # Reject names that are not valid shell variable names.
1060    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1061      { echo "$as_me: error: invalid package name: $ac_package" >&2
1062   { (exit 1); exit 1; }; }
1063    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1064    eval with_$ac_package=no ;;
1065
1066  --x)
1067    # Obsolete; use --with-x.
1068    with_x=yes ;;
1069
1070  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1071  | --x-incl | --x-inc | --x-in | --x-i)
1072    ac_prev=x_includes ;;
1073  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1074  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1075    x_includes=$ac_optarg ;;
1076
1077  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1078  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1079    ac_prev=x_libraries ;;
1080  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1081  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1082    x_libraries=$ac_optarg ;;
1083
1084  -*) { echo "$as_me: error: unrecognized option: $ac_option
1085Try \`$0 --help' for more information." >&2
1086   { (exit 1); exit 1; }; }
1087    ;;
1088
1089  *=*)
1090    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1091    # Reject names that are not valid shell variable names.
1092    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1093      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1094   { (exit 1); exit 1; }; }
1095    eval $ac_envvar=\$ac_optarg
1096    export $ac_envvar ;;
1097
1098  *)
1099    # FIXME: should be removed in autoconf 3.0.
1100    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1101    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1102      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1103    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1104    ;;
1105
1106  esac
1107done
1108
1109if test -n "$ac_prev"; then
1110  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1111  { echo "$as_me: error: missing argument to $ac_option" >&2
1112   { (exit 1); exit 1; }; }
1113fi
1114
1115# Be sure to have absolute directory names.
1116for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1117		datadir sysconfdir sharedstatedir localstatedir includedir \
1118		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1119		libdir localedir mandir
1120do
1121  eval ac_val=\$$ac_var
1122  case $ac_val in
1123    [\\/$]* | ?:[\\/]* )  continue;;
1124    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1125  esac
1126  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1127   { (exit 1); exit 1; }; }
1128done
1129
1130# There might be people who depend on the old broken behavior: `$host'
1131# used to hold the argument of --host etc.
1132# FIXME: To remove some day.
1133build=$build_alias
1134host=$host_alias
1135target=$target_alias
1136
1137# FIXME: To remove some day.
1138if test "x$host_alias" != x; then
1139  if test "x$build_alias" = x; then
1140    cross_compiling=maybe
1141    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1142    If a cross compiler is detected then cross compile mode will be used." >&2
1143  elif test "x$build_alias" != "x$host_alias"; then
1144    cross_compiling=yes
1145  fi
1146fi
1147
1148ac_tool_prefix=
1149test -n "$host_alias" && ac_tool_prefix=$host_alias-
1150
1151test "$silent" = yes && exec 6>/dev/null
1152
1153
1154ac_pwd=`pwd` && test -n "$ac_pwd" &&
1155ac_ls_di=`ls -di .` &&
1156ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1157  { echo "$as_me: error: Working directory cannot be determined" >&2
1158   { (exit 1); exit 1; }; }
1159test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1160  { echo "$as_me: error: pwd does not report name of working directory" >&2
1161   { (exit 1); exit 1; }; }
1162
1163
1164# Find the source files, if location was not specified.
1165if test -z "$srcdir"; then
1166  ac_srcdir_defaulted=yes
1167  # Try the directory containing this script, then the parent directory.
1168  ac_confdir=`$as_dirname -- "$0" ||
1169$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1170	 X"$0" : 'X\(//\)[^/]' \| \
1171	 X"$0" : 'X\(//\)$' \| \
1172	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1173echo X"$0" |
1174    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1175	    s//\1/
1176	    q
1177	  }
1178	  /^X\(\/\/\)[^/].*/{
1179	    s//\1/
1180	    q
1181	  }
1182	  /^X\(\/\/\)$/{
1183	    s//\1/
1184	    q
1185	  }
1186	  /^X\(\/\).*/{
1187	    s//\1/
1188	    q
1189	  }
1190	  s/.*/./; q'`
1191  srcdir=$ac_confdir
1192  if test ! -r "$srcdir/$ac_unique_file"; then
1193    srcdir=..
1194  fi
1195else
1196  ac_srcdir_defaulted=no
1197fi
1198if test ! -r "$srcdir/$ac_unique_file"; then
1199  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1200  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1201   { (exit 1); exit 1; }; }
1202fi
1203ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1204ac_abs_confdir=`(
1205	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1206   { (exit 1); exit 1; }; }
1207	pwd)`
1208# When building in place, set srcdir=.
1209if test "$ac_abs_confdir" = "$ac_pwd"; then
1210  srcdir=.
1211fi
1212# Remove unnecessary trailing slashes from srcdir.
1213# Double slashes in file names in object file debugging info
1214# mess up M-x gdb in Emacs.
1215case $srcdir in
1216*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1217esac
1218for ac_var in $ac_precious_vars; do
1219  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1220  eval ac_env_${ac_var}_value=\$${ac_var}
1221  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1222  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1223done
1224
1225#
1226# Report the --help message.
1227#
1228if test "$ac_init_help" = "long"; then
1229  # Omit some internal or obsolete options to make the list less imposing.
1230  # This message is too long to be a string in the A/UX 3.1 sh.
1231  cat <<_ACEOF
1232\`configure' configures mmap 1.1 to adapt to many kinds of systems.
1233
1234Usage: $0 [OPTION]... [VAR=VALUE]...
1235
1236To assign environment variables (e.g., CC, CFLAGS...), specify them as
1237VAR=VALUE.  See below for descriptions of some of the useful variables.
1238
1239Defaults for the options are specified in brackets.
1240
1241Configuration:
1242  -h, --help              display this help and exit
1243      --help=short        display options specific to this package
1244      --help=recursive    display the short help of all the included packages
1245  -V, --version           display version information and exit
1246  -q, --quiet, --silent   do not print \`checking...' messages
1247      --cache-file=FILE   cache test results in FILE [disabled]
1248  -C, --config-cache      alias for \`--cache-file=config.cache'
1249  -n, --no-create         do not create output files
1250      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1251
1252Installation directories:
1253  --prefix=PREFIX         install architecture-independent files in PREFIX
1254			  [$ac_default_prefix]
1255  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1256			  [PREFIX]
1257
1258By default, \`make install' will install all the files in
1259\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1260an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1261for instance \`--prefix=\$HOME'.
1262
1263For better control, use the options below.
1264
1265Fine tuning of the installation directories:
1266  --bindir=DIR           user executables [EPREFIX/bin]
1267  --sbindir=DIR          system admin executables [EPREFIX/sbin]
1268  --libexecdir=DIR       program executables [EPREFIX/libexec]
1269  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1270  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1271  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1272  --libdir=DIR           object code libraries [EPREFIX/lib]
1273  --includedir=DIR       C header files [PREFIX/include]
1274  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1275  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1276  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1277  --infodir=DIR          info documentation [DATAROOTDIR/info]
1278  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1279  --mandir=DIR           man documentation [DATAROOTDIR/man]
1280  --docdir=DIR           documentation root [DATAROOTDIR/doc/mmap]
1281  --htmldir=DIR          html documentation [DOCDIR]
1282  --dvidir=DIR           dvi documentation [DOCDIR]
1283  --pdfdir=DIR           pdf documentation [DOCDIR]
1284  --psdir=DIR            ps documentation [DOCDIR]
1285_ACEOF
1286
1287  cat <<\_ACEOF
1288_ACEOF
1289fi
1290
1291if test -n "$ac_init_help"; then
1292  case $ac_init_help in
1293     short | recursive ) echo "Configuration of mmap 1.1:";;
1294   esac
1295  cat <<\_ACEOF
1296
1297Optional Features:
1298  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1299  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1300  --enable-threads        build with threads
1301  --enable-shared         build and link with shared libraries (default: on)
1302  --enable-64bit          enable 64bit support (default: off)
1303  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1304  --disable-rpath         disable rpath support (default: on)
1305  --enable-wince          enable Win/CE support (where applicable)
1306  --enable-load           allow dynamic loading and "load" command (default:
1307                          on)
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-tcl              directory containing tcl configuration
1314                          (tclConfig.sh)
1315  --with-tclinclude       directory containing the public Tcl header files
1316  --with-celib=DIR        use Windows/CE support library from DIR
1317
1318Some influential environment variables:
1319  CC          C compiler command
1320  CFLAGS      C compiler flags
1321  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1322              nonstandard directory <lib dir>
1323  LIBS        libraries to pass to the linker, e.g. -l<library>
1324  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1325              you have headers in a nonstandard directory <include dir>
1326  CPP         C preprocessor
1327
1328Use these variables to override the choices made by `configure' or to help
1329it to find libraries and programs with nonstandard names/locations.
1330
1331_ACEOF
1332ac_status=$?
1333fi
1334
1335if test "$ac_init_help" = "recursive"; then
1336  # If there are subdirs, report their specific --help.
1337  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1338    test -d "$ac_dir" || continue
1339    ac_builddir=.
1340
1341case "$ac_dir" in
1342.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1343*)
1344  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1345  # A ".." for each directory in $ac_dir_suffix.
1346  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1347  case $ac_top_builddir_sub in
1348  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1349  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1350  esac ;;
1351esac
1352ac_abs_top_builddir=$ac_pwd
1353ac_abs_builddir=$ac_pwd$ac_dir_suffix
1354# for backward compatibility:
1355ac_top_builddir=$ac_top_build_prefix
1356
1357case $srcdir in
1358  .)  # We are building in place.
1359    ac_srcdir=.
1360    ac_top_srcdir=$ac_top_builddir_sub
1361    ac_abs_top_srcdir=$ac_pwd ;;
1362  [\\/]* | ?:[\\/]* )  # Absolute name.
1363    ac_srcdir=$srcdir$ac_dir_suffix;
1364    ac_top_srcdir=$srcdir
1365    ac_abs_top_srcdir=$srcdir ;;
1366  *) # Relative name.
1367    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1368    ac_top_srcdir=$ac_top_build_prefix$srcdir
1369    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1370esac
1371ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1372
1373    cd "$ac_dir" || { ac_status=$?; continue; }
1374    # Check for guested configure.
1375    if test -f "$ac_srcdir/configure.gnu"; then
1376      echo &&
1377      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1378    elif test -f "$ac_srcdir/configure"; then
1379      echo &&
1380      $SHELL "$ac_srcdir/configure" --help=recursive
1381    else
1382      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1383    fi || ac_status=$?
1384    cd "$ac_pwd" || { ac_status=$?; break; }
1385  done
1386fi
1387
1388test -n "$ac_init_help" && exit $ac_status
1389if $ac_init_version; then
1390  cat <<\_ACEOF
1391mmap configure 1.1
1392generated by GNU Autoconf 2.61
1393
1394Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
13952002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1396This configure script is free software; the Free Software Foundation
1397gives unlimited permission to copy, distribute and modify it.
1398_ACEOF
1399  exit
1400fi
1401cat >config.log <<_ACEOF
1402This file contains any messages produced by compilers while
1403running configure, to aid debugging if configure makes a mistake.
1404
1405It was created by mmap $as_me 1.1, which was
1406generated by GNU Autoconf 2.61.  Invocation command line was
1407
1408  $ $0 $@
1409
1410_ACEOF
1411exec 5>>config.log
1412{
1413cat <<_ASUNAME
1414## --------- ##
1415## Platform. ##
1416## --------- ##
1417
1418hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1419uname -m = `(uname -m) 2>/dev/null || echo unknown`
1420uname -r = `(uname -r) 2>/dev/null || echo unknown`
1421uname -s = `(uname -s) 2>/dev/null || echo unknown`
1422uname -v = `(uname -v) 2>/dev/null || echo unknown`
1423
1424/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1425/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1426
1427/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1428/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1429/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1430/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1431/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1432/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1433/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1434
1435_ASUNAME
1436
1437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1438for as_dir in $PATH
1439do
1440  IFS=$as_save_IFS
1441  test -z "$as_dir" && as_dir=.
1442  echo "PATH: $as_dir"
1443done
1444IFS=$as_save_IFS
1445
1446} >&5
1447
1448cat >&5 <<_ACEOF
1449
1450
1451## ----------- ##
1452## Core tests. ##
1453## ----------- ##
1454
1455_ACEOF
1456
1457
1458# Keep a trace of the command line.
1459# Strip out --no-create and --no-recursion so they do not pile up.
1460# Strip out --silent because we don't want to record it for future runs.
1461# Also quote any args containing shell meta-characters.
1462# Make two passes to allow for proper duplicate-argument suppression.
1463ac_configure_args=
1464ac_configure_args0=
1465ac_configure_args1=
1466ac_must_keep_next=false
1467for ac_pass in 1 2
1468do
1469  for ac_arg
1470  do
1471    case $ac_arg in
1472    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1473    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1474    | -silent | --silent | --silen | --sile | --sil)
1475      continue ;;
1476    *\'*)
1477      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1478    esac
1479    case $ac_pass in
1480    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1481    2)
1482      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1483      if test $ac_must_keep_next = true; then
1484	ac_must_keep_next=false # Got value, back to normal.
1485      else
1486	case $ac_arg in
1487	  *=* | --config-cache | -C | -disable-* | --disable-* \
1488	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1489	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1490	  | -with-* | --with-* | -without-* | --without-* | --x)
1491	    case "$ac_configure_args0 " in
1492	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1493	    esac
1494	    ;;
1495	  -* ) ac_must_keep_next=true ;;
1496	esac
1497      fi
1498      ac_configure_args="$ac_configure_args '$ac_arg'"
1499      ;;
1500    esac
1501  done
1502done
1503$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1504$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1505
1506# When interrupted or exit'd, cleanup temporary files, and complete
1507# config.log.  We remove comments because anyway the quotes in there
1508# would cause problems or look ugly.
1509# WARNING: Use '\'' to represent an apostrophe within the trap.
1510# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1511trap 'exit_status=$?
1512  # Save into config.log some information that might help in debugging.
1513  {
1514    echo
1515
1516    cat <<\_ASBOX
1517## ---------------- ##
1518## Cache variables. ##
1519## ---------------- ##
1520_ASBOX
1521    echo
1522    # The following way of writing the cache mishandles newlines in values,
1523(
1524  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1525    eval ac_val=\$$ac_var
1526    case $ac_val in #(
1527    *${as_nl}*)
1528      case $ac_var in #(
1529      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1530echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1531      esac
1532      case $ac_var in #(
1533      _ | IFS | as_nl) ;; #(
1534      *) $as_unset $ac_var ;;
1535      esac ;;
1536    esac
1537  done
1538  (set) 2>&1 |
1539    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1540    *${as_nl}ac_space=\ *)
1541      sed -n \
1542	"s/'\''/'\''\\\\'\'''\''/g;
1543	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1544      ;; #(
1545    *)
1546      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1547      ;;
1548    esac |
1549    sort
1550)
1551    echo
1552
1553    cat <<\_ASBOX
1554## ----------------- ##
1555## Output variables. ##
1556## ----------------- ##
1557_ASBOX
1558    echo
1559    for ac_var in $ac_subst_vars
1560    do
1561      eval ac_val=\$$ac_var
1562      case $ac_val in
1563      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1564      esac
1565      echo "$ac_var='\''$ac_val'\''"
1566    done | sort
1567    echo
1568
1569    if test -n "$ac_subst_files"; then
1570      cat <<\_ASBOX
1571## ------------------- ##
1572## File substitutions. ##
1573## ------------------- ##
1574_ASBOX
1575      echo
1576      for ac_var in $ac_subst_files
1577      do
1578	eval ac_val=\$$ac_var
1579	case $ac_val in
1580	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1581	esac
1582	echo "$ac_var='\''$ac_val'\''"
1583      done | sort
1584      echo
1585    fi
1586
1587    if test -s confdefs.h; then
1588      cat <<\_ASBOX
1589## ----------- ##
1590## confdefs.h. ##
1591## ----------- ##
1592_ASBOX
1593      echo
1594      cat confdefs.h
1595      echo
1596    fi
1597    test "$ac_signal" != 0 &&
1598      echo "$as_me: caught signal $ac_signal"
1599    echo "$as_me: exit $exit_status"
1600  } >&5
1601  rm -f core *.core core.conftest.* &&
1602    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1603    exit $exit_status
1604' 0
1605for ac_signal in 1 2 13 15; do
1606  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1607done
1608ac_signal=0
1609
1610# confdefs.h avoids OS command line length limits that DEFS can exceed.
1611rm -f -r conftest* confdefs.h
1612
1613# Predefined preprocessor variables.
1614
1615cat >>confdefs.h <<_ACEOF
1616#define PACKAGE_NAME "$PACKAGE_NAME"
1617_ACEOF
1618
1619
1620cat >>confdefs.h <<_ACEOF
1621#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1622_ACEOF
1623
1624
1625cat >>confdefs.h <<_ACEOF
1626#define PACKAGE_VERSION "$PACKAGE_VERSION"
1627_ACEOF
1628
1629
1630cat >>confdefs.h <<_ACEOF
1631#define PACKAGE_STRING "$PACKAGE_STRING"
1632_ACEOF
1633
1634
1635cat >>confdefs.h <<_ACEOF
1636#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1637_ACEOF
1638
1639
1640# Let the site file select an alternate cache file if it wants to.
1641# Prefer explicitly selected file to automatically selected ones.
1642if test -n "$CONFIG_SITE"; then
1643  set x "$CONFIG_SITE"
1644elif test "x$prefix" != xNONE; then
1645  set x "$prefix/share/config.site" "$prefix/etc/config.site"
1646else
1647  set x "$ac_default_prefix/share/config.site" \
1648	"$ac_default_prefix/etc/config.site"
1649fi
1650shift
1651for ac_site_file
1652do
1653  if test -r "$ac_site_file"; then
1654    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1655echo "$as_me: loading site script $ac_site_file" >&6;}
1656    sed 's/^/| /' "$ac_site_file" >&5
1657    . "$ac_site_file"
1658  fi
1659done
1660
1661if test -r "$cache_file"; then
1662  # Some versions of bash will fail to source /dev/null (special
1663  # files actually), so we avoid doing that.
1664  if test -f "$cache_file"; then
1665    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1666echo "$as_me: loading cache $cache_file" >&6;}
1667    case $cache_file in
1668      [\\/]* | ?:[\\/]* ) . "$cache_file";;
1669      *)                      . "./$cache_file";;
1670    esac
1671  fi
1672else
1673  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1674echo "$as_me: creating cache $cache_file" >&6;}
1675  >$cache_file
1676fi
1677
1678# Check that the precious variables saved in the cache have kept the same
1679# value.
1680ac_cache_corrupted=false
1681for ac_var in $ac_precious_vars; do
1682  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1683  eval ac_new_set=\$ac_env_${ac_var}_set
1684  eval ac_old_val=\$ac_cv_env_${ac_var}_value
1685  eval ac_new_val=\$ac_env_${ac_var}_value
1686  case $ac_old_set,$ac_new_set in
1687    set,)
1688      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1689echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1690      ac_cache_corrupted=: ;;
1691    ,set)
1692      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1693echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1694      ac_cache_corrupted=: ;;
1695    ,);;
1696    *)
1697      if test "x$ac_old_val" != "x$ac_new_val"; then
1698	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1699echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1700	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1701echo "$as_me:   former value:  $ac_old_val" >&2;}
1702	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1703echo "$as_me:   current value: $ac_new_val" >&2;}
1704	ac_cache_corrupted=:
1705      fi;;
1706  esac
1707  # Pass precious variables to config.status.
1708  if test "$ac_new_set" = set; then
1709    case $ac_new_val in
1710    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1711    *) ac_arg=$ac_var=$ac_new_val ;;
1712    esac
1713    case " $ac_configure_args " in
1714      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1715      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1716    esac
1717  fi
1718done
1719if $ac_cache_corrupted; then
1720  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1721echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1722  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1723echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1724   { (exit 1); exit 1; }; }
1725fi
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751ac_ext=c
1752ac_cpp='$CPP $CPPFLAGS'
1753ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1754ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1755ac_compiler_gnu=$ac_cv_c_compiler_gnu
1756
1757
1758
1759#--------------------------------------------------------------------
1760# Call TEA_INIT as the first TEA_ macro to set up initial vars.
1761# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
1762# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
1763#--------------------------------------------------------------------
1764
1765
1766    # TEA extensions pass this us the version of TEA they think they
1767    # are compatible with.
1768    TEA_VERSION="3.6"
1769
1770    { echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
1771echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6; }
1772    if test x"${PACKAGE_NAME}" = x ; then
1773	{ { echo "$as_me:$LINENO: error:
1774The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
1775echo "$as_me: error:
1776The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
1777   { (exit 1); exit 1; }; }
1778    fi
1779    if test x"3.6" = x ; then
1780	{ { echo "$as_me:$LINENO: error:
1781TEA version not specified." >&5
1782echo "$as_me: error:
1783TEA version not specified." >&2;}
1784   { (exit 1); exit 1; }; }
1785    elif test "3.6" != "${TEA_VERSION}" ; then
1786	{ echo "$as_me:$LINENO: result: warning: requested TEA version \"3.6\", have \"${TEA_VERSION}\"" >&5
1787echo "${ECHO_T}warning: requested TEA version \"3.6\", have \"${TEA_VERSION}\"" >&6; }
1788    else
1789	{ echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
1790echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6; }
1791    fi
1792    case "`uname -s`" in
1793	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
1794	    # Extract the first word of "cygpath", so it can be a program name with args.
1795set dummy cygpath; ac_word=$2
1796{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1797echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1798if test "${ac_cv_prog_CYGPATH+set}" = set; then
1799  echo $ECHO_N "(cached) $ECHO_C" >&6
1800else
1801  if test -n "$CYGPATH"; then
1802  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1803else
1804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1805for as_dir in $PATH
1806do
1807  IFS=$as_save_IFS
1808  test -z "$as_dir" && as_dir=.
1809  for ac_exec_ext in '' $ac_executable_extensions; do
1810  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1811    ac_cv_prog_CYGPATH="cygpath -w"
1812    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1813    break 2
1814  fi
1815done
1816done
1817IFS=$as_save_IFS
1818
1819  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1820fi
1821fi
1822CYGPATH=$ac_cv_prog_CYGPATH
1823if test -n "$CYGPATH"; then
1824  { echo "$as_me:$LINENO: result: $CYGPATH" >&5
1825echo "${ECHO_T}$CYGPATH" >&6; }
1826else
1827  { echo "$as_me:$LINENO: result: no" >&5
1828echo "${ECHO_T}no" >&6; }
1829fi
1830
1831
1832	    EXEEXT=".exe"
1833	    TEA_PLATFORM="windows"
1834	    ;;
1835	*)
1836	    CYGPATH=echo
1837	    EXEEXT=""
1838	    TEA_PLATFORM="unix"
1839	    ;;
1840    esac
1841
1842    # Check if exec_prefix is set. If not use fall back to prefix.
1843    # Note when adjusted, so that TEA_PREFIX can correct for this.
1844    # This is needed for recursive configures, since autoconf propagates
1845    # $prefix, but not $exec_prefix (doh!).
1846    if test x$exec_prefix = xNONE ; then
1847	exec_prefix_default=yes
1848	exec_prefix=$prefix
1849    fi
1850
1851
1852
1853
1854    # This package name must be replaced statically for AC_SUBST to work
1855
1856    # Substitute STUB_LIB_FILE in case package creates a stub library too.
1857
1858
1859    # We AC_SUBST these here to ensure they are subst'ed,
1860    # in case the user doesn't call TEA_ADD_...
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870ac_aux_dir=
1871for ac_dir in tclconfig "$srcdir"/tclconfig; do
1872  if test -f "$ac_dir/install-sh"; then
1873    ac_aux_dir=$ac_dir
1874    ac_install_sh="$ac_aux_dir/install-sh -c"
1875    break
1876  elif test -f "$ac_dir/install.sh"; then
1877    ac_aux_dir=$ac_dir
1878    ac_install_sh="$ac_aux_dir/install.sh -c"
1879    break
1880  elif test -f "$ac_dir/shtool"; then
1881    ac_aux_dir=$ac_dir
1882    ac_install_sh="$ac_aux_dir/shtool install -c"
1883    break
1884  fi
1885done
1886if test -z "$ac_aux_dir"; then
1887  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in tclconfig \"$srcdir\"/tclconfig" >&5
1888echo "$as_me: error: cannot find install-sh or install.sh in tclconfig \"$srcdir\"/tclconfig" >&2;}
1889   { (exit 1); exit 1; }; }
1890fi
1891
1892# These three variables are undocumented and unsupported,
1893# and are intended to be withdrawn in a future Autoconf release.
1894# They can cause serious problems if a builder's source tree is in a directory
1895# whose full name contains unusual characters.
1896ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1897ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1898ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1899
1900
1901
1902#--------------------------------------------------------------------
1903# Load the tclConfig.sh file
1904#--------------------------------------------------------------------
1905
1906
1907
1908    #
1909    # Ok, lets find the tcl configuration
1910    # First, look for one uninstalled.
1911    # the alternative search directory is invoked by --with-tcl
1912    #
1913
1914    if test x"${no_tcl}" = x ; then
1915	# we reset no_tcl in case something fails here
1916	no_tcl=true
1917
1918# Check whether --with-tcl was given.
1919if test "${with_tcl+set}" = set; then
1920  withval=$with_tcl; with_tclconfig=${withval}
1921fi
1922
1923	{ echo "$as_me:$LINENO: checking for Tcl configuration" >&5
1924echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6; }
1925	if test "${ac_cv_c_tclconfig+set}" = set; then
1926  echo $ECHO_N "(cached) $ECHO_C" >&6
1927else
1928
1929
1930	    # First check to see if --with-tcl was specified.
1931	    if test x"${with_tclconfig}" != x ; then
1932		case ${with_tclconfig} in
1933		    */tclConfig.sh )
1934			if test -f ${with_tclconfig}; then
1935			    { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
1936echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
1937			    with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'`
1938			fi ;;
1939		esac
1940		if test -f "${with_tclconfig}/tclConfig.sh" ; then
1941		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
1942		else
1943		    { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
1944echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
1945   { (exit 1); exit 1; }; }
1946		fi
1947	    fi
1948
1949	    # then check for a private Tcl installation
1950	    if test x"${ac_cv_c_tclconfig}" = x ; then
1951		for i in \
1952			../tcl \
1953			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1954			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
1955			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
1956			../../tcl \
1957			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1958			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
1959			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
1960			../../../tcl \
1961			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1962			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
1963			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
1964		    if test -f "$i/unix/tclConfig.sh" ; then
1965			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
1966			break
1967		    fi
1968		done
1969	    fi
1970
1971	    # on Darwin, check in Framework installation locations
1972	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
1973		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
1974			`ls -d /Library/Frameworks 2>/dev/null` \
1975			`ls -d /Network/Library/Frameworks 2>/dev/null` \
1976			`ls -d /System/Library/Frameworks 2>/dev/null` \
1977			; do
1978		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
1979			ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
1980			break
1981		    fi
1982		done
1983	    fi
1984
1985	    # TEA specific: on Windows, check in common installation locations
1986	    if test "${TEA_PLATFORM}" = "windows" \
1987		-a x"${ac_cv_c_tclconfig}" = x ; then
1988		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
1989			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
1990			; do
1991		    if test -f "$i/tclConfig.sh" ; then
1992			ac_cv_c_tclconfig=`(cd $i; pwd)`
1993			break
1994		    fi
1995		done
1996	    fi
1997
1998	    # check in a few common install locations
1999	    if test x"${ac_cv_c_tclconfig}" = x ; then
2000		for i in `ls -d ${libdir} 2>/dev/null` \
2001			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2002			`ls -d ${prefix}/lib 2>/dev/null` \
2003			`ls -d /usr/local/lib 2>/dev/null` \
2004			`ls -d /usr/contrib/lib 2>/dev/null` \
2005			`ls -d /usr/lib 2>/dev/null` \
2006			; do
2007		    if test -f "$i/tclConfig.sh" ; then
2008			ac_cv_c_tclconfig=`(cd $i; pwd)`
2009			break
2010		    fi
2011		done
2012	    fi
2013
2014	    # check in a few other private locations
2015	    if test x"${ac_cv_c_tclconfig}" = x ; then
2016		for i in \
2017			${srcdir}/../tcl \
2018			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2019			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2020			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2021		    if test -f "$i/unix/tclConfig.sh" ; then
2022		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
2023		    break
2024		fi
2025		done
2026	    fi
2027
2028fi
2029
2030
2031	if test x"${ac_cv_c_tclconfig}" = x ; then
2032	    TCL_BIN_DIR="# no Tcl configs found"
2033	    { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5
2034echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
2035	    exit 0
2036	else
2037	    no_tcl=
2038	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
2039	    { echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2040echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2041	fi
2042    fi
2043
2044
2045    { echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
2046echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6; }
2047
2048    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
2049        { echo "$as_me:$LINENO: result: loading" >&5
2050echo "${ECHO_T}loading" >&6; }
2051	. "${TCL_BIN_DIR}/tclConfig.sh"
2052    else
2053        { echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
2054echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2055    fi
2056
2057    # eval is required to do the TCL_DBGX substitution
2058    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
2059    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
2060
2061    # If the TCL_BIN_DIR is the build directory (not the install directory),
2062    # then set the common variable name to the value of the build variables.
2063    # For example, the variable TCL_LIB_SPEC will be set to the value
2064    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
2065    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
2066    # installed and uninstalled version of Tcl.
2067    if test -f "${TCL_BIN_DIR}/Makefile" ; then
2068        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
2069        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
2070        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
2071    elif test "`uname -s`" = "Darwin"; then
2072	# If Tcl was built as a framework, attempt to use the libraries
2073	# from the framework at the given location so that linking works
2074	# against Tcl.framework installed in an arbitary location.
2075	case ${TCL_DEFS} in
2076	    *TCL_FRAMEWORK*)
2077		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
2078		    for i in "`cd ${TCL_BIN_DIR}; pwd`" \
2079			     "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
2080			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
2081			    TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
2082			    break
2083			fi
2084		    done
2085		fi
2086		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
2087		    TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
2088		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
2089		fi
2090		;;
2091	esac
2092    fi
2093
2094    # eval is required to do the TCL_DBGX substitution
2095    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
2096    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
2097    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
2098    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112    # TEA specific:
2113
2114
2115
2116
2117
2118
2119
2120#--------------------------------------------------------------------
2121# Load the tkConfig.sh file if necessary (Tk extension)
2122#--------------------------------------------------------------------
2123
2124#TEA_PATH_TKCONFIG
2125#TEA_LOAD_TKCONFIG
2126
2127#-----------------------------------------------------------------------
2128# Handle the --prefix=... option by defaulting to what Tcl gave.
2129# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
2130#-----------------------------------------------------------------------
2131
2132
2133    if test "${prefix}" = "NONE"; then
2134	prefix_default=yes
2135	if test x"${TCL_PREFIX}" != x; then
2136	    { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
2137echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
2138	    prefix=${TCL_PREFIX}
2139	else
2140	    { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
2141echo "$as_me: --prefix defaulting to /usr/local" >&6;}
2142	    prefix=/usr/local
2143	fi
2144    fi
2145    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
2146	-o x"${exec_prefix_default}" = x"yes" ; then
2147	if test x"${TCL_EXEC_PREFIX}" != x; then
2148	    { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
2149echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
2150	    exec_prefix=${TCL_EXEC_PREFIX}
2151	else
2152	    { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
2153echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
2154	    exec_prefix=$prefix
2155	fi
2156    fi
2157
2158
2159#-----------------------------------------------------------------------
2160# Standard compiler checks.
2161# This sets up CC by using the CC env var, or looks for gcc otherwise.
2162# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
2163# the basic setup necessary to compile executables.
2164#-----------------------------------------------------------------------
2165
2166
2167    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
2168    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
2169
2170    # If the user did not set CFLAGS, set it now to keep
2171    # the AC_PROG_CC macro from adding "-g -O2".
2172    if test "${CFLAGS+set}" != "set" ; then
2173	CFLAGS=""
2174    fi
2175
2176    ac_ext=c
2177ac_cpp='$CPP $CPPFLAGS'
2178ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2179ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2180ac_compiler_gnu=$ac_cv_c_compiler_gnu
2181if test -n "$ac_tool_prefix"; then
2182  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2183set dummy ${ac_tool_prefix}gcc; ac_word=$2
2184{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2185echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2186if test "${ac_cv_prog_CC+set}" = set; then
2187  echo $ECHO_N "(cached) $ECHO_C" >&6
2188else
2189  if test -n "$CC"; then
2190  ac_cv_prog_CC="$CC" # Let the user override the test.
2191else
2192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2193for as_dir in $PATH
2194do
2195  IFS=$as_save_IFS
2196  test -z "$as_dir" && as_dir=.
2197  for ac_exec_ext in '' $ac_executable_extensions; do
2198  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2199    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2200    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2201    break 2
2202  fi
2203done
2204done
2205IFS=$as_save_IFS
2206
2207fi
2208fi
2209CC=$ac_cv_prog_CC
2210if test -n "$CC"; then
2211  { echo "$as_me:$LINENO: result: $CC" >&5
2212echo "${ECHO_T}$CC" >&6; }
2213else
2214  { echo "$as_me:$LINENO: result: no" >&5
2215echo "${ECHO_T}no" >&6; }
2216fi
2217
2218
2219fi
2220if test -z "$ac_cv_prog_CC"; then
2221  ac_ct_CC=$CC
2222  # Extract the first word of "gcc", so it can be a program name with args.
2223set dummy gcc; ac_word=$2
2224{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2225echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2226if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2227  echo $ECHO_N "(cached) $ECHO_C" >&6
2228else
2229  if test -n "$ac_ct_CC"; then
2230  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2231else
2232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2233for as_dir in $PATH
2234do
2235  IFS=$as_save_IFS
2236  test -z "$as_dir" && as_dir=.
2237  for ac_exec_ext in '' $ac_executable_extensions; do
2238  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2239    ac_cv_prog_ac_ct_CC="gcc"
2240    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2241    break 2
2242  fi
2243done
2244done
2245IFS=$as_save_IFS
2246
2247fi
2248fi
2249ac_ct_CC=$ac_cv_prog_ac_ct_CC
2250if test -n "$ac_ct_CC"; then
2251  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2252echo "${ECHO_T}$ac_ct_CC" >&6; }
2253else
2254  { echo "$as_me:$LINENO: result: no" >&5
2255echo "${ECHO_T}no" >&6; }
2256fi
2257
2258  if test "x$ac_ct_CC" = x; then
2259    CC=""
2260  else
2261    case $cross_compiling:$ac_tool_warned in
2262yes:)
2263{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2264whose name does not start with the host triplet.  If you think this
2265configuration is useful to you, please write to autoconf@gnu.org." >&5
2266echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2267whose name does not start with the host triplet.  If you think this
2268configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2269ac_tool_warned=yes ;;
2270esac
2271    CC=$ac_ct_CC
2272  fi
2273else
2274  CC="$ac_cv_prog_CC"
2275fi
2276
2277if test -z "$CC"; then
2278          if test -n "$ac_tool_prefix"; then
2279    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2280set dummy ${ac_tool_prefix}cc; ac_word=$2
2281{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2282echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2283if test "${ac_cv_prog_CC+set}" = set; then
2284  echo $ECHO_N "(cached) $ECHO_C" >&6
2285else
2286  if test -n "$CC"; then
2287  ac_cv_prog_CC="$CC" # Let the user override the test.
2288else
2289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2290for as_dir in $PATH
2291do
2292  IFS=$as_save_IFS
2293  test -z "$as_dir" && as_dir=.
2294  for ac_exec_ext in '' $ac_executable_extensions; do
2295  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2296    ac_cv_prog_CC="${ac_tool_prefix}cc"
2297    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2298    break 2
2299  fi
2300done
2301done
2302IFS=$as_save_IFS
2303
2304fi
2305fi
2306CC=$ac_cv_prog_CC
2307if test -n "$CC"; then
2308  { echo "$as_me:$LINENO: result: $CC" >&5
2309echo "${ECHO_T}$CC" >&6; }
2310else
2311  { echo "$as_me:$LINENO: result: no" >&5
2312echo "${ECHO_T}no" >&6; }
2313fi
2314
2315
2316  fi
2317fi
2318if test -z "$CC"; then
2319  # Extract the first word of "cc", so it can be a program name with args.
2320set dummy cc; ac_word=$2
2321{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2322echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2323if test "${ac_cv_prog_CC+set}" = set; then
2324  echo $ECHO_N "(cached) $ECHO_C" >&6
2325else
2326  if test -n "$CC"; then
2327  ac_cv_prog_CC="$CC" # Let the user override the test.
2328else
2329  ac_prog_rejected=no
2330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2331for as_dir in $PATH
2332do
2333  IFS=$as_save_IFS
2334  test -z "$as_dir" && as_dir=.
2335  for ac_exec_ext in '' $ac_executable_extensions; do
2336  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2337    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2338       ac_prog_rejected=yes
2339       continue
2340     fi
2341    ac_cv_prog_CC="cc"
2342    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2343    break 2
2344  fi
2345done
2346done
2347IFS=$as_save_IFS
2348
2349if test $ac_prog_rejected = yes; then
2350  # We found a bogon in the path, so make sure we never use it.
2351  set dummy $ac_cv_prog_CC
2352  shift
2353  if test $# != 0; then
2354    # We chose a different compiler from the bogus one.
2355    # However, it has the same basename, so the bogon will be chosen
2356    # first if we set CC to just the basename; use the full file name.
2357    shift
2358    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2359  fi
2360fi
2361fi
2362fi
2363CC=$ac_cv_prog_CC
2364if test -n "$CC"; then
2365  { echo "$as_me:$LINENO: result: $CC" >&5
2366echo "${ECHO_T}$CC" >&6; }
2367else
2368  { echo "$as_me:$LINENO: result: no" >&5
2369echo "${ECHO_T}no" >&6; }
2370fi
2371
2372
2373fi
2374if test -z "$CC"; then
2375  if test -n "$ac_tool_prefix"; then
2376  for ac_prog in cl.exe
2377  do
2378    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2379set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2380{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2381echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2382if test "${ac_cv_prog_CC+set}" = set; then
2383  echo $ECHO_N "(cached) $ECHO_C" >&6
2384else
2385  if test -n "$CC"; then
2386  ac_cv_prog_CC="$CC" # Let the user override the test.
2387else
2388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2389for as_dir in $PATH
2390do
2391  IFS=$as_save_IFS
2392  test -z "$as_dir" && as_dir=.
2393  for ac_exec_ext in '' $ac_executable_extensions; do
2394  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2395    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2396    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2397    break 2
2398  fi
2399done
2400done
2401IFS=$as_save_IFS
2402
2403fi
2404fi
2405CC=$ac_cv_prog_CC
2406if test -n "$CC"; then
2407  { echo "$as_me:$LINENO: result: $CC" >&5
2408echo "${ECHO_T}$CC" >&6; }
2409else
2410  { echo "$as_me:$LINENO: result: no" >&5
2411echo "${ECHO_T}no" >&6; }
2412fi
2413
2414
2415    test -n "$CC" && break
2416  done
2417fi
2418if test -z "$CC"; then
2419  ac_ct_CC=$CC
2420  for ac_prog in cl.exe
2421do
2422  # Extract the first word of "$ac_prog", so it can be a program name with args.
2423set dummy $ac_prog; ac_word=$2
2424{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2425echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2426if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2427  echo $ECHO_N "(cached) $ECHO_C" >&6
2428else
2429  if test -n "$ac_ct_CC"; then
2430  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2431else
2432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2433for as_dir in $PATH
2434do
2435  IFS=$as_save_IFS
2436  test -z "$as_dir" && as_dir=.
2437  for ac_exec_ext in '' $ac_executable_extensions; do
2438  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2439    ac_cv_prog_ac_ct_CC="$ac_prog"
2440    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2441    break 2
2442  fi
2443done
2444done
2445IFS=$as_save_IFS
2446
2447fi
2448fi
2449ac_ct_CC=$ac_cv_prog_ac_ct_CC
2450if test -n "$ac_ct_CC"; then
2451  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2452echo "${ECHO_T}$ac_ct_CC" >&6; }
2453else
2454  { echo "$as_me:$LINENO: result: no" >&5
2455echo "${ECHO_T}no" >&6; }
2456fi
2457
2458
2459  test -n "$ac_ct_CC" && break
2460done
2461
2462  if test "x$ac_ct_CC" = x; then
2463    CC=""
2464  else
2465    case $cross_compiling:$ac_tool_warned in
2466yes:)
2467{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2468whose name does not start with the host triplet.  If you think this
2469configuration is useful to you, please write to autoconf@gnu.org." >&5
2470echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2471whose name does not start with the host triplet.  If you think this
2472configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2473ac_tool_warned=yes ;;
2474esac
2475    CC=$ac_ct_CC
2476  fi
2477fi
2478
2479fi
2480
2481
2482test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2483See \`config.log' for more details." >&5
2484echo "$as_me: error: no acceptable C compiler found in \$PATH
2485See \`config.log' for more details." >&2;}
2486   { (exit 1); exit 1; }; }
2487
2488# Provide some information about the compiler.
2489echo "$as_me:$LINENO: checking for C compiler version" >&5
2490ac_compiler=`set X $ac_compile; echo $2`
2491{ (ac_try="$ac_compiler --version >&5"
2492case "(($ac_try" in
2493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2494  *) ac_try_echo=$ac_try;;
2495esac
2496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2497  (eval "$ac_compiler --version >&5") 2>&5
2498  ac_status=$?
2499  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2500  (exit $ac_status); }
2501{ (ac_try="$ac_compiler -v >&5"
2502case "(($ac_try" in
2503  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2504  *) ac_try_echo=$ac_try;;
2505esac
2506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2507  (eval "$ac_compiler -v >&5") 2>&5
2508  ac_status=$?
2509  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2510  (exit $ac_status); }
2511{ (ac_try="$ac_compiler -V >&5"
2512case "(($ac_try" in
2513  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2514  *) ac_try_echo=$ac_try;;
2515esac
2516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2517  (eval "$ac_compiler -V >&5") 2>&5
2518  ac_status=$?
2519  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2520  (exit $ac_status); }
2521
2522cat >conftest.$ac_ext <<_ACEOF
2523/* confdefs.h.  */
2524_ACEOF
2525cat confdefs.h >>conftest.$ac_ext
2526cat >>conftest.$ac_ext <<_ACEOF
2527/* end confdefs.h.  */
2528
2529int
2530main ()
2531{
2532
2533  ;
2534  return 0;
2535}
2536_ACEOF
2537ac_clean_files_save=$ac_clean_files
2538ac_clean_files="$ac_clean_files a.out a.exe b.out"
2539# Try to create an executable without -o first, disregard a.out.
2540# It will help us diagnose broken compilers, and finding out an intuition
2541# of exeext.
2542{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2543echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2544ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2545#
2546# List of possible output files, starting from the most likely.
2547# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2548# only as a last resort.  b.out is created by i960 compilers.
2549ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2550#
2551# The IRIX 6 linker writes into existing files which may not be
2552# executable, retaining their permissions.  Remove them first so a
2553# subsequent execution test works.
2554ac_rmfiles=
2555for ac_file in $ac_files
2556do
2557  case $ac_file in
2558    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2559    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2560  esac
2561done
2562rm -f $ac_rmfiles
2563
2564if { (ac_try="$ac_link_default"
2565case "(($ac_try" in
2566  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2567  *) ac_try_echo=$ac_try;;
2568esac
2569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2570  (eval "$ac_link_default") 2>&5
2571  ac_status=$?
2572  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2573  (exit $ac_status); }; then
2574  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2575# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2576# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2577# so that the user can short-circuit this test for compilers unknown to
2578# Autoconf.
2579for ac_file in $ac_files ''
2580do
2581  test -f "$ac_file" || continue
2582  case $ac_file in
2583    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2584	;;
2585    [ab].out )
2586	# We found the default executable, but exeext='' is most
2587	# certainly right.
2588	break;;
2589    *.* )
2590        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2591	then :; else
2592	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2593	fi
2594	# We set ac_cv_exeext here because the later test for it is not
2595	# safe: cross compilers may not add the suffix if given an `-o'
2596	# argument, so we may need to know it at that point already.
2597	# Even if this section looks crufty: it has the advantage of
2598	# actually working.
2599	break;;
2600    * )
2601	break;;
2602  esac
2603done
2604test "$ac_cv_exeext" = no && ac_cv_exeext=
2605
2606else
2607  ac_file=''
2608fi
2609
2610{ echo "$as_me:$LINENO: result: $ac_file" >&5
2611echo "${ECHO_T}$ac_file" >&6; }
2612if test -z "$ac_file"; then
2613  echo "$as_me: failed program was:" >&5
2614sed 's/^/| /' conftest.$ac_ext >&5
2615
2616{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2617See \`config.log' for more details." >&5
2618echo "$as_me: error: C compiler cannot create executables
2619See \`config.log' for more details." >&2;}
2620   { (exit 77); exit 77; }; }
2621fi
2622
2623ac_exeext=$ac_cv_exeext
2624
2625# Check that the compiler produces executables we can run.  If not, either
2626# the compiler is broken, or we cross compile.
2627{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2628echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2629# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2630# If not cross compiling, check that we can run a simple program.
2631if test "$cross_compiling" != yes; then
2632  if { ac_try='./$ac_file'
2633  { (case "(($ac_try" in
2634  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2635  *) ac_try_echo=$ac_try;;
2636esac
2637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2638  (eval "$ac_try") 2>&5
2639  ac_status=$?
2640  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2641  (exit $ac_status); }; }; then
2642    cross_compiling=no
2643  else
2644    if test "$cross_compiling" = maybe; then
2645	cross_compiling=yes
2646    else
2647	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2648If you meant to cross compile, use \`--host'.
2649See \`config.log' for more details." >&5
2650echo "$as_me: error: cannot run C compiled programs.
2651If you meant to cross compile, use \`--host'.
2652See \`config.log' for more details." >&2;}
2653   { (exit 1); exit 1; }; }
2654    fi
2655  fi
2656fi
2657{ echo "$as_me:$LINENO: result: yes" >&5
2658echo "${ECHO_T}yes" >&6; }
2659
2660rm -f a.out a.exe conftest$ac_cv_exeext b.out
2661ac_clean_files=$ac_clean_files_save
2662# Check that the compiler produces executables we can run.  If not, either
2663# the compiler is broken, or we cross compile.
2664{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2665echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2666{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2667echo "${ECHO_T}$cross_compiling" >&6; }
2668
2669{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2670echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2671if { (ac_try="$ac_link"
2672case "(($ac_try" in
2673  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2674  *) ac_try_echo=$ac_try;;
2675esac
2676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2677  (eval "$ac_link") 2>&5
2678  ac_status=$?
2679  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2680  (exit $ac_status); }; then
2681  # If both `conftest.exe' and `conftest' are `present' (well, observable)
2682# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2683# work properly (i.e., refer to `conftest.exe'), while it won't with
2684# `rm'.
2685for ac_file in conftest.exe conftest conftest.*; do
2686  test -f "$ac_file" || continue
2687  case $ac_file in
2688    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2689    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2690	  break;;
2691    * ) break;;
2692  esac
2693done
2694else
2695  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2696See \`config.log' for more details." >&5
2697echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2698See \`config.log' for more details." >&2;}
2699   { (exit 1); exit 1; }; }
2700fi
2701
2702rm -f conftest$ac_cv_exeext
2703{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2704echo "${ECHO_T}$ac_cv_exeext" >&6; }
2705
2706rm -f conftest.$ac_ext
2707EXEEXT=$ac_cv_exeext
2708ac_exeext=$EXEEXT
2709{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2710echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2711if test "${ac_cv_objext+set}" = set; then
2712  echo $ECHO_N "(cached) $ECHO_C" >&6
2713else
2714  cat >conftest.$ac_ext <<_ACEOF
2715/* confdefs.h.  */
2716_ACEOF
2717cat confdefs.h >>conftest.$ac_ext
2718cat >>conftest.$ac_ext <<_ACEOF
2719/* end confdefs.h.  */
2720
2721int
2722main ()
2723{
2724
2725  ;
2726  return 0;
2727}
2728_ACEOF
2729rm -f conftest.o conftest.obj
2730if { (ac_try="$ac_compile"
2731case "(($ac_try" in
2732  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2733  *) ac_try_echo=$ac_try;;
2734esac
2735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2736  (eval "$ac_compile") 2>&5
2737  ac_status=$?
2738  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2739  (exit $ac_status); }; then
2740  for ac_file in conftest.o conftest.obj conftest.*; do
2741  test -f "$ac_file" || continue;
2742  case $ac_file in
2743    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2744    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2745       break;;
2746  esac
2747done
2748else
2749  echo "$as_me: failed program was:" >&5
2750sed 's/^/| /' conftest.$ac_ext >&5
2751
2752{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2753See \`config.log' for more details." >&5
2754echo "$as_me: error: cannot compute suffix of object files: cannot compile
2755See \`config.log' for more details." >&2;}
2756   { (exit 1); exit 1; }; }
2757fi
2758
2759rm -f conftest.$ac_cv_objext conftest.$ac_ext
2760fi
2761{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2762echo "${ECHO_T}$ac_cv_objext" >&6; }
2763OBJEXT=$ac_cv_objext
2764ac_objext=$OBJEXT
2765{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2766echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
2767if test "${ac_cv_c_compiler_gnu+set}" = set; then
2768  echo $ECHO_N "(cached) $ECHO_C" >&6
2769else
2770  cat >conftest.$ac_ext <<_ACEOF
2771/* confdefs.h.  */
2772_ACEOF
2773cat confdefs.h >>conftest.$ac_ext
2774cat >>conftest.$ac_ext <<_ACEOF
2775/* end confdefs.h.  */
2776
2777int
2778main ()
2779{
2780#ifndef __GNUC__
2781       choke me
2782#endif
2783
2784  ;
2785  return 0;
2786}
2787_ACEOF
2788rm -f conftest.$ac_objext
2789if { (ac_try="$ac_compile"
2790case "(($ac_try" in
2791  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2792  *) ac_try_echo=$ac_try;;
2793esac
2794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2795  (eval "$ac_compile") 2>conftest.er1
2796  ac_status=$?
2797  grep -v '^ *+' conftest.er1 >conftest.err
2798  rm -f conftest.er1
2799  cat conftest.err >&5
2800  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2801  (exit $ac_status); } && {
2802	 test -z "$ac_c_werror_flag" ||
2803	 test ! -s conftest.err
2804       } && test -s conftest.$ac_objext; then
2805  ac_compiler_gnu=yes
2806else
2807  echo "$as_me: failed program was:" >&5
2808sed 's/^/| /' conftest.$ac_ext >&5
2809
2810	ac_compiler_gnu=no
2811fi
2812
2813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2814ac_cv_c_compiler_gnu=$ac_compiler_gnu
2815
2816fi
2817{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2818echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2819GCC=`test $ac_compiler_gnu = yes && echo yes`
2820ac_test_CFLAGS=${CFLAGS+set}
2821ac_save_CFLAGS=$CFLAGS
2822{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2823echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
2824if test "${ac_cv_prog_cc_g+set}" = set; then
2825  echo $ECHO_N "(cached) $ECHO_C" >&6
2826else
2827  ac_save_c_werror_flag=$ac_c_werror_flag
2828   ac_c_werror_flag=yes
2829   ac_cv_prog_cc_g=no
2830   CFLAGS="-g"
2831   cat >conftest.$ac_ext <<_ACEOF
2832/* confdefs.h.  */
2833_ACEOF
2834cat confdefs.h >>conftest.$ac_ext
2835cat >>conftest.$ac_ext <<_ACEOF
2836/* end confdefs.h.  */
2837
2838int
2839main ()
2840{
2841
2842  ;
2843  return 0;
2844}
2845_ACEOF
2846rm -f conftest.$ac_objext
2847if { (ac_try="$ac_compile"
2848case "(($ac_try" in
2849  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2850  *) ac_try_echo=$ac_try;;
2851esac
2852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2853  (eval "$ac_compile") 2>conftest.er1
2854  ac_status=$?
2855  grep -v '^ *+' conftest.er1 >conftest.err
2856  rm -f conftest.er1
2857  cat conftest.err >&5
2858  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2859  (exit $ac_status); } && {
2860	 test -z "$ac_c_werror_flag" ||
2861	 test ! -s conftest.err
2862       } && test -s conftest.$ac_objext; then
2863  ac_cv_prog_cc_g=yes
2864else
2865  echo "$as_me: failed program was:" >&5
2866sed 's/^/| /' conftest.$ac_ext >&5
2867
2868	CFLAGS=""
2869      cat >conftest.$ac_ext <<_ACEOF
2870/* confdefs.h.  */
2871_ACEOF
2872cat confdefs.h >>conftest.$ac_ext
2873cat >>conftest.$ac_ext <<_ACEOF
2874/* end confdefs.h.  */
2875
2876int
2877main ()
2878{
2879
2880  ;
2881  return 0;
2882}
2883_ACEOF
2884rm -f conftest.$ac_objext
2885if { (ac_try="$ac_compile"
2886case "(($ac_try" in
2887  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2888  *) ac_try_echo=$ac_try;;
2889esac
2890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2891  (eval "$ac_compile") 2>conftest.er1
2892  ac_status=$?
2893  grep -v '^ *+' conftest.er1 >conftest.err
2894  rm -f conftest.er1
2895  cat conftest.err >&5
2896  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2897  (exit $ac_status); } && {
2898	 test -z "$ac_c_werror_flag" ||
2899	 test ! -s conftest.err
2900       } && test -s conftest.$ac_objext; then
2901  :
2902else
2903  echo "$as_me: failed program was:" >&5
2904sed 's/^/| /' conftest.$ac_ext >&5
2905
2906	ac_c_werror_flag=$ac_save_c_werror_flag
2907	 CFLAGS="-g"
2908	 cat >conftest.$ac_ext <<_ACEOF
2909/* confdefs.h.  */
2910_ACEOF
2911cat confdefs.h >>conftest.$ac_ext
2912cat >>conftest.$ac_ext <<_ACEOF
2913/* end confdefs.h.  */
2914
2915int
2916main ()
2917{
2918
2919  ;
2920  return 0;
2921}
2922_ACEOF
2923rm -f conftest.$ac_objext
2924if { (ac_try="$ac_compile"
2925case "(($ac_try" in
2926  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2927  *) ac_try_echo=$ac_try;;
2928esac
2929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2930  (eval "$ac_compile") 2>conftest.er1
2931  ac_status=$?
2932  grep -v '^ *+' conftest.er1 >conftest.err
2933  rm -f conftest.er1
2934  cat conftest.err >&5
2935  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2936  (exit $ac_status); } && {
2937	 test -z "$ac_c_werror_flag" ||
2938	 test ! -s conftest.err
2939       } && test -s conftest.$ac_objext; then
2940  ac_cv_prog_cc_g=yes
2941else
2942  echo "$as_me: failed program was:" >&5
2943sed 's/^/| /' conftest.$ac_ext >&5
2944
2945
2946fi
2947
2948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2949fi
2950
2951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2952fi
2953
2954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2955   ac_c_werror_flag=$ac_save_c_werror_flag
2956fi
2957{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2958echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
2959if test "$ac_test_CFLAGS" = set; then
2960  CFLAGS=$ac_save_CFLAGS
2961elif test $ac_cv_prog_cc_g = yes; then
2962  if test "$GCC" = yes; then
2963    CFLAGS="-g -O2"
2964  else
2965    CFLAGS="-g"
2966  fi
2967else
2968  if test "$GCC" = yes; then
2969    CFLAGS="-O2"
2970  else
2971    CFLAGS=
2972  fi
2973fi
2974{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
2975echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
2976if test "${ac_cv_prog_cc_c89+set}" = set; then
2977  echo $ECHO_N "(cached) $ECHO_C" >&6
2978else
2979  ac_cv_prog_cc_c89=no
2980ac_save_CC=$CC
2981cat >conftest.$ac_ext <<_ACEOF
2982/* confdefs.h.  */
2983_ACEOF
2984cat confdefs.h >>conftest.$ac_ext
2985cat >>conftest.$ac_ext <<_ACEOF
2986/* end confdefs.h.  */
2987#include <stdarg.h>
2988#include <stdio.h>
2989#include <sys/types.h>
2990#include <sys/stat.h>
2991/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2992struct buf { int x; };
2993FILE * (*rcsopen) (struct buf *, struct stat *, int);
2994static char *e (p, i)
2995     char **p;
2996     int i;
2997{
2998  return p[i];
2999}
3000static char *f (char * (*g) (char **, int), char **p, ...)
3001{
3002  char *s;
3003  va_list v;
3004  va_start (v,p);
3005  s = g (p, va_arg (v,int));
3006  va_end (v);
3007  return s;
3008}
3009
3010/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3011   function prototypes and stuff, but not '\xHH' hex character constants.
3012   These don't provoke an error unfortunately, instead are silently treated
3013   as 'x'.  The following induces an error, until -std is added to get
3014   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3015   array size at least.  It's necessary to write '\x00'==0 to get something
3016   that's true only with -std.  */
3017int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3018
3019/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3020   inside strings and character constants.  */
3021#define FOO(x) 'x'
3022int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3023
3024int test (int i, double x);
3025struct s1 {int (*f) (int a);};
3026struct s2 {int (*f) (double a);};
3027int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3028int argc;
3029char **argv;
3030int
3031main ()
3032{
3033return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3034  ;
3035  return 0;
3036}
3037_ACEOF
3038for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3039	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3040do
3041  CC="$ac_save_CC $ac_arg"
3042  rm -f conftest.$ac_objext
3043if { (ac_try="$ac_compile"
3044case "(($ac_try" in
3045  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3046  *) ac_try_echo=$ac_try;;
3047esac
3048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3049  (eval "$ac_compile") 2>conftest.er1
3050  ac_status=$?
3051  grep -v '^ *+' conftest.er1 >conftest.err
3052  rm -f conftest.er1
3053  cat conftest.err >&5
3054  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3055  (exit $ac_status); } && {
3056	 test -z "$ac_c_werror_flag" ||
3057	 test ! -s conftest.err
3058       } && test -s conftest.$ac_objext; then
3059  ac_cv_prog_cc_c89=$ac_arg
3060else
3061  echo "$as_me: failed program was:" >&5
3062sed 's/^/| /' conftest.$ac_ext >&5
3063
3064
3065fi
3066
3067rm -f core conftest.err conftest.$ac_objext
3068  test "x$ac_cv_prog_cc_c89" != "xno" && break
3069done
3070rm -f conftest.$ac_ext
3071CC=$ac_save_CC
3072
3073fi
3074# AC_CACHE_VAL
3075case "x$ac_cv_prog_cc_c89" in
3076  x)
3077    { echo "$as_me:$LINENO: result: none needed" >&5
3078echo "${ECHO_T}none needed" >&6; } ;;
3079  xno)
3080    { echo "$as_me:$LINENO: result: unsupported" >&5
3081echo "${ECHO_T}unsupported" >&6; } ;;
3082  *)
3083    CC="$CC $ac_cv_prog_cc_c89"
3084    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3085echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3086esac
3087
3088
3089ac_ext=c
3090ac_cpp='$CPP $CPPFLAGS'
3091ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3092ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3093ac_compiler_gnu=$ac_cv_c_compiler_gnu
3094
3095    ac_ext=c
3096ac_cpp='$CPP $CPPFLAGS'
3097ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3098ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3099ac_compiler_gnu=$ac_cv_c_compiler_gnu
3100{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3101echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3102# On Suns, sometimes $CPP names a directory.
3103if test -n "$CPP" && test -d "$CPP"; then
3104  CPP=
3105fi
3106if test -z "$CPP"; then
3107  if test "${ac_cv_prog_CPP+set}" = set; then
3108  echo $ECHO_N "(cached) $ECHO_C" >&6
3109else
3110      # Double quotes because CPP needs to be expanded
3111    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3112    do
3113      ac_preproc_ok=false
3114for ac_c_preproc_warn_flag in '' yes
3115do
3116  # Use a header file that comes with gcc, so configuring glibc
3117  # with a fresh cross-compiler works.
3118  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3119  # <limits.h> exists even on freestanding compilers.
3120  # On the NeXT, cc -E runs the code through the compiler's parser,
3121  # not just through cpp. "Syntax error" is here to catch this case.
3122  cat >conftest.$ac_ext <<_ACEOF
3123/* confdefs.h.  */
3124_ACEOF
3125cat confdefs.h >>conftest.$ac_ext
3126cat >>conftest.$ac_ext <<_ACEOF
3127/* end confdefs.h.  */
3128#ifdef __STDC__
3129# include <limits.h>
3130#else
3131# include <assert.h>
3132#endif
3133		     Syntax error
3134_ACEOF
3135if { (ac_try="$ac_cpp conftest.$ac_ext"
3136case "(($ac_try" in
3137  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3138  *) ac_try_echo=$ac_try;;
3139esac
3140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3141  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3142  ac_status=$?
3143  grep -v '^ *+' conftest.er1 >conftest.err
3144  rm -f conftest.er1
3145  cat conftest.err >&5
3146  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3147  (exit $ac_status); } >/dev/null && {
3148	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3149	 test ! -s conftest.err
3150       }; then
3151  :
3152else
3153  echo "$as_me: failed program was:" >&5
3154sed 's/^/| /' conftest.$ac_ext >&5
3155
3156  # Broken: fails on valid input.
3157continue
3158fi
3159
3160rm -f conftest.err conftest.$ac_ext
3161
3162  # OK, works on sane cases.  Now check whether nonexistent headers
3163  # can be detected and how.
3164  cat >conftest.$ac_ext <<_ACEOF
3165/* confdefs.h.  */
3166_ACEOF
3167cat confdefs.h >>conftest.$ac_ext
3168cat >>conftest.$ac_ext <<_ACEOF
3169/* end confdefs.h.  */
3170#include <ac_nonexistent.h>
3171_ACEOF
3172if { (ac_try="$ac_cpp conftest.$ac_ext"
3173case "(($ac_try" in
3174  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3175  *) ac_try_echo=$ac_try;;
3176esac
3177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3178  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3179  ac_status=$?
3180  grep -v '^ *+' conftest.er1 >conftest.err
3181  rm -f conftest.er1
3182  cat conftest.err >&5
3183  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3184  (exit $ac_status); } >/dev/null && {
3185	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3186	 test ! -s conftest.err
3187       }; then
3188  # Broken: success on invalid input.
3189continue
3190else
3191  echo "$as_me: failed program was:" >&5
3192sed 's/^/| /' conftest.$ac_ext >&5
3193
3194  # Passes both tests.
3195ac_preproc_ok=:
3196break
3197fi
3198
3199rm -f conftest.err conftest.$ac_ext
3200
3201done
3202# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3203rm -f conftest.err conftest.$ac_ext
3204if $ac_preproc_ok; then
3205  break
3206fi
3207
3208    done
3209    ac_cv_prog_CPP=$CPP
3210
3211fi
3212  CPP=$ac_cv_prog_CPP
3213else
3214  ac_cv_prog_CPP=$CPP
3215fi
3216{ echo "$as_me:$LINENO: result: $CPP" >&5
3217echo "${ECHO_T}$CPP" >&6; }
3218ac_preproc_ok=false
3219for ac_c_preproc_warn_flag in '' yes
3220do
3221  # Use a header file that comes with gcc, so configuring glibc
3222  # with a fresh cross-compiler works.
3223  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3224  # <limits.h> exists even on freestanding compilers.
3225  # On the NeXT, cc -E runs the code through the compiler's parser,
3226  # not just through cpp. "Syntax error" is here to catch this case.
3227  cat >conftest.$ac_ext <<_ACEOF
3228/* confdefs.h.  */
3229_ACEOF
3230cat confdefs.h >>conftest.$ac_ext
3231cat >>conftest.$ac_ext <<_ACEOF
3232/* end confdefs.h.  */
3233#ifdef __STDC__
3234# include <limits.h>
3235#else
3236# include <assert.h>
3237#endif
3238		     Syntax error
3239_ACEOF
3240if { (ac_try="$ac_cpp conftest.$ac_ext"
3241case "(($ac_try" in
3242  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3243  *) ac_try_echo=$ac_try;;
3244esac
3245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3246  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3247  ac_status=$?
3248  grep -v '^ *+' conftest.er1 >conftest.err
3249  rm -f conftest.er1
3250  cat conftest.err >&5
3251  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3252  (exit $ac_status); } >/dev/null && {
3253	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3254	 test ! -s conftest.err
3255       }; then
3256  :
3257else
3258  echo "$as_me: failed program was:" >&5
3259sed 's/^/| /' conftest.$ac_ext >&5
3260
3261  # Broken: fails on valid input.
3262continue
3263fi
3264
3265rm -f conftest.err conftest.$ac_ext
3266
3267  # OK, works on sane cases.  Now check whether nonexistent headers
3268  # can be detected and how.
3269  cat >conftest.$ac_ext <<_ACEOF
3270/* confdefs.h.  */
3271_ACEOF
3272cat confdefs.h >>conftest.$ac_ext
3273cat >>conftest.$ac_ext <<_ACEOF
3274/* end confdefs.h.  */
3275#include <ac_nonexistent.h>
3276_ACEOF
3277if { (ac_try="$ac_cpp conftest.$ac_ext"
3278case "(($ac_try" in
3279  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3280  *) ac_try_echo=$ac_try;;
3281esac
3282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3283  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3284  ac_status=$?
3285  grep -v '^ *+' conftest.er1 >conftest.err
3286  rm -f conftest.er1
3287  cat conftest.err >&5
3288  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3289  (exit $ac_status); } >/dev/null && {
3290	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3291	 test ! -s conftest.err
3292       }; then
3293  # Broken: success on invalid input.
3294continue
3295else
3296  echo "$as_me: failed program was:" >&5
3297sed 's/^/| /' conftest.$ac_ext >&5
3298
3299  # Passes both tests.
3300ac_preproc_ok=:
3301break
3302fi
3303
3304rm -f conftest.err conftest.$ac_ext
3305
3306done
3307# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3308rm -f conftest.err conftest.$ac_ext
3309if $ac_preproc_ok; then
3310  :
3311else
3312  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3313See \`config.log' for more details." >&5
3314echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3315See \`config.log' for more details." >&2;}
3316   { (exit 1); exit 1; }; }
3317fi
3318
3319ac_ext=c
3320ac_cpp='$CPP $CPPFLAGS'
3321ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3322ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3323ac_compiler_gnu=$ac_cv_c_compiler_gnu
3324
3325
3326    # Find a good install program.  We prefer a C program (faster),
3327# so one script is as good as another.  But avoid the broken or
3328# incompatible versions:
3329# SysV /etc/install, /usr/sbin/install
3330# SunOS /usr/etc/install
3331# IRIX /sbin/install
3332# AIX /bin/install
3333# AmigaOS /C/install, which installs bootblocks on floppy discs
3334# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3335# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3336# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3337# OS/2's system install, which has a completely different semantic
3338# ./install, which can be erroneously created by make from ./install.sh.
3339{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3340echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
3341if test -z "$INSTALL"; then
3342if test "${ac_cv_path_install+set}" = set; then
3343  echo $ECHO_N "(cached) $ECHO_C" >&6
3344else
3345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3346for as_dir in $PATH
3347do
3348  IFS=$as_save_IFS
3349  test -z "$as_dir" && as_dir=.
3350  # Account for people who put trailing slashes in PATH elements.
3351case $as_dir/ in
3352  ./ | .// | /cC/* | \
3353  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3354  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3355  /usr/ucb/* ) ;;
3356  *)
3357    # OSF1 and SCO ODT 3.0 have their own names for install.
3358    # Don't use installbsd from OSF since it installs stuff as root
3359    # by default.
3360    for ac_prog in ginstall scoinst install; do
3361      for ac_exec_ext in '' $ac_executable_extensions; do
3362	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3363	  if test $ac_prog = install &&
3364	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3365	    # AIX install.  It has an incompatible calling convention.
3366	    :
3367	  elif test $ac_prog = install &&
3368	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3369	    # program-specific install script used by HP pwplus--don't use.
3370	    :
3371	  else
3372	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3373	    break 3
3374	  fi
3375	fi
3376      done
3377    done
3378    ;;
3379esac
3380done
3381IFS=$as_save_IFS
3382
3383
3384fi
3385  if test "${ac_cv_path_install+set}" = set; then
3386    INSTALL=$ac_cv_path_install
3387  else
3388    # As a last resort, use the slow shell script.  Don't cache a
3389    # value for INSTALL within a source directory, because that will
3390    # break other packages using the cache if that directory is
3391    # removed, or if the value is a relative name.
3392    INSTALL=$ac_install_sh
3393  fi
3394fi
3395{ echo "$as_me:$LINENO: result: $INSTALL" >&5
3396echo "${ECHO_T}$INSTALL" >&6; }
3397
3398# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3399# It thinks the first close brace ends the variable substitution.
3400test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3401
3402test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3403
3404test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3405
3406
3407    #--------------------------------------------------------------------
3408    # Checks to see if the make program sets the $MAKE variable.
3409    #--------------------------------------------------------------------
3410
3411    { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3412echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
3413set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3414if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
3415  echo $ECHO_N "(cached) $ECHO_C" >&6
3416else
3417  cat >conftest.make <<\_ACEOF
3418SHELL = /bin/sh
3419all:
3420	@echo '@@@%%%=$(MAKE)=@@@%%%'
3421_ACEOF
3422# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3423case `${MAKE-make} -f conftest.make 2>/dev/null` in
3424  *@@@%%%=?*=@@@%%%*)
3425    eval ac_cv_prog_make_${ac_make}_set=yes;;
3426  *)
3427    eval ac_cv_prog_make_${ac_make}_set=no;;
3428esac
3429rm -f conftest.make
3430fi
3431if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3432  { echo "$as_me:$LINENO: result: yes" >&5
3433echo "${ECHO_T}yes" >&6; }
3434  SET_MAKE=
3435else
3436  { echo "$as_me:$LINENO: result: no" >&5
3437echo "${ECHO_T}no" >&6; }
3438  SET_MAKE="MAKE=${MAKE-make}"
3439fi
3440
3441
3442    #--------------------------------------------------------------------
3443    # Find ranlib
3444    #--------------------------------------------------------------------
3445
3446    if test -n "$ac_tool_prefix"; then
3447  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3448set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3449{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3450echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3451if test "${ac_cv_prog_RANLIB+set}" = set; then
3452  echo $ECHO_N "(cached) $ECHO_C" >&6
3453else
3454  if test -n "$RANLIB"; then
3455  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3456else
3457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3458for as_dir in $PATH
3459do
3460  IFS=$as_save_IFS
3461  test -z "$as_dir" && as_dir=.
3462  for ac_exec_ext in '' $ac_executable_extensions; do
3463  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3464    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3465    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3466    break 2
3467  fi
3468done
3469done
3470IFS=$as_save_IFS
3471
3472fi
3473fi
3474RANLIB=$ac_cv_prog_RANLIB
3475if test -n "$RANLIB"; then
3476  { echo "$as_me:$LINENO: result: $RANLIB" >&5
3477echo "${ECHO_T}$RANLIB" >&6; }
3478else
3479  { echo "$as_me:$LINENO: result: no" >&5
3480echo "${ECHO_T}no" >&6; }
3481fi
3482
3483
3484fi
3485if test -z "$ac_cv_prog_RANLIB"; then
3486  ac_ct_RANLIB=$RANLIB
3487  # Extract the first word of "ranlib", so it can be a program name with args.
3488set dummy ranlib; ac_word=$2
3489{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3490echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3491if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3492  echo $ECHO_N "(cached) $ECHO_C" >&6
3493else
3494  if test -n "$ac_ct_RANLIB"; then
3495  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3496else
3497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3498for as_dir in $PATH
3499do
3500  IFS=$as_save_IFS
3501  test -z "$as_dir" && as_dir=.
3502  for ac_exec_ext in '' $ac_executable_extensions; do
3503  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3504    ac_cv_prog_ac_ct_RANLIB="ranlib"
3505    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3506    break 2
3507  fi
3508done
3509done
3510IFS=$as_save_IFS
3511
3512fi
3513fi
3514ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3515if test -n "$ac_ct_RANLIB"; then
3516  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3517echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
3518else
3519  { echo "$as_me:$LINENO: result: no" >&5
3520echo "${ECHO_T}no" >&6; }
3521fi
3522
3523  if test "x$ac_ct_RANLIB" = x; then
3524    RANLIB=":"
3525  else
3526    case $cross_compiling:$ac_tool_warned in
3527yes:)
3528{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3529whose name does not start with the host triplet.  If you think this
3530configuration is useful to you, please write to autoconf@gnu.org." >&5
3531echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3532whose name does not start with the host triplet.  If you think this
3533configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3534ac_tool_warned=yes ;;
3535esac
3536    RANLIB=$ac_ct_RANLIB
3537  fi
3538else
3539  RANLIB="$ac_cv_prog_RANLIB"
3540fi
3541
3542
3543    #--------------------------------------------------------------------
3544    # Determines the correct binary file extension (.o, .obj, .exe etc.)
3545    #--------------------------------------------------------------------
3546
3547
3548
3549
3550
3551
3552{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3553echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3554if test "${ac_cv_path_GREP+set}" = set; then
3555  echo $ECHO_N "(cached) $ECHO_C" >&6
3556else
3557  # Extract the first word of "grep ggrep" to use in msg output
3558if test -z "$GREP"; then
3559set dummy grep ggrep; ac_prog_name=$2
3560if test "${ac_cv_path_GREP+set}" = set; then
3561  echo $ECHO_N "(cached) $ECHO_C" >&6
3562else
3563  ac_path_GREP_found=false
3564# Loop through the user's path and test for each of PROGNAME-LIST
3565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3566for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3567do
3568  IFS=$as_save_IFS
3569  test -z "$as_dir" && as_dir=.
3570  for ac_prog in grep ggrep; do
3571  for ac_exec_ext in '' $ac_executable_extensions; do
3572    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3573    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3574    # Check for GNU ac_path_GREP and select it if it is found.
3575  # Check for GNU $ac_path_GREP
3576case `"$ac_path_GREP" --version 2>&1` in
3577*GNU*)
3578  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3579*)
3580  ac_count=0
3581  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3582  while :
3583  do
3584    cat "conftest.in" "conftest.in" >"conftest.tmp"
3585    mv "conftest.tmp" "conftest.in"
3586    cp "conftest.in" "conftest.nl"
3587    echo 'GREP' >> "conftest.nl"
3588    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3589    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3590    ac_count=`expr $ac_count + 1`
3591    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3592      # Best one so far, save it but keep looking for a better one
3593      ac_cv_path_GREP="$ac_path_GREP"
3594      ac_path_GREP_max=$ac_count
3595    fi
3596    # 10*(2^10) chars as input seems more than enough
3597    test $ac_count -gt 10 && break
3598  done
3599  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3600esac
3601
3602
3603    $ac_path_GREP_found && break 3
3604  done
3605done
3606
3607done
3608IFS=$as_save_IFS
3609
3610
3611fi
3612
3613GREP="$ac_cv_path_GREP"
3614if test -z "$GREP"; then
3615  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3616echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3617   { (exit 1); exit 1; }; }
3618fi
3619
3620else
3621  ac_cv_path_GREP=$GREP
3622fi
3623
3624
3625fi
3626{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3627echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3628 GREP="$ac_cv_path_GREP"
3629
3630
3631{ echo "$as_me:$LINENO: checking for egrep" >&5
3632echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3633if test "${ac_cv_path_EGREP+set}" = set; then
3634  echo $ECHO_N "(cached) $ECHO_C" >&6
3635else
3636  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3637   then ac_cv_path_EGREP="$GREP -E"
3638   else
3639     # Extract the first word of "egrep" to use in msg output
3640if test -z "$EGREP"; then
3641set dummy egrep; ac_prog_name=$2
3642if test "${ac_cv_path_EGREP+set}" = set; then
3643  echo $ECHO_N "(cached) $ECHO_C" >&6
3644else
3645  ac_path_EGREP_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 egrep; do
3653  for ac_exec_ext in '' $ac_executable_extensions; do
3654    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3655    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3656    # Check for GNU ac_path_EGREP and select it if it is found.
3657  # Check for GNU $ac_path_EGREP
3658case `"$ac_path_EGREP" --version 2>&1` in
3659*GNU*)
3660  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_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 'EGREP' >> "conftest.nl"
3670    "$ac_path_EGREP" 'EGREP$' < "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_EGREP_max-0}; then
3674      # Best one so far, save it but keep looking for a better one
3675      ac_cv_path_EGREP="$ac_path_EGREP"
3676      ac_path_EGREP_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_EGREP_found && break 3
3686  done
3687done
3688
3689done
3690IFS=$as_save_IFS
3691
3692
3693fi
3694
3695EGREP="$ac_cv_path_EGREP"
3696if test -z "$EGREP"; 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_EGREP=$EGREP
3704fi
3705
3706
3707   fi
3708fi
3709{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3710echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3711 EGREP="$ac_cv_path_EGREP"
3712
3713
3714{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3715echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
3716if test "${ac_cv_header_stdc+set}" = set; then
3717  echo $ECHO_N "(cached) $ECHO_C" >&6
3718else
3719  cat >conftest.$ac_ext <<_ACEOF
3720/* confdefs.h.  */
3721_ACEOF
3722cat confdefs.h >>conftest.$ac_ext
3723cat >>conftest.$ac_ext <<_ACEOF
3724/* end confdefs.h.  */
3725#include <stdlib.h>
3726#include <stdarg.h>
3727#include <string.h>
3728#include <float.h>
3729
3730int
3731main ()
3732{
3733
3734  ;
3735  return 0;
3736}
3737_ACEOF
3738rm -f conftest.$ac_objext
3739if { (ac_try="$ac_compile"
3740case "(($ac_try" in
3741  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3742  *) ac_try_echo=$ac_try;;
3743esac
3744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3745  (eval "$ac_compile") 2>conftest.er1
3746  ac_status=$?
3747  grep -v '^ *+' conftest.er1 >conftest.err
3748  rm -f conftest.er1
3749  cat conftest.err >&5
3750  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3751  (exit $ac_status); } && {
3752	 test -z "$ac_c_werror_flag" ||
3753	 test ! -s conftest.err
3754       } && test -s conftest.$ac_objext; then
3755  ac_cv_header_stdc=yes
3756else
3757  echo "$as_me: failed program was:" >&5
3758sed 's/^/| /' conftest.$ac_ext >&5
3759
3760	ac_cv_header_stdc=no
3761fi
3762
3763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3764
3765if test $ac_cv_header_stdc = yes; then
3766  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3767  cat >conftest.$ac_ext <<_ACEOF
3768/* confdefs.h.  */
3769_ACEOF
3770cat confdefs.h >>conftest.$ac_ext
3771cat >>conftest.$ac_ext <<_ACEOF
3772/* end confdefs.h.  */
3773#include <string.h>
3774
3775_ACEOF
3776if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3777  $EGREP "memchr" >/dev/null 2>&1; then
3778  :
3779else
3780  ac_cv_header_stdc=no
3781fi
3782rm -f conftest*
3783
3784fi
3785
3786if test $ac_cv_header_stdc = yes; then
3787  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3788  cat >conftest.$ac_ext <<_ACEOF
3789/* confdefs.h.  */
3790_ACEOF
3791cat confdefs.h >>conftest.$ac_ext
3792cat >>conftest.$ac_ext <<_ACEOF
3793/* end confdefs.h.  */
3794#include <stdlib.h>
3795
3796_ACEOF
3797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3798  $EGREP "free" >/dev/null 2>&1; then
3799  :
3800else
3801  ac_cv_header_stdc=no
3802fi
3803rm -f conftest*
3804
3805fi
3806
3807if test $ac_cv_header_stdc = yes; then
3808  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3809  if test "$cross_compiling" = yes; then
3810  :
3811else
3812  cat >conftest.$ac_ext <<_ACEOF
3813/* confdefs.h.  */
3814_ACEOF
3815cat confdefs.h >>conftest.$ac_ext
3816cat >>conftest.$ac_ext <<_ACEOF
3817/* end confdefs.h.  */
3818#include <ctype.h>
3819#include <stdlib.h>
3820#if ((' ' & 0x0FF) == 0x020)
3821# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3822# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3823#else
3824# define ISLOWER(c) \
3825		   (('a' <= (c) && (c) <= 'i') \
3826		     || ('j' <= (c) && (c) <= 'r') \
3827		     || ('s' <= (c) && (c) <= 'z'))
3828# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3829#endif
3830
3831#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3832int
3833main ()
3834{
3835  int i;
3836  for (i = 0; i < 256; i++)
3837    if (XOR (islower (i), ISLOWER (i))
3838	|| toupper (i) != TOUPPER (i))
3839      return 2;
3840  return 0;
3841}
3842_ACEOF
3843rm -f conftest$ac_exeext
3844if { (ac_try="$ac_link"
3845case "(($ac_try" in
3846  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3847  *) ac_try_echo=$ac_try;;
3848esac
3849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3850  (eval "$ac_link") 2>&5
3851  ac_status=$?
3852  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3853  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3854  { (case "(($ac_try" in
3855  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3856  *) ac_try_echo=$ac_try;;
3857esac
3858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3859  (eval "$ac_try") 2>&5
3860  ac_status=$?
3861  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3862  (exit $ac_status); }; }; then
3863  :
3864else
3865  echo "$as_me: program exited with status $ac_status" >&5
3866echo "$as_me: failed program was:" >&5
3867sed 's/^/| /' conftest.$ac_ext >&5
3868
3869( exit $ac_status )
3870ac_cv_header_stdc=no
3871fi
3872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3873fi
3874
3875
3876fi
3877fi
3878{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3879echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
3880if test $ac_cv_header_stdc = yes; then
3881
3882cat >>confdefs.h <<\_ACEOF
3883#define STDC_HEADERS 1
3884_ACEOF
3885
3886fi
3887
3888# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3899		  inttypes.h stdint.h unistd.h
3900do
3901as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3902{ echo "$as_me:$LINENO: checking for $ac_header" >&5
3903echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
3904if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
3905  echo $ECHO_N "(cached) $ECHO_C" >&6
3906else
3907  cat >conftest.$ac_ext <<_ACEOF
3908/* confdefs.h.  */
3909_ACEOF
3910cat confdefs.h >>conftest.$ac_ext
3911cat >>conftest.$ac_ext <<_ACEOF
3912/* end confdefs.h.  */
3913$ac_includes_default
3914
3915#include <$ac_header>
3916_ACEOF
3917rm -f conftest.$ac_objext
3918if { (ac_try="$ac_compile"
3919case "(($ac_try" in
3920  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3921  *) ac_try_echo=$ac_try;;
3922esac
3923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3924  (eval "$ac_compile") 2>conftest.er1
3925  ac_status=$?
3926  grep -v '^ *+' conftest.er1 >conftest.err
3927  rm -f conftest.er1
3928  cat conftest.err >&5
3929  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3930  (exit $ac_status); } && {
3931	 test -z "$ac_c_werror_flag" ||
3932	 test ! -s conftest.err
3933       } && test -s conftest.$ac_objext; then
3934  eval "$as_ac_Header=yes"
3935else
3936  echo "$as_me: failed program was:" >&5
3937sed 's/^/| /' conftest.$ac_ext >&5
3938
3939	eval "$as_ac_Header=no"
3940fi
3941
3942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3943fi
3944ac_res=`eval echo '${'$as_ac_Header'}'`
3945	       { echo "$as_me:$LINENO: result: $ac_res" >&5
3946echo "${ECHO_T}$ac_res" >&6; }
3947if test `eval echo '${'$as_ac_Header'}'` = yes; then
3948  cat >>confdefs.h <<_ACEOF
3949#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3950_ACEOF
3951
3952fi
3953
3954done
3955
3956
3957
3958    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
3959
3960
3961    #------------------------------------------------------------------------
3962    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
3963    # It makes compiling go faster.  (This is only a performance feature.)
3964    #------------------------------------------------------------------------
3965
3966    if test -z "$no_pipe" -a -n "$GCC"; then
3967	{ echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
3968echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; }
3969if test "${tcl_cv_cc_pipe+set}" = set; then
3970  echo $ECHO_N "(cached) $ECHO_C" >&6
3971else
3972
3973	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
3974	    cat >conftest.$ac_ext <<_ACEOF
3975/* confdefs.h.  */
3976_ACEOF
3977cat confdefs.h >>conftest.$ac_ext
3978cat >>conftest.$ac_ext <<_ACEOF
3979/* end confdefs.h.  */
3980
3981int
3982main ()
3983{
3984
3985  ;
3986  return 0;
3987}
3988_ACEOF
3989rm -f conftest.$ac_objext
3990if { (ac_try="$ac_compile"
3991case "(($ac_try" in
3992  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3993  *) ac_try_echo=$ac_try;;
3994esac
3995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3996  (eval "$ac_compile") 2>conftest.er1
3997  ac_status=$?
3998  grep -v '^ *+' conftest.er1 >conftest.err
3999  rm -f conftest.er1
4000  cat conftest.err >&5
4001  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4002  (exit $ac_status); } && {
4003	 test -z "$ac_c_werror_flag" ||
4004	 test ! -s conftest.err
4005       } && test -s conftest.$ac_objext; then
4006  tcl_cv_cc_pipe=yes
4007else
4008  echo "$as_me: failed program was:" >&5
4009sed 's/^/| /' conftest.$ac_ext >&5
4010
4011	tcl_cv_cc_pipe=no
4012fi
4013
4014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4015	    CFLAGS=$hold_cflags
4016fi
4017{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
4018echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; }
4019	if test $tcl_cv_cc_pipe = yes; then
4020	    CFLAGS="$CFLAGS -pipe"
4021	fi
4022    fi
4023
4024    #--------------------------------------------------------------------
4025    # Common compiler flag setup
4026    #--------------------------------------------------------------------
4027
4028    { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
4029echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
4030if test "${ac_cv_c_bigendian+set}" = set; then
4031  echo $ECHO_N "(cached) $ECHO_C" >&6
4032else
4033  # See if sys/param.h defines the BYTE_ORDER macro.
4034cat >conftest.$ac_ext <<_ACEOF
4035/* confdefs.h.  */
4036_ACEOF
4037cat confdefs.h >>conftest.$ac_ext
4038cat >>conftest.$ac_ext <<_ACEOF
4039/* end confdefs.h.  */
4040#include <sys/types.h>
4041#include <sys/param.h>
4042
4043int
4044main ()
4045{
4046#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
4047	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
4048 bogus endian macros
4049#endif
4050
4051  ;
4052  return 0;
4053}
4054_ACEOF
4055rm -f conftest.$ac_objext
4056if { (ac_try="$ac_compile"
4057case "(($ac_try" in
4058  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4059  *) ac_try_echo=$ac_try;;
4060esac
4061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4062  (eval "$ac_compile") 2>conftest.er1
4063  ac_status=$?
4064  grep -v '^ *+' conftest.er1 >conftest.err
4065  rm -f conftest.er1
4066  cat conftest.err >&5
4067  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4068  (exit $ac_status); } && {
4069	 test -z "$ac_c_werror_flag" ||
4070	 test ! -s conftest.err
4071       } && test -s conftest.$ac_objext; then
4072  # It does; now see whether it defined to BIG_ENDIAN or not.
4073cat >conftest.$ac_ext <<_ACEOF
4074/* confdefs.h.  */
4075_ACEOF
4076cat confdefs.h >>conftest.$ac_ext
4077cat >>conftest.$ac_ext <<_ACEOF
4078/* end confdefs.h.  */
4079#include <sys/types.h>
4080#include <sys/param.h>
4081
4082int
4083main ()
4084{
4085#if BYTE_ORDER != BIG_ENDIAN
4086 not big endian
4087#endif
4088
4089  ;
4090  return 0;
4091}
4092_ACEOF
4093rm -f conftest.$ac_objext
4094if { (ac_try="$ac_compile"
4095case "(($ac_try" in
4096  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4097  *) ac_try_echo=$ac_try;;
4098esac
4099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4100  (eval "$ac_compile") 2>conftest.er1
4101  ac_status=$?
4102  grep -v '^ *+' conftest.er1 >conftest.err
4103  rm -f conftest.er1
4104  cat conftest.err >&5
4105  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4106  (exit $ac_status); } && {
4107	 test -z "$ac_c_werror_flag" ||
4108	 test ! -s conftest.err
4109       } && test -s conftest.$ac_objext; then
4110  ac_cv_c_bigendian=yes
4111else
4112  echo "$as_me: failed program was:" >&5
4113sed 's/^/| /' conftest.$ac_ext >&5
4114
4115	ac_cv_c_bigendian=no
4116fi
4117
4118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4119else
4120  echo "$as_me: failed program was:" >&5
4121sed 's/^/| /' conftest.$ac_ext >&5
4122
4123	# It does not; compile a test program.
4124if test "$cross_compiling" = yes; then
4125  # try to guess the endianness by grepping values into an object file
4126  ac_cv_c_bigendian=unknown
4127  cat >conftest.$ac_ext <<_ACEOF
4128/* confdefs.h.  */
4129_ACEOF
4130cat confdefs.h >>conftest.$ac_ext
4131cat >>conftest.$ac_ext <<_ACEOF
4132/* end confdefs.h.  */
4133short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4134short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4135void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
4136short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4137short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4138void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
4139int
4140main ()
4141{
4142 _ascii (); _ebcdic ();
4143  ;
4144  return 0;
4145}
4146_ACEOF
4147rm -f conftest.$ac_objext
4148if { (ac_try="$ac_compile"
4149case "(($ac_try" in
4150  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4151  *) ac_try_echo=$ac_try;;
4152esac
4153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4154  (eval "$ac_compile") 2>conftest.er1
4155  ac_status=$?
4156  grep -v '^ *+' conftest.er1 >conftest.err
4157  rm -f conftest.er1
4158  cat conftest.err >&5
4159  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4160  (exit $ac_status); } && {
4161	 test -z "$ac_c_werror_flag" ||
4162	 test ! -s conftest.err
4163       } && test -s conftest.$ac_objext; then
4164  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
4165  ac_cv_c_bigendian=yes
4166fi
4167if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4168  if test "$ac_cv_c_bigendian" = unknown; then
4169    ac_cv_c_bigendian=no
4170  else
4171    # finding both strings is unlikely to happen, but who knows?
4172    ac_cv_c_bigendian=unknown
4173  fi
4174fi
4175else
4176  echo "$as_me: failed program was:" >&5
4177sed 's/^/| /' conftest.$ac_ext >&5
4178
4179
4180fi
4181
4182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4183else
4184  cat >conftest.$ac_ext <<_ACEOF
4185/* confdefs.h.  */
4186_ACEOF
4187cat confdefs.h >>conftest.$ac_ext
4188cat >>conftest.$ac_ext <<_ACEOF
4189/* end confdefs.h.  */
4190$ac_includes_default
4191int
4192main ()
4193{
4194
4195  /* Are we little or big endian?  From Harbison&Steele.  */
4196  union
4197  {
4198    long int l;
4199    char c[sizeof (long int)];
4200  } u;
4201  u.l = 1;
4202  return u.c[sizeof (long int) - 1] == 1;
4203
4204  ;
4205  return 0;
4206}
4207_ACEOF
4208rm -f conftest$ac_exeext
4209if { (ac_try="$ac_link"
4210case "(($ac_try" in
4211  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4212  *) ac_try_echo=$ac_try;;
4213esac
4214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4215  (eval "$ac_link") 2>&5
4216  ac_status=$?
4217  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4218  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4219  { (case "(($ac_try" in
4220  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4221  *) ac_try_echo=$ac_try;;
4222esac
4223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4224  (eval "$ac_try") 2>&5
4225  ac_status=$?
4226  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4227  (exit $ac_status); }; }; then
4228  ac_cv_c_bigendian=no
4229else
4230  echo "$as_me: program exited with status $ac_status" >&5
4231echo "$as_me: failed program was:" >&5
4232sed 's/^/| /' conftest.$ac_ext >&5
4233
4234( exit $ac_status )
4235ac_cv_c_bigendian=yes
4236fi
4237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4238fi
4239
4240
4241fi
4242
4243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4244fi
4245{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
4246echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
4247case $ac_cv_c_bigendian in
4248  yes)
4249
4250cat >>confdefs.h <<\_ACEOF
4251#define WORDS_BIGENDIAN 1
4252_ACEOF
4253 ;;
4254  no)
4255     ;;
4256  *)
4257    { { echo "$as_me:$LINENO: error: unknown endianness
4258presetting ac_cv_c_bigendian=no (or yes) will help" >&5
4259echo "$as_me: error: unknown endianness
4260presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
4261   { (exit 1); exit 1; }; } ;;
4262esac
4263
4264    if test "${TEA_PLATFORM}" = "unix" ; then
4265
4266    #--------------------------------------------------------------------
4267    # On a few very rare systems, all of the libm.a stuff is
4268    # already in libc.a.  Set compiler flags accordingly.
4269    # Also, Linux requires the "ieee" library for math to work
4270    # right (and it must appear before "-lm").
4271    #--------------------------------------------------------------------
4272
4273    { echo "$as_me:$LINENO: checking for sin" >&5
4274echo $ECHO_N "checking for sin... $ECHO_C" >&6; }
4275if test "${ac_cv_func_sin+set}" = set; then
4276  echo $ECHO_N "(cached) $ECHO_C" >&6
4277else
4278  cat >conftest.$ac_ext <<_ACEOF
4279/* confdefs.h.  */
4280_ACEOF
4281cat confdefs.h >>conftest.$ac_ext
4282cat >>conftest.$ac_ext <<_ACEOF
4283/* end confdefs.h.  */
4284/* Define sin to an innocuous variant, in case <limits.h> declares sin.
4285   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4286#define sin innocuous_sin
4287
4288/* System header to define __stub macros and hopefully few prototypes,
4289    which can conflict with char sin (); below.
4290    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4291    <limits.h> exists even on freestanding compilers.  */
4292
4293#ifdef __STDC__
4294# include <limits.h>
4295#else
4296# include <assert.h>
4297#endif
4298
4299#undef sin
4300
4301/* Override any GCC internal prototype to avoid an error.
4302   Use char because int might match the return type of a GCC
4303   builtin and then its argument prototype would still apply.  */
4304#ifdef __cplusplus
4305extern "C"
4306#endif
4307char sin ();
4308/* The GNU C library defines this for functions which it implements
4309    to always fail with ENOSYS.  Some functions are actually named
4310    something starting with __ and the normal name is an alias.  */
4311#if defined __stub_sin || defined __stub___sin
4312choke me
4313#endif
4314
4315int
4316main ()
4317{
4318return sin ();
4319  ;
4320  return 0;
4321}
4322_ACEOF
4323rm -f conftest.$ac_objext conftest$ac_exeext
4324if { (ac_try="$ac_link"
4325case "(($ac_try" in
4326  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4327  *) ac_try_echo=$ac_try;;
4328esac
4329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4330  (eval "$ac_link") 2>conftest.er1
4331  ac_status=$?
4332  grep -v '^ *+' conftest.er1 >conftest.err
4333  rm -f conftest.er1
4334  cat conftest.err >&5
4335  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4336  (exit $ac_status); } && {
4337	 test -z "$ac_c_werror_flag" ||
4338	 test ! -s conftest.err
4339       } && test -s conftest$ac_exeext &&
4340       $as_test_x conftest$ac_exeext; then
4341  ac_cv_func_sin=yes
4342else
4343  echo "$as_me: failed program was:" >&5
4344sed 's/^/| /' conftest.$ac_ext >&5
4345
4346	ac_cv_func_sin=no
4347fi
4348
4349rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4350      conftest$ac_exeext conftest.$ac_ext
4351fi
4352{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
4353echo "${ECHO_T}$ac_cv_func_sin" >&6; }
4354if test $ac_cv_func_sin = yes; then
4355  MATH_LIBS=""
4356else
4357  MATH_LIBS="-lm"
4358fi
4359
4360    { echo "$as_me:$LINENO: checking for main in -lieee" >&5
4361echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; }
4362if test "${ac_cv_lib_ieee_main+set}" = set; then
4363  echo $ECHO_N "(cached) $ECHO_C" >&6
4364else
4365  ac_check_lib_save_LIBS=$LIBS
4366LIBS="-lieee  $LIBS"
4367cat >conftest.$ac_ext <<_ACEOF
4368/* confdefs.h.  */
4369_ACEOF
4370cat confdefs.h >>conftest.$ac_ext
4371cat >>conftest.$ac_ext <<_ACEOF
4372/* end confdefs.h.  */
4373
4374
4375int
4376main ()
4377{
4378return main ();
4379  ;
4380  return 0;
4381}
4382_ACEOF
4383rm -f conftest.$ac_objext conftest$ac_exeext
4384if { (ac_try="$ac_link"
4385case "(($ac_try" in
4386  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4387  *) ac_try_echo=$ac_try;;
4388esac
4389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4390  (eval "$ac_link") 2>conftest.er1
4391  ac_status=$?
4392  grep -v '^ *+' conftest.er1 >conftest.err
4393  rm -f conftest.er1
4394  cat conftest.err >&5
4395  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4396  (exit $ac_status); } && {
4397	 test -z "$ac_c_werror_flag" ||
4398	 test ! -s conftest.err
4399       } && test -s conftest$ac_exeext &&
4400       $as_test_x conftest$ac_exeext; then
4401  ac_cv_lib_ieee_main=yes
4402else
4403  echo "$as_me: failed program was:" >&5
4404sed 's/^/| /' conftest.$ac_ext >&5
4405
4406	ac_cv_lib_ieee_main=no
4407fi
4408
4409rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4410      conftest$ac_exeext conftest.$ac_ext
4411LIBS=$ac_check_lib_save_LIBS
4412fi
4413{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
4414echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; }
4415if test $ac_cv_lib_ieee_main = yes; then
4416  MATH_LIBS="-lieee $MATH_LIBS"
4417fi
4418
4419
4420    #--------------------------------------------------------------------
4421    # Interactive UNIX requires -linet instead of -lsocket, plus it
4422    # needs net/errno.h to define the socket-related error codes.
4423    #--------------------------------------------------------------------
4424
4425    { echo "$as_me:$LINENO: checking for main in -linet" >&5
4426echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; }
4427if test "${ac_cv_lib_inet_main+set}" = set; then
4428  echo $ECHO_N "(cached) $ECHO_C" >&6
4429else
4430  ac_check_lib_save_LIBS=$LIBS
4431LIBS="-linet  $LIBS"
4432cat >conftest.$ac_ext <<_ACEOF
4433/* confdefs.h.  */
4434_ACEOF
4435cat confdefs.h >>conftest.$ac_ext
4436cat >>conftest.$ac_ext <<_ACEOF
4437/* end confdefs.h.  */
4438
4439
4440int
4441main ()
4442{
4443return main ();
4444  ;
4445  return 0;
4446}
4447_ACEOF
4448rm -f conftest.$ac_objext conftest$ac_exeext
4449if { (ac_try="$ac_link"
4450case "(($ac_try" in
4451  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4452  *) ac_try_echo=$ac_try;;
4453esac
4454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4455  (eval "$ac_link") 2>conftest.er1
4456  ac_status=$?
4457  grep -v '^ *+' conftest.er1 >conftest.err
4458  rm -f conftest.er1
4459  cat conftest.err >&5
4460  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4461  (exit $ac_status); } && {
4462	 test -z "$ac_c_werror_flag" ||
4463	 test ! -s conftest.err
4464       } && test -s conftest$ac_exeext &&
4465       $as_test_x conftest$ac_exeext; then
4466  ac_cv_lib_inet_main=yes
4467else
4468  echo "$as_me: failed program was:" >&5
4469sed 's/^/| /' conftest.$ac_ext >&5
4470
4471	ac_cv_lib_inet_main=no
4472fi
4473
4474rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4475      conftest$ac_exeext conftest.$ac_ext
4476LIBS=$ac_check_lib_save_LIBS
4477fi
4478{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
4479echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; }
4480if test $ac_cv_lib_inet_main = yes; then
4481  LIBS="$LIBS -linet"
4482fi
4483
4484    if test "${ac_cv_header_net_errno_h+set}" = set; then
4485  { echo "$as_me:$LINENO: checking for net/errno.h" >&5
4486echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4487if test "${ac_cv_header_net_errno_h+set}" = set; then
4488  echo $ECHO_N "(cached) $ECHO_C" >&6
4489fi
4490{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4491echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4492else
4493  # Is the header compilable?
4494{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5
4495echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; }
4496cat >conftest.$ac_ext <<_ACEOF
4497/* confdefs.h.  */
4498_ACEOF
4499cat confdefs.h >>conftest.$ac_ext
4500cat >>conftest.$ac_ext <<_ACEOF
4501/* end confdefs.h.  */
4502$ac_includes_default
4503#include <net/errno.h>
4504_ACEOF
4505rm -f conftest.$ac_objext
4506if { (ac_try="$ac_compile"
4507case "(($ac_try" in
4508  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4509  *) ac_try_echo=$ac_try;;
4510esac
4511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4512  (eval "$ac_compile") 2>conftest.er1
4513  ac_status=$?
4514  grep -v '^ *+' conftest.er1 >conftest.err
4515  rm -f conftest.er1
4516  cat conftest.err >&5
4517  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4518  (exit $ac_status); } && {
4519	 test -z "$ac_c_werror_flag" ||
4520	 test ! -s conftest.err
4521       } && test -s conftest.$ac_objext; then
4522  ac_header_compiler=yes
4523else
4524  echo "$as_me: failed program was:" >&5
4525sed 's/^/| /' conftest.$ac_ext >&5
4526
4527	ac_header_compiler=no
4528fi
4529
4530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4531{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4532echo "${ECHO_T}$ac_header_compiler" >&6; }
4533
4534# Is the header present?
4535{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5
4536echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; }
4537cat >conftest.$ac_ext <<_ACEOF
4538/* confdefs.h.  */
4539_ACEOF
4540cat confdefs.h >>conftest.$ac_ext
4541cat >>conftest.$ac_ext <<_ACEOF
4542/* end confdefs.h.  */
4543#include <net/errno.h>
4544_ACEOF
4545if { (ac_try="$ac_cpp conftest.$ac_ext"
4546case "(($ac_try" in
4547  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4548  *) ac_try_echo=$ac_try;;
4549esac
4550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4551  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4552  ac_status=$?
4553  grep -v '^ *+' conftest.er1 >conftest.err
4554  rm -f conftest.er1
4555  cat conftest.err >&5
4556  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4557  (exit $ac_status); } >/dev/null && {
4558	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4559	 test ! -s conftest.err
4560       }; then
4561  ac_header_preproc=yes
4562else
4563  echo "$as_me: failed program was:" >&5
4564sed 's/^/| /' conftest.$ac_ext >&5
4565
4566  ac_header_preproc=no
4567fi
4568
4569rm -f conftest.err conftest.$ac_ext
4570{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4571echo "${ECHO_T}$ac_header_preproc" >&6; }
4572
4573# So?  What about this header?
4574case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4575  yes:no: )
4576    { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
4577echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4578    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
4579echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
4580    ac_header_preproc=yes
4581    ;;
4582  no:yes:* )
4583    { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
4584echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
4585    { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
4586echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
4587    { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
4588echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
4589    { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
4590echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4591    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
4592echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
4593    { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
4594echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
4595
4596    ;;
4597esac
4598{ echo "$as_me:$LINENO: checking for net/errno.h" >&5
4599echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4600if test "${ac_cv_header_net_errno_h+set}" = set; then
4601  echo $ECHO_N "(cached) $ECHO_C" >&6
4602else
4603  ac_cv_header_net_errno_h=$ac_header_preproc
4604fi
4605{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4606echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4607
4608fi
4609if test $ac_cv_header_net_errno_h = yes; then
4610
4611
4612cat >>confdefs.h <<\_ACEOF
4613#define HAVE_NET_ERRNO_H 1
4614_ACEOF
4615
4616fi
4617
4618
4619
4620    #--------------------------------------------------------------------
4621    #	Check for the existence of the -lsocket and -lnsl libraries.
4622    #	The order here is important, so that they end up in the right
4623    #	order in the command line generated by make.  Here are some
4624    #	special considerations:
4625    #	1. Use "connect" and "accept" to check for -lsocket, and
4626    #	   "gethostbyname" to check for -lnsl.
4627    #	2. Use each function name only once:  can't redo a check because
4628    #	   autoconf caches the results of the last check and won't redo it.
4629    #	3. Use -lnsl and -lsocket only if they supply procedures that
4630    #	   aren't already present in the normal libraries.  This is because
4631    #	   IRIX 5.2 has libraries, but they aren't needed and they're
4632    #	   bogus:  they goof up name resolution if used.
4633    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4634    #	   To get around this problem, check for both libraries together
4635    #	   if -lsocket doesn't work by itself.
4636    #--------------------------------------------------------------------
4637
4638    tcl_checkBoth=0
4639    { echo "$as_me:$LINENO: checking for connect" >&5
4640echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
4641if test "${ac_cv_func_connect+set}" = set; then
4642  echo $ECHO_N "(cached) $ECHO_C" >&6
4643else
4644  cat >conftest.$ac_ext <<_ACEOF
4645/* confdefs.h.  */
4646_ACEOF
4647cat confdefs.h >>conftest.$ac_ext
4648cat >>conftest.$ac_ext <<_ACEOF
4649/* end confdefs.h.  */
4650/* Define connect to an innocuous variant, in case <limits.h> declares connect.
4651   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4652#define connect innocuous_connect
4653
4654/* System header to define __stub macros and hopefully few prototypes,
4655    which can conflict with char connect (); below.
4656    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4657    <limits.h> exists even on freestanding compilers.  */
4658
4659#ifdef __STDC__
4660# include <limits.h>
4661#else
4662# include <assert.h>
4663#endif
4664
4665#undef connect
4666
4667/* Override any GCC internal prototype to avoid an error.
4668   Use char because int might match the return type of a GCC
4669   builtin and then its argument prototype would still apply.  */
4670#ifdef __cplusplus
4671extern "C"
4672#endif
4673char connect ();
4674/* The GNU C library defines this for functions which it implements
4675    to always fail with ENOSYS.  Some functions are actually named
4676    something starting with __ and the normal name is an alias.  */
4677#if defined __stub_connect || defined __stub___connect
4678choke me
4679#endif
4680
4681int
4682main ()
4683{
4684return connect ();
4685  ;
4686  return 0;
4687}
4688_ACEOF
4689rm -f conftest.$ac_objext conftest$ac_exeext
4690if { (ac_try="$ac_link"
4691case "(($ac_try" in
4692  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4693  *) ac_try_echo=$ac_try;;
4694esac
4695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4696  (eval "$ac_link") 2>conftest.er1
4697  ac_status=$?
4698  grep -v '^ *+' conftest.er1 >conftest.err
4699  rm -f conftest.er1
4700  cat conftest.err >&5
4701  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4702  (exit $ac_status); } && {
4703	 test -z "$ac_c_werror_flag" ||
4704	 test ! -s conftest.err
4705       } && test -s conftest$ac_exeext &&
4706       $as_test_x conftest$ac_exeext; then
4707  ac_cv_func_connect=yes
4708else
4709  echo "$as_me: failed program was:" >&5
4710sed 's/^/| /' conftest.$ac_ext >&5
4711
4712	ac_cv_func_connect=no
4713fi
4714
4715rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4716      conftest$ac_exeext conftest.$ac_ext
4717fi
4718{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
4719echo "${ECHO_T}$ac_cv_func_connect" >&6; }
4720if test $ac_cv_func_connect = yes; then
4721  tcl_checkSocket=0
4722else
4723  tcl_checkSocket=1
4724fi
4725
4726    if test "$tcl_checkSocket" = 1; then
4727	{ echo "$as_me:$LINENO: checking for setsockopt" >&5
4728echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; }
4729if test "${ac_cv_func_setsockopt+set}" = set; then
4730  echo $ECHO_N "(cached) $ECHO_C" >&6
4731else
4732  cat >conftest.$ac_ext <<_ACEOF
4733/* confdefs.h.  */
4734_ACEOF
4735cat confdefs.h >>conftest.$ac_ext
4736cat >>conftest.$ac_ext <<_ACEOF
4737/* end confdefs.h.  */
4738/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
4739   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4740#define setsockopt innocuous_setsockopt
4741
4742/* System header to define __stub macros and hopefully few prototypes,
4743    which can conflict with char setsockopt (); below.
4744    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4745    <limits.h> exists even on freestanding compilers.  */
4746
4747#ifdef __STDC__
4748# include <limits.h>
4749#else
4750# include <assert.h>
4751#endif
4752
4753#undef setsockopt
4754
4755/* Override any GCC internal prototype to avoid an error.
4756   Use char because int might match the return type of a GCC
4757   builtin and then its argument prototype would still apply.  */
4758#ifdef __cplusplus
4759extern "C"
4760#endif
4761char setsockopt ();
4762/* The GNU C library defines this for functions which it implements
4763    to always fail with ENOSYS.  Some functions are actually named
4764    something starting with __ and the normal name is an alias.  */
4765#if defined __stub_setsockopt || defined __stub___setsockopt
4766choke me
4767#endif
4768
4769int
4770main ()
4771{
4772return setsockopt ();
4773  ;
4774  return 0;
4775}
4776_ACEOF
4777rm -f conftest.$ac_objext conftest$ac_exeext
4778if { (ac_try="$ac_link"
4779case "(($ac_try" in
4780  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4781  *) ac_try_echo=$ac_try;;
4782esac
4783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4784  (eval "$ac_link") 2>conftest.er1
4785  ac_status=$?
4786  grep -v '^ *+' conftest.er1 >conftest.err
4787  rm -f conftest.er1
4788  cat conftest.err >&5
4789  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4790  (exit $ac_status); } && {
4791	 test -z "$ac_c_werror_flag" ||
4792	 test ! -s conftest.err
4793       } && test -s conftest$ac_exeext &&
4794       $as_test_x conftest$ac_exeext; then
4795  ac_cv_func_setsockopt=yes
4796else
4797  echo "$as_me: failed program was:" >&5
4798sed 's/^/| /' conftest.$ac_ext >&5
4799
4800	ac_cv_func_setsockopt=no
4801fi
4802
4803rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4804      conftest$ac_exeext conftest.$ac_ext
4805fi
4806{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
4807echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
4808if test $ac_cv_func_setsockopt = yes; then
4809  :
4810else
4811  { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
4812echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
4813if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
4814  echo $ECHO_N "(cached) $ECHO_C" >&6
4815else
4816  ac_check_lib_save_LIBS=$LIBS
4817LIBS="-lsocket  $LIBS"
4818cat >conftest.$ac_ext <<_ACEOF
4819/* confdefs.h.  */
4820_ACEOF
4821cat confdefs.h >>conftest.$ac_ext
4822cat >>conftest.$ac_ext <<_ACEOF
4823/* end confdefs.h.  */
4824
4825/* Override any GCC internal prototype to avoid an error.
4826   Use char because int might match the return type of a GCC
4827   builtin and then its argument prototype would still apply.  */
4828#ifdef __cplusplus
4829extern "C"
4830#endif
4831char setsockopt ();
4832int
4833main ()
4834{
4835return setsockopt ();
4836  ;
4837  return 0;
4838}
4839_ACEOF
4840rm -f conftest.$ac_objext conftest$ac_exeext
4841if { (ac_try="$ac_link"
4842case "(($ac_try" in
4843  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4844  *) ac_try_echo=$ac_try;;
4845esac
4846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4847  (eval "$ac_link") 2>conftest.er1
4848  ac_status=$?
4849  grep -v '^ *+' conftest.er1 >conftest.err
4850  rm -f conftest.er1
4851  cat conftest.err >&5
4852  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4853  (exit $ac_status); } && {
4854	 test -z "$ac_c_werror_flag" ||
4855	 test ! -s conftest.err
4856       } && test -s conftest$ac_exeext &&
4857       $as_test_x conftest$ac_exeext; then
4858  ac_cv_lib_socket_setsockopt=yes
4859else
4860  echo "$as_me: failed program was:" >&5
4861sed 's/^/| /' conftest.$ac_ext >&5
4862
4863	ac_cv_lib_socket_setsockopt=no
4864fi
4865
4866rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4867      conftest$ac_exeext conftest.$ac_ext
4868LIBS=$ac_check_lib_save_LIBS
4869fi
4870{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
4871echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; }
4872if test $ac_cv_lib_socket_setsockopt = yes; then
4873  LIBS="$LIBS -lsocket"
4874else
4875  tcl_checkBoth=1
4876fi
4877
4878fi
4879
4880    fi
4881    if test "$tcl_checkBoth" = 1; then
4882	tk_oldLibs=$LIBS
4883	LIBS="$LIBS -lsocket -lnsl"
4884	{ echo "$as_me:$LINENO: checking for accept" >&5
4885echo $ECHO_N "checking for accept... $ECHO_C" >&6; }
4886if test "${ac_cv_func_accept+set}" = set; then
4887  echo $ECHO_N "(cached) $ECHO_C" >&6
4888else
4889  cat >conftest.$ac_ext <<_ACEOF
4890/* confdefs.h.  */
4891_ACEOF
4892cat confdefs.h >>conftest.$ac_ext
4893cat >>conftest.$ac_ext <<_ACEOF
4894/* end confdefs.h.  */
4895/* Define accept to an innocuous variant, in case <limits.h> declares accept.
4896   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4897#define accept innocuous_accept
4898
4899/* System header to define __stub macros and hopefully few prototypes,
4900    which can conflict with char accept (); below.
4901    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4902    <limits.h> exists even on freestanding compilers.  */
4903
4904#ifdef __STDC__
4905# include <limits.h>
4906#else
4907# include <assert.h>
4908#endif
4909
4910#undef accept
4911
4912/* Override any GCC internal prototype to avoid an error.
4913   Use char because int might match the return type of a GCC
4914   builtin and then its argument prototype would still apply.  */
4915#ifdef __cplusplus
4916extern "C"
4917#endif
4918char accept ();
4919/* The GNU C library defines this for functions which it implements
4920    to always fail with ENOSYS.  Some functions are actually named
4921    something starting with __ and the normal name is an alias.  */
4922#if defined __stub_accept || defined __stub___accept
4923choke me
4924#endif
4925
4926int
4927main ()
4928{
4929return accept ();
4930  ;
4931  return 0;
4932}
4933_ACEOF
4934rm -f conftest.$ac_objext conftest$ac_exeext
4935if { (ac_try="$ac_link"
4936case "(($ac_try" in
4937  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4938  *) ac_try_echo=$ac_try;;
4939esac
4940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4941  (eval "$ac_link") 2>conftest.er1
4942  ac_status=$?
4943  grep -v '^ *+' conftest.er1 >conftest.err
4944  rm -f conftest.er1
4945  cat conftest.err >&5
4946  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4947  (exit $ac_status); } && {
4948	 test -z "$ac_c_werror_flag" ||
4949	 test ! -s conftest.err
4950       } && test -s conftest$ac_exeext &&
4951       $as_test_x conftest$ac_exeext; then
4952  ac_cv_func_accept=yes
4953else
4954  echo "$as_me: failed program was:" >&5
4955sed 's/^/| /' conftest.$ac_ext >&5
4956
4957	ac_cv_func_accept=no
4958fi
4959
4960rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4961      conftest$ac_exeext conftest.$ac_ext
4962fi
4963{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
4964echo "${ECHO_T}$ac_cv_func_accept" >&6; }
4965if test $ac_cv_func_accept = yes; then
4966  tcl_checkNsl=0
4967else
4968  LIBS=$tk_oldLibs
4969fi
4970
4971    fi
4972    { echo "$as_me:$LINENO: checking for gethostbyname" >&5
4973echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
4974if test "${ac_cv_func_gethostbyname+set}" = set; then
4975  echo $ECHO_N "(cached) $ECHO_C" >&6
4976else
4977  cat >conftest.$ac_ext <<_ACEOF
4978/* confdefs.h.  */
4979_ACEOF
4980cat confdefs.h >>conftest.$ac_ext
4981cat >>conftest.$ac_ext <<_ACEOF
4982/* end confdefs.h.  */
4983/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
4984   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4985#define gethostbyname innocuous_gethostbyname
4986
4987/* System header to define __stub macros and hopefully few prototypes,
4988    which can conflict with char gethostbyname (); below.
4989    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4990    <limits.h> exists even on freestanding compilers.  */
4991
4992#ifdef __STDC__
4993# include <limits.h>
4994#else
4995# include <assert.h>
4996#endif
4997
4998#undef gethostbyname
4999
5000/* Override any GCC internal prototype to avoid an error.
5001   Use char because int might match the return type of a GCC
5002   builtin and then its argument prototype would still apply.  */
5003#ifdef __cplusplus
5004extern "C"
5005#endif
5006char gethostbyname ();
5007/* The GNU C library defines this for functions which it implements
5008    to always fail with ENOSYS.  Some functions are actually named
5009    something starting with __ and the normal name is an alias.  */
5010#if defined __stub_gethostbyname || defined __stub___gethostbyname
5011choke me
5012#endif
5013
5014int
5015main ()
5016{
5017return gethostbyname ();
5018  ;
5019  return 0;
5020}
5021_ACEOF
5022rm -f conftest.$ac_objext conftest$ac_exeext
5023if { (ac_try="$ac_link"
5024case "(($ac_try" in
5025  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5026  *) ac_try_echo=$ac_try;;
5027esac
5028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5029  (eval "$ac_link") 2>conftest.er1
5030  ac_status=$?
5031  grep -v '^ *+' conftest.er1 >conftest.err
5032  rm -f conftest.er1
5033  cat conftest.err >&5
5034  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5035  (exit $ac_status); } && {
5036	 test -z "$ac_c_werror_flag" ||
5037	 test ! -s conftest.err
5038       } && test -s conftest$ac_exeext &&
5039       $as_test_x conftest$ac_exeext; then
5040  ac_cv_func_gethostbyname=yes
5041else
5042  echo "$as_me: failed program was:" >&5
5043sed 's/^/| /' conftest.$ac_ext >&5
5044
5045	ac_cv_func_gethostbyname=no
5046fi
5047
5048rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5049      conftest$ac_exeext conftest.$ac_ext
5050fi
5051{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5052echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
5053if test $ac_cv_func_gethostbyname = yes; then
5054  :
5055else
5056  { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5057echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
5058if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5059  echo $ECHO_N "(cached) $ECHO_C" >&6
5060else
5061  ac_check_lib_save_LIBS=$LIBS
5062LIBS="-lnsl  $LIBS"
5063cat >conftest.$ac_ext <<_ACEOF
5064/* confdefs.h.  */
5065_ACEOF
5066cat confdefs.h >>conftest.$ac_ext
5067cat >>conftest.$ac_ext <<_ACEOF
5068/* end confdefs.h.  */
5069
5070/* Override any GCC internal prototype to avoid an error.
5071   Use char because int might match the return type of a GCC
5072   builtin and then its argument prototype would still apply.  */
5073#ifdef __cplusplus
5074extern "C"
5075#endif
5076char gethostbyname ();
5077int
5078main ()
5079{
5080return gethostbyname ();
5081  ;
5082  return 0;
5083}
5084_ACEOF
5085rm -f conftest.$ac_objext conftest$ac_exeext
5086if { (ac_try="$ac_link"
5087case "(($ac_try" in
5088  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5089  *) ac_try_echo=$ac_try;;
5090esac
5091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5092  (eval "$ac_link") 2>conftest.er1
5093  ac_status=$?
5094  grep -v '^ *+' conftest.er1 >conftest.err
5095  rm -f conftest.er1
5096  cat conftest.err >&5
5097  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5098  (exit $ac_status); } && {
5099	 test -z "$ac_c_werror_flag" ||
5100	 test ! -s conftest.err
5101       } && test -s conftest$ac_exeext &&
5102       $as_test_x conftest$ac_exeext; then
5103  ac_cv_lib_nsl_gethostbyname=yes
5104else
5105  echo "$as_me: failed program was:" >&5
5106sed 's/^/| /' conftest.$ac_ext >&5
5107
5108	ac_cv_lib_nsl_gethostbyname=no
5109fi
5110
5111rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5112      conftest$ac_exeext conftest.$ac_ext
5113LIBS=$ac_check_lib_save_LIBS
5114fi
5115{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5116echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
5117if test $ac_cv_lib_nsl_gethostbyname = yes; then
5118  LIBS="$LIBS -lnsl"
5119fi
5120
5121fi
5122
5123
5124    # TEA specific: Don't perform the eval of the libraries here because
5125    # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
5126
5127    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
5128
5129
5130
5131
5132    { echo "$as_me:$LINENO: checking dirent.h" >&5
5133echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; }
5134if test "${tcl_cv_dirent_h+set}" = set; then
5135  echo $ECHO_N "(cached) $ECHO_C" >&6
5136else
5137
5138    cat >conftest.$ac_ext <<_ACEOF
5139/* confdefs.h.  */
5140_ACEOF
5141cat confdefs.h >>conftest.$ac_ext
5142cat >>conftest.$ac_ext <<_ACEOF
5143/* end confdefs.h.  */
5144#include <sys/types.h>
5145#include <dirent.h>
5146int
5147main ()
5148{
5149
5150#ifndef _POSIX_SOURCE
5151#   ifdef __Lynx__
5152	/*
5153	 * Generate compilation error to make the test fail:  Lynx headers
5154	 * are only valid if really in the POSIX environment.
5155	 */
5156
5157	missing_procedure();
5158#   endif
5159#endif
5160DIR *d;
5161struct dirent *entryPtr;
5162char *p;
5163d = opendir("foobar");
5164entryPtr = readdir(d);
5165p = entryPtr->d_name;
5166closedir(d);
5167
5168  ;
5169  return 0;
5170}
5171_ACEOF
5172rm -f conftest.$ac_objext conftest$ac_exeext
5173if { (ac_try="$ac_link"
5174case "(($ac_try" in
5175  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5176  *) ac_try_echo=$ac_try;;
5177esac
5178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5179  (eval "$ac_link") 2>conftest.er1
5180  ac_status=$?
5181  grep -v '^ *+' conftest.er1 >conftest.err
5182  rm -f conftest.er1
5183  cat conftest.err >&5
5184  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5185  (exit $ac_status); } && {
5186	 test -z "$ac_c_werror_flag" ||
5187	 test ! -s conftest.err
5188       } && test -s conftest$ac_exeext &&
5189       $as_test_x conftest$ac_exeext; then
5190  tcl_cv_dirent_h=yes
5191else
5192  echo "$as_me: failed program was:" >&5
5193sed 's/^/| /' conftest.$ac_ext >&5
5194
5195	tcl_cv_dirent_h=no
5196fi
5197
5198rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5199      conftest$ac_exeext conftest.$ac_ext
5200fi
5201{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
5202echo "${ECHO_T}$tcl_cv_dirent_h" >&6; }
5203
5204    if test $tcl_cv_dirent_h = no; then
5205
5206cat >>confdefs.h <<\_ACEOF
5207#define NO_DIRENT_H 1
5208_ACEOF
5209
5210    fi
5211
5212    # TEA specific:
5213    if test "${ac_cv_header_errno_h+set}" = set; then
5214  { echo "$as_me:$LINENO: checking for errno.h" >&5
5215echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5216if test "${ac_cv_header_errno_h+set}" = set; then
5217  echo $ECHO_N "(cached) $ECHO_C" >&6
5218fi
5219{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5220echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5221else
5222  # Is the header compilable?
5223{ echo "$as_me:$LINENO: checking errno.h usability" >&5
5224echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6; }
5225cat >conftest.$ac_ext <<_ACEOF
5226/* confdefs.h.  */
5227_ACEOF
5228cat confdefs.h >>conftest.$ac_ext
5229cat >>conftest.$ac_ext <<_ACEOF
5230/* end confdefs.h.  */
5231$ac_includes_default
5232#include <errno.h>
5233_ACEOF
5234rm -f conftest.$ac_objext
5235if { (ac_try="$ac_compile"
5236case "(($ac_try" in
5237  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5238  *) ac_try_echo=$ac_try;;
5239esac
5240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5241  (eval "$ac_compile") 2>conftest.er1
5242  ac_status=$?
5243  grep -v '^ *+' conftest.er1 >conftest.err
5244  rm -f conftest.er1
5245  cat conftest.err >&5
5246  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5247  (exit $ac_status); } && {
5248	 test -z "$ac_c_werror_flag" ||
5249	 test ! -s conftest.err
5250       } && test -s conftest.$ac_objext; then
5251  ac_header_compiler=yes
5252else
5253  echo "$as_me: failed program was:" >&5
5254sed 's/^/| /' conftest.$ac_ext >&5
5255
5256	ac_header_compiler=no
5257fi
5258
5259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5260{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5261echo "${ECHO_T}$ac_header_compiler" >&6; }
5262
5263# Is the header present?
5264{ echo "$as_me:$LINENO: checking errno.h presence" >&5
5265echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6; }
5266cat >conftest.$ac_ext <<_ACEOF
5267/* confdefs.h.  */
5268_ACEOF
5269cat confdefs.h >>conftest.$ac_ext
5270cat >>conftest.$ac_ext <<_ACEOF
5271/* end confdefs.h.  */
5272#include <errno.h>
5273_ACEOF
5274if { (ac_try="$ac_cpp conftest.$ac_ext"
5275case "(($ac_try" in
5276  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5277  *) ac_try_echo=$ac_try;;
5278esac
5279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5280  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5281  ac_status=$?
5282  grep -v '^ *+' conftest.er1 >conftest.err
5283  rm -f conftest.er1
5284  cat conftest.err >&5
5285  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5286  (exit $ac_status); } >/dev/null && {
5287	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5288	 test ! -s conftest.err
5289       }; then
5290  ac_header_preproc=yes
5291else
5292  echo "$as_me: failed program was:" >&5
5293sed 's/^/| /' conftest.$ac_ext >&5
5294
5295  ac_header_preproc=no
5296fi
5297
5298rm -f conftest.err conftest.$ac_ext
5299{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5300echo "${ECHO_T}$ac_header_preproc" >&6; }
5301
5302# So?  What about this header?
5303case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5304  yes:no: )
5305    { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5306echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5307    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
5308echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
5309    ac_header_preproc=yes
5310    ;;
5311  no:yes:* )
5312    { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
5313echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
5314    { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
5315echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
5316    { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
5317echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
5318    { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5319echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5320    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
5321echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
5322    { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
5323echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
5324
5325    ;;
5326esac
5327{ echo "$as_me:$LINENO: checking for errno.h" >&5
5328echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5329if test "${ac_cv_header_errno_h+set}" = set; then
5330  echo $ECHO_N "(cached) $ECHO_C" >&6
5331else
5332  ac_cv_header_errno_h=$ac_header_preproc
5333fi
5334{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5335echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5336
5337fi
5338if test $ac_cv_header_errno_h = yes; then
5339  :
5340else
5341
5342cat >>confdefs.h <<\_ACEOF
5343#define NO_ERRNO_H 1
5344_ACEOF
5345
5346fi
5347
5348
5349    if test "${ac_cv_header_float_h+set}" = set; then
5350  { echo "$as_me:$LINENO: checking for float.h" >&5
5351echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5352if test "${ac_cv_header_float_h+set}" = set; then
5353  echo $ECHO_N "(cached) $ECHO_C" >&6
5354fi
5355{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5356echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5357else
5358  # Is the header compilable?
5359{ echo "$as_me:$LINENO: checking float.h usability" >&5
5360echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; }
5361cat >conftest.$ac_ext <<_ACEOF
5362/* confdefs.h.  */
5363_ACEOF
5364cat confdefs.h >>conftest.$ac_ext
5365cat >>conftest.$ac_ext <<_ACEOF
5366/* end confdefs.h.  */
5367$ac_includes_default
5368#include <float.h>
5369_ACEOF
5370rm -f conftest.$ac_objext
5371if { (ac_try="$ac_compile"
5372case "(($ac_try" in
5373  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5374  *) ac_try_echo=$ac_try;;
5375esac
5376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5377  (eval "$ac_compile") 2>conftest.er1
5378  ac_status=$?
5379  grep -v '^ *+' conftest.er1 >conftest.err
5380  rm -f conftest.er1
5381  cat conftest.err >&5
5382  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5383  (exit $ac_status); } && {
5384	 test -z "$ac_c_werror_flag" ||
5385	 test ! -s conftest.err
5386       } && test -s conftest.$ac_objext; then
5387  ac_header_compiler=yes
5388else
5389  echo "$as_me: failed program was:" >&5
5390sed 's/^/| /' conftest.$ac_ext >&5
5391
5392	ac_header_compiler=no
5393fi
5394
5395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5396{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5397echo "${ECHO_T}$ac_header_compiler" >&6; }
5398
5399# Is the header present?
5400{ echo "$as_me:$LINENO: checking float.h presence" >&5
5401echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; }
5402cat >conftest.$ac_ext <<_ACEOF
5403/* confdefs.h.  */
5404_ACEOF
5405cat confdefs.h >>conftest.$ac_ext
5406cat >>conftest.$ac_ext <<_ACEOF
5407/* end confdefs.h.  */
5408#include <float.h>
5409_ACEOF
5410if { (ac_try="$ac_cpp conftest.$ac_ext"
5411case "(($ac_try" in
5412  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5413  *) ac_try_echo=$ac_try;;
5414esac
5415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5416  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5417  ac_status=$?
5418  grep -v '^ *+' conftest.er1 >conftest.err
5419  rm -f conftest.er1
5420  cat conftest.err >&5
5421  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5422  (exit $ac_status); } >/dev/null && {
5423	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5424	 test ! -s conftest.err
5425       }; then
5426  ac_header_preproc=yes
5427else
5428  echo "$as_me: failed program was:" >&5
5429sed 's/^/| /' conftest.$ac_ext >&5
5430
5431  ac_header_preproc=no
5432fi
5433
5434rm -f conftest.err conftest.$ac_ext
5435{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5436echo "${ECHO_T}$ac_header_preproc" >&6; }
5437
5438# So?  What about this header?
5439case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5440  yes:no: )
5441    { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
5442echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5443    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
5444echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
5445    ac_header_preproc=yes
5446    ;;
5447  no:yes:* )
5448    { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
5449echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
5450    { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
5451echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
5452    { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
5453echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
5454    { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
5455echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5456    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
5457echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
5458    { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
5459echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
5460
5461    ;;
5462esac
5463{ echo "$as_me:$LINENO: checking for float.h" >&5
5464echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5465if test "${ac_cv_header_float_h+set}" = set; then
5466  echo $ECHO_N "(cached) $ECHO_C" >&6
5467else
5468  ac_cv_header_float_h=$ac_header_preproc
5469fi
5470{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5471echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5472
5473fi
5474if test $ac_cv_header_float_h = yes; then
5475  :
5476else
5477
5478cat >>confdefs.h <<\_ACEOF
5479#define NO_FLOAT_H 1
5480_ACEOF
5481
5482fi
5483
5484
5485    if test "${ac_cv_header_values_h+set}" = set; then
5486  { echo "$as_me:$LINENO: checking for values.h" >&5
5487echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5488if test "${ac_cv_header_values_h+set}" = set; then
5489  echo $ECHO_N "(cached) $ECHO_C" >&6
5490fi
5491{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5492echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5493else
5494  # Is the header compilable?
5495{ echo "$as_me:$LINENO: checking values.h usability" >&5
5496echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; }
5497cat >conftest.$ac_ext <<_ACEOF
5498/* confdefs.h.  */
5499_ACEOF
5500cat confdefs.h >>conftest.$ac_ext
5501cat >>conftest.$ac_ext <<_ACEOF
5502/* end confdefs.h.  */
5503$ac_includes_default
5504#include <values.h>
5505_ACEOF
5506rm -f conftest.$ac_objext
5507if { (ac_try="$ac_compile"
5508case "(($ac_try" in
5509  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5510  *) ac_try_echo=$ac_try;;
5511esac
5512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5513  (eval "$ac_compile") 2>conftest.er1
5514  ac_status=$?
5515  grep -v '^ *+' conftest.er1 >conftest.err
5516  rm -f conftest.er1
5517  cat conftest.err >&5
5518  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5519  (exit $ac_status); } && {
5520	 test -z "$ac_c_werror_flag" ||
5521	 test ! -s conftest.err
5522       } && test -s conftest.$ac_objext; then
5523  ac_header_compiler=yes
5524else
5525  echo "$as_me: failed program was:" >&5
5526sed 's/^/| /' conftest.$ac_ext >&5
5527
5528	ac_header_compiler=no
5529fi
5530
5531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5532{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5533echo "${ECHO_T}$ac_header_compiler" >&6; }
5534
5535# Is the header present?
5536{ echo "$as_me:$LINENO: checking values.h presence" >&5
5537echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; }
5538cat >conftest.$ac_ext <<_ACEOF
5539/* confdefs.h.  */
5540_ACEOF
5541cat confdefs.h >>conftest.$ac_ext
5542cat >>conftest.$ac_ext <<_ACEOF
5543/* end confdefs.h.  */
5544#include <values.h>
5545_ACEOF
5546if { (ac_try="$ac_cpp conftest.$ac_ext"
5547case "(($ac_try" in
5548  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5549  *) ac_try_echo=$ac_try;;
5550esac
5551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5552  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5553  ac_status=$?
5554  grep -v '^ *+' conftest.er1 >conftest.err
5555  rm -f conftest.er1
5556  cat conftest.err >&5
5557  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5558  (exit $ac_status); } >/dev/null && {
5559	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5560	 test ! -s conftest.err
5561       }; then
5562  ac_header_preproc=yes
5563else
5564  echo "$as_me: failed program was:" >&5
5565sed 's/^/| /' conftest.$ac_ext >&5
5566
5567  ac_header_preproc=no
5568fi
5569
5570rm -f conftest.err conftest.$ac_ext
5571{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5572echo "${ECHO_T}$ac_header_preproc" >&6; }
5573
5574# So?  What about this header?
5575case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5576  yes:no: )
5577    { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
5578echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5579    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
5580echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
5581    ac_header_preproc=yes
5582    ;;
5583  no:yes:* )
5584    { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
5585echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
5586    { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
5587echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
5588    { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
5589echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
5590    { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
5591echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5592    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
5593echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
5594    { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
5595echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
5596
5597    ;;
5598esac
5599{ echo "$as_me:$LINENO: checking for values.h" >&5
5600echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5601if test "${ac_cv_header_values_h+set}" = set; then
5602  echo $ECHO_N "(cached) $ECHO_C" >&6
5603else
5604  ac_cv_header_values_h=$ac_header_preproc
5605fi
5606{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5607echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5608
5609fi
5610if test $ac_cv_header_values_h = yes; then
5611  :
5612else
5613
5614cat >>confdefs.h <<\_ACEOF
5615#define NO_VALUES_H 1
5616_ACEOF
5617
5618fi
5619
5620
5621    if test "${ac_cv_header_limits_h+set}" = set; then
5622  { echo "$as_me:$LINENO: checking for limits.h" >&5
5623echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5624if test "${ac_cv_header_limits_h+set}" = set; then
5625  echo $ECHO_N "(cached) $ECHO_C" >&6
5626fi
5627{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5628echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5629else
5630  # Is the header compilable?
5631{ echo "$as_me:$LINENO: checking limits.h usability" >&5
5632echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; }
5633cat >conftest.$ac_ext <<_ACEOF
5634/* confdefs.h.  */
5635_ACEOF
5636cat confdefs.h >>conftest.$ac_ext
5637cat >>conftest.$ac_ext <<_ACEOF
5638/* end confdefs.h.  */
5639$ac_includes_default
5640#include <limits.h>
5641_ACEOF
5642rm -f conftest.$ac_objext
5643if { (ac_try="$ac_compile"
5644case "(($ac_try" in
5645  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5646  *) ac_try_echo=$ac_try;;
5647esac
5648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5649  (eval "$ac_compile") 2>conftest.er1
5650  ac_status=$?
5651  grep -v '^ *+' conftest.er1 >conftest.err
5652  rm -f conftest.er1
5653  cat conftest.err >&5
5654  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5655  (exit $ac_status); } && {
5656	 test -z "$ac_c_werror_flag" ||
5657	 test ! -s conftest.err
5658       } && test -s conftest.$ac_objext; then
5659  ac_header_compiler=yes
5660else
5661  echo "$as_me: failed program was:" >&5
5662sed 's/^/| /' conftest.$ac_ext >&5
5663
5664	ac_header_compiler=no
5665fi
5666
5667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5668{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5669echo "${ECHO_T}$ac_header_compiler" >&6; }
5670
5671# Is the header present?
5672{ echo "$as_me:$LINENO: checking limits.h presence" >&5
5673echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; }
5674cat >conftest.$ac_ext <<_ACEOF
5675/* confdefs.h.  */
5676_ACEOF
5677cat confdefs.h >>conftest.$ac_ext
5678cat >>conftest.$ac_ext <<_ACEOF
5679/* end confdefs.h.  */
5680#include <limits.h>
5681_ACEOF
5682if { (ac_try="$ac_cpp conftest.$ac_ext"
5683case "(($ac_try" in
5684  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5685  *) ac_try_echo=$ac_try;;
5686esac
5687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5688  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5689  ac_status=$?
5690  grep -v '^ *+' conftest.er1 >conftest.err
5691  rm -f conftest.er1
5692  cat conftest.err >&5
5693  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5694  (exit $ac_status); } >/dev/null && {
5695	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5696	 test ! -s conftest.err
5697       }; then
5698  ac_header_preproc=yes
5699else
5700  echo "$as_me: failed program was:" >&5
5701sed 's/^/| /' conftest.$ac_ext >&5
5702
5703  ac_header_preproc=no
5704fi
5705
5706rm -f conftest.err conftest.$ac_ext
5707{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5708echo "${ECHO_T}$ac_header_preproc" >&6; }
5709
5710# So?  What about this header?
5711case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5712  yes:no: )
5713    { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
5714echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5715    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
5716echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
5717    ac_header_preproc=yes
5718    ;;
5719  no:yes:* )
5720    { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
5721echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
5722    { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
5723echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
5724    { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
5725echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
5726    { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
5727echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5728    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
5729echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
5730    { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
5731echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
5732
5733    ;;
5734esac
5735{ echo "$as_me:$LINENO: checking for limits.h" >&5
5736echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5737if test "${ac_cv_header_limits_h+set}" = set; then
5738  echo $ECHO_N "(cached) $ECHO_C" >&6
5739else
5740  ac_cv_header_limits_h=$ac_header_preproc
5741fi
5742{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5743echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5744
5745fi
5746if test $ac_cv_header_limits_h = yes; then
5747
5748cat >>confdefs.h <<\_ACEOF
5749#define HAVE_LIMITS_H 1
5750_ACEOF
5751
5752else
5753
5754cat >>confdefs.h <<\_ACEOF
5755#define NO_LIMITS_H 1
5756_ACEOF
5757
5758fi
5759
5760
5761    if test "${ac_cv_header_stdlib_h+set}" = set; then
5762  { echo "$as_me:$LINENO: checking for stdlib.h" >&5
5763echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
5764if test "${ac_cv_header_stdlib_h+set}" = set; then
5765  echo $ECHO_N "(cached) $ECHO_C" >&6
5766fi
5767{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
5768echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
5769else
5770  # Is the header compilable?
5771{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5
5772echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; }
5773cat >conftest.$ac_ext <<_ACEOF
5774/* confdefs.h.  */
5775_ACEOF
5776cat confdefs.h >>conftest.$ac_ext
5777cat >>conftest.$ac_ext <<_ACEOF
5778/* end confdefs.h.  */
5779$ac_includes_default
5780#include <stdlib.h>
5781_ACEOF
5782rm -f conftest.$ac_objext
5783if { (ac_try="$ac_compile"
5784case "(($ac_try" in
5785  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5786  *) ac_try_echo=$ac_try;;
5787esac
5788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5789  (eval "$ac_compile") 2>conftest.er1
5790  ac_status=$?
5791  grep -v '^ *+' conftest.er1 >conftest.err
5792  rm -f conftest.er1
5793  cat conftest.err >&5
5794  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5795  (exit $ac_status); } && {
5796	 test -z "$ac_c_werror_flag" ||
5797	 test ! -s conftest.err
5798       } && test -s conftest.$ac_objext; then
5799  ac_header_compiler=yes
5800else
5801  echo "$as_me: failed program was:" >&5
5802sed 's/^/| /' conftest.$ac_ext >&5
5803
5804	ac_header_compiler=no
5805fi
5806
5807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5808{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5809echo "${ECHO_T}$ac_header_compiler" >&6; }
5810
5811# Is the header present?
5812{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5
5813echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; }
5814cat >conftest.$ac_ext <<_ACEOF
5815/* confdefs.h.  */
5816_ACEOF
5817cat confdefs.h >>conftest.$ac_ext
5818cat >>conftest.$ac_ext <<_ACEOF
5819/* end confdefs.h.  */
5820#include <stdlib.h>
5821_ACEOF
5822if { (ac_try="$ac_cpp conftest.$ac_ext"
5823case "(($ac_try" in
5824  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5825  *) ac_try_echo=$ac_try;;
5826esac
5827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5828  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5829  ac_status=$?
5830  grep -v '^ *+' conftest.er1 >conftest.err
5831  rm -f conftest.er1
5832  cat conftest.err >&5
5833  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5834  (exit $ac_status); } >/dev/null && {
5835	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5836	 test ! -s conftest.err
5837       }; then
5838  ac_header_preproc=yes
5839else
5840  echo "$as_me: failed program was:" >&5
5841sed 's/^/| /' conftest.$ac_ext >&5
5842
5843  ac_header_preproc=no
5844fi
5845
5846rm -f conftest.err conftest.$ac_ext
5847{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5848echo "${ECHO_T}$ac_header_preproc" >&6; }
5849
5850# So?  What about this header?
5851case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5852  yes:no: )
5853    { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
5854echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5855    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
5856echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
5857    ac_header_preproc=yes
5858    ;;
5859  no:yes:* )
5860    { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
5861echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
5862    { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
5863echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
5864    { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
5865echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
5866    { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
5867echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5868    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
5869echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
5870    { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
5871echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
5872
5873    ;;
5874esac
5875{ echo "$as_me:$LINENO: checking for stdlib.h" >&5
5876echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
5877if test "${ac_cv_header_stdlib_h+set}" = set; then
5878  echo $ECHO_N "(cached) $ECHO_C" >&6
5879else
5880  ac_cv_header_stdlib_h=$ac_header_preproc
5881fi
5882{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
5883echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
5884
5885fi
5886if test $ac_cv_header_stdlib_h = yes; then
5887  tcl_ok=1
5888else
5889  tcl_ok=0
5890fi
5891
5892
5893    cat >conftest.$ac_ext <<_ACEOF
5894/* confdefs.h.  */
5895_ACEOF
5896cat confdefs.h >>conftest.$ac_ext
5897cat >>conftest.$ac_ext <<_ACEOF
5898/* end confdefs.h.  */
5899#include <stdlib.h>
5900
5901_ACEOF
5902if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5903  $EGREP "strtol" >/dev/null 2>&1; then
5904  :
5905else
5906  tcl_ok=0
5907fi
5908rm -f conftest*
5909
5910    cat >conftest.$ac_ext <<_ACEOF
5911/* confdefs.h.  */
5912_ACEOF
5913cat confdefs.h >>conftest.$ac_ext
5914cat >>conftest.$ac_ext <<_ACEOF
5915/* end confdefs.h.  */
5916#include <stdlib.h>
5917
5918_ACEOF
5919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5920  $EGREP "strtoul" >/dev/null 2>&1; then
5921  :
5922else
5923  tcl_ok=0
5924fi
5925rm -f conftest*
5926
5927    cat >conftest.$ac_ext <<_ACEOF
5928/* confdefs.h.  */
5929_ACEOF
5930cat confdefs.h >>conftest.$ac_ext
5931cat >>conftest.$ac_ext <<_ACEOF
5932/* end confdefs.h.  */
5933#include <stdlib.h>
5934
5935_ACEOF
5936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5937  $EGREP "strtod" >/dev/null 2>&1; then
5938  :
5939else
5940  tcl_ok=0
5941fi
5942rm -f conftest*
5943
5944    if test $tcl_ok = 0; then
5945
5946cat >>confdefs.h <<\_ACEOF
5947#define NO_STDLIB_H 1
5948_ACEOF
5949
5950    fi
5951    if test "${ac_cv_header_string_h+set}" = set; then
5952  { echo "$as_me:$LINENO: checking for string.h" >&5
5953echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
5954if test "${ac_cv_header_string_h+set}" = set; then
5955  echo $ECHO_N "(cached) $ECHO_C" >&6
5956fi
5957{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
5958echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
5959else
5960  # Is the header compilable?
5961{ echo "$as_me:$LINENO: checking string.h usability" >&5
5962echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; }
5963cat >conftest.$ac_ext <<_ACEOF
5964/* confdefs.h.  */
5965_ACEOF
5966cat confdefs.h >>conftest.$ac_ext
5967cat >>conftest.$ac_ext <<_ACEOF
5968/* end confdefs.h.  */
5969$ac_includes_default
5970#include <string.h>
5971_ACEOF
5972rm -f conftest.$ac_objext
5973if { (ac_try="$ac_compile"
5974case "(($ac_try" in
5975  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5976  *) ac_try_echo=$ac_try;;
5977esac
5978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5979  (eval "$ac_compile") 2>conftest.er1
5980  ac_status=$?
5981  grep -v '^ *+' conftest.er1 >conftest.err
5982  rm -f conftest.er1
5983  cat conftest.err >&5
5984  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5985  (exit $ac_status); } && {
5986	 test -z "$ac_c_werror_flag" ||
5987	 test ! -s conftest.err
5988       } && test -s conftest.$ac_objext; then
5989  ac_header_compiler=yes
5990else
5991  echo "$as_me: failed program was:" >&5
5992sed 's/^/| /' conftest.$ac_ext >&5
5993
5994	ac_header_compiler=no
5995fi
5996
5997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5998{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5999echo "${ECHO_T}$ac_header_compiler" >&6; }
6000
6001# Is the header present?
6002{ echo "$as_me:$LINENO: checking string.h presence" >&5
6003echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; }
6004cat >conftest.$ac_ext <<_ACEOF
6005/* confdefs.h.  */
6006_ACEOF
6007cat confdefs.h >>conftest.$ac_ext
6008cat >>conftest.$ac_ext <<_ACEOF
6009/* end confdefs.h.  */
6010#include <string.h>
6011_ACEOF
6012if { (ac_try="$ac_cpp conftest.$ac_ext"
6013case "(($ac_try" in
6014  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6015  *) ac_try_echo=$ac_try;;
6016esac
6017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6018  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6019  ac_status=$?
6020  grep -v '^ *+' conftest.er1 >conftest.err
6021  rm -f conftest.er1
6022  cat conftest.err >&5
6023  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6024  (exit $ac_status); } >/dev/null && {
6025	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6026	 test ! -s conftest.err
6027       }; then
6028  ac_header_preproc=yes
6029else
6030  echo "$as_me: failed program was:" >&5
6031sed 's/^/| /' conftest.$ac_ext >&5
6032
6033  ac_header_preproc=no
6034fi
6035
6036rm -f conftest.err conftest.$ac_ext
6037{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6038echo "${ECHO_T}$ac_header_preproc" >&6; }
6039
6040# So?  What about this header?
6041case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6042  yes:no: )
6043    { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
6044echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6045    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
6046echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
6047    ac_header_preproc=yes
6048    ;;
6049  no:yes:* )
6050    { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
6051echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
6052    { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
6053echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
6054    { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
6055echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
6056    { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
6057echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6058    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
6059echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
6060    { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
6061echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
6062
6063    ;;
6064esac
6065{ echo "$as_me:$LINENO: checking for string.h" >&5
6066echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6067if test "${ac_cv_header_string_h+set}" = set; then
6068  echo $ECHO_N "(cached) $ECHO_C" >&6
6069else
6070  ac_cv_header_string_h=$ac_header_preproc
6071fi
6072{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6073echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6074
6075fi
6076if test $ac_cv_header_string_h = yes; then
6077  tcl_ok=1
6078else
6079  tcl_ok=0
6080fi
6081
6082
6083    cat >conftest.$ac_ext <<_ACEOF
6084/* confdefs.h.  */
6085_ACEOF
6086cat confdefs.h >>conftest.$ac_ext
6087cat >>conftest.$ac_ext <<_ACEOF
6088/* end confdefs.h.  */
6089#include <string.h>
6090
6091_ACEOF
6092if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6093  $EGREP "strstr" >/dev/null 2>&1; then
6094  :
6095else
6096  tcl_ok=0
6097fi
6098rm -f conftest*
6099
6100    cat >conftest.$ac_ext <<_ACEOF
6101/* confdefs.h.  */
6102_ACEOF
6103cat confdefs.h >>conftest.$ac_ext
6104cat >>conftest.$ac_ext <<_ACEOF
6105/* end confdefs.h.  */
6106#include <string.h>
6107
6108_ACEOF
6109if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6110  $EGREP "strerror" >/dev/null 2>&1; then
6111  :
6112else
6113  tcl_ok=0
6114fi
6115rm -f conftest*
6116
6117
6118    # See also memmove check below for a place where NO_STRING_H can be
6119    # set and why.
6120
6121    if test $tcl_ok = 0; then
6122
6123cat >>confdefs.h <<\_ACEOF
6124#define NO_STRING_H 1
6125_ACEOF
6126
6127    fi
6128
6129    if test "${ac_cv_header_sys_wait_h+set}" = set; then
6130  { echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6131echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6132if test "${ac_cv_header_sys_wait_h+set}" = set; then
6133  echo $ECHO_N "(cached) $ECHO_C" >&6
6134fi
6135{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6136echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6137else
6138  # Is the header compilable?
6139{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
6140echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; }
6141cat >conftest.$ac_ext <<_ACEOF
6142/* confdefs.h.  */
6143_ACEOF
6144cat confdefs.h >>conftest.$ac_ext
6145cat >>conftest.$ac_ext <<_ACEOF
6146/* end confdefs.h.  */
6147$ac_includes_default
6148#include <sys/wait.h>
6149_ACEOF
6150rm -f conftest.$ac_objext
6151if { (ac_try="$ac_compile"
6152case "(($ac_try" in
6153  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6154  *) ac_try_echo=$ac_try;;
6155esac
6156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6157  (eval "$ac_compile") 2>conftest.er1
6158  ac_status=$?
6159  grep -v '^ *+' conftest.er1 >conftest.err
6160  rm -f conftest.er1
6161  cat conftest.err >&5
6162  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6163  (exit $ac_status); } && {
6164	 test -z "$ac_c_werror_flag" ||
6165	 test ! -s conftest.err
6166       } && test -s conftest.$ac_objext; then
6167  ac_header_compiler=yes
6168else
6169  echo "$as_me: failed program was:" >&5
6170sed 's/^/| /' conftest.$ac_ext >&5
6171
6172	ac_header_compiler=no
6173fi
6174
6175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6176{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6177echo "${ECHO_T}$ac_header_compiler" >&6; }
6178
6179# Is the header present?
6180{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
6181echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; }
6182cat >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 <sys/wait.h>
6189_ACEOF
6190if { (ac_try="$ac_cpp conftest.$ac_ext"
6191case "(($ac_try" in
6192  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6193  *) ac_try_echo=$ac_try;;
6194esac
6195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6196  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6197  ac_status=$?
6198  grep -v '^ *+' conftest.er1 >conftest.err
6199  rm -f conftest.er1
6200  cat conftest.err >&5
6201  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6202  (exit $ac_status); } >/dev/null && {
6203	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6204	 test ! -s conftest.err
6205       }; then
6206  ac_header_preproc=yes
6207else
6208  echo "$as_me: failed program was:" >&5
6209sed 's/^/| /' conftest.$ac_ext >&5
6210
6211  ac_header_preproc=no
6212fi
6213
6214rm -f conftest.err conftest.$ac_ext
6215{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6216echo "${ECHO_T}$ac_header_preproc" >&6; }
6217
6218# So?  What about this header?
6219case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6220  yes:no: )
6221    { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
6222echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6223    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
6224echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
6225    ac_header_preproc=yes
6226    ;;
6227  no:yes:* )
6228    { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
6229echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
6230    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
6231echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
6232    { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
6233echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
6234    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
6235echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6236    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
6237echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
6238    { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
6239echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
6240
6241    ;;
6242esac
6243{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6244echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6245if test "${ac_cv_header_sys_wait_h+set}" = set; then
6246  echo $ECHO_N "(cached) $ECHO_C" >&6
6247else
6248  ac_cv_header_sys_wait_h=$ac_header_preproc
6249fi
6250{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6251echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6252
6253fi
6254if test $ac_cv_header_sys_wait_h = yes; then
6255  :
6256else
6257
6258cat >>confdefs.h <<\_ACEOF
6259#define NO_SYS_WAIT_H 1
6260_ACEOF
6261
6262fi
6263
6264
6265    if test "${ac_cv_header_dlfcn_h+set}" = set; then
6266  { echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6267echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6268if test "${ac_cv_header_dlfcn_h+set}" = set; then
6269  echo $ECHO_N "(cached) $ECHO_C" >&6
6270fi
6271{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6272echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6273else
6274  # Is the header compilable?
6275{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
6276echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; }
6277cat >conftest.$ac_ext <<_ACEOF
6278/* confdefs.h.  */
6279_ACEOF
6280cat confdefs.h >>conftest.$ac_ext
6281cat >>conftest.$ac_ext <<_ACEOF
6282/* end confdefs.h.  */
6283$ac_includes_default
6284#include <dlfcn.h>
6285_ACEOF
6286rm -f conftest.$ac_objext
6287if { (ac_try="$ac_compile"
6288case "(($ac_try" in
6289  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6290  *) ac_try_echo=$ac_try;;
6291esac
6292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6293  (eval "$ac_compile") 2>conftest.er1
6294  ac_status=$?
6295  grep -v '^ *+' conftest.er1 >conftest.err
6296  rm -f conftest.er1
6297  cat conftest.err >&5
6298  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6299  (exit $ac_status); } && {
6300	 test -z "$ac_c_werror_flag" ||
6301	 test ! -s conftest.err
6302       } && test -s conftest.$ac_objext; then
6303  ac_header_compiler=yes
6304else
6305  echo "$as_me: failed program was:" >&5
6306sed 's/^/| /' conftest.$ac_ext >&5
6307
6308	ac_header_compiler=no
6309fi
6310
6311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6312{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6313echo "${ECHO_T}$ac_header_compiler" >&6; }
6314
6315# Is the header present?
6316{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
6317echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; }
6318cat >conftest.$ac_ext <<_ACEOF
6319/* confdefs.h.  */
6320_ACEOF
6321cat confdefs.h >>conftest.$ac_ext
6322cat >>conftest.$ac_ext <<_ACEOF
6323/* end confdefs.h.  */
6324#include <dlfcn.h>
6325_ACEOF
6326if { (ac_try="$ac_cpp conftest.$ac_ext"
6327case "(($ac_try" in
6328  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6329  *) ac_try_echo=$ac_try;;
6330esac
6331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6332  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6333  ac_status=$?
6334  grep -v '^ *+' conftest.er1 >conftest.err
6335  rm -f conftest.er1
6336  cat conftest.err >&5
6337  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6338  (exit $ac_status); } >/dev/null && {
6339	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6340	 test ! -s conftest.err
6341       }; then
6342  ac_header_preproc=yes
6343else
6344  echo "$as_me: failed program was:" >&5
6345sed 's/^/| /' conftest.$ac_ext >&5
6346
6347  ac_header_preproc=no
6348fi
6349
6350rm -f conftest.err conftest.$ac_ext
6351{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6352echo "${ECHO_T}$ac_header_preproc" >&6; }
6353
6354# So?  What about this header?
6355case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6356  yes:no: )
6357    { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
6358echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6359    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
6360echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
6361    ac_header_preproc=yes
6362    ;;
6363  no:yes:* )
6364    { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
6365echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
6366    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
6367echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
6368    { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
6369echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
6370    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
6371echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6372    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
6373echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
6374    { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
6375echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
6376
6377    ;;
6378esac
6379{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6380echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6381if test "${ac_cv_header_dlfcn_h+set}" = set; then
6382  echo $ECHO_N "(cached) $ECHO_C" >&6
6383else
6384  ac_cv_header_dlfcn_h=$ac_header_preproc
6385fi
6386{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6387echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6388
6389fi
6390if test $ac_cv_header_dlfcn_h = yes; then
6391  :
6392else
6393
6394cat >>confdefs.h <<\_ACEOF
6395#define NO_DLFCN_H 1
6396_ACEOF
6397
6398fi
6399
6400
6401
6402    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
6403
6404for ac_header in sys/param.h
6405do
6406as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6407if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6408  { echo "$as_me:$LINENO: checking for $ac_header" >&5
6409echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6410if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6411  echo $ECHO_N "(cached) $ECHO_C" >&6
6412fi
6413ac_res=`eval echo '${'$as_ac_Header'}'`
6414	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6415echo "${ECHO_T}$ac_res" >&6; }
6416else
6417  # Is the header compilable?
6418{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6419echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6420cat >conftest.$ac_ext <<_ACEOF
6421/* confdefs.h.  */
6422_ACEOF
6423cat confdefs.h >>conftest.$ac_ext
6424cat >>conftest.$ac_ext <<_ACEOF
6425/* end confdefs.h.  */
6426$ac_includes_default
6427#include <$ac_header>
6428_ACEOF
6429rm -f conftest.$ac_objext
6430if { (ac_try="$ac_compile"
6431case "(($ac_try" in
6432  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6433  *) ac_try_echo=$ac_try;;
6434esac
6435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6436  (eval "$ac_compile") 2>conftest.er1
6437  ac_status=$?
6438  grep -v '^ *+' conftest.er1 >conftest.err
6439  rm -f conftest.er1
6440  cat conftest.err >&5
6441  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6442  (exit $ac_status); } && {
6443	 test -z "$ac_c_werror_flag" ||
6444	 test ! -s conftest.err
6445       } && test -s conftest.$ac_objext; then
6446  ac_header_compiler=yes
6447else
6448  echo "$as_me: failed program was:" >&5
6449sed 's/^/| /' conftest.$ac_ext >&5
6450
6451	ac_header_compiler=no
6452fi
6453
6454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6455{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6456echo "${ECHO_T}$ac_header_compiler" >&6; }
6457
6458# Is the header present?
6459{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6460echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6461cat >conftest.$ac_ext <<_ACEOF
6462/* confdefs.h.  */
6463_ACEOF
6464cat confdefs.h >>conftest.$ac_ext
6465cat >>conftest.$ac_ext <<_ACEOF
6466/* end confdefs.h.  */
6467#include <$ac_header>
6468_ACEOF
6469if { (ac_try="$ac_cpp conftest.$ac_ext"
6470case "(($ac_try" in
6471  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6472  *) ac_try_echo=$ac_try;;
6473esac
6474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6475  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6476  ac_status=$?
6477  grep -v '^ *+' conftest.er1 >conftest.err
6478  rm -f conftest.er1
6479  cat conftest.err >&5
6480  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6481  (exit $ac_status); } >/dev/null && {
6482	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6483	 test ! -s conftest.err
6484       }; then
6485  ac_header_preproc=yes
6486else
6487  echo "$as_me: failed program was:" >&5
6488sed 's/^/| /' conftest.$ac_ext >&5
6489
6490  ac_header_preproc=no
6491fi
6492
6493rm -f conftest.err conftest.$ac_ext
6494{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6495echo "${ECHO_T}$ac_header_preproc" >&6; }
6496
6497# So?  What about this header?
6498case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6499  yes:no: )
6500    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6501echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6502    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6503echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6504    ac_header_preproc=yes
6505    ;;
6506  no:yes:* )
6507    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6508echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6509    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6510echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6511    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6512echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6513    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6514echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6515    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6516echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6517    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6518echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6519
6520    ;;
6521esac
6522{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6523echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6524if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6525  echo $ECHO_N "(cached) $ECHO_C" >&6
6526else
6527  eval "$as_ac_Header=\$ac_header_preproc"
6528fi
6529ac_res=`eval echo '${'$as_ac_Header'}'`
6530	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6531echo "${ECHO_T}$ac_res" >&6; }
6532
6533fi
6534if test `eval echo '${'$as_ac_Header'}'` = yes; then
6535  cat >>confdefs.h <<_ACEOF
6536#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6537_ACEOF
6538
6539fi
6540
6541done
6542
6543
6544	# Let the user call this, because if it triggers, they will
6545	# need a compat/strtod.c that is correct.  Users can also
6546	# use Tcl_GetDouble(FromObj) instead.
6547	#TEA_BUGGY_STRTOD
6548    fi
6549
6550
6551#-----------------------------------------------------------------------
6552# __CHANGE__
6553# Specify the C source files to compile in TEA_ADD_SOURCES,
6554# public headers that need to be installed in TEA_ADD_HEADERS,
6555# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
6556# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
6557# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
6558# and PKG_TCL_SOURCES.
6559#-----------------------------------------------------------------------
6560
6561
6562    vars="mmap.c"
6563    for i in $vars; do
6564	case $i in
6565	    \$*)
6566		# allow $-var names
6567		PKG_SOURCES="$PKG_SOURCES $i"
6568		PKG_OBJECTS="$PKG_OBJECTS $i"
6569		;;
6570	    *)
6571		# check for existence - allows for generic/win/unix VPATH
6572		# To add more dirs here (like 'src'), you have to update VPATH
6573		# in Makefile.in as well
6574		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6575		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6576		    ; then
6577		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
6578echo "$as_me: error: could not find source file '$i'" >&2;}
6579   { (exit 1); exit 1; }; }
6580		fi
6581		PKG_SOURCES="$PKG_SOURCES $i"
6582		# this assumes it is in a VPATH dir
6583		i=`basename $i`
6584		# handle user calling this before or after TEA_SETUP_COMPILER
6585		if test x"${OBJEXT}" != x ; then
6586		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6587		else
6588		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6589		fi
6590		PKG_OBJECTS="$PKG_OBJECTS $j"
6591		;;
6592	esac
6593    done
6594
6595
6596
6597
6598    vars=""
6599    for i in $vars; do
6600	# check for existence, be strict because it is installed
6601	if test ! -f "${srcdir}/$i" ; then
6602	    { { echo "$as_me:$LINENO: error: could not find header file '${srcdir}/$i'" >&5
6603echo "$as_me: error: could not find header file '${srcdir}/$i'" >&2;}
6604   { (exit 1); exit 1; }; }
6605	fi
6606	PKG_HEADERS="$PKG_HEADERS $i"
6607    done
6608
6609
6610
6611    vars=""
6612    for i in $vars; do
6613	PKG_INCLUDES="$PKG_INCLUDES $i"
6614    done
6615
6616
6617
6618    vars=""
6619    for i in $vars; do
6620	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6621	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6622	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
6623	fi
6624	PKG_LIBS="$PKG_LIBS $i"
6625    done
6626
6627
6628
6629    PKG_CFLAGS="$PKG_CFLAGS "
6630
6631
6632
6633    vars=""
6634    for i in $vars; do
6635	# check for existence - allows for generic/win/unix VPATH
6636	if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6637	    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6638	    ; then
6639	    { { echo "$as_me:$LINENO: error: could not find stub source file '$i'" >&5
6640echo "$as_me: error: could not find stub source file '$i'" >&2;}
6641   { (exit 1); exit 1; }; }
6642	fi
6643	PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
6644	# this assumes it is in a VPATH dir
6645	i=`basename $i`
6646	# handle user calling this before or after TEA_SETUP_COMPILER
6647	if test x"${OBJEXT}" != x ; then
6648	    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6649	else
6650	    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6651	fi
6652	PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
6653    done
6654
6655
6656
6657
6658    vars=""
6659    for i in $vars; do
6660	# check for existence, be strict because it is installed
6661	if test ! -f "${srcdir}/$i" ; then
6662	    { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
6663echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
6664   { (exit 1); exit 1; }; }
6665	fi
6666	PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
6667    done
6668
6669
6670
6671#--------------------------------------------------------------------
6672# __CHANGE__
6673# A few miscellaneous platform-specific items:
6674#
6675# Define a special symbol for Windows (BUILD_mmap in this case) so
6676# that we create the export library with the dll.
6677#
6678# Windows creates a few extra files that need to be cleaned up.
6679# You can add more files to clean if your extension creates any extra
6680# files.
6681#
6682# TEA_ADD_* any platform specific compiler/build info here.
6683#--------------------------------------------------------------------
6684
6685# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
6686# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
6687#CLEANFILES="pkgIndex.tcl"
6688if test "${TEA_PLATFORM}" = "windows" ; then
6689
6690cat >>confdefs.h <<\_ACEOF
6691#define BUILD_mmap 1
6692_ACEOF
6693
6694    CLEANFILES="$CLEANFILES *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
6695    #TEA_ADD_SOURCES([win/winFile.c])
6696    #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
6697else
6698    # Ensure no empty else clauses
6699    :
6700    #TEA_ADD_SOURCES([unix/unixFile.c])
6701    #TEA_ADD_LIBS([-lsuperfly])
6702fi
6703
6704
6705#--------------------------------------------------------------------
6706# __CHANGE__
6707# Choose which headers you need.  Extension authors should try very
6708# hard to only rely on the Tcl public header files.  Internal headers
6709# contain private data structures and are subject to change without
6710# notice.
6711# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
6712#--------------------------------------------------------------------
6713
6714
6715    { echo "$as_me:$LINENO: checking for Tcl public headers" >&5
6716echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6; }
6717
6718
6719# Check whether --with-tclinclude was given.
6720if test "${with_tclinclude+set}" = set; then
6721  withval=$with_tclinclude; with_tclinclude=${withval}
6722fi
6723
6724
6725    if test "${ac_cv_c_tclh+set}" = set; then
6726  echo $ECHO_N "(cached) $ECHO_C" >&6
6727else
6728
6729	# Use the value from --with-tclinclude, if it was given
6730
6731	if test x"${with_tclinclude}" != x ; then
6732	    if test -f "${with_tclinclude}/tcl.h" ; then
6733		ac_cv_c_tclh=${with_tclinclude}
6734	    else
6735		{ { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
6736echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
6737   { (exit 1); exit 1; }; }
6738	    fi
6739	else
6740	    if test "`uname -s`" = "Darwin"; then
6741		# If Tcl was built as a framework, attempt to use
6742		# the framework's Headers directory
6743		case ${TCL_DEFS} in
6744		    *TCL_FRAMEWORK*)
6745			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
6746			;;
6747		esac
6748	    fi
6749
6750	    # Look in the source dir only if Tcl is not installed,
6751	    # and in that situation, look there before installed locations.
6752	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
6753		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
6754	    fi
6755
6756	    # Check order: pkg --prefix location, Tcl's --prefix location,
6757	    # relative to directory of tclConfig.sh.
6758
6759	    eval "temp_includedir=${includedir}"
6760	    list="$list \
6761		`ls -d ${temp_includedir}        2>/dev/null` \
6762		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
6763		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
6764	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
6765		list="$list /usr/local/include /usr/include"
6766		if test x"${TCL_INCLUDE_SPEC}" != x ; then
6767		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
6768		    list="$list `ls -d ${d} 2>/dev/null`"
6769		fi
6770	    fi
6771	    for i in $list ; do
6772		if test -f "$i/tcl.h" ; then
6773		    ac_cv_c_tclh=$i
6774		    break
6775		fi
6776	    done
6777	fi
6778
6779fi
6780
6781
6782    # Print a message based on how we determined the include path
6783
6784    if test x"${ac_cv_c_tclh}" = x ; then
6785	{ { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
6786echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
6787   { (exit 1); exit 1; }; }
6788    else
6789	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
6790echo "${ECHO_T}${ac_cv_c_tclh}" >&6; }
6791    fi
6792
6793    # Convert to a native path and substitute into the output files.
6794
6795    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
6796
6797    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
6798
6799
6800
6801#TEA_PRIVATE_TCL_HEADERS
6802
6803#TEA_PUBLIC_TK_HEADERS
6804#TEA_PRIVATE_TK_HEADERS
6805#TEA_PATH_X
6806
6807#--------------------------------------------------------------------
6808# Check whether --enable-threads or --disable-threads was given.
6809# This auto-enables if Tcl was compiled threaded.
6810#--------------------------------------------------------------------
6811
6812
6813    # Check whether --enable-threads was given.
6814if test "${enable_threads+set}" = set; then
6815  enableval=$enable_threads; tcl_ok=$enableval
6816else
6817  tcl_ok=yes
6818fi
6819
6820
6821    if test "${enable_threads+set}" = set; then
6822	enableval="$enable_threads"
6823	tcl_ok=$enableval
6824    else
6825	tcl_ok=yes
6826    fi
6827
6828    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
6829	TCL_THREADS=1
6830
6831	if test "${TEA_PLATFORM}" != "windows" ; then
6832	    # We are always OK on Windows, so check what this platform wants:
6833
6834	    # USE_THREAD_ALLOC tells us to try the special thread-based
6835	    # allocator that significantly reduces lock contention
6836
6837cat >>confdefs.h <<\_ACEOF
6838#define USE_THREAD_ALLOC 1
6839_ACEOF
6840
6841
6842cat >>confdefs.h <<\_ACEOF
6843#define _REENTRANT 1
6844_ACEOF
6845
6846	    if test "`uname -s`" = "SunOS" ; then
6847
6848cat >>confdefs.h <<\_ACEOF
6849#define _POSIX_PTHREAD_SEMANTICS 1
6850_ACEOF
6851
6852	    fi
6853
6854cat >>confdefs.h <<\_ACEOF
6855#define _THREAD_SAFE 1
6856_ACEOF
6857
6858	    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
6859echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
6860if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
6861  echo $ECHO_N "(cached) $ECHO_C" >&6
6862else
6863  ac_check_lib_save_LIBS=$LIBS
6864LIBS="-lpthread  $LIBS"
6865cat >conftest.$ac_ext <<_ACEOF
6866/* confdefs.h.  */
6867_ACEOF
6868cat confdefs.h >>conftest.$ac_ext
6869cat >>conftest.$ac_ext <<_ACEOF
6870/* end confdefs.h.  */
6871
6872/* Override any GCC internal prototype to avoid an error.
6873   Use char because int might match the return type of a GCC
6874   builtin and then its argument prototype would still apply.  */
6875#ifdef __cplusplus
6876extern "C"
6877#endif
6878char pthread_mutex_init ();
6879int
6880main ()
6881{
6882return pthread_mutex_init ();
6883  ;
6884  return 0;
6885}
6886_ACEOF
6887rm -f conftest.$ac_objext conftest$ac_exeext
6888if { (ac_try="$ac_link"
6889case "(($ac_try" in
6890  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6891  *) ac_try_echo=$ac_try;;
6892esac
6893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6894  (eval "$ac_link") 2>conftest.er1
6895  ac_status=$?
6896  grep -v '^ *+' conftest.er1 >conftest.err
6897  rm -f conftest.er1
6898  cat conftest.err >&5
6899  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6900  (exit $ac_status); } && {
6901	 test -z "$ac_c_werror_flag" ||
6902	 test ! -s conftest.err
6903       } && test -s conftest$ac_exeext &&
6904       $as_test_x conftest$ac_exeext; then
6905  ac_cv_lib_pthread_pthread_mutex_init=yes
6906else
6907  echo "$as_me: failed program was:" >&5
6908sed 's/^/| /' conftest.$ac_ext >&5
6909
6910	ac_cv_lib_pthread_pthread_mutex_init=no
6911fi
6912
6913rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6914      conftest$ac_exeext conftest.$ac_ext
6915LIBS=$ac_check_lib_save_LIBS
6916fi
6917{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
6918echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
6919if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
6920  tcl_ok=yes
6921else
6922  tcl_ok=no
6923fi
6924
6925	    if test "$tcl_ok" = "no"; then
6926		# Check a little harder for __pthread_mutex_init in the same
6927		# library, as some systems hide it there until pthread.h is
6928		# defined.  We could alternatively do an AC_TRY_COMPILE with
6929		# pthread.h, but that will work with libpthread really doesn't
6930		# exist, like AIX 4.2.  [Bug: 4359]
6931		{ echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
6932echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
6933if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
6934  echo $ECHO_N "(cached) $ECHO_C" >&6
6935else
6936  ac_check_lib_save_LIBS=$LIBS
6937LIBS="-lpthread  $LIBS"
6938cat >conftest.$ac_ext <<_ACEOF
6939/* confdefs.h.  */
6940_ACEOF
6941cat confdefs.h >>conftest.$ac_ext
6942cat >>conftest.$ac_ext <<_ACEOF
6943/* end confdefs.h.  */
6944
6945/* Override any GCC internal prototype to avoid an error.
6946   Use char because int might match the return type of a GCC
6947   builtin and then its argument prototype would still apply.  */
6948#ifdef __cplusplus
6949extern "C"
6950#endif
6951char __pthread_mutex_init ();
6952int
6953main ()
6954{
6955return __pthread_mutex_init ();
6956  ;
6957  return 0;
6958}
6959_ACEOF
6960rm -f conftest.$ac_objext conftest$ac_exeext
6961if { (ac_try="$ac_link"
6962case "(($ac_try" in
6963  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6964  *) ac_try_echo=$ac_try;;
6965esac
6966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6967  (eval "$ac_link") 2>conftest.er1
6968  ac_status=$?
6969  grep -v '^ *+' conftest.er1 >conftest.err
6970  rm -f conftest.er1
6971  cat conftest.err >&5
6972  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6973  (exit $ac_status); } && {
6974	 test -z "$ac_c_werror_flag" ||
6975	 test ! -s conftest.err
6976       } && test -s conftest$ac_exeext &&
6977       $as_test_x conftest$ac_exeext; then
6978  ac_cv_lib_pthread___pthread_mutex_init=yes
6979else
6980  echo "$as_me: failed program was:" >&5
6981sed 's/^/| /' conftest.$ac_ext >&5
6982
6983	ac_cv_lib_pthread___pthread_mutex_init=no
6984fi
6985
6986rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6987      conftest$ac_exeext conftest.$ac_ext
6988LIBS=$ac_check_lib_save_LIBS
6989fi
6990{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
6991echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
6992if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
6993  tcl_ok=yes
6994else
6995  tcl_ok=no
6996fi
6997
6998	    fi
6999
7000	    if test "$tcl_ok" = "yes"; then
7001		# The space is needed
7002		THREADS_LIBS=" -lpthread"
7003	    else
7004		{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
7005echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; }
7006if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
7007  echo $ECHO_N "(cached) $ECHO_C" >&6
7008else
7009  ac_check_lib_save_LIBS=$LIBS
7010LIBS="-lpthreads  $LIBS"
7011cat >conftest.$ac_ext <<_ACEOF
7012/* confdefs.h.  */
7013_ACEOF
7014cat confdefs.h >>conftest.$ac_ext
7015cat >>conftest.$ac_ext <<_ACEOF
7016/* end confdefs.h.  */
7017
7018/* Override any GCC internal prototype to avoid an error.
7019   Use char because int might match the return type of a GCC
7020   builtin and then its argument prototype would still apply.  */
7021#ifdef __cplusplus
7022extern "C"
7023#endif
7024char pthread_mutex_init ();
7025int
7026main ()
7027{
7028return pthread_mutex_init ();
7029  ;
7030  return 0;
7031}
7032_ACEOF
7033rm -f conftest.$ac_objext conftest$ac_exeext
7034if { (ac_try="$ac_link"
7035case "(($ac_try" in
7036  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7037  *) ac_try_echo=$ac_try;;
7038esac
7039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7040  (eval "$ac_link") 2>conftest.er1
7041  ac_status=$?
7042  grep -v '^ *+' conftest.er1 >conftest.err
7043  rm -f conftest.er1
7044  cat conftest.err >&5
7045  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7046  (exit $ac_status); } && {
7047	 test -z "$ac_c_werror_flag" ||
7048	 test ! -s conftest.err
7049       } && test -s conftest$ac_exeext &&
7050       $as_test_x conftest$ac_exeext; then
7051  ac_cv_lib_pthreads_pthread_mutex_init=yes
7052else
7053  echo "$as_me: failed program was:" >&5
7054sed 's/^/| /' conftest.$ac_ext >&5
7055
7056	ac_cv_lib_pthreads_pthread_mutex_init=no
7057fi
7058
7059rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7060      conftest$ac_exeext conftest.$ac_ext
7061LIBS=$ac_check_lib_save_LIBS
7062fi
7063{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
7064echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
7065if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
7066  tcl_ok=yes
7067else
7068  tcl_ok=no
7069fi
7070
7071		if test "$tcl_ok" = "yes"; then
7072		    # The space is needed
7073		    THREADS_LIBS=" -lpthreads"
7074		else
7075		    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
7076echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; }
7077if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
7078  echo $ECHO_N "(cached) $ECHO_C" >&6
7079else
7080  ac_check_lib_save_LIBS=$LIBS
7081LIBS="-lc  $LIBS"
7082cat >conftest.$ac_ext <<_ACEOF
7083/* confdefs.h.  */
7084_ACEOF
7085cat confdefs.h >>conftest.$ac_ext
7086cat >>conftest.$ac_ext <<_ACEOF
7087/* end confdefs.h.  */
7088
7089/* Override any GCC internal prototype to avoid an error.
7090   Use char because int might match the return type of a GCC
7091   builtin and then its argument prototype would still apply.  */
7092#ifdef __cplusplus
7093extern "C"
7094#endif
7095char pthread_mutex_init ();
7096int
7097main ()
7098{
7099return pthread_mutex_init ();
7100  ;
7101  return 0;
7102}
7103_ACEOF
7104rm -f conftest.$ac_objext conftest$ac_exeext
7105if { (ac_try="$ac_link"
7106case "(($ac_try" in
7107  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7108  *) ac_try_echo=$ac_try;;
7109esac
7110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7111  (eval "$ac_link") 2>conftest.er1
7112  ac_status=$?
7113  grep -v '^ *+' conftest.er1 >conftest.err
7114  rm -f conftest.er1
7115  cat conftest.err >&5
7116  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7117  (exit $ac_status); } && {
7118	 test -z "$ac_c_werror_flag" ||
7119	 test ! -s conftest.err
7120       } && test -s conftest$ac_exeext &&
7121       $as_test_x conftest$ac_exeext; then
7122  ac_cv_lib_c_pthread_mutex_init=yes
7123else
7124  echo "$as_me: failed program was:" >&5
7125sed 's/^/| /' conftest.$ac_ext >&5
7126
7127	ac_cv_lib_c_pthread_mutex_init=no
7128fi
7129
7130rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7131      conftest$ac_exeext conftest.$ac_ext
7132LIBS=$ac_check_lib_save_LIBS
7133fi
7134{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
7135echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; }
7136if test $ac_cv_lib_c_pthread_mutex_init = yes; then
7137  tcl_ok=yes
7138else
7139  tcl_ok=no
7140fi
7141
7142		    if test "$tcl_ok" = "no"; then
7143			{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
7144echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; }
7145if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
7146  echo $ECHO_N "(cached) $ECHO_C" >&6
7147else
7148  ac_check_lib_save_LIBS=$LIBS
7149LIBS="-lc_r  $LIBS"
7150cat >conftest.$ac_ext <<_ACEOF
7151/* confdefs.h.  */
7152_ACEOF
7153cat confdefs.h >>conftest.$ac_ext
7154cat >>conftest.$ac_ext <<_ACEOF
7155/* end confdefs.h.  */
7156
7157/* Override any GCC internal prototype to avoid an error.
7158   Use char because int might match the return type of a GCC
7159   builtin and then its argument prototype would still apply.  */
7160#ifdef __cplusplus
7161extern "C"
7162#endif
7163char pthread_mutex_init ();
7164int
7165main ()
7166{
7167return pthread_mutex_init ();
7168  ;
7169  return 0;
7170}
7171_ACEOF
7172rm -f conftest.$ac_objext conftest$ac_exeext
7173if { (ac_try="$ac_link"
7174case "(($ac_try" in
7175  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7176  *) ac_try_echo=$ac_try;;
7177esac
7178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7179  (eval "$ac_link") 2>conftest.er1
7180  ac_status=$?
7181  grep -v '^ *+' conftest.er1 >conftest.err
7182  rm -f conftest.er1
7183  cat conftest.err >&5
7184  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7185  (exit $ac_status); } && {
7186	 test -z "$ac_c_werror_flag" ||
7187	 test ! -s conftest.err
7188       } && test -s conftest$ac_exeext &&
7189       $as_test_x conftest$ac_exeext; then
7190  ac_cv_lib_c_r_pthread_mutex_init=yes
7191else
7192  echo "$as_me: failed program was:" >&5
7193sed 's/^/| /' conftest.$ac_ext >&5
7194
7195	ac_cv_lib_c_r_pthread_mutex_init=no
7196fi
7197
7198rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7199      conftest$ac_exeext conftest.$ac_ext
7200LIBS=$ac_check_lib_save_LIBS
7201fi
7202{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
7203echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
7204if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
7205  tcl_ok=yes
7206else
7207  tcl_ok=no
7208fi
7209
7210			if test "$tcl_ok" = "yes"; then
7211			    # The space is needed
7212			    THREADS_LIBS=" -pthread"
7213			else
7214			    TCL_THREADS=0
7215			    { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
7216echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
7217			fi
7218		    fi
7219		fi
7220	    fi
7221	fi
7222    else
7223	TCL_THREADS=0
7224    fi
7225    # Do checking message here to not mess up interleaved configure output
7226    { echo "$as_me:$LINENO: checking for building with threads" >&5
7227echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; }
7228    if test "${TCL_THREADS}" = 1; then
7229
7230cat >>confdefs.h <<\_ACEOF
7231#define TCL_THREADS 1
7232_ACEOF
7233
7234	{ echo "$as_me:$LINENO: result: yes (default)" >&5
7235echo "${ECHO_T}yes (default)" >&6; }
7236    else
7237	{ echo "$as_me:$LINENO: result: no" >&5
7238echo "${ECHO_T}no" >&6; }
7239    fi
7240    # TCL_THREADS sanity checking.  See if our request for building with
7241    # threads is the same as the way Tcl was built.  If not, warn the user.
7242    case ${TCL_DEFS} in
7243	*THREADS=1*)
7244	    if test "${TCL_THREADS}" = "0"; then
7245		{ echo "$as_me:$LINENO: WARNING:
7246    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7247    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
7248echo "$as_me: WARNING:
7249    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7250    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
7251	    fi
7252	    ;;
7253	*)
7254	    if test "${TCL_THREADS}" = "1"; then
7255		{ echo "$as_me:$LINENO: WARNING:
7256    --enable-threads requested, but building against a Tcl that is NOT
7257    thread-enabled.  This is an OK configuration that will also run in
7258    a thread-enabled core." >&5
7259echo "$as_me: WARNING:
7260    --enable-threads requested, but building against a Tcl that is NOT
7261    thread-enabled.  This is an OK configuration that will also run in
7262    a thread-enabled core." >&2;}
7263	    fi
7264	    ;;
7265    esac
7266
7267
7268
7269#--------------------------------------------------------------------
7270# The statement below defines a collection of symbols related to
7271# building as a shared library instead of a static library.
7272#--------------------------------------------------------------------
7273
7274
7275    { echo "$as_me:$LINENO: checking how to build libraries" >&5
7276echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; }
7277    # Check whether --enable-shared was given.
7278if test "${enable_shared+set}" = set; then
7279  enableval=$enable_shared; tcl_ok=$enableval
7280else
7281  tcl_ok=yes
7282fi
7283
7284
7285    if test "${enable_shared+set}" = set; then
7286	enableval="$enable_shared"
7287	tcl_ok=$enableval
7288    else
7289	tcl_ok=yes
7290    fi
7291
7292    if test "$tcl_ok" = "yes" ; then
7293	{ echo "$as_me:$LINENO: result: shared" >&5
7294echo "${ECHO_T}shared" >&6; }
7295	SHARED_BUILD=1
7296    else
7297	{ echo "$as_me:$LINENO: result: static" >&5
7298echo "${ECHO_T}static" >&6; }
7299	SHARED_BUILD=0
7300
7301cat >>confdefs.h <<\_ACEOF
7302#define STATIC_BUILD 1
7303_ACEOF
7304
7305    fi
7306
7307
7308
7309#--------------------------------------------------------------------
7310# This macro figures out what flags to use with the compiler/linker
7311# when building shared/static debug/optimized objects.  This information
7312# can be taken from the tclConfig.sh file, but this figures it all out.
7313#--------------------------------------------------------------------
7314
7315
7316
7317
7318    # Step 0.a: Enable 64 bit support?
7319
7320    { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
7321echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; }
7322    # Check whether --enable-64bit was given.
7323if test "${enable_64bit+set}" = set; then
7324  enableval=$enable_64bit; do64bit=$enableval
7325else
7326  do64bit=no
7327fi
7328
7329    { echo "$as_me:$LINENO: result: $do64bit" >&5
7330echo "${ECHO_T}$do64bit" >&6; }
7331
7332    # Step 0.b: Enable Solaris 64 bit VIS support?
7333
7334    { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
7335echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; }
7336    # Check whether --enable-64bit-vis was given.
7337if test "${enable_64bit_vis+set}" = set; then
7338  enableval=$enable_64bit_vis; do64bitVIS=$enableval
7339else
7340  do64bitVIS=no
7341fi
7342
7343    { echo "$as_me:$LINENO: result: $do64bitVIS" >&5
7344echo "${ECHO_T}$do64bitVIS" >&6; }
7345    # Force 64bit on with VIS
7346    if test "$do64bitVIS" = "yes"; then
7347  do64bit=yes
7348fi
7349
7350
7351    # Step 0.c: Check if visibility support is available. Do this here so
7352    # that platform specific alternatives can be used below if this fails.
7353
7354    { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
7355echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; }
7356if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
7357  echo $ECHO_N "(cached) $ECHO_C" >&6
7358else
7359
7360	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
7361	cat >conftest.$ac_ext <<_ACEOF
7362/* confdefs.h.  */
7363_ACEOF
7364cat confdefs.h >>conftest.$ac_ext
7365cat >>conftest.$ac_ext <<_ACEOF
7366/* end confdefs.h.  */
7367
7368	    extern __attribute__((__visibility__("hidden"))) void f(void);
7369	    void f(void) {}
7370int
7371main ()
7372{
7373f();
7374  ;
7375  return 0;
7376}
7377_ACEOF
7378rm -f conftest.$ac_objext conftest$ac_exeext
7379if { (ac_try="$ac_link"
7380case "(($ac_try" in
7381  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7382  *) ac_try_echo=$ac_try;;
7383esac
7384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7385  (eval "$ac_link") 2>conftest.er1
7386  ac_status=$?
7387  grep -v '^ *+' conftest.er1 >conftest.err
7388  rm -f conftest.er1
7389  cat conftest.err >&5
7390  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7391  (exit $ac_status); } && {
7392	 test -z "$ac_c_werror_flag" ||
7393	 test ! -s conftest.err
7394       } && test -s conftest$ac_exeext &&
7395       $as_test_x conftest$ac_exeext; then
7396  tcl_cv_cc_visibility_hidden=yes
7397else
7398  echo "$as_me: failed program was:" >&5
7399sed 's/^/| /' conftest.$ac_ext >&5
7400
7401	tcl_cv_cc_visibility_hidden=no
7402fi
7403
7404rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7405      conftest$ac_exeext conftest.$ac_ext
7406	CFLAGS=$hold_cflags
7407fi
7408{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
7409echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; }
7410    if test $tcl_cv_cc_visibility_hidden = yes; then
7411
7412
7413cat >>confdefs.h <<\_ACEOF
7414#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
7415_ACEOF
7416
7417
7418fi
7419
7420
7421    # Step 0.d: Disable -rpath support?
7422
7423    { echo "$as_me:$LINENO: checking if rpath support is requested" >&5
7424echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; }
7425    # Check whether --enable-rpath was given.
7426if test "${enable_rpath+set}" = set; then
7427  enableval=$enable_rpath; doRpath=$enableval
7428else
7429  doRpath=yes
7430fi
7431
7432    { echo "$as_me:$LINENO: result: $doRpath" >&5
7433echo "${ECHO_T}$doRpath" >&6; }
7434
7435    # TEA specific: Cross-compiling options for Windows/CE builds?
7436
7437    if test "${TEA_PLATFORM}" = windows; then
7438
7439	{ echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
7440echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6; }
7441	# Check whether --enable-wince was given.
7442if test "${enable_wince+set}" = set; then
7443  enableval=$enable_wince; doWince=$enableval
7444else
7445  doWince=no
7446fi
7447
7448	{ echo "$as_me:$LINENO: result: $doWince" >&5
7449echo "${ECHO_T}$doWince" >&6; }
7450
7451fi
7452
7453
7454    # Step 1: set the variable "system" to hold the name and version number
7455    # for the system.
7456
7457
7458    { echo "$as_me:$LINENO: checking system version" >&5
7459echo $ECHO_N "checking system version... $ECHO_C" >&6; }
7460if test "${tcl_cv_sys_version+set}" = set; then
7461  echo $ECHO_N "(cached) $ECHO_C" >&6
7462else
7463
7464	# TEA specific:
7465	if test "${TEA_PLATFORM}" = "windows" ; then
7466	    tcl_cv_sys_version=windows
7467	elif test -f /usr/lib/NextStep/software_version; then
7468	    tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
7469	else
7470	    tcl_cv_sys_version=`uname -s`-`uname -r`
7471	    if test "$?" -ne 0 ; then
7472		{ echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
7473echo "$as_me: WARNING: can't find uname command" >&2;}
7474		tcl_cv_sys_version=unknown
7475	    else
7476		# Special check for weird MP-RAS system (uname returns weird
7477		# results, and the version is kept in special file).
7478
7479		if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
7480		    tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
7481		fi
7482		if test "`uname -s`" = "AIX" ; then
7483		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
7484		fi
7485	    fi
7486	fi
7487
7488fi
7489{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
7490echo "${ECHO_T}$tcl_cv_sys_version" >&6; }
7491    system=$tcl_cv_sys_version
7492
7493
7494    # Step 2: check for existence of -ldl library.  This is needed because
7495    # Linux can use either -ldl or -ldld for dynamic loading.
7496
7497    { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
7498echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
7499if test "${ac_cv_lib_dl_dlopen+set}" = set; then
7500  echo $ECHO_N "(cached) $ECHO_C" >&6
7501else
7502  ac_check_lib_save_LIBS=$LIBS
7503LIBS="-ldl  $LIBS"
7504cat >conftest.$ac_ext <<_ACEOF
7505/* confdefs.h.  */
7506_ACEOF
7507cat confdefs.h >>conftest.$ac_ext
7508cat >>conftest.$ac_ext <<_ACEOF
7509/* end confdefs.h.  */
7510
7511/* Override any GCC internal prototype to avoid an error.
7512   Use char because int might match the return type of a GCC
7513   builtin and then its argument prototype would still apply.  */
7514#ifdef __cplusplus
7515extern "C"
7516#endif
7517char dlopen ();
7518int
7519main ()
7520{
7521return dlopen ();
7522  ;
7523  return 0;
7524}
7525_ACEOF
7526rm -f conftest.$ac_objext conftest$ac_exeext
7527if { (ac_try="$ac_link"
7528case "(($ac_try" in
7529  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7530  *) ac_try_echo=$ac_try;;
7531esac
7532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7533  (eval "$ac_link") 2>conftest.er1
7534  ac_status=$?
7535  grep -v '^ *+' conftest.er1 >conftest.err
7536  rm -f conftest.er1
7537  cat conftest.err >&5
7538  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7539  (exit $ac_status); } && {
7540	 test -z "$ac_c_werror_flag" ||
7541	 test ! -s conftest.err
7542       } && test -s conftest$ac_exeext &&
7543       $as_test_x conftest$ac_exeext; then
7544  ac_cv_lib_dl_dlopen=yes
7545else
7546  echo "$as_me: failed program was:" >&5
7547sed 's/^/| /' conftest.$ac_ext >&5
7548
7549	ac_cv_lib_dl_dlopen=no
7550fi
7551
7552rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7553      conftest$ac_exeext conftest.$ac_ext
7554LIBS=$ac_check_lib_save_LIBS
7555fi
7556{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
7557echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
7558if test $ac_cv_lib_dl_dlopen = yes; then
7559  have_dl=yes
7560else
7561  have_dl=no
7562fi
7563
7564
7565    # Require ranlib early so we can override it in special cases below.
7566
7567
7568
7569    # Step 3: set configuration options based on system name and version.
7570    # This is similar to Tcl's unix/tcl.m4 except that we've added a
7571    # "windows" case.
7572
7573    do64bit_ok=no
7574    LDFLAGS_ORIG="$LDFLAGS"
7575    # When ld needs options to work in 64-bit mode, put them in
7576    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
7577    # is disabled by the user. [Bug 1016796]
7578    LDFLAGS_ARCH=""
7579    TCL_EXPORT_FILE_SUFFIX=""
7580    UNSHARED_LIB_SUFFIX=""
7581    # TEA specific: use PACKAGE_VERSION instead of VERSION
7582    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
7583    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
7584    TCL_LIB_VERSIONS_OK=ok
7585    CFLAGS_DEBUG=-g
7586    CFLAGS_OPTIMIZE=-O
7587    if test "$GCC" = yes; then
7588
7589	# TEA specific:
7590	CFLAGS_OPTIMIZE=-O2
7591	CFLAGS_WARNING="-Wall -Wno-implicit-int"
7592
7593else
7594  CFLAGS_WARNING=""
7595fi
7596
7597    TCL_NEEDS_EXP_FILE=0
7598    TCL_BUILD_EXP_FILE=""
7599    TCL_EXP_FILE=""
7600    # Extract the first word of "ar", so it can be a program name with args.
7601set dummy ar; ac_word=$2
7602{ echo "$as_me:$LINENO: checking for $ac_word" >&5
7603echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7604if test "${ac_cv_prog_AR+set}" = set; then
7605  echo $ECHO_N "(cached) $ECHO_C" >&6
7606else
7607  if test -n "$AR"; then
7608  ac_cv_prog_AR="$AR" # Let the user override the test.
7609else
7610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7611for as_dir in $PATH
7612do
7613  IFS=$as_save_IFS
7614  test -z "$as_dir" && as_dir=.
7615  for ac_exec_ext in '' $ac_executable_extensions; do
7616  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7617    ac_cv_prog_AR="ar"
7618    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7619    break 2
7620  fi
7621done
7622done
7623IFS=$as_save_IFS
7624
7625fi
7626fi
7627AR=$ac_cv_prog_AR
7628if test -n "$AR"; then
7629  { echo "$as_me:$LINENO: result: $AR" >&5
7630echo "${ECHO_T}$AR" >&6; }
7631else
7632  { echo "$as_me:$LINENO: result: no" >&5
7633echo "${ECHO_T}no" >&6; }
7634fi
7635
7636
7637    STLIB_LD='${AR} cr'
7638    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
7639    case $system in
7640	# TEA specific:
7641	windows)
7642	    # This is a 2-stage check to make sure we have the 64-bit SDK
7643	    # We have to know where the SDK is installed.
7644	    # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
7645	    # MACHINE is IX86 for LINK, but this is used by the manifest,
7646	    # which requires x86|amd64|ia64.
7647	    MACHINE="X86"
7648	    if test "$do64bit" != "no" ; then
7649		if test "x${MSSDK}x" = "xx" ; then
7650		    MSSDK="C:/Progra~1/Microsoft Platform SDK"
7651		fi
7652		MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
7653		PATH64=""
7654		case "$do64bit" in
7655		    amd64|x64|yes)
7656			MACHINE="AMD64" ; # default to AMD64 64-bit build
7657			PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
7658			;;
7659		    ia64)
7660			MACHINE="IA64"
7661			PATH64="${MSSDK}/Bin/Win64"
7662			;;
7663		esac
7664		if test ! -d "${PATH64}" ; then
7665		    { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
7666echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
7667		    { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
7668echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
7669		    do64bit="no"
7670		else
7671		    { echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
7672echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6; }
7673		    do64bit_ok="yes"
7674		fi
7675	    fi
7676
7677	    if test "$doWince" != "no" ; then
7678		if test "$do64bit" != "no" ; then
7679		    { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
7680echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
7681   { (exit 1); exit 1; }; }
7682		fi
7683		if test "$GCC" = "yes" ; then
7684		    { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
7685echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
7686   { (exit 1); exit 1; }; }
7687		fi
7688
7689    # First, look for one uninstalled.
7690    # the alternative search directory is invoked by --with-celib
7691
7692    if test x"${no_celib}" = x ; then
7693	# we reset no_celib in case something fails here
7694	no_celib=true
7695
7696# Check whether --with-celib was given.
7697if test "${with_celib+set}" = set; then
7698  withval=$with_celib; with_celibconfig=${withval}
7699fi
7700
7701	{ echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
7702echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6; }
7703	if test "${ac_cv_c_celibconfig+set}" = set; then
7704  echo $ECHO_N "(cached) $ECHO_C" >&6
7705else
7706
7707	    # First check to see if --with-celibconfig was specified.
7708	    if test x"${with_celibconfig}" != x ; then
7709		if test -d "${with_celibconfig}/inc" ; then
7710		    ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
7711		else
7712		    { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
7713echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
7714   { (exit 1); exit 1; }; }
7715		fi
7716	    fi
7717
7718	    # then check for a celib library
7719	    if test x"${ac_cv_c_celibconfig}" = x ; then
7720		for i in \
7721			../celib-palm-3.0 \
7722			../celib \
7723			../../celib-palm-3.0 \
7724			../../celib \
7725			`ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
7726			${srcdir}/../celib-palm-3.0 \
7727			${srcdir}/../celib \
7728			`ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
7729			; do
7730		    if test -d "$i/inc" ; then
7731			ac_cv_c_celibconfig=`(cd $i; pwd)`
7732			break
7733		    fi
7734		done
7735	    fi
7736
7737fi
7738
7739	if test x"${ac_cv_c_celibconfig}" = x ; then
7740	    { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
7741echo "$as_me: error: Cannot find celib support library directory" >&2;}
7742   { (exit 1); exit 1; }; }
7743	else
7744	    no_celib=
7745	    CELIB_DIR=${ac_cv_c_celibconfig}
7746	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
7747	    { echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
7748echo "${ECHO_T}found $CELIB_DIR" >&6; }
7749	fi
7750    fi
7751
7752		# Set defaults for common evc4/PPC2003 setup
7753		# Currently Tcl requires 300+, possibly 420+ for sockets
7754		CEVERSION=420; 		# could be 211 300 301 400 420 ...
7755		TARGETCPU=ARMV4;	# could be ARMV4 ARM MIPS SH3 X86 ...
7756		ARCH=ARM;		# could be ARM MIPS X86EM ...
7757		PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
7758		if test "$doWince" != "yes"; then
7759		    # If !yes then the user specified something
7760		    # Reset ARCH to allow user to skip specifying it
7761		    ARCH=
7762		    eval `echo $doWince | awk -F, '{ \
7763	    if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
7764	    if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
7765	    if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
7766	    if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
7767	    if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
7768		    }'`
7769		    if test "x${ARCH}" = "x" ; then
7770			ARCH=$TARGETCPU;
7771		    fi
7772		fi
7773		OSVERSION=WCE$CEVERSION;
7774	    	if test "x${WCEROOT}" = "x" ; then
7775			WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
7776		    if test ! -d "${WCEROOT}" ; then
7777			WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
7778		    fi
7779		fi
7780		if test "x${SDKROOT}" = "x" ; then
7781		    SDKROOT="C:/Program Files/Windows CE Tools"
7782		    if test ! -d "${SDKROOT}" ; then
7783			SDKROOT="C:/Windows CE Tools"
7784		    fi
7785		fi
7786		WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
7787		SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
7788		if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
7789		    -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
7790		    { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
7791echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
7792   { (exit 1); exit 1; }; }
7793		    doWince="no"
7794		else
7795		    # We could PATH_NOSPACE these, but that's not important,
7796		    # as long as we quote them when used.
7797		    CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
7798		    if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
7799			CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
7800		    fi
7801		    CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
7802    		fi
7803	    fi
7804
7805	    if test "$GCC" != "yes" ; then
7806	        if test "${SHARED_BUILD}" = "0" ; then
7807		    runtime=-MT
7808	        else
7809		    runtime=-MD
7810	        fi
7811
7812                if test "$do64bit" != "no" ; then
7813		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
7814		    CC="\"${PATH64}/cl.exe\""
7815		    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
7816		    RC="\"${MSSDK}/bin/rc.exe\""
7817		    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
7818		    LINKBIN="\"${PATH64}/link.exe\""
7819		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
7820		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
7821		    # Avoid 'unresolved external symbol __security_cookie'
7822		    # errors, c.f. http://support.microsoft.com/?id=894573
7823
7824    vars="bufferoverflowU.lib"
7825    for i in $vars; do
7826	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7827	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7828	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7829	fi
7830	PKG_LIBS="$PKG_LIBS $i"
7831    done
7832
7833
7834		elif test "$doWince" != "no" ; then
7835		    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
7836		    if test "${TARGETCPU}" = "X86"; then
7837			CC="\"${CEBINROOT}/cl.exe\""
7838		    else
7839			CC="\"${CEBINROOT}/cl${ARCH}.exe\""
7840		    fi
7841		    CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
7842		    RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
7843		    arch=`echo ${ARCH} | awk '{print tolower($0)}'`
7844		    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
7845		    if test "${SHARED_BUILD}" = "1" ; then
7846			# Static CE builds require static celib as well
7847		    	defs="${defs} _DLL"
7848		    fi
7849		    for i in $defs ; do
7850
7851cat >>confdefs.h <<_ACEOF
7852#define $i 1
7853_ACEOF
7854
7855		    done
7856
7857cat >>confdefs.h <<_ACEOF
7858#define _WIN32_WCE $CEVERSION
7859_ACEOF
7860
7861
7862cat >>confdefs.h <<_ACEOF
7863#define UNDER_CE $CEVERSION
7864_ACEOF
7865
7866		    CFLAGS_DEBUG="-nologo -Zi -Od"
7867		    CFLAGS_OPTIMIZE="-nologo -Ox"
7868		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
7869		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
7870		    LINKBIN="\"${CEBINROOT}/link.exe\""
7871
7872		else
7873		    RC="rc"
7874		    lflags="-nologo"
7875    		    LINKBIN="link"
7876		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
7877		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
7878		fi
7879	    fi
7880
7881	    if test "$GCC" = "yes"; then
7882		# mingw gcc mode
7883		RC="windres"
7884		CFLAGS_DEBUG="-g"
7885		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
7886		SHLIB_LD="$CC -shared"
7887		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7888		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
7889		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
7890	    else
7891		SHLIB_LD="${LINKBIN} -dll ${lflags}"
7892		# link -lib only works when -lib is the first arg
7893		STLIB_LD="${LINKBIN} -lib ${lflags}"
7894		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
7895		PATHTYPE=-w
7896		# For information on what debugtype is most useful, see:
7897		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
7898		# This essentially turns it all on.
7899		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
7900		LDFLAGS_OPTIMIZE="-release"
7901		if test "$doWince" != "no" ; then
7902		    LDFLAGS_CONSOLE="-link ${lflags}"
7903		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
7904		else
7905		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
7906		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
7907		fi
7908	    fi
7909
7910	    SHLIB_LD_LIBS='${LIBS}'
7911	    SHLIB_SUFFIX=".dll"
7912	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
7913
7914	    TCL_LIB_VERSIONS_OK=nodots
7915	    # Bogus to avoid getting this turned off
7916	    DL_OBJS="tclLoadNone.obj"
7917    	    ;;
7918	AIX-*)
7919	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
7920
7921		# AIX requires the _r compiler when gcc isn't being used
7922		case "${CC}" in
7923		    *_r)
7924			# ok ...
7925			;;
7926		    *)
7927			CC=${CC}_r
7928			;;
7929		esac
7930		{ echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
7931echo "${ECHO_T}Using $CC for compiling with threads" >&6; }
7932
7933fi
7934
7935	    LIBS="$LIBS -lc"
7936	    SHLIB_CFLAGS=""
7937	    SHLIB_LD_LIBS='${LIBS}'
7938	    SHLIB_SUFFIX=".so"
7939
7940	    DL_OBJS="tclLoadDl.o"
7941	    LD_LIBRARY_PATH_VAR="LIBPATH"
7942
7943	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
7944	    if test "$do64bit" = yes -a "`uname -v`" -gt 3; then
7945
7946		if test "$GCC" = yes; then
7947
7948		    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
7949echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7950
7951else
7952
7953		    do64bit_ok=yes
7954		    CFLAGS="$CFLAGS -q64"
7955		    LDFLAGS_ARCH="-q64"
7956		    RANLIB="${RANLIB} -X64"
7957		    AR="${AR} -X64"
7958		    SHLIB_LD_FLAGS="-b64"
7959
7960fi
7961
7962
7963fi
7964
7965
7966	    if test "`uname -m`" = ia64; then
7967
7968		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
7969		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
7970		# AIX-5 has dl* in libc.so
7971		DL_LIBS=""
7972		if test "$GCC" = yes; then
7973
7974		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7975
7976else
7977
7978		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
7979
7980fi
7981
7982		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
7983
7984else
7985
7986		if test "$GCC" = yes; then
7987  SHLIB_LD='${CC} -shared'
7988else
7989
7990		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
7991
7992fi
7993
7994		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
7995		DL_LIBS="-ldl"
7996		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
7997		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7998		TCL_NEEDS_EXP_FILE=1
7999		# TEA specific: use PACKAGE_VERSION instead of VERSION
8000		TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp'
8001
8002fi
8003
8004
8005	    # AIX v<=4.1 has some different flags than 4.2+
8006	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then
8007
8008		case " $LIBOBJS " in
8009  *" tclLoadAix.$ac_objext "* ) ;;
8010  *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext"
8011 ;;
8012esac
8013
8014		DL_LIBS="-lld"
8015
8016fi
8017
8018
8019	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
8020	    # non-blocking file IO.  This library has to be linked in after
8021	    # the MATH_LIBS or it breaks the pow() function.  The way to
8022	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
8023	    # This library also supplies gettimeofday.
8024	    #
8025	    # AIX does not have a timezone field in struct tm. When the AIX
8026	    # bsd library is used, the timezone global and the gettimeofday
8027	    # methods are to be avoided for timezone deduction instead, we
8028	    # deduce the timezone by comparing the localtime result on a
8029	    # known GMT value.
8030
8031	    { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5
8032echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; }
8033if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
8034  echo $ECHO_N "(cached) $ECHO_C" >&6
8035else
8036  ac_check_lib_save_LIBS=$LIBS
8037LIBS="-lbsd  $LIBS"
8038cat >conftest.$ac_ext <<_ACEOF
8039/* confdefs.h.  */
8040_ACEOF
8041cat confdefs.h >>conftest.$ac_ext
8042cat >>conftest.$ac_ext <<_ACEOF
8043/* end confdefs.h.  */
8044
8045/* Override any GCC internal prototype to avoid an error.
8046   Use char because int might match the return type of a GCC
8047   builtin and then its argument prototype would still apply.  */
8048#ifdef __cplusplus
8049extern "C"
8050#endif
8051char gettimeofday ();
8052int
8053main ()
8054{
8055return gettimeofday ();
8056  ;
8057  return 0;
8058}
8059_ACEOF
8060rm -f conftest.$ac_objext conftest$ac_exeext
8061if { (ac_try="$ac_link"
8062case "(($ac_try" in
8063  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8064  *) ac_try_echo=$ac_try;;
8065esac
8066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8067  (eval "$ac_link") 2>conftest.er1
8068  ac_status=$?
8069  grep -v '^ *+' conftest.er1 >conftest.err
8070  rm -f conftest.er1
8071  cat conftest.err >&5
8072  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8073  (exit $ac_status); } && {
8074	 test -z "$ac_c_werror_flag" ||
8075	 test ! -s conftest.err
8076       } && test -s conftest$ac_exeext &&
8077       $as_test_x conftest$ac_exeext; then
8078  ac_cv_lib_bsd_gettimeofday=yes
8079else
8080  echo "$as_me: failed program was:" >&5
8081sed 's/^/| /' conftest.$ac_ext >&5
8082
8083	ac_cv_lib_bsd_gettimeofday=no
8084fi
8085
8086rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8087      conftest$ac_exeext conftest.$ac_ext
8088LIBS=$ac_check_lib_save_LIBS
8089fi
8090{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5
8091echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; }
8092if test $ac_cv_lib_bsd_gettimeofday = yes; then
8093  libbsd=yes
8094else
8095  libbsd=no
8096fi
8097
8098	    if test $libbsd = yes; then
8099
8100	    	MATH_LIBS="$MATH_LIBS -lbsd"
8101
8102cat >>confdefs.h <<\_ACEOF
8103#define USE_DELTA_FOR_TZ 1
8104_ACEOF
8105
8106
8107fi
8108
8109	    ;;
8110	BeOS*)
8111	    SHLIB_CFLAGS="-fPIC"
8112	    SHLIB_LD='${CC} -nostart'
8113	    SHLIB_LD_LIBS='${LIBS}'
8114	    SHLIB_SUFFIX=".so"
8115	    DL_OBJS="tclLoadDl.o"
8116	    DL_LIBS="-ldl"
8117
8118	    #-----------------------------------------------------------
8119	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
8120	    # -lsocket, even if the network functions are in -lnet which
8121	    # is always linked to, for compatibility.
8122	    #-----------------------------------------------------------
8123	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
8124echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; }
8125if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
8126  echo $ECHO_N "(cached) $ECHO_C" >&6
8127else
8128  ac_check_lib_save_LIBS=$LIBS
8129LIBS="-lbind  $LIBS"
8130cat >conftest.$ac_ext <<_ACEOF
8131/* confdefs.h.  */
8132_ACEOF
8133cat confdefs.h >>conftest.$ac_ext
8134cat >>conftest.$ac_ext <<_ACEOF
8135/* end confdefs.h.  */
8136
8137/* Override any GCC internal prototype to avoid an error.
8138   Use char because int might match the return type of a GCC
8139   builtin and then its argument prototype would still apply.  */
8140#ifdef __cplusplus
8141extern "C"
8142#endif
8143char inet_ntoa ();
8144int
8145main ()
8146{
8147return inet_ntoa ();
8148  ;
8149  return 0;
8150}
8151_ACEOF
8152rm -f conftest.$ac_objext conftest$ac_exeext
8153if { (ac_try="$ac_link"
8154case "(($ac_try" in
8155  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8156  *) ac_try_echo=$ac_try;;
8157esac
8158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8159  (eval "$ac_link") 2>conftest.er1
8160  ac_status=$?
8161  grep -v '^ *+' conftest.er1 >conftest.err
8162  rm -f conftest.er1
8163  cat conftest.err >&5
8164  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8165  (exit $ac_status); } && {
8166	 test -z "$ac_c_werror_flag" ||
8167	 test ! -s conftest.err
8168       } && test -s conftest$ac_exeext &&
8169       $as_test_x conftest$ac_exeext; then
8170  ac_cv_lib_bind_inet_ntoa=yes
8171else
8172  echo "$as_me: failed program was:" >&5
8173sed 's/^/| /' conftest.$ac_ext >&5
8174
8175	ac_cv_lib_bind_inet_ntoa=no
8176fi
8177
8178rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8179      conftest$ac_exeext conftest.$ac_ext
8180LIBS=$ac_check_lib_save_LIBS
8181fi
8182{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
8183echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; }
8184if test $ac_cv_lib_bind_inet_ntoa = yes; then
8185  LIBS="$LIBS -lbind -lsocket"
8186fi
8187
8188	    ;;
8189	BSD/OS-2.1*|BSD/OS-3*)
8190	    SHLIB_CFLAGS=""
8191	    SHLIB_LD="shlicc -r"
8192	    SHLIB_LD_LIBS='${LIBS}'
8193	    SHLIB_SUFFIX=".so"
8194	    DL_OBJS="tclLoadDl.o"
8195	    DL_LIBS="-ldl"
8196	    CC_SEARCH_FLAGS=""
8197	    LD_SEARCH_FLAGS=""
8198	    ;;
8199	BSD/OS-4.*)
8200	    SHLIB_CFLAGS="-export-dynamic -fPIC"
8201	    SHLIB_LD='${CC} -shared'
8202	    SHLIB_LD_LIBS='${LIBS}'
8203	    SHLIB_SUFFIX=".so"
8204	    DL_OBJS="tclLoadDl.o"
8205	    DL_LIBS="-ldl"
8206	    LDFLAGS="$LDFLAGS -export-dynamic"
8207	    CC_SEARCH_FLAGS=""
8208	    LD_SEARCH_FLAGS=""
8209	    ;;
8210	dgux*)
8211	    SHLIB_CFLAGS="-K PIC"
8212	    SHLIB_LD='${CC} -G'
8213	    SHLIB_LD_LIBS=""
8214	    SHLIB_SUFFIX=".so"
8215	    DL_OBJS="tclLoadDl.o"
8216	    DL_LIBS="-ldl"
8217	    CC_SEARCH_FLAGS=""
8218	    LD_SEARCH_FLAGS=""
8219	    ;;
8220	HP-UX-*.11.*)
8221	    # Use updated header definitions where possible
8222
8223cat >>confdefs.h <<\_ACEOF
8224#define _XOPEN_SOURCE_EXTENDED 1
8225_ACEOF
8226
8227	    # TEA specific: Needed by Tcl, but not most extensions
8228	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
8229	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
8230
8231	    if test "`uname -m`" = ia64; then
8232
8233		SHLIB_SUFFIX=".so"
8234		# Use newer C++ library for C++ extensions
8235		#if test "$GCC" != "yes" ; then
8236		#   CPPFLAGS="-AA"
8237		#fi
8238
8239else
8240
8241		SHLIB_SUFFIX=".sl"
8242
8243fi
8244
8245	    { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8246echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
8247if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8248  echo $ECHO_N "(cached) $ECHO_C" >&6
8249else
8250  ac_check_lib_save_LIBS=$LIBS
8251LIBS="-ldld  $LIBS"
8252cat >conftest.$ac_ext <<_ACEOF
8253/* confdefs.h.  */
8254_ACEOF
8255cat confdefs.h >>conftest.$ac_ext
8256cat >>conftest.$ac_ext <<_ACEOF
8257/* end confdefs.h.  */
8258
8259/* Override any GCC internal prototype to avoid an error.
8260   Use char because int might match the return type of a GCC
8261   builtin and then its argument prototype would still apply.  */
8262#ifdef __cplusplus
8263extern "C"
8264#endif
8265char shl_load ();
8266int
8267main ()
8268{
8269return shl_load ();
8270  ;
8271  return 0;
8272}
8273_ACEOF
8274rm -f conftest.$ac_objext conftest$ac_exeext
8275if { (ac_try="$ac_link"
8276case "(($ac_try" in
8277  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8278  *) ac_try_echo=$ac_try;;
8279esac
8280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8281  (eval "$ac_link") 2>conftest.er1
8282  ac_status=$?
8283  grep -v '^ *+' conftest.er1 >conftest.err
8284  rm -f conftest.er1
8285  cat conftest.err >&5
8286  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8287  (exit $ac_status); } && {
8288	 test -z "$ac_c_werror_flag" ||
8289	 test ! -s conftest.err
8290       } && test -s conftest$ac_exeext &&
8291       $as_test_x conftest$ac_exeext; then
8292  ac_cv_lib_dld_shl_load=yes
8293else
8294  echo "$as_me: failed program was:" >&5
8295sed 's/^/| /' conftest.$ac_ext >&5
8296
8297	ac_cv_lib_dld_shl_load=no
8298fi
8299
8300rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8301      conftest$ac_exeext conftest.$ac_ext
8302LIBS=$ac_check_lib_save_LIBS
8303fi
8304{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
8305echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
8306if test $ac_cv_lib_dld_shl_load = yes; then
8307  tcl_ok=yes
8308else
8309  tcl_ok=no
8310fi
8311
8312	    if test "$tcl_ok" = yes; then
8313
8314		SHLIB_CFLAGS="+z"
8315		SHLIB_LD="ld -b"
8316		SHLIB_LD_LIBS='${LIBS}'
8317		DL_OBJS="tclLoadShl.o"
8318		DL_LIBS="-ldld"
8319		LDFLAGS="$LDFLAGS -Wl,-E"
8320		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
8321		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
8322		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
8323
8324fi
8325
8326	    if test "$GCC" = yes; then
8327
8328		SHLIB_LD='${CC} -shared'
8329		SHLIB_LD_LIBS='${LIBS}'
8330		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8331
8332fi
8333
8334
8335	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
8336	    #CFLAGS="$CFLAGS +DAportable"
8337
8338	    # Check to enable 64-bit flags for compiler/linker
8339	    if test "$do64bit" = "yes"; then
8340
8341		if test "$GCC" = yes; then
8342
8343		    case `${CC} -dumpmachine` in
8344			hppa64*)
8345			    # 64-bit gcc in use.  Fix flags for GNU ld.
8346			    do64bit_ok=yes
8347			    SHLIB_LD='${CC} -shared'
8348			    SHLIB_LD_LIBS='${LIBS}'
8349			    if test $doRpath = yes; then
8350
8351				CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8352fi
8353
8354			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8355			    ;;
8356			*)
8357			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8358echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8359			    ;;
8360		    esac
8361
8362else
8363
8364		    do64bit_ok=yes
8365		    CFLAGS="$CFLAGS +DD64"
8366		    LDFLAGS_ARCH="+DD64"
8367
8368fi
8369
8370
8371fi
8372 ;;
8373	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
8374	    SHLIB_SUFFIX=".sl"
8375	    { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8376echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
8377if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8378  echo $ECHO_N "(cached) $ECHO_C" >&6
8379else
8380  ac_check_lib_save_LIBS=$LIBS
8381LIBS="-ldld  $LIBS"
8382cat >conftest.$ac_ext <<_ACEOF
8383/* confdefs.h.  */
8384_ACEOF
8385cat confdefs.h >>conftest.$ac_ext
8386cat >>conftest.$ac_ext <<_ACEOF
8387/* end confdefs.h.  */
8388
8389/* Override any GCC internal prototype to avoid an error.
8390   Use char because int might match the return type of a GCC
8391   builtin and then its argument prototype would still apply.  */
8392#ifdef __cplusplus
8393extern "C"
8394#endif
8395char shl_load ();
8396int
8397main ()
8398{
8399return shl_load ();
8400  ;
8401  return 0;
8402}
8403_ACEOF
8404rm -f conftest.$ac_objext conftest$ac_exeext
8405if { (ac_try="$ac_link"
8406case "(($ac_try" in
8407  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8408  *) ac_try_echo=$ac_try;;
8409esac
8410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8411  (eval "$ac_link") 2>conftest.er1
8412  ac_status=$?
8413  grep -v '^ *+' conftest.er1 >conftest.err
8414  rm -f conftest.er1
8415  cat conftest.err >&5
8416  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8417  (exit $ac_status); } && {
8418	 test -z "$ac_c_werror_flag" ||
8419	 test ! -s conftest.err
8420       } && test -s conftest$ac_exeext &&
8421       $as_test_x conftest$ac_exeext; then
8422  ac_cv_lib_dld_shl_load=yes
8423else
8424  echo "$as_me: failed program was:" >&5
8425sed 's/^/| /' conftest.$ac_ext >&5
8426
8427	ac_cv_lib_dld_shl_load=no
8428fi
8429
8430rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8431      conftest$ac_exeext conftest.$ac_ext
8432LIBS=$ac_check_lib_save_LIBS
8433fi
8434{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
8435echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
8436if test $ac_cv_lib_dld_shl_load = yes; then
8437  tcl_ok=yes
8438else
8439  tcl_ok=no
8440fi
8441
8442	    if test "$tcl_ok" = yes; then
8443
8444		SHLIB_CFLAGS="+z"
8445		SHLIB_LD="ld -b"
8446		SHLIB_LD_LIBS=""
8447		DL_OBJS="tclLoadShl.o"
8448		DL_LIBS="-ldld"
8449		LDFLAGS="$LDFLAGS -Wl,-E"
8450		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
8451		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
8452		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
8453
8454fi
8455 ;;
8456	IRIX-5.*)
8457	    SHLIB_CFLAGS=""
8458	    SHLIB_LD="ld -shared -rdata_shared"
8459	    SHLIB_LD_LIBS='${LIBS}'
8460	    SHLIB_SUFFIX=".so"
8461	    DL_OBJS="tclLoadDl.o"
8462	    DL_LIBS=""
8463	    if test $doRpath = yes; then
8464
8465		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8466		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8467fi
8468
8469	    ;;
8470	IRIX-6.*)
8471	    SHLIB_CFLAGS=""
8472	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8473	    SHLIB_LD_LIBS='${LIBS}'
8474	    SHLIB_SUFFIX=".so"
8475	    DL_OBJS="tclLoadDl.o"
8476	    DL_LIBS=""
8477	    if test $doRpath = yes; then
8478
8479		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8480		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8481fi
8482
8483	    if test "$GCC" = yes; then
8484
8485		CFLAGS="$CFLAGS -mabi=n32"
8486		LDFLAGS="$LDFLAGS -mabi=n32"
8487
8488else
8489
8490		case $system in
8491		    IRIX-6.3)
8492			# Use to build 6.2 compatible binaries on 6.3.
8493			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
8494			;;
8495		    *)
8496			CFLAGS="$CFLAGS -n32"
8497			;;
8498		esac
8499		LDFLAGS="$LDFLAGS -n32"
8500
8501fi
8502
8503	    ;;
8504	IRIX64-6.*)
8505	    SHLIB_CFLAGS=""
8506	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8507	    SHLIB_LD_LIBS='${LIBS}'
8508	    SHLIB_SUFFIX=".so"
8509	    DL_OBJS="tclLoadDl.o"
8510	    DL_LIBS=""
8511	    if test $doRpath = yes; then
8512
8513		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8514		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8515fi
8516
8517
8518	    # Check to enable 64-bit flags for compiler/linker
8519
8520	    if test "$do64bit" = yes; then
8521
8522	        if test "$GCC" = yes; then
8523
8524	            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
8525echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
8526
8527else
8528
8529	            do64bit_ok=yes
8530	            SHLIB_LD="ld -64 -shared -rdata_shared"
8531	            CFLAGS="$CFLAGS -64"
8532	            LDFLAGS_ARCH="-64"
8533
8534fi
8535
8536
8537fi
8538
8539	    ;;
8540	Linux*)
8541	    SHLIB_CFLAGS="-fPIC"
8542	    SHLIB_LD_LIBS='${LIBS}'
8543	    SHLIB_SUFFIX=".so"
8544
8545	    # TEA specific:
8546	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8547	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
8548	    # when you inline the string and math operations.  Turn this off to
8549	    # get rid of the warnings.
8550	    #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
8551
8552	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8553	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
8554	    DL_OBJS="tclLoadDl.o"
8555	    DL_LIBS="-ldl"
8556	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8557	    if test $doRpath = yes; then
8558
8559		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8560fi
8561
8562	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8563	    if test "`uname -m`" = "alpha"; then
8564  CFLAGS="$CFLAGS -mieee"
8565fi
8566
8567	    if test $do64bit = yes; then
8568
8569		{ echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
8570echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; }
8571if test "${tcl_cv_cc_m64+set}" = set; then
8572  echo $ECHO_N "(cached) $ECHO_C" >&6
8573else
8574
8575		    hold_cflags=$CFLAGS
8576		    CFLAGS="$CFLAGS -m64"
8577		    cat >conftest.$ac_ext <<_ACEOF
8578/* confdefs.h.  */
8579_ACEOF
8580cat confdefs.h >>conftest.$ac_ext
8581cat >>conftest.$ac_ext <<_ACEOF
8582/* end confdefs.h.  */
8583
8584int
8585main ()
8586{
8587
8588  ;
8589  return 0;
8590}
8591_ACEOF
8592rm -f conftest.$ac_objext conftest$ac_exeext
8593if { (ac_try="$ac_link"
8594case "(($ac_try" in
8595  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8596  *) ac_try_echo=$ac_try;;
8597esac
8598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8599  (eval "$ac_link") 2>conftest.er1
8600  ac_status=$?
8601  grep -v '^ *+' conftest.er1 >conftest.err
8602  rm -f conftest.er1
8603  cat conftest.err >&5
8604  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8605  (exit $ac_status); } && {
8606	 test -z "$ac_c_werror_flag" ||
8607	 test ! -s conftest.err
8608       } && test -s conftest$ac_exeext &&
8609       $as_test_x conftest$ac_exeext; then
8610  tcl_cv_cc_m64=yes
8611else
8612  echo "$as_me: failed program was:" >&5
8613sed 's/^/| /' conftest.$ac_ext >&5
8614
8615	tcl_cv_cc_m64=no
8616fi
8617
8618rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8619      conftest$ac_exeext conftest.$ac_ext
8620		    CFLAGS=$hold_cflags
8621fi
8622{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
8623echo "${ECHO_T}$tcl_cv_cc_m64" >&6; }
8624		if test $tcl_cv_cc_m64 = yes; then
8625
8626		    CFLAGS="$CFLAGS -m64"
8627		    do64bit_ok=yes
8628
8629fi
8630
8631
8632fi
8633
8634
8635	    # The combo of gcc + glibc has a bug related to inlining of
8636	    # functions like strtod(). The -fno-builtin flag should address
8637	    # this problem but it does not work. The -fno-inline flag is kind
8638	    # of overkill but it works. Disable inlining only when one of the
8639	    # files in compat/*.c is being linked in.
8640
8641	    if test x"${USE_COMPAT}" != x; then
8642  CFLAGS="$CFLAGS -fno-inline"
8643fi
8644
8645
8646	    ;;
8647	GNU*)
8648	    SHLIB_CFLAGS="-fPIC"
8649	    SHLIB_LD_LIBS='${LIBS}'
8650	    SHLIB_SUFFIX=".so"
8651
8652	    SHLIB_LD='${CC} -shared'
8653	    DL_OBJS=""
8654	    DL_LIBS="-ldl"
8655	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8656	    CC_SEARCH_FLAGS=""
8657	    LD_SEARCH_FLAGS=""
8658	    if test "`uname -m`" = "alpha"; then
8659  CFLAGS="$CFLAGS -mieee"
8660fi
8661
8662	    ;;
8663	Lynx*)
8664	    SHLIB_CFLAGS="-fPIC"
8665	    SHLIB_LD_LIBS='${LIBS}'
8666	    SHLIB_SUFFIX=".so"
8667	    CFLAGS_OPTIMIZE=-02
8668	    SHLIB_LD='${CC} -shared'
8669	    DL_OBJS="tclLoadDl.o"
8670	    DL_LIBS="-mshared -ldl"
8671	    LD_FLAGS="-Wl,--export-dynamic"
8672	    if test $doRpath = yes; then
8673
8674		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8675		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8676fi
8677
8678	    ;;
8679	MP-RAS-02*)
8680	    SHLIB_CFLAGS="-K PIC"
8681	    SHLIB_LD='${CC} -G'
8682	    SHLIB_LD_LIBS=""
8683	    SHLIB_SUFFIX=".so"
8684	    DL_OBJS="tclLoadDl.o"
8685	    DL_LIBS="-ldl"
8686	    CC_SEARCH_FLAGS=""
8687	    LD_SEARCH_FLAGS=""
8688	    ;;
8689	MP-RAS-*)
8690	    SHLIB_CFLAGS="-K PIC"
8691	    SHLIB_LD='${CC} -G'
8692	    SHLIB_LD_LIBS=""
8693	    SHLIB_SUFFIX=".so"
8694	    DL_OBJS="tclLoadDl.o"
8695	    DL_LIBS="-ldl"
8696	    LDFLAGS="$LDFLAGS -Wl,-Bexport"
8697	    CC_SEARCH_FLAGS=""
8698	    LD_SEARCH_FLAGS=""
8699	    ;;
8700	NetBSD-1.*|FreeBSD-[1-2].*)
8701	    SHLIB_CFLAGS="-fPIC"
8702	    SHLIB_LD="ld -Bshareable -x"
8703	    SHLIB_LD_LIBS='${LIBS}'
8704	    SHLIB_SUFFIX=".so"
8705	    DL_OBJS="tclLoadDl.o"
8706	    DL_LIBS=""
8707	    if test $doRpath = yes; then
8708
8709		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8710		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8711fi
8712
8713	    { echo "$as_me:$LINENO: checking for ELF" >&5
8714echo $ECHO_N "checking for ELF... $ECHO_C" >&6; }
8715if test "${tcl_cv_ld_elf+set}" = set; then
8716  echo $ECHO_N "(cached) $ECHO_C" >&6
8717else
8718
8719		cat >conftest.$ac_ext <<_ACEOF
8720/* confdefs.h.  */
8721_ACEOF
8722cat confdefs.h >>conftest.$ac_ext
8723cat >>conftest.$ac_ext <<_ACEOF
8724/* end confdefs.h.  */
8725
8726#ifdef __ELF__
8727	yes
8728#endif
8729
8730_ACEOF
8731if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8732  $EGREP "yes" >/dev/null 2>&1; then
8733  tcl_cv_ld_elf=yes
8734else
8735  tcl_cv_ld_elf=no
8736fi
8737rm -f conftest*
8738
8739fi
8740{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
8741echo "${ECHO_T}$tcl_cv_ld_elf" >&6; }
8742	    if test $tcl_cv_ld_elf = yes; then
8743
8744		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
8745
8746else
8747
8748		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
8749
8750fi
8751
8752
8753	    # Ancient FreeBSD doesn't handle version numbers with dots.
8754
8755	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8756	    TCL_LIB_VERSIONS_OK=nodots
8757	    ;;
8758	OpenBSD-*)
8759	    SHLIB_CFLAGS="-fPIC"
8760	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8761	    SHLIB_LD_LIBS='${LIBS}'
8762	    SHLIB_SUFFIX=".so"
8763	    DL_OBJS="tclLoadDl.o"
8764	    DL_LIBS=""
8765	    if test $doRpath = yes; then
8766
8767		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8768fi
8769
8770	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8771	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
8772	    { echo "$as_me:$LINENO: checking for ELF" >&5
8773echo $ECHO_N "checking for ELF... $ECHO_C" >&6; }
8774if test "${tcl_cv_ld_elf+set}" = set; then
8775  echo $ECHO_N "(cached) $ECHO_C" >&6
8776else
8777
8778		cat >conftest.$ac_ext <<_ACEOF
8779/* confdefs.h.  */
8780_ACEOF
8781cat confdefs.h >>conftest.$ac_ext
8782cat >>conftest.$ac_ext <<_ACEOF
8783/* end confdefs.h.  */
8784
8785#ifdef __ELF__
8786	yes
8787#endif
8788
8789_ACEOF
8790if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8791  $EGREP "yes" >/dev/null 2>&1; then
8792  tcl_cv_ld_elf=yes
8793else
8794  tcl_cv_ld_elf=no
8795fi
8796rm -f conftest*
8797
8798fi
8799{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
8800echo "${ECHO_T}$tcl_cv_ld_elf" >&6; }
8801	    if test $tcl_cv_ld_elf = yes; then
8802
8803		LDFLAGS=-Wl,-export-dynamic
8804
8805else
8806  LDFLAGS=""
8807fi
8808
8809
8810	    # OpenBSD doesn't do version numbers with dots.
8811	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8812	    TCL_LIB_VERSIONS_OK=nodots
8813	    ;;
8814	NetBSD-*|FreeBSD-*|DragonFly-*)
8815	    # FreeBSD 3.* and greater have ELF.
8816	    # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
8817	    SHLIB_CFLAGS="-fPIC"
8818	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8819	    SHLIB_LD_LIBS='${LIBS}'
8820	    SHLIB_SUFFIX=".so"
8821	    DL_OBJS="tclLoadDl.o"
8822	    DL_LIBS=""
8823	    LDFLAGS="$LDFLAGS -export-dynamic"
8824	    if test $doRpath = yes; then
8825
8826		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8827fi
8828
8829	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8830	    if test "${TCL_THREADS}" = "1"; then
8831
8832		# The -pthread needs to go in the CFLAGS, not LIBS
8833		LIBS=`echo $LIBS | sed s/-pthread//`
8834		CFLAGS="$CFLAGS -pthread"
8835	    	LDFLAGS="$LDFLAGS -pthread"
8836
8837fi
8838
8839	    case $system in
8840	    FreeBSD-3.*)
8841	    	# FreeBSD-3 doesn't handle version numbers with dots.
8842	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8843	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
8844	    	TCL_LIB_VERSIONS_OK=nodots
8845		;;
8846	    esac
8847	    ;;
8848	Darwin-*)
8849	    CFLAGS_OPTIMIZE="-Os"
8850	    SHLIB_CFLAGS="-fno-common"
8851	    # To avoid discrepancies between what headers configure sees during
8852	    # preprocessing tests and compiling tests, move any -isysroot and
8853	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
8854	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
8855		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8856		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
8857	    CFLAGS="`echo " ${CFLAGS}" | \
8858		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8859		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
8860	    if test $do64bit = yes; then
8861
8862		case `arch` in
8863		    ppc)
8864			{ echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
8865echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; }
8866if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
8867  echo $ECHO_N "(cached) $ECHO_C" >&6
8868else
8869
8870			    hold_cflags=$CFLAGS
8871			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8872			    cat >conftest.$ac_ext <<_ACEOF
8873/* confdefs.h.  */
8874_ACEOF
8875cat confdefs.h >>conftest.$ac_ext
8876cat >>conftest.$ac_ext <<_ACEOF
8877/* end confdefs.h.  */
8878
8879int
8880main ()
8881{
8882
8883  ;
8884  return 0;
8885}
8886_ACEOF
8887rm -f conftest.$ac_objext conftest$ac_exeext
8888if { (ac_try="$ac_link"
8889case "(($ac_try" in
8890  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8891  *) ac_try_echo=$ac_try;;
8892esac
8893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8894  (eval "$ac_link") 2>conftest.er1
8895  ac_status=$?
8896  grep -v '^ *+' conftest.er1 >conftest.err
8897  rm -f conftest.er1
8898  cat conftest.err >&5
8899  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8900  (exit $ac_status); } && {
8901	 test -z "$ac_c_werror_flag" ||
8902	 test ! -s conftest.err
8903       } && test -s conftest$ac_exeext &&
8904       $as_test_x conftest$ac_exeext; then
8905  tcl_cv_cc_arch_ppc64=yes
8906else
8907  echo "$as_me: failed program was:" >&5
8908sed 's/^/| /' conftest.$ac_ext >&5
8909
8910	tcl_cv_cc_arch_ppc64=no
8911fi
8912
8913rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8914      conftest$ac_exeext conftest.$ac_ext
8915			    CFLAGS=$hold_cflags
8916fi
8917{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
8918echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; }
8919			if test $tcl_cv_cc_arch_ppc64 = yes; then
8920
8921			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8922			    do64bit_ok=yes
8923
8924fi
8925;;
8926		    i386)
8927			{ echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
8928echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; }
8929if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
8930  echo $ECHO_N "(cached) $ECHO_C" >&6
8931else
8932
8933			    hold_cflags=$CFLAGS
8934			    CFLAGS="$CFLAGS -arch x86_64"
8935			    cat >conftest.$ac_ext <<_ACEOF
8936/* confdefs.h.  */
8937_ACEOF
8938cat confdefs.h >>conftest.$ac_ext
8939cat >>conftest.$ac_ext <<_ACEOF
8940/* end confdefs.h.  */
8941
8942int
8943main ()
8944{
8945
8946  ;
8947  return 0;
8948}
8949_ACEOF
8950rm -f conftest.$ac_objext conftest$ac_exeext
8951if { (ac_try="$ac_link"
8952case "(($ac_try" in
8953  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8954  *) ac_try_echo=$ac_try;;
8955esac
8956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8957  (eval "$ac_link") 2>conftest.er1
8958  ac_status=$?
8959  grep -v '^ *+' conftest.er1 >conftest.err
8960  rm -f conftest.er1
8961  cat conftest.err >&5
8962  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8963  (exit $ac_status); } && {
8964	 test -z "$ac_c_werror_flag" ||
8965	 test ! -s conftest.err
8966       } && test -s conftest$ac_exeext &&
8967       $as_test_x conftest$ac_exeext; then
8968  tcl_cv_cc_arch_x86_64=yes
8969else
8970  echo "$as_me: failed program was:" >&5
8971sed 's/^/| /' conftest.$ac_ext >&5
8972
8973	tcl_cv_cc_arch_x86_64=no
8974fi
8975
8976rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8977      conftest$ac_exeext conftest.$ac_ext
8978			    CFLAGS=$hold_cflags
8979fi
8980{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
8981echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; }
8982			if test $tcl_cv_cc_arch_x86_64 = yes; then
8983
8984			    CFLAGS="$CFLAGS -arch x86_64"
8985			    do64bit_ok=yes
8986
8987fi
8988;;
8989		    *)
8990			{ echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
8991echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
8992		esac
8993
8994else
8995
8996		# Check for combined 32-bit and 64-bit fat build
8997		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
8998		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
8999
9000		    fat_32_64=yes
9001fi
9002
9003
9004fi
9005
9006	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9007	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
9008	    { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
9009echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; }
9010if test "${tcl_cv_ld_single_module+set}" = set; then
9011  echo $ECHO_N "(cached) $ECHO_C" >&6
9012else
9013
9014		hold_ldflags=$LDFLAGS
9015		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
9016		cat >conftest.$ac_ext <<_ACEOF
9017/* confdefs.h.  */
9018_ACEOF
9019cat confdefs.h >>conftest.$ac_ext
9020cat >>conftest.$ac_ext <<_ACEOF
9021/* end confdefs.h.  */
9022
9023int
9024main ()
9025{
9026int i;
9027  ;
9028  return 0;
9029}
9030_ACEOF
9031rm -f conftest.$ac_objext conftest$ac_exeext
9032if { (ac_try="$ac_link"
9033case "(($ac_try" in
9034  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9035  *) ac_try_echo=$ac_try;;
9036esac
9037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9038  (eval "$ac_link") 2>conftest.er1
9039  ac_status=$?
9040  grep -v '^ *+' conftest.er1 >conftest.err
9041  rm -f conftest.er1
9042  cat conftest.err >&5
9043  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9044  (exit $ac_status); } && {
9045	 test -z "$ac_c_werror_flag" ||
9046	 test ! -s conftest.err
9047       } && test -s conftest$ac_exeext &&
9048       $as_test_x conftest$ac_exeext; then
9049  tcl_cv_ld_single_module=yes
9050else
9051  echo "$as_me: failed program was:" >&5
9052sed 's/^/| /' conftest.$ac_ext >&5
9053
9054	tcl_cv_ld_single_module=no
9055fi
9056
9057rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9058      conftest$ac_exeext conftest.$ac_ext
9059		LDFLAGS=$hold_ldflags
9060fi
9061{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
9062echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; }
9063	    if test $tcl_cv_ld_single_module = yes; then
9064
9065		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
9066
9067fi
9068
9069	    SHLIB_LD_LIBS='${LIBS}'
9070	    SHLIB_SUFFIX=".dylib"
9071	    DL_OBJS="tclLoadDyld.o"
9072	    DL_LIBS=""
9073	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
9074	    if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
9075		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
9076
9077		LDFLAGS="$LDFLAGS -prebind"
9078fi
9079
9080	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
9081	    { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
9082echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; }
9083if test "${tcl_cv_ld_search_paths_first+set}" = set; then
9084  echo $ECHO_N "(cached) $ECHO_C" >&6
9085else
9086
9087		hold_ldflags=$LDFLAGS
9088		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9089		cat >conftest.$ac_ext <<_ACEOF
9090/* confdefs.h.  */
9091_ACEOF
9092cat confdefs.h >>conftest.$ac_ext
9093cat >>conftest.$ac_ext <<_ACEOF
9094/* end confdefs.h.  */
9095
9096int
9097main ()
9098{
9099int i;
9100  ;
9101  return 0;
9102}
9103_ACEOF
9104rm -f conftest.$ac_objext conftest$ac_exeext
9105if { (ac_try="$ac_link"
9106case "(($ac_try" in
9107  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9108  *) ac_try_echo=$ac_try;;
9109esac
9110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9111  (eval "$ac_link") 2>conftest.er1
9112  ac_status=$?
9113  grep -v '^ *+' conftest.er1 >conftest.err
9114  rm -f conftest.er1
9115  cat conftest.err >&5
9116  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9117  (exit $ac_status); } && {
9118	 test -z "$ac_c_werror_flag" ||
9119	 test ! -s conftest.err
9120       } && test -s conftest$ac_exeext &&
9121       $as_test_x conftest$ac_exeext; then
9122  tcl_cv_ld_search_paths_first=yes
9123else
9124  echo "$as_me: failed program was:" >&5
9125sed 's/^/| /' conftest.$ac_ext >&5
9126
9127	tcl_cv_ld_search_paths_first=no
9128fi
9129
9130rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9131      conftest$ac_exeext conftest.$ac_ext
9132		LDFLAGS=$hold_ldflags
9133fi
9134{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
9135echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; }
9136	    if test $tcl_cv_ld_search_paths_first = yes; then
9137
9138		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9139
9140fi
9141
9142	    if test "$tcl_cv_cc_visibility_hidden" != yes; then
9143
9144
9145cat >>confdefs.h <<\_ACEOF
9146#define MODULE_SCOPE __private_extern__
9147_ACEOF
9148
9149
9150fi
9151
9152	    CC_SEARCH_FLAGS=""
9153	    LD_SEARCH_FLAGS=""
9154	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
9155	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
9156	    # extensions, verify that 64-bit build is possible.
9157	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then
9158
9159		if test "${TEA_WINDOWINGSYSTEM}" = x11; then
9160
9161		    { echo "$as_me:$LINENO: checking for 64-bit X11" >&5
9162echo $ECHO_N "checking for 64-bit X11... $ECHO_C" >&6; }
9163if test "${tcl_cv_lib_x11_64+set}" = set; then
9164  echo $ECHO_N "(cached) $ECHO_C" >&6
9165else
9166
9167			for v in CFLAGS CPPFLAGS LDFLAGS; do
9168			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
9169			done
9170			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
9171			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
9172			cat >conftest.$ac_ext <<_ACEOF
9173/* confdefs.h.  */
9174_ACEOF
9175cat confdefs.h >>conftest.$ac_ext
9176cat >>conftest.$ac_ext <<_ACEOF
9177/* end confdefs.h.  */
9178#include <X11/Xlib.h>
9179int
9180main ()
9181{
9182XrmInitialize();
9183  ;
9184  return 0;
9185}
9186_ACEOF
9187rm -f conftest.$ac_objext conftest$ac_exeext
9188if { (ac_try="$ac_link"
9189case "(($ac_try" in
9190  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9191  *) ac_try_echo=$ac_try;;
9192esac
9193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9194  (eval "$ac_link") 2>conftest.er1
9195  ac_status=$?
9196  grep -v '^ *+' conftest.er1 >conftest.err
9197  rm -f conftest.er1
9198  cat conftest.err >&5
9199  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9200  (exit $ac_status); } && {
9201	 test -z "$ac_c_werror_flag" ||
9202	 test ! -s conftest.err
9203       } && test -s conftest$ac_exeext &&
9204       $as_test_x conftest$ac_exeext; then
9205  tcl_cv_lib_x11_64=yes
9206else
9207  echo "$as_me: failed program was:" >&5
9208sed 's/^/| /' conftest.$ac_ext >&5
9209
9210	tcl_cv_lib_x11_64=no
9211fi
9212
9213rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9214      conftest$ac_exeext conftest.$ac_ext
9215			for v in CFLAGS CPPFLAGS LDFLAGS; do
9216			    eval $v'="$hold_'$v'"'
9217			done
9218fi
9219{ echo "$as_me:$LINENO: result: $tcl_cv_lib_x11_64" >&5
9220echo "${ECHO_T}$tcl_cv_lib_x11_64" >&6; }
9221
9222fi
9223
9224		# remove 64-bit arch flags from CFLAGS et al. if configuration
9225		# does not support 64-bit.
9226		if test "${TEA_WINDOWINGSYSTEM}" = aqua -o "$tcl_cv_lib_x11_64" = no; then
9227
9228		    { echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
9229echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
9230		    for v in CFLAGS CPPFLAGS LDFLAGS; do
9231			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
9232		    done
9233fi
9234
9235
9236fi
9237
9238	    ;;
9239	NEXTSTEP-*)
9240	    SHLIB_CFLAGS=""
9241	    SHLIB_LD='${CC} -nostdlib -r'
9242	    SHLIB_LD_LIBS=""
9243	    SHLIB_SUFFIX=".so"
9244	    DL_OBJS="tclLoadNext.o"
9245	    DL_LIBS=""
9246	    CC_SEARCH_FLAGS=""
9247	    LD_SEARCH_FLAGS=""
9248	    ;;
9249	OS/390-*)
9250	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
9251
9252cat >>confdefs.h <<\_ACEOF
9253#define _OE_SOCKETS 1
9254_ACEOF
9255
9256	    ;;
9257	OSF1-1.0|OSF1-1.1|OSF1-1.2)
9258	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
9259	    SHLIB_CFLAGS=""
9260	    # Hack: make package name same as library name
9261	    SHLIB_LD='ld -R -export :'
9262	    SHLIB_LD_LIBS=""
9263	    SHLIB_SUFFIX=".so"
9264	    DL_OBJS="tclLoadOSF.o"
9265	    DL_LIBS=""
9266	    CC_SEARCH_FLAGS=""
9267	    LD_SEARCH_FLAGS=""
9268	    ;;
9269	OSF1-1.*)
9270	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
9271	    SHLIB_CFLAGS="-fPIC"
9272	    if test "$SHARED_BUILD" = 1; then
9273  SHLIB_LD="ld -shared"
9274else
9275
9276	        SHLIB_LD="ld -non_shared"
9277
9278fi
9279
9280	    SHLIB_LD_LIBS=""
9281	    SHLIB_SUFFIX=".so"
9282	    DL_OBJS="tclLoadDl.o"
9283	    DL_LIBS=""
9284	    CC_SEARCH_FLAGS=""
9285	    LD_SEARCH_FLAGS=""
9286	    ;;
9287	OSF1-V*)
9288	    # Digital OSF/1
9289	    SHLIB_CFLAGS=""
9290	    if test "$SHARED_BUILD" = 1; then
9291
9292	        SHLIB_LD='ld -shared -expect_unresolved "*"'
9293
9294else
9295
9296	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
9297
9298fi
9299
9300	    SHLIB_LD_LIBS=""
9301	    SHLIB_SUFFIX=".so"
9302	    DL_OBJS="tclLoadDl.o"
9303	    DL_LIBS=""
9304	    if test $doRpath = yes; then
9305
9306		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9307		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9308fi
9309
9310	    if test "$GCC" = yes; then
9311  CFLAGS="$CFLAGS -mieee"
9312else
9313
9314		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
9315fi
9316
9317	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
9318	    if test "${TCL_THREADS}" = 1; then
9319
9320		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
9321		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
9322		LIBS=`echo $LIBS | sed s/-lpthreads//`
9323		if test "$GCC" = yes; then
9324
9325		    LIBS="$LIBS -lpthread -lmach -lexc"
9326
9327else
9328
9329		    CFLAGS="$CFLAGS -pthread"
9330		    LDFLAGS="$LDFLAGS -pthread"
9331
9332fi
9333
9334
9335fi
9336
9337	    ;;
9338	QNX-6*)
9339	    # QNX RTP
9340	    # This may work for all QNX, but it was only reported for v6.
9341	    SHLIB_CFLAGS="-fPIC"
9342	    SHLIB_LD="ld -Bshareable -x"
9343	    SHLIB_LD_LIBS=""
9344	    SHLIB_SUFFIX=".so"
9345	    DL_OBJS="tclLoadDl.o"
9346	    # dlopen is in -lc on QNX
9347	    DL_LIBS=""
9348	    CC_SEARCH_FLAGS=""
9349	    LD_SEARCH_FLAGS=""
9350	    ;;
9351	SCO_SV-3.2*)
9352	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
9353	    # this test works, since "uname -s" was non-standard in 3.2.4 and
9354	    # below.
9355	    if test "$GCC" = yes; then
9356
9357	    	SHLIB_CFLAGS="-fPIC -melf"
9358	    	LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
9359
9360else
9361
9362	    	SHLIB_CFLAGS="-Kpic -belf"
9363	    	LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
9364
9365fi
9366
9367	    SHLIB_LD="ld -G"
9368	    SHLIB_LD_LIBS=""
9369	    SHLIB_SUFFIX=".so"
9370	    DL_OBJS="tclLoadDl.o"
9371	    DL_LIBS=""
9372	    CC_SEARCH_FLAGS=""
9373	    LD_SEARCH_FLAGS=""
9374	    ;;
9375	SINIX*5.4*)
9376	    SHLIB_CFLAGS="-K PIC"
9377	    SHLIB_LD='${CC} -G'
9378	    SHLIB_LD_LIBS=""
9379	    SHLIB_SUFFIX=".so"
9380	    DL_OBJS="tclLoadDl.o"
9381	    DL_LIBS="-ldl"
9382	    CC_SEARCH_FLAGS=""
9383	    LD_SEARCH_FLAGS=""
9384	    ;;
9385	SunOS-4*)
9386	    SHLIB_CFLAGS="-PIC"
9387	    SHLIB_LD="ld"
9388	    SHLIB_LD_LIBS=""
9389	    SHLIB_SUFFIX=".so"
9390	    DL_OBJS="tclLoadDl.o"
9391	    DL_LIBS="-ldl"
9392	    CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
9393	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9394
9395	    # SunOS can't handle version numbers with dots in them in library
9396	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
9397	    # requires an extra version number at the end of .so file names.
9398	    # So, the library has to have a name like libtcl75.so.1.0
9399
9400	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
9401	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9402	    TCL_LIB_VERSIONS_OK=nodots
9403	    ;;
9404	SunOS-5.[0-6])
9405	    # Careful to not let 5.10+ fall into this case
9406
9407	    # Note: If _REENTRANT isn't defined, then Solaris
9408	    # won't define thread-safe library routines.
9409
9410
9411cat >>confdefs.h <<\_ACEOF
9412#define _REENTRANT 1
9413_ACEOF
9414
9415
9416cat >>confdefs.h <<\_ACEOF
9417#define _POSIX_PTHREAD_SEMANTICS 1
9418_ACEOF
9419
9420
9421	    SHLIB_CFLAGS="-KPIC"
9422
9423	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
9424	    # symbols when dynamically loaded into tclsh.
9425
9426	    SHLIB_LD_LIBS='${LIBS}'
9427	    SHLIB_SUFFIX=".so"
9428	    DL_OBJS="tclLoadDl.o"
9429	    DL_LIBS="-ldl"
9430	    if test "$GCC" = yes; then
9431
9432		SHLIB_LD='${CC} -shared'
9433		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9434		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9435
9436else
9437
9438		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
9439		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9440		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9441
9442fi
9443
9444	    ;;
9445	SunOS-5*)
9446	    # Note: If _REENTRANT isn't defined, then Solaris
9447	    # won't define thread-safe library routines.
9448
9449
9450cat >>confdefs.h <<\_ACEOF
9451#define _REENTRANT 1
9452_ACEOF
9453
9454
9455cat >>confdefs.h <<\_ACEOF
9456#define _POSIX_PTHREAD_SEMANTICS 1
9457_ACEOF
9458
9459
9460	    SHLIB_CFLAGS="-KPIC"
9461
9462	    # Check to enable 64-bit flags for compiler/linker
9463	    if test "$do64bit" = yes; then
9464
9465		arch=`isainfo`
9466		if test "$arch" = "sparcv9 sparc"; then
9467
9468		    if test "$GCC" = yes; then
9469
9470			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
9471
9472			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
9473echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
9474
9475else
9476
9477			    do64bit_ok=yes
9478			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
9479			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
9480			    SHLIB_CFLAGS="-fPIC"
9481
9482fi
9483
9484
9485else
9486
9487			do64bit_ok=yes
9488			if test "$do64bitVIS" = yes; then
9489
9490			    CFLAGS="$CFLAGS -xarch=v9a"
9491			    LDFLAGS_ARCH="-xarch=v9a"
9492
9493else
9494
9495			    CFLAGS="$CFLAGS -xarch=v9"
9496			    LDFLAGS_ARCH="-xarch=v9"
9497
9498fi
9499
9500			# Solaris 64 uses this as well
9501			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
9502
9503fi
9504
9505
9506else
9507  if test "$arch" = "amd64 i386"; then
9508
9509		    if test "$GCC" = yes; then
9510
9511			{ echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
9512echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
9513
9514else
9515
9516			do64bit_ok=yes
9517			CFLAGS="$CFLAGS -xarch=amd64"
9518			LDFLAGS="$LDFLAGS -xarch=amd64"
9519
9520fi
9521
9522
9523else
9524  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
9525echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
9526fi
9527
9528fi
9529
9530
9531fi
9532
9533
9534	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
9535	    # symbols when dynamically loaded into tclsh.
9536
9537	    SHLIB_LD_LIBS='${LIBS}'
9538	    SHLIB_SUFFIX=".so"
9539	    DL_OBJS="tclLoadDl.o"
9540	    DL_LIBS="-ldl"
9541	    if test "$GCC" = yes; then
9542
9543		SHLIB_LD='${CC} -shared'
9544		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9545		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9546		if test "$do64bit_ok" = yes; then
9547
9548		    # We need to specify -static-libgcc or we need to
9549		    # add the path to the sparv9 libgcc.
9550		    # JH: static-libgcc is necessary for core Tcl, but may
9551		    # not be necessary for extensions.
9552		    SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
9553		    # for finding sparcv9 libgcc, get the regular libgcc
9554		    # path, remove so name and append 'sparcv9'
9555		    #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
9556		    #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
9557
9558fi
9559
9560
9561else
9562
9563		case $system in
9564		    SunOS-5.[1-9][0-9]*)
9565			SHLIB_LD='${CC} -G -z text';;
9566		    *)
9567			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
9568		esac
9569		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9570		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9571
9572fi
9573
9574	    ;;
9575	UNIX_SV* | UnixWare-5*)
9576	    SHLIB_CFLAGS="-KPIC"
9577	    SHLIB_LD='${CC} -G'
9578	    SHLIB_LD_LIBS=""
9579	    SHLIB_SUFFIX=".so"
9580	    DL_OBJS="tclLoadDl.o"
9581	    DL_LIBS="-ldl"
9582	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
9583	    # that don't grok the -Bexport option.  Test that it does.
9584	    { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
9585echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; }
9586if test "${tcl_cv_ld_Bexport+set}" = set; then
9587  echo $ECHO_N "(cached) $ECHO_C" >&6
9588else
9589
9590		hold_ldflags=$LDFLAGS
9591		LDFLAGS="$LDFLAGS -Wl,-Bexport"
9592		cat >conftest.$ac_ext <<_ACEOF
9593/* confdefs.h.  */
9594_ACEOF
9595cat confdefs.h >>conftest.$ac_ext
9596cat >>conftest.$ac_ext <<_ACEOF
9597/* end confdefs.h.  */
9598
9599int
9600main ()
9601{
9602int i;
9603  ;
9604  return 0;
9605}
9606_ACEOF
9607rm -f conftest.$ac_objext conftest$ac_exeext
9608if { (ac_try="$ac_link"
9609case "(($ac_try" in
9610  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9611  *) ac_try_echo=$ac_try;;
9612esac
9613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9614  (eval "$ac_link") 2>conftest.er1
9615  ac_status=$?
9616  grep -v '^ *+' conftest.er1 >conftest.err
9617  rm -f conftest.er1
9618  cat conftest.err >&5
9619  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9620  (exit $ac_status); } && {
9621	 test -z "$ac_c_werror_flag" ||
9622	 test ! -s conftest.err
9623       } && test -s conftest$ac_exeext &&
9624       $as_test_x conftest$ac_exeext; then
9625  tcl_cv_ld_Bexport=yes
9626else
9627  echo "$as_me: failed program was:" >&5
9628sed 's/^/| /' conftest.$ac_ext >&5
9629
9630	tcl_cv_ld_Bexport=no
9631fi
9632
9633rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9634      conftest$ac_exeext conftest.$ac_ext
9635	        LDFLAGS=$hold_ldflags
9636fi
9637{ echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5
9638echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; }
9639	    if test $tcl_cv_ld_Bexport = yes; then
9640
9641		LDFLAGS="$LDFLAGS -Wl,-Bexport"
9642
9643fi
9644
9645	    CC_SEARCH_FLAGS=""
9646	    LD_SEARCH_FLAGS=""
9647	    ;;
9648    esac
9649
9650    if test "$do64bit" = yes -a "$do64bit_ok" = no; then
9651
9652	{ echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
9653echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
9654
9655fi
9656
9657
9658
9659
9660    # Step 4: disable dynamic loading if requested via a command-line switch.
9661
9662    # Check whether --enable-load was given.
9663if test "${enable_load+set}" = set; then
9664  enableval=$enable_load; tcl_ok=$enableval
9665else
9666  tcl_ok=yes
9667fi
9668
9669    if test "$tcl_ok" = no; then
9670  DL_OBJS=""
9671fi
9672
9673
9674    if test "x$DL_OBJS" != x; then
9675  BUILD_DLTEST="\$(DLTEST_TARGETS)"
9676else
9677
9678	{ echo "$as_me:$LINENO: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5
9679echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;}
9680	SHLIB_CFLAGS=""
9681	SHLIB_LD=""
9682	SHLIB_SUFFIX=""
9683	DL_OBJS="tclLoadNone.o"
9684	DL_LIBS=""
9685	LDFLAGS="$LDFLAGS_ORIG"
9686	CC_SEARCH_FLAGS=""
9687	LD_SEARCH_FLAGS=""
9688	BUILD_DLTEST=""
9689
9690fi
9691
9692    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
9693
9694    # If we're running gcc, then change the C flags for compiling shared
9695    # libraries to the right flags for gcc, instead of those for the
9696    # standard manufacturer compiler.
9697
9698    if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then
9699
9700	case $system in
9701	    AIX-*) ;;
9702	    BSD/OS*) ;;
9703	    IRIX*) ;;
9704	    NetBSD-*|FreeBSD-*|DragonFly-*) ;;
9705	    Darwin-*) ;;
9706	    SCO_SV-3.2*) ;;
9707	    *) SHLIB_CFLAGS="-fPIC" ;;
9708	esac
9709fi
9710
9711
9712    if test "$SHARED_LIB_SUFFIX" = ""; then
9713
9714	# TEA specific: use PACKAGE_VERSION instead of VERSION
9715	SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
9716fi
9717
9718    if test "$UNSHARED_LIB_SUFFIX" = ""; then
9719
9720	# TEA specific: use PACKAGE_VERSION instead of VERSION
9721	UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
9722fi
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739    # These must be called after we do the basic CFLAGS checks and
9740    # verify any possible 64-bit or similar switches are necessary
9741
9742    { echo "$as_me:$LINENO: checking for required early compiler flags" >&5
9743echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; }
9744    tcl_flags=""
9745
9746    if test "${tcl_cv_flag__isoc99_source+set}" = set; then
9747  echo $ECHO_N "(cached) $ECHO_C" >&6
9748else
9749  cat >conftest.$ac_ext <<_ACEOF
9750/* confdefs.h.  */
9751_ACEOF
9752cat confdefs.h >>conftest.$ac_ext
9753cat >>conftest.$ac_ext <<_ACEOF
9754/* end confdefs.h.  */
9755#include <stdlib.h>
9756int
9757main ()
9758{
9759char *p = (char *)strtoll; char *q = (char *)strtoull;
9760  ;
9761  return 0;
9762}
9763_ACEOF
9764rm -f conftest.$ac_objext
9765if { (ac_try="$ac_compile"
9766case "(($ac_try" in
9767  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9768  *) ac_try_echo=$ac_try;;
9769esac
9770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9771  (eval "$ac_compile") 2>conftest.er1
9772  ac_status=$?
9773  grep -v '^ *+' conftest.er1 >conftest.err
9774  rm -f conftest.er1
9775  cat conftest.err >&5
9776  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9777  (exit $ac_status); } && {
9778	 test -z "$ac_c_werror_flag" ||
9779	 test ! -s conftest.err
9780       } && test -s conftest.$ac_objext; then
9781  tcl_cv_flag__isoc99_source=no
9782else
9783  echo "$as_me: failed program was:" >&5
9784sed 's/^/| /' conftest.$ac_ext >&5
9785
9786	cat >conftest.$ac_ext <<_ACEOF
9787/* confdefs.h.  */
9788_ACEOF
9789cat confdefs.h >>conftest.$ac_ext
9790cat >>conftest.$ac_ext <<_ACEOF
9791/* end confdefs.h.  */
9792#define _ISOC99_SOURCE 1
9793#include <stdlib.h>
9794int
9795main ()
9796{
9797char *p = (char *)strtoll; char *q = (char *)strtoull;
9798  ;
9799  return 0;
9800}
9801_ACEOF
9802rm -f conftest.$ac_objext
9803if { (ac_try="$ac_compile"
9804case "(($ac_try" in
9805  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9806  *) ac_try_echo=$ac_try;;
9807esac
9808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9809  (eval "$ac_compile") 2>conftest.er1
9810  ac_status=$?
9811  grep -v '^ *+' conftest.er1 >conftest.err
9812  rm -f conftest.er1
9813  cat conftest.err >&5
9814  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9815  (exit $ac_status); } && {
9816	 test -z "$ac_c_werror_flag" ||
9817	 test ! -s conftest.err
9818       } && test -s conftest.$ac_objext; then
9819  tcl_cv_flag__isoc99_source=yes
9820else
9821  echo "$as_me: failed program was:" >&5
9822sed 's/^/| /' conftest.$ac_ext >&5
9823
9824	tcl_cv_flag__isoc99_source=no
9825fi
9826
9827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9828fi
9829
9830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9831fi
9832
9833    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
9834
9835cat >>confdefs.h <<\_ACEOF
9836#define _ISOC99_SOURCE 1
9837_ACEOF
9838
9839	tcl_flags="$tcl_flags _ISOC99_SOURCE"
9840    fi
9841
9842
9843    if test "${tcl_cv_flag__largefile64_source+set}" = set; then
9844  echo $ECHO_N "(cached) $ECHO_C" >&6
9845else
9846  cat >conftest.$ac_ext <<_ACEOF
9847/* confdefs.h.  */
9848_ACEOF
9849cat confdefs.h >>conftest.$ac_ext
9850cat >>conftest.$ac_ext <<_ACEOF
9851/* end confdefs.h.  */
9852#include <sys/stat.h>
9853int
9854main ()
9855{
9856struct stat64 buf; int i = stat64("/", &buf);
9857  ;
9858  return 0;
9859}
9860_ACEOF
9861rm -f conftest.$ac_objext
9862if { (ac_try="$ac_compile"
9863case "(($ac_try" in
9864  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9865  *) ac_try_echo=$ac_try;;
9866esac
9867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9868  (eval "$ac_compile") 2>conftest.er1
9869  ac_status=$?
9870  grep -v '^ *+' conftest.er1 >conftest.err
9871  rm -f conftest.er1
9872  cat conftest.err >&5
9873  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9874  (exit $ac_status); } && {
9875	 test -z "$ac_c_werror_flag" ||
9876	 test ! -s conftest.err
9877       } && test -s conftest.$ac_objext; then
9878  tcl_cv_flag__largefile64_source=no
9879else
9880  echo "$as_me: failed program was:" >&5
9881sed 's/^/| /' conftest.$ac_ext >&5
9882
9883	cat >conftest.$ac_ext <<_ACEOF
9884/* confdefs.h.  */
9885_ACEOF
9886cat confdefs.h >>conftest.$ac_ext
9887cat >>conftest.$ac_ext <<_ACEOF
9888/* end confdefs.h.  */
9889#define _LARGEFILE64_SOURCE 1
9890#include <sys/stat.h>
9891int
9892main ()
9893{
9894struct stat64 buf; int i = stat64("/", &buf);
9895  ;
9896  return 0;
9897}
9898_ACEOF
9899rm -f conftest.$ac_objext
9900if { (ac_try="$ac_compile"
9901case "(($ac_try" in
9902  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9903  *) ac_try_echo=$ac_try;;
9904esac
9905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9906  (eval "$ac_compile") 2>conftest.er1
9907  ac_status=$?
9908  grep -v '^ *+' conftest.er1 >conftest.err
9909  rm -f conftest.er1
9910  cat conftest.err >&5
9911  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9912  (exit $ac_status); } && {
9913	 test -z "$ac_c_werror_flag" ||
9914	 test ! -s conftest.err
9915       } && test -s conftest.$ac_objext; then
9916  tcl_cv_flag__largefile64_source=yes
9917else
9918  echo "$as_me: failed program was:" >&5
9919sed 's/^/| /' conftest.$ac_ext >&5
9920
9921	tcl_cv_flag__largefile64_source=no
9922fi
9923
9924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9925fi
9926
9927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9928fi
9929
9930    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
9931
9932cat >>confdefs.h <<\_ACEOF
9933#define _LARGEFILE64_SOURCE 1
9934_ACEOF
9935
9936	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
9937    fi
9938
9939
9940    if test "${tcl_cv_flag__largefile_source64+set}" = set; then
9941  echo $ECHO_N "(cached) $ECHO_C" >&6
9942else
9943  cat >conftest.$ac_ext <<_ACEOF
9944/* confdefs.h.  */
9945_ACEOF
9946cat confdefs.h >>conftest.$ac_ext
9947cat >>conftest.$ac_ext <<_ACEOF
9948/* end confdefs.h.  */
9949#include <sys/stat.h>
9950int
9951main ()
9952{
9953char *p = (char *)open64;
9954  ;
9955  return 0;
9956}
9957_ACEOF
9958rm -f conftest.$ac_objext
9959if { (ac_try="$ac_compile"
9960case "(($ac_try" in
9961  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9962  *) ac_try_echo=$ac_try;;
9963esac
9964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9965  (eval "$ac_compile") 2>conftest.er1
9966  ac_status=$?
9967  grep -v '^ *+' conftest.er1 >conftest.err
9968  rm -f conftest.er1
9969  cat conftest.err >&5
9970  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9971  (exit $ac_status); } && {
9972	 test -z "$ac_c_werror_flag" ||
9973	 test ! -s conftest.err
9974       } && test -s conftest.$ac_objext; then
9975  tcl_cv_flag__largefile_source64=no
9976else
9977  echo "$as_me: failed program was:" >&5
9978sed 's/^/| /' conftest.$ac_ext >&5
9979
9980	cat >conftest.$ac_ext <<_ACEOF
9981/* confdefs.h.  */
9982_ACEOF
9983cat confdefs.h >>conftest.$ac_ext
9984cat >>conftest.$ac_ext <<_ACEOF
9985/* end confdefs.h.  */
9986#define _LARGEFILE_SOURCE64 1
9987#include <sys/stat.h>
9988int
9989main ()
9990{
9991char *p = (char *)open64;
9992  ;
9993  return 0;
9994}
9995_ACEOF
9996rm -f conftest.$ac_objext
9997if { (ac_try="$ac_compile"
9998case "(($ac_try" in
9999  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10000  *) ac_try_echo=$ac_try;;
10001esac
10002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10003  (eval "$ac_compile") 2>conftest.er1
10004  ac_status=$?
10005  grep -v '^ *+' conftest.er1 >conftest.err
10006  rm -f conftest.er1
10007  cat conftest.err >&5
10008  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10009  (exit $ac_status); } && {
10010	 test -z "$ac_c_werror_flag" ||
10011	 test ! -s conftest.err
10012       } && test -s conftest.$ac_objext; then
10013  tcl_cv_flag__largefile_source64=yes
10014else
10015  echo "$as_me: failed program was:" >&5
10016sed 's/^/| /' conftest.$ac_ext >&5
10017
10018	tcl_cv_flag__largefile_source64=no
10019fi
10020
10021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10022fi
10023
10024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10025fi
10026
10027    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
10028
10029cat >>confdefs.h <<\_ACEOF
10030#define _LARGEFILE_SOURCE64 1
10031_ACEOF
10032
10033	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
10034    fi
10035
10036    if test "x${tcl_flags}" = "x" ; then
10037	{ echo "$as_me:$LINENO: result: none" >&5
10038echo "${ECHO_T}none" >&6; }
10039    else
10040	{ echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
10041echo "${ECHO_T}${tcl_flags}" >&6; }
10042    fi
10043
10044
10045    { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
10046echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; }
10047    if test "${tcl_cv_type_64bit+set}" = set; then
10048  echo $ECHO_N "(cached) $ECHO_C" >&6
10049else
10050
10051	tcl_cv_type_64bit=none
10052	# See if the compiler knows natively about __int64
10053	cat >conftest.$ac_ext <<_ACEOF
10054/* confdefs.h.  */
10055_ACEOF
10056cat confdefs.h >>conftest.$ac_ext
10057cat >>conftest.$ac_ext <<_ACEOF
10058/* end confdefs.h.  */
10059
10060int
10061main ()
10062{
10063__int64 value = (__int64) 0;
10064  ;
10065  return 0;
10066}
10067_ACEOF
10068rm -f conftest.$ac_objext
10069if { (ac_try="$ac_compile"
10070case "(($ac_try" in
10071  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10072  *) ac_try_echo=$ac_try;;
10073esac
10074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10075  (eval "$ac_compile") 2>conftest.er1
10076  ac_status=$?
10077  grep -v '^ *+' conftest.er1 >conftest.err
10078  rm -f conftest.er1
10079  cat conftest.err >&5
10080  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10081  (exit $ac_status); } && {
10082	 test -z "$ac_c_werror_flag" ||
10083	 test ! -s conftest.err
10084       } && test -s conftest.$ac_objext; then
10085  tcl_type_64bit=__int64
10086else
10087  echo "$as_me: failed program was:" >&5
10088sed 's/^/| /' conftest.$ac_ext >&5
10089
10090	tcl_type_64bit="long long"
10091fi
10092
10093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10094	# See if we should use long anyway  Note that we substitute in the
10095	# type that is our current guess for a 64-bit type inside this check
10096	# program, so it should be modified only carefully...
10097        cat >conftest.$ac_ext <<_ACEOF
10098/* confdefs.h.  */
10099_ACEOF
10100cat confdefs.h >>conftest.$ac_ext
10101cat >>conftest.$ac_ext <<_ACEOF
10102/* end confdefs.h.  */
10103
10104int
10105main ()
10106{
10107switch (0) {
10108            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
10109        }
10110  ;
10111  return 0;
10112}
10113_ACEOF
10114rm -f conftest.$ac_objext
10115if { (ac_try="$ac_compile"
10116case "(($ac_try" in
10117  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10118  *) ac_try_echo=$ac_try;;
10119esac
10120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10121  (eval "$ac_compile") 2>conftest.er1
10122  ac_status=$?
10123  grep -v '^ *+' conftest.er1 >conftest.err
10124  rm -f conftest.er1
10125  cat conftest.err >&5
10126  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10127  (exit $ac_status); } && {
10128	 test -z "$ac_c_werror_flag" ||
10129	 test ! -s conftest.err
10130       } && test -s conftest.$ac_objext; then
10131  tcl_cv_type_64bit=${tcl_type_64bit}
10132else
10133  echo "$as_me: failed program was:" >&5
10134sed 's/^/| /' conftest.$ac_ext >&5
10135
10136
10137fi
10138
10139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10140fi
10141
10142    if test "${tcl_cv_type_64bit}" = none ; then
10143
10144cat >>confdefs.h <<\_ACEOF
10145#define TCL_WIDE_INT_IS_LONG 1
10146_ACEOF
10147
10148	{ echo "$as_me:$LINENO: result: using long" >&5
10149echo "${ECHO_T}using long" >&6; }
10150    elif test "${tcl_cv_type_64bit}" = "__int64" \
10151		-a "${TEA_PLATFORM}" = "windows" ; then
10152	# TEA specific: We actually want to use the default tcl.h checks in
10153	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
10154	{ echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
10155echo "${ECHO_T}using Tcl header defaults" >&6; }
10156    else
10157
10158cat >>confdefs.h <<_ACEOF
10159#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
10160_ACEOF
10161
10162	{ echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
10163echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; }
10164
10165	# Now check for auxiliary declarations
10166	{ echo "$as_me:$LINENO: checking for struct dirent64" >&5
10167echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; }
10168if test "${tcl_cv_struct_dirent64+set}" = set; then
10169  echo $ECHO_N "(cached) $ECHO_C" >&6
10170else
10171
10172	    cat >conftest.$ac_ext <<_ACEOF
10173/* confdefs.h.  */
10174_ACEOF
10175cat confdefs.h >>conftest.$ac_ext
10176cat >>conftest.$ac_ext <<_ACEOF
10177/* end confdefs.h.  */
10178#include <sys/types.h>
10179#include <sys/dirent.h>
10180int
10181main ()
10182{
10183struct dirent64 p;
10184  ;
10185  return 0;
10186}
10187_ACEOF
10188rm -f conftest.$ac_objext
10189if { (ac_try="$ac_compile"
10190case "(($ac_try" in
10191  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10192  *) ac_try_echo=$ac_try;;
10193esac
10194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10195  (eval "$ac_compile") 2>conftest.er1
10196  ac_status=$?
10197  grep -v '^ *+' conftest.er1 >conftest.err
10198  rm -f conftest.er1
10199  cat conftest.err >&5
10200  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10201  (exit $ac_status); } && {
10202	 test -z "$ac_c_werror_flag" ||
10203	 test ! -s conftest.err
10204       } && test -s conftest.$ac_objext; then
10205  tcl_cv_struct_dirent64=yes
10206else
10207  echo "$as_me: failed program was:" >&5
10208sed 's/^/| /' conftest.$ac_ext >&5
10209
10210	tcl_cv_struct_dirent64=no
10211fi
10212
10213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10214fi
10215{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
10216echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; }
10217	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
10218
10219cat >>confdefs.h <<\_ACEOF
10220#define HAVE_STRUCT_DIRENT64 1
10221_ACEOF
10222
10223	fi
10224
10225	{ echo "$as_me:$LINENO: checking for struct stat64" >&5
10226echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; }
10227if test "${tcl_cv_struct_stat64+set}" = set; then
10228  echo $ECHO_N "(cached) $ECHO_C" >&6
10229else
10230
10231	    cat >conftest.$ac_ext <<_ACEOF
10232/* confdefs.h.  */
10233_ACEOF
10234cat confdefs.h >>conftest.$ac_ext
10235cat >>conftest.$ac_ext <<_ACEOF
10236/* end confdefs.h.  */
10237#include <sys/stat.h>
10238int
10239main ()
10240{
10241struct stat64 p;
10242
10243  ;
10244  return 0;
10245}
10246_ACEOF
10247rm -f conftest.$ac_objext
10248if { (ac_try="$ac_compile"
10249case "(($ac_try" in
10250  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10251  *) ac_try_echo=$ac_try;;
10252esac
10253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10254  (eval "$ac_compile") 2>conftest.er1
10255  ac_status=$?
10256  grep -v '^ *+' conftest.er1 >conftest.err
10257  rm -f conftest.er1
10258  cat conftest.err >&5
10259  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10260  (exit $ac_status); } && {
10261	 test -z "$ac_c_werror_flag" ||
10262	 test ! -s conftest.err
10263       } && test -s conftest.$ac_objext; then
10264  tcl_cv_struct_stat64=yes
10265else
10266  echo "$as_me: failed program was:" >&5
10267sed 's/^/| /' conftest.$ac_ext >&5
10268
10269	tcl_cv_struct_stat64=no
10270fi
10271
10272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10273fi
10274{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
10275echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; }
10276	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
10277
10278cat >>confdefs.h <<\_ACEOF
10279#define HAVE_STRUCT_STAT64 1
10280_ACEOF
10281
10282	fi
10283
10284
10285
10286for ac_func in open64 lseek64
10287do
10288as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10289{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10290echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10291if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10292  echo $ECHO_N "(cached) $ECHO_C" >&6
10293else
10294  cat >conftest.$ac_ext <<_ACEOF
10295/* confdefs.h.  */
10296_ACEOF
10297cat confdefs.h >>conftest.$ac_ext
10298cat >>conftest.$ac_ext <<_ACEOF
10299/* end confdefs.h.  */
10300/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10301   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10302#define $ac_func innocuous_$ac_func
10303
10304/* System header to define __stub macros and hopefully few prototypes,
10305    which can conflict with char $ac_func (); below.
10306    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10307    <limits.h> exists even on freestanding compilers.  */
10308
10309#ifdef __STDC__
10310# include <limits.h>
10311#else
10312# include <assert.h>
10313#endif
10314
10315#undef $ac_func
10316
10317/* Override any GCC internal prototype to avoid an error.
10318   Use char because int might match the return type of a GCC
10319   builtin and then its argument prototype would still apply.  */
10320#ifdef __cplusplus
10321extern "C"
10322#endif
10323char $ac_func ();
10324/* The GNU C library defines this for functions which it implements
10325    to always fail with ENOSYS.  Some functions are actually named
10326    something starting with __ and the normal name is an alias.  */
10327#if defined __stub_$ac_func || defined __stub___$ac_func
10328choke me
10329#endif
10330
10331int
10332main ()
10333{
10334return $ac_func ();
10335  ;
10336  return 0;
10337}
10338_ACEOF
10339rm -f conftest.$ac_objext conftest$ac_exeext
10340if { (ac_try="$ac_link"
10341case "(($ac_try" in
10342  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10343  *) ac_try_echo=$ac_try;;
10344esac
10345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10346  (eval "$ac_link") 2>conftest.er1
10347  ac_status=$?
10348  grep -v '^ *+' conftest.er1 >conftest.err
10349  rm -f conftest.er1
10350  cat conftest.err >&5
10351  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10352  (exit $ac_status); } && {
10353	 test -z "$ac_c_werror_flag" ||
10354	 test ! -s conftest.err
10355       } && test -s conftest$ac_exeext &&
10356       $as_test_x conftest$ac_exeext; then
10357  eval "$as_ac_var=yes"
10358else
10359  echo "$as_me: failed program was:" >&5
10360sed 's/^/| /' conftest.$ac_ext >&5
10361
10362	eval "$as_ac_var=no"
10363fi
10364
10365rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10366      conftest$ac_exeext conftest.$ac_ext
10367fi
10368ac_res=`eval echo '${'$as_ac_var'}'`
10369	       { echo "$as_me:$LINENO: result: $ac_res" >&5
10370echo "${ECHO_T}$ac_res" >&6; }
10371if test `eval echo '${'$as_ac_var'}'` = yes; then
10372  cat >>confdefs.h <<_ACEOF
10373#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10374_ACEOF
10375
10376fi
10377done
10378
10379	{ echo "$as_me:$LINENO: checking for off64_t" >&5
10380echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; }
10381	if test "${tcl_cv_type_off64_t+set}" = set; then
10382  echo $ECHO_N "(cached) $ECHO_C" >&6
10383else
10384
10385	    cat >conftest.$ac_ext <<_ACEOF
10386/* confdefs.h.  */
10387_ACEOF
10388cat confdefs.h >>conftest.$ac_ext
10389cat >>conftest.$ac_ext <<_ACEOF
10390/* end confdefs.h.  */
10391#include <sys/types.h>
10392int
10393main ()
10394{
10395off64_t offset;
10396
10397  ;
10398  return 0;
10399}
10400_ACEOF
10401rm -f conftest.$ac_objext
10402if { (ac_try="$ac_compile"
10403case "(($ac_try" in
10404  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10405  *) ac_try_echo=$ac_try;;
10406esac
10407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10408  (eval "$ac_compile") 2>conftest.er1
10409  ac_status=$?
10410  grep -v '^ *+' conftest.er1 >conftest.err
10411  rm -f conftest.er1
10412  cat conftest.err >&5
10413  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10414  (exit $ac_status); } && {
10415	 test -z "$ac_c_werror_flag" ||
10416	 test ! -s conftest.err
10417       } && test -s conftest.$ac_objext; then
10418  tcl_cv_type_off64_t=yes
10419else
10420  echo "$as_me: failed program was:" >&5
10421sed 's/^/| /' conftest.$ac_ext >&5
10422
10423	tcl_cv_type_off64_t=no
10424fi
10425
10426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10427fi
10428
10429			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
10430	        test "x${ac_cv_func_lseek64}" = "xyes" && \
10431	        test "x${ac_cv_func_open64}" = "xyes" ; then
10432
10433cat >>confdefs.h <<\_ACEOF
10434#define HAVE_TYPE_OFF64_T 1
10435_ACEOF
10436
10437	    { echo "$as_me:$LINENO: result: yes" >&5
10438echo "${ECHO_T}yes" >&6; }
10439	else
10440	    { echo "$as_me:$LINENO: result: no" >&5
10441echo "${ECHO_T}no" >&6; }
10442	fi
10443    fi
10444
10445
10446
10447#--------------------------------------------------------------------
10448# Set the default compiler switches based on the --enable-symbols option.
10449#--------------------------------------------------------------------
10450
10451
10452
10453    { echo "$as_me:$LINENO: checking for build with symbols" >&5
10454echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; }
10455    # Check whether --enable-symbols was given.
10456if test "${enable_symbols+set}" = set; then
10457  enableval=$enable_symbols; tcl_ok=$enableval
10458else
10459  tcl_ok=no
10460fi
10461
10462    DBGX=""
10463    if test "$tcl_ok" = "no"; then
10464	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
10465	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
10466	{ echo "$as_me:$LINENO: result: no" >&5
10467echo "${ECHO_T}no" >&6; }
10468    else
10469	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
10470	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
10471	if test "$tcl_ok" = "yes"; then
10472	    { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
10473echo "${ECHO_T}yes (standard debugging)" >&6; }
10474	fi
10475    fi
10476    # TEA specific:
10477    if test "${TEA_PLATFORM}" != "windows" ; then
10478	LDFLAGS_DEFAULT="${LDFLAGS}"
10479    fi
10480
10481
10482
10483
10484    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
10485
10486cat >>confdefs.h <<\_ACEOF
10487#define TCL_MEM_DEBUG 1
10488_ACEOF
10489
10490    fi
10491
10492    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
10493	if test "$tcl_ok" = "all"; then
10494	    { echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
10495echo "${ECHO_T}enabled symbols mem debugging" >&6; }
10496	else
10497	    { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
10498echo "${ECHO_T}enabled $tcl_ok debugging" >&6; }
10499	fi
10500    fi
10501
10502
10503#--------------------------------------------------------------------
10504# Everyone should be linking against the Tcl stub library.  If you
10505# can't for some reason, remove this definition.  If you aren't using
10506# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
10507# link against the non-stubbed Tcl library.  Add Tk too if necessary.
10508#--------------------------------------------------------------------
10509
10510
10511cat >>confdefs.h <<\_ACEOF
10512#define USE_TCL_STUBS 1
10513_ACEOF
10514
10515#AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
10516
10517#--------------------------------------------------------------------
10518# This macro generates a line to use when building a library.  It
10519# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
10520# and TEA_LOAD_TCLCONFIG macros above.
10521#--------------------------------------------------------------------
10522
10523
10524    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
10525	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
10526	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
10527	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
10528    else
10529	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
10530	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
10531	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
10532    fi
10533
10534    if test "${SHARED_BUILD}" = "1" ; then
10535	MAKE_LIB="${MAKE_SHARED_LIB} "
10536    else
10537	MAKE_LIB="${MAKE_STATIC_LIB} "
10538    fi
10539
10540    #--------------------------------------------------------------------
10541    # Shared libraries and static libraries have different names.
10542    # Use the double eval to make sure any variables in the suffix is
10543    # substituted. (@@@ Might not be necessary anymore)
10544    #--------------------------------------------------------------------
10545
10546    if test "${TEA_PLATFORM}" = "windows" ; then
10547	if test "${SHARED_BUILD}" = "1" ; then
10548	    # We force the unresolved linking of symbols that are really in
10549	    # the private libraries of Tcl and Tk.
10550	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
10551	    if test x"${TK_BIN_DIR}" != x ; then
10552		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
10553	    fi
10554	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
10555	else
10556	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
10557	fi
10558	# Some packages build their own stubs libraries
10559	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
10560	if test "$GCC" = "yes"; then
10561	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
10562	fi
10563	# These aren't needed on Windows (either MSVC or gcc)
10564	RANLIB=:
10565	RANLIB_STUB=:
10566    else
10567	RANLIB_STUB="${RANLIB}"
10568	if test "${SHARED_BUILD}" = "1" ; then
10569	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
10570	    if test x"${TK_BIN_DIR}" != x ; then
10571		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
10572	    fi
10573	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
10574	    RANLIB=:
10575	else
10576	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
10577	fi
10578	# Some packages build their own stubs libraries
10579	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
10580    fi
10581
10582    # These are escaped so that only CFLAGS is picked up at configure time.
10583    # The other values will be substituted at make time.
10584    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
10585    if test "${SHARED_BUILD}" = "1" ; then
10586	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
10587    fi
10588
10589
10590
10591
10592
10593
10594
10595
10596#--------------------------------------------------------------------
10597# Determine the name of the tclsh and/or wish executables in the
10598# Tcl and Tk build directories or the location they were installed
10599# into. These paths are used to support running test cases only,
10600# the Makefile should not be making use of these paths to generate
10601# a pkgIndex.tcl file or anything else at extension build time.
10602#--------------------------------------------------------------------
10603
10604
10605    { echo "$as_me:$LINENO: checking for tclsh" >&5
10606echo $ECHO_N "checking for tclsh... $ECHO_C" >&6; }
10607    if test -f "${TCL_BIN_DIR}/Makefile" ; then
10608        # tclConfig.sh is in Tcl build directory
10609        if test "${TEA_PLATFORM}" = "windows"; then
10610            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
10611        else
10612            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
10613        fi
10614    else
10615        # tclConfig.sh is in install location
10616        if test "${TEA_PLATFORM}" = "windows"; then
10617            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
10618        else
10619            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
10620        fi
10621        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
10622              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
10623              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
10624        for i in $list ; do
10625            if test -f "$i/${TCLSH_PROG}" ; then
10626                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
10627                break
10628            fi
10629        done
10630        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
10631    fi
10632    { echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
10633echo "${ECHO_T}${TCLSH_PROG}" >&6; }
10634
10635
10636#TEA_PROG_WISH
10637
10638#--------------------------------------------------------------------
10639# Finally, substitute all of the various values into the Makefile.
10640# You may alternatively have a special pkgIndex.tcl.in or other files
10641# which require substituting th AC variables in.  Include these here.
10642#--------------------------------------------------------------------
10643
10644ac_config_files="$ac_config_files Makefile pkgIndex.tcl"
10645
10646cat >confcache <<\_ACEOF
10647# This file is a shell script that caches the results of configure
10648# tests run on this system so they can be shared between configure
10649# scripts and configure runs, see configure's option --config-cache.
10650# It is not useful on other systems.  If it contains results you don't
10651# want to keep, you may remove or edit it.
10652#
10653# config.status only pays attention to the cache file if you give it
10654# the --recheck option to rerun configure.
10655#
10656# `ac_cv_env_foo' variables (set or unset) will be overridden when
10657# loading this file, other *unset* `ac_cv_foo' will be assigned the
10658# following values.
10659
10660_ACEOF
10661
10662# The following way of writing the cache mishandles newlines in values,
10663# but we know of no workaround that is simple, portable, and efficient.
10664# So, we kill variables containing newlines.
10665# Ultrix sh set writes to stderr and can't be redirected directly,
10666# and sets the high bit in the cache file unless we assign to the vars.
10667(
10668  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
10669    eval ac_val=\$$ac_var
10670    case $ac_val in #(
10671    *${as_nl}*)
10672      case $ac_var in #(
10673      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
10674echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
10675      esac
10676      case $ac_var in #(
10677      _ | IFS | as_nl) ;; #(
10678      *) $as_unset $ac_var ;;
10679      esac ;;
10680    esac
10681  done
10682
10683  (set) 2>&1 |
10684    case $as_nl`(ac_space=' '; set) 2>&1` in #(
10685    *${as_nl}ac_space=\ *)
10686      # `set' does not quote correctly, so add quotes (double-quote
10687      # substitution turns \\\\ into \\, and sed turns \\ into \).
10688      sed -n \
10689	"s/'/'\\\\''/g;
10690	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
10691      ;; #(
10692    *)
10693      # `set' quotes correctly as required by POSIX, so do not add quotes.
10694      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
10695      ;;
10696    esac |
10697    sort
10698) |
10699  sed '
10700     /^ac_cv_env_/b end
10701     t clear
10702     :clear
10703     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10704     t end
10705     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10706     :end' >>confcache
10707if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
10708  if test -w "$cache_file"; then
10709    test "x$cache_file" != "x/dev/null" &&
10710      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
10711echo "$as_me: updating cache $cache_file" >&6;}
10712    cat confcache >$cache_file
10713  else
10714    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
10715echo "$as_me: not updating unwritable cache $cache_file" >&6;}
10716  fi
10717fi
10718rm -f confcache
10719
10720test "x$prefix" = xNONE && prefix=$ac_default_prefix
10721# Let make expand exec_prefix.
10722test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10723
10724# Transform confdefs.h into DEFS.
10725# Protect against shell expansion while executing Makefile rules.
10726# Protect against Makefile macro expansion.
10727#
10728# If the first sed substitution is executed (which looks for macros that
10729# take arguments), then branch to the quote section.  Otherwise,
10730# look for a macro that doesn't take arguments.
10731ac_script='
10732t clear
10733:clear
10734s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
10735t quote
10736s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
10737t quote
10738b any
10739:quote
10740s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
10741s/\[/\\&/g
10742s/\]/\\&/g
10743s/\$/$$/g
10744H
10745:any
10746${
10747	g
10748	s/^\n//
10749	s/\n/ /g
10750	p
10751}
10752'
10753DEFS=`sed -n "$ac_script" confdefs.h`
10754
10755
10756ac_libobjs=
10757ac_ltlibobjs=
10758for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
10759  # 1. Remove the extension, and $U if already installed.
10760  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
10761  ac_i=`echo "$ac_i" | sed "$ac_script"`
10762  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
10763  #    will be set to the directory where LIBOBJS objects are built.
10764  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
10765  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
10766done
10767LIBOBJS=$ac_libobjs
10768
10769LTLIBOBJS=$ac_ltlibobjs
10770
10771
10772CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
10773
10774: ${CONFIG_STATUS=./config.status}
10775ac_clean_files_save=$ac_clean_files
10776ac_clean_files="$ac_clean_files $CONFIG_STATUS"
10777{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
10778echo "$as_me: creating $CONFIG_STATUS" >&6;}
10779cat >$CONFIG_STATUS <<_ACEOF
10780#! $SHELL
10781# Generated by $as_me.
10782# Run this file to recreate the current configuration.
10783# Compiler output produced by configure, useful for debugging
10784# configure, is in config.log if it exists.
10785
10786debug=false
10787ac_cs_recheck=false
10788ac_cs_silent=false
10789SHELL=\${CONFIG_SHELL-$SHELL}
10790_ACEOF
10791
10792cat >>$CONFIG_STATUS <<\_ACEOF
10793## --------------------- ##
10794## M4sh Initialization.  ##
10795## --------------------- ##
10796
10797# Be more Bourne compatible
10798DUALCASE=1; export DUALCASE # for MKS sh
10799if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
10800  emulate sh
10801  NULLCMD=:
10802  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
10803  # is contrary to our usage.  Disable this feature.
10804  alias -g '${1+"$@"}'='"$@"'
10805  setopt NO_GLOB_SUBST
10806else
10807  case `(set -o) 2>/dev/null` in
10808  *posix*) set -o posix ;;
10809esac
10810
10811fi
10812
10813
10814
10815
10816# PATH needs CR
10817# Avoid depending upon Character Ranges.
10818as_cr_letters='abcdefghijklmnopqrstuvwxyz'
10819as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
10820as_cr_Letters=$as_cr_letters$as_cr_LETTERS
10821as_cr_digits='0123456789'
10822as_cr_alnum=$as_cr_Letters$as_cr_digits
10823
10824# The user is always right.
10825if test "${PATH_SEPARATOR+set}" != set; then
10826  echo "#! /bin/sh" >conf$$.sh
10827  echo  "exit 0"   >>conf$$.sh
10828  chmod +x conf$$.sh
10829  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10830    PATH_SEPARATOR=';'
10831  else
10832    PATH_SEPARATOR=:
10833  fi
10834  rm -f conf$$.sh
10835fi
10836
10837# Support unset when possible.
10838if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
10839  as_unset=unset
10840else
10841  as_unset=false
10842fi
10843
10844
10845# IFS
10846# We need space, tab and new line, in precisely that order.  Quoting is
10847# there to prevent editors from complaining about space-tab.
10848# (If _AS_PATH_WALK were called with IFS unset, it would disable word
10849# splitting by setting IFS to empty value.)
10850as_nl='
10851'
10852IFS=" ""	$as_nl"
10853
10854# Find who we are.  Look in the path if we contain no directory separator.
10855case $0 in
10856  *[\\/]* ) as_myself=$0 ;;
10857  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10858for as_dir in $PATH
10859do
10860  IFS=$as_save_IFS
10861  test -z "$as_dir" && as_dir=.
10862  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
10863done
10864IFS=$as_save_IFS
10865
10866     ;;
10867esac
10868# We did not find ourselves, most probably we were run as `sh COMMAND'
10869# in which case we are not to be found in the path.
10870if test "x$as_myself" = x; then
10871  as_myself=$0
10872fi
10873if test ! -f "$as_myself"; then
10874  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
10875  { (exit 1); exit 1; }
10876fi
10877
10878# Work around bugs in pre-3.0 UWIN ksh.
10879for as_var in ENV MAIL MAILPATH
10880do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
10881done
10882PS1='$ '
10883PS2='> '
10884PS4='+ '
10885
10886# NLS nuisances.
10887for as_var in \
10888  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
10889  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
10890  LC_TELEPHONE LC_TIME
10891do
10892  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
10893    eval $as_var=C; export $as_var
10894  else
10895    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
10896  fi
10897done
10898
10899# Required to use basename.
10900if expr a : '\(a\)' >/dev/null 2>&1 &&
10901   test "X`expr 00001 : '.*\(...\)'`" = X001; then
10902  as_expr=expr
10903else
10904  as_expr=false
10905fi
10906
10907if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
10908  as_basename=basename
10909else
10910  as_basename=false
10911fi
10912
10913
10914# Name of the executable.
10915as_me=`$as_basename -- "$0" ||
10916$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
10917	 X"$0" : 'X\(//\)$' \| \
10918	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
10919echo X/"$0" |
10920    sed '/^.*\/\([^/][^/]*\)\/*$/{
10921	    s//\1/
10922	    q
10923	  }
10924	  /^X\/\(\/\/\)$/{
10925	    s//\1/
10926	    q
10927	  }
10928	  /^X\/\(\/\).*/{
10929	    s//\1/
10930	    q
10931	  }
10932	  s/.*/./; q'`
10933
10934# CDPATH.
10935$as_unset CDPATH
10936
10937
10938
10939  as_lineno_1=$LINENO
10940  as_lineno_2=$LINENO
10941  test "x$as_lineno_1" != "x$as_lineno_2" &&
10942  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
10943
10944  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
10945  # uniformly replaced by the line number.  The first 'sed' inserts a
10946  # line-number line after each line using $LINENO; the second 'sed'
10947  # does the real work.  The second script uses 'N' to pair each
10948  # line-number line with the line containing $LINENO, and appends
10949  # trailing '-' during substitution so that $LINENO is not a special
10950  # case at line end.
10951  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
10952  # scripts with optimization help from Paolo Bonzini.  Blame Lee
10953  # E. McMahon (1931-1989) for sed's syntax.  :-)
10954  sed -n '
10955    p
10956    /[$]LINENO/=
10957  ' <$as_myself |
10958    sed '
10959      s/[$]LINENO.*/&-/
10960      t lineno
10961      b
10962      :lineno
10963      N
10964      :loop
10965      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
10966      t loop
10967      s/-\n.*//
10968    ' >$as_me.lineno &&
10969  chmod +x "$as_me.lineno" ||
10970    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
10971   { (exit 1); exit 1; }; }
10972
10973  # Don't try to exec as it changes $[0], causing all sort of problems
10974  # (the dirname of $[0] is not the place where we might find the
10975  # original and so on.  Autoconf is especially sensitive to this).
10976  . "./$as_me.lineno"
10977  # Exit status is that of the last command.
10978  exit
10979}
10980
10981
10982if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
10983  as_dirname=dirname
10984else
10985  as_dirname=false
10986fi
10987
10988ECHO_C= ECHO_N= ECHO_T=
10989case `echo -n x` in
10990-n*)
10991  case `echo 'x\c'` in
10992  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
10993  *)   ECHO_C='\c';;
10994  esac;;
10995*)
10996  ECHO_N='-n';;
10997esac
10998
10999if expr a : '\(a\)' >/dev/null 2>&1 &&
11000   test "X`expr 00001 : '.*\(...\)'`" = X001; then
11001  as_expr=expr
11002else
11003  as_expr=false
11004fi
11005
11006rm -f conf$$ conf$$.exe conf$$.file
11007if test -d conf$$.dir; then
11008  rm -f conf$$.dir/conf$$.file
11009else
11010  rm -f conf$$.dir
11011  mkdir conf$$.dir
11012fi
11013echo >conf$$.file
11014if ln -s conf$$.file conf$$ 2>/dev/null; then
11015  as_ln_s='ln -s'
11016  # ... but there are two gotchas:
11017  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
11018  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
11019  # In both cases, we have to default to `cp -p'.
11020  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
11021    as_ln_s='cp -p'
11022elif ln conf$$.file conf$$ 2>/dev/null; then
11023  as_ln_s=ln
11024else
11025  as_ln_s='cp -p'
11026fi
11027rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11028rmdir conf$$.dir 2>/dev/null
11029
11030if mkdir -p . 2>/dev/null; then
11031  as_mkdir_p=:
11032else
11033  test -d ./-p && rmdir ./-p
11034  as_mkdir_p=false
11035fi
11036
11037if test -x / >/dev/null 2>&1; then
11038  as_test_x='test -x'
11039else
11040  if ls -dL / >/dev/null 2>&1; then
11041    as_ls_L_option=L
11042  else
11043    as_ls_L_option=
11044  fi
11045  as_test_x='
11046    eval sh -c '\''
11047      if test -d "$1"; then
11048        test -d "$1/.";
11049      else
11050	case $1 in
11051        -*)set "./$1";;
11052	esac;
11053	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
11054	???[sx]*):;;*)false;;esac;fi
11055    '\'' sh
11056  '
11057fi
11058as_executable_p=$as_test_x
11059
11060# Sed expression to map a string onto a valid CPP name.
11061as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
11062
11063# Sed expression to map a string onto a valid variable name.
11064as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
11065
11066
11067exec 6>&1
11068
11069# Save the log message, to keep $[0] and so on meaningful, and to
11070# report actual input values of CONFIG_FILES etc. instead of their
11071# values after options handling.
11072ac_log="
11073This file was extended by mmap $as_me 1.1, which was
11074generated by GNU Autoconf 2.61.  Invocation command line was
11075
11076  CONFIG_FILES    = $CONFIG_FILES
11077  CONFIG_HEADERS  = $CONFIG_HEADERS
11078  CONFIG_LINKS    = $CONFIG_LINKS
11079  CONFIG_COMMANDS = $CONFIG_COMMANDS
11080  $ $0 $@
11081
11082on `(hostname || uname -n) 2>/dev/null | sed 1q`
11083"
11084
11085_ACEOF
11086
11087cat >>$CONFIG_STATUS <<_ACEOF
11088# Files that config.status was made for.
11089config_files="$ac_config_files"
11090
11091_ACEOF
11092
11093cat >>$CONFIG_STATUS <<\_ACEOF
11094ac_cs_usage="\
11095\`$as_me' instantiates files from templates according to the
11096current configuration.
11097
11098Usage: $0 [OPTIONS] [FILE]...
11099
11100  -h, --help       print this help, then exit
11101  -V, --version    print version number and configuration settings, then exit
11102  -q, --quiet      do not print progress messages
11103  -d, --debug      don't remove temporary files
11104      --recheck    update $as_me by reconfiguring in the same conditions
11105  --file=FILE[:TEMPLATE]
11106		   instantiate the configuration file FILE
11107
11108Configuration files:
11109$config_files
11110
11111Report bugs to <bug-autoconf@gnu.org>."
11112
11113_ACEOF
11114cat >>$CONFIG_STATUS <<_ACEOF
11115ac_cs_version="\\
11116mmap config.status 1.1
11117configured by $0, generated by GNU Autoconf 2.61,
11118  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
11119
11120Copyright (C) 2006 Free Software Foundation, Inc.
11121This config.status script is free software; the Free Software Foundation
11122gives unlimited permission to copy, distribute and modify it."
11123
11124ac_pwd='$ac_pwd'
11125srcdir='$srcdir'
11126INSTALL='$INSTALL'
11127_ACEOF
11128
11129cat >>$CONFIG_STATUS <<\_ACEOF
11130# If no file are specified by the user, then we need to provide default
11131# value.  By we need to know if files were specified by the user.
11132ac_need_defaults=:
11133while test $# != 0
11134do
11135  case $1 in
11136  --*=*)
11137    ac_option=`expr "X$1" : 'X\([^=]*\)='`
11138    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
11139    ac_shift=:
11140    ;;
11141  *)
11142    ac_option=$1
11143    ac_optarg=$2
11144    ac_shift=shift
11145    ;;
11146  esac
11147
11148  case $ac_option in
11149  # Handling of the options.
11150  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11151    ac_cs_recheck=: ;;
11152  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
11153    echo "$ac_cs_version"; exit ;;
11154  --debug | --debu | --deb | --de | --d | -d )
11155    debug=: ;;
11156  --file | --fil | --fi | --f )
11157    $ac_shift
11158    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
11159    ac_need_defaults=false;;
11160  --he | --h |  --help | --hel | -h )
11161    echo "$ac_cs_usage"; exit ;;
11162  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11163  | -silent | --silent | --silen | --sile | --sil | --si | --s)
11164    ac_cs_silent=: ;;
11165
11166  # This is an error.
11167  -*) { echo "$as_me: error: unrecognized option: $1
11168Try \`$0 --help' for more information." >&2
11169   { (exit 1); exit 1; }; } ;;
11170
11171  *) ac_config_targets="$ac_config_targets $1"
11172     ac_need_defaults=false ;;
11173
11174  esac
11175  shift
11176done
11177
11178ac_configure_extra_args=
11179
11180if $ac_cs_silent; then
11181  exec 6>/dev/null
11182  ac_configure_extra_args="$ac_configure_extra_args --silent"
11183fi
11184
11185_ACEOF
11186cat >>$CONFIG_STATUS <<_ACEOF
11187if \$ac_cs_recheck; then
11188  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
11189  CONFIG_SHELL=$SHELL
11190  export CONFIG_SHELL
11191  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
11192fi
11193
11194_ACEOF
11195cat >>$CONFIG_STATUS <<\_ACEOF
11196exec 5>>config.log
11197{
11198  echo
11199  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11200## Running $as_me. ##
11201_ASBOX
11202  echo "$ac_log"
11203} >&5
11204
11205_ACEOF
11206cat >>$CONFIG_STATUS <<_ACEOF
11207_ACEOF
11208
11209cat >>$CONFIG_STATUS <<\_ACEOF
11210
11211# Handling of arguments.
11212for ac_config_target in $ac_config_targets
11213do
11214  case $ac_config_target in
11215    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11216    "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;;
11217
11218  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
11219echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11220   { (exit 1); exit 1; }; };;
11221  esac
11222done
11223
11224
11225# If the user did not use the arguments to specify the items to instantiate,
11226# then the envvar interface is used.  Set only those that are not.
11227# We use the long form for the default assignment because of an extremely
11228# bizarre bug on SunOS 4.1.3.
11229if $ac_need_defaults; then
11230  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11231fi
11232
11233# Have a temporary directory for convenience.  Make it in the build tree
11234# simply because there is no reason against having it here, and in addition,
11235# creating and moving files from /tmp can sometimes cause problems.
11236# Hook for its removal unless debugging.
11237# Note that there is a small window in which the directory will not be cleaned:
11238# after its creation but before its name has been assigned to `$tmp'.
11239$debug ||
11240{
11241  tmp=
11242  trap 'exit_status=$?
11243  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
11244' 0
11245  trap '{ (exit 1); exit 1; }' 1 2 13 15
11246}
11247# Create a (secure) tmp directory for tmp files.
11248
11249{
11250  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
11251  test -n "$tmp" && test -d "$tmp"
11252}  ||
11253{
11254  tmp=./conf$$-$RANDOM
11255  (umask 077 && mkdir "$tmp")
11256} ||
11257{
11258   echo "$me: cannot create a temporary directory in ." >&2
11259   { (exit 1); exit 1; }
11260}
11261
11262#
11263# Set up the sed scripts for CONFIG_FILES section.
11264#
11265
11266# No need to generate the scripts if there are no CONFIG_FILES.
11267# This happens for instance when ./config.status config.h
11268if test -n "$CONFIG_FILES"; then
11269
11270_ACEOF
11271
11272
11273
11274ac_delim='%!_!# '
11275for ac_last_try in false false false false false :; do
11276  cat >conf$$subs.sed <<_ACEOF
11277SHELL!$SHELL$ac_delim
11278PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
11279PACKAGE_NAME!$PACKAGE_NAME$ac_delim
11280PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
11281PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
11282PACKAGE_STRING!$PACKAGE_STRING$ac_delim
11283PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
11284exec_prefix!$exec_prefix$ac_delim
11285prefix!$prefix$ac_delim
11286program_transform_name!$program_transform_name$ac_delim
11287bindir!$bindir$ac_delim
11288sbindir!$sbindir$ac_delim
11289libexecdir!$libexecdir$ac_delim
11290datarootdir!$datarootdir$ac_delim
11291datadir!$datadir$ac_delim
11292sysconfdir!$sysconfdir$ac_delim
11293sharedstatedir!$sharedstatedir$ac_delim
11294localstatedir!$localstatedir$ac_delim
11295includedir!$includedir$ac_delim
11296oldincludedir!$oldincludedir$ac_delim
11297docdir!$docdir$ac_delim
11298infodir!$infodir$ac_delim
11299htmldir!$htmldir$ac_delim
11300dvidir!$dvidir$ac_delim
11301pdfdir!$pdfdir$ac_delim
11302psdir!$psdir$ac_delim
11303libdir!$libdir$ac_delim
11304localedir!$localedir$ac_delim
11305mandir!$mandir$ac_delim
11306DEFS!$DEFS$ac_delim
11307ECHO_C!$ECHO_C$ac_delim
11308ECHO_N!$ECHO_N$ac_delim
11309ECHO_T!$ECHO_T$ac_delim
11310LIBS!$LIBS$ac_delim
11311build_alias!$build_alias$ac_delim
11312host_alias!$host_alias$ac_delim
11313target_alias!$target_alias$ac_delim
11314CYGPATH!$CYGPATH$ac_delim
11315EXEEXT!$EXEEXT$ac_delim
11316PKG_LIB_FILE!$PKG_LIB_FILE$ac_delim
11317PKG_STUB_LIB_FILE!$PKG_STUB_LIB_FILE$ac_delim
11318PKG_STUB_SOURCES!$PKG_STUB_SOURCES$ac_delim
11319PKG_STUB_OBJECTS!$PKG_STUB_OBJECTS$ac_delim
11320PKG_TCL_SOURCES!$PKG_TCL_SOURCES$ac_delim
11321PKG_HEADERS!$PKG_HEADERS$ac_delim
11322PKG_INCLUDES!$PKG_INCLUDES$ac_delim
11323PKG_LIBS!$PKG_LIBS$ac_delim
11324PKG_CFLAGS!$PKG_CFLAGS$ac_delim
11325TCL_VERSION!$TCL_VERSION$ac_delim
11326TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim
11327TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim
11328TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
11329TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim
11330TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
11331TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim
11332TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim
11333TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim
11334TCL_LIBS!$TCL_LIBS$ac_delim
11335TCL_DEFS!$TCL_DEFS$ac_delim
11336TCL_EXTRA_CFLAGS!$TCL_EXTRA_CFLAGS$ac_delim
11337TCL_LD_FLAGS!$TCL_LD_FLAGS$ac_delim
11338TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
11339CC!$CC$ac_delim
11340CFLAGS!$CFLAGS$ac_delim
11341LDFLAGS!$LDFLAGS$ac_delim
11342CPPFLAGS!$CPPFLAGS$ac_delim
11343ac_ct_CC!$ac_ct_CC$ac_delim
11344OBJEXT!$OBJEXT$ac_delim
11345CPP!$CPP$ac_delim
11346INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
11347INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
11348INSTALL_DATA!$INSTALL_DATA$ac_delim
11349SET_MAKE!$SET_MAKE$ac_delim
11350RANLIB!$RANLIB$ac_delim
11351GREP!$GREP$ac_delim
11352EGREP!$EGREP$ac_delim
11353MATH_LIBS!$MATH_LIBS$ac_delim
11354PKG_SOURCES!$PKG_SOURCES$ac_delim
11355PKG_OBJECTS!$PKG_OBJECTS$ac_delim
11356CLEANFILES!$CLEANFILES$ac_delim
11357TCL_INCLUDES!$TCL_INCLUDES$ac_delim
11358TCL_THREADS!$TCL_THREADS$ac_delim
11359SHARED_BUILD!$SHARED_BUILD$ac_delim
11360AR!$AR$ac_delim
11361CELIB_DIR!$CELIB_DIR$ac_delim
11362LIBOBJS!$LIBOBJS$ac_delim
11363DL_LIBS!$DL_LIBS$ac_delim
11364CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim
11365CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim
11366CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim
11367STLIB_LD!$STLIB_LD$ac_delim
11368SHLIB_LD!$SHLIB_LD$ac_delim
11369SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim
11370SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim
11371LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim
11372CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim
11373LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim
11374_ACEOF
11375
11376  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
11377    break
11378  elif $ac_last_try; then
11379    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
11380echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
11381   { (exit 1); exit 1; }; }
11382  else
11383    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11384  fi
11385done
11386
11387ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
11388if test -n "$ac_eof"; then
11389  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
11390  ac_eof=`expr $ac_eof + 1`
11391fi
11392
11393cat >>$CONFIG_STATUS <<_ACEOF
11394cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
11395/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11396_ACEOF
11397sed '
11398s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
11399s/^/s,@/; s/!/@,|#_!!_#|/
11400:n
11401t n
11402s/'"$ac_delim"'$/,g/; t
11403s/$/\\/; p
11404N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
11405' >>$CONFIG_STATUS <conf$$subs.sed
11406rm -f conf$$subs.sed
11407cat >>$CONFIG_STATUS <<_ACEOF
11408CEOF$ac_eof
11409_ACEOF
11410
11411
11412ac_delim='%!_!# '
11413for ac_last_try in false false false false false :; do
11414  cat >conf$$subs.sed <<_ACEOF
11415TCL_DBGX!$TCL_DBGX$ac_delim
11416MAKE_LIB!$MAKE_LIB$ac_delim
11417MAKE_SHARED_LIB!$MAKE_SHARED_LIB$ac_delim
11418MAKE_STATIC_LIB!$MAKE_STATIC_LIB$ac_delim
11419MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim
11420RANLIB_STUB!$RANLIB_STUB$ac_delim
11421TCLSH_PROG!$TCLSH_PROG$ac_delim
11422LTLIBOBJS!$LTLIBOBJS$ac_delim
11423_ACEOF
11424
11425  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 8; then
11426    break
11427  elif $ac_last_try; then
11428    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
11429echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
11430   { (exit 1); exit 1; }; }
11431  else
11432    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11433  fi
11434done
11435
11436ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
11437if test -n "$ac_eof"; then
11438  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
11439  ac_eof=`expr $ac_eof + 1`
11440fi
11441
11442cat >>$CONFIG_STATUS <<_ACEOF
11443cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
11444/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
11445_ACEOF
11446sed '
11447s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
11448s/^/s,@/; s/!/@,|#_!!_#|/
11449:n
11450t n
11451s/'"$ac_delim"'$/,g/; t
11452s/$/\\/; p
11453N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
11454' >>$CONFIG_STATUS <conf$$subs.sed
11455rm -f conf$$subs.sed
11456cat >>$CONFIG_STATUS <<_ACEOF
11457:end
11458s/|#_!!_#|//g
11459CEOF$ac_eof
11460_ACEOF
11461
11462
11463# VPATH may cause trouble with some makes, so we remove $(srcdir),
11464# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11465# trailing colons and then remove the whole line if VPATH becomes empty
11466# (actually we leave an empty line to preserve line numbers).
11467if test "x$srcdir" = x.; then
11468  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
11469s/:*\$(srcdir):*/:/
11470s/:*\${srcdir}:*/:/
11471s/:*@srcdir@:*/:/
11472s/^\([^=]*=[	 ]*\):*/\1/
11473s/:*$//
11474s/^[^=]*=[	 ]*$//
11475}'
11476fi
11477
11478cat >>$CONFIG_STATUS <<\_ACEOF
11479fi # test -n "$CONFIG_FILES"
11480
11481
11482for ac_tag in  :F $CONFIG_FILES
11483do
11484  case $ac_tag in
11485  :[FHLC]) ac_mode=$ac_tag; continue;;
11486  esac
11487  case $ac_mode$ac_tag in
11488  :[FHL]*:*);;
11489  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
11490echo "$as_me: error: Invalid tag $ac_tag." >&2;}
11491   { (exit 1); exit 1; }; };;
11492  :[FH]-) ac_tag=-:-;;
11493  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
11494  esac
11495  ac_save_IFS=$IFS
11496  IFS=:
11497  set x $ac_tag
11498  IFS=$ac_save_IFS
11499  shift
11500  ac_file=$1
11501  shift
11502
11503  case $ac_mode in
11504  :L) ac_source=$1;;
11505  :[FH])
11506    ac_file_inputs=
11507    for ac_f
11508    do
11509      case $ac_f in
11510      -) ac_f="$tmp/stdin";;
11511      *) # Look for the file first in the build tree, then in the source tree
11512	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
11513	 # because $ac_f cannot contain `:'.
11514	 test -f "$ac_f" ||
11515	   case $ac_f in
11516	   [\\/$]*) false;;
11517	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
11518	   esac ||
11519	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
11520echo "$as_me: error: cannot find input file: $ac_f" >&2;}
11521   { (exit 1); exit 1; }; };;
11522      esac
11523      ac_file_inputs="$ac_file_inputs $ac_f"
11524    done
11525
11526    # Let's still pretend it is `configure' which instantiates (i.e., don't
11527    # use $as_me), people would be surprised to read:
11528    #    /* config.h.  Generated by config.status.  */
11529    configure_input="Generated from "`IFS=:
11530	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
11531    if test x"$ac_file" != x-; then
11532      configure_input="$ac_file.  $configure_input"
11533      { echo "$as_me:$LINENO: creating $ac_file" >&5
11534echo "$as_me: creating $ac_file" >&6;}
11535    fi
11536
11537    case $ac_tag in
11538    *:-:* | *:-) cat >"$tmp/stdin";;
11539    esac
11540    ;;
11541  esac
11542
11543  ac_dir=`$as_dirname -- "$ac_file" ||
11544$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11545	 X"$ac_file" : 'X\(//\)[^/]' \| \
11546	 X"$ac_file" : 'X\(//\)$' \| \
11547	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11548echo X"$ac_file" |
11549    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11550	    s//\1/
11551	    q
11552	  }
11553	  /^X\(\/\/\)[^/].*/{
11554	    s//\1/
11555	    q
11556	  }
11557	  /^X\(\/\/\)$/{
11558	    s//\1/
11559	    q
11560	  }
11561	  /^X\(\/\).*/{
11562	    s//\1/
11563	    q
11564	  }
11565	  s/.*/./; q'`
11566  { as_dir="$ac_dir"
11567  case $as_dir in #(
11568  -*) as_dir=./$as_dir;;
11569  esac
11570  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
11571    as_dirs=
11572    while :; do
11573      case $as_dir in #(
11574      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
11575      *) as_qdir=$as_dir;;
11576      esac
11577      as_dirs="'$as_qdir' $as_dirs"
11578      as_dir=`$as_dirname -- "$as_dir" ||
11579$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11580	 X"$as_dir" : 'X\(//\)[^/]' \| \
11581	 X"$as_dir" : 'X\(//\)$' \| \
11582	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
11583echo X"$as_dir" |
11584    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11585	    s//\1/
11586	    q
11587	  }
11588	  /^X\(\/\/\)[^/].*/{
11589	    s//\1/
11590	    q
11591	  }
11592	  /^X\(\/\/\)$/{
11593	    s//\1/
11594	    q
11595	  }
11596	  /^X\(\/\).*/{
11597	    s//\1/
11598	    q
11599	  }
11600	  s/.*/./; q'`
11601      test -d "$as_dir" && break
11602    done
11603    test -z "$as_dirs" || eval "mkdir $as_dirs"
11604  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
11605echo "$as_me: error: cannot create directory $as_dir" >&2;}
11606   { (exit 1); exit 1; }; }; }
11607  ac_builddir=.
11608
11609case "$ac_dir" in
11610.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
11611*)
11612  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
11613  # A ".." for each directory in $ac_dir_suffix.
11614  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
11615  case $ac_top_builddir_sub in
11616  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
11617  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
11618  esac ;;
11619esac
11620ac_abs_top_builddir=$ac_pwd
11621ac_abs_builddir=$ac_pwd$ac_dir_suffix
11622# for backward compatibility:
11623ac_top_builddir=$ac_top_build_prefix
11624
11625case $srcdir in
11626  .)  # We are building in place.
11627    ac_srcdir=.
11628    ac_top_srcdir=$ac_top_builddir_sub
11629    ac_abs_top_srcdir=$ac_pwd ;;
11630  [\\/]* | ?:[\\/]* )  # Absolute name.
11631    ac_srcdir=$srcdir$ac_dir_suffix;
11632    ac_top_srcdir=$srcdir
11633    ac_abs_top_srcdir=$srcdir ;;
11634  *) # Relative name.
11635    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
11636    ac_top_srcdir=$ac_top_build_prefix$srcdir
11637    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
11638esac
11639ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
11640
11641
11642  case $ac_mode in
11643  :F)
11644  #
11645  # CONFIG_FILE
11646  #
11647
11648  case $INSTALL in
11649  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11650  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
11651  esac
11652_ACEOF
11653
11654cat >>$CONFIG_STATUS <<\_ACEOF
11655# If the template does not know about datarootdir, expand it.
11656# FIXME: This hack should be removed a few years after 2.60.
11657ac_datarootdir_hack=; ac_datarootdir_seen=
11658
11659case `sed -n '/datarootdir/ {
11660  p
11661  q
11662}
11663/@datadir@/p
11664/@docdir@/p
11665/@infodir@/p
11666/@localedir@/p
11667/@mandir@/p
11668' $ac_file_inputs` in
11669*datarootdir*) ac_datarootdir_seen=yes;;
11670*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
11671  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
11672echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
11673_ACEOF
11674cat >>$CONFIG_STATUS <<_ACEOF
11675  ac_datarootdir_hack='
11676  s&@datadir@&$datadir&g
11677  s&@docdir@&$docdir&g
11678  s&@infodir@&$infodir&g
11679  s&@localedir@&$localedir&g
11680  s&@mandir@&$mandir&g
11681    s&\\\${datarootdir}&$datarootdir&g' ;;
11682esac
11683_ACEOF
11684
11685# Neutralize VPATH when `$srcdir' = `.'.
11686# Shell code in configure.ac might set extrasub.
11687# FIXME: do we really want to maintain this feature?
11688cat >>$CONFIG_STATUS <<_ACEOF
11689  sed "$ac_vpsub
11690$extrasub
11691_ACEOF
11692cat >>$CONFIG_STATUS <<\_ACEOF
11693:t
11694/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11695s&@configure_input@&$configure_input&;t t
11696s&@top_builddir@&$ac_top_builddir_sub&;t t
11697s&@srcdir@&$ac_srcdir&;t t
11698s&@abs_srcdir@&$ac_abs_srcdir&;t t
11699s&@top_srcdir@&$ac_top_srcdir&;t t
11700s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
11701s&@builddir@&$ac_builddir&;t t
11702s&@abs_builddir@&$ac_abs_builddir&;t t
11703s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
11704s&@INSTALL@&$ac_INSTALL&;t t
11705$ac_datarootdir_hack
11706" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
11707
11708test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
11709  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
11710  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
11711  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11712which seems to be undefined.  Please make sure it is defined." >&5
11713echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11714which seems to be undefined.  Please make sure it is defined." >&2;}
11715
11716  rm -f "$tmp/stdin"
11717  case $ac_file in
11718  -) cat "$tmp/out"; rm -f "$tmp/out";;
11719  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
11720  esac
11721 ;;
11722
11723
11724
11725  esac
11726
11727done # for ac_tag
11728
11729
11730{ (exit 0); exit 0; }
11731_ACEOF
11732chmod +x $CONFIG_STATUS
11733ac_clean_files=$ac_clean_files_save
11734
11735
11736# configure is writing to config.log, and then calls config.status.
11737# config.status does its own redirection, appending to config.log.
11738# Unfortunately, on DOS this fails, as config.log is still kept open
11739# by configure, so config.status won't be able to write to it; its
11740# output is simply discarded.  So we exec the FD to /dev/null,
11741# effectively closing config.log, so it can be properly (re)opened and
11742# appended to by config.status.  When coming back to configure, we
11743# need to make the FD available again.
11744if test "$no_create" != yes; then
11745  ac_cs_success=:
11746  ac_config_status_args=
11747  test "$silent" = yes &&
11748    ac_config_status_args="$ac_config_status_args --quiet"
11749  exec 5>/dev/null
11750  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
11751  exec 5>>config.log
11752  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
11753  # would make configure fail if this is the last instruction.
11754  $ac_cs_success || { (exit 1); exit 1; }
11755fi
11756
11757