1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for tdom 0.9.1.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7#
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18  emulate sh
19  NULLCMD=:
20  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21  # is contrary to our usage.  Disable this feature.
22  alias -g '${1+"$@"}'='"$@"'
23  setopt NO_GLOB_SUBST
24else
25  case `(set -o) 2>/dev/null` in #(
26  *posix*) :
27    set -o posix ;; #(
28  *) :
29     ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45  as_echo='print -r --'
46  as_echo_n='print -rn --'
47elif (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
82# IFS
83# We need space, tab and new line, in precisely that order.  Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" ""	$as_nl"
88
89# Find who we are.  Look in the path if we contain no directory separator.
90as_myself=
91case $0 in #((
92  *[\\/]* ) as_myself=$0 ;;
93  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96  IFS=$as_save_IFS
97  test -z "$as_dir" && as_dir=.
98    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99  done
100IFS=$as_save_IFS
101
102     ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107  as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111  exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there.  '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135# Use a proper internal environment variable to ensure we don't fall
136  # into an infinite loop, continuously re-executing ourselves.
137  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138    _as_can_reexec=no; export _as_can_reexec;
139    # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147  *v*x* | *x*v* ) as_opts=-vx ;;
148  *v* ) as_opts=-v ;;
149  *x* ) as_opts=-x ;;
150  * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157  fi
158  # We don't want this to propagate to other subprocesses.
159          { _as_can_reexec=; unset _as_can_reexec;}
160if test "x$CONFIG_SHELL" = x; then
161  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162  emulate sh
163  NULLCMD=:
164  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165  # is contrary to our usage.  Disable this feature.
166  alias -g '\${1+\"\$@\"}'='\"\$@\"'
167  setopt NO_GLOB_SUBST
168else
169  case \`(set -o) 2>/dev/null\` in #(
170  *posix*) :
171    set -o posix ;; #(
172  *) :
173     ;;
174esac
175fi
176"
177  as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191  exitcode=1; echo positional parameters were not saved.
192fi
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
195  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200  if (eval "$as_required") 2>/dev/null; then :
201  as_have_required=yes
202else
203  as_have_required=no
204fi
205  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211do
212  IFS=$as_save_IFS
213  test -z "$as_dir" && as_dir=.
214  as_found=:
215  case $as_dir in #(
216	 /*)
217	   for as_base in sh bash ksh sh5; do
218	     # Try only shells that exist, to save several forks.
219	     as_shell=$as_dir/$as_base
220	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222  CONFIG_SHELL=$as_shell as_have_required=yes
223		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  break 2
225fi
226fi
227	   done;;
228       esac
229  as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233  CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238      if test "x$CONFIG_SHELL" != x; then :
239  export CONFIG_SHELL
240             # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248  *v*x* | *x*v* ) as_opts=-vx ;;
249  *v* ) as_opts=-v ;;
250  *x* ) as_opts=-x ;;
251  * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
258fi
259
260    if test x$as_have_required = xno; then :
261  $as_echo "$0: This script requires a shell more modern than all"
262  $as_echo "$0: the shells that I found on your system."
263  if test x${ZSH_VERSION+set} = xset ; then
264    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266  else
267    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
271  fi
272  exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290  { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299  return $1
300} # as_fn_set_status
301
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307  set +e
308  as_fn_set_status $1
309  exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318  case $as_dir in #(
319  -*) as_dir=./$as_dir;;
320  esac
321  test -d "$as_dir" || eval $as_mkdir_p || {
322    as_dirs=
323    while :; do
324      case $as_dir in #(
325      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326      *) as_qdir=$as_dir;;
327      esac
328      as_dirs="'$as_qdir' $as_dirs"
329      as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331	 X"$as_dir" : 'X\(//\)[^/]' \| \
332	 X"$as_dir" : 'X\(//\)$' \| \
333	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336	    s//\1/
337	    q
338	  }
339	  /^X\(\/\/\)[^/].*/{
340	    s//\1/
341	    q
342	  }
343	  /^X\(\/\/\)$/{
344	    s//\1/
345	    q
346	  }
347	  /^X\(\/\).*/{
348	    s//\1/
349	    q
350	  }
351	  s/.*/./; q'`
352      test -d "$as_dir" && break
353    done
354    test -z "$as_dirs" || eval "mkdir $as_dirs"
355  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358} # as_fn_mkdir_p
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365  test -f "$1" && test -x "$1"
366} # as_fn_executable_p
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374  eval 'as_fn_append ()
375  {
376    eval $1+=\$2
377  }'
378else
379  as_fn_append ()
380  {
381    eval $1=\$$1\$2
382  }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391  eval 'as_fn_arith ()
392  {
393    as_val=$(( $* ))
394  }'
395else
396  as_fn_arith ()
397  {
398    as_val=`expr "$@" || test $? -eq 1`
399  }
400fi # as_fn_arith
401
402
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407# script with STATUS, using 1 if that was 0.
408as_fn_error ()
409{
410  as_status=$1; test $as_status -eq 0 && as_status=1
411  if test "$4"; then
412    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414  fi
415  $as_echo "$as_me: error: $2" >&2
416  as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420   test "X`expr 00001 : '.*\(...\)'`" = X001; then
421  as_expr=expr
422else
423  as_expr=false
424fi
425
426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427  as_basename=basename
428else
429  as_basename=false
430fi
431
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433  as_dirname=dirname
434else
435  as_dirname=false
436fi
437
438as_me=`$as_basename -- "$0" ||
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440	 X"$0" : 'X\(//\)$' \| \
441	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443    sed '/^.*\/\([^/][^/]*\)\/*$/{
444	    s//\1/
445	    q
446	  }
447	  /^X\/\(\/\/\)$/{
448	    s//\1/
449	    q
450	  }
451	  /^X\/\(\/\).*/{
452	    s//\1/
453	    q
454	  }
455	  s/.*/./; q'`
456
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465  as_lineno_1=$LINENO as_lineno_1a=$LINENO
466  as_lineno_2=$LINENO as_lineno_2a=$LINENO
467  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
470  sed -n '
471    p
472    /[$]LINENO/=
473  ' <$as_myself |
474    sed '
475      s/[$]LINENO.*/&-/
476      t lineno
477      b
478      :lineno
479      N
480      :loop
481      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482      t loop
483      s/-\n.*//
484    ' >$as_me.lineno &&
485  chmod +x "$as_me.lineno" ||
486    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489  # already done that, so ensure we don't try to do so again and fall
490  # in an infinite loop.  This has already happened in practice.
491  _as_can_reexec=no; export _as_can_reexec
492  # Don't try to exec as it changes $[0], causing all sort of problems
493  # (the dirname of $[0] is not the place where we might find the
494  # original and so on.  Autoconf is especially sensitive to this).
495  . "./$as_me.lineno"
496  # Exit status is that of the last command.
497  exit
498}
499
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503  case `echo 'xy\c'` in
504  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
505  xy)  ECHO_C='\c';;
506  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
507       ECHO_T='	';;
508  esac;;
509*)
510  ECHO_N='-n';;
511esac
512
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515  rm -f conf$$.dir/conf$$.file
516else
517  rm -f conf$$.dir
518  mkdir conf$$.dir 2>/dev/null
519fi
520if (echo >conf$$.file) 2>/dev/null; then
521  if ln -s conf$$.file conf$$ 2>/dev/null; then
522    as_ln_s='ln -s'
523    # ... but there are two gotchas:
524    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526    # In both cases, we have to default to `cp -pR'.
527    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528      as_ln_s='cp -pR'
529  elif ln conf$$.file conf$$ 2>/dev/null; then
530    as_ln_s=ln
531  else
532    as_ln_s='cp -pR'
533  fi
534else
535  as_ln_s='cp -pR'
536fi
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
539
540if mkdir -p . 2>/dev/null; then
541  as_mkdir_p='mkdir -p "$as_dir"'
542else
543  test -d ./-p && rmdir ./-p
544  as_mkdir_p=false
545fi
546
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
559
560# Name of the host.
561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565#
566# Initializations.
567#
568ac_default_prefix=/usr/local
569ac_clean_files=
570ac_config_libobj_dir=.
571LIBOBJS=
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
576
577# Identity of this package.
578PACKAGE_NAME='tdom'
579PACKAGE_TARNAME='tdom'
580PACKAGE_VERSION='0.9.1'
581PACKAGE_STRING='tdom 0.9.1'
582PACKAGE_BUGREPORT=''
583PACKAGE_URL=''
584
585# Factoring default headers for most tests.
586ac_includes_default="\
587#include <stdio.h>
588#ifdef HAVE_SYS_TYPES_H
589# include <sys/types.h>
590#endif
591#ifdef HAVE_SYS_STAT_H
592# include <sys/stat.h>
593#endif
594#ifdef STDC_HEADERS
595# include <stdlib.h>
596# include <stddef.h>
597#else
598# ifdef HAVE_STDLIB_H
599#  include <stdlib.h>
600# endif
601#endif
602#ifdef HAVE_STRING_H
603# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
604#  include <memory.h>
605# endif
606# include <string.h>
607#endif
608#ifdef HAVE_STRINGS_H
609# include <strings.h>
610#endif
611#ifdef HAVE_INTTYPES_H
612# include <inttypes.h>
613#endif
614#ifdef HAVE_STDINT_H
615# include <stdint.h>
616#endif
617#ifdef HAVE_UNISTD_H
618# include <unistd.h>
619#endif"
620
621ac_subst_vars='LTLIBOBJS
622LIBOBJS
623PKG_STUB_LIB_PATH
624PKG_BUILD_STUB_LIB_PATH
625PKG_STUB_LIB_SPEC
626PKG_BUILD_STUB_LIB_SPEC
627TDOMSHELL
628TCLSH_PROG
629VC_MANIFEST_EMBED_EXE
630VC_MANIFEST_EMBED_DLL
631RANLIB_STUB
632MAKE_STUB_LIB
633MAKE_STATIC_LIB
634MAKE_SHARED_LIB
635MAKE_LIB
636TCL_DBGX
637LDFLAGS_DEFAULT
638CFLAGS_DEFAULT
639TDOM_LD_SEARCH_FLAGS
640LD_LIBRARY_PATH_VAR
641SHLIB_CFLAGS
642SHLIB_LD_LIBS
643SHLIB_LD
644STLIB_LD
645CFLAGS_WARNING
646CFLAGS_OPTIMIZE
647CFLAGS_DEBUG
648RC
649CELIB_DIR
650AR
651STUBS_BUILD
652SHARED_BUILD
653TCL_THREADS
654TCL_INCLUDES
655PKG_OBJECTS
656PKG_SOURCES
657EGREP
658GREP
659RANLIB
660SET_MAKE
661CPP
662TCL_SHLIB_LD_LIBS
663TCL_LD_FLAGS
664TCL_EXTRA_CFLAGS
665TCL_DEFS
666TCL_LIBS
667CLEANFILES
668TCL_STUB_LIB_SPEC
669TCL_STUB_LIB_FLAG
670TCL_STUB_LIB_FILE
671TCL_LIB_SPEC
672TCL_LIB_FLAG
673TCL_LIB_FILE
674TCL_SRC_DIR
675TCL_BIN_DIR
676TCL_PATCH_LEVEL
677TCL_VERSION
678INSTALL_LIBRARY
679INSTALL_SCRIPT
680INSTALL_PROGRAM
681INSTALL_DATA
682INSTALL_DATA_DIR
683INSTALL
684PKG_CFLAGS
685PKG_LIBS
686PKG_INCLUDES
687PKG_HEADERS
688PKG_TCL_SOURCES
689PKG_STUB_OBJECTS
690PKG_STUB_SOURCES
691PKG_STUB_LIB_FILE
692PKG_LIB_FILE
693CYGPATH
694OBJEXT
695EXEEXT
696ac_ct_CC
697CPPFLAGS
698LDFLAGS
699CFLAGS
700CC
701target_alias
702host_alias
703build_alias
704LIBS
705ECHO_T
706ECHO_N
707ECHO_C
708DEFS
709mandir
710localedir
711libdir
712psdir
713pdfdir
714dvidir
715htmldir
716infodir
717docdir
718oldincludedir
719includedir
720localstatedir
721sharedstatedir
722sysconfdir
723datadir
724datarootdir
725libexecdir
726sbindir
727bindir
728program_transform_name
729prefix
730exec_prefix
731PACKAGE_URL
732PACKAGE_BUGREPORT
733PACKAGE_STRING
734PACKAGE_VERSION
735PACKAGE_TARNAME
736PACKAGE_NAME
737PATH_SEPARATOR
738SHELL'
739ac_subst_files=''
740ac_user_opts='
741enable_option_checking
742with_entropy
743with_tcl
744with_aol
745with_expat
746enable_html5
747with_tclinclude
748enable_threads
749enable_shared
750enable_stubs
751enable_64bit
752enable_64bit_vis
753enable_rpath
754enable_wince
755with_celib
756enable_symbols
757enable_dtd
758enable_ns
759enable_ucmd
760enable_tdomalloc
761enable_lessns
762'
763      ac_precious_vars='build_alias
764host_alias
765target_alias
766CC
767CFLAGS
768LDFLAGS
769LIBS
770CPPFLAGS
771CPP'
772
773
774# Initialize some variables set by options.
775ac_init_help=
776ac_init_version=false
777ac_unrecognized_opts=
778ac_unrecognized_sep=
779# The variables have the same names as the options, with
780# dashes changed to underlines.
781cache_file=/dev/null
782exec_prefix=NONE
783no_create=
784no_recursion=
785prefix=NONE
786program_prefix=NONE
787program_suffix=NONE
788program_transform_name=s,x,x,
789silent=
790site=
791srcdir=
792verbose=
793x_includes=NONE
794x_libraries=NONE
795
796# Installation directory options.
797# These are left unexpanded so users can "make install exec_prefix=/foo"
798# and all the variables that are supposed to be based on exec_prefix
799# by default will actually change.
800# Use braces instead of parens because sh, perl, etc. also accept them.
801# (The list follows the same order as the GNU Coding Standards.)
802bindir='${exec_prefix}/bin'
803sbindir='${exec_prefix}/sbin'
804libexecdir='${exec_prefix}/libexec'
805datarootdir='${prefix}/share'
806datadir='${datarootdir}'
807sysconfdir='${prefix}/etc'
808sharedstatedir='${prefix}/com'
809localstatedir='${prefix}/var'
810includedir='${prefix}/include'
811oldincludedir='/usr/include'
812docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
813infodir='${datarootdir}/info'
814htmldir='${docdir}'
815dvidir='${docdir}'
816pdfdir='${docdir}'
817psdir='${docdir}'
818libdir='${exec_prefix}/lib'
819localedir='${datarootdir}/locale'
820mandir='${datarootdir}/man'
821
822ac_prev=
823ac_dashdash=
824for ac_option
825do
826  # If the previous option needs an argument, assign it.
827  if test -n "$ac_prev"; then
828    eval $ac_prev=\$ac_option
829    ac_prev=
830    continue
831  fi
832
833  case $ac_option in
834  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
835  *=)   ac_optarg= ;;
836  *)    ac_optarg=yes ;;
837  esac
838
839  # Accept the important Cygnus configure options, so we can diagnose typos.
840
841  case $ac_dashdash$ac_option in
842  --)
843    ac_dashdash=yes ;;
844
845  -bindir | --bindir | --bindi | --bind | --bin | --bi)
846    ac_prev=bindir ;;
847  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
848    bindir=$ac_optarg ;;
849
850  -build | --build | --buil | --bui | --bu)
851    ac_prev=build_alias ;;
852  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
853    build_alias=$ac_optarg ;;
854
855  -cache-file | --cache-file | --cache-fil | --cache-fi \
856  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
857    ac_prev=cache_file ;;
858  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
859  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
860    cache_file=$ac_optarg ;;
861
862  --config-cache | -C)
863    cache_file=config.cache ;;
864
865  -datadir | --datadir | --datadi | --datad)
866    ac_prev=datadir ;;
867  -datadir=* | --datadir=* | --datadi=* | --datad=*)
868    datadir=$ac_optarg ;;
869
870  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
871  | --dataroo | --dataro | --datar)
872    ac_prev=datarootdir ;;
873  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
874  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
875    datarootdir=$ac_optarg ;;
876
877  -disable-* | --disable-*)
878    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
879    # Reject names that are not valid shell variable names.
880    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
881      as_fn_error $? "invalid feature name: $ac_useropt"
882    ac_useropt_orig=$ac_useropt
883    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
884    case $ac_user_opts in
885      *"
886"enable_$ac_useropt"
887"*) ;;
888      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
889	 ac_unrecognized_sep=', ';;
890    esac
891    eval enable_$ac_useropt=no ;;
892
893  -docdir | --docdir | --docdi | --doc | --do)
894    ac_prev=docdir ;;
895  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
896    docdir=$ac_optarg ;;
897
898  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
899    ac_prev=dvidir ;;
900  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
901    dvidir=$ac_optarg ;;
902
903  -enable-* | --enable-*)
904    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
905    # Reject names that are not valid shell variable names.
906    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
907      as_fn_error $? "invalid feature name: $ac_useropt"
908    ac_useropt_orig=$ac_useropt
909    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
910    case $ac_user_opts in
911      *"
912"enable_$ac_useropt"
913"*) ;;
914      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
915	 ac_unrecognized_sep=', ';;
916    esac
917    eval enable_$ac_useropt=\$ac_optarg ;;
918
919  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
920  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
921  | --exec | --exe | --ex)
922    ac_prev=exec_prefix ;;
923  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
924  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
925  | --exec=* | --exe=* | --ex=*)
926    exec_prefix=$ac_optarg ;;
927
928  -gas | --gas | --ga | --g)
929    # Obsolete; use --with-gas.
930    with_gas=yes ;;
931
932  -help | --help | --hel | --he | -h)
933    ac_init_help=long ;;
934  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
935    ac_init_help=recursive ;;
936  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
937    ac_init_help=short ;;
938
939  -host | --host | --hos | --ho)
940    ac_prev=host_alias ;;
941  -host=* | --host=* | --hos=* | --ho=*)
942    host_alias=$ac_optarg ;;
943
944  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
945    ac_prev=htmldir ;;
946  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
947  | --ht=*)
948    htmldir=$ac_optarg ;;
949
950  -includedir | --includedir | --includedi | --included | --include \
951  | --includ | --inclu | --incl | --inc)
952    ac_prev=includedir ;;
953  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
954  | --includ=* | --inclu=* | --incl=* | --inc=*)
955    includedir=$ac_optarg ;;
956
957  -infodir | --infodir | --infodi | --infod | --info | --inf)
958    ac_prev=infodir ;;
959  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
960    infodir=$ac_optarg ;;
961
962  -libdir | --libdir | --libdi | --libd)
963    ac_prev=libdir ;;
964  -libdir=* | --libdir=* | --libdi=* | --libd=*)
965    libdir=$ac_optarg ;;
966
967  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
968  | --libexe | --libex | --libe)
969    ac_prev=libexecdir ;;
970  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
971  | --libexe=* | --libex=* | --libe=*)
972    libexecdir=$ac_optarg ;;
973
974  -localedir | --localedir | --localedi | --localed | --locale)
975    ac_prev=localedir ;;
976  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
977    localedir=$ac_optarg ;;
978
979  -localstatedir | --localstatedir | --localstatedi | --localstated \
980  | --localstate | --localstat | --localsta | --localst | --locals)
981    ac_prev=localstatedir ;;
982  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
983  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
984    localstatedir=$ac_optarg ;;
985
986  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
987    ac_prev=mandir ;;
988  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
989    mandir=$ac_optarg ;;
990
991  -nfp | --nfp | --nf)
992    # Obsolete; use --without-fp.
993    with_fp=no ;;
994
995  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
996  | --no-cr | --no-c | -n)
997    no_create=yes ;;
998
999  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1000  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1001    no_recursion=yes ;;
1002
1003  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1004  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1005  | --oldin | --oldi | --old | --ol | --o)
1006    ac_prev=oldincludedir ;;
1007  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1008  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1009  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1010    oldincludedir=$ac_optarg ;;
1011
1012  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1013    ac_prev=prefix ;;
1014  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1015    prefix=$ac_optarg ;;
1016
1017  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1018  | --program-pre | --program-pr | --program-p)
1019    ac_prev=program_prefix ;;
1020  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1021  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1022    program_prefix=$ac_optarg ;;
1023
1024  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1025  | --program-suf | --program-su | --program-s)
1026    ac_prev=program_suffix ;;
1027  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1028  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1029    program_suffix=$ac_optarg ;;
1030
1031  -program-transform-name | --program-transform-name \
1032  | --program-transform-nam | --program-transform-na \
1033  | --program-transform-n | --program-transform- \
1034  | --program-transform | --program-transfor \
1035  | --program-transfo | --program-transf \
1036  | --program-trans | --program-tran \
1037  | --progr-tra | --program-tr | --program-t)
1038    ac_prev=program_transform_name ;;
1039  -program-transform-name=* | --program-transform-name=* \
1040  | --program-transform-nam=* | --program-transform-na=* \
1041  | --program-transform-n=* | --program-transform-=* \
1042  | --program-transform=* | --program-transfor=* \
1043  | --program-transfo=* | --program-transf=* \
1044  | --program-trans=* | --program-tran=* \
1045  | --progr-tra=* | --program-tr=* | --program-t=*)
1046    program_transform_name=$ac_optarg ;;
1047
1048  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1049    ac_prev=pdfdir ;;
1050  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1051    pdfdir=$ac_optarg ;;
1052
1053  -psdir | --psdir | --psdi | --psd | --ps)
1054    ac_prev=psdir ;;
1055  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1056    psdir=$ac_optarg ;;
1057
1058  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1059  | -silent | --silent | --silen | --sile | --sil)
1060    silent=yes ;;
1061
1062  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1063    ac_prev=sbindir ;;
1064  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1065  | --sbi=* | --sb=*)
1066    sbindir=$ac_optarg ;;
1067
1068  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1069  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1070  | --sharedst | --shareds | --shared | --share | --shar \
1071  | --sha | --sh)
1072    ac_prev=sharedstatedir ;;
1073  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1074  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1075  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1076  | --sha=* | --sh=*)
1077    sharedstatedir=$ac_optarg ;;
1078
1079  -site | --site | --sit)
1080    ac_prev=site ;;
1081  -site=* | --site=* | --sit=*)
1082    site=$ac_optarg ;;
1083
1084  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1085    ac_prev=srcdir ;;
1086  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1087    srcdir=$ac_optarg ;;
1088
1089  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1090  | --syscon | --sysco | --sysc | --sys | --sy)
1091    ac_prev=sysconfdir ;;
1092  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1093  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1094    sysconfdir=$ac_optarg ;;
1095
1096  -target | --target | --targe | --targ | --tar | --ta | --t)
1097    ac_prev=target_alias ;;
1098  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1099    target_alias=$ac_optarg ;;
1100
1101  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1102    verbose=yes ;;
1103
1104  -version | --version | --versio | --versi | --vers | -V)
1105    ac_init_version=: ;;
1106
1107  -with-* | --with-*)
1108    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1109    # Reject names that are not valid shell variable names.
1110    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1111      as_fn_error $? "invalid package name: $ac_useropt"
1112    ac_useropt_orig=$ac_useropt
1113    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1114    case $ac_user_opts in
1115      *"
1116"with_$ac_useropt"
1117"*) ;;
1118      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1119	 ac_unrecognized_sep=', ';;
1120    esac
1121    eval with_$ac_useropt=\$ac_optarg ;;
1122
1123  -without-* | --without-*)
1124    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1125    # Reject names that are not valid shell variable names.
1126    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1127      as_fn_error $? "invalid package name: $ac_useropt"
1128    ac_useropt_orig=$ac_useropt
1129    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1130    case $ac_user_opts in
1131      *"
1132"with_$ac_useropt"
1133"*) ;;
1134      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1135	 ac_unrecognized_sep=', ';;
1136    esac
1137    eval with_$ac_useropt=no ;;
1138
1139  --x)
1140    # Obsolete; use --with-x.
1141    with_x=yes ;;
1142
1143  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1144  | --x-incl | --x-inc | --x-in | --x-i)
1145    ac_prev=x_includes ;;
1146  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1147  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1148    x_includes=$ac_optarg ;;
1149
1150  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1151  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1152    ac_prev=x_libraries ;;
1153  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1154  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1155    x_libraries=$ac_optarg ;;
1156
1157  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1158Try \`$0 --help' for more information"
1159    ;;
1160
1161  *=*)
1162    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1163    # Reject names that are not valid shell variable names.
1164    case $ac_envvar in #(
1165      '' | [0-9]* | *[!_$as_cr_alnum]* )
1166      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1167    esac
1168    eval $ac_envvar=\$ac_optarg
1169    export $ac_envvar ;;
1170
1171  *)
1172    # FIXME: should be removed in autoconf 3.0.
1173    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1174    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1175      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1176    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1177    ;;
1178
1179  esac
1180done
1181
1182if test -n "$ac_prev"; then
1183  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1184  as_fn_error $? "missing argument to $ac_option"
1185fi
1186
1187if test -n "$ac_unrecognized_opts"; then
1188  case $enable_option_checking in
1189    no) ;;
1190    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1191    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1192  esac
1193fi
1194
1195# Check all directory arguments for consistency.
1196for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1197		datadir sysconfdir sharedstatedir localstatedir includedir \
1198		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1199		libdir localedir mandir
1200do
1201  eval ac_val=\$$ac_var
1202  # Remove trailing slashes.
1203  case $ac_val in
1204    */ )
1205      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1206      eval $ac_var=\$ac_val;;
1207  esac
1208  # Be sure to have absolute directory names.
1209  case $ac_val in
1210    [\\/$]* | ?:[\\/]* )  continue;;
1211    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1212  esac
1213  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1214done
1215
1216# There might be people who depend on the old broken behavior: `$host'
1217# used to hold the argument of --host etc.
1218# FIXME: To remove some day.
1219build=$build_alias
1220host=$host_alias
1221target=$target_alias
1222
1223# FIXME: To remove some day.
1224if test "x$host_alias" != x; then
1225  if test "x$build_alias" = x; then
1226    cross_compiling=maybe
1227  elif test "x$build_alias" != "x$host_alias"; then
1228    cross_compiling=yes
1229  fi
1230fi
1231
1232ac_tool_prefix=
1233test -n "$host_alias" && ac_tool_prefix=$host_alias-
1234
1235test "$silent" = yes && exec 6>/dev/null
1236
1237
1238ac_pwd=`pwd` && test -n "$ac_pwd" &&
1239ac_ls_di=`ls -di .` &&
1240ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1241  as_fn_error $? "working directory cannot be determined"
1242test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1243  as_fn_error $? "pwd does not report name of working directory"
1244
1245
1246# Find the source files, if location was not specified.
1247if test -z "$srcdir"; then
1248  ac_srcdir_defaulted=yes
1249  # Try the directory containing this script, then the parent directory.
1250  ac_confdir=`$as_dirname -- "$as_myself" ||
1251$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1252	 X"$as_myself" : 'X\(//\)[^/]' \| \
1253	 X"$as_myself" : 'X\(//\)$' \| \
1254	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1255$as_echo X"$as_myself" |
1256    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1257	    s//\1/
1258	    q
1259	  }
1260	  /^X\(\/\/\)[^/].*/{
1261	    s//\1/
1262	    q
1263	  }
1264	  /^X\(\/\/\)$/{
1265	    s//\1/
1266	    q
1267	  }
1268	  /^X\(\/\).*/{
1269	    s//\1/
1270	    q
1271	  }
1272	  s/.*/./; q'`
1273  srcdir=$ac_confdir
1274  if test ! -r "$srcdir/$ac_unique_file"; then
1275    srcdir=..
1276  fi
1277else
1278  ac_srcdir_defaulted=no
1279fi
1280if test ! -r "$srcdir/$ac_unique_file"; then
1281  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1282  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1283fi
1284ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1285ac_abs_confdir=`(
1286	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1287	pwd)`
1288# When building in place, set srcdir=.
1289if test "$ac_abs_confdir" = "$ac_pwd"; then
1290  srcdir=.
1291fi
1292# Remove unnecessary trailing slashes from srcdir.
1293# Double slashes in file names in object file debugging info
1294# mess up M-x gdb in Emacs.
1295case $srcdir in
1296*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1297esac
1298for ac_var in $ac_precious_vars; do
1299  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1300  eval ac_env_${ac_var}_value=\$${ac_var}
1301  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1302  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1303done
1304
1305#
1306# Report the --help message.
1307#
1308if test "$ac_init_help" = "long"; then
1309  # Omit some internal or obsolete options to make the list less imposing.
1310  # This message is too long to be a string in the A/UX 3.1 sh.
1311  cat <<_ACEOF
1312\`configure' configures tdom 0.9.1 to adapt to many kinds of systems.
1313
1314Usage: $0 [OPTION]... [VAR=VALUE]...
1315
1316To assign environment variables (e.g., CC, CFLAGS...), specify them as
1317VAR=VALUE.  See below for descriptions of some of the useful variables.
1318
1319Defaults for the options are specified in brackets.
1320
1321Configuration:
1322  -h, --help              display this help and exit
1323      --help=short        display options specific to this package
1324      --help=recursive    display the short help of all the included packages
1325  -V, --version           display version information and exit
1326  -q, --quiet, --silent   do not print \`checking ...' messages
1327      --cache-file=FILE   cache test results in FILE [disabled]
1328  -C, --config-cache      alias for \`--cache-file=config.cache'
1329  -n, --no-create         do not create output files
1330      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1331
1332Installation directories:
1333  --prefix=PREFIX         install architecture-independent files in PREFIX
1334                          [$ac_default_prefix]
1335  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1336                          [PREFIX]
1337
1338By default, \`make install' will install all the files in
1339\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1340an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1341for instance \`--prefix=\$HOME'.
1342
1343For better control, use the options below.
1344
1345Fine tuning of the installation directories:
1346  --bindir=DIR            user executables [EPREFIX/bin]
1347  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1348  --libexecdir=DIR        program executables [EPREFIX/libexec]
1349  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1350  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1351  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1352  --libdir=DIR            object code libraries [EPREFIX/lib]
1353  --includedir=DIR        C header files [PREFIX/include]
1354  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1355  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1356  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1357  --infodir=DIR           info documentation [DATAROOTDIR/info]
1358  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1359  --mandir=DIR            man documentation [DATAROOTDIR/man]
1360  --docdir=DIR            documentation root [DATAROOTDIR/doc/tdom]
1361  --htmldir=DIR           html documentation [DOCDIR]
1362  --dvidir=DIR            dvi documentation [DOCDIR]
1363  --pdfdir=DIR            pdf documentation [DOCDIR]
1364  --psdir=DIR             ps documentation [DOCDIR]
1365_ACEOF
1366
1367  cat <<\_ACEOF
1368_ACEOF
1369fi
1370
1371if test -n "$ac_init_help"; then
1372  case $ac_init_help in
1373     short | recursive ) echo "Configuration of tdom 0.9.1:";;
1374   esac
1375  cat <<\_ACEOF
1376
1377Optional Features:
1378  --disable-option-checking  ignore unrecognized --enable/--with options
1379  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1380  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1381  --enable-html5          build with HTML5 parsing support (default: off)
1382  --enable-threads        build with threads (default: on)
1383  --enable-shared         build and link with shared libraries (default: on)
1384  --enable-stubs          build and link with stub libraries. Always true for
1385                          shared builds (default: on)
1386  --enable-64bit          enable 64bit support (default: off)
1387  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1388  --disable-rpath         disable rpath support (default: on)
1389  --enable-wince          enable Win/CE support (where applicable)
1390  --enable-symbols        build with debugging symbols (default: off)
1391  --enable-dtd            build with dtd support (default: on)
1392  --enable-ns             build with XML namespace support (default: on)
1393  --enable-unknown        enable built-in unknown command (default: off)
1394  --enable-tdomalloc      build with the tDOM allocator (default: off)
1395  --enable-lessns         build with lower limit for XML ns declarations
1396                          (default: off)
1397
1398Optional Packages:
1399  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1400  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1401  --with-entropy          source of entropy to use
1402  --with-tcl              directory containing tcl configuration
1403                          (tclConfig.sh)
1404  --with-aolserver        directory with AOLserver distribution
1405  --with-expat            directory with expat installation
1406  --with-tclinclude       directory containing the public Tcl header files
1407  --with-celib=DIR        use Windows/CE support library from DIR
1408
1409Some influential environment variables:
1410  CC          C compiler command
1411  CFLAGS      C compiler flags
1412  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1413              nonstandard directory <lib dir>
1414  LIBS        libraries to pass to the linker, e.g. -l<library>
1415  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1416              you have headers in a nonstandard directory <include dir>
1417  CPP         C preprocessor
1418
1419Use these variables to override the choices made by `configure' or to help
1420it to find libraries and programs with nonstandard names/locations.
1421
1422Report bugs to the package provider.
1423_ACEOF
1424ac_status=$?
1425fi
1426
1427if test "$ac_init_help" = "recursive"; then
1428  # If there are subdirs, report their specific --help.
1429  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1430    test -d "$ac_dir" ||
1431      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1432      continue
1433    ac_builddir=.
1434
1435case "$ac_dir" in
1436.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1437*)
1438  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1439  # A ".." for each directory in $ac_dir_suffix.
1440  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1441  case $ac_top_builddir_sub in
1442  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1443  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1444  esac ;;
1445esac
1446ac_abs_top_builddir=$ac_pwd
1447ac_abs_builddir=$ac_pwd$ac_dir_suffix
1448# for backward compatibility:
1449ac_top_builddir=$ac_top_build_prefix
1450
1451case $srcdir in
1452  .)  # We are building in place.
1453    ac_srcdir=.
1454    ac_top_srcdir=$ac_top_builddir_sub
1455    ac_abs_top_srcdir=$ac_pwd ;;
1456  [\\/]* | ?:[\\/]* )  # Absolute name.
1457    ac_srcdir=$srcdir$ac_dir_suffix;
1458    ac_top_srcdir=$srcdir
1459    ac_abs_top_srcdir=$srcdir ;;
1460  *) # Relative name.
1461    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1462    ac_top_srcdir=$ac_top_build_prefix$srcdir
1463    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1464esac
1465ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1466
1467    cd "$ac_dir" || { ac_status=$?; continue; }
1468    # Check for guested configure.
1469    if test -f "$ac_srcdir/configure.gnu"; then
1470      echo &&
1471      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1472    elif test -f "$ac_srcdir/configure"; then
1473      echo &&
1474      $SHELL "$ac_srcdir/configure" --help=recursive
1475    else
1476      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1477    fi || ac_status=$?
1478    cd "$ac_pwd" || { ac_status=$?; break; }
1479  done
1480fi
1481
1482test -n "$ac_init_help" && exit $ac_status
1483if $ac_init_version; then
1484  cat <<\_ACEOF
1485tdom configure 0.9.1
1486generated by GNU Autoconf 2.69
1487
1488Copyright (C) 2012 Free Software Foundation, Inc.
1489This configure script is free software; the Free Software Foundation
1490gives unlimited permission to copy, distribute and modify it.
1491_ACEOF
1492  exit
1493fi
1494
1495## ------------------------ ##
1496## Autoconf initialization. ##
1497## ------------------------ ##
1498
1499# ac_fn_c_try_compile LINENO
1500# --------------------------
1501# Try to compile conftest.$ac_ext, and return whether this succeeded.
1502ac_fn_c_try_compile ()
1503{
1504  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1505  rm -f conftest.$ac_objext
1506  if { { ac_try="$ac_compile"
1507case "(($ac_try" in
1508  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1509  *) ac_try_echo=$ac_try;;
1510esac
1511eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1512$as_echo "$ac_try_echo"; } >&5
1513  (eval "$ac_compile") 2>conftest.err
1514  ac_status=$?
1515  if test -s conftest.err; then
1516    grep -v '^ *+' conftest.err >conftest.er1
1517    cat conftest.er1 >&5
1518    mv -f conftest.er1 conftest.err
1519  fi
1520  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1521  test $ac_status = 0; } && {
1522	 test -z "$ac_c_werror_flag" ||
1523	 test ! -s conftest.err
1524       } && test -s conftest.$ac_objext; then :
1525  ac_retval=0
1526else
1527  $as_echo "$as_me: failed program was:" >&5
1528sed 's/^/| /' conftest.$ac_ext >&5
1529
1530	ac_retval=1
1531fi
1532  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1533  as_fn_set_status $ac_retval
1534
1535} # ac_fn_c_try_compile
1536
1537# ac_fn_c_try_link LINENO
1538# -----------------------
1539# Try to link conftest.$ac_ext, and return whether this succeeded.
1540ac_fn_c_try_link ()
1541{
1542  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1543  rm -f conftest.$ac_objext conftest$ac_exeext
1544  if { { ac_try="$ac_link"
1545case "(($ac_try" in
1546  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1547  *) ac_try_echo=$ac_try;;
1548esac
1549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1550$as_echo "$ac_try_echo"; } >&5
1551  (eval "$ac_link") 2>conftest.err
1552  ac_status=$?
1553  if test -s conftest.err; then
1554    grep -v '^ *+' conftest.err >conftest.er1
1555    cat conftest.er1 >&5
1556    mv -f conftest.er1 conftest.err
1557  fi
1558  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1559  test $ac_status = 0; } && {
1560	 test -z "$ac_c_werror_flag" ||
1561	 test ! -s conftest.err
1562       } && test -s conftest$ac_exeext && {
1563	 test "$cross_compiling" = yes ||
1564	 test -x conftest$ac_exeext
1565       }; then :
1566  ac_retval=0
1567else
1568  $as_echo "$as_me: failed program was:" >&5
1569sed 's/^/| /' conftest.$ac_ext >&5
1570
1571	ac_retval=1
1572fi
1573  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1574  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1575  # interfere with the next link command; also delete a directory that is
1576  # left behind by Apple's compiler.  We do this before executing the actions.
1577  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1578  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1579  as_fn_set_status $ac_retval
1580
1581} # ac_fn_c_try_link
1582
1583# ac_fn_c_try_cpp LINENO
1584# ----------------------
1585# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1586ac_fn_c_try_cpp ()
1587{
1588  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1589  if { { ac_try="$ac_cpp conftest.$ac_ext"
1590case "(($ac_try" in
1591  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1592  *) ac_try_echo=$ac_try;;
1593esac
1594eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1595$as_echo "$ac_try_echo"; } >&5
1596  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1597  ac_status=$?
1598  if test -s conftest.err; then
1599    grep -v '^ *+' conftest.err >conftest.er1
1600    cat conftest.er1 >&5
1601    mv -f conftest.er1 conftest.err
1602  fi
1603  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1604  test $ac_status = 0; } > conftest.i && {
1605	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1606	 test ! -s conftest.err
1607       }; then :
1608  ac_retval=0
1609else
1610  $as_echo "$as_me: failed program was:" >&5
1611sed 's/^/| /' conftest.$ac_ext >&5
1612
1613    ac_retval=1
1614fi
1615  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1616  as_fn_set_status $ac_retval
1617
1618} # ac_fn_c_try_cpp
1619
1620# ac_fn_c_try_run LINENO
1621# ----------------------
1622# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1623# that executables *can* be run.
1624ac_fn_c_try_run ()
1625{
1626  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1627  if { { ac_try="$ac_link"
1628case "(($ac_try" in
1629  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1630  *) ac_try_echo=$ac_try;;
1631esac
1632eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1633$as_echo "$ac_try_echo"; } >&5
1634  (eval "$ac_link") 2>&5
1635  ac_status=$?
1636  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1637  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1638  { { case "(($ac_try" in
1639  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1640  *) ac_try_echo=$ac_try;;
1641esac
1642eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1643$as_echo "$ac_try_echo"; } >&5
1644  (eval "$ac_try") 2>&5
1645  ac_status=$?
1646  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1647  test $ac_status = 0; }; }; then :
1648  ac_retval=0
1649else
1650  $as_echo "$as_me: program exited with status $ac_status" >&5
1651       $as_echo "$as_me: failed program was:" >&5
1652sed 's/^/| /' conftest.$ac_ext >&5
1653
1654       ac_retval=$ac_status
1655fi
1656  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1657  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1658  as_fn_set_status $ac_retval
1659
1660} # ac_fn_c_try_run
1661
1662# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1663# -------------------------------------------------------
1664# Tests whether HEADER exists and can be compiled using the include files in
1665# INCLUDES, setting the cache variable VAR accordingly.
1666ac_fn_c_check_header_compile ()
1667{
1668  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1670$as_echo_n "checking for $2... " >&6; }
1671if eval \${$3+:} false; then :
1672  $as_echo_n "(cached) " >&6
1673else
1674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1675/* end confdefs.h.  */
1676$4
1677#include <$2>
1678_ACEOF
1679if ac_fn_c_try_compile "$LINENO"; then :
1680  eval "$3=yes"
1681else
1682  eval "$3=no"
1683fi
1684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1685fi
1686eval ac_res=\$$3
1687	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1688$as_echo "$ac_res" >&6; }
1689  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1690
1691} # ac_fn_c_check_header_compile
1692
1693# ac_fn_c_check_func LINENO FUNC VAR
1694# ----------------------------------
1695# Tests whether FUNC exists, setting the cache variable VAR accordingly
1696ac_fn_c_check_func ()
1697{
1698  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1700$as_echo_n "checking for $2... " >&6; }
1701if eval \${$3+:} false; then :
1702  $as_echo_n "(cached) " >&6
1703else
1704  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1705/* end confdefs.h.  */
1706/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1707   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1708#define $2 innocuous_$2
1709
1710/* System header to define __stub macros and hopefully few prototypes,
1711    which can conflict with char $2 (); below.
1712    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1713    <limits.h> exists even on freestanding compilers.  */
1714
1715#ifdef __STDC__
1716# include <limits.h>
1717#else
1718# include <assert.h>
1719#endif
1720
1721#undef $2
1722
1723/* Override any GCC internal prototype to avoid an error.
1724   Use char because int might match the return type of a GCC
1725   builtin and then its argument prototype would still apply.  */
1726#ifdef __cplusplus
1727extern "C"
1728#endif
1729char $2 ();
1730/* The GNU C library defines this for functions which it implements
1731    to always fail with ENOSYS.  Some functions are actually named
1732    something starting with __ and the normal name is an alias.  */
1733#if defined __stub_$2 || defined __stub___$2
1734choke me
1735#endif
1736
1737int
1738main ()
1739{
1740return $2 ();
1741  ;
1742  return 0;
1743}
1744_ACEOF
1745if ac_fn_c_try_link "$LINENO"; then :
1746  eval "$3=yes"
1747else
1748  eval "$3=no"
1749fi
1750rm -f core conftest.err conftest.$ac_objext \
1751    conftest$ac_exeext conftest.$ac_ext
1752fi
1753eval ac_res=\$$3
1754	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1755$as_echo "$ac_res" >&6; }
1756  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1757
1758} # ac_fn_c_check_func
1759cat >config.log <<_ACEOF
1760This file contains any messages produced by compilers while
1761running configure, to aid debugging if configure makes a mistake.
1762
1763It was created by tdom $as_me 0.9.1, which was
1764generated by GNU Autoconf 2.69.  Invocation command line was
1765
1766  $ $0 $@
1767
1768_ACEOF
1769exec 5>>config.log
1770{
1771cat <<_ASUNAME
1772## --------- ##
1773## Platform. ##
1774## --------- ##
1775
1776hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1777uname -m = `(uname -m) 2>/dev/null || echo unknown`
1778uname -r = `(uname -r) 2>/dev/null || echo unknown`
1779uname -s = `(uname -s) 2>/dev/null || echo unknown`
1780uname -v = `(uname -v) 2>/dev/null || echo unknown`
1781
1782/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1783/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1784
1785/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1786/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1787/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1788/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1789/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1790/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1791/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1792
1793_ASUNAME
1794
1795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1796for as_dir in $PATH
1797do
1798  IFS=$as_save_IFS
1799  test -z "$as_dir" && as_dir=.
1800    $as_echo "PATH: $as_dir"
1801  done
1802IFS=$as_save_IFS
1803
1804} >&5
1805
1806cat >&5 <<_ACEOF
1807
1808
1809## ----------- ##
1810## Core tests. ##
1811## ----------- ##
1812
1813_ACEOF
1814
1815
1816# Keep a trace of the command line.
1817# Strip out --no-create and --no-recursion so they do not pile up.
1818# Strip out --silent because we don't want to record it for future runs.
1819# Also quote any args containing shell meta-characters.
1820# Make two passes to allow for proper duplicate-argument suppression.
1821ac_configure_args=
1822ac_configure_args0=
1823ac_configure_args1=
1824ac_must_keep_next=false
1825for ac_pass in 1 2
1826do
1827  for ac_arg
1828  do
1829    case $ac_arg in
1830    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1831    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1832    | -silent | --silent | --silen | --sile | --sil)
1833      continue ;;
1834    *\'*)
1835      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1836    esac
1837    case $ac_pass in
1838    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1839    2)
1840      as_fn_append ac_configure_args1 " '$ac_arg'"
1841      if test $ac_must_keep_next = true; then
1842	ac_must_keep_next=false # Got value, back to normal.
1843      else
1844	case $ac_arg in
1845	  *=* | --config-cache | -C | -disable-* | --disable-* \
1846	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1847	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1848	  | -with-* | --with-* | -without-* | --without-* | --x)
1849	    case "$ac_configure_args0 " in
1850	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1851	    esac
1852	    ;;
1853	  -* ) ac_must_keep_next=true ;;
1854	esac
1855      fi
1856      as_fn_append ac_configure_args " '$ac_arg'"
1857      ;;
1858    esac
1859  done
1860done
1861{ ac_configure_args0=; unset ac_configure_args0;}
1862{ ac_configure_args1=; unset ac_configure_args1;}
1863
1864# When interrupted or exit'd, cleanup temporary files, and complete
1865# config.log.  We remove comments because anyway the quotes in there
1866# would cause problems or look ugly.
1867# WARNING: Use '\'' to represent an apostrophe within the trap.
1868# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1869trap 'exit_status=$?
1870  # Save into config.log some information that might help in debugging.
1871  {
1872    echo
1873
1874    $as_echo "## ---------------- ##
1875## Cache variables. ##
1876## ---------------- ##"
1877    echo
1878    # The following way of writing the cache mishandles newlines in values,
1879(
1880  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1881    eval ac_val=\$$ac_var
1882    case $ac_val in #(
1883    *${as_nl}*)
1884      case $ac_var in #(
1885      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
1886$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1887      esac
1888      case $ac_var in #(
1889      _ | IFS | as_nl) ;; #(
1890      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1891      *) { eval $ac_var=; unset $ac_var;} ;;
1892      esac ;;
1893    esac
1894  done
1895  (set) 2>&1 |
1896    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1897    *${as_nl}ac_space=\ *)
1898      sed -n \
1899	"s/'\''/'\''\\\\'\'''\''/g;
1900	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1901      ;; #(
1902    *)
1903      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1904      ;;
1905    esac |
1906    sort
1907)
1908    echo
1909
1910    $as_echo "## ----------------- ##
1911## Output variables. ##
1912## ----------------- ##"
1913    echo
1914    for ac_var in $ac_subst_vars
1915    do
1916      eval ac_val=\$$ac_var
1917      case $ac_val in
1918      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1919      esac
1920      $as_echo "$ac_var='\''$ac_val'\''"
1921    done | sort
1922    echo
1923
1924    if test -n "$ac_subst_files"; then
1925      $as_echo "## ------------------- ##
1926## File substitutions. ##
1927## ------------------- ##"
1928      echo
1929      for ac_var in $ac_subst_files
1930      do
1931	eval ac_val=\$$ac_var
1932	case $ac_val in
1933	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1934	esac
1935	$as_echo "$ac_var='\''$ac_val'\''"
1936      done | sort
1937      echo
1938    fi
1939
1940    if test -s confdefs.h; then
1941      $as_echo "## ----------- ##
1942## confdefs.h. ##
1943## ----------- ##"
1944      echo
1945      cat confdefs.h
1946      echo
1947    fi
1948    test "$ac_signal" != 0 &&
1949      $as_echo "$as_me: caught signal $ac_signal"
1950    $as_echo "$as_me: exit $exit_status"
1951  } >&5
1952  rm -f core *.core core.conftest.* &&
1953    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1954    exit $exit_status
1955' 0
1956for ac_signal in 1 2 13 15; do
1957  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
1958done
1959ac_signal=0
1960
1961# confdefs.h avoids OS command line length limits that DEFS can exceed.
1962rm -f -r conftest* confdefs.h
1963
1964$as_echo "/* confdefs.h */" > confdefs.h
1965
1966# Predefined preprocessor variables.
1967
1968cat >>confdefs.h <<_ACEOF
1969#define PACKAGE_NAME "$PACKAGE_NAME"
1970_ACEOF
1971
1972cat >>confdefs.h <<_ACEOF
1973#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1974_ACEOF
1975
1976cat >>confdefs.h <<_ACEOF
1977#define PACKAGE_VERSION "$PACKAGE_VERSION"
1978_ACEOF
1979
1980cat >>confdefs.h <<_ACEOF
1981#define PACKAGE_STRING "$PACKAGE_STRING"
1982_ACEOF
1983
1984cat >>confdefs.h <<_ACEOF
1985#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1986_ACEOF
1987
1988cat >>confdefs.h <<_ACEOF
1989#define PACKAGE_URL "$PACKAGE_URL"
1990_ACEOF
1991
1992
1993# Let the site file select an alternate cache file if it wants to.
1994# Prefer an explicitly selected file to automatically selected ones.
1995ac_site_file1=NONE
1996ac_site_file2=NONE
1997if test -n "$CONFIG_SITE"; then
1998  # We do not want a PATH search for config.site.
1999  case $CONFIG_SITE in #((
2000    -*)  ac_site_file1=./$CONFIG_SITE;;
2001    */*) ac_site_file1=$CONFIG_SITE;;
2002    *)   ac_site_file1=./$CONFIG_SITE;;
2003  esac
2004elif test "x$prefix" != xNONE; then
2005  ac_site_file1=$prefix/share/config.site
2006  ac_site_file2=$prefix/etc/config.site
2007else
2008  ac_site_file1=$ac_default_prefix/share/config.site
2009  ac_site_file2=$ac_default_prefix/etc/config.site
2010fi
2011for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2012do
2013  test "x$ac_site_file" = xNONE && continue
2014  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2015    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2016$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2017    sed 's/^/| /' "$ac_site_file" >&5
2018    . "$ac_site_file" \
2019      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2020$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2021as_fn_error $? "failed to load site script $ac_site_file
2022See \`config.log' for more details" "$LINENO" 5; }
2023  fi
2024done
2025
2026if test -r "$cache_file"; then
2027  # Some versions of bash will fail to source /dev/null (special files
2028  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2029  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2030    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2031$as_echo "$as_me: loading cache $cache_file" >&6;}
2032    case $cache_file in
2033      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2034      *)                      . "./$cache_file";;
2035    esac
2036  fi
2037else
2038  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2039$as_echo "$as_me: creating cache $cache_file" >&6;}
2040  >$cache_file
2041fi
2042
2043# Check that the precious variables saved in the cache have kept the same
2044# value.
2045ac_cache_corrupted=false
2046for ac_var in $ac_precious_vars; do
2047  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2048  eval ac_new_set=\$ac_env_${ac_var}_set
2049  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2050  eval ac_new_val=\$ac_env_${ac_var}_value
2051  case $ac_old_set,$ac_new_set in
2052    set,)
2053      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2054$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2055      ac_cache_corrupted=: ;;
2056    ,set)
2057      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2058$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2059      ac_cache_corrupted=: ;;
2060    ,);;
2061    *)
2062      if test "x$ac_old_val" != "x$ac_new_val"; then
2063	# differences in whitespace do not lead to failure.
2064	ac_old_val_w=`echo x $ac_old_val`
2065	ac_new_val_w=`echo x $ac_new_val`
2066	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2067	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2068$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2069	  ac_cache_corrupted=:
2070	else
2071	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2072$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2073	  eval $ac_var=\$ac_old_val
2074	fi
2075	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2076$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2077	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2078$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2079      fi;;
2080  esac
2081  # Pass precious variables to config.status.
2082  if test "$ac_new_set" = set; then
2083    case $ac_new_val in
2084    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2085    *) ac_arg=$ac_var=$ac_new_val ;;
2086    esac
2087    case " $ac_configure_args " in
2088      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2089      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2090    esac
2091  fi
2092done
2093if $ac_cache_corrupted; then
2094  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2096  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2097$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2098  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2099fi
2100## -------------------- ##
2101## Main body of script. ##
2102## -------------------- ##
2103
2104ac_ext=c
2105ac_cpp='$CPP $CPPFLAGS'
2106ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2107ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2108ac_compiler_gnu=$ac_cv_c_compiler_gnu
2109
2110
2111
2112ac_ext=c
2113ac_cpp='$CPP $CPPFLAGS'
2114ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2115ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2116ac_compiler_gnu=$ac_cv_c_compiler_gnu
2117if test -n "$ac_tool_prefix"; then
2118  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2119set dummy ${ac_tool_prefix}gcc; ac_word=$2
2120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2121$as_echo_n "checking for $ac_word... " >&6; }
2122if ${ac_cv_prog_CC+:} false; then :
2123  $as_echo_n "(cached) " >&6
2124else
2125  if test -n "$CC"; then
2126  ac_cv_prog_CC="$CC" # Let the user override the test.
2127else
2128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2129for as_dir in $PATH
2130do
2131  IFS=$as_save_IFS
2132  test -z "$as_dir" && as_dir=.
2133    for ac_exec_ext in '' $ac_executable_extensions; do
2134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2135    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2137    break 2
2138  fi
2139done
2140  done
2141IFS=$as_save_IFS
2142
2143fi
2144fi
2145CC=$ac_cv_prog_CC
2146if test -n "$CC"; then
2147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2148$as_echo "$CC" >&6; }
2149else
2150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2151$as_echo "no" >&6; }
2152fi
2153
2154
2155fi
2156if test -z "$ac_cv_prog_CC"; then
2157  ac_ct_CC=$CC
2158  # Extract the first word of "gcc", so it can be a program name with args.
2159set dummy gcc; ac_word=$2
2160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2161$as_echo_n "checking for $ac_word... " >&6; }
2162if ${ac_cv_prog_ac_ct_CC+:} false; then :
2163  $as_echo_n "(cached) " >&6
2164else
2165  if test -n "$ac_ct_CC"; then
2166  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2167else
2168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2169for as_dir in $PATH
2170do
2171  IFS=$as_save_IFS
2172  test -z "$as_dir" && as_dir=.
2173    for ac_exec_ext in '' $ac_executable_extensions; do
2174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2175    ac_cv_prog_ac_ct_CC="gcc"
2176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2177    break 2
2178  fi
2179done
2180  done
2181IFS=$as_save_IFS
2182
2183fi
2184fi
2185ac_ct_CC=$ac_cv_prog_ac_ct_CC
2186if test -n "$ac_ct_CC"; then
2187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2188$as_echo "$ac_ct_CC" >&6; }
2189else
2190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2191$as_echo "no" >&6; }
2192fi
2193
2194  if test "x$ac_ct_CC" = x; then
2195    CC=""
2196  else
2197    case $cross_compiling:$ac_tool_warned in
2198yes:)
2199{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2200$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2201ac_tool_warned=yes ;;
2202esac
2203    CC=$ac_ct_CC
2204  fi
2205else
2206  CC="$ac_cv_prog_CC"
2207fi
2208
2209if test -z "$CC"; then
2210          if test -n "$ac_tool_prefix"; then
2211    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2212set dummy ${ac_tool_prefix}cc; ac_word=$2
2213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2214$as_echo_n "checking for $ac_word... " >&6; }
2215if ${ac_cv_prog_CC+:} false; then :
2216  $as_echo_n "(cached) " >&6
2217else
2218  if test -n "$CC"; then
2219  ac_cv_prog_CC="$CC" # Let the user override the test.
2220else
2221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2222for as_dir in $PATH
2223do
2224  IFS=$as_save_IFS
2225  test -z "$as_dir" && as_dir=.
2226    for ac_exec_ext in '' $ac_executable_extensions; do
2227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2228    ac_cv_prog_CC="${ac_tool_prefix}cc"
2229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2230    break 2
2231  fi
2232done
2233  done
2234IFS=$as_save_IFS
2235
2236fi
2237fi
2238CC=$ac_cv_prog_CC
2239if test -n "$CC"; then
2240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2241$as_echo "$CC" >&6; }
2242else
2243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2244$as_echo "no" >&6; }
2245fi
2246
2247
2248  fi
2249fi
2250if test -z "$CC"; then
2251  # Extract the first word of "cc", so it can be a program name with args.
2252set dummy cc; ac_word=$2
2253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2254$as_echo_n "checking for $ac_word... " >&6; }
2255if ${ac_cv_prog_CC+:} false; then :
2256  $as_echo_n "(cached) " >&6
2257else
2258  if test -n "$CC"; then
2259  ac_cv_prog_CC="$CC" # Let the user override the test.
2260else
2261  ac_prog_rejected=no
2262as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2263for as_dir in $PATH
2264do
2265  IFS=$as_save_IFS
2266  test -z "$as_dir" && as_dir=.
2267    for ac_exec_ext in '' $ac_executable_extensions; do
2268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2269    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2270       ac_prog_rejected=yes
2271       continue
2272     fi
2273    ac_cv_prog_CC="cc"
2274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2275    break 2
2276  fi
2277done
2278  done
2279IFS=$as_save_IFS
2280
2281if test $ac_prog_rejected = yes; then
2282  # We found a bogon in the path, so make sure we never use it.
2283  set dummy $ac_cv_prog_CC
2284  shift
2285  if test $# != 0; then
2286    # We chose a different compiler from the bogus one.
2287    # However, it has the same basename, so the bogon will be chosen
2288    # first if we set CC to just the basename; use the full file name.
2289    shift
2290    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2291  fi
2292fi
2293fi
2294fi
2295CC=$ac_cv_prog_CC
2296if test -n "$CC"; then
2297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2298$as_echo "$CC" >&6; }
2299else
2300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2301$as_echo "no" >&6; }
2302fi
2303
2304
2305fi
2306if test -z "$CC"; then
2307  if test -n "$ac_tool_prefix"; then
2308  for ac_prog in cl.exe
2309  do
2310    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2311set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2313$as_echo_n "checking for $ac_word... " >&6; }
2314if ${ac_cv_prog_CC+:} false; then :
2315  $as_echo_n "(cached) " >&6
2316else
2317  if test -n "$CC"; then
2318  ac_cv_prog_CC="$CC" # Let the user override the test.
2319else
2320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2321for as_dir in $PATH
2322do
2323  IFS=$as_save_IFS
2324  test -z "$as_dir" && as_dir=.
2325    for ac_exec_ext in '' $ac_executable_extensions; do
2326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2327    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2329    break 2
2330  fi
2331done
2332  done
2333IFS=$as_save_IFS
2334
2335fi
2336fi
2337CC=$ac_cv_prog_CC
2338if test -n "$CC"; then
2339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2340$as_echo "$CC" >&6; }
2341else
2342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2343$as_echo "no" >&6; }
2344fi
2345
2346
2347    test -n "$CC" && break
2348  done
2349fi
2350if test -z "$CC"; then
2351  ac_ct_CC=$CC
2352  for ac_prog in cl.exe
2353do
2354  # Extract the first word of "$ac_prog", so it can be a program name with args.
2355set dummy $ac_prog; ac_word=$2
2356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2357$as_echo_n "checking for $ac_word... " >&6; }
2358if ${ac_cv_prog_ac_ct_CC+:} false; then :
2359  $as_echo_n "(cached) " >&6
2360else
2361  if test -n "$ac_ct_CC"; then
2362  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2363else
2364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2365for as_dir in $PATH
2366do
2367  IFS=$as_save_IFS
2368  test -z "$as_dir" && as_dir=.
2369    for ac_exec_ext in '' $ac_executable_extensions; do
2370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2371    ac_cv_prog_ac_ct_CC="$ac_prog"
2372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2373    break 2
2374  fi
2375done
2376  done
2377IFS=$as_save_IFS
2378
2379fi
2380fi
2381ac_ct_CC=$ac_cv_prog_ac_ct_CC
2382if test -n "$ac_ct_CC"; then
2383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2384$as_echo "$ac_ct_CC" >&6; }
2385else
2386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2387$as_echo "no" >&6; }
2388fi
2389
2390
2391  test -n "$ac_ct_CC" && break
2392done
2393
2394  if test "x$ac_ct_CC" = x; then
2395    CC=""
2396  else
2397    case $cross_compiling:$ac_tool_warned in
2398yes:)
2399{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2400$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2401ac_tool_warned=yes ;;
2402esac
2403    CC=$ac_ct_CC
2404  fi
2405fi
2406
2407fi
2408
2409
2410test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2411$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2412as_fn_error $? "no acceptable C compiler found in \$PATH
2413See \`config.log' for more details" "$LINENO" 5; }
2414
2415# Provide some information about the compiler.
2416$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2417set X $ac_compile
2418ac_compiler=$2
2419for ac_option in --version -v -V -qversion; do
2420  { { ac_try="$ac_compiler $ac_option >&5"
2421case "(($ac_try" in
2422  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2423  *) ac_try_echo=$ac_try;;
2424esac
2425eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2426$as_echo "$ac_try_echo"; } >&5
2427  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2428  ac_status=$?
2429  if test -s conftest.err; then
2430    sed '10a\
2431... rest of stderr output deleted ...
2432         10q' conftest.err >conftest.er1
2433    cat conftest.er1 >&5
2434  fi
2435  rm -f conftest.er1 conftest.err
2436  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2437  test $ac_status = 0; }
2438done
2439
2440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2441/* end confdefs.h.  */
2442
2443int
2444main ()
2445{
2446
2447  ;
2448  return 0;
2449}
2450_ACEOF
2451ac_clean_files_save=$ac_clean_files
2452ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2453# Try to create an executable without -o first, disregard a.out.
2454# It will help us diagnose broken compilers, and finding out an intuition
2455# of exeext.
2456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2457$as_echo_n "checking whether the C compiler works... " >&6; }
2458ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2459
2460# The possible output files:
2461ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2462
2463ac_rmfiles=
2464for ac_file in $ac_files
2465do
2466  case $ac_file in
2467    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2468    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2469  esac
2470done
2471rm -f $ac_rmfiles
2472
2473if { { ac_try="$ac_link_default"
2474case "(($ac_try" in
2475  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2476  *) ac_try_echo=$ac_try;;
2477esac
2478eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2479$as_echo "$ac_try_echo"; } >&5
2480  (eval "$ac_link_default") 2>&5
2481  ac_status=$?
2482  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2483  test $ac_status = 0; }; then :
2484  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2485# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2486# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2487# so that the user can short-circuit this test for compilers unknown to
2488# Autoconf.
2489for ac_file in $ac_files ''
2490do
2491  test -f "$ac_file" || continue
2492  case $ac_file in
2493    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2494	;;
2495    [ab].out )
2496	# We found the default executable, but exeext='' is most
2497	# certainly right.
2498	break;;
2499    *.* )
2500	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2501	then :; else
2502	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2503	fi
2504	# We set ac_cv_exeext here because the later test for it is not
2505	# safe: cross compilers may not add the suffix if given an `-o'
2506	# argument, so we may need to know it at that point already.
2507	# Even if this section looks crufty: it has the advantage of
2508	# actually working.
2509	break;;
2510    * )
2511	break;;
2512  esac
2513done
2514test "$ac_cv_exeext" = no && ac_cv_exeext=
2515
2516else
2517  ac_file=''
2518fi
2519if test -z "$ac_file"; then :
2520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2521$as_echo "no" >&6; }
2522$as_echo "$as_me: failed program was:" >&5
2523sed 's/^/| /' conftest.$ac_ext >&5
2524
2525{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2526$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2527as_fn_error 77 "C compiler cannot create executables
2528See \`config.log' for more details" "$LINENO" 5; }
2529else
2530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2531$as_echo "yes" >&6; }
2532fi
2533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2534$as_echo_n "checking for C compiler default output file name... " >&6; }
2535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2536$as_echo "$ac_file" >&6; }
2537ac_exeext=$ac_cv_exeext
2538
2539rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2540ac_clean_files=$ac_clean_files_save
2541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2542$as_echo_n "checking for suffix of executables... " >&6; }
2543if { { ac_try="$ac_link"
2544case "(($ac_try" in
2545  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2546  *) ac_try_echo=$ac_try;;
2547esac
2548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2549$as_echo "$ac_try_echo"; } >&5
2550  (eval "$ac_link") 2>&5
2551  ac_status=$?
2552  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2553  test $ac_status = 0; }; then :
2554  # If both `conftest.exe' and `conftest' are `present' (well, observable)
2555# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2556# work properly (i.e., refer to `conftest.exe'), while it won't with
2557# `rm'.
2558for ac_file in conftest.exe conftest conftest.*; do
2559  test -f "$ac_file" || continue
2560  case $ac_file in
2561    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2562    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2563	  break;;
2564    * ) break;;
2565  esac
2566done
2567else
2568  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2569$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2570as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2571See \`config.log' for more details" "$LINENO" 5; }
2572fi
2573rm -f conftest conftest$ac_cv_exeext
2574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
2575$as_echo "$ac_cv_exeext" >&6; }
2576
2577rm -f conftest.$ac_ext
2578EXEEXT=$ac_cv_exeext
2579ac_exeext=$EXEEXT
2580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2581/* end confdefs.h.  */
2582#include <stdio.h>
2583int
2584main ()
2585{
2586FILE *f = fopen ("conftest.out", "w");
2587 return ferror (f) || fclose (f) != 0;
2588
2589  ;
2590  return 0;
2591}
2592_ACEOF
2593ac_clean_files="$ac_clean_files conftest.out"
2594# Check that the compiler produces executables we can run.  If not, either
2595# the compiler is broken, or we cross compile.
2596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
2597$as_echo_n "checking whether we are cross compiling... " >&6; }
2598if test "$cross_compiling" != yes; then
2599  { { ac_try="$ac_link"
2600case "(($ac_try" in
2601  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2602  *) ac_try_echo=$ac_try;;
2603esac
2604eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2605$as_echo "$ac_try_echo"; } >&5
2606  (eval "$ac_link") 2>&5
2607  ac_status=$?
2608  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2609  test $ac_status = 0; }
2610  if { ac_try='./conftest$ac_cv_exeext'
2611  { { case "(($ac_try" in
2612  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2613  *) ac_try_echo=$ac_try;;
2614esac
2615eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2616$as_echo "$ac_try_echo"; } >&5
2617  (eval "$ac_try") 2>&5
2618  ac_status=$?
2619  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2620  test $ac_status = 0; }; }; then
2621    cross_compiling=no
2622  else
2623    if test "$cross_compiling" = maybe; then
2624	cross_compiling=yes
2625    else
2626	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2627$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2628as_fn_error $? "cannot run C compiled programs.
2629If you meant to cross compile, use \`--host'.
2630See \`config.log' for more details" "$LINENO" 5; }
2631    fi
2632  fi
2633fi
2634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
2635$as_echo "$cross_compiling" >&6; }
2636
2637rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
2638ac_clean_files=$ac_clean_files_save
2639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
2640$as_echo_n "checking for suffix of object files... " >&6; }
2641if ${ac_cv_objext+:} false; then :
2642  $as_echo_n "(cached) " >&6
2643else
2644  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2645/* end confdefs.h.  */
2646
2647int
2648main ()
2649{
2650
2651  ;
2652  return 0;
2653}
2654_ACEOF
2655rm -f conftest.o conftest.obj
2656if { { ac_try="$ac_compile"
2657case "(($ac_try" in
2658  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2659  *) ac_try_echo=$ac_try;;
2660esac
2661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2662$as_echo "$ac_try_echo"; } >&5
2663  (eval "$ac_compile") 2>&5
2664  ac_status=$?
2665  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2666  test $ac_status = 0; }; then :
2667  for ac_file in conftest.o conftest.obj conftest.*; do
2668  test -f "$ac_file" || continue;
2669  case $ac_file in
2670    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
2671    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2672       break;;
2673  esac
2674done
2675else
2676  $as_echo "$as_me: failed program was:" >&5
2677sed 's/^/| /' conftest.$ac_ext >&5
2678
2679{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2681as_fn_error $? "cannot compute suffix of object files: cannot compile
2682See \`config.log' for more details" "$LINENO" 5; }
2683fi
2684rm -f conftest.$ac_cv_objext conftest.$ac_ext
2685fi
2686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
2687$as_echo "$ac_cv_objext" >&6; }
2688OBJEXT=$ac_cv_objext
2689ac_objext=$OBJEXT
2690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
2691$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
2692if ${ac_cv_c_compiler_gnu+:} false; then :
2693  $as_echo_n "(cached) " >&6
2694else
2695  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2696/* end confdefs.h.  */
2697
2698int
2699main ()
2700{
2701#ifndef __GNUC__
2702       choke me
2703#endif
2704
2705  ;
2706  return 0;
2707}
2708_ACEOF
2709if ac_fn_c_try_compile "$LINENO"; then :
2710  ac_compiler_gnu=yes
2711else
2712  ac_compiler_gnu=no
2713fi
2714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2715ac_cv_c_compiler_gnu=$ac_compiler_gnu
2716
2717fi
2718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
2719$as_echo "$ac_cv_c_compiler_gnu" >&6; }
2720if test $ac_compiler_gnu = yes; then
2721  GCC=yes
2722else
2723  GCC=
2724fi
2725ac_test_CFLAGS=${CFLAGS+set}
2726ac_save_CFLAGS=$CFLAGS
2727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
2728$as_echo_n "checking whether $CC accepts -g... " >&6; }
2729if ${ac_cv_prog_cc_g+:} false; then :
2730  $as_echo_n "(cached) " >&6
2731else
2732  ac_save_c_werror_flag=$ac_c_werror_flag
2733   ac_c_werror_flag=yes
2734   ac_cv_prog_cc_g=no
2735   CFLAGS="-g"
2736   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2737/* end confdefs.h.  */
2738
2739int
2740main ()
2741{
2742
2743  ;
2744  return 0;
2745}
2746_ACEOF
2747if ac_fn_c_try_compile "$LINENO"; then :
2748  ac_cv_prog_cc_g=yes
2749else
2750  CFLAGS=""
2751      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2752/* end confdefs.h.  */
2753
2754int
2755main ()
2756{
2757
2758  ;
2759  return 0;
2760}
2761_ACEOF
2762if ac_fn_c_try_compile "$LINENO"; then :
2763
2764else
2765  ac_c_werror_flag=$ac_save_c_werror_flag
2766	 CFLAGS="-g"
2767	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2768/* end confdefs.h.  */
2769
2770int
2771main ()
2772{
2773
2774  ;
2775  return 0;
2776}
2777_ACEOF
2778if ac_fn_c_try_compile "$LINENO"; then :
2779  ac_cv_prog_cc_g=yes
2780fi
2781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2782fi
2783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2784fi
2785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2786   ac_c_werror_flag=$ac_save_c_werror_flag
2787fi
2788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
2789$as_echo "$ac_cv_prog_cc_g" >&6; }
2790if test "$ac_test_CFLAGS" = set; then
2791  CFLAGS=$ac_save_CFLAGS
2792elif test $ac_cv_prog_cc_g = yes; then
2793  if test "$GCC" = yes; then
2794    CFLAGS="-g -O2"
2795  else
2796    CFLAGS="-g"
2797  fi
2798else
2799  if test "$GCC" = yes; then
2800    CFLAGS="-O2"
2801  else
2802    CFLAGS=
2803  fi
2804fi
2805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
2806$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
2807if ${ac_cv_prog_cc_c89+:} false; then :
2808  $as_echo_n "(cached) " >&6
2809else
2810  ac_cv_prog_cc_c89=no
2811ac_save_CC=$CC
2812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2813/* end confdefs.h.  */
2814#include <stdarg.h>
2815#include <stdio.h>
2816struct stat;
2817/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2818struct buf { int x; };
2819FILE * (*rcsopen) (struct buf *, struct stat *, int);
2820static char *e (p, i)
2821     char **p;
2822     int i;
2823{
2824  return p[i];
2825}
2826static char *f (char * (*g) (char **, int), char **p, ...)
2827{
2828  char *s;
2829  va_list v;
2830  va_start (v,p);
2831  s = g (p, va_arg (v,int));
2832  va_end (v);
2833  return s;
2834}
2835
2836/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2837   function prototypes and stuff, but not '\xHH' hex character constants.
2838   These don't provoke an error unfortunately, instead are silently treated
2839   as 'x'.  The following induces an error, until -std is added to get
2840   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2841   array size at least.  It's necessary to write '\x00'==0 to get something
2842   that's true only with -std.  */
2843int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2844
2845/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2846   inside strings and character constants.  */
2847#define FOO(x) 'x'
2848int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
2849
2850int test (int i, double x);
2851struct s1 {int (*f) (int a);};
2852struct s2 {int (*f) (double a);};
2853int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2854int argc;
2855char **argv;
2856int
2857main ()
2858{
2859return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2860  ;
2861  return 0;
2862}
2863_ACEOF
2864for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
2865	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2866do
2867  CC="$ac_save_CC $ac_arg"
2868  if ac_fn_c_try_compile "$LINENO"; then :
2869  ac_cv_prog_cc_c89=$ac_arg
2870fi
2871rm -f core conftest.err conftest.$ac_objext
2872  test "x$ac_cv_prog_cc_c89" != "xno" && break
2873done
2874rm -f conftest.$ac_ext
2875CC=$ac_save_CC
2876
2877fi
2878# AC_CACHE_VAL
2879case "x$ac_cv_prog_cc_c89" in
2880  x)
2881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
2882$as_echo "none needed" >&6; } ;;
2883  xno)
2884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
2885$as_echo "unsupported" >&6; } ;;
2886  *)
2887    CC="$CC $ac_cv_prog_cc_c89"
2888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
2889$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
2890esac
2891if test "x$ac_cv_prog_cc_c89" != xno; then :
2892
2893fi
2894
2895ac_ext=c
2896ac_cpp='$CPP $CPPFLAGS'
2897ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2898ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2899ac_compiler_gnu=$ac_cv_c_compiler_gnu
2900
2901
2902
2903    { $as_echo "$as_me:${as_lineno-$LINENO}: checking which source of entropy to use" >&5
2904$as_echo "$as_me: checking which source of entropy to use" >&6;}
2905
2906# Check whether --with-entropy was given.
2907if test "${with_entropy+set}" = set; then :
2908  withval=$with_entropy;
2909else
2910  with_entropy=auto
2911fi
2912
2913
2914        case $with_entropy in
2915            no)
2916
2917$as_echo "#define XML_POOR_ENTROPY 1" >>confdefs.h
2918
2919            ;;
2920            auto)
2921                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arc4random_buf (BSD or libbsd)" >&5
2922$as_echo_n "checking for arc4random_buf (BSD or libbsd)... " >&6; }
2923                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2924/* end confdefs.h.  */
2925
2926                  #include <stdlib.h>  /* for arc4random_buf on BSD, for NULL */
2927                  #if defined(HAVE_LIBBSD)
2928                  # include <bsd/stdlib.h>
2929                  #endif
2930                  int main() {
2931                    arc4random_buf(NULL, 0U);
2932                    return 0;
2933                  }
2934
2935_ACEOF
2936if ac_fn_c_try_link "$LINENO"; then :
2937
2938
2939$as_echo "#define HAVE_ARC4RANDOM_BUF 1" >>confdefs.h
2940
2941                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2942$as_echo "yes" >&6; }
2943
2944else
2945
2946                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2947$as_echo "no" >&6; }
2948
2949                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arc4random (BSD, macOS or libbsd)" >&5
2950$as_echo_n "checking for arc4random (BSD, macOS or libbsd)... " >&6; }
2951                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2952/* end confdefs.h.  */
2953
2954                      #if defined(HAVE_LIBBSD)
2955                      # include <bsd/stdlib.h>
2956                      #else
2957                      # include <stdlib.h>
2958                      #endif
2959                      int main() {
2960                          arc4random();
2961                          return 0;
2962                      }
2963
2964_ACEOF
2965if ac_fn_c_try_link "$LINENO"; then :
2966
2967
2968$as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
2969
2970                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2971$as_echo "yes" >&6; }
2972
2973else
2974
2975                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2976$as_echo "no" >&6; }
2977
2978fi
2979rm -f core conftest.err conftest.$ac_objext \
2980    conftest$ac_exeext conftest.$ac_ext
2981
2982fi
2983rm -f core conftest.err conftest.$ac_objext \
2984    conftest$ac_exeext conftest.$ac_ext
2985
2986
2987                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getrandom (Linux 3.17+, glibc 2.25+)" >&5
2988$as_echo_n "checking for getrandom (Linux 3.17+, glibc 2.25+)... " >&6; }
2989                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2990/* end confdefs.h.  */
2991
2992                  #include <stdlib.h>  /* for NULL */
2993                  #include <sys/random.h>
2994                  int main() {
2995                    return getrandom(NULL, 0U, 0U);
2996                  }
2997
2998_ACEOF
2999if ac_fn_c_try_link "$LINENO"; then :
3000
3001
3002$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
3003
3004                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3005$as_echo "yes" >&6; }
3006
3007else
3008
3009                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3010$as_echo "no" >&6; }
3011
3012                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for syscall SYS_getrandom (Linux 3.17+)" >&5
3013$as_echo_n "checking for syscall SYS_getrandom (Linux 3.17+)... " >&6; }
3014                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3015/* end confdefs.h.  */
3016
3017                      #include <stdlib.h>  /* for NULL */
3018                      #include <unistd.h>  /* for syscall */
3019                      #include <sys/syscall.h>  /* for SYS_getrandom */
3020                      int main() {
3021                        syscall(SYS_getrandom, NULL, 0, 0);
3022                        return 0;
3023                      }
3024
3025_ACEOF
3026if ac_fn_c_try_link "$LINENO"; then :
3027
3028
3029$as_echo "#define HAVE_SYSCALL_GETRANDOM 1" >>confdefs.h
3030
3031                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3032$as_echo "yes" >&6; }
3033
3034else
3035
3036                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3037$as_echo "no" >&6; }
3038
3039fi
3040rm -f core conftest.err conftest.$ac_objext \
3041    conftest$ac_exeext conftest.$ac_ext
3042
3043fi
3044rm -f core conftest.err conftest.$ac_objext \
3045    conftest$ac_exeext conftest.$ac_ext
3046
3047$as_echo "#define XML_DEV_URANDOM 1" >>confdefs.h
3048
3049
3050$as_echo "#define XML_POOR_ENTROPY 1" >>confdefs.h
3051
3052            ;;
3053            HAVE_GETRANDOM)
3054
3055$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
3056
3057            ;;
3058            HAVE_SYSCALL_GETRANDOM)
3059
3060$as_echo "#define HAVE_SYSCALL_GETRANDOM 1" >>confdefs.h
3061
3062            ;;
3063            HAVE_ARC4RANDOM_BUF)
3064
3065$as_echo "#define HAVE_ARC4RANDOM_BUF 1" >>confdefs.h
3066
3067            ;;
3068            HAVE_ARC4RANDOM)
3069
3070$as_echo "#define HAVE_ARC4RANDOM 1" >>confdefs.h
3071
3072            ;;
3073            XML_DEV_URANDOM)
3074
3075$as_echo "#define XML_DEV_URANDOM 1" >>confdefs.h
3076
3077            ;;
3078            XML_POOR_ENTROPY)
3079
3080$as_echo "#define XML_POOR_ENTROPY 1" >>confdefs.h
3081
3082            ;;
3083            *)
3084                as_fn_error $? "${with_entropy} not known." "$LINENO" 5
3085        esac
3086
3087
3088#--------------------------------------------------------------------
3089# Call TEA_INIT as the first TEA_ macro to set up initial vars.
3090# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
3091# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
3092#--------------------------------------------------------------------
3093
3094
3095    TEA_VERSION="3.13"
3096
3097    { $as_echo "$as_me:${as_lineno-$LINENO}: checking TEA configuration" >&5
3098$as_echo_n "checking TEA configuration... " >&6; }
3099    if test x"${PACKAGE_NAME}" = x ; then
3100	as_fn_error $? "
3101The PACKAGE_NAME variable must be defined by your TEA configure.ac" "$LINENO" 5
3102    fi
3103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5
3104$as_echo "ok (TEA ${TEA_VERSION})" >&6; }
3105
3106    # If the user did not set CFLAGS, set it now to keep macros
3107    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
3108    if test "${CFLAGS+set}" != "set" ; then
3109	CFLAGS=""
3110    fi
3111
3112    case "`uname -s`" in
3113	*win32*|*WIN32*|*MINGW32_*|*MINGW64_*)
3114	    # Extract the first word of "cygpath", so it can be a program name with args.
3115set dummy cygpath; ac_word=$2
3116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3117$as_echo_n "checking for $ac_word... " >&6; }
3118if ${ac_cv_prog_CYGPATH+:} false; then :
3119  $as_echo_n "(cached) " >&6
3120else
3121  if test -n "$CYGPATH"; then
3122  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
3123else
3124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3125for as_dir in $PATH
3126do
3127  IFS=$as_save_IFS
3128  test -z "$as_dir" && as_dir=.
3129    for ac_exec_ext in '' $ac_executable_extensions; do
3130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3131    ac_cv_prog_CYGPATH="cygpath -m"
3132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3133    break 2
3134  fi
3135done
3136  done
3137IFS=$as_save_IFS
3138
3139  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
3140fi
3141fi
3142CYGPATH=$ac_cv_prog_CYGPATH
3143if test -n "$CYGPATH"; then
3144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
3145$as_echo "$CYGPATH" >&6; }
3146else
3147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3148$as_echo "no" >&6; }
3149fi
3150
3151
3152	    EXEEXT=".exe"
3153	    TEA_PLATFORM="windows"
3154	    ;;
3155	*CYGWIN_*)
3156	    EXEEXT=".exe"
3157	    # CYGPATH and TEA_PLATFORM are determined later in LOAD_TCLCONFIG
3158	    ;;
3159	*)
3160	    CYGPATH=echo
3161	    # Maybe we are cross-compiling....
3162	    case ${host_alias} in
3163		*mingw32*)
3164		EXEEXT=".exe"
3165		TEA_PLATFORM="windows"
3166		;;
3167	    *)
3168		EXEEXT=""
3169		TEA_PLATFORM="unix"
3170		;;
3171	    esac
3172	    ;;
3173    esac
3174
3175    # Check if exec_prefix is set. If not use fall back to prefix.
3176    # Note when adjusted, so that TEA_PREFIX can correct for this.
3177    # This is needed for recursive configures, since autoconf propagates
3178    # $prefix, but not $exec_prefix (doh!).
3179    if test x$exec_prefix = xNONE ; then
3180	exec_prefix_default=yes
3181	exec_prefix=$prefix
3182    fi
3183
3184    { $as_echo "$as_me:${as_lineno-$LINENO}: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&5
3185$as_echo "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;}
3186
3187
3188
3189
3190    # This package name must be replaced statically for AC_SUBST to work
3191
3192    # Substitute STUB_LIB_FILE in case package creates a stub library too.
3193
3194
3195    # We AC_SUBST these here to ensure they are subst'ed,
3196    # in case the user doesn't call TEA_ADD_...
3197
3198
3199
3200
3201
3202
3203
3204
3205    # Configure the installer.
3206
3207    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
3208    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
3209    INSTALL_DATA='${INSTALL} -m 644'
3210    INSTALL_PROGRAM='${INSTALL} -m 755'
3211    INSTALL_SCRIPT='${INSTALL} -m 755'
3212
3213
3214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
3215$as_echo_n "checking system version... " >&6; }
3216if ${tcl_cv_sys_version+:} false; then :
3217  $as_echo_n "(cached) " >&6
3218else
3219
3220	# TEA specific:
3221	if test "${TEA_PLATFORM}" = "windows" ; then
3222	    tcl_cv_sys_version=windows
3223	else
3224	    tcl_cv_sys_version=`uname -s`-`uname -r`
3225	    if test "$?" -ne 0 ; then
3226		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
3227$as_echo "$as_me: WARNING: can't find uname command" >&2;}
3228		tcl_cv_sys_version=unknown
3229	    else
3230		if test "`uname -s`" = "AIX" ; then
3231		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
3232		fi
3233	    fi
3234	fi
3235
3236fi
3237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
3238$as_echo "$tcl_cv_sys_version" >&6; }
3239    system=$tcl_cv_sys_version
3240
3241    case $system in
3242	HP-UX-*) INSTALL_LIBRARY='${INSTALL} -m 755' ;;
3243	      *) INSTALL_LIBRARY='${INSTALL} -m 644' ;;
3244    esac
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255ac_aux_dir=
3256for ac_dir in tclconfig "$srcdir"/tclconfig; do
3257  if test -f "$ac_dir/install-sh"; then
3258    ac_aux_dir=$ac_dir
3259    ac_install_sh="$ac_aux_dir/install-sh -c"
3260    break
3261  elif test -f "$ac_dir/install.sh"; then
3262    ac_aux_dir=$ac_dir
3263    ac_install_sh="$ac_aux_dir/install.sh -c"
3264    break
3265  elif test -f "$ac_dir/shtool"; then
3266    ac_aux_dir=$ac_dir
3267    ac_install_sh="$ac_aux_dir/shtool install -c"
3268    break
3269  fi
3270done
3271if test -z "$ac_aux_dir"; then
3272  as_fn_error $? "cannot find install-sh, install.sh, or shtool in tclconfig \"$srcdir\"/tclconfig" "$LINENO" 5
3273fi
3274
3275# These three variables are undocumented and unsupported,
3276# and are intended to be withdrawn in a future Autoconf release.
3277# They can cause serious problems if a builder's source tree is in a directory
3278# whose full name contains unusual characters.
3279ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3280ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3281ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3282
3283
3284
3285#--------------------------------------------------------------------
3286# Load the tclConfig.sh file
3287#--------------------------------------------------------------------
3288
3289
3290
3291    #
3292    # Ok, lets find the tcl configuration
3293    # First, look for one uninstalled.
3294    # the alternative search directory is invoked by --with-tcl
3295    #
3296
3297    if test x"${no_tcl}" = x ; then
3298	# we reset no_tcl in case something fails here
3299	no_tcl=true
3300
3301# Check whether --with-tcl was given.
3302if test "${with_tcl+set}" = set; then :
3303  withval=$with_tcl; with_tclconfig="${withval}"
3304fi
3305
3306	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
3307$as_echo_n "checking for Tcl configuration... " >&6; }
3308	if ${ac_cv_c_tclconfig+:} false; then :
3309  $as_echo_n "(cached) " >&6
3310else
3311
3312
3313	    # First check to see if --with-tcl was specified.
3314	    if test x"${with_tclconfig}" != x ; then
3315		case "${with_tclconfig}" in
3316		    */tclConfig.sh )
3317			if test -f "${with_tclconfig}"; then
3318			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
3319$as_echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
3320			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
3321			fi ;;
3322		esac
3323		if test -f "${with_tclconfig}/tclConfig.sh" ; then
3324		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
3325		else
3326		    as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
3327		fi
3328	    fi
3329
3330	    # then check for a private Tcl installation
3331	    if test x"${ac_cv_c_tclconfig}" = x ; then
3332		for i in \
3333			../tcl \
3334			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
3335			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
3336			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
3337			../../tcl \
3338			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
3339			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
3340			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
3341			../../../tcl \
3342			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
3343			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
3344			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
3345		    if test "${TEA_PLATFORM}" = "windows" \
3346			    -a -f "$i/win/tclConfig.sh" ; then
3347			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
3348			break
3349		    fi
3350		    if test -f "$i/unix/tclConfig.sh" ; then
3351			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
3352			break
3353		    fi
3354		done
3355	    fi
3356
3357	    # on Darwin, check in Framework installation locations
3358	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
3359		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
3360			`ls -d /Library/Frameworks 2>/dev/null` \
3361			`ls -d /Network/Library/Frameworks 2>/dev/null` \
3362			`ls -d /System/Library/Frameworks 2>/dev/null` \
3363			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Library/Frameworks/Tcl.framework 2>/dev/null` \
3364			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Network/Library/Frameworks/Tcl.framework 2>/dev/null` \
3365			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tcl.framework 2>/dev/null` \
3366			; do
3367		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
3368			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
3369			break
3370		    fi
3371		done
3372	    fi
3373
3374	    # TEA specific: on Windows, check in common installation locations
3375	    if test "${TEA_PLATFORM}" = "windows" \
3376		-a x"${ac_cv_c_tclconfig}" = x ; then
3377		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
3378			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
3379			; do
3380		    if test -f "$i/tclConfig.sh" ; then
3381			ac_cv_c_tclconfig="`(cd $i; pwd)`"
3382			break
3383		    fi
3384		done
3385	    fi
3386
3387	    # check in a few common install locations
3388	    if test x"${ac_cv_c_tclconfig}" = x ; then
3389		for i in `ls -d ${libdir} 2>/dev/null` \
3390			`ls -d ${exec_prefix}/lib 2>/dev/null` \
3391			`ls -d ${prefix}/lib 2>/dev/null` \
3392			`ls -d /usr/local/lib 2>/dev/null` \
3393			`ls -d /usr/contrib/lib 2>/dev/null` \
3394			`ls -d /usr/pkg/lib 2>/dev/null` \
3395			`ls -d /usr/lib 2>/dev/null` \
3396			`ls -d /usr/lib64 2>/dev/null` \
3397			`ls -d /usr/lib/tcl8.6 2>/dev/null` \
3398			`ls -d /usr/lib/tcl8.5 2>/dev/null` \
3399			`ls -d /usr/local/lib/tcl8.6 2>/dev/null` \
3400			`ls -d /usr/local/lib/tcl8.5 2>/dev/null` \
3401			`ls -d /usr/local/lib/tcl/tcl8.6 2>/dev/null` \
3402			`ls -d /usr/local/lib/tcl/tcl8.5 2>/dev/null` \
3403			; do
3404		    if test -f "$i/tclConfig.sh" ; then
3405			ac_cv_c_tclconfig="`(cd $i; pwd)`"
3406			break
3407		    fi
3408		done
3409	    fi
3410
3411	    # check in a few other private locations
3412	    if test x"${ac_cv_c_tclconfig}" = x ; then
3413		for i in \
3414			${srcdir}/../tcl \
3415			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
3416			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
3417			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
3418		    if test "${TEA_PLATFORM}" = "windows" \
3419			    -a -f "$i/win/tclConfig.sh" ; then
3420			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
3421			break
3422		    fi
3423		    if test -f "$i/unix/tclConfig.sh" ; then
3424			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
3425			break
3426		    fi
3427		done
3428	    fi
3429
3430fi
3431
3432
3433	if test x"${ac_cv_c_tclconfig}" = x ; then
3434	    TCL_BIN_DIR="# no Tcl configs found"
3435	    as_fn_error $? "Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" "$LINENO" 5
3436	else
3437	    no_tcl=
3438	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
3439	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
3440$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
3441	fi
3442    fi
3443
3444
3445    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
3446$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
3447
3448    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
3449        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
3450$as_echo "loading" >&6; }
3451	. "${TCL_BIN_DIR}/tclConfig.sh"
3452    else
3453        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
3454$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
3455    fi
3456
3457    # eval is required to do the TCL_DBGX substitution
3458    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
3459    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
3460
3461    # If the TCL_BIN_DIR is the build directory (not the install directory),
3462    # then set the common variable name to the value of the build variables.
3463    # For example, the variable TCL_LIB_SPEC will be set to the value
3464    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
3465    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
3466    # installed and uninstalled version of Tcl.
3467    if test -f "${TCL_BIN_DIR}/Makefile" ; then
3468        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
3469        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
3470        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
3471    elif test "`uname -s`" = "Darwin"; then
3472	# If Tcl was built as a framework, attempt to use the libraries
3473	# from the framework at the given location so that linking works
3474	# against Tcl.framework installed in an arbitrary location.
3475	case ${TCL_DEFS} in
3476	    *TCL_FRAMEWORK*)
3477		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
3478		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
3479			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
3480			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
3481			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
3482			    break
3483			fi
3484		    done
3485		fi
3486		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
3487		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
3488		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
3489		fi
3490		;;
3491	esac
3492    fi
3493
3494    # eval is required to do the TCL_DBGX substitution
3495    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
3496    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
3497    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
3498    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513    { $as_echo "$as_me:${as_lineno-$LINENO}: checking platform" >&5
3514$as_echo_n "checking platform... " >&6; }
3515    hold_cc=$CC; CC="$TCL_CC"
3516    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3517/* end confdefs.h.  */
3518
3519int
3520main ()
3521{
3522
3523	    #ifdef _WIN32
3524		#error win32
3525	    #endif
3526
3527  ;
3528  return 0;
3529}
3530_ACEOF
3531if ac_fn_c_try_compile "$LINENO"; then :
3532
3533	    TEA_PLATFORM="unix"
3534	    CYGPATH=echo
3535
3536else
3537
3538	    TEA_PLATFORM="windows"
3539	    # Extract the first word of "cygpath", so it can be a program name with args.
3540set dummy cygpath; ac_word=$2
3541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3542$as_echo_n "checking for $ac_word... " >&6; }
3543if ${ac_cv_prog_CYGPATH+:} false; then :
3544  $as_echo_n "(cached) " >&6
3545else
3546  if test -n "$CYGPATH"; then
3547  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
3548else
3549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3550for as_dir in $PATH
3551do
3552  IFS=$as_save_IFS
3553  test -z "$as_dir" && as_dir=.
3554    for ac_exec_ext in '' $ac_executable_extensions; do
3555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3556    ac_cv_prog_CYGPATH="cygpath -m"
3557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3558    break 2
3559  fi
3560done
3561  done
3562IFS=$as_save_IFS
3563
3564  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
3565fi
3566fi
3567CYGPATH=$ac_cv_prog_CYGPATH
3568if test -n "$CYGPATH"; then
3569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
3570$as_echo "$CYGPATH" >&6; }
3571else
3572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3573$as_echo "no" >&6; }
3574fi
3575
3576
3577
3578fi
3579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3580    CC=$hold_cc
3581    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEA_PLATFORM" >&5
3582$as_echo "$TEA_PLATFORM" >&6; }
3583
3584    # The BUILD_$pkg is to define the correct extern storage class
3585    # handling when making this package
3586
3587cat >>confdefs.h <<_ACEOF
3588#define BUILD_${PACKAGE_NAME} /**/
3589_ACEOF
3590
3591    # Do this here as we have fully defined TEA_PLATFORM now
3592    if test "${TEA_PLATFORM}" = "windows" ; then
3593	EXEEXT=".exe"
3594	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
3595    fi
3596
3597    # TEA specific:
3598
3599
3600
3601
3602
3603
3604
3605
3606#--------------------------------------------------------------------
3607# Load the tkConfig.sh file if necessary (Tk extension)
3608#--------------------------------------------------------------------
3609
3610#TEA_PATH_TKCONFIG
3611#TEA_LOAD_TKCONFIG
3612
3613#-----------------------------------------------------------------------
3614# Handle the --prefix=... option by defaulting to what Tcl gave.
3615# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
3616#-----------------------------------------------------------------------
3617
3618
3619    if test "${prefix}" = "NONE"; then
3620	prefix_default=yes
3621	if test x"${TCL_PREFIX}" != x; then
3622	    { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
3623$as_echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
3624	    prefix=${TCL_PREFIX}
3625	else
3626	    { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to /usr/local" >&5
3627$as_echo "$as_me: --prefix defaulting to /usr/local" >&6;}
3628	    prefix=/usr/local
3629	fi
3630    fi
3631    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
3632	-o x"${exec_prefix_default}" = x"yes" ; then
3633	if test x"${TCL_EXEC_PREFIX}" != x; then
3634	    { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
3635$as_echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
3636	    exec_prefix=${TCL_EXEC_PREFIX}
3637	else
3638	    { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to ${prefix}" >&5
3639$as_echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
3640	    exec_prefix=$prefix
3641	fi
3642    fi
3643
3644
3645#-----------------------------------------------------------------------
3646# Standard compiler checks.
3647# This sets up CC by using the CC env var, or looks for gcc otherwise.
3648# This also calls AC_PROG_CC and a few others to create the basic setup
3649# necessary to compile executables.
3650#-----------------------------------------------------------------------
3651
3652
3653    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
3654    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
3655
3656    ac_ext=c
3657ac_cpp='$CPP $CPPFLAGS'
3658ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3659ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3660ac_compiler_gnu=$ac_cv_c_compiler_gnu
3661if test -n "$ac_tool_prefix"; then
3662  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3663set dummy ${ac_tool_prefix}gcc; ac_word=$2
3664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3665$as_echo_n "checking for $ac_word... " >&6; }
3666if ${ac_cv_prog_CC+:} false; then :
3667  $as_echo_n "(cached) " >&6
3668else
3669  if test -n "$CC"; then
3670  ac_cv_prog_CC="$CC" # Let the user override the test.
3671else
3672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3673for as_dir in $PATH
3674do
3675  IFS=$as_save_IFS
3676  test -z "$as_dir" && as_dir=.
3677    for ac_exec_ext in '' $ac_executable_extensions; do
3678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3679    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3681    break 2
3682  fi
3683done
3684  done
3685IFS=$as_save_IFS
3686
3687fi
3688fi
3689CC=$ac_cv_prog_CC
3690if test -n "$CC"; then
3691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3692$as_echo "$CC" >&6; }
3693else
3694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3695$as_echo "no" >&6; }
3696fi
3697
3698
3699fi
3700if test -z "$ac_cv_prog_CC"; then
3701  ac_ct_CC=$CC
3702  # Extract the first word of "gcc", so it can be a program name with args.
3703set dummy gcc; ac_word=$2
3704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3705$as_echo_n "checking for $ac_word... " >&6; }
3706if ${ac_cv_prog_ac_ct_CC+:} false; then :
3707  $as_echo_n "(cached) " >&6
3708else
3709  if test -n "$ac_ct_CC"; then
3710  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3711else
3712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713for as_dir in $PATH
3714do
3715  IFS=$as_save_IFS
3716  test -z "$as_dir" && as_dir=.
3717    for ac_exec_ext in '' $ac_executable_extensions; do
3718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3719    ac_cv_prog_ac_ct_CC="gcc"
3720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3721    break 2
3722  fi
3723done
3724  done
3725IFS=$as_save_IFS
3726
3727fi
3728fi
3729ac_ct_CC=$ac_cv_prog_ac_ct_CC
3730if test -n "$ac_ct_CC"; then
3731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3732$as_echo "$ac_ct_CC" >&6; }
3733else
3734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3735$as_echo "no" >&6; }
3736fi
3737
3738  if test "x$ac_ct_CC" = x; then
3739    CC=""
3740  else
3741    case $cross_compiling:$ac_tool_warned in
3742yes:)
3743{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3744$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3745ac_tool_warned=yes ;;
3746esac
3747    CC=$ac_ct_CC
3748  fi
3749else
3750  CC="$ac_cv_prog_CC"
3751fi
3752
3753if test -z "$CC"; then
3754          if test -n "$ac_tool_prefix"; then
3755    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3756set dummy ${ac_tool_prefix}cc; ac_word=$2
3757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3758$as_echo_n "checking for $ac_word... " >&6; }
3759if ${ac_cv_prog_CC+:} false; then :
3760  $as_echo_n "(cached) " >&6
3761else
3762  if test -n "$CC"; then
3763  ac_cv_prog_CC="$CC" # Let the user override the test.
3764else
3765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3766for as_dir in $PATH
3767do
3768  IFS=$as_save_IFS
3769  test -z "$as_dir" && as_dir=.
3770    for ac_exec_ext in '' $ac_executable_extensions; do
3771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3772    ac_cv_prog_CC="${ac_tool_prefix}cc"
3773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3774    break 2
3775  fi
3776done
3777  done
3778IFS=$as_save_IFS
3779
3780fi
3781fi
3782CC=$ac_cv_prog_CC
3783if test -n "$CC"; then
3784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3785$as_echo "$CC" >&6; }
3786else
3787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3788$as_echo "no" >&6; }
3789fi
3790
3791
3792  fi
3793fi
3794if test -z "$CC"; then
3795  # Extract the first word of "cc", so it can be a program name with args.
3796set dummy cc; ac_word=$2
3797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3798$as_echo_n "checking for $ac_word... " >&6; }
3799if ${ac_cv_prog_CC+:} false; then :
3800  $as_echo_n "(cached) " >&6
3801else
3802  if test -n "$CC"; then
3803  ac_cv_prog_CC="$CC" # Let the user override the test.
3804else
3805  ac_prog_rejected=no
3806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3807for as_dir in $PATH
3808do
3809  IFS=$as_save_IFS
3810  test -z "$as_dir" && as_dir=.
3811    for ac_exec_ext in '' $ac_executable_extensions; do
3812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3813    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3814       ac_prog_rejected=yes
3815       continue
3816     fi
3817    ac_cv_prog_CC="cc"
3818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3819    break 2
3820  fi
3821done
3822  done
3823IFS=$as_save_IFS
3824
3825if test $ac_prog_rejected = yes; then
3826  # We found a bogon in the path, so make sure we never use it.
3827  set dummy $ac_cv_prog_CC
3828  shift
3829  if test $# != 0; then
3830    # We chose a different compiler from the bogus one.
3831    # However, it has the same basename, so the bogon will be chosen
3832    # first if we set CC to just the basename; use the full file name.
3833    shift
3834    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3835  fi
3836fi
3837fi
3838fi
3839CC=$ac_cv_prog_CC
3840if test -n "$CC"; then
3841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3842$as_echo "$CC" >&6; }
3843else
3844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3845$as_echo "no" >&6; }
3846fi
3847
3848
3849fi
3850if test -z "$CC"; then
3851  if test -n "$ac_tool_prefix"; then
3852  for ac_prog in cl.exe
3853  do
3854    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3855set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3857$as_echo_n "checking for $ac_word... " >&6; }
3858if ${ac_cv_prog_CC+:} false; then :
3859  $as_echo_n "(cached) " >&6
3860else
3861  if test -n "$CC"; then
3862  ac_cv_prog_CC="$CC" # Let the user override the test.
3863else
3864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3865for as_dir in $PATH
3866do
3867  IFS=$as_save_IFS
3868  test -z "$as_dir" && as_dir=.
3869    for ac_exec_ext in '' $ac_executable_extensions; do
3870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3871    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3873    break 2
3874  fi
3875done
3876  done
3877IFS=$as_save_IFS
3878
3879fi
3880fi
3881CC=$ac_cv_prog_CC
3882if test -n "$CC"; then
3883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3884$as_echo "$CC" >&6; }
3885else
3886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3887$as_echo "no" >&6; }
3888fi
3889
3890
3891    test -n "$CC" && break
3892  done
3893fi
3894if test -z "$CC"; then
3895  ac_ct_CC=$CC
3896  for ac_prog in cl.exe
3897do
3898  # Extract the first word of "$ac_prog", so it can be a program name with args.
3899set dummy $ac_prog; ac_word=$2
3900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3901$as_echo_n "checking for $ac_word... " >&6; }
3902if ${ac_cv_prog_ac_ct_CC+:} false; then :
3903  $as_echo_n "(cached) " >&6
3904else
3905  if test -n "$ac_ct_CC"; then
3906  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3907else
3908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3909for as_dir in $PATH
3910do
3911  IFS=$as_save_IFS
3912  test -z "$as_dir" && as_dir=.
3913    for ac_exec_ext in '' $ac_executable_extensions; do
3914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3915    ac_cv_prog_ac_ct_CC="$ac_prog"
3916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3917    break 2
3918  fi
3919done
3920  done
3921IFS=$as_save_IFS
3922
3923fi
3924fi
3925ac_ct_CC=$ac_cv_prog_ac_ct_CC
3926if test -n "$ac_ct_CC"; then
3927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3928$as_echo "$ac_ct_CC" >&6; }
3929else
3930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3931$as_echo "no" >&6; }
3932fi
3933
3934
3935  test -n "$ac_ct_CC" && break
3936done
3937
3938  if test "x$ac_ct_CC" = x; then
3939    CC=""
3940  else
3941    case $cross_compiling:$ac_tool_warned in
3942yes:)
3943{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3944$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3945ac_tool_warned=yes ;;
3946esac
3947    CC=$ac_ct_CC
3948  fi
3949fi
3950
3951fi
3952
3953
3954test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3955$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3956as_fn_error $? "no acceptable C compiler found in \$PATH
3957See \`config.log' for more details" "$LINENO" 5; }
3958
3959# Provide some information about the compiler.
3960$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3961set X $ac_compile
3962ac_compiler=$2
3963for ac_option in --version -v -V -qversion; do
3964  { { ac_try="$ac_compiler $ac_option >&5"
3965case "(($ac_try" in
3966  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3967  *) ac_try_echo=$ac_try;;
3968esac
3969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3970$as_echo "$ac_try_echo"; } >&5
3971  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3972  ac_status=$?
3973  if test -s conftest.err; then
3974    sed '10a\
3975... rest of stderr output deleted ...
3976         10q' conftest.err >conftest.er1
3977    cat conftest.er1 >&5
3978  fi
3979  rm -f conftest.er1 conftest.err
3980  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3981  test $ac_status = 0; }
3982done
3983
3984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3985$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3986if ${ac_cv_c_compiler_gnu+:} false; then :
3987  $as_echo_n "(cached) " >&6
3988else
3989  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3990/* end confdefs.h.  */
3991
3992int
3993main ()
3994{
3995#ifndef __GNUC__
3996       choke me
3997#endif
3998
3999  ;
4000  return 0;
4001}
4002_ACEOF
4003if ac_fn_c_try_compile "$LINENO"; then :
4004  ac_compiler_gnu=yes
4005else
4006  ac_compiler_gnu=no
4007fi
4008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4009ac_cv_c_compiler_gnu=$ac_compiler_gnu
4010
4011fi
4012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4013$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4014if test $ac_compiler_gnu = yes; then
4015  GCC=yes
4016else
4017  GCC=
4018fi
4019ac_test_CFLAGS=${CFLAGS+set}
4020ac_save_CFLAGS=$CFLAGS
4021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4022$as_echo_n "checking whether $CC accepts -g... " >&6; }
4023if ${ac_cv_prog_cc_g+:} false; then :
4024  $as_echo_n "(cached) " >&6
4025else
4026  ac_save_c_werror_flag=$ac_c_werror_flag
4027   ac_c_werror_flag=yes
4028   ac_cv_prog_cc_g=no
4029   CFLAGS="-g"
4030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4031/* end confdefs.h.  */
4032
4033int
4034main ()
4035{
4036
4037  ;
4038  return 0;
4039}
4040_ACEOF
4041if ac_fn_c_try_compile "$LINENO"; then :
4042  ac_cv_prog_cc_g=yes
4043else
4044  CFLAGS=""
4045      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4046/* end confdefs.h.  */
4047
4048int
4049main ()
4050{
4051
4052  ;
4053  return 0;
4054}
4055_ACEOF
4056if ac_fn_c_try_compile "$LINENO"; then :
4057
4058else
4059  ac_c_werror_flag=$ac_save_c_werror_flag
4060	 CFLAGS="-g"
4061	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4062/* end confdefs.h.  */
4063
4064int
4065main ()
4066{
4067
4068  ;
4069  return 0;
4070}
4071_ACEOF
4072if ac_fn_c_try_compile "$LINENO"; then :
4073  ac_cv_prog_cc_g=yes
4074fi
4075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4076fi
4077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4078fi
4079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4080   ac_c_werror_flag=$ac_save_c_werror_flag
4081fi
4082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4083$as_echo "$ac_cv_prog_cc_g" >&6; }
4084if test "$ac_test_CFLAGS" = set; then
4085  CFLAGS=$ac_save_CFLAGS
4086elif test $ac_cv_prog_cc_g = yes; then
4087  if test "$GCC" = yes; then
4088    CFLAGS="-g -O2"
4089  else
4090    CFLAGS="-g"
4091  fi
4092else
4093  if test "$GCC" = yes; then
4094    CFLAGS="-O2"
4095  else
4096    CFLAGS=
4097  fi
4098fi
4099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4100$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4101if ${ac_cv_prog_cc_c89+:} false; then :
4102  $as_echo_n "(cached) " >&6
4103else
4104  ac_cv_prog_cc_c89=no
4105ac_save_CC=$CC
4106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4107/* end confdefs.h.  */
4108#include <stdarg.h>
4109#include <stdio.h>
4110struct stat;
4111/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4112struct buf { int x; };
4113FILE * (*rcsopen) (struct buf *, struct stat *, int);
4114static char *e (p, i)
4115     char **p;
4116     int i;
4117{
4118  return p[i];
4119}
4120static char *f (char * (*g) (char **, int), char **p, ...)
4121{
4122  char *s;
4123  va_list v;
4124  va_start (v,p);
4125  s = g (p, va_arg (v,int));
4126  va_end (v);
4127  return s;
4128}
4129
4130/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4131   function prototypes and stuff, but not '\xHH' hex character constants.
4132   These don't provoke an error unfortunately, instead are silently treated
4133   as 'x'.  The following induces an error, until -std is added to get
4134   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4135   array size at least.  It's necessary to write '\x00'==0 to get something
4136   that's true only with -std.  */
4137int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4138
4139/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4140   inside strings and character constants.  */
4141#define FOO(x) 'x'
4142int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4143
4144int test (int i, double x);
4145struct s1 {int (*f) (int a);};
4146struct s2 {int (*f) (double a);};
4147int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4148int argc;
4149char **argv;
4150int
4151main ()
4152{
4153return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4154  ;
4155  return 0;
4156}
4157_ACEOF
4158for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4159	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4160do
4161  CC="$ac_save_CC $ac_arg"
4162  if ac_fn_c_try_compile "$LINENO"; then :
4163  ac_cv_prog_cc_c89=$ac_arg
4164fi
4165rm -f core conftest.err conftest.$ac_objext
4166  test "x$ac_cv_prog_cc_c89" != "xno" && break
4167done
4168rm -f conftest.$ac_ext
4169CC=$ac_save_CC
4170
4171fi
4172# AC_CACHE_VAL
4173case "x$ac_cv_prog_cc_c89" in
4174  x)
4175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4176$as_echo "none needed" >&6; } ;;
4177  xno)
4178    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4179$as_echo "unsupported" >&6; } ;;
4180  *)
4181    CC="$CC $ac_cv_prog_cc_c89"
4182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4183$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4184esac
4185if test "x$ac_cv_prog_cc_c89" != xno; then :
4186
4187fi
4188
4189ac_ext=c
4190ac_cpp='$CPP $CPPFLAGS'
4191ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4192ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4193ac_compiler_gnu=$ac_cv_c_compiler_gnu
4194
4195    ac_ext=c
4196ac_cpp='$CPP $CPPFLAGS'
4197ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4198ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4199ac_compiler_gnu=$ac_cv_c_compiler_gnu
4200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4201$as_echo_n "checking how to run the C preprocessor... " >&6; }
4202# On Suns, sometimes $CPP names a directory.
4203if test -n "$CPP" && test -d "$CPP"; then
4204  CPP=
4205fi
4206if test -z "$CPP"; then
4207  if ${ac_cv_prog_CPP+:} false; then :
4208  $as_echo_n "(cached) " >&6
4209else
4210      # Double quotes because CPP needs to be expanded
4211    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4212    do
4213      ac_preproc_ok=false
4214for ac_c_preproc_warn_flag in '' yes
4215do
4216  # Use a header file that comes with gcc, so configuring glibc
4217  # with a fresh cross-compiler works.
4218  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4219  # <limits.h> exists even on freestanding compilers.
4220  # On the NeXT, cc -E runs the code through the compiler's parser,
4221  # not just through cpp. "Syntax error" is here to catch this case.
4222  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4223/* end confdefs.h.  */
4224#ifdef __STDC__
4225# include <limits.h>
4226#else
4227# include <assert.h>
4228#endif
4229		     Syntax error
4230_ACEOF
4231if ac_fn_c_try_cpp "$LINENO"; then :
4232
4233else
4234  # Broken: fails on valid input.
4235continue
4236fi
4237rm -f conftest.err conftest.i conftest.$ac_ext
4238
4239  # OK, works on sane cases.  Now check whether nonexistent headers
4240  # can be detected and how.
4241  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4242/* end confdefs.h.  */
4243#include <ac_nonexistent.h>
4244_ACEOF
4245if ac_fn_c_try_cpp "$LINENO"; then :
4246  # Broken: success on invalid input.
4247continue
4248else
4249  # Passes both tests.
4250ac_preproc_ok=:
4251break
4252fi
4253rm -f conftest.err conftest.i conftest.$ac_ext
4254
4255done
4256# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4257rm -f conftest.i conftest.err conftest.$ac_ext
4258if $ac_preproc_ok; then :
4259  break
4260fi
4261
4262    done
4263    ac_cv_prog_CPP=$CPP
4264
4265fi
4266  CPP=$ac_cv_prog_CPP
4267else
4268  ac_cv_prog_CPP=$CPP
4269fi
4270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4271$as_echo "$CPP" >&6; }
4272ac_preproc_ok=false
4273for ac_c_preproc_warn_flag in '' yes
4274do
4275  # Use a header file that comes with gcc, so configuring glibc
4276  # with a fresh cross-compiler works.
4277  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4278  # <limits.h> exists even on freestanding compilers.
4279  # On the NeXT, cc -E runs the code through the compiler's parser,
4280  # not just through cpp. "Syntax error" is here to catch this case.
4281  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4282/* end confdefs.h.  */
4283#ifdef __STDC__
4284# include <limits.h>
4285#else
4286# include <assert.h>
4287#endif
4288		     Syntax error
4289_ACEOF
4290if ac_fn_c_try_cpp "$LINENO"; then :
4291
4292else
4293  # Broken: fails on valid input.
4294continue
4295fi
4296rm -f conftest.err conftest.i conftest.$ac_ext
4297
4298  # OK, works on sane cases.  Now check whether nonexistent headers
4299  # can be detected and how.
4300  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4301/* end confdefs.h.  */
4302#include <ac_nonexistent.h>
4303_ACEOF
4304if ac_fn_c_try_cpp "$LINENO"; then :
4305  # Broken: success on invalid input.
4306continue
4307else
4308  # Passes both tests.
4309ac_preproc_ok=:
4310break
4311fi
4312rm -f conftest.err conftest.i conftest.$ac_ext
4313
4314done
4315# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4316rm -f conftest.i conftest.err conftest.$ac_ext
4317if $ac_preproc_ok; then :
4318
4319else
4320  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4321$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4322as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4323See \`config.log' for more details" "$LINENO" 5; }
4324fi
4325
4326ac_ext=c
4327ac_cpp='$CPP $CPPFLAGS'
4328ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4329ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4330ac_compiler_gnu=$ac_cv_c_compiler_gnu
4331
4332
4333    #--------------------------------------------------------------------
4334    # Checks to see if the make program sets the $MAKE variable.
4335    #--------------------------------------------------------------------
4336
4337    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4338$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4339set x ${MAKE-make}
4340ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4341if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4342  $as_echo_n "(cached) " >&6
4343else
4344  cat >conftest.make <<\_ACEOF
4345SHELL = /bin/sh
4346all:
4347	@echo '@@@%%%=$(MAKE)=@@@%%%'
4348_ACEOF
4349# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4350case `${MAKE-make} -f conftest.make 2>/dev/null` in
4351  *@@@%%%=?*=@@@%%%*)
4352    eval ac_cv_prog_make_${ac_make}_set=yes;;
4353  *)
4354    eval ac_cv_prog_make_${ac_make}_set=no;;
4355esac
4356rm -f conftest.make
4357fi
4358if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4360$as_echo "yes" >&6; }
4361  SET_MAKE=
4362else
4363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4364$as_echo "no" >&6; }
4365  SET_MAKE="MAKE=${MAKE-make}"
4366fi
4367
4368
4369    #--------------------------------------------------------------------
4370    # Find ranlib
4371    #--------------------------------------------------------------------
4372
4373    if test -n "$ac_tool_prefix"; then
4374  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4375set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4377$as_echo_n "checking for $ac_word... " >&6; }
4378if ${ac_cv_prog_RANLIB+:} false; then :
4379  $as_echo_n "(cached) " >&6
4380else
4381  if test -n "$RANLIB"; then
4382  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4383else
4384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4385for as_dir in $PATH
4386do
4387  IFS=$as_save_IFS
4388  test -z "$as_dir" && as_dir=.
4389    for ac_exec_ext in '' $ac_executable_extensions; do
4390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4391    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4393    break 2
4394  fi
4395done
4396  done
4397IFS=$as_save_IFS
4398
4399fi
4400fi
4401RANLIB=$ac_cv_prog_RANLIB
4402if test -n "$RANLIB"; then
4403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4404$as_echo "$RANLIB" >&6; }
4405else
4406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4407$as_echo "no" >&6; }
4408fi
4409
4410
4411fi
4412if test -z "$ac_cv_prog_RANLIB"; then
4413  ac_ct_RANLIB=$RANLIB
4414  # Extract the first word of "ranlib", so it can be a program name with args.
4415set dummy ranlib; ac_word=$2
4416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4417$as_echo_n "checking for $ac_word... " >&6; }
4418if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4419  $as_echo_n "(cached) " >&6
4420else
4421  if test -n "$ac_ct_RANLIB"; then
4422  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4423else
4424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4425for as_dir in $PATH
4426do
4427  IFS=$as_save_IFS
4428  test -z "$as_dir" && as_dir=.
4429    for ac_exec_ext in '' $ac_executable_extensions; do
4430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4431    ac_cv_prog_ac_ct_RANLIB="ranlib"
4432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4433    break 2
4434  fi
4435done
4436  done
4437IFS=$as_save_IFS
4438
4439fi
4440fi
4441ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4442if test -n "$ac_ct_RANLIB"; then
4443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4444$as_echo "$ac_ct_RANLIB" >&6; }
4445else
4446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4447$as_echo "no" >&6; }
4448fi
4449
4450  if test "x$ac_ct_RANLIB" = x; then
4451    RANLIB=""
4452  else
4453    case $cross_compiling:$ac_tool_warned in
4454yes:)
4455{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4456$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4457ac_tool_warned=yes ;;
4458esac
4459    RANLIB=$ac_ct_RANLIB
4460  fi
4461else
4462  RANLIB="$ac_cv_prog_RANLIB"
4463fi
4464
4465
4466    #--------------------------------------------------------------------
4467    # Determines the correct binary file extension (.o, .obj, .exe etc.)
4468    #--------------------------------------------------------------------
4469
4470
4471
4472
4473
4474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4475$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4476if ${ac_cv_path_GREP+:} false; then :
4477  $as_echo_n "(cached) " >&6
4478else
4479  if test -z "$GREP"; then
4480  ac_path_GREP_found=false
4481  # Loop through the user's path and test for each of PROGNAME-LIST
4482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4483for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4484do
4485  IFS=$as_save_IFS
4486  test -z "$as_dir" && as_dir=.
4487    for ac_prog in grep ggrep; do
4488    for ac_exec_ext in '' $ac_executable_extensions; do
4489      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4490      as_fn_executable_p "$ac_path_GREP" || continue
4491# Check for GNU ac_path_GREP and select it if it is found.
4492  # Check for GNU $ac_path_GREP
4493case `"$ac_path_GREP" --version 2>&1` in
4494*GNU*)
4495  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4496*)
4497  ac_count=0
4498  $as_echo_n 0123456789 >"conftest.in"
4499  while :
4500  do
4501    cat "conftest.in" "conftest.in" >"conftest.tmp"
4502    mv "conftest.tmp" "conftest.in"
4503    cp "conftest.in" "conftest.nl"
4504    $as_echo 'GREP' >> "conftest.nl"
4505    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4506    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4507    as_fn_arith $ac_count + 1 && ac_count=$as_val
4508    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4509      # Best one so far, save it but keep looking for a better one
4510      ac_cv_path_GREP="$ac_path_GREP"
4511      ac_path_GREP_max=$ac_count
4512    fi
4513    # 10*(2^10) chars as input seems more than enough
4514    test $ac_count -gt 10 && break
4515  done
4516  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4517esac
4518
4519      $ac_path_GREP_found && break 3
4520    done
4521  done
4522  done
4523IFS=$as_save_IFS
4524  if test -z "$ac_cv_path_GREP"; then
4525    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4526  fi
4527else
4528  ac_cv_path_GREP=$GREP
4529fi
4530
4531fi
4532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4533$as_echo "$ac_cv_path_GREP" >&6; }
4534 GREP="$ac_cv_path_GREP"
4535
4536
4537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4538$as_echo_n "checking for egrep... " >&6; }
4539if ${ac_cv_path_EGREP+:} false; then :
4540  $as_echo_n "(cached) " >&6
4541else
4542  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4543   then ac_cv_path_EGREP="$GREP -E"
4544   else
4545     if test -z "$EGREP"; then
4546  ac_path_EGREP_found=false
4547  # Loop through the user's path and test for each of PROGNAME-LIST
4548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4549for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4550do
4551  IFS=$as_save_IFS
4552  test -z "$as_dir" && as_dir=.
4553    for ac_prog in egrep; do
4554    for ac_exec_ext in '' $ac_executable_extensions; do
4555      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4556      as_fn_executable_p "$ac_path_EGREP" || continue
4557# Check for GNU ac_path_EGREP and select it if it is found.
4558  # Check for GNU $ac_path_EGREP
4559case `"$ac_path_EGREP" --version 2>&1` in
4560*GNU*)
4561  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4562*)
4563  ac_count=0
4564  $as_echo_n 0123456789 >"conftest.in"
4565  while :
4566  do
4567    cat "conftest.in" "conftest.in" >"conftest.tmp"
4568    mv "conftest.tmp" "conftest.in"
4569    cp "conftest.in" "conftest.nl"
4570    $as_echo 'EGREP' >> "conftest.nl"
4571    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4572    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4573    as_fn_arith $ac_count + 1 && ac_count=$as_val
4574    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4575      # Best one so far, save it but keep looking for a better one
4576      ac_cv_path_EGREP="$ac_path_EGREP"
4577      ac_path_EGREP_max=$ac_count
4578    fi
4579    # 10*(2^10) chars as input seems more than enough
4580    test $ac_count -gt 10 && break
4581  done
4582  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4583esac
4584
4585      $ac_path_EGREP_found && break 3
4586    done
4587  done
4588  done
4589IFS=$as_save_IFS
4590  if test -z "$ac_cv_path_EGREP"; then
4591    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4592  fi
4593else
4594  ac_cv_path_EGREP=$EGREP
4595fi
4596
4597   fi
4598fi
4599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4600$as_echo "$ac_cv_path_EGREP" >&6; }
4601 EGREP="$ac_cv_path_EGREP"
4602
4603
4604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4605$as_echo_n "checking for ANSI C header files... " >&6; }
4606if ${ac_cv_header_stdc+:} false; then :
4607  $as_echo_n "(cached) " >&6
4608else
4609  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4610/* end confdefs.h.  */
4611#include <stdlib.h>
4612#include <stdarg.h>
4613#include <string.h>
4614#include <float.h>
4615
4616int
4617main ()
4618{
4619
4620  ;
4621  return 0;
4622}
4623_ACEOF
4624if ac_fn_c_try_compile "$LINENO"; then :
4625  ac_cv_header_stdc=yes
4626else
4627  ac_cv_header_stdc=no
4628fi
4629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4630
4631if test $ac_cv_header_stdc = yes; then
4632  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4633  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4634/* end confdefs.h.  */
4635#include <string.h>
4636
4637_ACEOF
4638if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4639  $EGREP "memchr" >/dev/null 2>&1; then :
4640
4641else
4642  ac_cv_header_stdc=no
4643fi
4644rm -f conftest*
4645
4646fi
4647
4648if test $ac_cv_header_stdc = yes; then
4649  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4650  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4651/* end confdefs.h.  */
4652#include <stdlib.h>
4653
4654_ACEOF
4655if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4656  $EGREP "free" >/dev/null 2>&1; then :
4657
4658else
4659  ac_cv_header_stdc=no
4660fi
4661rm -f conftest*
4662
4663fi
4664
4665if test $ac_cv_header_stdc = yes; then
4666  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4667  if test "$cross_compiling" = yes; then :
4668  :
4669else
4670  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4671/* end confdefs.h.  */
4672#include <ctype.h>
4673#include <stdlib.h>
4674#if ((' ' & 0x0FF) == 0x020)
4675# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4676# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4677#else
4678# define ISLOWER(c) \
4679		   (('a' <= (c) && (c) <= 'i') \
4680		     || ('j' <= (c) && (c) <= 'r') \
4681		     || ('s' <= (c) && (c) <= 'z'))
4682# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4683#endif
4684
4685#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4686int
4687main ()
4688{
4689  int i;
4690  for (i = 0; i < 256; i++)
4691    if (XOR (islower (i), ISLOWER (i))
4692	|| toupper (i) != TOUPPER (i))
4693      return 2;
4694  return 0;
4695}
4696_ACEOF
4697if ac_fn_c_try_run "$LINENO"; then :
4698
4699else
4700  ac_cv_header_stdc=no
4701fi
4702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4703  conftest.$ac_objext conftest.beam conftest.$ac_ext
4704fi
4705
4706fi
4707fi
4708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4709$as_echo "$ac_cv_header_stdc" >&6; }
4710if test $ac_cv_header_stdc = yes; then
4711
4712$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4713
4714fi
4715
4716# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4717for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4718		  inttypes.h stdint.h unistd.h
4719do :
4720  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4721ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4722"
4723if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4724  cat >>confdefs.h <<_ACEOF
4725#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4726_ACEOF
4727
4728fi
4729
4730done
4731
4732
4733
4734    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4735
4736
4737    #------------------------------------------------------------------------
4738    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4739    # It makes compiling go faster.  (This is only a performance feature.)
4740    #------------------------------------------------------------------------
4741
4742    if test -z "$no_pipe" -a -n "$GCC"; then
4743	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5
4744$as_echo_n "checking if the compiler understands -pipe... " >&6; }
4745if ${tcl_cv_cc_pipe+:} false; then :
4746  $as_echo_n "(cached) " >&6
4747else
4748
4749	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4750	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4751/* end confdefs.h.  */
4752
4753int
4754main ()
4755{
4756
4757  ;
4758  return 0;
4759}
4760_ACEOF
4761if ac_fn_c_try_compile "$LINENO"; then :
4762  tcl_cv_cc_pipe=yes
4763else
4764  tcl_cv_cc_pipe=no
4765fi
4766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4767	    CFLAGS=$hold_cflags
4768fi
4769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5
4770$as_echo "$tcl_cv_cc_pipe" >&6; }
4771	if test $tcl_cv_cc_pipe = yes; then
4772	    CFLAGS="$CFLAGS -pipe"
4773	fi
4774    fi
4775
4776    #--------------------------------------------------------------------
4777    # Common compiler flag setup
4778    #--------------------------------------------------------------------
4779
4780     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
4781$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
4782if ${ac_cv_c_bigendian+:} false; then :
4783  $as_echo_n "(cached) " >&6
4784else
4785  ac_cv_c_bigendian=unknown
4786    # See if we're dealing with a universal compiler.
4787    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4788/* end confdefs.h.  */
4789#ifndef __APPLE_CC__
4790	       not a universal capable compiler
4791	     #endif
4792	     typedef int dummy;
4793
4794_ACEOF
4795if ac_fn_c_try_compile "$LINENO"; then :
4796
4797	# Check for potential -arch flags.  It is not universal unless
4798	# there are at least two -arch flags with different values.
4799	ac_arch=
4800	ac_prev=
4801	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
4802	 if test -n "$ac_prev"; then
4803	   case $ac_word in
4804	     i?86 | x86_64 | ppc | ppc64)
4805	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
4806		 ac_arch=$ac_word
4807	       else
4808		 ac_cv_c_bigendian=universal
4809		 break
4810	       fi
4811	       ;;
4812	   esac
4813	   ac_prev=
4814	 elif test "x$ac_word" = "x-arch"; then
4815	   ac_prev=arch
4816	 fi
4817       done
4818fi
4819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4820    if test $ac_cv_c_bigendian = unknown; then
4821      # See if sys/param.h defines the BYTE_ORDER macro.
4822      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4823/* end confdefs.h.  */
4824#include <sys/types.h>
4825	     #include <sys/param.h>
4826
4827int
4828main ()
4829{
4830#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
4831		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
4832		     && LITTLE_ENDIAN)
4833	      bogus endian macros
4834	     #endif
4835
4836  ;
4837  return 0;
4838}
4839_ACEOF
4840if ac_fn_c_try_compile "$LINENO"; then :
4841  # It does; now see whether it defined to BIG_ENDIAN or not.
4842	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4843/* end confdefs.h.  */
4844#include <sys/types.h>
4845		#include <sys/param.h>
4846
4847int
4848main ()
4849{
4850#if BYTE_ORDER != BIG_ENDIAN
4851		 not big endian
4852		#endif
4853
4854  ;
4855  return 0;
4856}
4857_ACEOF
4858if ac_fn_c_try_compile "$LINENO"; then :
4859  ac_cv_c_bigendian=yes
4860else
4861  ac_cv_c_bigendian=no
4862fi
4863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4864fi
4865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4866    fi
4867    if test $ac_cv_c_bigendian = unknown; then
4868      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
4869      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4870/* end confdefs.h.  */
4871#include <limits.h>
4872
4873int
4874main ()
4875{
4876#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
4877	      bogus endian macros
4878	     #endif
4879
4880  ;
4881  return 0;
4882}
4883_ACEOF
4884if ac_fn_c_try_compile "$LINENO"; then :
4885  # It does; now see whether it defined to _BIG_ENDIAN or not.
4886	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4887/* end confdefs.h.  */
4888#include <limits.h>
4889
4890int
4891main ()
4892{
4893#ifndef _BIG_ENDIAN
4894		 not big endian
4895		#endif
4896
4897  ;
4898  return 0;
4899}
4900_ACEOF
4901if ac_fn_c_try_compile "$LINENO"; then :
4902  ac_cv_c_bigendian=yes
4903else
4904  ac_cv_c_bigendian=no
4905fi
4906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4907fi
4908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4909    fi
4910    if test $ac_cv_c_bigendian = unknown; then
4911      # Compile a test program.
4912      if test "$cross_compiling" = yes; then :
4913  # Try to guess by grepping values from an object file.
4914	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4915/* end confdefs.h.  */
4916short int ascii_mm[] =
4917		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4918		short int ascii_ii[] =
4919		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4920		int use_ascii (int i) {
4921		  return ascii_mm[i] + ascii_ii[i];
4922		}
4923		short int ebcdic_ii[] =
4924		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4925		short int ebcdic_mm[] =
4926		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4927		int use_ebcdic (int i) {
4928		  return ebcdic_mm[i] + ebcdic_ii[i];
4929		}
4930		extern int foo;
4931
4932int
4933main ()
4934{
4935return use_ascii (foo) == use_ebcdic (foo);
4936  ;
4937  return 0;
4938}
4939_ACEOF
4940if ac_fn_c_try_compile "$LINENO"; then :
4941  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4942	      ac_cv_c_bigendian=yes
4943	    fi
4944	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4945	      if test "$ac_cv_c_bigendian" = unknown; then
4946		ac_cv_c_bigendian=no
4947	      else
4948		# finding both strings is unlikely to happen, but who knows?
4949		ac_cv_c_bigendian=unknown
4950	      fi
4951	    fi
4952fi
4953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4954else
4955  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4956/* end confdefs.h.  */
4957$ac_includes_default
4958int
4959main ()
4960{
4961
4962	     /* Are we little or big endian?  From Harbison&Steele.  */
4963	     union
4964	     {
4965	       long int l;
4966	       char c[sizeof (long int)];
4967	     } u;
4968	     u.l = 1;
4969	     return u.c[sizeof (long int) - 1] == 1;
4970
4971  ;
4972  return 0;
4973}
4974_ACEOF
4975if ac_fn_c_try_run "$LINENO"; then :
4976  ac_cv_c_bigendian=no
4977else
4978  ac_cv_c_bigendian=yes
4979fi
4980rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4981  conftest.$ac_objext conftest.beam conftest.$ac_ext
4982fi
4983
4984    fi
4985fi
4986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
4987$as_echo "$ac_cv_c_bigendian" >&6; }
4988 case $ac_cv_c_bigendian in #(
4989   yes)
4990     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
4991;; #(
4992   no)
4993      ;; #(
4994   universal)
4995
4996$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
4997
4998     ;; #(
4999   *)
5000     as_fn_error $? "unknown endianness
5001 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
5002 esac
5003
5004
5005
5006#-----------------------------------------------------------------------
5007# Those two are needed for compiling expat.
5008#-----------------------------------------------------------------------
5009
5010for ac_func in memmove bcopy
5011do :
5012  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5013ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5014if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5015  cat >>confdefs.h <<_ACEOF
5016#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5017_ACEOF
5018
5019fi
5020done
5021
5022
5023#--------------------------------------------------------------------
5024# Add optional AOLserver includes
5025#--------------------------------------------------------------------
5026
5027
5028    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AOLserver configuration" >&5
5029$as_echo_n "checking for AOLserver configuration... " >&6; }
5030
5031# Check whether --with-aol was given.
5032if test "${with_aol+set}" = set; then :
5033  withval=$with_aol; with_aolserver=${withval}
5034fi
5035
5036
5037    if ${ac_cv_c_aolserver+:} false; then :
5038  $as_echo_n "(cached) " >&6
5039else
5040
5041    if test x"${with_aolserver}" != x ; then
5042        if test -f "${with_aolserver}/include/ns.h" ; then
5043            ac_cv_c_aolserver=`(cd ${with_aolserver}; pwd)`
5044        else
5045            as_fn_error $? "${with_aolserver} directory doesn't contain ns.h" "$LINENO" 5
5046        fi
5047    fi
5048
5049fi
5050
5051    if test x"${ac_cv_c_aolserver}" = x ; then
5052        { $as_echo "$as_me:${as_lineno-$LINENO}: result: none found" >&5
5053$as_echo "none found" >&6; }
5054    else
5055        AOL_DIR=${ac_cv_c_aolserver}
5056        AOL_INCLUDES="-I\"${AOL_DIR}/include\""
5057        if test "`uname -s`" = Darwin ; then
5058            aollibs=`ls ${AOL_DIR}/lib/libns* 2>/dev/null`
5059            if test x"$aollibs" != x ; then
5060                AOL_LIBS="-L\"${AOL_DIR}/lib\" -lnsd -lnsthread"
5061            fi
5062        fi
5063        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found AOLserver in $AOL_DIR" >&5
5064$as_echo "found AOLserver in $AOL_DIR" >&6; }
5065        $as_echo "#define NS_AOLSERVER 1" >>confdefs.h
5066
5067        $as_echo "#define USE_NORMAL_ALLOCATOR 1" >>confdefs.h
5068
5069    fi
5070
5071
5072#--------------------------------------------------------------------
5073# Add shared expat includes
5074#--------------------------------------------------------------------
5075
5076
5077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for expat" >&5
5078$as_echo_n "checking for expat... " >&6; }
5079
5080# Check whether --with-expat was given.
5081if test "${with_expat+set}" = set; then :
5082  withval=$with_expat;
5083else
5084  with_expat=no
5085fi
5086
5087
5088    if ${ac_cv_c_expat+:} false; then :
5089  $as_echo_n "(cached) " >&6
5090else
5091
5092        case $with_expat in
5093            no) ;;
5094            yes)
5095                for f in /usr/local /usr; do
5096                    if test -f "$f/include/bsdxml.h" ; then
5097                        ac_cv_c_expat=`(cd $f; pwd)`
5098                        break
5099                    fi
5100                done
5101                ;;
5102            *)
5103                if test -f "$with_expat/include/bsdxml.h"; then
5104                    ac_cv_c_expat=`(cd $with_expat; pwd)`
5105                else
5106                     as_fn_error $? "${with_expat} directory doesn't contain bsdxml.h" "$LINENO" 5
5107                fi
5108        esac
5109
5110fi
5111
5112    if test x"${ac_cv_c_expat}" = x ; then
5113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using bundled expat distribution" >&5
5114$as_echo "Using bundled expat distribution" >&6; }
5115
5116    vars="expat/xmlrole.c \
5117                         expat/xmltok.c \
5118                         expat/xmlparse.c \
5119                         expat/loadlibrary.c"
5120    for i in $vars; do
5121	case $i in
5122	    \$*)
5123		# allow $-var names
5124		PKG_SOURCES="$PKG_SOURCES $i"
5125		PKG_OBJECTS="$PKG_OBJECTS $i"
5126		;;
5127	    *)
5128		# check for existence - allows for generic/win/unix VPATH
5129		# To add more dirs here (like 'src'), you have to update VPATH
5130		# in Makefile.in as well
5131		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
5132		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
5133		    -a ! -f "${srcdir}/macosx/$i" \
5134		    ; then
5135		    as_fn_error $? "could not find source file '$i'" "$LINENO" 5
5136		fi
5137		PKG_SOURCES="$PKG_SOURCES $i"
5138		# this assumes it is in a VPATH dir
5139		i=`basename $i`
5140		# handle user calling this before or after TEA_SETUP_COMPILER
5141		if test x"${OBJEXT}" != x ; then
5142		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
5143		else
5144		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
5145		fi
5146		PKG_OBJECTS="$PKG_OBJECTS $j"
5147		;;
5148	esac
5149    done
5150
5151
5152
5153
5154    vars="-I${srcdir}/expat"
5155    for i in $vars; do
5156	PKG_INCLUDES="$PKG_INCLUDES $i"
5157    done
5158
5159
5160
5161$as_echo "#define XML_POOR_ENTROPY 1" >>confdefs.h
5162
5163    else
5164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using shared expat found in ${ac_cv_c_expat}" >&5
5165$as_echo "Using shared expat found in ${ac_cv_c_expat}" >&6; }
5166
5167    vars="-I${ac_cv_c_expat}/include"
5168    for i in $vars; do
5169	PKG_INCLUDES="$PKG_INCLUDES $i"
5170    done
5171
5172
5173
5174    vars="-lbsdxml"
5175    for i in $vars; do
5176	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5177	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5178	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
5179	fi
5180	PKG_LIBS="$PKG_LIBS $i"
5181    done
5182
5183
5184    fi
5185
5186
5187#--------------------------------------------------------------------
5188# Add HTML5 parsing support.
5189#--------------------------------------------------------------------
5190
5191
5192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable support for HTML5 parsing (using gumbo)" >&5
5193$as_echo_n "checking whether to enable support for HTML5 parsing (using gumbo)... " >&6; }
5194    # Check whether --enable-html5 was given.
5195if test "${enable_html5+set}" = set; then :
5196  enableval=$enable_html5; tcl_ok=$enableval
5197else
5198  tcl_ok=no
5199fi
5200
5201
5202    if test "${enable_html5+set}" = set; then
5203        enableval="$enable_html5"
5204        tcl_ok=$enableval
5205    else
5206        tcl_ok=no
5207    fi
5208    HTML5_LIBS=""
5209    HTML5_INCLUDES=""
5210    if test "$tcl_ok" = "yes" ; then
5211        # Check if pkg-config is available
5212        PKGCONFIG=no
5213        pkg-config --version > /dev/null 2>&1 && PKGCONFIG=yes
5214        if test "$PKGCONFIG" = no; then
5215            tcl_ok=no
5216	    as_fn_error $? "cannot find pkg-config needed for --enable-html5." "$LINENO" 5
5217        fi
5218    fi
5219    if test "$tcl_ok" = "yes" ; then
5220        HAVEGUMBO=`pkg-config --exists gumbo && echo "1"`
5221        if test "$HAVEGUMBO" = "1" ; then
5222            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5223$as_echo "yes" >&6; }
5224            $as_echo "#define TDOM_HAVE_GUMBO 1" >>confdefs.h
5225
5226            if test "${TEA_PLATFORM}" = "windows" ; then
5227                HTML5_LIBS="-Wl,-Bstatic `pkg-config --static --libs gumbo` -Wl,-Bdynamic"
5228            else
5229                HTML5_LIBS="`pkg-config --libs gumbo`"
5230            fi
5231            HTML5_INCLUDES="`pkg-config --cflags gumbo`"
5232        else
5233            as_fn_error $? "The required lib gumbo not found" "$LINENO" 5
5234        fi
5235    else
5236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5237$as_echo "no" >&6; }
5238    fi
5239
5240
5241#-----------------------------------------------------------------------
5242# __CHANGE__
5243# Specify the C source files to compile in TEA_ADD_SOURCES,
5244# public headers that need to be installed in TEA_ADD_HEADERS,
5245# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
5246# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
5247# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
5248# and PKG_TCL_SOURCES.
5249#-----------------------------------------------------------------------
5250
5251
5252    vars="generic/xmlsimple.c \
5253                 generic/dom.c       \
5254                 generic/domhtml.c   \
5255                 generic/domhtml5.c  \
5256                 generic/domjson.c   \
5257                 generic/domxpath.c  \
5258                 generic/domxslt.c   \
5259                 generic/domlock.c   \
5260                 generic/tcldom.c    \
5261                 generic/nodecmd.c   \
5262                 generic/tdominit.c  \
5263                 generic/tclexpat.c  \
5264                 generic/tclpull.c   \
5265                 generic/tdomStubInit.c"
5266    for i in $vars; do
5267	case $i in
5268	    \$*)
5269		# allow $-var names
5270		PKG_SOURCES="$PKG_SOURCES $i"
5271		PKG_OBJECTS="$PKG_OBJECTS $i"
5272		;;
5273	    *)
5274		# check for existence - allows for generic/win/unix VPATH
5275		# To add more dirs here (like 'src'), you have to update VPATH
5276		# in Makefile.in as well
5277		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
5278		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
5279		    -a ! -f "${srcdir}/macosx/$i" \
5280		    ; then
5281		    as_fn_error $? "could not find source file '$i'" "$LINENO" 5
5282		fi
5283		PKG_SOURCES="$PKG_SOURCES $i"
5284		# this assumes it is in a VPATH dir
5285		i=`basename $i`
5286		# handle user calling this before or after TEA_SETUP_COMPILER
5287		if test x"${OBJEXT}" != x ; then
5288		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
5289		else
5290		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
5291		fi
5292		PKG_OBJECTS="$PKG_OBJECTS $j"
5293		;;
5294	esac
5295    done
5296
5297
5298
5299
5300    vars="generic/tdom.h"
5301    for i in $vars; do
5302	# check for existence, be strict because it is installed
5303	if test ! -f "${srcdir}/$i" ; then
5304	    as_fn_error $? "could not find header file '${srcdir}/$i'" "$LINENO" 5
5305	fi
5306	PKG_HEADERS="$PKG_HEADERS $i"
5307    done
5308
5309
5310
5311    vars="-I${srcdir}/generic ${AOL_INCLUDES} ${HTML5_INCLUDES}"
5312    for i in $vars; do
5313	PKG_INCLUDES="$PKG_INCLUDES $i"
5314    done
5315
5316
5317
5318    vars="${AOL_LIBS} ${HTML5_LIBS}"
5319    for i in $vars; do
5320	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5321	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5322	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
5323	fi
5324	PKG_LIBS="$PKG_LIBS $i"
5325    done
5326
5327
5328
5329    PKG_CFLAGS="$PKG_CFLAGS "
5330
5331
5332
5333    vars="generic/tdomStubLib.c"
5334    for i in $vars; do
5335	# check for existence - allows for generic/win/unix VPATH
5336	if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
5337	    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
5338	    -a ! -f "${srcdir}/macosx/$i" \
5339	    ; then
5340	    as_fn_error $? "could not find stub source file '$i'" "$LINENO" 5
5341	fi
5342	PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
5343	# this assumes it is in a VPATH dir
5344	i=`basename $i`
5345	# handle user calling this before or after TEA_SETUP_COMPILER
5346	if test x"${OBJEXT}" != x ; then
5347	    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
5348	else
5349	    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
5350	fi
5351	PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
5352    done
5353
5354
5355
5356
5357    vars="lib/tdom.tcl"
5358    for i in $vars; do
5359	# check for existence, be strict because it is installed
5360	if test ! -f "${srcdir}/$i" ; then
5361	    as_fn_error $? "could not find tcl source file '${srcdir}/$i'" "$LINENO" 5
5362	fi
5363	PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
5364    done
5365
5366
5367
5368#--------------------------------------------------------------------
5369# __CHANGE__
5370#
5371# You can add more files to clean if your extension creates any extra
5372# files by extending CLEANFILES.
5373# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
5374# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
5375#
5376# A few miscellaneous platform-specific items:
5377# TEA_ADD_* any platform specific compiler/build info here.
5378#--------------------------------------------------------------------
5379
5380if test "${TEA_PLATFORM}" = "windows" ; then
5381    CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
5382    #TEA_ADD_SOURCES([win/winFile.c])
5383    #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
5384else
5385    CLEANFILES="pkgIndex.tcl tdom.tcl tcldomsh"
5386    #TEA_ADD_SOURCES([unix/unixFile.c])
5387    #TEA_ADD_LIBS([-lsuperfly])
5388fi
5389
5390
5391#--------------------------------------------------------------------
5392# __CHANGE__
5393# Choose which headers you need.  Extension authors should try very
5394# hard to only rely on the Tcl public header files.  Internal headers
5395# contain private data structures and are subject to change without
5396# notice.
5397# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
5398#--------------------------------------------------------------------
5399
5400
5401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl public headers" >&5
5402$as_echo_n "checking for Tcl public headers... " >&6; }
5403
5404
5405# Check whether --with-tclinclude was given.
5406if test "${with_tclinclude+set}" = set; then :
5407  withval=$with_tclinclude; with_tclinclude=${withval}
5408fi
5409
5410
5411    if ${ac_cv_c_tclh+:} false; then :
5412  $as_echo_n "(cached) " >&6
5413else
5414
5415	# Use the value from --with-tclinclude, if it was given
5416
5417	if test x"${with_tclinclude}" != x ; then
5418	    if test -f "${with_tclinclude}/tcl.h" ; then
5419		ac_cv_c_tclh=${with_tclinclude}
5420	    else
5421		as_fn_error $? "${with_tclinclude} directory does not contain tcl.h" "$LINENO" 5
5422	    fi
5423	else
5424	    list=""
5425	    if test "`uname -s`" = "Darwin"; then
5426		# If Tcl was built as a framework, attempt to use
5427		# the framework's Headers directory
5428		case ${TCL_DEFS} in
5429		    *TCL_FRAMEWORK*)
5430			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
5431			;;
5432		esac
5433	    fi
5434
5435	    # Look in the source dir only if Tcl is not installed,
5436	    # and in that situation, look there before installed locations.
5437	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
5438		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
5439	    fi
5440
5441	    # Check order: pkg --prefix location, Tcl's --prefix location,
5442	    # relative to directory of tclConfig.sh.
5443
5444	    eval "temp_includedir=${includedir}"
5445	    list="$list \
5446		`ls -d ${temp_includedir}        2>/dev/null` \
5447		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
5448		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
5449	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
5450		list="$list /usr/local/include /usr/include"
5451		if test x"${TCL_INCLUDE_SPEC}" != x ; then
5452		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
5453		    list="$list `ls -d ${d} 2>/dev/null`"
5454		fi
5455	    fi
5456	    for i in $list ; do
5457		if test -f "$i/tcl.h" ; then
5458		    ac_cv_c_tclh=$i
5459		    break
5460		fi
5461	    done
5462	fi
5463
5464fi
5465
5466
5467    # Print a message based on how we determined the include path
5468
5469    if test x"${ac_cv_c_tclh}" = x ; then
5470	as_fn_error $? "tcl.h not found.  Please specify its location with --with-tclinclude" "$LINENO" 5
5471    else
5472	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5
5473$as_echo "${ac_cv_c_tclh}" >&6; }
5474    fi
5475
5476    # Convert to a native path and substitute into the output files.
5477
5478    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
5479
5480    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
5481
5482
5483
5484#TEA_PRIVATE_TCL_HEADERS
5485
5486#TEA_PUBLIC_TK_HEADERS
5487#TEA_PRIVATE_TK_HEADERS
5488#TEA_PATH_X
5489
5490#--------------------------------------------------------------------
5491# Check whether --enable-threads or --disable-threads was given.
5492# This auto-enables if Tcl was compiled threaded.
5493#--------------------------------------------------------------------
5494
5495
5496    # Check whether --enable-threads was given.
5497if test "${enable_threads+set}" = set; then :
5498  enableval=$enable_threads; tcl_ok=$enableval
5499else
5500  tcl_ok=yes
5501fi
5502
5503
5504    if test "${enable_threads+set}" = set; then
5505	enableval="$enable_threads"
5506	tcl_ok=$enableval
5507    else
5508	tcl_ok=yes
5509    fi
5510
5511    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
5512	TCL_THREADS=1
5513
5514	if test "${TEA_PLATFORM}" != "windows" ; then
5515	    # We are always OK on Windows, so check what this platform wants:
5516
5517	    # USE_THREAD_ALLOC tells us to try the special thread-based
5518	    # allocator that significantly reduces lock contention
5519
5520$as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h
5521
5522
5523$as_echo "#define _REENTRANT 1" >>confdefs.h
5524
5525	    if test "`uname -s`" = "SunOS" ; then
5526
5527$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5528
5529	    fi
5530
5531$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
5532
5533	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5
5534$as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; }
5535if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then :
5536  $as_echo_n "(cached) " >&6
5537else
5538  ac_check_lib_save_LIBS=$LIBS
5539LIBS="-lpthread  $LIBS"
5540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5541/* end confdefs.h.  */
5542
5543/* Override any GCC internal prototype to avoid an error.
5544   Use char because int might match the return type of a GCC
5545   builtin and then its argument prototype would still apply.  */
5546#ifdef __cplusplus
5547extern "C"
5548#endif
5549char pthread_mutex_init ();
5550int
5551main ()
5552{
5553return pthread_mutex_init ();
5554  ;
5555  return 0;
5556}
5557_ACEOF
5558if ac_fn_c_try_link "$LINENO"; then :
5559  ac_cv_lib_pthread_pthread_mutex_init=yes
5560else
5561  ac_cv_lib_pthread_pthread_mutex_init=no
5562fi
5563rm -f core conftest.err conftest.$ac_objext \
5564    conftest$ac_exeext conftest.$ac_ext
5565LIBS=$ac_check_lib_save_LIBS
5566fi
5567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
5568$as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
5569if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then :
5570  tcl_ok=yes
5571else
5572  tcl_ok=no
5573fi
5574
5575	    if test "$tcl_ok" = "no"; then
5576		# Check a little harder for __pthread_mutex_init in the same
5577		# library, as some systems hide it there until pthread.h is
5578		# defined.  We could alternatively do an AC_TRY_COMPILE with
5579		# pthread.h, but that will work with libpthread really doesn't
5580		# exist, like AIX 4.2.  [Bug: 4359]
5581		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5
5582$as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; }
5583if ${ac_cv_lib_pthread___pthread_mutex_init+:} false; then :
5584  $as_echo_n "(cached) " >&6
5585else
5586  ac_check_lib_save_LIBS=$LIBS
5587LIBS="-lpthread  $LIBS"
5588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5589/* end confdefs.h.  */
5590
5591/* Override any GCC internal prototype to avoid an error.
5592   Use char because int might match the return type of a GCC
5593   builtin and then its argument prototype would still apply.  */
5594#ifdef __cplusplus
5595extern "C"
5596#endif
5597char __pthread_mutex_init ();
5598int
5599main ()
5600{
5601return __pthread_mutex_init ();
5602  ;
5603  return 0;
5604}
5605_ACEOF
5606if ac_fn_c_try_link "$LINENO"; then :
5607  ac_cv_lib_pthread___pthread_mutex_init=yes
5608else
5609  ac_cv_lib_pthread___pthread_mutex_init=no
5610fi
5611rm -f core conftest.err conftest.$ac_objext \
5612    conftest$ac_exeext conftest.$ac_ext
5613LIBS=$ac_check_lib_save_LIBS
5614fi
5615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
5616$as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
5617if test "x$ac_cv_lib_pthread___pthread_mutex_init" = xyes; then :
5618  tcl_ok=yes
5619else
5620  tcl_ok=no
5621fi
5622
5623	    fi
5624
5625	    if test "$tcl_ok" = "yes"; then
5626		# The space is needed
5627		THREADS_LIBS=" -lpthread"
5628	    else
5629		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5
5630$as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; }
5631if ${ac_cv_lib_pthreads_pthread_mutex_init+:} false; then :
5632  $as_echo_n "(cached) " >&6
5633else
5634  ac_check_lib_save_LIBS=$LIBS
5635LIBS="-lpthreads  $LIBS"
5636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5637/* end confdefs.h.  */
5638
5639/* Override any GCC internal prototype to avoid an error.
5640   Use char because int might match the return type of a GCC
5641   builtin and then its argument prototype would still apply.  */
5642#ifdef __cplusplus
5643extern "C"
5644#endif
5645char pthread_mutex_init ();
5646int
5647main ()
5648{
5649return pthread_mutex_init ();
5650  ;
5651  return 0;
5652}
5653_ACEOF
5654if ac_fn_c_try_link "$LINENO"; then :
5655  ac_cv_lib_pthreads_pthread_mutex_init=yes
5656else
5657  ac_cv_lib_pthreads_pthread_mutex_init=no
5658fi
5659rm -f core conftest.err conftest.$ac_objext \
5660    conftest$ac_exeext conftest.$ac_ext
5661LIBS=$ac_check_lib_save_LIBS
5662fi
5663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
5664$as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
5665if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = xyes; then :
5666  tcl_ok=yes
5667else
5668  tcl_ok=no
5669fi
5670
5671		if test "$tcl_ok" = "yes"; then
5672		    # The space is needed
5673		    THREADS_LIBS=" -lpthreads"
5674		else
5675		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5
5676$as_echo_n "checking for pthread_mutex_init in -lc... " >&6; }
5677if ${ac_cv_lib_c_pthread_mutex_init+:} false; then :
5678  $as_echo_n "(cached) " >&6
5679else
5680  ac_check_lib_save_LIBS=$LIBS
5681LIBS="-lc  $LIBS"
5682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5683/* end confdefs.h.  */
5684
5685/* Override any GCC internal prototype to avoid an error.
5686   Use char because int might match the return type of a GCC
5687   builtin and then its argument prototype would still apply.  */
5688#ifdef __cplusplus
5689extern "C"
5690#endif
5691char pthread_mutex_init ();
5692int
5693main ()
5694{
5695return pthread_mutex_init ();
5696  ;
5697  return 0;
5698}
5699_ACEOF
5700if ac_fn_c_try_link "$LINENO"; then :
5701  ac_cv_lib_c_pthread_mutex_init=yes
5702else
5703  ac_cv_lib_c_pthread_mutex_init=no
5704fi
5705rm -f core conftest.err conftest.$ac_objext \
5706    conftest$ac_exeext conftest.$ac_ext
5707LIBS=$ac_check_lib_save_LIBS
5708fi
5709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5
5710$as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; }
5711if test "x$ac_cv_lib_c_pthread_mutex_init" = xyes; then :
5712  tcl_ok=yes
5713else
5714  tcl_ok=no
5715fi
5716
5717		    if test "$tcl_ok" = "no"; then
5718			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5
5719$as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; }
5720if ${ac_cv_lib_c_r_pthread_mutex_init+:} false; then :
5721  $as_echo_n "(cached) " >&6
5722else
5723  ac_check_lib_save_LIBS=$LIBS
5724LIBS="-lc_r  $LIBS"
5725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5726/* end confdefs.h.  */
5727
5728/* Override any GCC internal prototype to avoid an error.
5729   Use char because int might match the return type of a GCC
5730   builtin and then its argument prototype would still apply.  */
5731#ifdef __cplusplus
5732extern "C"
5733#endif
5734char pthread_mutex_init ();
5735int
5736main ()
5737{
5738return pthread_mutex_init ();
5739  ;
5740  return 0;
5741}
5742_ACEOF
5743if ac_fn_c_try_link "$LINENO"; then :
5744  ac_cv_lib_c_r_pthread_mutex_init=yes
5745else
5746  ac_cv_lib_c_r_pthread_mutex_init=no
5747fi
5748rm -f core conftest.err conftest.$ac_objext \
5749    conftest$ac_exeext conftest.$ac_ext
5750LIBS=$ac_check_lib_save_LIBS
5751fi
5752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
5753$as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
5754if test "x$ac_cv_lib_c_r_pthread_mutex_init" = xyes; then :
5755  tcl_ok=yes
5756else
5757  tcl_ok=no
5758fi
5759
5760			if test "$tcl_ok" = "yes"; then
5761			    # The space is needed
5762			    THREADS_LIBS=" -pthread"
5763			else
5764			    TCL_THREADS=0
5765			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
5766$as_echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
5767			fi
5768		    fi
5769		fi
5770	    fi
5771	fi
5772    else
5773	TCL_THREADS=0
5774    fi
5775    # Do checking message here to not mess up interleaved configure output
5776    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5
5777$as_echo_n "checking for building with threads... " >&6; }
5778    if test "${TCL_THREADS}" = 1; then
5779
5780$as_echo "#define TCL_THREADS 1" >>confdefs.h
5781
5782	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
5783$as_echo "yes (default)" >&6; }
5784    else
5785	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5786$as_echo "no" >&6; }
5787    fi
5788    # TCL_THREADS sanity checking.  See if our request for building with
5789    # threads is the same as the way Tcl was built.  If not, warn the user.
5790    case ${TCL_DEFS} in
5791	*THREADS=1*)
5792	    if test "${TCL_THREADS}" = "0"; then
5793		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
5794    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
5795    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
5796$as_echo "$as_me: WARNING:
5797    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
5798    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
5799	    fi
5800	    ;;
5801	*)
5802	    if test "${TCL_THREADS}" = "1"; then
5803		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
5804    --enable-threads requested, but building against a Tcl that is NOT
5805    thread-enabled.  This is an OK configuration that will also run in
5806    a thread-enabled core." >&5
5807$as_echo "$as_me: WARNING:
5808    --enable-threads requested, but building against a Tcl that is NOT
5809    thread-enabled.  This is an OK configuration that will also run in
5810    a thread-enabled core." >&2;}
5811	    fi
5812	    ;;
5813    esac
5814
5815
5816
5817#--------------------------------------------------------------------
5818# The statement below defines a collection of symbols related to
5819# building as a shared library instead of a static library.
5820#--------------------------------------------------------------------
5821
5822
5823    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
5824$as_echo_n "checking how to build libraries... " >&6; }
5825    # Check whether --enable-shared was given.
5826if test "${enable_shared+set}" = set; then :
5827  enableval=$enable_shared; shared_ok=$enableval
5828else
5829  shared_ok=yes
5830fi
5831
5832
5833    if test "${enable_shared+set}" = set; then
5834	enableval="$enable_shared"
5835	shared_ok=$enableval
5836    else
5837	shared_ok=yes
5838    fi
5839
5840    # Check whether --enable-stubs was given.
5841if test "${enable_stubs+set}" = set; then :
5842  enableval=$enable_stubs; stubs_ok=$enableval
5843else
5844  stubs_ok=yes
5845fi
5846
5847
5848    if test "${enable_stubs+set}" = set; then
5849	enableval="$enable_stubs"
5850	stubs_ok=$enableval
5851    else
5852	stubs_ok=yes
5853    fi
5854
5855    # Stubs are always enabled for shared builds
5856    if test "$shared_ok" = "yes" ; then
5857	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
5858$as_echo "shared" >&6; }
5859	SHARED_BUILD=1
5860        STUBS_BUILD=1
5861    else
5862	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
5863$as_echo "static" >&6; }
5864	SHARED_BUILD=0
5865
5866$as_echo "#define STATIC_BUILD 1" >>confdefs.h
5867
5868        if test "$stubs_ok" = "yes" ; then
5869          STUBS_BUILD=1
5870        else
5871          STUBS_BUILD=0
5872        fi
5873    fi
5874    if test "${STUBS_BUILD}" = "1" ; then
5875
5876$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h
5877
5878
5879$as_echo "#define USE_TCLOO_STUBS 1" >>confdefs.h
5880
5881      if test "${TEA_WINDOWINGSYSTEM}" != ""; then
5882
5883$as_echo "#define USE_TK_STUBS 1" >>confdefs.h
5884
5885      fi
5886    fi
5887
5888
5889
5890
5891
5892#--------------------------------------------------------------------
5893# This macro figures out what flags to use with the compiler/linker
5894# when building shared/static debug/optimized objects.  This information
5895# can be taken from the tclConfig.sh file, but this figures it all out.
5896#--------------------------------------------------------------------
5897
5898if test -n "$ac_tool_prefix"; then
5899  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5900set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5902$as_echo_n "checking for $ac_word... " >&6; }
5903if ${ac_cv_prog_RANLIB+:} false; then :
5904  $as_echo_n "(cached) " >&6
5905else
5906  if test -n "$RANLIB"; then
5907  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5908else
5909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5910for as_dir in $PATH
5911do
5912  IFS=$as_save_IFS
5913  test -z "$as_dir" && as_dir=.
5914    for ac_exec_ext in '' $ac_executable_extensions; do
5915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5916    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5918    break 2
5919  fi
5920done
5921  done
5922IFS=$as_save_IFS
5923
5924fi
5925fi
5926RANLIB=$ac_cv_prog_RANLIB
5927if test -n "$RANLIB"; then
5928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5929$as_echo "$RANLIB" >&6; }
5930else
5931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932$as_echo "no" >&6; }
5933fi
5934
5935
5936fi
5937if test -z "$ac_cv_prog_RANLIB"; then
5938  ac_ct_RANLIB=$RANLIB
5939  # Extract the first word of "ranlib", so it can be a program name with args.
5940set dummy ranlib; ac_word=$2
5941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5942$as_echo_n "checking for $ac_word... " >&6; }
5943if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5944  $as_echo_n "(cached) " >&6
5945else
5946  if test -n "$ac_ct_RANLIB"; then
5947  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5948else
5949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5950for as_dir in $PATH
5951do
5952  IFS=$as_save_IFS
5953  test -z "$as_dir" && as_dir=.
5954    for ac_exec_ext in '' $ac_executable_extensions; do
5955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5956    ac_cv_prog_ac_ct_RANLIB="ranlib"
5957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5958    break 2
5959  fi
5960done
5961  done
5962IFS=$as_save_IFS
5963
5964fi
5965fi
5966ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5967if test -n "$ac_ct_RANLIB"; then
5968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5969$as_echo "$ac_ct_RANLIB" >&6; }
5970else
5971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5972$as_echo "no" >&6; }
5973fi
5974
5975  if test "x$ac_ct_RANLIB" = x; then
5976    RANLIB=":"
5977  else
5978    case $cross_compiling:$ac_tool_warned in
5979yes:)
5980{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5981$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5982ac_tool_warned=yes ;;
5983esac
5984    RANLIB=$ac_ct_RANLIB
5985  fi
5986else
5987  RANLIB="$ac_cv_prog_RANLIB"
5988fi
5989
5990
5991
5992
5993    # Step 0.a: Enable 64 bit support?
5994
5995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5
5996$as_echo_n "checking if 64bit support is requested... " >&6; }
5997    # Check whether --enable-64bit was given.
5998if test "${enable_64bit+set}" = set; then :
5999  enableval=$enable_64bit; do64bit=$enableval
6000else
6001  do64bit=no
6002fi
6003
6004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5
6005$as_echo "$do64bit" >&6; }
6006
6007    # Step 0.b: Enable Solaris 64 bit VIS support?
6008
6009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5
6010$as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; }
6011    # Check whether --enable-64bit-vis was given.
6012if test "${enable_64bit_vis+set}" = set; then :
6013  enableval=$enable_64bit_vis; do64bitVIS=$enableval
6014else
6015  do64bitVIS=no
6016fi
6017
6018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5
6019$as_echo "$do64bitVIS" >&6; }
6020    # Force 64bit on with VIS
6021    if test "$do64bitVIS" = "yes"; then :
6022  do64bit=yes
6023fi
6024
6025    # Step 0.c: Check if visibility support is available. Do this here so
6026    # that platform specific alternatives can be used below if this fails.
6027
6028    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5
6029$as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; }
6030if ${tcl_cv_cc_visibility_hidden+:} false; then :
6031  $as_echo_n "(cached) " >&6
6032else
6033
6034	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
6035	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6036/* end confdefs.h.  */
6037
6038	    extern __attribute__((__visibility__("hidden"))) void f(void);
6039	    void f(void) {}
6040int
6041main ()
6042{
6043f();
6044  ;
6045  return 0;
6046}
6047_ACEOF
6048if ac_fn_c_try_link "$LINENO"; then :
6049  tcl_cv_cc_visibility_hidden=yes
6050else
6051  tcl_cv_cc_visibility_hidden=no
6052fi
6053rm -f core conftest.err conftest.$ac_objext \
6054    conftest$ac_exeext conftest.$ac_ext
6055	CFLAGS=$hold_cflags
6056fi
6057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5
6058$as_echo "$tcl_cv_cc_visibility_hidden" >&6; }
6059    if test $tcl_cv_cc_visibility_hidden = yes; then :
6060
6061
6062$as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h
6063
6064
6065$as_echo "#define HAVE_HIDDEN 1" >>confdefs.h
6066
6067
6068fi
6069
6070    # Step 0.d: Disable -rpath support?
6071
6072    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5
6073$as_echo_n "checking if rpath support is requested... " >&6; }
6074    # Check whether --enable-rpath was given.
6075if test "${enable_rpath+set}" = set; then :
6076  enableval=$enable_rpath; doRpath=$enableval
6077else
6078  doRpath=yes
6079fi
6080
6081    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5
6082$as_echo "$doRpath" >&6; }
6083
6084    # TEA specific: Cross-compiling options for Windows/CE builds?
6085
6086    if test "${TEA_PLATFORM}" = windows; then :
6087
6088	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Windows/CE build is requested" >&5
6089$as_echo_n "checking if Windows/CE build is requested... " >&6; }
6090	# Check whether --enable-wince was given.
6091if test "${enable_wince+set}" = set; then :
6092  enableval=$enable_wince; doWince=$enableval
6093else
6094  doWince=no
6095fi
6096
6097	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $doWince" >&5
6098$as_echo "$doWince" >&6; }
6099
6100fi
6101
6102    # Set the variable "system" to hold the name and version number
6103    # for the system.
6104
6105
6106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
6107$as_echo_n "checking system version... " >&6; }
6108if ${tcl_cv_sys_version+:} false; then :
6109  $as_echo_n "(cached) " >&6
6110else
6111
6112	# TEA specific:
6113	if test "${TEA_PLATFORM}" = "windows" ; then
6114	    tcl_cv_sys_version=windows
6115	else
6116	    tcl_cv_sys_version=`uname -s`-`uname -r`
6117	    if test "$?" -ne 0 ; then
6118		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
6119$as_echo "$as_me: WARNING: can't find uname command" >&2;}
6120		tcl_cv_sys_version=unknown
6121	    else
6122		if test "`uname -s`" = "AIX" ; then
6123		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
6124		fi
6125	    fi
6126	fi
6127
6128fi
6129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
6130$as_echo "$tcl_cv_sys_version" >&6; }
6131    system=$tcl_cv_sys_version
6132
6133
6134    # Require ranlib early so we can override it in special cases below.
6135
6136
6137
6138    # Set configuration options based on system name and version.
6139    # This is similar to Tcl's unix/tcl.m4 except that we've added a
6140    # "windows" case and removed some core-only vars.
6141
6142    do64bit_ok=no
6143    # default to '{$LIBS}' and set to "" on per-platform necessary basis
6144    SHLIB_LD_LIBS='${LIBS}'
6145    # When ld needs options to work in 64-bit mode, put them in
6146    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
6147    # is disabled by the user. [Bug 1016796]
6148    LDFLAGS_ARCH=""
6149    UNSHARED_LIB_SUFFIX=""
6150    # TEA specific: use PACKAGE_VERSION instead of VERSION
6151    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
6152    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
6153    TCL_LIB_VERSIONS_OK=ok
6154    CFLAGS_DEBUG=-g
6155    if test "$GCC" = yes; then :
6156
6157	CFLAGS_OPTIMIZE=-O2
6158	CFLAGS_WARNING="-Wall"
6159
6160else
6161
6162	CFLAGS_OPTIMIZE=-O
6163	CFLAGS_WARNING=""
6164
6165fi
6166    if test -n "$ac_tool_prefix"; then
6167  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6168set dummy ${ac_tool_prefix}ar; ac_word=$2
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6170$as_echo_n "checking for $ac_word... " >&6; }
6171if ${ac_cv_prog_AR+:} false; then :
6172  $as_echo_n "(cached) " >&6
6173else
6174  if test -n "$AR"; then
6175  ac_cv_prog_AR="$AR" # Let the user override the test.
6176else
6177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6178for as_dir in $PATH
6179do
6180  IFS=$as_save_IFS
6181  test -z "$as_dir" && as_dir=.
6182    for ac_exec_ext in '' $ac_executable_extensions; do
6183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6184    ac_cv_prog_AR="${ac_tool_prefix}ar"
6185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6186    break 2
6187  fi
6188done
6189  done
6190IFS=$as_save_IFS
6191
6192fi
6193fi
6194AR=$ac_cv_prog_AR
6195if test -n "$AR"; then
6196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6197$as_echo "$AR" >&6; }
6198else
6199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6200$as_echo "no" >&6; }
6201fi
6202
6203
6204fi
6205if test -z "$ac_cv_prog_AR"; then
6206  ac_ct_AR=$AR
6207  # Extract the first word of "ar", so it can be a program name with args.
6208set dummy ar; ac_word=$2
6209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6210$as_echo_n "checking for $ac_word... " >&6; }
6211if ${ac_cv_prog_ac_ct_AR+:} false; then :
6212  $as_echo_n "(cached) " >&6
6213else
6214  if test -n "$ac_ct_AR"; then
6215  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6216else
6217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6218for as_dir in $PATH
6219do
6220  IFS=$as_save_IFS
6221  test -z "$as_dir" && as_dir=.
6222    for ac_exec_ext in '' $ac_executable_extensions; do
6223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6224    ac_cv_prog_ac_ct_AR="ar"
6225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6226    break 2
6227  fi
6228done
6229  done
6230IFS=$as_save_IFS
6231
6232fi
6233fi
6234ac_ct_AR=$ac_cv_prog_ac_ct_AR
6235if test -n "$ac_ct_AR"; then
6236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6237$as_echo "$ac_ct_AR" >&6; }
6238else
6239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6240$as_echo "no" >&6; }
6241fi
6242
6243  if test "x$ac_ct_AR" = x; then
6244    AR=""
6245  else
6246    case $cross_compiling:$ac_tool_warned in
6247yes:)
6248{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6249$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6250ac_tool_warned=yes ;;
6251esac
6252    AR=$ac_ct_AR
6253  fi
6254else
6255  AR="$ac_cv_prog_AR"
6256fi
6257
6258    STLIB_LD='${AR} cr'
6259    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
6260    if test "x$SHLIB_VERSION" = x; then :
6261  SHLIB_VERSION=""
6262else
6263  SHLIB_VERSION=".$SHLIB_VERSION"
6264fi
6265    case $system in
6266	# TEA specific:
6267	windows)
6268	    # This is a 2-stage check to make sure we have the 64-bit SDK
6269	    # We have to know where the SDK is installed.
6270	    # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
6271	    # MACHINE is IX86 for LINK, but this is used by the manifest,
6272	    # which requires x86|amd64|ia64.
6273	    MACHINE="X86"
6274	    if test "$do64bit" != "no" ; then
6275		if test "x${MSSDK}x" = "xx" ; then
6276		    MSSDK="C:/Progra~1/Microsoft Platform SDK"
6277		fi
6278		MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
6279		PATH64=""
6280		case "$do64bit" in
6281		    amd64|x64|yes)
6282			MACHINE="AMD64" ; # default to AMD64 64-bit build
6283			PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
6284			;;
6285		    ia64)
6286			MACHINE="IA64"
6287			PATH64="${MSSDK}/Bin/Win64"
6288			;;
6289		esac
6290		if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
6291		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
6292$as_echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
6293		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ensure latest Platform SDK is installed" >&5
6294$as_echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
6295		    do64bit="no"
6296		else
6297		    { $as_echo "$as_me:${as_lineno-$LINENO}: result:    Using 64-bit $MACHINE mode" >&5
6298$as_echo "   Using 64-bit $MACHINE mode" >&6; }
6299		    do64bit_ok="yes"
6300		fi
6301	    fi
6302
6303	    if test "$doWince" != "no" ; then
6304		if test "$do64bit" != "no" ; then
6305		    as_fn_error $? "Windows/CE and 64-bit builds incompatible" "$LINENO" 5
6306		fi
6307		if test "$GCC" = "yes" ; then
6308		    as_fn_error $? "Windows/CE and GCC builds incompatible" "$LINENO" 5
6309		fi
6310
6311    # First, look for one uninstalled.
6312    # the alternative search directory is invoked by --with-celib
6313
6314    if test x"${no_celib}" = x ; then
6315	# we reset no_celib in case something fails here
6316	no_celib=true
6317
6318# Check whether --with-celib was given.
6319if test "${with_celib+set}" = set; then :
6320  withval=$with_celib; with_celibconfig=${withval}
6321fi
6322
6323	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows/CE celib directory" >&5
6324$as_echo_n "checking for Windows/CE celib directory... " >&6; }
6325	if ${ac_cv_c_celibconfig+:} false; then :
6326  $as_echo_n "(cached) " >&6
6327else
6328
6329	    # First check to see if --with-celibconfig was specified.
6330	    if test x"${with_celibconfig}" != x ; then
6331		if test -d "${with_celibconfig}/inc" ; then
6332		    ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
6333		else
6334		    as_fn_error $? "${with_celibconfig} directory doesn't contain inc directory" "$LINENO" 5
6335		fi
6336	    fi
6337
6338	    # then check for a celib library
6339	    if test x"${ac_cv_c_celibconfig}" = x ; then
6340		for i in \
6341			../celib-palm-3.0 \
6342			../celib \
6343			../../celib-palm-3.0 \
6344			../../celib \
6345			`ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
6346			${srcdir}/../celib-palm-3.0 \
6347			${srcdir}/../celib \
6348			`ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
6349			; do
6350		    if test -d "$i/inc" ; then
6351			ac_cv_c_celibconfig=`(cd $i; pwd)`
6352			break
6353		    fi
6354		done
6355	    fi
6356
6357fi
6358
6359	if test x"${ac_cv_c_celibconfig}" = x ; then
6360	    as_fn_error $? "Cannot find celib support library directory" "$LINENO" 5
6361	else
6362	    no_celib=
6363	    CELIB_DIR=${ac_cv_c_celibconfig}
6364	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
6365	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $CELIB_DIR" >&5
6366$as_echo "found $CELIB_DIR" >&6; }
6367	fi
6368    fi
6369
6370		# Set defaults for common evc4/PPC2003 setup
6371		# Currently Tcl requires 300+, possibly 420+ for sockets
6372		CEVERSION=420; 		# could be 211 300 301 400 420 ...
6373		TARGETCPU=ARMV4;	# could be ARMV4 ARM MIPS SH3 X86 ...
6374		ARCH=ARM;		# could be ARM MIPS X86EM ...
6375		PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
6376		if test "$doWince" != "yes"; then
6377		    # If !yes then the user specified something
6378		    # Reset ARCH to allow user to skip specifying it
6379		    ARCH=
6380		    eval `echo $doWince | awk -F, '{ \
6381	    if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
6382	    if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
6383	    if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
6384	    if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
6385	    if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
6386		    }'`
6387		    if test "x${ARCH}" = "x" ; then
6388			ARCH=$TARGETCPU;
6389		    fi
6390		fi
6391		OSVERSION=WCE$CEVERSION;
6392	    	if test "x${WCEROOT}" = "x" ; then
6393			WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
6394		    if test ! -d "${WCEROOT}" ; then
6395			WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
6396		    fi
6397		fi
6398		if test "x${SDKROOT}" = "x" ; then
6399		    SDKROOT="C:/Program Files/Windows CE Tools"
6400		    if test ! -d "${SDKROOT}" ; then
6401			SDKROOT="C:/Windows CE Tools"
6402		    fi
6403		fi
6404		WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
6405		SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
6406		if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
6407		    -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
6408		    as_fn_error $? "could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" "$LINENO" 5
6409		    doWince="no"
6410		else
6411		    # We could PATH_NOSPACE these, but that's not important,
6412		    # as long as we quote them when used.
6413		    CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
6414		    if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
6415			CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
6416		    fi
6417		    CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
6418    		fi
6419	    fi
6420
6421	    if test "$GCC" != "yes" ; then
6422	        if test "${SHARED_BUILD}" = "0" ; then
6423		    runtime=-MT
6424	        else
6425		    runtime=-MD
6426	        fi
6427	        case "x`echo \${VisualStudioVersion}`" in
6428	            x1[4-9]*)
6429		        lflags="${lflags} -nodefaultlib:libucrt.lib"
6430
6431    vars="ucrt.lib"
6432    for i in $vars; do
6433	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6434	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6435	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
6436	fi
6437	PKG_LIBS="$PKG_LIBS $i"
6438    done
6439
6440
6441	            ;;
6442	            *)
6443	            ;;
6444	        esac
6445
6446                if test "$do64bit" != "no" ; then
6447		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
6448		    CC="\"${PATH64}/cl.exe\""
6449		    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
6450		    RC="\"${MSSDK}/bin/rc.exe\""
6451		    lflags="${lflags} -nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
6452		    LINKBIN="\"${PATH64}/link.exe\""
6453		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
6454		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
6455		    # Avoid 'unresolved external symbol __security_cookie'
6456		    # errors, c.f. http://support.microsoft.com/?id=894573
6457
6458    vars="bufferoverflowU.lib"
6459    for i in $vars; do
6460	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6461	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6462	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
6463	fi
6464	PKG_LIBS="$PKG_LIBS $i"
6465    done
6466
6467
6468		elif test "$doWince" != "no" ; then
6469		    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
6470		    if test "${TARGETCPU}" = "X86"; then
6471			CC="\"${CEBINROOT}/cl.exe\""
6472		    else
6473			CC="\"${CEBINROOT}/cl${ARCH}.exe\""
6474		    fi
6475		    CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
6476		    RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
6477		    arch=`echo ${ARCH} | awk '{print tolower($0)}'`
6478		    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
6479		    if test "${SHARED_BUILD}" = "1" ; then
6480			# Static CE builds require static celib as well
6481		    	defs="${defs} _DLL"
6482		    fi
6483		    for i in $defs ; do
6484
6485cat >>confdefs.h <<_ACEOF
6486#define $i 1
6487_ACEOF
6488
6489		    done
6490
6491cat >>confdefs.h <<_ACEOF
6492#define _WIN32_WCE $CEVERSION
6493_ACEOF
6494
6495
6496cat >>confdefs.h <<_ACEOF
6497#define UNDER_CE $CEVERSION
6498_ACEOF
6499
6500		    CFLAGS_DEBUG="-nologo -Zi -Od"
6501		    CFLAGS_OPTIMIZE="-nologo -Ox"
6502		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
6503		    lflags="${lflags} -MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
6504		    LINKBIN="\"${CEBINROOT}/link.exe\""
6505
6506		else
6507		    RC="rc"
6508		    lflags="${lflags} -nologo"
6509		    LINKBIN="link"
6510		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
6511		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
6512		fi
6513	    fi
6514
6515	    if test "$GCC" = "yes"; then
6516		# mingw gcc mode
6517		if test -n "$ac_tool_prefix"; then
6518  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6519set dummy ${ac_tool_prefix}windres; ac_word=$2
6520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6521$as_echo_n "checking for $ac_word... " >&6; }
6522if ${ac_cv_prog_RC+:} false; then :
6523  $as_echo_n "(cached) " >&6
6524else
6525  if test -n "$RC"; then
6526  ac_cv_prog_RC="$RC" # Let the user override the test.
6527else
6528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6529for as_dir in $PATH
6530do
6531  IFS=$as_save_IFS
6532  test -z "$as_dir" && as_dir=.
6533    for ac_exec_ext in '' $ac_executable_extensions; do
6534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6535    ac_cv_prog_RC="${ac_tool_prefix}windres"
6536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6537    break 2
6538  fi
6539done
6540  done
6541IFS=$as_save_IFS
6542
6543fi
6544fi
6545RC=$ac_cv_prog_RC
6546if test -n "$RC"; then
6547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
6548$as_echo "$RC" >&6; }
6549else
6550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6551$as_echo "no" >&6; }
6552fi
6553
6554
6555fi
6556if test -z "$ac_cv_prog_RC"; then
6557  ac_ct_RC=$RC
6558  # Extract the first word of "windres", so it can be a program name with args.
6559set dummy windres; ac_word=$2
6560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6561$as_echo_n "checking for $ac_word... " >&6; }
6562if ${ac_cv_prog_ac_ct_RC+:} false; then :
6563  $as_echo_n "(cached) " >&6
6564else
6565  if test -n "$ac_ct_RC"; then
6566  ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test.
6567else
6568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6569for as_dir in $PATH
6570do
6571  IFS=$as_save_IFS
6572  test -z "$as_dir" && as_dir=.
6573    for ac_exec_ext in '' $ac_executable_extensions; do
6574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6575    ac_cv_prog_ac_ct_RC="windres"
6576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6577    break 2
6578  fi
6579done
6580  done
6581IFS=$as_save_IFS
6582
6583fi
6584fi
6585ac_ct_RC=$ac_cv_prog_ac_ct_RC
6586if test -n "$ac_ct_RC"; then
6587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
6588$as_echo "$ac_ct_RC" >&6; }
6589else
6590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6591$as_echo "no" >&6; }
6592fi
6593
6594  if test "x$ac_ct_RC" = x; then
6595    RC=""
6596  else
6597    case $cross_compiling:$ac_tool_warned in
6598yes:)
6599{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6600$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6601ac_tool_warned=yes ;;
6602esac
6603    RC=$ac_ct_RC
6604  fi
6605else
6606  RC="$ac_cv_prog_RC"
6607fi
6608
6609		CFLAGS_DEBUG="-g"
6610		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
6611		SHLIB_LD='${CC} -shared'
6612		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
6613		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
6614		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
6615
6616		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cross-compile version of gcc" >&5
6617$as_echo_n "checking for cross-compile version of gcc... " >&6; }
6618if ${ac_cv_cross+:} false; then :
6619  $as_echo_n "(cached) " >&6
6620else
6621  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6622/* end confdefs.h.  */
6623
6624			    #ifdef _WIN32
6625				#error cross-compiler
6626			    #endif
6627
6628int
6629main ()
6630{
6631
6632  ;
6633  return 0;
6634}
6635_ACEOF
6636if ac_fn_c_try_compile "$LINENO"; then :
6637  ac_cv_cross=yes
6638else
6639  ac_cv_cross=no
6640fi
6641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6642
6643fi
6644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cross" >&5
6645$as_echo "$ac_cv_cross" >&6; }
6646		      if test "$ac_cv_cross" = "yes"; then
6647			case "$do64bit" in
6648			    amd64|x64|yes)
6649				CC="x86_64-w64-mingw32-gcc"
6650				LD="x86_64-w64-mingw32-ld"
6651				AR="x86_64-w64-mingw32-ar"
6652				RANLIB="x86_64-w64-mingw32-ranlib"
6653				RC="x86_64-w64-mingw32-windres"
6654			    ;;
6655			    *)
6656				CC="i686-w64-mingw32-gcc"
6657				LD="i686-w64-mingw32-ld"
6658				AR="i686-w64-mingw32-ar"
6659				RANLIB="i686-w64-mingw32-ranlib"
6660				RC="i686-w64-mingw32-windres"
6661			    ;;
6662			esac
6663		fi
6664
6665	    else
6666		SHLIB_LD="${LINKBIN} -dll ${lflags}"
6667		# link -lib only works when -lib is the first arg
6668		STLIB_LD="${LINKBIN} -lib ${lflags}"
6669		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
6670		PATHTYPE=-w
6671		# For information on what debugtype is most useful, see:
6672		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
6673		# and also
6674		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
6675		# This essentially turns it all on.
6676		LDFLAGS_DEBUG="-debug -debugtype:cv"
6677		LDFLAGS_OPTIMIZE="-release"
6678		if test "$doWince" != "no" ; then
6679		    LDFLAGS_CONSOLE="-link ${lflags}"
6680		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
6681		else
6682		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
6683		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
6684		fi
6685	    fi
6686
6687	    SHLIB_SUFFIX=".dll"
6688	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
6689
6690	    TCL_LIB_VERSIONS_OK=nodots
6691    	    ;;
6692	AIX-*)
6693	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then :
6694
6695		# AIX requires the _r compiler when gcc isn't being used
6696		case "${CC}" in
6697		    *_r|*_r\ *)
6698			# ok ...
6699			;;
6700		    *)
6701			# Make sure only first arg gets _r
6702		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
6703			;;
6704		esac
6705		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5
6706$as_echo "Using $CC for compiling with threads" >&6; }
6707
6708fi
6709	    LIBS="$LIBS -lc"
6710	    SHLIB_CFLAGS=""
6711	    SHLIB_SUFFIX=".so"
6712
6713	    LD_LIBRARY_PATH_VAR="LIBPATH"
6714
6715	    # Check to enable 64-bit flags for compiler/linker
6716	    if test "$do64bit" = yes; then :
6717
6718		if test "$GCC" = yes; then :
6719
6720		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
6721$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
6722
6723else
6724
6725		    do64bit_ok=yes
6726		    CFLAGS="$CFLAGS -q64"
6727		    LDFLAGS_ARCH="-q64"
6728		    RANLIB="${RANLIB} -X64"
6729		    AR="${AR} -X64"
6730		    SHLIB_LD_FLAGS="-b64"
6731
6732fi
6733
6734fi
6735
6736	    if test "`uname -m`" = ia64; then :
6737
6738		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
6739		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
6740		if test "$GCC" = yes; then :
6741
6742		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
6743
6744else
6745
6746		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
6747
6748fi
6749		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
6750
6751else
6752
6753		if test "$GCC" = yes; then :
6754
6755		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
6756
6757else
6758
6759		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
6760		    LDFLAGS="$LDFLAGS -brtl"
6761
6762fi
6763		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
6764		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
6765		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6766
6767fi
6768	    ;;
6769	BeOS*)
6770	    SHLIB_CFLAGS="-fPIC"
6771	    SHLIB_LD='${CC} -nostart'
6772	    SHLIB_SUFFIX=".so"
6773
6774	    #-----------------------------------------------------------
6775	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
6776	    # -lsocket, even if the network functions are in -lnet which
6777	    # is always linked to, for compatibility.
6778	    #-----------------------------------------------------------
6779	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5
6780$as_echo_n "checking for inet_ntoa in -lbind... " >&6; }
6781if ${ac_cv_lib_bind_inet_ntoa+:} false; then :
6782  $as_echo_n "(cached) " >&6
6783else
6784  ac_check_lib_save_LIBS=$LIBS
6785LIBS="-lbind  $LIBS"
6786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6787/* end confdefs.h.  */
6788
6789/* Override any GCC internal prototype to avoid an error.
6790   Use char because int might match the return type of a GCC
6791   builtin and then its argument prototype would still apply.  */
6792#ifdef __cplusplus
6793extern "C"
6794#endif
6795char inet_ntoa ();
6796int
6797main ()
6798{
6799return inet_ntoa ();
6800  ;
6801  return 0;
6802}
6803_ACEOF
6804if ac_fn_c_try_link "$LINENO"; then :
6805  ac_cv_lib_bind_inet_ntoa=yes
6806else
6807  ac_cv_lib_bind_inet_ntoa=no
6808fi
6809rm -f core conftest.err conftest.$ac_objext \
6810    conftest$ac_exeext conftest.$ac_ext
6811LIBS=$ac_check_lib_save_LIBS
6812fi
6813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5
6814$as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; }
6815if test "x$ac_cv_lib_bind_inet_ntoa" = xyes; then :
6816  LIBS="$LIBS -lbind -lsocket"
6817fi
6818
6819	    ;;
6820	BSD/OS-4.*)
6821	    SHLIB_CFLAGS="-export-dynamic -fPIC"
6822	    SHLIB_LD='${CC} -shared'
6823	    SHLIB_SUFFIX=".so"
6824	    LDFLAGS="$LDFLAGS -export-dynamic"
6825	    CC_SEARCH_FLAGS=""
6826	    LD_SEARCH_FLAGS=""
6827	    ;;
6828	CYGWIN_*)
6829	    SHLIB_CFLAGS=""
6830	    SHLIB_LD='${CC} -shared'
6831	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
6832	    SHLIB_SUFFIX=".dll"
6833	    EXEEXT=".exe"
6834	    do64bit_ok=yes
6835	    CC_SEARCH_FLAGS=""
6836	    LD_SEARCH_FLAGS=""
6837	    ;;
6838	Haiku*)
6839	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
6840	    SHLIB_CFLAGS="-fPIC"
6841	    SHLIB_SUFFIX=".so"
6842	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
6843	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5
6844$as_echo_n "checking for inet_ntoa in -lnetwork... " >&6; }
6845if ${ac_cv_lib_network_inet_ntoa+:} false; then :
6846  $as_echo_n "(cached) " >&6
6847else
6848  ac_check_lib_save_LIBS=$LIBS
6849LIBS="-lnetwork  $LIBS"
6850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6851/* end confdefs.h.  */
6852
6853/* Override any GCC internal prototype to avoid an error.
6854   Use char because int might match the return type of a GCC
6855   builtin and then its argument prototype would still apply.  */
6856#ifdef __cplusplus
6857extern "C"
6858#endif
6859char inet_ntoa ();
6860int
6861main ()
6862{
6863return inet_ntoa ();
6864  ;
6865  return 0;
6866}
6867_ACEOF
6868if ac_fn_c_try_link "$LINENO"; then :
6869  ac_cv_lib_network_inet_ntoa=yes
6870else
6871  ac_cv_lib_network_inet_ntoa=no
6872fi
6873rm -f core conftest.err conftest.$ac_objext \
6874    conftest$ac_exeext conftest.$ac_ext
6875LIBS=$ac_check_lib_save_LIBS
6876fi
6877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5
6878$as_echo "$ac_cv_lib_network_inet_ntoa" >&6; }
6879if test "x$ac_cv_lib_network_inet_ntoa" = xyes; then :
6880  LIBS="$LIBS -lnetwork"
6881fi
6882
6883	    ;;
6884	HP-UX-*.11.*)
6885	    # Use updated header definitions where possible
6886
6887$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
6888
6889	    # TEA specific: Needed by Tcl, but not most extensions
6890	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
6891	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
6892
6893	    if test "`uname -m`" = ia64; then :
6894
6895		SHLIB_SUFFIX=".so"
6896		# Use newer C++ library for C++ extensions
6897		#if test "$GCC" != "yes" ; then
6898		#   CPPFLAGS="-AA"
6899		#fi
6900
6901else
6902
6903		SHLIB_SUFFIX=".sl"
6904
6905fi
6906	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
6907$as_echo_n "checking for shl_load in -ldld... " >&6; }
6908if ${ac_cv_lib_dld_shl_load+:} false; then :
6909  $as_echo_n "(cached) " >&6
6910else
6911  ac_check_lib_save_LIBS=$LIBS
6912LIBS="-ldld  $LIBS"
6913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6914/* end confdefs.h.  */
6915
6916/* Override any GCC internal prototype to avoid an error.
6917   Use char because int might match the return type of a GCC
6918   builtin and then its argument prototype would still apply.  */
6919#ifdef __cplusplus
6920extern "C"
6921#endif
6922char shl_load ();
6923int
6924main ()
6925{
6926return shl_load ();
6927  ;
6928  return 0;
6929}
6930_ACEOF
6931if ac_fn_c_try_link "$LINENO"; then :
6932  ac_cv_lib_dld_shl_load=yes
6933else
6934  ac_cv_lib_dld_shl_load=no
6935fi
6936rm -f core conftest.err conftest.$ac_objext \
6937    conftest$ac_exeext conftest.$ac_ext
6938LIBS=$ac_check_lib_save_LIBS
6939fi
6940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
6941$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
6942if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
6943  tcl_ok=yes
6944else
6945  tcl_ok=no
6946fi
6947
6948	    if test "$tcl_ok" = yes; then :
6949
6950		LDFLAGS="$LDFLAGS -Wl,-E"
6951		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
6952		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
6953		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
6954
6955fi
6956	    if test "$GCC" = yes; then :
6957
6958		SHLIB_LD='${CC} -shared'
6959		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6960
6961else
6962
6963		CFLAGS="$CFLAGS -z"
6964		# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
6965		#CFLAGS="$CFLAGS +DAportable"
6966		SHLIB_CFLAGS="+z"
6967		SHLIB_LD="ld -b"
6968
6969fi
6970
6971	    # Check to enable 64-bit flags for compiler/linker
6972	    if test "$do64bit" = "yes"; then :
6973
6974		if test "$GCC" = yes; then :
6975
6976		    case `${CC} -dumpmachine` in
6977			hppa64*)
6978			    # 64-bit gcc in use.  Fix flags for GNU ld.
6979			    do64bit_ok=yes
6980			    SHLIB_LD='${CC} -shared'
6981			    if test $doRpath = yes; then :
6982
6983				CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6984fi
6985			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6986			    ;;
6987			*)
6988			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
6989$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
6990			    ;;
6991		    esac
6992
6993else
6994
6995		    do64bit_ok=yes
6996		    CFLAGS="$CFLAGS +DD64"
6997		    LDFLAGS_ARCH="+DD64"
6998
6999fi
7000
7001fi ;;
7002	IRIX-6.*)
7003	    SHLIB_CFLAGS=""
7004	    SHLIB_LD="ld -n32 -shared -rdata_shared"
7005	    SHLIB_SUFFIX=".so"
7006	    if test $doRpath = yes; then :
7007
7008		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7009		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7010fi
7011	    if test "$GCC" = yes; then :
7012
7013		CFLAGS="$CFLAGS -mabi=n32"
7014		LDFLAGS="$LDFLAGS -mabi=n32"
7015
7016else
7017
7018		case $system in
7019		    IRIX-6.3)
7020			# Use to build 6.2 compatible binaries on 6.3.
7021			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
7022			;;
7023		    *)
7024			CFLAGS="$CFLAGS -n32"
7025			;;
7026		esac
7027		LDFLAGS="$LDFLAGS -n32"
7028
7029fi
7030	    ;;
7031	IRIX64-6.*)
7032	    SHLIB_CFLAGS=""
7033	    SHLIB_LD="ld -n32 -shared -rdata_shared"
7034	    SHLIB_SUFFIX=".so"
7035	    if test $doRpath = yes; then :
7036
7037		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7038		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7039fi
7040
7041	    # Check to enable 64-bit flags for compiler/linker
7042
7043	    if test "$do64bit" = yes; then :
7044
7045	        if test "$GCC" = yes; then :
7046
7047	            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5
7048$as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
7049
7050else
7051
7052	            do64bit_ok=yes
7053	            SHLIB_LD="ld -64 -shared -rdata_shared"
7054	            CFLAGS="$CFLAGS -64"
7055	            LDFLAGS_ARCH="-64"
7056
7057fi
7058
7059fi
7060	    ;;
7061	Linux*|GNU*|NetBSD-Debian)
7062	    SHLIB_CFLAGS="-fPIC"
7063	    SHLIB_SUFFIX=".so"
7064
7065	    # TEA specific:
7066	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
7067
7068	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7069	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
7070	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7071	    if test $doRpath = yes; then :
7072
7073		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7074fi
7075	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7076	    if test "`uname -m`" = "alpha"; then :
7077  CFLAGS="$CFLAGS -mieee"
7078fi
7079	    if test $do64bit = yes; then :
7080
7081		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5
7082$as_echo_n "checking if compiler accepts -m64 flag... " >&6; }
7083if ${tcl_cv_cc_m64+:} false; then :
7084  $as_echo_n "(cached) " >&6
7085else
7086
7087		    hold_cflags=$CFLAGS
7088		    CFLAGS="$CFLAGS -m64"
7089		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7090/* end confdefs.h.  */
7091
7092int
7093main ()
7094{
7095
7096  ;
7097  return 0;
7098}
7099_ACEOF
7100if ac_fn_c_try_link "$LINENO"; then :
7101  tcl_cv_cc_m64=yes
7102else
7103  tcl_cv_cc_m64=no
7104fi
7105rm -f core conftest.err conftest.$ac_objext \
7106    conftest$ac_exeext conftest.$ac_ext
7107		    CFLAGS=$hold_cflags
7108fi
7109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5
7110$as_echo "$tcl_cv_cc_m64" >&6; }
7111		if test $tcl_cv_cc_m64 = yes; then :
7112
7113		    CFLAGS="$CFLAGS -m64"
7114		    do64bit_ok=yes
7115
7116fi
7117
7118fi
7119
7120	    # The combo of gcc + glibc has a bug related to inlining of
7121	    # functions like strtod(). The -fno-builtin flag should address
7122	    # this problem but it does not work. The -fno-inline flag is kind
7123	    # of overkill but it works. Disable inlining only when one of the
7124	    # files in compat/*.c is being linked in.
7125
7126	    if test x"${USE_COMPAT}" != x; then :
7127  CFLAGS="$CFLAGS -fno-inline"
7128fi
7129	    ;;
7130	Lynx*)
7131	    SHLIB_CFLAGS="-fPIC"
7132	    SHLIB_SUFFIX=".so"
7133	    CFLAGS_OPTIMIZE=-02
7134	    SHLIB_LD='${CC} -shared'
7135	    LD_FLAGS="-Wl,--export-dynamic"
7136	    if test $doRpath = yes; then :
7137
7138		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7139		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7140fi
7141	    ;;
7142	OpenBSD-*)
7143	    arch=`arch -s`
7144	    case "$arch" in
7145	    alpha|sparc64)
7146		SHLIB_CFLAGS="-fPIC"
7147		;;
7148	    *)
7149		SHLIB_CFLAGS="-fpic"
7150		;;
7151	    esac
7152	    SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared'
7153	    SHLIB_SUFFIX=".so"
7154	    if test $doRpath = yes; then :
7155
7156		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7157fi
7158	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7159	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
7160	    LDFLAGS="-Wl,-export-dynamic"
7161	    CFLAGS_OPTIMIZE="-O2"
7162	    if test "${TCL_THREADS}" = "1"; then :
7163
7164		# On OpenBSD:	Compile with -pthread
7165		#		Don't link with -lpthread
7166		LIBS=`echo $LIBS | sed s/-lpthread//`
7167		CFLAGS="$CFLAGS -pthread"
7168
7169fi
7170	    # OpenBSD doesn't do version numbers with dots.
7171	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7172	    TCL_LIB_VERSIONS_OK=nodots
7173	    ;;
7174	NetBSD-*)
7175	    # NetBSD has ELF and can use 'cc -shared' to build shared libs
7176	    SHLIB_CFLAGS="-fPIC"
7177	    SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared'
7178	    SHLIB_SUFFIX=".so"
7179	    LDFLAGS="$LDFLAGS -export-dynamic"
7180	    if test $doRpath = yes; then :
7181
7182		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7183fi
7184	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7185	    if test "${TCL_THREADS}" = "1"; then :
7186
7187		# The -pthread needs to go in the CFLAGS, not LIBS
7188		LIBS=`echo $LIBS | sed s/-pthread//`
7189		CFLAGS="$CFLAGS -pthread"
7190	    	LDFLAGS="$LDFLAGS -pthread"
7191
7192fi
7193	    ;;
7194	FreeBSD-*|DragonFly-*)
7195	    # This configuration from FreeBSD Ports.
7196	    SHLIB_CFLAGS="-fPIC"
7197	    SHLIB_LD="${CC} -shared"
7198	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$@"
7199	    SHLIB_SUFFIX=".so"
7200	    LDFLAGS=""
7201	    if test $doRpath = yes; then :
7202
7203		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7204		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7205fi
7206	    if test "${TCL_THREADS}" = "1"; then :
7207
7208		# The -pthread needs to go in the LDFLAGS, not LIBS
7209		LIBS=`echo $LIBS | sed s/-pthread//`
7210		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
7211		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
7212fi
7213	    case $system in
7214	    FreeBSD-3.*)
7215		# Version numbers are dot-stripped by system policy.
7216		TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
7217		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7218		SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
7219		TCL_LIB_VERSIONS_OK=nodots
7220		;;
7221	    esac
7222	    ;;
7223	Darwin-*)
7224	    CFLAGS_OPTIMIZE="-Os"
7225	    SHLIB_CFLAGS="-fno-common"
7226	    # To avoid discrepancies between what headers configure sees during
7227	    # preprocessing tests and compiling tests, move any -isysroot and
7228	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
7229	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
7230		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7231		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
7232	    CFLAGS="`echo " ${CFLAGS}" | \
7233		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7234		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
7235	    if test $do64bit = yes; then :
7236
7237		case `arch` in
7238		    ppc)
7239			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5
7240$as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; }
7241if ${tcl_cv_cc_arch_ppc64+:} false; then :
7242  $as_echo_n "(cached) " >&6
7243else
7244
7245			    hold_cflags=$CFLAGS
7246			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7247			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7248/* end confdefs.h.  */
7249
7250int
7251main ()
7252{
7253
7254  ;
7255  return 0;
7256}
7257_ACEOF
7258if ac_fn_c_try_link "$LINENO"; then :
7259  tcl_cv_cc_arch_ppc64=yes
7260else
7261  tcl_cv_cc_arch_ppc64=no
7262fi
7263rm -f core conftest.err conftest.$ac_objext \
7264    conftest$ac_exeext conftest.$ac_ext
7265			    CFLAGS=$hold_cflags
7266fi
7267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5
7268$as_echo "$tcl_cv_cc_arch_ppc64" >&6; }
7269			if test $tcl_cv_cc_arch_ppc64 = yes; then :
7270
7271			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7272			    do64bit_ok=yes
7273
7274fi;;
7275		    i386)
7276			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5
7277$as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; }
7278if ${tcl_cv_cc_arch_x86_64+:} false; then :
7279  $as_echo_n "(cached) " >&6
7280else
7281
7282			    hold_cflags=$CFLAGS
7283			    CFLAGS="$CFLAGS -arch x86_64"
7284			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7285/* end confdefs.h.  */
7286
7287int
7288main ()
7289{
7290
7291  ;
7292  return 0;
7293}
7294_ACEOF
7295if ac_fn_c_try_link "$LINENO"; then :
7296  tcl_cv_cc_arch_x86_64=yes
7297else
7298  tcl_cv_cc_arch_x86_64=no
7299fi
7300rm -f core conftest.err conftest.$ac_objext \
7301    conftest$ac_exeext conftest.$ac_ext
7302			    CFLAGS=$hold_cflags
7303fi
7304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5
7305$as_echo "$tcl_cv_cc_arch_x86_64" >&6; }
7306			if test $tcl_cv_cc_arch_x86_64 = yes; then :
7307
7308			    CFLAGS="$CFLAGS -arch x86_64"
7309			    do64bit_ok=yes
7310
7311fi;;
7312		    *)
7313			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
7314$as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
7315		esac
7316
7317else
7318
7319		# Check for combined 32-bit and 64-bit fat build
7320		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
7321		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then :
7322
7323		    fat_32_64=yes
7324fi
7325
7326fi
7327	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7328	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
7329	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
7330$as_echo_n "checking if ld accepts -single_module flag... " >&6; }
7331if ${tcl_cv_ld_single_module+:} false; then :
7332  $as_echo_n "(cached) " >&6
7333else
7334
7335		hold_ldflags=$LDFLAGS
7336		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
7337		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7338/* end confdefs.h.  */
7339
7340int
7341main ()
7342{
7343int i;
7344  ;
7345  return 0;
7346}
7347_ACEOF
7348if ac_fn_c_try_link "$LINENO"; then :
7349  tcl_cv_ld_single_module=yes
7350else
7351  tcl_cv_ld_single_module=no
7352fi
7353rm -f core conftest.err conftest.$ac_objext \
7354    conftest$ac_exeext conftest.$ac_ext
7355		LDFLAGS=$hold_ldflags
7356fi
7357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5
7358$as_echo "$tcl_cv_ld_single_module" >&6; }
7359	    if test $tcl_cv_ld_single_module = yes; then :
7360
7361		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
7362
7363fi
7364	    # TEA specific: link shlib with current and compatibility version flags
7365	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
7366	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
7367	    SHLIB_SUFFIX=".dylib"
7368	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
7369	    if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
7370		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then :
7371
7372		LDFLAGS="$LDFLAGS -prebind"
7373fi
7374	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
7375	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5
7376$as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; }
7377if ${tcl_cv_ld_search_paths_first+:} false; then :
7378  $as_echo_n "(cached) " >&6
7379else
7380
7381		hold_ldflags=$LDFLAGS
7382		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7383		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7384/* end confdefs.h.  */
7385
7386int
7387main ()
7388{
7389int i;
7390  ;
7391  return 0;
7392}
7393_ACEOF
7394if ac_fn_c_try_link "$LINENO"; then :
7395  tcl_cv_ld_search_paths_first=yes
7396else
7397  tcl_cv_ld_search_paths_first=no
7398fi
7399rm -f core conftest.err conftest.$ac_objext \
7400    conftest$ac_exeext conftest.$ac_ext
7401		LDFLAGS=$hold_ldflags
7402fi
7403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5
7404$as_echo "$tcl_cv_ld_search_paths_first" >&6; }
7405	    if test $tcl_cv_ld_search_paths_first = yes; then :
7406
7407		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7408
7409fi
7410	    if test "$tcl_cv_cc_visibility_hidden" != yes; then :
7411
7412
7413$as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h
7414
7415		tcl_cv_cc_visibility_hidden=yes
7416
7417fi
7418	    CC_SEARCH_FLAGS=""
7419	    LD_SEARCH_FLAGS=""
7420	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
7421	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
7422	    # extensions, verify that 64-bit build is possible.
7423	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then :
7424
7425		if test "${TEA_WINDOWINGSYSTEM}" = x11; then :
7426
7427		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5
7428$as_echo_n "checking for 64-bit X11... " >&6; }
7429if ${tcl_cv_lib_x11_64+:} false; then :
7430  $as_echo_n "(cached) " >&6
7431else
7432
7433			for v in CFLAGS CPPFLAGS LDFLAGS; do
7434			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
7435			done
7436			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
7437			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
7438			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7439/* end confdefs.h.  */
7440#include <X11/Xlib.h>
7441int
7442main ()
7443{
7444XrmInitialize();
7445  ;
7446  return 0;
7447}
7448_ACEOF
7449if ac_fn_c_try_link "$LINENO"; then :
7450  tcl_cv_lib_x11_64=yes
7451else
7452  tcl_cv_lib_x11_64=no
7453fi
7454rm -f core conftest.err conftest.$ac_objext \
7455    conftest$ac_exeext conftest.$ac_ext
7456			for v in CFLAGS CPPFLAGS LDFLAGS; do
7457			    eval $v'="$hold_'$v'"'
7458			done
7459fi
7460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5
7461$as_echo "$tcl_cv_lib_x11_64" >&6; }
7462
7463fi
7464		if test "${TEA_WINDOWINGSYSTEM}" = aqua; then :
7465
7466		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit Tk" >&5
7467$as_echo_n "checking for 64-bit Tk... " >&6; }
7468if ${tcl_cv_lib_tk_64+:} false; then :
7469  $as_echo_n "(cached) " >&6
7470else
7471
7472			for v in CFLAGS CPPFLAGS LDFLAGS; do
7473			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
7474			done
7475			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
7476			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
7477			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7478/* end confdefs.h.  */
7479#include <tk.h>
7480int
7481main ()
7482{
7483Tk_InitStubs(NULL, "", 0);
7484  ;
7485  return 0;
7486}
7487_ACEOF
7488if ac_fn_c_try_link "$LINENO"; then :
7489  tcl_cv_lib_tk_64=yes
7490else
7491  tcl_cv_lib_tk_64=no
7492fi
7493rm -f core conftest.err conftest.$ac_objext \
7494    conftest$ac_exeext conftest.$ac_ext
7495			for v in CFLAGS CPPFLAGS LDFLAGS; do
7496			    eval $v'="$hold_'$v'"'
7497			done
7498fi
7499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_tk_64" >&5
7500$as_echo "$tcl_cv_lib_tk_64" >&6; }
7501
7502fi
7503		# remove 64-bit arch flags from CFLAGS et al. if configuration
7504		# does not support 64-bit.
7505		if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then :
7506
7507		    { $as_echo "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5
7508$as_echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
7509		    for v in CFLAGS CPPFLAGS LDFLAGS; do
7510			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
7511		    done
7512fi
7513
7514fi
7515	    ;;
7516	OS/390-*)
7517	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
7518
7519$as_echo "#define _OE_SOCKETS 1" >>confdefs.h
7520
7521	    ;;
7522	OSF1-V*)
7523	    # Digital OSF/1
7524	    SHLIB_CFLAGS=""
7525	    if test "$SHARED_BUILD" = 1; then :
7526
7527	        SHLIB_LD='ld -shared -expect_unresolved "*"'
7528
7529else
7530
7531	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
7532
7533fi
7534	    SHLIB_SUFFIX=".so"
7535	    if test $doRpath = yes; then :
7536
7537		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7538		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7539fi
7540	    if test "$GCC" = yes; then :
7541  CFLAGS="$CFLAGS -mieee"
7542else
7543
7544		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
7545fi
7546	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
7547	    if test "${TCL_THREADS}" = 1; then :
7548
7549		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
7550		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
7551		LIBS=`echo $LIBS | sed s/-lpthreads//`
7552		if test "$GCC" = yes; then :
7553
7554		    LIBS="$LIBS -lpthread -lmach -lexc"
7555
7556else
7557
7558		    CFLAGS="$CFLAGS -pthread"
7559		    LDFLAGS="$LDFLAGS -pthread"
7560
7561fi
7562
7563fi
7564	    ;;
7565	QNX-6*)
7566	    # QNX RTP
7567	    # This may work for all QNX, but it was only reported for v6.
7568	    SHLIB_CFLAGS="-fPIC"
7569	    SHLIB_LD="ld -Bshareable -x"
7570	    SHLIB_LD_LIBS=""
7571	    SHLIB_SUFFIX=".so"
7572	    CC_SEARCH_FLAGS=""
7573	    LD_SEARCH_FLAGS=""
7574	    ;;
7575	SCO_SV-3.2*)
7576	    if test "$GCC" = yes; then :
7577
7578		SHLIB_CFLAGS="-fPIC -melf"
7579		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
7580
7581else
7582
7583		SHLIB_CFLAGS="-Kpic -belf"
7584		LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
7585
7586fi
7587	    SHLIB_LD="ld -G"
7588	    SHLIB_LD_LIBS=""
7589	    SHLIB_SUFFIX=".so"
7590	    CC_SEARCH_FLAGS=""
7591	    LD_SEARCH_FLAGS=""
7592	    ;;
7593	SunOS-5.[0-6])
7594	    # Careful to not let 5.10+ fall into this case
7595
7596	    # Note: If _REENTRANT isn't defined, then Solaris
7597	    # won't define thread-safe library routines.
7598
7599
7600$as_echo "#define _REENTRANT 1" >>confdefs.h
7601
7602
7603$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
7604
7605
7606	    SHLIB_CFLAGS="-KPIC"
7607	    SHLIB_SUFFIX=".so"
7608	    if test "$GCC" = yes; then :
7609
7610		SHLIB_LD='${CC} -shared'
7611		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7612		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7613
7614else
7615
7616		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
7617		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
7618		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7619
7620fi
7621	    ;;
7622	SunOS-5*)
7623	    # Note: If _REENTRANT isn't defined, then Solaris
7624	    # won't define thread-safe library routines.
7625
7626
7627$as_echo "#define _REENTRANT 1" >>confdefs.h
7628
7629
7630$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
7631
7632
7633	    SHLIB_CFLAGS="-KPIC"
7634
7635	    # Check to enable 64-bit flags for compiler/linker
7636	    if test "$do64bit" = yes; then :
7637
7638		arch=`isainfo`
7639		if test "$arch" = "sparcv9 sparc"; then :
7640
7641		    if test "$GCC" = yes; then :
7642
7643			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then :
7644
7645			    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
7646$as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
7647
7648else
7649
7650			    do64bit_ok=yes
7651			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
7652			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
7653			    SHLIB_CFLAGS="-fPIC"
7654
7655fi
7656
7657else
7658
7659			do64bit_ok=yes
7660			if test "$do64bitVIS" = yes; then :
7661
7662			    CFLAGS="$CFLAGS -xarch=v9a"
7663			    LDFLAGS_ARCH="-xarch=v9a"
7664
7665else
7666
7667			    CFLAGS="$CFLAGS -xarch=v9"
7668			    LDFLAGS_ARCH="-xarch=v9"
7669
7670fi
7671			# Solaris 64 uses this as well
7672			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
7673
7674fi
7675
7676else
7677  if test "$arch" = "amd64 i386"; then :
7678
7679		    if test "$GCC" = yes; then :
7680
7681			case $system in
7682			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
7683				do64bit_ok=yes
7684				CFLAGS="$CFLAGS -m64"
7685				LDFLAGS="$LDFLAGS -m64";;
7686			    *)
7687				{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
7688$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
7689			esac
7690
7691else
7692
7693			do64bit_ok=yes
7694			case $system in
7695			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
7696				CFLAGS="$CFLAGS -m64"
7697				LDFLAGS="$LDFLAGS -m64";;
7698			    *)
7699				CFLAGS="$CFLAGS -xarch=amd64"
7700				LDFLAGS="$LDFLAGS -xarch=amd64";;
7701			esac
7702
7703fi
7704
7705else
7706  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5
7707$as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
7708fi
7709fi
7710
7711fi
7712
7713	    SHLIB_SUFFIX=".so"
7714	    if test "$GCC" = yes; then :
7715
7716		SHLIB_LD='${CC} -shared'
7717		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7718		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7719		if test "$do64bit_ok" = yes; then :
7720
7721		    if test "$arch" = "sparcv9 sparc"; then :
7722
7723			# We need to specify -static-libgcc or we need to
7724			# add the path to the sparv9 libgcc.
7725			# JH: static-libgcc is necessary for core Tcl, but may
7726			# not be necessary for extensions.
7727			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
7728			# for finding sparcv9 libgcc, get the regular libgcc
7729			# path, remove so name and append 'sparcv9'
7730			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
7731			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
7732
7733else
7734  if test "$arch" = "amd64 i386"; then :
7735
7736			# JH: static-libgcc is necessary for core Tcl, but may
7737			# not be necessary for extensions.
7738			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
7739
7740fi
7741fi
7742
7743fi
7744
7745else
7746
7747		case $system in
7748		    SunOS-5.[1-9][0-9]*)
7749			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7750			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
7751		    *)
7752			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
7753		esac
7754		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7755		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
7756
7757fi
7758	    ;;
7759	UNIX_SV* | UnixWare-5*)
7760	    SHLIB_CFLAGS="-KPIC"
7761	    SHLIB_LD='${CC} -G'
7762	    SHLIB_LD_LIBS=""
7763	    SHLIB_SUFFIX=".so"
7764	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
7765	    # that don't grok the -Bexport option.  Test that it does.
7766	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5
7767$as_echo_n "checking for ld accepts -Bexport flag... " >&6; }
7768if ${tcl_cv_ld_Bexport+:} false; then :
7769  $as_echo_n "(cached) " >&6
7770else
7771
7772		hold_ldflags=$LDFLAGS
7773		LDFLAGS="$LDFLAGS -Wl,-Bexport"
7774		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7775/* end confdefs.h.  */
7776
7777int
7778main ()
7779{
7780int i;
7781  ;
7782  return 0;
7783}
7784_ACEOF
7785if ac_fn_c_try_link "$LINENO"; then :
7786  tcl_cv_ld_Bexport=yes
7787else
7788  tcl_cv_ld_Bexport=no
7789fi
7790rm -f core conftest.err conftest.$ac_objext \
7791    conftest$ac_exeext conftest.$ac_ext
7792	        LDFLAGS=$hold_ldflags
7793fi
7794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5
7795$as_echo "$tcl_cv_ld_Bexport" >&6; }
7796	    if test $tcl_cv_ld_Bexport = yes; then :
7797
7798		LDFLAGS="$LDFLAGS -Wl,-Bexport"
7799
7800fi
7801	    CC_SEARCH_FLAGS=""
7802	    LD_SEARCH_FLAGS=""
7803	    ;;
7804    esac
7805
7806    if test "$do64bit" = yes -a "$do64bit_ok" = no; then :
7807
7808	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
7809$as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
7810
7811fi
7812
7813
7814
7815    # Add in the arch flags late to ensure it wasn't removed.
7816    # Not necessary in TEA, but this is aligned with core
7817    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
7818
7819    # If we're running gcc, then change the C flags for compiling shared
7820    # libraries to the right flags for gcc, instead of those for the
7821    # standard manufacturer compiler.
7822
7823    if test "$GCC" = yes; then :
7824
7825	case $system in
7826	    AIX-*) ;;
7827	    BSD/OS*) ;;
7828	    CYGWIN_*|MINGW32_*|MINGW64_*) ;;
7829	    IRIX*) ;;
7830	    NetBSD-*|FreeBSD-*|DragonFly-*|OpenBSD-*) ;;
7831	    Darwin-*) ;;
7832	    SCO_SV-3.2*) ;;
7833	    windows) ;;
7834	    *) SHLIB_CFLAGS="-fPIC" ;;
7835	esac
7836fi
7837
7838    if test "$tcl_cv_cc_visibility_hidden" != yes; then :
7839
7840
7841$as_echo "#define MODULE_SCOPE extern" >>confdefs.h
7842
7843
7844fi
7845
7846    if test "$SHARED_LIB_SUFFIX" = ""; then :
7847
7848    # TEA specific: use PACKAGE_VERSION instead of VERSION
7849    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
7850fi
7851    if test "$UNSHARED_LIB_SUFFIX" = ""; then :
7852
7853    # TEA specific: use PACKAGE_VERSION instead of VERSION
7854    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
7855fi
7856
7857    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
7858	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5
7859$as_echo_n "checking for SEH support in compiler... " >&6; }
7860if ${tcl_cv_seh+:} false; then :
7861  $as_echo_n "(cached) " >&6
7862else
7863  if test "$cross_compiling" = yes; then :
7864  tcl_cv_seh=no
7865else
7866  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7867/* end confdefs.h.  */
7868
7869#define WIN32_LEAN_AND_MEAN
7870#include <windows.h>
7871#undef WIN32_LEAN_AND_MEAN
7872
7873	    int main(int argc, char** argv) {
7874		int a, b = 0;
7875		__try {
7876		    a = 666 / b;
7877		}
7878		__except (EXCEPTION_EXECUTE_HANDLER) {
7879		    return 0;
7880		}
7881		return 1;
7882	    }
7883
7884_ACEOF
7885if ac_fn_c_try_run "$LINENO"; then :
7886  tcl_cv_seh=yes
7887else
7888  tcl_cv_seh=no
7889fi
7890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7891  conftest.$ac_objext conftest.beam conftest.$ac_ext
7892fi
7893
7894
7895fi
7896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5
7897$as_echo "$tcl_cv_seh" >&6; }
7898	if test "$tcl_cv_seh" = "no" ; then
7899
7900$as_echo "#define HAVE_NO_SEH 1" >>confdefs.h
7901
7902	fi
7903
7904	#
7905	# Check to see if the excpt.h include file provided contains the
7906	# definition for EXCEPTION_DISPOSITION; if not, which is the case
7907	# with Cygwin's version as of 2002-04-10, define it to be int,
7908	# sufficient for getting the current code to work.
7909	#
7910	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5
7911$as_echo_n "checking for EXCEPTION_DISPOSITION support in include files... " >&6; }
7912if ${tcl_cv_eh_disposition+:} false; then :
7913  $as_echo_n "(cached) " >&6
7914else
7915  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7916/* end confdefs.h.  */
7917
7918#	    define WIN32_LEAN_AND_MEAN
7919#	    include <windows.h>
7920#	    undef WIN32_LEAN_AND_MEAN
7921
7922int
7923main ()
7924{
7925
7926		EXCEPTION_DISPOSITION x;
7927
7928  ;
7929  return 0;
7930}
7931_ACEOF
7932if ac_fn_c_try_compile "$LINENO"; then :
7933  tcl_cv_eh_disposition=yes
7934else
7935  tcl_cv_eh_disposition=no
7936fi
7937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7938
7939fi
7940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5
7941$as_echo "$tcl_cv_eh_disposition" >&6; }
7942	if test "$tcl_cv_eh_disposition" = "no" ; then
7943
7944$as_echo "#define EXCEPTION_DISPOSITION int" >>confdefs.h
7945
7946	fi
7947
7948	# Check to see if winnt.h defines CHAR, SHORT, and LONG
7949	# even if VOID has already been #defined. The win32api
7950	# used by mingw and cygwin is known to do this.
7951
7952	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5
7953$as_echo_n "checking for winnt.h that ignores VOID define... " >&6; }
7954if ${tcl_cv_winnt_ignore_void+:} false; then :
7955  $as_echo_n "(cached) " >&6
7956else
7957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7958/* end confdefs.h.  */
7959
7960#define VOID void
7961#define WIN32_LEAN_AND_MEAN
7962#include <windows.h>
7963#undef WIN32_LEAN_AND_MEAN
7964
7965int
7966main ()
7967{
7968
7969		CHAR c;
7970		SHORT s;
7971		LONG l;
7972
7973  ;
7974  return 0;
7975}
7976_ACEOF
7977if ac_fn_c_try_compile "$LINENO"; then :
7978  tcl_cv_winnt_ignore_void=yes
7979else
7980  tcl_cv_winnt_ignore_void=no
7981fi
7982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7983
7984fi
7985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5
7986$as_echo "$tcl_cv_winnt_ignore_void" >&6; }
7987	if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
7988
7989$as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h
7990
7991	fi
7992    fi
7993
7994	# See if the compiler supports casting to a union type.
7995	# This is used to stop gcc from printing a compiler
7996	# warning when initializing a union member.
7997
7998	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
7999$as_echo_n "checking for cast to union support... " >&6; }
8000if ${tcl_cv_cast_to_union+:} false; then :
8001  $as_echo_n "(cached) " >&6
8002else
8003  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8004/* end confdefs.h.  */
8005
8006int
8007main ()
8008{
8009
8010		  union foo { int i; double d; };
8011		  union foo f = (union foo) (int) 0;
8012
8013  ;
8014  return 0;
8015}
8016_ACEOF
8017if ac_fn_c_try_compile "$LINENO"; then :
8018  tcl_cv_cast_to_union=yes
8019else
8020  tcl_cv_cast_to_union=no
8021fi
8022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8023
8024fi
8025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
8026$as_echo "$tcl_cv_cast_to_union" >&6; }
8027	if test "$tcl_cv_cast_to_union" = "yes"; then
8028
8029$as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h
8030
8031	fi
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045    # These must be called after we do the basic CFLAGS checks and
8046    # verify any possible 64-bit or similar switches are necessary
8047
8048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5
8049$as_echo_n "checking for required early compiler flags... " >&6; }
8050    tcl_flags=""
8051
8052    if ${tcl_cv_flag__isoc99_source+:} false; then :
8053  $as_echo_n "(cached) " >&6
8054else
8055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8056/* end confdefs.h.  */
8057#include <stdlib.h>
8058int
8059main ()
8060{
8061char *p = (char *)strtoll; char *q = (char *)strtoull;
8062  ;
8063  return 0;
8064}
8065_ACEOF
8066if ac_fn_c_try_compile "$LINENO"; then :
8067  tcl_cv_flag__isoc99_source=no
8068else
8069  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8070/* end confdefs.h.  */
8071#define _ISOC99_SOURCE 1
8072#include <stdlib.h>
8073int
8074main ()
8075{
8076char *p = (char *)strtoll; char *q = (char *)strtoull;
8077  ;
8078  return 0;
8079}
8080_ACEOF
8081if ac_fn_c_try_compile "$LINENO"; then :
8082  tcl_cv_flag__isoc99_source=yes
8083else
8084  tcl_cv_flag__isoc99_source=no
8085fi
8086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8087fi
8088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8089fi
8090
8091    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
8092
8093$as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h
8094
8095	tcl_flags="$tcl_flags _ISOC99_SOURCE"
8096    fi
8097
8098
8099    if ${tcl_cv_flag__largefile64_source+:} false; then :
8100  $as_echo_n "(cached) " >&6
8101else
8102  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8103/* end confdefs.h.  */
8104#include <sys/stat.h>
8105int
8106main ()
8107{
8108struct stat64 buf; int i = stat64("/", &buf);
8109  ;
8110  return 0;
8111}
8112_ACEOF
8113if ac_fn_c_try_compile "$LINENO"; then :
8114  tcl_cv_flag__largefile64_source=no
8115else
8116  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8117/* end confdefs.h.  */
8118#define _LARGEFILE64_SOURCE 1
8119#include <sys/stat.h>
8120int
8121main ()
8122{
8123struct stat64 buf; int i = stat64("/", &buf);
8124  ;
8125  return 0;
8126}
8127_ACEOF
8128if ac_fn_c_try_compile "$LINENO"; then :
8129  tcl_cv_flag__largefile64_source=yes
8130else
8131  tcl_cv_flag__largefile64_source=no
8132fi
8133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8134fi
8135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8136fi
8137
8138    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
8139
8140$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
8141
8142	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
8143    fi
8144
8145
8146    if ${tcl_cv_flag__largefile_source64+:} false; then :
8147  $as_echo_n "(cached) " >&6
8148else
8149  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8150/* end confdefs.h.  */
8151#include <sys/stat.h>
8152int
8153main ()
8154{
8155char *p = (char *)open64;
8156  ;
8157  return 0;
8158}
8159_ACEOF
8160if ac_fn_c_try_compile "$LINENO"; then :
8161  tcl_cv_flag__largefile_source64=no
8162else
8163  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8164/* end confdefs.h.  */
8165#define _LARGEFILE_SOURCE64 1
8166#include <sys/stat.h>
8167int
8168main ()
8169{
8170char *p = (char *)open64;
8171  ;
8172  return 0;
8173}
8174_ACEOF
8175if ac_fn_c_try_compile "$LINENO"; then :
8176  tcl_cv_flag__largefile_source64=yes
8177else
8178  tcl_cv_flag__largefile_source64=no
8179fi
8180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8181fi
8182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8183fi
8184
8185    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
8186
8187$as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h
8188
8189	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
8190    fi
8191
8192    if test "x${tcl_flags}" = "x" ; then
8193	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
8194$as_echo "none" >&6; }
8195    else
8196	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5
8197$as_echo "${tcl_flags}" >&6; }
8198    fi
8199
8200
8201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5
8202$as_echo_n "checking for 64-bit integer type... " >&6; }
8203    if ${tcl_cv_type_64bit+:} false; then :
8204  $as_echo_n "(cached) " >&6
8205else
8206
8207	tcl_cv_type_64bit=none
8208	# See if the compiler knows natively about __int64
8209	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8210/* end confdefs.h.  */
8211
8212int
8213main ()
8214{
8215__int64 value = (__int64) 0;
8216  ;
8217  return 0;
8218}
8219_ACEOF
8220if ac_fn_c_try_compile "$LINENO"; then :
8221  tcl_type_64bit=__int64
8222else
8223  tcl_type_64bit="long long"
8224fi
8225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8226	# See if we should use long anyway  Note that we substitute in the
8227	# type that is our current guess for a 64-bit type inside this check
8228	# program, so it should be modified only carefully...
8229        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8230/* end confdefs.h.  */
8231
8232int
8233main ()
8234{
8235switch (0) {
8236            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
8237        }
8238  ;
8239  return 0;
8240}
8241_ACEOF
8242if ac_fn_c_try_compile "$LINENO"; then :
8243  tcl_cv_type_64bit=${tcl_type_64bit}
8244fi
8245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8246fi
8247
8248    if test "${tcl_cv_type_64bit}" = none ; then
8249
8250$as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h
8251
8252	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using long" >&5
8253$as_echo "using long" >&6; }
8254    elif test "${tcl_cv_type_64bit}" = "__int64" \
8255		-a "${TEA_PLATFORM}" = "windows" ; then
8256	# TEA specific: We actually want to use the default tcl.h checks in
8257	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
8258	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using Tcl header defaults" >&5
8259$as_echo "using Tcl header defaults" >&6; }
8260    else
8261
8262cat >>confdefs.h <<_ACEOF
8263#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
8264_ACEOF
8265
8266	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5
8267$as_echo "${tcl_cv_type_64bit}" >&6; }
8268
8269	# Now check for auxiliary declarations
8270	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5
8271$as_echo_n "checking for struct dirent64... " >&6; }
8272if ${tcl_cv_struct_dirent64+:} false; then :
8273  $as_echo_n "(cached) " >&6
8274else
8275
8276	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8277/* end confdefs.h.  */
8278#include <sys/types.h>
8279#include <dirent.h>
8280int
8281main ()
8282{
8283struct dirent64 p;
8284  ;
8285  return 0;
8286}
8287_ACEOF
8288if ac_fn_c_try_compile "$LINENO"; then :
8289  tcl_cv_struct_dirent64=yes
8290else
8291  tcl_cv_struct_dirent64=no
8292fi
8293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8294fi
8295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5
8296$as_echo "$tcl_cv_struct_dirent64" >&6; }
8297	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
8298
8299$as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h
8300
8301	fi
8302
8303	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5
8304$as_echo_n "checking for struct stat64... " >&6; }
8305if ${tcl_cv_struct_stat64+:} false; then :
8306  $as_echo_n "(cached) " >&6
8307else
8308
8309	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8310/* end confdefs.h.  */
8311#include <sys/stat.h>
8312int
8313main ()
8314{
8315struct stat64 p;
8316
8317  ;
8318  return 0;
8319}
8320_ACEOF
8321if ac_fn_c_try_compile "$LINENO"; then :
8322  tcl_cv_struct_stat64=yes
8323else
8324  tcl_cv_struct_stat64=no
8325fi
8326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8327fi
8328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5
8329$as_echo "$tcl_cv_struct_stat64" >&6; }
8330	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
8331
8332$as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h
8333
8334	fi
8335
8336	for ac_func in open64 lseek64
8337do :
8338  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8339ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8340if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8341  cat >>confdefs.h <<_ACEOF
8342#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8343_ACEOF
8344
8345fi
8346done
8347
8348	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5
8349$as_echo_n "checking for off64_t... " >&6; }
8350	if ${tcl_cv_type_off64_t+:} false; then :
8351  $as_echo_n "(cached) " >&6
8352else
8353
8354	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8355/* end confdefs.h.  */
8356#include <sys/types.h>
8357int
8358main ()
8359{
8360off64_t offset;
8361
8362  ;
8363  return 0;
8364}
8365_ACEOF
8366if ac_fn_c_try_compile "$LINENO"; then :
8367  tcl_cv_type_off64_t=yes
8368else
8369  tcl_cv_type_off64_t=no
8370fi
8371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8372fi
8373
8374			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
8375	        test "x${ac_cv_func_lseek64}" = "xyes" && \
8376	        test "x${ac_cv_func_open64}" = "xyes" ; then
8377
8378$as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h
8379
8380	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8381$as_echo "yes" >&6; }
8382	else
8383	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8384$as_echo "no" >&6; }
8385	fi
8386    fi
8387
8388
8389
8390TDOM_LD_SEARCH_FLAGS=${LD_SEARCH_FLAGS}
8391
8392
8393#--------------------------------------------------------------------
8394# Set the default compiler switches based on the --enable-symbols option.
8395#--------------------------------------------------------------------
8396
8397
8398
8399    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5
8400$as_echo_n "checking for build with symbols... " >&6; }
8401    # Check whether --enable-symbols was given.
8402if test "${enable_symbols+set}" = set; then :
8403  enableval=$enable_symbols; tcl_ok=$enableval
8404else
8405  tcl_ok=no
8406fi
8407
8408    DBGX=""
8409    if test "$tcl_ok" = "no"; then
8410	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
8411	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
8412	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8413$as_echo "no" >&6; }
8414    else
8415	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
8416	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
8417	if test "$tcl_ok" = "yes"; then
8418	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5
8419$as_echo "yes (standard debugging)" >&6; }
8420	fi
8421    fi
8422    # TEA specific:
8423    if test "${TEA_PLATFORM}" != "windows" ; then
8424	LDFLAGS_DEFAULT="${LDFLAGS}"
8425    fi
8426
8427
8428
8429
8430    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
8431
8432$as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h
8433
8434    fi
8435
8436    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
8437	if test "$tcl_ok" = "all"; then
8438	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem debugging" >&5
8439$as_echo "enabled symbols mem debugging" >&6; }
8440	else
8441	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5
8442$as_echo "enabled $tcl_ok debugging" >&6; }
8443	fi
8444    fi
8445
8446
8447#--------------------------------------------------------------------
8448# Everyone should be linking against the Tcl stub library.  If you
8449# can't for some reason, remove this definition.  If you aren't using
8450# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
8451# link against the non-stubbed Tcl library.  Add Tk too if necessary.
8452#--------------------------------------------------------------------
8453
8454
8455$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h
8456
8457#AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
8458
8459#--------------------------------------------------------------------
8460# This macro generates a line to use when building a library.  It
8461# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
8462# and TEA_LOAD_TCLCONFIG macros above.
8463#--------------------------------------------------------------------
8464
8465
8466    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
8467	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
8468	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
8469	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8470/* end confdefs.h.  */
8471
8472#if defined(_MSC_VER) && _MSC_VER >= 1400
8473print("manifest needed")
8474#endif
8475
8476_ACEOF
8477if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8478  $EGREP "manifest needed" >/dev/null 2>&1; then :
8479
8480	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
8481	VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi"
8482	VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1 ; fi"
8483	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
8484
8485    CLEANFILES="$CLEANFILES *.manifest"
8486
8487
8488fi
8489rm -f conftest*
8490
8491	MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\$@ \$(PKG_STUB_OBJECTS)"
8492    else
8493	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
8494	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
8495	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
8496    fi
8497
8498    if test "${SHARED_BUILD}" = "1" ; then
8499	MAKE_LIB="${MAKE_SHARED_LIB} "
8500    else
8501	MAKE_LIB="${MAKE_STATIC_LIB} "
8502    fi
8503
8504    #--------------------------------------------------------------------
8505    # Shared libraries and static libraries have different names.
8506    # Use the double eval to make sure any variables in the suffix is
8507    # substituted. (@@@ Might not be necessary anymore)
8508    #--------------------------------------------------------------------
8509
8510    if test "${TEA_PLATFORM}" = "windows" ; then
8511	if test "${SHARED_BUILD}" = "1" ; then
8512	    # We force the unresolved linking of symbols that are really in
8513	    # the private libraries of Tcl and Tk.
8514	    if test x"${TK_BIN_DIR}" != x ; then
8515		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
8516	    fi
8517	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
8518	    if test "$GCC" = "yes"; then
8519		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
8520	    fi
8521	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
8522	else
8523	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
8524	    if test "$GCC" = "yes"; then
8525		PKG_LIB_FILE=lib${PKG_LIB_FILE}
8526	    fi
8527	fi
8528	# Some packages build their own stubs libraries
8529	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
8530	if test "$GCC" = "yes"; then
8531	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
8532	fi
8533	# These aren't needed on Windows (either MSVC or gcc)
8534	RANLIB=:
8535	RANLIB_STUB=:
8536    else
8537	RANLIB_STUB="${RANLIB}"
8538	if test "${SHARED_BUILD}" = "1" ; then
8539	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
8540	    if test x"${TK_BIN_DIR}" != x ; then
8541		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
8542	    fi
8543	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
8544	    RANLIB=:
8545	else
8546	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
8547	fi
8548	# Some packages build their own stubs libraries
8549	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
8550    fi
8551
8552    # These are escaped so that only CFLAGS is picked up at configure time.
8553    # The other values will be substituted at make time.
8554    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
8555    if test "${SHARED_BUILD}" = "1" ; then
8556	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
8557    fi
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568#--------------------------------------------------------------------
8569# Determine the name of the tclsh and/or wish executables in the
8570# Tcl and Tk build directories or the location they were installed
8571# into. These paths are used to support running test cases only,
8572# the Makefile should not be making use of these paths to generate
8573# a pkgIndex.tcl file or anything else at extension build time.
8574#--------------------------------------------------------------------
8575
8576
8577    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5
8578$as_echo_n "checking for tclsh... " >&6; }
8579    if test -f "${TCL_BIN_DIR}/Makefile" ; then
8580        # tclConfig.sh is in Tcl build directory
8581        if test "${TEA_PLATFORM}" = "windows"; then
8582          if test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}" ; then
8583            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
8584          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}s${EXEEXT}" ; then
8585            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}s${EXEEXT}"
8586          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}t${EXEEXT}" ; then
8587            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}t${EXEEXT}"
8588          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}st${EXEEXT}" ; then
8589            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}st${EXEEXT}"
8590          fi
8591        else
8592            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
8593        fi
8594    else
8595        # tclConfig.sh is in install location
8596        if test "${TEA_PLATFORM}" = "windows"; then
8597            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
8598        else
8599            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
8600        fi
8601        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
8602              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
8603              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
8604        for i in $list ; do
8605            if test -f "$i/${TCLSH_PROG}" ; then
8606                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
8607                break
8608            fi
8609        done
8610        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
8611    fi
8612    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${TCLSH_PROG}" >&5
8613$as_echo "${TCLSH_PROG}" >&6; }
8614
8615
8616#TEA_PROG_WISH
8617
8618#--------------------------------------------------------------------
8619# Add some private preprocessor options
8620#--------------------------------------------------------------------
8621
8622
8623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable dtd support" >&5
8624$as_echo_n "checking whether to enable dtd support... " >&6; }
8625    # Check whether --enable-dtd was given.
8626if test "${enable_dtd+set}" = set; then :
8627  enableval=$enable_dtd; tcl_ok=$enableval
8628else
8629  tcl_ok=yes
8630fi
8631
8632
8633    if test "${enable_dtd+set}" = set; then
8634        enableval="$enable_dtd"
8635        tcl_ok=$enableval
8636    else
8637        tcl_ok=yes
8638    fi
8639
8640    if test "$tcl_ok" = "yes" ; then
8641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8642$as_echo "yes" >&6; }
8643        $as_echo "#define XML_DTD 1" >>confdefs.h
8644
8645    else
8646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8647$as_echo "no" >&6; }
8648    fi
8649
8650
8651    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable namespace support" >&5
8652$as_echo_n "checking whether to enable namespace support... " >&6; }
8653    # Check whether --enable-ns was given.
8654if test "${enable_ns+set}" = set; then :
8655  enableval=$enable_ns; tcl_ok=$enableval
8656else
8657  tcl_ok=yes
8658fi
8659
8660
8661    if test "${enable_ns+set}" = set; then
8662        enableval="$enable_ns"
8663        tcl_ok=$enableval
8664    else
8665        tcl_ok=yes
8666    fi
8667
8668    if test "$tcl_ok" = "yes" ; then
8669        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8670$as_echo "yes" >&6; }
8671        $as_echo "#define XML_NS 1" >>confdefs.h
8672
8673    else
8674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8675$as_echo "no" >&6; }
8676    fi
8677
8678
8679    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable built-in unknown command" >&5
8680$as_echo_n "checking whether to enable built-in unknown command... " >&6; }
8681    # Check whether --enable-ucmd was given.
8682if test "${enable_ucmd+set}" = set; then :
8683  enableval=$enable_ucmd; tcl_ok=$enableval
8684else
8685  tcl_ok=no
8686fi
8687
8688
8689    if test "${enable_unknown+set}" = set; then
8690        enableval="$enable_unknown"
8691        tcl_ok=$enableval
8692    else
8693        tcl_ok=no
8694    fi
8695
8696    if test "$tcl_ok" = "no" ; then
8697        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8698$as_echo "no" >&6; }
8699        $as_echo "#define TDOM_NO_UNKNOWN_CMD 1" >>confdefs.h
8700
8701    else
8702        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8703$as_echo "yes" >&6; }
8704    fi
8705
8706
8707    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable tDOMs block allocator" >&5
8708$as_echo_n "checking whether to enable tDOMs block allocator... " >&6; }
8709    # Check whether --enable-tdomalloc was given.
8710if test "${enable_tdomalloc+set}" = set; then :
8711  enableval=$enable_tdomalloc; tcl_ok=$enableval
8712else
8713  tcl_ok=no
8714fi
8715
8716
8717    if test "${enable_tdomalloc+set}" = set; then
8718        enableval="$enable_tdomalloc"
8719        tcl_ok=$enableval
8720    else
8721        tcl_ok=no
8722    fi
8723
8724    if test "$tcl_ok" = "yes" ; then
8725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8726$as_echo "yes" >&6; }
8727
8728    vars="generic/domalloc.c"
8729    for i in $vars; do
8730	case $i in
8731	    \$*)
8732		# allow $-var names
8733		PKG_SOURCES="$PKG_SOURCES $i"
8734		PKG_OBJECTS="$PKG_OBJECTS $i"
8735		;;
8736	    *)
8737		# check for existence - allows for generic/win/unix VPATH
8738		# To add more dirs here (like 'src'), you have to update VPATH
8739		# in Makefile.in as well
8740		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
8741		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
8742		    -a ! -f "${srcdir}/macosx/$i" \
8743		    ; then
8744		    as_fn_error $? "could not find source file '$i'" "$LINENO" 5
8745		fi
8746		PKG_SOURCES="$PKG_SOURCES $i"
8747		# this assumes it is in a VPATH dir
8748		i=`basename $i`
8749		# handle user calling this before or after TEA_SETUP_COMPILER
8750		if test x"${OBJEXT}" != x ; then
8751		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
8752		else
8753		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
8754		fi
8755		PKG_OBJECTS="$PKG_OBJECTS $j"
8756		;;
8757	esac
8758    done
8759
8760
8761
8762    else
8763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8764$as_echo "no" >&6; }
8765        $as_echo "#define USE_NORMAL_ALLOCATOR 1" >>confdefs.h
8766
8767    fi
8768
8769
8770    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable lower limit for XML ns declarations per document" >&5
8771$as_echo_n "checking whether to enable lower limit for XML ns declarations per document... " >&6; }
8772    # Check whether --enable-lessns was given.
8773if test "${enable_lessns+set}" = set; then :
8774  enableval=$enable_lessns; tcl_ok=$enableval
8775else
8776  tcl_ok=no
8777fi
8778
8779
8780    if test "${enable_lessns+set}" = set; then
8781        enableval="$enable_lessns"
8782        tcl_ok=$enableval
8783    else
8784        tcl_ok=no
8785    fi
8786
8787    if test "$tcl_ok" = "yes" ; then
8788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8789$as_echo "yes" >&6; }
8790        $as_echo "#define TDOM_LESS_NS 1" >>confdefs.h
8791
8792    else
8793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8794$as_echo "no" >&6; }
8795    fi
8796
8797
8798TDOMSHELL=tcldomsh
8799
8800
8801
8802    #--------------------------------------------------------------------
8803    # These are for ${PACKAGE_NAME}Config.sh
8804    #--------------------------------------------------------------------
8805
8806    # pkglibdir must be a fully qualified path and (not ${exec_prefix}/lib)
8807    eval pkglibdir="${libdir}/${PACKAGE_NAME}${PACKAGE_VERSION}"
8808    if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
8809	eval PKG_STUB_LIB_FLAG="-l${PACKAGE_NAME}stub${PACKAGE_VERSION}"
8810    else
8811	eval PKG_STUB_LIB_FLAG="-l${PACKAGE_NAME}stub`echo ${PACKAGE_VERSION} | tr -d .`"
8812    fi
8813    PKG_BUILD_STUB_LIB_SPEC="-L`pwd` ${PKG_STUB_LIB_FLAG}"
8814    PKG_STUB_LIB_SPEC="-L${pkglibdir} ${PKG_STUB_LIB_FLAG}"
8815    PKG_BUILD_STUB_LIB_PATH="`pwd`/${PKG_STUB_LIB_FILE}"
8816    PKG_STUB_LIB_PATH="${pkglibdir}/${PKG_STUB_LIB_FILE}"
8817
8818
8819
8820
8821
8822
8823
8824#--------------------------------------------------------------------
8825# Finally, substitute all of the various values into the Makefile.
8826# You may alternatively have a special pkgIndex.tcl.in or other files
8827# which require substituting th AC variables in.  Include these here.
8828#--------------------------------------------------------------------
8829
8830ac_config_files="$ac_config_files Makefile tdomConfig.sh"
8831
8832cat >confcache <<\_ACEOF
8833# This file is a shell script that caches the results of configure
8834# tests run on this system so they can be shared between configure
8835# scripts and configure runs, see configure's option --config-cache.
8836# It is not useful on other systems.  If it contains results you don't
8837# want to keep, you may remove or edit it.
8838#
8839# config.status only pays attention to the cache file if you give it
8840# the --recheck option to rerun configure.
8841#
8842# `ac_cv_env_foo' variables (set or unset) will be overridden when
8843# loading this file, other *unset* `ac_cv_foo' will be assigned the
8844# following values.
8845
8846_ACEOF
8847
8848# The following way of writing the cache mishandles newlines in values,
8849# but we know of no workaround that is simple, portable, and efficient.
8850# So, we kill variables containing newlines.
8851# Ultrix sh set writes to stderr and can't be redirected directly,
8852# and sets the high bit in the cache file unless we assign to the vars.
8853(
8854  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
8855    eval ac_val=\$$ac_var
8856    case $ac_val in #(
8857    *${as_nl}*)
8858      case $ac_var in #(
8859      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
8860$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
8861      esac
8862      case $ac_var in #(
8863      _ | IFS | as_nl) ;; #(
8864      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
8865      *) { eval $ac_var=; unset $ac_var;} ;;
8866      esac ;;
8867    esac
8868  done
8869
8870  (set) 2>&1 |
8871    case $as_nl`(ac_space=' '; set) 2>&1` in #(
8872    *${as_nl}ac_space=\ *)
8873      # `set' does not quote correctly, so add quotes: double-quote
8874      # substitution turns \\\\ into \\, and sed turns \\ into \.
8875      sed -n \
8876	"s/'/'\\\\''/g;
8877	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
8878      ;; #(
8879    *)
8880      # `set' quotes correctly as required by POSIX, so do not add quotes.
8881      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
8882      ;;
8883    esac |
8884    sort
8885) |
8886  sed '
8887     /^ac_cv_env_/b end
8888     t clear
8889     :clear
8890     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
8891     t end
8892     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
8893     :end' >>confcache
8894if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
8895  if test -w "$cache_file"; then
8896    if test "x$cache_file" != "x/dev/null"; then
8897      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
8898$as_echo "$as_me: updating cache $cache_file" >&6;}
8899      if test ! -f "$cache_file" || test -h "$cache_file"; then
8900	cat confcache >"$cache_file"
8901      else
8902        case $cache_file in #(
8903        */* | ?:*)
8904	  mv -f confcache "$cache_file"$$ &&
8905	  mv -f "$cache_file"$$ "$cache_file" ;; #(
8906        *)
8907	  mv -f confcache "$cache_file" ;;
8908	esac
8909      fi
8910    fi
8911  else
8912    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
8913$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
8914  fi
8915fi
8916rm -f confcache
8917
8918test "x$prefix" = xNONE && prefix=$ac_default_prefix
8919# Let make expand exec_prefix.
8920test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8921
8922# Transform confdefs.h into DEFS.
8923# Protect against shell expansion while executing Makefile rules.
8924# Protect against Makefile macro expansion.
8925#
8926# If the first sed substitution is executed (which looks for macros that
8927# take arguments), then branch to the quote section.  Otherwise,
8928# look for a macro that doesn't take arguments.
8929ac_script='
8930:mline
8931/\\$/{
8932 N
8933 s,\\\n,,
8934 b mline
8935}
8936t clear
8937:clear
8938s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
8939t quote
8940s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
8941t quote
8942b any
8943:quote
8944s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
8945s/\[/\\&/g
8946s/\]/\\&/g
8947s/\$/$$/g
8948H
8949:any
8950${
8951	g
8952	s/^\n//
8953	s/\n/ /g
8954	p
8955}
8956'
8957DEFS=`sed -n "$ac_script" confdefs.h`
8958
8959
8960ac_libobjs=
8961ac_ltlibobjs=
8962U=
8963for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
8964  # 1. Remove the extension, and $U if already installed.
8965  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
8966  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
8967  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
8968  #    will be set to the directory where LIBOBJS objects are built.
8969  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
8970  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
8971done
8972LIBOBJS=$ac_libobjs
8973
8974LTLIBOBJS=$ac_ltlibobjs
8975
8976
8977
8978CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
8979
8980: "${CONFIG_STATUS=./config.status}"
8981ac_write_fail=0
8982ac_clean_files_save=$ac_clean_files
8983ac_clean_files="$ac_clean_files $CONFIG_STATUS"
8984{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
8985$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
8986as_write_fail=0
8987cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
8988#! $SHELL
8989# Generated by $as_me.
8990# Run this file to recreate the current configuration.
8991# Compiler output produced by configure, useful for debugging
8992# configure, is in config.log if it exists.
8993
8994debug=false
8995ac_cs_recheck=false
8996ac_cs_silent=false
8997
8998SHELL=\${CONFIG_SHELL-$SHELL}
8999export SHELL
9000_ASEOF
9001cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
9002## -------------------- ##
9003## M4sh Initialization. ##
9004## -------------------- ##
9005
9006# Be more Bourne compatible
9007DUALCASE=1; export DUALCASE # for MKS sh
9008if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
9009  emulate sh
9010  NULLCMD=:
9011  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
9012  # is contrary to our usage.  Disable this feature.
9013  alias -g '${1+"$@"}'='"$@"'
9014  setopt NO_GLOB_SUBST
9015else
9016  case `(set -o) 2>/dev/null` in #(
9017  *posix*) :
9018    set -o posix ;; #(
9019  *) :
9020     ;;
9021esac
9022fi
9023
9024
9025as_nl='
9026'
9027export as_nl
9028# Printing a long string crashes Solaris 7 /usr/bin/printf.
9029as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
9030as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
9031as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
9032# Prefer a ksh shell builtin over an external printf program on Solaris,
9033# but without wasting forks for bash or zsh.
9034if test -z "$BASH_VERSION$ZSH_VERSION" \
9035    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
9036  as_echo='print -r --'
9037  as_echo_n='print -rn --'
9038elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
9039  as_echo='printf %s\n'
9040  as_echo_n='printf %s'
9041else
9042  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
9043    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
9044    as_echo_n='/usr/ucb/echo -n'
9045  else
9046    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
9047    as_echo_n_body='eval
9048      arg=$1;
9049      case $arg in #(
9050      *"$as_nl"*)
9051	expr "X$arg" : "X\\(.*\\)$as_nl";
9052	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
9053      esac;
9054      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
9055    '
9056    export as_echo_n_body
9057    as_echo_n='sh -c $as_echo_n_body as_echo'
9058  fi
9059  export as_echo_body
9060  as_echo='sh -c $as_echo_body as_echo'
9061fi
9062
9063# The user is always right.
9064if test "${PATH_SEPARATOR+set}" != set; then
9065  PATH_SEPARATOR=:
9066  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
9067    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
9068      PATH_SEPARATOR=';'
9069  }
9070fi
9071
9072
9073# IFS
9074# We need space, tab and new line, in precisely that order.  Quoting is
9075# there to prevent editors from complaining about space-tab.
9076# (If _AS_PATH_WALK were called with IFS unset, it would disable word
9077# splitting by setting IFS to empty value.)
9078IFS=" ""	$as_nl"
9079
9080# Find who we are.  Look in the path if we contain no directory separator.
9081as_myself=
9082case $0 in #((
9083  *[\\/]* ) as_myself=$0 ;;
9084  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9085for as_dir in $PATH
9086do
9087  IFS=$as_save_IFS
9088  test -z "$as_dir" && as_dir=.
9089    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
9090  done
9091IFS=$as_save_IFS
9092
9093     ;;
9094esac
9095# We did not find ourselves, most probably we were run as `sh COMMAND'
9096# in which case we are not to be found in the path.
9097if test "x$as_myself" = x; then
9098  as_myself=$0
9099fi
9100if test ! -f "$as_myself"; then
9101  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
9102  exit 1
9103fi
9104
9105# Unset variables that we do not need and which cause bugs (e.g. in
9106# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
9107# suppresses any "Segmentation fault" message there.  '((' could
9108# trigger a bug in pdksh 5.2.14.
9109for as_var in BASH_ENV ENV MAIL MAILPATH
9110do eval test x\${$as_var+set} = xset \
9111  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
9112done
9113PS1='$ '
9114PS2='> '
9115PS4='+ '
9116
9117# NLS nuisances.
9118LC_ALL=C
9119export LC_ALL
9120LANGUAGE=C
9121export LANGUAGE
9122
9123# CDPATH.
9124(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
9125
9126
9127# as_fn_error STATUS ERROR [LINENO LOG_FD]
9128# ----------------------------------------
9129# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
9130# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
9131# script with STATUS, using 1 if that was 0.
9132as_fn_error ()
9133{
9134  as_status=$1; test $as_status -eq 0 && as_status=1
9135  if test "$4"; then
9136    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
9137    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
9138  fi
9139  $as_echo "$as_me: error: $2" >&2
9140  as_fn_exit $as_status
9141} # as_fn_error
9142
9143
9144# as_fn_set_status STATUS
9145# -----------------------
9146# Set $? to STATUS, without forking.
9147as_fn_set_status ()
9148{
9149  return $1
9150} # as_fn_set_status
9151
9152# as_fn_exit STATUS
9153# -----------------
9154# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
9155as_fn_exit ()
9156{
9157  set +e
9158  as_fn_set_status $1
9159  exit $1
9160} # as_fn_exit
9161
9162# as_fn_unset VAR
9163# ---------------
9164# Portably unset VAR.
9165as_fn_unset ()
9166{
9167  { eval $1=; unset $1;}
9168}
9169as_unset=as_fn_unset
9170# as_fn_append VAR VALUE
9171# ----------------------
9172# Append the text in VALUE to the end of the definition contained in VAR. Take
9173# advantage of any shell optimizations that allow amortized linear growth over
9174# repeated appends, instead of the typical quadratic growth present in naive
9175# implementations.
9176if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
9177  eval 'as_fn_append ()
9178  {
9179    eval $1+=\$2
9180  }'
9181else
9182  as_fn_append ()
9183  {
9184    eval $1=\$$1\$2
9185  }
9186fi # as_fn_append
9187
9188# as_fn_arith ARG...
9189# ------------------
9190# Perform arithmetic evaluation on the ARGs, and store the result in the
9191# global $as_val. Take advantage of shells that can avoid forks. The arguments
9192# must be portable across $(()) and expr.
9193if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
9194  eval 'as_fn_arith ()
9195  {
9196    as_val=$(( $* ))
9197  }'
9198else
9199  as_fn_arith ()
9200  {
9201    as_val=`expr "$@" || test $? -eq 1`
9202  }
9203fi # as_fn_arith
9204
9205
9206if expr a : '\(a\)' >/dev/null 2>&1 &&
9207   test "X`expr 00001 : '.*\(...\)'`" = X001; then
9208  as_expr=expr
9209else
9210  as_expr=false
9211fi
9212
9213if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
9214  as_basename=basename
9215else
9216  as_basename=false
9217fi
9218
9219if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
9220  as_dirname=dirname
9221else
9222  as_dirname=false
9223fi
9224
9225as_me=`$as_basename -- "$0" ||
9226$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
9227	 X"$0" : 'X\(//\)$' \| \
9228	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
9229$as_echo X/"$0" |
9230    sed '/^.*\/\([^/][^/]*\)\/*$/{
9231	    s//\1/
9232	    q
9233	  }
9234	  /^X\/\(\/\/\)$/{
9235	    s//\1/
9236	    q
9237	  }
9238	  /^X\/\(\/\).*/{
9239	    s//\1/
9240	    q
9241	  }
9242	  s/.*/./; q'`
9243
9244# Avoid depending upon Character Ranges.
9245as_cr_letters='abcdefghijklmnopqrstuvwxyz'
9246as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
9247as_cr_Letters=$as_cr_letters$as_cr_LETTERS
9248as_cr_digits='0123456789'
9249as_cr_alnum=$as_cr_Letters$as_cr_digits
9250
9251ECHO_C= ECHO_N= ECHO_T=
9252case `echo -n x` in #(((((
9253-n*)
9254  case `echo 'xy\c'` in
9255  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
9256  xy)  ECHO_C='\c';;
9257  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
9258       ECHO_T='	';;
9259  esac;;
9260*)
9261  ECHO_N='-n';;
9262esac
9263
9264rm -f conf$$ conf$$.exe conf$$.file
9265if test -d conf$$.dir; then
9266  rm -f conf$$.dir/conf$$.file
9267else
9268  rm -f conf$$.dir
9269  mkdir conf$$.dir 2>/dev/null
9270fi
9271if (echo >conf$$.file) 2>/dev/null; then
9272  if ln -s conf$$.file conf$$ 2>/dev/null; then
9273    as_ln_s='ln -s'
9274    # ... but there are two gotchas:
9275    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
9276    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
9277    # In both cases, we have to default to `cp -pR'.
9278    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
9279      as_ln_s='cp -pR'
9280  elif ln conf$$.file conf$$ 2>/dev/null; then
9281    as_ln_s=ln
9282  else
9283    as_ln_s='cp -pR'
9284  fi
9285else
9286  as_ln_s='cp -pR'
9287fi
9288rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
9289rmdir conf$$.dir 2>/dev/null
9290
9291
9292# as_fn_mkdir_p
9293# -------------
9294# Create "$as_dir" as a directory, including parents if necessary.
9295as_fn_mkdir_p ()
9296{
9297
9298  case $as_dir in #(
9299  -*) as_dir=./$as_dir;;
9300  esac
9301  test -d "$as_dir" || eval $as_mkdir_p || {
9302    as_dirs=
9303    while :; do
9304      case $as_dir in #(
9305      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
9306      *) as_qdir=$as_dir;;
9307      esac
9308      as_dirs="'$as_qdir' $as_dirs"
9309      as_dir=`$as_dirname -- "$as_dir" ||
9310$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9311	 X"$as_dir" : 'X\(//\)[^/]' \| \
9312	 X"$as_dir" : 'X\(//\)$' \| \
9313	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
9314$as_echo X"$as_dir" |
9315    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9316	    s//\1/
9317	    q
9318	  }
9319	  /^X\(\/\/\)[^/].*/{
9320	    s//\1/
9321	    q
9322	  }
9323	  /^X\(\/\/\)$/{
9324	    s//\1/
9325	    q
9326	  }
9327	  /^X\(\/\).*/{
9328	    s//\1/
9329	    q
9330	  }
9331	  s/.*/./; q'`
9332      test -d "$as_dir" && break
9333    done
9334    test -z "$as_dirs" || eval "mkdir $as_dirs"
9335  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
9336
9337
9338} # as_fn_mkdir_p
9339if mkdir -p . 2>/dev/null; then
9340  as_mkdir_p='mkdir -p "$as_dir"'
9341else
9342  test -d ./-p && rmdir ./-p
9343  as_mkdir_p=false
9344fi
9345
9346
9347# as_fn_executable_p FILE
9348# -----------------------
9349# Test if FILE is an executable regular file.
9350as_fn_executable_p ()
9351{
9352  test -f "$1" && test -x "$1"
9353} # as_fn_executable_p
9354as_test_x='test -x'
9355as_executable_p=as_fn_executable_p
9356
9357# Sed expression to map a string onto a valid CPP name.
9358as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
9359
9360# Sed expression to map a string onto a valid variable name.
9361as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
9362
9363
9364exec 6>&1
9365## ----------------------------------- ##
9366## Main body of $CONFIG_STATUS script. ##
9367## ----------------------------------- ##
9368_ASEOF
9369test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
9370
9371cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9372# Save the log message, to keep $0 and so on meaningful, and to
9373# report actual input values of CONFIG_FILES etc. instead of their
9374# values after options handling.
9375ac_log="
9376This file was extended by tdom $as_me 0.9.1, which was
9377generated by GNU Autoconf 2.69.  Invocation command line was
9378
9379  CONFIG_FILES    = $CONFIG_FILES
9380  CONFIG_HEADERS  = $CONFIG_HEADERS
9381  CONFIG_LINKS    = $CONFIG_LINKS
9382  CONFIG_COMMANDS = $CONFIG_COMMANDS
9383  $ $0 $@
9384
9385on `(hostname || uname -n) 2>/dev/null | sed 1q`
9386"
9387
9388_ACEOF
9389
9390case $ac_config_files in *"
9391"*) set x $ac_config_files; shift; ac_config_files=$*;;
9392esac
9393
9394
9395
9396cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9397# Files that config.status was made for.
9398config_files="$ac_config_files"
9399
9400_ACEOF
9401
9402cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9403ac_cs_usage="\
9404\`$as_me' instantiates files and other configuration actions
9405from templates according to the current configuration.  Unless the files
9406and actions are specified as TAGs, all are instantiated by default.
9407
9408Usage: $0 [OPTION]... [TAG]...
9409
9410  -h, --help       print this help, then exit
9411  -V, --version    print version number and configuration settings, then exit
9412      --config     print configuration, then exit
9413  -q, --quiet, --silent
9414                   do not print progress messages
9415  -d, --debug      don't remove temporary files
9416      --recheck    update $as_me by reconfiguring in the same conditions
9417      --file=FILE[:TEMPLATE]
9418                   instantiate the configuration file FILE
9419
9420Configuration files:
9421$config_files
9422
9423Report bugs to the package provider."
9424
9425_ACEOF
9426cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9427ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
9428ac_cs_version="\\
9429tdom config.status 0.9.1
9430configured by $0, generated by GNU Autoconf 2.69,
9431  with options \\"\$ac_cs_config\\"
9432
9433Copyright (C) 2012 Free Software Foundation, Inc.
9434This config.status script is free software; the Free Software Foundation
9435gives unlimited permission to copy, distribute and modify it."
9436
9437ac_pwd='$ac_pwd'
9438srcdir='$srcdir'
9439test -n "\$AWK" || AWK=awk
9440_ACEOF
9441
9442cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9443# The default lists apply if the user does not specify any file.
9444ac_need_defaults=:
9445while test $# != 0
9446do
9447  case $1 in
9448  --*=?*)
9449    ac_option=`expr "X$1" : 'X\([^=]*\)='`
9450    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
9451    ac_shift=:
9452    ;;
9453  --*=)
9454    ac_option=`expr "X$1" : 'X\([^=]*\)='`
9455    ac_optarg=
9456    ac_shift=:
9457    ;;
9458  *)
9459    ac_option=$1
9460    ac_optarg=$2
9461    ac_shift=shift
9462    ;;
9463  esac
9464
9465  case $ac_option in
9466  # Handling of the options.
9467  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9468    ac_cs_recheck=: ;;
9469  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
9470    $as_echo "$ac_cs_version"; exit ;;
9471  --config | --confi | --conf | --con | --co | --c )
9472    $as_echo "$ac_cs_config"; exit ;;
9473  --debug | --debu | --deb | --de | --d | -d )
9474    debug=: ;;
9475  --file | --fil | --fi | --f )
9476    $ac_shift
9477    case $ac_optarg in
9478    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
9479    '') as_fn_error $? "missing file argument" ;;
9480    esac
9481    as_fn_append CONFIG_FILES " '$ac_optarg'"
9482    ac_need_defaults=false;;
9483  --he | --h |  --help | --hel | -h )
9484    $as_echo "$ac_cs_usage"; exit ;;
9485  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
9486  | -silent | --silent | --silen | --sile | --sil | --si | --s)
9487    ac_cs_silent=: ;;
9488
9489  # This is an error.
9490  -*) as_fn_error $? "unrecognized option: \`$1'
9491Try \`$0 --help' for more information." ;;
9492
9493  *) as_fn_append ac_config_targets " $1"
9494     ac_need_defaults=false ;;
9495
9496  esac
9497  shift
9498done
9499
9500ac_configure_extra_args=
9501
9502if $ac_cs_silent; then
9503  exec 6>/dev/null
9504  ac_configure_extra_args="$ac_configure_extra_args --silent"
9505fi
9506
9507_ACEOF
9508cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9509if \$ac_cs_recheck; then
9510  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
9511  shift
9512  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
9513  CONFIG_SHELL='$SHELL'
9514  export CONFIG_SHELL
9515  exec "\$@"
9516fi
9517
9518_ACEOF
9519cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9520exec 5>>config.log
9521{
9522  echo
9523  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
9524## Running $as_me. ##
9525_ASBOX
9526  $as_echo "$ac_log"
9527} >&5
9528
9529_ACEOF
9530cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9531_ACEOF
9532
9533cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9534
9535# Handling of arguments.
9536for ac_config_target in $ac_config_targets
9537do
9538  case $ac_config_target in
9539    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
9540    "tdomConfig.sh") CONFIG_FILES="$CONFIG_FILES tdomConfig.sh" ;;
9541
9542  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
9543  esac
9544done
9545
9546
9547# If the user did not use the arguments to specify the items to instantiate,
9548# then the envvar interface is used.  Set only those that are not.
9549# We use the long form for the default assignment because of an extremely
9550# bizarre bug on SunOS 4.1.3.
9551if $ac_need_defaults; then
9552  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
9553fi
9554
9555# Have a temporary directory for convenience.  Make it in the build tree
9556# simply because there is no reason against having it here, and in addition,
9557# creating and moving files from /tmp can sometimes cause problems.
9558# Hook for its removal unless debugging.
9559# Note that there is a small window in which the directory will not be cleaned:
9560# after its creation but before its name has been assigned to `$tmp'.
9561$debug ||
9562{
9563  tmp= ac_tmp=
9564  trap 'exit_status=$?
9565  : "${ac_tmp:=$tmp}"
9566  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
9567' 0
9568  trap 'as_fn_exit 1' 1 2 13 15
9569}
9570# Create a (secure) tmp directory for tmp files.
9571
9572{
9573  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
9574  test -d "$tmp"
9575}  ||
9576{
9577  tmp=./conf$$-$RANDOM
9578  (umask 077 && mkdir "$tmp")
9579} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
9580ac_tmp=$tmp
9581
9582# Set up the scripts for CONFIG_FILES section.
9583# No need to generate them if there are no CONFIG_FILES.
9584# This happens for instance with `./config.status config.h'.
9585if test -n "$CONFIG_FILES"; then
9586
9587
9588ac_cr=`echo X | tr X '\015'`
9589# On cygwin, bash can eat \r inside `` if the user requested igncr.
9590# But we know of no other shell where ac_cr would be empty at this
9591# point, so we can use a bashism as a fallback.
9592if test "x$ac_cr" = x; then
9593  eval ac_cr=\$\'\\r\'
9594fi
9595ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
9596if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
9597  ac_cs_awk_cr='\\r'
9598else
9599  ac_cs_awk_cr=$ac_cr
9600fi
9601
9602echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
9603_ACEOF
9604
9605
9606{
9607  echo "cat >conf$$subs.awk <<_ACEOF" &&
9608  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
9609  echo "_ACEOF"
9610} >conf$$subs.sh ||
9611  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9612ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
9613ac_delim='%!_!# '
9614for ac_last_try in false false false false false :; do
9615  . ./conf$$subs.sh ||
9616    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9617
9618  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
9619  if test $ac_delim_n = $ac_delim_num; then
9620    break
9621  elif $ac_last_try; then
9622    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9623  else
9624    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
9625  fi
9626done
9627rm -f conf$$subs.sh
9628
9629cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9630cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
9631_ACEOF
9632sed -n '
9633h
9634s/^/S["/; s/!.*/"]=/
9635p
9636g
9637s/^[^!]*!//
9638:repl
9639t repl
9640s/'"$ac_delim"'$//
9641t delim
9642:nl
9643h
9644s/\(.\{148\}\)..*/\1/
9645t more1
9646s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
9647p
9648n
9649b repl
9650:more1
9651s/["\\]/\\&/g; s/^/"/; s/$/"\\/
9652p
9653g
9654s/.\{148\}//
9655t nl
9656:delim
9657h
9658s/\(.\{148\}\)..*/\1/
9659t more2
9660s/["\\]/\\&/g; s/^/"/; s/$/"/
9661p
9662b
9663:more2
9664s/["\\]/\\&/g; s/^/"/; s/$/"\\/
9665p
9666g
9667s/.\{148\}//
9668t delim
9669' <conf$$subs.awk | sed '
9670/^[^""]/{
9671  N
9672  s/\n//
9673}
9674' >>$CONFIG_STATUS || ac_write_fail=1
9675rm -f conf$$subs.awk
9676cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9677_ACAWK
9678cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
9679  for (key in S) S_is_set[key] = 1
9680  FS = ""
9681
9682}
9683{
9684  line = $ 0
9685  nfields = split(line, field, "@")
9686  substed = 0
9687  len = length(field[1])
9688  for (i = 2; i < nfields; i++) {
9689    key = field[i]
9690    keylen = length(key)
9691    if (S_is_set[key]) {
9692      value = S[key]
9693      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
9694      len += length(value) + length(field[++i])
9695      substed = 1
9696    } else
9697      len += 1 + keylen
9698  }
9699
9700  print line
9701}
9702
9703_ACAWK
9704_ACEOF
9705cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9706if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
9707  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
9708else
9709  cat
9710fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
9711  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
9712_ACEOF
9713
9714# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
9715# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
9716# trailing colons and then remove the whole line if VPATH becomes empty
9717# (actually we leave an empty line to preserve line numbers).
9718if test "x$srcdir" = x.; then
9719  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
9720h
9721s///
9722s/^/:/
9723s/[	 ]*$/:/
9724s/:\$(srcdir):/:/g
9725s/:\${srcdir}:/:/g
9726s/:@srcdir@:/:/g
9727s/^:*//
9728s/:*$//
9729x
9730s/\(=[	 ]*\).*/\1/
9731G
9732s/\n//
9733s/^[^=]*=[	 ]*$//
9734}'
9735fi
9736
9737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9738fi # test -n "$CONFIG_FILES"
9739
9740
9741eval set X "  :F $CONFIG_FILES      "
9742shift
9743for ac_tag
9744do
9745  case $ac_tag in
9746  :[FHLC]) ac_mode=$ac_tag; continue;;
9747  esac
9748  case $ac_mode$ac_tag in
9749  :[FHL]*:*);;
9750  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
9751  :[FH]-) ac_tag=-:-;;
9752  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
9753  esac
9754  ac_save_IFS=$IFS
9755  IFS=:
9756  set x $ac_tag
9757  IFS=$ac_save_IFS
9758  shift
9759  ac_file=$1
9760  shift
9761
9762  case $ac_mode in
9763  :L) ac_source=$1;;
9764  :[FH])
9765    ac_file_inputs=
9766    for ac_f
9767    do
9768      case $ac_f in
9769      -) ac_f="$ac_tmp/stdin";;
9770      *) # Look for the file first in the build tree, then in the source tree
9771	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
9772	 # because $ac_f cannot contain `:'.
9773	 test -f "$ac_f" ||
9774	   case $ac_f in
9775	   [\\/$]*) false;;
9776	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
9777	   esac ||
9778	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
9779      esac
9780      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
9781      as_fn_append ac_file_inputs " '$ac_f'"
9782    done
9783
9784    # Let's still pretend it is `configure' which instantiates (i.e., don't
9785    # use $as_me), people would be surprised to read:
9786    #    /* config.h.  Generated by config.status.  */
9787    configure_input='Generated from '`
9788	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
9789	`' by configure.'
9790    if test x"$ac_file" != x-; then
9791      configure_input="$ac_file.  $configure_input"
9792      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
9793$as_echo "$as_me: creating $ac_file" >&6;}
9794    fi
9795    # Neutralize special characters interpreted by sed in replacement strings.
9796    case $configure_input in #(
9797    *\&* | *\|* | *\\* )
9798       ac_sed_conf_input=`$as_echo "$configure_input" |
9799       sed 's/[\\\\&|]/\\\\&/g'`;; #(
9800    *) ac_sed_conf_input=$configure_input;;
9801    esac
9802
9803    case $ac_tag in
9804    *:-:* | *:-) cat >"$ac_tmp/stdin" \
9805      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
9806    esac
9807    ;;
9808  esac
9809
9810  ac_dir=`$as_dirname -- "$ac_file" ||
9811$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9812	 X"$ac_file" : 'X\(//\)[^/]' \| \
9813	 X"$ac_file" : 'X\(//\)$' \| \
9814	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
9815$as_echo X"$ac_file" |
9816    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9817	    s//\1/
9818	    q
9819	  }
9820	  /^X\(\/\/\)[^/].*/{
9821	    s//\1/
9822	    q
9823	  }
9824	  /^X\(\/\/\)$/{
9825	    s//\1/
9826	    q
9827	  }
9828	  /^X\(\/\).*/{
9829	    s//\1/
9830	    q
9831	  }
9832	  s/.*/./; q'`
9833  as_dir="$ac_dir"; as_fn_mkdir_p
9834  ac_builddir=.
9835
9836case "$ac_dir" in
9837.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
9838*)
9839  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
9840  # A ".." for each directory in $ac_dir_suffix.
9841  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
9842  case $ac_top_builddir_sub in
9843  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
9844  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
9845  esac ;;
9846esac
9847ac_abs_top_builddir=$ac_pwd
9848ac_abs_builddir=$ac_pwd$ac_dir_suffix
9849# for backward compatibility:
9850ac_top_builddir=$ac_top_build_prefix
9851
9852case $srcdir in
9853  .)  # We are building in place.
9854    ac_srcdir=.
9855    ac_top_srcdir=$ac_top_builddir_sub
9856    ac_abs_top_srcdir=$ac_pwd ;;
9857  [\\/]* | ?:[\\/]* )  # Absolute name.
9858    ac_srcdir=$srcdir$ac_dir_suffix;
9859    ac_top_srcdir=$srcdir
9860    ac_abs_top_srcdir=$srcdir ;;
9861  *) # Relative name.
9862    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
9863    ac_top_srcdir=$ac_top_build_prefix$srcdir
9864    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
9865esac
9866ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
9867
9868
9869  case $ac_mode in
9870  :F)
9871  #
9872  # CONFIG_FILE
9873  #
9874
9875_ACEOF
9876
9877cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9878# If the template does not know about datarootdir, expand it.
9879# FIXME: This hack should be removed a few years after 2.60.
9880ac_datarootdir_hack=; ac_datarootdir_seen=
9881ac_sed_dataroot='
9882/datarootdir/ {
9883  p
9884  q
9885}
9886/@datadir@/p
9887/@docdir@/p
9888/@infodir@/p
9889/@localedir@/p
9890/@mandir@/p'
9891case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
9892*datarootdir*) ac_datarootdir_seen=yes;;
9893*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
9894  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
9895$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
9896_ACEOF
9897cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9898  ac_datarootdir_hack='
9899  s&@datadir@&$datadir&g
9900  s&@docdir@&$docdir&g
9901  s&@infodir@&$infodir&g
9902  s&@localedir@&$localedir&g
9903  s&@mandir@&$mandir&g
9904  s&\\\${datarootdir}&$datarootdir&g' ;;
9905esac
9906_ACEOF
9907
9908# Neutralize VPATH when `$srcdir' = `.'.
9909# Shell code in configure.ac might set extrasub.
9910# FIXME: do we really want to maintain this feature?
9911cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9912ac_sed_extra="$ac_vpsub
9913$extrasub
9914_ACEOF
9915cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9916:t
9917/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
9918s|@configure_input@|$ac_sed_conf_input|;t t
9919s&@top_builddir@&$ac_top_builddir_sub&;t t
9920s&@top_build_prefix@&$ac_top_build_prefix&;t t
9921s&@srcdir@&$ac_srcdir&;t t
9922s&@abs_srcdir@&$ac_abs_srcdir&;t t
9923s&@top_srcdir@&$ac_top_srcdir&;t t
9924s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
9925s&@builddir@&$ac_builddir&;t t
9926s&@abs_builddir@&$ac_abs_builddir&;t t
9927s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
9928$ac_datarootdir_hack
9929"
9930eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
9931  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
9932
9933test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
9934  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
9935  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
9936      "$ac_tmp/out"`; test -z "$ac_out"; } &&
9937  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
9938which seems to be undefined.  Please make sure it is defined" >&5
9939$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
9940which seems to be undefined.  Please make sure it is defined" >&2;}
9941
9942  rm -f "$ac_tmp/stdin"
9943  case $ac_file in
9944  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
9945  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
9946  esac \
9947  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
9948 ;;
9949
9950
9951
9952  esac
9953
9954done # for ac_tag
9955
9956
9957as_fn_exit 0
9958_ACEOF
9959ac_clean_files=$ac_clean_files_save
9960
9961test $ac_write_fail = 0 ||
9962  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
9963
9964
9965# configure is writing to config.log, and then calls config.status.
9966# config.status does its own redirection, appending to config.log.
9967# Unfortunately, on DOS this fails, as config.log is still kept open
9968# by configure, so config.status won't be able to write to it; its
9969# output is simply discarded.  So we exec the FD to /dev/null,
9970# effectively closing config.log, so it can be properly (re)opened and
9971# appended to by config.status.  When coming back to configure, we
9972# need to make the FD available again.
9973if test "$no_create" != yes; then
9974  ac_cs_success=:
9975  ac_config_status_args=
9976  test "$silent" = yes &&
9977    ac_config_status_args="$ac_config_status_args --quiet"
9978  exec 5>/dev/null
9979  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
9980  exec 5>>config.log
9981  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
9982  # would make configure fail if this is the last instruction.
9983  $ac_cs_success || as_fn_exit 1
9984fi
9985if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
9986  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
9987$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
9988fi
9989
9990