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