1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.63 for tkgeomap 2.11.6.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008 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  # Pre-4.2 versions of Zsh do 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
40as_nl='
41'
42export as_nl
43# Printing a long string crashes Solaris 7 /usr/bin/printf.
44as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
46as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
47if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48  as_echo='printf %s\n'
49  as_echo_n='printf %s'
50else
51  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53    as_echo_n='/usr/ucb/echo -n'
54  else
55    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56    as_echo_n_body='eval
57      arg=$1;
58      case $arg in
59      *"$as_nl"*)
60	expr "X$arg" : "X\\(.*\\)$as_nl";
61	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62      esac;
63      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64    '
65    export as_echo_n_body
66    as_echo_n='sh -c $as_echo_n_body as_echo'
67  fi
68  export as_echo_body
69  as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74  PATH_SEPARATOR=:
75  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77      PATH_SEPARATOR=';'
78  }
79fi
80
81# Support unset when possible.
82if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
83  as_unset=unset
84else
85  as_unset=false
86fi
87
88
89# IFS
90# We need space, tab and new line, in precisely that order.  Quoting is
91# there to prevent editors from complaining about space-tab.
92# (If _AS_PATH_WALK were called with IFS unset, it would disable word
93# splitting by setting IFS to empty value.)
94IFS=" ""	$as_nl"
95
96# Find who we are.  Look in the path if we contain no directory separator.
97case $0 in
98  *[\\/]* ) as_myself=$0 ;;
99  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
100for as_dir in $PATH
101do
102  IFS=$as_save_IFS
103  test -z "$as_dir" && as_dir=.
104  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
105done
106IFS=$as_save_IFS
107
108     ;;
109esac
110# We did not find ourselves, most probably we were run as `sh COMMAND'
111# in which case we are not to be found in the path.
112if test "x$as_myself" = x; then
113  as_myself=$0
114fi
115if test ! -f "$as_myself"; then
116  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
117  { (exit 1); exit 1; }
118fi
119
120# Work around bugs in pre-3.0 UWIN ksh.
121for as_var in ENV MAIL MAILPATH
122do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# Required to use basename.
135if expr a : '\(a\)' >/dev/null 2>&1 &&
136   test "X`expr 00001 : '.*\(...\)'`" = X001; then
137  as_expr=expr
138else
139  as_expr=false
140fi
141
142if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
143  as_basename=basename
144else
145  as_basename=false
146fi
147
148
149# Name of the executable.
150as_me=`$as_basename -- "$0" ||
151$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
152	 X"$0" : 'X\(//\)$' \| \
153	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
154$as_echo X/"$0" |
155    sed '/^.*\/\([^/][^/]*\)\/*$/{
156	    s//\1/
157	    q
158	  }
159	  /^X\/\(\/\/\)$/{
160	    s//\1/
161	    q
162	  }
163	  /^X\/\(\/\).*/{
164	    s//\1/
165	    q
166	  }
167	  s/.*/./; q'`
168
169# CDPATH.
170$as_unset CDPATH
171
172
173if test "x$CONFIG_SHELL" = x; then
174  if (eval ":") 2>/dev/null; then
175  as_have_required=yes
176else
177  as_have_required=no
178fi
179
180  if test $as_have_required = yes &&	 (eval ":
181(as_func_return () {
182  (exit \$1)
183}
184as_func_success () {
185  as_func_return 0
186}
187as_func_failure () {
188  as_func_return 1
189}
190as_func_ret_success () {
191  return 0
192}
193as_func_ret_failure () {
194  return 1
195}
196
197exitcode=0
198if as_func_success; then
199  :
200else
201  exitcode=1
202  echo as_func_success failed.
203fi
204
205if as_func_failure; then
206  exitcode=1
207  echo as_func_failure succeeded.
208fi
209
210if as_func_ret_success; then
211  :
212else
213  exitcode=1
214  echo as_func_ret_success failed.
215fi
216
217if as_func_ret_failure; then
218  exitcode=1
219  echo as_func_ret_failure succeeded.
220fi
221
222if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
223  :
224else
225  exitcode=1
226  echo positional parameters were not saved.
227fi
228
229test \$exitcode = 0) || { (exit 1); exit 1; }
230
231(
232  as_lineno_1=\$LINENO
233  as_lineno_2=\$LINENO
234  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
235  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
236") 2> /dev/null; then
237  :
238else
239  as_candidate_shells=
240    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
241for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
242do
243  IFS=$as_save_IFS
244  test -z "$as_dir" && as_dir=.
245  case $as_dir in
246	 /*)
247	   for as_base in sh bash ksh sh5; do
248	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
249	   done;;
250       esac
251done
252IFS=$as_save_IFS
253
254
255      for as_shell in $as_candidate_shells $SHELL; do
256	 # Try only shells that exist, to save several forks.
257	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
258		{ ("$as_shell") 2> /dev/null <<\_ASEOF
259if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
260  emulate sh
261  NULLCMD=:
262  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
263  # is contrary to our usage.  Disable this feature.
264  alias -g '${1+"$@"}'='"$@"'
265  setopt NO_GLOB_SUBST
266else
267  case `(set -o) 2>/dev/null` in
268  *posix*) set -o posix ;;
269esac
270
271fi
272
273
274:
275_ASEOF
276}; then
277  CONFIG_SHELL=$as_shell
278	       as_have_required=yes
279	       if { "$as_shell" 2> /dev/null <<\_ASEOF
280if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
281  emulate sh
282  NULLCMD=:
283  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
284  # is contrary to our usage.  Disable this feature.
285  alias -g '${1+"$@"}'='"$@"'
286  setopt NO_GLOB_SUBST
287else
288  case `(set -o) 2>/dev/null` in
289  *posix*) set -o posix ;;
290esac
291
292fi
293
294
295:
296(as_func_return () {
297  (exit $1)
298}
299as_func_success () {
300  as_func_return 0
301}
302as_func_failure () {
303  as_func_return 1
304}
305as_func_ret_success () {
306  return 0
307}
308as_func_ret_failure () {
309  return 1
310}
311
312exitcode=0
313if as_func_success; then
314  :
315else
316  exitcode=1
317  echo as_func_success failed.
318fi
319
320if as_func_failure; then
321  exitcode=1
322  echo as_func_failure succeeded.
323fi
324
325if as_func_ret_success; then
326  :
327else
328  exitcode=1
329  echo as_func_ret_success failed.
330fi
331
332if as_func_ret_failure; then
333  exitcode=1
334  echo as_func_ret_failure succeeded.
335fi
336
337if ( set x; as_func_ret_success y && test x = "$1" ); then
338  :
339else
340  exitcode=1
341  echo positional parameters were not saved.
342fi
343
344test $exitcode = 0) || { (exit 1); exit 1; }
345
346(
347  as_lineno_1=$LINENO
348  as_lineno_2=$LINENO
349  test "x$as_lineno_1" != "x$as_lineno_2" &&
350  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
351
352_ASEOF
353}; then
354  break
355fi
356
357fi
358
359      done
360
361      if test "x$CONFIG_SHELL" != x; then
362  for as_var in BASH_ENV ENV
363	do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
364	done
365	export CONFIG_SHELL
366	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
367fi
368
369
370    if test $as_have_required = no; then
371  echo This script requires a shell more modern than all the
372      echo shells that I found on your system.  Please install a
373      echo modern shell, or manually run the script under such a
374      echo shell if you do have one.
375      { (exit 1); exit 1; }
376fi
377
378
379fi
380
381fi
382
383
384
385(eval "as_func_return () {
386  (exit \$1)
387}
388as_func_success () {
389  as_func_return 0
390}
391as_func_failure () {
392  as_func_return 1
393}
394as_func_ret_success () {
395  return 0
396}
397as_func_ret_failure () {
398  return 1
399}
400
401exitcode=0
402if as_func_success; then
403  :
404else
405  exitcode=1
406  echo as_func_success failed.
407fi
408
409if as_func_failure; then
410  exitcode=1
411  echo as_func_failure succeeded.
412fi
413
414if as_func_ret_success; then
415  :
416else
417  exitcode=1
418  echo as_func_ret_success failed.
419fi
420
421if as_func_ret_failure; then
422  exitcode=1
423  echo as_func_ret_failure succeeded.
424fi
425
426if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
427  :
428else
429  exitcode=1
430  echo positional parameters were not saved.
431fi
432
433test \$exitcode = 0") || {
434  echo No shell found that supports shell functions.
435  echo Please tell bug-autoconf@gnu.org about your system,
436  echo including any error possibly output before this message.
437  echo This can help us improve future autoconf versions.
438  echo Configuration will now proceed without shell functions.
439}
440
441
442
443  as_lineno_1=$LINENO
444  as_lineno_2=$LINENO
445  test "x$as_lineno_1" != "x$as_lineno_2" &&
446  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
447
448  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
449  # uniformly replaced by the line number.  The first 'sed' inserts a
450  # line-number line after each line using $LINENO; the second 'sed'
451  # does the real work.  The second script uses 'N' to pair each
452  # line-number line with the line containing $LINENO, and appends
453  # trailing '-' during substitution so that $LINENO is not a special
454  # case at line end.
455  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
456  # scripts with optimization help from Paolo Bonzini.  Blame Lee
457  # E. McMahon (1931-1989) for sed's syntax.  :-)
458  sed -n '
459    p
460    /[$]LINENO/=
461  ' <$as_myself |
462    sed '
463      s/[$]LINENO.*/&-/
464      t lineno
465      b
466      :lineno
467      N
468      :loop
469      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
470      t loop
471      s/-\n.*//
472    ' >$as_me.lineno &&
473  chmod +x "$as_me.lineno" ||
474    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
475   { (exit 1); exit 1; }; }
476
477  # Don't try to exec as it changes $[0], causing all sort of problems
478  # (the dirname of $[0] is not the place where we might find the
479  # original and so on.  Autoconf is especially sensitive to this).
480  . "./$as_me.lineno"
481  # Exit status is that of the last command.
482  exit
483}
484
485
486if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
487  as_dirname=dirname
488else
489  as_dirname=false
490fi
491
492ECHO_C= ECHO_N= ECHO_T=
493case `echo -n x` in
494-n*)
495  case `echo 'x\c'` in
496  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
497  *)   ECHO_C='\c';;
498  esac;;
499*)
500  ECHO_N='-n';;
501esac
502if expr a : '\(a\)' >/dev/null 2>&1 &&
503   test "X`expr 00001 : '.*\(...\)'`" = X001; then
504  as_expr=expr
505else
506  as_expr=false
507fi
508
509rm -f conf$$ conf$$.exe conf$$.file
510if test -d conf$$.dir; then
511  rm -f conf$$.dir/conf$$.file
512else
513  rm -f conf$$.dir
514  mkdir conf$$.dir 2>/dev/null
515fi
516if (echo >conf$$.file) 2>/dev/null; then
517  if ln -s conf$$.file conf$$ 2>/dev/null; then
518    as_ln_s='ln -s'
519    # ... but there are two gotchas:
520    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
521    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
522    # In both cases, we have to default to `cp -p'.
523    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
524      as_ln_s='cp -p'
525  elif ln conf$$.file conf$$ 2>/dev/null; then
526    as_ln_s=ln
527  else
528    as_ln_s='cp -p'
529  fi
530else
531  as_ln_s='cp -p'
532fi
533rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
534rmdir conf$$.dir 2>/dev/null
535
536if mkdir -p . 2>/dev/null; then
537  as_mkdir_p=:
538else
539  test -d ./-p && rmdir ./-p
540  as_mkdir_p=false
541fi
542
543if test -x / >/dev/null 2>&1; then
544  as_test_x='test -x'
545else
546  if ls -dL / >/dev/null 2>&1; then
547    as_ls_L_option=L
548  else
549    as_ls_L_option=
550  fi
551  as_test_x='
552    eval sh -c '\''
553      if test -d "$1"; then
554	test -d "$1/.";
555      else
556	case $1 in
557	-*)set "./$1";;
558	esac;
559	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
560	???[sx]*):;;*)false;;esac;fi
561    '\'' sh
562  '
563fi
564as_executable_p=$as_test_x
565
566# Sed expression to map a string onto a valid CPP name.
567as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
568
569# Sed expression to map a string onto a valid variable name.
570as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
571
572
573
574exec 7<&0 </dev/null 6>&1
575
576# Name of the host.
577# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
578# so uname gets run too.
579ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
580
581#
582# Initializations.
583#
584ac_default_prefix=/usr/local
585ac_clean_files=
586ac_config_libobj_dir=.
587LIBOBJS=
588cross_compiling=no
589subdirs=
590MFLAGS=
591MAKEFLAGS=
592SHELL=${CONFIG_SHELL-/bin/sh}
593
594# Identity of this package.
595PACKAGE_NAME='tkgeomap'
596PACKAGE_TARNAME='tkgeomap'
597PACKAGE_VERSION='2.11.6'
598PACKAGE_STRING='tkgeomap 2.11.6'
599PACKAGE_BUGREPORT=''
600
601# Factoring default headers for most tests.
602ac_includes_default="\
603#include <stdio.h>
604#ifdef HAVE_SYS_TYPES_H
605# include <sys/types.h>
606#endif
607#ifdef HAVE_SYS_STAT_H
608# include <sys/stat.h>
609#endif
610#ifdef STDC_HEADERS
611# include <stdlib.h>
612# include <stddef.h>
613#else
614# ifdef HAVE_STDLIB_H
615#  include <stdlib.h>
616# endif
617#endif
618#ifdef HAVE_STRING_H
619# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
620#  include <memory.h>
621# endif
622# include <string.h>
623#endif
624#ifdef HAVE_STRINGS_H
625# include <strings.h>
626#endif
627#ifdef HAVE_INTTYPES_H
628# include <inttypes.h>
629#endif
630#ifdef HAVE_STDINT_H
631# include <stdint.h>
632#endif
633#ifdef HAVE_UNISTD_H
634# include <unistd.h>
635#endif"
636
637ac_subst_vars='LTLIBOBJS
638TCLGEOMAP_INCLUDES
639TCLGEOMAP_LIB_SPEC
640WISH_PROG
641tkgeomap_LIB_FILE
642RANLIB_STUB
643MAKE_STUB_LIB
644MAKE_STATIC_LIB
645MAKE_SHARED_LIB
646MAKE_LIB
647TK_SHLIB_LD_EXTRAS
648LDFLAGS_DEFAULT
649CFLAGS_DEFAULT
650TCL_DBGX
651LD_LIBRARY_PATH_VAR
652LDFLAGS_OPTIMIZE
653LDFLAGS_DEBUG
654SHLIB_LD_LIBS
655SHLIB_CFLAGS
656SHLIB_LD
657STLIB_LD
658CFLAGS_WARNING
659CFLAGS_OPTIMIZE
660CFLAGS_DEBUG
661DL_LIBS
662LIBOBJS
663CELIB_DIR
664TCLSH_PROG
665AR
666SHARED_BUILD
667XMKMF
668TK_INCLUDES
669TCL_INCLUDES
670CLEANFILES
671PACKAGE_CFLAGS
672PKG_OBJECTS
673PKG_SOURCES
674MATH_LIBS
675EGREP
676GREP
677RANLIB
678SET_MAKE
679INSTALL_DATA
680INSTALL_SCRIPT
681INSTALL_PROGRAM
682CPP
683OBJEXT
684ac_ct_CC
685CPPFLAGS
686LDFLAGS
687CFLAGS
688CC
689TK_XINCLUDES
690TK_LIBS
691TK_STUB_LIB_SPEC
692TK_STUB_LIB_FLAG
693TK_STUB_LIB_FILE
694TK_LIB_SPEC
695TK_LIB_FLAG
696TK_LIB_FILE
697TK_SRC_DIR
698TK_BIN_DIR
699TK_VERSION
700TCL_SHLIB_LD_LIBS
701TCL_LD_FLAGS
702TCL_EXTRA_CFLAGS
703TCL_DEFS
704TCL_LIBS
705TCL_STUB_LIB_SPEC
706TCL_STUB_LIB_FLAG
707TCL_STUB_LIB_FILE
708TCL_LIB_SPEC
709TCL_LIB_FLAG
710TCL_LIB_FILE
711TCL_SRC_DIR
712TCL_BIN_DIR
713TCL_VERSION
714LN_S
715PKG_CFLAGS
716PKG_LIBS
717PKG_INCLUDES
718PKG_HEADERS
719PKG_TCL_SOURCES
720PKG_STUB_OBJECTS
721PKG_STUB_SOURCES
722PKG_STUB_LIB_FILE
723PKG_LIB_FILE
724EXEEXT
725CYGPATH
726target_alias
727host_alias
728build_alias
729LIBS
730ECHO_T
731ECHO_N
732ECHO_C
733DEFS
734mandir
735localedir
736libdir
737psdir
738pdfdir
739dvidir
740htmldir
741infodir
742docdir
743oldincludedir
744includedir
745localstatedir
746sharedstatedir
747sysconfdir
748datadir
749datarootdir
750libexecdir
751sbindir
752bindir
753program_transform_name
754prefix
755exec_prefix
756PACKAGE_BUGREPORT
757PACKAGE_STRING
758PACKAGE_VERSION
759PACKAGE_TARNAME
760PACKAGE_NAME
761PATH_SEPARATOR
762SHELL'
763ac_subst_files=''
764ac_user_opts='
765enable_option_checking
766with_tcl
767with_tk
768with_tclinclude
769with_tkinclude
770with_x
771enable_shared
772enable_64bit
773enable_64bit_vis
774enable_wince
775with_celib
776enable_load
777enable_symbols
778with_tclgeomap_include
779'
780      ac_precious_vars='build_alias
781host_alias
782target_alias
783CC
784CFLAGS
785LDFLAGS
786LIBS
787CPPFLAGS
788CPP
789XMKMF'
790
791
792# Initialize some variables set by options.
793ac_init_help=
794ac_init_version=false
795ac_unrecognized_opts=
796ac_unrecognized_sep=
797# The variables have the same names as the options, with
798# dashes changed to underlines.
799cache_file=/dev/null
800exec_prefix=NONE
801no_create=
802no_recursion=
803prefix=NONE
804program_prefix=NONE
805program_suffix=NONE
806program_transform_name=s,x,x,
807silent=
808site=
809srcdir=
810verbose=
811x_includes=NONE
812x_libraries=NONE
813
814# Installation directory options.
815# These are left unexpanded so users can "make install exec_prefix=/foo"
816# and all the variables that are supposed to be based on exec_prefix
817# by default will actually change.
818# Use braces instead of parens because sh, perl, etc. also accept them.
819# (The list follows the same order as the GNU Coding Standards.)
820bindir='${exec_prefix}/bin'
821sbindir='${exec_prefix}/sbin'
822libexecdir='${exec_prefix}/libexec'
823datarootdir='${prefix}/share'
824datadir='${datarootdir}'
825sysconfdir='${prefix}/etc'
826sharedstatedir='${prefix}/com'
827localstatedir='${prefix}/var'
828includedir='${prefix}/include'
829oldincludedir='/usr/include'
830docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
831infodir='${datarootdir}/info'
832htmldir='${docdir}'
833dvidir='${docdir}'
834pdfdir='${docdir}'
835psdir='${docdir}'
836libdir='${exec_prefix}/lib'
837localedir='${datarootdir}/locale'
838mandir='${datarootdir}/man'
839
840ac_prev=
841ac_dashdash=
842for ac_option
843do
844  # If the previous option needs an argument, assign it.
845  if test -n "$ac_prev"; then
846    eval $ac_prev=\$ac_option
847    ac_prev=
848    continue
849  fi
850
851  case $ac_option in
852  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
853  *)	ac_optarg=yes ;;
854  esac
855
856  # Accept the important Cygnus configure options, so we can diagnose typos.
857
858  case $ac_dashdash$ac_option in
859  --)
860    ac_dashdash=yes ;;
861
862  -bindir | --bindir | --bindi | --bind | --bin | --bi)
863    ac_prev=bindir ;;
864  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
865    bindir=$ac_optarg ;;
866
867  -build | --build | --buil | --bui | --bu)
868    ac_prev=build_alias ;;
869  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
870    build_alias=$ac_optarg ;;
871
872  -cache-file | --cache-file | --cache-fil | --cache-fi \
873  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
874    ac_prev=cache_file ;;
875  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
876  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
877    cache_file=$ac_optarg ;;
878
879  --config-cache | -C)
880    cache_file=config.cache ;;
881
882  -datadir | --datadir | --datadi | --datad)
883    ac_prev=datadir ;;
884  -datadir=* | --datadir=* | --datadi=* | --datad=*)
885    datadir=$ac_optarg ;;
886
887  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
888  | --dataroo | --dataro | --datar)
889    ac_prev=datarootdir ;;
890  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
891  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
892    datarootdir=$ac_optarg ;;
893
894  -disable-* | --disable-*)
895    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
896    # Reject names that are not valid shell variable names.
897    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
898      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
899   { (exit 1); exit 1; }; }
900    ac_useropt_orig=$ac_useropt
901    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
902    case $ac_user_opts in
903      *"
904"enable_$ac_useropt"
905"*) ;;
906      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
907	 ac_unrecognized_sep=', ';;
908    esac
909    eval enable_$ac_useropt=no ;;
910
911  -docdir | --docdir | --docdi | --doc | --do)
912    ac_prev=docdir ;;
913  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
914    docdir=$ac_optarg ;;
915
916  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
917    ac_prev=dvidir ;;
918  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
919    dvidir=$ac_optarg ;;
920
921  -enable-* | --enable-*)
922    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
923    # Reject names that are not valid shell variable names.
924    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
925      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
926   { (exit 1); exit 1; }; }
927    ac_useropt_orig=$ac_useropt
928    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
929    case $ac_user_opts in
930      *"
931"enable_$ac_useropt"
932"*) ;;
933      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
934	 ac_unrecognized_sep=', ';;
935    esac
936    eval enable_$ac_useropt=\$ac_optarg ;;
937
938  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
939  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
940  | --exec | --exe | --ex)
941    ac_prev=exec_prefix ;;
942  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
943  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
944  | --exec=* | --exe=* | --ex=*)
945    exec_prefix=$ac_optarg ;;
946
947  -gas | --gas | --ga | --g)
948    # Obsolete; use --with-gas.
949    with_gas=yes ;;
950
951  -help | --help | --hel | --he | -h)
952    ac_init_help=long ;;
953  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
954    ac_init_help=recursive ;;
955  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
956    ac_init_help=short ;;
957
958  -host | --host | --hos | --ho)
959    ac_prev=host_alias ;;
960  -host=* | --host=* | --hos=* | --ho=*)
961    host_alias=$ac_optarg ;;
962
963  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
964    ac_prev=htmldir ;;
965  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
966  | --ht=*)
967    htmldir=$ac_optarg ;;
968
969  -includedir | --includedir | --includedi | --included | --include \
970  | --includ | --inclu | --incl | --inc)
971    ac_prev=includedir ;;
972  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
973  | --includ=* | --inclu=* | --incl=* | --inc=*)
974    includedir=$ac_optarg ;;
975
976  -infodir | --infodir | --infodi | --infod | --info | --inf)
977    ac_prev=infodir ;;
978  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
979    infodir=$ac_optarg ;;
980
981  -libdir | --libdir | --libdi | --libd)
982    ac_prev=libdir ;;
983  -libdir=* | --libdir=* | --libdi=* | --libd=*)
984    libdir=$ac_optarg ;;
985
986  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
987  | --libexe | --libex | --libe)
988    ac_prev=libexecdir ;;
989  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
990  | --libexe=* | --libex=* | --libe=*)
991    libexecdir=$ac_optarg ;;
992
993  -localedir | --localedir | --localedi | --localed | --locale)
994    ac_prev=localedir ;;
995  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
996    localedir=$ac_optarg ;;
997
998  -localstatedir | --localstatedir | --localstatedi | --localstated \
999  | --localstate | --localstat | --localsta | --localst | --locals)
1000    ac_prev=localstatedir ;;
1001  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1002  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1003    localstatedir=$ac_optarg ;;
1004
1005  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1006    ac_prev=mandir ;;
1007  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1008    mandir=$ac_optarg ;;
1009
1010  -nfp | --nfp | --nf)
1011    # Obsolete; use --without-fp.
1012    with_fp=no ;;
1013
1014  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1015  | --no-cr | --no-c | -n)
1016    no_create=yes ;;
1017
1018  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1019  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1020    no_recursion=yes ;;
1021
1022  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1023  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1024  | --oldin | --oldi | --old | --ol | --o)
1025    ac_prev=oldincludedir ;;
1026  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1027  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1028  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1029    oldincludedir=$ac_optarg ;;
1030
1031  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1032    ac_prev=prefix ;;
1033  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1034    prefix=$ac_optarg ;;
1035
1036  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1037  | --program-pre | --program-pr | --program-p)
1038    ac_prev=program_prefix ;;
1039  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1040  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1041    program_prefix=$ac_optarg ;;
1042
1043  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1044  | --program-suf | --program-su | --program-s)
1045    ac_prev=program_suffix ;;
1046  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1047  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1048    program_suffix=$ac_optarg ;;
1049
1050  -program-transform-name | --program-transform-name \
1051  | --program-transform-nam | --program-transform-na \
1052  | --program-transform-n | --program-transform- \
1053  | --program-transform | --program-transfor \
1054  | --program-transfo | --program-transf \
1055  | --program-trans | --program-tran \
1056  | --progr-tra | --program-tr | --program-t)
1057    ac_prev=program_transform_name ;;
1058  -program-transform-name=* | --program-transform-name=* \
1059  | --program-transform-nam=* | --program-transform-na=* \
1060  | --program-transform-n=* | --program-transform-=* \
1061  | --program-transform=* | --program-transfor=* \
1062  | --program-transfo=* | --program-transf=* \
1063  | --program-trans=* | --program-tran=* \
1064  | --progr-tra=* | --program-tr=* | --program-t=*)
1065    program_transform_name=$ac_optarg ;;
1066
1067  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1068    ac_prev=pdfdir ;;
1069  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1070    pdfdir=$ac_optarg ;;
1071
1072  -psdir | --psdir | --psdi | --psd | --ps)
1073    ac_prev=psdir ;;
1074  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1075    psdir=$ac_optarg ;;
1076
1077  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1078  | -silent | --silent | --silen | --sile | --sil)
1079    silent=yes ;;
1080
1081  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1082    ac_prev=sbindir ;;
1083  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1084  | --sbi=* | --sb=*)
1085    sbindir=$ac_optarg ;;
1086
1087  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1088  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1089  | --sharedst | --shareds | --shared | --share | --shar \
1090  | --sha | --sh)
1091    ac_prev=sharedstatedir ;;
1092  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1093  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1094  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1095  | --sha=* | --sh=*)
1096    sharedstatedir=$ac_optarg ;;
1097
1098  -site | --site | --sit)
1099    ac_prev=site ;;
1100  -site=* | --site=* | --sit=*)
1101    site=$ac_optarg ;;
1102
1103  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1104    ac_prev=srcdir ;;
1105  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1106    srcdir=$ac_optarg ;;
1107
1108  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1109  | --syscon | --sysco | --sysc | --sys | --sy)
1110    ac_prev=sysconfdir ;;
1111  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1112  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1113    sysconfdir=$ac_optarg ;;
1114
1115  -target | --target | --targe | --targ | --tar | --ta | --t)
1116    ac_prev=target_alias ;;
1117  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1118    target_alias=$ac_optarg ;;
1119
1120  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1121    verbose=yes ;;
1122
1123  -version | --version | --versio | --versi | --vers | -V)
1124    ac_init_version=: ;;
1125
1126  -with-* | --with-*)
1127    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1128    # Reject names that are not valid shell variable names.
1129    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1130      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1131   { (exit 1); exit 1; }; }
1132    ac_useropt_orig=$ac_useropt
1133    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1134    case $ac_user_opts in
1135      *"
1136"with_$ac_useropt"
1137"*) ;;
1138      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1139	 ac_unrecognized_sep=', ';;
1140    esac
1141    eval with_$ac_useropt=\$ac_optarg ;;
1142
1143  -without-* | --without-*)
1144    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1145    # Reject names that are not valid shell variable names.
1146    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1147      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1148   { (exit 1); exit 1; }; }
1149    ac_useropt_orig=$ac_useropt
1150    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1151    case $ac_user_opts in
1152      *"
1153"with_$ac_useropt"
1154"*) ;;
1155      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1156	 ac_unrecognized_sep=', ';;
1157    esac
1158    eval with_$ac_useropt=no ;;
1159
1160  --x)
1161    # Obsolete; use --with-x.
1162    with_x=yes ;;
1163
1164  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1165  | --x-incl | --x-inc | --x-in | --x-i)
1166    ac_prev=x_includes ;;
1167  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1168  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1169    x_includes=$ac_optarg ;;
1170
1171  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1172  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1173    ac_prev=x_libraries ;;
1174  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1175  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1176    x_libraries=$ac_optarg ;;
1177
1178  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
1179Try \`$0 --help' for more information." >&2
1180   { (exit 1); exit 1; }; }
1181    ;;
1182
1183  *=*)
1184    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1185    # Reject names that are not valid shell variable names.
1186    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1187      { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1188   { (exit 1); exit 1; }; }
1189    eval $ac_envvar=\$ac_optarg
1190    export $ac_envvar ;;
1191
1192  *)
1193    # FIXME: should be removed in autoconf 3.0.
1194    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1195    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1196      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1197    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1198    ;;
1199
1200  esac
1201done
1202
1203if test -n "$ac_prev"; then
1204  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1205  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
1206   { (exit 1); exit 1; }; }
1207fi
1208
1209if test -n "$ac_unrecognized_opts"; then
1210  case $enable_option_checking in
1211    no) ;;
1212    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1213   { (exit 1); exit 1; }; } ;;
1214    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1215  esac
1216fi
1217
1218# Check all directory arguments for consistency.
1219for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1220		datadir sysconfdir sharedstatedir localstatedir includedir \
1221		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1222		libdir localedir mandir
1223do
1224  eval ac_val=\$$ac_var
1225  # Remove trailing slashes.
1226  case $ac_val in
1227    */ )
1228      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1229      eval $ac_var=\$ac_val;;
1230  esac
1231  # Be sure to have absolute directory names.
1232  case $ac_val in
1233    [\\/$]* | ?:[\\/]* )  continue;;
1234    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1235  esac
1236  { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1237   { (exit 1); exit 1; }; }
1238done
1239
1240# There might be people who depend on the old broken behavior: `$host'
1241# used to hold the argument of --host etc.
1242# FIXME: To remove some day.
1243build=$build_alias
1244host=$host_alias
1245target=$target_alias
1246
1247# FIXME: To remove some day.
1248if test "x$host_alias" != x; then
1249  if test "x$build_alias" = x; then
1250    cross_compiling=maybe
1251    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1252    If a cross compiler is detected then cross compile mode will be used." >&2
1253  elif test "x$build_alias" != "x$host_alias"; then
1254    cross_compiling=yes
1255  fi
1256fi
1257
1258ac_tool_prefix=
1259test -n "$host_alias" && ac_tool_prefix=$host_alias-
1260
1261test "$silent" = yes && exec 6>/dev/null
1262
1263
1264ac_pwd=`pwd` && test -n "$ac_pwd" &&
1265ac_ls_di=`ls -di .` &&
1266ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1267  { $as_echo "$as_me: error: working directory cannot be determined" >&2
1268   { (exit 1); exit 1; }; }
1269test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1270  { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
1271   { (exit 1); exit 1; }; }
1272
1273
1274# Find the source files, if location was not specified.
1275if test -z "$srcdir"; then
1276  ac_srcdir_defaulted=yes
1277  # Try the directory containing this script, then the parent directory.
1278  ac_confdir=`$as_dirname -- "$as_myself" ||
1279$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1280	 X"$as_myself" : 'X\(//\)[^/]' \| \
1281	 X"$as_myself" : 'X\(//\)$' \| \
1282	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1283$as_echo X"$as_myself" |
1284    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1285	    s//\1/
1286	    q
1287	  }
1288	  /^X\(\/\/\)[^/].*/{
1289	    s//\1/
1290	    q
1291	  }
1292	  /^X\(\/\/\)$/{
1293	    s//\1/
1294	    q
1295	  }
1296	  /^X\(\/\).*/{
1297	    s//\1/
1298	    q
1299	  }
1300	  s/.*/./; q'`
1301  srcdir=$ac_confdir
1302  if test ! -r "$srcdir/$ac_unique_file"; then
1303    srcdir=..
1304  fi
1305else
1306  ac_srcdir_defaulted=no
1307fi
1308if test ! -r "$srcdir/$ac_unique_file"; then
1309  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1310  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1311   { (exit 1); exit 1; }; }
1312fi
1313ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1314ac_abs_confdir=`(
1315	cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
1316   { (exit 1); exit 1; }; }
1317	pwd)`
1318# When building in place, set srcdir=.
1319if test "$ac_abs_confdir" = "$ac_pwd"; then
1320  srcdir=.
1321fi
1322# Remove unnecessary trailing slashes from srcdir.
1323# Double slashes in file names in object file debugging info
1324# mess up M-x gdb in Emacs.
1325case $srcdir in
1326*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1327esac
1328for ac_var in $ac_precious_vars; do
1329  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1330  eval ac_env_${ac_var}_value=\$${ac_var}
1331  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1332  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1333done
1334
1335#
1336# Report the --help message.
1337#
1338if test "$ac_init_help" = "long"; then
1339  # Omit some internal or obsolete options to make the list less imposing.
1340  # This message is too long to be a string in the A/UX 3.1 sh.
1341  cat <<_ACEOF
1342\`configure' configures tkgeomap 2.11.6 to adapt to many kinds of systems.
1343
1344Usage: $0 [OPTION]... [VAR=VALUE]...
1345
1346To assign environment variables (e.g., CC, CFLAGS...), specify them as
1347VAR=VALUE.  See below for descriptions of some of the useful variables.
1348
1349Defaults for the options are specified in brackets.
1350
1351Configuration:
1352  -h, --help              display this help and exit
1353      --help=short        display options specific to this package
1354      --help=recursive    display the short help of all the included packages
1355  -V, --version           display version information and exit
1356  -q, --quiet, --silent   do not print \`checking...' messages
1357      --cache-file=FILE   cache test results in FILE [disabled]
1358  -C, --config-cache      alias for \`--cache-file=config.cache'
1359  -n, --no-create         do not create output files
1360      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1361
1362Installation directories:
1363  --prefix=PREFIX         install architecture-independent files in PREFIX
1364                          [$ac_default_prefix]
1365  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1366                          [PREFIX]
1367
1368By default, \`make install' will install all the files in
1369\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1370an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1371for instance \`--prefix=\$HOME'.
1372
1373For better control, use the options below.
1374
1375Fine tuning of the installation directories:
1376  --bindir=DIR            user executables [EPREFIX/bin]
1377  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1378  --libexecdir=DIR        program executables [EPREFIX/libexec]
1379  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1380  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1381  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1382  --libdir=DIR            object code libraries [EPREFIX/lib]
1383  --includedir=DIR        C header files [PREFIX/include]
1384  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1385  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1386  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1387  --infodir=DIR           info documentation [DATAROOTDIR/info]
1388  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1389  --mandir=DIR            man documentation [DATAROOTDIR/man]
1390  --docdir=DIR            documentation root [DATAROOTDIR/doc/tkgeomap]
1391  --htmldir=DIR           html documentation [DOCDIR]
1392  --dvidir=DIR            dvi documentation [DOCDIR]
1393  --pdfdir=DIR            pdf documentation [DOCDIR]
1394  --psdir=DIR             ps documentation [DOCDIR]
1395_ACEOF
1396
1397  cat <<\_ACEOF
1398
1399X features:
1400  --x-includes=DIR    X include files are in DIR
1401  --x-libraries=DIR   X library files are in DIR
1402_ACEOF
1403fi
1404
1405if test -n "$ac_init_help"; then
1406  case $ac_init_help in
1407     short | recursive ) echo "Configuration of tkgeomap 2.11.6:";;
1408   esac
1409  cat <<\_ACEOF
1410
1411Optional Features:
1412  --disable-option-checking  ignore unrecognized --enable/--with options
1413  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1414  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1415  --enable-shared         build and link with shared libraries --enable-shared
1416  --enable-64bit          enable 64bit support (where applicable)
1417  --enable-64bit-vis      enable 64bit Sparc VIS support
1418  --enable-wince          enable Win/CE support (where applicable)
1419  --disable-load          disallow dynamic loading and "load" command
1420  --enable-symbols        build with debugging symbols --disable-symbols
1421
1422Optional Packages:
1423  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1424  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1425  --with-tcl              directory containing tcl configuration (tclConfig.sh)
1426  --with-tk               directory containing tk configuration (tkConfig.sh)
1427  --with-tclinclude       directory containing the public Tcl header files
1428  --with-tkinclude      directory containing the public Tk header files.
1429  --with-x                use the X Window System
1430  --with-celib=DIR        use Windows/CE support library from DIR
1431 --with-tclgeomap-include      directory containing the public tclgeomap header files.
1432
1433Some influential environment variables:
1434  CC          C compiler command
1435  CFLAGS      C compiler flags
1436  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1437              nonstandard directory <lib dir>
1438  LIBS        libraries to pass to the linker, e.g. -l<library>
1439  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1440              you have headers in a nonstandard directory <include dir>
1441  CPP         C preprocessor
1442  XMKMF       Path to xmkmf, Makefile generator for X Window System
1443
1444Use these variables to override the choices made by `configure' or to help
1445it to find libraries and programs with nonstandard names/locations.
1446
1447_ACEOF
1448ac_status=$?
1449fi
1450
1451if test "$ac_init_help" = "recursive"; then
1452  # If there are subdirs, report their specific --help.
1453  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1454    test -d "$ac_dir" ||
1455      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1456      continue
1457    ac_builddir=.
1458
1459case "$ac_dir" in
1460.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1461*)
1462  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1463  # A ".." for each directory in $ac_dir_suffix.
1464  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1465  case $ac_top_builddir_sub in
1466  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1467  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1468  esac ;;
1469esac
1470ac_abs_top_builddir=$ac_pwd
1471ac_abs_builddir=$ac_pwd$ac_dir_suffix
1472# for backward compatibility:
1473ac_top_builddir=$ac_top_build_prefix
1474
1475case $srcdir in
1476  .)  # We are building in place.
1477    ac_srcdir=.
1478    ac_top_srcdir=$ac_top_builddir_sub
1479    ac_abs_top_srcdir=$ac_pwd ;;
1480  [\\/]* | ?:[\\/]* )  # Absolute name.
1481    ac_srcdir=$srcdir$ac_dir_suffix;
1482    ac_top_srcdir=$srcdir
1483    ac_abs_top_srcdir=$srcdir ;;
1484  *) # Relative name.
1485    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1486    ac_top_srcdir=$ac_top_build_prefix$srcdir
1487    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1488esac
1489ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1490
1491    cd "$ac_dir" || { ac_status=$?; continue; }
1492    # Check for guested configure.
1493    if test -f "$ac_srcdir/configure.gnu"; then
1494      echo &&
1495      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1496    elif test -f "$ac_srcdir/configure"; then
1497      echo &&
1498      $SHELL "$ac_srcdir/configure" --help=recursive
1499    else
1500      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1501    fi || ac_status=$?
1502    cd "$ac_pwd" || { ac_status=$?; break; }
1503  done
1504fi
1505
1506test -n "$ac_init_help" && exit $ac_status
1507if $ac_init_version; then
1508  cat <<\_ACEOF
1509tkgeomap configure 2.11.6
1510generated by GNU Autoconf 2.63
1511
1512Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
15132002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1514This configure script is free software; the Free Software Foundation
1515gives unlimited permission to copy, distribute and modify it.
1516_ACEOF
1517  exit
1518fi
1519cat >config.log <<_ACEOF
1520This file contains any messages produced by compilers while
1521running configure, to aid debugging if configure makes a mistake.
1522
1523It was created by tkgeomap $as_me 2.11.6, which was
1524generated by GNU Autoconf 2.63.  Invocation command line was
1525
1526  $ $0 $@
1527
1528_ACEOF
1529exec 5>>config.log
1530{
1531cat <<_ASUNAME
1532## --------- ##
1533## Platform. ##
1534## --------- ##
1535
1536hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1537uname -m = `(uname -m) 2>/dev/null || echo unknown`
1538uname -r = `(uname -r) 2>/dev/null || echo unknown`
1539uname -s = `(uname -s) 2>/dev/null || echo unknown`
1540uname -v = `(uname -v) 2>/dev/null || echo unknown`
1541
1542/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1543/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1544
1545/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1546/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1547/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1548/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1549/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1550/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1551/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1552
1553_ASUNAME
1554
1555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1556for as_dir in $PATH
1557do
1558  IFS=$as_save_IFS
1559  test -z "$as_dir" && as_dir=.
1560  $as_echo "PATH: $as_dir"
1561done
1562IFS=$as_save_IFS
1563
1564} >&5
1565
1566cat >&5 <<_ACEOF
1567
1568
1569## ----------- ##
1570## Core tests. ##
1571## ----------- ##
1572
1573_ACEOF
1574
1575
1576# Keep a trace of the command line.
1577# Strip out --no-create and --no-recursion so they do not pile up.
1578# Strip out --silent because we don't want to record it for future runs.
1579# Also quote any args containing shell meta-characters.
1580# Make two passes to allow for proper duplicate-argument suppression.
1581ac_configure_args=
1582ac_configure_args0=
1583ac_configure_args1=
1584ac_must_keep_next=false
1585for ac_pass in 1 2
1586do
1587  for ac_arg
1588  do
1589    case $ac_arg in
1590    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1591    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1592    | -silent | --silent | --silen | --sile | --sil)
1593      continue ;;
1594    *\'*)
1595      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1596    esac
1597    case $ac_pass in
1598    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1599    2)
1600      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1601      if test $ac_must_keep_next = true; then
1602	ac_must_keep_next=false # Got value, back to normal.
1603      else
1604	case $ac_arg in
1605	  *=* | --config-cache | -C | -disable-* | --disable-* \
1606	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1607	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1608	  | -with-* | --with-* | -without-* | --without-* | --x)
1609	    case "$ac_configure_args0 " in
1610	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1611	    esac
1612	    ;;
1613	  -* ) ac_must_keep_next=true ;;
1614	esac
1615      fi
1616      ac_configure_args="$ac_configure_args '$ac_arg'"
1617      ;;
1618    esac
1619  done
1620done
1621$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1622$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1623
1624# When interrupted or exit'd, cleanup temporary files, and complete
1625# config.log.  We remove comments because anyway the quotes in there
1626# would cause problems or look ugly.
1627# WARNING: Use '\'' to represent an apostrophe within the trap.
1628# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1629trap 'exit_status=$?
1630  # Save into config.log some information that might help in debugging.
1631  {
1632    echo
1633
1634    cat <<\_ASBOX
1635## ---------------- ##
1636## Cache variables. ##
1637## ---------------- ##
1638_ASBOX
1639    echo
1640    # The following way of writing the cache mishandles newlines in values,
1641(
1642  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1643    eval ac_val=\$$ac_var
1644    case $ac_val in #(
1645    *${as_nl}*)
1646      case $ac_var in #(
1647      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1648$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1649      esac
1650      case $ac_var in #(
1651      _ | IFS | as_nl) ;; #(
1652      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1653      *) $as_unset $ac_var ;;
1654      esac ;;
1655    esac
1656  done
1657  (set) 2>&1 |
1658    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1659    *${as_nl}ac_space=\ *)
1660      sed -n \
1661	"s/'\''/'\''\\\\'\'''\''/g;
1662	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1663      ;; #(
1664    *)
1665      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1666      ;;
1667    esac |
1668    sort
1669)
1670    echo
1671
1672    cat <<\_ASBOX
1673## ----------------- ##
1674## Output variables. ##
1675## ----------------- ##
1676_ASBOX
1677    echo
1678    for ac_var in $ac_subst_vars
1679    do
1680      eval ac_val=\$$ac_var
1681      case $ac_val in
1682      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1683      esac
1684      $as_echo "$ac_var='\''$ac_val'\''"
1685    done | sort
1686    echo
1687
1688    if test -n "$ac_subst_files"; then
1689      cat <<\_ASBOX
1690## ------------------- ##
1691## File substitutions. ##
1692## ------------------- ##
1693_ASBOX
1694      echo
1695      for ac_var in $ac_subst_files
1696      do
1697	eval ac_val=\$$ac_var
1698	case $ac_val in
1699	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1700	esac
1701	$as_echo "$ac_var='\''$ac_val'\''"
1702      done | sort
1703      echo
1704    fi
1705
1706    if test -s confdefs.h; then
1707      cat <<\_ASBOX
1708## ----------- ##
1709## confdefs.h. ##
1710## ----------- ##
1711_ASBOX
1712      echo
1713      cat confdefs.h
1714      echo
1715    fi
1716    test "$ac_signal" != 0 &&
1717      $as_echo "$as_me: caught signal $ac_signal"
1718    $as_echo "$as_me: exit $exit_status"
1719  } >&5
1720  rm -f core *.core core.conftest.* &&
1721    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1722    exit $exit_status
1723' 0
1724for ac_signal in 1 2 13 15; do
1725  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1726done
1727ac_signal=0
1728
1729# confdefs.h avoids OS command line length limits that DEFS can exceed.
1730rm -f -r conftest* confdefs.h
1731
1732# Predefined preprocessor variables.
1733
1734cat >>confdefs.h <<_ACEOF
1735#define PACKAGE_NAME "$PACKAGE_NAME"
1736_ACEOF
1737
1738
1739cat >>confdefs.h <<_ACEOF
1740#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1741_ACEOF
1742
1743
1744cat >>confdefs.h <<_ACEOF
1745#define PACKAGE_VERSION "$PACKAGE_VERSION"
1746_ACEOF
1747
1748
1749cat >>confdefs.h <<_ACEOF
1750#define PACKAGE_STRING "$PACKAGE_STRING"
1751_ACEOF
1752
1753
1754cat >>confdefs.h <<_ACEOF
1755#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1756_ACEOF
1757
1758
1759# Let the site file select an alternate cache file if it wants to.
1760# Prefer an explicitly selected file to automatically selected ones.
1761ac_site_file1=NONE
1762ac_site_file2=NONE
1763if test -n "$CONFIG_SITE"; then
1764  ac_site_file1=$CONFIG_SITE
1765elif test "x$prefix" != xNONE; then
1766  ac_site_file1=$prefix/share/config.site
1767  ac_site_file2=$prefix/etc/config.site
1768else
1769  ac_site_file1=$ac_default_prefix/share/config.site
1770  ac_site_file2=$ac_default_prefix/etc/config.site
1771fi
1772for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1773do
1774  test "x$ac_site_file" = xNONE && continue
1775  if test -r "$ac_site_file"; then
1776    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1777$as_echo "$as_me: loading site script $ac_site_file" >&6;}
1778    sed 's/^/| /' "$ac_site_file" >&5
1779    . "$ac_site_file"
1780  fi
1781done
1782
1783if test -r "$cache_file"; then
1784  # Some versions of bash will fail to source /dev/null (special
1785  # files actually), so we avoid doing that.
1786  if test -f "$cache_file"; then
1787    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1788$as_echo "$as_me: loading cache $cache_file" >&6;}
1789    case $cache_file in
1790      [\\/]* | ?:[\\/]* ) . "$cache_file";;
1791      *)                      . "./$cache_file";;
1792    esac
1793  fi
1794else
1795  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1796$as_echo "$as_me: creating cache $cache_file" >&6;}
1797  >$cache_file
1798fi
1799
1800# Check that the precious variables saved in the cache have kept the same
1801# value.
1802ac_cache_corrupted=false
1803for ac_var in $ac_precious_vars; do
1804  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1805  eval ac_new_set=\$ac_env_${ac_var}_set
1806  eval ac_old_val=\$ac_cv_env_${ac_var}_value
1807  eval ac_new_val=\$ac_env_${ac_var}_value
1808  case $ac_old_set,$ac_new_set in
1809    set,)
1810      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1811$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1812      ac_cache_corrupted=: ;;
1813    ,set)
1814      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1815$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1816      ac_cache_corrupted=: ;;
1817    ,);;
1818    *)
1819      if test "x$ac_old_val" != "x$ac_new_val"; then
1820	# differences in whitespace do not lead to failure.
1821	ac_old_val_w=`echo x $ac_old_val`
1822	ac_new_val_w=`echo x $ac_new_val`
1823	if test "$ac_old_val_w" != "$ac_new_val_w"; then
1824	  { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1825$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1826	  ac_cache_corrupted=:
1827	else
1828	  { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1829$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1830	  eval $ac_var=\$ac_old_val
1831	fi
1832	{ $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
1833$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
1834	{ $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
1835$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
1836      fi;;
1837  esac
1838  # Pass precious variables to config.status.
1839  if test "$ac_new_set" = set; then
1840    case $ac_new_val in
1841    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1842    *) ac_arg=$ac_var=$ac_new_val ;;
1843    esac
1844    case " $ac_configure_args " in
1845      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1846      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1847    esac
1848  fi
1849done
1850if $ac_cache_corrupted; then
1851  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1852$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1853  { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1854$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1855  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1856$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1857   { (exit 1); exit 1; }; }
1858fi
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884ac_ext=c
1885ac_cpp='$CPP $CPPFLAGS'
1886ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1887ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1888ac_compiler_gnu=$ac_cv_c_compiler_gnu
1889
1890
1891
1892#--------------------------------------------------------------------
1893# Call TEA_INIT as the first TEA_ macro to set up initial vars.
1894# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
1895# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
1896#--------------------------------------------------------------------
1897
1898
1899    # TEA extensions pass this us the version of TEA they think they
1900    # are compatible with.
1901    TEA_VERSION="3.2"
1902
1903    { $as_echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
1904$as_echo_n "checking for correct TEA configuration... " >&6; }
1905    if test x"${PACKAGE_NAME}" = x ; then
1906	{ { $as_echo "$as_me:$LINENO: error:
1907The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
1908$as_echo "$as_me: error:
1909The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
1910   { (exit 1); exit 1; }; }
1911    fi
1912    if test x"3.2" = x ; then
1913	{ { $as_echo "$as_me:$LINENO: error:
1914TEA version not specified." >&5
1915$as_echo "$as_me: error:
1916TEA version not specified." >&2;}
1917   { (exit 1); exit 1; }; }
1918    elif test "3.2" != "${TEA_VERSION}" ; then
1919	{ $as_echo "$as_me:$LINENO: result: warning: requested TEA version \"3.2\", have \"${TEA_VERSION}\"" >&5
1920$as_echo "warning: requested TEA version \"3.2\", have \"${TEA_VERSION}\"" >&6; }
1921    else
1922	{ $as_echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
1923$as_echo "ok (TEA ${TEA_VERSION})" >&6; }
1924    fi
1925    case "`uname -s`" in
1926	*win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
1927	    # Extract the first word of "cygpath", so it can be a program name with args.
1928set dummy cygpath; ac_word=$2
1929{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
1930$as_echo_n "checking for $ac_word... " >&6; }
1931if test "${ac_cv_prog_CYGPATH+set}" = set; then
1932  $as_echo_n "(cached) " >&6
1933else
1934  if test -n "$CYGPATH"; then
1935  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1936else
1937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1938for as_dir in $PATH
1939do
1940  IFS=$as_save_IFS
1941  test -z "$as_dir" && as_dir=.
1942  for ac_exec_ext in '' $ac_executable_extensions; do
1943  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1944    ac_cv_prog_CYGPATH="cygpath -w"
1945    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1946    break 2
1947  fi
1948done
1949done
1950IFS=$as_save_IFS
1951
1952  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1953fi
1954fi
1955CYGPATH=$ac_cv_prog_CYGPATH
1956if test -n "$CYGPATH"; then
1957  { $as_echo "$as_me:$LINENO: result: $CYGPATH" >&5
1958$as_echo "$CYGPATH" >&6; }
1959else
1960  { $as_echo "$as_me:$LINENO: result: no" >&5
1961$as_echo "no" >&6; }
1962fi
1963
1964
1965	    EXEEXT=".exe"
1966	    TEA_PLATFORM="windows"
1967	    ;;
1968	*)
1969	    CYGPATH=echo
1970	    EXEEXT=""
1971	    TEA_PLATFORM="unix"
1972	    ;;
1973    esac
1974
1975    # Check if exec_prefix is set. If not use fall back to prefix.
1976    # Note when adjusted, so that TEA_PREFIX can correct for this.
1977    # This is needed for recursive configures, since autoconf propagates
1978    # $prefix, but not $exec_prefix (doh!).
1979    if test x$exec_prefix = xNONE ; then
1980	exec_prefix=$prefix
1981    fi
1982
1983
1984
1985
1986    # This package name must be replaced statically for AC_SUBST to work
1987
1988    # Substitute STUB_LIB_FILE in case package creates a stub library too.
1989
1990
1991    # We AC_SUBST these here to ensure they are subst'ed,
1992    # in case the user doesn't call TEA_ADD_...
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
2003$as_echo_n "checking whether ln -s works... " >&6; }
2004LN_S=$as_ln_s
2005if test "$LN_S" = "ln -s"; then
2006  { $as_echo "$as_me:$LINENO: result: yes" >&5
2007$as_echo "yes" >&6; }
2008else
2009  { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
2010$as_echo "no, using $LN_S" >&6; }
2011fi
2012
2013
2014#--------------------------------------------------------------------
2015# Load the tclConfig.sh file
2016#--------------------------------------------------------------------
2017
2018
2019
2020    #
2021    # Ok, lets find the tcl configuration
2022    # First, look for one uninstalled.
2023    # the alternative search directory is invoked by --with-tcl
2024    #
2025
2026    if test x"${no_tcl}" = x ; then
2027	# we reset no_tcl in case something fails here
2028	no_tcl=true
2029
2030# Check whether --with-tcl was given.
2031if test "${with_tcl+set}" = set; then
2032  withval=$with_tcl; with_tclconfig=${withval}
2033fi
2034
2035	{ $as_echo "$as_me:$LINENO: checking for Tcl configuration" >&5
2036$as_echo_n "checking for Tcl configuration... " >&6; }
2037	if test "${ac_cv_c_tclconfig+set}" = set; then
2038  $as_echo_n "(cached) " >&6
2039else
2040
2041
2042	    # First check to see if --with-tcl was specified.
2043	    if test x"${with_tclconfig}" != x ; then
2044		case ${with_tclconfig} in
2045		    */tclConfig.sh )
2046			if test -f ${with_tclconfig}; then
2047			    { $as_echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
2048$as_echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
2049			    with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'`
2050			fi ;;
2051		esac
2052		if test -f "${with_tclconfig}/tclConfig.sh" ; then
2053		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
2054		else
2055		    { { $as_echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
2056$as_echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
2057   { (exit 1); exit 1; }; }
2058		fi
2059	    fi
2060
2061	    # then check for a private Tcl installation
2062	    if test x"${ac_cv_c_tclconfig}" = x ; then
2063		for i in \
2064			../tcl \
2065			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2066			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
2067			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
2068			../../tcl \
2069                        `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2070                        `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
2071			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
2072			../../../tcl \
2073                        `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2074                        `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
2075			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
2076		    if test -f "$i/unix/tclConfig.sh" ; then
2077			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
2078			break
2079		    fi
2080		done
2081	    fi
2082
2083	    # check in a few common install locations
2084	    if test x"${ac_cv_c_tclconfig}" = x ; then
2085		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
2086			`ls -d ${prefix}/lib 2>/dev/null` \
2087			`ls -d /usr/local/lib 2>/dev/null` \
2088			`ls -d /usr/contrib/lib 2>/dev/null` \
2089			`ls -d /usr/lib 2>/dev/null` \
2090			; do
2091		    if test -f "$i/tclConfig.sh" ; then
2092			ac_cv_c_tclconfig=`(cd $i; pwd)`
2093			break
2094		    fi
2095		done
2096	    fi
2097
2098	    # check in a few other private locations
2099	    if test x"${ac_cv_c_tclconfig}" = x ; then
2100		for i in \
2101			${srcdir}/../tcl \
2102			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2103			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2104			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2105		    if test -f "$i/unix/tclConfig.sh" ; then
2106		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
2107		    break
2108		fi
2109		done
2110	    fi
2111
2112fi
2113
2114
2115	if test x"${ac_cv_c_tclconfig}" = x ; then
2116	    TCL_BIN_DIR="# no Tcl configs found"
2117	    { $as_echo "$as_me:$LINENO: WARNING: \"Cannot find Tcl configuration definitions\"" >&5
2118$as_echo "$as_me: WARNING: \"Cannot find Tcl configuration definitions\"" >&2;}
2119	    exit 0
2120	else
2121	    no_tcl=
2122	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
2123	    { $as_echo "$as_me:$LINENO: result: found $TCL_BIN_DIR/tclConfig.sh" >&5
2124$as_echo "found $TCL_BIN_DIR/tclConfig.sh" >&6; }
2125	fi
2126    fi
2127
2128
2129    { $as_echo "$as_me:$LINENO: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
2130$as_echo_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh... " >&6; }
2131
2132    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
2133        { $as_echo "$as_me:$LINENO: result: loading" >&5
2134$as_echo "loading" >&6; }
2135	. $TCL_BIN_DIR/tclConfig.sh
2136    else
2137        { $as_echo "$as_me:$LINENO: result: file not found" >&5
2138$as_echo "file not found" >&6; }
2139    fi
2140
2141    #
2142    # If the TCL_BIN_DIR is the build directory (not the install directory),
2143    # then set the common variable name to the value of the build variables.
2144    # For example, the variable TCL_LIB_SPEC will be set to the value
2145    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
2146    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
2147    # installed and uninstalled version of Tcl.
2148    #
2149
2150    if test -f $TCL_BIN_DIR/Makefile ; then
2151        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
2152        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
2153        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
2154    fi
2155
2156    #
2157    # eval is required to do the TCL_DBGX substitution
2158    #
2159
2160    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
2161    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
2162    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
2163
2164    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
2165    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
2166    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185    #AC_SUBST(TCL_BUILD_LIB_SPEC)
2186    #AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
2187
2188
2189#--------------------------------------------------------------------
2190# Load the tkConfig.sh file
2191#--------------------------------------------------------------------
2192
2193
2194    #
2195    # Ok, lets find the tk configuration
2196    # First, look for one uninstalled.
2197    # the alternative search directory is invoked by --with-tk
2198    #
2199
2200    if test x"${no_tk}" = x ; then
2201	# we reset no_tk in case something fails here
2202	no_tk=true
2203
2204# Check whether --with-tk was given.
2205if test "${with_tk+set}" = set; then
2206  withval=$with_tk; with_tkconfig=${withval}
2207fi
2208
2209	{ $as_echo "$as_me:$LINENO: checking for Tk configuration" >&5
2210$as_echo_n "checking for Tk configuration... " >&6; }
2211	if test "${ac_cv_c_tkconfig+set}" = set; then
2212  $as_echo_n "(cached) " >&6
2213else
2214
2215
2216	    # First check to see if --with-tkconfig was specified.
2217	    if test x"${with_tkconfig}" != x ; then
2218		case ${with_tkconfig} in
2219		    */tkConfig.sh )
2220			if test -f ${with_tkconfig}; then
2221			    { $as_echo "$as_me:$LINENO: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&5
2222$as_echo "$as_me: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&2;}
2223			    with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'`
2224			fi ;;
2225		esac
2226		if test -f "${with_tkconfig}/tkConfig.sh" ; then
2227		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
2228		else
2229		    { { $as_echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
2230$as_echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
2231   { (exit 1); exit 1; }; }
2232		fi
2233	    fi
2234
2235	    # then check for a private Tk library
2236	    if test x"${ac_cv_c_tkconfig}" = x ; then
2237		for i in \
2238			../tk \
2239			`ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2240			`ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
2241			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
2242			../../tk \
2243			`ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2244			`ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
2245			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
2246			../../../tk \
2247			`ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2248			`ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
2249			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
2250		    if test -f "$i/unix/tkConfig.sh" ; then
2251			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
2252			break
2253		    fi
2254		done
2255	    fi
2256	    # check in a few common install locations
2257	    if test x"${ac_cv_c_tkconfig}" = x ; then
2258		for i in `ls -d ${exec_prefix}/lib 2>/dev/null` \
2259			`ls -d ${prefix}/lib 2>/dev/null` \
2260			`ls -d /usr/local/lib 2>/dev/null` \
2261			`ls -d /usr/contrib/lib 2>/dev/null` \
2262			`ls -d /usr/lib 2>/dev/null` \
2263			; do
2264		    if test -f "$i/tkConfig.sh" ; then
2265			ac_cv_c_tkconfig=`(cd $i; pwd)`
2266			break
2267		    fi
2268		done
2269	    fi
2270	    # check in a few other private locations
2271	    if test x"${ac_cv_c_tkconfig}" = x ; then
2272		for i in \
2273			${srcdir}/../tk \
2274			`ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
2275			`ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
2276			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
2277		    if test -f "$i/unix/tkConfig.sh" ; then
2278			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
2279			break
2280		    fi
2281		done
2282	    fi
2283
2284fi
2285
2286	if test x"${ac_cv_c_tkconfig}" = x ; then
2287	    TK_BIN_DIR="# no Tk configs found"
2288	    { $as_echo "$as_me:$LINENO: WARNING: \"Cannot find Tk configuration definitions\"" >&5
2289$as_echo "$as_me: WARNING: \"Cannot find Tk configuration definitions\"" >&2;}
2290	    exit 0
2291	else
2292	    no_tk=
2293	    TK_BIN_DIR=${ac_cv_c_tkconfig}
2294	    { $as_echo "$as_me:$LINENO: result: found $TK_BIN_DIR/tkConfig.sh" >&5
2295$as_echo "found $TK_BIN_DIR/tkConfig.sh" >&6; }
2296	fi
2297    fi
2298
2299
2300
2301    { $as_echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
2302$as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
2303
2304    if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
2305        { $as_echo "$as_me:$LINENO: result: loading" >&5
2306$as_echo "loading" >&6; }
2307	. $TK_BIN_DIR/tkConfig.sh
2308    else
2309        { $as_echo "$as_me:$LINENO: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
2310$as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
2311    fi
2312
2313    #
2314    # If the TK_BIN_DIR is the build directory (not the install directory),
2315    # then set the common variable name to the value of the build variables.
2316    # For example, the variable TK_LIB_SPEC will be set to the value
2317    # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
2318    # instead of TK_BUILD_LIB_SPEC since it will work with both an
2319    # installed and uninstalled version of Tcl.
2320    #
2321
2322    if test -f $TK_BIN_DIR/Makefile ; then
2323        TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
2324        TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
2325        TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
2326    fi
2327
2328    #
2329    # eval is required to do the TK_DBGX substitution
2330    #
2331
2332    eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
2333    eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
2334    eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
2335
2336    eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
2337    eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
2338    eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356#--------------------------------------------------------------------
2357# Handle the --prefix=... option by defaulting to what Tcl gave.
2358# Must be called after TEA_LOAD_TCLCONFIG and before $prefix is used.
2359#--------------------------------------------------------------------
2360
2361
2362    if test "${prefix}" = "NONE"; then
2363	prefix_default=yes
2364	if test x"${TCL_PREFIX}" != x; then
2365	    { $as_echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
2366$as_echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
2367	    prefix=${TCL_PREFIX}
2368	else
2369	    { $as_echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
2370$as_echo "$as_me: --prefix defaulting to /usr/local" >&6;}
2371	    prefix=/usr/local
2372	fi
2373    fi
2374    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" ; then
2375	if test x"${TCL_EXEC_PREFIX}" != x; then
2376	    { $as_echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
2377$as_echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
2378	    exec_prefix=${TCL_EXEC_PREFIX}
2379	else
2380	    { $as_echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
2381$as_echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
2382	    exec_prefix=$prefix
2383	fi
2384    fi
2385
2386
2387#------------------------------------------------------------------------
2388# Standard compiler checks.
2389# This sets up CC by using the CC env var, or looks for gcc otherwise.
2390# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
2391# the basic setup necessary to compile executables.
2392#------------------------------------------------------------------------
2393
2394ac_aux_dir=
2395for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2396  if test -f "$ac_dir/install-sh"; then
2397    ac_aux_dir=$ac_dir
2398    ac_install_sh="$ac_aux_dir/install-sh -c"
2399    break
2400  elif test -f "$ac_dir/install.sh"; then
2401    ac_aux_dir=$ac_dir
2402    ac_install_sh="$ac_aux_dir/install.sh -c"
2403    break
2404  elif test -f "$ac_dir/shtool"; then
2405    ac_aux_dir=$ac_dir
2406    ac_install_sh="$ac_aux_dir/shtool install -c"
2407    break
2408  fi
2409done
2410if test -z "$ac_aux_dir"; then
2411  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2412$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2413   { (exit 1); exit 1; }; }
2414fi
2415
2416# These three variables are undocumented and unsupported,
2417# and are intended to be withdrawn in a future Autoconf release.
2418# They can cause serious problems if a builder's source tree is in a directory
2419# whose full name contains unusual characters.
2420ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2421ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2422ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2423
2424
2425
2426    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
2427    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
2428
2429    # If the user did not set CFLAGS, set it now to keep
2430    # the AC_PROG_CC macro from adding "-g -O2".
2431    if test "${CFLAGS+set}" != "set" ; then
2432	CFLAGS=""
2433    fi
2434
2435    ac_ext=c
2436ac_cpp='$CPP $CPPFLAGS'
2437ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2438ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2439ac_compiler_gnu=$ac_cv_c_compiler_gnu
2440if test -n "$ac_tool_prefix"; then
2441  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2442set dummy ${ac_tool_prefix}gcc; ac_word=$2
2443{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2444$as_echo_n "checking for $ac_word... " >&6; }
2445if test "${ac_cv_prog_CC+set}" = set; then
2446  $as_echo_n "(cached) " >&6
2447else
2448  if test -n "$CC"; then
2449  ac_cv_prog_CC="$CC" # Let the user override the test.
2450else
2451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2452for as_dir in $PATH
2453do
2454  IFS=$as_save_IFS
2455  test -z "$as_dir" && as_dir=.
2456  for ac_exec_ext in '' $ac_executable_extensions; do
2457  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2458    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2459    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2460    break 2
2461  fi
2462done
2463done
2464IFS=$as_save_IFS
2465
2466fi
2467fi
2468CC=$ac_cv_prog_CC
2469if test -n "$CC"; then
2470  { $as_echo "$as_me:$LINENO: result: $CC" >&5
2471$as_echo "$CC" >&6; }
2472else
2473  { $as_echo "$as_me:$LINENO: result: no" >&5
2474$as_echo "no" >&6; }
2475fi
2476
2477
2478fi
2479if test -z "$ac_cv_prog_CC"; then
2480  ac_ct_CC=$CC
2481  # Extract the first word of "gcc", so it can be a program name with args.
2482set dummy gcc; ac_word=$2
2483{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2484$as_echo_n "checking for $ac_word... " >&6; }
2485if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2486  $as_echo_n "(cached) " >&6
2487else
2488  if test -n "$ac_ct_CC"; then
2489  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2490else
2491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2492for as_dir in $PATH
2493do
2494  IFS=$as_save_IFS
2495  test -z "$as_dir" && as_dir=.
2496  for ac_exec_ext in '' $ac_executable_extensions; do
2497  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2498    ac_cv_prog_ac_ct_CC="gcc"
2499    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2500    break 2
2501  fi
2502done
2503done
2504IFS=$as_save_IFS
2505
2506fi
2507fi
2508ac_ct_CC=$ac_cv_prog_ac_ct_CC
2509if test -n "$ac_ct_CC"; then
2510  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2511$as_echo "$ac_ct_CC" >&6; }
2512else
2513  { $as_echo "$as_me:$LINENO: result: no" >&5
2514$as_echo "no" >&6; }
2515fi
2516
2517  if test "x$ac_ct_CC" = x; then
2518    CC=""
2519  else
2520    case $cross_compiling:$ac_tool_warned in
2521yes:)
2522{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2523$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2524ac_tool_warned=yes ;;
2525esac
2526    CC=$ac_ct_CC
2527  fi
2528else
2529  CC="$ac_cv_prog_CC"
2530fi
2531
2532if test -z "$CC"; then
2533          if test -n "$ac_tool_prefix"; then
2534    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2535set dummy ${ac_tool_prefix}cc; ac_word=$2
2536{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2537$as_echo_n "checking for $ac_word... " >&6; }
2538if test "${ac_cv_prog_CC+set}" = set; then
2539  $as_echo_n "(cached) " >&6
2540else
2541  if test -n "$CC"; then
2542  ac_cv_prog_CC="$CC" # Let the user override the test.
2543else
2544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2545for as_dir in $PATH
2546do
2547  IFS=$as_save_IFS
2548  test -z "$as_dir" && as_dir=.
2549  for ac_exec_ext in '' $ac_executable_extensions; do
2550  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2551    ac_cv_prog_CC="${ac_tool_prefix}cc"
2552    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2553    break 2
2554  fi
2555done
2556done
2557IFS=$as_save_IFS
2558
2559fi
2560fi
2561CC=$ac_cv_prog_CC
2562if test -n "$CC"; then
2563  { $as_echo "$as_me:$LINENO: result: $CC" >&5
2564$as_echo "$CC" >&6; }
2565else
2566  { $as_echo "$as_me:$LINENO: result: no" >&5
2567$as_echo "no" >&6; }
2568fi
2569
2570
2571  fi
2572fi
2573if test -z "$CC"; then
2574  # Extract the first word of "cc", so it can be a program name with args.
2575set dummy cc; ac_word=$2
2576{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2577$as_echo_n "checking for $ac_word... " >&6; }
2578if test "${ac_cv_prog_CC+set}" = set; then
2579  $as_echo_n "(cached) " >&6
2580else
2581  if test -n "$CC"; then
2582  ac_cv_prog_CC="$CC" # Let the user override the test.
2583else
2584  ac_prog_rejected=no
2585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2586for as_dir in $PATH
2587do
2588  IFS=$as_save_IFS
2589  test -z "$as_dir" && as_dir=.
2590  for ac_exec_ext in '' $ac_executable_extensions; do
2591  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2592    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2593       ac_prog_rejected=yes
2594       continue
2595     fi
2596    ac_cv_prog_CC="cc"
2597    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2598    break 2
2599  fi
2600done
2601done
2602IFS=$as_save_IFS
2603
2604if test $ac_prog_rejected = yes; then
2605  # We found a bogon in the path, so make sure we never use it.
2606  set dummy $ac_cv_prog_CC
2607  shift
2608  if test $# != 0; then
2609    # We chose a different compiler from the bogus one.
2610    # However, it has the same basename, so the bogon will be chosen
2611    # first if we set CC to just the basename; use the full file name.
2612    shift
2613    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2614  fi
2615fi
2616fi
2617fi
2618CC=$ac_cv_prog_CC
2619if test -n "$CC"; then
2620  { $as_echo "$as_me:$LINENO: result: $CC" >&5
2621$as_echo "$CC" >&6; }
2622else
2623  { $as_echo "$as_me:$LINENO: result: no" >&5
2624$as_echo "no" >&6; }
2625fi
2626
2627
2628fi
2629if test -z "$CC"; then
2630  if test -n "$ac_tool_prefix"; then
2631  for ac_prog in cl.exe
2632  do
2633    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2634set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2635{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2636$as_echo_n "checking for $ac_word... " >&6; }
2637if test "${ac_cv_prog_CC+set}" = set; then
2638  $as_echo_n "(cached) " >&6
2639else
2640  if test -n "$CC"; then
2641  ac_cv_prog_CC="$CC" # Let the user override the test.
2642else
2643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2644for as_dir in $PATH
2645do
2646  IFS=$as_save_IFS
2647  test -z "$as_dir" && as_dir=.
2648  for ac_exec_ext in '' $ac_executable_extensions; do
2649  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2650    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2651    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2652    break 2
2653  fi
2654done
2655done
2656IFS=$as_save_IFS
2657
2658fi
2659fi
2660CC=$ac_cv_prog_CC
2661if test -n "$CC"; then
2662  { $as_echo "$as_me:$LINENO: result: $CC" >&5
2663$as_echo "$CC" >&6; }
2664else
2665  { $as_echo "$as_me:$LINENO: result: no" >&5
2666$as_echo "no" >&6; }
2667fi
2668
2669
2670    test -n "$CC" && break
2671  done
2672fi
2673if test -z "$CC"; then
2674  ac_ct_CC=$CC
2675  for ac_prog in cl.exe
2676do
2677  # Extract the first word of "$ac_prog", so it can be a program name with args.
2678set dummy $ac_prog; ac_word=$2
2679{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2680$as_echo_n "checking for $ac_word... " >&6; }
2681if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2682  $as_echo_n "(cached) " >&6
2683else
2684  if test -n "$ac_ct_CC"; then
2685  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2686else
2687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2688for as_dir in $PATH
2689do
2690  IFS=$as_save_IFS
2691  test -z "$as_dir" && as_dir=.
2692  for ac_exec_ext in '' $ac_executable_extensions; do
2693  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2694    ac_cv_prog_ac_ct_CC="$ac_prog"
2695    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2696    break 2
2697  fi
2698done
2699done
2700IFS=$as_save_IFS
2701
2702fi
2703fi
2704ac_ct_CC=$ac_cv_prog_ac_ct_CC
2705if test -n "$ac_ct_CC"; then
2706  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2707$as_echo "$ac_ct_CC" >&6; }
2708else
2709  { $as_echo "$as_me:$LINENO: result: no" >&5
2710$as_echo "no" >&6; }
2711fi
2712
2713
2714  test -n "$ac_ct_CC" && break
2715done
2716
2717  if test "x$ac_ct_CC" = x; then
2718    CC=""
2719  else
2720    case $cross_compiling:$ac_tool_warned in
2721yes:)
2722{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2723$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2724ac_tool_warned=yes ;;
2725esac
2726    CC=$ac_ct_CC
2727  fi
2728fi
2729
2730fi
2731
2732
2733test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2735{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2736See \`config.log' for more details." >&5
2737$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
2738See \`config.log' for more details." >&2;}
2739   { (exit 1); exit 1; }; }; }
2740
2741# Provide some information about the compiler.
2742$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
2743set X $ac_compile
2744ac_compiler=$2
2745{ (ac_try="$ac_compiler --version >&5"
2746case "(($ac_try" in
2747  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2748  *) ac_try_echo=$ac_try;;
2749esac
2750eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2751$as_echo "$ac_try_echo") >&5
2752  (eval "$ac_compiler --version >&5") 2>&5
2753  ac_status=$?
2754  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2755  (exit $ac_status); }
2756{ (ac_try="$ac_compiler -v >&5"
2757case "(($ac_try" in
2758  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2759  *) ac_try_echo=$ac_try;;
2760esac
2761eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2762$as_echo "$ac_try_echo") >&5
2763  (eval "$ac_compiler -v >&5") 2>&5
2764  ac_status=$?
2765  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2766  (exit $ac_status); }
2767{ (ac_try="$ac_compiler -V >&5"
2768case "(($ac_try" in
2769  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2770  *) ac_try_echo=$ac_try;;
2771esac
2772eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2773$as_echo "$ac_try_echo") >&5
2774  (eval "$ac_compiler -V >&5") 2>&5
2775  ac_status=$?
2776  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2777  (exit $ac_status); }
2778
2779cat >conftest.$ac_ext <<_ACEOF
2780/* confdefs.h.  */
2781_ACEOF
2782cat confdefs.h >>conftest.$ac_ext
2783cat >>conftest.$ac_ext <<_ACEOF
2784/* end confdefs.h.  */
2785
2786int
2787main ()
2788{
2789
2790  ;
2791  return 0;
2792}
2793_ACEOF
2794ac_clean_files_save=$ac_clean_files
2795ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2796# Try to create an executable without -o first, disregard a.out.
2797# It will help us diagnose broken compilers, and finding out an intuition
2798# of exeext.
2799{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2800$as_echo_n "checking for C compiler default output file name... " >&6; }
2801ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2802
2803# The possible output files:
2804ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2805
2806ac_rmfiles=
2807for ac_file in $ac_files
2808do
2809  case $ac_file in
2810    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2811    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2812  esac
2813done
2814rm -f $ac_rmfiles
2815
2816if { (ac_try="$ac_link_default"
2817case "(($ac_try" in
2818  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2819  *) ac_try_echo=$ac_try;;
2820esac
2821eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2822$as_echo "$ac_try_echo") >&5
2823  (eval "$ac_link_default") 2>&5
2824  ac_status=$?
2825  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2826  (exit $ac_status); }; then
2827  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2828# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2829# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2830# so that the user can short-circuit this test for compilers unknown to
2831# Autoconf.
2832for ac_file in $ac_files ''
2833do
2834  test -f "$ac_file" || continue
2835  case $ac_file in
2836    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2837	;;
2838    [ab].out )
2839	# We found the default executable, but exeext='' is most
2840	# certainly right.
2841	break;;
2842    *.* )
2843        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2844	then :; else
2845	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2846	fi
2847	# We set ac_cv_exeext here because the later test for it is not
2848	# safe: cross compilers may not add the suffix if given an `-o'
2849	# argument, so we may need to know it at that point already.
2850	# Even if this section looks crufty: it has the advantage of
2851	# actually working.
2852	break;;
2853    * )
2854	break;;
2855  esac
2856done
2857test "$ac_cv_exeext" = no && ac_cv_exeext=
2858
2859else
2860  ac_file=''
2861fi
2862
2863{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
2864$as_echo "$ac_file" >&6; }
2865if test -z "$ac_file"; then
2866  $as_echo "$as_me: failed program was:" >&5
2867sed 's/^/| /' conftest.$ac_ext >&5
2868
2869{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2871{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
2872See \`config.log' for more details." >&5
2873$as_echo "$as_me: error: C compiler cannot create executables
2874See \`config.log' for more details." >&2;}
2875   { (exit 77); exit 77; }; }; }
2876fi
2877
2878ac_exeext=$ac_cv_exeext
2879
2880# Check that the compiler produces executables we can run.  If not, either
2881# the compiler is broken, or we cross compile.
2882{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2883$as_echo_n "checking whether the C compiler works... " >&6; }
2884# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2885# If not cross compiling, check that we can run a simple program.
2886if test "$cross_compiling" != yes; then
2887  if { ac_try='./$ac_file'
2888  { (case "(($ac_try" in
2889  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2890  *) ac_try_echo=$ac_try;;
2891esac
2892eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2893$as_echo "$ac_try_echo") >&5
2894  (eval "$ac_try") 2>&5
2895  ac_status=$?
2896  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2897  (exit $ac_status); }; }; then
2898    cross_compiling=no
2899  else
2900    if test "$cross_compiling" = maybe; then
2901	cross_compiling=yes
2902    else
2903	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2905{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
2906If you meant to cross compile, use \`--host'.
2907See \`config.log' for more details." >&5
2908$as_echo "$as_me: error: cannot run C compiled programs.
2909If you meant to cross compile, use \`--host'.
2910See \`config.log' for more details." >&2;}
2911   { (exit 1); exit 1; }; }; }
2912    fi
2913  fi
2914fi
2915{ $as_echo "$as_me:$LINENO: result: yes" >&5
2916$as_echo "yes" >&6; }
2917
2918rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2919ac_clean_files=$ac_clean_files_save
2920# Check that the compiler produces executables we can run.  If not, either
2921# the compiler is broken, or we cross compile.
2922{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2923$as_echo_n "checking whether we are cross compiling... " >&6; }
2924{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
2925$as_echo "$cross_compiling" >&6; }
2926
2927{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
2928$as_echo_n "checking for suffix of executables... " >&6; }
2929if { (ac_try="$ac_link"
2930case "(($ac_try" in
2931  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2932  *) ac_try_echo=$ac_try;;
2933esac
2934eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2935$as_echo "$ac_try_echo") >&5
2936  (eval "$ac_link") 2>&5
2937  ac_status=$?
2938  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2939  (exit $ac_status); }; then
2940  # If both `conftest.exe' and `conftest' are `present' (well, observable)
2941# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2942# work properly (i.e., refer to `conftest.exe'), while it won't with
2943# `rm'.
2944for ac_file in conftest.exe conftest conftest.*; do
2945  test -f "$ac_file" || continue
2946  case $ac_file in
2947    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2948    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2949	  break;;
2950    * ) break;;
2951  esac
2952done
2953else
2954  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2955$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2956{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2957See \`config.log' for more details." >&5
2958$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2959See \`config.log' for more details." >&2;}
2960   { (exit 1); exit 1; }; }; }
2961fi
2962
2963rm -f conftest$ac_cv_exeext
2964{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2965$as_echo "$ac_cv_exeext" >&6; }
2966
2967rm -f conftest.$ac_ext
2968EXEEXT=$ac_cv_exeext
2969ac_exeext=$EXEEXT
2970{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
2971$as_echo_n "checking for suffix of object files... " >&6; }
2972if test "${ac_cv_objext+set}" = set; then
2973  $as_echo_n "(cached) " >&6
2974else
2975  cat >conftest.$ac_ext <<_ACEOF
2976/* confdefs.h.  */
2977_ACEOF
2978cat confdefs.h >>conftest.$ac_ext
2979cat >>conftest.$ac_ext <<_ACEOF
2980/* end confdefs.h.  */
2981
2982int
2983main ()
2984{
2985
2986  ;
2987  return 0;
2988}
2989_ACEOF
2990rm -f conftest.o conftest.obj
2991if { (ac_try="$ac_compile"
2992case "(($ac_try" in
2993  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2994  *) ac_try_echo=$ac_try;;
2995esac
2996eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2997$as_echo "$ac_try_echo") >&5
2998  (eval "$ac_compile") 2>&5
2999  ac_status=$?
3000  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3001  (exit $ac_status); }; then
3002  for ac_file in conftest.o conftest.obj 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 | *.dSYM ) ;;
3006    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3007       break;;
3008  esac
3009done
3010else
3011  $as_echo "$as_me: failed program was:" >&5
3012sed 's/^/| /' conftest.$ac_ext >&5
3013
3014{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3015$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3016{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3017See \`config.log' for more details." >&5
3018$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
3019See \`config.log' for more details." >&2;}
3020   { (exit 1); exit 1; }; }; }
3021fi
3022
3023rm -f conftest.$ac_cv_objext conftest.$ac_ext
3024fi
3025{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3026$as_echo "$ac_cv_objext" >&6; }
3027OBJEXT=$ac_cv_objext
3028ac_objext=$OBJEXT
3029{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3030$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3031if test "${ac_cv_c_compiler_gnu+set}" = set; then
3032  $as_echo_n "(cached) " >&6
3033else
3034  cat >conftest.$ac_ext <<_ACEOF
3035/* confdefs.h.  */
3036_ACEOF
3037cat confdefs.h >>conftest.$ac_ext
3038cat >>conftest.$ac_ext <<_ACEOF
3039/* end confdefs.h.  */
3040
3041int
3042main ()
3043{
3044#ifndef __GNUC__
3045       choke me
3046#endif
3047
3048  ;
3049  return 0;
3050}
3051_ACEOF
3052rm -f conftest.$ac_objext
3053if { (ac_try="$ac_compile"
3054case "(($ac_try" in
3055  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3056  *) ac_try_echo=$ac_try;;
3057esac
3058eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3059$as_echo "$ac_try_echo") >&5
3060  (eval "$ac_compile") 2>conftest.er1
3061  ac_status=$?
3062  grep -v '^ *+' conftest.er1 >conftest.err
3063  rm -f conftest.er1
3064  cat conftest.err >&5
3065  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3066  (exit $ac_status); } && {
3067	 test -z "$ac_c_werror_flag" ||
3068	 test ! -s conftest.err
3069       } && test -s conftest.$ac_objext; then
3070  ac_compiler_gnu=yes
3071else
3072  $as_echo "$as_me: failed program was:" >&5
3073sed 's/^/| /' conftest.$ac_ext >&5
3074
3075	ac_compiler_gnu=no
3076fi
3077
3078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3079ac_cv_c_compiler_gnu=$ac_compiler_gnu
3080
3081fi
3082{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3083$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3084if test $ac_compiler_gnu = yes; then
3085  GCC=yes
3086else
3087  GCC=
3088fi
3089ac_test_CFLAGS=${CFLAGS+set}
3090ac_save_CFLAGS=$CFLAGS
3091{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3092$as_echo_n "checking whether $CC accepts -g... " >&6; }
3093if test "${ac_cv_prog_cc_g+set}" = set; then
3094  $as_echo_n "(cached) " >&6
3095else
3096  ac_save_c_werror_flag=$ac_c_werror_flag
3097   ac_c_werror_flag=yes
3098   ac_cv_prog_cc_g=no
3099   CFLAGS="-g"
3100   cat >conftest.$ac_ext <<_ACEOF
3101/* confdefs.h.  */
3102_ACEOF
3103cat confdefs.h >>conftest.$ac_ext
3104cat >>conftest.$ac_ext <<_ACEOF
3105/* end confdefs.h.  */
3106
3107int
3108main ()
3109{
3110
3111  ;
3112  return 0;
3113}
3114_ACEOF
3115rm -f conftest.$ac_objext
3116if { (ac_try="$ac_compile"
3117case "(($ac_try" in
3118  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3119  *) ac_try_echo=$ac_try;;
3120esac
3121eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3122$as_echo "$ac_try_echo") >&5
3123  (eval "$ac_compile") 2>conftest.er1
3124  ac_status=$?
3125  grep -v '^ *+' conftest.er1 >conftest.err
3126  rm -f conftest.er1
3127  cat conftest.err >&5
3128  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3129  (exit $ac_status); } && {
3130	 test -z "$ac_c_werror_flag" ||
3131	 test ! -s conftest.err
3132       } && test -s conftest.$ac_objext; then
3133  ac_cv_prog_cc_g=yes
3134else
3135  $as_echo "$as_me: failed program was:" >&5
3136sed 's/^/| /' conftest.$ac_ext >&5
3137
3138	CFLAGS=""
3139      cat >conftest.$ac_ext <<_ACEOF
3140/* confdefs.h.  */
3141_ACEOF
3142cat confdefs.h >>conftest.$ac_ext
3143cat >>conftest.$ac_ext <<_ACEOF
3144/* end confdefs.h.  */
3145
3146int
3147main ()
3148{
3149
3150  ;
3151  return 0;
3152}
3153_ACEOF
3154rm -f conftest.$ac_objext
3155if { (ac_try="$ac_compile"
3156case "(($ac_try" in
3157  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3158  *) ac_try_echo=$ac_try;;
3159esac
3160eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3161$as_echo "$ac_try_echo") >&5
3162  (eval "$ac_compile") 2>conftest.er1
3163  ac_status=$?
3164  grep -v '^ *+' conftest.er1 >conftest.err
3165  rm -f conftest.er1
3166  cat conftest.err >&5
3167  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3168  (exit $ac_status); } && {
3169	 test -z "$ac_c_werror_flag" ||
3170	 test ! -s conftest.err
3171       } && test -s conftest.$ac_objext; then
3172  :
3173else
3174  $as_echo "$as_me: failed program was:" >&5
3175sed 's/^/| /' conftest.$ac_ext >&5
3176
3177	ac_c_werror_flag=$ac_save_c_werror_flag
3178	 CFLAGS="-g"
3179	 cat >conftest.$ac_ext <<_ACEOF
3180/* confdefs.h.  */
3181_ACEOF
3182cat confdefs.h >>conftest.$ac_ext
3183cat >>conftest.$ac_ext <<_ACEOF
3184/* end confdefs.h.  */
3185
3186int
3187main ()
3188{
3189
3190  ;
3191  return 0;
3192}
3193_ACEOF
3194rm -f conftest.$ac_objext
3195if { (ac_try="$ac_compile"
3196case "(($ac_try" in
3197  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3198  *) ac_try_echo=$ac_try;;
3199esac
3200eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3201$as_echo "$ac_try_echo") >&5
3202  (eval "$ac_compile") 2>conftest.er1
3203  ac_status=$?
3204  grep -v '^ *+' conftest.er1 >conftest.err
3205  rm -f conftest.er1
3206  cat conftest.err >&5
3207  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3208  (exit $ac_status); } && {
3209	 test -z "$ac_c_werror_flag" ||
3210	 test ! -s conftest.err
3211       } && test -s conftest.$ac_objext; then
3212  ac_cv_prog_cc_g=yes
3213else
3214  $as_echo "$as_me: failed program was:" >&5
3215sed 's/^/| /' conftest.$ac_ext >&5
3216
3217
3218fi
3219
3220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3221fi
3222
3223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3224fi
3225
3226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3227   ac_c_werror_flag=$ac_save_c_werror_flag
3228fi
3229{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3230$as_echo "$ac_cv_prog_cc_g" >&6; }
3231if test "$ac_test_CFLAGS" = set; then
3232  CFLAGS=$ac_save_CFLAGS
3233elif test $ac_cv_prog_cc_g = yes; then
3234  if test "$GCC" = yes; then
3235    CFLAGS="-g -O2"
3236  else
3237    CFLAGS="-g"
3238  fi
3239else
3240  if test "$GCC" = yes; then
3241    CFLAGS="-O2"
3242  else
3243    CFLAGS=
3244  fi
3245fi
3246{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3247$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3248if test "${ac_cv_prog_cc_c89+set}" = set; then
3249  $as_echo_n "(cached) " >&6
3250else
3251  ac_cv_prog_cc_c89=no
3252ac_save_CC=$CC
3253cat >conftest.$ac_ext <<_ACEOF
3254/* confdefs.h.  */
3255_ACEOF
3256cat confdefs.h >>conftest.$ac_ext
3257cat >>conftest.$ac_ext <<_ACEOF
3258/* end confdefs.h.  */
3259#include <stdarg.h>
3260#include <stdio.h>
3261#include <sys/types.h>
3262#include <sys/stat.h>
3263/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3264struct buf { int x; };
3265FILE * (*rcsopen) (struct buf *, struct stat *, int);
3266static char *e (p, i)
3267     char **p;
3268     int i;
3269{
3270  return p[i];
3271}
3272static char *f (char * (*g) (char **, int), char **p, ...)
3273{
3274  char *s;
3275  va_list v;
3276  va_start (v,p);
3277  s = g (p, va_arg (v,int));
3278  va_end (v);
3279  return s;
3280}
3281
3282/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3283   function prototypes and stuff, but not '\xHH' hex character constants.
3284   These don't provoke an error unfortunately, instead are silently treated
3285   as 'x'.  The following induces an error, until -std is added to get
3286   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3287   array size at least.  It's necessary to write '\x00'==0 to get something
3288   that's true only with -std.  */
3289int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3290
3291/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3292   inside strings and character constants.  */
3293#define FOO(x) 'x'
3294int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3295
3296int test (int i, double x);
3297struct s1 {int (*f) (int a);};
3298struct s2 {int (*f) (double a);};
3299int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3300int argc;
3301char **argv;
3302int
3303main ()
3304{
3305return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3306  ;
3307  return 0;
3308}
3309_ACEOF
3310for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3311	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3312do
3313  CC="$ac_save_CC $ac_arg"
3314  rm -f conftest.$ac_objext
3315if { (ac_try="$ac_compile"
3316case "(($ac_try" in
3317  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3318  *) ac_try_echo=$ac_try;;
3319esac
3320eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3321$as_echo "$ac_try_echo") >&5
3322  (eval "$ac_compile") 2>conftest.er1
3323  ac_status=$?
3324  grep -v '^ *+' conftest.er1 >conftest.err
3325  rm -f conftest.er1
3326  cat conftest.err >&5
3327  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3328  (exit $ac_status); } && {
3329	 test -z "$ac_c_werror_flag" ||
3330	 test ! -s conftest.err
3331       } && test -s conftest.$ac_objext; then
3332  ac_cv_prog_cc_c89=$ac_arg
3333else
3334  $as_echo "$as_me: failed program was:" >&5
3335sed 's/^/| /' conftest.$ac_ext >&5
3336
3337
3338fi
3339
3340rm -f core conftest.err conftest.$ac_objext
3341  test "x$ac_cv_prog_cc_c89" != "xno" && break
3342done
3343rm -f conftest.$ac_ext
3344CC=$ac_save_CC
3345
3346fi
3347# AC_CACHE_VAL
3348case "x$ac_cv_prog_cc_c89" in
3349  x)
3350    { $as_echo "$as_me:$LINENO: result: none needed" >&5
3351$as_echo "none needed" >&6; } ;;
3352  xno)
3353    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3354$as_echo "unsupported" >&6; } ;;
3355  *)
3356    CC="$CC $ac_cv_prog_cc_c89"
3357    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3358$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3359esac
3360
3361
3362ac_ext=c
3363ac_cpp='$CPP $CPPFLAGS'
3364ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3365ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3366ac_compiler_gnu=$ac_cv_c_compiler_gnu
3367
3368    ac_ext=c
3369ac_cpp='$CPP $CPPFLAGS'
3370ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3371ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3372ac_compiler_gnu=$ac_cv_c_compiler_gnu
3373{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3374$as_echo_n "checking how to run the C preprocessor... " >&6; }
3375# On Suns, sometimes $CPP names a directory.
3376if test -n "$CPP" && test -d "$CPP"; then
3377  CPP=
3378fi
3379if test -z "$CPP"; then
3380  if test "${ac_cv_prog_CPP+set}" = set; then
3381  $as_echo_n "(cached) " >&6
3382else
3383      # Double quotes because CPP needs to be expanded
3384    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3385    do
3386      ac_preproc_ok=false
3387for ac_c_preproc_warn_flag in '' yes
3388do
3389  # Use a header file that comes with gcc, so configuring glibc
3390  # with a fresh cross-compiler works.
3391  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3392  # <limits.h> exists even on freestanding compilers.
3393  # On the NeXT, cc -E runs the code through the compiler's parser,
3394  # not just through cpp. "Syntax error" is here to catch this case.
3395  cat >conftest.$ac_ext <<_ACEOF
3396/* confdefs.h.  */
3397_ACEOF
3398cat confdefs.h >>conftest.$ac_ext
3399cat >>conftest.$ac_ext <<_ACEOF
3400/* end confdefs.h.  */
3401#ifdef __STDC__
3402# include <limits.h>
3403#else
3404# include <assert.h>
3405#endif
3406		     Syntax error
3407_ACEOF
3408if { (ac_try="$ac_cpp conftest.$ac_ext"
3409case "(($ac_try" in
3410  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3411  *) ac_try_echo=$ac_try;;
3412esac
3413eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3414$as_echo "$ac_try_echo") >&5
3415  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3416  ac_status=$?
3417  grep -v '^ *+' conftest.er1 >conftest.err
3418  rm -f conftest.er1
3419  cat conftest.err >&5
3420  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3421  (exit $ac_status); } >/dev/null && {
3422	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3423	 test ! -s conftest.err
3424       }; then
3425  :
3426else
3427  $as_echo "$as_me: failed program was:" >&5
3428sed 's/^/| /' conftest.$ac_ext >&5
3429
3430  # Broken: fails on valid input.
3431continue
3432fi
3433
3434rm -f conftest.err conftest.$ac_ext
3435
3436  # OK, works on sane cases.  Now check whether nonexistent headers
3437  # can be detected and how.
3438  cat >conftest.$ac_ext <<_ACEOF
3439/* confdefs.h.  */
3440_ACEOF
3441cat confdefs.h >>conftest.$ac_ext
3442cat >>conftest.$ac_ext <<_ACEOF
3443/* end confdefs.h.  */
3444#include <ac_nonexistent.h>
3445_ACEOF
3446if { (ac_try="$ac_cpp conftest.$ac_ext"
3447case "(($ac_try" in
3448  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3449  *) ac_try_echo=$ac_try;;
3450esac
3451eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3452$as_echo "$ac_try_echo") >&5
3453  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3454  ac_status=$?
3455  grep -v '^ *+' conftest.er1 >conftest.err
3456  rm -f conftest.er1
3457  cat conftest.err >&5
3458  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3459  (exit $ac_status); } >/dev/null && {
3460	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3461	 test ! -s conftest.err
3462       }; then
3463  # Broken: success on invalid input.
3464continue
3465else
3466  $as_echo "$as_me: failed program was:" >&5
3467sed 's/^/| /' conftest.$ac_ext >&5
3468
3469  # Passes both tests.
3470ac_preproc_ok=:
3471break
3472fi
3473
3474rm -f conftest.err conftest.$ac_ext
3475
3476done
3477# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3478rm -f conftest.err conftest.$ac_ext
3479if $ac_preproc_ok; then
3480  break
3481fi
3482
3483    done
3484    ac_cv_prog_CPP=$CPP
3485
3486fi
3487  CPP=$ac_cv_prog_CPP
3488else
3489  ac_cv_prog_CPP=$CPP
3490fi
3491{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
3492$as_echo "$CPP" >&6; }
3493ac_preproc_ok=false
3494for ac_c_preproc_warn_flag in '' yes
3495do
3496  # Use a header file that comes with gcc, so configuring glibc
3497  # with a fresh cross-compiler works.
3498  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3499  # <limits.h> exists even on freestanding compilers.
3500  # On the NeXT, cc -E runs the code through the compiler's parser,
3501  # not just through cpp. "Syntax error" is here to catch this case.
3502  cat >conftest.$ac_ext <<_ACEOF
3503/* confdefs.h.  */
3504_ACEOF
3505cat confdefs.h >>conftest.$ac_ext
3506cat >>conftest.$ac_ext <<_ACEOF
3507/* end confdefs.h.  */
3508#ifdef __STDC__
3509# include <limits.h>
3510#else
3511# include <assert.h>
3512#endif
3513		     Syntax error
3514_ACEOF
3515if { (ac_try="$ac_cpp conftest.$ac_ext"
3516case "(($ac_try" in
3517  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3518  *) ac_try_echo=$ac_try;;
3519esac
3520eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3521$as_echo "$ac_try_echo") >&5
3522  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3523  ac_status=$?
3524  grep -v '^ *+' conftest.er1 >conftest.err
3525  rm -f conftest.er1
3526  cat conftest.err >&5
3527  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3528  (exit $ac_status); } >/dev/null && {
3529	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3530	 test ! -s conftest.err
3531       }; then
3532  :
3533else
3534  $as_echo "$as_me: failed program was:" >&5
3535sed 's/^/| /' conftest.$ac_ext >&5
3536
3537  # Broken: fails on valid input.
3538continue
3539fi
3540
3541rm -f conftest.err conftest.$ac_ext
3542
3543  # OK, works on sane cases.  Now check whether nonexistent headers
3544  # can be detected and how.
3545  cat >conftest.$ac_ext <<_ACEOF
3546/* confdefs.h.  */
3547_ACEOF
3548cat confdefs.h >>conftest.$ac_ext
3549cat >>conftest.$ac_ext <<_ACEOF
3550/* end confdefs.h.  */
3551#include <ac_nonexistent.h>
3552_ACEOF
3553if { (ac_try="$ac_cpp conftest.$ac_ext"
3554case "(($ac_try" in
3555  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3556  *) ac_try_echo=$ac_try;;
3557esac
3558eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3559$as_echo "$ac_try_echo") >&5
3560  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3561  ac_status=$?
3562  grep -v '^ *+' conftest.er1 >conftest.err
3563  rm -f conftest.er1
3564  cat conftest.err >&5
3565  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3566  (exit $ac_status); } >/dev/null && {
3567	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3568	 test ! -s conftest.err
3569       }; then
3570  # Broken: success on invalid input.
3571continue
3572else
3573  $as_echo "$as_me: failed program was:" >&5
3574sed 's/^/| /' conftest.$ac_ext >&5
3575
3576  # Passes both tests.
3577ac_preproc_ok=:
3578break
3579fi
3580
3581rm -f conftest.err conftest.$ac_ext
3582
3583done
3584# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3585rm -f conftest.err conftest.$ac_ext
3586if $ac_preproc_ok; then
3587  :
3588else
3589  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3591{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3592See \`config.log' for more details." >&5
3593$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3594See \`config.log' for more details." >&2;}
3595   { (exit 1); exit 1; }; }; }
3596fi
3597
3598ac_ext=c
3599ac_cpp='$CPP $CPPFLAGS'
3600ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3601ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3602ac_compiler_gnu=$ac_cv_c_compiler_gnu
3603
3604
3605    # Find a good install program.  We prefer a C program (faster),
3606# so one script is as good as another.  But avoid the broken or
3607# incompatible versions:
3608# SysV /etc/install, /usr/sbin/install
3609# SunOS /usr/etc/install
3610# IRIX /sbin/install
3611# AIX /bin/install
3612# AmigaOS /C/install, which installs bootblocks on floppy discs
3613# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3614# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3615# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3616# OS/2's system install, which has a completely different semantic
3617# ./install, which can be erroneously created by make from ./install.sh.
3618# Reject install programs that cannot install multiple files.
3619{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3620$as_echo_n "checking for a BSD-compatible install... " >&6; }
3621if test -z "$INSTALL"; then
3622if test "${ac_cv_path_install+set}" = set; then
3623  $as_echo_n "(cached) " >&6
3624else
3625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3626for as_dir in $PATH
3627do
3628  IFS=$as_save_IFS
3629  test -z "$as_dir" && as_dir=.
3630  # Account for people who put trailing slashes in PATH elements.
3631case $as_dir/ in
3632  ./ | .// | /cC/* | \
3633  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3634  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3635  /usr/ucb/* ) ;;
3636  *)
3637    # OSF1 and SCO ODT 3.0 have their own names for install.
3638    # Don't use installbsd from OSF since it installs stuff as root
3639    # by default.
3640    for ac_prog in ginstall scoinst install; do
3641      for ac_exec_ext in '' $ac_executable_extensions; do
3642	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3643	  if test $ac_prog = install &&
3644	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3645	    # AIX install.  It has an incompatible calling convention.
3646	    :
3647	  elif test $ac_prog = install &&
3648	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3649	    # program-specific install script used by HP pwplus--don't use.
3650	    :
3651	  else
3652	    rm -rf conftest.one conftest.two conftest.dir
3653	    echo one > conftest.one
3654	    echo two > conftest.two
3655	    mkdir conftest.dir
3656	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3657	      test -s conftest.one && test -s conftest.two &&
3658	      test -s conftest.dir/conftest.one &&
3659	      test -s conftest.dir/conftest.two
3660	    then
3661	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3662	      break 3
3663	    fi
3664	  fi
3665	fi
3666      done
3667    done
3668    ;;
3669esac
3670
3671done
3672IFS=$as_save_IFS
3673
3674rm -rf conftest.one conftest.two conftest.dir
3675
3676fi
3677  if test "${ac_cv_path_install+set}" = set; then
3678    INSTALL=$ac_cv_path_install
3679  else
3680    # As a last resort, use the slow shell script.  Don't cache a
3681    # value for INSTALL within a source directory, because that will
3682    # break other packages using the cache if that directory is
3683    # removed, or if the value is a relative name.
3684    INSTALL=$ac_install_sh
3685  fi
3686fi
3687{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
3688$as_echo "$INSTALL" >&6; }
3689
3690# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3691# It thinks the first close brace ends the variable substitution.
3692test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3693
3694test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3695
3696test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3697
3698
3699    #--------------------------------------------------------------------
3700    # Checks to see if the make program sets the $MAKE variable.
3701    #--------------------------------------------------------------------
3702
3703    { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3704$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3705set x ${MAKE-make}
3706ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3707if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
3708  $as_echo_n "(cached) " >&6
3709else
3710  cat >conftest.make <<\_ACEOF
3711SHELL = /bin/sh
3712all:
3713	@echo '@@@%%%=$(MAKE)=@@@%%%'
3714_ACEOF
3715# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3716case `${MAKE-make} -f conftest.make 2>/dev/null` in
3717  *@@@%%%=?*=@@@%%%*)
3718    eval ac_cv_prog_make_${ac_make}_set=yes;;
3719  *)
3720    eval ac_cv_prog_make_${ac_make}_set=no;;
3721esac
3722rm -f conftest.make
3723fi
3724if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3725  { $as_echo "$as_me:$LINENO: result: yes" >&5
3726$as_echo "yes" >&6; }
3727  SET_MAKE=
3728else
3729  { $as_echo "$as_me:$LINENO: result: no" >&5
3730$as_echo "no" >&6; }
3731  SET_MAKE="MAKE=${MAKE-make}"
3732fi
3733
3734
3735    #--------------------------------------------------------------------
3736    # Find ranlib
3737    #--------------------------------------------------------------------
3738
3739    if test -n "$ac_tool_prefix"; then
3740  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3741set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3742{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3743$as_echo_n "checking for $ac_word... " >&6; }
3744if test "${ac_cv_prog_RANLIB+set}" = set; then
3745  $as_echo_n "(cached) " >&6
3746else
3747  if test -n "$RANLIB"; then
3748  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3749else
3750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3751for as_dir in $PATH
3752do
3753  IFS=$as_save_IFS
3754  test -z "$as_dir" && as_dir=.
3755  for ac_exec_ext in '' $ac_executable_extensions; do
3756  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3757    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3758    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3759    break 2
3760  fi
3761done
3762done
3763IFS=$as_save_IFS
3764
3765fi
3766fi
3767RANLIB=$ac_cv_prog_RANLIB
3768if test -n "$RANLIB"; then
3769  { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
3770$as_echo "$RANLIB" >&6; }
3771else
3772  { $as_echo "$as_me:$LINENO: result: no" >&5
3773$as_echo "no" >&6; }
3774fi
3775
3776
3777fi
3778if test -z "$ac_cv_prog_RANLIB"; then
3779  ac_ct_RANLIB=$RANLIB
3780  # Extract the first word of "ranlib", so it can be a program name with args.
3781set dummy ranlib; ac_word=$2
3782{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3783$as_echo_n "checking for $ac_word... " >&6; }
3784if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3785  $as_echo_n "(cached) " >&6
3786else
3787  if test -n "$ac_ct_RANLIB"; then
3788  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3789else
3790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3791for as_dir in $PATH
3792do
3793  IFS=$as_save_IFS
3794  test -z "$as_dir" && as_dir=.
3795  for ac_exec_ext in '' $ac_executable_extensions; do
3796  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3797    ac_cv_prog_ac_ct_RANLIB="ranlib"
3798    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3799    break 2
3800  fi
3801done
3802done
3803IFS=$as_save_IFS
3804
3805fi
3806fi
3807ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3808if test -n "$ac_ct_RANLIB"; then
3809  { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3810$as_echo "$ac_ct_RANLIB" >&6; }
3811else
3812  { $as_echo "$as_me:$LINENO: result: no" >&5
3813$as_echo "no" >&6; }
3814fi
3815
3816  if test "x$ac_ct_RANLIB" = x; then
3817    RANLIB=":"
3818  else
3819    case $cross_compiling:$ac_tool_warned in
3820yes:)
3821{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
3822$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3823ac_tool_warned=yes ;;
3824esac
3825    RANLIB=$ac_ct_RANLIB
3826  fi
3827else
3828  RANLIB="$ac_cv_prog_RANLIB"
3829fi
3830
3831
3832    #--------------------------------------------------------------------
3833    # Determines the correct binary file extension (.o, .obj, .exe etc.)
3834    #--------------------------------------------------------------------
3835
3836
3837
3838
3839
3840
3841{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3842$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3843if test "${ac_cv_path_GREP+set}" = set; then
3844  $as_echo_n "(cached) " >&6
3845else
3846  if test -z "$GREP"; then
3847  ac_path_GREP_found=false
3848  # Loop through the user's path and test for each of PROGNAME-LIST
3849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3850for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3851do
3852  IFS=$as_save_IFS
3853  test -z "$as_dir" && as_dir=.
3854  for ac_prog in grep ggrep; do
3855    for ac_exec_ext in '' $ac_executable_extensions; do
3856      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3857      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3858# Check for GNU ac_path_GREP and select it if it is found.
3859  # Check for GNU $ac_path_GREP
3860case `"$ac_path_GREP" --version 2>&1` in
3861*GNU*)
3862  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3863*)
3864  ac_count=0
3865  $as_echo_n 0123456789 >"conftest.in"
3866  while :
3867  do
3868    cat "conftest.in" "conftest.in" >"conftest.tmp"
3869    mv "conftest.tmp" "conftest.in"
3870    cp "conftest.in" "conftest.nl"
3871    $as_echo 'GREP' >> "conftest.nl"
3872    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3873    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3874    ac_count=`expr $ac_count + 1`
3875    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3876      # Best one so far, save it but keep looking for a better one
3877      ac_cv_path_GREP="$ac_path_GREP"
3878      ac_path_GREP_max=$ac_count
3879    fi
3880    # 10*(2^10) chars as input seems more than enough
3881    test $ac_count -gt 10 && break
3882  done
3883  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3884esac
3885
3886      $ac_path_GREP_found && break 3
3887    done
3888  done
3889done
3890IFS=$as_save_IFS
3891  if test -z "$ac_cv_path_GREP"; then
3892    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3893$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3894   { (exit 1); exit 1; }; }
3895  fi
3896else
3897  ac_cv_path_GREP=$GREP
3898fi
3899
3900fi
3901{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3902$as_echo "$ac_cv_path_GREP" >&6; }
3903 GREP="$ac_cv_path_GREP"
3904
3905
3906{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
3907$as_echo_n "checking for egrep... " >&6; }
3908if test "${ac_cv_path_EGREP+set}" = set; then
3909  $as_echo_n "(cached) " >&6
3910else
3911  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3912   then ac_cv_path_EGREP="$GREP -E"
3913   else
3914     if test -z "$EGREP"; then
3915  ac_path_EGREP_found=false
3916  # Loop through the user's path and test for each of PROGNAME-LIST
3917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3918for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3919do
3920  IFS=$as_save_IFS
3921  test -z "$as_dir" && as_dir=.
3922  for ac_prog in egrep; do
3923    for ac_exec_ext in '' $ac_executable_extensions; do
3924      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3925      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3926# Check for GNU ac_path_EGREP and select it if it is found.
3927  # Check for GNU $ac_path_EGREP
3928case `"$ac_path_EGREP" --version 2>&1` in
3929*GNU*)
3930  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3931*)
3932  ac_count=0
3933  $as_echo_n 0123456789 >"conftest.in"
3934  while :
3935  do
3936    cat "conftest.in" "conftest.in" >"conftest.tmp"
3937    mv "conftest.tmp" "conftest.in"
3938    cp "conftest.in" "conftest.nl"
3939    $as_echo 'EGREP' >> "conftest.nl"
3940    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3941    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3942    ac_count=`expr $ac_count + 1`
3943    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3944      # Best one so far, save it but keep looking for a better one
3945      ac_cv_path_EGREP="$ac_path_EGREP"
3946      ac_path_EGREP_max=$ac_count
3947    fi
3948    # 10*(2^10) chars as input seems more than enough
3949    test $ac_count -gt 10 && break
3950  done
3951  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3952esac
3953
3954      $ac_path_EGREP_found && break 3
3955    done
3956  done
3957done
3958IFS=$as_save_IFS
3959  if test -z "$ac_cv_path_EGREP"; then
3960    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3961$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3962   { (exit 1); exit 1; }; }
3963  fi
3964else
3965  ac_cv_path_EGREP=$EGREP
3966fi
3967
3968   fi
3969fi
3970{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3971$as_echo "$ac_cv_path_EGREP" >&6; }
3972 EGREP="$ac_cv_path_EGREP"
3973
3974
3975{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3976$as_echo_n "checking for ANSI C header files... " >&6; }
3977if test "${ac_cv_header_stdc+set}" = set; then
3978  $as_echo_n "(cached) " >&6
3979else
3980  cat >conftest.$ac_ext <<_ACEOF
3981/* confdefs.h.  */
3982_ACEOF
3983cat confdefs.h >>conftest.$ac_ext
3984cat >>conftest.$ac_ext <<_ACEOF
3985/* end confdefs.h.  */
3986#include <stdlib.h>
3987#include <stdarg.h>
3988#include <string.h>
3989#include <float.h>
3990
3991int
3992main ()
3993{
3994
3995  ;
3996  return 0;
3997}
3998_ACEOF
3999rm -f conftest.$ac_objext
4000if { (ac_try="$ac_compile"
4001case "(($ac_try" in
4002  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4003  *) ac_try_echo=$ac_try;;
4004esac
4005eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4006$as_echo "$ac_try_echo") >&5
4007  (eval "$ac_compile") 2>conftest.er1
4008  ac_status=$?
4009  grep -v '^ *+' conftest.er1 >conftest.err
4010  rm -f conftest.er1
4011  cat conftest.err >&5
4012  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4013  (exit $ac_status); } && {
4014	 test -z "$ac_c_werror_flag" ||
4015	 test ! -s conftest.err
4016       } && test -s conftest.$ac_objext; then
4017  ac_cv_header_stdc=yes
4018else
4019  $as_echo "$as_me: failed program was:" >&5
4020sed 's/^/| /' conftest.$ac_ext >&5
4021
4022	ac_cv_header_stdc=no
4023fi
4024
4025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4026
4027if test $ac_cv_header_stdc = yes; then
4028  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4029  cat >conftest.$ac_ext <<_ACEOF
4030/* confdefs.h.  */
4031_ACEOF
4032cat confdefs.h >>conftest.$ac_ext
4033cat >>conftest.$ac_ext <<_ACEOF
4034/* end confdefs.h.  */
4035#include <string.h>
4036
4037_ACEOF
4038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4039  $EGREP "memchr" >/dev/null 2>&1; then
4040  :
4041else
4042  ac_cv_header_stdc=no
4043fi
4044rm -f conftest*
4045
4046fi
4047
4048if test $ac_cv_header_stdc = yes; then
4049  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4050  cat >conftest.$ac_ext <<_ACEOF
4051/* confdefs.h.  */
4052_ACEOF
4053cat confdefs.h >>conftest.$ac_ext
4054cat >>conftest.$ac_ext <<_ACEOF
4055/* end confdefs.h.  */
4056#include <stdlib.h>
4057
4058_ACEOF
4059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4060  $EGREP "free" >/dev/null 2>&1; then
4061  :
4062else
4063  ac_cv_header_stdc=no
4064fi
4065rm -f conftest*
4066
4067fi
4068
4069if test $ac_cv_header_stdc = yes; then
4070  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4071  if test "$cross_compiling" = yes; then
4072  :
4073else
4074  cat >conftest.$ac_ext <<_ACEOF
4075/* confdefs.h.  */
4076_ACEOF
4077cat confdefs.h >>conftest.$ac_ext
4078cat >>conftest.$ac_ext <<_ACEOF
4079/* end confdefs.h.  */
4080#include <ctype.h>
4081#include <stdlib.h>
4082#if ((' ' & 0x0FF) == 0x020)
4083# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4084# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4085#else
4086# define ISLOWER(c) \
4087		   (('a' <= (c) && (c) <= 'i') \
4088		     || ('j' <= (c) && (c) <= 'r') \
4089		     || ('s' <= (c) && (c) <= 'z'))
4090# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4091#endif
4092
4093#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4094int
4095main ()
4096{
4097  int i;
4098  for (i = 0; i < 256; i++)
4099    if (XOR (islower (i), ISLOWER (i))
4100	|| toupper (i) != TOUPPER (i))
4101      return 2;
4102  return 0;
4103}
4104_ACEOF
4105rm -f conftest$ac_exeext
4106if { (ac_try="$ac_link"
4107case "(($ac_try" in
4108  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4109  *) ac_try_echo=$ac_try;;
4110esac
4111eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4112$as_echo "$ac_try_echo") >&5
4113  (eval "$ac_link") 2>&5
4114  ac_status=$?
4115  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4116  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4117  { (case "(($ac_try" in
4118  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4119  *) ac_try_echo=$ac_try;;
4120esac
4121eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4122$as_echo "$ac_try_echo") >&5
4123  (eval "$ac_try") 2>&5
4124  ac_status=$?
4125  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4126  (exit $ac_status); }; }; then
4127  :
4128else
4129  $as_echo "$as_me: program exited with status $ac_status" >&5
4130$as_echo "$as_me: failed program was:" >&5
4131sed 's/^/| /' conftest.$ac_ext >&5
4132
4133( exit $ac_status )
4134ac_cv_header_stdc=no
4135fi
4136rm -rf conftest.dSYM
4137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4138fi
4139
4140
4141fi
4142fi
4143{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4144$as_echo "$ac_cv_header_stdc" >&6; }
4145if test $ac_cv_header_stdc = yes; then
4146
4147cat >>confdefs.h <<\_ACEOF
4148#define STDC_HEADERS 1
4149_ACEOF
4150
4151fi
4152
4153# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4164		  inttypes.h stdint.h unistd.h
4165do
4166as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4167{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4168$as_echo_n "checking for $ac_header... " >&6; }
4169if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4170  $as_echo_n "(cached) " >&6
4171else
4172  cat >conftest.$ac_ext <<_ACEOF
4173/* confdefs.h.  */
4174_ACEOF
4175cat confdefs.h >>conftest.$ac_ext
4176cat >>conftest.$ac_ext <<_ACEOF
4177/* end confdefs.h.  */
4178$ac_includes_default
4179
4180#include <$ac_header>
4181_ACEOF
4182rm -f conftest.$ac_objext
4183if { (ac_try="$ac_compile"
4184case "(($ac_try" in
4185  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4186  *) ac_try_echo=$ac_try;;
4187esac
4188eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4189$as_echo "$ac_try_echo") >&5
4190  (eval "$ac_compile") 2>conftest.er1
4191  ac_status=$?
4192  grep -v '^ *+' conftest.er1 >conftest.err
4193  rm -f conftest.er1
4194  cat conftest.err >&5
4195  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4196  (exit $ac_status); } && {
4197	 test -z "$ac_c_werror_flag" ||
4198	 test ! -s conftest.err
4199       } && test -s conftest.$ac_objext; then
4200  eval "$as_ac_Header=yes"
4201else
4202  $as_echo "$as_me: failed program was:" >&5
4203sed 's/^/| /' conftest.$ac_ext >&5
4204
4205	eval "$as_ac_Header=no"
4206fi
4207
4208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4209fi
4210ac_res=`eval 'as_val=${'$as_ac_Header'}
4211		 $as_echo "$as_val"'`
4212	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4213$as_echo "$ac_res" >&6; }
4214as_val=`eval 'as_val=${'$as_ac_Header'}
4215		 $as_echo "$as_val"'`
4216   if test "x$as_val" = x""yes; then
4217  cat >>confdefs.h <<_ACEOF
4218#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4219_ACEOF
4220
4221fi
4222
4223done
4224
4225
4226
4227    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4228
4229
4230    #------------------------------------------------------------------------
4231    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4232    # It makes compiling go faster.  (This is only a performance feature.)
4233    #------------------------------------------------------------------------
4234
4235    if test -z "$no_pipe" -a -n "$GCC"; then
4236	{ $as_echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
4237$as_echo_n "checking if the compiler understands -pipe... " >&6; }
4238	OLDCC="$CC"
4239	CC="$CC -pipe"
4240	cat >conftest.$ac_ext <<_ACEOF
4241/* confdefs.h.  */
4242_ACEOF
4243cat confdefs.h >>conftest.$ac_ext
4244cat >>conftest.$ac_ext <<_ACEOF
4245/* end confdefs.h.  */
4246
4247int
4248main ()
4249{
4250
4251  ;
4252  return 0;
4253}
4254_ACEOF
4255rm -f conftest.$ac_objext
4256if { (ac_try="$ac_compile"
4257case "(($ac_try" in
4258  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4259  *) ac_try_echo=$ac_try;;
4260esac
4261eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4262$as_echo "$ac_try_echo") >&5
4263  (eval "$ac_compile") 2>conftest.er1
4264  ac_status=$?
4265  grep -v '^ *+' conftest.er1 >conftest.err
4266  rm -f conftest.er1
4267  cat conftest.err >&5
4268  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4269  (exit $ac_status); } && {
4270	 test -z "$ac_c_werror_flag" ||
4271	 test ! -s conftest.err
4272       } && test -s conftest.$ac_objext; then
4273  { $as_echo "$as_me:$LINENO: result: yes" >&5
4274$as_echo "yes" >&6; }
4275else
4276  $as_echo "$as_me: failed program was:" >&5
4277sed 's/^/| /' conftest.$ac_ext >&5
4278
4279	CC="$OLDCC"
4280	    { $as_echo "$as_me:$LINENO: result: no" >&5
4281$as_echo "no" >&6; }
4282fi
4283
4284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4285    fi
4286
4287    #--------------------------------------------------------------------
4288    # Common compiler flag setup
4289    #--------------------------------------------------------------------
4290
4291
4292 { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
4293$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
4294if test "${ac_cv_c_bigendian+set}" = set; then
4295  $as_echo_n "(cached) " >&6
4296else
4297  ac_cv_c_bigendian=unknown
4298    # See if we're dealing with a universal compiler.
4299    cat >conftest.$ac_ext <<_ACEOF
4300/* confdefs.h.  */
4301_ACEOF
4302cat confdefs.h >>conftest.$ac_ext
4303cat >>conftest.$ac_ext <<_ACEOF
4304/* end confdefs.h.  */
4305#ifndef __APPLE_CC__
4306	       not a universal capable compiler
4307	     #endif
4308	     typedef int dummy;
4309
4310_ACEOF
4311rm -f conftest.$ac_objext
4312if { (ac_try="$ac_compile"
4313case "(($ac_try" in
4314  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4315  *) ac_try_echo=$ac_try;;
4316esac
4317eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4318$as_echo "$ac_try_echo") >&5
4319  (eval "$ac_compile") 2>conftest.er1
4320  ac_status=$?
4321  grep -v '^ *+' conftest.er1 >conftest.err
4322  rm -f conftest.er1
4323  cat conftest.err >&5
4324  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4325  (exit $ac_status); } && {
4326	 test -z "$ac_c_werror_flag" ||
4327	 test ! -s conftest.err
4328       } && test -s conftest.$ac_objext; then
4329
4330	# Check for potential -arch flags.  It is not universal unless
4331	# there are some -arch flags.  Note that *ppc* also matches
4332	# ppc64.  This check is also rather less than ideal.
4333	case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
4334	  *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
4335	esac
4336else
4337  $as_echo "$as_me: failed program was:" >&5
4338sed 's/^/| /' conftest.$ac_ext >&5
4339
4340
4341fi
4342
4343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4344    if test $ac_cv_c_bigendian = unknown; then
4345      # See if sys/param.h defines the BYTE_ORDER macro.
4346      cat >conftest.$ac_ext <<_ACEOF
4347/* confdefs.h.  */
4348_ACEOF
4349cat confdefs.h >>conftest.$ac_ext
4350cat >>conftest.$ac_ext <<_ACEOF
4351/* end confdefs.h.  */
4352#include <sys/types.h>
4353	     #include <sys/param.h>
4354
4355int
4356main ()
4357{
4358#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
4359		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
4360		     && LITTLE_ENDIAN)
4361	      bogus endian macros
4362	     #endif
4363
4364  ;
4365  return 0;
4366}
4367_ACEOF
4368rm -f conftest.$ac_objext
4369if { (ac_try="$ac_compile"
4370case "(($ac_try" in
4371  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4372  *) ac_try_echo=$ac_try;;
4373esac
4374eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4375$as_echo "$ac_try_echo") >&5
4376  (eval "$ac_compile") 2>conftest.er1
4377  ac_status=$?
4378  grep -v '^ *+' conftest.er1 >conftest.err
4379  rm -f conftest.er1
4380  cat conftest.err >&5
4381  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4382  (exit $ac_status); } && {
4383	 test -z "$ac_c_werror_flag" ||
4384	 test ! -s conftest.err
4385       } && test -s conftest.$ac_objext; then
4386  # It does; now see whether it defined to BIG_ENDIAN or not.
4387	 cat >conftest.$ac_ext <<_ACEOF
4388/* confdefs.h.  */
4389_ACEOF
4390cat confdefs.h >>conftest.$ac_ext
4391cat >>conftest.$ac_ext <<_ACEOF
4392/* end confdefs.h.  */
4393#include <sys/types.h>
4394		#include <sys/param.h>
4395
4396int
4397main ()
4398{
4399#if BYTE_ORDER != BIG_ENDIAN
4400		 not big endian
4401		#endif
4402
4403  ;
4404  return 0;
4405}
4406_ACEOF
4407rm -f conftest.$ac_objext
4408if { (ac_try="$ac_compile"
4409case "(($ac_try" in
4410  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4411  *) ac_try_echo=$ac_try;;
4412esac
4413eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4414$as_echo "$ac_try_echo") >&5
4415  (eval "$ac_compile") 2>conftest.er1
4416  ac_status=$?
4417  grep -v '^ *+' conftest.er1 >conftest.err
4418  rm -f conftest.er1
4419  cat conftest.err >&5
4420  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4421  (exit $ac_status); } && {
4422	 test -z "$ac_c_werror_flag" ||
4423	 test ! -s conftest.err
4424       } && test -s conftest.$ac_objext; then
4425  ac_cv_c_bigendian=yes
4426else
4427  $as_echo "$as_me: failed program was:" >&5
4428sed 's/^/| /' conftest.$ac_ext >&5
4429
4430	ac_cv_c_bigendian=no
4431fi
4432
4433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4434else
4435  $as_echo "$as_me: failed program was:" >&5
4436sed 's/^/| /' conftest.$ac_ext >&5
4437
4438
4439fi
4440
4441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4442    fi
4443    if test $ac_cv_c_bigendian = unknown; then
4444      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
4445      cat >conftest.$ac_ext <<_ACEOF
4446/* confdefs.h.  */
4447_ACEOF
4448cat confdefs.h >>conftest.$ac_ext
4449cat >>conftest.$ac_ext <<_ACEOF
4450/* end confdefs.h.  */
4451#include <limits.h>
4452
4453int
4454main ()
4455{
4456#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
4457	      bogus endian macros
4458	     #endif
4459
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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4471$as_echo "$ac_try_echo") >&5
4472  (eval "$ac_compile") 2>conftest.er1
4473  ac_status=$?
4474  grep -v '^ *+' conftest.er1 >conftest.err
4475  rm -f conftest.er1
4476  cat conftest.err >&5
4477  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4478  (exit $ac_status); } && {
4479	 test -z "$ac_c_werror_flag" ||
4480	 test ! -s conftest.err
4481       } && test -s conftest.$ac_objext; then
4482  # It does; now see whether it defined to _BIG_ENDIAN or not.
4483	 cat >conftest.$ac_ext <<_ACEOF
4484/* confdefs.h.  */
4485_ACEOF
4486cat confdefs.h >>conftest.$ac_ext
4487cat >>conftest.$ac_ext <<_ACEOF
4488/* end confdefs.h.  */
4489#include <limits.h>
4490
4491int
4492main ()
4493{
4494#ifndef _BIG_ENDIAN
4495		 not big endian
4496		#endif
4497
4498  ;
4499  return 0;
4500}
4501_ACEOF
4502rm -f conftest.$ac_objext
4503if { (ac_try="$ac_compile"
4504case "(($ac_try" in
4505  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4506  *) ac_try_echo=$ac_try;;
4507esac
4508eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4509$as_echo "$ac_try_echo") >&5
4510  (eval "$ac_compile") 2>conftest.er1
4511  ac_status=$?
4512  grep -v '^ *+' conftest.er1 >conftest.err
4513  rm -f conftest.er1
4514  cat conftest.err >&5
4515  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4516  (exit $ac_status); } && {
4517	 test -z "$ac_c_werror_flag" ||
4518	 test ! -s conftest.err
4519       } && test -s conftest.$ac_objext; then
4520  ac_cv_c_bigendian=yes
4521else
4522  $as_echo "$as_me: failed program was:" >&5
4523sed 's/^/| /' conftest.$ac_ext >&5
4524
4525	ac_cv_c_bigendian=no
4526fi
4527
4528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4529else
4530  $as_echo "$as_me: failed program was:" >&5
4531sed 's/^/| /' conftest.$ac_ext >&5
4532
4533
4534fi
4535
4536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4537    fi
4538    if test $ac_cv_c_bigendian = unknown; then
4539      # Compile a test program.
4540      if test "$cross_compiling" = yes; then
4541  # Try to guess by grepping values from an object file.
4542	 cat >conftest.$ac_ext <<_ACEOF
4543/* confdefs.h.  */
4544_ACEOF
4545cat confdefs.h >>conftest.$ac_ext
4546cat >>conftest.$ac_ext <<_ACEOF
4547/* end confdefs.h.  */
4548short int ascii_mm[] =
4549		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4550		short int ascii_ii[] =
4551		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4552		int use_ascii (int i) {
4553		  return ascii_mm[i] + ascii_ii[i];
4554		}
4555		short int ebcdic_ii[] =
4556		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4557		short int ebcdic_mm[] =
4558		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4559		int use_ebcdic (int i) {
4560		  return ebcdic_mm[i] + ebcdic_ii[i];
4561		}
4562		extern int foo;
4563
4564int
4565main ()
4566{
4567return use_ascii (foo) == use_ebcdic (foo);
4568  ;
4569  return 0;
4570}
4571_ACEOF
4572rm -f conftest.$ac_objext
4573if { (ac_try="$ac_compile"
4574case "(($ac_try" in
4575  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4576  *) ac_try_echo=$ac_try;;
4577esac
4578eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4579$as_echo "$ac_try_echo") >&5
4580  (eval "$ac_compile") 2>conftest.er1
4581  ac_status=$?
4582  grep -v '^ *+' conftest.er1 >conftest.err
4583  rm -f conftest.er1
4584  cat conftest.err >&5
4585  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4586  (exit $ac_status); } && {
4587	 test -z "$ac_c_werror_flag" ||
4588	 test ! -s conftest.err
4589       } && test -s conftest.$ac_objext; then
4590  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4591	      ac_cv_c_bigendian=yes
4592	    fi
4593	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4594	      if test "$ac_cv_c_bigendian" = unknown; then
4595		ac_cv_c_bigendian=no
4596	      else
4597		# finding both strings is unlikely to happen, but who knows?
4598		ac_cv_c_bigendian=unknown
4599	      fi
4600	    fi
4601else
4602  $as_echo "$as_me: failed program was:" >&5
4603sed 's/^/| /' conftest.$ac_ext >&5
4604
4605
4606fi
4607
4608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4609else
4610  cat >conftest.$ac_ext <<_ACEOF
4611/* confdefs.h.  */
4612_ACEOF
4613cat confdefs.h >>conftest.$ac_ext
4614cat >>conftest.$ac_ext <<_ACEOF
4615/* end confdefs.h.  */
4616$ac_includes_default
4617int
4618main ()
4619{
4620
4621	     /* Are we little or big endian?  From Harbison&Steele.  */
4622	     union
4623	     {
4624	       long int l;
4625	       char c[sizeof (long int)];
4626	     } u;
4627	     u.l = 1;
4628	     return u.c[sizeof (long int) - 1] == 1;
4629
4630  ;
4631  return 0;
4632}
4633_ACEOF
4634rm -f conftest$ac_exeext
4635if { (ac_try="$ac_link"
4636case "(($ac_try" in
4637  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4638  *) ac_try_echo=$ac_try;;
4639esac
4640eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4641$as_echo "$ac_try_echo") >&5
4642  (eval "$ac_link") 2>&5
4643  ac_status=$?
4644  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4645  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4646  { (case "(($ac_try" in
4647  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4648  *) ac_try_echo=$ac_try;;
4649esac
4650eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4651$as_echo "$ac_try_echo") >&5
4652  (eval "$ac_try") 2>&5
4653  ac_status=$?
4654  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4655  (exit $ac_status); }; }; then
4656  ac_cv_c_bigendian=no
4657else
4658  $as_echo "$as_me: program exited with status $ac_status" >&5
4659$as_echo "$as_me: failed program was:" >&5
4660sed 's/^/| /' conftest.$ac_ext >&5
4661
4662( exit $ac_status )
4663ac_cv_c_bigendian=yes
4664fi
4665rm -rf conftest.dSYM
4666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4667fi
4668
4669
4670    fi
4671fi
4672{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
4673$as_echo "$ac_cv_c_bigendian" >&6; }
4674 case $ac_cv_c_bigendian in #(
4675   yes)
4676     cat >>confdefs.h <<\_ACEOF
4677#define WORDS_BIGENDIAN 1
4678_ACEOF
4679;; #(
4680   no)
4681      ;; #(
4682   universal)
4683
4684cat >>confdefs.h <<\_ACEOF
4685#define AC_APPLE_UNIVERSAL_BUILD 1
4686_ACEOF
4687
4688     ;; #(
4689   *)
4690     { { $as_echo "$as_me:$LINENO: error: unknown endianness
4691 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
4692$as_echo "$as_me: error: unknown endianness
4693 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
4694   { (exit 1); exit 1; }; } ;;
4695 esac
4696
4697    if test "${TEA_PLATFORM}" = "unix" ; then
4698
4699    #--------------------------------------------------------------------
4700    # On a few very rare systems, all of the libm.a stuff is
4701    # already in libc.a.  Set compiler flags accordingly.
4702    # Also, Linux requires the "ieee" library for math to work
4703    # right (and it must appear before "-lm").
4704    #--------------------------------------------------------------------
4705
4706    { $as_echo "$as_me:$LINENO: checking for sin" >&5
4707$as_echo_n "checking for sin... " >&6; }
4708if test "${ac_cv_func_sin+set}" = set; then
4709  $as_echo_n "(cached) " >&6
4710else
4711  cat >conftest.$ac_ext <<_ACEOF
4712/* confdefs.h.  */
4713_ACEOF
4714cat confdefs.h >>conftest.$ac_ext
4715cat >>conftest.$ac_ext <<_ACEOF
4716/* end confdefs.h.  */
4717/* Define sin to an innocuous variant, in case <limits.h> declares sin.
4718   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4719#define sin innocuous_sin
4720
4721/* System header to define __stub macros and hopefully few prototypes,
4722    which can conflict with char sin (); below.
4723    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4724    <limits.h> exists even on freestanding compilers.  */
4725
4726#ifdef __STDC__
4727# include <limits.h>
4728#else
4729# include <assert.h>
4730#endif
4731
4732#undef sin
4733
4734/* Override any GCC internal prototype to avoid an error.
4735   Use char because int might match the return type of a GCC
4736   builtin and then its argument prototype would still apply.  */
4737#ifdef __cplusplus
4738extern "C"
4739#endif
4740char sin ();
4741/* The GNU C library defines this for functions which it implements
4742    to always fail with ENOSYS.  Some functions are actually named
4743    something starting with __ and the normal name is an alias.  */
4744#if defined __stub_sin || defined __stub___sin
4745choke me
4746#endif
4747
4748int
4749main ()
4750{
4751return sin ();
4752  ;
4753  return 0;
4754}
4755_ACEOF
4756rm -f conftest.$ac_objext conftest$ac_exeext
4757if { (ac_try="$ac_link"
4758case "(($ac_try" in
4759  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4760  *) ac_try_echo=$ac_try;;
4761esac
4762eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4763$as_echo "$ac_try_echo") >&5
4764  (eval "$ac_link") 2>conftest.er1
4765  ac_status=$?
4766  grep -v '^ *+' conftest.er1 >conftest.err
4767  rm -f conftest.er1
4768  cat conftest.err >&5
4769  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4770  (exit $ac_status); } && {
4771	 test -z "$ac_c_werror_flag" ||
4772	 test ! -s conftest.err
4773       } && test -s conftest$ac_exeext && {
4774	 test "$cross_compiling" = yes ||
4775	 $as_test_x conftest$ac_exeext
4776       }; then
4777  ac_cv_func_sin=yes
4778else
4779  $as_echo "$as_me: failed program was:" >&5
4780sed 's/^/| /' conftest.$ac_ext >&5
4781
4782	ac_cv_func_sin=no
4783fi
4784
4785rm -rf conftest.dSYM
4786rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4787      conftest$ac_exeext conftest.$ac_ext
4788fi
4789{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
4790$as_echo "$ac_cv_func_sin" >&6; }
4791if test "x$ac_cv_func_sin" = x""yes; then
4792  MATH_LIBS=""
4793else
4794  MATH_LIBS="-lm"
4795fi
4796
4797    { $as_echo "$as_me:$LINENO: checking for main in -lieee" >&5
4798$as_echo_n "checking for main in -lieee... " >&6; }
4799if test "${ac_cv_lib_ieee_main+set}" = set; then
4800  $as_echo_n "(cached) " >&6
4801else
4802  ac_check_lib_save_LIBS=$LIBS
4803LIBS="-lieee  $LIBS"
4804cat >conftest.$ac_ext <<_ACEOF
4805/* confdefs.h.  */
4806_ACEOF
4807cat confdefs.h >>conftest.$ac_ext
4808cat >>conftest.$ac_ext <<_ACEOF
4809/* end confdefs.h.  */
4810
4811
4812int
4813main ()
4814{
4815return main ();
4816  ;
4817  return 0;
4818}
4819_ACEOF
4820rm -f conftest.$ac_objext conftest$ac_exeext
4821if { (ac_try="$ac_link"
4822case "(($ac_try" in
4823  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4824  *) ac_try_echo=$ac_try;;
4825esac
4826eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4827$as_echo "$ac_try_echo") >&5
4828  (eval "$ac_link") 2>conftest.er1
4829  ac_status=$?
4830  grep -v '^ *+' conftest.er1 >conftest.err
4831  rm -f conftest.er1
4832  cat conftest.err >&5
4833  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4834  (exit $ac_status); } && {
4835	 test -z "$ac_c_werror_flag" ||
4836	 test ! -s conftest.err
4837       } && test -s conftest$ac_exeext && {
4838	 test "$cross_compiling" = yes ||
4839	 $as_test_x conftest$ac_exeext
4840       }; then
4841  ac_cv_lib_ieee_main=yes
4842else
4843  $as_echo "$as_me: failed program was:" >&5
4844sed 's/^/| /' conftest.$ac_ext >&5
4845
4846	ac_cv_lib_ieee_main=no
4847fi
4848
4849rm -rf conftest.dSYM
4850rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4851      conftest$ac_exeext conftest.$ac_ext
4852LIBS=$ac_check_lib_save_LIBS
4853fi
4854{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
4855$as_echo "$ac_cv_lib_ieee_main" >&6; }
4856if test "x$ac_cv_lib_ieee_main" = x""yes; then
4857  MATH_LIBS="-lieee $MATH_LIBS"
4858fi
4859
4860
4861    #--------------------------------------------------------------------
4862    # Interactive UNIX requires -linet instead of -lsocket, plus it
4863    # needs net/errno.h to define the socket-related error codes.
4864    #--------------------------------------------------------------------
4865
4866    { $as_echo "$as_me:$LINENO: checking for main in -linet" >&5
4867$as_echo_n "checking for main in -linet... " >&6; }
4868if test "${ac_cv_lib_inet_main+set}" = set; then
4869  $as_echo_n "(cached) " >&6
4870else
4871  ac_check_lib_save_LIBS=$LIBS
4872LIBS="-linet  $LIBS"
4873cat >conftest.$ac_ext <<_ACEOF
4874/* confdefs.h.  */
4875_ACEOF
4876cat confdefs.h >>conftest.$ac_ext
4877cat >>conftest.$ac_ext <<_ACEOF
4878/* end confdefs.h.  */
4879
4880
4881int
4882main ()
4883{
4884return main ();
4885  ;
4886  return 0;
4887}
4888_ACEOF
4889rm -f conftest.$ac_objext conftest$ac_exeext
4890if { (ac_try="$ac_link"
4891case "(($ac_try" in
4892  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4893  *) ac_try_echo=$ac_try;;
4894esac
4895eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4896$as_echo "$ac_try_echo") >&5
4897  (eval "$ac_link") 2>conftest.er1
4898  ac_status=$?
4899  grep -v '^ *+' conftest.er1 >conftest.err
4900  rm -f conftest.er1
4901  cat conftest.err >&5
4902  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4903  (exit $ac_status); } && {
4904	 test -z "$ac_c_werror_flag" ||
4905	 test ! -s conftest.err
4906       } && test -s conftest$ac_exeext && {
4907	 test "$cross_compiling" = yes ||
4908	 $as_test_x conftest$ac_exeext
4909       }; then
4910  ac_cv_lib_inet_main=yes
4911else
4912  $as_echo "$as_me: failed program was:" >&5
4913sed 's/^/| /' conftest.$ac_ext >&5
4914
4915	ac_cv_lib_inet_main=no
4916fi
4917
4918rm -rf conftest.dSYM
4919rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4920      conftest$ac_exeext conftest.$ac_ext
4921LIBS=$ac_check_lib_save_LIBS
4922fi
4923{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
4924$as_echo "$ac_cv_lib_inet_main" >&6; }
4925if test "x$ac_cv_lib_inet_main" = x""yes; then
4926  LIBS="$LIBS -linet"
4927fi
4928
4929    if test "${ac_cv_header_net_errno_h+set}" = set; then
4930  { $as_echo "$as_me:$LINENO: checking for net/errno.h" >&5
4931$as_echo_n "checking for net/errno.h... " >&6; }
4932if test "${ac_cv_header_net_errno_h+set}" = set; then
4933  $as_echo_n "(cached) " >&6
4934fi
4935{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4936$as_echo "$ac_cv_header_net_errno_h" >&6; }
4937else
4938  # Is the header compilable?
4939{ $as_echo "$as_me:$LINENO: checking net/errno.h usability" >&5
4940$as_echo_n "checking net/errno.h usability... " >&6; }
4941cat >conftest.$ac_ext <<_ACEOF
4942/* confdefs.h.  */
4943_ACEOF
4944cat confdefs.h >>conftest.$ac_ext
4945cat >>conftest.$ac_ext <<_ACEOF
4946/* end confdefs.h.  */
4947$ac_includes_default
4948#include <net/errno.h>
4949_ACEOF
4950rm -f conftest.$ac_objext
4951if { (ac_try="$ac_compile"
4952case "(($ac_try" in
4953  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4954  *) ac_try_echo=$ac_try;;
4955esac
4956eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4957$as_echo "$ac_try_echo") >&5
4958  (eval "$ac_compile") 2>conftest.er1
4959  ac_status=$?
4960  grep -v '^ *+' conftest.er1 >conftest.err
4961  rm -f conftest.er1
4962  cat conftest.err >&5
4963  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4964  (exit $ac_status); } && {
4965	 test -z "$ac_c_werror_flag" ||
4966	 test ! -s conftest.err
4967       } && test -s conftest.$ac_objext; then
4968  ac_header_compiler=yes
4969else
4970  $as_echo "$as_me: failed program was:" >&5
4971sed 's/^/| /' conftest.$ac_ext >&5
4972
4973	ac_header_compiler=no
4974fi
4975
4976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4977{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4978$as_echo "$ac_header_compiler" >&6; }
4979
4980# Is the header present?
4981{ $as_echo "$as_me:$LINENO: checking net/errno.h presence" >&5
4982$as_echo_n "checking net/errno.h presence... " >&6; }
4983cat >conftest.$ac_ext <<_ACEOF
4984/* confdefs.h.  */
4985_ACEOF
4986cat confdefs.h >>conftest.$ac_ext
4987cat >>conftest.$ac_ext <<_ACEOF
4988/* end confdefs.h.  */
4989#include <net/errno.h>
4990_ACEOF
4991if { (ac_try="$ac_cpp conftest.$ac_ext"
4992case "(($ac_try" in
4993  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4994  *) ac_try_echo=$ac_try;;
4995esac
4996eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4997$as_echo "$ac_try_echo") >&5
4998  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4999  ac_status=$?
5000  grep -v '^ *+' conftest.er1 >conftest.err
5001  rm -f conftest.er1
5002  cat conftest.err >&5
5003  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5004  (exit $ac_status); } >/dev/null && {
5005	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5006	 test ! -s conftest.err
5007       }; then
5008  ac_header_preproc=yes
5009else
5010  $as_echo "$as_me: failed program was:" >&5
5011sed 's/^/| /' conftest.$ac_ext >&5
5012
5013  ac_header_preproc=no
5014fi
5015
5016rm -f conftest.err conftest.$ac_ext
5017{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5018$as_echo "$ac_header_preproc" >&6; }
5019
5020# So?  What about this header?
5021case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5022  yes:no: )
5023    { $as_echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5024$as_echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5025    { $as_echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
5026$as_echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
5027    ac_header_preproc=yes
5028    ;;
5029  no:yes:* )
5030    { $as_echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
5031$as_echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
5032    { $as_echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
5033$as_echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
5034    { $as_echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
5035$as_echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
5036    { $as_echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5037$as_echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5038    { $as_echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
5039$as_echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
5040    { $as_echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
5041$as_echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
5042
5043    ;;
5044esac
5045{ $as_echo "$as_me:$LINENO: checking for net/errno.h" >&5
5046$as_echo_n "checking for net/errno.h... " >&6; }
5047if test "${ac_cv_header_net_errno_h+set}" = set; then
5048  $as_echo_n "(cached) " >&6
5049else
5050  ac_cv_header_net_errno_h=$ac_header_preproc
5051fi
5052{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
5053$as_echo "$ac_cv_header_net_errno_h" >&6; }
5054
5055fi
5056if test "x$ac_cv_header_net_errno_h" = x""yes; then
5057  cat >>confdefs.h <<\_ACEOF
5058#define HAVE_NET_ERRNO_H 1
5059_ACEOF
5060
5061fi
5062
5063
5064
5065    #--------------------------------------------------------------------
5066    #	Check for the existence of the -lsocket and -lnsl libraries.
5067    #	The order here is important, so that they end up in the right
5068    #	order in the command line generated by make.  Here are some
5069    #	special considerations:
5070    #	1. Use "connect" and "accept" to check for -lsocket, and
5071    #	   "gethostbyname" to check for -lnsl.
5072    #	2. Use each function name only once:  can't redo a check because
5073    #	   autoconf caches the results of the last check and won't redo it.
5074    #	3. Use -lnsl and -lsocket only if they supply procedures that
5075    #	   aren't already present in the normal libraries.  This is because
5076    #	   IRIX 5.2 has libraries, but they aren't needed and they're
5077    #	   bogus:  they goof up name resolution if used.
5078    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
5079    #	   To get around this problem, check for both libraries together
5080    #	   if -lsocket doesn't work by itself.
5081    #--------------------------------------------------------------------
5082
5083    tcl_checkBoth=0
5084    { $as_echo "$as_me:$LINENO: checking for connect" >&5
5085$as_echo_n "checking for connect... " >&6; }
5086if test "${ac_cv_func_connect+set}" = set; then
5087  $as_echo_n "(cached) " >&6
5088else
5089  cat >conftest.$ac_ext <<_ACEOF
5090/* confdefs.h.  */
5091_ACEOF
5092cat confdefs.h >>conftest.$ac_ext
5093cat >>conftest.$ac_ext <<_ACEOF
5094/* end confdefs.h.  */
5095/* Define connect to an innocuous variant, in case <limits.h> declares connect.
5096   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5097#define connect innocuous_connect
5098
5099/* System header to define __stub macros and hopefully few prototypes,
5100    which can conflict with char connect (); below.
5101    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5102    <limits.h> exists even on freestanding compilers.  */
5103
5104#ifdef __STDC__
5105# include <limits.h>
5106#else
5107# include <assert.h>
5108#endif
5109
5110#undef connect
5111
5112/* Override any GCC internal prototype to avoid an error.
5113   Use char because int might match the return type of a GCC
5114   builtin and then its argument prototype would still apply.  */
5115#ifdef __cplusplus
5116extern "C"
5117#endif
5118char connect ();
5119/* The GNU C library defines this for functions which it implements
5120    to always fail with ENOSYS.  Some functions are actually named
5121    something starting with __ and the normal name is an alias.  */
5122#if defined __stub_connect || defined __stub___connect
5123choke me
5124#endif
5125
5126int
5127main ()
5128{
5129return connect ();
5130  ;
5131  return 0;
5132}
5133_ACEOF
5134rm -f conftest.$ac_objext conftest$ac_exeext
5135if { (ac_try="$ac_link"
5136case "(($ac_try" in
5137  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5138  *) ac_try_echo=$ac_try;;
5139esac
5140eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5141$as_echo "$ac_try_echo") >&5
5142  (eval "$ac_link") 2>conftest.er1
5143  ac_status=$?
5144  grep -v '^ *+' conftest.er1 >conftest.err
5145  rm -f conftest.er1
5146  cat conftest.err >&5
5147  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5148  (exit $ac_status); } && {
5149	 test -z "$ac_c_werror_flag" ||
5150	 test ! -s conftest.err
5151       } && test -s conftest$ac_exeext && {
5152	 test "$cross_compiling" = yes ||
5153	 $as_test_x conftest$ac_exeext
5154       }; then
5155  ac_cv_func_connect=yes
5156else
5157  $as_echo "$as_me: failed program was:" >&5
5158sed 's/^/| /' conftest.$ac_ext >&5
5159
5160	ac_cv_func_connect=no
5161fi
5162
5163rm -rf conftest.dSYM
5164rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5165      conftest$ac_exeext conftest.$ac_ext
5166fi
5167{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5168$as_echo "$ac_cv_func_connect" >&6; }
5169if test "x$ac_cv_func_connect" = x""yes; then
5170  tcl_checkSocket=0
5171else
5172  tcl_checkSocket=1
5173fi
5174
5175    if test "$tcl_checkSocket" = 1; then
5176	{ $as_echo "$as_me:$LINENO: checking for setsockopt" >&5
5177$as_echo_n "checking for setsockopt... " >&6; }
5178if test "${ac_cv_func_setsockopt+set}" = set; then
5179  $as_echo_n "(cached) " >&6
5180else
5181  cat >conftest.$ac_ext <<_ACEOF
5182/* confdefs.h.  */
5183_ACEOF
5184cat confdefs.h >>conftest.$ac_ext
5185cat >>conftest.$ac_ext <<_ACEOF
5186/* end confdefs.h.  */
5187/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
5188   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5189#define setsockopt innocuous_setsockopt
5190
5191/* System header to define __stub macros and hopefully few prototypes,
5192    which can conflict with char setsockopt (); below.
5193    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5194    <limits.h> exists even on freestanding compilers.  */
5195
5196#ifdef __STDC__
5197# include <limits.h>
5198#else
5199# include <assert.h>
5200#endif
5201
5202#undef setsockopt
5203
5204/* Override any GCC internal prototype to avoid an error.
5205   Use char because int might match the return type of a GCC
5206   builtin and then its argument prototype would still apply.  */
5207#ifdef __cplusplus
5208extern "C"
5209#endif
5210char setsockopt ();
5211/* The GNU C library defines this for functions which it implements
5212    to always fail with ENOSYS.  Some functions are actually named
5213    something starting with __ and the normal name is an alias.  */
5214#if defined __stub_setsockopt || defined __stub___setsockopt
5215choke me
5216#endif
5217
5218int
5219main ()
5220{
5221return setsockopt ();
5222  ;
5223  return 0;
5224}
5225_ACEOF
5226rm -f conftest.$ac_objext conftest$ac_exeext
5227if { (ac_try="$ac_link"
5228case "(($ac_try" in
5229  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5230  *) ac_try_echo=$ac_try;;
5231esac
5232eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5233$as_echo "$ac_try_echo") >&5
5234  (eval "$ac_link") 2>conftest.er1
5235  ac_status=$?
5236  grep -v '^ *+' conftest.er1 >conftest.err
5237  rm -f conftest.er1
5238  cat conftest.err >&5
5239  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5240  (exit $ac_status); } && {
5241	 test -z "$ac_c_werror_flag" ||
5242	 test ! -s conftest.err
5243       } && test -s conftest$ac_exeext && {
5244	 test "$cross_compiling" = yes ||
5245	 $as_test_x conftest$ac_exeext
5246       }; then
5247  ac_cv_func_setsockopt=yes
5248else
5249  $as_echo "$as_me: failed program was:" >&5
5250sed 's/^/| /' conftest.$ac_ext >&5
5251
5252	ac_cv_func_setsockopt=no
5253fi
5254
5255rm -rf conftest.dSYM
5256rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5257      conftest$ac_exeext conftest.$ac_ext
5258fi
5259{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
5260$as_echo "$ac_cv_func_setsockopt" >&6; }
5261if test "x$ac_cv_func_setsockopt" = x""yes; then
5262  :
5263else
5264  { $as_echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
5265$as_echo_n "checking for setsockopt in -lsocket... " >&6; }
5266if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
5267  $as_echo_n "(cached) " >&6
5268else
5269  ac_check_lib_save_LIBS=$LIBS
5270LIBS="-lsocket  $LIBS"
5271cat >conftest.$ac_ext <<_ACEOF
5272/* confdefs.h.  */
5273_ACEOF
5274cat confdefs.h >>conftest.$ac_ext
5275cat >>conftest.$ac_ext <<_ACEOF
5276/* end confdefs.h.  */
5277
5278/* Override any GCC internal prototype to avoid an error.
5279   Use char because int might match the return type of a GCC
5280   builtin and then its argument prototype would still apply.  */
5281#ifdef __cplusplus
5282extern "C"
5283#endif
5284char setsockopt ();
5285int
5286main ()
5287{
5288return setsockopt ();
5289  ;
5290  return 0;
5291}
5292_ACEOF
5293rm -f conftest.$ac_objext conftest$ac_exeext
5294if { (ac_try="$ac_link"
5295case "(($ac_try" in
5296  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5297  *) ac_try_echo=$ac_try;;
5298esac
5299eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5300$as_echo "$ac_try_echo") >&5
5301  (eval "$ac_link") 2>conftest.er1
5302  ac_status=$?
5303  grep -v '^ *+' conftest.er1 >conftest.err
5304  rm -f conftest.er1
5305  cat conftest.err >&5
5306  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5307  (exit $ac_status); } && {
5308	 test -z "$ac_c_werror_flag" ||
5309	 test ! -s conftest.err
5310       } && test -s conftest$ac_exeext && {
5311	 test "$cross_compiling" = yes ||
5312	 $as_test_x conftest$ac_exeext
5313       }; then
5314  ac_cv_lib_socket_setsockopt=yes
5315else
5316  $as_echo "$as_me: failed program was:" >&5
5317sed 's/^/| /' conftest.$ac_ext >&5
5318
5319	ac_cv_lib_socket_setsockopt=no
5320fi
5321
5322rm -rf conftest.dSYM
5323rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5324      conftest$ac_exeext conftest.$ac_ext
5325LIBS=$ac_check_lib_save_LIBS
5326fi
5327{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
5328$as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
5329if test "x$ac_cv_lib_socket_setsockopt" = x""yes; then
5330  LIBS="$LIBS -lsocket"
5331else
5332  tcl_checkBoth=1
5333fi
5334
5335fi
5336
5337    fi
5338    if test "$tcl_checkBoth" = 1; then
5339	tk_oldLibs=$LIBS
5340	LIBS="$LIBS -lsocket -lnsl"
5341	{ $as_echo "$as_me:$LINENO: checking for accept" >&5
5342$as_echo_n "checking for accept... " >&6; }
5343if test "${ac_cv_func_accept+set}" = set; then
5344  $as_echo_n "(cached) " >&6
5345else
5346  cat >conftest.$ac_ext <<_ACEOF
5347/* confdefs.h.  */
5348_ACEOF
5349cat confdefs.h >>conftest.$ac_ext
5350cat >>conftest.$ac_ext <<_ACEOF
5351/* end confdefs.h.  */
5352/* Define accept to an innocuous variant, in case <limits.h> declares accept.
5353   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5354#define accept innocuous_accept
5355
5356/* System header to define __stub macros and hopefully few prototypes,
5357    which can conflict with char accept (); below.
5358    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5359    <limits.h> exists even on freestanding compilers.  */
5360
5361#ifdef __STDC__
5362# include <limits.h>
5363#else
5364# include <assert.h>
5365#endif
5366
5367#undef accept
5368
5369/* Override any GCC internal prototype to avoid an error.
5370   Use char because int might match the return type of a GCC
5371   builtin and then its argument prototype would still apply.  */
5372#ifdef __cplusplus
5373extern "C"
5374#endif
5375char accept ();
5376/* The GNU C library defines this for functions which it implements
5377    to always fail with ENOSYS.  Some functions are actually named
5378    something starting with __ and the normal name is an alias.  */
5379#if defined __stub_accept || defined __stub___accept
5380choke me
5381#endif
5382
5383int
5384main ()
5385{
5386return accept ();
5387  ;
5388  return 0;
5389}
5390_ACEOF
5391rm -f conftest.$ac_objext conftest$ac_exeext
5392if { (ac_try="$ac_link"
5393case "(($ac_try" in
5394  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5395  *) ac_try_echo=$ac_try;;
5396esac
5397eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5398$as_echo "$ac_try_echo") >&5
5399  (eval "$ac_link") 2>conftest.er1
5400  ac_status=$?
5401  grep -v '^ *+' conftest.er1 >conftest.err
5402  rm -f conftest.er1
5403  cat conftest.err >&5
5404  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5405  (exit $ac_status); } && {
5406	 test -z "$ac_c_werror_flag" ||
5407	 test ! -s conftest.err
5408       } && test -s conftest$ac_exeext && {
5409	 test "$cross_compiling" = yes ||
5410	 $as_test_x conftest$ac_exeext
5411       }; then
5412  ac_cv_func_accept=yes
5413else
5414  $as_echo "$as_me: failed program was:" >&5
5415sed 's/^/| /' conftest.$ac_ext >&5
5416
5417	ac_cv_func_accept=no
5418fi
5419
5420rm -rf conftest.dSYM
5421rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5422      conftest$ac_exeext conftest.$ac_ext
5423fi
5424{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
5425$as_echo "$ac_cv_func_accept" >&6; }
5426if test "x$ac_cv_func_accept" = x""yes; then
5427  tcl_checkNsl=0
5428else
5429  LIBS=$tk_oldLibs
5430fi
5431
5432    fi
5433    { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5
5434$as_echo_n "checking for gethostbyname... " >&6; }
5435if test "${ac_cv_func_gethostbyname+set}" = set; then
5436  $as_echo_n "(cached) " >&6
5437else
5438  cat >conftest.$ac_ext <<_ACEOF
5439/* confdefs.h.  */
5440_ACEOF
5441cat confdefs.h >>conftest.$ac_ext
5442cat >>conftest.$ac_ext <<_ACEOF
5443/* end confdefs.h.  */
5444/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5445   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5446#define gethostbyname innocuous_gethostbyname
5447
5448/* System header to define __stub macros and hopefully few prototypes,
5449    which can conflict with char gethostbyname (); below.
5450    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5451    <limits.h> exists even on freestanding compilers.  */
5452
5453#ifdef __STDC__
5454# include <limits.h>
5455#else
5456# include <assert.h>
5457#endif
5458
5459#undef gethostbyname
5460
5461/* Override any GCC internal prototype to avoid an error.
5462   Use char because int might match the return type of a GCC
5463   builtin and then its argument prototype would still apply.  */
5464#ifdef __cplusplus
5465extern "C"
5466#endif
5467char gethostbyname ();
5468/* The GNU C library defines this for functions which it implements
5469    to always fail with ENOSYS.  Some functions are actually named
5470    something starting with __ and the normal name is an alias.  */
5471#if defined __stub_gethostbyname || defined __stub___gethostbyname
5472choke me
5473#endif
5474
5475int
5476main ()
5477{
5478return gethostbyname ();
5479  ;
5480  return 0;
5481}
5482_ACEOF
5483rm -f conftest.$ac_objext conftest$ac_exeext
5484if { (ac_try="$ac_link"
5485case "(($ac_try" in
5486  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5487  *) ac_try_echo=$ac_try;;
5488esac
5489eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5490$as_echo "$ac_try_echo") >&5
5491  (eval "$ac_link") 2>conftest.er1
5492  ac_status=$?
5493  grep -v '^ *+' conftest.er1 >conftest.err
5494  rm -f conftest.er1
5495  cat conftest.err >&5
5496  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5497  (exit $ac_status); } && {
5498	 test -z "$ac_c_werror_flag" ||
5499	 test ! -s conftest.err
5500       } && test -s conftest$ac_exeext && {
5501	 test "$cross_compiling" = yes ||
5502	 $as_test_x conftest$ac_exeext
5503       }; then
5504  ac_cv_func_gethostbyname=yes
5505else
5506  $as_echo "$as_me: failed program was:" >&5
5507sed 's/^/| /' conftest.$ac_ext >&5
5508
5509	ac_cv_func_gethostbyname=no
5510fi
5511
5512rm -rf conftest.dSYM
5513rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5514      conftest$ac_exeext conftest.$ac_ext
5515fi
5516{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5517$as_echo "$ac_cv_func_gethostbyname" >&6; }
5518if test "x$ac_cv_func_gethostbyname" = x""yes; then
5519  :
5520else
5521  { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5522$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
5523if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5524  $as_echo_n "(cached) " >&6
5525else
5526  ac_check_lib_save_LIBS=$LIBS
5527LIBS="-lnsl  $LIBS"
5528cat >conftest.$ac_ext <<_ACEOF
5529/* confdefs.h.  */
5530_ACEOF
5531cat confdefs.h >>conftest.$ac_ext
5532cat >>conftest.$ac_ext <<_ACEOF
5533/* end confdefs.h.  */
5534
5535/* Override any GCC internal prototype to avoid an error.
5536   Use char because int might match the return type of a GCC
5537   builtin and then its argument prototype would still apply.  */
5538#ifdef __cplusplus
5539extern "C"
5540#endif
5541char gethostbyname ();
5542int
5543main ()
5544{
5545return gethostbyname ();
5546  ;
5547  return 0;
5548}
5549_ACEOF
5550rm -f conftest.$ac_objext conftest$ac_exeext
5551if { (ac_try="$ac_link"
5552case "(($ac_try" in
5553  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5554  *) ac_try_echo=$ac_try;;
5555esac
5556eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5557$as_echo "$ac_try_echo") >&5
5558  (eval "$ac_link") 2>conftest.er1
5559  ac_status=$?
5560  grep -v '^ *+' conftest.er1 >conftest.err
5561  rm -f conftest.er1
5562  cat conftest.err >&5
5563  $as_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_exeext && {
5568	 test "$cross_compiling" = yes ||
5569	 $as_test_x conftest$ac_exeext
5570       }; then
5571  ac_cv_lib_nsl_gethostbyname=yes
5572else
5573  $as_echo "$as_me: failed program was:" >&5
5574sed 's/^/| /' conftest.$ac_ext >&5
5575
5576	ac_cv_lib_nsl_gethostbyname=no
5577fi
5578
5579rm -rf conftest.dSYM
5580rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5581      conftest$ac_exeext conftest.$ac_ext
5582LIBS=$ac_check_lib_save_LIBS
5583fi
5584{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5585$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
5586if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
5587  LIBS="$LIBS -lnsl"
5588fi
5589
5590fi
5591
5592
5593    # Don't perform the eval of the libraries here because DL_LIBS
5594    # won't be set until we call TEA_CONFIG_CFLAGS
5595
5596    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
5597
5598
5599
5600
5601    { $as_echo "$as_me:$LINENO: checking dirent.h" >&5
5602$as_echo_n "checking dirent.h... " >&6; }
5603    cat >conftest.$ac_ext <<_ACEOF
5604/* confdefs.h.  */
5605_ACEOF
5606cat confdefs.h >>conftest.$ac_ext
5607cat >>conftest.$ac_ext <<_ACEOF
5608/* end confdefs.h.  */
5609#include <sys/types.h>
5610#include <dirent.h>
5611int
5612main ()
5613{
5614
5615#ifndef _POSIX_SOURCE
5616#   ifdef __Lynx__
5617	/*
5618	 * Generate compilation error to make the test fail:  Lynx headers
5619	 * are only valid if really in the POSIX environment.
5620	 */
5621
5622	missing_procedure();
5623#   endif
5624#endif
5625DIR *d;
5626struct dirent *entryPtr;
5627char *p;
5628d = opendir("foobar");
5629entryPtr = readdir(d);
5630p = entryPtr->d_name;
5631closedir(d);
5632
5633  ;
5634  return 0;
5635}
5636_ACEOF
5637rm -f conftest.$ac_objext conftest$ac_exeext
5638if { (ac_try="$ac_link"
5639case "(($ac_try" in
5640  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5641  *) ac_try_echo=$ac_try;;
5642esac
5643eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5644$as_echo "$ac_try_echo") >&5
5645  (eval "$ac_link") 2>conftest.er1
5646  ac_status=$?
5647  grep -v '^ *+' conftest.er1 >conftest.err
5648  rm -f conftest.er1
5649  cat conftest.err >&5
5650  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5651  (exit $ac_status); } && {
5652	 test -z "$ac_c_werror_flag" ||
5653	 test ! -s conftest.err
5654       } && test -s conftest$ac_exeext && {
5655	 test "$cross_compiling" = yes ||
5656	 $as_test_x conftest$ac_exeext
5657       }; then
5658  tcl_ok=yes
5659else
5660  $as_echo "$as_me: failed program was:" >&5
5661sed 's/^/| /' conftest.$ac_ext >&5
5662
5663	tcl_ok=no
5664fi
5665
5666rm -rf conftest.dSYM
5667rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5668      conftest$ac_exeext conftest.$ac_ext
5669
5670    if test $tcl_ok = no; then
5671	cat >>confdefs.h <<\_ACEOF
5672#define NO_DIRENT_H 1
5673_ACEOF
5674
5675    fi
5676
5677    { $as_echo "$as_me:$LINENO: result: $tcl_ok" >&5
5678$as_echo "$tcl_ok" >&6; }
5679    if test "${ac_cv_header_errno_h+set}" = set; then
5680  { $as_echo "$as_me:$LINENO: checking for errno.h" >&5
5681$as_echo_n "checking for errno.h... " >&6; }
5682if test "${ac_cv_header_errno_h+set}" = set; then
5683  $as_echo_n "(cached) " >&6
5684fi
5685{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5686$as_echo "$ac_cv_header_errno_h" >&6; }
5687else
5688  # Is the header compilable?
5689{ $as_echo "$as_me:$LINENO: checking errno.h usability" >&5
5690$as_echo_n "checking errno.h usability... " >&6; }
5691cat >conftest.$ac_ext <<_ACEOF
5692/* confdefs.h.  */
5693_ACEOF
5694cat confdefs.h >>conftest.$ac_ext
5695cat >>conftest.$ac_ext <<_ACEOF
5696/* end confdefs.h.  */
5697$ac_includes_default
5698#include <errno.h>
5699_ACEOF
5700rm -f conftest.$ac_objext
5701if { (ac_try="$ac_compile"
5702case "(($ac_try" in
5703  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5704  *) ac_try_echo=$ac_try;;
5705esac
5706eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5707$as_echo "$ac_try_echo") >&5
5708  (eval "$ac_compile") 2>conftest.er1
5709  ac_status=$?
5710  grep -v '^ *+' conftest.er1 >conftest.err
5711  rm -f conftest.er1
5712  cat conftest.err >&5
5713  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5714  (exit $ac_status); } && {
5715	 test -z "$ac_c_werror_flag" ||
5716	 test ! -s conftest.err
5717       } && test -s conftest.$ac_objext; then
5718  ac_header_compiler=yes
5719else
5720  $as_echo "$as_me: failed program was:" >&5
5721sed 's/^/| /' conftest.$ac_ext >&5
5722
5723	ac_header_compiler=no
5724fi
5725
5726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5727{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5728$as_echo "$ac_header_compiler" >&6; }
5729
5730# Is the header present?
5731{ $as_echo "$as_me:$LINENO: checking errno.h presence" >&5
5732$as_echo_n "checking errno.h presence... " >&6; }
5733cat >conftest.$ac_ext <<_ACEOF
5734/* confdefs.h.  */
5735_ACEOF
5736cat confdefs.h >>conftest.$ac_ext
5737cat >>conftest.$ac_ext <<_ACEOF
5738/* end confdefs.h.  */
5739#include <errno.h>
5740_ACEOF
5741if { (ac_try="$ac_cpp conftest.$ac_ext"
5742case "(($ac_try" in
5743  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5744  *) ac_try_echo=$ac_try;;
5745esac
5746eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5747$as_echo "$ac_try_echo") >&5
5748  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5749  ac_status=$?
5750  grep -v '^ *+' conftest.er1 >conftest.err
5751  rm -f conftest.er1
5752  cat conftest.err >&5
5753  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5754  (exit $ac_status); } >/dev/null && {
5755	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5756	 test ! -s conftest.err
5757       }; then
5758  ac_header_preproc=yes
5759else
5760  $as_echo "$as_me: failed program was:" >&5
5761sed 's/^/| /' conftest.$ac_ext >&5
5762
5763  ac_header_preproc=no
5764fi
5765
5766rm -f conftest.err conftest.$ac_ext
5767{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5768$as_echo "$ac_header_preproc" >&6; }
5769
5770# So?  What about this header?
5771case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5772  yes:no: )
5773    { $as_echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5774$as_echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5775    { $as_echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
5776$as_echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
5777    ac_header_preproc=yes
5778    ;;
5779  no:yes:* )
5780    { $as_echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
5781$as_echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
5782    { $as_echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
5783$as_echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
5784    { $as_echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
5785$as_echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
5786    { $as_echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5787$as_echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5788    { $as_echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
5789$as_echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
5790    { $as_echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
5791$as_echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
5792
5793    ;;
5794esac
5795{ $as_echo "$as_me:$LINENO: checking for errno.h" >&5
5796$as_echo_n "checking for errno.h... " >&6; }
5797if test "${ac_cv_header_errno_h+set}" = set; then
5798  $as_echo_n "(cached) " >&6
5799else
5800  ac_cv_header_errno_h=$ac_header_preproc
5801fi
5802{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5803$as_echo "$ac_cv_header_errno_h" >&6; }
5804
5805fi
5806if test "x$ac_cv_header_errno_h" = x""yes; then
5807  :
5808else
5809  cat >>confdefs.h <<\_ACEOF
5810#define NO_ERRNO_H 1
5811_ACEOF
5812
5813fi
5814
5815
5816    if test "${ac_cv_header_float_h+set}" = set; then
5817  { $as_echo "$as_me:$LINENO: checking for float.h" >&5
5818$as_echo_n "checking for float.h... " >&6; }
5819if test "${ac_cv_header_float_h+set}" = set; then
5820  $as_echo_n "(cached) " >&6
5821fi
5822{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5823$as_echo "$ac_cv_header_float_h" >&6; }
5824else
5825  # Is the header compilable?
5826{ $as_echo "$as_me:$LINENO: checking float.h usability" >&5
5827$as_echo_n "checking float.h usability... " >&6; }
5828cat >conftest.$ac_ext <<_ACEOF
5829/* confdefs.h.  */
5830_ACEOF
5831cat confdefs.h >>conftest.$ac_ext
5832cat >>conftest.$ac_ext <<_ACEOF
5833/* end confdefs.h.  */
5834$ac_includes_default
5835#include <float.h>
5836_ACEOF
5837rm -f conftest.$ac_objext
5838if { (ac_try="$ac_compile"
5839case "(($ac_try" in
5840  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5841  *) ac_try_echo=$ac_try;;
5842esac
5843eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5844$as_echo "$ac_try_echo") >&5
5845  (eval "$ac_compile") 2>conftest.er1
5846  ac_status=$?
5847  grep -v '^ *+' conftest.er1 >conftest.err
5848  rm -f conftest.er1
5849  cat conftest.err >&5
5850  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5851  (exit $ac_status); } && {
5852	 test -z "$ac_c_werror_flag" ||
5853	 test ! -s conftest.err
5854       } && test -s conftest.$ac_objext; then
5855  ac_header_compiler=yes
5856else
5857  $as_echo "$as_me: failed program was:" >&5
5858sed 's/^/| /' conftest.$ac_ext >&5
5859
5860	ac_header_compiler=no
5861fi
5862
5863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5864{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5865$as_echo "$ac_header_compiler" >&6; }
5866
5867# Is the header present?
5868{ $as_echo "$as_me:$LINENO: checking float.h presence" >&5
5869$as_echo_n "checking float.h presence... " >&6; }
5870cat >conftest.$ac_ext <<_ACEOF
5871/* confdefs.h.  */
5872_ACEOF
5873cat confdefs.h >>conftest.$ac_ext
5874cat >>conftest.$ac_ext <<_ACEOF
5875/* end confdefs.h.  */
5876#include <float.h>
5877_ACEOF
5878if { (ac_try="$ac_cpp conftest.$ac_ext"
5879case "(($ac_try" in
5880  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5881  *) ac_try_echo=$ac_try;;
5882esac
5883eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5884$as_echo "$ac_try_echo") >&5
5885  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5886  ac_status=$?
5887  grep -v '^ *+' conftest.er1 >conftest.err
5888  rm -f conftest.er1
5889  cat conftest.err >&5
5890  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5891  (exit $ac_status); } >/dev/null && {
5892	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5893	 test ! -s conftest.err
5894       }; then
5895  ac_header_preproc=yes
5896else
5897  $as_echo "$as_me: failed program was:" >&5
5898sed 's/^/| /' conftest.$ac_ext >&5
5899
5900  ac_header_preproc=no
5901fi
5902
5903rm -f conftest.err conftest.$ac_ext
5904{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5905$as_echo "$ac_header_preproc" >&6; }
5906
5907# So?  What about this header?
5908case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5909  yes:no: )
5910    { $as_echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
5911$as_echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5912    { $as_echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
5913$as_echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
5914    ac_header_preproc=yes
5915    ;;
5916  no:yes:* )
5917    { $as_echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
5918$as_echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
5919    { $as_echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
5920$as_echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
5921    { $as_echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
5922$as_echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
5923    { $as_echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
5924$as_echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5925    { $as_echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
5926$as_echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
5927    { $as_echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
5928$as_echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
5929
5930    ;;
5931esac
5932{ $as_echo "$as_me:$LINENO: checking for float.h" >&5
5933$as_echo_n "checking for float.h... " >&6; }
5934if test "${ac_cv_header_float_h+set}" = set; then
5935  $as_echo_n "(cached) " >&6
5936else
5937  ac_cv_header_float_h=$ac_header_preproc
5938fi
5939{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5940$as_echo "$ac_cv_header_float_h" >&6; }
5941
5942fi
5943if test "x$ac_cv_header_float_h" = x""yes; then
5944  :
5945else
5946  cat >>confdefs.h <<\_ACEOF
5947#define NO_FLOAT_H 1
5948_ACEOF
5949
5950fi
5951
5952
5953    if test "${ac_cv_header_values_h+set}" = set; then
5954  { $as_echo "$as_me:$LINENO: checking for values.h" >&5
5955$as_echo_n "checking for values.h... " >&6; }
5956if test "${ac_cv_header_values_h+set}" = set; then
5957  $as_echo_n "(cached) " >&6
5958fi
5959{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5960$as_echo "$ac_cv_header_values_h" >&6; }
5961else
5962  # Is the header compilable?
5963{ $as_echo "$as_me:$LINENO: checking values.h usability" >&5
5964$as_echo_n "checking values.h usability... " >&6; }
5965cat >conftest.$ac_ext <<_ACEOF
5966/* confdefs.h.  */
5967_ACEOF
5968cat confdefs.h >>conftest.$ac_ext
5969cat >>conftest.$ac_ext <<_ACEOF
5970/* end confdefs.h.  */
5971$ac_includes_default
5972#include <values.h>
5973_ACEOF
5974rm -f conftest.$ac_objext
5975if { (ac_try="$ac_compile"
5976case "(($ac_try" in
5977  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5978  *) ac_try_echo=$ac_try;;
5979esac
5980eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5981$as_echo "$ac_try_echo") >&5
5982  (eval "$ac_compile") 2>conftest.er1
5983  ac_status=$?
5984  grep -v '^ *+' conftest.er1 >conftest.err
5985  rm -f conftest.er1
5986  cat conftest.err >&5
5987  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5988  (exit $ac_status); } && {
5989	 test -z "$ac_c_werror_flag" ||
5990	 test ! -s conftest.err
5991       } && test -s conftest.$ac_objext; then
5992  ac_header_compiler=yes
5993else
5994  $as_echo "$as_me: failed program was:" >&5
5995sed 's/^/| /' conftest.$ac_ext >&5
5996
5997	ac_header_compiler=no
5998fi
5999
6000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6001{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6002$as_echo "$ac_header_compiler" >&6; }
6003
6004# Is the header present?
6005{ $as_echo "$as_me:$LINENO: checking values.h presence" >&5
6006$as_echo_n "checking values.h presence... " >&6; }
6007cat >conftest.$ac_ext <<_ACEOF
6008/* confdefs.h.  */
6009_ACEOF
6010cat confdefs.h >>conftest.$ac_ext
6011cat >>conftest.$ac_ext <<_ACEOF
6012/* end confdefs.h.  */
6013#include <values.h>
6014_ACEOF
6015if { (ac_try="$ac_cpp conftest.$ac_ext"
6016case "(($ac_try" in
6017  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6018  *) ac_try_echo=$ac_try;;
6019esac
6020eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6021$as_echo "$ac_try_echo") >&5
6022  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6023  ac_status=$?
6024  grep -v '^ *+' conftest.er1 >conftest.err
6025  rm -f conftest.er1
6026  cat conftest.err >&5
6027  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6028  (exit $ac_status); } >/dev/null && {
6029	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6030	 test ! -s conftest.err
6031       }; then
6032  ac_header_preproc=yes
6033else
6034  $as_echo "$as_me: failed program was:" >&5
6035sed 's/^/| /' conftest.$ac_ext >&5
6036
6037  ac_header_preproc=no
6038fi
6039
6040rm -f conftest.err conftest.$ac_ext
6041{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6042$as_echo "$ac_header_preproc" >&6; }
6043
6044# So?  What about this header?
6045case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6046  yes:no: )
6047    { $as_echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
6048$as_echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6049    { $as_echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
6050$as_echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
6051    ac_header_preproc=yes
6052    ;;
6053  no:yes:* )
6054    { $as_echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
6055$as_echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
6056    { $as_echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
6057$as_echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
6058    { $as_echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
6059$as_echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
6060    { $as_echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
6061$as_echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6062    { $as_echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
6063$as_echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
6064    { $as_echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
6065$as_echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
6066
6067    ;;
6068esac
6069{ $as_echo "$as_me:$LINENO: checking for values.h" >&5
6070$as_echo_n "checking for values.h... " >&6; }
6071if test "${ac_cv_header_values_h+set}" = set; then
6072  $as_echo_n "(cached) " >&6
6073else
6074  ac_cv_header_values_h=$ac_header_preproc
6075fi
6076{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
6077$as_echo "$ac_cv_header_values_h" >&6; }
6078
6079fi
6080if test "x$ac_cv_header_values_h" = x""yes; then
6081  :
6082else
6083  cat >>confdefs.h <<\_ACEOF
6084#define NO_VALUES_H 1
6085_ACEOF
6086
6087fi
6088
6089
6090    if test "${ac_cv_header_limits_h+set}" = set; then
6091  { $as_echo "$as_me:$LINENO: checking for limits.h" >&5
6092$as_echo_n "checking for limits.h... " >&6; }
6093if test "${ac_cv_header_limits_h+set}" = set; then
6094  $as_echo_n "(cached) " >&6
6095fi
6096{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
6097$as_echo "$ac_cv_header_limits_h" >&6; }
6098else
6099  # Is the header compilable?
6100{ $as_echo "$as_me:$LINENO: checking limits.h usability" >&5
6101$as_echo_n "checking limits.h usability... " >&6; }
6102cat >conftest.$ac_ext <<_ACEOF
6103/* confdefs.h.  */
6104_ACEOF
6105cat confdefs.h >>conftest.$ac_ext
6106cat >>conftest.$ac_ext <<_ACEOF
6107/* end confdefs.h.  */
6108$ac_includes_default
6109#include <limits.h>
6110_ACEOF
6111rm -f conftest.$ac_objext
6112if { (ac_try="$ac_compile"
6113case "(($ac_try" in
6114  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6115  *) ac_try_echo=$ac_try;;
6116esac
6117eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6118$as_echo "$ac_try_echo") >&5
6119  (eval "$ac_compile") 2>conftest.er1
6120  ac_status=$?
6121  grep -v '^ *+' conftest.er1 >conftest.err
6122  rm -f conftest.er1
6123  cat conftest.err >&5
6124  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6125  (exit $ac_status); } && {
6126	 test -z "$ac_c_werror_flag" ||
6127	 test ! -s conftest.err
6128       } && test -s conftest.$ac_objext; then
6129  ac_header_compiler=yes
6130else
6131  $as_echo "$as_me: failed program was:" >&5
6132sed 's/^/| /' conftest.$ac_ext >&5
6133
6134	ac_header_compiler=no
6135fi
6136
6137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6138{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6139$as_echo "$ac_header_compiler" >&6; }
6140
6141# Is the header present?
6142{ $as_echo "$as_me:$LINENO: checking limits.h presence" >&5
6143$as_echo_n "checking limits.h presence... " >&6; }
6144cat >conftest.$ac_ext <<_ACEOF
6145/* confdefs.h.  */
6146_ACEOF
6147cat confdefs.h >>conftest.$ac_ext
6148cat >>conftest.$ac_ext <<_ACEOF
6149/* end confdefs.h.  */
6150#include <limits.h>
6151_ACEOF
6152if { (ac_try="$ac_cpp conftest.$ac_ext"
6153case "(($ac_try" in
6154  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6155  *) ac_try_echo=$ac_try;;
6156esac
6157eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6158$as_echo "$ac_try_echo") >&5
6159  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6160  ac_status=$?
6161  grep -v '^ *+' conftest.er1 >conftest.err
6162  rm -f conftest.er1
6163  cat conftest.err >&5
6164  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6165  (exit $ac_status); } >/dev/null && {
6166	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6167	 test ! -s conftest.err
6168       }; then
6169  ac_header_preproc=yes
6170else
6171  $as_echo "$as_me: failed program was:" >&5
6172sed 's/^/| /' conftest.$ac_ext >&5
6173
6174  ac_header_preproc=no
6175fi
6176
6177rm -f conftest.err conftest.$ac_ext
6178{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6179$as_echo "$ac_header_preproc" >&6; }
6180
6181# So?  What about this header?
6182case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6183  yes:no: )
6184    { $as_echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
6185$as_echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6186    { $as_echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
6187$as_echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
6188    ac_header_preproc=yes
6189    ;;
6190  no:yes:* )
6191    { $as_echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
6192$as_echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
6193    { $as_echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
6194$as_echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
6195    { $as_echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
6196$as_echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
6197    { $as_echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
6198$as_echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6199    { $as_echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
6200$as_echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
6201    { $as_echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
6202$as_echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
6203
6204    ;;
6205esac
6206{ $as_echo "$as_me:$LINENO: checking for limits.h" >&5
6207$as_echo_n "checking for limits.h... " >&6; }
6208if test "${ac_cv_header_limits_h+set}" = set; then
6209  $as_echo_n "(cached) " >&6
6210else
6211  ac_cv_header_limits_h=$ac_header_preproc
6212fi
6213{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
6214$as_echo "$ac_cv_header_limits_h" >&6; }
6215
6216fi
6217if test "x$ac_cv_header_limits_h" = x""yes; then
6218  cat >>confdefs.h <<\_ACEOF
6219#define HAVE_LIMITS_H 1
6220_ACEOF
6221
6222else
6223  cat >>confdefs.h <<\_ACEOF
6224#define NO_LIMITS_H 1
6225_ACEOF
6226
6227fi
6228
6229
6230    if test "${ac_cv_header_stdlib_h+set}" = set; then
6231  { $as_echo "$as_me:$LINENO: checking for stdlib.h" >&5
6232$as_echo_n "checking for stdlib.h... " >&6; }
6233if test "${ac_cv_header_stdlib_h+set}" = set; then
6234  $as_echo_n "(cached) " >&6
6235fi
6236{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
6237$as_echo "$ac_cv_header_stdlib_h" >&6; }
6238else
6239  # Is the header compilable?
6240{ $as_echo "$as_me:$LINENO: checking stdlib.h usability" >&5
6241$as_echo_n "checking stdlib.h usability... " >&6; }
6242cat >conftest.$ac_ext <<_ACEOF
6243/* confdefs.h.  */
6244_ACEOF
6245cat confdefs.h >>conftest.$ac_ext
6246cat >>conftest.$ac_ext <<_ACEOF
6247/* end confdefs.h.  */
6248$ac_includes_default
6249#include <stdlib.h>
6250_ACEOF
6251rm -f conftest.$ac_objext
6252if { (ac_try="$ac_compile"
6253case "(($ac_try" in
6254  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6255  *) ac_try_echo=$ac_try;;
6256esac
6257eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6258$as_echo "$ac_try_echo") >&5
6259  (eval "$ac_compile") 2>conftest.er1
6260  ac_status=$?
6261  grep -v '^ *+' conftest.er1 >conftest.err
6262  rm -f conftest.er1
6263  cat conftest.err >&5
6264  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6265  (exit $ac_status); } && {
6266	 test -z "$ac_c_werror_flag" ||
6267	 test ! -s conftest.err
6268       } && test -s conftest.$ac_objext; then
6269  ac_header_compiler=yes
6270else
6271  $as_echo "$as_me: failed program was:" >&5
6272sed 's/^/| /' conftest.$ac_ext >&5
6273
6274	ac_header_compiler=no
6275fi
6276
6277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6278{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6279$as_echo "$ac_header_compiler" >&6; }
6280
6281# Is the header present?
6282{ $as_echo "$as_me:$LINENO: checking stdlib.h presence" >&5
6283$as_echo_n "checking stdlib.h presence... " >&6; }
6284cat >conftest.$ac_ext <<_ACEOF
6285/* confdefs.h.  */
6286_ACEOF
6287cat confdefs.h >>conftest.$ac_ext
6288cat >>conftest.$ac_ext <<_ACEOF
6289/* end confdefs.h.  */
6290#include <stdlib.h>
6291_ACEOF
6292if { (ac_try="$ac_cpp conftest.$ac_ext"
6293case "(($ac_try" in
6294  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6295  *) ac_try_echo=$ac_try;;
6296esac
6297eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6298$as_echo "$ac_try_echo") >&5
6299  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6300  ac_status=$?
6301  grep -v '^ *+' conftest.er1 >conftest.err
6302  rm -f conftest.er1
6303  cat conftest.err >&5
6304  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6305  (exit $ac_status); } >/dev/null && {
6306	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6307	 test ! -s conftest.err
6308       }; then
6309  ac_header_preproc=yes
6310else
6311  $as_echo "$as_me: failed program was:" >&5
6312sed 's/^/| /' conftest.$ac_ext >&5
6313
6314  ac_header_preproc=no
6315fi
6316
6317rm -f conftest.err conftest.$ac_ext
6318{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6319$as_echo "$ac_header_preproc" >&6; }
6320
6321# So?  What about this header?
6322case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6323  yes:no: )
6324    { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
6325$as_echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6326    { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
6327$as_echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
6328    ac_header_preproc=yes
6329    ;;
6330  no:yes:* )
6331    { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
6332$as_echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
6333    { $as_echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
6334$as_echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
6335    { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
6336$as_echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
6337    { $as_echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
6338$as_echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6339    { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
6340$as_echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
6341    { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
6342$as_echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
6343
6344    ;;
6345esac
6346{ $as_echo "$as_me:$LINENO: checking for stdlib.h" >&5
6347$as_echo_n "checking for stdlib.h... " >&6; }
6348if test "${ac_cv_header_stdlib_h+set}" = set; then
6349  $as_echo_n "(cached) " >&6
6350else
6351  ac_cv_header_stdlib_h=$ac_header_preproc
6352fi
6353{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
6354$as_echo "$ac_cv_header_stdlib_h" >&6; }
6355
6356fi
6357if test "x$ac_cv_header_stdlib_h" = x""yes; then
6358  tcl_ok=1
6359else
6360  tcl_ok=0
6361fi
6362
6363
6364    cat >conftest.$ac_ext <<_ACEOF
6365/* confdefs.h.  */
6366_ACEOF
6367cat confdefs.h >>conftest.$ac_ext
6368cat >>conftest.$ac_ext <<_ACEOF
6369/* end confdefs.h.  */
6370#include <stdlib.h>
6371
6372_ACEOF
6373if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6374  $EGREP "strtol" >/dev/null 2>&1; then
6375  :
6376else
6377  tcl_ok=0
6378fi
6379rm -f conftest*
6380
6381    cat >conftest.$ac_ext <<_ACEOF
6382/* confdefs.h.  */
6383_ACEOF
6384cat confdefs.h >>conftest.$ac_ext
6385cat >>conftest.$ac_ext <<_ACEOF
6386/* end confdefs.h.  */
6387#include <stdlib.h>
6388
6389_ACEOF
6390if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6391  $EGREP "strtoul" >/dev/null 2>&1; then
6392  :
6393else
6394  tcl_ok=0
6395fi
6396rm -f conftest*
6397
6398    cat >conftest.$ac_ext <<_ACEOF
6399/* confdefs.h.  */
6400_ACEOF
6401cat confdefs.h >>conftest.$ac_ext
6402cat >>conftest.$ac_ext <<_ACEOF
6403/* end confdefs.h.  */
6404#include <stdlib.h>
6405
6406_ACEOF
6407if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6408  $EGREP "strtod" >/dev/null 2>&1; then
6409  :
6410else
6411  tcl_ok=0
6412fi
6413rm -f conftest*
6414
6415    if test $tcl_ok = 0; then
6416	cat >>confdefs.h <<\_ACEOF
6417#define NO_STDLIB_H 1
6418_ACEOF
6419
6420    fi
6421    if test "${ac_cv_header_string_h+set}" = set; then
6422  { $as_echo "$as_me:$LINENO: checking for string.h" >&5
6423$as_echo_n "checking for string.h... " >&6; }
6424if test "${ac_cv_header_string_h+set}" = set; then
6425  $as_echo_n "(cached) " >&6
6426fi
6427{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6428$as_echo "$ac_cv_header_string_h" >&6; }
6429else
6430  # Is the header compilable?
6431{ $as_echo "$as_me:$LINENO: checking string.h usability" >&5
6432$as_echo_n "checking string.h usability... " >&6; }
6433cat >conftest.$ac_ext <<_ACEOF
6434/* confdefs.h.  */
6435_ACEOF
6436cat confdefs.h >>conftest.$ac_ext
6437cat >>conftest.$ac_ext <<_ACEOF
6438/* end confdefs.h.  */
6439$ac_includes_default
6440#include <string.h>
6441_ACEOF
6442rm -f conftest.$ac_objext
6443if { (ac_try="$ac_compile"
6444case "(($ac_try" in
6445  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6446  *) ac_try_echo=$ac_try;;
6447esac
6448eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6449$as_echo "$ac_try_echo") >&5
6450  (eval "$ac_compile") 2>conftest.er1
6451  ac_status=$?
6452  grep -v '^ *+' conftest.er1 >conftest.err
6453  rm -f conftest.er1
6454  cat conftest.err >&5
6455  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6456  (exit $ac_status); } && {
6457	 test -z "$ac_c_werror_flag" ||
6458	 test ! -s conftest.err
6459       } && test -s conftest.$ac_objext; then
6460  ac_header_compiler=yes
6461else
6462  $as_echo "$as_me: failed program was:" >&5
6463sed 's/^/| /' conftest.$ac_ext >&5
6464
6465	ac_header_compiler=no
6466fi
6467
6468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6469{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6470$as_echo "$ac_header_compiler" >&6; }
6471
6472# Is the header present?
6473{ $as_echo "$as_me:$LINENO: checking string.h presence" >&5
6474$as_echo_n "checking string.h presence... " >&6; }
6475cat >conftest.$ac_ext <<_ACEOF
6476/* confdefs.h.  */
6477_ACEOF
6478cat confdefs.h >>conftest.$ac_ext
6479cat >>conftest.$ac_ext <<_ACEOF
6480/* end confdefs.h.  */
6481#include <string.h>
6482_ACEOF
6483if { (ac_try="$ac_cpp conftest.$ac_ext"
6484case "(($ac_try" in
6485  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6486  *) ac_try_echo=$ac_try;;
6487esac
6488eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6489$as_echo "$ac_try_echo") >&5
6490  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6491  ac_status=$?
6492  grep -v '^ *+' conftest.er1 >conftest.err
6493  rm -f conftest.er1
6494  cat conftest.err >&5
6495  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6496  (exit $ac_status); } >/dev/null && {
6497	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6498	 test ! -s conftest.err
6499       }; then
6500  ac_header_preproc=yes
6501else
6502  $as_echo "$as_me: failed program was:" >&5
6503sed 's/^/| /' conftest.$ac_ext >&5
6504
6505  ac_header_preproc=no
6506fi
6507
6508rm -f conftest.err conftest.$ac_ext
6509{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6510$as_echo "$ac_header_preproc" >&6; }
6511
6512# So?  What about this header?
6513case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6514  yes:no: )
6515    { $as_echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
6516$as_echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6517    { $as_echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
6518$as_echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
6519    ac_header_preproc=yes
6520    ;;
6521  no:yes:* )
6522    { $as_echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
6523$as_echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
6524    { $as_echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
6525$as_echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
6526    { $as_echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
6527$as_echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
6528    { $as_echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
6529$as_echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6530    { $as_echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
6531$as_echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
6532    { $as_echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
6533$as_echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
6534
6535    ;;
6536esac
6537{ $as_echo "$as_me:$LINENO: checking for string.h" >&5
6538$as_echo_n "checking for string.h... " >&6; }
6539if test "${ac_cv_header_string_h+set}" = set; then
6540  $as_echo_n "(cached) " >&6
6541else
6542  ac_cv_header_string_h=$ac_header_preproc
6543fi
6544{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6545$as_echo "$ac_cv_header_string_h" >&6; }
6546
6547fi
6548if test "x$ac_cv_header_string_h" = x""yes; then
6549  tcl_ok=1
6550else
6551  tcl_ok=0
6552fi
6553
6554
6555    cat >conftest.$ac_ext <<_ACEOF
6556/* confdefs.h.  */
6557_ACEOF
6558cat confdefs.h >>conftest.$ac_ext
6559cat >>conftest.$ac_ext <<_ACEOF
6560/* end confdefs.h.  */
6561#include <string.h>
6562
6563_ACEOF
6564if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6565  $EGREP "strstr" >/dev/null 2>&1; then
6566  :
6567else
6568  tcl_ok=0
6569fi
6570rm -f conftest*
6571
6572    cat >conftest.$ac_ext <<_ACEOF
6573/* confdefs.h.  */
6574_ACEOF
6575cat confdefs.h >>conftest.$ac_ext
6576cat >>conftest.$ac_ext <<_ACEOF
6577/* end confdefs.h.  */
6578#include <string.h>
6579
6580_ACEOF
6581if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6582  $EGREP "strerror" >/dev/null 2>&1; then
6583  :
6584else
6585  tcl_ok=0
6586fi
6587rm -f conftest*
6588
6589
6590    # See also memmove check below for a place where NO_STRING_H can be
6591    # set and why.
6592
6593    if test $tcl_ok = 0; then
6594	cat >>confdefs.h <<\_ACEOF
6595#define NO_STRING_H 1
6596_ACEOF
6597
6598    fi
6599
6600    if test "${ac_cv_header_sys_wait_h+set}" = set; then
6601  { $as_echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6602$as_echo_n "checking for sys/wait.h... " >&6; }
6603if test "${ac_cv_header_sys_wait_h+set}" = set; then
6604  $as_echo_n "(cached) " >&6
6605fi
6606{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6607$as_echo "$ac_cv_header_sys_wait_h" >&6; }
6608else
6609  # Is the header compilable?
6610{ $as_echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
6611$as_echo_n "checking sys/wait.h usability... " >&6; }
6612cat >conftest.$ac_ext <<_ACEOF
6613/* confdefs.h.  */
6614_ACEOF
6615cat confdefs.h >>conftest.$ac_ext
6616cat >>conftest.$ac_ext <<_ACEOF
6617/* end confdefs.h.  */
6618$ac_includes_default
6619#include <sys/wait.h>
6620_ACEOF
6621rm -f conftest.$ac_objext
6622if { (ac_try="$ac_compile"
6623case "(($ac_try" in
6624  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6625  *) ac_try_echo=$ac_try;;
6626esac
6627eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6628$as_echo "$ac_try_echo") >&5
6629  (eval "$ac_compile") 2>conftest.er1
6630  ac_status=$?
6631  grep -v '^ *+' conftest.er1 >conftest.err
6632  rm -f conftest.er1
6633  cat conftest.err >&5
6634  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6635  (exit $ac_status); } && {
6636	 test -z "$ac_c_werror_flag" ||
6637	 test ! -s conftest.err
6638       } && test -s conftest.$ac_objext; then
6639  ac_header_compiler=yes
6640else
6641  $as_echo "$as_me: failed program was:" >&5
6642sed 's/^/| /' conftest.$ac_ext >&5
6643
6644	ac_header_compiler=no
6645fi
6646
6647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6648{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6649$as_echo "$ac_header_compiler" >&6; }
6650
6651# Is the header present?
6652{ $as_echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
6653$as_echo_n "checking sys/wait.h presence... " >&6; }
6654cat >conftest.$ac_ext <<_ACEOF
6655/* confdefs.h.  */
6656_ACEOF
6657cat confdefs.h >>conftest.$ac_ext
6658cat >>conftest.$ac_ext <<_ACEOF
6659/* end confdefs.h.  */
6660#include <sys/wait.h>
6661_ACEOF
6662if { (ac_try="$ac_cpp conftest.$ac_ext"
6663case "(($ac_try" in
6664  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6665  *) ac_try_echo=$ac_try;;
6666esac
6667eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6668$as_echo "$ac_try_echo") >&5
6669  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6670  ac_status=$?
6671  grep -v '^ *+' conftest.er1 >conftest.err
6672  rm -f conftest.er1
6673  cat conftest.err >&5
6674  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6675  (exit $ac_status); } >/dev/null && {
6676	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6677	 test ! -s conftest.err
6678       }; then
6679  ac_header_preproc=yes
6680else
6681  $as_echo "$as_me: failed program was:" >&5
6682sed 's/^/| /' conftest.$ac_ext >&5
6683
6684  ac_header_preproc=no
6685fi
6686
6687rm -f conftest.err conftest.$ac_ext
6688{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6689$as_echo "$ac_header_preproc" >&6; }
6690
6691# So?  What about this header?
6692case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6693  yes:no: )
6694    { $as_echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
6695$as_echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6696    { $as_echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
6697$as_echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
6698    ac_header_preproc=yes
6699    ;;
6700  no:yes:* )
6701    { $as_echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
6702$as_echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
6703    { $as_echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
6704$as_echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
6705    { $as_echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
6706$as_echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
6707    { $as_echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
6708$as_echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6709    { $as_echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
6710$as_echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
6711    { $as_echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
6712$as_echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
6713
6714    ;;
6715esac
6716{ $as_echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6717$as_echo_n "checking for sys/wait.h... " >&6; }
6718if test "${ac_cv_header_sys_wait_h+set}" = set; then
6719  $as_echo_n "(cached) " >&6
6720else
6721  ac_cv_header_sys_wait_h=$ac_header_preproc
6722fi
6723{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6724$as_echo "$ac_cv_header_sys_wait_h" >&6; }
6725
6726fi
6727if test "x$ac_cv_header_sys_wait_h" = x""yes; then
6728  :
6729else
6730  cat >>confdefs.h <<\_ACEOF
6731#define NO_SYS_WAIT_H 1
6732_ACEOF
6733
6734fi
6735
6736
6737    if test "${ac_cv_header_dlfcn_h+set}" = set; then
6738  { $as_echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6739$as_echo_n "checking for dlfcn.h... " >&6; }
6740if test "${ac_cv_header_dlfcn_h+set}" = set; then
6741  $as_echo_n "(cached) " >&6
6742fi
6743{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6744$as_echo "$ac_cv_header_dlfcn_h" >&6; }
6745else
6746  # Is the header compilable?
6747{ $as_echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
6748$as_echo_n "checking dlfcn.h usability... " >&6; }
6749cat >conftest.$ac_ext <<_ACEOF
6750/* confdefs.h.  */
6751_ACEOF
6752cat confdefs.h >>conftest.$ac_ext
6753cat >>conftest.$ac_ext <<_ACEOF
6754/* end confdefs.h.  */
6755$ac_includes_default
6756#include <dlfcn.h>
6757_ACEOF
6758rm -f conftest.$ac_objext
6759if { (ac_try="$ac_compile"
6760case "(($ac_try" in
6761  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6762  *) ac_try_echo=$ac_try;;
6763esac
6764eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6765$as_echo "$ac_try_echo") >&5
6766  (eval "$ac_compile") 2>conftest.er1
6767  ac_status=$?
6768  grep -v '^ *+' conftest.er1 >conftest.err
6769  rm -f conftest.er1
6770  cat conftest.err >&5
6771  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6772  (exit $ac_status); } && {
6773	 test -z "$ac_c_werror_flag" ||
6774	 test ! -s conftest.err
6775       } && test -s conftest.$ac_objext; then
6776  ac_header_compiler=yes
6777else
6778  $as_echo "$as_me: failed program was:" >&5
6779sed 's/^/| /' conftest.$ac_ext >&5
6780
6781	ac_header_compiler=no
6782fi
6783
6784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6785{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6786$as_echo "$ac_header_compiler" >&6; }
6787
6788# Is the header present?
6789{ $as_echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
6790$as_echo_n "checking dlfcn.h presence... " >&6; }
6791cat >conftest.$ac_ext <<_ACEOF
6792/* confdefs.h.  */
6793_ACEOF
6794cat confdefs.h >>conftest.$ac_ext
6795cat >>conftest.$ac_ext <<_ACEOF
6796/* end confdefs.h.  */
6797#include <dlfcn.h>
6798_ACEOF
6799if { (ac_try="$ac_cpp conftest.$ac_ext"
6800case "(($ac_try" in
6801  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6802  *) ac_try_echo=$ac_try;;
6803esac
6804eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6805$as_echo "$ac_try_echo") >&5
6806  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6807  ac_status=$?
6808  grep -v '^ *+' conftest.er1 >conftest.err
6809  rm -f conftest.er1
6810  cat conftest.err >&5
6811  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6812  (exit $ac_status); } >/dev/null && {
6813	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6814	 test ! -s conftest.err
6815       }; then
6816  ac_header_preproc=yes
6817else
6818  $as_echo "$as_me: failed program was:" >&5
6819sed 's/^/| /' conftest.$ac_ext >&5
6820
6821  ac_header_preproc=no
6822fi
6823
6824rm -f conftest.err conftest.$ac_ext
6825{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6826$as_echo "$ac_header_preproc" >&6; }
6827
6828# So?  What about this header?
6829case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6830  yes:no: )
6831    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
6832$as_echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6833    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
6834$as_echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
6835    ac_header_preproc=yes
6836    ;;
6837  no:yes:* )
6838    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
6839$as_echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
6840    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
6841$as_echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
6842    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
6843$as_echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
6844    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
6845$as_echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6846    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
6847$as_echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
6848    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
6849$as_echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
6850
6851    ;;
6852esac
6853{ $as_echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6854$as_echo_n "checking for dlfcn.h... " >&6; }
6855if test "${ac_cv_header_dlfcn_h+set}" = set; then
6856  $as_echo_n "(cached) " >&6
6857else
6858  ac_cv_header_dlfcn_h=$ac_header_preproc
6859fi
6860{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6861$as_echo "$ac_cv_header_dlfcn_h" >&6; }
6862
6863fi
6864if test "x$ac_cv_header_dlfcn_h" = x""yes; then
6865  :
6866else
6867  cat >>confdefs.h <<\_ACEOF
6868#define NO_DLFCN_H 1
6869_ACEOF
6870
6871fi
6872
6873
6874
6875    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
6876
6877for ac_header in sys/param.h
6878do
6879as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6880if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6881  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6882$as_echo_n "checking for $ac_header... " >&6; }
6883if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6884  $as_echo_n "(cached) " >&6
6885fi
6886ac_res=`eval 'as_val=${'$as_ac_Header'}
6887		 $as_echo "$as_val"'`
6888	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6889$as_echo "$ac_res" >&6; }
6890else
6891  # Is the header compilable?
6892{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
6893$as_echo_n "checking $ac_header usability... " >&6; }
6894cat >conftest.$ac_ext <<_ACEOF
6895/* confdefs.h.  */
6896_ACEOF
6897cat confdefs.h >>conftest.$ac_ext
6898cat >>conftest.$ac_ext <<_ACEOF
6899/* end confdefs.h.  */
6900$ac_includes_default
6901#include <$ac_header>
6902_ACEOF
6903rm -f conftest.$ac_objext
6904if { (ac_try="$ac_compile"
6905case "(($ac_try" in
6906  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6907  *) ac_try_echo=$ac_try;;
6908esac
6909eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6910$as_echo "$ac_try_echo") >&5
6911  (eval "$ac_compile") 2>conftest.er1
6912  ac_status=$?
6913  grep -v '^ *+' conftest.er1 >conftest.err
6914  rm -f conftest.er1
6915  cat conftest.err >&5
6916  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6917  (exit $ac_status); } && {
6918	 test -z "$ac_c_werror_flag" ||
6919	 test ! -s conftest.err
6920       } && test -s conftest.$ac_objext; then
6921  ac_header_compiler=yes
6922else
6923  $as_echo "$as_me: failed program was:" >&5
6924sed 's/^/| /' conftest.$ac_ext >&5
6925
6926	ac_header_compiler=no
6927fi
6928
6929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6930{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6931$as_echo "$ac_header_compiler" >&6; }
6932
6933# Is the header present?
6934{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
6935$as_echo_n "checking $ac_header presence... " >&6; }
6936cat >conftest.$ac_ext <<_ACEOF
6937/* confdefs.h.  */
6938_ACEOF
6939cat confdefs.h >>conftest.$ac_ext
6940cat >>conftest.$ac_ext <<_ACEOF
6941/* end confdefs.h.  */
6942#include <$ac_header>
6943_ACEOF
6944if { (ac_try="$ac_cpp conftest.$ac_ext"
6945case "(($ac_try" in
6946  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6947  *) ac_try_echo=$ac_try;;
6948esac
6949eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6950$as_echo "$ac_try_echo") >&5
6951  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6952  ac_status=$?
6953  grep -v '^ *+' conftest.er1 >conftest.err
6954  rm -f conftest.er1
6955  cat conftest.err >&5
6956  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6957  (exit $ac_status); } >/dev/null && {
6958	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6959	 test ! -s conftest.err
6960       }; then
6961  ac_header_preproc=yes
6962else
6963  $as_echo "$as_me: failed program was:" >&5
6964sed 's/^/| /' conftest.$ac_ext >&5
6965
6966  ac_header_preproc=no
6967fi
6968
6969rm -f conftest.err conftest.$ac_ext
6970{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6971$as_echo "$ac_header_preproc" >&6; }
6972
6973# So?  What about this header?
6974case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6975  yes:no: )
6976    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6977$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6978    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6979$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6980    ac_header_preproc=yes
6981    ;;
6982  no:yes:* )
6983    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6984$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6985    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6986$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6987    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6988$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6989    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6990$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6991    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6992$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6993    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6994$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6995
6996    ;;
6997esac
6998{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6999$as_echo_n "checking for $ac_header... " >&6; }
7000if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7001  $as_echo_n "(cached) " >&6
7002else
7003  eval "$as_ac_Header=\$ac_header_preproc"
7004fi
7005ac_res=`eval 'as_val=${'$as_ac_Header'}
7006		 $as_echo "$as_val"'`
7007	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
7008$as_echo "$ac_res" >&6; }
7009
7010fi
7011as_val=`eval 'as_val=${'$as_ac_Header'}
7012		 $as_echo "$as_val"'`
7013   if test "x$as_val" = x""yes; then
7014  cat >>confdefs.h <<_ACEOF
7015#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7016_ACEOF
7017
7018fi
7019
7020done
7021
7022
7023
7024	# Let the user call this, because if it triggers, they will
7025	# need a compat/strtod.c that is correct.  Users can also
7026	# use Tcl_GetDouble(FromObj) instead.
7027	#TEA_BUGGY_STRTOD
7028    fi
7029
7030
7031#-----------------------------------------------------------------------
7032# __CHANGE__
7033# Specify the C source files to compile in TEA_ADD_SOURCES,
7034# public headers that need to be installed in TEA_ADD_HEADERS,
7035# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
7036# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
7037# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
7038# and PKG_TCL_SOURCES.
7039#-----------------------------------------------------------------------
7040
7041
7042    vars="../tk/tkgeomap.c ../tk/tkgeomapPlace.c ../tk/tkgeomapLnArr.c
7043    ../tk/tkTrig.c"
7044    for i in $vars; do
7045	case $i in
7046	    \$*)
7047		# allow $-var names
7048		PKG_SOURCES="$PKG_SOURCES $i"
7049		PKG_OBJECTS="$PKG_OBJECTS $i"
7050		;;
7051	    *)
7052		# check for existence - allows for generic/win/unix VPATH
7053		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
7054		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
7055		    ; then
7056		    { { $as_echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
7057$as_echo "$as_me: error: could not find source file '$i'" >&2;}
7058   { (exit 1); exit 1; }; }
7059		fi
7060		PKG_SOURCES="$PKG_SOURCES $i"
7061		# this assumes it is in a VPATH dir
7062		i=`basename $i`
7063		# handle user calling this before or after TEA_SETUP_COMPILER
7064		if test x"${OBJEXT}" != x ; then
7065		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
7066		else
7067		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
7068		fi
7069		PKG_OBJECTS="$PKG_OBJECTS $j"
7070		;;
7071	esac
7072    done
7073
7074
7075
7076
7077    vars="../tk/tkgeomap.h  ../tk/tkgeomapInt.h"
7078    for i in $vars; do
7079	# check for existence, be strict because it is installed
7080	if test ! -f "${srcdir}/$i" ; then
7081	    { { $as_echo "$as_me:$LINENO: error: could not find header file '${srcdir}/$i'" >&5
7082$as_echo "$as_me: error: could not find header file '${srcdir}/$i'" >&2;}
7083   { (exit 1); exit 1; }; }
7084	fi
7085	PKG_HEADERS="$PKG_HEADERS $i"
7086    done
7087
7088
7089
7090    vars="${TCLGEOMAP_INCLUDES} -I\"`${CYGPATH} ${srcdir}/generic`\""
7091    for i in $vars; do
7092	PKG_INCLUDES="$PKG_INCLUDES $i"
7093    done
7094
7095
7096
7097    vars=""
7098    for i in $vars; do
7099	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7100	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7101	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7102	fi
7103	PKG_LIBS="$PKG_LIBS $i"
7104    done
7105
7106
7107
7108    PKG_CFLAGS="$PKG_CFLAGS "
7109
7110
7111
7112    vars="../library/tkgeomap_procs.tcl ../library/wdgeomap.tcl"
7113    for i in $vars; do
7114	# check for existence, be strict because it is installed
7115	if test ! -f "${srcdir}/$i" ; then
7116	    { { $as_echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
7117$as_echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
7118   { (exit 1); exit 1; }; }
7119	fi
7120	PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
7121    done
7122
7123
7124
7125#--------------------------------------------------------------------
7126# __CHANGE__
7127# A few miscellaneous platform-specific items:
7128#
7129# Define a special symbol for Windows (BUILD_tkgeomap in this case) so
7130# that we create the export library with the dll.  See sha1.h on how
7131# to use this.
7132#
7133# Windows creates a few extra files that need to be cleaned up.
7134# You can add more files to clean if your extension creates any extra
7135# files.
7136#
7137# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
7138# These will be appended to the current set of compiler flags for
7139# your system.
7140#--------------------------------------------------------------------
7141
7142PACKAGE_CFLAGS=
7143
7144
7145if test "${TEA_PLATFORM}" = "windows" ; then
7146    cat >>confdefs.h <<\_ACEOF
7147#define BUILD_tkgeomap 1
7148_ACEOF
7149
7150    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
7151
7152    vars="dllEntryPoint.c"
7153    for i in $vars; do
7154	case $i in
7155	    \$*)
7156		# allow $-var names
7157		PKG_SOURCES="$PKG_SOURCES $i"
7158		PKG_OBJECTS="$PKG_OBJECTS $i"
7159		;;
7160	    *)
7161		# check for existence - allows for generic/win/unix VPATH
7162		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
7163		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
7164		    ; then
7165		    { { $as_echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
7166$as_echo "$as_me: error: could not find source file '$i'" >&2;}
7167   { (exit 1); exit 1; }; }
7168		fi
7169		PKG_SOURCES="$PKG_SOURCES $i"
7170		# this assumes it is in a VPATH dir
7171		i=`basename $i`
7172		# handle user calling this before or after TEA_SETUP_COMPILER
7173		if test x"${OBJEXT}" != x ; then
7174		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
7175		else
7176		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
7177		fi
7178		PKG_OBJECTS="$PKG_OBJECTS $j"
7179		;;
7180	esac
7181    done
7182
7183
7184
7185else
7186    CLEANFILES=
7187fi
7188
7189
7190
7191#--------------------------------------------------------------------
7192# __CHANGE__
7193# Choose which headers you need.  Extension authors should try very
7194# hard to only rely on the Tcl public header files.  Internal headers
7195# contain private data structures and are subject to change without
7196# notice.
7197# This must be done AFTER calling TEA_PATH_TCLCONFIG/TEA_LOAD_TCLCONFIG
7198# so that we can extract TCL_SRC_DIR from the config file (in the case
7199# of private headers
7200#--------------------------------------------------------------------
7201
7202
7203    { $as_echo "$as_me:$LINENO: checking for Tcl public headers" >&5
7204$as_echo_n "checking for Tcl public headers... " >&6; }
7205
7206
7207# Check whether --with-tclinclude was given.
7208if test "${with_tclinclude+set}" = set; then
7209  withval=$with_tclinclude; with_tclinclude=${withval}
7210fi
7211
7212
7213    if test "${ac_cv_c_tclh+set}" = set; then
7214  $as_echo_n "(cached) " >&6
7215else
7216
7217	# Use the value from --with-tclinclude, if it was given
7218
7219	if test x"${with_tclinclude}" != x ; then
7220	    if test -f "${with_tclinclude}/tcl.h" ; then
7221		ac_cv_c_tclh=${with_tclinclude}
7222	    else
7223		{ { $as_echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
7224$as_echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
7225   { (exit 1); exit 1; }; }
7226	    fi
7227	else
7228	    # Check order: pkg --prefix location, Tcl's --prefix location,
7229	    # directory of tclConfig.sh, and Tcl source directory.
7230	    # Looking in the source dir is not ideal, but OK.
7231
7232	    eval "temp_includedir=${includedir}"
7233	    list="`ls -d ${temp_includedir}      2>/dev/null` \
7234		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7235		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
7236		`ls -d ${TCL_SRC_DIR}/generic    2>/dev/null`"
7237	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7238		list="$list /usr/local/include /usr/include"
7239	    fi
7240	    for i in $list ; do
7241		if test -f "$i/tcl.h" ; then
7242		    ac_cv_c_tclh=$i
7243		    break
7244		fi
7245	    done
7246	fi
7247
7248fi
7249
7250
7251    # Print a message based on how we determined the include path
7252
7253    if test x"${ac_cv_c_tclh}" = x ; then
7254	{ { $as_echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
7255$as_echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
7256   { (exit 1); exit 1; }; }
7257    else
7258	{ $as_echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
7259$as_echo "${ac_cv_c_tclh}" >&6; }
7260    fi
7261
7262    # Convert to a native path and substitute into the output files.
7263
7264    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
7265
7266    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7267
7268
7269
7270#TEA_PRIVATE_TCL_HEADERS
7271
7272
7273    { $as_echo "$as_me:$LINENO: checking for Tk public headers" >&5
7274$as_echo_n "checking for Tk public headers... " >&6; }
7275
7276
7277# Check whether --with-tkinclude was given.
7278if test "${with_tkinclude+set}" = set; then
7279  withval=$with_tkinclude; with_tkinclude=${withval}
7280fi
7281
7282
7283    if test "${ac_cv_c_tkh+set}" = set; then
7284  $as_echo_n "(cached) " >&6
7285else
7286
7287	# Use the value from --with-tkinclude, if it was given
7288
7289	if test x"${with_tkinclude}" != x ; then
7290	    if test -f "${with_tkinclude}/tk.h" ; then
7291		ac_cv_c_tkh=${with_tkinclude}
7292	    else
7293		{ { $as_echo "$as_me:$LINENO: error: ${with_tkinclude} directory does not contain tk.h" >&5
7294$as_echo "$as_me: error: ${with_tkinclude} directory does not contain tk.h" >&2;}
7295   { (exit 1); exit 1; }; }
7296	    fi
7297	else
7298	    # Check order: pkg --prefix location, Tcl's --prefix location,
7299	    # directory of tclConfig.sh, and Tcl source directory.
7300	    # Looking in the source dir is not ideal, but OK.
7301
7302	    eval "temp_includedir=${includedir}"
7303	    list="`ls -d ${temp_includedir}      2>/dev/null` \
7304		`ls -d ${TK_PREFIX}/include      2>/dev/null` \
7305		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7306		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null` \
7307		`ls -d ${TK_SRC_DIR}/generic     2>/dev/null`"
7308	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7309		list="$list /usr/local/include /usr/include"
7310	    fi
7311	    for i in $list ; do
7312		if test -f "$i/tk.h" ; then
7313		    ac_cv_c_tkh=$i
7314		    break
7315		fi
7316	    done
7317	fi
7318
7319fi
7320
7321
7322    # Print a message based on how we determined the include path
7323
7324    if test x"${ac_cv_c_tkh}" = x ; then
7325	{ { $as_echo "$as_me:$LINENO: error: tk.h not found.  Please specify its location with --with-tkinclude" >&5
7326$as_echo "$as_me: error: tk.h not found.  Please specify its location with --with-tkinclude" >&2;}
7327   { (exit 1); exit 1; }; }
7328    else
7329	{ $as_echo "$as_me:$LINENO: result: ${ac_cv_c_tkh}" >&5
7330$as_echo "${ac_cv_c_tkh}" >&6; }
7331    fi
7332
7333    # Convert to a native path and substitute into the output files.
7334
7335    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
7336
7337    TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7338
7339
7340
7341    if test "${TEA_PLATFORM}" = "windows" ; then
7342	# On Windows, we need the X compat headers
7343	{ $as_echo "$as_me:$LINENO: checking for X11 header files" >&5
7344$as_echo_n "checking for X11 header files... " >&6; }
7345	if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
7346	    INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
7347	    TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7348
7349	fi
7350	{ $as_echo "$as_me:$LINENO: result: ${INCLUDE_DIR_NATIVE}" >&5
7351$as_echo "${INCLUDE_DIR_NATIVE}" >&6; }
7352    fi
7353
7354#TEA_PRIVATE_TK_HEADERS
7355
7356#--------------------------------------------------------------------
7357# For Unix/Tk builds, make sure that the X libraries/headers are found.
7358#--------------------------------------------------------------------
7359
7360
7361    if test "${TEA_PLATFORM}" = "unix" ; then
7362	case ${TK_DEFS} in
7363	    *MAC_OSX_TK*)
7364		cat >>confdefs.h <<\_ACEOF
7365#define MAC_OSX_TK 1
7366_ACEOF
7367
7368		TEA_WINDOWINGSYSTEM="aqua"
7369		;;
7370	    *)
7371
7372    { $as_echo "$as_me:$LINENO: checking for X" >&5
7373$as_echo_n "checking for X... " >&6; }
7374
7375
7376# Check whether --with-x was given.
7377if test "${with_x+set}" = set; then
7378  withval=$with_x;
7379fi
7380
7381# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7382if test "x$with_x" = xno; then
7383  # The user explicitly disabled X.
7384  have_x=disabled
7385else
7386  case $x_includes,$x_libraries in #(
7387    *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5
7388$as_echo "$as_me: error: cannot use X directory names containing '" >&2;}
7389   { (exit 1); exit 1; }; };; #(
7390    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
7391  $as_echo_n "(cached) " >&6
7392else
7393  # One or both of the vars are not set, and there is no cached value.
7394ac_x_includes=no ac_x_libraries=no
7395rm -f -r conftest.dir
7396if mkdir conftest.dir; then
7397  cd conftest.dir
7398  cat >Imakefile <<'_ACEOF'
7399incroot:
7400	@echo incroot='${INCROOT}'
7401usrlibdir:
7402	@echo usrlibdir='${USRLIBDIR}'
7403libdir:
7404	@echo libdir='${LIBDIR}'
7405_ACEOF
7406  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
7407    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7408    for ac_var in incroot usrlibdir libdir; do
7409      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
7410    done
7411    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7412    for ac_extension in a so sl dylib la dll; do
7413      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
7414	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
7415	ac_im_usrlibdir=$ac_im_libdir; break
7416      fi
7417    done
7418    # Screen out bogus values from the imake configuration.  They are
7419    # bogus both because they are the default anyway, and because
7420    # using them would break gcc on systems where it needs fixed includes.
7421    case $ac_im_incroot in
7422	/usr/include) ac_x_includes= ;;
7423	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7424    esac
7425    case $ac_im_usrlibdir in
7426	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
7427	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7428    esac
7429  fi
7430  cd ..
7431  rm -f -r conftest.dir
7432fi
7433
7434# Standard set of common directories for X headers.
7435# Check X11 before X11Rn because it is often a symlink to the current release.
7436ac_x_header_dirs='
7437/usr/X11/include
7438/usr/X11R6/include
7439/usr/X11R5/include
7440/usr/X11R4/include
7441
7442/usr/include/X11
7443/usr/include/X11R6
7444/usr/include/X11R5
7445/usr/include/X11R4
7446
7447/usr/local/X11/include
7448/usr/local/X11R6/include
7449/usr/local/X11R5/include
7450/usr/local/X11R4/include
7451
7452/usr/local/include/X11
7453/usr/local/include/X11R6
7454/usr/local/include/X11R5
7455/usr/local/include/X11R4
7456
7457/usr/X386/include
7458/usr/x386/include
7459/usr/XFree86/include/X11
7460
7461/usr/include
7462/usr/local/include
7463/usr/unsupported/include
7464/usr/athena/include
7465/usr/local/x11r5/include
7466/usr/lpp/Xamples/include
7467
7468/usr/openwin/include
7469/usr/openwin/share/include'
7470
7471if test "$ac_x_includes" = no; then
7472  # Guess where to find include files, by looking for Xlib.h.
7473  # First, try using that file with no special directory specified.
7474  cat >conftest.$ac_ext <<_ACEOF
7475/* confdefs.h.  */
7476_ACEOF
7477cat confdefs.h >>conftest.$ac_ext
7478cat >>conftest.$ac_ext <<_ACEOF
7479/* end confdefs.h.  */
7480#include <X11/Xlib.h>
7481_ACEOF
7482if { (ac_try="$ac_cpp conftest.$ac_ext"
7483case "(($ac_try" in
7484  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7485  *) ac_try_echo=$ac_try;;
7486esac
7487eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7488$as_echo "$ac_try_echo") >&5
7489  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7490  ac_status=$?
7491  grep -v '^ *+' conftest.er1 >conftest.err
7492  rm -f conftest.er1
7493  cat conftest.err >&5
7494  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7495  (exit $ac_status); } >/dev/null && {
7496	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7497	 test ! -s conftest.err
7498       }; then
7499  # We can compile using X headers with no special include directory.
7500ac_x_includes=
7501else
7502  $as_echo "$as_me: failed program was:" >&5
7503sed 's/^/| /' conftest.$ac_ext >&5
7504
7505  for ac_dir in $ac_x_header_dirs; do
7506  if test -r "$ac_dir/X11/Xlib.h"; then
7507    ac_x_includes=$ac_dir
7508    break
7509  fi
7510done
7511fi
7512
7513rm -f conftest.err conftest.$ac_ext
7514fi # $ac_x_includes = no
7515
7516if test "$ac_x_libraries" = no; then
7517  # Check for the libraries.
7518  # See if we find them without any special options.
7519  # Don't add to $LIBS permanently.
7520  ac_save_LIBS=$LIBS
7521  LIBS="-lX11 $LIBS"
7522  cat >conftest.$ac_ext <<_ACEOF
7523/* confdefs.h.  */
7524_ACEOF
7525cat confdefs.h >>conftest.$ac_ext
7526cat >>conftest.$ac_ext <<_ACEOF
7527/* end confdefs.h.  */
7528#include <X11/Xlib.h>
7529int
7530main ()
7531{
7532XrmInitialize ()
7533  ;
7534  return 0;
7535}
7536_ACEOF
7537rm -f conftest.$ac_objext conftest$ac_exeext
7538if { (ac_try="$ac_link"
7539case "(($ac_try" in
7540  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7541  *) ac_try_echo=$ac_try;;
7542esac
7543eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7544$as_echo "$ac_try_echo") >&5
7545  (eval "$ac_link") 2>conftest.er1
7546  ac_status=$?
7547  grep -v '^ *+' conftest.er1 >conftest.err
7548  rm -f conftest.er1
7549  cat conftest.err >&5
7550  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7551  (exit $ac_status); } && {
7552	 test -z "$ac_c_werror_flag" ||
7553	 test ! -s conftest.err
7554       } && test -s conftest$ac_exeext && {
7555	 test "$cross_compiling" = yes ||
7556	 $as_test_x conftest$ac_exeext
7557       }; then
7558  LIBS=$ac_save_LIBS
7559# We can link X programs with no special library path.
7560ac_x_libraries=
7561else
7562  $as_echo "$as_me: failed program was:" >&5
7563sed 's/^/| /' conftest.$ac_ext >&5
7564
7565	LIBS=$ac_save_LIBS
7566for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7567do
7568  # Don't even attempt the hair of trying to link an X program!
7569  for ac_extension in a so sl dylib la dll; do
7570    if test -r "$ac_dir/libX11.$ac_extension"; then
7571      ac_x_libraries=$ac_dir
7572      break 2
7573    fi
7574  done
7575done
7576fi
7577
7578rm -rf conftest.dSYM
7579rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7580      conftest$ac_exeext conftest.$ac_ext
7581fi # $ac_x_libraries = no
7582
7583case $ac_x_includes,$ac_x_libraries in #(
7584  no,* | *,no | *\'*)
7585    # Didn't find X, or a directory has "'" in its name.
7586    ac_cv_have_x="have_x=no";; #(
7587  *)
7588    # Record where we found X for the cache.
7589    ac_cv_have_x="have_x=yes\
7590	ac_x_includes='$ac_x_includes'\
7591	ac_x_libraries='$ac_x_libraries'"
7592esac
7593fi
7594;; #(
7595    *) have_x=yes;;
7596  esac
7597  eval "$ac_cv_have_x"
7598fi # $with_x != no
7599
7600if test "$have_x" != yes; then
7601  { $as_echo "$as_me:$LINENO: result: $have_x" >&5
7602$as_echo "$have_x" >&6; }
7603  no_x=yes
7604else
7605  # If each of the values was on the command line, it overrides each guess.
7606  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7607  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7608  # Update the cache value to reflect the command line values.
7609  ac_cv_have_x="have_x=yes\
7610	ac_x_includes='$x_includes'\
7611	ac_x_libraries='$x_libraries'"
7612  { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
7613$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
7614fi
7615
7616    not_really_there=""
7617    if test "$no_x" = ""; then
7618	if test "$x_includes" = ""; then
7619	    cat >conftest.$ac_ext <<_ACEOF
7620/* confdefs.h.  */
7621_ACEOF
7622cat confdefs.h >>conftest.$ac_ext
7623cat >>conftest.$ac_ext <<_ACEOF
7624/* end confdefs.h.  */
7625#include <X11/XIntrinsic.h>
7626_ACEOF
7627if { (ac_try="$ac_cpp conftest.$ac_ext"
7628case "(($ac_try" in
7629  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7630  *) ac_try_echo=$ac_try;;
7631esac
7632eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7633$as_echo "$ac_try_echo") >&5
7634  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7635  ac_status=$?
7636  grep -v '^ *+' conftest.er1 >conftest.err
7637  rm -f conftest.er1
7638  cat conftest.err >&5
7639  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7640  (exit $ac_status); } >/dev/null && {
7641	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7642	 test ! -s conftest.err
7643       }; then
7644  :
7645else
7646  $as_echo "$as_me: failed program was:" >&5
7647sed 's/^/| /' conftest.$ac_ext >&5
7648
7649  not_really_there="yes"
7650fi
7651
7652rm -f conftest.err conftest.$ac_ext
7653	else
7654	    if test ! -r $x_includes/X11/Intrinsic.h; then
7655		not_really_there="yes"
7656	    fi
7657	fi
7658    fi
7659    if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
7660	{ $as_echo "$as_me:$LINENO: checking for X11 header files" >&5
7661$as_echo_n "checking for X11 header files... " >&6; }
7662	XINCLUDES="# no special path needed"
7663	cat >conftest.$ac_ext <<_ACEOF
7664/* confdefs.h.  */
7665_ACEOF
7666cat confdefs.h >>conftest.$ac_ext
7667cat >>conftest.$ac_ext <<_ACEOF
7668/* end confdefs.h.  */
7669#include <X11/Intrinsic.h>
7670_ACEOF
7671if { (ac_try="$ac_cpp conftest.$ac_ext"
7672case "(($ac_try" in
7673  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7674  *) ac_try_echo=$ac_try;;
7675esac
7676eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7677$as_echo "$ac_try_echo") >&5
7678  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7679  ac_status=$?
7680  grep -v '^ *+' conftest.er1 >conftest.err
7681  rm -f conftest.er1
7682  cat conftest.err >&5
7683  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7684  (exit $ac_status); } >/dev/null && {
7685	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7686	 test ! -s conftest.err
7687       }; then
7688  :
7689else
7690  $as_echo "$as_me: failed program was:" >&5
7691sed 's/^/| /' conftest.$ac_ext >&5
7692
7693  XINCLUDES="nope"
7694fi
7695
7696rm -f conftest.err conftest.$ac_ext
7697	if test "$XINCLUDES" = nope; then
7698	    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"
7699	    for i in $dirs ; do
7700		if test -r $i/X11/Intrinsic.h; then
7701		    { $as_echo "$as_me:$LINENO: result: $i" >&5
7702$as_echo "$i" >&6; }
7703		    XINCLUDES=" -I$i"
7704		    break
7705		fi
7706	    done
7707	fi
7708    else
7709	if test "$x_includes" != ""; then
7710	    XINCLUDES=-I$x_includes
7711	else
7712	    XINCLUDES="# no special path needed"
7713	fi
7714    fi
7715    if test "$XINCLUDES" = nope; then
7716	{ $as_echo "$as_me:$LINENO: result: could not find any!" >&5
7717$as_echo "could not find any!" >&6; }
7718	XINCLUDES="# no include files found"
7719    fi
7720
7721    if test "$no_x" = yes; then
7722	{ $as_echo "$as_me:$LINENO: checking for X11 libraries" >&5
7723$as_echo_n "checking for X11 libraries... " >&6; }
7724	XLIBSW=nope
7725	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"
7726	for i in $dirs ; do
7727	    if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
7728		{ $as_echo "$as_me:$LINENO: result: $i" >&5
7729$as_echo "$i" >&6; }
7730		XLIBSW="-L$i -lX11"
7731		x_libraries="$i"
7732		break
7733	    fi
7734	done
7735    else
7736	if test "$x_libraries" = ""; then
7737	    XLIBSW=-lX11
7738	else
7739	    XLIBSW="-L$x_libraries -lX11"
7740	fi
7741    fi
7742    if test "$XLIBSW" = nope ; then
7743	{ $as_echo "$as_me:$LINENO: checking for XCreateWindow in -lXwindow" >&5
7744$as_echo_n "checking for XCreateWindow in -lXwindow... " >&6; }
7745if test "${ac_cv_lib_Xwindow_XCreateWindow+set}" = set; then
7746  $as_echo_n "(cached) " >&6
7747else
7748  ac_check_lib_save_LIBS=$LIBS
7749LIBS="-lXwindow  $LIBS"
7750cat >conftest.$ac_ext <<_ACEOF
7751/* confdefs.h.  */
7752_ACEOF
7753cat confdefs.h >>conftest.$ac_ext
7754cat >>conftest.$ac_ext <<_ACEOF
7755/* end confdefs.h.  */
7756
7757/* Override any GCC internal prototype to avoid an error.
7758   Use char because int might match the return type of a GCC
7759   builtin and then its argument prototype would still apply.  */
7760#ifdef __cplusplus
7761extern "C"
7762#endif
7763char XCreateWindow ();
7764int
7765main ()
7766{
7767return XCreateWindow ();
7768  ;
7769  return 0;
7770}
7771_ACEOF
7772rm -f conftest.$ac_objext conftest$ac_exeext
7773if { (ac_try="$ac_link"
7774case "(($ac_try" in
7775  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7776  *) ac_try_echo=$ac_try;;
7777esac
7778eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7779$as_echo "$ac_try_echo") >&5
7780  (eval "$ac_link") 2>conftest.er1
7781  ac_status=$?
7782  grep -v '^ *+' conftest.er1 >conftest.err
7783  rm -f conftest.er1
7784  cat conftest.err >&5
7785  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7786  (exit $ac_status); } && {
7787	 test -z "$ac_c_werror_flag" ||
7788	 test ! -s conftest.err
7789       } && test -s conftest$ac_exeext && {
7790	 test "$cross_compiling" = yes ||
7791	 $as_test_x conftest$ac_exeext
7792       }; then
7793  ac_cv_lib_Xwindow_XCreateWindow=yes
7794else
7795  $as_echo "$as_me: failed program was:" >&5
7796sed 's/^/| /' conftest.$ac_ext >&5
7797
7798	ac_cv_lib_Xwindow_XCreateWindow=no
7799fi
7800
7801rm -rf conftest.dSYM
7802rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7803      conftest$ac_exeext conftest.$ac_ext
7804LIBS=$ac_check_lib_save_LIBS
7805fi
7806{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xwindow_XCreateWindow" >&5
7807$as_echo "$ac_cv_lib_Xwindow_XCreateWindow" >&6; }
7808if test "x$ac_cv_lib_Xwindow_XCreateWindow" = x""yes; then
7809  XLIBSW=-lXwindow
7810fi
7811
7812    fi
7813    if test "$XLIBSW" = nope ; then
7814	{ $as_echo "$as_me:$LINENO: result: could not find any!  Using -lX11." >&5
7815$as_echo "could not find any!  Using -lX11." >&6; }
7816	XLIBSW=-lX11
7817    fi
7818    if test x"${XLIBSW}" != x ; then
7819	PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
7820    fi
7821
7822		TEA_WINDOWINGSYSTEM="x11"
7823		;;
7824	esac
7825    elif test "${TEA_PLATFORM}" = "windows" ; then
7826	TEA_WINDOWINGSYSTEM="windows"
7827    fi
7828
7829
7830#--------------------------------------------------------------------
7831# We need to enable the threading macros found in tcl.h and tclInt.h.
7832# The use of the threading features is determined by the core the
7833# extension is loaded into, but we need to compile with these macros
7834# turned on.
7835#--------------------------------------------------------------------
7836
7837cat >>confdefs.h <<\_ACEOF
7838#define TCL_THREADS 1
7839_ACEOF
7840
7841#--------------------------------------------------------------------
7842# Check whether --enable-threads or --disable-threads was given.
7843# This auto-enables if Tcl was compiled threaded.
7844#--------------------------------------------------------------------
7845
7846#TEA_ENABLE_THREADS
7847
7848#--------------------------------------------------------------------
7849# The statement below defines a collection of symbols related to
7850# building as a shared library instead of a static library.
7851#--------------------------------------------------------------------
7852
7853
7854    { $as_echo "$as_me:$LINENO: checking how to build libraries" >&5
7855$as_echo_n "checking how to build libraries... " >&6; }
7856    # Check whether --enable-shared was given.
7857if test "${enable_shared+set}" = set; then
7858  enableval=$enable_shared; tcl_ok=$enableval
7859else
7860  tcl_ok=yes
7861fi
7862
7863
7864    if test "${enable_shared+set}" = set; then
7865	enableval="$enable_shared"
7866	tcl_ok=$enableval
7867    else
7868	tcl_ok=yes
7869    fi
7870
7871    if test "$tcl_ok" = "yes" ; then
7872	{ $as_echo "$as_me:$LINENO: result: shared" >&5
7873$as_echo "shared" >&6; }
7874	SHARED_BUILD=1
7875    else
7876	{ $as_echo "$as_me:$LINENO: result: static" >&5
7877$as_echo "static" >&6; }
7878	SHARED_BUILD=0
7879	cat >>confdefs.h <<\_ACEOF
7880#define STATIC_BUILD 1
7881_ACEOF
7882
7883    fi
7884
7885
7886
7887if test "`uname -s`" = "Darwin" ; then
7888    TK_SHLIB_LD_EXTRAS="-compatibility_version  -current_version "
7889    TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${tkgeomap_LIB_FILE} -seg1addr 0xb000000'
7890fi
7891
7892#--------------------------------------------------------------------
7893# This macro figures out what flags to use with the compiler/linker
7894# when building shared/static debug/optimized objects.  This information
7895# is all taken from the tclConfig.sh file.
7896#--------------------------------------------------------------------
7897
7898
7899    # Allow the user to provide this setting in the env
7900    if test "x${TCLSH_PROG}" = "x" ; then
7901	{ $as_echo "$as_me:$LINENO: checking for tclsh" >&5
7902$as_echo_n "checking for tclsh... " >&6; }
7903
7904	if test "${ac_cv_path_tclsh+set}" = set; then
7905  $as_echo_n "(cached) " >&6
7906else
7907
7908	search_path=`echo ${PATH} | sed -e 's/:/ /g'`
7909	if test "${TEA_PLATFORM}" != "windows" -o \
7910		\( "$do64bit_ok" = "no" -a "$doWince" = "no" \) ; then
7911	    # Do not allow target tclsh in known cross-compile builds,
7912	    # as we need one we can run on this system
7913	    search_path="${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin ${exec_prefix}/bin ${prefix}/bin ${search_path}"
7914	fi
7915	for dir in $search_path ; do
7916	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
7917		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
7918		if test x"$ac_cv_path_tclsh" = x ; then
7919		    if test -f "$j" ; then
7920			ac_cv_path_tclsh=$j
7921			break
7922		    fi
7923		fi
7924	    done
7925	done
7926
7927fi
7928
7929
7930	if test -f "$ac_cv_path_tclsh" ; then
7931	    TCLSH_PROG=$ac_cv_path_tclsh
7932	    { $as_echo "$as_me:$LINENO: result: $TCLSH_PROG" >&5
7933$as_echo "$TCLSH_PROG" >&6; }
7934	else
7935	    { { $as_echo "$as_me:$LINENO: error: No tclsh found in PATH: $search_path" >&5
7936$as_echo "$as_me: error: No tclsh found in PATH: $search_path" >&2;}
7937   { (exit 1); exit 1; }; }
7938	fi
7939    fi
7940
7941
7942
7943
7944
7945    # Step 0: Enable 64 bit support?
7946
7947    { $as_echo "$as_me:$LINENO: checking if 64bit support is enabled" >&5
7948$as_echo_n "checking if 64bit support is enabled... " >&6; }
7949    # Check whether --enable-64bit was given.
7950if test "${enable_64bit+set}" = set; then
7951  enableval=$enable_64bit; do64bit=$enableval
7952else
7953  do64bit=no
7954fi
7955
7956    { $as_echo "$as_me:$LINENO: result: $do64bit" >&5
7957$as_echo "$do64bit" >&6; }
7958
7959    # Step 0.b: Enable Solaris 64 bit VIS support?
7960
7961    { $as_echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
7962$as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; }
7963    # Check whether --enable-64bit-vis was given.
7964if test "${enable_64bit_vis+set}" = set; then
7965  enableval=$enable_64bit_vis; do64bitVIS=$enableval
7966else
7967  do64bitVIS=no
7968fi
7969
7970    { $as_echo "$as_me:$LINENO: result: $do64bitVIS" >&5
7971$as_echo "$do64bitVIS" >&6; }
7972
7973    if test "$do64bitVIS" = "yes"; then
7974	# Force 64bit on with VIS
7975	do64bit=yes
7976    fi
7977
7978    # Step 0.c: Cross-compiling options for Windows/CE builds?
7979
7980    if test "${TEA_PLATFORM}" = "windows" ; then
7981	{ $as_echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
7982$as_echo_n "checking if Windows/CE build is requested... " >&6; }
7983	# Check whether --enable-wince was given.
7984if test "${enable_wince+set}" = set; then
7985  enableval=$enable_wince; doWince=$enableval
7986else
7987  doWince=no
7988fi
7989
7990	{ $as_echo "$as_me:$LINENO: result: $doWince" >&5
7991$as_echo "$doWince" >&6; }
7992    fi
7993
7994    # Step 1: set the variable "system" to hold the name and version number
7995    # for the system.  This can usually be done via the "uname" command, but
7996    # there are a few systems, like Next, where this doesn't work.
7997
7998    { $as_echo "$as_me:$LINENO: checking system version (for dynamic loading)" >&5
7999$as_echo_n "checking system version (for dynamic loading)... " >&6; }
8000    system=`uname -s`-`uname -r`
8001    if test "$?" -ne 0 ; then
8002	{ $as_echo "$as_me:$LINENO: result: unknown (can't find uname command)" >&5
8003$as_echo "unknown (can't find uname command)" >&6; }
8004	system=unknown
8005    fi
8006
8007    # Step 2: check for existence of -ldl library.  This is needed because
8008    # Linux can use either -ldl or -ldld for dynamic loading.
8009
8010    { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8011$as_echo_n "checking for dlopen in -ldl... " >&6; }
8012if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8013  $as_echo_n "(cached) " >&6
8014else
8015  ac_check_lib_save_LIBS=$LIBS
8016LIBS="-ldl  $LIBS"
8017cat >conftest.$ac_ext <<_ACEOF
8018/* confdefs.h.  */
8019_ACEOF
8020cat confdefs.h >>conftest.$ac_ext
8021cat >>conftest.$ac_ext <<_ACEOF
8022/* end confdefs.h.  */
8023
8024/* Override any GCC internal prototype to avoid an error.
8025   Use char because int might match the return type of a GCC
8026   builtin and then its argument prototype would still apply.  */
8027#ifdef __cplusplus
8028extern "C"
8029#endif
8030char dlopen ();
8031int
8032main ()
8033{
8034return dlopen ();
8035  ;
8036  return 0;
8037}
8038_ACEOF
8039rm -f conftest.$ac_objext conftest$ac_exeext
8040if { (ac_try="$ac_link"
8041case "(($ac_try" in
8042  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8043  *) ac_try_echo=$ac_try;;
8044esac
8045eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8046$as_echo "$ac_try_echo") >&5
8047  (eval "$ac_link") 2>conftest.er1
8048  ac_status=$?
8049  grep -v '^ *+' conftest.er1 >conftest.err
8050  rm -f conftest.er1
8051  cat conftest.err >&5
8052  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8053  (exit $ac_status); } && {
8054	 test -z "$ac_c_werror_flag" ||
8055	 test ! -s conftest.err
8056       } && test -s conftest$ac_exeext && {
8057	 test "$cross_compiling" = yes ||
8058	 $as_test_x conftest$ac_exeext
8059       }; then
8060  ac_cv_lib_dl_dlopen=yes
8061else
8062  $as_echo "$as_me: failed program was:" >&5
8063sed 's/^/| /' conftest.$ac_ext >&5
8064
8065	ac_cv_lib_dl_dlopen=no
8066fi
8067
8068rm -rf conftest.dSYM
8069rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8070      conftest$ac_exeext conftest.$ac_ext
8071LIBS=$ac_check_lib_save_LIBS
8072fi
8073{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8074$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
8075if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
8076  have_dl=yes
8077else
8078  have_dl=no
8079fi
8080
8081
8082    # Step 3: set configuration options based on system name and version.
8083    # This is similar to Tcl's unix/tcl.m4 except that we've added a
8084    # "windows" case and CC_SEARCH_FLAGS becomes LD_SEARCH_FLAGS for us
8085    # (and we have no CC_SEARCH_FLAGS).
8086
8087    do64bit_ok=no
8088    LDFLAGS_ORIG="$LDFLAGS"
8089    TCL_EXPORT_FILE_SUFFIX=""
8090    UNSHARED_LIB_SUFFIX=""
8091    TCL_TRIM_DOTS='`echo  | tr -d .`'
8092    ECHO_VERSION='`echo `'
8093    TCL_LIB_VERSIONS_OK=ok
8094    CFLAGS_DEBUG=-g
8095    if test "$GCC" = "yes" ; then
8096	CFLAGS_OPTIMIZE=-O2
8097	CFLAGS_WARNING="-Wall -Wno-implicit-int"
8098    else
8099	CFLAGS_OPTIMIZE=-O
8100	CFLAGS_WARNING=""
8101    fi
8102    TCL_NEEDS_EXP_FILE=0
8103    TCL_BUILD_EXP_FILE=""
8104    TCL_EXP_FILE=""
8105    # Extract the first word of "ar", so it can be a program name with args.
8106set dummy ar; ac_word=$2
8107{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8108$as_echo_n "checking for $ac_word... " >&6; }
8109if test "${ac_cv_prog_AR+set}" = set; then
8110  $as_echo_n "(cached) " >&6
8111else
8112  if test -n "$AR"; then
8113  ac_cv_prog_AR="$AR" # Let the user override the test.
8114else
8115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8116for as_dir in $PATH
8117do
8118  IFS=$as_save_IFS
8119  test -z "$as_dir" && as_dir=.
8120  for ac_exec_ext in '' $ac_executable_extensions; do
8121  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8122    ac_cv_prog_AR="ar"
8123    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8124    break 2
8125  fi
8126done
8127done
8128IFS=$as_save_IFS
8129
8130fi
8131fi
8132AR=$ac_cv_prog_AR
8133if test -n "$AR"; then
8134  { $as_echo "$as_me:$LINENO: result: $AR" >&5
8135$as_echo "$AR" >&6; }
8136else
8137  { $as_echo "$as_me:$LINENO: result: no" >&5
8138$as_echo "no" >&6; }
8139fi
8140
8141
8142    STLIB_LD='${AR} cr'
8143    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
8144    case $system in
8145	windows)
8146	    # This is a 2-stage check to make sure we have the 64-bit SDK
8147	    # We have to know where the SDK is installed.
8148	    if test "$do64bit" = "yes" ; then
8149		if test "x${MSSDK}x" = "xx" ; then
8150		    MSSDK="C:/Progra~1/Microsoft SDK"
8151		fi
8152		# Ensure that this path has no spaces to work in autoconf
8153
8154    if test "${TEA_PLATFORM}" = "windows" ; then
8155	# we need TCLSH_PROG defined to get Windows short pathnames
8156
8157
8158	{ $as_echo "$as_me:$LINENO: checking short pathname for MSSDK (${MSSDK})" >&5
8159$as_echo_n "checking short pathname for MSSDK (${MSSDK})... " >&6; }
8160
8161	shortpath=
8162	case "${MSSDK}" in
8163	    *\ *)
8164		# Only do this if we need to.
8165		shortpath=`echo "puts [file attributes {${MSSDK}} -shortname] ; exit" | ${TCLSH_PROG} 2>/dev/null`
8166		;;
8167	esac
8168	if test "x${shortpath}" = "x" ; then
8169	    { $as_echo "$as_me:$LINENO: result: not changed" >&5
8170$as_echo "not changed" >&6; }
8171	else
8172	    MSSDK=$shortpath
8173	    { $as_echo "$as_me:$LINENO: result: ${MSSDK}" >&5
8174$as_echo "${MSSDK}" >&6; }
8175	fi
8176    fi
8177
8178		if test ! -d "${MSSDK}/bin/win64" ; then
8179		    { $as_echo "$as_me:$LINENO: WARNING: could not find 64-bit SDK to enable 64bit mode" >&5
8180$as_echo "$as_me: WARNING: could not find 64-bit SDK to enable 64bit mode" >&2;}
8181		    do64bit="no"
8182		else
8183		    do64bit_ok="yes"
8184		fi
8185	    fi
8186
8187	    if test "$doWince" != "no" ; then
8188		if test "$do64bit" = "yes" ; then
8189		    { { $as_echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
8190$as_echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
8191   { (exit 1); exit 1; }; }
8192		fi
8193		if test "$GCC" = "yes" ; then
8194		    { { $as_echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
8195$as_echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
8196   { (exit 1); exit 1; }; }
8197		fi
8198
8199    # First, look for one uninstalled.
8200    # the alternative search directory is invoked by --with-celib
8201
8202    if test x"${no_celib}" = x ; then
8203	# we reset no_celib in case something fails here
8204	no_celib=true
8205
8206# Check whether --with-celib was given.
8207if test "${with_celib+set}" = set; then
8208  withval=$with_celib; with_celibconfig=${withval}
8209fi
8210
8211	{ $as_echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
8212$as_echo_n "checking for Windows/CE celib directory... " >&6; }
8213	if test "${ac_cv_c_celibconfig+set}" = set; then
8214  $as_echo_n "(cached) " >&6
8215else
8216
8217	    # First check to see if --with-celibconfig was specified.
8218	    if test x"${with_celibconfig}" != x ; then
8219		if test -d "${with_celibconfig}/inc" ; then
8220		    ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
8221		else
8222		    { { $as_echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
8223$as_echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
8224   { (exit 1); exit 1; }; }
8225		fi
8226	    fi
8227
8228	    # then check for a celib library
8229	    if test x"${ac_cv_c_celibconfig}" = x ; then
8230		for i in \
8231			../celib-palm-3.0 \
8232			../celib \
8233			../../celib-palm-3.0 \
8234			../../celib \
8235			`ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
8236			${srcdir}/../celib-palm-3.0 \
8237			${srcdir}/../celib \
8238			`ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
8239			; do
8240		    if test -d "$i/inc" ; then
8241			ac_cv_c_celibconfig=`(cd $i; pwd)`
8242			break
8243		    fi
8244		done
8245	    fi
8246
8247fi
8248
8249	if test x"${ac_cv_c_celibconfig}" = x ; then
8250	    { { $as_echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
8251$as_echo "$as_me: error: Cannot find celib support library directory" >&2;}
8252   { (exit 1); exit 1; }; }
8253	else
8254	    no_celib=
8255	    CELIB_DIR=${ac_cv_c_celibconfig}
8256	    { $as_echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
8257$as_echo "found $CELIB_DIR" >&6; }
8258
8259    if test "${TEA_PLATFORM}" = "windows" ; then
8260	# we need TCLSH_PROG defined to get Windows short pathnames
8261
8262
8263	{ $as_echo "$as_me:$LINENO: checking short pathname for CELIB_DIR (${ac_cv_c_celibconfig})" >&5
8264$as_echo_n "checking short pathname for CELIB_DIR (${ac_cv_c_celibconfig})... " >&6; }
8265
8266	shortpath=
8267	case "${ac_cv_c_celibconfig}" in
8268	    *\ *)
8269		# Only do this if we need to.
8270		shortpath=`echo "puts [file attributes {${ac_cv_c_celibconfig}} -shortname] ; exit" | ${TCLSH_PROG} 2>/dev/null`
8271		;;
8272	esac
8273	if test "x${shortpath}" = "x" ; then
8274	    { $as_echo "$as_me:$LINENO: result: not changed" >&5
8275$as_echo "not changed" >&6; }
8276	else
8277	    CELIB_DIR=$shortpath
8278	    { $as_echo "$as_me:$LINENO: result: ${CELIB_DIR}" >&5
8279$as_echo "${CELIB_DIR}" >&6; }
8280	fi
8281    fi
8282
8283	fi
8284    fi
8285
8286		# Set defaults for common evc4/PPC2003 setup
8287		# Currently Tcl requires 300+, possibly 420+ for sockets
8288		CEVERSION=420; 		# could be 211 300 301 400 420 ...
8289		TARGETCPU=ARMV4;	# could be ARMV4 ARM MIPS SH3 X86 ...
8290		ARCH=ARM;		# could be ARM MIPS X86EM ...
8291		PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
8292		if test "$doWince" != "yes"; then
8293		    # If !yes then the user specified something
8294		    # Reset ARCH to allow user to skip specifying it
8295		    ARCH=
8296		    eval `echo $doWince | awk -F, '{ \
8297	    if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
8298	    if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
8299	    if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
8300	    if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
8301	    if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
8302		    }'`
8303		    if test "x${ARCH}" = "x" ; then
8304			ARCH=$TARGETCPU;
8305		    fi
8306		fi
8307		OSVERSION=WCE$CEVERSION;
8308	    	if test "x${WCEROOT}" = "x" ; then
8309			WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
8310		    if test ! -d "${WCEROOT}" ; then
8311			WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
8312		    fi
8313		fi
8314		if test "x${SDKROOT}" = "x" ; then
8315		    SDKROOT="C:/Program Files/Windows CE Tools"
8316		    if test ! -d "${SDKROOT}" ; then
8317			SDKROOT="C:/Windows CE Tools"
8318		    fi
8319		fi
8320		# Ensure that this path has no spaces to work in autoconf
8321
8322    if test "${TEA_PLATFORM}" = "windows" ; then
8323	# we need TCLSH_PROG defined to get Windows short pathnames
8324
8325
8326	{ $as_echo "$as_me:$LINENO: checking short pathname for WCEROOT (${WCEROOT})" >&5
8327$as_echo_n "checking short pathname for WCEROOT (${WCEROOT})... " >&6; }
8328
8329	shortpath=
8330	case "${WCEROOT}" in
8331	    *\ *)
8332		# Only do this if we need to.
8333		shortpath=`echo "puts [file attributes {${WCEROOT}} -shortname] ; exit" | ${TCLSH_PROG} 2>/dev/null`
8334		;;
8335	esac
8336	if test "x${shortpath}" = "x" ; then
8337	    { $as_echo "$as_me:$LINENO: result: not changed" >&5
8338$as_echo "not changed" >&6; }
8339	else
8340	    WCEROOT=$shortpath
8341	    { $as_echo "$as_me:$LINENO: result: ${WCEROOT}" >&5
8342$as_echo "${WCEROOT}" >&6; }
8343	fi
8344    fi
8345
8346
8347    if test "${TEA_PLATFORM}" = "windows" ; then
8348	# we need TCLSH_PROG defined to get Windows short pathnames
8349
8350
8351	{ $as_echo "$as_me:$LINENO: checking short pathname for SDKROOT (${SDKROOT})" >&5
8352$as_echo_n "checking short pathname for SDKROOT (${SDKROOT})... " >&6; }
8353
8354	shortpath=
8355	case "${SDKROOT}" in
8356	    *\ *)
8357		# Only do this if we need to.
8358		shortpath=`echo "puts [file attributes {${SDKROOT}} -shortname] ; exit" | ${TCLSH_PROG} 2>/dev/null`
8359		;;
8360	esac
8361	if test "x${shortpath}" = "x" ; then
8362	    { $as_echo "$as_me:$LINENO: result: not changed" >&5
8363$as_echo "not changed" >&6; }
8364	else
8365	    SDKROOT=$shortpath
8366	    { $as_echo "$as_me:$LINENO: result: ${SDKROOT}" >&5
8367$as_echo "${SDKROOT}" >&6; }
8368	fi
8369    fi
8370
8371		if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
8372		    -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
8373		    { { $as_echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
8374$as_echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
8375   { (exit 1); exit 1; }; }
8376		    doWince="no"
8377		else
8378		    # We could PATH_NOSPACE these, but that's not important,
8379		    # as long as we quote them when used.
8380		    CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
8381		    if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
8382			CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
8383		    fi
8384		    CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
8385    		fi
8386	    fi
8387
8388	    if test "$GCC" != "yes" ; then
8389	        if test "${SHARED_BUILD}" = "0" ; then
8390		    runtime=-MT
8391	        else
8392		    runtime=-MD
8393	        fi
8394
8395                if test "$do64bit" = "yes" ; then
8396		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
8397		    CC="${MSSDK}/Bin/Win64/cl.exe"
8398		    CFLAGS="${CFLAGS} -I${MSSDK}/Include/prerelease \
8399			-I${MSSDK}/Include/Win64/crt \
8400			-I${MSSDK}/Include"
8401		    RC="${MSSDK}/bin/rc.exe"
8402		    lflags="-MACHINE:IA64 -LIBPATH:${MSSDK}/Lib/IA64 \
8403			-LIBPATH:${MSSDK}/Lib/Prerelease/IA64 -nologo"
8404		    LINKBIN="${MSSDK}/bin/win64/link.exe"
8405		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
8406		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
8407		elif test "$doWince" != "no" ; then
8408		    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
8409		    if test "${TARGETCPU}" = "X86"; then
8410			CC="${CEBINROOT}/cl.exe"
8411		    else
8412			CC="${CEBINROOT}/cl${ARCH}.exe"
8413		    fi
8414		    CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
8415		    RC="${WCEROOT}/Common/EVC/bin/rc.exe"
8416		    arch=`echo ${ARCH} | awk '{print tolower($0)}'`
8417		    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
8418		    if test "${SHARED_BUILD}" = "1" ; then
8419			# Static CE builds require static celib as well
8420		    	defs="${defs} _DLL"
8421		    fi
8422		    for i in $defs ; do
8423			cat >>confdefs.h <<_ACEOF
8424#define $i 1
8425_ACEOF
8426
8427		    done
8428		    cat >>confdefs.h <<_ACEOF
8429#define _WIN32_WCE $CEVERSION
8430_ACEOF
8431
8432		    cat >>confdefs.h <<_ACEOF
8433#define UNDER_CE $CEVERSION
8434_ACEOF
8435
8436		    CFLAGS_DEBUG="-nologo -Zi -Od"
8437		    CFLAGS_OPTIMIZE="-nologo -Ox"
8438		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
8439		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
8440		    LINKBIN="${CEBINROOT}/link.exe"
8441
8442		else
8443		    RC="rc"
8444		    lflags="-nologo"
8445    		    LINKBIN="link"
8446		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
8447		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
8448		fi
8449	    fi
8450
8451	    if test "$GCC" = "yes"; then
8452		# mingw gcc mode
8453		RC="windres"
8454		CFLAGS_DEBUG="-g"
8455		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8456		SHLIB_LD="$CC -shared"
8457		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8458		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
8459		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
8460	    else
8461		SHLIB_LD="${LINKBIN} -dll ${lflags}"
8462		# link -lib only works when -lib is the first arg
8463		STLIB_LD="${LINKBIN} -lib ${lflags}"
8464		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
8465		PATHTYPE=-w
8466		# For information on what debugtype is most useful, see:
8467		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
8468		# This essentially turns it all on.
8469		LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
8470		LDFLAGS_OPTIMIZE="-release"
8471		if test "$doWince" != "no" ; then
8472		    LDFLAGS_CONSOLE="-link ${lflags}"
8473		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
8474		else
8475		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
8476		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
8477		fi
8478	    fi
8479
8480	    SHLIB_LD_LIBS='${LIBS}'
8481	    SHLIB_SUFFIX=".dll"
8482	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
8483
8484	    TCL_LIB_VERSIONS_OK=nodots
8485	    # Bogus to avoid getting this turned off
8486	    DL_OBJS="tclLoadNone.obj"
8487    	    ;;
8488	AIX-*)
8489	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
8490		# AIX requires the _r compiler when gcc isn't being used
8491		if test "${CC}" != "cc_r" ; then
8492		    CC=${CC}_r
8493		fi
8494		{ $as_echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
8495$as_echo "Using $CC for compiling with threads" >&6; }
8496	    fi
8497	    LIBS="$LIBS -lc"
8498	    SHLIB_CFLAGS=""
8499	    SHLIB_SUFFIX=".so"
8500	    SHLIB_LD_LIBS='${LIBS}'
8501
8502	    DL_OBJS="tclLoadDl.o"
8503	    LD_LIBRARY_PATH_VAR="LIBPATH"
8504
8505	    # AIX v<=4.1 has some different flags than 4.2+
8506	    if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
8507		#LIBOBJS="$LIBOBJS tclLoadAix.o"
8508		case " $LIBOBJS " in
8509  *" tclLoadAix.$ac_objext "* ) ;;
8510  *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext"
8511 ;;
8512esac
8513
8514		DL_LIBS="-lld"
8515	    fi
8516
8517	    # Check to enable 64-bit flags for compiler/linker on AIX 4+
8518	    if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
8519		if test "$GCC" = "yes" ; then
8520		    { $as_echo "$as_me:$LINENO: WARNING: \"64bit mode not supported with GCC on $system\"" >&5
8521$as_echo "$as_me: WARNING: \"64bit mode not supported with GCC on $system\"" >&2;}
8522		else
8523		    do64bit_ok=yes
8524		    CFLAGS="$CFLAGS -q64"
8525		    LDFLAGS="$LDFLAGS -q64"
8526		    RANLIB="${RANLIB} -X64"
8527		    AR="${AR} -X64"
8528		    SHLIB_LD_FLAGS="-b64"
8529		fi
8530	    fi
8531
8532	    if test "`uname -m`" = "ia64" ; then
8533		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
8534		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8535		# AIX-5 has dl* in libc.so
8536		DL_LIBS=""
8537		if test "$GCC" = "yes" ; then
8538		    LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8539		else
8540		    LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
8541		fi
8542	    else
8543		if test "$GCC" = "yes" ; then
8544		    SHLIB_LD="gcc -shared"
8545		else
8546		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
8547		fi
8548		SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
8549		DL_LIBS="-ldl"
8550		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
8551		TCL_NEEDS_EXP_FILE=1
8552		TCL_EXPORT_FILE_SUFFIX='.exp'
8553	    fi
8554
8555	    # On AIX <=v4 systems, libbsd.a has to be linked in to support
8556	    # non-blocking file IO.  This library has to be linked in after
8557	    # the MATH_LIBS or it breaks the pow() function.  The way to
8558	    # insure proper sequencing, is to add it to the tail of MATH_LIBS.
8559	    # This library also supplies gettimeofday.
8560	    #
8561	    # AIX does not have a timezone field in struct tm. When the AIX
8562	    # bsd library is used, the timezone global and the gettimeofday
8563	    # methods are to be avoided for timezone deduction instead, we
8564	    # deduce the timezone by comparing the localtime result on a
8565	    # known GMT value.
8566
8567	    { $as_echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5
8568$as_echo_n "checking for gettimeofday in -lbsd... " >&6; }
8569if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
8570  $as_echo_n "(cached) " >&6
8571else
8572  ac_check_lib_save_LIBS=$LIBS
8573LIBS="-lbsd  $LIBS"
8574cat >conftest.$ac_ext <<_ACEOF
8575/* confdefs.h.  */
8576_ACEOF
8577cat confdefs.h >>conftest.$ac_ext
8578cat >>conftest.$ac_ext <<_ACEOF
8579/* end confdefs.h.  */
8580
8581/* Override any GCC internal prototype to avoid an error.
8582   Use char because int might match the return type of a GCC
8583   builtin and then its argument prototype would still apply.  */
8584#ifdef __cplusplus
8585extern "C"
8586#endif
8587char gettimeofday ();
8588int
8589main ()
8590{
8591return gettimeofday ();
8592  ;
8593  return 0;
8594}
8595_ACEOF
8596rm -f conftest.$ac_objext conftest$ac_exeext
8597if { (ac_try="$ac_link"
8598case "(($ac_try" in
8599  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8600  *) ac_try_echo=$ac_try;;
8601esac
8602eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8603$as_echo "$ac_try_echo") >&5
8604  (eval "$ac_link") 2>conftest.er1
8605  ac_status=$?
8606  grep -v '^ *+' conftest.er1 >conftest.err
8607  rm -f conftest.er1
8608  cat conftest.err >&5
8609  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8610  (exit $ac_status); } && {
8611	 test -z "$ac_c_werror_flag" ||
8612	 test ! -s conftest.err
8613       } && test -s conftest$ac_exeext && {
8614	 test "$cross_compiling" = yes ||
8615	 $as_test_x conftest$ac_exeext
8616       }; then
8617  ac_cv_lib_bsd_gettimeofday=yes
8618else
8619  $as_echo "$as_me: failed program was:" >&5
8620sed 's/^/| /' conftest.$ac_ext >&5
8621
8622	ac_cv_lib_bsd_gettimeofday=no
8623fi
8624
8625rm -rf conftest.dSYM
8626rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8627      conftest$ac_exeext conftest.$ac_ext
8628LIBS=$ac_check_lib_save_LIBS
8629fi
8630{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5
8631$as_echo "$ac_cv_lib_bsd_gettimeofday" >&6; }
8632if test "x$ac_cv_lib_bsd_gettimeofday" = x""yes; then
8633  libbsd=yes
8634else
8635  libbsd=no
8636fi
8637
8638	    if test $libbsd = yes; then
8639	    	MATH_LIBS="$MATH_LIBS -lbsd"
8640	    	cat >>confdefs.h <<\_ACEOF
8641#define USE_DELTA_FOR_TZ 1
8642_ACEOF
8643
8644	    fi
8645	    ;;
8646	BeOS*)
8647	    SHLIB_CFLAGS="-fPIC"
8648	    SHLIB_LD="${CC} -nostart"
8649	    SHLIB_LD_LIBS='${LIBS}'
8650	    SHLIB_SUFFIX=".so"
8651	    DL_OBJS="tclLoadDl.o"
8652	    DL_LIBS="-ldl"
8653	    ;;
8654	BSD/OS-2.1*|BSD/OS-3*)
8655	    SHLIB_CFLAGS=""
8656	    SHLIB_LD="shlicc -r"
8657	    SHLIB_LD_LIBS='${LIBS}'
8658	    SHLIB_SUFFIX=".so"
8659	    DL_OBJS="tclLoadDl.o"
8660	    DL_LIBS="-ldl"
8661	    LD_SEARCH_FLAGS=""
8662	    ;;
8663	BSD/OS-4.*)
8664	    SHLIB_CFLAGS="-export-dynamic -fPIC"
8665	    SHLIB_LD="cc -shared"
8666	    SHLIB_LD_LIBS='${LIBS}'
8667	    SHLIB_SUFFIX=".so"
8668	    DL_OBJS="tclLoadDl.o"
8669	    DL_LIBS="-ldl"
8670	    LDFLAGS="$LDFLAGS -export-dynamic"
8671	    LD_SEARCH_FLAGS=""
8672	    ;;
8673	dgux*)
8674	    SHLIB_CFLAGS="-K PIC"
8675	    SHLIB_LD="cc -G"
8676	    SHLIB_LD_LIBS=""
8677	    SHLIB_SUFFIX=".so"
8678	    DL_OBJS="tclLoadDl.o"
8679	    DL_LIBS="-ldl"
8680	    LD_SEARCH_FLAGS=""
8681	    ;;
8682	HP-UX-*.11.*)
8683	    # Use updated header definitions where possible
8684	    cat >>confdefs.h <<\_ACEOF
8685#define _XOPEN_SOURCE_EXTENDED 1
8686_ACEOF
8687
8688
8689	    SHLIB_SUFFIX=".sl"
8690	    { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8691$as_echo_n "checking for shl_load in -ldld... " >&6; }
8692if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8693  $as_echo_n "(cached) " >&6
8694else
8695  ac_check_lib_save_LIBS=$LIBS
8696LIBS="-ldld  $LIBS"
8697cat >conftest.$ac_ext <<_ACEOF
8698/* confdefs.h.  */
8699_ACEOF
8700cat confdefs.h >>conftest.$ac_ext
8701cat >>conftest.$ac_ext <<_ACEOF
8702/* end confdefs.h.  */
8703
8704/* Override any GCC internal prototype to avoid an error.
8705   Use char because int might match the return type of a GCC
8706   builtin and then its argument prototype would still apply.  */
8707#ifdef __cplusplus
8708extern "C"
8709#endif
8710char shl_load ();
8711int
8712main ()
8713{
8714return shl_load ();
8715  ;
8716  return 0;
8717}
8718_ACEOF
8719rm -f conftest.$ac_objext conftest$ac_exeext
8720if { (ac_try="$ac_link"
8721case "(($ac_try" in
8722  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8723  *) ac_try_echo=$ac_try;;
8724esac
8725eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8726$as_echo "$ac_try_echo") >&5
8727  (eval "$ac_link") 2>conftest.er1
8728  ac_status=$?
8729  grep -v '^ *+' conftest.er1 >conftest.err
8730  rm -f conftest.er1
8731  cat conftest.err >&5
8732  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8733  (exit $ac_status); } && {
8734	 test -z "$ac_c_werror_flag" ||
8735	 test ! -s conftest.err
8736       } && test -s conftest$ac_exeext && {
8737	 test "$cross_compiling" = yes ||
8738	 $as_test_x conftest$ac_exeext
8739       }; then
8740  ac_cv_lib_dld_shl_load=yes
8741else
8742  $as_echo "$as_me: failed program was:" >&5
8743sed 's/^/| /' conftest.$ac_ext >&5
8744
8745	ac_cv_lib_dld_shl_load=no
8746fi
8747
8748rm -rf conftest.dSYM
8749rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8750      conftest$ac_exeext conftest.$ac_ext
8751LIBS=$ac_check_lib_save_LIBS
8752fi
8753{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
8754$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
8755if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
8756  tcl_ok=yes
8757else
8758  tcl_ok=no
8759fi
8760
8761	    if test "$tcl_ok" = yes; then
8762		SHLIB_CFLAGS="+z"
8763		SHLIB_LD="ld -b"
8764		SHLIB_LD_LIBS='${LIBS}'
8765		DL_OBJS="tclLoadShl.o"
8766		DL_LIBS="-ldld"
8767		LDFLAGS="$LDFLAGS -Wl,-E"
8768		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
8769		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
8770	    fi
8771	    if test "$GCC" = "yes" ; then
8772		SHLIB_LD="gcc -shared"
8773		SHLIB_LD_LIBS='${LIBS}'
8774		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
8775	    fi
8776
8777	    # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
8778	    #CFLAGS="$CFLAGS +DAportable"
8779
8780	    # Check to enable 64-bit flags for compiler/linker
8781	    if test "$do64bit" = "yes" ; then
8782		if test "$GCC" = "yes" ; then
8783		    hpux_arch=`${CC} -dumpmachine`
8784		    case $hpux_arch in
8785			hppa64*)
8786			    # 64-bit gcc in use.  Fix flags for GNU ld.
8787			    do64bit_ok=yes
8788			    SHLIB_LD="${CC} -shared"
8789			    SHLIB_LD_LIBS='${LIBS}'
8790			    ;;
8791			*)
8792			    { $as_echo "$as_me:$LINENO: WARNING: \"64bit mode not supported with GCC on $system\"" >&5
8793$as_echo "$as_me: WARNING: \"64bit mode not supported with GCC on $system\"" >&2;}
8794			    ;;
8795		    esac
8796		else
8797		    do64bit_ok=yes
8798		    CFLAGS="$CFLAGS +DD64"
8799		    LDFLAGS="$LDFLAGS +DD64"
8800		fi
8801	    fi
8802	    ;;
8803	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
8804	    SHLIB_SUFFIX=".sl"
8805	    { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8806$as_echo_n "checking for shl_load in -ldld... " >&6; }
8807if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8808  $as_echo_n "(cached) " >&6
8809else
8810  ac_check_lib_save_LIBS=$LIBS
8811LIBS="-ldld  $LIBS"
8812cat >conftest.$ac_ext <<_ACEOF
8813/* confdefs.h.  */
8814_ACEOF
8815cat confdefs.h >>conftest.$ac_ext
8816cat >>conftest.$ac_ext <<_ACEOF
8817/* end confdefs.h.  */
8818
8819/* Override any GCC internal prototype to avoid an error.
8820   Use char because int might match the return type of a GCC
8821   builtin and then its argument prototype would still apply.  */
8822#ifdef __cplusplus
8823extern "C"
8824#endif
8825char shl_load ();
8826int
8827main ()
8828{
8829return shl_load ();
8830  ;
8831  return 0;
8832}
8833_ACEOF
8834rm -f conftest.$ac_objext conftest$ac_exeext
8835if { (ac_try="$ac_link"
8836case "(($ac_try" in
8837  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8838  *) ac_try_echo=$ac_try;;
8839esac
8840eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8841$as_echo "$ac_try_echo") >&5
8842  (eval "$ac_link") 2>conftest.er1
8843  ac_status=$?
8844  grep -v '^ *+' conftest.er1 >conftest.err
8845  rm -f conftest.er1
8846  cat conftest.err >&5
8847  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8848  (exit $ac_status); } && {
8849	 test -z "$ac_c_werror_flag" ||
8850	 test ! -s conftest.err
8851       } && test -s conftest$ac_exeext && {
8852	 test "$cross_compiling" = yes ||
8853	 $as_test_x conftest$ac_exeext
8854       }; then
8855  ac_cv_lib_dld_shl_load=yes
8856else
8857  $as_echo "$as_me: failed program was:" >&5
8858sed 's/^/| /' conftest.$ac_ext >&5
8859
8860	ac_cv_lib_dld_shl_load=no
8861fi
8862
8863rm -rf conftest.dSYM
8864rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8865      conftest$ac_exeext conftest.$ac_ext
8866LIBS=$ac_check_lib_save_LIBS
8867fi
8868{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
8869$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
8870if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
8871  tcl_ok=yes
8872else
8873  tcl_ok=no
8874fi
8875
8876	    if test "$tcl_ok" = yes; then
8877		SHLIB_CFLAGS="+z"
8878		SHLIB_LD="ld -b"
8879		SHLIB_LD_LIBS=""
8880		DL_OBJS="tclLoadShl.o"
8881		DL_LIBS="-ldld"
8882		LDFLAGS="$LDFLAGS -Wl,-E"
8883		LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
8884	    fi
8885	    LD_LIBRARY_PATH_VAR="SHLIB_PATH"
8886	    ;;
8887	IRIX-4.*)
8888	    SHLIB_CFLAGS="-G 0"
8889	    SHLIB_SUFFIX=".a"
8890	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
8891	    SHLIB_LD_LIBS='${LIBS}'
8892	    DL_OBJS="tclLoadAout.o"
8893	    DL_LIBS=""
8894	    LDFLAGS="$LDFLAGS -Wl,-D,08000000"
8895	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
8896	    SHARED_LIB_SUFFIX='.a'
8897	    ;;
8898	IRIX-5.*)
8899	    SHLIB_CFLAGS=""
8900	    SHLIB_LD="ld -shared -rdata_shared"
8901	    SHLIB_LD_LIBS='${LIBS}'
8902	    SHLIB_SUFFIX=".so"
8903	    DL_OBJS="tclLoadDl.o"
8904	    DL_LIBS=""
8905	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8906	    ;;
8907	IRIX-6.*|IRIX64-6.5*)
8908	    SHLIB_CFLAGS=""
8909	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8910	    SHLIB_LD_LIBS='${LIBS}'
8911	    SHLIB_SUFFIX=".so"
8912	    DL_OBJS="tclLoadDl.o"
8913	    DL_LIBS=""
8914	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8915	    if test "$GCC" = "yes" ; then
8916		CFLAGS="$CFLAGS -mabi=n32"
8917		LDFLAGS="$LDFLAGS -mabi=n32"
8918	    else
8919		case $system in
8920		    IRIX-6.3)
8921			# Use to build 6.2 compatible binaries on 6.3.
8922			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
8923			;;
8924		    *)
8925			CFLAGS="$CFLAGS -n32"
8926			;;
8927		esac
8928		LDFLAGS="$LDFLAGS -n32"
8929	    fi
8930	    ;;
8931	IRIX64-6.*)
8932	    SHLIB_CFLAGS=""
8933	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8934	    SHLIB_LD_LIBS='${LIBS}'
8935	    SHLIB_SUFFIX=".so"
8936	    DL_OBJS="tclLoadDl.o"
8937	    DL_LIBS=""
8938	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8939
8940	    # Check to enable 64-bit flags for compiler/linker
8941
8942	    if test "$do64bit" = "yes" ; then
8943	        if test "$GCC" = "yes" ; then
8944	            { $as_echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
8945$as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
8946	        else
8947	            do64bit_ok=yes
8948	            SHLIB_LD="ld -64 -shared -rdata_shared"
8949	            CFLAGS="$CFLAGS -64"
8950	            LDFLAGS="$LDFLAGS -64"
8951	        fi
8952	    fi
8953	    ;;
8954	Linux*)
8955	    SHLIB_CFLAGS="-fPIC"
8956	    SHLIB_LD_LIBS='${LIBS}'
8957	    SHLIB_SUFFIX=".so"
8958
8959	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8960	    # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
8961	    # when you inline the string and math operations.  Turn this off to
8962	    # get rid of the warnings.
8963
8964	    #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
8965
8966	    if test "$have_dl" = yes; then
8967		SHLIB_LD="${CC} -shared"
8968		DL_OBJS="tclLoadDl.o"
8969		DL_LIBS="-ldl"
8970		LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8971		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8972	    else
8973		if test "${ac_cv_header_dld_h+set}" = set; then
8974  { $as_echo "$as_me:$LINENO: checking for dld.h" >&5
8975$as_echo_n "checking for dld.h... " >&6; }
8976if test "${ac_cv_header_dld_h+set}" = set; then
8977  $as_echo_n "(cached) " >&6
8978fi
8979{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dld_h" >&5
8980$as_echo "$ac_cv_header_dld_h" >&6; }
8981else
8982  # Is the header compilable?
8983{ $as_echo "$as_me:$LINENO: checking dld.h usability" >&5
8984$as_echo_n "checking dld.h usability... " >&6; }
8985cat >conftest.$ac_ext <<_ACEOF
8986/* confdefs.h.  */
8987_ACEOF
8988cat confdefs.h >>conftest.$ac_ext
8989cat >>conftest.$ac_ext <<_ACEOF
8990/* end confdefs.h.  */
8991$ac_includes_default
8992#include <dld.h>
8993_ACEOF
8994rm -f conftest.$ac_objext
8995if { (ac_try="$ac_compile"
8996case "(($ac_try" in
8997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8998  *) ac_try_echo=$ac_try;;
8999esac
9000eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9001$as_echo "$ac_try_echo") >&5
9002  (eval "$ac_compile") 2>conftest.er1
9003  ac_status=$?
9004  grep -v '^ *+' conftest.er1 >conftest.err
9005  rm -f conftest.er1
9006  cat conftest.err >&5
9007  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9008  (exit $ac_status); } && {
9009	 test -z "$ac_c_werror_flag" ||
9010	 test ! -s conftest.err
9011       } && test -s conftest.$ac_objext; then
9012  ac_header_compiler=yes
9013else
9014  $as_echo "$as_me: failed program was:" >&5
9015sed 's/^/| /' conftest.$ac_ext >&5
9016
9017	ac_header_compiler=no
9018fi
9019
9020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9021{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9022$as_echo "$ac_header_compiler" >&6; }
9023
9024# Is the header present?
9025{ $as_echo "$as_me:$LINENO: checking dld.h presence" >&5
9026$as_echo_n "checking dld.h presence... " >&6; }
9027cat >conftest.$ac_ext <<_ACEOF
9028/* confdefs.h.  */
9029_ACEOF
9030cat confdefs.h >>conftest.$ac_ext
9031cat >>conftest.$ac_ext <<_ACEOF
9032/* end confdefs.h.  */
9033#include <dld.h>
9034_ACEOF
9035if { (ac_try="$ac_cpp conftest.$ac_ext"
9036case "(($ac_try" in
9037  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9038  *) ac_try_echo=$ac_try;;
9039esac
9040eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9041$as_echo "$ac_try_echo") >&5
9042  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9043  ac_status=$?
9044  grep -v '^ *+' conftest.er1 >conftest.err
9045  rm -f conftest.er1
9046  cat conftest.err >&5
9047  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9048  (exit $ac_status); } >/dev/null && {
9049	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9050	 test ! -s conftest.err
9051       }; then
9052  ac_header_preproc=yes
9053else
9054  $as_echo "$as_me: failed program was:" >&5
9055sed 's/^/| /' conftest.$ac_ext >&5
9056
9057  ac_header_preproc=no
9058fi
9059
9060rm -f conftest.err conftest.$ac_ext
9061{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9062$as_echo "$ac_header_preproc" >&6; }
9063
9064# So?  What about this header?
9065case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9066  yes:no: )
9067    { $as_echo "$as_me:$LINENO: WARNING: dld.h: accepted by the compiler, rejected by the preprocessor!" >&5
9068$as_echo "$as_me: WARNING: dld.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9069    { $as_echo "$as_me:$LINENO: WARNING: dld.h: proceeding with the compiler's result" >&5
9070$as_echo "$as_me: WARNING: dld.h: proceeding with the compiler's result" >&2;}
9071    ac_header_preproc=yes
9072    ;;
9073  no:yes:* )
9074    { $as_echo "$as_me:$LINENO: WARNING: dld.h: present but cannot be compiled" >&5
9075$as_echo "$as_me: WARNING: dld.h: present but cannot be compiled" >&2;}
9076    { $as_echo "$as_me:$LINENO: WARNING: dld.h:     check for missing prerequisite headers?" >&5
9077$as_echo "$as_me: WARNING: dld.h:     check for missing prerequisite headers?" >&2;}
9078    { $as_echo "$as_me:$LINENO: WARNING: dld.h: see the Autoconf documentation" >&5
9079$as_echo "$as_me: WARNING: dld.h: see the Autoconf documentation" >&2;}
9080    { $as_echo "$as_me:$LINENO: WARNING: dld.h:     section \"Present But Cannot Be Compiled\"" >&5
9081$as_echo "$as_me: WARNING: dld.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9082    { $as_echo "$as_me:$LINENO: WARNING: dld.h: proceeding with the preprocessor's result" >&5
9083$as_echo "$as_me: WARNING: dld.h: proceeding with the preprocessor's result" >&2;}
9084    { $as_echo "$as_me:$LINENO: WARNING: dld.h: in the future, the compiler will take precedence" >&5
9085$as_echo "$as_me: WARNING: dld.h: in the future, the compiler will take precedence" >&2;}
9086
9087    ;;
9088esac
9089{ $as_echo "$as_me:$LINENO: checking for dld.h" >&5
9090$as_echo_n "checking for dld.h... " >&6; }
9091if test "${ac_cv_header_dld_h+set}" = set; then
9092  $as_echo_n "(cached) " >&6
9093else
9094  ac_cv_header_dld_h=$ac_header_preproc
9095fi
9096{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dld_h" >&5
9097$as_echo "$ac_cv_header_dld_h" >&6; }
9098
9099fi
9100if test "x$ac_cv_header_dld_h" = x""yes; then
9101
9102		    SHLIB_LD="ld -shared"
9103		    DL_OBJS="tclLoadDld.o"
9104		    DL_LIBS="-ldld"
9105		    LD_SEARCH_FLAGS=""
9106fi
9107
9108
9109	    fi
9110	    if test "`uname -m`" = "alpha" ; then
9111		CFLAGS="$CFLAGS -mieee"
9112	    fi
9113
9114	    # The combo of gcc + glibc has a bug related
9115	    # to inlining of functions like strtod(). The
9116	    # -fno-builtin flag should address this problem
9117	    # but it does not work. The -fno-inline flag
9118	    # is kind of overkill but it works.
9119	    # Disable inlining only when one of the
9120	    # files in compat/*.c is being linked in.
9121	    if test x"${USE_COMPAT}" != x ; then
9122	        CFLAGS="$CFLAGS -fno-inline"
9123	    fi
9124
9125	    ;;
9126	GNU*)
9127	    SHLIB_CFLAGS="-fPIC"
9128	    SHLIB_LD_LIBS='${LIBS}'
9129	    SHLIB_SUFFIX=".so"
9130
9131	    if test "$have_dl" = yes; then
9132		SHLIB_LD="${CC} -shared"
9133		DL_OBJS=""
9134		DL_LIBS="-ldl"
9135		LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
9136		LD_SEARCH_FLAGS=""
9137	    else
9138		if test "${ac_cv_header_dld_h+set}" = set; then
9139  { $as_echo "$as_me:$LINENO: checking for dld.h" >&5
9140$as_echo_n "checking for dld.h... " >&6; }
9141if test "${ac_cv_header_dld_h+set}" = set; then
9142  $as_echo_n "(cached) " >&6
9143fi
9144{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dld_h" >&5
9145$as_echo "$ac_cv_header_dld_h" >&6; }
9146else
9147  # Is the header compilable?
9148{ $as_echo "$as_me:$LINENO: checking dld.h usability" >&5
9149$as_echo_n "checking dld.h usability... " >&6; }
9150cat >conftest.$ac_ext <<_ACEOF
9151/* confdefs.h.  */
9152_ACEOF
9153cat confdefs.h >>conftest.$ac_ext
9154cat >>conftest.$ac_ext <<_ACEOF
9155/* end confdefs.h.  */
9156$ac_includes_default
9157#include <dld.h>
9158_ACEOF
9159rm -f conftest.$ac_objext
9160if { (ac_try="$ac_compile"
9161case "(($ac_try" in
9162  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9163  *) ac_try_echo=$ac_try;;
9164esac
9165eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9166$as_echo "$ac_try_echo") >&5
9167  (eval "$ac_compile") 2>conftest.er1
9168  ac_status=$?
9169  grep -v '^ *+' conftest.er1 >conftest.err
9170  rm -f conftest.er1
9171  cat conftest.err >&5
9172  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9173  (exit $ac_status); } && {
9174	 test -z "$ac_c_werror_flag" ||
9175	 test ! -s conftest.err
9176       } && test -s conftest.$ac_objext; then
9177  ac_header_compiler=yes
9178else
9179  $as_echo "$as_me: failed program was:" >&5
9180sed 's/^/| /' conftest.$ac_ext >&5
9181
9182	ac_header_compiler=no
9183fi
9184
9185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9186{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9187$as_echo "$ac_header_compiler" >&6; }
9188
9189# Is the header present?
9190{ $as_echo "$as_me:$LINENO: checking dld.h presence" >&5
9191$as_echo_n "checking dld.h presence... " >&6; }
9192cat >conftest.$ac_ext <<_ACEOF
9193/* confdefs.h.  */
9194_ACEOF
9195cat confdefs.h >>conftest.$ac_ext
9196cat >>conftest.$ac_ext <<_ACEOF
9197/* end confdefs.h.  */
9198#include <dld.h>
9199_ACEOF
9200if { (ac_try="$ac_cpp conftest.$ac_ext"
9201case "(($ac_try" in
9202  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9203  *) ac_try_echo=$ac_try;;
9204esac
9205eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9206$as_echo "$ac_try_echo") >&5
9207  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9208  ac_status=$?
9209  grep -v '^ *+' conftest.er1 >conftest.err
9210  rm -f conftest.er1
9211  cat conftest.err >&5
9212  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9213  (exit $ac_status); } >/dev/null && {
9214	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9215	 test ! -s conftest.err
9216       }; then
9217  ac_header_preproc=yes
9218else
9219  $as_echo "$as_me: failed program was:" >&5
9220sed 's/^/| /' conftest.$ac_ext >&5
9221
9222  ac_header_preproc=no
9223fi
9224
9225rm -f conftest.err conftest.$ac_ext
9226{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9227$as_echo "$ac_header_preproc" >&6; }
9228
9229# So?  What about this header?
9230case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9231  yes:no: )
9232    { $as_echo "$as_me:$LINENO: WARNING: dld.h: accepted by the compiler, rejected by the preprocessor!" >&5
9233$as_echo "$as_me: WARNING: dld.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9234    { $as_echo "$as_me:$LINENO: WARNING: dld.h: proceeding with the compiler's result" >&5
9235$as_echo "$as_me: WARNING: dld.h: proceeding with the compiler's result" >&2;}
9236    ac_header_preproc=yes
9237    ;;
9238  no:yes:* )
9239    { $as_echo "$as_me:$LINENO: WARNING: dld.h: present but cannot be compiled" >&5
9240$as_echo "$as_me: WARNING: dld.h: present but cannot be compiled" >&2;}
9241    { $as_echo "$as_me:$LINENO: WARNING: dld.h:     check for missing prerequisite headers?" >&5
9242$as_echo "$as_me: WARNING: dld.h:     check for missing prerequisite headers?" >&2;}
9243    { $as_echo "$as_me:$LINENO: WARNING: dld.h: see the Autoconf documentation" >&5
9244$as_echo "$as_me: WARNING: dld.h: see the Autoconf documentation" >&2;}
9245    { $as_echo "$as_me:$LINENO: WARNING: dld.h:     section \"Present But Cannot Be Compiled\"" >&5
9246$as_echo "$as_me: WARNING: dld.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9247    { $as_echo "$as_me:$LINENO: WARNING: dld.h: proceeding with the preprocessor's result" >&5
9248$as_echo "$as_me: WARNING: dld.h: proceeding with the preprocessor's result" >&2;}
9249    { $as_echo "$as_me:$LINENO: WARNING: dld.h: in the future, the compiler will take precedence" >&5
9250$as_echo "$as_me: WARNING: dld.h: in the future, the compiler will take precedence" >&2;}
9251
9252    ;;
9253esac
9254{ $as_echo "$as_me:$LINENO: checking for dld.h" >&5
9255$as_echo_n "checking for dld.h... " >&6; }
9256if test "${ac_cv_header_dld_h+set}" = set; then
9257  $as_echo_n "(cached) " >&6
9258else
9259  ac_cv_header_dld_h=$ac_header_preproc
9260fi
9261{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dld_h" >&5
9262$as_echo "$ac_cv_header_dld_h" >&6; }
9263
9264fi
9265if test "x$ac_cv_header_dld_h" = x""yes; then
9266
9267		    SHLIB_LD="ld -shared"
9268		    DL_OBJS=""
9269		    DL_LIBS="-ldld"
9270		    LD_SEARCH_FLAGS=""
9271fi
9272
9273
9274	    fi
9275	    if test "`uname -m`" = "alpha" ; then
9276		CFLAGS="$CFLAGS -mieee"
9277	    fi
9278	    ;;
9279	MP-RAS-02*)
9280	    SHLIB_CFLAGS="-K PIC"
9281	    SHLIB_LD="cc -G"
9282	    SHLIB_LD_LIBS=""
9283	    SHLIB_SUFFIX=".so"
9284	    DL_OBJS="tclLoadDl.o"
9285	    DL_LIBS="-ldl"
9286	    LD_SEARCH_FLAGS=""
9287	    ;;
9288	MP-RAS-*)
9289	    SHLIB_CFLAGS="-K PIC"
9290	    SHLIB_LD="cc -G"
9291	    SHLIB_LD_LIBS=""
9292	    SHLIB_SUFFIX=".so"
9293	    DL_OBJS="tclLoadDl.o"
9294	    DL_LIBS="-ldl"
9295	    LDFLAGS="$LDFLAGS -Wl,-Bexport"
9296	    LD_SEARCH_FLAGS=""
9297	    ;;
9298	NetBSD-*|FreeBSD-[1-2].*)
9299	    # Not available on all versions:  check for include file.
9300	    if test "${ac_cv_header_dlfcn_h+set}" = set; then
9301  { $as_echo "$as_me:$LINENO: checking for dlfcn.h" >&5
9302$as_echo_n "checking for dlfcn.h... " >&6; }
9303if test "${ac_cv_header_dlfcn_h+set}" = set; then
9304  $as_echo_n "(cached) " >&6
9305fi
9306{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
9307$as_echo "$ac_cv_header_dlfcn_h" >&6; }
9308else
9309  # Is the header compilable?
9310{ $as_echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
9311$as_echo_n "checking dlfcn.h usability... " >&6; }
9312cat >conftest.$ac_ext <<_ACEOF
9313/* confdefs.h.  */
9314_ACEOF
9315cat confdefs.h >>conftest.$ac_ext
9316cat >>conftest.$ac_ext <<_ACEOF
9317/* end confdefs.h.  */
9318$ac_includes_default
9319#include <dlfcn.h>
9320_ACEOF
9321rm -f conftest.$ac_objext
9322if { (ac_try="$ac_compile"
9323case "(($ac_try" in
9324  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9325  *) ac_try_echo=$ac_try;;
9326esac
9327eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9328$as_echo "$ac_try_echo") >&5
9329  (eval "$ac_compile") 2>conftest.er1
9330  ac_status=$?
9331  grep -v '^ *+' conftest.er1 >conftest.err
9332  rm -f conftest.er1
9333  cat conftest.err >&5
9334  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9335  (exit $ac_status); } && {
9336	 test -z "$ac_c_werror_flag" ||
9337	 test ! -s conftest.err
9338       } && test -s conftest.$ac_objext; then
9339  ac_header_compiler=yes
9340else
9341  $as_echo "$as_me: failed program was:" >&5
9342sed 's/^/| /' conftest.$ac_ext >&5
9343
9344	ac_header_compiler=no
9345fi
9346
9347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9348{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9349$as_echo "$ac_header_compiler" >&6; }
9350
9351# Is the header present?
9352{ $as_echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
9353$as_echo_n "checking dlfcn.h presence... " >&6; }
9354cat >conftest.$ac_ext <<_ACEOF
9355/* confdefs.h.  */
9356_ACEOF
9357cat confdefs.h >>conftest.$ac_ext
9358cat >>conftest.$ac_ext <<_ACEOF
9359/* end confdefs.h.  */
9360#include <dlfcn.h>
9361_ACEOF
9362if { (ac_try="$ac_cpp conftest.$ac_ext"
9363case "(($ac_try" in
9364  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9365  *) ac_try_echo=$ac_try;;
9366esac
9367eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9368$as_echo "$ac_try_echo") >&5
9369  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9370  ac_status=$?
9371  grep -v '^ *+' conftest.er1 >conftest.err
9372  rm -f conftest.er1
9373  cat conftest.err >&5
9374  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9375  (exit $ac_status); } >/dev/null && {
9376	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9377	 test ! -s conftest.err
9378       }; then
9379  ac_header_preproc=yes
9380else
9381  $as_echo "$as_me: failed program was:" >&5
9382sed 's/^/| /' conftest.$ac_ext >&5
9383
9384  ac_header_preproc=no
9385fi
9386
9387rm -f conftest.err conftest.$ac_ext
9388{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9389$as_echo "$ac_header_preproc" >&6; }
9390
9391# So?  What about this header?
9392case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9393  yes:no: )
9394    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
9395$as_echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9396    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
9397$as_echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
9398    ac_header_preproc=yes
9399    ;;
9400  no:yes:* )
9401    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
9402$as_echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
9403    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
9404$as_echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
9405    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
9406$as_echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
9407    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
9408$as_echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9409    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
9410$as_echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
9411    { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
9412$as_echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
9413
9414    ;;
9415esac
9416{ $as_echo "$as_me:$LINENO: checking for dlfcn.h" >&5
9417$as_echo_n "checking for dlfcn.h... " >&6; }
9418if test "${ac_cv_header_dlfcn_h+set}" = set; then
9419  $as_echo_n "(cached) " >&6
9420else
9421  ac_cv_header_dlfcn_h=$ac_header_preproc
9422fi
9423{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
9424$as_echo "$ac_cv_header_dlfcn_h" >&6; }
9425
9426fi
9427if test "x$ac_cv_header_dlfcn_h" = x""yes; then
9428
9429		# NetBSD/SPARC needs -fPIC, -fpic will not do.
9430		SHLIB_CFLAGS="-fPIC"
9431		SHLIB_LD="ld -Bshareable -x"
9432		SHLIB_LD_LIBS=""
9433		SHLIB_SUFFIX=".so"
9434		DL_OBJS="tclLoadDl.o"
9435		DL_LIBS=""
9436		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9437		{ $as_echo "$as_me:$LINENO: checking for ELF" >&5
9438$as_echo_n "checking for ELF... " >&6; }
9439		cat >conftest.$ac_ext <<_ACEOF
9440/* confdefs.h.  */
9441_ACEOF
9442cat confdefs.h >>conftest.$ac_ext
9443cat >>conftest.$ac_ext <<_ACEOF
9444/* end confdefs.h.  */
9445
9446#ifdef __ELF__
9447	yes
9448#endif
9449
9450_ACEOF
9451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9452  $EGREP "yes" >/dev/null 2>&1; then
9453  { $as_echo "$as_me:$LINENO: result: yes" >&5
9454$as_echo "yes" >&6; }
9455		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
9456else
9457  { $as_echo "$as_me:$LINENO: result: no" >&5
9458$as_echo "no" >&6; }
9459		    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
9460
9461fi
9462rm -f conftest*
9463
9464
9465else
9466
9467		SHLIB_CFLAGS=""
9468		SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
9469		SHLIB_LD_LIBS='${LIBS}'
9470		SHLIB_SUFFIX=".a"
9471		DL_OBJS="tclLoadAout.o"
9472		DL_LIBS=""
9473		LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
9474		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9475
9476fi
9477
9478
9479
9480	    # FreeBSD doesn't handle version numbers with dots.
9481
9482	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9483	    TCL_LIB_VERSIONS_OK=nodots
9484	    ;;
9485	OpenBSD-*)
9486	    SHLIB_LD="${CC} -shared"
9487	    SHLIB_LD_LIBS='${LIBS}'
9488	    SHLIB_SUFFIX=".so"
9489	    DL_OBJS="tclLoadDl.o"
9490	    DL_LIBS=""
9491	    LD_SEARCH_FLAGS=""
9492	    { $as_echo "$as_me:$LINENO: checking for ELF" >&5
9493$as_echo_n "checking for ELF... " >&6; }
9494	    cat >conftest.$ac_ext <<_ACEOF
9495/* confdefs.h.  */
9496_ACEOF
9497cat confdefs.h >>conftest.$ac_ext
9498cat >>conftest.$ac_ext <<_ACEOF
9499/* end confdefs.h.  */
9500
9501#ifdef __ELF__
9502	yes
9503#endif
9504
9505_ACEOF
9506if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9507  $EGREP "yes" >/dev/null 2>&1; then
9508  { $as_echo "$as_me:$LINENO: result: yes" >&5
9509$as_echo "yes" >&6; }
9510		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
9511else
9512  { $as_echo "$as_me:$LINENO: result: no" >&5
9513$as_echo "no" >&6; }
9514		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
9515
9516fi
9517rm -f conftest*
9518
9519
9520	    # OpenBSD doesn't do version numbers with dots.
9521	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9522	    TCL_LIB_VERSIONS_OK=nodots
9523	    ;;
9524	FreeBSD-*|DragonFly-*)
9525	    # FreeBSD 3.* and greater have ELF.
9526	    SHLIB_CFLAGS="-fPIC"
9527	    SHLIB_LD="ld -Bshareable -x"
9528	    SHLIB_LD_LIBS='${LIBS}'
9529	    SHLIB_SUFFIX=".so"
9530	    DL_OBJS="tclLoadDl.o"
9531	    DL_LIBS=""
9532	    LDFLAGS="$LDFLAGS -export-dynamic"
9533	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9534	    if test "${TCL_THREADS}" = "1" ; then
9535		# The -pthread needs to go in the CFLAGS, not LIBS
9536		LIBS=`echo $LIBS | sed s/-pthread//`
9537		CFLAGS="$CFLAGS -pthread"
9538	    	LDFLAGS="$LDFLAGS -pthread"
9539	    fi
9540	    case $system in
9541	    FreeBSD-3.*)
9542	    	# FreeBSD-3 doesn't handle version numbers with dots.
9543	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9544	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
9545	    	TCL_LIB_VERSIONS_OK=nodots
9546		;;
9547	    esac
9548	    ;;
9549	Darwin-*)
9550	    SHLIB_CFLAGS="-fno-common"
9551	    SHLIB_LD="cc -dynamiclib \${LDFLAGS}"
9552	    SHLIB_LD_LIBS='${LIBS}'
9553	    SHLIB_SUFFIX=".dylib"
9554	    DL_OBJS="tclLoadDyld.o"
9555	    DL_LIBS=""
9556	    LDFLAGS="$LDFLAGS -prebind -Wl,-search_paths_first"
9557	    LD_SEARCH_FLAGS=""
9558	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
9559	    CFLAGS_OPTIMIZE="-Os"
9560	    ;;
9561	NEXTSTEP-*)
9562	    SHLIB_CFLAGS=""
9563	    SHLIB_LD="cc -nostdlib -r"
9564	    SHLIB_LD_LIBS=""
9565	    SHLIB_SUFFIX=".so"
9566	    DL_OBJS="tclLoadNext.o"
9567	    DL_LIBS=""
9568	    LD_SEARCH_FLAGS=""
9569	    ;;
9570	OS/390-*)
9571	    CFLAGS_OPTIMIZE=""      # Optimizer is buggy
9572	    cat >>confdefs.h <<\_ACEOF
9573#define _OE_SOCKETS 1
9574_ACEOF
9575  # needed in sys/socket.h
9576	    ;;
9577	OSF1-1.0|OSF1-1.1|OSF1-1.2)
9578	    # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
9579	    SHLIB_CFLAGS=""
9580	    # Hack: make package name same as library name
9581	    SHLIB_LD='ld -R -export :'
9582	    SHLIB_LD_LIBS=""
9583	    SHLIB_SUFFIX=".so"
9584	    DL_OBJS="tclLoadOSF.o"
9585	    DL_LIBS=""
9586	    LD_SEARCH_FLAGS=""
9587	    ;;
9588	OSF1-1.*)
9589	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
9590	    SHLIB_CFLAGS="-fPIC"
9591	    if test "$SHARED_BUILD" = "1" ; then
9592	        SHLIB_LD="ld -shared"
9593	    else
9594	        SHLIB_LD="ld -non_shared"
9595	    fi
9596	    SHLIB_LD_LIBS=""
9597	    SHLIB_SUFFIX=".so"
9598	    DL_OBJS="tclLoadDl.o"
9599	    DL_LIBS=""
9600	    LD_SEARCH_FLAGS=""
9601	    ;;
9602	OSF1-V*)
9603	    # Digital OSF/1
9604	    SHLIB_CFLAGS=""
9605	    if test "$SHARED_BUILD" = "1" ; then
9606	        SHLIB_LD='ld -shared -expect_unresolved "*"'
9607	    else
9608	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
9609	    fi
9610	    SHLIB_LD_LIBS=""
9611	    SHLIB_SUFFIX=".so"
9612	    DL_OBJS="tclLoadDl.o"
9613	    DL_LIBS=""
9614	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9615	    if test "$GCC" = "yes" ; then
9616		CFLAGS="$CFLAGS -mieee"
9617            else
9618		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
9619	    fi
9620	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
9621	    if test "${TCL_THREADS}" = "1" ; then
9622		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
9623		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
9624		LIBS=`echo $LIBS | sed s/-lpthreads//`
9625		if test "$GCC" = "yes" ; then
9626		    LIBS="$LIBS -lpthread -lmach -lexc"
9627		else
9628		    CFLAGS="$CFLAGS -pthread"
9629		    LDFLAGS="$LDFLAGS -pthread"
9630		fi
9631	    fi
9632
9633	    ;;
9634	QNX-6*)
9635	    # QNX RTP
9636	    # This may work for all QNX, but it was only reported for v6.
9637	    SHLIB_CFLAGS="-fPIC"
9638	    SHLIB_LD="ld -Bshareable -x"
9639	    SHLIB_LD_LIBS=""
9640	    SHLIB_SUFFIX=".so"
9641	    DL_OBJS="tclLoadDl.o"
9642	    # dlopen is in -lc on QNX
9643	    DL_LIBS=""
9644	    LD_SEARCH_FLAGS=""
9645	    ;;
9646	RISCos-*)
9647	    SHLIB_CFLAGS="-G 0"
9648	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
9649	    SHLIB_LD_LIBS='${LIBS}'
9650	    SHLIB_SUFFIX=".a"
9651	    DL_OBJS="tclLoadAout.o"
9652	    DL_LIBS=""
9653	    LDFLAGS="$LDFLAGS -Wl,-D,08000000"
9654	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
9655	    ;;
9656	SCO_SV-3.2*)
9657	    # Note, dlopen is available only on SCO 3.2.5 and greater. However,
9658	    # this test works, since "uname -s" was non-standard in 3.2.4 and
9659	    # below.
9660	    if test "$GCC" = "yes" ; then
9661	    	SHLIB_CFLAGS="-fPIC -melf"
9662	    	LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
9663	    else
9664	    	SHLIB_CFLAGS="-Kpic -belf"
9665	    	LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
9666	    fi
9667	    SHLIB_LD="ld -G"
9668	    SHLIB_LD_LIBS=""
9669	    SHLIB_SUFFIX=".so"
9670	    DL_OBJS="tclLoadDl.o"
9671	    DL_LIBS=""
9672	    LD_SEARCH_FLAGS=""
9673	    ;;
9674	SINIX*5.4*)
9675	    SHLIB_CFLAGS="-K PIC"
9676	    SHLIB_LD="cc -G"
9677	    SHLIB_LD_LIBS=""
9678	    SHLIB_SUFFIX=".so"
9679	    DL_OBJS="tclLoadDl.o"
9680	    DL_LIBS="-ldl"
9681	    LD_SEARCH_FLAGS=""
9682	    ;;
9683	SunOS-4*)
9684	    SHLIB_CFLAGS="-PIC"
9685	    SHLIB_LD="ld"
9686	    SHLIB_LD_LIBS=""
9687	    SHLIB_SUFFIX=".so"
9688	    DL_OBJS="tclLoadDl.o"
9689	    DL_LIBS="-ldl"
9690	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
9691
9692	    # SunOS can't handle version numbers with dots in them in library
9693	    # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
9694	    # requires an extra version number at the end of .so file names.
9695	    # So, the library has to have a name like libtcl75.so.1.0
9696
9697	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
9698	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9699	    TCL_LIB_VERSIONS_OK=nodots
9700	    ;;
9701	SunOS-5.[0-6]*)
9702
9703	    # Note: If _REENTRANT isn't defined, then Solaris
9704	    # won't define thread-safe library routines.
9705
9706	    cat >>confdefs.h <<\_ACEOF
9707#define _REENTRANT 1
9708_ACEOF
9709
9710	    cat >>confdefs.h <<\_ACEOF
9711#define _POSIX_PTHREAD_SEMANTICS 1
9712_ACEOF
9713
9714
9715	    SHLIB_CFLAGS="-KPIC"
9716
9717	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
9718	    # symbols when dynamically loaded into tclsh.
9719
9720	    SHLIB_LD_LIBS='${LIBS}'
9721	    SHLIB_SUFFIX=".so"
9722	    DL_OBJS="tclLoadDl.o"
9723	    DL_LIBS="-ldl"
9724	    if test "$GCC" = "yes" ; then
9725		SHLIB_LD="$CC -shared"
9726		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9727	    else
9728		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
9729		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9730	    fi
9731	    ;;
9732	SunOS-5*)
9733
9734	    # Note: If _REENTRANT isn't defined, then Solaris
9735	    # won't define thread-safe library routines.
9736
9737	    cat >>confdefs.h <<\_ACEOF
9738#define _REENTRANT 1
9739_ACEOF
9740
9741	    cat >>confdefs.h <<\_ACEOF
9742#define _POSIX_PTHREAD_SEMANTICS 1
9743_ACEOF
9744
9745
9746	    SHLIB_CFLAGS="-KPIC"
9747
9748	    # Check to enable 64-bit flags for compiler/linker
9749	    if test "$do64bit" = "yes" ; then
9750		arch=`isainfo`
9751		if test "$arch" = "sparcv9 sparc" ; then
9752			if test "$GCC" = "yes" ; then
9753			    if test "`gcc -dumpversion` | awk -F. '{print }'" -lt "3" ; then
9754				{ $as_echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
9755$as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
9756			    else
9757				do64bit_ok=yes
9758				CFLAGS="$CFLAGS -m64 -mcpu=v9"
9759				LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
9760				SHLIB_CFLAGS="-fPIC"
9761			    fi
9762			else
9763			    do64bit_ok=yes
9764			    if test "$do64bitVIS" = "yes" ; then
9765				CFLAGS="$CFLAGS -xarch=v9a"
9766			    	LDFLAGS="$LDFLAGS -xarch=v9a"
9767			    else
9768				CFLAGS="$CFLAGS -xarch=v9"
9769			    	LDFLAGS="$LDFLAGS -xarch=v9"
9770			    fi
9771			fi
9772		else
9773		    { $as_echo "$as_me:$LINENO: WARNING: \"64bit mode only supported sparcv9 system\"" >&5
9774$as_echo "$as_me: WARNING: \"64bit mode only supported sparcv9 system\"" >&2;}
9775		fi
9776	    fi
9777
9778	    # Note: need the LIBS below, otherwise Tk won't find Tcl's
9779	    # symbols when dynamically loaded into tclsh.
9780
9781	    SHLIB_LD_LIBS='${LIBS}'
9782	    SHLIB_SUFFIX=".so"
9783	    DL_OBJS="tclLoadDl.o"
9784	    DL_LIBS="-ldl"
9785	    if test "$GCC" = "yes" ; then
9786		SHLIB_LD="$CC -shared"
9787		LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9788		if test "$do64bit" = "yes" ; then
9789		    # We need to specify -static-libgcc or we need to
9790		    # add the path to the sparv9 libgcc.
9791		    # JH: static-libgcc is necessary for core Tcl, but may
9792		    # not be necessary for extensions.
9793		    SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
9794		    # for finding sparcv9 libgcc, get the regular libgcc
9795		    # path, remove so name and append 'sparcv9'
9796		    #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
9797		    #LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS},-R,$v9gcclibdir"
9798		fi
9799	    else
9800		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
9801		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9802	    fi
9803	    ;;
9804	ULTRIX-4.*)
9805	    SHLIB_CFLAGS="-G 0"
9806	    SHLIB_SUFFIX=".a"
9807	    SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
9808	    SHLIB_LD_LIBS='${LIBS}'
9809	    DL_OBJS="tclLoadAout.o"
9810	    DL_LIBS=""
9811	    LDFLAGS="$LDFLAGS -Wl,-D,08000000"
9812	    LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
9813	    if test "$GCC" != "yes" ; then
9814		CFLAGS="$CFLAGS -DHAVE_TZSET -std1"
9815	    fi
9816	    ;;
9817	UNIX_SV* | UnixWare-5*)
9818	    SHLIB_CFLAGS="-KPIC"
9819	    SHLIB_LD="cc -G"
9820	    SHLIB_LD_LIBS=""
9821	    SHLIB_SUFFIX=".so"
9822	    DL_OBJS="tclLoadDl.o"
9823	    DL_LIBS="-ldl"
9824	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
9825	    # that don't grok the -Bexport option.  Test that it does.
9826	    hold_ldflags=$LDFLAGS
9827	    { $as_echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
9828$as_echo_n "checking for ld accepts -Bexport flag... " >&6; }
9829	    LDFLAGS="$LDFLAGS -Wl,-Bexport"
9830	    cat >conftest.$ac_ext <<_ACEOF
9831/* confdefs.h.  */
9832_ACEOF
9833cat confdefs.h >>conftest.$ac_ext
9834cat >>conftest.$ac_ext <<_ACEOF
9835/* end confdefs.h.  */
9836
9837int
9838main ()
9839{
9840int i;
9841  ;
9842  return 0;
9843}
9844_ACEOF
9845rm -f conftest.$ac_objext conftest$ac_exeext
9846if { (ac_try="$ac_link"
9847case "(($ac_try" in
9848  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9849  *) ac_try_echo=$ac_try;;
9850esac
9851eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9852$as_echo "$ac_try_echo") >&5
9853  (eval "$ac_link") 2>conftest.er1
9854  ac_status=$?
9855  grep -v '^ *+' conftest.er1 >conftest.err
9856  rm -f conftest.er1
9857  cat conftest.err >&5
9858  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9859  (exit $ac_status); } && {
9860	 test -z "$ac_c_werror_flag" ||
9861	 test ! -s conftest.err
9862       } && test -s conftest$ac_exeext && {
9863	 test "$cross_compiling" = yes ||
9864	 $as_test_x conftest$ac_exeext
9865       }; then
9866  found=yes
9867else
9868  $as_echo "$as_me: failed program was:" >&5
9869sed 's/^/| /' conftest.$ac_ext >&5
9870
9871	LDFLAGS=$hold_ldflags found=no
9872fi
9873
9874rm -rf conftest.dSYM
9875rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9876      conftest$ac_exeext conftest.$ac_ext
9877	    { $as_echo "$as_me:$LINENO: result: $found" >&5
9878$as_echo "$found" >&6; }
9879	    LD_SEARCH_FLAGS=""
9880	    ;;
9881    esac
9882
9883    if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
9884    { $as_echo "$as_me:$LINENO: WARNING: \"64bit support being disabled -- don\'t know magic for this platform\"" >&5
9885$as_echo "$as_me: WARNING: \"64bit support being disabled -- don\'t know magic for this platform\"" >&2;}
9886    fi
9887
9888    # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
9889    # Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
9890    # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
9891    # to determine which of several header files defines the a.out file
9892    # format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
9893    # support only a file format that is more or less version-7-compatible.
9894    # In particular,
9895    #	- a.out files must begin with `struct exec'.
9896    #	- the N_TXTOFF on the `struct exec' must compute the seek address
9897    #	  of the text segment
9898    #	- The `struct exec' must contain a_magic, a_text, a_data, a_bss
9899    #	  and a_entry fields.
9900    # The following compilation should succeed if and only if either sys/exec.h
9901    # or a.out.h is usable for the purpose.
9902    #
9903    # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
9904    # `struct exec' includes a second header that contains information that
9905    # duplicates the v7 fields that are needed.
9906
9907    if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
9908	{ $as_echo "$as_me:$LINENO: checking sys/exec.h" >&5
9909$as_echo_n "checking sys/exec.h... " >&6; }
9910	cat >conftest.$ac_ext <<_ACEOF
9911/* confdefs.h.  */
9912_ACEOF
9913cat confdefs.h >>conftest.$ac_ext
9914cat >>conftest.$ac_ext <<_ACEOF
9915/* end confdefs.h.  */
9916#include <sys/exec.h>
9917int
9918main ()
9919{
9920
9921	    struct exec foo;
9922	    unsigned long seek;
9923	    int flag;
9924#if defined(__mips) || defined(mips)
9925	    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
9926#else
9927	    seek = N_TXTOFF (foo);
9928#endif
9929	    flag = (foo.a_magic == OMAGIC);
9930	    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
9931
9932  ;
9933  return 0;
9934}
9935_ACEOF
9936rm -f conftest.$ac_objext
9937if { (ac_try="$ac_compile"
9938case "(($ac_try" in
9939  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9940  *) ac_try_echo=$ac_try;;
9941esac
9942eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9943$as_echo "$ac_try_echo") >&5
9944  (eval "$ac_compile") 2>conftest.er1
9945  ac_status=$?
9946  grep -v '^ *+' conftest.er1 >conftest.err
9947  rm -f conftest.er1
9948  cat conftest.err >&5
9949  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9950  (exit $ac_status); } && {
9951	 test -z "$ac_c_werror_flag" ||
9952	 test ! -s conftest.err
9953       } && test -s conftest.$ac_objext; then
9954  tcl_ok=usable
9955else
9956  $as_echo "$as_me: failed program was:" >&5
9957sed 's/^/| /' conftest.$ac_ext >&5
9958
9959	tcl_ok=unusable
9960fi
9961
9962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9963	{ $as_echo "$as_me:$LINENO: result: $tcl_ok" >&5
9964$as_echo "$tcl_ok" >&6; }
9965	if test $tcl_ok = usable; then
9966	    cat >>confdefs.h <<\_ACEOF
9967#define USE_SYS_EXEC_H 1
9968_ACEOF
9969
9970	else
9971	    { $as_echo "$as_me:$LINENO: checking a.out.h" >&5
9972$as_echo_n "checking a.out.h... " >&6; }
9973	    cat >conftest.$ac_ext <<_ACEOF
9974/* confdefs.h.  */
9975_ACEOF
9976cat confdefs.h >>conftest.$ac_ext
9977cat >>conftest.$ac_ext <<_ACEOF
9978/* end confdefs.h.  */
9979#include <a.out.h>
9980int
9981main ()
9982{
9983
9984		struct exec foo;
9985		unsigned long seek;
9986		int flag;
9987#if defined(__mips) || defined(mips)
9988		seek = N_TXTOFF (foo.ex_f, foo.ex_o);
9989#else
9990		seek = N_TXTOFF (foo);
9991#endif
9992		flag = (foo.a_magic == OMAGIC);
9993		return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
9994
9995  ;
9996  return 0;
9997}
9998_ACEOF
9999rm -f conftest.$ac_objext
10000if { (ac_try="$ac_compile"
10001case "(($ac_try" in
10002  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10003  *) ac_try_echo=$ac_try;;
10004esac
10005eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10006$as_echo "$ac_try_echo") >&5
10007  (eval "$ac_compile") 2>conftest.er1
10008  ac_status=$?
10009  grep -v '^ *+' conftest.er1 >conftest.err
10010  rm -f conftest.er1
10011  cat conftest.err >&5
10012  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10013  (exit $ac_status); } && {
10014	 test -z "$ac_c_werror_flag" ||
10015	 test ! -s conftest.err
10016       } && test -s conftest.$ac_objext; then
10017  tcl_ok=usable
10018else
10019  $as_echo "$as_me: failed program was:" >&5
10020sed 's/^/| /' conftest.$ac_ext >&5
10021
10022	tcl_ok=unusable
10023fi
10024
10025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10026	    { $as_echo "$as_me:$LINENO: result: $tcl_ok" >&5
10027$as_echo "$tcl_ok" >&6; }
10028	    if test $tcl_ok = usable; then
10029		cat >>confdefs.h <<\_ACEOF
10030#define USE_A_OUT_H 1
10031_ACEOF
10032
10033	    else
10034		{ $as_echo "$as_me:$LINENO: checking sys/exec_aout.h" >&5
10035$as_echo_n "checking sys/exec_aout.h... " >&6; }
10036		cat >conftest.$ac_ext <<_ACEOF
10037/* confdefs.h.  */
10038_ACEOF
10039cat confdefs.h >>conftest.$ac_ext
10040cat >>conftest.$ac_ext <<_ACEOF
10041/* end confdefs.h.  */
10042#include <sys/exec_aout.h>
10043int
10044main ()
10045{
10046
10047		    struct exec foo;
10048		    unsigned long seek;
10049		    int flag;
10050#if defined(__mips) || defined(mips)
10051		    seek = N_TXTOFF (foo.ex_f, foo.ex_o);
10052#else
10053		    seek = N_TXTOFF (foo);
10054#endif
10055		    flag = (foo.a_midmag == OMAGIC);
10056		    return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
10057
10058  ;
10059  return 0;
10060}
10061_ACEOF
10062rm -f conftest.$ac_objext
10063if { (ac_try="$ac_compile"
10064case "(($ac_try" in
10065  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10066  *) ac_try_echo=$ac_try;;
10067esac
10068eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10069$as_echo "$ac_try_echo") >&5
10070  (eval "$ac_compile") 2>conftest.er1
10071  ac_status=$?
10072  grep -v '^ *+' conftest.er1 >conftest.err
10073  rm -f conftest.er1
10074  cat conftest.err >&5
10075  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10076  (exit $ac_status); } && {
10077	 test -z "$ac_c_werror_flag" ||
10078	 test ! -s conftest.err
10079       } && test -s conftest.$ac_objext; then
10080  tcl_ok=usable
10081else
10082  $as_echo "$as_me: failed program was:" >&5
10083sed 's/^/| /' conftest.$ac_ext >&5
10084
10085	tcl_ok=unusable
10086fi
10087
10088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10089		{ $as_echo "$as_me:$LINENO: result: $tcl_ok" >&5
10090$as_echo "$tcl_ok" >&6; }
10091		if test $tcl_ok = usable; then
10092		    cat >>confdefs.h <<\_ACEOF
10093#define USE_SYS_EXEC_AOUT_H 1
10094_ACEOF
10095
10096		else
10097		    DL_OBJS=""
10098		fi
10099	    fi
10100	fi
10101    fi
10102
10103    # Step 5: disable dynamic loading if requested via a command-line switch.
10104
10105    # Check whether --enable-load was given.
10106if test "${enable_load+set}" = set; then
10107  enableval=$enable_load; tcl_ok=$enableval
10108else
10109  tcl_ok=yes
10110fi
10111
10112    if test "$tcl_ok" = "no"; then
10113	DL_OBJS=""
10114    fi
10115
10116    if test "x$DL_OBJS" != "x" ; then
10117	BUILD_DLTEST="\$(DLTEST_TARGETS)"
10118    else
10119	echo "Can't figure out how to do dynamic loading or shared libraries"
10120	echo "on this system."
10121	SHLIB_CFLAGS=""
10122	SHLIB_LD=""
10123	SHLIB_SUFFIX=""
10124	DL_OBJS="tclLoadNone.o"
10125	DL_LIBS=""
10126	LDFLAGS="$LDFLAGS_ORIG"
10127	LD_SEARCH_FLAGS=""
10128	BUILD_DLTEST=""
10129    fi
10130
10131    # If we're running gcc, then change the C flags for compiling shared
10132    # libraries to the right flags for gcc, instead of those for the
10133    # standard manufacturer compiler.
10134
10135    if test "$DL_OBJS" != "tclLoadNone.o" ; then
10136	if test "$GCC" = "yes" ; then
10137	    case $system in
10138		AIX-*)
10139		    ;;
10140		BSD/OS*)
10141		    ;;
10142		IRIX*)
10143		    ;;
10144		NetBSD-*|FreeBSD-*|DragonFly-*)
10145		    ;;
10146		Darwin-*)
10147		    ;;
10148		RISCos-*)
10149		    ;;
10150		SCO_SV-3.2*)
10151		    ;;
10152		ULTRIX-4.*)
10153		    ;;
10154		windows)
10155		    ;;
10156		*)
10157		    SHLIB_CFLAGS="-fPIC"
10158		    ;;
10159	    esac
10160	fi
10161    fi
10162
10163    if test "$SHARED_LIB_SUFFIX" = "" ; then
10164	SHARED_LIB_SUFFIX='${SHLIB_SUFFIX}'
10165    fi
10166    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
10167	UNSHARED_LIB_SUFFIX='.a'
10168    fi
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183    # These must be called after we do the basic CFLAGS checks and
10184    # verify any possible 64-bit or similar switches are necessary
10185
10186    { $as_echo "$as_me:$LINENO: checking for required early compiler flags" >&5
10187$as_echo_n "checking for required early compiler flags... " >&6; }
10188    tcl_flags=""
10189
10190    if test "${tcl_cv_flag__isoc99_source+set}" = set; then
10191  $as_echo_n "(cached) " >&6
10192else
10193  cat >conftest.$ac_ext <<_ACEOF
10194/* confdefs.h.  */
10195_ACEOF
10196cat confdefs.h >>conftest.$ac_ext
10197cat >>conftest.$ac_ext <<_ACEOF
10198/* end confdefs.h.  */
10199#include <stdlib.h>
10200int
10201main ()
10202{
10203char *p = (char *)strtoll; char *q = (char *)strtoull;
10204  ;
10205  return 0;
10206}
10207_ACEOF
10208rm -f conftest.$ac_objext
10209if { (ac_try="$ac_compile"
10210case "(($ac_try" in
10211  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10212  *) ac_try_echo=$ac_try;;
10213esac
10214eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10215$as_echo "$ac_try_echo") >&5
10216  (eval "$ac_compile") 2>conftest.er1
10217  ac_status=$?
10218  grep -v '^ *+' conftest.er1 >conftest.err
10219  rm -f conftest.er1
10220  cat conftest.err >&5
10221  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10222  (exit $ac_status); } && {
10223	 test -z "$ac_c_werror_flag" ||
10224	 test ! -s conftest.err
10225       } && test -s conftest.$ac_objext; then
10226  tcl_cv_flag__isoc99_source=no
10227else
10228  $as_echo "$as_me: failed program was:" >&5
10229sed 's/^/| /' conftest.$ac_ext >&5
10230
10231	cat >conftest.$ac_ext <<_ACEOF
10232/* confdefs.h.  */
10233_ACEOF
10234cat confdefs.h >>conftest.$ac_ext
10235cat >>conftest.$ac_ext <<_ACEOF
10236/* end confdefs.h.  */
10237#define _ISOC99_SOURCE 1
10238#include <stdlib.h>
10239int
10240main ()
10241{
10242char *p = (char *)strtoll; char *q = (char *)strtoull;
10243  ;
10244  return 0;
10245}
10246_ACEOF
10247rm -f conftest.$ac_objext
10248if { (ac_try="$ac_compile"
10249case "(($ac_try" in
10250  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10251  *) ac_try_echo=$ac_try;;
10252esac
10253eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10254$as_echo "$ac_try_echo") >&5
10255  (eval "$ac_compile") 2>conftest.er1
10256  ac_status=$?
10257  grep -v '^ *+' conftest.er1 >conftest.err
10258  rm -f conftest.er1
10259  cat conftest.err >&5
10260  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10261  (exit $ac_status); } && {
10262	 test -z "$ac_c_werror_flag" ||
10263	 test ! -s conftest.err
10264       } && test -s conftest.$ac_objext; then
10265  tcl_cv_flag__isoc99_source=yes
10266else
10267  $as_echo "$as_me: failed program was:" >&5
10268sed 's/^/| /' conftest.$ac_ext >&5
10269
10270	tcl_cv_flag__isoc99_source=no
10271fi
10272
10273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10274fi
10275
10276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10277fi
10278
10279    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
10280	cat >>confdefs.h <<\_ACEOF
10281#define _ISOC99_SOURCE 1
10282_ACEOF
10283
10284	tcl_flags="$tcl_flags _ISOC99_SOURCE"
10285    fi
10286
10287
10288    if test "${tcl_cv_flag__largefile64_source+set}" = set; then
10289  $as_echo_n "(cached) " >&6
10290else
10291  cat >conftest.$ac_ext <<_ACEOF
10292/* confdefs.h.  */
10293_ACEOF
10294cat confdefs.h >>conftest.$ac_ext
10295cat >>conftest.$ac_ext <<_ACEOF
10296/* end confdefs.h.  */
10297#include <sys/stat.h>
10298int
10299main ()
10300{
10301struct stat64 buf; int i = stat64("/", &buf);
10302  ;
10303  return 0;
10304}
10305_ACEOF
10306rm -f conftest.$ac_objext
10307if { (ac_try="$ac_compile"
10308case "(($ac_try" in
10309  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10310  *) ac_try_echo=$ac_try;;
10311esac
10312eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10313$as_echo "$ac_try_echo") >&5
10314  (eval "$ac_compile") 2>conftest.er1
10315  ac_status=$?
10316  grep -v '^ *+' conftest.er1 >conftest.err
10317  rm -f conftest.er1
10318  cat conftest.err >&5
10319  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10320  (exit $ac_status); } && {
10321	 test -z "$ac_c_werror_flag" ||
10322	 test ! -s conftest.err
10323       } && test -s conftest.$ac_objext; then
10324  tcl_cv_flag__largefile64_source=no
10325else
10326  $as_echo "$as_me: failed program was:" >&5
10327sed 's/^/| /' conftest.$ac_ext >&5
10328
10329	cat >conftest.$ac_ext <<_ACEOF
10330/* confdefs.h.  */
10331_ACEOF
10332cat confdefs.h >>conftest.$ac_ext
10333cat >>conftest.$ac_ext <<_ACEOF
10334/* end confdefs.h.  */
10335#define _LARGEFILE64_SOURCE 1
10336#include <sys/stat.h>
10337int
10338main ()
10339{
10340struct stat64 buf; int i = stat64("/", &buf);
10341  ;
10342  return 0;
10343}
10344_ACEOF
10345rm -f conftest.$ac_objext
10346if { (ac_try="$ac_compile"
10347case "(($ac_try" in
10348  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10349  *) ac_try_echo=$ac_try;;
10350esac
10351eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10352$as_echo "$ac_try_echo") >&5
10353  (eval "$ac_compile") 2>conftest.er1
10354  ac_status=$?
10355  grep -v '^ *+' conftest.er1 >conftest.err
10356  rm -f conftest.er1
10357  cat conftest.err >&5
10358  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10359  (exit $ac_status); } && {
10360	 test -z "$ac_c_werror_flag" ||
10361	 test ! -s conftest.err
10362       } && test -s conftest.$ac_objext; then
10363  tcl_cv_flag__largefile64_source=yes
10364else
10365  $as_echo "$as_me: failed program was:" >&5
10366sed 's/^/| /' conftest.$ac_ext >&5
10367
10368	tcl_cv_flag__largefile64_source=no
10369fi
10370
10371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10372fi
10373
10374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10375fi
10376
10377    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
10378	cat >>confdefs.h <<\_ACEOF
10379#define _LARGEFILE64_SOURCE 1
10380_ACEOF
10381
10382	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
10383    fi
10384
10385    if test "x${tcl_flags}" = "x" ; then
10386	{ $as_echo "$as_me:$LINENO: result: none" >&5
10387$as_echo "none" >&6; }
10388    else
10389	{ $as_echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
10390$as_echo "${tcl_flags}" >&6; }
10391    fi
10392
10393
10394    { $as_echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
10395$as_echo_n "checking for 64-bit integer type... " >&6; }
10396    if test "${tcl_cv_type_64bit+set}" = set; then
10397  $as_echo_n "(cached) " >&6
10398else
10399
10400	tcl_cv_type_64bit=none
10401	# See if the compiler knows natively about __int64
10402	cat >conftest.$ac_ext <<_ACEOF
10403/* confdefs.h.  */
10404_ACEOF
10405cat confdefs.h >>conftest.$ac_ext
10406cat >>conftest.$ac_ext <<_ACEOF
10407/* end confdefs.h.  */
10408
10409int
10410main ()
10411{
10412__int64 value = (__int64) 0;
10413  ;
10414  return 0;
10415}
10416_ACEOF
10417rm -f conftest.$ac_objext
10418if { (ac_try="$ac_compile"
10419case "(($ac_try" in
10420  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10421  *) ac_try_echo=$ac_try;;
10422esac
10423eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10424$as_echo "$ac_try_echo") >&5
10425  (eval "$ac_compile") 2>conftest.er1
10426  ac_status=$?
10427  grep -v '^ *+' conftest.er1 >conftest.err
10428  rm -f conftest.er1
10429  cat conftest.err >&5
10430  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10431  (exit $ac_status); } && {
10432	 test -z "$ac_c_werror_flag" ||
10433	 test ! -s conftest.err
10434       } && test -s conftest.$ac_objext; then
10435  tcl_type_64bit=__int64
10436else
10437  $as_echo "$as_me: failed program was:" >&5
10438sed 's/^/| /' conftest.$ac_ext >&5
10439
10440	tcl_type_64bit="long long"
10441fi
10442
10443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10444	# See if we should use long anyway  Note that we substitute in the
10445	# type that is our current guess for a 64-bit type inside this check
10446	# program, so it should be modified only carefully...
10447        cat >conftest.$ac_ext <<_ACEOF
10448/* confdefs.h.  */
10449_ACEOF
10450cat confdefs.h >>conftest.$ac_ext
10451cat >>conftest.$ac_ext <<_ACEOF
10452/* end confdefs.h.  */
10453
10454int
10455main ()
10456{
10457switch (0) {
10458            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
10459        }
10460  ;
10461  return 0;
10462}
10463_ACEOF
10464rm -f conftest.$ac_objext
10465if { (ac_try="$ac_compile"
10466case "(($ac_try" in
10467  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10468  *) ac_try_echo=$ac_try;;
10469esac
10470eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10471$as_echo "$ac_try_echo") >&5
10472  (eval "$ac_compile") 2>conftest.er1
10473  ac_status=$?
10474  grep -v '^ *+' conftest.er1 >conftest.err
10475  rm -f conftest.er1
10476  cat conftest.err >&5
10477  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10478  (exit $ac_status); } && {
10479	 test -z "$ac_c_werror_flag" ||
10480	 test ! -s conftest.err
10481       } && test -s conftest.$ac_objext; then
10482  tcl_cv_type_64bit=${tcl_type_64bit}
10483else
10484  $as_echo "$as_me: failed program was:" >&5
10485sed 's/^/| /' conftest.$ac_ext >&5
10486
10487
10488fi
10489
10490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10491fi
10492
10493    if test "${tcl_cv_type_64bit}" = none ; then
10494	cat >>confdefs.h <<\_ACEOF
10495#define TCL_WIDE_INT_IS_LONG 1
10496_ACEOF
10497
10498	{ $as_echo "$as_me:$LINENO: result: using long" >&5
10499$as_echo "using long" >&6; }
10500    elif test "${tcl_cv_type_64bit}" = "__int64" \
10501		-a "${TEA_PLATFORM}" = "windows" ; then
10502	# We actually want to use the default tcl.h checks in this
10503	# case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
10504	{ $as_echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
10505$as_echo "using Tcl header defaults" >&6; }
10506    else
10507	cat >>confdefs.h <<_ACEOF
10508#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
10509_ACEOF
10510
10511	{ $as_echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
10512$as_echo "${tcl_cv_type_64bit}" >&6; }
10513
10514	# Now check for auxiliary declarations
10515	{ $as_echo "$as_me:$LINENO: checking for struct dirent64" >&5
10516$as_echo_n "checking for struct dirent64... " >&6; }
10517	if test "${tcl_cv_struct_dirent64+set}" = set; then
10518  $as_echo_n "(cached) " >&6
10519else
10520
10521	    cat >conftest.$ac_ext <<_ACEOF
10522/* confdefs.h.  */
10523_ACEOF
10524cat confdefs.h >>conftest.$ac_ext
10525cat >>conftest.$ac_ext <<_ACEOF
10526/* end confdefs.h.  */
10527#include <sys/types.h>
10528#include <sys/dirent.h>
10529int
10530main ()
10531{
10532struct dirent64 p;
10533  ;
10534  return 0;
10535}
10536_ACEOF
10537rm -f conftest.$ac_objext
10538if { (ac_try="$ac_compile"
10539case "(($ac_try" in
10540  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10541  *) ac_try_echo=$ac_try;;
10542esac
10543eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10544$as_echo "$ac_try_echo") >&5
10545  (eval "$ac_compile") 2>conftest.er1
10546  ac_status=$?
10547  grep -v '^ *+' conftest.er1 >conftest.err
10548  rm -f conftest.er1
10549  cat conftest.err >&5
10550  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10551  (exit $ac_status); } && {
10552	 test -z "$ac_c_werror_flag" ||
10553	 test ! -s conftest.err
10554       } && test -s conftest.$ac_objext; then
10555  tcl_cv_struct_dirent64=yes
10556else
10557  $as_echo "$as_me: failed program was:" >&5
10558sed 's/^/| /' conftest.$ac_ext >&5
10559
10560	tcl_cv_struct_dirent64=no
10561fi
10562
10563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10564fi
10565
10566	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
10567	    cat >>confdefs.h <<\_ACEOF
10568#define HAVE_STRUCT_DIRENT64 1
10569_ACEOF
10570
10571	fi
10572	{ $as_echo "$as_me:$LINENO: result: ${tcl_cv_struct_dirent64}" >&5
10573$as_echo "${tcl_cv_struct_dirent64}" >&6; }
10574
10575	{ $as_echo "$as_me:$LINENO: checking for struct stat64" >&5
10576$as_echo_n "checking for struct stat64... " >&6; }
10577	if test "${tcl_cv_struct_stat64+set}" = set; then
10578  $as_echo_n "(cached) " >&6
10579else
10580
10581	    cat >conftest.$ac_ext <<_ACEOF
10582/* confdefs.h.  */
10583_ACEOF
10584cat confdefs.h >>conftest.$ac_ext
10585cat >>conftest.$ac_ext <<_ACEOF
10586/* end confdefs.h.  */
10587#include <sys/stat.h>
10588int
10589main ()
10590{
10591struct stat64 p;
10592
10593  ;
10594  return 0;
10595}
10596_ACEOF
10597rm -f conftest.$ac_objext
10598if { (ac_try="$ac_compile"
10599case "(($ac_try" in
10600  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10601  *) ac_try_echo=$ac_try;;
10602esac
10603eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10604$as_echo "$ac_try_echo") >&5
10605  (eval "$ac_compile") 2>conftest.er1
10606  ac_status=$?
10607  grep -v '^ *+' conftest.er1 >conftest.err
10608  rm -f conftest.er1
10609  cat conftest.err >&5
10610  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10611  (exit $ac_status); } && {
10612	 test -z "$ac_c_werror_flag" ||
10613	 test ! -s conftest.err
10614       } && test -s conftest.$ac_objext; then
10615  tcl_cv_struct_stat64=yes
10616else
10617  $as_echo "$as_me: failed program was:" >&5
10618sed 's/^/| /' conftest.$ac_ext >&5
10619
10620	tcl_cv_struct_stat64=no
10621fi
10622
10623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10624fi
10625
10626	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
10627	    cat >>confdefs.h <<\_ACEOF
10628#define HAVE_STRUCT_STAT64 1
10629_ACEOF
10630
10631	fi
10632	{ $as_echo "$as_me:$LINENO: result: ${tcl_cv_struct_stat64}" >&5
10633$as_echo "${tcl_cv_struct_stat64}" >&6; }
10634
10635	{ $as_echo "$as_me:$LINENO: checking for off64_t" >&5
10636$as_echo_n "checking for off64_t... " >&6; }
10637	if test "${tcl_cv_type_off64_t+set}" = set; then
10638  $as_echo_n "(cached) " >&6
10639else
10640
10641	    cat >conftest.$ac_ext <<_ACEOF
10642/* confdefs.h.  */
10643_ACEOF
10644cat confdefs.h >>conftest.$ac_ext
10645cat >>conftest.$ac_ext <<_ACEOF
10646/* end confdefs.h.  */
10647#include <sys/types.h>
10648int
10649main ()
10650{
10651off64_t offset;
10652
10653  ;
10654  return 0;
10655}
10656_ACEOF
10657rm -f conftest.$ac_objext
10658if { (ac_try="$ac_compile"
10659case "(($ac_try" in
10660  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10661  *) ac_try_echo=$ac_try;;
10662esac
10663eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10664$as_echo "$ac_try_echo") >&5
10665  (eval "$ac_compile") 2>conftest.er1
10666  ac_status=$?
10667  grep -v '^ *+' conftest.er1 >conftest.err
10668  rm -f conftest.er1
10669  cat conftest.err >&5
10670  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10671  (exit $ac_status); } && {
10672	 test -z "$ac_c_werror_flag" ||
10673	 test ! -s conftest.err
10674       } && test -s conftest.$ac_objext; then
10675  tcl_cv_type_off64_t=yes
10676else
10677  $as_echo "$as_me: failed program was:" >&5
10678sed 's/^/| /' conftest.$ac_ext >&5
10679
10680	tcl_cv_type_off64_t=no
10681fi
10682
10683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10684fi
10685
10686	if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
10687	    cat >>confdefs.h <<\_ACEOF
10688#define HAVE_TYPE_OFF64_T 1
10689_ACEOF
10690
10691	fi
10692	{ $as_echo "$as_me:$LINENO: result: ${tcl_cv_type_off64_t}" >&5
10693$as_echo "${tcl_cv_type_off64_t}" >&6; }
10694    fi
10695
10696
10697
10698#--------------------------------------------------------------------
10699# Set the default compiler switches based on the --enable-symbols
10700# option.
10701#--------------------------------------------------------------------
10702
10703
10704
10705
10706    DBGX=""
10707
10708    { $as_echo "$as_me:$LINENO: checking for build with symbols" >&5
10709$as_echo_n "checking for build with symbols... " >&6; }
10710    # Check whether --enable-symbols was given.
10711if test "${enable_symbols+set}" = set; then
10712  enableval=$enable_symbols; tcl_ok=$enableval
10713else
10714  tcl_ok=no
10715fi
10716
10717    if test "$tcl_ok" = "no"; then
10718	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
10719	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
10720	{ $as_echo "$as_me:$LINENO: result: no" >&5
10721$as_echo "no" >&6; }
10722    else
10723	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
10724	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
10725	if test "$tcl_ok" = "yes"; then
10726	    { $as_echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
10727$as_echo "yes (standard debugging)" >&6; }
10728	fi
10729    fi
10730    if test "${TEA_PLATFORM}" != "windows" ; then
10731	LDFLAGS_DEFAULT="${LDFLAGS}"
10732    fi
10733
10734
10735
10736
10737
10738    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
10739	cat >>confdefs.h <<\_ACEOF
10740#define TCL_MEM_DEBUG 1
10741_ACEOF
10742
10743    fi
10744
10745    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
10746	if test "$tcl_ok" = "all"; then
10747	    { $as_echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
10748$as_echo "enabled symbols mem debugging" >&6; }
10749	else
10750	    { $as_echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
10751$as_echo "enabled $tcl_ok debugging" >&6; }
10752	fi
10753    fi
10754
10755
10756#--------------------------------------------------------------------
10757# Everyone should be linking against the Tcl stub library.  If you
10758# can't for some reason, remove this definition.  If you aren't using
10759# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
10760# link against the non-stubbed Tcl library.
10761#--------------------------------------------------------------------
10762
10763if test "${SHARED_BUILD}" = "1" ; then
10764    cat >>confdefs.h <<\_ACEOF
10765#define USE_TCL_STUBS 1
10766_ACEOF
10767
10768    cat >>confdefs.h <<\_ACEOF
10769#define USE_TK_STUBS 1
10770_ACEOF
10771
10772fi
10773
10774#--------------------------------------------------------------------
10775# This macro generates a line to use when building a library.  It
10776# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
10777# and TEA_LOAD_TCLCONFIG macros above.
10778#--------------------------------------------------------------------
10779
10780
10781    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
10782	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
10783	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
10784	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
10785    else
10786	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
10787	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}  \${TCLGEOMAP_LIB} \${TK_SHLIB_LD_EXTRAS}"
10788	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
10789    fi
10790
10791    if test "${SHARED_BUILD}" = "1" ; then
10792	MAKE_LIB="${MAKE_SHARED_LIB} "
10793    else
10794	MAKE_LIB="${MAKE_STATIC_LIB} "
10795    fi
10796
10797    #--------------------------------------------------------------------
10798    # Shared libraries and static libraries have different names.
10799    # Use the double eval to make sure any variables in the suffix is
10800    # substituted. (@@@ Might not be necessary anymore)
10801    #--------------------------------------------------------------------
10802
10803    if test "${TEA_PLATFORM}" = "windows" ; then
10804	if test "${SHARED_BUILD}" = "1" ; then
10805	    # We force the unresolved linking of symbols that are really in
10806	    # the private libraries of Tcl and Tk.
10807	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
10808	    if test x"${TK_BIN_DIR}" != x ; then
10809		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
10810	    fi
10811	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
10812	else
10813	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
10814	fi
10815	# Some packages build there own stubs libraries
10816	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
10817	# These aren't needed on Windows (either MSVC or gcc)
10818	RANLIB=:
10819	RANLIB_STUB=:
10820    else
10821	RANLIB_STUB="${RANLIB}"
10822	if test "${SHARED_BUILD}" = "1" ; then
10823	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
10824	    if test x"${TK_BIN_DIR}" != x ; then
10825		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
10826	    fi
10827	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
10828	    RANLIB=:
10829	else
10830	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
10831	fi
10832	# Some packages build there own stubs libraries
10833	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
10834    fi
10835
10836    # These are escaped so that only CFLAGS is picked up at configure time.
10837    # The other values will be substituted at make time.
10838    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
10839    if test "${SHARED_BUILD}" = "1" ; then
10840	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
10841    fi
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851#--------------------------------------------------------------------
10852# __CHANGE__
10853# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
10854#--------------------------------------------------------------------
10855
10856if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
10857    SHLIB_LD_LIBS="${SHLIB_LD_LIBS}"
10858else
10859    SHLIB_LD_LIBS="${SHLIB_LD_LIBS}"
10860fi
10861
10862#--------------------------------------------------------------------
10863# __CHANGE__
10864# Change the name from exampeA_LIB_FILE to match your package name.
10865# Use the stub_LIB_FILE substitution if your package creates a stub
10866# library.
10867#--------------------------------------------------------------------
10868
10869tkgeomap_LIB_FILE=${PKG_LIB_FILE}
10870
10871
10872#--------------------------------------------------------------------
10873# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
10874# file during the install process.  Don't run the TCLSH_PROG through
10875# ${CYGPATH} because it's being used directly by make.
10876# Require that we use a tclsh shell version 8.2 or later since earlier
10877# versions have bugs in the pkg_mkIndex routine.
10878#--------------------------------------------------------------------
10879
10880
10881    # Allow the user to provide this setting in the env
10882    if test "x${TCLSH_PROG}" = "x" ; then
10883	{ $as_echo "$as_me:$LINENO: checking for tclsh" >&5
10884$as_echo_n "checking for tclsh... " >&6; }
10885
10886	if test "${ac_cv_path_tclsh+set}" = set; then
10887  $as_echo_n "(cached) " >&6
10888else
10889
10890	search_path=`echo ${PATH} | sed -e 's/:/ /g'`
10891	if test "${TEA_PLATFORM}" != "windows" -o \
10892		\( "$do64bit_ok" = "no" -a "$doWince" = "no" \) ; then
10893	    # Do not allow target tclsh in known cross-compile builds,
10894	    # as we need one we can run on this system
10895	    search_path="${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin ${exec_prefix}/bin ${prefix}/bin ${search_path}"
10896	fi
10897	for dir in $search_path ; do
10898	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
10899		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
10900		if test x"$ac_cv_path_tclsh" = x ; then
10901		    if test -f "$j" ; then
10902			ac_cv_path_tclsh=$j
10903			break
10904		    fi
10905		fi
10906	    done
10907	done
10908
10909fi
10910
10911
10912	if test -f "$ac_cv_path_tclsh" ; then
10913	    TCLSH_PROG=$ac_cv_path_tclsh
10914	    { $as_echo "$as_me:$LINENO: result: $TCLSH_PROG" >&5
10915$as_echo "$TCLSH_PROG" >&6; }
10916	else
10917	    { { $as_echo "$as_me:$LINENO: error: No tclsh found in PATH: $search_path" >&5
10918$as_echo "$as_me: error: No tclsh found in PATH: $search_path" >&2;}
10919   { (exit 1); exit 1; }; }
10920	fi
10921    fi
10922
10923
10924
10925    # Allow the user to provide this setting in the env
10926    if test "x${WISH_PROG}" = "x" ; then
10927	{ $as_echo "$as_me:$LINENO: checking for wish" >&5
10928$as_echo_n "checking for wish... " >&6; }
10929
10930	if test "${ac_cv_path_wish+set}" = set; then
10931  $as_echo_n "(cached) " >&6
10932else
10933
10934	search_path=`echo ${PATH} | sed -e 's/:/ /g'`
10935	if test "${TEA_PLATFORM}" != "windows" -o \
10936		\( "$do64bit_ok" = "no" -a "$doWince" = "no" \) ; then
10937	    # Do not allow target wish in known cross-compile builds,
10938	    # as we need one we can run on this system
10939	    search_path="${TK_BIN_DIR} ${TK_BIN_DIR}/../bin ${TCL_BIN_DIR} ${TCL_BIN_DIR}/../bin ${exec_prefix}/bin ${prefix}/bin ${search_path}"
10940	fi
10941	for dir in $search_path ; do
10942	    for j in `ls -r $dir/wish[8-9]*${EXEEXT} 2> /dev/null` \
10943		    `ls -r $dir/wish*${EXEEXT} 2> /dev/null` ; do
10944		if test x"$ac_cv_path_wish" = x ; then
10945		    if test -f "$j" ; then
10946			ac_cv_path_wish=$j
10947			break
10948		    fi
10949		fi
10950	    done
10951	done
10952
10953fi
10954
10955
10956	if test -f "$ac_cv_path_wish" ; then
10957	WISH_PROG=$ac_cv_path_wish
10958	    { $as_echo "$as_me:$LINENO: result: $WISH_PROG" >&5
10959$as_echo "$WISH_PROG" >&6; }
10960	else
10961	    { { $as_echo "$as_me:$LINENO: error: No wish found in PATH: $search_path" >&5
10962$as_echo "$as_me: error: No wish found in PATH: $search_path" >&2;}
10963   { (exit 1); exit 1; }; }
10964	fi
10965    fi
10966
10967
10968
10969#-----------------------------------------------------------------------
10970# Locate tclgeomap library and headers.
10971#-----------------------------------------------------------------------
10972
10973
10974    if test "${SHARED_BUILD}" = "1"
10975    then
10976	{ $as_echo "$as_me:$LINENO: checking for tclgeomap" >&5
10977$as_echo_n "checking for tclgeomap... " >&6; }
10978	cat > find_tclgeomap.tcl << END
10979	lappend auto_path ${prefix}/lib ${TCLGEOMAP_LIB}
10980	package require tclgeomap ${PACKAGE_VERSION}
10981	puts \$::geomap::tclgeomap_lib_file
10982END
10983	TCLGEOMAP_BIN_FILE=`${TCLSH_PROG} ./find_tclgeomap.tcl 2> /dev/null`
10984	rm -f find_tclgeomap.tcl
10985	if test x"$TCLGEOMAP_BIN_FILE" = "x"
10986	then
10987	    { { $as_echo "$as_me:$LINENO: error: shared build specified but could not find shared tclgeomap library" >&5
10988$as_echo "$as_me: error: shared build specified but could not find shared tclgeomap library" >&2;}
10989   { (exit 1); exit 1; }; }
10990	else
10991	    { $as_echo "$as_me:$LINENO: result: tclgeomap library is $TCLGEOMAP_BIN_FILE" >&5
10992$as_echo "tclgeomap library is $TCLGEOMAP_BIN_FILE" >&6; }
10993	fi
10994
10995	# Define tclgeomap library specifier for link command,
10996	# if system needs it.
10997
10998	tclgeomap_lib_dir=`dirname ${TCLGEOMAP_BIN_FILE}`
10999	tclgeomap_lib_spec="-L$tclgeomap_lib_dir -ltclgeomap"
11000	system=`uname -s`-`uname -r`
11001	if test "$?" -ne 0 ; then
11002	    { $as_echo "$as_me:$LINENO: result: unknown (can't find uname command)" >&5
11003$as_echo "unknown (can't find uname command)" >&6; }
11004	    system=unknown
11005	fi
11006	TCLGEOMAP_LIB_SPEC=""
11007	case $system in
11008	    Darwin-*)
11009		TCLGEOMAP_LIB_SPEC=$tclgeomap_lib_spec
11010		;;
11011	    SunOS-5*)
11012		TCLGEOMAP_LIB_SPEC=$tclgeomap_lib_spec
11013		;;
11014	esac
11015
11016    fi
11017
11018
11019    { $as_echo "$as_me:$LINENO: checking for Tclgeomap public headers" >&5
11020$as_echo_n "checking for Tclgeomap public headers... " >&6; }
11021
11022# Check whether --with-tclgeomap-include was given.
11023if test "${with_tclgeomap_include+set}" = set; then
11024  withval=$with_tclgeomap_include; with_tclgeomap_include=${withval}
11025fi
11026
11027    if test x"${with_tclgeomap_include}" != x ; then
11028	if test -f "${with_tclgeomap_include}/tclgeomap.h" ; then
11029	    ac_cv_c_tclgeomap_h=${with_tclgeomap_include}
11030	else
11031	    { { $as_echo "$as_me:$LINENO: error: ${with_tclgeomap_include} directory does not contain Tclgeomap public header file tclgeomap.h" >&5
11032$as_echo "$as_me: error: ${with_tclgeomap_include} directory does not contain Tclgeomap public header file tclgeomap.h" >&2;}
11033   { (exit 1); exit 1; }; }
11034	fi
11035    else
11036	if test "${ac_cv_c_tclgeomap_h+set}" = set; then
11037  $as_echo_n "(cached) " >&6
11038else
11039
11040	    # Use the value from --with-tclgeomap-include, if it was given
11041
11042	    if test x"${with_tclgeomap_include}" != x ; then
11043		ac_cv_c_tclgeomap_h=${with_tclgeomap_include}
11044	    else
11045		# Check in the includedir, if --prefix was specified
11046		eval "temp_includedir=${includedir}"
11047		for i in \
11048			`ls -d ${temp_includedir} 2>/dev/null` \
11049			${prefix}/include/tclgeomap${PACKAGE_VERSION} \
11050			/usr/local/include/tclgeomap${PACKAGE_VERSION} \
11051			/usr/include/tclgeomap${PACKAGE_VERSION} \
11052			/usr/local/include /usr/include ; do
11053		    if test -f "$i/tclgeomap.h" ; then
11054			ac_cv_c_tclgeomap_h=$i
11055			break
11056		    fi
11057		done
11058	    fi
11059
11060fi
11061
11062    fi
11063    if test x"${ac_cv_c_tclgeomap_h}" = x ; then
11064	{ { $as_echo "$as_me:$LINENO: error: tclgeomap.h not found.  Please specify its location with --with-tclgeomap-include" >&5
11065$as_echo "$as_me: error: tclgeomap.h not found.  Please specify its location with --with-tclgeomap-include" >&2;}
11066   { (exit 1); exit 1; }; }
11067    else
11068	{ $as_echo "$as_me:$LINENO: result: ${ac_cv_c_tclgeomap_h}" >&5
11069$as_echo "${ac_cv_c_tclgeomap_h}" >&6; }
11070    fi
11071    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclgeomap_h}`
11072    TCLGEOMAP_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
11073
11074
11075
11076#--------------------------------------------------------------------
11077# Finally, substitute all of the various values into the Makefile.
11078#--------------------------------------------------------------------
11079
11080ac_config_files="$ac_config_files Makefile pkgIndex.tcl"
11081
11082cat >confcache <<\_ACEOF
11083# This file is a shell script that caches the results of configure
11084# tests run on this system so they can be shared between configure
11085# scripts and configure runs, see configure's option --config-cache.
11086# It is not useful on other systems.  If it contains results you don't
11087# want to keep, you may remove or edit it.
11088#
11089# config.status only pays attention to the cache file if you give it
11090# the --recheck option to rerun configure.
11091#
11092# `ac_cv_env_foo' variables (set or unset) will be overridden when
11093# loading this file, other *unset* `ac_cv_foo' will be assigned the
11094# following values.
11095
11096_ACEOF
11097
11098# The following way of writing the cache mishandles newlines in values,
11099# but we know of no workaround that is simple, portable, and efficient.
11100# So, we kill variables containing newlines.
11101# Ultrix sh set writes to stderr and can't be redirected directly,
11102# and sets the high bit in the cache file unless we assign to the vars.
11103(
11104  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
11105    eval ac_val=\$$ac_var
11106    case $ac_val in #(
11107    *${as_nl}*)
11108      case $ac_var in #(
11109      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
11110$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
11111      esac
11112      case $ac_var in #(
11113      _ | IFS | as_nl) ;; #(
11114      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
11115      *) $as_unset $ac_var ;;
11116      esac ;;
11117    esac
11118  done
11119
11120  (set) 2>&1 |
11121    case $as_nl`(ac_space=' '; set) 2>&1` in #(
11122    *${as_nl}ac_space=\ *)
11123      # `set' does not quote correctly, so add quotes (double-quote
11124      # substitution turns \\\\ into \\, and sed turns \\ into \).
11125      sed -n \
11126	"s/'/'\\\\''/g;
11127	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11128      ;; #(
11129    *)
11130      # `set' quotes correctly as required by POSIX, so do not add quotes.
11131      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
11132      ;;
11133    esac |
11134    sort
11135) |
11136  sed '
11137     /^ac_cv_env_/b end
11138     t clear
11139     :clear
11140     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11141     t end
11142     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11143     :end' >>confcache
11144if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
11145  if test -w "$cache_file"; then
11146    test "x$cache_file" != "x/dev/null" &&
11147      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
11148$as_echo "$as_me: updating cache $cache_file" >&6;}
11149    cat confcache >$cache_file
11150  else
11151    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
11152$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
11153  fi
11154fi
11155rm -f confcache
11156
11157test "x$prefix" = xNONE && prefix=$ac_default_prefix
11158# Let make expand exec_prefix.
11159test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11160
11161# Transform confdefs.h into DEFS.
11162# Protect against shell expansion while executing Makefile rules.
11163# Protect against Makefile macro expansion.
11164#
11165# If the first sed substitution is executed (which looks for macros that
11166# take arguments), then branch to the quote section.  Otherwise,
11167# look for a macro that doesn't take arguments.
11168ac_script='
11169:mline
11170/\\$/{
11171 N
11172 s,\\\n,,
11173 b mline
11174}
11175t clear
11176:clear
11177s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
11178t quote
11179s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
11180t quote
11181b any
11182:quote
11183s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
11184s/\[/\\&/g
11185s/\]/\\&/g
11186s/\$/$$/g
11187H
11188:any
11189${
11190	g
11191	s/^\n//
11192	s/\n/ /g
11193	p
11194}
11195'
11196DEFS=`sed -n "$ac_script" confdefs.h`
11197
11198
11199ac_libobjs=
11200ac_ltlibobjs=
11201for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
11202  # 1. Remove the extension, and $U if already installed.
11203  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
11204  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
11205  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
11206  #    will be set to the directory where LIBOBJS objects are built.
11207  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
11208  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
11209done
11210LIBOBJS=$ac_libobjs
11211
11212LTLIBOBJS=$ac_ltlibobjs
11213
11214
11215
11216
11217: ${CONFIG_STATUS=./config.status}
11218ac_write_fail=0
11219ac_clean_files_save=$ac_clean_files
11220ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11221{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
11222$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
11223cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11224#! $SHELL
11225# Generated by $as_me.
11226# Run this file to recreate the current configuration.
11227# Compiler output produced by configure, useful for debugging
11228# configure, is in config.log if it exists.
11229
11230debug=false
11231ac_cs_recheck=false
11232ac_cs_silent=false
11233SHELL=\${CONFIG_SHELL-$SHELL}
11234_ACEOF
11235
11236cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11237## --------------------- ##
11238## M4sh Initialization.  ##
11239## --------------------- ##
11240
11241# Be more Bourne compatible
11242DUALCASE=1; export DUALCASE # for MKS sh
11243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11244  emulate sh
11245  NULLCMD=:
11246  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
11247  # is contrary to our usage.  Disable this feature.
11248  alias -g '${1+"$@"}'='"$@"'
11249  setopt NO_GLOB_SUBST
11250else
11251  case `(set -o) 2>/dev/null` in
11252  *posix*) set -o posix ;;
11253esac
11254
11255fi
11256
11257
11258
11259
11260# PATH needs CR
11261# Avoid depending upon Character Ranges.
11262as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11263as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11264as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11265as_cr_digits='0123456789'
11266as_cr_alnum=$as_cr_Letters$as_cr_digits
11267
11268as_nl='
11269'
11270export as_nl
11271# Printing a long string crashes Solaris 7 /usr/bin/printf.
11272as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11273as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
11274as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
11275if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
11276  as_echo='printf %s\n'
11277  as_echo_n='printf %s'
11278else
11279  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
11280    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
11281    as_echo_n='/usr/ucb/echo -n'
11282  else
11283    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
11284    as_echo_n_body='eval
11285      arg=$1;
11286      case $arg in
11287      *"$as_nl"*)
11288	expr "X$arg" : "X\\(.*\\)$as_nl";
11289	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
11290      esac;
11291      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
11292    '
11293    export as_echo_n_body
11294    as_echo_n='sh -c $as_echo_n_body as_echo'
11295  fi
11296  export as_echo_body
11297  as_echo='sh -c $as_echo_body as_echo'
11298fi
11299
11300# The user is always right.
11301if test "${PATH_SEPARATOR+set}" != set; then
11302  PATH_SEPARATOR=:
11303  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
11304    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
11305      PATH_SEPARATOR=';'
11306  }
11307fi
11308
11309# Support unset when possible.
11310if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
11311  as_unset=unset
11312else
11313  as_unset=false
11314fi
11315
11316
11317# IFS
11318# We need space, tab and new line, in precisely that order.  Quoting is
11319# there to prevent editors from complaining about space-tab.
11320# (If _AS_PATH_WALK were called with IFS unset, it would disable word
11321# splitting by setting IFS to empty value.)
11322IFS=" ""	$as_nl"
11323
11324# Find who we are.  Look in the path if we contain no directory separator.
11325case $0 in
11326  *[\\/]* ) as_myself=$0 ;;
11327  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11328for as_dir in $PATH
11329do
11330  IFS=$as_save_IFS
11331  test -z "$as_dir" && as_dir=.
11332  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
11333done
11334IFS=$as_save_IFS
11335
11336     ;;
11337esac
11338# We did not find ourselves, most probably we were run as `sh COMMAND'
11339# in which case we are not to be found in the path.
11340if test "x$as_myself" = x; then
11341  as_myself=$0
11342fi
11343if test ! -f "$as_myself"; then
11344  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
11345  { (exit 1); exit 1; }
11346fi
11347
11348# Work around bugs in pre-3.0 UWIN ksh.
11349for as_var in ENV MAIL MAILPATH
11350do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
11351done
11352PS1='$ '
11353PS2='> '
11354PS4='+ '
11355
11356# NLS nuisances.
11357LC_ALL=C
11358export LC_ALL
11359LANGUAGE=C
11360export LANGUAGE
11361
11362# Required to use basename.
11363if expr a : '\(a\)' >/dev/null 2>&1 &&
11364   test "X`expr 00001 : '.*\(...\)'`" = X001; then
11365  as_expr=expr
11366else
11367  as_expr=false
11368fi
11369
11370if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
11371  as_basename=basename
11372else
11373  as_basename=false
11374fi
11375
11376
11377# Name of the executable.
11378as_me=`$as_basename -- "$0" ||
11379$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11380	 X"$0" : 'X\(//\)$' \| \
11381	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
11382$as_echo X/"$0" |
11383    sed '/^.*\/\([^/][^/]*\)\/*$/{
11384	    s//\1/
11385	    q
11386	  }
11387	  /^X\/\(\/\/\)$/{
11388	    s//\1/
11389	    q
11390	  }
11391	  /^X\/\(\/\).*/{
11392	    s//\1/
11393	    q
11394	  }
11395	  s/.*/./; q'`
11396
11397# CDPATH.
11398$as_unset CDPATH
11399
11400
11401
11402  as_lineno_1=$LINENO
11403  as_lineno_2=$LINENO
11404  test "x$as_lineno_1" != "x$as_lineno_2" &&
11405  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
11406
11407  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
11408  # uniformly replaced by the line number.  The first 'sed' inserts a
11409  # line-number line after each line using $LINENO; the second 'sed'
11410  # does the real work.  The second script uses 'N' to pair each
11411  # line-number line with the line containing $LINENO, and appends
11412  # trailing '-' during substitution so that $LINENO is not a special
11413  # case at line end.
11414  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
11415  # scripts with optimization help from Paolo Bonzini.  Blame Lee
11416  # E. McMahon (1931-1989) for sed's syntax.  :-)
11417  sed -n '
11418    p
11419    /[$]LINENO/=
11420  ' <$as_myself |
11421    sed '
11422      s/[$]LINENO.*/&-/
11423      t lineno
11424      b
11425      :lineno
11426      N
11427      :loop
11428      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
11429      t loop
11430      s/-\n.*//
11431    ' >$as_me.lineno &&
11432  chmod +x "$as_me.lineno" ||
11433    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
11434   { (exit 1); exit 1; }; }
11435
11436  # Don't try to exec as it changes $[0], causing all sort of problems
11437  # (the dirname of $[0] is not the place where we might find the
11438  # original and so on.  Autoconf is especially sensitive to this).
11439  . "./$as_me.lineno"
11440  # Exit status is that of the last command.
11441  exit
11442}
11443
11444
11445if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
11446  as_dirname=dirname
11447else
11448  as_dirname=false
11449fi
11450
11451ECHO_C= ECHO_N= ECHO_T=
11452case `echo -n x` in
11453-n*)
11454  case `echo 'x\c'` in
11455  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
11456  *)   ECHO_C='\c';;
11457  esac;;
11458*)
11459  ECHO_N='-n';;
11460esac
11461if expr a : '\(a\)' >/dev/null 2>&1 &&
11462   test "X`expr 00001 : '.*\(...\)'`" = X001; then
11463  as_expr=expr
11464else
11465  as_expr=false
11466fi
11467
11468rm -f conf$$ conf$$.exe conf$$.file
11469if test -d conf$$.dir; then
11470  rm -f conf$$.dir/conf$$.file
11471else
11472  rm -f conf$$.dir
11473  mkdir conf$$.dir 2>/dev/null
11474fi
11475if (echo >conf$$.file) 2>/dev/null; then
11476  if ln -s conf$$.file conf$$ 2>/dev/null; then
11477    as_ln_s='ln -s'
11478    # ... but there are two gotchas:
11479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
11480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
11481    # In both cases, we have to default to `cp -p'.
11482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
11483      as_ln_s='cp -p'
11484  elif ln conf$$.file conf$$ 2>/dev/null; then
11485    as_ln_s=ln
11486  else
11487    as_ln_s='cp -p'
11488  fi
11489else
11490  as_ln_s='cp -p'
11491fi
11492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11493rmdir conf$$.dir 2>/dev/null
11494
11495if mkdir -p . 2>/dev/null; then
11496  as_mkdir_p=:
11497else
11498  test -d ./-p && rmdir ./-p
11499  as_mkdir_p=false
11500fi
11501
11502if test -x / >/dev/null 2>&1; then
11503  as_test_x='test -x'
11504else
11505  if ls -dL / >/dev/null 2>&1; then
11506    as_ls_L_option=L
11507  else
11508    as_ls_L_option=
11509  fi
11510  as_test_x='
11511    eval sh -c '\''
11512      if test -d "$1"; then
11513	test -d "$1/.";
11514      else
11515	case $1 in
11516	-*)set "./$1";;
11517	esac;
11518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
11519	???[sx]*):;;*)false;;esac;fi
11520    '\'' sh
11521  '
11522fi
11523as_executable_p=$as_test_x
11524
11525# Sed expression to map a string onto a valid CPP name.
11526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
11527
11528# Sed expression to map a string onto a valid variable name.
11529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
11530
11531
11532exec 6>&1
11533
11534# Save the log message, to keep $[0] and so on meaningful, and to
11535# report actual input values of CONFIG_FILES etc. instead of their
11536# values after options handling.
11537ac_log="
11538This file was extended by tkgeomap $as_me 2.11.6, which was
11539generated by GNU Autoconf 2.63.  Invocation command line was
11540
11541  CONFIG_FILES    = $CONFIG_FILES
11542  CONFIG_HEADERS  = $CONFIG_HEADERS
11543  CONFIG_LINKS    = $CONFIG_LINKS
11544  CONFIG_COMMANDS = $CONFIG_COMMANDS
11545  $ $0 $@
11546
11547on `(hostname || uname -n) 2>/dev/null | sed 1q`
11548"
11549
11550_ACEOF
11551
11552case $ac_config_files in *"
11553"*) set x $ac_config_files; shift; ac_config_files=$*;;
11554esac
11555
11556
11557
11558cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11559# Files that config.status was made for.
11560config_files="$ac_config_files"
11561
11562_ACEOF
11563
11564cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11565ac_cs_usage="\
11566\`$as_me' instantiates files from templates according to the
11567current configuration.
11568
11569Usage: $0 [OPTION]... [FILE]...
11570
11571  -h, --help       print this help, then exit
11572  -V, --version    print version number and configuration settings, then exit
11573  -q, --quiet, --silent
11574                   do not print progress messages
11575  -d, --debug      don't remove temporary files
11576      --recheck    update $as_me by reconfiguring in the same conditions
11577      --file=FILE[:TEMPLATE]
11578                   instantiate the configuration file FILE
11579
11580Configuration files:
11581$config_files
11582
11583Report bugs to <bug-autoconf@gnu.org>."
11584
11585_ACEOF
11586cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11587ac_cs_version="\\
11588tkgeomap config.status 2.11.6
11589configured by $0, generated by GNU Autoconf 2.63,
11590  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
11591
11592Copyright (C) 2008 Free Software Foundation, Inc.
11593This config.status script is free software; the Free Software Foundation
11594gives unlimited permission to copy, distribute and modify it."
11595
11596ac_pwd='$ac_pwd'
11597srcdir='$srcdir'
11598INSTALL='$INSTALL'
11599test -n "\$AWK" || AWK=awk
11600_ACEOF
11601
11602cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11603# The default lists apply if the user does not specify any file.
11604ac_need_defaults=:
11605while test $# != 0
11606do
11607  case $1 in
11608  --*=*)
11609    ac_option=`expr "X$1" : 'X\([^=]*\)='`
11610    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
11611    ac_shift=:
11612    ;;
11613  *)
11614    ac_option=$1
11615    ac_optarg=$2
11616    ac_shift=shift
11617    ;;
11618  esac
11619
11620  case $ac_option in
11621  # Handling of the options.
11622  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11623    ac_cs_recheck=: ;;
11624  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
11625    $as_echo "$ac_cs_version"; exit ;;
11626  --debug | --debu | --deb | --de | --d | -d )
11627    debug=: ;;
11628  --file | --fil | --fi | --f )
11629    $ac_shift
11630    case $ac_optarg in
11631    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11632    esac
11633    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
11634    ac_need_defaults=false;;
11635  --he | --h |  --help | --hel | -h )
11636    $as_echo "$ac_cs_usage"; exit ;;
11637  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11638  | -silent | --silent | --silen | --sile | --sil | --si | --s)
11639    ac_cs_silent=: ;;
11640
11641  # This is an error.
11642  -*) { $as_echo "$as_me: error: unrecognized option: $1
11643Try \`$0 --help' for more information." >&2
11644   { (exit 1); exit 1; }; } ;;
11645
11646  *) ac_config_targets="$ac_config_targets $1"
11647     ac_need_defaults=false ;;
11648
11649  esac
11650  shift
11651done
11652
11653ac_configure_extra_args=
11654
11655if $ac_cs_silent; then
11656  exec 6>/dev/null
11657  ac_configure_extra_args="$ac_configure_extra_args --silent"
11658fi
11659
11660_ACEOF
11661cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11662if \$ac_cs_recheck; then
11663  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
11664  shift
11665  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
11666  CONFIG_SHELL='$SHELL'
11667  export CONFIG_SHELL
11668  exec "\$@"
11669fi
11670
11671_ACEOF
11672cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11673exec 5>>config.log
11674{
11675  echo
11676  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11677## Running $as_me. ##
11678_ASBOX
11679  $as_echo "$ac_log"
11680} >&5
11681
11682_ACEOF
11683cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11684_ACEOF
11685
11686cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11687
11688# Handling of arguments.
11689for ac_config_target in $ac_config_targets
11690do
11691  case $ac_config_target in
11692    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11693    "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;;
11694
11695  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
11696$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11697   { (exit 1); exit 1; }; };;
11698  esac
11699done
11700
11701
11702# If the user did not use the arguments to specify the items to instantiate,
11703# then the envvar interface is used.  Set only those that are not.
11704# We use the long form for the default assignment because of an extremely
11705# bizarre bug on SunOS 4.1.3.
11706if $ac_need_defaults; then
11707  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11708fi
11709
11710# Have a temporary directory for convenience.  Make it in the build tree
11711# simply because there is no reason against having it here, and in addition,
11712# creating and moving files from /tmp can sometimes cause problems.
11713# Hook for its removal unless debugging.
11714# Note that there is a small window in which the directory will not be cleaned:
11715# after its creation but before its name has been assigned to `$tmp'.
11716$debug ||
11717{
11718  tmp=
11719  trap 'exit_status=$?
11720  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
11721' 0
11722  trap '{ (exit 1); exit 1; }' 1 2 13 15
11723}
11724# Create a (secure) tmp directory for tmp files.
11725
11726{
11727  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
11728  test -n "$tmp" && test -d "$tmp"
11729}  ||
11730{
11731  tmp=./conf$$-$RANDOM
11732  (umask 077 && mkdir "$tmp")
11733} ||
11734{
11735   $as_echo "$as_me: cannot create a temporary directory in ." >&2
11736   { (exit 1); exit 1; }
11737}
11738
11739# Set up the scripts for CONFIG_FILES section.
11740# No need to generate them if there are no CONFIG_FILES.
11741# This happens for instance with `./config.status config.h'.
11742if test -n "$CONFIG_FILES"; then
11743
11744
11745ac_cr='
11746'
11747ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
11748if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
11749  ac_cs_awk_cr='\\r'
11750else
11751  ac_cs_awk_cr=$ac_cr
11752fi
11753
11754echo 'BEGIN {' >"$tmp/subs1.awk" &&
11755_ACEOF
11756
11757
11758{
11759  echo "cat >conf$$subs.awk <<_ACEOF" &&
11760  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
11761  echo "_ACEOF"
11762} >conf$$subs.sh ||
11763  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
11764$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
11765   { (exit 1); exit 1; }; }
11766ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
11767ac_delim='%!_!# '
11768for ac_last_try in false false false false false :; do
11769  . ./conf$$subs.sh ||
11770    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
11771$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
11772   { (exit 1); exit 1; }; }
11773
11774  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
11775  if test $ac_delim_n = $ac_delim_num; then
11776    break
11777  elif $ac_last_try; then
11778    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
11779$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
11780   { (exit 1); exit 1; }; }
11781  else
11782    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11783  fi
11784done
11785rm -f conf$$subs.sh
11786
11787cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11788cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
11789_ACEOF
11790sed -n '
11791h
11792s/^/S["/; s/!.*/"]=/
11793p
11794g
11795s/^[^!]*!//
11796:repl
11797t repl
11798s/'"$ac_delim"'$//
11799t delim
11800:nl
11801h
11802s/\(.\{148\}\).*/\1/
11803t more1
11804s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
11805p
11806n
11807b repl
11808:more1
11809s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11810p
11811g
11812s/.\{148\}//
11813t nl
11814:delim
11815h
11816s/\(.\{148\}\).*/\1/
11817t more2
11818s/["\\]/\\&/g; s/^/"/; s/$/"/
11819p
11820b
11821:more2
11822s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11823p
11824g
11825s/.\{148\}//
11826t delim
11827' <conf$$subs.awk | sed '
11828/^[^""]/{
11829  N
11830  s/\n//
11831}
11832' >>$CONFIG_STATUS || ac_write_fail=1
11833rm -f conf$$subs.awk
11834cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11835_ACAWK
11836cat >>"\$tmp/subs1.awk" <<_ACAWK &&
11837  for (key in S) S_is_set[key] = 1
11838  FS = ""
11839
11840}
11841{
11842  line = $ 0
11843  nfields = split(line, field, "@")
11844  substed = 0
11845  len = length(field[1])
11846  for (i = 2; i < nfields; i++) {
11847    key = field[i]
11848    keylen = length(key)
11849    if (S_is_set[key]) {
11850      value = S[key]
11851      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
11852      len += length(value) + length(field[++i])
11853      substed = 1
11854    } else
11855      len += 1 + keylen
11856  }
11857
11858  print line
11859}
11860
11861_ACAWK
11862_ACEOF
11863cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11864if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
11865  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
11866else
11867  cat
11868fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
11869  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
11870$as_echo "$as_me: error: could not setup config files machinery" >&2;}
11871   { (exit 1); exit 1; }; }
11872_ACEOF
11873
11874# VPATH may cause trouble with some makes, so we remove $(srcdir),
11875# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11876# trailing colons and then remove the whole line if VPATH becomes empty
11877# (actually we leave an empty line to preserve line numbers).
11878if test "x$srcdir" = x.; then
11879  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
11880s/:*\$(srcdir):*/:/
11881s/:*\${srcdir}:*/:/
11882s/:*@srcdir@:*/:/
11883s/^\([^=]*=[	 ]*\):*/\1/
11884s/:*$//
11885s/^[^=]*=[	 ]*$//
11886}'
11887fi
11888
11889cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11890fi # test -n "$CONFIG_FILES"
11891
11892
11893eval set X "  :F $CONFIG_FILES      "
11894shift
11895for ac_tag
11896do
11897  case $ac_tag in
11898  :[FHLC]) ac_mode=$ac_tag; continue;;
11899  esac
11900  case $ac_mode$ac_tag in
11901  :[FHL]*:*);;
11902  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
11903$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
11904   { (exit 1); exit 1; }; };;
11905  :[FH]-) ac_tag=-:-;;
11906  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
11907  esac
11908  ac_save_IFS=$IFS
11909  IFS=:
11910  set x $ac_tag
11911  IFS=$ac_save_IFS
11912  shift
11913  ac_file=$1
11914  shift
11915
11916  case $ac_mode in
11917  :L) ac_source=$1;;
11918  :[FH])
11919    ac_file_inputs=
11920    for ac_f
11921    do
11922      case $ac_f in
11923      -) ac_f="$tmp/stdin";;
11924      *) # Look for the file first in the build tree, then in the source tree
11925	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
11926	 # because $ac_f cannot contain `:'.
11927	 test -f "$ac_f" ||
11928	   case $ac_f in
11929	   [\\/$]*) false;;
11930	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
11931	   esac ||
11932	   { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
11933$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
11934   { (exit 1); exit 1; }; };;
11935      esac
11936      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
11937      ac_file_inputs="$ac_file_inputs '$ac_f'"
11938    done
11939
11940    # Let's still pretend it is `configure' which instantiates (i.e., don't
11941    # use $as_me), people would be surprised to read:
11942    #    /* config.h.  Generated by config.status.  */
11943    configure_input='Generated from '`
11944	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
11945	`' by configure.'
11946    if test x"$ac_file" != x-; then
11947      configure_input="$ac_file.  $configure_input"
11948      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
11949$as_echo "$as_me: creating $ac_file" >&6;}
11950    fi
11951    # Neutralize special characters interpreted by sed in replacement strings.
11952    case $configure_input in #(
11953    *\&* | *\|* | *\\* )
11954       ac_sed_conf_input=`$as_echo "$configure_input" |
11955       sed 's/[\\\\&|]/\\\\&/g'`;; #(
11956    *) ac_sed_conf_input=$configure_input;;
11957    esac
11958
11959    case $ac_tag in
11960    *:-:* | *:-) cat >"$tmp/stdin" \
11961      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
11962$as_echo "$as_me: error: could not create $ac_file" >&2;}
11963   { (exit 1); exit 1; }; } ;;
11964    esac
11965    ;;
11966  esac
11967
11968  ac_dir=`$as_dirname -- "$ac_file" ||
11969$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11970	 X"$ac_file" : 'X\(//\)[^/]' \| \
11971	 X"$ac_file" : 'X\(//\)$' \| \
11972	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11973$as_echo X"$ac_file" |
11974    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11975	    s//\1/
11976	    q
11977	  }
11978	  /^X\(\/\/\)[^/].*/{
11979	    s//\1/
11980	    q
11981	  }
11982	  /^X\(\/\/\)$/{
11983	    s//\1/
11984	    q
11985	  }
11986	  /^X\(\/\).*/{
11987	    s//\1/
11988	    q
11989	  }
11990	  s/.*/./; q'`
11991  { as_dir="$ac_dir"
11992  case $as_dir in #(
11993  -*) as_dir=./$as_dir;;
11994  esac
11995  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
11996    as_dirs=
11997    while :; do
11998      case $as_dir in #(
11999      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
12000      *) as_qdir=$as_dir;;
12001      esac
12002      as_dirs="'$as_qdir' $as_dirs"
12003      as_dir=`$as_dirname -- "$as_dir" ||
12004$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12005	 X"$as_dir" : 'X\(//\)[^/]' \| \
12006	 X"$as_dir" : 'X\(//\)$' \| \
12007	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
12008$as_echo X"$as_dir" |
12009    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12010	    s//\1/
12011	    q
12012	  }
12013	  /^X\(\/\/\)[^/].*/{
12014	    s//\1/
12015	    q
12016	  }
12017	  /^X\(\/\/\)$/{
12018	    s//\1/
12019	    q
12020	  }
12021	  /^X\(\/\).*/{
12022	    s//\1/
12023	    q
12024	  }
12025	  s/.*/./; q'`
12026      test -d "$as_dir" && break
12027    done
12028    test -z "$as_dirs" || eval "mkdir $as_dirs"
12029  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
12030$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
12031   { (exit 1); exit 1; }; }; }
12032  ac_builddir=.
12033
12034case "$ac_dir" in
12035.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
12036*)
12037  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
12038  # A ".." for each directory in $ac_dir_suffix.
12039  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
12040  case $ac_top_builddir_sub in
12041  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
12042  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
12043  esac ;;
12044esac
12045ac_abs_top_builddir=$ac_pwd
12046ac_abs_builddir=$ac_pwd$ac_dir_suffix
12047# for backward compatibility:
12048ac_top_builddir=$ac_top_build_prefix
12049
12050case $srcdir in
12051  .)  # We are building in place.
12052    ac_srcdir=.
12053    ac_top_srcdir=$ac_top_builddir_sub
12054    ac_abs_top_srcdir=$ac_pwd ;;
12055  [\\/]* | ?:[\\/]* )  # Absolute name.
12056    ac_srcdir=$srcdir$ac_dir_suffix;
12057    ac_top_srcdir=$srcdir
12058    ac_abs_top_srcdir=$srcdir ;;
12059  *) # Relative name.
12060    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
12061    ac_top_srcdir=$ac_top_build_prefix$srcdir
12062    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
12063esac
12064ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
12065
12066
12067  case $ac_mode in
12068  :F)
12069  #
12070  # CONFIG_FILE
12071  #
12072
12073  case $INSTALL in
12074  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12075  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
12076  esac
12077_ACEOF
12078
12079cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12080# If the template does not know about datarootdir, expand it.
12081# FIXME: This hack should be removed a few years after 2.60.
12082ac_datarootdir_hack=; ac_datarootdir_seen=
12083
12084ac_sed_dataroot='
12085/datarootdir/ {
12086  p
12087  q
12088}
12089/@datadir@/p
12090/@docdir@/p
12091/@infodir@/p
12092/@localedir@/p
12093/@mandir@/p
12094'
12095case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
12096*datarootdir*) ac_datarootdir_seen=yes;;
12097*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
12098  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
12099$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
12100_ACEOF
12101cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12102  ac_datarootdir_hack='
12103  s&@datadir@&$datadir&g
12104  s&@docdir@&$docdir&g
12105  s&@infodir@&$infodir&g
12106  s&@localedir@&$localedir&g
12107  s&@mandir@&$mandir&g
12108    s&\\\${datarootdir}&$datarootdir&g' ;;
12109esac
12110_ACEOF
12111
12112# Neutralize VPATH when `$srcdir' = `.'.
12113# Shell code in configure.ac might set extrasub.
12114# FIXME: do we really want to maintain this feature?
12115cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12116ac_sed_extra="$ac_vpsub
12117$extrasub
12118_ACEOF
12119cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12120:t
12121/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12122s|@configure_input@|$ac_sed_conf_input|;t t
12123s&@top_builddir@&$ac_top_builddir_sub&;t t
12124s&@top_build_prefix@&$ac_top_build_prefix&;t t
12125s&@srcdir@&$ac_srcdir&;t t
12126s&@abs_srcdir@&$ac_abs_srcdir&;t t
12127s&@top_srcdir@&$ac_top_srcdir&;t t
12128s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
12129s&@builddir@&$ac_builddir&;t t
12130s&@abs_builddir@&$ac_abs_builddir&;t t
12131s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
12132s&@INSTALL@&$ac_INSTALL&;t t
12133$ac_datarootdir_hack
12134"
12135eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
12136  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
12137$as_echo "$as_me: error: could not create $ac_file" >&2;}
12138   { (exit 1); exit 1; }; }
12139
12140test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
12141  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
12142  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
12143  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12144which seems to be undefined.  Please make sure it is defined." >&5
12145$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12146which seems to be undefined.  Please make sure it is defined." >&2;}
12147
12148  rm -f "$tmp/stdin"
12149  case $ac_file in
12150  -) cat "$tmp/out" && rm -f "$tmp/out";;
12151  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
12152  esac \
12153  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
12154$as_echo "$as_me: error: could not create $ac_file" >&2;}
12155   { (exit 1); exit 1; }; }
12156 ;;
12157
12158
12159
12160  esac
12161
12162done # for ac_tag
12163
12164
12165{ (exit 0); exit 0; }
12166_ACEOF
12167chmod +x $CONFIG_STATUS
12168ac_clean_files=$ac_clean_files_save
12169
12170test $ac_write_fail = 0 ||
12171  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
12172$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
12173   { (exit 1); exit 1; }; }
12174
12175
12176# configure is writing to config.log, and then calls config.status.
12177# config.status does its own redirection, appending to config.log.
12178# Unfortunately, on DOS this fails, as config.log is still kept open
12179# by configure, so config.status won't be able to write to it; its
12180# output is simply discarded.  So we exec the FD to /dev/null,
12181# effectively closing config.log, so it can be properly (re)opened and
12182# appended to by config.status.  When coming back to configure, we
12183# need to make the FD available again.
12184if test "$no_create" != yes; then
12185  ac_cs_success=:
12186  ac_config_status_args=
12187  test "$silent" = yes &&
12188    ac_config_status_args="$ac_config_status_args --quiet"
12189  exec 5>/dev/null
12190  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
12191  exec 5>>config.log
12192  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12193  # would make configure fail if this is the last instruction.
12194  $ac_cs_success || { (exit 1); exit 1; }
12195fi
12196if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
12197  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
12198$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
12199fi
12200
12201