1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.61 for shellicon 2.2.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9## --------------------- ##
10## M4sh Initialization.  ##
11## --------------------- ##
12
13# Be more Bourne compatible
14DUALCASE=1; export DUALCASE # for MKS sh
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16  emulate sh
17  NULLCMD=:
18  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19  # is contrary to our usage.  Disable this feature.
20  alias -g '${1+"$@"}'='"$@"'
21  setopt NO_GLOB_SUBST
22else
23  case `(set -o) 2>/dev/null` in
24  *posix*) set -o posix ;;
25esac
26
27fi
28
29
30
31
32# PATH needs CR
33# Avoid depending upon Character Ranges.
34as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37as_cr_digits='0123456789'
38as_cr_alnum=$as_cr_Letters$as_cr_digits
39
40# The user is always right.
41if test "${PATH_SEPARATOR+set}" != set; then
42  echo "#! /bin/sh" >conf$$.sh
43  echo  "exit 0"   >>conf$$.sh
44  chmod +x conf$$.sh
45  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
46    PATH_SEPARATOR=';'
47  else
48    PATH_SEPARATOR=:
49  fi
50  rm -f conf$$.sh
51fi
52
53# Support unset when possible.
54if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
55  as_unset=unset
56else
57  as_unset=false
58fi
59
60
61# IFS
62# We need space, tab and new line, in precisely that order.  Quoting is
63# there to prevent editors from complaining about space-tab.
64# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65# splitting by setting IFS to empty value.)
66as_nl='
67'
68IFS=" ""	$as_nl"
69
70# Find who we are.  Look in the path if we contain no directory separator.
71case $0 in
72  *[\\/]* ) as_myself=$0 ;;
73  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
74for as_dir in $PATH
75do
76  IFS=$as_save_IFS
77  test -z "$as_dir" && as_dir=.
78  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
79done
80IFS=$as_save_IFS
81
82     ;;
83esac
84# We did not find ourselves, most probably we were run as `sh COMMAND'
85# in which case we are not to be found in the path.
86if test "x$as_myself" = x; then
87  as_myself=$0
88fi
89if test ! -f "$as_myself"; then
90  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
91  { (exit 1); exit 1; }
92fi
93
94# Work around bugs in pre-3.0 UWIN ksh.
95for as_var in ENV MAIL MAILPATH
96do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
97done
98PS1='$ '
99PS2='> '
100PS4='+ '
101
102# NLS nuisances.
103for as_var in \
104  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
105  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
106  LC_TELEPHONE LC_TIME
107do
108  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
109    eval $as_var=C; export $as_var
110  else
111    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
112  fi
113done
114
115# Required to use basename.
116if expr a : '\(a\)' >/dev/null 2>&1 &&
117   test "X`expr 00001 : '.*\(...\)'`" = X001; then
118  as_expr=expr
119else
120  as_expr=false
121fi
122
123if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
124  as_basename=basename
125else
126  as_basename=false
127fi
128
129
130# Name of the executable.
131as_me=`$as_basename -- "$0" ||
132$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133	 X"$0" : 'X\(//\)$' \| \
134	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
135echo X/"$0" |
136    sed '/^.*\/\([^/][^/]*\)\/*$/{
137	    s//\1/
138	    q
139	  }
140	  /^X\/\(\/\/\)$/{
141	    s//\1/
142	    q
143	  }
144	  /^X\/\(\/\).*/{
145	    s//\1/
146	    q
147	  }
148	  s/.*/./; q'`
149
150# CDPATH.
151$as_unset CDPATH
152
153
154if test "x$CONFIG_SHELL" = x; then
155  if (eval ":") 2>/dev/null; then
156  as_have_required=yes
157else
158  as_have_required=no
159fi
160
161  if test $as_have_required = yes && 	 (eval ":
162(as_func_return () {
163  (exit \$1)
164}
165as_func_success () {
166  as_func_return 0
167}
168as_func_failure () {
169  as_func_return 1
170}
171as_func_ret_success () {
172  return 0
173}
174as_func_ret_failure () {
175  return 1
176}
177
178exitcode=0
179if as_func_success; then
180  :
181else
182  exitcode=1
183  echo as_func_success failed.
184fi
185
186if as_func_failure; then
187  exitcode=1
188  echo as_func_failure succeeded.
189fi
190
191if as_func_ret_success; then
192  :
193else
194  exitcode=1
195  echo as_func_ret_success failed.
196fi
197
198if as_func_ret_failure; then
199  exitcode=1
200  echo as_func_ret_failure succeeded.
201fi
202
203if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
204  :
205else
206  exitcode=1
207  echo positional parameters were not saved.
208fi
209
210test \$exitcode = 0) || { (exit 1); exit 1; }
211
212(
213  as_lineno_1=\$LINENO
214  as_lineno_2=\$LINENO
215  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
216  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
217") 2> /dev/null; then
218  :
219else
220  as_candidate_shells=
221    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
222for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
223do
224  IFS=$as_save_IFS
225  test -z "$as_dir" && as_dir=.
226  case $as_dir in
227	 /*)
228	   for as_base in sh bash ksh sh5; do
229	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
230	   done;;
231       esac
232done
233IFS=$as_save_IFS
234
235
236      for as_shell in $as_candidate_shells $SHELL; do
237	 # Try only shells that exist, to save several forks.
238	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
239		{ ("$as_shell") 2> /dev/null <<\_ASEOF
240if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241  emulate sh
242  NULLCMD=:
243  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244  # is contrary to our usage.  Disable this feature.
245  alias -g '${1+"$@"}'='"$@"'
246  setopt NO_GLOB_SUBST
247else
248  case `(set -o) 2>/dev/null` in
249  *posix*) set -o posix ;;
250esac
251
252fi
253
254
255:
256_ASEOF
257}; then
258  CONFIG_SHELL=$as_shell
259	       as_have_required=yes
260	       if { "$as_shell" 2> /dev/null <<\_ASEOF
261if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262  emulate sh
263  NULLCMD=:
264  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
265  # is contrary to our usage.  Disable this feature.
266  alias -g '${1+"$@"}'='"$@"'
267  setopt NO_GLOB_SUBST
268else
269  case `(set -o) 2>/dev/null` in
270  *posix*) set -o posix ;;
271esac
272
273fi
274
275
276:
277(as_func_return () {
278  (exit $1)
279}
280as_func_success () {
281  as_func_return 0
282}
283as_func_failure () {
284  as_func_return 1
285}
286as_func_ret_success () {
287  return 0
288}
289as_func_ret_failure () {
290  return 1
291}
292
293exitcode=0
294if as_func_success; then
295  :
296else
297  exitcode=1
298  echo as_func_success failed.
299fi
300
301if as_func_failure; then
302  exitcode=1
303  echo as_func_failure succeeded.
304fi
305
306if as_func_ret_success; then
307  :
308else
309  exitcode=1
310  echo as_func_ret_success failed.
311fi
312
313if as_func_ret_failure; then
314  exitcode=1
315  echo as_func_ret_failure succeeded.
316fi
317
318if ( set x; as_func_ret_success y && test x = "$1" ); then
319  :
320else
321  exitcode=1
322  echo positional parameters were not saved.
323fi
324
325test $exitcode = 0) || { (exit 1); exit 1; }
326
327(
328  as_lineno_1=$LINENO
329  as_lineno_2=$LINENO
330  test "x$as_lineno_1" != "x$as_lineno_2" &&
331  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
332
333_ASEOF
334}; then
335  break
336fi
337
338fi
339
340      done
341
342      if test "x$CONFIG_SHELL" != x; then
343  for as_var in BASH_ENV ENV
344        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
345        done
346        export CONFIG_SHELL
347        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
348fi
349
350
351    if test $as_have_required = no; then
352  echo This script requires a shell more modern than all the
353      echo shells that I found on your system.  Please install a
354      echo modern shell, or manually run the script under such a
355      echo shell if you do have one.
356      { (exit 1); exit 1; }
357fi
358
359
360fi
361
362fi
363
364
365
366(eval "as_func_return () {
367  (exit \$1)
368}
369as_func_success () {
370  as_func_return 0
371}
372as_func_failure () {
373  as_func_return 1
374}
375as_func_ret_success () {
376  return 0
377}
378as_func_ret_failure () {
379  return 1
380}
381
382exitcode=0
383if as_func_success; then
384  :
385else
386  exitcode=1
387  echo as_func_success failed.
388fi
389
390if as_func_failure; then
391  exitcode=1
392  echo as_func_failure succeeded.
393fi
394
395if as_func_ret_success; then
396  :
397else
398  exitcode=1
399  echo as_func_ret_success failed.
400fi
401
402if as_func_ret_failure; then
403  exitcode=1
404  echo as_func_ret_failure succeeded.
405fi
406
407if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
408  :
409else
410  exitcode=1
411  echo positional parameters were not saved.
412fi
413
414test \$exitcode = 0") || {
415  echo No shell found that supports shell functions.
416  echo Please tell autoconf@gnu.org about your system,
417  echo including any error possibly output before this
418  echo message
419}
420
421
422
423  as_lineno_1=$LINENO
424  as_lineno_2=$LINENO
425  test "x$as_lineno_1" != "x$as_lineno_2" &&
426  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
427
428  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
429  # uniformly replaced by the line number.  The first 'sed' inserts a
430  # line-number line after each line using $LINENO; the second 'sed'
431  # does the real work.  The second script uses 'N' to pair each
432  # line-number line with the line containing $LINENO, and appends
433  # trailing '-' during substitution so that $LINENO is not a special
434  # case at line end.
435  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
436  # scripts with optimization help from Paolo Bonzini.  Blame Lee
437  # E. McMahon (1931-1989) for sed's syntax.  :-)
438  sed -n '
439    p
440    /[$]LINENO/=
441  ' <$as_myself |
442    sed '
443      s/[$]LINENO.*/&-/
444      t lineno
445      b
446      :lineno
447      N
448      :loop
449      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
450      t loop
451      s/-\n.*//
452    ' >$as_me.lineno &&
453  chmod +x "$as_me.lineno" ||
454    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
455   { (exit 1); exit 1; }; }
456
457  # Don't try to exec as it changes $[0], causing all sort of problems
458  # (the dirname of $[0] is not the place where we might find the
459  # original and so on.  Autoconf is especially sensitive to this).
460  . "./$as_me.lineno"
461  # Exit status is that of the last command.
462  exit
463}
464
465
466if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
467  as_dirname=dirname
468else
469  as_dirname=false
470fi
471
472ECHO_C= ECHO_N= ECHO_T=
473case `echo -n x` in
474-n*)
475  case `echo 'x\c'` in
476  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
477  *)   ECHO_C='\c';;
478  esac;;
479*)
480  ECHO_N='-n';;
481esac
482
483if expr a : '\(a\)' >/dev/null 2>&1 &&
484   test "X`expr 00001 : '.*\(...\)'`" = X001; then
485  as_expr=expr
486else
487  as_expr=false
488fi
489
490rm -f conf$$ conf$$.exe conf$$.file
491if test -d conf$$.dir; then
492  rm -f conf$$.dir/conf$$.file
493else
494  rm -f conf$$.dir
495  mkdir conf$$.dir
496fi
497echo >conf$$.file
498if ln -s conf$$.file conf$$ 2>/dev/null; then
499  as_ln_s='ln -s'
500  # ... but there are two gotchas:
501  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
502  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
503  # In both cases, we have to default to `cp -p'.
504  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
505    as_ln_s='cp -p'
506elif ln conf$$.file conf$$ 2>/dev/null; then
507  as_ln_s=ln
508else
509  as_ln_s='cp -p'
510fi
511rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
512rmdir conf$$.dir 2>/dev/null
513
514if mkdir -p . 2>/dev/null; then
515  as_mkdir_p=:
516else
517  test -d ./-p && rmdir ./-p
518  as_mkdir_p=false
519fi
520
521if test -x / >/dev/null 2>&1; then
522  as_test_x='test -x'
523else
524  if ls -dL / >/dev/null 2>&1; then
525    as_ls_L_option=L
526  else
527    as_ls_L_option=
528  fi
529  as_test_x='
530    eval sh -c '\''
531      if test -d "$1"; then
532        test -d "$1/.";
533      else
534	case $1 in
535        -*)set "./$1";;
536	esac;
537	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
538	???[sx]*):;;*)false;;esac;fi
539    '\'' sh
540  '
541fi
542as_executable_p=$as_test_x
543
544# Sed expression to map a string onto a valid CPP name.
545as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
546
547# Sed expression to map a string onto a valid variable name.
548as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
549
550
551
552exec 7<&0 </dev/null 6>&1
553
554# Name of the host.
555# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
556# so uname gets run too.
557ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
558
559#
560# Initializations.
561#
562ac_default_prefix=/usr/local
563ac_clean_files=
564ac_config_libobj_dir=.
565LIBOBJS=
566cross_compiling=no
567subdirs=
568MFLAGS=
569MAKEFLAGS=
570SHELL=${CONFIG_SHELL-/bin/sh}
571
572# Identity of this package.
573PACKAGE_NAME='shellicon'
574PACKAGE_TARNAME='shellicon'
575PACKAGE_VERSION='2.2'
576PACKAGE_STRING='shellicon 2.2'
577PACKAGE_BUGREPORT=''
578
579# Factoring default headers for most tests.
580ac_includes_default="\
581#include <stdio.h>
582#ifdef HAVE_SYS_TYPES_H
583# include <sys/types.h>
584#endif
585#ifdef HAVE_SYS_STAT_H
586# include <sys/stat.h>
587#endif
588#ifdef STDC_HEADERS
589# include <stdlib.h>
590# include <stddef.h>
591#else
592# ifdef HAVE_STDLIB_H
593#  include <stdlib.h>
594# endif
595#endif
596#ifdef HAVE_STRING_H
597# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
598#  include <memory.h>
599# endif
600# include <string.h>
601#endif
602#ifdef HAVE_STRINGS_H
603# include <strings.h>
604#endif
605#ifdef HAVE_INTTYPES_H
606# include <inttypes.h>
607#endif
608#ifdef HAVE_STDINT_H
609# include <stdint.h>
610#endif
611#ifdef HAVE_UNISTD_H
612# include <unistd.h>
613#endif"
614
615ac_subst_vars='SHELL
616PATH_SEPARATOR
617PACKAGE_NAME
618PACKAGE_TARNAME
619PACKAGE_VERSION
620PACKAGE_STRING
621PACKAGE_BUGREPORT
622exec_prefix
623prefix
624program_transform_name
625bindir
626sbindir
627libexecdir
628datarootdir
629datadir
630sysconfdir
631sharedstatedir
632localstatedir
633includedir
634oldincludedir
635docdir
636infodir
637htmldir
638dvidir
639pdfdir
640psdir
641libdir
642localedir
643mandir
644DEFS
645ECHO_C
646ECHO_N
647ECHO_T
648LIBS
649build_alias
650host_alias
651target_alias
652PACKAGE_PATCHLEVEL
653CYGPATH
654EXEEXT
655PKG_LIB_FILE
656PKG_STUB_LIB_FILE
657PKG_STUB_SOURCES
658PKG_STUB_OBJECTS
659PKG_TCL_SOURCES
660PKG_HEADERS
661PKG_INCLUDES
662PKG_LIBS
663PKG_CFLAGS
664TCL_VERSION
665TCL_PATCH_LEVEL
666TCL_BIN_DIR
667TCL_SRC_DIR
668TCL_LIB_FILE
669TCL_LIB_FLAG
670TCL_LIB_SPEC
671TCL_STUB_LIB_FILE
672TCL_STUB_LIB_FLAG
673TCL_STUB_LIB_SPEC
674CLEANFILES
675TCL_LIBS
676TCL_DEFS
677TCL_EXTRA_CFLAGS
678TCL_LD_FLAGS
679TCL_SHLIB_LD_LIBS
680TK_VERSION
681TK_BIN_DIR
682TK_SRC_DIR
683TK_LIB_FILE
684TK_LIB_FLAG
685TK_LIB_SPEC
686TK_STUB_LIB_FILE
687TK_STUB_LIB_FLAG
688TK_STUB_LIB_SPEC
689TK_LIBS
690TK_XINCLUDES
691CC
692CFLAGS
693LDFLAGS
694CPPFLAGS
695ac_ct_CC
696OBJEXT
697CPP
698INSTALL_PROGRAM
699INSTALL_SCRIPT
700INSTALL_DATA
701SET_MAKE
702RANLIB
703GREP
704EGREP
705MATH_LIBS
706PKG_SOURCES
707PKG_OBJECTS
708TCL_INCLUDES
709TCL_TOP_DIR_NATIVE
710TK_INCLUDES
711TK_TOP_DIR_NATIVE
712TK_XLIB_DIR_NATIVE
713XMKMF
714TCL_THREADS
715SHARED_BUILD
716AR
717CELIB_DIR
718CFLAGS_DEBUG
719CFLAGS_OPTIMIZE
720CFLAGS_WARNING
721STLIB_LD
722SHLIB_LD
723SHLIB_LD_LIBS
724SHLIB_CFLAGS
725LD_LIBRARY_PATH_VAR
726CFLAGS_DEFAULT
727LDFLAGS_DEFAULT
728TCL_DBGX
729MAKE_LIB
730MAKE_SHARED_LIB
731MAKE_STATIC_LIB
732MAKE_STUB_LIB
733RANLIB_STUB
734VC_MANIFEST_EMBED_DLL
735VC_MANIFEST_EMBED_EXE
736TCLSH_PROG
737WISH_PROG
738LIBOBJS
739LTLIBOBJS'
740ac_subst_files=''
741      ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
747LIBS
748CPPFLAGS
749CPP
750XMKMF'
751
752
753# Initialize some variables set by options.
754ac_init_help=
755ac_init_version=false
756# The variables have the same names as the options, with
757# dashes changed to underlines.
758cache_file=/dev/null
759exec_prefix=NONE
760no_create=
761no_recursion=
762prefix=NONE
763program_prefix=NONE
764program_suffix=NONE
765program_transform_name=s,x,x,
766silent=
767site=
768srcdir=
769verbose=
770x_includes=NONE
771x_libraries=NONE
772
773# Installation directory options.
774# These are left unexpanded so users can "make install exec_prefix=/foo"
775# and all the variables that are supposed to be based on exec_prefix
776# by default will actually change.
777# Use braces instead of parens because sh, perl, etc. also accept them.
778# (The list follows the same order as the GNU Coding Standards.)
779bindir='${exec_prefix}/bin'
780sbindir='${exec_prefix}/sbin'
781libexecdir='${exec_prefix}/libexec'
782datarootdir='${prefix}/share'
783datadir='${datarootdir}'
784sysconfdir='${prefix}/etc'
785sharedstatedir='${prefix}/com'
786localstatedir='${prefix}/var'
787includedir='${prefix}/include'
788oldincludedir='/usr/include'
789docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
790infodir='${datarootdir}/info'
791htmldir='${docdir}'
792dvidir='${docdir}'
793pdfdir='${docdir}'
794psdir='${docdir}'
795libdir='${exec_prefix}/lib'
796localedir='${datarootdir}/locale'
797mandir='${datarootdir}/man'
798
799ac_prev=
800ac_dashdash=
801for ac_option
802do
803  # If the previous option needs an argument, assign it.
804  if test -n "$ac_prev"; then
805    eval $ac_prev=\$ac_option
806    ac_prev=
807    continue
808  fi
809
810  case $ac_option in
811  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
812  *)	ac_optarg=yes ;;
813  esac
814
815  # Accept the important Cygnus configure options, so we can diagnose typos.
816
817  case $ac_dashdash$ac_option in
818  --)
819    ac_dashdash=yes ;;
820
821  -bindir | --bindir | --bindi | --bind | --bin | --bi)
822    ac_prev=bindir ;;
823  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
824    bindir=$ac_optarg ;;
825
826  -build | --build | --buil | --bui | --bu)
827    ac_prev=build_alias ;;
828  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
829    build_alias=$ac_optarg ;;
830
831  -cache-file | --cache-file | --cache-fil | --cache-fi \
832  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
833    ac_prev=cache_file ;;
834  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
835  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
836    cache_file=$ac_optarg ;;
837
838  --config-cache | -C)
839    cache_file=config.cache ;;
840
841  -datadir | --datadir | --datadi | --datad)
842    ac_prev=datadir ;;
843  -datadir=* | --datadir=* | --datadi=* | --datad=*)
844    datadir=$ac_optarg ;;
845
846  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
847  | --dataroo | --dataro | --datar)
848    ac_prev=datarootdir ;;
849  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
850  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
851    datarootdir=$ac_optarg ;;
852
853  -disable-* | --disable-*)
854    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
855    # Reject names that are not valid shell variable names.
856    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
857      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
858   { (exit 1); exit 1; }; }
859    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
860    eval enable_$ac_feature=no ;;
861
862  -docdir | --docdir | --docdi | --doc | --do)
863    ac_prev=docdir ;;
864  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
865    docdir=$ac_optarg ;;
866
867  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
868    ac_prev=dvidir ;;
869  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
870    dvidir=$ac_optarg ;;
871
872  -enable-* | --enable-*)
873    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
874    # Reject names that are not valid shell variable names.
875    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
876      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
877   { (exit 1); exit 1; }; }
878    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
879    eval enable_$ac_feature=\$ac_optarg ;;
880
881  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
882  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
883  | --exec | --exe | --ex)
884    ac_prev=exec_prefix ;;
885  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
886  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
887  | --exec=* | --exe=* | --ex=*)
888    exec_prefix=$ac_optarg ;;
889
890  -gas | --gas | --ga | --g)
891    # Obsolete; use --with-gas.
892    with_gas=yes ;;
893
894  -help | --help | --hel | --he | -h)
895    ac_init_help=long ;;
896  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
897    ac_init_help=recursive ;;
898  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
899    ac_init_help=short ;;
900
901  -host | --host | --hos | --ho)
902    ac_prev=host_alias ;;
903  -host=* | --host=* | --hos=* | --ho=*)
904    host_alias=$ac_optarg ;;
905
906  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
907    ac_prev=htmldir ;;
908  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
909  | --ht=*)
910    htmldir=$ac_optarg ;;
911
912  -includedir | --includedir | --includedi | --included | --include \
913  | --includ | --inclu | --incl | --inc)
914    ac_prev=includedir ;;
915  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
916  | --includ=* | --inclu=* | --incl=* | --inc=*)
917    includedir=$ac_optarg ;;
918
919  -infodir | --infodir | --infodi | --infod | --info | --inf)
920    ac_prev=infodir ;;
921  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
922    infodir=$ac_optarg ;;
923
924  -libdir | --libdir | --libdi | --libd)
925    ac_prev=libdir ;;
926  -libdir=* | --libdir=* | --libdi=* | --libd=*)
927    libdir=$ac_optarg ;;
928
929  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
930  | --libexe | --libex | --libe)
931    ac_prev=libexecdir ;;
932  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
933  | --libexe=* | --libex=* | --libe=*)
934    libexecdir=$ac_optarg ;;
935
936  -localedir | --localedir | --localedi | --localed | --locale)
937    ac_prev=localedir ;;
938  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
939    localedir=$ac_optarg ;;
940
941  -localstatedir | --localstatedir | --localstatedi | --localstated \
942  | --localstate | --localstat | --localsta | --localst | --locals)
943    ac_prev=localstatedir ;;
944  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
945  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
946    localstatedir=$ac_optarg ;;
947
948  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
949    ac_prev=mandir ;;
950  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
951    mandir=$ac_optarg ;;
952
953  -nfp | --nfp | --nf)
954    # Obsolete; use --without-fp.
955    with_fp=no ;;
956
957  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
958  | --no-cr | --no-c | -n)
959    no_create=yes ;;
960
961  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
962  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
963    no_recursion=yes ;;
964
965  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
966  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
967  | --oldin | --oldi | --old | --ol | --o)
968    ac_prev=oldincludedir ;;
969  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
970  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
971  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
972    oldincludedir=$ac_optarg ;;
973
974  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
975    ac_prev=prefix ;;
976  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
977    prefix=$ac_optarg ;;
978
979  -program-prefix | --program-prefix | --program-prefi | --program-pref \
980  | --program-pre | --program-pr | --program-p)
981    ac_prev=program_prefix ;;
982  -program-prefix=* | --program-prefix=* | --program-prefi=* \
983  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
984    program_prefix=$ac_optarg ;;
985
986  -program-suffix | --program-suffix | --program-suffi | --program-suff \
987  | --program-suf | --program-su | --program-s)
988    ac_prev=program_suffix ;;
989  -program-suffix=* | --program-suffix=* | --program-suffi=* \
990  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
991    program_suffix=$ac_optarg ;;
992
993  -program-transform-name | --program-transform-name \
994  | --program-transform-nam | --program-transform-na \
995  | --program-transform-n | --program-transform- \
996  | --program-transform | --program-transfor \
997  | --program-transfo | --program-transf \
998  | --program-trans | --program-tran \
999  | --progr-tra | --program-tr | --program-t)
1000    ac_prev=program_transform_name ;;
1001  -program-transform-name=* | --program-transform-name=* \
1002  | --program-transform-nam=* | --program-transform-na=* \
1003  | --program-transform-n=* | --program-transform-=* \
1004  | --program-transform=* | --program-transfor=* \
1005  | --program-transfo=* | --program-transf=* \
1006  | --program-trans=* | --program-tran=* \
1007  | --progr-tra=* | --program-tr=* | --program-t=*)
1008    program_transform_name=$ac_optarg ;;
1009
1010  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1011    ac_prev=pdfdir ;;
1012  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1013    pdfdir=$ac_optarg ;;
1014
1015  -psdir | --psdir | --psdi | --psd | --ps)
1016    ac_prev=psdir ;;
1017  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1018    psdir=$ac_optarg ;;
1019
1020  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1021  | -silent | --silent | --silen | --sile | --sil)
1022    silent=yes ;;
1023
1024  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1025    ac_prev=sbindir ;;
1026  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1027  | --sbi=* | --sb=*)
1028    sbindir=$ac_optarg ;;
1029
1030  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1031  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1032  | --sharedst | --shareds | --shared | --share | --shar \
1033  | --sha | --sh)
1034    ac_prev=sharedstatedir ;;
1035  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1036  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1037  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1038  | --sha=* | --sh=*)
1039    sharedstatedir=$ac_optarg ;;
1040
1041  -site | --site | --sit)
1042    ac_prev=site ;;
1043  -site=* | --site=* | --sit=*)
1044    site=$ac_optarg ;;
1045
1046  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1047    ac_prev=srcdir ;;
1048  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1049    srcdir=$ac_optarg ;;
1050
1051  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1052  | --syscon | --sysco | --sysc | --sys | --sy)
1053    ac_prev=sysconfdir ;;
1054  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1055  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1056    sysconfdir=$ac_optarg ;;
1057
1058  -target | --target | --targe | --targ | --tar | --ta | --t)
1059    ac_prev=target_alias ;;
1060  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1061    target_alias=$ac_optarg ;;
1062
1063  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1064    verbose=yes ;;
1065
1066  -version | --version | --versio | --versi | --vers | -V)
1067    ac_init_version=: ;;
1068
1069  -with-* | --with-*)
1070    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1071    # Reject names that are not valid shell variable names.
1072    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1073      { echo "$as_me: error: invalid package name: $ac_package" >&2
1074   { (exit 1); exit 1; }; }
1075    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1076    eval with_$ac_package=\$ac_optarg ;;
1077
1078  -without-* | --without-*)
1079    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1080    # Reject names that are not valid shell variable names.
1081    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1082      { echo "$as_me: error: invalid package name: $ac_package" >&2
1083   { (exit 1); exit 1; }; }
1084    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1085    eval with_$ac_package=no ;;
1086
1087  --x)
1088    # Obsolete; use --with-x.
1089    with_x=yes ;;
1090
1091  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1092  | --x-incl | --x-inc | --x-in | --x-i)
1093    ac_prev=x_includes ;;
1094  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1095  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1096    x_includes=$ac_optarg ;;
1097
1098  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1099  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1100    ac_prev=x_libraries ;;
1101  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1102  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1103    x_libraries=$ac_optarg ;;
1104
1105  -*) { echo "$as_me: error: unrecognized option: $ac_option
1106Try \`$0 --help' for more information." >&2
1107   { (exit 1); exit 1; }; }
1108    ;;
1109
1110  *=*)
1111    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1112    # Reject names that are not valid shell variable names.
1113    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1114      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1115   { (exit 1); exit 1; }; }
1116    eval $ac_envvar=\$ac_optarg
1117    export $ac_envvar ;;
1118
1119  *)
1120    # FIXME: should be removed in autoconf 3.0.
1121    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1122    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1123      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1124    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1125    ;;
1126
1127  esac
1128done
1129
1130if test -n "$ac_prev"; then
1131  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1132  { echo "$as_me: error: missing argument to $ac_option" >&2
1133   { (exit 1); exit 1; }; }
1134fi
1135
1136# Be sure to have absolute directory names.
1137for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1138		datadir sysconfdir sharedstatedir localstatedir includedir \
1139		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1140		libdir localedir mandir
1141do
1142  eval ac_val=\$$ac_var
1143  case $ac_val in
1144    [\\/$]* | ?:[\\/]* )  continue;;
1145    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1146  esac
1147  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1148   { (exit 1); exit 1; }; }
1149done
1150
1151# There might be people who depend on the old broken behavior: `$host'
1152# used to hold the argument of --host etc.
1153# FIXME: To remove some day.
1154build=$build_alias
1155host=$host_alias
1156target=$target_alias
1157
1158# FIXME: To remove some day.
1159if test "x$host_alias" != x; then
1160  if test "x$build_alias" = x; then
1161    cross_compiling=maybe
1162    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1163    If a cross compiler is detected then cross compile mode will be used." >&2
1164  elif test "x$build_alias" != "x$host_alias"; then
1165    cross_compiling=yes
1166  fi
1167fi
1168
1169ac_tool_prefix=
1170test -n "$host_alias" && ac_tool_prefix=$host_alias-
1171
1172test "$silent" = yes && exec 6>/dev/null
1173
1174
1175ac_pwd=`pwd` && test -n "$ac_pwd" &&
1176ac_ls_di=`ls -di .` &&
1177ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1178  { echo "$as_me: error: Working directory cannot be determined" >&2
1179   { (exit 1); exit 1; }; }
1180test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1181  { echo "$as_me: error: pwd does not report name of working directory" >&2
1182   { (exit 1); exit 1; }; }
1183
1184
1185# Find the source files, if location was not specified.
1186if test -z "$srcdir"; then
1187  ac_srcdir_defaulted=yes
1188  # Try the directory containing this script, then the parent directory.
1189  ac_confdir=`$as_dirname -- "$0" ||
1190$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1191	 X"$0" : 'X\(//\)[^/]' \| \
1192	 X"$0" : 'X\(//\)$' \| \
1193	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1194echo X"$0" |
1195    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1196	    s//\1/
1197	    q
1198	  }
1199	  /^X\(\/\/\)[^/].*/{
1200	    s//\1/
1201	    q
1202	  }
1203	  /^X\(\/\/\)$/{
1204	    s//\1/
1205	    q
1206	  }
1207	  /^X\(\/\).*/{
1208	    s//\1/
1209	    q
1210	  }
1211	  s/.*/./; q'`
1212  srcdir=$ac_confdir
1213  if test ! -r "$srcdir/$ac_unique_file"; then
1214    srcdir=..
1215  fi
1216else
1217  ac_srcdir_defaulted=no
1218fi
1219if test ! -r "$srcdir/$ac_unique_file"; then
1220  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1221  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1222   { (exit 1); exit 1; }; }
1223fi
1224ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1225ac_abs_confdir=`(
1226	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1227   { (exit 1); exit 1; }; }
1228	pwd)`
1229# When building in place, set srcdir=.
1230if test "$ac_abs_confdir" = "$ac_pwd"; then
1231  srcdir=.
1232fi
1233# Remove unnecessary trailing slashes from srcdir.
1234# Double slashes in file names in object file debugging info
1235# mess up M-x gdb in Emacs.
1236case $srcdir in
1237*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1238esac
1239for ac_var in $ac_precious_vars; do
1240  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1241  eval ac_env_${ac_var}_value=\$${ac_var}
1242  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1243  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1244done
1245
1246#
1247# Report the --help message.
1248#
1249if test "$ac_init_help" = "long"; then
1250  # Omit some internal or obsolete options to make the list less imposing.
1251  # This message is too long to be a string in the A/UX 3.1 sh.
1252  cat <<_ACEOF
1253\`configure' configures shellicon 2.2 to adapt to many kinds of systems.
1254
1255Usage: $0 [OPTION]... [VAR=VALUE]...
1256
1257To assign environment variables (e.g., CC, CFLAGS...), specify them as
1258VAR=VALUE.  See below for descriptions of some of the useful variables.
1259
1260Defaults for the options are specified in brackets.
1261
1262Configuration:
1263  -h, --help              display this help and exit
1264      --help=short        display options specific to this package
1265      --help=recursive    display the short help of all the included packages
1266  -V, --version           display version information and exit
1267  -q, --quiet, --silent   do not print \`checking...' messages
1268      --cache-file=FILE   cache test results in FILE [disabled]
1269  -C, --config-cache      alias for \`--cache-file=config.cache'
1270  -n, --no-create         do not create output files
1271      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1272
1273Installation directories:
1274  --prefix=PREFIX         install architecture-independent files in PREFIX
1275			  [$ac_default_prefix]
1276  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1277			  [PREFIX]
1278
1279By default, \`make install' will install all the files in
1280\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1281an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1282for instance \`--prefix=\$HOME'.
1283
1284For better control, use the options below.
1285
1286Fine tuning of the installation directories:
1287  --bindir=DIR           user executables [EPREFIX/bin]
1288  --sbindir=DIR          system admin executables [EPREFIX/sbin]
1289  --libexecdir=DIR       program executables [EPREFIX/libexec]
1290  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1291  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1292  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1293  --libdir=DIR           object code libraries [EPREFIX/lib]
1294  --includedir=DIR       C header files [PREFIX/include]
1295  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1296  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1297  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1298  --infodir=DIR          info documentation [DATAROOTDIR/info]
1299  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1300  --mandir=DIR           man documentation [DATAROOTDIR/man]
1301  --docdir=DIR           documentation root [DATAROOTDIR/doc/shellicon]
1302  --htmldir=DIR          html documentation [DOCDIR]
1303  --dvidir=DIR           dvi documentation [DOCDIR]
1304  --pdfdir=DIR           pdf documentation [DOCDIR]
1305  --psdir=DIR            ps documentation [DOCDIR]
1306_ACEOF
1307
1308  cat <<\_ACEOF
1309
1310X features:
1311  --x-includes=DIR    X include files are in DIR
1312  --x-libraries=DIR   X library files are in DIR
1313_ACEOF
1314fi
1315
1316if test -n "$ac_init_help"; then
1317  case $ac_init_help in
1318     short | recursive ) echo "Configuration of shellicon 2.2:";;
1319   esac
1320  cat <<\_ACEOF
1321
1322Optional Features:
1323  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1324  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1325  --enable-threads        build with threads
1326  --enable-shared         build and link with shared libraries (default: on)
1327  --enable-64bit          enable 64bit support (default: off)
1328  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1329  --disable-rpath         disable rpath support (default: on)
1330  --enable-wince          enable Win/CE support (where applicable)
1331  --enable-symbols        build with debugging symbols (default: off)
1332
1333Optional Packages:
1334  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1335  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1336  --with-tcl              directory containing tcl configuration
1337                          (tclConfig.sh)
1338  --with-tk               directory containing tk configuration (tkConfig.sh)
1339  --with-tclinclude       directory containing the public Tcl header files
1340  --with-tkinclude        directory containing the public Tk header files
1341  --with-x                use the X Window System
1342  --with-celib=DIR        use Windows/CE support library from DIR
1343
1344Some influential environment variables:
1345  CC          C compiler command
1346  CFLAGS      C compiler flags
1347  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1348              nonstandard directory <lib dir>
1349  LIBS        libraries to pass to the linker, e.g. -l<library>
1350  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1351              you have headers in a nonstandard directory <include dir>
1352  CPP         C preprocessor
1353  XMKMF       Path to xmkmf, Makefile generator for X Window System
1354
1355Use these variables to override the choices made by `configure' or to help
1356it to find libraries and programs with nonstandard names/locations.
1357
1358_ACEOF
1359ac_status=$?
1360fi
1361
1362if test "$ac_init_help" = "recursive"; then
1363  # If there are subdirs, report their specific --help.
1364  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1365    test -d "$ac_dir" || continue
1366    ac_builddir=.
1367
1368case "$ac_dir" in
1369.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1370*)
1371  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1372  # A ".." for each directory in $ac_dir_suffix.
1373  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1374  case $ac_top_builddir_sub in
1375  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1376  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1377  esac ;;
1378esac
1379ac_abs_top_builddir=$ac_pwd
1380ac_abs_builddir=$ac_pwd$ac_dir_suffix
1381# for backward compatibility:
1382ac_top_builddir=$ac_top_build_prefix
1383
1384case $srcdir in
1385  .)  # We are building in place.
1386    ac_srcdir=.
1387    ac_top_srcdir=$ac_top_builddir_sub
1388    ac_abs_top_srcdir=$ac_pwd ;;
1389  [\\/]* | ?:[\\/]* )  # Absolute name.
1390    ac_srcdir=$srcdir$ac_dir_suffix;
1391    ac_top_srcdir=$srcdir
1392    ac_abs_top_srcdir=$srcdir ;;
1393  *) # Relative name.
1394    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1395    ac_top_srcdir=$ac_top_build_prefix$srcdir
1396    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1397esac
1398ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1399
1400    cd "$ac_dir" || { ac_status=$?; continue; }
1401    # Check for guested configure.
1402    if test -f "$ac_srcdir/configure.gnu"; then
1403      echo &&
1404      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1405    elif test -f "$ac_srcdir/configure"; then
1406      echo &&
1407      $SHELL "$ac_srcdir/configure" --help=recursive
1408    else
1409      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1410    fi || ac_status=$?
1411    cd "$ac_pwd" || { ac_status=$?; break; }
1412  done
1413fi
1414
1415test -n "$ac_init_help" && exit $ac_status
1416if $ac_init_version; then
1417  cat <<\_ACEOF
1418shellicon configure 2.2
1419generated by GNU Autoconf 2.61
1420
1421Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14222002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1423This configure script is free software; the Free Software Foundation
1424gives unlimited permission to copy, distribute and modify it.
1425_ACEOF
1426  exit
1427fi
1428cat >config.log <<_ACEOF
1429This file contains any messages produced by compilers while
1430running configure, to aid debugging if configure makes a mistake.
1431
1432It was created by shellicon $as_me 2.2, which was
1433generated by GNU Autoconf 2.61.  Invocation command line was
1434
1435  $ $0 $@
1436
1437_ACEOF
1438exec 5>>config.log
1439{
1440cat <<_ASUNAME
1441## --------- ##
1442## Platform. ##
1443## --------- ##
1444
1445hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1446uname -m = `(uname -m) 2>/dev/null || echo unknown`
1447uname -r = `(uname -r) 2>/dev/null || echo unknown`
1448uname -s = `(uname -s) 2>/dev/null || echo unknown`
1449uname -v = `(uname -v) 2>/dev/null || echo unknown`
1450
1451/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1452/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1453
1454/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1455/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1456/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1457/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1458/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1459/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1460/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1461
1462_ASUNAME
1463
1464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1465for as_dir in $PATH
1466do
1467  IFS=$as_save_IFS
1468  test -z "$as_dir" && as_dir=.
1469  echo "PATH: $as_dir"
1470done
1471IFS=$as_save_IFS
1472
1473} >&5
1474
1475cat >&5 <<_ACEOF
1476
1477
1478## ----------- ##
1479## Core tests. ##
1480## ----------- ##
1481
1482_ACEOF
1483
1484
1485# Keep a trace of the command line.
1486# Strip out --no-create and --no-recursion so they do not pile up.
1487# Strip out --silent because we don't want to record it for future runs.
1488# Also quote any args containing shell meta-characters.
1489# Make two passes to allow for proper duplicate-argument suppression.
1490ac_configure_args=
1491ac_configure_args0=
1492ac_configure_args1=
1493ac_must_keep_next=false
1494for ac_pass in 1 2
1495do
1496  for ac_arg
1497  do
1498    case $ac_arg in
1499    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1500    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1501    | -silent | --silent | --silen | --sile | --sil)
1502      continue ;;
1503    *\'*)
1504      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1505    esac
1506    case $ac_pass in
1507    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1508    2)
1509      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1510      if test $ac_must_keep_next = true; then
1511	ac_must_keep_next=false # Got value, back to normal.
1512      else
1513	case $ac_arg in
1514	  *=* | --config-cache | -C | -disable-* | --disable-* \
1515	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1516	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1517	  | -with-* | --with-* | -without-* | --without-* | --x)
1518	    case "$ac_configure_args0 " in
1519	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1520	    esac
1521	    ;;
1522	  -* ) ac_must_keep_next=true ;;
1523	esac
1524      fi
1525      ac_configure_args="$ac_configure_args '$ac_arg'"
1526      ;;
1527    esac
1528  done
1529done
1530$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1531$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1532
1533# When interrupted or exit'd, cleanup temporary files, and complete
1534# config.log.  We remove comments because anyway the quotes in there
1535# would cause problems or look ugly.
1536# WARNING: Use '\'' to represent an apostrophe within the trap.
1537# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1538trap 'exit_status=$?
1539  # Save into config.log some information that might help in debugging.
1540  {
1541    echo
1542
1543    cat <<\_ASBOX
1544## ---------------- ##
1545## Cache variables. ##
1546## ---------------- ##
1547_ASBOX
1548    echo
1549    # The following way of writing the cache mishandles newlines in values,
1550(
1551  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1552    eval ac_val=\$$ac_var
1553    case $ac_val in #(
1554    *${as_nl}*)
1555      case $ac_var in #(
1556      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1557echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1558      esac
1559      case $ac_var in #(
1560      _ | IFS | as_nl) ;; #(
1561      *) $as_unset $ac_var ;;
1562      esac ;;
1563    esac
1564  done
1565  (set) 2>&1 |
1566    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1567    *${as_nl}ac_space=\ *)
1568      sed -n \
1569	"s/'\''/'\''\\\\'\'''\''/g;
1570	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1571      ;; #(
1572    *)
1573      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1574      ;;
1575    esac |
1576    sort
1577)
1578    echo
1579
1580    cat <<\_ASBOX
1581## ----------------- ##
1582## Output variables. ##
1583## ----------------- ##
1584_ASBOX
1585    echo
1586    for ac_var in $ac_subst_vars
1587    do
1588      eval ac_val=\$$ac_var
1589      case $ac_val in
1590      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1591      esac
1592      echo "$ac_var='\''$ac_val'\''"
1593    done | sort
1594    echo
1595
1596    if test -n "$ac_subst_files"; then
1597      cat <<\_ASBOX
1598## ------------------- ##
1599## File substitutions. ##
1600## ------------------- ##
1601_ASBOX
1602      echo
1603      for ac_var in $ac_subst_files
1604      do
1605	eval ac_val=\$$ac_var
1606	case $ac_val in
1607	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1608	esac
1609	echo "$ac_var='\''$ac_val'\''"
1610      done | sort
1611      echo
1612    fi
1613
1614    if test -s confdefs.h; then
1615      cat <<\_ASBOX
1616## ----------- ##
1617## confdefs.h. ##
1618## ----------- ##
1619_ASBOX
1620      echo
1621      cat confdefs.h
1622      echo
1623    fi
1624    test "$ac_signal" != 0 &&
1625      echo "$as_me: caught signal $ac_signal"
1626    echo "$as_me: exit $exit_status"
1627  } >&5
1628  rm -f core *.core core.conftest.* &&
1629    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1630    exit $exit_status
1631' 0
1632for ac_signal in 1 2 13 15; do
1633  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1634done
1635ac_signal=0
1636
1637# confdefs.h avoids OS command line length limits that DEFS can exceed.
1638rm -f -r conftest* confdefs.h
1639
1640# Predefined preprocessor variables.
1641
1642cat >>confdefs.h <<_ACEOF
1643#define PACKAGE_NAME "$PACKAGE_NAME"
1644_ACEOF
1645
1646
1647cat >>confdefs.h <<_ACEOF
1648#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1649_ACEOF
1650
1651
1652cat >>confdefs.h <<_ACEOF
1653#define PACKAGE_VERSION "$PACKAGE_VERSION"
1654_ACEOF
1655
1656
1657cat >>confdefs.h <<_ACEOF
1658#define PACKAGE_STRING "$PACKAGE_STRING"
1659_ACEOF
1660
1661
1662cat >>confdefs.h <<_ACEOF
1663#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1664_ACEOF
1665
1666
1667# Let the site file select an alternate cache file if it wants to.
1668# Prefer explicitly selected file to automatically selected ones.
1669if test -n "$CONFIG_SITE"; then
1670  set x "$CONFIG_SITE"
1671elif test "x$prefix" != xNONE; then
1672  set x "$prefix/share/config.site" "$prefix/etc/config.site"
1673else
1674  set x "$ac_default_prefix/share/config.site" \
1675	"$ac_default_prefix/etc/config.site"
1676fi
1677shift
1678for ac_site_file
1679do
1680  if test -r "$ac_site_file"; then
1681    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1682echo "$as_me: loading site script $ac_site_file" >&6;}
1683    sed 's/^/| /' "$ac_site_file" >&5
1684    . "$ac_site_file"
1685  fi
1686done
1687
1688if test -r "$cache_file"; then
1689  # Some versions of bash will fail to source /dev/null (special
1690  # files actually), so we avoid doing that.
1691  if test -f "$cache_file"; then
1692    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1693echo "$as_me: loading cache $cache_file" >&6;}
1694    case $cache_file in
1695      [\\/]* | ?:[\\/]* ) . "$cache_file";;
1696      *)                      . "./$cache_file";;
1697    esac
1698  fi
1699else
1700  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1701echo "$as_me: creating cache $cache_file" >&6;}
1702  >$cache_file
1703fi
1704
1705# Check that the precious variables saved in the cache have kept the same
1706# value.
1707ac_cache_corrupted=false
1708for ac_var in $ac_precious_vars; do
1709  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1710  eval ac_new_set=\$ac_env_${ac_var}_set
1711  eval ac_old_val=\$ac_cv_env_${ac_var}_value
1712  eval ac_new_val=\$ac_env_${ac_var}_value
1713  case $ac_old_set,$ac_new_set in
1714    set,)
1715      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1716echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1717      ac_cache_corrupted=: ;;
1718    ,set)
1719      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1720echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1721      ac_cache_corrupted=: ;;
1722    ,);;
1723    *)
1724      if test "x$ac_old_val" != "x$ac_new_val"; then
1725	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1726echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1727	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1728echo "$as_me:   former value:  $ac_old_val" >&2;}
1729	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1730echo "$as_me:   current value: $ac_new_val" >&2;}
1731	ac_cache_corrupted=:
1732      fi;;
1733  esac
1734  # Pass precious variables to config.status.
1735  if test "$ac_new_set" = set; then
1736    case $ac_new_val in
1737    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1738    *) ac_arg=$ac_var=$ac_new_val ;;
1739    esac
1740    case " $ac_configure_args " in
1741      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1742      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1743    esac
1744  fi
1745done
1746if $ac_cache_corrupted; then
1747  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1748echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1749  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1750echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1751   { (exit 1); exit 1; }; }
1752fi
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778ac_ext=c
1779ac_cpp='$CPP $CPPFLAGS'
1780ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1781ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1782ac_compiler_gnu=$ac_cv_c_compiler_gnu
1783
1784
1785PACKAGE_PATCHLEVEL=2.2.10
1786
1787cat >>confdefs.h <<_ACEOF
1788#define PACKAGE_PATCHLEVEL "$PACKAGE_PATCHLEVEL"
1789_ACEOF
1790
1791
1792
1793    # TEA extensions pass this us the version of TEA they think they
1794    # are compatible with.
1795    TEA_VERSION="3.9"
1796
1797    { echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
1798echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6; }
1799    if test x"${PACKAGE_NAME}" = x ; then
1800	{ { echo "$as_me:$LINENO: error:
1801The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
1802echo "$as_me: error:
1803The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
1804   { (exit 1); exit 1; }; }
1805    fi
1806    if test x"3.9" = x ; then
1807	{ { echo "$as_me:$LINENO: error:
1808TEA version not specified." >&5
1809echo "$as_me: error:
1810TEA version not specified." >&2;}
1811   { (exit 1); exit 1; }; }
1812    elif test "3.9" != "${TEA_VERSION}" ; then
1813	{ echo "$as_me:$LINENO: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
1814echo "${ECHO_T}warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
1815    else
1816	{ echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
1817echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6; }
1818    fi
1819    case "`uname -s`" in
1820	*win32*|*WIN32*|*MINGW32_*)
1821	    # Extract the first word of "cygpath", so it can be a program name with args.
1822set dummy cygpath; ac_word=$2
1823{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1824echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1825if test "${ac_cv_prog_CYGPATH+set}" = set; then
1826  echo $ECHO_N "(cached) $ECHO_C" >&6
1827else
1828  if test -n "$CYGPATH"; then
1829  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1830else
1831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1832for as_dir in $PATH
1833do
1834  IFS=$as_save_IFS
1835  test -z "$as_dir" && as_dir=.
1836  for ac_exec_ext in '' $ac_executable_extensions; do
1837  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1838    ac_cv_prog_CYGPATH="cygpath -w"
1839    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1840    break 2
1841  fi
1842done
1843done
1844IFS=$as_save_IFS
1845
1846  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1847fi
1848fi
1849CYGPATH=$ac_cv_prog_CYGPATH
1850if test -n "$CYGPATH"; then
1851  { echo "$as_me:$LINENO: result: $CYGPATH" >&5
1852echo "${ECHO_T}$CYGPATH" >&6; }
1853else
1854  { echo "$as_me:$LINENO: result: no" >&5
1855echo "${ECHO_T}no" >&6; }
1856fi
1857
1858
1859	    EXEEXT=".exe"
1860	    TEA_PLATFORM="windows"
1861	    ;;
1862	*CYGWIN_*)
1863	    CYGPATH=echo
1864	    EXEEXT=".exe"
1865	    # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
1866	    ;;
1867	*)
1868	    CYGPATH=echo
1869	    EXEEXT=""
1870	    TEA_PLATFORM="unix"
1871	    ;;
1872    esac
1873
1874    # Check if exec_prefix is set. If not use fall back to prefix.
1875    # Note when adjusted, so that TEA_PREFIX can correct for this.
1876    # This is needed for recursive configures, since autoconf propagates
1877    # $prefix, but not $exec_prefix (doh!).
1878    if test x$exec_prefix = xNONE ; then
1879	exec_prefix_default=yes
1880	exec_prefix=$prefix
1881    fi
1882
1883
1884
1885
1886    # This package name must be replaced statically for AC_SUBST to work
1887
1888    # Substitute STUB_LIB_FILE in case package creates a stub library too.
1889
1890
1891    # We AC_SUBST these here to ensure they are subst'ed,
1892    # in case the user doesn't call TEA_ADD_...
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902ac_aux_dir=
1903for ac_dir in tclconfig "$srcdir"/tclconfig; do
1904  if test -f "$ac_dir/install-sh"; then
1905    ac_aux_dir=$ac_dir
1906    ac_install_sh="$ac_aux_dir/install-sh -c"
1907    break
1908  elif test -f "$ac_dir/install.sh"; then
1909    ac_aux_dir=$ac_dir
1910    ac_install_sh="$ac_aux_dir/install.sh -c"
1911    break
1912  elif test -f "$ac_dir/shtool"; then
1913    ac_aux_dir=$ac_dir
1914    ac_install_sh="$ac_aux_dir/shtool install -c"
1915    break
1916  fi
1917done
1918if test -z "$ac_aux_dir"; then
1919  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in tclconfig \"$srcdir\"/tclconfig" >&5
1920echo "$as_me: error: cannot find install-sh or install.sh in tclconfig \"$srcdir\"/tclconfig" >&2;}
1921   { (exit 1); exit 1; }; }
1922fi
1923
1924# These three variables are undocumented and unsupported,
1925# and are intended to be withdrawn in a future Autoconf release.
1926# They can cause serious problems if a builder's source tree is in a directory
1927# whose full name contains unusual characters.
1928ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1929ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1930ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1931
1932
1933
1934#--------------------------------------------------------------------
1935# Load the tclConfig.sh file
1936#--------------------------------------------------------------------
1937
1938
1939
1940    #
1941    # Ok, lets find the tcl configuration
1942    # First, look for one uninstalled.
1943    # the alternative search directory is invoked by --with-tcl
1944    #
1945
1946    if test x"${no_tcl}" = x ; then
1947	# we reset no_tcl in case something fails here
1948	no_tcl=true
1949
1950# Check whether --with-tcl was given.
1951if test "${with_tcl+set}" = set; then
1952  withval=$with_tcl; with_tclconfig="${withval}"
1953fi
1954
1955	{ echo "$as_me:$LINENO: checking for Tcl configuration" >&5
1956echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6; }
1957	if test "${ac_cv_c_tclconfig+set}" = set; then
1958  echo $ECHO_N "(cached) $ECHO_C" >&6
1959else
1960
1961
1962	    # First check to see if --with-tcl was specified.
1963	    if test x"${with_tclconfig}" != x ; then
1964		case "${with_tclconfig}" in
1965		    */tclConfig.sh )
1966			if test -f "${with_tclconfig}"; then
1967			    { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
1968echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
1969			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
1970			fi ;;
1971		esac
1972		if test -f "${with_tclconfig}/tclConfig.sh" ; then
1973		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
1974		else
1975		    { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
1976echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
1977   { (exit 1); exit 1; }; }
1978		fi
1979	    fi
1980
1981	    # then check for a private Tcl installation
1982	    if test x"${ac_cv_c_tclconfig}" = x ; then
1983		for i in \
1984			../tcl \
1985			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1986			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
1987			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
1988			../../tcl \
1989			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1990			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
1991			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
1992			../../../tcl \
1993			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1994			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
1995			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
1996		    if test "${TEA_PLATFORM}" = "windows" \
1997			    -a -f "$i/win/tclConfig.sh" ; then
1998			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
1999			break
2000		    fi
2001		    if test -f "$i/unix/tclConfig.sh" ; then
2002			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2003			break
2004		    fi
2005		done
2006	    fi
2007
2008	    # on Darwin, check in Framework installation locations
2009	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
2010		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2011			`ls -d /Library/Frameworks 2>/dev/null` \
2012			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2013			`ls -d /System/Library/Frameworks 2>/dev/null` \
2014			; do
2015		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
2016			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
2017			break
2018		    fi
2019		done
2020	    fi
2021
2022	    # TEA specific: on Windows, check in common installation locations
2023	    if test "${TEA_PLATFORM}" = "windows" \
2024		-a x"${ac_cv_c_tclconfig}" = x ; then
2025		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2026			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2027			; do
2028		    if test -f "$i/tclConfig.sh" ; then
2029			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2030			break
2031		    fi
2032		done
2033	    fi
2034
2035	    # check in a few common install locations
2036	    if test x"${ac_cv_c_tclconfig}" = x ; then
2037		for i in `ls -d ${libdir} 2>/dev/null` \
2038			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2039			`ls -d ${prefix}/lib 2>/dev/null` \
2040			`ls -d /usr/local/lib 2>/dev/null` \
2041			`ls -d /usr/contrib/lib 2>/dev/null` \
2042			`ls -d /usr/lib 2>/dev/null` \
2043			`ls -d /usr/lib64 2>/dev/null` \
2044			; do
2045		    if test -f "$i/tclConfig.sh" ; then
2046			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2047			break
2048		    fi
2049		done
2050	    fi
2051
2052	    # check in a few other private locations
2053	    if test x"${ac_cv_c_tclconfig}" = x ; then
2054		for i in \
2055			${srcdir}/../tcl \
2056			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2057			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2058			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2059		    if test "${TEA_PLATFORM}" = "windows" \
2060			    -a -f "$i/win/tclConfig.sh" ; then
2061			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2062			break
2063		    fi
2064		    if test -f "$i/unix/tclConfig.sh" ; then
2065			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2066			break
2067		    fi
2068		done
2069	    fi
2070
2071fi
2072
2073
2074	if test x"${ac_cv_c_tclconfig}" = x ; then
2075	    TCL_BIN_DIR="# no Tcl configs found"
2076	    { { echo "$as_me:$LINENO: error: Can't find Tcl configuration definitions" >&5
2077echo "$as_me: error: Can't find Tcl configuration definitions" >&2;}
2078   { (exit 1); exit 1; }; }
2079	else
2080	    no_tcl=
2081	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
2082	    { echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2083echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2084	fi
2085    fi
2086
2087
2088    { echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
2089echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6; }
2090
2091    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
2092        { echo "$as_me:$LINENO: result: loading" >&5
2093echo "${ECHO_T}loading" >&6; }
2094	. "${TCL_BIN_DIR}/tclConfig.sh"
2095    else
2096        { echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
2097echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2098    fi
2099
2100    # eval is required to do the TCL_DBGX substitution
2101    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
2102    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
2103
2104    # If the TCL_BIN_DIR is the build directory (not the install directory),
2105    # then set the common variable name to the value of the build variables.
2106    # For example, the variable TCL_LIB_SPEC will be set to the value
2107    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
2108    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
2109    # installed and uninstalled version of Tcl.
2110    if test -f "${TCL_BIN_DIR}/Makefile" ; then
2111        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
2112        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
2113        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
2114    elif test "`uname -s`" = "Darwin"; then
2115	# If Tcl was built as a framework, attempt to use the libraries
2116	# from the framework at the given location so that linking works
2117	# against Tcl.framework installed in an arbitrary location.
2118	case ${TCL_DEFS} in
2119	    *TCL_FRAMEWORK*)
2120		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
2121		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
2122			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
2123			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
2124			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
2125			    break
2126			fi
2127		    done
2128		fi
2129		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
2130		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
2131		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
2132		fi
2133		;;
2134	esac
2135    fi
2136
2137    # eval is required to do the TCL_DBGX substitution
2138    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
2139    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
2140    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
2141    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156    case "`uname -s`" in
2157	*CYGWIN_*)
2158	    { echo "$as_me:$LINENO: checking for cygwin variant" >&5
2159echo $ECHO_N "checking for cygwin variant... $ECHO_C" >&6; }
2160	    case ${TCL_EXTRA_CFLAGS} in
2161		*-mwin32*|*-mno-cygwin*)
2162		    TEA_PLATFORM="windows"
2163		    CFLAGS="$CFLAGS -mwin32"
2164		    { echo "$as_me:$LINENO: result: win32" >&5
2165echo "${ECHO_T}win32" >&6; }
2166		    ;;
2167		*)
2168		    TEA_PLATFORM="unix"
2169		    { echo "$as_me:$LINENO: result: unix" >&5
2170echo "${ECHO_T}unix" >&6; }
2171		    ;;
2172	    esac
2173	    EXEEXT=".exe"
2174	    ;;
2175	*)
2176	    ;;
2177    esac
2178
2179    # Do this here as we have fully defined TEA_PLATFORM now
2180    if test "${TEA_PLATFORM}" = "windows" ; then
2181	# The BUILD_$pkg is to define the correct extern storage class
2182	# handling when making this package
2183
2184cat >>confdefs.h <<_ACEOF
2185#define BUILD_${PACKAGE_NAME}
2186_ACEOF
2187
2188	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
2189    fi
2190
2191    # TEA specific:
2192
2193
2194
2195
2196
2197
2198
2199
2200#--------------------------------------------------------------------
2201# Load the tkConfig.sh file if necessary (Tk extension)
2202#--------------------------------------------------------------------
2203
2204
2205    #
2206    # Ok, lets find the tk configuration
2207    # First, look for one uninstalled.
2208    # the alternative search directory is invoked by --with-tk
2209    #
2210
2211    if test x"${no_tk}" = x ; then
2212	# we reset no_tk in case something fails here
2213	no_tk=true
2214
2215# Check whether --with-tk was given.
2216if test "${with_tk+set}" = set; then
2217  withval=$with_tk; with_tkconfig="${withval}"
2218fi
2219
2220	{ echo "$as_me:$LINENO: checking for Tk configuration" >&5
2221echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6; }
2222	if test "${ac_cv_c_tkconfig+set}" = set; then
2223  echo $ECHO_N "(cached) $ECHO_C" >&6
2224else
2225
2226
2227	    # First check to see if --with-tkconfig was specified.
2228	    if test x"${with_tkconfig}" != x ; then
2229		case "${with_tkconfig}" in
2230		    */tkConfig.sh )
2231			if test -f "${with_tkconfig}"; then
2232			    { echo "$as_me:$LINENO: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&5
2233echo "$as_me: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&2;}
2234			    with_tkconfig="`echo "${with_tkconfig}" | sed 's!/tkConfig\.sh$!!'`"
2235			fi ;;
2236		esac
2237		if test -f "${with_tkconfig}/tkConfig.sh" ; then
2238		    ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`"
2239		else
2240		    { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
2241echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
2242   { (exit 1); exit 1; }; }
2243		fi
2244	    fi
2245
2246	    # then check for a private Tk library
2247	    if test x"${ac_cv_c_tkconfig}" = x ; then
2248		for i in \
2249			../tk \
2250			`ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2251			`ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
2252			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
2253			../../tk \
2254			`ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2255			`ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
2256			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
2257			../../../tk \
2258			`ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2259			`ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
2260			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
2261		    if test "${TEA_PLATFORM}" = "windows" \
2262			    -a -f "$i/win/tkConfig.sh" ; then
2263			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
2264			break
2265		    fi
2266		    if test -f "$i/unix/tkConfig.sh" ; then
2267			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
2268			break
2269		    fi
2270		done
2271	    fi
2272
2273	    # on Darwin, check in Framework installation locations
2274	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
2275		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2276			`ls -d /Library/Frameworks 2>/dev/null` \
2277			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2278			`ls -d /System/Library/Frameworks 2>/dev/null` \
2279			; do
2280		    if test -f "$i/Tk.framework/tkConfig.sh" ; then
2281			ac_cv_c_tkconfig="`(cd $i/Tk.framework; pwd)`"
2282			break
2283		    fi
2284		done
2285	    fi
2286
2287	    # check in a few common install locations
2288	    if test x"${ac_cv_c_tkconfig}" = x ; then
2289		for i in `ls -d ${libdir} 2>/dev/null` \
2290			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2291			`ls -d ${prefix}/lib 2>/dev/null` \
2292			`ls -d /usr/local/lib 2>/dev/null` \
2293			`ls -d /usr/contrib/lib 2>/dev/null` \
2294			`ls -d /usr/lib 2>/dev/null` \
2295			`ls -d /usr/lib64 2>/dev/null` \
2296			; do
2297		    if test -f "$i/tkConfig.sh" ; then
2298			ac_cv_c_tkconfig="`(cd $i; pwd)`"
2299			break
2300		    fi
2301		done
2302	    fi
2303
2304	    # TEA specific: on Windows, check in common installation locations
2305	    if test "${TEA_PLATFORM}" = "windows" \
2306		-a x"${ac_cv_c_tkconfig}" = x ; then
2307		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2308			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2309			; do
2310		    if test -f "$i/tkConfig.sh" ; then
2311			ac_cv_c_tkconfig="`(cd $i; pwd)`"
2312			break
2313		    fi
2314		done
2315	    fi
2316
2317	    # check in a few other private locations
2318	    if test x"${ac_cv_c_tkconfig}" = x ; then
2319		for i in \
2320			${srcdir}/../tk \
2321			`ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2322			`ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
2323			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
2324		    if test "${TEA_PLATFORM}" = "windows" \
2325			    -a -f "$i/win/tkConfig.sh" ; then
2326			ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
2327			break
2328		    fi
2329		    if test -f "$i/unix/tkConfig.sh" ; then
2330			ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
2331			break
2332		    fi
2333		done
2334	    fi
2335
2336fi
2337
2338
2339	if test x"${ac_cv_c_tkconfig}" = x ; then
2340	    TK_BIN_DIR="# no Tk configs found"
2341	    { { echo "$as_me:$LINENO: error: Can't find Tk configuration definitions" >&5
2342echo "$as_me: error: Can't find Tk configuration definitions" >&2;}
2343   { (exit 1); exit 1; }; }
2344	else
2345	    no_tk=
2346	    TK_BIN_DIR="${ac_cv_c_tkconfig}"
2347	    { echo "$as_me:$LINENO: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
2348echo "${ECHO_T}found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
2349	fi
2350    fi
2351
2352
2353    { echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
2354echo $ECHO_N "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... $ECHO_C" >&6; }
2355
2356    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
2357        { echo "$as_me:$LINENO: result: loading" >&5
2358echo "${ECHO_T}loading" >&6; }
2359	. "${TK_BIN_DIR}/tkConfig.sh"
2360    else
2361        { echo "$as_me:$LINENO: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
2362echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
2363    fi
2364
2365    # eval is required to do the TK_DBGX substitution
2366    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
2367    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
2368
2369    # If the TK_BIN_DIR is the build directory (not the install directory),
2370    # then set the common variable name to the value of the build variables.
2371    # For example, the variable TK_LIB_SPEC will be set to the value
2372    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
2373    # instead of TK_BUILD_LIB_SPEC since it will work with both an
2374    # installed and uninstalled version of Tcl.
2375    if test -f "${TK_BIN_DIR}/Makefile" ; then
2376        TK_LIB_SPEC="${TK_BUILD_LIB_SPEC}"
2377        TK_STUB_LIB_SPEC="${TK_BUILD_STUB_LIB_SPEC}"
2378        TK_STUB_LIB_PATH="${TK_BUILD_STUB_LIB_PATH}"
2379    elif test "`uname -s`" = "Darwin"; then
2380	# If Tk was built as a framework, attempt to use the libraries
2381	# from the framework at the given location so that linking works
2382	# against Tk.framework installed in an arbitrary location.
2383	case ${TK_DEFS} in
2384	    *TK_FRAMEWORK*)
2385		if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
2386		    for i in "`cd "${TK_BIN_DIR}"; pwd`" \
2387			     "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
2388			if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
2389			    TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
2390			    break
2391			fi
2392		    done
2393		fi
2394		if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
2395		    TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
2396		    TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
2397		fi
2398		;;
2399	esac
2400    fi
2401
2402    # eval is required to do the TK_DBGX substitution
2403    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
2404    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
2405    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
2406    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
2407
2408    # TEA specific: Ensure windowingsystem is defined
2409    if test "${TEA_PLATFORM}" = "unix" ; then
2410	case ${TK_DEFS} in
2411	    *MAC_OSX_TK*)
2412
2413cat >>confdefs.h <<\_ACEOF
2414#define MAC_OSX_TK 1
2415_ACEOF
2416
2417		TEA_WINDOWINGSYSTEM="aqua"
2418		;;
2419	    *)
2420		TEA_WINDOWINGSYSTEM="x11"
2421		;;
2422	esac
2423    elif test "${TEA_PLATFORM}" = "windows" ; then
2424	TEA_WINDOWINGSYSTEM="win32"
2425    fi
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439    # TEA specific:
2440
2441
2442
2443
2444#-----------------------------------------------------------------------
2445# Handle the --prefix=... option by defaulting to what Tcl gave.
2446# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
2447#-----------------------------------------------------------------------
2448
2449
2450    if test "${prefix}" = "NONE"; then
2451	prefix_default=yes
2452	if test x"${TCL_PREFIX}" != x; then
2453	    { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
2454echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
2455	    prefix=${TCL_PREFIX}
2456	else
2457	    { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
2458echo "$as_me: --prefix defaulting to /usr/local" >&6;}
2459	    prefix=/usr/local
2460	fi
2461    fi
2462    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
2463	-o x"${exec_prefix_default}" = x"yes" ; then
2464	if test x"${TCL_EXEC_PREFIX}" != x; then
2465	    { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
2466echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
2467	    exec_prefix=${TCL_EXEC_PREFIX}
2468	else
2469	    { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
2470echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
2471	    exec_prefix=$prefix
2472	fi
2473    fi
2474
2475
2476#-----------------------------------------------------------------------
2477# Standard compiler checks.
2478# This sets up CC by using the CC env var, or looks for gcc otherwise.
2479# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
2480# the basic setup necessary to compile executables.
2481#-----------------------------------------------------------------------
2482
2483
2484    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
2485    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
2486
2487    # If the user did not set CFLAGS, set it now to keep
2488    # the AC_PROG_CC macro from adding "-g -O2".
2489    if test "${CFLAGS+set}" != "set" ; then
2490	CFLAGS=""
2491    fi
2492
2493    ac_ext=c
2494ac_cpp='$CPP $CPPFLAGS'
2495ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2496ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2497ac_compiler_gnu=$ac_cv_c_compiler_gnu
2498if test -n "$ac_tool_prefix"; then
2499  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2500set dummy ${ac_tool_prefix}gcc; ac_word=$2
2501{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2502echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2503if test "${ac_cv_prog_CC+set}" = set; then
2504  echo $ECHO_N "(cached) $ECHO_C" >&6
2505else
2506  if test -n "$CC"; then
2507  ac_cv_prog_CC="$CC" # Let the user override the test.
2508else
2509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2510for as_dir in $PATH
2511do
2512  IFS=$as_save_IFS
2513  test -z "$as_dir" && as_dir=.
2514  for ac_exec_ext in '' $ac_executable_extensions; do
2515  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2516    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2517    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2518    break 2
2519  fi
2520done
2521done
2522IFS=$as_save_IFS
2523
2524fi
2525fi
2526CC=$ac_cv_prog_CC
2527if test -n "$CC"; then
2528  { echo "$as_me:$LINENO: result: $CC" >&5
2529echo "${ECHO_T}$CC" >&6; }
2530else
2531  { echo "$as_me:$LINENO: result: no" >&5
2532echo "${ECHO_T}no" >&6; }
2533fi
2534
2535
2536fi
2537if test -z "$ac_cv_prog_CC"; then
2538  ac_ct_CC=$CC
2539  # Extract the first word of "gcc", so it can be a program name with args.
2540set dummy gcc; ac_word=$2
2541{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2542echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2543if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2544  echo $ECHO_N "(cached) $ECHO_C" >&6
2545else
2546  if test -n "$ac_ct_CC"; then
2547  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2548else
2549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2550for as_dir in $PATH
2551do
2552  IFS=$as_save_IFS
2553  test -z "$as_dir" && as_dir=.
2554  for ac_exec_ext in '' $ac_executable_extensions; do
2555  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2556    ac_cv_prog_ac_ct_CC="gcc"
2557    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2558    break 2
2559  fi
2560done
2561done
2562IFS=$as_save_IFS
2563
2564fi
2565fi
2566ac_ct_CC=$ac_cv_prog_ac_ct_CC
2567if test -n "$ac_ct_CC"; then
2568  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2569echo "${ECHO_T}$ac_ct_CC" >&6; }
2570else
2571  { echo "$as_me:$LINENO: result: no" >&5
2572echo "${ECHO_T}no" >&6; }
2573fi
2574
2575  if test "x$ac_ct_CC" = x; then
2576    CC=""
2577  else
2578    case $cross_compiling:$ac_tool_warned in
2579yes:)
2580{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2581whose name does not start with the host triplet.  If you think this
2582configuration is useful to you, please write to autoconf@gnu.org." >&5
2583echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2584whose name does not start with the host triplet.  If you think this
2585configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2586ac_tool_warned=yes ;;
2587esac
2588    CC=$ac_ct_CC
2589  fi
2590else
2591  CC="$ac_cv_prog_CC"
2592fi
2593
2594if test -z "$CC"; then
2595          if test -n "$ac_tool_prefix"; then
2596    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2597set dummy ${ac_tool_prefix}cc; ac_word=$2
2598{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2599echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2600if test "${ac_cv_prog_CC+set}" = set; then
2601  echo $ECHO_N "(cached) $ECHO_C" >&6
2602else
2603  if test -n "$CC"; then
2604  ac_cv_prog_CC="$CC" # Let the user override the test.
2605else
2606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2607for as_dir in $PATH
2608do
2609  IFS=$as_save_IFS
2610  test -z "$as_dir" && as_dir=.
2611  for ac_exec_ext in '' $ac_executable_extensions; do
2612  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2613    ac_cv_prog_CC="${ac_tool_prefix}cc"
2614    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2615    break 2
2616  fi
2617done
2618done
2619IFS=$as_save_IFS
2620
2621fi
2622fi
2623CC=$ac_cv_prog_CC
2624if test -n "$CC"; then
2625  { echo "$as_me:$LINENO: result: $CC" >&5
2626echo "${ECHO_T}$CC" >&6; }
2627else
2628  { echo "$as_me:$LINENO: result: no" >&5
2629echo "${ECHO_T}no" >&6; }
2630fi
2631
2632
2633  fi
2634fi
2635if test -z "$CC"; then
2636  # Extract the first word of "cc", so it can be a program name with args.
2637set dummy cc; ac_word=$2
2638{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2639echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2640if test "${ac_cv_prog_CC+set}" = set; then
2641  echo $ECHO_N "(cached) $ECHO_C" >&6
2642else
2643  if test -n "$CC"; then
2644  ac_cv_prog_CC="$CC" # Let the user override the test.
2645else
2646  ac_prog_rejected=no
2647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2648for as_dir in $PATH
2649do
2650  IFS=$as_save_IFS
2651  test -z "$as_dir" && as_dir=.
2652  for ac_exec_ext in '' $ac_executable_extensions; do
2653  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2654    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2655       ac_prog_rejected=yes
2656       continue
2657     fi
2658    ac_cv_prog_CC="cc"
2659    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2660    break 2
2661  fi
2662done
2663done
2664IFS=$as_save_IFS
2665
2666if test $ac_prog_rejected = yes; then
2667  # We found a bogon in the path, so make sure we never use it.
2668  set dummy $ac_cv_prog_CC
2669  shift
2670  if test $# != 0; then
2671    # We chose a different compiler from the bogus one.
2672    # However, it has the same basename, so the bogon will be chosen
2673    # first if we set CC to just the basename; use the full file name.
2674    shift
2675    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2676  fi
2677fi
2678fi
2679fi
2680CC=$ac_cv_prog_CC
2681if test -n "$CC"; then
2682  { echo "$as_me:$LINENO: result: $CC" >&5
2683echo "${ECHO_T}$CC" >&6; }
2684else
2685  { echo "$as_me:$LINENO: result: no" >&5
2686echo "${ECHO_T}no" >&6; }
2687fi
2688
2689
2690fi
2691if test -z "$CC"; then
2692  if test -n "$ac_tool_prefix"; then
2693  for ac_prog in cl.exe
2694  do
2695    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2696set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2697{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2698echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2699if test "${ac_cv_prog_CC+set}" = set; then
2700  echo $ECHO_N "(cached) $ECHO_C" >&6
2701else
2702  if test -n "$CC"; then
2703  ac_cv_prog_CC="$CC" # Let the user override the test.
2704else
2705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2706for as_dir in $PATH
2707do
2708  IFS=$as_save_IFS
2709  test -z "$as_dir" && as_dir=.
2710  for ac_exec_ext in '' $ac_executable_extensions; do
2711  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2712    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2713    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2714    break 2
2715  fi
2716done
2717done
2718IFS=$as_save_IFS
2719
2720fi
2721fi
2722CC=$ac_cv_prog_CC
2723if test -n "$CC"; then
2724  { echo "$as_me:$LINENO: result: $CC" >&5
2725echo "${ECHO_T}$CC" >&6; }
2726else
2727  { echo "$as_me:$LINENO: result: no" >&5
2728echo "${ECHO_T}no" >&6; }
2729fi
2730
2731
2732    test -n "$CC" && break
2733  done
2734fi
2735if test -z "$CC"; then
2736  ac_ct_CC=$CC
2737  for ac_prog in cl.exe
2738do
2739  # Extract the first word of "$ac_prog", so it can be a program name with args.
2740set dummy $ac_prog; ac_word=$2
2741{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2742echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2743if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2744  echo $ECHO_N "(cached) $ECHO_C" >&6
2745else
2746  if test -n "$ac_ct_CC"; then
2747  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2748else
2749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2750for as_dir in $PATH
2751do
2752  IFS=$as_save_IFS
2753  test -z "$as_dir" && as_dir=.
2754  for ac_exec_ext in '' $ac_executable_extensions; do
2755  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2756    ac_cv_prog_ac_ct_CC="$ac_prog"
2757    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2758    break 2
2759  fi
2760done
2761done
2762IFS=$as_save_IFS
2763
2764fi
2765fi
2766ac_ct_CC=$ac_cv_prog_ac_ct_CC
2767if test -n "$ac_ct_CC"; then
2768  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2769echo "${ECHO_T}$ac_ct_CC" >&6; }
2770else
2771  { echo "$as_me:$LINENO: result: no" >&5
2772echo "${ECHO_T}no" >&6; }
2773fi
2774
2775
2776  test -n "$ac_ct_CC" && break
2777done
2778
2779  if test "x$ac_ct_CC" = x; then
2780    CC=""
2781  else
2782    case $cross_compiling:$ac_tool_warned in
2783yes:)
2784{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2785whose name does not start with the host triplet.  If you think this
2786configuration is useful to you, please write to autoconf@gnu.org." >&5
2787echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2788whose name does not start with the host triplet.  If you think this
2789configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2790ac_tool_warned=yes ;;
2791esac
2792    CC=$ac_ct_CC
2793  fi
2794fi
2795
2796fi
2797
2798
2799test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2800See \`config.log' for more details." >&5
2801echo "$as_me: error: no acceptable C compiler found in \$PATH
2802See \`config.log' for more details." >&2;}
2803   { (exit 1); exit 1; }; }
2804
2805# Provide some information about the compiler.
2806echo "$as_me:$LINENO: checking for C compiler version" >&5
2807ac_compiler=`set X $ac_compile; echo $2`
2808{ (ac_try="$ac_compiler --version >&5"
2809case "(($ac_try" in
2810  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2811  *) ac_try_echo=$ac_try;;
2812esac
2813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2814  (eval "$ac_compiler --version >&5") 2>&5
2815  ac_status=$?
2816  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2817  (exit $ac_status); }
2818{ (ac_try="$ac_compiler -v >&5"
2819case "(($ac_try" in
2820  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2821  *) ac_try_echo=$ac_try;;
2822esac
2823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2824  (eval "$ac_compiler -v >&5") 2>&5
2825  ac_status=$?
2826  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2827  (exit $ac_status); }
2828{ (ac_try="$ac_compiler -V >&5"
2829case "(($ac_try" in
2830  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2831  *) ac_try_echo=$ac_try;;
2832esac
2833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2834  (eval "$ac_compiler -V >&5") 2>&5
2835  ac_status=$?
2836  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2837  (exit $ac_status); }
2838
2839cat >conftest.$ac_ext <<_ACEOF
2840/* confdefs.h.  */
2841_ACEOF
2842cat confdefs.h >>conftest.$ac_ext
2843cat >>conftest.$ac_ext <<_ACEOF
2844/* end confdefs.h.  */
2845
2846int
2847main ()
2848{
2849
2850  ;
2851  return 0;
2852}
2853_ACEOF
2854ac_clean_files_save=$ac_clean_files
2855ac_clean_files="$ac_clean_files a.out a.exe b.out"
2856# Try to create an executable without -o first, disregard a.out.
2857# It will help us diagnose broken compilers, and finding out an intuition
2858# of exeext.
2859{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2860echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2861ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2862#
2863# List of possible output files, starting from the most likely.
2864# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2865# only as a last resort.  b.out is created by i960 compilers.
2866ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2867#
2868# The IRIX 6 linker writes into existing files which may not be
2869# executable, retaining their permissions.  Remove them first so a
2870# subsequent execution test works.
2871ac_rmfiles=
2872for ac_file in $ac_files
2873do
2874  case $ac_file in
2875    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2876    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2877  esac
2878done
2879rm -f $ac_rmfiles
2880
2881if { (ac_try="$ac_link_default"
2882case "(($ac_try" in
2883  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2884  *) ac_try_echo=$ac_try;;
2885esac
2886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2887  (eval "$ac_link_default") 2>&5
2888  ac_status=$?
2889  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2890  (exit $ac_status); }; then
2891  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2892# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2893# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2894# so that the user can short-circuit this test for compilers unknown to
2895# Autoconf.
2896for ac_file in $ac_files ''
2897do
2898  test -f "$ac_file" || continue
2899  case $ac_file in
2900    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2901	;;
2902    [ab].out )
2903	# We found the default executable, but exeext='' is most
2904	# certainly right.
2905	break;;
2906    *.* )
2907        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2908	then :; else
2909	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2910	fi
2911	# We set ac_cv_exeext here because the later test for it is not
2912	# safe: cross compilers may not add the suffix if given an `-o'
2913	# argument, so we may need to know it at that point already.
2914	# Even if this section looks crufty: it has the advantage of
2915	# actually working.
2916	break;;
2917    * )
2918	break;;
2919  esac
2920done
2921test "$ac_cv_exeext" = no && ac_cv_exeext=
2922
2923else
2924  ac_file=''
2925fi
2926
2927{ echo "$as_me:$LINENO: result: $ac_file" >&5
2928echo "${ECHO_T}$ac_file" >&6; }
2929if test -z "$ac_file"; then
2930  echo "$as_me: failed program was:" >&5
2931sed 's/^/| /' conftest.$ac_ext >&5
2932
2933{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2934See \`config.log' for more details." >&5
2935echo "$as_me: error: C compiler cannot create executables
2936See \`config.log' for more details." >&2;}
2937   { (exit 77); exit 77; }; }
2938fi
2939
2940ac_exeext=$ac_cv_exeext
2941
2942# Check that the compiler produces executables we can run.  If not, either
2943# the compiler is broken, or we cross compile.
2944{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2945echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2946# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2947# If not cross compiling, check that we can run a simple program.
2948if test "$cross_compiling" != yes; then
2949  if { ac_try='./$ac_file'
2950  { (case "(($ac_try" in
2951  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2952  *) ac_try_echo=$ac_try;;
2953esac
2954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2955  (eval "$ac_try") 2>&5
2956  ac_status=$?
2957  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2958  (exit $ac_status); }; }; then
2959    cross_compiling=no
2960  else
2961    if test "$cross_compiling" = maybe; then
2962	cross_compiling=yes
2963    else
2964	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2965If you meant to cross compile, use \`--host'.
2966See \`config.log' for more details." >&5
2967echo "$as_me: error: cannot run C compiled programs.
2968If you meant to cross compile, use \`--host'.
2969See \`config.log' for more details." >&2;}
2970   { (exit 1); exit 1; }; }
2971    fi
2972  fi
2973fi
2974{ echo "$as_me:$LINENO: result: yes" >&5
2975echo "${ECHO_T}yes" >&6; }
2976
2977rm -f a.out a.exe conftest$ac_cv_exeext b.out
2978ac_clean_files=$ac_clean_files_save
2979# Check that the compiler produces executables we can run.  If not, either
2980# the compiler is broken, or we cross compile.
2981{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2982echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2983{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2984echo "${ECHO_T}$cross_compiling" >&6; }
2985
2986{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2987echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2988if { (ac_try="$ac_link"
2989case "(($ac_try" in
2990  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2991  *) ac_try_echo=$ac_try;;
2992esac
2993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2994  (eval "$ac_link") 2>&5
2995  ac_status=$?
2996  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2997  (exit $ac_status); }; then
2998  # If both `conftest.exe' and `conftest' are `present' (well, observable)
2999# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3000# work properly (i.e., refer to `conftest.exe'), while it won't with
3001# `rm'.
3002for ac_file in conftest.exe conftest conftest.*; do
3003  test -f "$ac_file" || continue
3004  case $ac_file in
3005    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3006    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3007	  break;;
3008    * ) break;;
3009  esac
3010done
3011else
3012  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3013See \`config.log' for more details." >&5
3014echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3015See \`config.log' for more details." >&2;}
3016   { (exit 1); exit 1; }; }
3017fi
3018
3019rm -f conftest$ac_cv_exeext
3020{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3021echo "${ECHO_T}$ac_cv_exeext" >&6; }
3022
3023rm -f conftest.$ac_ext
3024EXEEXT=$ac_cv_exeext
3025ac_exeext=$EXEEXT
3026{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3027echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
3028if test "${ac_cv_objext+set}" = set; then
3029  echo $ECHO_N "(cached) $ECHO_C" >&6
3030else
3031  cat >conftest.$ac_ext <<_ACEOF
3032/* confdefs.h.  */
3033_ACEOF
3034cat confdefs.h >>conftest.$ac_ext
3035cat >>conftest.$ac_ext <<_ACEOF
3036/* end confdefs.h.  */
3037
3038int
3039main ()
3040{
3041
3042  ;
3043  return 0;
3044}
3045_ACEOF
3046rm -f conftest.o conftest.obj
3047if { (ac_try="$ac_compile"
3048case "(($ac_try" in
3049  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3050  *) ac_try_echo=$ac_try;;
3051esac
3052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3053  (eval "$ac_compile") 2>&5
3054  ac_status=$?
3055  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3056  (exit $ac_status); }; then
3057  for ac_file in conftest.o conftest.obj conftest.*; do
3058  test -f "$ac_file" || continue;
3059  case $ac_file in
3060    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
3061    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3062       break;;
3063  esac
3064done
3065else
3066  echo "$as_me: failed program was:" >&5
3067sed 's/^/| /' conftest.$ac_ext >&5
3068
3069{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3070See \`config.log' for more details." >&5
3071echo "$as_me: error: cannot compute suffix of object files: cannot compile
3072See \`config.log' for more details." >&2;}
3073   { (exit 1); exit 1; }; }
3074fi
3075
3076rm -f conftest.$ac_cv_objext conftest.$ac_ext
3077fi
3078{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3079echo "${ECHO_T}$ac_cv_objext" >&6; }
3080OBJEXT=$ac_cv_objext
3081ac_objext=$OBJEXT
3082{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3083echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
3084if test "${ac_cv_c_compiler_gnu+set}" = set; then
3085  echo $ECHO_N "(cached) $ECHO_C" >&6
3086else
3087  cat >conftest.$ac_ext <<_ACEOF
3088/* confdefs.h.  */
3089_ACEOF
3090cat confdefs.h >>conftest.$ac_ext
3091cat >>conftest.$ac_ext <<_ACEOF
3092/* end confdefs.h.  */
3093
3094int
3095main ()
3096{
3097#ifndef __GNUC__
3098       choke me
3099#endif
3100
3101  ;
3102  return 0;
3103}
3104_ACEOF
3105rm -f conftest.$ac_objext
3106if { (ac_try="$ac_compile"
3107case "(($ac_try" in
3108  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3109  *) ac_try_echo=$ac_try;;
3110esac
3111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3112  (eval "$ac_compile") 2>conftest.er1
3113  ac_status=$?
3114  grep -v '^ *+' conftest.er1 >conftest.err
3115  rm -f conftest.er1
3116  cat conftest.err >&5
3117  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3118  (exit $ac_status); } && {
3119	 test -z "$ac_c_werror_flag" ||
3120	 test ! -s conftest.err
3121       } && test -s conftest.$ac_objext; then
3122  ac_compiler_gnu=yes
3123else
3124  echo "$as_me: failed program was:" >&5
3125sed 's/^/| /' conftest.$ac_ext >&5
3126
3127	ac_compiler_gnu=no
3128fi
3129
3130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3131ac_cv_c_compiler_gnu=$ac_compiler_gnu
3132
3133fi
3134{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3135echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3136GCC=`test $ac_compiler_gnu = yes && echo yes`
3137ac_test_CFLAGS=${CFLAGS+set}
3138ac_save_CFLAGS=$CFLAGS
3139{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3140echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3141if test "${ac_cv_prog_cc_g+set}" = set; then
3142  echo $ECHO_N "(cached) $ECHO_C" >&6
3143else
3144  ac_save_c_werror_flag=$ac_c_werror_flag
3145   ac_c_werror_flag=yes
3146   ac_cv_prog_cc_g=no
3147   CFLAGS="-g"
3148   cat >conftest.$ac_ext <<_ACEOF
3149/* confdefs.h.  */
3150_ACEOF
3151cat confdefs.h >>conftest.$ac_ext
3152cat >>conftest.$ac_ext <<_ACEOF
3153/* end confdefs.h.  */
3154
3155int
3156main ()
3157{
3158
3159  ;
3160  return 0;
3161}
3162_ACEOF
3163rm -f conftest.$ac_objext
3164if { (ac_try="$ac_compile"
3165case "(($ac_try" in
3166  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3167  *) ac_try_echo=$ac_try;;
3168esac
3169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3170  (eval "$ac_compile") 2>conftest.er1
3171  ac_status=$?
3172  grep -v '^ *+' conftest.er1 >conftest.err
3173  rm -f conftest.er1
3174  cat conftest.err >&5
3175  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3176  (exit $ac_status); } && {
3177	 test -z "$ac_c_werror_flag" ||
3178	 test ! -s conftest.err
3179       } && test -s conftest.$ac_objext; then
3180  ac_cv_prog_cc_g=yes
3181else
3182  echo "$as_me: failed program was:" >&5
3183sed 's/^/| /' conftest.$ac_ext >&5
3184
3185	CFLAGS=""
3186      cat >conftest.$ac_ext <<_ACEOF
3187/* confdefs.h.  */
3188_ACEOF
3189cat confdefs.h >>conftest.$ac_ext
3190cat >>conftest.$ac_ext <<_ACEOF
3191/* end confdefs.h.  */
3192
3193int
3194main ()
3195{
3196
3197  ;
3198  return 0;
3199}
3200_ACEOF
3201rm -f conftest.$ac_objext
3202if { (ac_try="$ac_compile"
3203case "(($ac_try" in
3204  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3205  *) ac_try_echo=$ac_try;;
3206esac
3207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3208  (eval "$ac_compile") 2>conftest.er1
3209  ac_status=$?
3210  grep -v '^ *+' conftest.er1 >conftest.err
3211  rm -f conftest.er1
3212  cat conftest.err >&5
3213  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3214  (exit $ac_status); } && {
3215	 test -z "$ac_c_werror_flag" ||
3216	 test ! -s conftest.err
3217       } && test -s conftest.$ac_objext; then
3218  :
3219else
3220  echo "$as_me: failed program was:" >&5
3221sed 's/^/| /' conftest.$ac_ext >&5
3222
3223	ac_c_werror_flag=$ac_save_c_werror_flag
3224	 CFLAGS="-g"
3225	 cat >conftest.$ac_ext <<_ACEOF
3226/* confdefs.h.  */
3227_ACEOF
3228cat confdefs.h >>conftest.$ac_ext
3229cat >>conftest.$ac_ext <<_ACEOF
3230/* end confdefs.h.  */
3231
3232int
3233main ()
3234{
3235
3236  ;
3237  return 0;
3238}
3239_ACEOF
3240rm -f conftest.$ac_objext
3241if { (ac_try="$ac_compile"
3242case "(($ac_try" in
3243  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3244  *) ac_try_echo=$ac_try;;
3245esac
3246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3247  (eval "$ac_compile") 2>conftest.er1
3248  ac_status=$?
3249  grep -v '^ *+' conftest.er1 >conftest.err
3250  rm -f conftest.er1
3251  cat conftest.err >&5
3252  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3253  (exit $ac_status); } && {
3254	 test -z "$ac_c_werror_flag" ||
3255	 test ! -s conftest.err
3256       } && test -s conftest.$ac_objext; then
3257  ac_cv_prog_cc_g=yes
3258else
3259  echo "$as_me: failed program was:" >&5
3260sed 's/^/| /' conftest.$ac_ext >&5
3261
3262
3263fi
3264
3265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3266fi
3267
3268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3269fi
3270
3271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3272   ac_c_werror_flag=$ac_save_c_werror_flag
3273fi
3274{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3275echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3276if test "$ac_test_CFLAGS" = set; then
3277  CFLAGS=$ac_save_CFLAGS
3278elif test $ac_cv_prog_cc_g = yes; then
3279  if test "$GCC" = yes; then
3280    CFLAGS="-g -O2"
3281  else
3282    CFLAGS="-g"
3283  fi
3284else
3285  if test "$GCC" = yes; then
3286    CFLAGS="-O2"
3287  else
3288    CFLAGS=
3289  fi
3290fi
3291{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3292echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3293if test "${ac_cv_prog_cc_c89+set}" = set; then
3294  echo $ECHO_N "(cached) $ECHO_C" >&6
3295else
3296  ac_cv_prog_cc_c89=no
3297ac_save_CC=$CC
3298cat >conftest.$ac_ext <<_ACEOF
3299/* confdefs.h.  */
3300_ACEOF
3301cat confdefs.h >>conftest.$ac_ext
3302cat >>conftest.$ac_ext <<_ACEOF
3303/* end confdefs.h.  */
3304#include <stdarg.h>
3305#include <stdio.h>
3306#include <sys/types.h>
3307#include <sys/stat.h>
3308/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3309struct buf { int x; };
3310FILE * (*rcsopen) (struct buf *, struct stat *, int);
3311static char *e (p, i)
3312     char **p;
3313     int i;
3314{
3315  return p[i];
3316}
3317static char *f (char * (*g) (char **, int), char **p, ...)
3318{
3319  char *s;
3320  va_list v;
3321  va_start (v,p);
3322  s = g (p, va_arg (v,int));
3323  va_end (v);
3324  return s;
3325}
3326
3327/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3328   function prototypes and stuff, but not '\xHH' hex character constants.
3329   These don't provoke an error unfortunately, instead are silently treated
3330   as 'x'.  The following induces an error, until -std is added to get
3331   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3332   array size at least.  It's necessary to write '\x00'==0 to get something
3333   that's true only with -std.  */
3334int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3335
3336/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3337   inside strings and character constants.  */
3338#define FOO(x) 'x'
3339int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3340
3341int test (int i, double x);
3342struct s1 {int (*f) (int a);};
3343struct s2 {int (*f) (double a);};
3344int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3345int argc;
3346char **argv;
3347int
3348main ()
3349{
3350return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3351  ;
3352  return 0;
3353}
3354_ACEOF
3355for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3356	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3357do
3358  CC="$ac_save_CC $ac_arg"
3359  rm -f conftest.$ac_objext
3360if { (ac_try="$ac_compile"
3361case "(($ac_try" in
3362  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3363  *) ac_try_echo=$ac_try;;
3364esac
3365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3366  (eval "$ac_compile") 2>conftest.er1
3367  ac_status=$?
3368  grep -v '^ *+' conftest.er1 >conftest.err
3369  rm -f conftest.er1
3370  cat conftest.err >&5
3371  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3372  (exit $ac_status); } && {
3373	 test -z "$ac_c_werror_flag" ||
3374	 test ! -s conftest.err
3375       } && test -s conftest.$ac_objext; then
3376  ac_cv_prog_cc_c89=$ac_arg
3377else
3378  echo "$as_me: failed program was:" >&5
3379sed 's/^/| /' conftest.$ac_ext >&5
3380
3381
3382fi
3383
3384rm -f core conftest.err conftest.$ac_objext
3385  test "x$ac_cv_prog_cc_c89" != "xno" && break
3386done
3387rm -f conftest.$ac_ext
3388CC=$ac_save_CC
3389
3390fi
3391# AC_CACHE_VAL
3392case "x$ac_cv_prog_cc_c89" in
3393  x)
3394    { echo "$as_me:$LINENO: result: none needed" >&5
3395echo "${ECHO_T}none needed" >&6; } ;;
3396  xno)
3397    { echo "$as_me:$LINENO: result: unsupported" >&5
3398echo "${ECHO_T}unsupported" >&6; } ;;
3399  *)
3400    CC="$CC $ac_cv_prog_cc_c89"
3401    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3402echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3403esac
3404
3405
3406ac_ext=c
3407ac_cpp='$CPP $CPPFLAGS'
3408ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3409ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3410ac_compiler_gnu=$ac_cv_c_compiler_gnu
3411
3412    ac_ext=c
3413ac_cpp='$CPP $CPPFLAGS'
3414ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3415ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3416ac_compiler_gnu=$ac_cv_c_compiler_gnu
3417{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3418echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3419# On Suns, sometimes $CPP names a directory.
3420if test -n "$CPP" && test -d "$CPP"; then
3421  CPP=
3422fi
3423if test -z "$CPP"; then
3424  if test "${ac_cv_prog_CPP+set}" = set; then
3425  echo $ECHO_N "(cached) $ECHO_C" >&6
3426else
3427      # Double quotes because CPP needs to be expanded
3428    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3429    do
3430      ac_preproc_ok=false
3431for ac_c_preproc_warn_flag in '' yes
3432do
3433  # Use a header file that comes with gcc, so configuring glibc
3434  # with a fresh cross-compiler works.
3435  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3436  # <limits.h> exists even on freestanding compilers.
3437  # On the NeXT, cc -E runs the code through the compiler's parser,
3438  # not just through cpp. "Syntax error" is here to catch this case.
3439  cat >conftest.$ac_ext <<_ACEOF
3440/* confdefs.h.  */
3441_ACEOF
3442cat confdefs.h >>conftest.$ac_ext
3443cat >>conftest.$ac_ext <<_ACEOF
3444/* end confdefs.h.  */
3445#ifdef __STDC__
3446# include <limits.h>
3447#else
3448# include <assert.h>
3449#endif
3450		     Syntax error
3451_ACEOF
3452if { (ac_try="$ac_cpp conftest.$ac_ext"
3453case "(($ac_try" in
3454  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3455  *) ac_try_echo=$ac_try;;
3456esac
3457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3458  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3459  ac_status=$?
3460  grep -v '^ *+' conftest.er1 >conftest.err
3461  rm -f conftest.er1
3462  cat conftest.err >&5
3463  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3464  (exit $ac_status); } >/dev/null && {
3465	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3466	 test ! -s conftest.err
3467       }; then
3468  :
3469else
3470  echo "$as_me: failed program was:" >&5
3471sed 's/^/| /' conftest.$ac_ext >&5
3472
3473  # Broken: fails on valid input.
3474continue
3475fi
3476
3477rm -f conftest.err conftest.$ac_ext
3478
3479  # OK, works on sane cases.  Now check whether nonexistent headers
3480  # can be detected and how.
3481  cat >conftest.$ac_ext <<_ACEOF
3482/* confdefs.h.  */
3483_ACEOF
3484cat confdefs.h >>conftest.$ac_ext
3485cat >>conftest.$ac_ext <<_ACEOF
3486/* end confdefs.h.  */
3487#include <ac_nonexistent.h>
3488_ACEOF
3489if { (ac_try="$ac_cpp conftest.$ac_ext"
3490case "(($ac_try" in
3491  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3492  *) ac_try_echo=$ac_try;;
3493esac
3494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3495  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3496  ac_status=$?
3497  grep -v '^ *+' conftest.er1 >conftest.err
3498  rm -f conftest.er1
3499  cat conftest.err >&5
3500  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3501  (exit $ac_status); } >/dev/null && {
3502	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3503	 test ! -s conftest.err
3504       }; then
3505  # Broken: success on invalid input.
3506continue
3507else
3508  echo "$as_me: failed program was:" >&5
3509sed 's/^/| /' conftest.$ac_ext >&5
3510
3511  # Passes both tests.
3512ac_preproc_ok=:
3513break
3514fi
3515
3516rm -f conftest.err conftest.$ac_ext
3517
3518done
3519# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3520rm -f conftest.err conftest.$ac_ext
3521if $ac_preproc_ok; then
3522  break
3523fi
3524
3525    done
3526    ac_cv_prog_CPP=$CPP
3527
3528fi
3529  CPP=$ac_cv_prog_CPP
3530else
3531  ac_cv_prog_CPP=$CPP
3532fi
3533{ echo "$as_me:$LINENO: result: $CPP" >&5
3534echo "${ECHO_T}$CPP" >&6; }
3535ac_preproc_ok=false
3536for ac_c_preproc_warn_flag in '' yes
3537do
3538  # Use a header file that comes with gcc, so configuring glibc
3539  # with a fresh cross-compiler works.
3540  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3541  # <limits.h> exists even on freestanding compilers.
3542  # On the NeXT, cc -E runs the code through the compiler's parser,
3543  # not just through cpp. "Syntax error" is here to catch this case.
3544  cat >conftest.$ac_ext <<_ACEOF
3545/* confdefs.h.  */
3546_ACEOF
3547cat confdefs.h >>conftest.$ac_ext
3548cat >>conftest.$ac_ext <<_ACEOF
3549/* end confdefs.h.  */
3550#ifdef __STDC__
3551# include <limits.h>
3552#else
3553# include <assert.h>
3554#endif
3555		     Syntax error
3556_ACEOF
3557if { (ac_try="$ac_cpp conftest.$ac_ext"
3558case "(($ac_try" in
3559  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3560  *) ac_try_echo=$ac_try;;
3561esac
3562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3563  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3564  ac_status=$?
3565  grep -v '^ *+' conftest.er1 >conftest.err
3566  rm -f conftest.er1
3567  cat conftest.err >&5
3568  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3569  (exit $ac_status); } >/dev/null && {
3570	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3571	 test ! -s conftest.err
3572       }; then
3573  :
3574else
3575  echo "$as_me: failed program was:" >&5
3576sed 's/^/| /' conftest.$ac_ext >&5
3577
3578  # Broken: fails on valid input.
3579continue
3580fi
3581
3582rm -f conftest.err conftest.$ac_ext
3583
3584  # OK, works on sane cases.  Now check whether nonexistent headers
3585  # can be detected and how.
3586  cat >conftest.$ac_ext <<_ACEOF
3587/* confdefs.h.  */
3588_ACEOF
3589cat confdefs.h >>conftest.$ac_ext
3590cat >>conftest.$ac_ext <<_ACEOF
3591/* end confdefs.h.  */
3592#include <ac_nonexistent.h>
3593_ACEOF
3594if { (ac_try="$ac_cpp conftest.$ac_ext"
3595case "(($ac_try" in
3596  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3597  *) ac_try_echo=$ac_try;;
3598esac
3599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3600  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3601  ac_status=$?
3602  grep -v '^ *+' conftest.er1 >conftest.err
3603  rm -f conftest.er1
3604  cat conftest.err >&5
3605  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3606  (exit $ac_status); } >/dev/null && {
3607	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3608	 test ! -s conftest.err
3609       }; then
3610  # Broken: success on invalid input.
3611continue
3612else
3613  echo "$as_me: failed program was:" >&5
3614sed 's/^/| /' conftest.$ac_ext >&5
3615
3616  # Passes both tests.
3617ac_preproc_ok=:
3618break
3619fi
3620
3621rm -f conftest.err conftest.$ac_ext
3622
3623done
3624# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3625rm -f conftest.err conftest.$ac_ext
3626if $ac_preproc_ok; then
3627  :
3628else
3629  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3630See \`config.log' for more details." >&5
3631echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3632See \`config.log' for more details." >&2;}
3633   { (exit 1); exit 1; }; }
3634fi
3635
3636ac_ext=c
3637ac_cpp='$CPP $CPPFLAGS'
3638ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3639ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3640ac_compiler_gnu=$ac_cv_c_compiler_gnu
3641
3642
3643    # Find a good install program.  We prefer a C program (faster),
3644# so one script is as good as another.  But avoid the broken or
3645# incompatible versions:
3646# SysV /etc/install, /usr/sbin/install
3647# SunOS /usr/etc/install
3648# IRIX /sbin/install
3649# AIX /bin/install
3650# AmigaOS /C/install, which installs bootblocks on floppy discs
3651# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3652# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3653# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3654# OS/2's system install, which has a completely different semantic
3655# ./install, which can be erroneously created by make from ./install.sh.
3656{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3657echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
3658if test -z "$INSTALL"; then
3659if test "${ac_cv_path_install+set}" = set; then
3660  echo $ECHO_N "(cached) $ECHO_C" >&6
3661else
3662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3663for as_dir in $PATH
3664do
3665  IFS=$as_save_IFS
3666  test -z "$as_dir" && as_dir=.
3667  # Account for people who put trailing slashes in PATH elements.
3668case $as_dir/ in
3669  ./ | .// | /cC/* | \
3670  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3671  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3672  /usr/ucb/* ) ;;
3673  *)
3674    # OSF1 and SCO ODT 3.0 have their own names for install.
3675    # Don't use installbsd from OSF since it installs stuff as root
3676    # by default.
3677    for ac_prog in ginstall scoinst install; do
3678      for ac_exec_ext in '' $ac_executable_extensions; do
3679	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3680	  if test $ac_prog = install &&
3681	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3682	    # AIX install.  It has an incompatible calling convention.
3683	    :
3684	  elif test $ac_prog = install &&
3685	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3686	    # program-specific install script used by HP pwplus--don't use.
3687	    :
3688	  else
3689	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3690	    break 3
3691	  fi
3692	fi
3693      done
3694    done
3695    ;;
3696esac
3697done
3698IFS=$as_save_IFS
3699
3700
3701fi
3702  if test "${ac_cv_path_install+set}" = set; then
3703    INSTALL=$ac_cv_path_install
3704  else
3705    # As a last resort, use the slow shell script.  Don't cache a
3706    # value for INSTALL within a source directory, because that will
3707    # break other packages using the cache if that directory is
3708    # removed, or if the value is a relative name.
3709    INSTALL=$ac_install_sh
3710  fi
3711fi
3712{ echo "$as_me:$LINENO: result: $INSTALL" >&5
3713echo "${ECHO_T}$INSTALL" >&6; }
3714
3715# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3716# It thinks the first close brace ends the variable substitution.
3717test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3718
3719test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3720
3721test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3722
3723
3724    #--------------------------------------------------------------------
3725    # Checks to see if the make program sets the $MAKE variable.
3726    #--------------------------------------------------------------------
3727
3728    { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3729echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
3730set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3731if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
3732  echo $ECHO_N "(cached) $ECHO_C" >&6
3733else
3734  cat >conftest.make <<\_ACEOF
3735SHELL = /bin/sh
3736all:
3737	@echo '@@@%%%=$(MAKE)=@@@%%%'
3738_ACEOF
3739# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3740case `${MAKE-make} -f conftest.make 2>/dev/null` in
3741  *@@@%%%=?*=@@@%%%*)
3742    eval ac_cv_prog_make_${ac_make}_set=yes;;
3743  *)
3744    eval ac_cv_prog_make_${ac_make}_set=no;;
3745esac
3746rm -f conftest.make
3747fi
3748if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3749  { echo "$as_me:$LINENO: result: yes" >&5
3750echo "${ECHO_T}yes" >&6; }
3751  SET_MAKE=
3752else
3753  { echo "$as_me:$LINENO: result: no" >&5
3754echo "${ECHO_T}no" >&6; }
3755  SET_MAKE="MAKE=${MAKE-make}"
3756fi
3757
3758
3759    #--------------------------------------------------------------------
3760    # Find ranlib
3761    #--------------------------------------------------------------------
3762
3763    if test -n "$ac_tool_prefix"; then
3764  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3765set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3766{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3767echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3768if test "${ac_cv_prog_RANLIB+set}" = set; then
3769  echo $ECHO_N "(cached) $ECHO_C" >&6
3770else
3771  if test -n "$RANLIB"; then
3772  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3773else
3774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3775for as_dir in $PATH
3776do
3777  IFS=$as_save_IFS
3778  test -z "$as_dir" && as_dir=.
3779  for ac_exec_ext in '' $ac_executable_extensions; do
3780  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3781    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3782    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3783    break 2
3784  fi
3785done
3786done
3787IFS=$as_save_IFS
3788
3789fi
3790fi
3791RANLIB=$ac_cv_prog_RANLIB
3792if test -n "$RANLIB"; then
3793  { echo "$as_me:$LINENO: result: $RANLIB" >&5
3794echo "${ECHO_T}$RANLIB" >&6; }
3795else
3796  { echo "$as_me:$LINENO: result: no" >&5
3797echo "${ECHO_T}no" >&6; }
3798fi
3799
3800
3801fi
3802if test -z "$ac_cv_prog_RANLIB"; then
3803  ac_ct_RANLIB=$RANLIB
3804  # Extract the first word of "ranlib", so it can be a program name with args.
3805set dummy ranlib; ac_word=$2
3806{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3807echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3808if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3809  echo $ECHO_N "(cached) $ECHO_C" >&6
3810else
3811  if test -n "$ac_ct_RANLIB"; then
3812  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3813else
3814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3815for as_dir in $PATH
3816do
3817  IFS=$as_save_IFS
3818  test -z "$as_dir" && as_dir=.
3819  for ac_exec_ext in '' $ac_executable_extensions; do
3820  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3821    ac_cv_prog_ac_ct_RANLIB="ranlib"
3822    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3823    break 2
3824  fi
3825done
3826done
3827IFS=$as_save_IFS
3828
3829fi
3830fi
3831ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3832if test -n "$ac_ct_RANLIB"; then
3833  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3834echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
3835else
3836  { echo "$as_me:$LINENO: result: no" >&5
3837echo "${ECHO_T}no" >&6; }
3838fi
3839
3840  if test "x$ac_ct_RANLIB" = x; then
3841    RANLIB=":"
3842  else
3843    case $cross_compiling:$ac_tool_warned in
3844yes:)
3845{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3846whose name does not start with the host triplet.  If you think this
3847configuration is useful to you, please write to autoconf@gnu.org." >&5
3848echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3849whose name does not start with the host triplet.  If you think this
3850configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3851ac_tool_warned=yes ;;
3852esac
3853    RANLIB=$ac_ct_RANLIB
3854  fi
3855else
3856  RANLIB="$ac_cv_prog_RANLIB"
3857fi
3858
3859
3860    #--------------------------------------------------------------------
3861    # Determines the correct binary file extension (.o, .obj, .exe etc.)
3862    #--------------------------------------------------------------------
3863
3864
3865
3866
3867
3868
3869{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3870echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3871if test "${ac_cv_path_GREP+set}" = set; then
3872  echo $ECHO_N "(cached) $ECHO_C" >&6
3873else
3874  # Extract the first word of "grep ggrep" to use in msg output
3875if test -z "$GREP"; then
3876set dummy grep ggrep; ac_prog_name=$2
3877if test "${ac_cv_path_GREP+set}" = set; then
3878  echo $ECHO_N "(cached) $ECHO_C" >&6
3879else
3880  ac_path_GREP_found=false
3881# Loop through the user's path and test for each of PROGNAME-LIST
3882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3883for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3884do
3885  IFS=$as_save_IFS
3886  test -z "$as_dir" && as_dir=.
3887  for ac_prog in grep ggrep; do
3888  for ac_exec_ext in '' $ac_executable_extensions; do
3889    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3890    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3891    # Check for GNU ac_path_GREP and select it if it is found.
3892  # Check for GNU $ac_path_GREP
3893case `"$ac_path_GREP" --version 2>&1` in
3894*GNU*)
3895  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3896*)
3897  ac_count=0
3898  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3899  while :
3900  do
3901    cat "conftest.in" "conftest.in" >"conftest.tmp"
3902    mv "conftest.tmp" "conftest.in"
3903    cp "conftest.in" "conftest.nl"
3904    echo 'GREP' >> "conftest.nl"
3905    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3906    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3907    ac_count=`expr $ac_count + 1`
3908    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3909      # Best one so far, save it but keep looking for a better one
3910      ac_cv_path_GREP="$ac_path_GREP"
3911      ac_path_GREP_max=$ac_count
3912    fi
3913    # 10*(2^10) chars as input seems more than enough
3914    test $ac_count -gt 10 && break
3915  done
3916  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3917esac
3918
3919
3920    $ac_path_GREP_found && break 3
3921  done
3922done
3923
3924done
3925IFS=$as_save_IFS
3926
3927
3928fi
3929
3930GREP="$ac_cv_path_GREP"
3931if test -z "$GREP"; then
3932  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3933echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3934   { (exit 1); exit 1; }; }
3935fi
3936
3937else
3938  ac_cv_path_GREP=$GREP
3939fi
3940
3941
3942fi
3943{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3944echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3945 GREP="$ac_cv_path_GREP"
3946
3947
3948{ echo "$as_me:$LINENO: checking for egrep" >&5
3949echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3950if test "${ac_cv_path_EGREP+set}" = set; then
3951  echo $ECHO_N "(cached) $ECHO_C" >&6
3952else
3953  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3954   then ac_cv_path_EGREP="$GREP -E"
3955   else
3956     # Extract the first word of "egrep" to use in msg output
3957if test -z "$EGREP"; then
3958set dummy egrep; ac_prog_name=$2
3959if test "${ac_cv_path_EGREP+set}" = set; then
3960  echo $ECHO_N "(cached) $ECHO_C" >&6
3961else
3962  ac_path_EGREP_found=false
3963# Loop through the user's path and test for each of PROGNAME-LIST
3964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3965for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3966do
3967  IFS=$as_save_IFS
3968  test -z "$as_dir" && as_dir=.
3969  for ac_prog in egrep; do
3970  for ac_exec_ext in '' $ac_executable_extensions; do
3971    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3972    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3973    # Check for GNU ac_path_EGREP and select it if it is found.
3974  # Check for GNU $ac_path_EGREP
3975case `"$ac_path_EGREP" --version 2>&1` in
3976*GNU*)
3977  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3978*)
3979  ac_count=0
3980  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3981  while :
3982  do
3983    cat "conftest.in" "conftest.in" >"conftest.tmp"
3984    mv "conftest.tmp" "conftest.in"
3985    cp "conftest.in" "conftest.nl"
3986    echo 'EGREP' >> "conftest.nl"
3987    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3988    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3989    ac_count=`expr $ac_count + 1`
3990    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3991      # Best one so far, save it but keep looking for a better one
3992      ac_cv_path_EGREP="$ac_path_EGREP"
3993      ac_path_EGREP_max=$ac_count
3994    fi
3995    # 10*(2^10) chars as input seems more than enough
3996    test $ac_count -gt 10 && break
3997  done
3998  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3999esac
4000
4001
4002    $ac_path_EGREP_found && break 3
4003  done
4004done
4005
4006done
4007IFS=$as_save_IFS
4008
4009
4010fi
4011
4012EGREP="$ac_cv_path_EGREP"
4013if test -z "$EGREP"; then
4014  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4015echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4016   { (exit 1); exit 1; }; }
4017fi
4018
4019else
4020  ac_cv_path_EGREP=$EGREP
4021fi
4022
4023
4024   fi
4025fi
4026{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4027echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4028 EGREP="$ac_cv_path_EGREP"
4029
4030
4031{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4032echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4033if test "${ac_cv_header_stdc+set}" = set; then
4034  echo $ECHO_N "(cached) $ECHO_C" >&6
4035else
4036  cat >conftest.$ac_ext <<_ACEOF
4037/* confdefs.h.  */
4038_ACEOF
4039cat confdefs.h >>conftest.$ac_ext
4040cat >>conftest.$ac_ext <<_ACEOF
4041/* end confdefs.h.  */
4042#include <stdlib.h>
4043#include <stdarg.h>
4044#include <string.h>
4045#include <float.h>
4046
4047int
4048main ()
4049{
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  ac_cv_header_stdc=yes
4073else
4074  echo "$as_me: failed program was:" >&5
4075sed 's/^/| /' conftest.$ac_ext >&5
4076
4077	ac_cv_header_stdc=no
4078fi
4079
4080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4081
4082if test $ac_cv_header_stdc = yes; then
4083  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4084  cat >conftest.$ac_ext <<_ACEOF
4085/* confdefs.h.  */
4086_ACEOF
4087cat confdefs.h >>conftest.$ac_ext
4088cat >>conftest.$ac_ext <<_ACEOF
4089/* end confdefs.h.  */
4090#include <string.h>
4091
4092_ACEOF
4093if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4094  $EGREP "memchr" >/dev/null 2>&1; then
4095  :
4096else
4097  ac_cv_header_stdc=no
4098fi
4099rm -f -r conftest*
4100
4101fi
4102
4103if test $ac_cv_header_stdc = yes; then
4104  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4105  cat >conftest.$ac_ext <<_ACEOF
4106/* confdefs.h.  */
4107_ACEOF
4108cat confdefs.h >>conftest.$ac_ext
4109cat >>conftest.$ac_ext <<_ACEOF
4110/* end confdefs.h.  */
4111#include <stdlib.h>
4112
4113_ACEOF
4114if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4115  $EGREP "free" >/dev/null 2>&1; then
4116  :
4117else
4118  ac_cv_header_stdc=no
4119fi
4120rm -f -r conftest*
4121
4122fi
4123
4124if test $ac_cv_header_stdc = yes; then
4125  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4126  if test "$cross_compiling" = yes; then
4127  :
4128else
4129  cat >conftest.$ac_ext <<_ACEOF
4130/* confdefs.h.  */
4131_ACEOF
4132cat confdefs.h >>conftest.$ac_ext
4133cat >>conftest.$ac_ext <<_ACEOF
4134/* end confdefs.h.  */
4135#include <ctype.h>
4136#include <stdlib.h>
4137#if ((' ' & 0x0FF) == 0x020)
4138# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4139# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4140#else
4141# define ISLOWER(c) \
4142		   (('a' <= (c) && (c) <= 'i') \
4143		     || ('j' <= (c) && (c) <= 'r') \
4144		     || ('s' <= (c) && (c) <= 'z'))
4145# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4146#endif
4147
4148#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4149int
4150main ()
4151{
4152  int i;
4153  for (i = 0; i < 256; i++)
4154    if (XOR (islower (i), ISLOWER (i))
4155	|| toupper (i) != TOUPPER (i))
4156      return 2;
4157  return 0;
4158}
4159_ACEOF
4160rm -f conftest$ac_exeext
4161if { (ac_try="$ac_link"
4162case "(($ac_try" in
4163  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4164  *) ac_try_echo=$ac_try;;
4165esac
4166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4167  (eval "$ac_link") 2>&5
4168  ac_status=$?
4169  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4170  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4171  { (case "(($ac_try" in
4172  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4173  *) ac_try_echo=$ac_try;;
4174esac
4175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4176  (eval "$ac_try") 2>&5
4177  ac_status=$?
4178  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4179  (exit $ac_status); }; }; then
4180  :
4181else
4182  echo "$as_me: program exited with status $ac_status" >&5
4183echo "$as_me: failed program was:" >&5
4184sed 's/^/| /' conftest.$ac_ext >&5
4185
4186( exit $ac_status )
4187ac_cv_header_stdc=no
4188fi
4189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4190fi
4191
4192
4193fi
4194fi
4195{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4196echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4197if test $ac_cv_header_stdc = yes; then
4198
4199cat >>confdefs.h <<\_ACEOF
4200#define STDC_HEADERS 1
4201_ACEOF
4202
4203fi
4204
4205# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4216		  inttypes.h stdint.h unistd.h
4217do
4218as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4219{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4220echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4221if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4222  echo $ECHO_N "(cached) $ECHO_C" >&6
4223else
4224  cat >conftest.$ac_ext <<_ACEOF
4225/* confdefs.h.  */
4226_ACEOF
4227cat confdefs.h >>conftest.$ac_ext
4228cat >>conftest.$ac_ext <<_ACEOF
4229/* end confdefs.h.  */
4230$ac_includes_default
4231
4232#include <$ac_header>
4233_ACEOF
4234rm -f conftest.$ac_objext
4235if { (ac_try="$ac_compile"
4236case "(($ac_try" in
4237  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4238  *) ac_try_echo=$ac_try;;
4239esac
4240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4241  (eval "$ac_compile") 2>conftest.er1
4242  ac_status=$?
4243  grep -v '^ *+' conftest.er1 >conftest.err
4244  rm -f conftest.er1
4245  cat conftest.err >&5
4246  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4247  (exit $ac_status); } && {
4248	 test -z "$ac_c_werror_flag" ||
4249	 test ! -s conftest.err
4250       } && test -s conftest.$ac_objext; then
4251  eval "$as_ac_Header=yes"
4252else
4253  echo "$as_me: failed program was:" >&5
4254sed 's/^/| /' conftest.$ac_ext >&5
4255
4256	eval "$as_ac_Header=no"
4257fi
4258
4259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4260fi
4261ac_res=`eval echo '${'$as_ac_Header'}'`
4262	       { echo "$as_me:$LINENO: result: $ac_res" >&5
4263echo "${ECHO_T}$ac_res" >&6; }
4264if test `eval echo '${'$as_ac_Header'}'` = yes; then
4265  cat >>confdefs.h <<_ACEOF
4266#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4267_ACEOF
4268
4269fi
4270
4271done
4272
4273
4274
4275    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4276
4277
4278    #------------------------------------------------------------------------
4279    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4280    # It makes compiling go faster.  (This is only a performance feature.)
4281    #------------------------------------------------------------------------
4282
4283    if test -z "$no_pipe" -a -n "$GCC"; then
4284	{ echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
4285echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; }
4286if test "${tcl_cv_cc_pipe+set}" = set; then
4287  echo $ECHO_N "(cached) $ECHO_C" >&6
4288else
4289
4290	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4291	    cat >conftest.$ac_ext <<_ACEOF
4292/* confdefs.h.  */
4293_ACEOF
4294cat confdefs.h >>conftest.$ac_ext
4295cat >>conftest.$ac_ext <<_ACEOF
4296/* end confdefs.h.  */
4297
4298int
4299main ()
4300{
4301
4302  ;
4303  return 0;
4304}
4305_ACEOF
4306rm -f conftest.$ac_objext
4307if { (ac_try="$ac_compile"
4308case "(($ac_try" in
4309  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4310  *) ac_try_echo=$ac_try;;
4311esac
4312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4313  (eval "$ac_compile") 2>conftest.er1
4314  ac_status=$?
4315  grep -v '^ *+' conftest.er1 >conftest.err
4316  rm -f conftest.er1
4317  cat conftest.err >&5
4318  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4319  (exit $ac_status); } && {
4320	 test -z "$ac_c_werror_flag" ||
4321	 test ! -s conftest.err
4322       } && test -s conftest.$ac_objext; then
4323  tcl_cv_cc_pipe=yes
4324else
4325  echo "$as_me: failed program was:" >&5
4326sed 's/^/| /' conftest.$ac_ext >&5
4327
4328	tcl_cv_cc_pipe=no
4329fi
4330
4331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4332	    CFLAGS=$hold_cflags
4333fi
4334{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
4335echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; }
4336	if test $tcl_cv_cc_pipe = yes; then
4337	    CFLAGS="$CFLAGS -pipe"
4338	fi
4339    fi
4340
4341    #--------------------------------------------------------------------
4342    # Common compiler flag setup
4343    #--------------------------------------------------------------------
4344
4345    { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
4346echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
4347if test "${ac_cv_c_bigendian+set}" = set; then
4348  echo $ECHO_N "(cached) $ECHO_C" >&6
4349else
4350  # See if sys/param.h defines the BYTE_ORDER macro.
4351cat >conftest.$ac_ext <<_ACEOF
4352/* confdefs.h.  */
4353_ACEOF
4354cat confdefs.h >>conftest.$ac_ext
4355cat >>conftest.$ac_ext <<_ACEOF
4356/* end confdefs.h.  */
4357#include <sys/types.h>
4358#include <sys/param.h>
4359
4360int
4361main ()
4362{
4363#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
4364	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
4365 bogus endian macros
4366#endif
4367
4368  ;
4369  return 0;
4370}
4371_ACEOF
4372rm -f conftest.$ac_objext
4373if { (ac_try="$ac_compile"
4374case "(($ac_try" in
4375  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4376  *) ac_try_echo=$ac_try;;
4377esac
4378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4379  (eval "$ac_compile") 2>conftest.er1
4380  ac_status=$?
4381  grep -v '^ *+' conftest.er1 >conftest.err
4382  rm -f conftest.er1
4383  cat conftest.err >&5
4384  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4385  (exit $ac_status); } && {
4386	 test -z "$ac_c_werror_flag" ||
4387	 test ! -s conftest.err
4388       } && test -s conftest.$ac_objext; then
4389  # It does; now see whether it defined to BIG_ENDIAN or not.
4390cat >conftest.$ac_ext <<_ACEOF
4391/* confdefs.h.  */
4392_ACEOF
4393cat confdefs.h >>conftest.$ac_ext
4394cat >>conftest.$ac_ext <<_ACEOF
4395/* end confdefs.h.  */
4396#include <sys/types.h>
4397#include <sys/param.h>
4398
4399int
4400main ()
4401{
4402#if BYTE_ORDER != BIG_ENDIAN
4403 not big endian
4404#endif
4405
4406  ;
4407  return 0;
4408}
4409_ACEOF
4410rm -f conftest.$ac_objext
4411if { (ac_try="$ac_compile"
4412case "(($ac_try" in
4413  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4414  *) ac_try_echo=$ac_try;;
4415esac
4416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4417  (eval "$ac_compile") 2>conftest.er1
4418  ac_status=$?
4419  grep -v '^ *+' conftest.er1 >conftest.err
4420  rm -f conftest.er1
4421  cat conftest.err >&5
4422  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4423  (exit $ac_status); } && {
4424	 test -z "$ac_c_werror_flag" ||
4425	 test ! -s conftest.err
4426       } && test -s conftest.$ac_objext; then
4427  ac_cv_c_bigendian=yes
4428else
4429  echo "$as_me: failed program was:" >&5
4430sed 's/^/| /' conftest.$ac_ext >&5
4431
4432	ac_cv_c_bigendian=no
4433fi
4434
4435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4436else
4437  echo "$as_me: failed program was:" >&5
4438sed 's/^/| /' conftest.$ac_ext >&5
4439
4440	# It does not; compile a test program.
4441if test "$cross_compiling" = yes; then
4442  # try to guess the endianness by grepping values into an object file
4443  ac_cv_c_bigendian=unknown
4444  cat >conftest.$ac_ext <<_ACEOF
4445/* confdefs.h.  */
4446_ACEOF
4447cat confdefs.h >>conftest.$ac_ext
4448cat >>conftest.$ac_ext <<_ACEOF
4449/* end confdefs.h.  */
4450short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4451short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4452void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
4453short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4454short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4455void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
4456int
4457main ()
4458{
4459 _ascii (); _ebcdic ();
4460  ;
4461  return 0;
4462}
4463_ACEOF
4464rm -f conftest.$ac_objext
4465if { (ac_try="$ac_compile"
4466case "(($ac_try" in
4467  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4468  *) ac_try_echo=$ac_try;;
4469esac
4470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4471  (eval "$ac_compile") 2>conftest.er1
4472  ac_status=$?
4473  grep -v '^ *+' conftest.er1 >conftest.err
4474  rm -f conftest.er1
4475  cat conftest.err >&5
4476  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4477  (exit $ac_status); } && {
4478	 test -z "$ac_c_werror_flag" ||
4479	 test ! -s conftest.err
4480       } && test -s conftest.$ac_objext; then
4481  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
4482  ac_cv_c_bigendian=yes
4483fi
4484if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4485  if test "$ac_cv_c_bigendian" = unknown; then
4486    ac_cv_c_bigendian=no
4487  else
4488    # finding both strings is unlikely to happen, but who knows?
4489    ac_cv_c_bigendian=unknown
4490  fi
4491fi
4492else
4493  echo "$as_me: failed program was:" >&5
4494sed 's/^/| /' conftest.$ac_ext >&5
4495
4496
4497fi
4498
4499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4500else
4501  cat >conftest.$ac_ext <<_ACEOF
4502/* confdefs.h.  */
4503_ACEOF
4504cat confdefs.h >>conftest.$ac_ext
4505cat >>conftest.$ac_ext <<_ACEOF
4506/* end confdefs.h.  */
4507$ac_includes_default
4508int
4509main ()
4510{
4511
4512  /* Are we little or big endian?  From Harbison&Steele.  */
4513  union
4514  {
4515    long int l;
4516    char c[sizeof (long int)];
4517  } u;
4518  u.l = 1;
4519  return u.c[sizeof (long int) - 1] == 1;
4520
4521  ;
4522  return 0;
4523}
4524_ACEOF
4525rm -f conftest$ac_exeext
4526if { (ac_try="$ac_link"
4527case "(($ac_try" in
4528  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4529  *) ac_try_echo=$ac_try;;
4530esac
4531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4532  (eval "$ac_link") 2>&5
4533  ac_status=$?
4534  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4535  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4536  { (case "(($ac_try" in
4537  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4538  *) ac_try_echo=$ac_try;;
4539esac
4540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4541  (eval "$ac_try") 2>&5
4542  ac_status=$?
4543  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4544  (exit $ac_status); }; }; then
4545  ac_cv_c_bigendian=no
4546else
4547  echo "$as_me: program exited with status $ac_status" >&5
4548echo "$as_me: failed program was:" >&5
4549sed 's/^/| /' conftest.$ac_ext >&5
4550
4551( exit $ac_status )
4552ac_cv_c_bigendian=yes
4553fi
4554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4555fi
4556
4557
4558fi
4559
4560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4561fi
4562{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
4563echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
4564case $ac_cv_c_bigendian in
4565  yes)
4566
4567cat >>confdefs.h <<\_ACEOF
4568#define WORDS_BIGENDIAN 1
4569_ACEOF
4570 ;;
4571  no)
4572     ;;
4573  *)
4574    { { echo "$as_me:$LINENO: error: unknown endianness
4575presetting ac_cv_c_bigendian=no (or yes) will help" >&5
4576echo "$as_me: error: unknown endianness
4577presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
4578   { (exit 1); exit 1; }; } ;;
4579esac
4580
4581    if test "${TEA_PLATFORM}" = "unix" ; then
4582
4583    #--------------------------------------------------------------------
4584    # On a few very rare systems, all of the libm.a stuff is
4585    # already in libc.a.  Set compiler flags accordingly.
4586    # Also, Linux requires the "ieee" library for math to work
4587    # right (and it must appear before "-lm").
4588    #--------------------------------------------------------------------
4589
4590    { echo "$as_me:$LINENO: checking for sin" >&5
4591echo $ECHO_N "checking for sin... $ECHO_C" >&6; }
4592if test "${ac_cv_func_sin+set}" = set; then
4593  echo $ECHO_N "(cached) $ECHO_C" >&6
4594else
4595  cat >conftest.$ac_ext <<_ACEOF
4596/* confdefs.h.  */
4597_ACEOF
4598cat confdefs.h >>conftest.$ac_ext
4599cat >>conftest.$ac_ext <<_ACEOF
4600/* end confdefs.h.  */
4601/* Define sin to an innocuous variant, in case <limits.h> declares sin.
4602   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4603#define sin innocuous_sin
4604
4605/* System header to define __stub macros and hopefully few prototypes,
4606    which can conflict with char sin (); below.
4607    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4608    <limits.h> exists even on freestanding compilers.  */
4609
4610#ifdef __STDC__
4611# include <limits.h>
4612#else
4613# include <assert.h>
4614#endif
4615
4616#undef sin
4617
4618/* Override any GCC internal prototype to avoid an error.
4619   Use char because int might match the return type of a GCC
4620   builtin and then its argument prototype would still apply.  */
4621#ifdef __cplusplus
4622extern "C"
4623#endif
4624char sin ();
4625/* The GNU C library defines this for functions which it implements
4626    to always fail with ENOSYS.  Some functions are actually named
4627    something starting with __ and the normal name is an alias.  */
4628#if defined __stub_sin || defined __stub___sin
4629choke me
4630#endif
4631
4632int
4633main ()
4634{
4635return sin ();
4636  ;
4637  return 0;
4638}
4639_ACEOF
4640rm -f conftest.$ac_objext conftest$ac_exeext
4641if { (ac_try="$ac_link"
4642case "(($ac_try" in
4643  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4644  *) ac_try_echo=$ac_try;;
4645esac
4646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4647  (eval "$ac_link") 2>conftest.er1
4648  ac_status=$?
4649  grep -v '^ *+' conftest.er1 >conftest.err
4650  rm -f conftest.er1
4651  cat conftest.err >&5
4652  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4653  (exit $ac_status); } && {
4654	 test -z "$ac_c_werror_flag" ||
4655	 test ! -s conftest.err
4656       } && test -s conftest$ac_exeext &&
4657       $as_test_x conftest$ac_exeext; then
4658  ac_cv_func_sin=yes
4659else
4660  echo "$as_me: failed program was:" >&5
4661sed 's/^/| /' conftest.$ac_ext >&5
4662
4663	ac_cv_func_sin=no
4664fi
4665
4666rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4667      conftest$ac_exeext conftest.$ac_ext
4668fi
4669{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
4670echo "${ECHO_T}$ac_cv_func_sin" >&6; }
4671if test $ac_cv_func_sin = yes; then
4672  MATH_LIBS=""
4673else
4674  MATH_LIBS="-lm"
4675fi
4676
4677    { echo "$as_me:$LINENO: checking for main in -lieee" >&5
4678echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; }
4679if test "${ac_cv_lib_ieee_main+set}" = set; then
4680  echo $ECHO_N "(cached) $ECHO_C" >&6
4681else
4682  ac_check_lib_save_LIBS=$LIBS
4683LIBS="-lieee  $LIBS"
4684cat >conftest.$ac_ext <<_ACEOF
4685/* confdefs.h.  */
4686_ACEOF
4687cat confdefs.h >>conftest.$ac_ext
4688cat >>conftest.$ac_ext <<_ACEOF
4689/* end confdefs.h.  */
4690
4691
4692int
4693main ()
4694{
4695return main ();
4696  ;
4697  return 0;
4698}
4699_ACEOF
4700rm -f conftest.$ac_objext conftest$ac_exeext
4701if { (ac_try="$ac_link"
4702case "(($ac_try" in
4703  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4704  *) ac_try_echo=$ac_try;;
4705esac
4706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4707  (eval "$ac_link") 2>conftest.er1
4708  ac_status=$?
4709  grep -v '^ *+' conftest.er1 >conftest.err
4710  rm -f conftest.er1
4711  cat conftest.err >&5
4712  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4713  (exit $ac_status); } && {
4714	 test -z "$ac_c_werror_flag" ||
4715	 test ! -s conftest.err
4716       } && test -s conftest$ac_exeext &&
4717       $as_test_x conftest$ac_exeext; then
4718  ac_cv_lib_ieee_main=yes
4719else
4720  echo "$as_me: failed program was:" >&5
4721sed 's/^/| /' conftest.$ac_ext >&5
4722
4723	ac_cv_lib_ieee_main=no
4724fi
4725
4726rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4727      conftest$ac_exeext conftest.$ac_ext
4728LIBS=$ac_check_lib_save_LIBS
4729fi
4730{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
4731echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; }
4732if test $ac_cv_lib_ieee_main = yes; then
4733  MATH_LIBS="-lieee $MATH_LIBS"
4734fi
4735
4736
4737    #--------------------------------------------------------------------
4738    # Interactive UNIX requires -linet instead of -lsocket, plus it
4739    # needs net/errno.h to define the socket-related error codes.
4740    #--------------------------------------------------------------------
4741
4742    { echo "$as_me:$LINENO: checking for main in -linet" >&5
4743echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; }
4744if test "${ac_cv_lib_inet_main+set}" = set; then
4745  echo $ECHO_N "(cached) $ECHO_C" >&6
4746else
4747  ac_check_lib_save_LIBS=$LIBS
4748LIBS="-linet  $LIBS"
4749cat >conftest.$ac_ext <<_ACEOF
4750/* confdefs.h.  */
4751_ACEOF
4752cat confdefs.h >>conftest.$ac_ext
4753cat >>conftest.$ac_ext <<_ACEOF
4754/* end confdefs.h.  */
4755
4756
4757int
4758main ()
4759{
4760return main ();
4761  ;
4762  return 0;
4763}
4764_ACEOF
4765rm -f conftest.$ac_objext conftest$ac_exeext
4766if { (ac_try="$ac_link"
4767case "(($ac_try" in
4768  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4769  *) ac_try_echo=$ac_try;;
4770esac
4771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4772  (eval "$ac_link") 2>conftest.er1
4773  ac_status=$?
4774  grep -v '^ *+' conftest.er1 >conftest.err
4775  rm -f conftest.er1
4776  cat conftest.err >&5
4777  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4778  (exit $ac_status); } && {
4779	 test -z "$ac_c_werror_flag" ||
4780	 test ! -s conftest.err
4781       } && test -s conftest$ac_exeext &&
4782       $as_test_x conftest$ac_exeext; then
4783  ac_cv_lib_inet_main=yes
4784else
4785  echo "$as_me: failed program was:" >&5
4786sed 's/^/| /' conftest.$ac_ext >&5
4787
4788	ac_cv_lib_inet_main=no
4789fi
4790
4791rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4792      conftest$ac_exeext conftest.$ac_ext
4793LIBS=$ac_check_lib_save_LIBS
4794fi
4795{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
4796echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; }
4797if test $ac_cv_lib_inet_main = yes; then
4798  LIBS="$LIBS -linet"
4799fi
4800
4801    if test "${ac_cv_header_net_errno_h+set}" = set; then
4802  { echo "$as_me:$LINENO: checking for net/errno.h" >&5
4803echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4804if test "${ac_cv_header_net_errno_h+set}" = set; then
4805  echo $ECHO_N "(cached) $ECHO_C" >&6
4806fi
4807{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4808echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4809else
4810  # Is the header compilable?
4811{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5
4812echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; }
4813cat >conftest.$ac_ext <<_ACEOF
4814/* confdefs.h.  */
4815_ACEOF
4816cat confdefs.h >>conftest.$ac_ext
4817cat >>conftest.$ac_ext <<_ACEOF
4818/* end confdefs.h.  */
4819$ac_includes_default
4820#include <net/errno.h>
4821_ACEOF
4822rm -f conftest.$ac_objext
4823if { (ac_try="$ac_compile"
4824case "(($ac_try" in
4825  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4826  *) ac_try_echo=$ac_try;;
4827esac
4828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4829  (eval "$ac_compile") 2>conftest.er1
4830  ac_status=$?
4831  grep -v '^ *+' conftest.er1 >conftest.err
4832  rm -f conftest.er1
4833  cat conftest.err >&5
4834  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4835  (exit $ac_status); } && {
4836	 test -z "$ac_c_werror_flag" ||
4837	 test ! -s conftest.err
4838       } && test -s conftest.$ac_objext; then
4839  ac_header_compiler=yes
4840else
4841  echo "$as_me: failed program was:" >&5
4842sed 's/^/| /' conftest.$ac_ext >&5
4843
4844	ac_header_compiler=no
4845fi
4846
4847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4848{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4849echo "${ECHO_T}$ac_header_compiler" >&6; }
4850
4851# Is the header present?
4852{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5
4853echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; }
4854cat >conftest.$ac_ext <<_ACEOF
4855/* confdefs.h.  */
4856_ACEOF
4857cat confdefs.h >>conftest.$ac_ext
4858cat >>conftest.$ac_ext <<_ACEOF
4859/* end confdefs.h.  */
4860#include <net/errno.h>
4861_ACEOF
4862if { (ac_try="$ac_cpp conftest.$ac_ext"
4863case "(($ac_try" in
4864  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4865  *) ac_try_echo=$ac_try;;
4866esac
4867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4868  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4869  ac_status=$?
4870  grep -v '^ *+' conftest.er1 >conftest.err
4871  rm -f conftest.er1
4872  cat conftest.err >&5
4873  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4874  (exit $ac_status); } >/dev/null && {
4875	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4876	 test ! -s conftest.err
4877       }; then
4878  ac_header_preproc=yes
4879else
4880  echo "$as_me: failed program was:" >&5
4881sed 's/^/| /' conftest.$ac_ext >&5
4882
4883  ac_header_preproc=no
4884fi
4885
4886rm -f conftest.err conftest.$ac_ext
4887{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4888echo "${ECHO_T}$ac_header_preproc" >&6; }
4889
4890# So?  What about this header?
4891case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4892  yes:no: )
4893    { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
4894echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4895    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
4896echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
4897    ac_header_preproc=yes
4898    ;;
4899  no:yes:* )
4900    { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
4901echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
4902    { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
4903echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
4904    { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
4905echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
4906    { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
4907echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4908    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
4909echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
4910    { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
4911echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
4912
4913    ;;
4914esac
4915{ echo "$as_me:$LINENO: checking for net/errno.h" >&5
4916echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4917if test "${ac_cv_header_net_errno_h+set}" = set; then
4918  echo $ECHO_N "(cached) $ECHO_C" >&6
4919else
4920  ac_cv_header_net_errno_h=$ac_header_preproc
4921fi
4922{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4923echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4924
4925fi
4926if test $ac_cv_header_net_errno_h = yes; then
4927
4928
4929cat >>confdefs.h <<\_ACEOF
4930#define HAVE_NET_ERRNO_H 1
4931_ACEOF
4932
4933fi
4934
4935
4936
4937    #--------------------------------------------------------------------
4938    #	Check for the existence of the -lsocket and -lnsl libraries.
4939    #	The order here is important, so that they end up in the right
4940    #	order in the command line generated by make.  Here are some
4941    #	special considerations:
4942    #	1. Use "connect" and "accept" to check for -lsocket, and
4943    #	   "gethostbyname" to check for -lnsl.
4944    #	2. Use each function name only once:  can't redo a check because
4945    #	   autoconf caches the results of the last check and won't redo it.
4946    #	3. Use -lnsl and -lsocket only if they supply procedures that
4947    #	   aren't already present in the normal libraries.  This is because
4948    #	   IRIX 5.2 has libraries, but they aren't needed and they're
4949    #	   bogus:  they goof up name resolution if used.
4950    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4951    #	   To get around this problem, check for both libraries together
4952    #	   if -lsocket doesn't work by itself.
4953    #--------------------------------------------------------------------
4954
4955    tcl_checkBoth=0
4956    { echo "$as_me:$LINENO: checking for connect" >&5
4957echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
4958if test "${ac_cv_func_connect+set}" = set; then
4959  echo $ECHO_N "(cached) $ECHO_C" >&6
4960else
4961  cat >conftest.$ac_ext <<_ACEOF
4962/* confdefs.h.  */
4963_ACEOF
4964cat confdefs.h >>conftest.$ac_ext
4965cat >>conftest.$ac_ext <<_ACEOF
4966/* end confdefs.h.  */
4967/* Define connect to an innocuous variant, in case <limits.h> declares connect.
4968   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4969#define connect innocuous_connect
4970
4971/* System header to define __stub macros and hopefully few prototypes,
4972    which can conflict with char connect (); below.
4973    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4974    <limits.h> exists even on freestanding compilers.  */
4975
4976#ifdef __STDC__
4977# include <limits.h>
4978#else
4979# include <assert.h>
4980#endif
4981
4982#undef connect
4983
4984/* Override any GCC internal prototype to avoid an error.
4985   Use char because int might match the return type of a GCC
4986   builtin and then its argument prototype would still apply.  */
4987#ifdef __cplusplus
4988extern "C"
4989#endif
4990char connect ();
4991/* The GNU C library defines this for functions which it implements
4992    to always fail with ENOSYS.  Some functions are actually named
4993    something starting with __ and the normal name is an alias.  */
4994#if defined __stub_connect || defined __stub___connect
4995choke me
4996#endif
4997
4998int
4999main ()
5000{
5001return connect ();
5002  ;
5003  return 0;
5004}
5005_ACEOF
5006rm -f conftest.$ac_objext conftest$ac_exeext
5007if { (ac_try="$ac_link"
5008case "(($ac_try" in
5009  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5010  *) ac_try_echo=$ac_try;;
5011esac
5012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5013  (eval "$ac_link") 2>conftest.er1
5014  ac_status=$?
5015  grep -v '^ *+' conftest.er1 >conftest.err
5016  rm -f conftest.er1
5017  cat conftest.err >&5
5018  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5019  (exit $ac_status); } && {
5020	 test -z "$ac_c_werror_flag" ||
5021	 test ! -s conftest.err
5022       } && test -s conftest$ac_exeext &&
5023       $as_test_x conftest$ac_exeext; then
5024  ac_cv_func_connect=yes
5025else
5026  echo "$as_me: failed program was:" >&5
5027sed 's/^/| /' conftest.$ac_ext >&5
5028
5029	ac_cv_func_connect=no
5030fi
5031
5032rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5033      conftest$ac_exeext conftest.$ac_ext
5034fi
5035{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5036echo "${ECHO_T}$ac_cv_func_connect" >&6; }
5037if test $ac_cv_func_connect = yes; then
5038  tcl_checkSocket=0
5039else
5040  tcl_checkSocket=1
5041fi
5042
5043    if test "$tcl_checkSocket" = 1; then
5044	{ echo "$as_me:$LINENO: checking for setsockopt" >&5
5045echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; }
5046if test "${ac_cv_func_setsockopt+set}" = set; then
5047  echo $ECHO_N "(cached) $ECHO_C" >&6
5048else
5049  cat >conftest.$ac_ext <<_ACEOF
5050/* confdefs.h.  */
5051_ACEOF
5052cat confdefs.h >>conftest.$ac_ext
5053cat >>conftest.$ac_ext <<_ACEOF
5054/* end confdefs.h.  */
5055/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
5056   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5057#define setsockopt innocuous_setsockopt
5058
5059/* System header to define __stub macros and hopefully few prototypes,
5060    which can conflict with char setsockopt (); below.
5061    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5062    <limits.h> exists even on freestanding compilers.  */
5063
5064#ifdef __STDC__
5065# include <limits.h>
5066#else
5067# include <assert.h>
5068#endif
5069
5070#undef setsockopt
5071
5072/* Override any GCC internal prototype to avoid an error.
5073   Use char because int might match the return type of a GCC
5074   builtin and then its argument prototype would still apply.  */
5075#ifdef __cplusplus
5076extern "C"
5077#endif
5078char setsockopt ();
5079/* The GNU C library defines this for functions which it implements
5080    to always fail with ENOSYS.  Some functions are actually named
5081    something starting with __ and the normal name is an alias.  */
5082#if defined __stub_setsockopt || defined __stub___setsockopt
5083choke me
5084#endif
5085
5086int
5087main ()
5088{
5089return setsockopt ();
5090  ;
5091  return 0;
5092}
5093_ACEOF
5094rm -f conftest.$ac_objext conftest$ac_exeext
5095if { (ac_try="$ac_link"
5096case "(($ac_try" in
5097  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5098  *) ac_try_echo=$ac_try;;
5099esac
5100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5101  (eval "$ac_link") 2>conftest.er1
5102  ac_status=$?
5103  grep -v '^ *+' conftest.er1 >conftest.err
5104  rm -f conftest.er1
5105  cat conftest.err >&5
5106  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5107  (exit $ac_status); } && {
5108	 test -z "$ac_c_werror_flag" ||
5109	 test ! -s conftest.err
5110       } && test -s conftest$ac_exeext &&
5111       $as_test_x conftest$ac_exeext; then
5112  ac_cv_func_setsockopt=yes
5113else
5114  echo "$as_me: failed program was:" >&5
5115sed 's/^/| /' conftest.$ac_ext >&5
5116
5117	ac_cv_func_setsockopt=no
5118fi
5119
5120rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5121      conftest$ac_exeext conftest.$ac_ext
5122fi
5123{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
5124echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
5125if test $ac_cv_func_setsockopt = yes; then
5126  :
5127else
5128  { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
5129echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
5130if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
5131  echo $ECHO_N "(cached) $ECHO_C" >&6
5132else
5133  ac_check_lib_save_LIBS=$LIBS
5134LIBS="-lsocket  $LIBS"
5135cat >conftest.$ac_ext <<_ACEOF
5136/* confdefs.h.  */
5137_ACEOF
5138cat confdefs.h >>conftest.$ac_ext
5139cat >>conftest.$ac_ext <<_ACEOF
5140/* end confdefs.h.  */
5141
5142/* Override any GCC internal prototype to avoid an error.
5143   Use char because int might match the return type of a GCC
5144   builtin and then its argument prototype would still apply.  */
5145#ifdef __cplusplus
5146extern "C"
5147#endif
5148char setsockopt ();
5149int
5150main ()
5151{
5152return setsockopt ();
5153  ;
5154  return 0;
5155}
5156_ACEOF
5157rm -f conftest.$ac_objext conftest$ac_exeext
5158if { (ac_try="$ac_link"
5159case "(($ac_try" in
5160  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5161  *) ac_try_echo=$ac_try;;
5162esac
5163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5164  (eval "$ac_link") 2>conftest.er1
5165  ac_status=$?
5166  grep -v '^ *+' conftest.er1 >conftest.err
5167  rm -f conftest.er1
5168  cat conftest.err >&5
5169  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5170  (exit $ac_status); } && {
5171	 test -z "$ac_c_werror_flag" ||
5172	 test ! -s conftest.err
5173       } && test -s conftest$ac_exeext &&
5174       $as_test_x conftest$ac_exeext; then
5175  ac_cv_lib_socket_setsockopt=yes
5176else
5177  echo "$as_me: failed program was:" >&5
5178sed 's/^/| /' conftest.$ac_ext >&5
5179
5180	ac_cv_lib_socket_setsockopt=no
5181fi
5182
5183rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5184      conftest$ac_exeext conftest.$ac_ext
5185LIBS=$ac_check_lib_save_LIBS
5186fi
5187{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
5188echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; }
5189if test $ac_cv_lib_socket_setsockopt = yes; then
5190  LIBS="$LIBS -lsocket"
5191else
5192  tcl_checkBoth=1
5193fi
5194
5195fi
5196
5197    fi
5198    if test "$tcl_checkBoth" = 1; then
5199	tk_oldLibs=$LIBS
5200	LIBS="$LIBS -lsocket -lnsl"
5201	{ echo "$as_me:$LINENO: checking for accept" >&5
5202echo $ECHO_N "checking for accept... $ECHO_C" >&6; }
5203if test "${ac_cv_func_accept+set}" = set; then
5204  echo $ECHO_N "(cached) $ECHO_C" >&6
5205else
5206  cat >conftest.$ac_ext <<_ACEOF
5207/* confdefs.h.  */
5208_ACEOF
5209cat confdefs.h >>conftest.$ac_ext
5210cat >>conftest.$ac_ext <<_ACEOF
5211/* end confdefs.h.  */
5212/* Define accept to an innocuous variant, in case <limits.h> declares accept.
5213   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5214#define accept innocuous_accept
5215
5216/* System header to define __stub macros and hopefully few prototypes,
5217    which can conflict with char accept (); below.
5218    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5219    <limits.h> exists even on freestanding compilers.  */
5220
5221#ifdef __STDC__
5222# include <limits.h>
5223#else
5224# include <assert.h>
5225#endif
5226
5227#undef accept
5228
5229/* Override any GCC internal prototype to avoid an error.
5230   Use char because int might match the return type of a GCC
5231   builtin and then its argument prototype would still apply.  */
5232#ifdef __cplusplus
5233extern "C"
5234#endif
5235char accept ();
5236/* The GNU C library defines this for functions which it implements
5237    to always fail with ENOSYS.  Some functions are actually named
5238    something starting with __ and the normal name is an alias.  */
5239#if defined __stub_accept || defined __stub___accept
5240choke me
5241#endif
5242
5243int
5244main ()
5245{
5246return accept ();
5247  ;
5248  return 0;
5249}
5250_ACEOF
5251rm -f conftest.$ac_objext conftest$ac_exeext
5252if { (ac_try="$ac_link"
5253case "(($ac_try" in
5254  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5255  *) ac_try_echo=$ac_try;;
5256esac
5257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5258  (eval "$ac_link") 2>conftest.er1
5259  ac_status=$?
5260  grep -v '^ *+' conftest.er1 >conftest.err
5261  rm -f conftest.er1
5262  cat conftest.err >&5
5263  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5264  (exit $ac_status); } && {
5265	 test -z "$ac_c_werror_flag" ||
5266	 test ! -s conftest.err
5267       } && test -s conftest$ac_exeext &&
5268       $as_test_x conftest$ac_exeext; then
5269  ac_cv_func_accept=yes
5270else
5271  echo "$as_me: failed program was:" >&5
5272sed 's/^/| /' conftest.$ac_ext >&5
5273
5274	ac_cv_func_accept=no
5275fi
5276
5277rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5278      conftest$ac_exeext conftest.$ac_ext
5279fi
5280{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
5281echo "${ECHO_T}$ac_cv_func_accept" >&6; }
5282if test $ac_cv_func_accept = yes; then
5283  tcl_checkNsl=0
5284else
5285  LIBS=$tk_oldLibs
5286fi
5287
5288    fi
5289    { echo "$as_me:$LINENO: checking for gethostbyname" >&5
5290echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
5291if test "${ac_cv_func_gethostbyname+set}" = set; then
5292  echo $ECHO_N "(cached) $ECHO_C" >&6
5293else
5294  cat >conftest.$ac_ext <<_ACEOF
5295/* confdefs.h.  */
5296_ACEOF
5297cat confdefs.h >>conftest.$ac_ext
5298cat >>conftest.$ac_ext <<_ACEOF
5299/* end confdefs.h.  */
5300/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5301   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5302#define gethostbyname innocuous_gethostbyname
5303
5304/* System header to define __stub macros and hopefully few prototypes,
5305    which can conflict with char gethostbyname (); below.
5306    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5307    <limits.h> exists even on freestanding compilers.  */
5308
5309#ifdef __STDC__
5310# include <limits.h>
5311#else
5312# include <assert.h>
5313#endif
5314
5315#undef gethostbyname
5316
5317/* Override any GCC internal prototype to avoid an error.
5318   Use char because int might match the return type of a GCC
5319   builtin and then its argument prototype would still apply.  */
5320#ifdef __cplusplus
5321extern "C"
5322#endif
5323char gethostbyname ();
5324/* The GNU C library defines this for functions which it implements
5325    to always fail with ENOSYS.  Some functions are actually named
5326    something starting with __ and the normal name is an alias.  */
5327#if defined __stub_gethostbyname || defined __stub___gethostbyname
5328choke me
5329#endif
5330
5331int
5332main ()
5333{
5334return gethostbyname ();
5335  ;
5336  return 0;
5337}
5338_ACEOF
5339rm -f conftest.$ac_objext conftest$ac_exeext
5340if { (ac_try="$ac_link"
5341case "(($ac_try" in
5342  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5343  *) ac_try_echo=$ac_try;;
5344esac
5345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5346  (eval "$ac_link") 2>conftest.er1
5347  ac_status=$?
5348  grep -v '^ *+' conftest.er1 >conftest.err
5349  rm -f conftest.er1
5350  cat conftest.err >&5
5351  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5352  (exit $ac_status); } && {
5353	 test -z "$ac_c_werror_flag" ||
5354	 test ! -s conftest.err
5355       } && test -s conftest$ac_exeext &&
5356       $as_test_x conftest$ac_exeext; then
5357  ac_cv_func_gethostbyname=yes
5358else
5359  echo "$as_me: failed program was:" >&5
5360sed 's/^/| /' conftest.$ac_ext >&5
5361
5362	ac_cv_func_gethostbyname=no
5363fi
5364
5365rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5366      conftest$ac_exeext conftest.$ac_ext
5367fi
5368{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5369echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
5370if test $ac_cv_func_gethostbyname = yes; then
5371  :
5372else
5373  { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5374echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
5375if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5376  echo $ECHO_N "(cached) $ECHO_C" >&6
5377else
5378  ac_check_lib_save_LIBS=$LIBS
5379LIBS="-lnsl  $LIBS"
5380cat >conftest.$ac_ext <<_ACEOF
5381/* confdefs.h.  */
5382_ACEOF
5383cat confdefs.h >>conftest.$ac_ext
5384cat >>conftest.$ac_ext <<_ACEOF
5385/* end confdefs.h.  */
5386
5387/* Override any GCC internal prototype to avoid an error.
5388   Use char because int might match the return type of a GCC
5389   builtin and then its argument prototype would still apply.  */
5390#ifdef __cplusplus
5391extern "C"
5392#endif
5393char gethostbyname ();
5394int
5395main ()
5396{
5397return gethostbyname ();
5398  ;
5399  return 0;
5400}
5401_ACEOF
5402rm -f conftest.$ac_objext conftest$ac_exeext
5403if { (ac_try="$ac_link"
5404case "(($ac_try" in
5405  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5406  *) ac_try_echo=$ac_try;;
5407esac
5408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5409  (eval "$ac_link") 2>conftest.er1
5410  ac_status=$?
5411  grep -v '^ *+' conftest.er1 >conftest.err
5412  rm -f conftest.er1
5413  cat conftest.err >&5
5414  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5415  (exit $ac_status); } && {
5416	 test -z "$ac_c_werror_flag" ||
5417	 test ! -s conftest.err
5418       } && test -s conftest$ac_exeext &&
5419       $as_test_x conftest$ac_exeext; then
5420  ac_cv_lib_nsl_gethostbyname=yes
5421else
5422  echo "$as_me: failed program was:" >&5
5423sed 's/^/| /' conftest.$ac_ext >&5
5424
5425	ac_cv_lib_nsl_gethostbyname=no
5426fi
5427
5428rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5429      conftest$ac_exeext conftest.$ac_ext
5430LIBS=$ac_check_lib_save_LIBS
5431fi
5432{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5433echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
5434if test $ac_cv_lib_nsl_gethostbyname = yes; then
5435  LIBS="$LIBS -lnsl"
5436fi
5437
5438fi
5439
5440
5441    # TEA specific: Don't perform the eval of the libraries here because
5442    # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
5443
5444    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
5445
5446
5447
5448
5449    { echo "$as_me:$LINENO: checking dirent.h" >&5
5450echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; }
5451if test "${tcl_cv_dirent_h+set}" = set; then
5452  echo $ECHO_N "(cached) $ECHO_C" >&6
5453else
5454
5455    cat >conftest.$ac_ext <<_ACEOF
5456/* confdefs.h.  */
5457_ACEOF
5458cat confdefs.h >>conftest.$ac_ext
5459cat >>conftest.$ac_ext <<_ACEOF
5460/* end confdefs.h.  */
5461#include <sys/types.h>
5462#include <dirent.h>
5463int
5464main ()
5465{
5466
5467#ifndef _POSIX_SOURCE
5468#   ifdef __Lynx__
5469	/*
5470	 * Generate compilation error to make the test fail:  Lynx headers
5471	 * are only valid if really in the POSIX environment.
5472	 */
5473
5474	missing_procedure();
5475#   endif
5476#endif
5477DIR *d;
5478struct dirent *entryPtr;
5479char *p;
5480d = opendir("foobar");
5481entryPtr = readdir(d);
5482p = entryPtr->d_name;
5483closedir(d);
5484
5485  ;
5486  return 0;
5487}
5488_ACEOF
5489rm -f conftest.$ac_objext conftest$ac_exeext
5490if { (ac_try="$ac_link"
5491case "(($ac_try" in
5492  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5493  *) ac_try_echo=$ac_try;;
5494esac
5495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5496  (eval "$ac_link") 2>conftest.er1
5497  ac_status=$?
5498  grep -v '^ *+' conftest.er1 >conftest.err
5499  rm -f conftest.er1
5500  cat conftest.err >&5
5501  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5502  (exit $ac_status); } && {
5503	 test -z "$ac_c_werror_flag" ||
5504	 test ! -s conftest.err
5505       } && test -s conftest$ac_exeext &&
5506       $as_test_x conftest$ac_exeext; then
5507  tcl_cv_dirent_h=yes
5508else
5509  echo "$as_me: failed program was:" >&5
5510sed 's/^/| /' conftest.$ac_ext >&5
5511
5512	tcl_cv_dirent_h=no
5513fi
5514
5515rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5516      conftest$ac_exeext conftest.$ac_ext
5517fi
5518{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
5519echo "${ECHO_T}$tcl_cv_dirent_h" >&6; }
5520
5521    if test $tcl_cv_dirent_h = no; then
5522
5523cat >>confdefs.h <<\_ACEOF
5524#define NO_DIRENT_H 1
5525_ACEOF
5526
5527    fi
5528
5529    # TEA specific:
5530    if test "${ac_cv_header_errno_h+set}" = set; then
5531  { echo "$as_me:$LINENO: checking for errno.h" >&5
5532echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5533if test "${ac_cv_header_errno_h+set}" = set; then
5534  echo $ECHO_N "(cached) $ECHO_C" >&6
5535fi
5536{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5537echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5538else
5539  # Is the header compilable?
5540{ echo "$as_me:$LINENO: checking errno.h usability" >&5
5541echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6; }
5542cat >conftest.$ac_ext <<_ACEOF
5543/* confdefs.h.  */
5544_ACEOF
5545cat confdefs.h >>conftest.$ac_ext
5546cat >>conftest.$ac_ext <<_ACEOF
5547/* end confdefs.h.  */
5548$ac_includes_default
5549#include <errno.h>
5550_ACEOF
5551rm -f conftest.$ac_objext
5552if { (ac_try="$ac_compile"
5553case "(($ac_try" in
5554  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5555  *) ac_try_echo=$ac_try;;
5556esac
5557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5558  (eval "$ac_compile") 2>conftest.er1
5559  ac_status=$?
5560  grep -v '^ *+' conftest.er1 >conftest.err
5561  rm -f conftest.er1
5562  cat conftest.err >&5
5563  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5564  (exit $ac_status); } && {
5565	 test -z "$ac_c_werror_flag" ||
5566	 test ! -s conftest.err
5567       } && test -s conftest.$ac_objext; then
5568  ac_header_compiler=yes
5569else
5570  echo "$as_me: failed program was:" >&5
5571sed 's/^/| /' conftest.$ac_ext >&5
5572
5573	ac_header_compiler=no
5574fi
5575
5576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5577{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5578echo "${ECHO_T}$ac_header_compiler" >&6; }
5579
5580# Is the header present?
5581{ echo "$as_me:$LINENO: checking errno.h presence" >&5
5582echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6; }
5583cat >conftest.$ac_ext <<_ACEOF
5584/* confdefs.h.  */
5585_ACEOF
5586cat confdefs.h >>conftest.$ac_ext
5587cat >>conftest.$ac_ext <<_ACEOF
5588/* end confdefs.h.  */
5589#include <errno.h>
5590_ACEOF
5591if { (ac_try="$ac_cpp conftest.$ac_ext"
5592case "(($ac_try" in
5593  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5594  *) ac_try_echo=$ac_try;;
5595esac
5596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5597  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5598  ac_status=$?
5599  grep -v '^ *+' conftest.er1 >conftest.err
5600  rm -f conftest.er1
5601  cat conftest.err >&5
5602  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5603  (exit $ac_status); } >/dev/null && {
5604	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5605	 test ! -s conftest.err
5606       }; then
5607  ac_header_preproc=yes
5608else
5609  echo "$as_me: failed program was:" >&5
5610sed 's/^/| /' conftest.$ac_ext >&5
5611
5612  ac_header_preproc=no
5613fi
5614
5615rm -f conftest.err conftest.$ac_ext
5616{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5617echo "${ECHO_T}$ac_header_preproc" >&6; }
5618
5619# So?  What about this header?
5620case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5621  yes:no: )
5622    { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5623echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5624    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
5625echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
5626    ac_header_preproc=yes
5627    ;;
5628  no:yes:* )
5629    { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
5630echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
5631    { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
5632echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
5633    { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
5634echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
5635    { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5636echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5637    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
5638echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
5639    { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
5640echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
5641
5642    ;;
5643esac
5644{ echo "$as_me:$LINENO: checking for errno.h" >&5
5645echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5646if test "${ac_cv_header_errno_h+set}" = set; then
5647  echo $ECHO_N "(cached) $ECHO_C" >&6
5648else
5649  ac_cv_header_errno_h=$ac_header_preproc
5650fi
5651{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5652echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5653
5654fi
5655if test $ac_cv_header_errno_h = yes; then
5656  :
5657else
5658
5659cat >>confdefs.h <<\_ACEOF
5660#define NO_ERRNO_H 1
5661_ACEOF
5662
5663fi
5664
5665
5666    if test "${ac_cv_header_float_h+set}" = set; then
5667  { echo "$as_me:$LINENO: checking for float.h" >&5
5668echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5669if test "${ac_cv_header_float_h+set}" = set; then
5670  echo $ECHO_N "(cached) $ECHO_C" >&6
5671fi
5672{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5673echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5674else
5675  # Is the header compilable?
5676{ echo "$as_me:$LINENO: checking float.h usability" >&5
5677echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; }
5678cat >conftest.$ac_ext <<_ACEOF
5679/* confdefs.h.  */
5680_ACEOF
5681cat confdefs.h >>conftest.$ac_ext
5682cat >>conftest.$ac_ext <<_ACEOF
5683/* end confdefs.h.  */
5684$ac_includes_default
5685#include <float.h>
5686_ACEOF
5687rm -f conftest.$ac_objext
5688if { (ac_try="$ac_compile"
5689case "(($ac_try" in
5690  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5691  *) ac_try_echo=$ac_try;;
5692esac
5693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5694  (eval "$ac_compile") 2>conftest.er1
5695  ac_status=$?
5696  grep -v '^ *+' conftest.er1 >conftest.err
5697  rm -f conftest.er1
5698  cat conftest.err >&5
5699  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5700  (exit $ac_status); } && {
5701	 test -z "$ac_c_werror_flag" ||
5702	 test ! -s conftest.err
5703       } && test -s conftest.$ac_objext; then
5704  ac_header_compiler=yes
5705else
5706  echo "$as_me: failed program was:" >&5
5707sed 's/^/| /' conftest.$ac_ext >&5
5708
5709	ac_header_compiler=no
5710fi
5711
5712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5713{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5714echo "${ECHO_T}$ac_header_compiler" >&6; }
5715
5716# Is the header present?
5717{ echo "$as_me:$LINENO: checking float.h presence" >&5
5718echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; }
5719cat >conftest.$ac_ext <<_ACEOF
5720/* confdefs.h.  */
5721_ACEOF
5722cat confdefs.h >>conftest.$ac_ext
5723cat >>conftest.$ac_ext <<_ACEOF
5724/* end confdefs.h.  */
5725#include <float.h>
5726_ACEOF
5727if { (ac_try="$ac_cpp conftest.$ac_ext"
5728case "(($ac_try" in
5729  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5730  *) ac_try_echo=$ac_try;;
5731esac
5732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5733  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5734  ac_status=$?
5735  grep -v '^ *+' conftest.er1 >conftest.err
5736  rm -f conftest.er1
5737  cat conftest.err >&5
5738  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5739  (exit $ac_status); } >/dev/null && {
5740	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5741	 test ! -s conftest.err
5742       }; then
5743  ac_header_preproc=yes
5744else
5745  echo "$as_me: failed program was:" >&5
5746sed 's/^/| /' conftest.$ac_ext >&5
5747
5748  ac_header_preproc=no
5749fi
5750
5751rm -f conftest.err conftest.$ac_ext
5752{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5753echo "${ECHO_T}$ac_header_preproc" >&6; }
5754
5755# So?  What about this header?
5756case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5757  yes:no: )
5758    { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
5759echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5760    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
5761echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
5762    ac_header_preproc=yes
5763    ;;
5764  no:yes:* )
5765    { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
5766echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
5767    { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
5768echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
5769    { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
5770echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
5771    { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
5772echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5773    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
5774echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
5775    { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
5776echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
5777
5778    ;;
5779esac
5780{ echo "$as_me:$LINENO: checking for float.h" >&5
5781echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5782if test "${ac_cv_header_float_h+set}" = set; then
5783  echo $ECHO_N "(cached) $ECHO_C" >&6
5784else
5785  ac_cv_header_float_h=$ac_header_preproc
5786fi
5787{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5788echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5789
5790fi
5791if test $ac_cv_header_float_h = yes; then
5792  :
5793else
5794
5795cat >>confdefs.h <<\_ACEOF
5796#define NO_FLOAT_H 1
5797_ACEOF
5798
5799fi
5800
5801
5802    if test "${ac_cv_header_values_h+set}" = set; then
5803  { echo "$as_me:$LINENO: checking for values.h" >&5
5804echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5805if test "${ac_cv_header_values_h+set}" = set; then
5806  echo $ECHO_N "(cached) $ECHO_C" >&6
5807fi
5808{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5809echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5810else
5811  # Is the header compilable?
5812{ echo "$as_me:$LINENO: checking values.h usability" >&5
5813echo $ECHO_N "checking values.h usability... $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$ac_includes_default
5821#include <values.h>
5822_ACEOF
5823rm -f conftest.$ac_objext
5824if { (ac_try="$ac_compile"
5825case "(($ac_try" in
5826  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5827  *) ac_try_echo=$ac_try;;
5828esac
5829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5830  (eval "$ac_compile") 2>conftest.er1
5831  ac_status=$?
5832  grep -v '^ *+' conftest.er1 >conftest.err
5833  rm -f conftest.er1
5834  cat conftest.err >&5
5835  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5836  (exit $ac_status); } && {
5837	 test -z "$ac_c_werror_flag" ||
5838	 test ! -s conftest.err
5839       } && test -s conftest.$ac_objext; then
5840  ac_header_compiler=yes
5841else
5842  echo "$as_me: failed program was:" >&5
5843sed 's/^/| /' conftest.$ac_ext >&5
5844
5845	ac_header_compiler=no
5846fi
5847
5848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5849{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5850echo "${ECHO_T}$ac_header_compiler" >&6; }
5851
5852# Is the header present?
5853{ echo "$as_me:$LINENO: checking values.h presence" >&5
5854echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; }
5855cat >conftest.$ac_ext <<_ACEOF
5856/* confdefs.h.  */
5857_ACEOF
5858cat confdefs.h >>conftest.$ac_ext
5859cat >>conftest.$ac_ext <<_ACEOF
5860/* end confdefs.h.  */
5861#include <values.h>
5862_ACEOF
5863if { (ac_try="$ac_cpp conftest.$ac_ext"
5864case "(($ac_try" in
5865  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5866  *) ac_try_echo=$ac_try;;
5867esac
5868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5869  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5870  ac_status=$?
5871  grep -v '^ *+' conftest.er1 >conftest.err
5872  rm -f conftest.er1
5873  cat conftest.err >&5
5874  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5875  (exit $ac_status); } >/dev/null && {
5876	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5877	 test ! -s conftest.err
5878       }; then
5879  ac_header_preproc=yes
5880else
5881  echo "$as_me: failed program was:" >&5
5882sed 's/^/| /' conftest.$ac_ext >&5
5883
5884  ac_header_preproc=no
5885fi
5886
5887rm -f conftest.err conftest.$ac_ext
5888{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5889echo "${ECHO_T}$ac_header_preproc" >&6; }
5890
5891# So?  What about this header?
5892case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5893  yes:no: )
5894    { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
5895echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5896    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
5897echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
5898    ac_header_preproc=yes
5899    ;;
5900  no:yes:* )
5901    { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
5902echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
5903    { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
5904echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
5905    { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
5906echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
5907    { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
5908echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5909    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
5910echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
5911    { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
5912echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
5913
5914    ;;
5915esac
5916{ echo "$as_me:$LINENO: checking for values.h" >&5
5917echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5918if test "${ac_cv_header_values_h+set}" = set; then
5919  echo $ECHO_N "(cached) $ECHO_C" >&6
5920else
5921  ac_cv_header_values_h=$ac_header_preproc
5922fi
5923{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5924echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5925
5926fi
5927if test $ac_cv_header_values_h = yes; then
5928  :
5929else
5930
5931cat >>confdefs.h <<\_ACEOF
5932#define NO_VALUES_H 1
5933_ACEOF
5934
5935fi
5936
5937
5938    if test "${ac_cv_header_limits_h+set}" = set; then
5939  { echo "$as_me:$LINENO: checking for limits.h" >&5
5940echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5941if test "${ac_cv_header_limits_h+set}" = set; then
5942  echo $ECHO_N "(cached) $ECHO_C" >&6
5943fi
5944{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5945echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5946else
5947  # Is the header compilable?
5948{ echo "$as_me:$LINENO: checking limits.h usability" >&5
5949echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; }
5950cat >conftest.$ac_ext <<_ACEOF
5951/* confdefs.h.  */
5952_ACEOF
5953cat confdefs.h >>conftest.$ac_ext
5954cat >>conftest.$ac_ext <<_ACEOF
5955/* end confdefs.h.  */
5956$ac_includes_default
5957#include <limits.h>
5958_ACEOF
5959rm -f conftest.$ac_objext
5960if { (ac_try="$ac_compile"
5961case "(($ac_try" in
5962  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5963  *) ac_try_echo=$ac_try;;
5964esac
5965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5966  (eval "$ac_compile") 2>conftest.er1
5967  ac_status=$?
5968  grep -v '^ *+' conftest.er1 >conftest.err
5969  rm -f conftest.er1
5970  cat conftest.err >&5
5971  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5972  (exit $ac_status); } && {
5973	 test -z "$ac_c_werror_flag" ||
5974	 test ! -s conftest.err
5975       } && test -s conftest.$ac_objext; then
5976  ac_header_compiler=yes
5977else
5978  echo "$as_me: failed program was:" >&5
5979sed 's/^/| /' conftest.$ac_ext >&5
5980
5981	ac_header_compiler=no
5982fi
5983
5984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5985{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5986echo "${ECHO_T}$ac_header_compiler" >&6; }
5987
5988# Is the header present?
5989{ echo "$as_me:$LINENO: checking limits.h presence" >&5
5990echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; }
5991cat >conftest.$ac_ext <<_ACEOF
5992/* confdefs.h.  */
5993_ACEOF
5994cat confdefs.h >>conftest.$ac_ext
5995cat >>conftest.$ac_ext <<_ACEOF
5996/* end confdefs.h.  */
5997#include <limits.h>
5998_ACEOF
5999if { (ac_try="$ac_cpp conftest.$ac_ext"
6000case "(($ac_try" in
6001  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6002  *) ac_try_echo=$ac_try;;
6003esac
6004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6005  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6006  ac_status=$?
6007  grep -v '^ *+' conftest.er1 >conftest.err
6008  rm -f conftest.er1
6009  cat conftest.err >&5
6010  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6011  (exit $ac_status); } >/dev/null && {
6012	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6013	 test ! -s conftest.err
6014       }; then
6015  ac_header_preproc=yes
6016else
6017  echo "$as_me: failed program was:" >&5
6018sed 's/^/| /' conftest.$ac_ext >&5
6019
6020  ac_header_preproc=no
6021fi
6022
6023rm -f conftest.err conftest.$ac_ext
6024{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6025echo "${ECHO_T}$ac_header_preproc" >&6; }
6026
6027# So?  What about this header?
6028case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6029  yes:no: )
6030    { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
6031echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6032    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
6033echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
6034    ac_header_preproc=yes
6035    ;;
6036  no:yes:* )
6037    { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
6038echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
6039    { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
6040echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
6041    { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
6042echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
6043    { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
6044echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6045    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
6046echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
6047    { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
6048echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
6049
6050    ;;
6051esac
6052{ echo "$as_me:$LINENO: checking for limits.h" >&5
6053echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
6054if test "${ac_cv_header_limits_h+set}" = set; then
6055  echo $ECHO_N "(cached) $ECHO_C" >&6
6056else
6057  ac_cv_header_limits_h=$ac_header_preproc
6058fi
6059{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
6060echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
6061
6062fi
6063if test $ac_cv_header_limits_h = yes; then
6064
6065cat >>confdefs.h <<\_ACEOF
6066#define HAVE_LIMITS_H 1
6067_ACEOF
6068
6069else
6070
6071cat >>confdefs.h <<\_ACEOF
6072#define NO_LIMITS_H 1
6073_ACEOF
6074
6075fi
6076
6077
6078    if test "${ac_cv_header_stdlib_h+set}" = set; then
6079  { echo "$as_me:$LINENO: checking for stdlib.h" >&5
6080echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
6081if test "${ac_cv_header_stdlib_h+set}" = set; then
6082  echo $ECHO_N "(cached) $ECHO_C" >&6
6083fi
6084{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
6085echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
6086else
6087  # Is the header compilable?
6088{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5
6089echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; }
6090cat >conftest.$ac_ext <<_ACEOF
6091/* confdefs.h.  */
6092_ACEOF
6093cat confdefs.h >>conftest.$ac_ext
6094cat >>conftest.$ac_ext <<_ACEOF
6095/* end confdefs.h.  */
6096$ac_includes_default
6097#include <stdlib.h>
6098_ACEOF
6099rm -f conftest.$ac_objext
6100if { (ac_try="$ac_compile"
6101case "(($ac_try" in
6102  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6103  *) ac_try_echo=$ac_try;;
6104esac
6105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6106  (eval "$ac_compile") 2>conftest.er1
6107  ac_status=$?
6108  grep -v '^ *+' conftest.er1 >conftest.err
6109  rm -f conftest.er1
6110  cat conftest.err >&5
6111  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6112  (exit $ac_status); } && {
6113	 test -z "$ac_c_werror_flag" ||
6114	 test ! -s conftest.err
6115       } && test -s conftest.$ac_objext; then
6116  ac_header_compiler=yes
6117else
6118  echo "$as_me: failed program was:" >&5
6119sed 's/^/| /' conftest.$ac_ext >&5
6120
6121	ac_header_compiler=no
6122fi
6123
6124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6125{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6126echo "${ECHO_T}$ac_header_compiler" >&6; }
6127
6128# Is the header present?
6129{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5
6130echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; }
6131cat >conftest.$ac_ext <<_ACEOF
6132/* confdefs.h.  */
6133_ACEOF
6134cat confdefs.h >>conftest.$ac_ext
6135cat >>conftest.$ac_ext <<_ACEOF
6136/* end confdefs.h.  */
6137#include <stdlib.h>
6138_ACEOF
6139if { (ac_try="$ac_cpp conftest.$ac_ext"
6140case "(($ac_try" in
6141  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6142  *) ac_try_echo=$ac_try;;
6143esac
6144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6145  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6146  ac_status=$?
6147  grep -v '^ *+' conftest.er1 >conftest.err
6148  rm -f conftest.er1
6149  cat conftest.err >&5
6150  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6151  (exit $ac_status); } >/dev/null && {
6152	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6153	 test ! -s conftest.err
6154       }; then
6155  ac_header_preproc=yes
6156else
6157  echo "$as_me: failed program was:" >&5
6158sed 's/^/| /' conftest.$ac_ext >&5
6159
6160  ac_header_preproc=no
6161fi
6162
6163rm -f conftest.err conftest.$ac_ext
6164{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6165echo "${ECHO_T}$ac_header_preproc" >&6; }
6166
6167# So?  What about this header?
6168case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6169  yes:no: )
6170    { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
6171echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6172    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
6173echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
6174    ac_header_preproc=yes
6175    ;;
6176  no:yes:* )
6177    { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
6178echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
6179    { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
6180echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
6181    { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
6182echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
6183    { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
6184echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6185    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
6186echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
6187    { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
6188echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
6189
6190    ;;
6191esac
6192{ echo "$as_me:$LINENO: checking for stdlib.h" >&5
6193echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
6194if test "${ac_cv_header_stdlib_h+set}" = set; then
6195  echo $ECHO_N "(cached) $ECHO_C" >&6
6196else
6197  ac_cv_header_stdlib_h=$ac_header_preproc
6198fi
6199{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
6200echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
6201
6202fi
6203if test $ac_cv_header_stdlib_h = yes; then
6204  tcl_ok=1
6205else
6206  tcl_ok=0
6207fi
6208
6209
6210    cat >conftest.$ac_ext <<_ACEOF
6211/* confdefs.h.  */
6212_ACEOF
6213cat confdefs.h >>conftest.$ac_ext
6214cat >>conftest.$ac_ext <<_ACEOF
6215/* end confdefs.h.  */
6216#include <stdlib.h>
6217
6218_ACEOF
6219if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6220  $EGREP "strtol" >/dev/null 2>&1; then
6221  :
6222else
6223  tcl_ok=0
6224fi
6225rm -f -r conftest*
6226
6227    cat >conftest.$ac_ext <<_ACEOF
6228/* confdefs.h.  */
6229_ACEOF
6230cat confdefs.h >>conftest.$ac_ext
6231cat >>conftest.$ac_ext <<_ACEOF
6232/* end confdefs.h.  */
6233#include <stdlib.h>
6234
6235_ACEOF
6236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6237  $EGREP "strtoul" >/dev/null 2>&1; then
6238  :
6239else
6240  tcl_ok=0
6241fi
6242rm -f -r conftest*
6243
6244    cat >conftest.$ac_ext <<_ACEOF
6245/* confdefs.h.  */
6246_ACEOF
6247cat confdefs.h >>conftest.$ac_ext
6248cat >>conftest.$ac_ext <<_ACEOF
6249/* end confdefs.h.  */
6250#include <stdlib.h>
6251
6252_ACEOF
6253if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6254  $EGREP "strtod" >/dev/null 2>&1; then
6255  :
6256else
6257  tcl_ok=0
6258fi
6259rm -f -r conftest*
6260
6261    if test $tcl_ok = 0; then
6262
6263cat >>confdefs.h <<\_ACEOF
6264#define NO_STDLIB_H 1
6265_ACEOF
6266
6267    fi
6268    if test "${ac_cv_header_string_h+set}" = set; then
6269  { echo "$as_me:$LINENO: checking for string.h" >&5
6270echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6271if test "${ac_cv_header_string_h+set}" = set; then
6272  echo $ECHO_N "(cached) $ECHO_C" >&6
6273fi
6274{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6275echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6276else
6277  # Is the header compilable?
6278{ echo "$as_me:$LINENO: checking string.h usability" >&5
6279echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; }
6280cat >conftest.$ac_ext <<_ACEOF
6281/* confdefs.h.  */
6282_ACEOF
6283cat confdefs.h >>conftest.$ac_ext
6284cat >>conftest.$ac_ext <<_ACEOF
6285/* end confdefs.h.  */
6286$ac_includes_default
6287#include <string.h>
6288_ACEOF
6289rm -f conftest.$ac_objext
6290if { (ac_try="$ac_compile"
6291case "(($ac_try" in
6292  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6293  *) ac_try_echo=$ac_try;;
6294esac
6295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6296  (eval "$ac_compile") 2>conftest.er1
6297  ac_status=$?
6298  grep -v '^ *+' conftest.er1 >conftest.err
6299  rm -f conftest.er1
6300  cat conftest.err >&5
6301  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6302  (exit $ac_status); } && {
6303	 test -z "$ac_c_werror_flag" ||
6304	 test ! -s conftest.err
6305       } && test -s conftest.$ac_objext; then
6306  ac_header_compiler=yes
6307else
6308  echo "$as_me: failed program was:" >&5
6309sed 's/^/| /' conftest.$ac_ext >&5
6310
6311	ac_header_compiler=no
6312fi
6313
6314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6315{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6316echo "${ECHO_T}$ac_header_compiler" >&6; }
6317
6318# Is the header present?
6319{ echo "$as_me:$LINENO: checking string.h presence" >&5
6320echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; }
6321cat >conftest.$ac_ext <<_ACEOF
6322/* confdefs.h.  */
6323_ACEOF
6324cat confdefs.h >>conftest.$ac_ext
6325cat >>conftest.$ac_ext <<_ACEOF
6326/* end confdefs.h.  */
6327#include <string.h>
6328_ACEOF
6329if { (ac_try="$ac_cpp conftest.$ac_ext"
6330case "(($ac_try" in
6331  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6332  *) ac_try_echo=$ac_try;;
6333esac
6334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6335  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6336  ac_status=$?
6337  grep -v '^ *+' conftest.er1 >conftest.err
6338  rm -f conftest.er1
6339  cat conftest.err >&5
6340  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6341  (exit $ac_status); } >/dev/null && {
6342	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6343	 test ! -s conftest.err
6344       }; then
6345  ac_header_preproc=yes
6346else
6347  echo "$as_me: failed program was:" >&5
6348sed 's/^/| /' conftest.$ac_ext >&5
6349
6350  ac_header_preproc=no
6351fi
6352
6353rm -f conftest.err conftest.$ac_ext
6354{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6355echo "${ECHO_T}$ac_header_preproc" >&6; }
6356
6357# So?  What about this header?
6358case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6359  yes:no: )
6360    { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
6361echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6362    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
6363echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
6364    ac_header_preproc=yes
6365    ;;
6366  no:yes:* )
6367    { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
6368echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
6369    { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
6370echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
6371    { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
6372echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
6373    { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
6374echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6375    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
6376echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
6377    { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
6378echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
6379
6380    ;;
6381esac
6382{ echo "$as_me:$LINENO: checking for string.h" >&5
6383echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6384if test "${ac_cv_header_string_h+set}" = set; then
6385  echo $ECHO_N "(cached) $ECHO_C" >&6
6386else
6387  ac_cv_header_string_h=$ac_header_preproc
6388fi
6389{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6390echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6391
6392fi
6393if test $ac_cv_header_string_h = yes; then
6394  tcl_ok=1
6395else
6396  tcl_ok=0
6397fi
6398
6399
6400    cat >conftest.$ac_ext <<_ACEOF
6401/* confdefs.h.  */
6402_ACEOF
6403cat confdefs.h >>conftest.$ac_ext
6404cat >>conftest.$ac_ext <<_ACEOF
6405/* end confdefs.h.  */
6406#include <string.h>
6407
6408_ACEOF
6409if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6410  $EGREP "strstr" >/dev/null 2>&1; then
6411  :
6412else
6413  tcl_ok=0
6414fi
6415rm -f -r conftest*
6416
6417    cat >conftest.$ac_ext <<_ACEOF
6418/* confdefs.h.  */
6419_ACEOF
6420cat confdefs.h >>conftest.$ac_ext
6421cat >>conftest.$ac_ext <<_ACEOF
6422/* end confdefs.h.  */
6423#include <string.h>
6424
6425_ACEOF
6426if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6427  $EGREP "strerror" >/dev/null 2>&1; then
6428  :
6429else
6430  tcl_ok=0
6431fi
6432rm -f -r conftest*
6433
6434
6435    # See also memmove check below for a place where NO_STRING_H can be
6436    # set and why.
6437
6438    if test $tcl_ok = 0; then
6439
6440cat >>confdefs.h <<\_ACEOF
6441#define NO_STRING_H 1
6442_ACEOF
6443
6444    fi
6445
6446    if test "${ac_cv_header_sys_wait_h+set}" = set; then
6447  { echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6448echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6449if test "${ac_cv_header_sys_wait_h+set}" = set; then
6450  echo $ECHO_N "(cached) $ECHO_C" >&6
6451fi
6452{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6453echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6454else
6455  # Is the header compilable?
6456{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
6457echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; }
6458cat >conftest.$ac_ext <<_ACEOF
6459/* confdefs.h.  */
6460_ACEOF
6461cat confdefs.h >>conftest.$ac_ext
6462cat >>conftest.$ac_ext <<_ACEOF
6463/* end confdefs.h.  */
6464$ac_includes_default
6465#include <sys/wait.h>
6466_ACEOF
6467rm -f conftest.$ac_objext
6468if { (ac_try="$ac_compile"
6469case "(($ac_try" in
6470  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6471  *) ac_try_echo=$ac_try;;
6472esac
6473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6474  (eval "$ac_compile") 2>conftest.er1
6475  ac_status=$?
6476  grep -v '^ *+' conftest.er1 >conftest.err
6477  rm -f conftest.er1
6478  cat conftest.err >&5
6479  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6480  (exit $ac_status); } && {
6481	 test -z "$ac_c_werror_flag" ||
6482	 test ! -s conftest.err
6483       } && test -s conftest.$ac_objext; then
6484  ac_header_compiler=yes
6485else
6486  echo "$as_me: failed program was:" >&5
6487sed 's/^/| /' conftest.$ac_ext >&5
6488
6489	ac_header_compiler=no
6490fi
6491
6492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6493{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6494echo "${ECHO_T}$ac_header_compiler" >&6; }
6495
6496# Is the header present?
6497{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
6498echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; }
6499cat >conftest.$ac_ext <<_ACEOF
6500/* confdefs.h.  */
6501_ACEOF
6502cat confdefs.h >>conftest.$ac_ext
6503cat >>conftest.$ac_ext <<_ACEOF
6504/* end confdefs.h.  */
6505#include <sys/wait.h>
6506_ACEOF
6507if { (ac_try="$ac_cpp conftest.$ac_ext"
6508case "(($ac_try" in
6509  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6510  *) ac_try_echo=$ac_try;;
6511esac
6512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6513  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6514  ac_status=$?
6515  grep -v '^ *+' conftest.er1 >conftest.err
6516  rm -f conftest.er1
6517  cat conftest.err >&5
6518  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6519  (exit $ac_status); } >/dev/null && {
6520	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6521	 test ! -s conftest.err
6522       }; then
6523  ac_header_preproc=yes
6524else
6525  echo "$as_me: failed program was:" >&5
6526sed 's/^/| /' conftest.$ac_ext >&5
6527
6528  ac_header_preproc=no
6529fi
6530
6531rm -f conftest.err conftest.$ac_ext
6532{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6533echo "${ECHO_T}$ac_header_preproc" >&6; }
6534
6535# So?  What about this header?
6536case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6537  yes:no: )
6538    { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
6539echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6540    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
6541echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
6542    ac_header_preproc=yes
6543    ;;
6544  no:yes:* )
6545    { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
6546echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
6547    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
6548echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
6549    { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
6550echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
6551    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
6552echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6553    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
6554echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
6555    { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
6556echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
6557
6558    ;;
6559esac
6560{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6561echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6562if test "${ac_cv_header_sys_wait_h+set}" = set; then
6563  echo $ECHO_N "(cached) $ECHO_C" >&6
6564else
6565  ac_cv_header_sys_wait_h=$ac_header_preproc
6566fi
6567{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6568echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6569
6570fi
6571if test $ac_cv_header_sys_wait_h = yes; then
6572  :
6573else
6574
6575cat >>confdefs.h <<\_ACEOF
6576#define NO_SYS_WAIT_H 1
6577_ACEOF
6578
6579fi
6580
6581
6582    if test "${ac_cv_header_dlfcn_h+set}" = set; then
6583  { echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6584echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6585if test "${ac_cv_header_dlfcn_h+set}" = set; then
6586  echo $ECHO_N "(cached) $ECHO_C" >&6
6587fi
6588{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6589echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6590else
6591  # Is the header compilable?
6592{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
6593echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; }
6594cat >conftest.$ac_ext <<_ACEOF
6595/* confdefs.h.  */
6596_ACEOF
6597cat confdefs.h >>conftest.$ac_ext
6598cat >>conftest.$ac_ext <<_ACEOF
6599/* end confdefs.h.  */
6600$ac_includes_default
6601#include <dlfcn.h>
6602_ACEOF
6603rm -f conftest.$ac_objext
6604if { (ac_try="$ac_compile"
6605case "(($ac_try" in
6606  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6607  *) ac_try_echo=$ac_try;;
6608esac
6609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6610  (eval "$ac_compile") 2>conftest.er1
6611  ac_status=$?
6612  grep -v '^ *+' conftest.er1 >conftest.err
6613  rm -f conftest.er1
6614  cat conftest.err >&5
6615  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6616  (exit $ac_status); } && {
6617	 test -z "$ac_c_werror_flag" ||
6618	 test ! -s conftest.err
6619       } && test -s conftest.$ac_objext; then
6620  ac_header_compiler=yes
6621else
6622  echo "$as_me: failed program was:" >&5
6623sed 's/^/| /' conftest.$ac_ext >&5
6624
6625	ac_header_compiler=no
6626fi
6627
6628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6629{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6630echo "${ECHO_T}$ac_header_compiler" >&6; }
6631
6632# Is the header present?
6633{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
6634echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; }
6635cat >conftest.$ac_ext <<_ACEOF
6636/* confdefs.h.  */
6637_ACEOF
6638cat confdefs.h >>conftest.$ac_ext
6639cat >>conftest.$ac_ext <<_ACEOF
6640/* end confdefs.h.  */
6641#include <dlfcn.h>
6642_ACEOF
6643if { (ac_try="$ac_cpp conftest.$ac_ext"
6644case "(($ac_try" in
6645  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6646  *) ac_try_echo=$ac_try;;
6647esac
6648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6649  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6650  ac_status=$?
6651  grep -v '^ *+' conftest.er1 >conftest.err
6652  rm -f conftest.er1
6653  cat conftest.err >&5
6654  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6655  (exit $ac_status); } >/dev/null && {
6656	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6657	 test ! -s conftest.err
6658       }; then
6659  ac_header_preproc=yes
6660else
6661  echo "$as_me: failed program was:" >&5
6662sed 's/^/| /' conftest.$ac_ext >&5
6663
6664  ac_header_preproc=no
6665fi
6666
6667rm -f conftest.err conftest.$ac_ext
6668{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6669echo "${ECHO_T}$ac_header_preproc" >&6; }
6670
6671# So?  What about this header?
6672case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6673  yes:no: )
6674    { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
6675echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6676    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
6677echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
6678    ac_header_preproc=yes
6679    ;;
6680  no:yes:* )
6681    { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
6682echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
6683    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
6684echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
6685    { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
6686echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
6687    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
6688echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6689    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
6690echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
6691    { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
6692echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
6693
6694    ;;
6695esac
6696{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6697echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6698if test "${ac_cv_header_dlfcn_h+set}" = set; then
6699  echo $ECHO_N "(cached) $ECHO_C" >&6
6700else
6701  ac_cv_header_dlfcn_h=$ac_header_preproc
6702fi
6703{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6704echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6705
6706fi
6707if test $ac_cv_header_dlfcn_h = yes; then
6708  :
6709else
6710
6711cat >>confdefs.h <<\_ACEOF
6712#define NO_DLFCN_H 1
6713_ACEOF
6714
6715fi
6716
6717
6718
6719    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
6720
6721for ac_header in sys/param.h
6722do
6723as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6724if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6725  { echo "$as_me:$LINENO: checking for $ac_header" >&5
6726echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6727if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6728  echo $ECHO_N "(cached) $ECHO_C" >&6
6729fi
6730ac_res=`eval echo '${'$as_ac_Header'}'`
6731	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6732echo "${ECHO_T}$ac_res" >&6; }
6733else
6734  # Is the header compilable?
6735{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6736echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6737cat >conftest.$ac_ext <<_ACEOF
6738/* confdefs.h.  */
6739_ACEOF
6740cat confdefs.h >>conftest.$ac_ext
6741cat >>conftest.$ac_ext <<_ACEOF
6742/* end confdefs.h.  */
6743$ac_includes_default
6744#include <$ac_header>
6745_ACEOF
6746rm -f conftest.$ac_objext
6747if { (ac_try="$ac_compile"
6748case "(($ac_try" in
6749  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6750  *) ac_try_echo=$ac_try;;
6751esac
6752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6753  (eval "$ac_compile") 2>conftest.er1
6754  ac_status=$?
6755  grep -v '^ *+' conftest.er1 >conftest.err
6756  rm -f conftest.er1
6757  cat conftest.err >&5
6758  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6759  (exit $ac_status); } && {
6760	 test -z "$ac_c_werror_flag" ||
6761	 test ! -s conftest.err
6762       } && test -s conftest.$ac_objext; then
6763  ac_header_compiler=yes
6764else
6765  echo "$as_me: failed program was:" >&5
6766sed 's/^/| /' conftest.$ac_ext >&5
6767
6768	ac_header_compiler=no
6769fi
6770
6771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6772{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6773echo "${ECHO_T}$ac_header_compiler" >&6; }
6774
6775# Is the header present?
6776{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6777echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6778cat >conftest.$ac_ext <<_ACEOF
6779/* confdefs.h.  */
6780_ACEOF
6781cat confdefs.h >>conftest.$ac_ext
6782cat >>conftest.$ac_ext <<_ACEOF
6783/* end confdefs.h.  */
6784#include <$ac_header>
6785_ACEOF
6786if { (ac_try="$ac_cpp conftest.$ac_ext"
6787case "(($ac_try" in
6788  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6789  *) ac_try_echo=$ac_try;;
6790esac
6791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6792  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6793  ac_status=$?
6794  grep -v '^ *+' conftest.er1 >conftest.err
6795  rm -f conftest.er1
6796  cat conftest.err >&5
6797  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6798  (exit $ac_status); } >/dev/null && {
6799	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6800	 test ! -s conftest.err
6801       }; then
6802  ac_header_preproc=yes
6803else
6804  echo "$as_me: failed program was:" >&5
6805sed 's/^/| /' conftest.$ac_ext >&5
6806
6807  ac_header_preproc=no
6808fi
6809
6810rm -f conftest.err conftest.$ac_ext
6811{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6812echo "${ECHO_T}$ac_header_preproc" >&6; }
6813
6814# So?  What about this header?
6815case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6816  yes:no: )
6817    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6818echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6819    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6820echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6821    ac_header_preproc=yes
6822    ;;
6823  no:yes:* )
6824    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6825echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6826    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6827echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6828    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6829echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6830    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6831echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6832    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6833echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6834    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6835echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6836
6837    ;;
6838esac
6839{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6840echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6841if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6842  echo $ECHO_N "(cached) $ECHO_C" >&6
6843else
6844  eval "$as_ac_Header=\$ac_header_preproc"
6845fi
6846ac_res=`eval echo '${'$as_ac_Header'}'`
6847	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6848echo "${ECHO_T}$ac_res" >&6; }
6849
6850fi
6851if test `eval echo '${'$as_ac_Header'}'` = yes; then
6852  cat >>confdefs.h <<_ACEOF
6853#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6854_ACEOF
6855
6856fi
6857
6858done
6859
6860
6861	# Let the user call this, because if it triggers, they will
6862	# need a compat/strtod.c that is correct.  Users can also
6863	# use Tcl_GetDouble(FromObj) instead.
6864	#TEA_BUGGY_STRTOD
6865    fi
6866
6867
6868#-----------------------------------------------------------------------
6869# __CHANGE__
6870# Specify the C source files to compile in TEA_ADD_SOURCES,
6871# public headers that need to be installed in TEA_ADD_HEADERS,
6872# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
6873# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
6874# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
6875# and PKG_TCL_SOURCES.
6876#-----------------------------------------------------------------------
6877
6878
6879    vars="shellicon.c"
6880    for i in $vars; do
6881	case $i in
6882	    \$*)
6883		# allow $-var names
6884		PKG_SOURCES="$PKG_SOURCES $i"
6885		PKG_OBJECTS="$PKG_OBJECTS $i"
6886		;;
6887	    *)
6888		# check for existence - allows for generic/win/unix VPATH
6889		# To add more dirs here (like 'src'), you have to update VPATH
6890		# in Makefile.in as well
6891		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6892		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6893		    -a ! -f "${srcdir}/macosx/$i" \
6894		    ; then
6895		    { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
6896echo "$as_me: error: could not find source file '$i'" >&2;}
6897   { (exit 1); exit 1; }; }
6898		fi
6899		PKG_SOURCES="$PKG_SOURCES $i"
6900		# this assumes it is in a VPATH dir
6901		i=`basename $i`
6902		# handle user calling this before or after TEA_SETUP_COMPILER
6903		if test x"${OBJEXT}" != x ; then
6904		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6905		else
6906		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6907		fi
6908		PKG_OBJECTS="$PKG_OBJECTS $j"
6909		;;
6910	esac
6911    done
6912
6913
6914
6915
6916    vars=""
6917    for i in $vars; do
6918	# check for existence, be strict because it is installed
6919	if test ! -f "${srcdir}/$i" ; then
6920	    { { echo "$as_me:$LINENO: error: could not find header file '${srcdir}/$i'" >&5
6921echo "$as_me: error: could not find header file '${srcdir}/$i'" >&2;}
6922   { (exit 1); exit 1; }; }
6923	fi
6924	PKG_HEADERS="$PKG_HEADERS $i"
6925    done
6926
6927
6928
6929    vars="-I\"`${CYGPATH} ${srcdir}/../generic`\""
6930    for i in $vars; do
6931	PKG_INCLUDES="$PKG_INCLUDES $i"
6932    done
6933
6934
6935
6936    PKG_CFLAGS="$PKG_CFLAGS "
6937
6938
6939
6940    vars=""
6941    for i in $vars; do
6942	# check for existence - allows for generic/win/unix VPATH
6943	if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6944	    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6945	    -a ! -f "${srcdir}/macosx/$i" \
6946	    ; then
6947	    { { echo "$as_me:$LINENO: error: could not find stub source file '$i'" >&5
6948echo "$as_me: error: could not find stub source file '$i'" >&2;}
6949   { (exit 1); exit 1; }; }
6950	fi
6951	PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
6952	# this assumes it is in a VPATH dir
6953	i=`basename $i`
6954	# handle user calling this before or after TEA_SETUP_COMPILER
6955	if test x"${OBJEXT}" != x ; then
6956	    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6957	else
6958	    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6959	fi
6960	PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
6961    done
6962
6963
6964
6965
6966    vars=""
6967    for i in $vars; do
6968	# check for existence, be strict because it is installed
6969	if test ! -f "${srcdir}/$i" ; then
6970	    { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
6971echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
6972   { (exit 1); exit 1; }; }
6973	fi
6974	PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
6975    done
6976
6977
6978
6979#--------------------------------------------------------------------
6980# __CHANGE__
6981# Choose which headers you need.  Extension authors should try very
6982# hard to only rely on the Tcl public header files.  Internal headers
6983# contain private data structures and are subject to change without
6984# notice.
6985# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
6986#--------------------------------------------------------------------
6987
6988#TEA_PUBLIC_TCL_HEADERS
6989
6990    { echo "$as_me:$LINENO: checking for Tcl public headers" >&5
6991echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6; }
6992
6993
6994# Check whether --with-tclinclude was given.
6995if test "${with_tclinclude+set}" = set; then
6996  withval=$with_tclinclude; with_tclinclude=${withval}
6997fi
6998
6999
7000    if test "${ac_cv_c_tclh+set}" = set; then
7001  echo $ECHO_N "(cached) $ECHO_C" >&6
7002else
7003
7004	# Use the value from --with-tclinclude, if it was given
7005
7006	if test x"${with_tclinclude}" != x ; then
7007	    if test -f "${with_tclinclude}/tcl.h" ; then
7008		ac_cv_c_tclh=${with_tclinclude}
7009	    else
7010		{ { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
7011echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
7012   { (exit 1); exit 1; }; }
7013	    fi
7014	else
7015	    list=""
7016	    if test "`uname -s`" = "Darwin"; then
7017		# If Tcl was built as a framework, attempt to use
7018		# the framework's Headers directory
7019		case ${TCL_DEFS} in
7020		    *TCL_FRAMEWORK*)
7021			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
7022			;;
7023		esac
7024	    fi
7025
7026	    # Look in the source dir only if Tcl is not installed,
7027	    # and in that situation, look there before installed locations.
7028	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
7029		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
7030	    fi
7031
7032	    # Check order: pkg --prefix location, Tcl's --prefix location,
7033	    # relative to directory of tclConfig.sh.
7034
7035	    eval "temp_includedir=${includedir}"
7036	    list="$list \
7037		`ls -d ${temp_includedir}        2>/dev/null` \
7038		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7039		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
7040	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7041		list="$list /usr/local/include /usr/include"
7042		if test x"${TCL_INCLUDE_SPEC}" != x ; then
7043		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
7044		    list="$list `ls -d ${d} 2>/dev/null`"
7045		fi
7046	    fi
7047	    for i in $list ; do
7048		if test -f "$i/tcl.h" ; then
7049		    ac_cv_c_tclh=$i
7050		    break
7051		fi
7052	    done
7053	fi
7054
7055fi
7056
7057
7058    # Print a message based on how we determined the include path
7059
7060    if test x"${ac_cv_c_tclh}" = x ; then
7061	{ { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
7062echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
7063   { (exit 1); exit 1; }; }
7064    else
7065	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
7066echo "${ECHO_T}${ac_cv_c_tclh}" >&6; }
7067    fi
7068
7069    # Convert to a native path and substitute into the output files.
7070
7071    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
7072
7073    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7074
7075
7076
7077
7078    # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
7079
7080    { echo "$as_me:$LINENO: checking for Tcl private include files" >&5
7081echo $ECHO_N "checking for Tcl private include files... $ECHO_C" >&6; }
7082
7083    TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
7084    TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
7085
7086    # Check to see if tcl<Plat>Port.h isn't already with the public headers
7087    # Don't look for tclInt.h because that resides with tcl.h in the core
7088    # sources, but the <plat>Port headers are in a different directory
7089    if test "${TEA_PLATFORM}" = "windows" -a \
7090	-f "${ac_cv_c_tclh}/tclWinPort.h"; then
7091	result="private headers found with public headers"
7092    elif test "${TEA_PLATFORM}" = "unix" -a \
7093	-f "${ac_cv_c_tclh}/tclUnixPort.h"; then
7094	result="private headers found with public headers"
7095    else
7096	TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
7097	if test "${TEA_PLATFORM}" = "windows"; then
7098	    TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
7099	else
7100	    TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
7101	fi
7102	# Overwrite the previous TCL_INCLUDES as this should capture both
7103	# public and private headers in the same set.
7104	# We want to ensure these are substituted so as not to require
7105	# any *_NATIVE vars be defined in the Makefile
7106	TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
7107	if test "`uname -s`" = "Darwin"; then
7108            # If Tcl was built as a framework, attempt to use
7109            # the framework's Headers and PrivateHeaders directories
7110            case ${TCL_DEFS} in
7111	    	*TCL_FRAMEWORK*)
7112		    if test -d "${TCL_BIN_DIR}/Headers" -a \
7113			    -d "${TCL_BIN_DIR}/PrivateHeaders"; then
7114			TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
7115		    else
7116			TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
7117		    fi
7118	            ;;
7119	    esac
7120	    result="Using ${TCL_INCLUDES}"
7121	else
7122	    if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
7123		{ { echo "$as_me:$LINENO: error: Cannot find private header tclInt.h in ${TCL_SRC_DIR}" >&5
7124echo "$as_me: error: Cannot find private header tclInt.h in ${TCL_SRC_DIR}" >&2;}
7125   { (exit 1); exit 1; }; }
7126	    fi
7127	    result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}"
7128	fi
7129    fi
7130
7131
7132
7133
7134    { echo "$as_me:$LINENO: result: ${result}" >&5
7135echo "${ECHO_T}${result}" >&6; }
7136
7137
7138#TEA_PUBLIC_TK_HEADERS
7139
7140    { echo "$as_me:$LINENO: checking for Tk public headers" >&5
7141echo $ECHO_N "checking for Tk public headers... $ECHO_C" >&6; }
7142
7143
7144# Check whether --with-tkinclude was given.
7145if test "${with_tkinclude+set}" = set; then
7146  withval=$with_tkinclude; with_tkinclude=${withval}
7147fi
7148
7149
7150    if test "${ac_cv_c_tkh+set}" = set; then
7151  echo $ECHO_N "(cached) $ECHO_C" >&6
7152else
7153
7154	# Use the value from --with-tkinclude, if it was given
7155
7156	if test x"${with_tkinclude}" != x ; then
7157	    if test -f "${with_tkinclude}/tk.h" ; then
7158		ac_cv_c_tkh=${with_tkinclude}
7159	    else
7160		{ { echo "$as_me:$LINENO: error: ${with_tkinclude} directory does not contain tk.h" >&5
7161echo "$as_me: error: ${with_tkinclude} directory does not contain tk.h" >&2;}
7162   { (exit 1); exit 1; }; }
7163	    fi
7164	else
7165	    list=""
7166	    if test "`uname -s`" = "Darwin"; then
7167		# If Tk was built as a framework, attempt to use
7168		# the framework's Headers directory.
7169		case ${TK_DEFS} in
7170		    *TK_FRAMEWORK*)
7171			list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
7172			;;
7173		esac
7174	    fi
7175
7176	    # Look in the source dir only if Tk is not installed,
7177	    # and in that situation, look there before installed locations.
7178	    if test -f "${TK_BIN_DIR}/Makefile" ; then
7179		list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
7180	    fi
7181
7182	    # Check order: pkg --prefix location, Tk's --prefix location,
7183	    # relative to directory of tkConfig.sh, Tcl's --prefix location,
7184	    # relative to directory of tclConfig.sh.
7185
7186	    eval "temp_includedir=${includedir}"
7187	    list="$list \
7188		`ls -d ${temp_includedir}        2>/dev/null` \
7189		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
7190		`ls -d ${TK_BIN_DIR}/../include  2>/dev/null` \
7191		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7192		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
7193	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7194		list="$list /usr/local/include /usr/include"
7195		if test x"${TK_INCLUDE_SPEC}" != x ; then
7196		    d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
7197		    list="$list `ls -d ${d} 2>/dev/null`"
7198		fi
7199	    fi
7200	    for i in $list ; do
7201		if test -f "$i/tk.h" ; then
7202		    ac_cv_c_tkh=$i
7203		    break
7204		fi
7205	    done
7206	fi
7207
7208fi
7209
7210
7211    # Print a message based on how we determined the include path
7212
7213    if test x"${ac_cv_c_tkh}" = x ; then
7214	{ { echo "$as_me:$LINENO: error: tk.h not found.  Please specify its location with --with-tkinclude" >&5
7215echo "$as_me: error: tk.h not found.  Please specify its location with --with-tkinclude" >&2;}
7216   { (exit 1); exit 1; }; }
7217    else
7218	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tkh}" >&5
7219echo "${ECHO_T}${ac_cv_c_tkh}" >&6; }
7220    fi
7221
7222    # Convert to a native path and substitute into the output files.
7223
7224    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
7225
7226    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7227
7228
7229
7230    if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
7231	# On Windows and Aqua, we need the X compat headers
7232	{ echo "$as_me:$LINENO: checking for X11 header files" >&5
7233echo $ECHO_N "checking for X11 header files... $ECHO_C" >&6; }
7234	if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
7235	    INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
7236	    TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7237
7238	fi
7239	{ echo "$as_me:$LINENO: result: ${INCLUDE_DIR_NATIVE}" >&5
7240echo "${ECHO_T}${INCLUDE_DIR_NATIVE}" >&6; }
7241    fi
7242
7243
7244    # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh}
7245
7246    { echo "$as_me:$LINENO: checking for Tk private include files" >&5
7247echo $ECHO_N "checking for Tk private include files... $ECHO_C" >&6; }
7248
7249    TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
7250    TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
7251
7252    # Check to see if tk<Plat>Port.h isn't already with the public headers
7253    # Don't look for tkInt.h because that resides with tk.h in the core
7254    # sources, but the <plat>Port headers are in a different directory
7255    if test "${TEA_PLATFORM}" = "windows" -a \
7256	-f "${ac_cv_c_tkh}/tkWinPort.h"; then
7257	result="private headers found with public headers"
7258    elif test "${TEA_PLATFORM}" = "unix" -a \
7259	-f "${ac_cv_c_tkh}/tkUnixPort.h"; then
7260	result="private headers found with public headers"
7261    else
7262	TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
7263	TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
7264	if test "${TEA_PLATFORM}" = "windows"; then
7265	    TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
7266	else
7267	    TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
7268	fi
7269	# Overwrite the previous TK_INCLUDES as this should capture both
7270	# public and private headers in the same set.
7271	# We want to ensure these are substituted so as not to require
7272	# any *_NATIVE vars be defined in the Makefile
7273	TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
7274	# Detect and add ttk subdir
7275	if test -d "${TK_SRC_DIR}/generic/ttk"; then
7276	   TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\""
7277	fi
7278	if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
7279	   TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}"
7280	fi
7281	if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
7282	   TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\""
7283	fi
7284	if test "`uname -s`" = "Darwin"; then
7285	    # If Tk was built as a framework, attempt to use
7286	    # the framework's Headers and PrivateHeaders directories
7287	    case ${TK_DEFS} in
7288		*TK_FRAMEWORK*)
7289			if test -d "${TK_BIN_DIR}/Headers" -a \
7290				-d "${TK_BIN_DIR}/PrivateHeaders"; then
7291			    TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"
7292			else
7293			    TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
7294			fi
7295			;;
7296	    esac
7297	    result="Using ${TK_INCLUDES}"
7298	else
7299	    if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
7300	       { { echo "$as_me:$LINENO: error: Cannot find private header tkInt.h in ${TK_SRC_DIR}" >&5
7301echo "$as_me: error: Cannot find private header tkInt.h in ${TK_SRC_DIR}" >&2;}
7302   { (exit 1); exit 1; }; }
7303	    fi
7304	    result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}"
7305	fi
7306    fi
7307
7308
7309
7310
7311
7312    { echo "$as_me:$LINENO: result: ${result}" >&5
7313echo "${ECHO_T}${result}" >&6; }
7314
7315
7316#--------------------------------------------------------------------
7317# For Unix/Tk builds, make sure that the X libraries/headers are found.
7318#--------------------------------------------------------------------
7319
7320
7321    if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
7322
7323    { echo "$as_me:$LINENO: checking for X" >&5
7324echo $ECHO_N "checking for X... $ECHO_C" >&6; }
7325
7326
7327# Check whether --with-x was given.
7328if test "${with_x+set}" = set; then
7329  withval=$with_x;
7330fi
7331
7332# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7333if test "x$with_x" = xno; then
7334  # The user explicitly disabled X.
7335  have_x=disabled
7336else
7337  case $x_includes,$x_libraries in #(
7338    *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
7339echo "$as_me: error: Cannot use X directory names containing '" >&2;}
7340   { (exit 1); exit 1; }; };; #(
7341    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
7342  echo $ECHO_N "(cached) $ECHO_C" >&6
7343else
7344  # One or both of the vars are not set, and there is no cached value.
7345ac_x_includes=no ac_x_libraries=no
7346rm -f -r conftest.dir
7347if mkdir conftest.dir; then
7348  cd conftest.dir
7349  cat >Imakefile <<'_ACEOF'
7350incroot:
7351	@echo incroot='${INCROOT}'
7352usrlibdir:
7353	@echo usrlibdir='${USRLIBDIR}'
7354libdir:
7355	@echo libdir='${LIBDIR}'
7356_ACEOF
7357  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
7358    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7359    for ac_var in incroot usrlibdir libdir; do
7360      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
7361    done
7362    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7363    for ac_extension in a so sl dylib la dll; do
7364      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
7365	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
7366	ac_im_usrlibdir=$ac_im_libdir; break
7367      fi
7368    done
7369    # Screen out bogus values from the imake configuration.  They are
7370    # bogus both because they are the default anyway, and because
7371    # using them would break gcc on systems where it needs fixed includes.
7372    case $ac_im_incroot in
7373	/usr/include) ac_x_includes= ;;
7374	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7375    esac
7376    case $ac_im_usrlibdir in
7377	/usr/lib | /lib) ;;
7378	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7379    esac
7380  fi
7381  cd ..
7382  rm -f -r conftest.dir
7383fi
7384
7385# Standard set of common directories for X headers.
7386# Check X11 before X11Rn because it is often a symlink to the current release.
7387ac_x_header_dirs='
7388/usr/X11/include
7389/usr/X11R6/include
7390/usr/X11R5/include
7391/usr/X11R4/include
7392
7393/usr/include/X11
7394/usr/include/X11R6
7395/usr/include/X11R5
7396/usr/include/X11R4
7397
7398/usr/local/X11/include
7399/usr/local/X11R6/include
7400/usr/local/X11R5/include
7401/usr/local/X11R4/include
7402
7403/usr/local/include/X11
7404/usr/local/include/X11R6
7405/usr/local/include/X11R5
7406/usr/local/include/X11R4
7407
7408/usr/X386/include
7409/usr/x386/include
7410/usr/XFree86/include/X11
7411
7412/usr/include
7413/usr/local/include
7414/usr/unsupported/include
7415/usr/athena/include
7416/usr/local/x11r5/include
7417/usr/lpp/Xamples/include
7418
7419/usr/openwin/include
7420/usr/openwin/share/include'
7421
7422if test "$ac_x_includes" = no; then
7423  # Guess where to find include files, by looking for Xlib.h.
7424  # First, try using that file with no special directory specified.
7425  cat >conftest.$ac_ext <<_ACEOF
7426/* confdefs.h.  */
7427_ACEOF
7428cat confdefs.h >>conftest.$ac_ext
7429cat >>conftest.$ac_ext <<_ACEOF
7430/* end confdefs.h.  */
7431#include <X11/Xlib.h>
7432_ACEOF
7433if { (ac_try="$ac_cpp conftest.$ac_ext"
7434case "(($ac_try" in
7435  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7436  *) ac_try_echo=$ac_try;;
7437esac
7438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7439  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7440  ac_status=$?
7441  grep -v '^ *+' conftest.er1 >conftest.err
7442  rm -f conftest.er1
7443  cat conftest.err >&5
7444  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7445  (exit $ac_status); } >/dev/null && {
7446	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7447	 test ! -s conftest.err
7448       }; then
7449  # We can compile using X headers with no special include directory.
7450ac_x_includes=
7451else
7452  echo "$as_me: failed program was:" >&5
7453sed 's/^/| /' conftest.$ac_ext >&5
7454
7455  for ac_dir in $ac_x_header_dirs; do
7456  if test -r "$ac_dir/X11/Xlib.h"; then
7457    ac_x_includes=$ac_dir
7458    break
7459  fi
7460done
7461fi
7462
7463rm -f conftest.err conftest.$ac_ext
7464fi # $ac_x_includes = no
7465
7466if test "$ac_x_libraries" = no; then
7467  # Check for the libraries.
7468  # See if we find them without any special options.
7469  # Don't add to $LIBS permanently.
7470  ac_save_LIBS=$LIBS
7471  LIBS="-lX11 $LIBS"
7472  cat >conftest.$ac_ext <<_ACEOF
7473/* confdefs.h.  */
7474_ACEOF
7475cat confdefs.h >>conftest.$ac_ext
7476cat >>conftest.$ac_ext <<_ACEOF
7477/* end confdefs.h.  */
7478#include <X11/Xlib.h>
7479int
7480main ()
7481{
7482XrmInitialize ()
7483  ;
7484  return 0;
7485}
7486_ACEOF
7487rm -f conftest.$ac_objext conftest$ac_exeext
7488if { (ac_try="$ac_link"
7489case "(($ac_try" in
7490  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7491  *) ac_try_echo=$ac_try;;
7492esac
7493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7494  (eval "$ac_link") 2>conftest.er1
7495  ac_status=$?
7496  grep -v '^ *+' conftest.er1 >conftest.err
7497  rm -f conftest.er1
7498  cat conftest.err >&5
7499  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7500  (exit $ac_status); } && {
7501	 test -z "$ac_c_werror_flag" ||
7502	 test ! -s conftest.err
7503       } && test -s conftest$ac_exeext &&
7504       $as_test_x conftest$ac_exeext; then
7505  LIBS=$ac_save_LIBS
7506# We can link X programs with no special library path.
7507ac_x_libraries=
7508else
7509  echo "$as_me: failed program was:" >&5
7510sed 's/^/| /' conftest.$ac_ext >&5
7511
7512	LIBS=$ac_save_LIBS
7513for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7514do
7515  # Don't even attempt the hair of trying to link an X program!
7516  for ac_extension in a so sl dylib la dll; do
7517    if test -r "$ac_dir/libX11.$ac_extension"; then
7518      ac_x_libraries=$ac_dir
7519      break 2
7520    fi
7521  done
7522done
7523fi
7524
7525rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7526      conftest$ac_exeext conftest.$ac_ext
7527fi # $ac_x_libraries = no
7528
7529case $ac_x_includes,$ac_x_libraries in #(
7530  no,* | *,no | *\'*)
7531    # Didn't find X, or a directory has "'" in its name.
7532    ac_cv_have_x="have_x=no";; #(
7533  *)
7534    # Record where we found X for the cache.
7535    ac_cv_have_x="have_x=yes\
7536	ac_x_includes='$ac_x_includes'\
7537	ac_x_libraries='$ac_x_libraries'"
7538esac
7539fi
7540;; #(
7541    *) have_x=yes;;
7542  esac
7543  eval "$ac_cv_have_x"
7544fi # $with_x != no
7545
7546if test "$have_x" != yes; then
7547  { echo "$as_me:$LINENO: result: $have_x" >&5
7548echo "${ECHO_T}$have_x" >&6; }
7549  no_x=yes
7550else
7551  # If each of the values was on the command line, it overrides each guess.
7552  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7553  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7554  # Update the cache value to reflect the command line values.
7555  ac_cv_have_x="have_x=yes\
7556	ac_x_includes='$x_includes'\
7557	ac_x_libraries='$x_libraries'"
7558  { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
7559echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
7560fi
7561
7562    not_really_there=""
7563    if test "$no_x" = ""; then
7564	if test "$x_includes" = ""; then
7565	    cat >conftest.$ac_ext <<_ACEOF
7566/* confdefs.h.  */
7567_ACEOF
7568cat confdefs.h >>conftest.$ac_ext
7569cat >>conftest.$ac_ext <<_ACEOF
7570/* end confdefs.h.  */
7571#include <X11/XIntrinsic.h>
7572_ACEOF
7573if { (ac_try="$ac_cpp conftest.$ac_ext"
7574case "(($ac_try" in
7575  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7576  *) ac_try_echo=$ac_try;;
7577esac
7578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7579  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7580  ac_status=$?
7581  grep -v '^ *+' conftest.er1 >conftest.err
7582  rm -f conftest.er1
7583  cat conftest.err >&5
7584  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7585  (exit $ac_status); } >/dev/null && {
7586	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7587	 test ! -s conftest.err
7588       }; then
7589  :
7590else
7591  echo "$as_me: failed program was:" >&5
7592sed 's/^/| /' conftest.$ac_ext >&5
7593
7594  not_really_there="yes"
7595fi
7596
7597rm -f conftest.err conftest.$ac_ext
7598	else
7599	    if test ! -r $x_includes/X11/Intrinsic.h; then
7600		not_really_there="yes"
7601	    fi
7602	fi
7603    fi
7604    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
7605	{ echo "$as_me:$LINENO: checking for X11 header files" >&5
7606echo $ECHO_N "checking for X11 header files... $ECHO_C" >&6; }
7607	found_xincludes="no"
7608	cat >conftest.$ac_ext <<_ACEOF
7609/* confdefs.h.  */
7610_ACEOF
7611cat confdefs.h >>conftest.$ac_ext
7612cat >>conftest.$ac_ext <<_ACEOF
7613/* end confdefs.h.  */
7614#include <X11/Intrinsic.h>
7615_ACEOF
7616if { (ac_try="$ac_cpp conftest.$ac_ext"
7617case "(($ac_try" in
7618  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7619  *) ac_try_echo=$ac_try;;
7620esac
7621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7622  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7623  ac_status=$?
7624  grep -v '^ *+' conftest.er1 >conftest.err
7625  rm -f conftest.er1
7626  cat conftest.err >&5
7627  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7628  (exit $ac_status); } >/dev/null && {
7629	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7630	 test ! -s conftest.err
7631       }; then
7632  found_xincludes="yes"
7633else
7634  echo "$as_me: failed program was:" >&5
7635sed 's/^/| /' conftest.$ac_ext >&5
7636
7637  found_xincludes="no"
7638fi
7639
7640rm -f conftest.err conftest.$ac_ext
7641	if test "$found_xincludes" = "no"; then
7642	    dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
7643	    for i in $dirs ; do
7644		if test -r $i/X11/Intrinsic.h; then
7645		    { echo "$as_me:$LINENO: result: $i" >&5
7646echo "${ECHO_T}$i" >&6; }
7647		    XINCLUDES=" -I$i"
7648		    found_xincludes="yes"
7649		    break
7650		fi
7651	    done
7652	fi
7653    else
7654	if test "$x_includes" != ""; then
7655	    XINCLUDES="-I$x_includes"
7656	    found_xincludes="yes"
7657	fi
7658    fi
7659    if test "$found_xincludes" = "no"; then
7660	{ echo "$as_me:$LINENO: result: couldn't find any!" >&5
7661echo "${ECHO_T}couldn't find any!" >&6; }
7662    fi
7663
7664    if test "$no_x" = yes; then
7665	{ echo "$as_me:$LINENO: checking for X11 libraries" >&5
7666echo $ECHO_N "checking for X11 libraries... $ECHO_C" >&6; }
7667	XLIBSW=nope
7668	dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
7669	for i in $dirs ; do
7670	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then
7671		{ echo "$as_me:$LINENO: result: $i" >&5
7672echo "${ECHO_T}$i" >&6; }
7673		XLIBSW="-L$i -lX11"
7674		x_libraries="$i"
7675		break
7676	    fi
7677	done
7678    else
7679	if test "$x_libraries" = ""; then
7680	    XLIBSW=-lX11
7681	else
7682	    XLIBSW="-L$x_libraries -lX11"
7683	fi
7684    fi
7685    if test "$XLIBSW" = nope ; then
7686	{ echo "$as_me:$LINENO: checking for XCreateWindow in -lXwindow" >&5
7687echo $ECHO_N "checking for XCreateWindow in -lXwindow... $ECHO_C" >&6; }
7688if test "${ac_cv_lib_Xwindow_XCreateWindow+set}" = set; then
7689  echo $ECHO_N "(cached) $ECHO_C" >&6
7690else
7691  ac_check_lib_save_LIBS=$LIBS
7692LIBS="-lXwindow  $LIBS"
7693cat >conftest.$ac_ext <<_ACEOF
7694/* confdefs.h.  */
7695_ACEOF
7696cat confdefs.h >>conftest.$ac_ext
7697cat >>conftest.$ac_ext <<_ACEOF
7698/* end confdefs.h.  */
7699
7700/* Override any GCC internal prototype to avoid an error.
7701   Use char because int might match the return type of a GCC
7702   builtin and then its argument prototype would still apply.  */
7703#ifdef __cplusplus
7704extern "C"
7705#endif
7706char XCreateWindow ();
7707int
7708main ()
7709{
7710return XCreateWindow ();
7711  ;
7712  return 0;
7713}
7714_ACEOF
7715rm -f conftest.$ac_objext conftest$ac_exeext
7716if { (ac_try="$ac_link"
7717case "(($ac_try" in
7718  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7719  *) ac_try_echo=$ac_try;;
7720esac
7721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7722  (eval "$ac_link") 2>conftest.er1
7723  ac_status=$?
7724  grep -v '^ *+' conftest.er1 >conftest.err
7725  rm -f conftest.er1
7726  cat conftest.err >&5
7727  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7728  (exit $ac_status); } && {
7729	 test -z "$ac_c_werror_flag" ||
7730	 test ! -s conftest.err
7731       } && test -s conftest$ac_exeext &&
7732       $as_test_x conftest$ac_exeext; then
7733  ac_cv_lib_Xwindow_XCreateWindow=yes
7734else
7735  echo "$as_me: failed program was:" >&5
7736sed 's/^/| /' conftest.$ac_ext >&5
7737
7738	ac_cv_lib_Xwindow_XCreateWindow=no
7739fi
7740
7741rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7742      conftest$ac_exeext conftest.$ac_ext
7743LIBS=$ac_check_lib_save_LIBS
7744fi
7745{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xwindow_XCreateWindow" >&5
7746echo "${ECHO_T}$ac_cv_lib_Xwindow_XCreateWindow" >&6; }
7747if test $ac_cv_lib_Xwindow_XCreateWindow = yes; then
7748  XLIBSW=-lXwindow
7749fi
7750
7751    fi
7752    if test "$XLIBSW" = nope ; then
7753	{ echo "$as_me:$LINENO: result: could not find any!  Using -lX11." >&5
7754echo "${ECHO_T}could not find any!  Using -lX11." >&6; }
7755	XLIBSW=-lX11
7756    fi
7757    # TEA specific:
7758    if test x"${XLIBSW}" != x ; then
7759	PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
7760    fi
7761
7762    fi
7763
7764
7765# Needed for OS X ppx/intel image handling
7766{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
7767echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
7768if test "${ac_cv_c_bigendian+set}" = set; then
7769  echo $ECHO_N "(cached) $ECHO_C" >&6
7770else
7771  # See if sys/param.h defines the BYTE_ORDER macro.
7772cat >conftest.$ac_ext <<_ACEOF
7773/* confdefs.h.  */
7774_ACEOF
7775cat confdefs.h >>conftest.$ac_ext
7776cat >>conftest.$ac_ext <<_ACEOF
7777/* end confdefs.h.  */
7778#include <sys/types.h>
7779#include <sys/param.h>
7780
7781int
7782main ()
7783{
7784#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
7785	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
7786 bogus endian macros
7787#endif
7788
7789  ;
7790  return 0;
7791}
7792_ACEOF
7793rm -f conftest.$ac_objext
7794if { (ac_try="$ac_compile"
7795case "(($ac_try" in
7796  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7797  *) ac_try_echo=$ac_try;;
7798esac
7799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7800  (eval "$ac_compile") 2>conftest.er1
7801  ac_status=$?
7802  grep -v '^ *+' conftest.er1 >conftest.err
7803  rm -f conftest.er1
7804  cat conftest.err >&5
7805  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7806  (exit $ac_status); } && {
7807	 test -z "$ac_c_werror_flag" ||
7808	 test ! -s conftest.err
7809       } && test -s conftest.$ac_objext; then
7810  # It does; now see whether it defined to BIG_ENDIAN or not.
7811cat >conftest.$ac_ext <<_ACEOF
7812/* confdefs.h.  */
7813_ACEOF
7814cat confdefs.h >>conftest.$ac_ext
7815cat >>conftest.$ac_ext <<_ACEOF
7816/* end confdefs.h.  */
7817#include <sys/types.h>
7818#include <sys/param.h>
7819
7820int
7821main ()
7822{
7823#if BYTE_ORDER != BIG_ENDIAN
7824 not big endian
7825#endif
7826
7827  ;
7828  return 0;
7829}
7830_ACEOF
7831rm -f conftest.$ac_objext
7832if { (ac_try="$ac_compile"
7833case "(($ac_try" in
7834  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7835  *) ac_try_echo=$ac_try;;
7836esac
7837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7838  (eval "$ac_compile") 2>conftest.er1
7839  ac_status=$?
7840  grep -v '^ *+' conftest.er1 >conftest.err
7841  rm -f conftest.er1
7842  cat conftest.err >&5
7843  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7844  (exit $ac_status); } && {
7845	 test -z "$ac_c_werror_flag" ||
7846	 test ! -s conftest.err
7847       } && test -s conftest.$ac_objext; then
7848  ac_cv_c_bigendian=yes
7849else
7850  echo "$as_me: failed program was:" >&5
7851sed 's/^/| /' conftest.$ac_ext >&5
7852
7853	ac_cv_c_bigendian=no
7854fi
7855
7856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7857else
7858  echo "$as_me: failed program was:" >&5
7859sed 's/^/| /' conftest.$ac_ext >&5
7860
7861	# It does not; compile a test program.
7862if test "$cross_compiling" = yes; then
7863  # try to guess the endianness by grepping values into an object file
7864  ac_cv_c_bigendian=unknown
7865  cat >conftest.$ac_ext <<_ACEOF
7866/* confdefs.h.  */
7867_ACEOF
7868cat confdefs.h >>conftest.$ac_ext
7869cat >>conftest.$ac_ext <<_ACEOF
7870/* end confdefs.h.  */
7871short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
7872short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
7873void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
7874short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
7875short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
7876void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
7877int
7878main ()
7879{
7880 _ascii (); _ebcdic ();
7881  ;
7882  return 0;
7883}
7884_ACEOF
7885rm -f conftest.$ac_objext
7886if { (ac_try="$ac_compile"
7887case "(($ac_try" in
7888  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7889  *) ac_try_echo=$ac_try;;
7890esac
7891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7892  (eval "$ac_compile") 2>conftest.er1
7893  ac_status=$?
7894  grep -v '^ *+' conftest.er1 >conftest.err
7895  rm -f conftest.er1
7896  cat conftest.err >&5
7897  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7898  (exit $ac_status); } && {
7899	 test -z "$ac_c_werror_flag" ||
7900	 test ! -s conftest.err
7901       } && test -s conftest.$ac_objext; then
7902  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
7903  ac_cv_c_bigendian=yes
7904fi
7905if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
7906  if test "$ac_cv_c_bigendian" = unknown; then
7907    ac_cv_c_bigendian=no
7908  else
7909    # finding both strings is unlikely to happen, but who knows?
7910    ac_cv_c_bigendian=unknown
7911  fi
7912fi
7913else
7914  echo "$as_me: failed program was:" >&5
7915sed 's/^/| /' conftest.$ac_ext >&5
7916
7917
7918fi
7919
7920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7921else
7922  cat >conftest.$ac_ext <<_ACEOF
7923/* confdefs.h.  */
7924_ACEOF
7925cat confdefs.h >>conftest.$ac_ext
7926cat >>conftest.$ac_ext <<_ACEOF
7927/* end confdefs.h.  */
7928$ac_includes_default
7929int
7930main ()
7931{
7932
7933  /* Are we little or big endian?  From Harbison&Steele.  */
7934  union
7935  {
7936    long int l;
7937    char c[sizeof (long int)];
7938  } u;
7939  u.l = 1;
7940  return u.c[sizeof (long int) - 1] == 1;
7941
7942  ;
7943  return 0;
7944}
7945_ACEOF
7946rm -f conftest$ac_exeext
7947if { (ac_try="$ac_link"
7948case "(($ac_try" in
7949  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7950  *) ac_try_echo=$ac_try;;
7951esac
7952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7953  (eval "$ac_link") 2>&5
7954  ac_status=$?
7955  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7956  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7957  { (case "(($ac_try" in
7958  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7959  *) ac_try_echo=$ac_try;;
7960esac
7961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7962  (eval "$ac_try") 2>&5
7963  ac_status=$?
7964  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7965  (exit $ac_status); }; }; then
7966  ac_cv_c_bigendian=no
7967else
7968  echo "$as_me: program exited with status $ac_status" >&5
7969echo "$as_me: failed program was:" >&5
7970sed 's/^/| /' conftest.$ac_ext >&5
7971
7972( exit $ac_status )
7973ac_cv_c_bigendian=yes
7974fi
7975rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7976fi
7977
7978
7979fi
7980
7981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7982fi
7983{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
7984echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
7985case $ac_cv_c_bigendian in
7986  yes)
7987
7988cat >>confdefs.h <<\_ACEOF
7989#define WORDS_BIGENDIAN 1
7990_ACEOF
7991 ;;
7992  no)
7993     ;;
7994  *)
7995    { { echo "$as_me:$LINENO: error: unknown endianness
7996presetting ac_cv_c_bigendian=no (or yes) will help" >&5
7997echo "$as_me: error: unknown endianness
7998presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
7999   { (exit 1); exit 1; }; } ;;
8000esac
8001
8002
8003#--------------------------------------------------------------------
8004# __CHANGE__
8005# A few miscellaneous platform-specific items:
8006#
8007# Define a special symbol for Windows (BUILD_sample in this case) so
8008# that we create the export library with the dll.  See sha1.h on how
8009# to use this.
8010#
8011# Windows creates a few extra files that need to be cleaned up.
8012# You can add more files to clean if your extension creates any extra
8013# files.
8014#
8015# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
8016# These will be appended to the current set of compiler flags for
8017# your system.
8018#--------------------------------------------------------------------
8019
8020if test "${TEA_PLATFORM}" = "windows" ; then
8021    cat >>confdefs.h <<\_ACEOF
8022#define BUILD_shellicon 1
8023_ACEOF
8024
8025    CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
8026
8027    vars="gdi32.lib user32.lib comctl32.lib ole32.lib"
8028    for i in $vars; do
8029	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
8030	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
8031	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
8032	fi
8033	PKG_LIBS="$PKG_LIBS $i"
8034    done
8035
8036
8037else
8038    CLEANFILES="pkgIndex.tcl"
8039fi
8040if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
8041
8042    vars="-framework Carbon"
8043    for i in $vars; do
8044	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
8045	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
8046	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
8047	fi
8048	PKG_LIBS="$PKG_LIBS $i"
8049    done
8050
8051
8052fi
8053
8054
8055#--------------------------------------------------------------------
8056# Check whether --enable-threads or --disable-threads was given.
8057#--------------------------------------------------------------------
8058
8059
8060    # Check whether --enable-threads was given.
8061if test "${enable_threads+set}" = set; then
8062  enableval=$enable_threads; tcl_ok=$enableval
8063else
8064  tcl_ok=yes
8065fi
8066
8067
8068    if test "${enable_threads+set}" = set; then
8069	enableval="$enable_threads"
8070	tcl_ok=$enableval
8071    else
8072	tcl_ok=yes
8073    fi
8074
8075    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
8076	TCL_THREADS=1
8077
8078	if test "${TEA_PLATFORM}" != "windows" ; then
8079	    # We are always OK on Windows, so check what this platform wants:
8080
8081	    # USE_THREAD_ALLOC tells us to try the special thread-based
8082	    # allocator that significantly reduces lock contention
8083
8084cat >>confdefs.h <<\_ACEOF
8085#define USE_THREAD_ALLOC 1
8086_ACEOF
8087
8088
8089cat >>confdefs.h <<\_ACEOF
8090#define _REENTRANT 1
8091_ACEOF
8092
8093	    if test "`uname -s`" = "SunOS" ; then
8094
8095cat >>confdefs.h <<\_ACEOF
8096#define _POSIX_PTHREAD_SEMANTICS 1
8097_ACEOF
8098
8099	    fi
8100
8101cat >>confdefs.h <<\_ACEOF
8102#define _THREAD_SAFE 1
8103_ACEOF
8104
8105	    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
8106echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
8107if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
8108  echo $ECHO_N "(cached) $ECHO_C" >&6
8109else
8110  ac_check_lib_save_LIBS=$LIBS
8111LIBS="-lpthread  $LIBS"
8112cat >conftest.$ac_ext <<_ACEOF
8113/* confdefs.h.  */
8114_ACEOF
8115cat confdefs.h >>conftest.$ac_ext
8116cat >>conftest.$ac_ext <<_ACEOF
8117/* end confdefs.h.  */
8118
8119/* Override any GCC internal prototype to avoid an error.
8120   Use char because int might match the return type of a GCC
8121   builtin and then its argument prototype would still apply.  */
8122#ifdef __cplusplus
8123extern "C"
8124#endif
8125char pthread_mutex_init ();
8126int
8127main ()
8128{
8129return pthread_mutex_init ();
8130  ;
8131  return 0;
8132}
8133_ACEOF
8134rm -f conftest.$ac_objext conftest$ac_exeext
8135if { (ac_try="$ac_link"
8136case "(($ac_try" in
8137  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8138  *) ac_try_echo=$ac_try;;
8139esac
8140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8141  (eval "$ac_link") 2>conftest.er1
8142  ac_status=$?
8143  grep -v '^ *+' conftest.er1 >conftest.err
8144  rm -f conftest.er1
8145  cat conftest.err >&5
8146  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8147  (exit $ac_status); } && {
8148	 test -z "$ac_c_werror_flag" ||
8149	 test ! -s conftest.err
8150       } && test -s conftest$ac_exeext &&
8151       $as_test_x conftest$ac_exeext; then
8152  ac_cv_lib_pthread_pthread_mutex_init=yes
8153else
8154  echo "$as_me: failed program was:" >&5
8155sed 's/^/| /' conftest.$ac_ext >&5
8156
8157	ac_cv_lib_pthread_pthread_mutex_init=no
8158fi
8159
8160rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8161      conftest$ac_exeext conftest.$ac_ext
8162LIBS=$ac_check_lib_save_LIBS
8163fi
8164{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
8165echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
8166if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
8167  tcl_ok=yes
8168else
8169  tcl_ok=no
8170fi
8171
8172	    if test "$tcl_ok" = "no"; then
8173		# Check a little harder for __pthread_mutex_init in the same
8174		# library, as some systems hide it there until pthread.h is
8175		# defined.  We could alternatively do an AC_TRY_COMPILE with
8176		# pthread.h, but that will work with libpthread really doesn't
8177		# exist, like AIX 4.2.  [Bug: 4359]
8178		{ echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
8179echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
8180if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
8181  echo $ECHO_N "(cached) $ECHO_C" >&6
8182else
8183  ac_check_lib_save_LIBS=$LIBS
8184LIBS="-lpthread  $LIBS"
8185cat >conftest.$ac_ext <<_ACEOF
8186/* confdefs.h.  */
8187_ACEOF
8188cat confdefs.h >>conftest.$ac_ext
8189cat >>conftest.$ac_ext <<_ACEOF
8190/* end confdefs.h.  */
8191
8192/* Override any GCC internal prototype to avoid an error.
8193   Use char because int might match the return type of a GCC
8194   builtin and then its argument prototype would still apply.  */
8195#ifdef __cplusplus
8196extern "C"
8197#endif
8198char __pthread_mutex_init ();
8199int
8200main ()
8201{
8202return __pthread_mutex_init ();
8203  ;
8204  return 0;
8205}
8206_ACEOF
8207rm -f conftest.$ac_objext conftest$ac_exeext
8208if { (ac_try="$ac_link"
8209case "(($ac_try" in
8210  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8211  *) ac_try_echo=$ac_try;;
8212esac
8213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8214  (eval "$ac_link") 2>conftest.er1
8215  ac_status=$?
8216  grep -v '^ *+' conftest.er1 >conftest.err
8217  rm -f conftest.er1
8218  cat conftest.err >&5
8219  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8220  (exit $ac_status); } && {
8221	 test -z "$ac_c_werror_flag" ||
8222	 test ! -s conftest.err
8223       } && test -s conftest$ac_exeext &&
8224       $as_test_x conftest$ac_exeext; then
8225  ac_cv_lib_pthread___pthread_mutex_init=yes
8226else
8227  echo "$as_me: failed program was:" >&5
8228sed 's/^/| /' conftest.$ac_ext >&5
8229
8230	ac_cv_lib_pthread___pthread_mutex_init=no
8231fi
8232
8233rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8234      conftest$ac_exeext conftest.$ac_ext
8235LIBS=$ac_check_lib_save_LIBS
8236fi
8237{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
8238echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
8239if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
8240  tcl_ok=yes
8241else
8242  tcl_ok=no
8243fi
8244
8245	    fi
8246
8247	    if test "$tcl_ok" = "yes"; then
8248		# The space is needed
8249		THREADS_LIBS=" -lpthread"
8250	    else
8251		{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
8252echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; }
8253if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
8254  echo $ECHO_N "(cached) $ECHO_C" >&6
8255else
8256  ac_check_lib_save_LIBS=$LIBS
8257LIBS="-lpthreads  $LIBS"
8258cat >conftest.$ac_ext <<_ACEOF
8259/* confdefs.h.  */
8260_ACEOF
8261cat confdefs.h >>conftest.$ac_ext
8262cat >>conftest.$ac_ext <<_ACEOF
8263/* end confdefs.h.  */
8264
8265/* Override any GCC internal prototype to avoid an error.
8266   Use char because int might match the return type of a GCC
8267   builtin and then its argument prototype would still apply.  */
8268#ifdef __cplusplus
8269extern "C"
8270#endif
8271char pthread_mutex_init ();
8272int
8273main ()
8274{
8275return pthread_mutex_init ();
8276  ;
8277  return 0;
8278}
8279_ACEOF
8280rm -f conftest.$ac_objext conftest$ac_exeext
8281if { (ac_try="$ac_link"
8282case "(($ac_try" in
8283  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8284  *) ac_try_echo=$ac_try;;
8285esac
8286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8287  (eval "$ac_link") 2>conftest.er1
8288  ac_status=$?
8289  grep -v '^ *+' conftest.er1 >conftest.err
8290  rm -f conftest.er1
8291  cat conftest.err >&5
8292  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8293  (exit $ac_status); } && {
8294	 test -z "$ac_c_werror_flag" ||
8295	 test ! -s conftest.err
8296       } && test -s conftest$ac_exeext &&
8297       $as_test_x conftest$ac_exeext; then
8298  ac_cv_lib_pthreads_pthread_mutex_init=yes
8299else
8300  echo "$as_me: failed program was:" >&5
8301sed 's/^/| /' conftest.$ac_ext >&5
8302
8303	ac_cv_lib_pthreads_pthread_mutex_init=no
8304fi
8305
8306rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8307      conftest$ac_exeext conftest.$ac_ext
8308LIBS=$ac_check_lib_save_LIBS
8309fi
8310{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
8311echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
8312if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
8313  tcl_ok=yes
8314else
8315  tcl_ok=no
8316fi
8317
8318		if test "$tcl_ok" = "yes"; then
8319		    # The space is needed
8320		    THREADS_LIBS=" -lpthreads"
8321		else
8322		    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
8323echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; }
8324if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
8325  echo $ECHO_N "(cached) $ECHO_C" >&6
8326else
8327  ac_check_lib_save_LIBS=$LIBS
8328LIBS="-lc  $LIBS"
8329cat >conftest.$ac_ext <<_ACEOF
8330/* confdefs.h.  */
8331_ACEOF
8332cat confdefs.h >>conftest.$ac_ext
8333cat >>conftest.$ac_ext <<_ACEOF
8334/* end confdefs.h.  */
8335
8336/* Override any GCC internal prototype to avoid an error.
8337   Use char because int might match the return type of a GCC
8338   builtin and then its argument prototype would still apply.  */
8339#ifdef __cplusplus
8340extern "C"
8341#endif
8342char pthread_mutex_init ();
8343int
8344main ()
8345{
8346return pthread_mutex_init ();
8347  ;
8348  return 0;
8349}
8350_ACEOF
8351rm -f conftest.$ac_objext conftest$ac_exeext
8352if { (ac_try="$ac_link"
8353case "(($ac_try" in
8354  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8355  *) ac_try_echo=$ac_try;;
8356esac
8357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8358  (eval "$ac_link") 2>conftest.er1
8359  ac_status=$?
8360  grep -v '^ *+' conftest.er1 >conftest.err
8361  rm -f conftest.er1
8362  cat conftest.err >&5
8363  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8364  (exit $ac_status); } && {
8365	 test -z "$ac_c_werror_flag" ||
8366	 test ! -s conftest.err
8367       } && test -s conftest$ac_exeext &&
8368       $as_test_x conftest$ac_exeext; then
8369  ac_cv_lib_c_pthread_mutex_init=yes
8370else
8371  echo "$as_me: failed program was:" >&5
8372sed 's/^/| /' conftest.$ac_ext >&5
8373
8374	ac_cv_lib_c_pthread_mutex_init=no
8375fi
8376
8377rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8378      conftest$ac_exeext conftest.$ac_ext
8379LIBS=$ac_check_lib_save_LIBS
8380fi
8381{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
8382echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; }
8383if test $ac_cv_lib_c_pthread_mutex_init = yes; then
8384  tcl_ok=yes
8385else
8386  tcl_ok=no
8387fi
8388
8389		    if test "$tcl_ok" = "no"; then
8390			{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
8391echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; }
8392if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
8393  echo $ECHO_N "(cached) $ECHO_C" >&6
8394else
8395  ac_check_lib_save_LIBS=$LIBS
8396LIBS="-lc_r  $LIBS"
8397cat >conftest.$ac_ext <<_ACEOF
8398/* confdefs.h.  */
8399_ACEOF
8400cat confdefs.h >>conftest.$ac_ext
8401cat >>conftest.$ac_ext <<_ACEOF
8402/* end confdefs.h.  */
8403
8404/* Override any GCC internal prototype to avoid an error.
8405   Use char because int might match the return type of a GCC
8406   builtin and then its argument prototype would still apply.  */
8407#ifdef __cplusplus
8408extern "C"
8409#endif
8410char pthread_mutex_init ();
8411int
8412main ()
8413{
8414return pthread_mutex_init ();
8415  ;
8416  return 0;
8417}
8418_ACEOF
8419rm -f conftest.$ac_objext conftest$ac_exeext
8420if { (ac_try="$ac_link"
8421case "(($ac_try" in
8422  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8423  *) ac_try_echo=$ac_try;;
8424esac
8425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8426  (eval "$ac_link") 2>conftest.er1
8427  ac_status=$?
8428  grep -v '^ *+' conftest.er1 >conftest.err
8429  rm -f conftest.er1
8430  cat conftest.err >&5
8431  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8432  (exit $ac_status); } && {
8433	 test -z "$ac_c_werror_flag" ||
8434	 test ! -s conftest.err
8435       } && test -s conftest$ac_exeext &&
8436       $as_test_x conftest$ac_exeext; then
8437  ac_cv_lib_c_r_pthread_mutex_init=yes
8438else
8439  echo "$as_me: failed program was:" >&5
8440sed 's/^/| /' conftest.$ac_ext >&5
8441
8442	ac_cv_lib_c_r_pthread_mutex_init=no
8443fi
8444
8445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8446      conftest$ac_exeext conftest.$ac_ext
8447LIBS=$ac_check_lib_save_LIBS
8448fi
8449{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
8450echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
8451if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
8452  tcl_ok=yes
8453else
8454  tcl_ok=no
8455fi
8456
8457			if test "$tcl_ok" = "yes"; then
8458			    # The space is needed
8459			    THREADS_LIBS=" -pthread"
8460			else
8461			    TCL_THREADS=0
8462			    { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
8463echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
8464			fi
8465		    fi
8466		fi
8467	    fi
8468	fi
8469    else
8470	TCL_THREADS=0
8471    fi
8472    # Do checking message here to not mess up interleaved configure output
8473    { echo "$as_me:$LINENO: checking for building with threads" >&5
8474echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; }
8475    if test "${TCL_THREADS}" = 1; then
8476
8477cat >>confdefs.h <<\_ACEOF
8478#define TCL_THREADS 1
8479_ACEOF
8480
8481	{ echo "$as_me:$LINENO: result: yes (default)" >&5
8482echo "${ECHO_T}yes (default)" >&6; }
8483    else
8484	{ echo "$as_me:$LINENO: result: no" >&5
8485echo "${ECHO_T}no" >&6; }
8486    fi
8487    # TCL_THREADS sanity checking.  See if our request for building with
8488    # threads is the same as the way Tcl was built.  If not, warn the user.
8489    case ${TCL_DEFS} in
8490	*THREADS=1*)
8491	    if test "${TCL_THREADS}" = "0"; then
8492		{ echo "$as_me:$LINENO: WARNING:
8493    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
8494    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
8495echo "$as_me: WARNING:
8496    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
8497    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
8498	    fi
8499	    ;;
8500	*)
8501	    if test "${TCL_THREADS}" = "1"; then
8502		{ echo "$as_me:$LINENO: WARNING:
8503    --enable-threads requested, but building against a Tcl that is NOT
8504    thread-enabled.  This is an OK configuration that will also run in
8505    a thread-enabled core." >&5
8506echo "$as_me: WARNING:
8507    --enable-threads requested, but building against a Tcl that is NOT
8508    thread-enabled.  This is an OK configuration that will also run in
8509    a thread-enabled core." >&2;}
8510	    fi
8511	    ;;
8512    esac
8513
8514
8515
8516#--------------------------------------------------------------------
8517# The statement below defines a collection of symbols related to
8518# building as a shared library instead of a static library.
8519#--------------------------------------------------------------------
8520
8521
8522    { echo "$as_me:$LINENO: checking how to build libraries" >&5
8523echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; }
8524    # Check whether --enable-shared was given.
8525if test "${enable_shared+set}" = set; then
8526  enableval=$enable_shared; tcl_ok=$enableval
8527else
8528  tcl_ok=yes
8529fi
8530
8531
8532    if test "${enable_shared+set}" = set; then
8533	enableval="$enable_shared"
8534	tcl_ok=$enableval
8535    else
8536	tcl_ok=yes
8537    fi
8538
8539    if test "$tcl_ok" = "yes" ; then
8540	{ echo "$as_me:$LINENO: result: shared" >&5
8541echo "${ECHO_T}shared" >&6; }
8542	SHARED_BUILD=1
8543    else
8544	{ echo "$as_me:$LINENO: result: static" >&5
8545echo "${ECHO_T}static" >&6; }
8546	SHARED_BUILD=0
8547
8548cat >>confdefs.h <<\_ACEOF
8549#define STATIC_BUILD 1
8550_ACEOF
8551
8552    fi
8553
8554
8555
8556#--------------------------------------------------------------------
8557# This macro figures out what flags to use with the compiler/linker
8558# when building shared/static debug/optimized objects.  This information
8559# can be taken from the tclConfig.sh file, but this figures it all out.
8560#--------------------------------------------------------------------
8561
8562
8563
8564
8565    # Step 0.a: Enable 64 bit support?
8566
8567    { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
8568echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; }
8569    # Check whether --enable-64bit was given.
8570if test "${enable_64bit+set}" = set; then
8571  enableval=$enable_64bit; do64bit=$enableval
8572else
8573  do64bit=no
8574fi
8575
8576    { echo "$as_me:$LINENO: result: $do64bit" >&5
8577echo "${ECHO_T}$do64bit" >&6; }
8578
8579    # Step 0.b: Enable Solaris 64 bit VIS support?
8580
8581    { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
8582echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; }
8583    # Check whether --enable-64bit-vis was given.
8584if test "${enable_64bit_vis+set}" = set; then
8585  enableval=$enable_64bit_vis; do64bitVIS=$enableval
8586else
8587  do64bitVIS=no
8588fi
8589
8590    { echo "$as_me:$LINENO: result: $do64bitVIS" >&5
8591echo "${ECHO_T}$do64bitVIS" >&6; }
8592    # Force 64bit on with VIS
8593    if test "$do64bitVIS" = "yes"; then
8594  do64bit=yes
8595fi
8596
8597
8598    # Step 0.c: Check if visibility support is available. Do this here so
8599    # that platform specific alternatives can be used below if this fails.
8600
8601    { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
8602echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; }
8603if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
8604  echo $ECHO_N "(cached) $ECHO_C" >&6
8605else
8606
8607	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
8608	cat >conftest.$ac_ext <<_ACEOF
8609/* confdefs.h.  */
8610_ACEOF
8611cat confdefs.h >>conftest.$ac_ext
8612cat >>conftest.$ac_ext <<_ACEOF
8613/* end confdefs.h.  */
8614
8615	    extern __attribute__((__visibility__("hidden"))) void f(void);
8616	    void f(void) {}
8617int
8618main ()
8619{
8620f();
8621  ;
8622  return 0;
8623}
8624_ACEOF
8625rm -f conftest.$ac_objext conftest$ac_exeext
8626if { (ac_try="$ac_link"
8627case "(($ac_try" in
8628  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8629  *) ac_try_echo=$ac_try;;
8630esac
8631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8632  (eval "$ac_link") 2>conftest.er1
8633  ac_status=$?
8634  grep -v '^ *+' conftest.er1 >conftest.err
8635  rm -f conftest.er1
8636  cat conftest.err >&5
8637  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8638  (exit $ac_status); } && {
8639	 test -z "$ac_c_werror_flag" ||
8640	 test ! -s conftest.err
8641       } && test -s conftest$ac_exeext &&
8642       $as_test_x conftest$ac_exeext; then
8643  tcl_cv_cc_visibility_hidden=yes
8644else
8645  echo "$as_me: failed program was:" >&5
8646sed 's/^/| /' conftest.$ac_ext >&5
8647
8648	tcl_cv_cc_visibility_hidden=no
8649fi
8650
8651rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8652      conftest$ac_exeext conftest.$ac_ext
8653	CFLAGS=$hold_cflags
8654fi
8655{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
8656echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; }
8657    if test $tcl_cv_cc_visibility_hidden = yes; then
8658
8659
8660cat >>confdefs.h <<\_ACEOF
8661#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
8662_ACEOF
8663
8664
8665fi
8666
8667
8668    # Step 0.d: Disable -rpath support?
8669
8670    { echo "$as_me:$LINENO: checking if rpath support is requested" >&5
8671echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; }
8672    # Check whether --enable-rpath was given.
8673if test "${enable_rpath+set}" = set; then
8674  enableval=$enable_rpath; doRpath=$enableval
8675else
8676  doRpath=yes
8677fi
8678
8679    { echo "$as_me:$LINENO: result: $doRpath" >&5
8680echo "${ECHO_T}$doRpath" >&6; }
8681
8682    # TEA specific: Cross-compiling options for Windows/CE builds?
8683
8684    if test "${TEA_PLATFORM}" = windows; then
8685
8686	{ echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
8687echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6; }
8688	# Check whether --enable-wince was given.
8689if test "${enable_wince+set}" = set; then
8690  enableval=$enable_wince; doWince=$enableval
8691else
8692  doWince=no
8693fi
8694
8695	{ echo "$as_me:$LINENO: result: $doWince" >&5
8696echo "${ECHO_T}$doWince" >&6; }
8697
8698fi
8699
8700
8701    # Set the variable "system" to hold the name and version number
8702    # for the system.
8703
8704
8705    { echo "$as_me:$LINENO: checking system version" >&5
8706echo $ECHO_N "checking system version... $ECHO_C" >&6; }
8707if test "${tcl_cv_sys_version+set}" = set; then
8708  echo $ECHO_N "(cached) $ECHO_C" >&6
8709else
8710
8711	# TEA specific:
8712	if test "${TEA_PLATFORM}" = "windows" ; then
8713	    tcl_cv_sys_version=windows
8714	else
8715	    tcl_cv_sys_version=`uname -s`-`uname -r`
8716	    if test "$?" -ne 0 ; then
8717		{ echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
8718echo "$as_me: WARNING: can't find uname command" >&2;}
8719		tcl_cv_sys_version=unknown
8720	    else
8721		if test "`uname -s`" = "AIX" ; then
8722		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
8723		fi
8724	    fi
8725	fi
8726
8727fi
8728{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
8729echo "${ECHO_T}$tcl_cv_sys_version" >&6; }
8730    system=$tcl_cv_sys_version
8731
8732
8733    # Require ranlib early so we can override it in special cases below.
8734
8735
8736
8737    # Set configuration options based on system name and version.
8738    # This is similar to Tcl's unix/tcl.m4 except that we've added a
8739    # "windows" case and removed some core-only vars.
8740
8741    do64bit_ok=no
8742    # default to '{$LIBS}' and set to "" on per-platform necessary basis
8743    SHLIB_LD_LIBS='${LIBS}'
8744    # When ld needs options to work in 64-bit mode, put them in
8745    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
8746    # is disabled by the user. [Bug 1016796]
8747    LDFLAGS_ARCH=""
8748    UNSHARED_LIB_SUFFIX=""
8749    # TEA specific: use PACKAGE_VERSION instead of VERSION
8750    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
8751    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
8752    TCL_LIB_VERSIONS_OK=ok
8753    CFLAGS_DEBUG=-g
8754    CFLAGS_OPTIMIZE=-O
8755    if test "$GCC" = yes; then
8756
8757	# TEA specific:
8758	CFLAGS_OPTIMIZE=-O2
8759	CFLAGS_WARNING="-Wall"
8760
8761else
8762  CFLAGS_WARNING=""
8763fi
8764
8765    # Extract the first word of "ar", so it can be a program name with args.
8766set dummy ar; ac_word=$2
8767{ echo "$as_me:$LINENO: checking for $ac_word" >&5
8768echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
8769if test "${ac_cv_prog_AR+set}" = set; then
8770  echo $ECHO_N "(cached) $ECHO_C" >&6
8771else
8772  if test -n "$AR"; then
8773  ac_cv_prog_AR="$AR" # Let the user override the test.
8774else
8775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8776for as_dir in $PATH
8777do
8778  IFS=$as_save_IFS
8779  test -z "$as_dir" && as_dir=.
8780  for ac_exec_ext in '' $ac_executable_extensions; do
8781  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8782    ac_cv_prog_AR="ar"
8783    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8784    break 2
8785  fi
8786done
8787done
8788IFS=$as_save_IFS
8789
8790fi
8791fi
8792AR=$ac_cv_prog_AR
8793if test -n "$AR"; then
8794  { echo "$as_me:$LINENO: result: $AR" >&5
8795echo "${ECHO_T}$AR" >&6; }
8796else
8797  { echo "$as_me:$LINENO: result: no" >&5
8798echo "${ECHO_T}no" >&6; }
8799fi
8800
8801
8802    STLIB_LD='${AR} cr'
8803    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
8804    if test "x$SHLIB_VERSION" = x; then
8805  SHLIB_VERSION="1.0"
8806fi
8807
8808    case $system in
8809	# TEA specific:
8810	windows)
8811	    # This is a 2-stage check to make sure we have the 64-bit SDK
8812	    # We have to know where the SDK is installed.
8813	    # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
8814	    # MACHINE is IX86 for LINK, but this is used by the manifest,
8815	    # which requires x86|amd64|ia64.
8816	    MACHINE="X86"
8817	    if test "$do64bit" != "no" ; then
8818		if test "x${MSSDK}x" = "xx" ; then
8819		    MSSDK="C:/Progra~1/Microsoft Platform SDK"
8820		fi
8821		MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
8822		PATH64=""
8823		case "$do64bit" in
8824		    amd64|x64|yes)
8825			MACHINE="AMD64" ; # default to AMD64 64-bit build
8826			PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
8827			;;
8828		    ia64)
8829			MACHINE="IA64"
8830			PATH64="${MSSDK}/Bin/Win64"
8831			;;
8832		esac
8833		if test ! -d "${PATH64}" ; then
8834		    { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
8835echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
8836		    { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
8837echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
8838		    do64bit="no"
8839		else
8840		    { echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
8841echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6; }
8842		    do64bit_ok="yes"
8843		fi
8844	    fi
8845
8846	    if test "$doWince" != "no" ; then
8847		if test "$do64bit" != "no" ; then
8848		    { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
8849echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
8850   { (exit 1); exit 1; }; }
8851		fi
8852		if test "$GCC" = "yes" ; then
8853		    { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
8854echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
8855   { (exit 1); exit 1; }; }
8856		fi
8857
8858    # First, look for one uninstalled.
8859    # the alternative search directory is invoked by --with-celib
8860
8861    if test x"${no_celib}" = x ; then
8862	# we reset no_celib in case something fails here
8863	no_celib=true
8864
8865# Check whether --with-celib was given.
8866if test "${with_celib+set}" = set; then
8867  withval=$with_celib; with_celibconfig=${withval}
8868fi
8869
8870	{ echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
8871echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6; }
8872	if test "${ac_cv_c_celibconfig+set}" = set; then
8873  echo $ECHO_N "(cached) $ECHO_C" >&6
8874else
8875
8876	    # First check to see if --with-celibconfig was specified.
8877	    if test x"${with_celibconfig}" != x ; then
8878		if test -d "${with_celibconfig}/inc" ; then
8879		    ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
8880		else
8881		    { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
8882echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
8883   { (exit 1); exit 1; }; }
8884		fi
8885	    fi
8886
8887	    # then check for a celib library
8888	    if test x"${ac_cv_c_celibconfig}" = x ; then
8889		for i in \
8890			../celib-palm-3.0 \
8891			../celib \
8892			../../celib-palm-3.0 \
8893			../../celib \
8894			`ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
8895			${srcdir}/../celib-palm-3.0 \
8896			${srcdir}/../celib \
8897			`ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
8898			; do
8899		    if test -d "$i/inc" ; then
8900			ac_cv_c_celibconfig=`(cd $i; pwd)`
8901			break
8902		    fi
8903		done
8904	    fi
8905
8906fi
8907
8908	if test x"${ac_cv_c_celibconfig}" = x ; then
8909	    { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
8910echo "$as_me: error: Cannot find celib support library directory" >&2;}
8911   { (exit 1); exit 1; }; }
8912	else
8913	    no_celib=
8914	    CELIB_DIR=${ac_cv_c_celibconfig}
8915	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
8916	    { echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
8917echo "${ECHO_T}found $CELIB_DIR" >&6; }
8918	fi
8919    fi
8920
8921		# Set defaults for common evc4/PPC2003 setup
8922		# Currently Tcl requires 300+, possibly 420+ for sockets
8923		CEVERSION=420; 		# could be 211 300 301 400 420 ...
8924		TARGETCPU=ARMV4;	# could be ARMV4 ARM MIPS SH3 X86 ...
8925		ARCH=ARM;		# could be ARM MIPS X86EM ...
8926		PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
8927		if test "$doWince" != "yes"; then
8928		    # If !yes then the user specified something
8929		    # Reset ARCH to allow user to skip specifying it
8930		    ARCH=
8931		    eval `echo $doWince | awk -F, '{ \
8932	    if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
8933	    if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
8934	    if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
8935	    if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
8936	    if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
8937		    }'`
8938		    if test "x${ARCH}" = "x" ; then
8939			ARCH=$TARGETCPU;
8940		    fi
8941		fi
8942		OSVERSION=WCE$CEVERSION;
8943	    	if test "x${WCEROOT}" = "x" ; then
8944			WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
8945		    if test ! -d "${WCEROOT}" ; then
8946			WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
8947		    fi
8948		fi
8949		if test "x${SDKROOT}" = "x" ; then
8950		    SDKROOT="C:/Program Files/Windows CE Tools"
8951		    if test ! -d "${SDKROOT}" ; then
8952			SDKROOT="C:/Windows CE Tools"
8953		    fi
8954		fi
8955		WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
8956		SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
8957		if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
8958		    -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
8959		    { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
8960echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
8961   { (exit 1); exit 1; }; }
8962		    doWince="no"
8963		else
8964		    # We could PATH_NOSPACE these, but that's not important,
8965		    # as long as we quote them when used.
8966		    CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
8967		    if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
8968			CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
8969		    fi
8970		    CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
8971    		fi
8972	    fi
8973
8974	    if test "$GCC" != "yes" ; then
8975	        if test "${SHARED_BUILD}" = "0" ; then
8976		    runtime=-MT
8977	        else
8978		    runtime=-MD
8979	        fi
8980
8981                if test "$do64bit" != "no" ; then
8982		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
8983		    CC="\"${PATH64}/cl.exe\""
8984		    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
8985		    RC="\"${MSSDK}/bin/rc.exe\""
8986		    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
8987		    LINKBIN="\"${PATH64}/link.exe\""
8988		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
8989		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
8990		    # Avoid 'unresolved external symbol __security_cookie'
8991		    # errors, c.f. http://support.microsoft.com/?id=894573
8992
8993    vars="bufferoverflowU.lib"
8994    for i in $vars; do
8995	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
8996	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
8997	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
8998	fi
8999	PKG_LIBS="$PKG_LIBS $i"
9000    done
9001
9002
9003		elif test "$doWince" != "no" ; then
9004		    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
9005		    if test "${TARGETCPU}" = "X86"; then
9006			CC="\"${CEBINROOT}/cl.exe\""
9007		    else
9008			CC="\"${CEBINROOT}/cl${ARCH}.exe\""
9009		    fi
9010		    CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
9011		    RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
9012		    arch=`echo ${ARCH} | awk '{print tolower($0)}'`
9013		    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
9014		    if test "${SHARED_BUILD}" = "1" ; then
9015			# Static CE builds require static celib as well
9016		    	defs="${defs} _DLL"
9017		    fi
9018		    for i in $defs ; do
9019
9020cat >>confdefs.h <<_ACEOF
9021#define $i 1
9022_ACEOF
9023
9024		    done
9025
9026cat >>confdefs.h <<_ACEOF
9027#define _WIN32_WCE $CEVERSION
9028_ACEOF
9029
9030
9031cat >>confdefs.h <<_ACEOF
9032#define UNDER_CE $CEVERSION
9033_ACEOF
9034
9035		    CFLAGS_DEBUG="-nologo -Zi -Od"
9036		    CFLAGS_OPTIMIZE="-nologo -Ox"
9037		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
9038		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
9039		    LINKBIN="\"${CEBINROOT}/link.exe\""
9040
9041		else
9042		    RC="rc"
9043		    lflags="-nologo"
9044    		    LINKBIN="link"
9045		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
9046		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
9047		fi
9048	    fi
9049
9050	    if test "$GCC" = "yes"; then
9051		# mingw gcc mode
9052		RC="windres"
9053		CFLAGS_DEBUG="-g"
9054		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
9055		SHLIB_LD="$CC -shared"
9056		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9057		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
9058		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
9059	    else
9060		SHLIB_LD="${LINKBIN} -dll ${lflags}"
9061		# link -lib only works when -lib is the first arg
9062		STLIB_LD="${LINKBIN} -lib ${lflags}"
9063		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
9064		PATHTYPE=-w
9065		# For information on what debugtype is most useful, see:
9066		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
9067		# and also
9068		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
9069		# This essentially turns it all on.
9070		LDFLAGS_DEBUG="-debug -debugtype:cv"
9071		LDFLAGS_OPTIMIZE="-release"
9072		if test "$doWince" != "no" ; then
9073		    LDFLAGS_CONSOLE="-link ${lflags}"
9074		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
9075		else
9076		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
9077		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
9078		fi
9079	    fi
9080
9081	    SHLIB_SUFFIX=".dll"
9082	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
9083
9084	    TCL_LIB_VERSIONS_OK=nodots
9085    	    ;;
9086	AIX-*)
9087	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
9088
9089		# AIX requires the _r compiler when gcc isn't being used
9090		case "${CC}" in
9091		    *_r|*_r\ *)
9092			# ok ...
9093			;;
9094		    *)
9095			# Make sure only first arg gets _r
9096		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
9097			;;
9098		esac
9099		{ echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
9100echo "${ECHO_T}Using $CC for compiling with threads" >&6; }
9101
9102fi
9103
9104	    LIBS="$LIBS -lc"
9105	    SHLIB_CFLAGS=""
9106	    SHLIB_SUFFIX=".so"
9107
9108	    LD_LIBRARY_PATH_VAR="LIBPATH"
9109
9110	    # Check to enable 64-bit flags for compiler/linker
9111	    if test "$do64bit" = yes; then
9112
9113		if test "$GCC" = yes; then
9114
9115		    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
9116echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
9117
9118else
9119
9120		    do64bit_ok=yes
9121		    CFLAGS="$CFLAGS -q64"
9122		    LDFLAGS_ARCH="-q64"
9123		    RANLIB="${RANLIB} -X64"
9124		    AR="${AR} -X64"
9125		    SHLIB_LD_FLAGS="-b64"
9126
9127fi
9128
9129
9130fi
9131
9132
9133	    if test "`uname -m`" = ia64; then
9134
9135		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
9136		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
9137		if test "$GCC" = yes; then
9138
9139		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9140
9141else
9142
9143		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
9144
9145fi
9146
9147		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9148
9149else
9150
9151		if test "$GCC" = yes; then
9152
9153		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
9154
9155else
9156
9157		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
9158		    LDFLAGS="$LDFLAGS -brtl"
9159
9160fi
9161
9162		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
9163		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
9164		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9165
9166fi
9167
9168	    ;;
9169	BeOS*)
9170	    SHLIB_CFLAGS="-fPIC"
9171	    SHLIB_LD='${CC} -nostart'
9172	    SHLIB_SUFFIX=".so"
9173
9174	    #-----------------------------------------------------------
9175	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
9176	    # -lsocket, even if the network functions are in -lnet which
9177	    # is always linked to, for compatibility.
9178	    #-----------------------------------------------------------
9179	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
9180echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; }
9181if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
9182  echo $ECHO_N "(cached) $ECHO_C" >&6
9183else
9184  ac_check_lib_save_LIBS=$LIBS
9185LIBS="-lbind  $LIBS"
9186cat >conftest.$ac_ext <<_ACEOF
9187/* confdefs.h.  */
9188_ACEOF
9189cat confdefs.h >>conftest.$ac_ext
9190cat >>conftest.$ac_ext <<_ACEOF
9191/* end confdefs.h.  */
9192
9193/* Override any GCC internal prototype to avoid an error.
9194   Use char because int might match the return type of a GCC
9195   builtin and then its argument prototype would still apply.  */
9196#ifdef __cplusplus
9197extern "C"
9198#endif
9199char inet_ntoa ();
9200int
9201main ()
9202{
9203return inet_ntoa ();
9204  ;
9205  return 0;
9206}
9207_ACEOF
9208rm -f conftest.$ac_objext conftest$ac_exeext
9209if { (ac_try="$ac_link"
9210case "(($ac_try" in
9211  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9212  *) ac_try_echo=$ac_try;;
9213esac
9214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9215  (eval "$ac_link") 2>conftest.er1
9216  ac_status=$?
9217  grep -v '^ *+' conftest.er1 >conftest.err
9218  rm -f conftest.er1
9219  cat conftest.err >&5
9220  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9221  (exit $ac_status); } && {
9222	 test -z "$ac_c_werror_flag" ||
9223	 test ! -s conftest.err
9224       } && test -s conftest$ac_exeext &&
9225       $as_test_x conftest$ac_exeext; then
9226  ac_cv_lib_bind_inet_ntoa=yes
9227else
9228  echo "$as_me: failed program was:" >&5
9229sed 's/^/| /' conftest.$ac_ext >&5
9230
9231	ac_cv_lib_bind_inet_ntoa=no
9232fi
9233
9234rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9235      conftest$ac_exeext conftest.$ac_ext
9236LIBS=$ac_check_lib_save_LIBS
9237fi
9238{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
9239echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; }
9240if test $ac_cv_lib_bind_inet_ntoa = yes; then
9241  LIBS="$LIBS -lbind -lsocket"
9242fi
9243
9244	    ;;
9245	BSD/OS-4.*)
9246	    SHLIB_CFLAGS="-export-dynamic -fPIC"
9247	    SHLIB_LD='${CC} -shared'
9248	    SHLIB_SUFFIX=".so"
9249	    LDFLAGS="$LDFLAGS -export-dynamic"
9250	    CC_SEARCH_FLAGS=""
9251	    LD_SEARCH_FLAGS=""
9252	    ;;
9253	CYGWIN_*)
9254	    SHLIB_CFLAGS=""
9255	    SHLIB_LD='${CC} -shared'
9256	    SHLIB_SUFFIX=".dll"
9257	    EXE_SUFFIX=".exe"
9258	    CC_SEARCH_FLAGS=""
9259	    LD_SEARCH_FLAGS=""
9260	    ;;
9261	Haiku*)
9262	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
9263	    SHLIB_CFLAGS="-fPIC"
9264	    SHLIB_SUFFIX=".so"
9265	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
9266	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
9267echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6; }
9268if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
9269  echo $ECHO_N "(cached) $ECHO_C" >&6
9270else
9271  ac_check_lib_save_LIBS=$LIBS
9272LIBS="-lnetwork  $LIBS"
9273cat >conftest.$ac_ext <<_ACEOF
9274/* confdefs.h.  */
9275_ACEOF
9276cat confdefs.h >>conftest.$ac_ext
9277cat >>conftest.$ac_ext <<_ACEOF
9278/* end confdefs.h.  */
9279
9280/* Override any GCC internal prototype to avoid an error.
9281   Use char because int might match the return type of a GCC
9282   builtin and then its argument prototype would still apply.  */
9283#ifdef __cplusplus
9284extern "C"
9285#endif
9286char inet_ntoa ();
9287int
9288main ()
9289{
9290return inet_ntoa ();
9291  ;
9292  return 0;
9293}
9294_ACEOF
9295rm -f conftest.$ac_objext conftest$ac_exeext
9296if { (ac_try="$ac_link"
9297case "(($ac_try" in
9298  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9299  *) ac_try_echo=$ac_try;;
9300esac
9301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9302  (eval "$ac_link") 2>conftest.er1
9303  ac_status=$?
9304  grep -v '^ *+' conftest.er1 >conftest.err
9305  rm -f conftest.er1
9306  cat conftest.err >&5
9307  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9308  (exit $ac_status); } && {
9309	 test -z "$ac_c_werror_flag" ||
9310	 test ! -s conftest.err
9311       } && test -s conftest$ac_exeext &&
9312       $as_test_x conftest$ac_exeext; then
9313  ac_cv_lib_network_inet_ntoa=yes
9314else
9315  echo "$as_me: failed program was:" >&5
9316sed 's/^/| /' conftest.$ac_ext >&5
9317
9318	ac_cv_lib_network_inet_ntoa=no
9319fi
9320
9321rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9322      conftest$ac_exeext conftest.$ac_ext
9323LIBS=$ac_check_lib_save_LIBS
9324fi
9325{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5
9326echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6; }
9327if test $ac_cv_lib_network_inet_ntoa = yes; then
9328  LIBS="$LIBS -lnetwork"
9329fi
9330
9331	    ;;
9332	HP-UX-*.11.*)
9333	    # Use updated header definitions where possible
9334
9335cat >>confdefs.h <<\_ACEOF
9336#define _XOPEN_SOURCE_EXTENDED 1
9337_ACEOF
9338
9339	    # TEA specific: Needed by Tcl, but not most extensions
9340	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
9341	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
9342
9343	    if test "`uname -m`" = ia64; then
9344
9345		SHLIB_SUFFIX=".so"
9346		# Use newer C++ library for C++ extensions
9347		#if test "$GCC" != "yes" ; then
9348		#   CPPFLAGS="-AA"
9349		#fi
9350
9351else
9352
9353		SHLIB_SUFFIX=".sl"
9354
9355fi
9356
9357	    { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9358echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
9359if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9360  echo $ECHO_N "(cached) $ECHO_C" >&6
9361else
9362  ac_check_lib_save_LIBS=$LIBS
9363LIBS="-ldld  $LIBS"
9364cat >conftest.$ac_ext <<_ACEOF
9365/* confdefs.h.  */
9366_ACEOF
9367cat confdefs.h >>conftest.$ac_ext
9368cat >>conftest.$ac_ext <<_ACEOF
9369/* end confdefs.h.  */
9370
9371/* Override any GCC internal prototype to avoid an error.
9372   Use char because int might match the return type of a GCC
9373   builtin and then its argument prototype would still apply.  */
9374#ifdef __cplusplus
9375extern "C"
9376#endif
9377char shl_load ();
9378int
9379main ()
9380{
9381return shl_load ();
9382  ;
9383  return 0;
9384}
9385_ACEOF
9386rm -f conftest.$ac_objext conftest$ac_exeext
9387if { (ac_try="$ac_link"
9388case "(($ac_try" in
9389  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9390  *) ac_try_echo=$ac_try;;
9391esac
9392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9393  (eval "$ac_link") 2>conftest.er1
9394  ac_status=$?
9395  grep -v '^ *+' conftest.er1 >conftest.err
9396  rm -f conftest.er1
9397  cat conftest.err >&5
9398  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9399  (exit $ac_status); } && {
9400	 test -z "$ac_c_werror_flag" ||
9401	 test ! -s conftest.err
9402       } && test -s conftest$ac_exeext &&
9403       $as_test_x conftest$ac_exeext; then
9404  ac_cv_lib_dld_shl_load=yes
9405else
9406  echo "$as_me: failed program was:" >&5
9407sed 's/^/| /' conftest.$ac_ext >&5
9408
9409	ac_cv_lib_dld_shl_load=no
9410fi
9411
9412rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9413      conftest$ac_exeext conftest.$ac_ext
9414LIBS=$ac_check_lib_save_LIBS
9415fi
9416{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9417echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
9418if test $ac_cv_lib_dld_shl_load = yes; then
9419  tcl_ok=yes
9420else
9421  tcl_ok=no
9422fi
9423
9424	    if test "$tcl_ok" = yes; then
9425
9426		LDFLAGS="$LDFLAGS -E"
9427		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
9428		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
9429		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
9430
9431fi
9432
9433	    if test "$GCC" = yes; then
9434
9435		SHLIB_LD='${CC} -shared'
9436		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9437
9438else
9439
9440		CFLAGS="$CFLAGS -z"
9441		# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
9442		#CFLAGS="$CFLAGS +DAportable"
9443		SHLIB_CFLAGS="+z"
9444		SHLIB_LD="ld -b"
9445
9446fi
9447
9448
9449	    # Check to enable 64-bit flags for compiler/linker
9450	    if test "$do64bit" = "yes"; then
9451
9452		if test "$GCC" = yes; then
9453
9454		    case `${CC} -dumpmachine` in
9455			hppa64*)
9456			    # 64-bit gcc in use.  Fix flags for GNU ld.
9457			    do64bit_ok=yes
9458			    SHLIB_LD='${CC} -shared'
9459			    if test $doRpath = yes; then
9460
9461				CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9462fi
9463
9464			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9465			    ;;
9466			*)
9467			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
9468echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
9469			    ;;
9470		    esac
9471
9472else
9473
9474		    do64bit_ok=yes
9475		    CFLAGS="$CFLAGS +DD64"
9476		    LDFLAGS_ARCH="+DD64"
9477
9478fi
9479
9480
9481fi
9482 ;;
9483	IRIX-6.*)
9484	    SHLIB_CFLAGS=""
9485	    SHLIB_LD="ld -n32 -shared -rdata_shared"
9486	    SHLIB_SUFFIX=".so"
9487	    if test $doRpath = yes; then
9488
9489		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9490		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9491fi
9492
9493	    if test "$GCC" = yes; then
9494
9495		CFLAGS="$CFLAGS -mabi=n32"
9496		LDFLAGS="$LDFLAGS -mabi=n32"
9497
9498else
9499
9500		case $system in
9501		    IRIX-6.3)
9502			# Use to build 6.2 compatible binaries on 6.3.
9503			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
9504			;;
9505		    *)
9506			CFLAGS="$CFLAGS -n32"
9507			;;
9508		esac
9509		LDFLAGS="$LDFLAGS -n32"
9510
9511fi
9512
9513	    ;;
9514	IRIX64-6.*)
9515	    SHLIB_CFLAGS=""
9516	    SHLIB_LD="ld -n32 -shared -rdata_shared"
9517	    SHLIB_SUFFIX=".so"
9518	    if test $doRpath = yes; then
9519
9520		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9521		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9522fi
9523
9524
9525	    # Check to enable 64-bit flags for compiler/linker
9526
9527	    if test "$do64bit" = yes; then
9528
9529	        if test "$GCC" = yes; then
9530
9531	            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
9532echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
9533
9534else
9535
9536	            do64bit_ok=yes
9537	            SHLIB_LD="ld -64 -shared -rdata_shared"
9538	            CFLAGS="$CFLAGS -64"
9539	            LDFLAGS_ARCH="-64"
9540
9541fi
9542
9543
9544fi
9545
9546	    ;;
9547	Linux*)
9548	    SHLIB_CFLAGS="-fPIC"
9549	    SHLIB_SUFFIX=".so"
9550
9551	    # TEA specific:
9552	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
9553
9554	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9555	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
9556	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
9557	    if test $doRpath = yes; then
9558
9559		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9560fi
9561
9562	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9563	    if test "`uname -m`" = "alpha"; then
9564  CFLAGS="$CFLAGS -mieee"
9565fi
9566
9567	    if test $do64bit = yes; then
9568
9569		{ echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
9570echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; }
9571if test "${tcl_cv_cc_m64+set}" = set; then
9572  echo $ECHO_N "(cached) $ECHO_C" >&6
9573else
9574
9575		    hold_cflags=$CFLAGS
9576		    CFLAGS="$CFLAGS -m64"
9577		    cat >conftest.$ac_ext <<_ACEOF
9578/* confdefs.h.  */
9579_ACEOF
9580cat confdefs.h >>conftest.$ac_ext
9581cat >>conftest.$ac_ext <<_ACEOF
9582/* end confdefs.h.  */
9583
9584int
9585main ()
9586{
9587
9588  ;
9589  return 0;
9590}
9591_ACEOF
9592rm -f conftest.$ac_objext conftest$ac_exeext
9593if { (ac_try="$ac_link"
9594case "(($ac_try" in
9595  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9596  *) ac_try_echo=$ac_try;;
9597esac
9598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9599  (eval "$ac_link") 2>conftest.er1
9600  ac_status=$?
9601  grep -v '^ *+' conftest.er1 >conftest.err
9602  rm -f conftest.er1
9603  cat conftest.err >&5
9604  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9605  (exit $ac_status); } && {
9606	 test -z "$ac_c_werror_flag" ||
9607	 test ! -s conftest.err
9608       } && test -s conftest$ac_exeext &&
9609       $as_test_x conftest$ac_exeext; then
9610  tcl_cv_cc_m64=yes
9611else
9612  echo "$as_me: failed program was:" >&5
9613sed 's/^/| /' conftest.$ac_ext >&5
9614
9615	tcl_cv_cc_m64=no
9616fi
9617
9618rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9619      conftest$ac_exeext conftest.$ac_ext
9620		    CFLAGS=$hold_cflags
9621fi
9622{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
9623echo "${ECHO_T}$tcl_cv_cc_m64" >&6; }
9624		if test $tcl_cv_cc_m64 = yes; then
9625
9626		    CFLAGS="$CFLAGS -m64"
9627		    do64bit_ok=yes
9628
9629fi
9630
9631
9632fi
9633
9634
9635	    # The combo of gcc + glibc has a bug related to inlining of
9636	    # functions like strtod(). The -fno-builtin flag should address
9637	    # this problem but it does not work. The -fno-inline flag is kind
9638	    # of overkill but it works. Disable inlining only when one of the
9639	    # files in compat/*.c is being linked in.
9640
9641	    if test x"${USE_COMPAT}" != x; then
9642  CFLAGS="$CFLAGS -fno-inline"
9643fi
9644
9645
9646	    ;;
9647	GNU*)
9648	    SHLIB_CFLAGS="-fPIC"
9649	    SHLIB_SUFFIX=".so"
9650
9651	    SHLIB_LD='${CC} -shared'
9652	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
9653	    CC_SEARCH_FLAGS=""
9654	    LD_SEARCH_FLAGS=""
9655	    if test "`uname -m`" = "alpha"; then
9656  CFLAGS="$CFLAGS -mieee"
9657fi
9658
9659	    ;;
9660	Lynx*)
9661	    SHLIB_CFLAGS="-fPIC"
9662	    SHLIB_SUFFIX=".so"
9663	    CFLAGS_OPTIMIZE=-02
9664	    SHLIB_LD='${CC} -shared'
9665	    LD_FLAGS="-Wl,--export-dynamic"
9666	    if test $doRpath = yes; then
9667
9668		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9669		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9670fi
9671
9672	    ;;
9673	OpenBSD-*)
9674	    SHLIB_CFLAGS="-fPIC"
9675	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
9676	    SHLIB_SUFFIX=".so"
9677	    if test $doRpath = yes; then
9678
9679		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9680fi
9681
9682	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9683	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
9684	    { echo "$as_me:$LINENO: checking for ELF" >&5
9685echo $ECHO_N "checking for ELF... $ECHO_C" >&6; }
9686if test "${tcl_cv_ld_elf+set}" = set; then
9687  echo $ECHO_N "(cached) $ECHO_C" >&6
9688else
9689
9690		cat >conftest.$ac_ext <<_ACEOF
9691/* confdefs.h.  */
9692_ACEOF
9693cat confdefs.h >>conftest.$ac_ext
9694cat >>conftest.$ac_ext <<_ACEOF
9695/* end confdefs.h.  */
9696
9697#ifdef __ELF__
9698	yes
9699#endif
9700
9701_ACEOF
9702if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9703  $EGREP "yes" >/dev/null 2>&1; then
9704  tcl_cv_ld_elf=yes
9705else
9706  tcl_cv_ld_elf=no
9707fi
9708rm -f -r conftest*
9709
9710fi
9711{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
9712echo "${ECHO_T}$tcl_cv_ld_elf" >&6; }
9713	    if test $tcl_cv_ld_elf = yes; then
9714
9715		LDFLAGS=-Wl,-export-dynamic
9716
9717else
9718  LDFLAGS=""
9719fi
9720
9721	    if test "${TCL_THREADS}" = "1"; then
9722
9723		# OpenBSD builds and links with -pthread, never -lpthread.
9724		LIBS=`echo $LIBS | sed s/-lpthread//`
9725		CFLAGS="$CFLAGS -pthread"
9726		SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread"
9727
9728fi
9729
9730	    # OpenBSD doesn't do version numbers with dots.
9731	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9732	    TCL_LIB_VERSIONS_OK=nodots
9733	    ;;
9734	NetBSD-*|FreeBSD-[3-4].*)
9735	    # FreeBSD 3.* and greater have ELF.
9736	    # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
9737	    SHLIB_CFLAGS="-fPIC"
9738	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
9739	    SHLIB_SUFFIX=".so"
9740	    LDFLAGS="$LDFLAGS -export-dynamic"
9741	    if test $doRpath = yes; then
9742
9743		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9744fi
9745
9746	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9747	    if test "${TCL_THREADS}" = "1"; then
9748
9749		# The -pthread needs to go in the CFLAGS, not LIBS
9750		LIBS=`echo $LIBS | sed s/-pthread//`
9751		CFLAGS="$CFLAGS -pthread"
9752	    	LDFLAGS="$LDFLAGS -pthread"
9753
9754fi
9755
9756	    case $system in
9757	    FreeBSD-3.*)
9758	    	# FreeBSD-3 doesn't handle version numbers with dots.
9759	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9760	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
9761	    	TCL_LIB_VERSIONS_OK=nodots
9762		;;
9763	    esac
9764	    ;;
9765	FreeBSD-*)
9766	    # This configuration from FreeBSD Ports.
9767	    SHLIB_CFLAGS="-fPIC"
9768	    SHLIB_LD="${CC} -shared"
9769	    TCL_SHLIB_LD_EXTRAS="-soname \$@"
9770	    SHLIB_SUFFIX=".so"
9771	    LDFLAGS=""
9772	    if test $doRpath = yes; then
9773
9774		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9775		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9776fi
9777
9778	    if test "${TCL_THREADS}" = "1"; then
9779
9780		# The -pthread needs to go in the LDFLAGS, not LIBS
9781		LIBS=`echo $LIBS | sed s/-pthread//`
9782		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
9783		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
9784fi
9785
9786	    # Version numbers are dot-stripped by system policy.
9787	    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
9788	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9789	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
9790	    TCL_LIB_VERSIONS_OK=nodots
9791	    ;;
9792	Darwin-*)
9793	    CFLAGS_OPTIMIZE="-Os"
9794	    SHLIB_CFLAGS="-fno-common"
9795	    # To avoid discrepancies between what headers configure sees during
9796	    # preprocessing tests and compiling tests, move any -isysroot and
9797	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
9798	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
9799		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
9800		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
9801	    CFLAGS="`echo " ${CFLAGS}" | \
9802		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
9803		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
9804	    if test $do64bit = yes; then
9805
9806		case `arch` in
9807		    ppc)
9808			{ echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
9809echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; }
9810if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
9811  echo $ECHO_N "(cached) $ECHO_C" >&6
9812else
9813
9814			    hold_cflags=$CFLAGS
9815			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
9816			    cat >conftest.$ac_ext <<_ACEOF
9817/* confdefs.h.  */
9818_ACEOF
9819cat confdefs.h >>conftest.$ac_ext
9820cat >>conftest.$ac_ext <<_ACEOF
9821/* end confdefs.h.  */
9822
9823int
9824main ()
9825{
9826
9827  ;
9828  return 0;
9829}
9830_ACEOF
9831rm -f conftest.$ac_objext conftest$ac_exeext
9832if { (ac_try="$ac_link"
9833case "(($ac_try" in
9834  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9835  *) ac_try_echo=$ac_try;;
9836esac
9837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9838  (eval "$ac_link") 2>conftest.er1
9839  ac_status=$?
9840  grep -v '^ *+' conftest.er1 >conftest.err
9841  rm -f conftest.er1
9842  cat conftest.err >&5
9843  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9844  (exit $ac_status); } && {
9845	 test -z "$ac_c_werror_flag" ||
9846	 test ! -s conftest.err
9847       } && test -s conftest$ac_exeext &&
9848       $as_test_x conftest$ac_exeext; then
9849  tcl_cv_cc_arch_ppc64=yes
9850else
9851  echo "$as_me: failed program was:" >&5
9852sed 's/^/| /' conftest.$ac_ext >&5
9853
9854	tcl_cv_cc_arch_ppc64=no
9855fi
9856
9857rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9858      conftest$ac_exeext conftest.$ac_ext
9859			    CFLAGS=$hold_cflags
9860fi
9861{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
9862echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; }
9863			if test $tcl_cv_cc_arch_ppc64 = yes; then
9864
9865			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
9866			    do64bit_ok=yes
9867
9868fi
9869;;
9870		    i386)
9871			{ echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
9872echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; }
9873if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
9874  echo $ECHO_N "(cached) $ECHO_C" >&6
9875else
9876
9877			    hold_cflags=$CFLAGS
9878			    CFLAGS="$CFLAGS -arch x86_64"
9879			    cat >conftest.$ac_ext <<_ACEOF
9880/* confdefs.h.  */
9881_ACEOF
9882cat confdefs.h >>conftest.$ac_ext
9883cat >>conftest.$ac_ext <<_ACEOF
9884/* end confdefs.h.  */
9885
9886int
9887main ()
9888{
9889
9890  ;
9891  return 0;
9892}
9893_ACEOF
9894rm -f conftest.$ac_objext conftest$ac_exeext
9895if { (ac_try="$ac_link"
9896case "(($ac_try" in
9897  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9898  *) ac_try_echo=$ac_try;;
9899esac
9900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9901  (eval "$ac_link") 2>conftest.er1
9902  ac_status=$?
9903  grep -v '^ *+' conftest.er1 >conftest.err
9904  rm -f conftest.er1
9905  cat conftest.err >&5
9906  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9907  (exit $ac_status); } && {
9908	 test -z "$ac_c_werror_flag" ||
9909	 test ! -s conftest.err
9910       } && test -s conftest$ac_exeext &&
9911       $as_test_x conftest$ac_exeext; then
9912  tcl_cv_cc_arch_x86_64=yes
9913else
9914  echo "$as_me: failed program was:" >&5
9915sed 's/^/| /' conftest.$ac_ext >&5
9916
9917	tcl_cv_cc_arch_x86_64=no
9918fi
9919
9920rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9921      conftest$ac_exeext conftest.$ac_ext
9922			    CFLAGS=$hold_cflags
9923fi
9924{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
9925echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; }
9926			if test $tcl_cv_cc_arch_x86_64 = yes; then
9927
9928			    CFLAGS="$CFLAGS -arch x86_64"
9929			    do64bit_ok=yes
9930
9931fi
9932;;
9933		    *)
9934			{ echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
9935echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
9936		esac
9937
9938else
9939
9940		# Check for combined 32-bit and 64-bit fat build
9941		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
9942		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
9943
9944		    fat_32_64=yes
9945fi
9946
9947
9948fi
9949
9950	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9951	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
9952	    { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
9953echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; }
9954if test "${tcl_cv_ld_single_module+set}" = set; then
9955  echo $ECHO_N "(cached) $ECHO_C" >&6
9956else
9957
9958		hold_ldflags=$LDFLAGS
9959		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
9960		cat >conftest.$ac_ext <<_ACEOF
9961/* confdefs.h.  */
9962_ACEOF
9963cat confdefs.h >>conftest.$ac_ext
9964cat >>conftest.$ac_ext <<_ACEOF
9965/* end confdefs.h.  */
9966
9967int
9968main ()
9969{
9970int i;
9971  ;
9972  return 0;
9973}
9974_ACEOF
9975rm -f conftest.$ac_objext conftest$ac_exeext
9976if { (ac_try="$ac_link"
9977case "(($ac_try" in
9978  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9979  *) ac_try_echo=$ac_try;;
9980esac
9981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9982  (eval "$ac_link") 2>conftest.er1
9983  ac_status=$?
9984  grep -v '^ *+' conftest.er1 >conftest.err
9985  rm -f conftest.er1
9986  cat conftest.err >&5
9987  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9988  (exit $ac_status); } && {
9989	 test -z "$ac_c_werror_flag" ||
9990	 test ! -s conftest.err
9991       } && test -s conftest$ac_exeext &&
9992       $as_test_x conftest$ac_exeext; then
9993  tcl_cv_ld_single_module=yes
9994else
9995  echo "$as_me: failed program was:" >&5
9996sed 's/^/| /' conftest.$ac_ext >&5
9997
9998	tcl_cv_ld_single_module=no
9999fi
10000
10001rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10002      conftest$ac_exeext conftest.$ac_ext
10003		LDFLAGS=$hold_ldflags
10004fi
10005{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
10006echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; }
10007	    if test $tcl_cv_ld_single_module = yes; then
10008
10009		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
10010
10011fi
10012
10013	    # TEA specific: link shlib with current and compatiblity version flags
10014	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
10015	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
10016	    SHLIB_SUFFIX=".dylib"
10017	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
10018	    if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
10019		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
10020
10021		LDFLAGS="$LDFLAGS -prebind"
10022fi
10023
10024	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
10025	    { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
10026echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; }
10027if test "${tcl_cv_ld_search_paths_first+set}" = set; then
10028  echo $ECHO_N "(cached) $ECHO_C" >&6
10029else
10030
10031		hold_ldflags=$LDFLAGS
10032		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
10033		cat >conftest.$ac_ext <<_ACEOF
10034/* confdefs.h.  */
10035_ACEOF
10036cat confdefs.h >>conftest.$ac_ext
10037cat >>conftest.$ac_ext <<_ACEOF
10038/* end confdefs.h.  */
10039
10040int
10041main ()
10042{
10043int i;
10044  ;
10045  return 0;
10046}
10047_ACEOF
10048rm -f conftest.$ac_objext conftest$ac_exeext
10049if { (ac_try="$ac_link"
10050case "(($ac_try" in
10051  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10052  *) ac_try_echo=$ac_try;;
10053esac
10054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10055  (eval "$ac_link") 2>conftest.er1
10056  ac_status=$?
10057  grep -v '^ *+' conftest.er1 >conftest.err
10058  rm -f conftest.er1
10059  cat conftest.err >&5
10060  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10061  (exit $ac_status); } && {
10062	 test -z "$ac_c_werror_flag" ||
10063	 test ! -s conftest.err
10064       } && test -s conftest$ac_exeext &&
10065       $as_test_x conftest$ac_exeext; then
10066  tcl_cv_ld_search_paths_first=yes
10067else
10068  echo "$as_me: failed program was:" >&5
10069sed 's/^/| /' conftest.$ac_ext >&5
10070
10071	tcl_cv_ld_search_paths_first=no
10072fi
10073
10074rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10075      conftest$ac_exeext conftest.$ac_ext
10076		LDFLAGS=$hold_ldflags
10077fi
10078{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
10079echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; }
10080	    if test $tcl_cv_ld_search_paths_first = yes; then
10081
10082		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
10083
10084fi
10085
10086	    if test "$tcl_cv_cc_visibility_hidden" != yes; then
10087
10088
10089cat >>confdefs.h <<\_ACEOF
10090#define MODULE_SCOPE __private_extern__
10091_ACEOF
10092
10093		tcl_cv_cc_visibility_hidden=yes
10094
10095fi
10096
10097	    CC_SEARCH_FLAGS=""
10098	    LD_SEARCH_FLAGS=""
10099	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
10100	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
10101	    # extensions, verify that 64-bit build is possible.
10102	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then
10103
10104		if test "${TEA_WINDOWINGSYSTEM}" = x11; then
10105
10106		    { echo "$as_me:$LINENO: checking for 64-bit X11" >&5
10107echo $ECHO_N "checking for 64-bit X11... $ECHO_C" >&6; }
10108if test "${tcl_cv_lib_x11_64+set}" = set; then
10109  echo $ECHO_N "(cached) $ECHO_C" >&6
10110else
10111
10112			for v in CFLAGS CPPFLAGS LDFLAGS; do
10113			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
10114			done
10115			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
10116			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
10117			cat >conftest.$ac_ext <<_ACEOF
10118/* confdefs.h.  */
10119_ACEOF
10120cat confdefs.h >>conftest.$ac_ext
10121cat >>conftest.$ac_ext <<_ACEOF
10122/* end confdefs.h.  */
10123#include <X11/Xlib.h>
10124int
10125main ()
10126{
10127XrmInitialize();
10128  ;
10129  return 0;
10130}
10131_ACEOF
10132rm -f conftest.$ac_objext conftest$ac_exeext
10133if { (ac_try="$ac_link"
10134case "(($ac_try" in
10135  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10136  *) ac_try_echo=$ac_try;;
10137esac
10138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10139  (eval "$ac_link") 2>conftest.er1
10140  ac_status=$?
10141  grep -v '^ *+' conftest.er1 >conftest.err
10142  rm -f conftest.er1
10143  cat conftest.err >&5
10144  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10145  (exit $ac_status); } && {
10146	 test -z "$ac_c_werror_flag" ||
10147	 test ! -s conftest.err
10148       } && test -s conftest$ac_exeext &&
10149       $as_test_x conftest$ac_exeext; then
10150  tcl_cv_lib_x11_64=yes
10151else
10152  echo "$as_me: failed program was:" >&5
10153sed 's/^/| /' conftest.$ac_ext >&5
10154
10155	tcl_cv_lib_x11_64=no
10156fi
10157
10158rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10159      conftest$ac_exeext conftest.$ac_ext
10160			for v in CFLAGS CPPFLAGS LDFLAGS; do
10161			    eval $v'="$hold_'$v'"'
10162			done
10163fi
10164{ echo "$as_me:$LINENO: result: $tcl_cv_lib_x11_64" >&5
10165echo "${ECHO_T}$tcl_cv_lib_x11_64" >&6; }
10166
10167fi
10168
10169		if test "${TEA_WINDOWINGSYSTEM}" = aqua; then
10170
10171		    { echo "$as_me:$LINENO: checking for 64-bit Tk" >&5
10172echo $ECHO_N "checking for 64-bit Tk... $ECHO_C" >&6; }
10173if test "${tcl_cv_lib_tk_64+set}" = set; then
10174  echo $ECHO_N "(cached) $ECHO_C" >&6
10175else
10176
10177			for v in CFLAGS CPPFLAGS LDFLAGS; do
10178			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
10179			done
10180			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 `eval "echo ${TCL_INCLUDES} ${TK_INCLUDES}"`"
10181			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
10182			cat >conftest.$ac_ext <<_ACEOF
10183/* confdefs.h.  */
10184_ACEOF
10185cat confdefs.h >>conftest.$ac_ext
10186cat >>conftest.$ac_ext <<_ACEOF
10187/* end confdefs.h.  */
10188#include <tk.h>
10189int
10190main ()
10191{
10192Tk_InitStubs(NULL, "", 0);
10193  ;
10194  return 0;
10195}
10196_ACEOF
10197rm -f conftest.$ac_objext conftest$ac_exeext
10198if { (ac_try="$ac_link"
10199case "(($ac_try" in
10200  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10201  *) ac_try_echo=$ac_try;;
10202esac
10203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10204  (eval "$ac_link") 2>conftest.er1
10205  ac_status=$?
10206  grep -v '^ *+' conftest.er1 >conftest.err
10207  rm -f conftest.er1
10208  cat conftest.err >&5
10209  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10210  (exit $ac_status); } && {
10211	 test -z "$ac_c_werror_flag" ||
10212	 test ! -s conftest.err
10213       } && test -s conftest$ac_exeext &&
10214       $as_test_x conftest$ac_exeext; then
10215  tcl_cv_lib_tk_64=yes
10216else
10217  echo "$as_me: failed program was:" >&5
10218sed 's/^/| /' conftest.$ac_ext >&5
10219
10220	tcl_cv_lib_tk_64=no
10221fi
10222
10223rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10224      conftest$ac_exeext conftest.$ac_ext
10225			for v in CFLAGS CPPFLAGS LDFLAGS; do
10226			    eval $v'="$hold_'$v'"'
10227			done
10228fi
10229{ echo "$as_me:$LINENO: result: $tcl_cv_lib_tk_64" >&5
10230echo "${ECHO_T}$tcl_cv_lib_tk_64" >&6; }
10231
10232fi
10233
10234		# remove 64-bit arch flags from CFLAGS et al. if configuration
10235		# does not support 64-bit.
10236		if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then
10237
10238		    { echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
10239echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
10240		    for v in CFLAGS CPPFLAGS LDFLAGS; do
10241			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
10242		    done
10243fi
10244
10245
10246fi
10247
10248	    ;;
10249	OS/390-*)
10250	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
10251
10252cat >>confdefs.h <<\_ACEOF
10253#define _OE_SOCKETS 1
10254_ACEOF
10255
10256	    ;;
10257	OSF1-V*)
10258	    # Digital OSF/1
10259	    SHLIB_CFLAGS=""
10260	    if test "$SHARED_BUILD" = 1; then
10261
10262	        SHLIB_LD='ld -shared -expect_unresolved "*"'
10263
10264else
10265
10266	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
10267
10268fi
10269
10270	    SHLIB_SUFFIX=".so"
10271	    if test $doRpath = yes; then
10272
10273		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
10274		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
10275fi
10276
10277	    if test "$GCC" = yes; then
10278  CFLAGS="$CFLAGS -mieee"
10279else
10280
10281		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
10282fi
10283
10284	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
10285	    if test "${TCL_THREADS}" = 1; then
10286
10287		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
10288		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
10289		LIBS=`echo $LIBS | sed s/-lpthreads//`
10290		if test "$GCC" = yes; then
10291
10292		    LIBS="$LIBS -lpthread -lmach -lexc"
10293
10294else
10295
10296		    CFLAGS="$CFLAGS -pthread"
10297		    LDFLAGS="$LDFLAGS -pthread"
10298
10299fi
10300
10301
10302fi
10303
10304	    ;;
10305	QNX-6*)
10306	    # QNX RTP
10307	    # This may work for all QNX, but it was only reported for v6.
10308	    SHLIB_CFLAGS="-fPIC"
10309	    SHLIB_LD="ld -Bshareable -x"
10310	    SHLIB_LD_LIBS=""
10311	    SHLIB_SUFFIX=".so"
10312	    CC_SEARCH_FLAGS=""
10313	    LD_SEARCH_FLAGS=""
10314	    ;;
10315	SCO_SV-3.2*)
10316	    if test "$GCC" = yes; then
10317
10318		SHLIB_CFLAGS="-fPIC -melf"
10319		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
10320
10321else
10322
10323	       SHLIB_CFLAGS="-Kpic -belf"
10324	       LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
10325
10326fi
10327
10328	    SHLIB_LD="ld -G"
10329	    SHLIB_LD_LIBS=""
10330	    SHLIB_SUFFIX=".so"
10331	    CC_SEARCH_FLAGS=""
10332	    LD_SEARCH_FLAGS=""
10333	    ;;
10334	SunOS-5.[0-6])
10335	    # Careful to not let 5.10+ fall into this case
10336
10337	    # Note: If _REENTRANT isn't defined, then Solaris
10338	    # won't define thread-safe library routines.
10339
10340
10341cat >>confdefs.h <<\_ACEOF
10342#define _REENTRANT 1
10343_ACEOF
10344
10345
10346cat >>confdefs.h <<\_ACEOF
10347#define _POSIX_PTHREAD_SEMANTICS 1
10348_ACEOF
10349
10350
10351	    SHLIB_CFLAGS="-KPIC"
10352	    SHLIB_SUFFIX=".so"
10353	    if test "$GCC" = yes; then
10354
10355		SHLIB_LD='${CC} -shared'
10356		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
10357		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
10358
10359else
10360
10361		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
10362		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
10363		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
10364
10365fi
10366
10367	    ;;
10368	SunOS-5*)
10369	    # Note: If _REENTRANT isn't defined, then Solaris
10370	    # won't define thread-safe library routines.
10371
10372
10373cat >>confdefs.h <<\_ACEOF
10374#define _REENTRANT 1
10375_ACEOF
10376
10377
10378cat >>confdefs.h <<\_ACEOF
10379#define _POSIX_PTHREAD_SEMANTICS 1
10380_ACEOF
10381
10382
10383	    SHLIB_CFLAGS="-KPIC"
10384
10385	    # Check to enable 64-bit flags for compiler/linker
10386	    if test "$do64bit" = yes; then
10387
10388		arch=`isainfo`
10389		if test "$arch" = "sparcv9 sparc"; then
10390
10391		    if test "$GCC" = yes; then
10392
10393			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
10394
10395			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
10396echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
10397
10398else
10399
10400			    do64bit_ok=yes
10401			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
10402			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
10403			    SHLIB_CFLAGS="-fPIC"
10404
10405fi
10406
10407
10408else
10409
10410			do64bit_ok=yes
10411			if test "$do64bitVIS" = yes; then
10412
10413			    CFLAGS="$CFLAGS -xarch=v9a"
10414			    LDFLAGS_ARCH="-xarch=v9a"
10415
10416else
10417
10418			    CFLAGS="$CFLAGS -xarch=v9"
10419			    LDFLAGS_ARCH="-xarch=v9"
10420
10421fi
10422
10423			# Solaris 64 uses this as well
10424			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
10425
10426fi
10427
10428
10429else
10430  if test "$arch" = "amd64 i386"; then
10431
10432		    if test "$GCC" = yes; then
10433
10434			case $system in
10435			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
10436				do64bit_ok=yes
10437				CFLAGS="$CFLAGS -m64"
10438				LDFLAGS="$LDFLAGS -m64";;
10439			    *)
10440				{ echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
10441echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
10442			esac
10443
10444else
10445
10446			do64bit_ok=yes
10447			case $system in
10448			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
10449				CFLAGS="$CFLAGS -m64"
10450				LDFLAGS="$LDFLAGS -m64";;
10451			    *)
10452				CFLAGS="$CFLAGS -xarch=amd64"
10453				LDFLAGS="$LDFLAGS -xarch=amd64";;
10454			esac
10455
10456fi
10457
10458
10459else
10460  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
10461echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
10462fi
10463
10464fi
10465
10466
10467fi
10468
10469
10470	    SHLIB_SUFFIX=".so"
10471	    if test "$GCC" = yes; then
10472
10473		SHLIB_LD='${CC} -shared'
10474		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
10475		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
10476		if test "$do64bit_ok" = yes; then
10477
10478		    if test "$arch" = "sparcv9 sparc"; then
10479
10480			# We need to specify -static-libgcc or we need to
10481			# add the path to the sparv9 libgcc.
10482			# JH: static-libgcc is necessary for core Tcl, but may
10483			# not be necessary for extensions.
10484			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
10485			# for finding sparcv9 libgcc, get the regular libgcc
10486			# path, remove so name and append 'sparcv9'
10487			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
10488			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
10489
10490else
10491  if test "$arch" = "amd64 i386"; then
10492
10493			# JH: static-libgcc is necessary for core Tcl, but may
10494			# not be necessary for extensions.
10495			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
10496
10497fi
10498
10499fi
10500
10501
10502fi
10503
10504
10505else
10506
10507		case $system in
10508		    SunOS-5.[1-9][0-9]*)
10509			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
10510			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
10511		    *)
10512			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
10513		esac
10514		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
10515		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
10516
10517fi
10518
10519	    ;;
10520    esac
10521
10522    if test "$do64bit" = yes -a "$do64bit_ok" = no; then
10523
10524	{ echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
10525echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
10526
10527fi
10528
10529
10530
10531
10532    # Add in the arch flags late to ensure it wasn't removed.
10533    # Not necessary in TEA, but this is aligned with core
10534    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
10535
10536    # If we're running gcc, then change the C flags for compiling shared
10537    # libraries to the right flags for gcc, instead of those for the
10538    # standard manufacturer compiler.
10539
10540    if test "$GCC" = yes; then
10541
10542	case $system in
10543	    AIX-*) ;;
10544	    BSD/OS*) ;;
10545	    CYGWIN_*) ;;
10546	    IRIX*) ;;
10547	    NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
10548	    Darwin-*) ;;
10549	    SCO_SV-3.2*) ;;
10550	    windows) ;;
10551	    *) SHLIB_CFLAGS="-fPIC" ;;
10552	esac
10553fi
10554
10555
10556    if test "$tcl_cv_cc_visibility_hidden" != yes; then
10557
10558
10559cat >>confdefs.h <<\_ACEOF
10560#define MODULE_SCOPE extern
10561_ACEOF
10562
10563
10564cat >>confdefs.h <<\_ACEOF
10565#define NO_VIZ
10566_ACEOF
10567
10568
10569fi
10570
10571
10572    if test "$SHARED_LIB_SUFFIX" = ""; then
10573
10574	# TEA specific: use PACKAGE_VERSION instead of VERSION
10575	SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
10576fi
10577
10578    if test "$UNSHARED_LIB_SUFFIX" = ""; then
10579
10580	# TEA specific: use PACKAGE_VERSION instead of VERSION
10581	UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
10582fi
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597    # These must be called after we do the basic CFLAGS checks and
10598    # verify any possible 64-bit or similar switches are necessary
10599
10600    { echo "$as_me:$LINENO: checking for required early compiler flags" >&5
10601echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; }
10602    tcl_flags=""
10603
10604    if test "${tcl_cv_flag__isoc99_source+set}" = set; then
10605  echo $ECHO_N "(cached) $ECHO_C" >&6
10606else
10607  cat >conftest.$ac_ext <<_ACEOF
10608/* confdefs.h.  */
10609_ACEOF
10610cat confdefs.h >>conftest.$ac_ext
10611cat >>conftest.$ac_ext <<_ACEOF
10612/* end confdefs.h.  */
10613#include <stdlib.h>
10614int
10615main ()
10616{
10617char *p = (char *)strtoll; char *q = (char *)strtoull;
10618  ;
10619  return 0;
10620}
10621_ACEOF
10622rm -f conftest.$ac_objext
10623if { (ac_try="$ac_compile"
10624case "(($ac_try" in
10625  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10626  *) ac_try_echo=$ac_try;;
10627esac
10628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10629  (eval "$ac_compile") 2>conftest.er1
10630  ac_status=$?
10631  grep -v '^ *+' conftest.er1 >conftest.err
10632  rm -f conftest.er1
10633  cat conftest.err >&5
10634  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10635  (exit $ac_status); } && {
10636	 test -z "$ac_c_werror_flag" ||
10637	 test ! -s conftest.err
10638       } && test -s conftest.$ac_objext; then
10639  tcl_cv_flag__isoc99_source=no
10640else
10641  echo "$as_me: failed program was:" >&5
10642sed 's/^/| /' conftest.$ac_ext >&5
10643
10644	cat >conftest.$ac_ext <<_ACEOF
10645/* confdefs.h.  */
10646_ACEOF
10647cat confdefs.h >>conftest.$ac_ext
10648cat >>conftest.$ac_ext <<_ACEOF
10649/* end confdefs.h.  */
10650#define _ISOC99_SOURCE 1
10651#include <stdlib.h>
10652int
10653main ()
10654{
10655char *p = (char *)strtoll; char *q = (char *)strtoull;
10656  ;
10657  return 0;
10658}
10659_ACEOF
10660rm -f conftest.$ac_objext
10661if { (ac_try="$ac_compile"
10662case "(($ac_try" in
10663  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10664  *) ac_try_echo=$ac_try;;
10665esac
10666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10667  (eval "$ac_compile") 2>conftest.er1
10668  ac_status=$?
10669  grep -v '^ *+' conftest.er1 >conftest.err
10670  rm -f conftest.er1
10671  cat conftest.err >&5
10672  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10673  (exit $ac_status); } && {
10674	 test -z "$ac_c_werror_flag" ||
10675	 test ! -s conftest.err
10676       } && test -s conftest.$ac_objext; then
10677  tcl_cv_flag__isoc99_source=yes
10678else
10679  echo "$as_me: failed program was:" >&5
10680sed 's/^/| /' conftest.$ac_ext >&5
10681
10682	tcl_cv_flag__isoc99_source=no
10683fi
10684
10685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10686fi
10687
10688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10689fi
10690
10691    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
10692
10693cat >>confdefs.h <<\_ACEOF
10694#define _ISOC99_SOURCE 1
10695_ACEOF
10696
10697	tcl_flags="$tcl_flags _ISOC99_SOURCE"
10698    fi
10699
10700
10701    if test "${tcl_cv_flag__largefile64_source+set}" = set; then
10702  echo $ECHO_N "(cached) $ECHO_C" >&6
10703else
10704  cat >conftest.$ac_ext <<_ACEOF
10705/* confdefs.h.  */
10706_ACEOF
10707cat confdefs.h >>conftest.$ac_ext
10708cat >>conftest.$ac_ext <<_ACEOF
10709/* end confdefs.h.  */
10710#include <sys/stat.h>
10711int
10712main ()
10713{
10714struct stat64 buf; int i = stat64("/", &buf);
10715  ;
10716  return 0;
10717}
10718_ACEOF
10719rm -f conftest.$ac_objext
10720if { (ac_try="$ac_compile"
10721case "(($ac_try" in
10722  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10723  *) ac_try_echo=$ac_try;;
10724esac
10725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10726  (eval "$ac_compile") 2>conftest.er1
10727  ac_status=$?
10728  grep -v '^ *+' conftest.er1 >conftest.err
10729  rm -f conftest.er1
10730  cat conftest.err >&5
10731  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10732  (exit $ac_status); } && {
10733	 test -z "$ac_c_werror_flag" ||
10734	 test ! -s conftest.err
10735       } && test -s conftest.$ac_objext; then
10736  tcl_cv_flag__largefile64_source=no
10737else
10738  echo "$as_me: failed program was:" >&5
10739sed 's/^/| /' conftest.$ac_ext >&5
10740
10741	cat >conftest.$ac_ext <<_ACEOF
10742/* confdefs.h.  */
10743_ACEOF
10744cat confdefs.h >>conftest.$ac_ext
10745cat >>conftest.$ac_ext <<_ACEOF
10746/* end confdefs.h.  */
10747#define _LARGEFILE64_SOURCE 1
10748#include <sys/stat.h>
10749int
10750main ()
10751{
10752struct stat64 buf; int i = stat64("/", &buf);
10753  ;
10754  return 0;
10755}
10756_ACEOF
10757rm -f conftest.$ac_objext
10758if { (ac_try="$ac_compile"
10759case "(($ac_try" in
10760  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10761  *) ac_try_echo=$ac_try;;
10762esac
10763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10764  (eval "$ac_compile") 2>conftest.er1
10765  ac_status=$?
10766  grep -v '^ *+' conftest.er1 >conftest.err
10767  rm -f conftest.er1
10768  cat conftest.err >&5
10769  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10770  (exit $ac_status); } && {
10771	 test -z "$ac_c_werror_flag" ||
10772	 test ! -s conftest.err
10773       } && test -s conftest.$ac_objext; then
10774  tcl_cv_flag__largefile64_source=yes
10775else
10776  echo "$as_me: failed program was:" >&5
10777sed 's/^/| /' conftest.$ac_ext >&5
10778
10779	tcl_cv_flag__largefile64_source=no
10780fi
10781
10782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10783fi
10784
10785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10786fi
10787
10788    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
10789
10790cat >>confdefs.h <<\_ACEOF
10791#define _LARGEFILE64_SOURCE 1
10792_ACEOF
10793
10794	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
10795    fi
10796
10797
10798    if test "${tcl_cv_flag__largefile_source64+set}" = set; then
10799  echo $ECHO_N "(cached) $ECHO_C" >&6
10800else
10801  cat >conftest.$ac_ext <<_ACEOF
10802/* confdefs.h.  */
10803_ACEOF
10804cat confdefs.h >>conftest.$ac_ext
10805cat >>conftest.$ac_ext <<_ACEOF
10806/* end confdefs.h.  */
10807#include <sys/stat.h>
10808int
10809main ()
10810{
10811char *p = (char *)open64;
10812  ;
10813  return 0;
10814}
10815_ACEOF
10816rm -f conftest.$ac_objext
10817if { (ac_try="$ac_compile"
10818case "(($ac_try" in
10819  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10820  *) ac_try_echo=$ac_try;;
10821esac
10822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10823  (eval "$ac_compile") 2>conftest.er1
10824  ac_status=$?
10825  grep -v '^ *+' conftest.er1 >conftest.err
10826  rm -f conftest.er1
10827  cat conftest.err >&5
10828  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10829  (exit $ac_status); } && {
10830	 test -z "$ac_c_werror_flag" ||
10831	 test ! -s conftest.err
10832       } && test -s conftest.$ac_objext; then
10833  tcl_cv_flag__largefile_source64=no
10834else
10835  echo "$as_me: failed program was:" >&5
10836sed 's/^/| /' conftest.$ac_ext >&5
10837
10838	cat >conftest.$ac_ext <<_ACEOF
10839/* confdefs.h.  */
10840_ACEOF
10841cat confdefs.h >>conftest.$ac_ext
10842cat >>conftest.$ac_ext <<_ACEOF
10843/* end confdefs.h.  */
10844#define _LARGEFILE_SOURCE64 1
10845#include <sys/stat.h>
10846int
10847main ()
10848{
10849char *p = (char *)open64;
10850  ;
10851  return 0;
10852}
10853_ACEOF
10854rm -f conftest.$ac_objext
10855if { (ac_try="$ac_compile"
10856case "(($ac_try" in
10857  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10858  *) ac_try_echo=$ac_try;;
10859esac
10860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10861  (eval "$ac_compile") 2>conftest.er1
10862  ac_status=$?
10863  grep -v '^ *+' conftest.er1 >conftest.err
10864  rm -f conftest.er1
10865  cat conftest.err >&5
10866  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10867  (exit $ac_status); } && {
10868	 test -z "$ac_c_werror_flag" ||
10869	 test ! -s conftest.err
10870       } && test -s conftest.$ac_objext; then
10871  tcl_cv_flag__largefile_source64=yes
10872else
10873  echo "$as_me: failed program was:" >&5
10874sed 's/^/| /' conftest.$ac_ext >&5
10875
10876	tcl_cv_flag__largefile_source64=no
10877fi
10878
10879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10880fi
10881
10882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10883fi
10884
10885    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
10886
10887cat >>confdefs.h <<\_ACEOF
10888#define _LARGEFILE_SOURCE64 1
10889_ACEOF
10890
10891	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
10892    fi
10893
10894    if test "x${tcl_flags}" = "x" ; then
10895	{ echo "$as_me:$LINENO: result: none" >&5
10896echo "${ECHO_T}none" >&6; }
10897    else
10898	{ echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
10899echo "${ECHO_T}${tcl_flags}" >&6; }
10900    fi
10901
10902
10903    { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
10904echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; }
10905    if test "${tcl_cv_type_64bit+set}" = set; then
10906  echo $ECHO_N "(cached) $ECHO_C" >&6
10907else
10908
10909	tcl_cv_type_64bit=none
10910	# See if the compiler knows natively about __int64
10911	cat >conftest.$ac_ext <<_ACEOF
10912/* confdefs.h.  */
10913_ACEOF
10914cat confdefs.h >>conftest.$ac_ext
10915cat >>conftest.$ac_ext <<_ACEOF
10916/* end confdefs.h.  */
10917
10918int
10919main ()
10920{
10921__int64 value = (__int64) 0;
10922  ;
10923  return 0;
10924}
10925_ACEOF
10926rm -f conftest.$ac_objext
10927if { (ac_try="$ac_compile"
10928case "(($ac_try" in
10929  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10930  *) ac_try_echo=$ac_try;;
10931esac
10932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10933  (eval "$ac_compile") 2>conftest.er1
10934  ac_status=$?
10935  grep -v '^ *+' conftest.er1 >conftest.err
10936  rm -f conftest.er1
10937  cat conftest.err >&5
10938  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10939  (exit $ac_status); } && {
10940	 test -z "$ac_c_werror_flag" ||
10941	 test ! -s conftest.err
10942       } && test -s conftest.$ac_objext; then
10943  tcl_type_64bit=__int64
10944else
10945  echo "$as_me: failed program was:" >&5
10946sed 's/^/| /' conftest.$ac_ext >&5
10947
10948	tcl_type_64bit="long long"
10949fi
10950
10951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10952	# See if we should use long anyway  Note that we substitute in the
10953	# type that is our current guess for a 64-bit type inside this check
10954	# program, so it should be modified only carefully...
10955        cat >conftest.$ac_ext <<_ACEOF
10956/* confdefs.h.  */
10957_ACEOF
10958cat confdefs.h >>conftest.$ac_ext
10959cat >>conftest.$ac_ext <<_ACEOF
10960/* end confdefs.h.  */
10961
10962int
10963main ()
10964{
10965switch (0) {
10966            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
10967        }
10968  ;
10969  return 0;
10970}
10971_ACEOF
10972rm -f conftest.$ac_objext
10973if { (ac_try="$ac_compile"
10974case "(($ac_try" in
10975  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10976  *) ac_try_echo=$ac_try;;
10977esac
10978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10979  (eval "$ac_compile") 2>conftest.er1
10980  ac_status=$?
10981  grep -v '^ *+' conftest.er1 >conftest.err
10982  rm -f conftest.er1
10983  cat conftest.err >&5
10984  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10985  (exit $ac_status); } && {
10986	 test -z "$ac_c_werror_flag" ||
10987	 test ! -s conftest.err
10988       } && test -s conftest.$ac_objext; then
10989  tcl_cv_type_64bit=${tcl_type_64bit}
10990else
10991  echo "$as_me: failed program was:" >&5
10992sed 's/^/| /' conftest.$ac_ext >&5
10993
10994
10995fi
10996
10997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10998fi
10999
11000    if test "${tcl_cv_type_64bit}" = none ; then
11001
11002cat >>confdefs.h <<\_ACEOF
11003#define TCL_WIDE_INT_IS_LONG 1
11004_ACEOF
11005
11006	{ echo "$as_me:$LINENO: result: using long" >&5
11007echo "${ECHO_T}using long" >&6; }
11008    elif test "${tcl_cv_type_64bit}" = "__int64" \
11009		-a "${TEA_PLATFORM}" = "windows" ; then
11010	# TEA specific: We actually want to use the default tcl.h checks in
11011	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
11012	{ echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
11013echo "${ECHO_T}using Tcl header defaults" >&6; }
11014    else
11015
11016cat >>confdefs.h <<_ACEOF
11017#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
11018_ACEOF
11019
11020	{ echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
11021echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; }
11022
11023	# Now check for auxiliary declarations
11024	{ echo "$as_me:$LINENO: checking for struct dirent64" >&5
11025echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; }
11026if test "${tcl_cv_struct_dirent64+set}" = set; then
11027  echo $ECHO_N "(cached) $ECHO_C" >&6
11028else
11029
11030	    cat >conftest.$ac_ext <<_ACEOF
11031/* confdefs.h.  */
11032_ACEOF
11033cat confdefs.h >>conftest.$ac_ext
11034cat >>conftest.$ac_ext <<_ACEOF
11035/* end confdefs.h.  */
11036#include <sys/types.h>
11037#include <sys/dirent.h>
11038int
11039main ()
11040{
11041struct dirent64 p;
11042  ;
11043  return 0;
11044}
11045_ACEOF
11046rm -f conftest.$ac_objext
11047if { (ac_try="$ac_compile"
11048case "(($ac_try" in
11049  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11050  *) ac_try_echo=$ac_try;;
11051esac
11052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11053  (eval "$ac_compile") 2>conftest.er1
11054  ac_status=$?
11055  grep -v '^ *+' conftest.er1 >conftest.err
11056  rm -f conftest.er1
11057  cat conftest.err >&5
11058  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11059  (exit $ac_status); } && {
11060	 test -z "$ac_c_werror_flag" ||
11061	 test ! -s conftest.err
11062       } && test -s conftest.$ac_objext; then
11063  tcl_cv_struct_dirent64=yes
11064else
11065  echo "$as_me: failed program was:" >&5
11066sed 's/^/| /' conftest.$ac_ext >&5
11067
11068	tcl_cv_struct_dirent64=no
11069fi
11070
11071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11072fi
11073{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
11074echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; }
11075	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
11076
11077cat >>confdefs.h <<\_ACEOF
11078#define HAVE_STRUCT_DIRENT64 1
11079_ACEOF
11080
11081	fi
11082
11083	{ echo "$as_me:$LINENO: checking for struct stat64" >&5
11084echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; }
11085if test "${tcl_cv_struct_stat64+set}" = set; then
11086  echo $ECHO_N "(cached) $ECHO_C" >&6
11087else
11088
11089	    cat >conftest.$ac_ext <<_ACEOF
11090/* confdefs.h.  */
11091_ACEOF
11092cat confdefs.h >>conftest.$ac_ext
11093cat >>conftest.$ac_ext <<_ACEOF
11094/* end confdefs.h.  */
11095#include <sys/stat.h>
11096int
11097main ()
11098{
11099struct stat64 p;
11100
11101  ;
11102  return 0;
11103}
11104_ACEOF
11105rm -f conftest.$ac_objext
11106if { (ac_try="$ac_compile"
11107case "(($ac_try" in
11108  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11109  *) ac_try_echo=$ac_try;;
11110esac
11111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11112  (eval "$ac_compile") 2>conftest.er1
11113  ac_status=$?
11114  grep -v '^ *+' conftest.er1 >conftest.err
11115  rm -f conftest.er1
11116  cat conftest.err >&5
11117  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11118  (exit $ac_status); } && {
11119	 test -z "$ac_c_werror_flag" ||
11120	 test ! -s conftest.err
11121       } && test -s conftest.$ac_objext; then
11122  tcl_cv_struct_stat64=yes
11123else
11124  echo "$as_me: failed program was:" >&5
11125sed 's/^/| /' conftest.$ac_ext >&5
11126
11127	tcl_cv_struct_stat64=no
11128fi
11129
11130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11131fi
11132{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
11133echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; }
11134	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
11135
11136cat >>confdefs.h <<\_ACEOF
11137#define HAVE_STRUCT_STAT64 1
11138_ACEOF
11139
11140	fi
11141
11142
11143
11144for ac_func in open64 lseek64
11145do
11146as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11147{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11148echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11149if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11150  echo $ECHO_N "(cached) $ECHO_C" >&6
11151else
11152  cat >conftest.$ac_ext <<_ACEOF
11153/* confdefs.h.  */
11154_ACEOF
11155cat confdefs.h >>conftest.$ac_ext
11156cat >>conftest.$ac_ext <<_ACEOF
11157/* end confdefs.h.  */
11158/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11159   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11160#define $ac_func innocuous_$ac_func
11161
11162/* System header to define __stub macros and hopefully few prototypes,
11163    which can conflict with char $ac_func (); below.
11164    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11165    <limits.h> exists even on freestanding compilers.  */
11166
11167#ifdef __STDC__
11168# include <limits.h>
11169#else
11170# include <assert.h>
11171#endif
11172
11173#undef $ac_func
11174
11175/* Override any GCC internal prototype to avoid an error.
11176   Use char because int might match the return type of a GCC
11177   builtin and then its argument prototype would still apply.  */
11178#ifdef __cplusplus
11179extern "C"
11180#endif
11181char $ac_func ();
11182/* The GNU C library defines this for functions which it implements
11183    to always fail with ENOSYS.  Some functions are actually named
11184    something starting with __ and the normal name is an alias.  */
11185#if defined __stub_$ac_func || defined __stub___$ac_func
11186choke me
11187#endif
11188
11189int
11190main ()
11191{
11192return $ac_func ();
11193  ;
11194  return 0;
11195}
11196_ACEOF
11197rm -f conftest.$ac_objext conftest$ac_exeext
11198if { (ac_try="$ac_link"
11199case "(($ac_try" in
11200  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11201  *) ac_try_echo=$ac_try;;
11202esac
11203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11204  (eval "$ac_link") 2>conftest.er1
11205  ac_status=$?
11206  grep -v '^ *+' conftest.er1 >conftest.err
11207  rm -f conftest.er1
11208  cat conftest.err >&5
11209  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11210  (exit $ac_status); } && {
11211	 test -z "$ac_c_werror_flag" ||
11212	 test ! -s conftest.err
11213       } && test -s conftest$ac_exeext &&
11214       $as_test_x conftest$ac_exeext; then
11215  eval "$as_ac_var=yes"
11216else
11217  echo "$as_me: failed program was:" >&5
11218sed 's/^/| /' conftest.$ac_ext >&5
11219
11220	eval "$as_ac_var=no"
11221fi
11222
11223rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11224      conftest$ac_exeext conftest.$ac_ext
11225fi
11226ac_res=`eval echo '${'$as_ac_var'}'`
11227	       { echo "$as_me:$LINENO: result: $ac_res" >&5
11228echo "${ECHO_T}$ac_res" >&6; }
11229if test `eval echo '${'$as_ac_var'}'` = yes; then
11230  cat >>confdefs.h <<_ACEOF
11231#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11232_ACEOF
11233
11234fi
11235done
11236
11237	{ echo "$as_me:$LINENO: checking for off64_t" >&5
11238echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; }
11239	if test "${tcl_cv_type_off64_t+set}" = set; then
11240  echo $ECHO_N "(cached) $ECHO_C" >&6
11241else
11242
11243	    cat >conftest.$ac_ext <<_ACEOF
11244/* confdefs.h.  */
11245_ACEOF
11246cat confdefs.h >>conftest.$ac_ext
11247cat >>conftest.$ac_ext <<_ACEOF
11248/* end confdefs.h.  */
11249#include <sys/types.h>
11250int
11251main ()
11252{
11253off64_t offset;
11254
11255  ;
11256  return 0;
11257}
11258_ACEOF
11259rm -f conftest.$ac_objext
11260if { (ac_try="$ac_compile"
11261case "(($ac_try" in
11262  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11263  *) ac_try_echo=$ac_try;;
11264esac
11265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11266  (eval "$ac_compile") 2>conftest.er1
11267  ac_status=$?
11268  grep -v '^ *+' conftest.er1 >conftest.err
11269  rm -f conftest.er1
11270  cat conftest.err >&5
11271  echo "$as_me:$LINENO: \$? = $ac_status" >&5
11272  (exit $ac_status); } && {
11273	 test -z "$ac_c_werror_flag" ||
11274	 test ! -s conftest.err
11275       } && test -s conftest.$ac_objext; then
11276  tcl_cv_type_off64_t=yes
11277else
11278  echo "$as_me: failed program was:" >&5
11279sed 's/^/| /' conftest.$ac_ext >&5
11280
11281	tcl_cv_type_off64_t=no
11282fi
11283
11284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11285fi
11286
11287			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
11288	        test "x${ac_cv_func_lseek64}" = "xyes" && \
11289	        test "x${ac_cv_func_open64}" = "xyes" ; then
11290
11291cat >>confdefs.h <<\_ACEOF
11292#define HAVE_TYPE_OFF64_T 1
11293_ACEOF
11294
11295	    { echo "$as_me:$LINENO: result: yes" >&5
11296echo "${ECHO_T}yes" >&6; }
11297	else
11298	    { echo "$as_me:$LINENO: result: no" >&5
11299echo "${ECHO_T}no" >&6; }
11300	fi
11301    fi
11302
11303
11304
11305#--------------------------------------------------------------------
11306# Set the default compiler switches based on the --enable-symbols option.
11307#--------------------------------------------------------------------
11308
11309
11310
11311    { echo "$as_me:$LINENO: checking for build with symbols" >&5
11312echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; }
11313    # Check whether --enable-symbols was given.
11314if test "${enable_symbols+set}" = set; then
11315  enableval=$enable_symbols; tcl_ok=$enableval
11316else
11317  tcl_ok=no
11318fi
11319
11320    DBGX=""
11321    if test "$tcl_ok" = "no"; then
11322	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
11323	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
11324	{ echo "$as_me:$LINENO: result: no" >&5
11325echo "${ECHO_T}no" >&6; }
11326    else
11327	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
11328	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
11329	if test "$tcl_ok" = "yes"; then
11330	    { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
11331echo "${ECHO_T}yes (standard debugging)" >&6; }
11332	fi
11333    fi
11334    # TEA specific:
11335    if test "${TEA_PLATFORM}" != "windows" ; then
11336	LDFLAGS_DEFAULT="${LDFLAGS}"
11337    fi
11338
11339
11340
11341
11342    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
11343
11344cat >>confdefs.h <<\_ACEOF
11345#define TCL_MEM_DEBUG 1
11346_ACEOF
11347
11348    fi
11349
11350    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
11351	if test "$tcl_ok" = "all"; then
11352	    { echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
11353echo "${ECHO_T}enabled symbols mem debugging" >&6; }
11354	else
11355	    { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
11356echo "${ECHO_T}enabled $tcl_ok debugging" >&6; }
11357	fi
11358    fi
11359
11360
11361if test "${enable_symbols+set}" = set && test "$enable_symbols" != no; then
11362
11363    PKG_CFLAGS="$PKG_CFLAGS -DTREECTRL_DEBUG"
11364
11365
11366fi
11367
11368#--------------------------------------------------------------------
11369# Everyone should be linking against the Tcl stub library.  If you
11370# can't for some reason, remove this definition.  If you aren't using
11371# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
11372# link against the non-stubbed Tcl library.  Add Tk too if necessary.
11373#--------------------------------------------------------------------
11374
11375cat >>confdefs.h <<\_ACEOF
11376#define USE_TCL_STUBS 1
11377_ACEOF
11378
11379cat >>confdefs.h <<\_ACEOF
11380#define USE_TK_STUBS 1
11381_ACEOF
11382
11383
11384#--------------------------------------------------------------------
11385# This macro generates a line to use when building a library.  It
11386# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
11387# and TEA_LOAD_TCLCONFIG macros above.
11388#--------------------------------------------------------------------
11389
11390
11391    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
11392	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
11393	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
11394	cat >conftest.$ac_ext <<_ACEOF
11395/* confdefs.h.  */
11396_ACEOF
11397cat confdefs.h >>conftest.$ac_ext
11398cat >>conftest.$ac_ext <<_ACEOF
11399/* end confdefs.h.  */
11400
11401#if defined(_MSC_VER) && _MSC_VER >= 1400
11402print("manifest needed")
11403#endif
11404
11405_ACEOF
11406if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11407  $EGREP "manifest needed" >/dev/null 2>&1; then
11408
11409	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
11410	VC_MANIFEST_EMBED_DLL="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2"
11411	VC_MANIFEST_EMBED_EXE="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1"
11412	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
11413
11414    CLEANFILES="$CLEANFILES *.manifest"
11415
11416
11417fi
11418rm -f -r conftest*
11419
11420	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
11421    else
11422	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
11423	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
11424	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
11425    fi
11426
11427    if test "${SHARED_BUILD}" = "1" ; then
11428	MAKE_LIB="${MAKE_SHARED_LIB} "
11429    else
11430	MAKE_LIB="${MAKE_STATIC_LIB} "
11431    fi
11432
11433    #--------------------------------------------------------------------
11434    # Shared libraries and static libraries have different names.
11435    # Use the double eval to make sure any variables in the suffix is
11436    # substituted. (@@@ Might not be necessary anymore)
11437    #--------------------------------------------------------------------
11438
11439    if test "${TEA_PLATFORM}" = "windows" ; then
11440	if test "${SHARED_BUILD}" = "1" ; then
11441	    # We force the unresolved linking of symbols that are really in
11442	    # the private libraries of Tcl and Tk.
11443	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
11444	    if test x"${TK_BIN_DIR}" != x ; then
11445		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
11446	    fi
11447	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
11448	else
11449	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
11450	fi
11451	# Some packages build their own stubs libraries
11452	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
11453	if test "$GCC" = "yes"; then
11454	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
11455	fi
11456	# These aren't needed on Windows (either MSVC or gcc)
11457	RANLIB=:
11458	RANLIB_STUB=:
11459    else
11460	RANLIB_STUB="${RANLIB}"
11461	if test "${SHARED_BUILD}" = "1" ; then
11462	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
11463	    if test x"${TK_BIN_DIR}" != x ; then
11464		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
11465	    fi
11466	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
11467	    RANLIB=:
11468	else
11469	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
11470	fi
11471	# Some packages build their own stubs libraries
11472	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
11473    fi
11474
11475    # These are escaped so that only CFLAGS is picked up at configure time.
11476    # The other values will be substituted at make time.
11477    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
11478    if test "${SHARED_BUILD}" = "1" ; then
11479	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
11480    fi
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491#--------------------------------------------------------------------
11492# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
11493# file during the install process.  Don't run the TCLSH_PROG through
11494# ${CYGPATH} because it's being used directly by make.
11495# Require that we use a tclsh shell version 8.2 or later since earlier
11496# versions have bugs in the pkg_mkIndex routine.
11497# Add WISH as well if this is a Tk extension.
11498#--------------------------------------------------------------------
11499
11500
11501    { echo "$as_me:$LINENO: checking for tclsh" >&5
11502echo $ECHO_N "checking for tclsh... $ECHO_C" >&6; }
11503    if test -f "${TCL_BIN_DIR}/Makefile" ; then
11504        # tclConfig.sh is in Tcl build directory
11505        if test "${TEA_PLATFORM}" = "windows"; then
11506            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
11507        else
11508            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
11509        fi
11510    else
11511        # tclConfig.sh is in install location
11512        if test "${TEA_PLATFORM}" = "windows"; then
11513            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
11514        else
11515            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
11516        fi
11517        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
11518              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
11519              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
11520        for i in $list ; do
11521            if test -f "$i/${TCLSH_PROG}" ; then
11522                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
11523                break
11524            fi
11525        done
11526        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
11527    fi
11528    { echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
11529echo "${ECHO_T}${TCLSH_PROG}" >&6; }
11530
11531
11532
11533    { echo "$as_me:$LINENO: checking for wish" >&5
11534echo $ECHO_N "checking for wish... $ECHO_C" >&6; }
11535    if test -f "${TK_BIN_DIR}/Makefile" ; then
11536        # tkConfig.sh is in Tk build directory
11537        if test "${TEA_PLATFORM}" = "windows"; then
11538            WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
11539        else
11540            WISH_PROG="${TK_BIN_DIR}/wish"
11541        fi
11542    else
11543        # tkConfig.sh is in install location
11544        if test "${TEA_PLATFORM}" = "windows"; then
11545            WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
11546        else
11547            WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
11548        fi
11549        list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
11550              `ls -d ${TK_BIN_DIR}/..     2>/dev/null` \
11551              `ls -d ${TK_PREFIX}/bin     2>/dev/null`"
11552        for i in $list ; do
11553            if test -f "$i/${WISH_PROG}" ; then
11554                REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
11555                break
11556            fi
11557        done
11558        WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
11559    fi
11560    { echo "$as_me:$LINENO: result: ${WISH_PROG}" >&5
11561echo "${ECHO_T}${WISH_PROG}" >&6; }
11562
11563
11564
11565#--------------------------------------------------------------------
11566# Finally, substitute all of the various values into the Makefile.
11567# You may alternatively have a special pkgIndex.tcl.in or other files
11568# which require substituting th AC variables in.  Include these here.
11569#--------------------------------------------------------------------
11570
11571ac_config_files="$ac_config_files Makefile"
11572
11573cat >confcache <<\_ACEOF
11574# This file is a shell script that caches the results of configure
11575# tests run on this system so they can be shared between configure
11576# scripts and configure runs, see configure's option --config-cache.
11577# It is not useful on other systems.  If it contains results you don't
11578# want to keep, you may remove or edit it.
11579#
11580# config.status only pays attention to the cache file if you give it
11581# the --recheck option to rerun configure.
11582#
11583# `ac_cv_env_foo' variables (set or unset) will be overridden when
11584# loading this file, other *unset* `ac_cv_foo' will be assigned the
11585# following values.
11586
11587_ACEOF
11588
11589# The following way of writing the cache mishandles newlines in values,
11590# but we know of no workaround that is simple, portable, and efficient.
11591# So, we kill variables containing newlines.
11592# Ultrix sh set writes to stderr and can't be redirected directly,
11593# and sets the high bit in the cache file unless we assign to the vars.
11594(
11595  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
11596    eval ac_val=\$$ac_var
11597    case $ac_val in #(
11598    *${as_nl}*)
11599      case $ac_var in #(
11600      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
11601echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
11602      esac
11603      case $ac_var in #(
11604      _ | IFS | as_nl) ;; #(
11605      *) $as_unset $ac_var ;;
11606      esac ;;
11607    esac
11608  done
11609
11610  (set) 2>&1 |
11611    case $as_nl`(ac_space=' '; set) 2>&1` in #(
11612    *${as_nl}ac_space=\ *)
11613      # `set' does not quote correctly, so add quotes (double-quote
11614      # substitution turns \\\\ into \\, and sed turns \\ into \).
11615      sed -n \
11616	"s/'/'\\\\''/g;
11617	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11618      ;; #(
11619    *)
11620      # `set' quotes correctly as required by POSIX, so do not add quotes.
11621      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
11622      ;;
11623    esac |
11624    sort
11625) |
11626  sed '
11627     /^ac_cv_env_/b end
11628     t clear
11629     :clear
11630     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11631     t end
11632     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11633     :end' >>confcache
11634if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
11635  if test -w "$cache_file"; then
11636    test "x$cache_file" != "x/dev/null" &&
11637      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
11638echo "$as_me: updating cache $cache_file" >&6;}
11639    cat confcache >$cache_file
11640  else
11641    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
11642echo "$as_me: not updating unwritable cache $cache_file" >&6;}
11643  fi
11644fi
11645rm -f confcache
11646
11647test "x$prefix" = xNONE && prefix=$ac_default_prefix
11648# Let make expand exec_prefix.
11649test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11650
11651# Transform confdefs.h into DEFS.
11652# Protect against shell expansion while executing Makefile rules.
11653# Protect against Makefile macro expansion.
11654#
11655# If the first sed substitution is executed (which looks for macros that
11656# take arguments), then branch to the quote section.  Otherwise,
11657# look for a macro that doesn't take arguments.
11658ac_script='
11659t clear
11660:clear
11661s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
11662t quote
11663s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
11664t quote
11665b any
11666:quote
11667s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
11668s/\[/\\&/g
11669s/\]/\\&/g
11670s/\$/$$/g
11671H
11672:any
11673${
11674	g
11675	s/^\n//
11676	s/\n/ /g
11677	p
11678}
11679'
11680DEFS=`sed -n "$ac_script" confdefs.h`
11681
11682
11683ac_libobjs=
11684ac_ltlibobjs=
11685for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
11686  # 1. Remove the extension, and $U if already installed.
11687  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
11688  ac_i=`echo "$ac_i" | sed "$ac_script"`
11689  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
11690  #    will be set to the directory where LIBOBJS objects are built.
11691  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
11692  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
11693done
11694LIBOBJS=$ac_libobjs
11695
11696LTLIBOBJS=$ac_ltlibobjs
11697
11698
11699CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
11700
11701: ${CONFIG_STATUS=./config.status}
11702ac_clean_files_save=$ac_clean_files
11703ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11704{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
11705echo "$as_me: creating $CONFIG_STATUS" >&6;}
11706cat >$CONFIG_STATUS <<_ACEOF
11707#! $SHELL
11708# Generated by $as_me.
11709# Run this file to recreate the current configuration.
11710# Compiler output produced by configure, useful for debugging
11711# configure, is in config.log if it exists.
11712
11713debug=false
11714ac_cs_recheck=false
11715ac_cs_silent=false
11716SHELL=\${CONFIG_SHELL-$SHELL}
11717_ACEOF
11718
11719cat >>$CONFIG_STATUS <<\_ACEOF
11720## --------------------- ##
11721## M4sh Initialization.  ##
11722## --------------------- ##
11723
11724# Be more Bourne compatible
11725DUALCASE=1; export DUALCASE # for MKS sh
11726if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11727  emulate sh
11728  NULLCMD=:
11729  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
11730  # is contrary to our usage.  Disable this feature.
11731  alias -g '${1+"$@"}'='"$@"'
11732  setopt NO_GLOB_SUBST
11733else
11734  case `(set -o) 2>/dev/null` in
11735  *posix*) set -o posix ;;
11736esac
11737
11738fi
11739
11740
11741
11742
11743# PATH needs CR
11744# Avoid depending upon Character Ranges.
11745as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11746as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11747as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11748as_cr_digits='0123456789'
11749as_cr_alnum=$as_cr_Letters$as_cr_digits
11750
11751# The user is always right.
11752if test "${PATH_SEPARATOR+set}" != set; then
11753  echo "#! /bin/sh" >conf$$.sh
11754  echo  "exit 0"   >>conf$$.sh
11755  chmod +x conf$$.sh
11756  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11757    PATH_SEPARATOR=';'
11758  else
11759    PATH_SEPARATOR=:
11760  fi
11761  rm -f conf$$.sh
11762fi
11763
11764# Support unset when possible.
11765if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
11766  as_unset=unset
11767else
11768  as_unset=false
11769fi
11770
11771
11772# IFS
11773# We need space, tab and new line, in precisely that order.  Quoting is
11774# there to prevent editors from complaining about space-tab.
11775# (If _AS_PATH_WALK were called with IFS unset, it would disable word
11776# splitting by setting IFS to empty value.)
11777as_nl='
11778'
11779IFS=" ""	$as_nl"
11780
11781# Find who we are.  Look in the path if we contain no directory separator.
11782case $0 in
11783  *[\\/]* ) as_myself=$0 ;;
11784  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11785for as_dir in $PATH
11786do
11787  IFS=$as_save_IFS
11788  test -z "$as_dir" && as_dir=.
11789  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
11790done
11791IFS=$as_save_IFS
11792
11793     ;;
11794esac
11795# We did not find ourselves, most probably we were run as `sh COMMAND'
11796# in which case we are not to be found in the path.
11797if test "x$as_myself" = x; then
11798  as_myself=$0
11799fi
11800if test ! -f "$as_myself"; then
11801  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
11802  { (exit 1); exit 1; }
11803fi
11804
11805# Work around bugs in pre-3.0 UWIN ksh.
11806for as_var in ENV MAIL MAILPATH
11807do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
11808done
11809PS1='$ '
11810PS2='> '
11811PS4='+ '
11812
11813# NLS nuisances.
11814for as_var in \
11815  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
11816  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
11817  LC_TELEPHONE LC_TIME
11818do
11819  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
11820    eval $as_var=C; export $as_var
11821  else
11822    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
11823  fi
11824done
11825
11826# Required to use basename.
11827if expr a : '\(a\)' >/dev/null 2>&1 &&
11828   test "X`expr 00001 : '.*\(...\)'`" = X001; then
11829  as_expr=expr
11830else
11831  as_expr=false
11832fi
11833
11834if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
11835  as_basename=basename
11836else
11837  as_basename=false
11838fi
11839
11840
11841# Name of the executable.
11842as_me=`$as_basename -- "$0" ||
11843$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11844	 X"$0" : 'X\(//\)$' \| \
11845	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
11846echo X/"$0" |
11847    sed '/^.*\/\([^/][^/]*\)\/*$/{
11848	    s//\1/
11849	    q
11850	  }
11851	  /^X\/\(\/\/\)$/{
11852	    s//\1/
11853	    q
11854	  }
11855	  /^X\/\(\/\).*/{
11856	    s//\1/
11857	    q
11858	  }
11859	  s/.*/./; q'`
11860
11861# CDPATH.
11862$as_unset CDPATH
11863
11864
11865
11866  as_lineno_1=$LINENO
11867  as_lineno_2=$LINENO
11868  test "x$as_lineno_1" != "x$as_lineno_2" &&
11869  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
11870
11871  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
11872  # uniformly replaced by the line number.  The first 'sed' inserts a
11873  # line-number line after each line using $LINENO; the second 'sed'
11874  # does the real work.  The second script uses 'N' to pair each
11875  # line-number line with the line containing $LINENO, and appends
11876  # trailing '-' during substitution so that $LINENO is not a special
11877  # case at line end.
11878  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
11879  # scripts with optimization help from Paolo Bonzini.  Blame Lee
11880  # E. McMahon (1931-1989) for sed's syntax.  :-)
11881  sed -n '
11882    p
11883    /[$]LINENO/=
11884  ' <$as_myself |
11885    sed '
11886      s/[$]LINENO.*/&-/
11887      t lineno
11888      b
11889      :lineno
11890      N
11891      :loop
11892      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
11893      t loop
11894      s/-\n.*//
11895    ' >$as_me.lineno &&
11896  chmod +x "$as_me.lineno" ||
11897    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
11898   { (exit 1); exit 1; }; }
11899
11900  # Don't try to exec as it changes $[0], causing all sort of problems
11901  # (the dirname of $[0] is not the place where we might find the
11902  # original and so on.  Autoconf is especially sensitive to this).
11903  . "./$as_me.lineno"
11904  # Exit status is that of the last command.
11905  exit
11906}
11907
11908
11909if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
11910  as_dirname=dirname
11911else
11912  as_dirname=false
11913fi
11914
11915ECHO_C= ECHO_N= ECHO_T=
11916case `echo -n x` in
11917-n*)
11918  case `echo 'x\c'` in
11919  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
11920  *)   ECHO_C='\c';;
11921  esac;;
11922*)
11923  ECHO_N='-n';;
11924esac
11925
11926if expr a : '\(a\)' >/dev/null 2>&1 &&
11927   test "X`expr 00001 : '.*\(...\)'`" = X001; then
11928  as_expr=expr
11929else
11930  as_expr=false
11931fi
11932
11933rm -f conf$$ conf$$.exe conf$$.file
11934if test -d conf$$.dir; then
11935  rm -f conf$$.dir/conf$$.file
11936else
11937  rm -f conf$$.dir
11938  mkdir conf$$.dir
11939fi
11940echo >conf$$.file
11941if ln -s conf$$.file conf$$ 2>/dev/null; then
11942  as_ln_s='ln -s'
11943  # ... but there are two gotchas:
11944  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
11945  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
11946  # In both cases, we have to default to `cp -p'.
11947  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
11948    as_ln_s='cp -p'
11949elif ln conf$$.file conf$$ 2>/dev/null; then
11950  as_ln_s=ln
11951else
11952  as_ln_s='cp -p'
11953fi
11954rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11955rmdir conf$$.dir 2>/dev/null
11956
11957if mkdir -p . 2>/dev/null; then
11958  as_mkdir_p=:
11959else
11960  test -d ./-p && rmdir ./-p
11961  as_mkdir_p=false
11962fi
11963
11964if test -x / >/dev/null 2>&1; then
11965  as_test_x='test -x'
11966else
11967  if ls -dL / >/dev/null 2>&1; then
11968    as_ls_L_option=L
11969  else
11970    as_ls_L_option=
11971  fi
11972  as_test_x='
11973    eval sh -c '\''
11974      if test -d "$1"; then
11975        test -d "$1/.";
11976      else
11977	case $1 in
11978        -*)set "./$1";;
11979	esac;
11980	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
11981	???[sx]*):;;*)false;;esac;fi
11982    '\'' sh
11983  '
11984fi
11985as_executable_p=$as_test_x
11986
11987# Sed expression to map a string onto a valid CPP name.
11988as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
11989
11990# Sed expression to map a string onto a valid variable name.
11991as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
11992
11993
11994exec 6>&1
11995
11996# Save the log message, to keep $[0] and so on meaningful, and to
11997# report actual input values of CONFIG_FILES etc. instead of their
11998# values after options handling.
11999ac_log="
12000This file was extended by shellicon $as_me 2.2, which was
12001generated by GNU Autoconf 2.61.  Invocation command line was
12002
12003  CONFIG_FILES    = $CONFIG_FILES
12004  CONFIG_HEADERS  = $CONFIG_HEADERS
12005  CONFIG_LINKS    = $CONFIG_LINKS
12006  CONFIG_COMMANDS = $CONFIG_COMMANDS
12007  $ $0 $@
12008
12009on `(hostname || uname -n) 2>/dev/null | sed 1q`
12010"
12011
12012_ACEOF
12013
12014cat >>$CONFIG_STATUS <<_ACEOF
12015# Files that config.status was made for.
12016config_files="$ac_config_files"
12017
12018_ACEOF
12019
12020cat >>$CONFIG_STATUS <<\_ACEOF
12021ac_cs_usage="\
12022\`$as_me' instantiates files from templates according to the
12023current configuration.
12024
12025Usage: $0 [OPTIONS] [FILE]...
12026
12027  -h, --help       print this help, then exit
12028  -V, --version    print version number and configuration settings, then exit
12029  -q, --quiet      do not print progress messages
12030  -d, --debug      don't remove temporary files
12031      --recheck    update $as_me by reconfiguring in the same conditions
12032  --file=FILE[:TEMPLATE]
12033		   instantiate the configuration file FILE
12034
12035Configuration files:
12036$config_files
12037
12038Report bugs to <bug-autoconf@gnu.org>."
12039
12040_ACEOF
12041cat >>$CONFIG_STATUS <<_ACEOF
12042ac_cs_version="\\
12043shellicon config.status 2.2
12044configured by $0, generated by GNU Autoconf 2.61,
12045  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
12046
12047Copyright (C) 2006 Free Software Foundation, Inc.
12048This config.status script is free software; the Free Software Foundation
12049gives unlimited permission to copy, distribute and modify it."
12050
12051ac_pwd='$ac_pwd'
12052srcdir='$srcdir'
12053INSTALL='$INSTALL'
12054_ACEOF
12055
12056cat >>$CONFIG_STATUS <<\_ACEOF
12057# If no file are specified by the user, then we need to provide default
12058# value.  By we need to know if files were specified by the user.
12059ac_need_defaults=:
12060while test $# != 0
12061do
12062  case $1 in
12063  --*=*)
12064    ac_option=`expr "X$1" : 'X\([^=]*\)='`
12065    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
12066    ac_shift=:
12067    ;;
12068  *)
12069    ac_option=$1
12070    ac_optarg=$2
12071    ac_shift=shift
12072    ;;
12073  esac
12074
12075  case $ac_option in
12076  # Handling of the options.
12077  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12078    ac_cs_recheck=: ;;
12079  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
12080    echo "$ac_cs_version"; exit ;;
12081  --debug | --debu | --deb | --de | --d | -d )
12082    debug=: ;;
12083  --file | --fil | --fi | --f )
12084    $ac_shift
12085    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
12086    ac_need_defaults=false;;
12087  --he | --h |  --help | --hel | -h )
12088    echo "$ac_cs_usage"; exit ;;
12089  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
12090  | -silent | --silent | --silen | --sile | --sil | --si | --s)
12091    ac_cs_silent=: ;;
12092
12093  # This is an error.
12094  -*) { echo "$as_me: error: unrecognized option: $1
12095Try \`$0 --help' for more information." >&2
12096   { (exit 1); exit 1; }; } ;;
12097
12098  *) ac_config_targets="$ac_config_targets $1"
12099     ac_need_defaults=false ;;
12100
12101  esac
12102  shift
12103done
12104
12105ac_configure_extra_args=
12106
12107if $ac_cs_silent; then
12108  exec 6>/dev/null
12109  ac_configure_extra_args="$ac_configure_extra_args --silent"
12110fi
12111
12112_ACEOF
12113cat >>$CONFIG_STATUS <<_ACEOF
12114if \$ac_cs_recheck; then
12115  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
12116  CONFIG_SHELL=$SHELL
12117  export CONFIG_SHELL
12118  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12119fi
12120
12121_ACEOF
12122cat >>$CONFIG_STATUS <<\_ACEOF
12123exec 5>>config.log
12124{
12125  echo
12126  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
12127## Running $as_me. ##
12128_ASBOX
12129  echo "$ac_log"
12130} >&5
12131
12132_ACEOF
12133cat >>$CONFIG_STATUS <<_ACEOF
12134_ACEOF
12135
12136cat >>$CONFIG_STATUS <<\_ACEOF
12137
12138# Handling of arguments.
12139for ac_config_target in $ac_config_targets
12140do
12141  case $ac_config_target in
12142    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12143
12144  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
12145echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12146   { (exit 1); exit 1; }; };;
12147  esac
12148done
12149
12150
12151# If the user did not use the arguments to specify the items to instantiate,
12152# then the envvar interface is used.  Set only those that are not.
12153# We use the long form for the default assignment because of an extremely
12154# bizarre bug on SunOS 4.1.3.
12155if $ac_need_defaults; then
12156  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12157fi
12158
12159# Have a temporary directory for convenience.  Make it in the build tree
12160# simply because there is no reason against having it here, and in addition,
12161# creating and moving files from /tmp can sometimes cause problems.
12162# Hook for its removal unless debugging.
12163# Note that there is a small window in which the directory will not be cleaned:
12164# after its creation but before its name has been assigned to `$tmp'.
12165$debug ||
12166{
12167  tmp=
12168  trap 'exit_status=$?
12169  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
12170' 0
12171  trap '{ (exit 1); exit 1; }' 1 2 13 15
12172}
12173# Create a (secure) tmp directory for tmp files.
12174
12175{
12176  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
12177  test -n "$tmp" && test -d "$tmp"
12178}  ||
12179{
12180  tmp=./conf$$-$RANDOM
12181  (umask 077 && mkdir "$tmp")
12182} ||
12183{
12184   echo "$me: cannot create a temporary directory in ." >&2
12185   { (exit 1); exit 1; }
12186}
12187
12188#
12189# Set up the sed scripts for CONFIG_FILES section.
12190#
12191
12192# No need to generate the scripts if there are no CONFIG_FILES.
12193# This happens for instance when ./config.status config.h
12194if test -n "$CONFIG_FILES"; then
12195
12196_ACEOF
12197
12198
12199
12200ac_delim='%!_!# '
12201for ac_last_try in false false false false false :; do
12202  cat >conf$$subs.sed <<_ACEOF
12203SHELL!$SHELL$ac_delim
12204PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
12205PACKAGE_NAME!$PACKAGE_NAME$ac_delim
12206PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
12207PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
12208PACKAGE_STRING!$PACKAGE_STRING$ac_delim
12209PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
12210exec_prefix!$exec_prefix$ac_delim
12211prefix!$prefix$ac_delim
12212program_transform_name!$program_transform_name$ac_delim
12213bindir!$bindir$ac_delim
12214sbindir!$sbindir$ac_delim
12215libexecdir!$libexecdir$ac_delim
12216datarootdir!$datarootdir$ac_delim
12217datadir!$datadir$ac_delim
12218sysconfdir!$sysconfdir$ac_delim
12219sharedstatedir!$sharedstatedir$ac_delim
12220localstatedir!$localstatedir$ac_delim
12221includedir!$includedir$ac_delim
12222oldincludedir!$oldincludedir$ac_delim
12223docdir!$docdir$ac_delim
12224infodir!$infodir$ac_delim
12225htmldir!$htmldir$ac_delim
12226dvidir!$dvidir$ac_delim
12227pdfdir!$pdfdir$ac_delim
12228psdir!$psdir$ac_delim
12229libdir!$libdir$ac_delim
12230localedir!$localedir$ac_delim
12231mandir!$mandir$ac_delim
12232DEFS!$DEFS$ac_delim
12233ECHO_C!$ECHO_C$ac_delim
12234ECHO_N!$ECHO_N$ac_delim
12235ECHO_T!$ECHO_T$ac_delim
12236LIBS!$LIBS$ac_delim
12237build_alias!$build_alias$ac_delim
12238host_alias!$host_alias$ac_delim
12239target_alias!$target_alias$ac_delim
12240PACKAGE_PATCHLEVEL!$PACKAGE_PATCHLEVEL$ac_delim
12241CYGPATH!$CYGPATH$ac_delim
12242EXEEXT!$EXEEXT$ac_delim
12243PKG_LIB_FILE!$PKG_LIB_FILE$ac_delim
12244PKG_STUB_LIB_FILE!$PKG_STUB_LIB_FILE$ac_delim
12245PKG_STUB_SOURCES!$PKG_STUB_SOURCES$ac_delim
12246PKG_STUB_OBJECTS!$PKG_STUB_OBJECTS$ac_delim
12247PKG_TCL_SOURCES!$PKG_TCL_SOURCES$ac_delim
12248PKG_HEADERS!$PKG_HEADERS$ac_delim
12249PKG_INCLUDES!$PKG_INCLUDES$ac_delim
12250PKG_LIBS!$PKG_LIBS$ac_delim
12251PKG_CFLAGS!$PKG_CFLAGS$ac_delim
12252TCL_VERSION!$TCL_VERSION$ac_delim
12253TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim
12254TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim
12255TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim
12256TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
12257TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim
12258TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
12259TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim
12260TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim
12261TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim
12262CLEANFILES!$CLEANFILES$ac_delim
12263TCL_LIBS!$TCL_LIBS$ac_delim
12264TCL_DEFS!$TCL_DEFS$ac_delim
12265TCL_EXTRA_CFLAGS!$TCL_EXTRA_CFLAGS$ac_delim
12266TCL_LD_FLAGS!$TCL_LD_FLAGS$ac_delim
12267TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
12268TK_VERSION!$TK_VERSION$ac_delim
12269TK_BIN_DIR!$TK_BIN_DIR$ac_delim
12270TK_SRC_DIR!$TK_SRC_DIR$ac_delim
12271TK_LIB_FILE!$TK_LIB_FILE$ac_delim
12272TK_LIB_FLAG!$TK_LIB_FLAG$ac_delim
12273TK_LIB_SPEC!$TK_LIB_SPEC$ac_delim
12274TK_STUB_LIB_FILE!$TK_STUB_LIB_FILE$ac_delim
12275TK_STUB_LIB_FLAG!$TK_STUB_LIB_FLAG$ac_delim
12276TK_STUB_LIB_SPEC!$TK_STUB_LIB_SPEC$ac_delim
12277TK_LIBS!$TK_LIBS$ac_delim
12278TK_XINCLUDES!$TK_XINCLUDES$ac_delim
12279CC!$CC$ac_delim
12280CFLAGS!$CFLAGS$ac_delim
12281LDFLAGS!$LDFLAGS$ac_delim
12282CPPFLAGS!$CPPFLAGS$ac_delim
12283ac_ct_CC!$ac_ct_CC$ac_delim
12284OBJEXT!$OBJEXT$ac_delim
12285CPP!$CPP$ac_delim
12286INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
12287INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
12288INSTALL_DATA!$INSTALL_DATA$ac_delim
12289SET_MAKE!$SET_MAKE$ac_delim
12290RANLIB!$RANLIB$ac_delim
12291GREP!$GREP$ac_delim
12292EGREP!$EGREP$ac_delim
12293MATH_LIBS!$MATH_LIBS$ac_delim
12294PKG_SOURCES!$PKG_SOURCES$ac_delim
12295PKG_OBJECTS!$PKG_OBJECTS$ac_delim
12296TCL_INCLUDES!$TCL_INCLUDES$ac_delim
12297TCL_TOP_DIR_NATIVE!$TCL_TOP_DIR_NATIVE$ac_delim
12298TK_INCLUDES!$TK_INCLUDES$ac_delim
12299TK_TOP_DIR_NATIVE!$TK_TOP_DIR_NATIVE$ac_delim
12300_ACEOF
12301
12302  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
12303    break
12304  elif $ac_last_try; then
12305    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
12306echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
12307   { (exit 1); exit 1; }; }
12308  else
12309    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12310  fi
12311done
12312
12313ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
12314if test -n "$ac_eof"; then
12315  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
12316  ac_eof=`expr $ac_eof + 1`
12317fi
12318
12319cat >>$CONFIG_STATUS <<_ACEOF
12320cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
12321/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12322_ACEOF
12323sed '
12324s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
12325s/^/s,@/; s/!/@,|#_!!_#|/
12326:n
12327t n
12328s/'"$ac_delim"'$/,g/; t
12329s/$/\\/; p
12330N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
12331' >>$CONFIG_STATUS <conf$$subs.sed
12332rm -f conf$$subs.sed
12333cat >>$CONFIG_STATUS <<_ACEOF
12334CEOF$ac_eof
12335_ACEOF
12336
12337
12338ac_delim='%!_!# '
12339for ac_last_try in false false false false false :; do
12340  cat >conf$$subs.sed <<_ACEOF
12341TK_XLIB_DIR_NATIVE!$TK_XLIB_DIR_NATIVE$ac_delim
12342XMKMF!$XMKMF$ac_delim
12343TCL_THREADS!$TCL_THREADS$ac_delim
12344SHARED_BUILD!$SHARED_BUILD$ac_delim
12345AR!$AR$ac_delim
12346CELIB_DIR!$CELIB_DIR$ac_delim
12347CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim
12348CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim
12349CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim
12350STLIB_LD!$STLIB_LD$ac_delim
12351SHLIB_LD!$SHLIB_LD$ac_delim
12352SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim
12353SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim
12354LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim
12355CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim
12356LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim
12357TCL_DBGX!$TCL_DBGX$ac_delim
12358MAKE_LIB!$MAKE_LIB$ac_delim
12359MAKE_SHARED_LIB!$MAKE_SHARED_LIB$ac_delim
12360MAKE_STATIC_LIB!$MAKE_STATIC_LIB$ac_delim
12361MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim
12362RANLIB_STUB!$RANLIB_STUB$ac_delim
12363VC_MANIFEST_EMBED_DLL!$VC_MANIFEST_EMBED_DLL$ac_delim
12364VC_MANIFEST_EMBED_EXE!$VC_MANIFEST_EMBED_EXE$ac_delim
12365TCLSH_PROG!$TCLSH_PROG$ac_delim
12366WISH_PROG!$WISH_PROG$ac_delim
12367LIBOBJS!$LIBOBJS$ac_delim
12368LTLIBOBJS!$LTLIBOBJS$ac_delim
12369_ACEOF
12370
12371  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 28; then
12372    break
12373  elif $ac_last_try; then
12374    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
12375echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
12376   { (exit 1); exit 1; }; }
12377  else
12378    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12379  fi
12380done
12381
12382ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
12383if test -n "$ac_eof"; then
12384  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
12385  ac_eof=`expr $ac_eof + 1`
12386fi
12387
12388cat >>$CONFIG_STATUS <<_ACEOF
12389cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
12390/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
12391_ACEOF
12392sed '
12393s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
12394s/^/s,@/; s/!/@,|#_!!_#|/
12395:n
12396t n
12397s/'"$ac_delim"'$/,g/; t
12398s/$/\\/; p
12399N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
12400' >>$CONFIG_STATUS <conf$$subs.sed
12401rm -f conf$$subs.sed
12402cat >>$CONFIG_STATUS <<_ACEOF
12403:end
12404s/|#_!!_#|//g
12405CEOF$ac_eof
12406_ACEOF
12407
12408
12409# VPATH may cause trouble with some makes, so we remove $(srcdir),
12410# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12411# trailing colons and then remove the whole line if VPATH becomes empty
12412# (actually we leave an empty line to preserve line numbers).
12413if test "x$srcdir" = x.; then
12414  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
12415s/:*\$(srcdir):*/:/
12416s/:*\${srcdir}:*/:/
12417s/:*@srcdir@:*/:/
12418s/^\([^=]*=[	 ]*\):*/\1/
12419s/:*$//
12420s/^[^=]*=[	 ]*$//
12421}'
12422fi
12423
12424cat >>$CONFIG_STATUS <<\_ACEOF
12425fi # test -n "$CONFIG_FILES"
12426
12427
12428for ac_tag in  :F $CONFIG_FILES
12429do
12430  case $ac_tag in
12431  :[FHLC]) ac_mode=$ac_tag; continue;;
12432  esac
12433  case $ac_mode$ac_tag in
12434  :[FHL]*:*);;
12435  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
12436echo "$as_me: error: Invalid tag $ac_tag." >&2;}
12437   { (exit 1); exit 1; }; };;
12438  :[FH]-) ac_tag=-:-;;
12439  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
12440  esac
12441  ac_save_IFS=$IFS
12442  IFS=:
12443  set x $ac_tag
12444  IFS=$ac_save_IFS
12445  shift
12446  ac_file=$1
12447  shift
12448
12449  case $ac_mode in
12450  :L) ac_source=$1;;
12451  :[FH])
12452    ac_file_inputs=
12453    for ac_f
12454    do
12455      case $ac_f in
12456      -) ac_f="$tmp/stdin";;
12457      *) # Look for the file first in the build tree, then in the source tree
12458	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
12459	 # because $ac_f cannot contain `:'.
12460	 test -f "$ac_f" ||
12461	   case $ac_f in
12462	   [\\/$]*) false;;
12463	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
12464	   esac ||
12465	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
12466echo "$as_me: error: cannot find input file: $ac_f" >&2;}
12467   { (exit 1); exit 1; }; };;
12468      esac
12469      ac_file_inputs="$ac_file_inputs $ac_f"
12470    done
12471
12472    # Let's still pretend it is `configure' which instantiates (i.e., don't
12473    # use $as_me), people would be surprised to read:
12474    #    /* config.h.  Generated by config.status.  */
12475    configure_input="Generated from "`IFS=:
12476	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
12477    if test x"$ac_file" != x-; then
12478      configure_input="$ac_file.  $configure_input"
12479      { echo "$as_me:$LINENO: creating $ac_file" >&5
12480echo "$as_me: creating $ac_file" >&6;}
12481    fi
12482
12483    case $ac_tag in
12484    *:-:* | *:-) cat >"$tmp/stdin";;
12485    esac
12486    ;;
12487  esac
12488
12489  ac_dir=`$as_dirname -- "$ac_file" ||
12490$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12491	 X"$ac_file" : 'X\(//\)[^/]' \| \
12492	 X"$ac_file" : 'X\(//\)$' \| \
12493	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
12494echo X"$ac_file" |
12495    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12496	    s//\1/
12497	    q
12498	  }
12499	  /^X\(\/\/\)[^/].*/{
12500	    s//\1/
12501	    q
12502	  }
12503	  /^X\(\/\/\)$/{
12504	    s//\1/
12505	    q
12506	  }
12507	  /^X\(\/\).*/{
12508	    s//\1/
12509	    q
12510	  }
12511	  s/.*/./; q'`
12512  { as_dir="$ac_dir"
12513  case $as_dir in #(
12514  -*) as_dir=./$as_dir;;
12515  esac
12516  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
12517    as_dirs=
12518    while :; do
12519      case $as_dir in #(
12520      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
12521      *) as_qdir=$as_dir;;
12522      esac
12523      as_dirs="'$as_qdir' $as_dirs"
12524      as_dir=`$as_dirname -- "$as_dir" ||
12525$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12526	 X"$as_dir" : 'X\(//\)[^/]' \| \
12527	 X"$as_dir" : 'X\(//\)$' \| \
12528	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
12529echo X"$as_dir" |
12530    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12531	    s//\1/
12532	    q
12533	  }
12534	  /^X\(\/\/\)[^/].*/{
12535	    s//\1/
12536	    q
12537	  }
12538	  /^X\(\/\/\)$/{
12539	    s//\1/
12540	    q
12541	  }
12542	  /^X\(\/\).*/{
12543	    s//\1/
12544	    q
12545	  }
12546	  s/.*/./; q'`
12547      test -d "$as_dir" && break
12548    done
12549    test -z "$as_dirs" || eval "mkdir $as_dirs"
12550  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
12551echo "$as_me: error: cannot create directory $as_dir" >&2;}
12552   { (exit 1); exit 1; }; }; }
12553  ac_builddir=.
12554
12555case "$ac_dir" in
12556.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
12557*)
12558  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
12559  # A ".." for each directory in $ac_dir_suffix.
12560  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
12561  case $ac_top_builddir_sub in
12562  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
12563  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
12564  esac ;;
12565esac
12566ac_abs_top_builddir=$ac_pwd
12567ac_abs_builddir=$ac_pwd$ac_dir_suffix
12568# for backward compatibility:
12569ac_top_builddir=$ac_top_build_prefix
12570
12571case $srcdir in
12572  .)  # We are building in place.
12573    ac_srcdir=.
12574    ac_top_srcdir=$ac_top_builddir_sub
12575    ac_abs_top_srcdir=$ac_pwd ;;
12576  [\\/]* | ?:[\\/]* )  # Absolute name.
12577    ac_srcdir=$srcdir$ac_dir_suffix;
12578    ac_top_srcdir=$srcdir
12579    ac_abs_top_srcdir=$srcdir ;;
12580  *) # Relative name.
12581    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
12582    ac_top_srcdir=$ac_top_build_prefix$srcdir
12583    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
12584esac
12585ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
12586
12587
12588  case $ac_mode in
12589  :F)
12590  #
12591  # CONFIG_FILE
12592  #
12593
12594  case $INSTALL in
12595  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12596  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
12597  esac
12598_ACEOF
12599
12600cat >>$CONFIG_STATUS <<\_ACEOF
12601# If the template does not know about datarootdir, expand it.
12602# FIXME: This hack should be removed a few years after 2.60.
12603ac_datarootdir_hack=; ac_datarootdir_seen=
12604
12605case `sed -n '/datarootdir/ {
12606  p
12607  q
12608}
12609/@datadir@/p
12610/@docdir@/p
12611/@infodir@/p
12612/@localedir@/p
12613/@mandir@/p
12614' $ac_file_inputs` in
12615*datarootdir*) ac_datarootdir_seen=yes;;
12616*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
12617  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
12618echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
12619_ACEOF
12620cat >>$CONFIG_STATUS <<_ACEOF
12621  ac_datarootdir_hack='
12622  s&@datadir@&$datadir&g
12623  s&@docdir@&$docdir&g
12624  s&@infodir@&$infodir&g
12625  s&@localedir@&$localedir&g
12626  s&@mandir@&$mandir&g
12627    s&\\\${datarootdir}&$datarootdir&g' ;;
12628esac
12629_ACEOF
12630
12631# Neutralize VPATH when `$srcdir' = `.'.
12632# Shell code in configure.ac might set extrasub.
12633# FIXME: do we really want to maintain this feature?
12634cat >>$CONFIG_STATUS <<_ACEOF
12635  sed "$ac_vpsub
12636$extrasub
12637_ACEOF
12638cat >>$CONFIG_STATUS <<\_ACEOF
12639:t
12640/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12641s&@configure_input@&$configure_input&;t t
12642s&@top_builddir@&$ac_top_builddir_sub&;t t
12643s&@srcdir@&$ac_srcdir&;t t
12644s&@abs_srcdir@&$ac_abs_srcdir&;t t
12645s&@top_srcdir@&$ac_top_srcdir&;t t
12646s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
12647s&@builddir@&$ac_builddir&;t t
12648s&@abs_builddir@&$ac_abs_builddir&;t t
12649s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
12650s&@INSTALL@&$ac_INSTALL&;t t
12651$ac_datarootdir_hack
12652" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
12653
12654test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
12655  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
12656  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
12657  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12658which seems to be undefined.  Please make sure it is defined." >&5
12659echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12660which seems to be undefined.  Please make sure it is defined." >&2;}
12661
12662  rm -f "$tmp/stdin"
12663  case $ac_file in
12664  -) cat "$tmp/out"; rm -f "$tmp/out";;
12665  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
12666  esac
12667 ;;
12668
12669
12670
12671  esac
12672
12673done # for ac_tag
12674
12675
12676{ (exit 0); exit 0; }
12677_ACEOF
12678chmod +x $CONFIG_STATUS
12679ac_clean_files=$ac_clean_files_save
12680
12681
12682# configure is writing to config.log, and then calls config.status.
12683# config.status does its own redirection, appending to config.log.
12684# Unfortunately, on DOS this fails, as config.log is still kept open
12685# by configure, so config.status won't be able to write to it; its
12686# output is simply discarded.  So we exec the FD to /dev/null,
12687# effectively closing config.log, so it can be properly (re)opened and
12688# appended to by config.status.  When coming back to configure, we
12689# need to make the FD available again.
12690if test "$no_create" != yes; then
12691  ac_cs_success=:
12692  ac_config_status_args=
12693  test "$silent" = yes &&
12694    ac_config_status_args="$ac_config_status_args --quiet"
12695  exec 5>/dev/null
12696  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
12697  exec 5>>config.log
12698  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12699  # would make configure fail if this is the last instruction.
12700  $ac_cs_success || { (exit 1); exit 1; }
12701fi
12702
12703