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