OSDN Git Service

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