]> git.sven.stormbind.net Git - sven/tclcurl.git/blob - configure
Imported Upstream version 7.19.6
[sven/tclcurl.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.63 for TclCurl 7.19.6.
4 #
5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9 ## --------------------- ##
10 ## M4sh Initialization.  ##
11 ## --------------------- ##
12
13 # Be more Bourne compatible
14 DUALCASE=1; export DUALCASE # for MKS sh
15 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16   emulate sh
17   NULLCMD=:
18   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19   # is contrary to our usage.  Disable this feature.
20   alias -g '${1+"$@"}'='"$@"'
21   setopt NO_GLOB_SUBST
22 else
23   case `(set -o) 2>/dev/null` in
24   *posix*) set -o posix ;;
25 esac
26
27 fi
28
29
30
31
32 # PATH needs CR
33 # Avoid depending upon Character Ranges.
34 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37 as_cr_digits='0123456789'
38 as_cr_alnum=$as_cr_Letters$as_cr_digits
39
40 as_nl='
41 '
42 export as_nl
43 # Printing a long string crashes Solaris 7 /usr/bin/printf.
44 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
45 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
46 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
47 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48   as_echo='printf %s\n'
49   as_echo_n='printf %s'
50 else
51   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53     as_echo_n='/usr/ucb/echo -n'
54   else
55     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56     as_echo_n_body='eval
57       arg=$1;
58       case $arg in
59       *"$as_nl"*)
60         expr "X$arg" : "X\\(.*\\)$as_nl";
61         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62       esac;
63       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64     '
65     export as_echo_n_body
66     as_echo_n='sh -c $as_echo_n_body as_echo'
67   fi
68   export as_echo_body
69   as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74   PATH_SEPARATOR=:
75   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77       PATH_SEPARATOR=';'
78   }
79 fi
80
81 # Support unset when possible.
82 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
83   as_unset=unset
84 else
85   as_unset=false
86 fi
87
88
89 # IFS
90 # We need space, tab and new line, in precisely that order.  Quoting is
91 # there to prevent editors from complaining about space-tab.
92 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
93 # splitting by setting IFS to empty value.)
94 IFS=" ""        $as_nl"
95
96 # Find who we are.  Look in the path if we contain no directory separator.
97 case $0 in
98   *[\\/]* ) as_myself=$0 ;;
99   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
100 for as_dir in $PATH
101 do
102   IFS=$as_save_IFS
103   test -z "$as_dir" && as_dir=.
104   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
105 done
106 IFS=$as_save_IFS
107
108      ;;
109 esac
110 # We did not find ourselves, most probably we were run as `sh COMMAND'
111 # in which case we are not to be found in the path.
112 if test "x$as_myself" = x; then
113   as_myself=$0
114 fi
115 if test ! -f "$as_myself"; then
116   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
117   { (exit 1); exit 1; }
118 fi
119
120 # Work around bugs in pre-3.0 UWIN ksh.
121 for as_var in ENV MAIL MAILPATH
122 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
123 done
124 PS1='$ '
125 PS2='> '
126 PS4='+ '
127
128 # NLS nuisances.
129 LC_ALL=C
130 export LC_ALL
131 LANGUAGE=C
132 export LANGUAGE
133
134 # Required to use basename.
135 if expr a : '\(a\)' >/dev/null 2>&1 &&
136    test "X`expr 00001 : '.*\(...\)'`" = X001; then
137   as_expr=expr
138 else
139   as_expr=false
140 fi
141
142 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
143   as_basename=basename
144 else
145   as_basename=false
146 fi
147
148
149 # Name of the executable.
150 as_me=`$as_basename -- "$0" ||
151 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
152          X"$0" : 'X\(//\)$' \| \
153          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
154 $as_echo X/"$0" |
155     sed '/^.*\/\([^/][^/]*\)\/*$/{
156             s//\1/
157             q
158           }
159           /^X\/\(\/\/\)$/{
160             s//\1/
161             q
162           }
163           /^X\/\(\/\).*/{
164             s//\1/
165             q
166           }
167           s/.*/./; q'`
168
169 # CDPATH.
170 $as_unset CDPATH
171
172
173 if test "x$CONFIG_SHELL" = x; then
174   if (eval ":") 2>/dev/null; then
175   as_have_required=yes
176 else
177   as_have_required=no
178 fi
179
180   if test $as_have_required = yes &&     (eval ":
181 (as_func_return () {
182   (exit \$1)
183 }
184 as_func_success () {
185   as_func_return 0
186 }
187 as_func_failure () {
188   as_func_return 1
189 }
190 as_func_ret_success () {
191   return 0
192 }
193 as_func_ret_failure () {
194   return 1
195 }
196
197 exitcode=0
198 if as_func_success; then
199   :
200 else
201   exitcode=1
202   echo as_func_success failed.
203 fi
204
205 if as_func_failure; then
206   exitcode=1
207   echo as_func_failure succeeded.
208 fi
209
210 if as_func_ret_success; then
211   :
212 else
213   exitcode=1
214   echo as_func_ret_success failed.
215 fi
216
217 if as_func_ret_failure; then
218   exitcode=1
219   echo as_func_ret_failure succeeded.
220 fi
221
222 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
223   :
224 else
225   exitcode=1
226   echo positional parameters were not saved.
227 fi
228
229 test \$exitcode = 0) || { (exit 1); exit 1; }
230
231 (
232   as_lineno_1=\$LINENO
233   as_lineno_2=\$LINENO
234   test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
235   test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
236 ") 2> /dev/null; then
237   :
238 else
239   as_candidate_shells=
240     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
241 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
242 do
243   IFS=$as_save_IFS
244   test -z "$as_dir" && as_dir=.
245   case $as_dir in
246          /*)
247            for as_base in sh bash ksh sh5; do
248              as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
249            done;;
250        esac
251 done
252 IFS=$as_save_IFS
253
254
255       for as_shell in $as_candidate_shells $SHELL; do
256          # Try only shells that exist, to save several forks.
257          if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
258                 { ("$as_shell") 2> /dev/null <<\_ASEOF
259 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
260   emulate sh
261   NULLCMD=:
262   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
263   # is contrary to our usage.  Disable this feature.
264   alias -g '${1+"$@"}'='"$@"'
265   setopt NO_GLOB_SUBST
266 else
267   case `(set -o) 2>/dev/null` in
268   *posix*) set -o posix ;;
269 esac
270
271 fi
272
273
274 :
275 _ASEOF
276 }; then
277   CONFIG_SHELL=$as_shell
278                as_have_required=yes
279                if { "$as_shell" 2> /dev/null <<\_ASEOF
280 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
281   emulate sh
282   NULLCMD=:
283   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
284   # is contrary to our usage.  Disable this feature.
285   alias -g '${1+"$@"}'='"$@"'
286   setopt NO_GLOB_SUBST
287 else
288   case `(set -o) 2>/dev/null` in
289   *posix*) set -o posix ;;
290 esac
291
292 fi
293
294
295 :
296 (as_func_return () {
297   (exit $1)
298 }
299 as_func_success () {
300   as_func_return 0
301 }
302 as_func_failure () {
303   as_func_return 1
304 }
305 as_func_ret_success () {
306   return 0
307 }
308 as_func_ret_failure () {
309   return 1
310 }
311
312 exitcode=0
313 if as_func_success; then
314   :
315 else
316   exitcode=1
317   echo as_func_success failed.
318 fi
319
320 if as_func_failure; then
321   exitcode=1
322   echo as_func_failure succeeded.
323 fi
324
325 if as_func_ret_success; then
326   :
327 else
328   exitcode=1
329   echo as_func_ret_success failed.
330 fi
331
332 if as_func_ret_failure; then
333   exitcode=1
334   echo as_func_ret_failure succeeded.
335 fi
336
337 if ( set x; as_func_ret_success y && test x = "$1" ); then
338   :
339 else
340   exitcode=1
341   echo positional parameters were not saved.
342 fi
343
344 test $exitcode = 0) || { (exit 1); exit 1; }
345
346 (
347   as_lineno_1=$LINENO
348   as_lineno_2=$LINENO
349   test "x$as_lineno_1" != "x$as_lineno_2" &&
350   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
351
352 _ASEOF
353 }; then
354   break
355 fi
356
357 fi
358
359       done
360
361       if test "x$CONFIG_SHELL" != x; then
362   for as_var in BASH_ENV ENV
363         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
364         done
365         export CONFIG_SHELL
366         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
367 fi
368
369
370     if test $as_have_required = no; then
371   echo This script requires a shell more modern than all the
372       echo shells that I found on your system.  Please install a
373       echo modern shell, or manually run the script under such a
374       echo shell if you do have one.
375       { (exit 1); exit 1; }
376 fi
377
378
379 fi
380
381 fi
382
383
384
385 (eval "as_func_return () {
386   (exit \$1)
387 }
388 as_func_success () {
389   as_func_return 0
390 }
391 as_func_failure () {
392   as_func_return 1
393 }
394 as_func_ret_success () {
395   return 0
396 }
397 as_func_ret_failure () {
398   return 1
399 }
400
401 exitcode=0
402 if as_func_success; then
403   :
404 else
405   exitcode=1
406   echo as_func_success failed.
407 fi
408
409 if as_func_failure; then
410   exitcode=1
411   echo as_func_failure succeeded.
412 fi
413
414 if as_func_ret_success; then
415   :
416 else
417   exitcode=1
418   echo as_func_ret_success failed.
419 fi
420
421 if as_func_ret_failure; then
422   exitcode=1
423   echo as_func_ret_failure succeeded.
424 fi
425
426 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
427   :
428 else
429   exitcode=1
430   echo positional parameters were not saved.
431 fi
432
433 test \$exitcode = 0") || {
434   echo No shell found that supports shell functions.
435   echo Please tell bug-autoconf@gnu.org about your system,
436   echo including any error possibly output before this message.
437   echo This can help us improve future autoconf versions.
438   echo Configuration will now proceed without shell functions.
439 }
440
441
442
443   as_lineno_1=$LINENO
444   as_lineno_2=$LINENO
445   test "x$as_lineno_1" != "x$as_lineno_2" &&
446   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
447
448   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
449   # uniformly replaced by the line number.  The first 'sed' inserts a
450   # line-number line after each line using $LINENO; the second 'sed'
451   # does the real work.  The second script uses 'N' to pair each
452   # line-number line with the line containing $LINENO, and appends
453   # trailing '-' during substitution so that $LINENO is not a special
454   # case at line end.
455   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
456   # scripts with optimization help from Paolo Bonzini.  Blame Lee
457   # E. McMahon (1931-1989) for sed's syntax.  :-)
458   sed -n '
459     p
460     /[$]LINENO/=
461   ' <$as_myself |
462     sed '
463       s/[$]LINENO.*/&-/
464       t lineno
465       b
466       :lineno
467       N
468       :loop
469       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
470       t loop
471       s/-\n.*//
472     ' >$as_me.lineno &&
473   chmod +x "$as_me.lineno" ||
474     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
475    { (exit 1); exit 1; }; }
476
477   # Don't try to exec as it changes $[0], causing all sort of problems
478   # (the dirname of $[0] is not the place where we might find the
479   # original and so on.  Autoconf is especially sensitive to this).
480   . "./$as_me.lineno"
481   # Exit status is that of the last command.
482   exit
483 }
484
485
486 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
487   as_dirname=dirname
488 else
489   as_dirname=false
490 fi
491
492 ECHO_C= ECHO_N= ECHO_T=
493 case `echo -n x` in
494 -n*)
495   case `echo 'x\c'` in
496   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
497   *)   ECHO_C='\c';;
498   esac;;
499 *)
500   ECHO_N='-n';;
501 esac
502 if expr a : '\(a\)' >/dev/null 2>&1 &&
503    test "X`expr 00001 : '.*\(...\)'`" = X001; then
504   as_expr=expr
505 else
506   as_expr=false
507 fi
508
509 rm -f conf$$ conf$$.exe conf$$.file
510 if test -d conf$$.dir; then
511   rm -f conf$$.dir/conf$$.file
512 else
513   rm -f conf$$.dir
514   mkdir conf$$.dir 2>/dev/null
515 fi
516 if (echo >conf$$.file) 2>/dev/null; then
517   if ln -s conf$$.file conf$$ 2>/dev/null; then
518     as_ln_s='ln -s'
519     # ... but there are two gotchas:
520     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
521     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
522     # In both cases, we have to default to `cp -p'.
523     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
524       as_ln_s='cp -p'
525   elif ln conf$$.file conf$$ 2>/dev/null; then
526     as_ln_s=ln
527   else
528     as_ln_s='cp -p'
529   fi
530 else
531   as_ln_s='cp -p'
532 fi
533 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
534 rmdir conf$$.dir 2>/dev/null
535
536 if mkdir -p . 2>/dev/null; then
537   as_mkdir_p=:
538 else
539   test -d ./-p && rmdir ./-p
540   as_mkdir_p=false
541 fi
542
543 if test -x / >/dev/null 2>&1; then
544   as_test_x='test -x'
545 else
546   if ls -dL / >/dev/null 2>&1; then
547     as_ls_L_option=L
548   else
549     as_ls_L_option=
550   fi
551   as_test_x='
552     eval sh -c '\''
553       if test -d "$1"; then
554         test -d "$1/.";
555       else
556         case $1 in
557         -*)set "./$1";;
558         esac;
559         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
560         ???[sx]*):;;*)false;;esac;fi
561     '\'' sh
562   '
563 fi
564 as_executable_p=$as_test_x
565
566 # Sed expression to map a string onto a valid CPP name.
567 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
568
569 # Sed expression to map a string onto a valid variable name.
570 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
571
572
573
574 exec 7<&0 </dev/null 6>&1
575
576 # Name of the host.
577 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
578 # so uname gets run too.
579 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
580
581 #
582 # Initializations.
583 #
584 ac_default_prefix=/usr/local
585 ac_clean_files=
586 ac_config_libobj_dir=.
587 LIBOBJS=
588 cross_compiling=no
589 subdirs=
590 MFLAGS=
591 MAKEFLAGS=
592 SHELL=${CONFIG_SHELL-/bin/sh}
593
594 # Identity of this package.
595 PACKAGE_NAME='TclCurl'
596 PACKAGE_TARNAME='tclcurl'
597 PACKAGE_VERSION='7.19.6'
598 PACKAGE_STRING='TclCurl 7.19.6'
599 PACKAGE_BUGREPORT=''
600
601 # Factoring default headers for most tests.
602 ac_includes_default="\
603 #include <stdio.h>
604 #ifdef HAVE_SYS_TYPES_H
605 # include <sys/types.h>
606 #endif
607 #ifdef HAVE_SYS_STAT_H
608 # include <sys/stat.h>
609 #endif
610 #ifdef STDC_HEADERS
611 # include <stdlib.h>
612 # include <stddef.h>
613 #else
614 # ifdef HAVE_STDLIB_H
615 #  include <stdlib.h>
616 # endif
617 #endif
618 #ifdef HAVE_STRING_H
619 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
620 #  include <memory.h>
621 # endif
622 # include <string.h>
623 #endif
624 #ifdef HAVE_STRINGS_H
625 # include <strings.h>
626 #endif
627 #ifdef HAVE_INTTYPES_H
628 # include <inttypes.h>
629 #endif
630 #ifdef HAVE_STDINT_H
631 # include <stdint.h>
632 #endif
633 #ifdef HAVE_UNISTD_H
634 # include <unistd.h>
635 #endif"
636
637 ac_subst_vars='LTLIBOBJS
638 TCLSH_PROG
639 RANLIB_STUB
640 MAKE_STUB_LIB
641 MAKE_STATIC_LIB
642 MAKE_SHARED_LIB
643 MAKE_LIB
644 TCL_DBGX
645 LDFLAGS_DEFAULT
646 CFLAGS_DEFAULT
647 LD_LIBRARY_PATH_VAR
648 SHLIB_CFLAGS
649 SHLIB_LD_LIBS
650 SHLIB_LD
651 STLIB_LD
652 CFLAGS_WARNING
653 CFLAGS_OPTIMIZE
654 CFLAGS_DEBUG
655 DL_LIBS
656 LIBOBJS
657 CELIB_DIR
658 AR
659 SHARED_BUILD
660 TCL_THREADS
661 TCL_INCLUDES
662 CLEANFILES
663 curl
664 TCLCURL_SCRIPTS
665 PKG_OBJECTS
666 PKG_SOURCES
667 MATH_LIBS
668 EGREP
669 GREP
670 RANLIB
671 SET_MAKE
672 INSTALL_DATA
673 INSTALL_SCRIPT
674 INSTALL_PROGRAM
675 CPP
676 OBJEXT
677 ac_ct_CC
678 CPPFLAGS
679 LDFLAGS
680 CFLAGS
681 CC
682 TCL_SHLIB_LD_LIBS
683 TCL_LD_FLAGS
684 TCL_EXTRA_CFLAGS
685 TCL_DEFS
686 TCL_LIBS
687 TCL_STUB_LIB_SPEC
688 TCL_STUB_LIB_FLAG
689 TCL_STUB_LIB_FILE
690 TCL_LIB_SPEC
691 TCL_LIB_FLAG
692 TCL_LIB_FILE
693 TCL_SRC_DIR
694 TCL_BIN_DIR
695 TCL_VERSION
696 PKG_CFLAGS
697 PKG_LIBS
698 PKG_INCLUDES
699 PKG_HEADERS
700 PKG_TCL_SOURCES
701 PKG_STUB_OBJECTS
702 PKG_STUB_SOURCES
703 PKG_STUB_LIB_FILE
704 PKG_LIB_FILE
705 EXEEXT
706 CYGPATH
707 target_alias
708 host_alias
709 build_alias
710 LIBS
711 ECHO_T
712 ECHO_N
713 ECHO_C
714 DEFS
715 mandir
716 localedir
717 libdir
718 psdir
719 pdfdir
720 dvidir
721 htmldir
722 infodir
723 docdir
724 oldincludedir
725 includedir
726 localstatedir
727 sharedstatedir
728 sysconfdir
729 datadir
730 datarootdir
731 libexecdir
732 sbindir
733 bindir
734 program_transform_name
735 prefix
736 exec_prefix
737 PACKAGE_BUGREPORT
738 PACKAGE_STRING
739 PACKAGE_VERSION
740 PACKAGE_TARNAME
741 PACKAGE_NAME
742 PATH_SEPARATOR
743 SHELL'
744 ac_subst_files=''
745 ac_user_opts='
746 enable_option_checking
747 with_tcl
748 with_curlprefix
749 with_curlinclude
750 with_libcurl
751 with_tclinclude
752 enable_threads
753 enable_shared
754 enable_64bit
755 enable_64bit_vis
756 enable_rpath
757 enable_wince
758 with_celib
759 enable_load
760 enable_symbols
761 '
762       ac_precious_vars='build_alias
763 host_alias
764 target_alias
765 CC
766 CFLAGS
767 LDFLAGS
768 LIBS
769 CPPFLAGS
770 CPP'
771
772
773 # Initialize some variables set by options.
774 ac_init_help=
775 ac_init_version=false
776 ac_unrecognized_opts=
777 ac_unrecognized_sep=
778 # The variables have the same names as the options, with
779 # dashes changed to underlines.
780 cache_file=/dev/null
781 exec_prefix=NONE
782 no_create=
783 no_recursion=
784 prefix=NONE
785 program_prefix=NONE
786 program_suffix=NONE
787 program_transform_name=s,x,x,
788 silent=
789 site=
790 srcdir=
791 verbose=
792 x_includes=NONE
793 x_libraries=NONE
794
795 # Installation directory options.
796 # These are left unexpanded so users can "make install exec_prefix=/foo"
797 # and all the variables that are supposed to be based on exec_prefix
798 # by default will actually change.
799 # Use braces instead of parens because sh, perl, etc. also accept them.
800 # (The list follows the same order as the GNU Coding Standards.)
801 bindir='${exec_prefix}/bin'
802 sbindir='${exec_prefix}/sbin'
803 libexecdir='${exec_prefix}/libexec'
804 datarootdir='${prefix}/share'
805 datadir='${datarootdir}'
806 sysconfdir='${prefix}/etc'
807 sharedstatedir='${prefix}/com'
808 localstatedir='${prefix}/var'
809 includedir='${prefix}/include'
810 oldincludedir='/usr/include'
811 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
812 infodir='${datarootdir}/info'
813 htmldir='${docdir}'
814 dvidir='${docdir}'
815 pdfdir='${docdir}'
816 psdir='${docdir}'
817 libdir='${exec_prefix}/lib'
818 localedir='${datarootdir}/locale'
819 mandir='${datarootdir}/man'
820
821 ac_prev=
822 ac_dashdash=
823 for ac_option
824 do
825   # If the previous option needs an argument, assign it.
826   if test -n "$ac_prev"; then
827     eval $ac_prev=\$ac_option
828     ac_prev=
829     continue
830   fi
831
832   case $ac_option in
833   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
834   *)    ac_optarg=yes ;;
835   esac
836
837   # Accept the important Cygnus configure options, so we can diagnose typos.
838
839   case $ac_dashdash$ac_option in
840   --)
841     ac_dashdash=yes ;;
842
843   -bindir | --bindir | --bindi | --bind | --bin | --bi)
844     ac_prev=bindir ;;
845   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
846     bindir=$ac_optarg ;;
847
848   -build | --build | --buil | --bui | --bu)
849     ac_prev=build_alias ;;
850   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
851     build_alias=$ac_optarg ;;
852
853   -cache-file | --cache-file | --cache-fil | --cache-fi \
854   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
855     ac_prev=cache_file ;;
856   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
857   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
858     cache_file=$ac_optarg ;;
859
860   --config-cache | -C)
861     cache_file=config.cache ;;
862
863   -datadir | --datadir | --datadi | --datad)
864     ac_prev=datadir ;;
865   -datadir=* | --datadir=* | --datadi=* | --datad=*)
866     datadir=$ac_optarg ;;
867
868   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
869   | --dataroo | --dataro | --datar)
870     ac_prev=datarootdir ;;
871   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
872   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
873     datarootdir=$ac_optarg ;;
874
875   -disable-* | --disable-*)
876     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
877     # Reject names that are not valid shell variable names.
878     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
879       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
880    { (exit 1); exit 1; }; }
881     ac_useropt_orig=$ac_useropt
882     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
883     case $ac_user_opts in
884       *"
885 "enable_$ac_useropt"
886 "*) ;;
887       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
888          ac_unrecognized_sep=', ';;
889     esac
890     eval enable_$ac_useropt=no ;;
891
892   -docdir | --docdir | --docdi | --doc | --do)
893     ac_prev=docdir ;;
894   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
895     docdir=$ac_optarg ;;
896
897   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
898     ac_prev=dvidir ;;
899   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
900     dvidir=$ac_optarg ;;
901
902   -enable-* | --enable-*)
903     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
904     # Reject names that are not valid shell variable names.
905     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
906       { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
907    { (exit 1); exit 1; }; }
908     ac_useropt_orig=$ac_useropt
909     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
910     case $ac_user_opts in
911       *"
912 "enable_$ac_useropt"
913 "*) ;;
914       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
915          ac_unrecognized_sep=', ';;
916     esac
917     eval enable_$ac_useropt=\$ac_optarg ;;
918
919   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
920   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
921   | --exec | --exe | --ex)
922     ac_prev=exec_prefix ;;
923   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
924   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
925   | --exec=* | --exe=* | --ex=*)
926     exec_prefix=$ac_optarg ;;
927
928   -gas | --gas | --ga | --g)
929     # Obsolete; use --with-gas.
930     with_gas=yes ;;
931
932   -help | --help | --hel | --he | -h)
933     ac_init_help=long ;;
934   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
935     ac_init_help=recursive ;;
936   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
937     ac_init_help=short ;;
938
939   -host | --host | --hos | --ho)
940     ac_prev=host_alias ;;
941   -host=* | --host=* | --hos=* | --ho=*)
942     host_alias=$ac_optarg ;;
943
944   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
945     ac_prev=htmldir ;;
946   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
947   | --ht=*)
948     htmldir=$ac_optarg ;;
949
950   -includedir | --includedir | --includedi | --included | --include \
951   | --includ | --inclu | --incl | --inc)
952     ac_prev=includedir ;;
953   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
954   | --includ=* | --inclu=* | --incl=* | --inc=*)
955     includedir=$ac_optarg ;;
956
957   -infodir | --infodir | --infodi | --infod | --info | --inf)
958     ac_prev=infodir ;;
959   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
960     infodir=$ac_optarg ;;
961
962   -libdir | --libdir | --libdi | --libd)
963     ac_prev=libdir ;;
964   -libdir=* | --libdir=* | --libdi=* | --libd=*)
965     libdir=$ac_optarg ;;
966
967   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
968   | --libexe | --libex | --libe)
969     ac_prev=libexecdir ;;
970   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
971   | --libexe=* | --libex=* | --libe=*)
972     libexecdir=$ac_optarg ;;
973
974   -localedir | --localedir | --localedi | --localed | --locale)
975     ac_prev=localedir ;;
976   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
977     localedir=$ac_optarg ;;
978
979   -localstatedir | --localstatedir | --localstatedi | --localstated \
980   | --localstate | --localstat | --localsta | --localst | --locals)
981     ac_prev=localstatedir ;;
982   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
983   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
984     localstatedir=$ac_optarg ;;
985
986   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
987     ac_prev=mandir ;;
988   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
989     mandir=$ac_optarg ;;
990
991   -nfp | --nfp | --nf)
992     # Obsolete; use --without-fp.
993     with_fp=no ;;
994
995   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
996   | --no-cr | --no-c | -n)
997     no_create=yes ;;
998
999   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1000   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1001     no_recursion=yes ;;
1002
1003   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1004   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1005   | --oldin | --oldi | --old | --ol | --o)
1006     ac_prev=oldincludedir ;;
1007   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1008   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1009   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1010     oldincludedir=$ac_optarg ;;
1011
1012   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1013     ac_prev=prefix ;;
1014   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1015     prefix=$ac_optarg ;;
1016
1017   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1018   | --program-pre | --program-pr | --program-p)
1019     ac_prev=program_prefix ;;
1020   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1021   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1022     program_prefix=$ac_optarg ;;
1023
1024   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1025   | --program-suf | --program-su | --program-s)
1026     ac_prev=program_suffix ;;
1027   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1028   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1029     program_suffix=$ac_optarg ;;
1030
1031   -program-transform-name | --program-transform-name \
1032   | --program-transform-nam | --program-transform-na \
1033   | --program-transform-n | --program-transform- \
1034   | --program-transform | --program-transfor \
1035   | --program-transfo | --program-transf \
1036   | --program-trans | --program-tran \
1037   | --progr-tra | --program-tr | --program-t)
1038     ac_prev=program_transform_name ;;
1039   -program-transform-name=* | --program-transform-name=* \
1040   | --program-transform-nam=* | --program-transform-na=* \
1041   | --program-transform-n=* | --program-transform-=* \
1042   | --program-transform=* | --program-transfor=* \
1043   | --program-transfo=* | --program-transf=* \
1044   | --program-trans=* | --program-tran=* \
1045   | --progr-tra=* | --program-tr=* | --program-t=*)
1046     program_transform_name=$ac_optarg ;;
1047
1048   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1049     ac_prev=pdfdir ;;
1050   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1051     pdfdir=$ac_optarg ;;
1052
1053   -psdir | --psdir | --psdi | --psd | --ps)
1054     ac_prev=psdir ;;
1055   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1056     psdir=$ac_optarg ;;
1057
1058   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1059   | -silent | --silent | --silen | --sile | --sil)
1060     silent=yes ;;
1061
1062   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1063     ac_prev=sbindir ;;
1064   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1065   | --sbi=* | --sb=*)
1066     sbindir=$ac_optarg ;;
1067
1068   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1069   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1070   | --sharedst | --shareds | --shared | --share | --shar \
1071   | --sha | --sh)
1072     ac_prev=sharedstatedir ;;
1073   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1074   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1075   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1076   | --sha=* | --sh=*)
1077     sharedstatedir=$ac_optarg ;;
1078
1079   -site | --site | --sit)
1080     ac_prev=site ;;
1081   -site=* | --site=* | --sit=*)
1082     site=$ac_optarg ;;
1083
1084   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1085     ac_prev=srcdir ;;
1086   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1087     srcdir=$ac_optarg ;;
1088
1089   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1090   | --syscon | --sysco | --sysc | --sys | --sy)
1091     ac_prev=sysconfdir ;;
1092   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1093   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1094     sysconfdir=$ac_optarg ;;
1095
1096   -target | --target | --targe | --targ | --tar | --ta | --t)
1097     ac_prev=target_alias ;;
1098   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1099     target_alias=$ac_optarg ;;
1100
1101   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1102     verbose=yes ;;
1103
1104   -version | --version | --versio | --versi | --vers | -V)
1105     ac_init_version=: ;;
1106
1107   -with-* | --with-*)
1108     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1109     # Reject names that are not valid shell variable names.
1110     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1111       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1112    { (exit 1); exit 1; }; }
1113     ac_useropt_orig=$ac_useropt
1114     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1115     case $ac_user_opts in
1116       *"
1117 "with_$ac_useropt"
1118 "*) ;;
1119       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1120          ac_unrecognized_sep=', ';;
1121     esac
1122     eval with_$ac_useropt=\$ac_optarg ;;
1123
1124   -without-* | --without-*)
1125     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1126     # Reject names that are not valid shell variable names.
1127     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1128       { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1129    { (exit 1); exit 1; }; }
1130     ac_useropt_orig=$ac_useropt
1131     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1132     case $ac_user_opts in
1133       *"
1134 "with_$ac_useropt"
1135 "*) ;;
1136       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1137          ac_unrecognized_sep=', ';;
1138     esac
1139     eval with_$ac_useropt=no ;;
1140
1141   --x)
1142     # Obsolete; use --with-x.
1143     with_x=yes ;;
1144
1145   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1146   | --x-incl | --x-inc | --x-in | --x-i)
1147     ac_prev=x_includes ;;
1148   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1149   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1150     x_includes=$ac_optarg ;;
1151
1152   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1153   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1154     ac_prev=x_libraries ;;
1155   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1156   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1157     x_libraries=$ac_optarg ;;
1158
1159   -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
1160 Try \`$0 --help' for more information." >&2
1161    { (exit 1); exit 1; }; }
1162     ;;
1163
1164   *=*)
1165     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1166     # Reject names that are not valid shell variable names.
1167     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1168       { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1169    { (exit 1); exit 1; }; }
1170     eval $ac_envvar=\$ac_optarg
1171     export $ac_envvar ;;
1172
1173   *)
1174     # FIXME: should be removed in autoconf 3.0.
1175     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1176     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1177       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1178     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1179     ;;
1180
1181   esac
1182 done
1183
1184 if test -n "$ac_prev"; then
1185   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1186   { $as_echo "$as_me: error: missing argument to $ac_option" >&2
1187    { (exit 1); exit 1; }; }
1188 fi
1189
1190 if test -n "$ac_unrecognized_opts"; then
1191   case $enable_option_checking in
1192     no) ;;
1193     fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1194    { (exit 1); exit 1; }; } ;;
1195     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1196   esac
1197 fi
1198
1199 # Check all directory arguments for consistency.
1200 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1201                 datadir sysconfdir sharedstatedir localstatedir includedir \
1202                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1203                 libdir localedir mandir
1204 do
1205   eval ac_val=\$$ac_var
1206   # Remove trailing slashes.
1207   case $ac_val in
1208     */ )
1209       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1210       eval $ac_var=\$ac_val;;
1211   esac
1212   # Be sure to have absolute directory names.
1213   case $ac_val in
1214     [\\/$]* | ?:[\\/]* )  continue;;
1215     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1216   esac
1217   { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1218    { (exit 1); exit 1; }; }
1219 done
1220
1221 # There might be people who depend on the old broken behavior: `$host'
1222 # used to hold the argument of --host etc.
1223 # FIXME: To remove some day.
1224 build=$build_alias
1225 host=$host_alias
1226 target=$target_alias
1227
1228 # FIXME: To remove some day.
1229 if test "x$host_alias" != x; then
1230   if test "x$build_alias" = x; then
1231     cross_compiling=maybe
1232     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1233     If a cross compiler is detected then cross compile mode will be used." >&2
1234   elif test "x$build_alias" != "x$host_alias"; then
1235     cross_compiling=yes
1236   fi
1237 fi
1238
1239 ac_tool_prefix=
1240 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1241
1242 test "$silent" = yes && exec 6>/dev/null
1243
1244
1245 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1246 ac_ls_di=`ls -di .` &&
1247 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1248   { $as_echo "$as_me: error: working directory cannot be determined" >&2
1249    { (exit 1); exit 1; }; }
1250 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1251   { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
1252    { (exit 1); exit 1; }; }
1253
1254
1255 # Find the source files, if location was not specified.
1256 if test -z "$srcdir"; then
1257   ac_srcdir_defaulted=yes
1258   # Try the directory containing this script, then the parent directory.
1259   ac_confdir=`$as_dirname -- "$as_myself" ||
1260 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1261          X"$as_myself" : 'X\(//\)[^/]' \| \
1262          X"$as_myself" : 'X\(//\)$' \| \
1263          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1264 $as_echo X"$as_myself" |
1265     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1266             s//\1/
1267             q
1268           }
1269           /^X\(\/\/\)[^/].*/{
1270             s//\1/
1271             q
1272           }
1273           /^X\(\/\/\)$/{
1274             s//\1/
1275             q
1276           }
1277           /^X\(\/\).*/{
1278             s//\1/
1279             q
1280           }
1281           s/.*/./; q'`
1282   srcdir=$ac_confdir
1283   if test ! -r "$srcdir/$ac_unique_file"; then
1284     srcdir=..
1285   fi
1286 else
1287   ac_srcdir_defaulted=no
1288 fi
1289 if test ! -r "$srcdir/$ac_unique_file"; then
1290   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1291   { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1292    { (exit 1); exit 1; }; }
1293 fi
1294 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1295 ac_abs_confdir=`(
1296         cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
1297    { (exit 1); exit 1; }; }
1298         pwd)`
1299 # When building in place, set srcdir=.
1300 if test "$ac_abs_confdir" = "$ac_pwd"; then
1301   srcdir=.
1302 fi
1303 # Remove unnecessary trailing slashes from srcdir.
1304 # Double slashes in file names in object file debugging info
1305 # mess up M-x gdb in Emacs.
1306 case $srcdir in
1307 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1308 esac
1309 for ac_var in $ac_precious_vars; do
1310   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1311   eval ac_env_${ac_var}_value=\$${ac_var}
1312   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1313   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1314 done
1315
1316 #
1317 # Report the --help message.
1318 #
1319 if test "$ac_init_help" = "long"; then
1320   # Omit some internal or obsolete options to make the list less imposing.
1321   # This message is too long to be a string in the A/UX 3.1 sh.
1322   cat <<_ACEOF
1323 \`configure' configures TclCurl 7.19.6 to adapt to many kinds of systems.
1324
1325 Usage: $0 [OPTION]... [VAR=VALUE]...
1326
1327 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1328 VAR=VALUE.  See below for descriptions of some of the useful variables.
1329
1330 Defaults for the options are specified in brackets.
1331
1332 Configuration:
1333   -h, --help              display this help and exit
1334       --help=short        display options specific to this package
1335       --help=recursive    display the short help of all the included packages
1336   -V, --version           display version information and exit
1337   -q, --quiet, --silent   do not print \`checking...' messages
1338       --cache-file=FILE   cache test results in FILE [disabled]
1339   -C, --config-cache      alias for \`--cache-file=config.cache'
1340   -n, --no-create         do not create output files
1341       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1342
1343 Installation directories:
1344   --prefix=PREFIX         install architecture-independent files in PREFIX
1345                           [$ac_default_prefix]
1346   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1347                           [PREFIX]
1348
1349 By default, \`make install' will install all the files in
1350 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1351 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1352 for instance \`--prefix=\$HOME'.
1353
1354 For better control, use the options below.
1355
1356 Fine tuning of the installation directories:
1357   --bindir=DIR            user executables [EPREFIX/bin]
1358   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1359   --libexecdir=DIR        program executables [EPREFIX/libexec]
1360   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1361   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1362   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1363   --libdir=DIR            object code libraries [EPREFIX/lib]
1364   --includedir=DIR        C header files [PREFIX/include]
1365   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1366   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1367   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1368   --infodir=DIR           info documentation [DATAROOTDIR/info]
1369   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1370   --mandir=DIR            man documentation [DATAROOTDIR/man]
1371   --docdir=DIR            documentation root [DATAROOTDIR/doc/tclcurl]
1372   --htmldir=DIR           html documentation [DOCDIR]
1373   --dvidir=DIR            dvi documentation [DOCDIR]
1374   --pdfdir=DIR            pdf documentation [DOCDIR]
1375   --psdir=DIR             ps documentation [DOCDIR]
1376 _ACEOF
1377
1378   cat <<\_ACEOF
1379 _ACEOF
1380 fi
1381
1382 if test -n "$ac_init_help"; then
1383   case $ac_init_help in
1384      short | recursive ) echo "Configuration of TclCurl 7.19.6:";;
1385    esac
1386   cat <<\_ACEOF
1387
1388 Optional Features:
1389   --disable-option-checking  ignore unrecognized --enable/--with options
1390   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1391   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1392   --enable-threads        build with threads
1393   --enable-shared         build and link with shared libraries (default: on)
1394   --enable-64bit          enable 64bit support (default: off)
1395   --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1396   --disable-rpath         disable rpath support (default: on)
1397   --enable-wince          enable Win/CE support (where applicable)
1398   --enable-load           allow dynamic loading and "load" command (default:
1399                           on)
1400   --enable-symbols        build with debugging symbols (default: off)
1401
1402 Optional Packages:
1403   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1404   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1405   --with-tcl              directory containing tcl configuration
1406                           (tclConfig.sh)
1407   --with-curlprefix       base directory for the cURL install '/usr', '/usr/local',...
1408   --with-curlinclude      directory containing the public libcurl header files
1409   --with-libcurl          directory containing libcurl
1410   --with-tclinclude       directory containing the public Tcl header files
1411   --with-celib=DIR        use Windows/CE support library from DIR
1412
1413 Some influential environment variables:
1414   CC          C compiler command
1415   CFLAGS      C compiler flags
1416   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1417               nonstandard directory <lib dir>
1418   LIBS        libraries to pass to the linker, e.g. -l<library>
1419   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1420               you have headers in a nonstandard directory <include dir>
1421   CPP         C preprocessor
1422
1423 Use these variables to override the choices made by `configure' or to help
1424 it to find libraries and programs with nonstandard names/locations.
1425
1426 _ACEOF
1427 ac_status=$?
1428 fi
1429
1430 if test "$ac_init_help" = "recursive"; then
1431   # If there are subdirs, report their specific --help.
1432   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1433     test -d "$ac_dir" ||
1434       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1435       continue
1436     ac_builddir=.
1437
1438 case "$ac_dir" in
1439 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1440 *)
1441   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1442   # A ".." for each directory in $ac_dir_suffix.
1443   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1444   case $ac_top_builddir_sub in
1445   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1446   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1447   esac ;;
1448 esac
1449 ac_abs_top_builddir=$ac_pwd
1450 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1451 # for backward compatibility:
1452 ac_top_builddir=$ac_top_build_prefix
1453
1454 case $srcdir in
1455   .)  # We are building in place.
1456     ac_srcdir=.
1457     ac_top_srcdir=$ac_top_builddir_sub
1458     ac_abs_top_srcdir=$ac_pwd ;;
1459   [\\/]* | ?:[\\/]* )  # Absolute name.
1460     ac_srcdir=$srcdir$ac_dir_suffix;
1461     ac_top_srcdir=$srcdir
1462     ac_abs_top_srcdir=$srcdir ;;
1463   *) # Relative name.
1464     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1465     ac_top_srcdir=$ac_top_build_prefix$srcdir
1466     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1467 esac
1468 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1469
1470     cd "$ac_dir" || { ac_status=$?; continue; }
1471     # Check for guested configure.
1472     if test -f "$ac_srcdir/configure.gnu"; then
1473       echo &&
1474       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1475     elif test -f "$ac_srcdir/configure"; then
1476       echo &&
1477       $SHELL "$ac_srcdir/configure" --help=recursive
1478     else
1479       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1480     fi || ac_status=$?
1481     cd "$ac_pwd" || { ac_status=$?; break; }
1482   done
1483 fi
1484
1485 test -n "$ac_init_help" && exit $ac_status
1486 if $ac_init_version; then
1487   cat <<\_ACEOF
1488 TclCurl configure 7.19.6
1489 generated by GNU Autoconf 2.63
1490
1491 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1492 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1493 This configure script is free software; the Free Software Foundation
1494 gives unlimited permission to copy, distribute and modify it.
1495 _ACEOF
1496   exit
1497 fi
1498 cat >config.log <<_ACEOF
1499 This file contains any messages produced by compilers while
1500 running configure, to aid debugging if configure makes a mistake.
1501
1502 It was created by TclCurl $as_me 7.19.6, which was
1503 generated by GNU Autoconf 2.63.  Invocation command line was
1504
1505   $ $0 $@
1506
1507 _ACEOF
1508 exec 5>>config.log
1509 {
1510 cat <<_ASUNAME
1511 ## --------- ##
1512 ## Platform. ##
1513 ## --------- ##
1514
1515 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1516 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1517 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1518 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1519 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1520
1521 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1522 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1523
1524 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1525 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1526 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1527 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1528 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1529 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1530 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1531
1532 _ASUNAME
1533
1534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1535 for as_dir in $PATH
1536 do
1537   IFS=$as_save_IFS
1538   test -z "$as_dir" && as_dir=.
1539   $as_echo "PATH: $as_dir"
1540 done
1541 IFS=$as_save_IFS
1542
1543 } >&5
1544
1545 cat >&5 <<_ACEOF
1546
1547
1548 ## ----------- ##
1549 ## Core tests. ##
1550 ## ----------- ##
1551
1552 _ACEOF
1553
1554
1555 # Keep a trace of the command line.
1556 # Strip out --no-create and --no-recursion so they do not pile up.
1557 # Strip out --silent because we don't want to record it for future runs.
1558 # Also quote any args containing shell meta-characters.
1559 # Make two passes to allow for proper duplicate-argument suppression.
1560 ac_configure_args=
1561 ac_configure_args0=
1562 ac_configure_args1=
1563 ac_must_keep_next=false
1564 for ac_pass in 1 2
1565 do
1566   for ac_arg
1567   do
1568     case $ac_arg in
1569     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1570     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1571     | -silent | --silent | --silen | --sile | --sil)
1572       continue ;;
1573     *\'*)
1574       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1575     esac
1576     case $ac_pass in
1577     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1578     2)
1579       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1580       if test $ac_must_keep_next = true; then
1581         ac_must_keep_next=false # Got value, back to normal.
1582       else
1583         case $ac_arg in
1584           *=* | --config-cache | -C | -disable-* | --disable-* \
1585           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1586           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1587           | -with-* | --with-* | -without-* | --without-* | --x)
1588             case "$ac_configure_args0 " in
1589               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1590             esac
1591             ;;
1592           -* ) ac_must_keep_next=true ;;
1593         esac
1594       fi
1595       ac_configure_args="$ac_configure_args '$ac_arg'"
1596       ;;
1597     esac
1598   done
1599 done
1600 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1601 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1602
1603 # When interrupted or exit'd, cleanup temporary files, and complete
1604 # config.log.  We remove comments because anyway the quotes in there
1605 # would cause problems or look ugly.
1606 # WARNING: Use '\'' to represent an apostrophe within the trap.
1607 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1608 trap 'exit_status=$?
1609   # Save into config.log some information that might help in debugging.
1610   {
1611     echo
1612
1613     cat <<\_ASBOX
1614 ## ---------------- ##
1615 ## Cache variables. ##
1616 ## ---------------- ##
1617 _ASBOX
1618     echo
1619     # The following way of writing the cache mishandles newlines in values,
1620 (
1621   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1622     eval ac_val=\$$ac_var
1623     case $ac_val in #(
1624     *${as_nl}*)
1625       case $ac_var in #(
1626       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1627 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1628       esac
1629       case $ac_var in #(
1630       _ | IFS | as_nl) ;; #(
1631       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1632       *) $as_unset $ac_var ;;
1633       esac ;;
1634     esac
1635   done
1636   (set) 2>&1 |
1637     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1638     *${as_nl}ac_space=\ *)
1639       sed -n \
1640         "s/'\''/'\''\\\\'\'''\''/g;
1641           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1642       ;; #(
1643     *)
1644       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1645       ;;
1646     esac |
1647     sort
1648 )
1649     echo
1650
1651     cat <<\_ASBOX
1652 ## ----------------- ##
1653 ## Output variables. ##
1654 ## ----------------- ##
1655 _ASBOX
1656     echo
1657     for ac_var in $ac_subst_vars
1658     do
1659       eval ac_val=\$$ac_var
1660       case $ac_val in
1661       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1662       esac
1663       $as_echo "$ac_var='\''$ac_val'\''"
1664     done | sort
1665     echo
1666
1667     if test -n "$ac_subst_files"; then
1668       cat <<\_ASBOX
1669 ## ------------------- ##
1670 ## File substitutions. ##
1671 ## ------------------- ##
1672 _ASBOX
1673       echo
1674       for ac_var in $ac_subst_files
1675       do
1676         eval ac_val=\$$ac_var
1677         case $ac_val in
1678         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1679         esac
1680         $as_echo "$ac_var='\''$ac_val'\''"
1681       done | sort
1682       echo
1683     fi
1684
1685     if test -s confdefs.h; then
1686       cat <<\_ASBOX
1687 ## ----------- ##
1688 ## confdefs.h. ##
1689 ## ----------- ##
1690 _ASBOX
1691       echo
1692       cat confdefs.h
1693       echo
1694     fi
1695     test "$ac_signal" != 0 &&
1696       $as_echo "$as_me: caught signal $ac_signal"
1697     $as_echo "$as_me: exit $exit_status"
1698   } >&5
1699   rm -f core *.core core.conftest.* &&
1700     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1701     exit $exit_status
1702 ' 0
1703 for ac_signal in 1 2 13 15; do
1704   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1705 done
1706 ac_signal=0
1707
1708 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1709 rm -f -r conftest* confdefs.h
1710
1711 # Predefined preprocessor variables.
1712
1713 cat >>confdefs.h <<_ACEOF
1714 #define PACKAGE_NAME "$PACKAGE_NAME"
1715 _ACEOF
1716
1717
1718 cat >>confdefs.h <<_ACEOF
1719 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1720 _ACEOF
1721
1722
1723 cat >>confdefs.h <<_ACEOF
1724 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1725 _ACEOF
1726
1727
1728 cat >>confdefs.h <<_ACEOF
1729 #define PACKAGE_STRING "$PACKAGE_STRING"
1730 _ACEOF
1731
1732
1733 cat >>confdefs.h <<_ACEOF
1734 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1735 _ACEOF
1736
1737
1738 # Let the site file select an alternate cache file if it wants to.
1739 # Prefer an explicitly selected file to automatically selected ones.
1740 ac_site_file1=NONE
1741 ac_site_file2=NONE
1742 if test -n "$CONFIG_SITE"; then
1743   ac_site_file1=$CONFIG_SITE
1744 elif test "x$prefix" != xNONE; then
1745   ac_site_file1=$prefix/share/config.site
1746   ac_site_file2=$prefix/etc/config.site
1747 else
1748   ac_site_file1=$ac_default_prefix/share/config.site
1749   ac_site_file2=$ac_default_prefix/etc/config.site
1750 fi
1751 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1752 do
1753   test "x$ac_site_file" = xNONE && continue
1754   if test -r "$ac_site_file"; then
1755     { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1756 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1757     sed 's/^/| /' "$ac_site_file" >&5
1758     . "$ac_site_file"
1759   fi
1760 done
1761
1762 if test -r "$cache_file"; then
1763   # Some versions of bash will fail to source /dev/null (special
1764   # files actually), so we avoid doing that.
1765   if test -f "$cache_file"; then
1766     { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1767 $as_echo "$as_me: loading cache $cache_file" >&6;}
1768     case $cache_file in
1769       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1770       *)                      . "./$cache_file";;
1771     esac
1772   fi
1773 else
1774   { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1775 $as_echo "$as_me: creating cache $cache_file" >&6;}
1776   >$cache_file
1777 fi
1778
1779 # Check that the precious variables saved in the cache have kept the same
1780 # value.
1781 ac_cache_corrupted=false
1782 for ac_var in $ac_precious_vars; do
1783   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1784   eval ac_new_set=\$ac_env_${ac_var}_set
1785   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1786   eval ac_new_val=\$ac_env_${ac_var}_value
1787   case $ac_old_set,$ac_new_set in
1788     set,)
1789       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1790 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1791       ac_cache_corrupted=: ;;
1792     ,set)
1793       { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1794 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1795       ac_cache_corrupted=: ;;
1796     ,);;
1797     *)
1798       if test "x$ac_old_val" != "x$ac_new_val"; then
1799         # differences in whitespace do not lead to failure.
1800         ac_old_val_w=`echo x $ac_old_val`
1801         ac_new_val_w=`echo x $ac_new_val`
1802         if test "$ac_old_val_w" != "$ac_new_val_w"; then
1803           { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1804 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1805           ac_cache_corrupted=:
1806         else
1807           { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1808 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1809           eval $ac_var=\$ac_old_val
1810         fi
1811         { $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
1812 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
1813         { $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
1814 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
1815       fi;;
1816   esac
1817   # Pass precious variables to config.status.
1818   if test "$ac_new_set" = set; then
1819     case $ac_new_val in
1820     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1821     *) ac_arg=$ac_var=$ac_new_val ;;
1822     esac
1823     case " $ac_configure_args " in
1824       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1825       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1826     esac
1827   fi
1828 done
1829 if $ac_cache_corrupted; then
1830   { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1831 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1832   { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1833 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1834   { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1835 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1836    { (exit 1); exit 1; }; }
1837 fi
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863 ac_ext=c
1864 ac_cpp='$CPP $CPPFLAGS'
1865 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1866 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1867 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1868
1869
1870
1871 #--------------------------------------------------------------------
1872 # Call TEA_INIT as the first TEA_ macro to set up initial vars.
1873 # This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
1874 # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
1875 #--------------------------------------------------------------------
1876
1877
1878     # TEA extensions pass this us the version of TEA they think they
1879     # are compatible with.
1880     TEA_VERSION="3.7"
1881
1882     { $as_echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
1883 $as_echo_n "checking for correct TEA configuration... " >&6; }
1884     if test x"${PACKAGE_NAME}" = x ; then
1885         { { $as_echo "$as_me:$LINENO: error:
1886 The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
1887 $as_echo "$as_me: error:
1888 The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
1889    { (exit 1); exit 1; }; }
1890     fi
1891     if test x"3.7" = x ; then
1892         { { $as_echo "$as_me:$LINENO: error:
1893 TEA version not specified." >&5
1894 $as_echo "$as_me: error:
1895 TEA version not specified." >&2;}
1896    { (exit 1); exit 1; }; }
1897     elif test "3.7" != "${TEA_VERSION}" ; then
1898         { $as_echo "$as_me:$LINENO: result: warning: requested TEA version \"3.7\", have \"${TEA_VERSION}\"" >&5
1899 $as_echo "warning: requested TEA version \"3.7\", have \"${TEA_VERSION}\"" >&6; }
1900     else
1901         { $as_echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
1902 $as_echo "ok (TEA ${TEA_VERSION})" >&6; }
1903     fi
1904     case "`uname -s`" in
1905         *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
1906             # Extract the first word of "cygpath", so it can be a program name with args.
1907 set dummy cygpath; ac_word=$2
1908 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
1909 $as_echo_n "checking for $ac_word... " >&6; }
1910 if test "${ac_cv_prog_CYGPATH+set}" = set; then
1911   $as_echo_n "(cached) " >&6
1912 else
1913   if test -n "$CYGPATH"; then
1914   ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1915 else
1916 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1917 for as_dir in $PATH
1918 do
1919   IFS=$as_save_IFS
1920   test -z "$as_dir" && as_dir=.
1921   for ac_exec_ext in '' $ac_executable_extensions; do
1922   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1923     ac_cv_prog_CYGPATH="cygpath -w"
1924     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1925     break 2
1926   fi
1927 done
1928 done
1929 IFS=$as_save_IFS
1930
1931   test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1932 fi
1933 fi
1934 CYGPATH=$ac_cv_prog_CYGPATH
1935 if test -n "$CYGPATH"; then
1936   { $as_echo "$as_me:$LINENO: result: $CYGPATH" >&5
1937 $as_echo "$CYGPATH" >&6; }
1938 else
1939   { $as_echo "$as_me:$LINENO: result: no" >&5
1940 $as_echo "no" >&6; }
1941 fi
1942
1943
1944             EXEEXT=".exe"
1945             TEA_PLATFORM="windows"
1946             ;;
1947         *)
1948             CYGPATH=echo
1949             EXEEXT=""
1950             TEA_PLATFORM="unix"
1951             ;;
1952     esac
1953
1954     # Check if exec_prefix is set. If not use fall back to prefix.
1955     # Note when adjusted, so that TEA_PREFIX can correct for this.
1956     # This is needed for recursive configures, since autoconf propagates
1957     # $prefix, but not $exec_prefix (doh!).
1958     if test x$exec_prefix = xNONE ; then
1959         exec_prefix_default=yes
1960         exec_prefix=$prefix
1961     fi
1962
1963
1964
1965
1966     # This package name must be replaced statically for AC_SUBST to work
1967
1968     # Substitute STUB_LIB_FILE in case package creates a stub library too.
1969
1970
1971     # We AC_SUBST these here to ensure they are subst'ed,
1972     # in case the user doesn't call TEA_ADD_...
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982 ac_aux_dir=
1983 for ac_dir in tclconfig "$srcdir"/tclconfig; do
1984   if test -f "$ac_dir/install-sh"; then
1985     ac_aux_dir=$ac_dir
1986     ac_install_sh="$ac_aux_dir/install-sh -c"
1987     break
1988   elif test -f "$ac_dir/install.sh"; then
1989     ac_aux_dir=$ac_dir
1990     ac_install_sh="$ac_aux_dir/install.sh -c"
1991     break
1992   elif test -f "$ac_dir/shtool"; then
1993     ac_aux_dir=$ac_dir
1994     ac_install_sh="$ac_aux_dir/shtool install -c"
1995     break
1996   fi
1997 done
1998 if test -z "$ac_aux_dir"; then
1999   { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in tclconfig \"$srcdir\"/tclconfig" >&5
2000 $as_echo "$as_me: error: cannot find install-sh or install.sh in tclconfig \"$srcdir\"/tclconfig" >&2;}
2001    { (exit 1); exit 1; }; }
2002 fi
2003
2004 # These three variables are undocumented and unsupported,
2005 # and are intended to be withdrawn in a future Autoconf release.
2006 # They can cause serious problems if a builder's source tree is in a directory
2007 # whose full name contains unusual characters.
2008 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2009 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2010 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2011
2012
2013
2014 #--------------------------------------------------------------------
2015 # Load the tclConfig.sh file
2016 #--------------------------------------------------------------------
2017
2018
2019
2020     #
2021     # Ok, lets find the tcl configuration
2022     # First, look for one uninstalled.
2023     # the alternative search directory is invoked by --with-tcl
2024     #
2025
2026     if test x"${no_tcl}" = x ; then
2027         # we reset no_tcl in case something fails here
2028         no_tcl=true
2029
2030 # Check whether --with-tcl was given.
2031 if test "${with_tcl+set}" = set; then
2032   withval=$with_tcl; with_tclconfig=${withval}
2033 fi
2034
2035         { $as_echo "$as_me:$LINENO: checking for Tcl configuration" >&5
2036 $as_echo_n "checking for Tcl configuration... " >&6; }
2037         if test "${ac_cv_c_tclconfig+set}" = set; then
2038   $as_echo_n "(cached) " >&6
2039 else
2040
2041
2042             # First check to see if --with-tcl was specified.
2043             if test x"${with_tclconfig}" != x ; then
2044                 case ${with_tclconfig} in
2045                     */tclConfig.sh )
2046                         if test -f ${with_tclconfig}; then
2047                             { $as_echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
2048 $as_echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
2049                             with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'`
2050                         fi ;;
2051                 esac
2052                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
2053                     ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
2054                 else
2055                     { { $as_echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
2056 $as_echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
2057    { (exit 1); exit 1; }; }
2058                 fi
2059             fi
2060
2061             # then check for a private Tcl installation
2062             if test x"${ac_cv_c_tclconfig}" = x ; then
2063                 for i in \
2064                         ../tcl \
2065                         `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2066                         `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
2067                         `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
2068                         ../../tcl \
2069                         `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2070                         `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
2071                         `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
2072                         ../../../tcl \
2073                         `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2074                         `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
2075                         `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
2076                     if test "${TEA_PLATFORM}" = "windows" \
2077                             -a -f "$i/win/tclConfig.sh" ; then
2078                         ac_cv_c_tclconfig=`(cd $i/win; pwd)`
2079                         break
2080                     fi
2081                     if test -f "$i/unix/tclConfig.sh" ; then
2082                         ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
2083                         break
2084                     fi
2085                 done
2086             fi
2087
2088             # on Darwin, check in Framework installation locations
2089             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
2090                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2091                         `ls -d /Library/Frameworks 2>/dev/null` \
2092                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
2093                         `ls -d /System/Library/Frameworks 2>/dev/null` \
2094                         ; do
2095                     if test -f "$i/Tcl.framework/tclConfig.sh" ; then
2096                         ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
2097                         break
2098                     fi
2099                 done
2100             fi
2101
2102             # TEA specific: on Windows, check in common installation locations
2103             if test "${TEA_PLATFORM}" = "windows" \
2104                 -a x"${ac_cv_c_tclconfig}" = x ; then
2105                 for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2106                         `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2107                         ; do
2108                     if test -f "$i/tclConfig.sh" ; then
2109                         ac_cv_c_tclconfig=`(cd $i; pwd)`
2110                         break
2111                     fi
2112                 done
2113             fi
2114
2115             # check in a few common install locations
2116             if test x"${ac_cv_c_tclconfig}" = x ; then
2117                 for i in `ls -d ${libdir} 2>/dev/null` \
2118                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
2119                         `ls -d ${prefix}/lib 2>/dev/null` \
2120                         `ls -d /usr/local/lib 2>/dev/null` \
2121                         `ls -d /usr/contrib/lib 2>/dev/null` \
2122                         `ls -d /usr/lib 2>/dev/null` \
2123                         ; do
2124                     if test -f "$i/tclConfig.sh" ; then
2125                         ac_cv_c_tclconfig=`(cd $i; pwd)`
2126                         break
2127                     fi
2128                 done
2129             fi
2130
2131             # check in a few other private locations
2132             if test x"${ac_cv_c_tclconfig}" = x ; then
2133                 for i in \
2134                         ${srcdir}/../tcl \
2135                         `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2136                         `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2137                         `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2138                     if test "${TEA_PLATFORM}" = "windows" \
2139                             -a -f "$i/win/tclConfig.sh" ; then
2140                         ac_cv_c_tclconfig=`(cd $i/win; pwd)`
2141                         break
2142                     fi
2143                     if test -f "$i/unix/tclConfig.sh" ; then
2144                     ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
2145                     break
2146                 fi
2147                 done
2148             fi
2149
2150 fi
2151
2152
2153         if test x"${ac_cv_c_tclconfig}" = x ; then
2154             TCL_BIN_DIR="# no Tcl configs found"
2155             { { $as_echo "$as_me:$LINENO: error: Can't find Tcl configuration definitions" >&5
2156 $as_echo "$as_me: error: Can't find Tcl configuration definitions" >&2;}
2157    { (exit 1); exit 1; }; }
2158         else
2159             no_tcl=
2160             TCL_BIN_DIR=${ac_cv_c_tclconfig}
2161             { $as_echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2162 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2163         fi
2164     fi
2165
2166
2167     { $as_echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
2168 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
2169
2170     if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
2171         { $as_echo "$as_me:$LINENO: result: loading" >&5
2172 $as_echo "loading" >&6; }
2173         . "${TCL_BIN_DIR}/tclConfig.sh"
2174     else
2175         { $as_echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
2176 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2177     fi
2178
2179     # eval is required to do the TCL_DBGX substitution
2180     eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
2181     eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
2182
2183     # If the TCL_BIN_DIR is the build directory (not the install directory),
2184     # then set the common variable name to the value of the build variables.
2185     # For example, the variable TCL_LIB_SPEC will be set to the value
2186     # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
2187     # instead of TCL_BUILD_LIB_SPEC since it will work with both an
2188     # installed and uninstalled version of Tcl.
2189     if test -f "${TCL_BIN_DIR}/Makefile" ; then
2190         TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
2191         TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
2192         TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
2193     elif test "`uname -s`" = "Darwin"; then
2194         # If Tcl was built as a framework, attempt to use the libraries
2195         # from the framework at the given location so that linking works
2196         # against Tcl.framework installed in an arbitrary location.
2197         case ${TCL_DEFS} in
2198             *TCL_FRAMEWORK*)
2199                 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
2200                     for i in "`cd ${TCL_BIN_DIR}; pwd`" \
2201                              "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
2202                         if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
2203                             TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
2204                             break
2205                         fi
2206                     done
2207                 fi
2208                 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
2209                     TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
2210                     TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
2211                 fi
2212                 ;;
2213         esac
2214     fi
2215
2216     # eval is required to do the TCL_DBGX substitution
2217     eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
2218     eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
2219     eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
2220     eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234     # TEA specific:
2235
2236
2237
2238
2239
2240
2241
2242 #--------------------------------------------------------------------
2243 # Load the tkConfig.sh file if necessary (Tk extension)
2244 #--------------------------------------------------------------------
2245
2246 #TEA_PATH_TKCONFIG
2247 #TEA_LOAD_TKCONFIG
2248
2249 #-----------------------------------------------------------------------
2250 # Handle the --prefix=... option by defaulting to what Tcl gave.
2251 # Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
2252 #-----------------------------------------------------------------------
2253
2254
2255     if test "${prefix}" = "NONE"; then
2256         prefix_default=yes
2257         if test x"${TCL_PREFIX}" != x; then
2258             { $as_echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
2259 $as_echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
2260             prefix=${TCL_PREFIX}
2261         else
2262             { $as_echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
2263 $as_echo "$as_me: --prefix defaulting to /usr/local" >&6;}
2264             prefix=/usr/local
2265         fi
2266     fi
2267     if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
2268         -o x"${exec_prefix_default}" = x"yes" ; then
2269         if test x"${TCL_EXEC_PREFIX}" != x; then
2270             { $as_echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
2271 $as_echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
2272             exec_prefix=${TCL_EXEC_PREFIX}
2273         else
2274             { $as_echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
2275 $as_echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
2276             exec_prefix=$prefix
2277         fi
2278     fi
2279
2280
2281 #-----------------------------------------------------------------------
2282 # Standard compiler checks.
2283 # This sets up CC by using the CC env var, or looks for gcc otherwise.
2284 # This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
2285 # the basic setup necessary to compile executables.
2286 #-----------------------------------------------------------------------
2287
2288
2289     # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
2290     # in this macro, they need to go into TEA_SETUP_COMPILER instead.
2291
2292     # If the user did not set CFLAGS, set it now to keep
2293     # the AC_PROG_CC macro from adding "-g -O2".
2294     if test "${CFLAGS+set}" != "set" ; then
2295         CFLAGS=""
2296     fi
2297
2298     ac_ext=c
2299 ac_cpp='$CPP $CPPFLAGS'
2300 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2301 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2302 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2303 if test -n "$ac_tool_prefix"; then
2304   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2305 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2306 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2307 $as_echo_n "checking for $ac_word... " >&6; }
2308 if test "${ac_cv_prog_CC+set}" = set; then
2309   $as_echo_n "(cached) " >&6
2310 else
2311   if test -n "$CC"; then
2312   ac_cv_prog_CC="$CC" # Let the user override the test.
2313 else
2314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2315 for as_dir in $PATH
2316 do
2317   IFS=$as_save_IFS
2318   test -z "$as_dir" && as_dir=.
2319   for ac_exec_ext in '' $ac_executable_extensions; do
2320   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2321     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2322     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2323     break 2
2324   fi
2325 done
2326 done
2327 IFS=$as_save_IFS
2328
2329 fi
2330 fi
2331 CC=$ac_cv_prog_CC
2332 if test -n "$CC"; then
2333   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2334 $as_echo "$CC" >&6; }
2335 else
2336   { $as_echo "$as_me:$LINENO: result: no" >&5
2337 $as_echo "no" >&6; }
2338 fi
2339
2340
2341 fi
2342 if test -z "$ac_cv_prog_CC"; then
2343   ac_ct_CC=$CC
2344   # Extract the first word of "gcc", so it can be a program name with args.
2345 set dummy gcc; ac_word=$2
2346 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2347 $as_echo_n "checking for $ac_word... " >&6; }
2348 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2349   $as_echo_n "(cached) " >&6
2350 else
2351   if test -n "$ac_ct_CC"; then
2352   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2353 else
2354 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2355 for as_dir in $PATH
2356 do
2357   IFS=$as_save_IFS
2358   test -z "$as_dir" && as_dir=.
2359   for ac_exec_ext in '' $ac_executable_extensions; do
2360   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2361     ac_cv_prog_ac_ct_CC="gcc"
2362     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2363     break 2
2364   fi
2365 done
2366 done
2367 IFS=$as_save_IFS
2368
2369 fi
2370 fi
2371 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2372 if test -n "$ac_ct_CC"; then
2373   { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2374 $as_echo "$ac_ct_CC" >&6; }
2375 else
2376   { $as_echo "$as_me:$LINENO: result: no" >&5
2377 $as_echo "no" >&6; }
2378 fi
2379
2380   if test "x$ac_ct_CC" = x; then
2381     CC=""
2382   else
2383     case $cross_compiling:$ac_tool_warned in
2384 yes:)
2385 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2386 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2387 ac_tool_warned=yes ;;
2388 esac
2389     CC=$ac_ct_CC
2390   fi
2391 else
2392   CC="$ac_cv_prog_CC"
2393 fi
2394
2395 if test -z "$CC"; then
2396           if test -n "$ac_tool_prefix"; then
2397     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2398 set dummy ${ac_tool_prefix}cc; ac_word=$2
2399 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2400 $as_echo_n "checking for $ac_word... " >&6; }
2401 if test "${ac_cv_prog_CC+set}" = set; then
2402   $as_echo_n "(cached) " >&6
2403 else
2404   if test -n "$CC"; then
2405   ac_cv_prog_CC="$CC" # Let the user override the test.
2406 else
2407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2408 for as_dir in $PATH
2409 do
2410   IFS=$as_save_IFS
2411   test -z "$as_dir" && as_dir=.
2412   for ac_exec_ext in '' $ac_executable_extensions; do
2413   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2414     ac_cv_prog_CC="${ac_tool_prefix}cc"
2415     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2416     break 2
2417   fi
2418 done
2419 done
2420 IFS=$as_save_IFS
2421
2422 fi
2423 fi
2424 CC=$ac_cv_prog_CC
2425 if test -n "$CC"; then
2426   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2427 $as_echo "$CC" >&6; }
2428 else
2429   { $as_echo "$as_me:$LINENO: result: no" >&5
2430 $as_echo "no" >&6; }
2431 fi
2432
2433
2434   fi
2435 fi
2436 if test -z "$CC"; then
2437   # Extract the first word of "cc", so it can be a program name with args.
2438 set dummy cc; ac_word=$2
2439 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2440 $as_echo_n "checking for $ac_word... " >&6; }
2441 if test "${ac_cv_prog_CC+set}" = set; then
2442   $as_echo_n "(cached) " >&6
2443 else
2444   if test -n "$CC"; then
2445   ac_cv_prog_CC="$CC" # Let the user override the test.
2446 else
2447   ac_prog_rejected=no
2448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2449 for as_dir in $PATH
2450 do
2451   IFS=$as_save_IFS
2452   test -z "$as_dir" && as_dir=.
2453   for ac_exec_ext in '' $ac_executable_extensions; do
2454   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2455     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2456        ac_prog_rejected=yes
2457        continue
2458      fi
2459     ac_cv_prog_CC="cc"
2460     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2461     break 2
2462   fi
2463 done
2464 done
2465 IFS=$as_save_IFS
2466
2467 if test $ac_prog_rejected = yes; then
2468   # We found a bogon in the path, so make sure we never use it.
2469   set dummy $ac_cv_prog_CC
2470   shift
2471   if test $# != 0; then
2472     # We chose a different compiler from the bogus one.
2473     # However, it has the same basename, so the bogon will be chosen
2474     # first if we set CC to just the basename; use the full file name.
2475     shift
2476     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2477   fi
2478 fi
2479 fi
2480 fi
2481 CC=$ac_cv_prog_CC
2482 if test -n "$CC"; then
2483   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2484 $as_echo "$CC" >&6; }
2485 else
2486   { $as_echo "$as_me:$LINENO: result: no" >&5
2487 $as_echo "no" >&6; }
2488 fi
2489
2490
2491 fi
2492 if test -z "$CC"; then
2493   if test -n "$ac_tool_prefix"; then
2494   for ac_prog in cl.exe
2495   do
2496     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2497 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2498 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2499 $as_echo_n "checking for $ac_word... " >&6; }
2500 if test "${ac_cv_prog_CC+set}" = set; then
2501   $as_echo_n "(cached) " >&6
2502 else
2503   if test -n "$CC"; then
2504   ac_cv_prog_CC="$CC" # Let the user override the test.
2505 else
2506 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2507 for as_dir in $PATH
2508 do
2509   IFS=$as_save_IFS
2510   test -z "$as_dir" && as_dir=.
2511   for ac_exec_ext in '' $ac_executable_extensions; do
2512   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2513     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2514     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2515     break 2
2516   fi
2517 done
2518 done
2519 IFS=$as_save_IFS
2520
2521 fi
2522 fi
2523 CC=$ac_cv_prog_CC
2524 if test -n "$CC"; then
2525   { $as_echo "$as_me:$LINENO: result: $CC" >&5
2526 $as_echo "$CC" >&6; }
2527 else
2528   { $as_echo "$as_me:$LINENO: result: no" >&5
2529 $as_echo "no" >&6; }
2530 fi
2531
2532
2533     test -n "$CC" && break
2534   done
2535 fi
2536 if test -z "$CC"; then
2537   ac_ct_CC=$CC
2538   for ac_prog in cl.exe
2539 do
2540   # Extract the first word of "$ac_prog", so it can be a program name with args.
2541 set dummy $ac_prog; ac_word=$2
2542 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2543 $as_echo_n "checking for $ac_word... " >&6; }
2544 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2545   $as_echo_n "(cached) " >&6
2546 else
2547   if test -n "$ac_ct_CC"; then
2548   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2549 else
2550 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2551 for as_dir in $PATH
2552 do
2553   IFS=$as_save_IFS
2554   test -z "$as_dir" && as_dir=.
2555   for ac_exec_ext in '' $ac_executable_extensions; do
2556   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2557     ac_cv_prog_ac_ct_CC="$ac_prog"
2558     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2559     break 2
2560   fi
2561 done
2562 done
2563 IFS=$as_save_IFS
2564
2565 fi
2566 fi
2567 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2568 if test -n "$ac_ct_CC"; then
2569   { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2570 $as_echo "$ac_ct_CC" >&6; }
2571 else
2572   { $as_echo "$as_me:$LINENO: result: no" >&5
2573 $as_echo "no" >&6; }
2574 fi
2575
2576
2577   test -n "$ac_ct_CC" && break
2578 done
2579
2580   if test "x$ac_ct_CC" = x; then
2581     CC=""
2582   else
2583     case $cross_compiling:$ac_tool_warned in
2584 yes:)
2585 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2586 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2587 ac_tool_warned=yes ;;
2588 esac
2589     CC=$ac_ct_CC
2590   fi
2591 fi
2592
2593 fi
2594
2595
2596 test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2597 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2598 { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2599 See \`config.log' for more details." >&5
2600 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH
2601 See \`config.log' for more details." >&2;}
2602    { (exit 1); exit 1; }; }; }
2603
2604 # Provide some information about the compiler.
2605 $as_echo "$as_me:$LINENO: checking for C compiler version" >&5
2606 set X $ac_compile
2607 ac_compiler=$2
2608 { (ac_try="$ac_compiler --version >&5"
2609 case "(($ac_try" in
2610   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2611   *) ac_try_echo=$ac_try;;
2612 esac
2613 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2614 $as_echo "$ac_try_echo") >&5
2615   (eval "$ac_compiler --version >&5") 2>&5
2616   ac_status=$?
2617   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2618   (exit $ac_status); }
2619 { (ac_try="$ac_compiler -v >&5"
2620 case "(($ac_try" in
2621   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2622   *) ac_try_echo=$ac_try;;
2623 esac
2624 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2625 $as_echo "$ac_try_echo") >&5
2626   (eval "$ac_compiler -v >&5") 2>&5
2627   ac_status=$?
2628   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2629   (exit $ac_status); }
2630 { (ac_try="$ac_compiler -V >&5"
2631 case "(($ac_try" in
2632   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2633   *) ac_try_echo=$ac_try;;
2634 esac
2635 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2636 $as_echo "$ac_try_echo") >&5
2637   (eval "$ac_compiler -V >&5") 2>&5
2638   ac_status=$?
2639   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2640   (exit $ac_status); }
2641
2642 cat >conftest.$ac_ext <<_ACEOF
2643 /* confdefs.h.  */
2644 _ACEOF
2645 cat confdefs.h >>conftest.$ac_ext
2646 cat >>conftest.$ac_ext <<_ACEOF
2647 /* end confdefs.h.  */
2648
2649 int
2650 main ()
2651 {
2652
2653   ;
2654   return 0;
2655 }
2656 _ACEOF
2657 ac_clean_files_save=$ac_clean_files
2658 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2659 # Try to create an executable without -o first, disregard a.out.
2660 # It will help us diagnose broken compilers, and finding out an intuition
2661 # of exeext.
2662 { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2663 $as_echo_n "checking for C compiler default output file name... " >&6; }
2664 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2665
2666 # The possible output files:
2667 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2668
2669 ac_rmfiles=
2670 for ac_file in $ac_files
2671 do
2672   case $ac_file in
2673     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2674     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2675   esac
2676 done
2677 rm -f $ac_rmfiles
2678
2679 if { (ac_try="$ac_link_default"
2680 case "(($ac_try" in
2681   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2682   *) ac_try_echo=$ac_try;;
2683 esac
2684 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2685 $as_echo "$ac_try_echo") >&5
2686   (eval "$ac_link_default") 2>&5
2687   ac_status=$?
2688   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2689   (exit $ac_status); }; then
2690   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2691 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2692 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2693 # so that the user can short-circuit this test for compilers unknown to
2694 # Autoconf.
2695 for ac_file in $ac_files ''
2696 do
2697   test -f "$ac_file" || continue
2698   case $ac_file in
2699     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2700         ;;
2701     [ab].out )
2702         # We found the default executable, but exeext='' is most
2703         # certainly right.
2704         break;;
2705     *.* )
2706         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2707         then :; else
2708            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2709         fi
2710         # We set ac_cv_exeext here because the later test for it is not
2711         # safe: cross compilers may not add the suffix if given an `-o'
2712         # argument, so we may need to know it at that point already.
2713         # Even if this section looks crufty: it has the advantage of
2714         # actually working.
2715         break;;
2716     * )
2717         break;;
2718   esac
2719 done
2720 test "$ac_cv_exeext" = no && ac_cv_exeext=
2721
2722 else
2723   ac_file=''
2724 fi
2725
2726 { $as_echo "$as_me:$LINENO: result: $ac_file" >&5
2727 $as_echo "$ac_file" >&6; }
2728 if test -z "$ac_file"; then
2729   $as_echo "$as_me: failed program was:" >&5
2730 sed 's/^/| /' conftest.$ac_ext >&5
2731
2732 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2733 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2734 { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
2735 See \`config.log' for more details." >&5
2736 $as_echo "$as_me: error: C compiler cannot create executables
2737 See \`config.log' for more details." >&2;}
2738    { (exit 77); exit 77; }; }; }
2739 fi
2740
2741 ac_exeext=$ac_cv_exeext
2742
2743 # Check that the compiler produces executables we can run.  If not, either
2744 # the compiler is broken, or we cross compile.
2745 { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2746 $as_echo_n "checking whether the C compiler works... " >&6; }
2747 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2748 # If not cross compiling, check that we can run a simple program.
2749 if test "$cross_compiling" != yes; then
2750   if { ac_try='./$ac_file'
2751   { (case "(($ac_try" in
2752   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2753   *) ac_try_echo=$ac_try;;
2754 esac
2755 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2756 $as_echo "$ac_try_echo") >&5
2757   (eval "$ac_try") 2>&5
2758   ac_status=$?
2759   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2760   (exit $ac_status); }; }; then
2761     cross_compiling=no
2762   else
2763     if test "$cross_compiling" = maybe; then
2764         cross_compiling=yes
2765     else
2766         { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2767 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2768 { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
2769 If you meant to cross compile, use \`--host'.
2770 See \`config.log' for more details." >&5
2771 $as_echo "$as_me: error: cannot run C compiled programs.
2772 If you meant to cross compile, use \`--host'.
2773 See \`config.log' for more details." >&2;}
2774    { (exit 1); exit 1; }; }; }
2775     fi
2776   fi
2777 fi
2778 { $as_echo "$as_me:$LINENO: result: yes" >&5
2779 $as_echo "yes" >&6; }
2780
2781 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2782 ac_clean_files=$ac_clean_files_save
2783 # Check that the compiler produces executables we can run.  If not, either
2784 # the compiler is broken, or we cross compile.
2785 { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2786 $as_echo_n "checking whether we are cross compiling... " >&6; }
2787 { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
2788 $as_echo "$cross_compiling" >&6; }
2789
2790 { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
2791 $as_echo_n "checking for suffix of executables... " >&6; }
2792 if { (ac_try="$ac_link"
2793 case "(($ac_try" in
2794   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2795   *) ac_try_echo=$ac_try;;
2796 esac
2797 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2798 $as_echo "$ac_try_echo") >&5
2799   (eval "$ac_link") 2>&5
2800   ac_status=$?
2801   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2802   (exit $ac_status); }; then
2803   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2804 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2805 # work properly (i.e., refer to `conftest.exe'), while it won't with
2806 # `rm'.
2807 for ac_file in conftest.exe conftest conftest.*; do
2808   test -f "$ac_file" || continue
2809   case $ac_file in
2810     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2811     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2812           break;;
2813     * ) break;;
2814   esac
2815 done
2816 else
2817   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2818 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2819 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2820 See \`config.log' for more details." >&5
2821 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2822 See \`config.log' for more details." >&2;}
2823    { (exit 1); exit 1; }; }; }
2824 fi
2825
2826 rm -f conftest$ac_cv_exeext
2827 { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2828 $as_echo "$ac_cv_exeext" >&6; }
2829
2830 rm -f conftest.$ac_ext
2831 EXEEXT=$ac_cv_exeext
2832 ac_exeext=$EXEEXT
2833 { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
2834 $as_echo_n "checking for suffix of object files... " >&6; }
2835 if test "${ac_cv_objext+set}" = set; then
2836   $as_echo_n "(cached) " >&6
2837 else
2838   cat >conftest.$ac_ext <<_ACEOF
2839 /* confdefs.h.  */
2840 _ACEOF
2841 cat confdefs.h >>conftest.$ac_ext
2842 cat >>conftest.$ac_ext <<_ACEOF
2843 /* end confdefs.h.  */
2844
2845 int
2846 main ()
2847 {
2848
2849   ;
2850   return 0;
2851 }
2852 _ACEOF
2853 rm -f conftest.o conftest.obj
2854 if { (ac_try="$ac_compile"
2855 case "(($ac_try" in
2856   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2857   *) ac_try_echo=$ac_try;;
2858 esac
2859 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2860 $as_echo "$ac_try_echo") >&5
2861   (eval "$ac_compile") 2>&5
2862   ac_status=$?
2863   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2864   (exit $ac_status); }; then
2865   for ac_file in conftest.o conftest.obj conftest.*; do
2866   test -f "$ac_file" || continue;
2867   case $ac_file in
2868     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
2869     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2870        break;;
2871   esac
2872 done
2873 else
2874   $as_echo "$as_me: failed program was:" >&5
2875 sed 's/^/| /' conftest.$ac_ext >&5
2876
2877 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2878 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2879 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2880 See \`config.log' for more details." >&5
2881 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
2882 See \`config.log' for more details." >&2;}
2883    { (exit 1); exit 1; }; }; }
2884 fi
2885
2886 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2887 fi
2888 { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2889 $as_echo "$ac_cv_objext" >&6; }
2890 OBJEXT=$ac_cv_objext
2891 ac_objext=$OBJEXT
2892 { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2893 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
2894 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2895   $as_echo_n "(cached) " >&6
2896 else
2897   cat >conftest.$ac_ext <<_ACEOF
2898 /* confdefs.h.  */
2899 _ACEOF
2900 cat confdefs.h >>conftest.$ac_ext
2901 cat >>conftest.$ac_ext <<_ACEOF
2902 /* end confdefs.h.  */
2903
2904 int
2905 main ()
2906 {
2907 #ifndef __GNUC__
2908        choke me
2909 #endif
2910
2911   ;
2912   return 0;
2913 }
2914 _ACEOF
2915 rm -f conftest.$ac_objext
2916 if { (ac_try="$ac_compile"
2917 case "(($ac_try" in
2918   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2919   *) ac_try_echo=$ac_try;;
2920 esac
2921 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2922 $as_echo "$ac_try_echo") >&5
2923   (eval "$ac_compile") 2>conftest.er1
2924   ac_status=$?
2925   grep -v '^ *+' conftest.er1 >conftest.err
2926   rm -f conftest.er1
2927   cat conftest.err >&5
2928   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2929   (exit $ac_status); } && {
2930          test -z "$ac_c_werror_flag" ||
2931          test ! -s conftest.err
2932        } && test -s conftest.$ac_objext; then
2933   ac_compiler_gnu=yes
2934 else
2935   $as_echo "$as_me: failed program was:" >&5
2936 sed 's/^/| /' conftest.$ac_ext >&5
2937
2938         ac_compiler_gnu=no
2939 fi
2940
2941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2942 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2943
2944 fi
2945 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2946 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
2947 if test $ac_compiler_gnu = yes; then
2948   GCC=yes
2949 else
2950   GCC=
2951 fi
2952 ac_test_CFLAGS=${CFLAGS+set}
2953 ac_save_CFLAGS=$CFLAGS
2954 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2955 $as_echo_n "checking whether $CC accepts -g... " >&6; }
2956 if test "${ac_cv_prog_cc_g+set}" = set; then
2957   $as_echo_n "(cached) " >&6
2958 else
2959   ac_save_c_werror_flag=$ac_c_werror_flag
2960    ac_c_werror_flag=yes
2961    ac_cv_prog_cc_g=no
2962    CFLAGS="-g"
2963    cat >conftest.$ac_ext <<_ACEOF
2964 /* confdefs.h.  */
2965 _ACEOF
2966 cat confdefs.h >>conftest.$ac_ext
2967 cat >>conftest.$ac_ext <<_ACEOF
2968 /* end confdefs.h.  */
2969
2970 int
2971 main ()
2972 {
2973
2974   ;
2975   return 0;
2976 }
2977 _ACEOF
2978 rm -f conftest.$ac_objext
2979 if { (ac_try="$ac_compile"
2980 case "(($ac_try" in
2981   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2982   *) ac_try_echo=$ac_try;;
2983 esac
2984 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2985 $as_echo "$ac_try_echo") >&5
2986   (eval "$ac_compile") 2>conftest.er1
2987   ac_status=$?
2988   grep -v '^ *+' conftest.er1 >conftest.err
2989   rm -f conftest.er1
2990   cat conftest.err >&5
2991   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2992   (exit $ac_status); } && {
2993          test -z "$ac_c_werror_flag" ||
2994          test ! -s conftest.err
2995        } && test -s conftest.$ac_objext; then
2996   ac_cv_prog_cc_g=yes
2997 else
2998   $as_echo "$as_me: failed program was:" >&5
2999 sed 's/^/| /' conftest.$ac_ext >&5
3000
3001         CFLAGS=""
3002       cat >conftest.$ac_ext <<_ACEOF
3003 /* confdefs.h.  */
3004 _ACEOF
3005 cat confdefs.h >>conftest.$ac_ext
3006 cat >>conftest.$ac_ext <<_ACEOF
3007 /* end confdefs.h.  */
3008
3009 int
3010 main ()
3011 {
3012
3013   ;
3014   return 0;
3015 }
3016 _ACEOF
3017 rm -f conftest.$ac_objext
3018 if { (ac_try="$ac_compile"
3019 case "(($ac_try" in
3020   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3021   *) ac_try_echo=$ac_try;;
3022 esac
3023 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3024 $as_echo "$ac_try_echo") >&5
3025   (eval "$ac_compile") 2>conftest.er1
3026   ac_status=$?
3027   grep -v '^ *+' conftest.er1 >conftest.err
3028   rm -f conftest.er1
3029   cat conftest.err >&5
3030   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3031   (exit $ac_status); } && {
3032          test -z "$ac_c_werror_flag" ||
3033          test ! -s conftest.err
3034        } && test -s conftest.$ac_objext; then
3035   :
3036 else
3037   $as_echo "$as_me: failed program was:" >&5
3038 sed 's/^/| /' conftest.$ac_ext >&5
3039
3040         ac_c_werror_flag=$ac_save_c_werror_flag
3041          CFLAGS="-g"
3042          cat >conftest.$ac_ext <<_ACEOF
3043 /* confdefs.h.  */
3044 _ACEOF
3045 cat confdefs.h >>conftest.$ac_ext
3046 cat >>conftest.$ac_ext <<_ACEOF
3047 /* end confdefs.h.  */
3048
3049 int
3050 main ()
3051 {
3052
3053   ;
3054   return 0;
3055 }
3056 _ACEOF
3057 rm -f conftest.$ac_objext
3058 if { (ac_try="$ac_compile"
3059 case "(($ac_try" in
3060   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3061   *) ac_try_echo=$ac_try;;
3062 esac
3063 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3064 $as_echo "$ac_try_echo") >&5
3065   (eval "$ac_compile") 2>conftest.er1
3066   ac_status=$?
3067   grep -v '^ *+' conftest.er1 >conftest.err
3068   rm -f conftest.er1
3069   cat conftest.err >&5
3070   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3071   (exit $ac_status); } && {
3072          test -z "$ac_c_werror_flag" ||
3073          test ! -s conftest.err
3074        } && test -s conftest.$ac_objext; then
3075   ac_cv_prog_cc_g=yes
3076 else
3077   $as_echo "$as_me: failed program was:" >&5
3078 sed 's/^/| /' conftest.$ac_ext >&5
3079
3080
3081 fi
3082
3083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3084 fi
3085
3086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3087 fi
3088
3089 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3090    ac_c_werror_flag=$ac_save_c_werror_flag
3091 fi
3092 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3093 $as_echo "$ac_cv_prog_cc_g" >&6; }
3094 if test "$ac_test_CFLAGS" = set; then
3095   CFLAGS=$ac_save_CFLAGS
3096 elif test $ac_cv_prog_cc_g = yes; then
3097   if test "$GCC" = yes; then
3098     CFLAGS="-g -O2"
3099   else
3100     CFLAGS="-g"
3101   fi
3102 else
3103   if test "$GCC" = yes; then
3104     CFLAGS="-O2"
3105   else
3106     CFLAGS=
3107   fi
3108 fi
3109 { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3110 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3111 if test "${ac_cv_prog_cc_c89+set}" = set; then
3112   $as_echo_n "(cached) " >&6
3113 else
3114   ac_cv_prog_cc_c89=no
3115 ac_save_CC=$CC
3116 cat >conftest.$ac_ext <<_ACEOF
3117 /* confdefs.h.  */
3118 _ACEOF
3119 cat confdefs.h >>conftest.$ac_ext
3120 cat >>conftest.$ac_ext <<_ACEOF
3121 /* end confdefs.h.  */
3122 #include <stdarg.h>
3123 #include <stdio.h>
3124 #include <sys/types.h>
3125 #include <sys/stat.h>
3126 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3127 struct buf { int x; };
3128 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3129 static char *e (p, i)
3130      char **p;
3131      int i;
3132 {
3133   return p[i];
3134 }
3135 static char *f (char * (*g) (char **, int), char **p, ...)
3136 {
3137   char *s;
3138   va_list v;
3139   va_start (v,p);
3140   s = g (p, va_arg (v,int));
3141   va_end (v);
3142   return s;
3143 }
3144
3145 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3146    function prototypes and stuff, but not '\xHH' hex character constants.
3147    These don't provoke an error unfortunately, instead are silently treated
3148    as 'x'.  The following induces an error, until -std is added to get
3149    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3150    array size at least.  It's necessary to write '\x00'==0 to get something
3151    that's true only with -std.  */
3152 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3153
3154 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3155    inside strings and character constants.  */
3156 #define FOO(x) 'x'
3157 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3158
3159 int test (int i, double x);
3160 struct s1 {int (*f) (int a);};
3161 struct s2 {int (*f) (double a);};
3162 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3163 int argc;
3164 char **argv;
3165 int
3166 main ()
3167 {
3168 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3169   ;
3170   return 0;
3171 }
3172 _ACEOF
3173 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3174         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3175 do
3176   CC="$ac_save_CC $ac_arg"
3177   rm -f conftest.$ac_objext
3178 if { (ac_try="$ac_compile"
3179 case "(($ac_try" in
3180   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3181   *) ac_try_echo=$ac_try;;
3182 esac
3183 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3184 $as_echo "$ac_try_echo") >&5
3185   (eval "$ac_compile") 2>conftest.er1
3186   ac_status=$?
3187   grep -v '^ *+' conftest.er1 >conftest.err
3188   rm -f conftest.er1
3189   cat conftest.err >&5
3190   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3191   (exit $ac_status); } && {
3192          test -z "$ac_c_werror_flag" ||
3193          test ! -s conftest.err
3194        } && test -s conftest.$ac_objext; then
3195   ac_cv_prog_cc_c89=$ac_arg
3196 else
3197   $as_echo "$as_me: failed program was:" >&5
3198 sed 's/^/| /' conftest.$ac_ext >&5
3199
3200
3201 fi
3202
3203 rm -f core conftest.err conftest.$ac_objext
3204   test "x$ac_cv_prog_cc_c89" != "xno" && break
3205 done
3206 rm -f conftest.$ac_ext
3207 CC=$ac_save_CC
3208
3209 fi
3210 # AC_CACHE_VAL
3211 case "x$ac_cv_prog_cc_c89" in
3212   x)
3213     { $as_echo "$as_me:$LINENO: result: none needed" >&5
3214 $as_echo "none needed" >&6; } ;;
3215   xno)
3216     { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3217 $as_echo "unsupported" >&6; } ;;
3218   *)
3219     CC="$CC $ac_cv_prog_cc_c89"
3220     { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3221 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3222 esac
3223
3224
3225 ac_ext=c
3226 ac_cpp='$CPP $CPPFLAGS'
3227 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3228 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3229 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3230
3231     ac_ext=c
3232 ac_cpp='$CPP $CPPFLAGS'
3233 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3234 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3235 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3236 { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3237 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3238 # On Suns, sometimes $CPP names a directory.
3239 if test -n "$CPP" && test -d "$CPP"; then
3240   CPP=
3241 fi
3242 if test -z "$CPP"; then
3243   if test "${ac_cv_prog_CPP+set}" = set; then
3244   $as_echo_n "(cached) " >&6
3245 else
3246       # Double quotes because CPP needs to be expanded
3247     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3248     do
3249       ac_preproc_ok=false
3250 for ac_c_preproc_warn_flag in '' yes
3251 do
3252   # Use a header file that comes with gcc, so configuring glibc
3253   # with a fresh cross-compiler works.
3254   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3255   # <limits.h> exists even on freestanding compilers.
3256   # On the NeXT, cc -E runs the code through the compiler's parser,
3257   # not just through cpp. "Syntax error" is here to catch this case.
3258   cat >conftest.$ac_ext <<_ACEOF
3259 /* confdefs.h.  */
3260 _ACEOF
3261 cat confdefs.h >>conftest.$ac_ext
3262 cat >>conftest.$ac_ext <<_ACEOF
3263 /* end confdefs.h.  */
3264 #ifdef __STDC__
3265 # include <limits.h>
3266 #else
3267 # include <assert.h>
3268 #endif
3269                      Syntax error
3270 _ACEOF
3271 if { (ac_try="$ac_cpp conftest.$ac_ext"
3272 case "(($ac_try" in
3273   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3274   *) ac_try_echo=$ac_try;;
3275 esac
3276 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3277 $as_echo "$ac_try_echo") >&5
3278   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3279   ac_status=$?
3280   grep -v '^ *+' conftest.er1 >conftest.err
3281   rm -f conftest.er1
3282   cat conftest.err >&5
3283   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3284   (exit $ac_status); } >/dev/null && {
3285          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3286          test ! -s conftest.err
3287        }; then
3288   :
3289 else
3290   $as_echo "$as_me: failed program was:" >&5
3291 sed 's/^/| /' conftest.$ac_ext >&5
3292
3293   # Broken: fails on valid input.
3294 continue
3295 fi
3296
3297 rm -f conftest.err conftest.$ac_ext
3298
3299   # OK, works on sane cases.  Now check whether nonexistent headers
3300   # can be detected and how.
3301   cat >conftest.$ac_ext <<_ACEOF
3302 /* confdefs.h.  */
3303 _ACEOF
3304 cat confdefs.h >>conftest.$ac_ext
3305 cat >>conftest.$ac_ext <<_ACEOF
3306 /* end confdefs.h.  */
3307 #include <ac_nonexistent.h>
3308 _ACEOF
3309 if { (ac_try="$ac_cpp conftest.$ac_ext"
3310 case "(($ac_try" in
3311   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3312   *) ac_try_echo=$ac_try;;
3313 esac
3314 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3315 $as_echo "$ac_try_echo") >&5
3316   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3317   ac_status=$?
3318   grep -v '^ *+' conftest.er1 >conftest.err
3319   rm -f conftest.er1
3320   cat conftest.err >&5
3321   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3322   (exit $ac_status); } >/dev/null && {
3323          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3324          test ! -s conftest.err
3325        }; then
3326   # Broken: success on invalid input.
3327 continue
3328 else
3329   $as_echo "$as_me: failed program was:" >&5
3330 sed 's/^/| /' conftest.$ac_ext >&5
3331
3332   # Passes both tests.
3333 ac_preproc_ok=:
3334 break
3335 fi
3336
3337 rm -f conftest.err conftest.$ac_ext
3338
3339 done
3340 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3341 rm -f conftest.err conftest.$ac_ext
3342 if $ac_preproc_ok; then
3343   break
3344 fi
3345
3346     done
3347     ac_cv_prog_CPP=$CPP
3348
3349 fi
3350   CPP=$ac_cv_prog_CPP
3351 else
3352   ac_cv_prog_CPP=$CPP
3353 fi
3354 { $as_echo "$as_me:$LINENO: result: $CPP" >&5
3355 $as_echo "$CPP" >&6; }
3356 ac_preproc_ok=false
3357 for ac_c_preproc_warn_flag in '' yes
3358 do
3359   # Use a header file that comes with gcc, so configuring glibc
3360   # with a fresh cross-compiler works.
3361   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3362   # <limits.h> exists even on freestanding compilers.
3363   # On the NeXT, cc -E runs the code through the compiler's parser,
3364   # not just through cpp. "Syntax error" is here to catch this case.
3365   cat >conftest.$ac_ext <<_ACEOF
3366 /* confdefs.h.  */
3367 _ACEOF
3368 cat confdefs.h >>conftest.$ac_ext
3369 cat >>conftest.$ac_ext <<_ACEOF
3370 /* end confdefs.h.  */
3371 #ifdef __STDC__
3372 # include <limits.h>
3373 #else
3374 # include <assert.h>
3375 #endif
3376                      Syntax error
3377 _ACEOF
3378 if { (ac_try="$ac_cpp conftest.$ac_ext"
3379 case "(($ac_try" in
3380   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3381   *) ac_try_echo=$ac_try;;
3382 esac
3383 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3384 $as_echo "$ac_try_echo") >&5
3385   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3386   ac_status=$?
3387   grep -v '^ *+' conftest.er1 >conftest.err
3388   rm -f conftest.er1
3389   cat conftest.err >&5
3390   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3391   (exit $ac_status); } >/dev/null && {
3392          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3393          test ! -s conftest.err
3394        }; then
3395   :
3396 else
3397   $as_echo "$as_me: failed program was:" >&5
3398 sed 's/^/| /' conftest.$ac_ext >&5
3399
3400   # Broken: fails on valid input.
3401 continue
3402 fi
3403
3404 rm -f conftest.err conftest.$ac_ext
3405
3406   # OK, works on sane cases.  Now check whether nonexistent headers
3407   # can be detected and how.
3408   cat >conftest.$ac_ext <<_ACEOF
3409 /* confdefs.h.  */
3410 _ACEOF
3411 cat confdefs.h >>conftest.$ac_ext
3412 cat >>conftest.$ac_ext <<_ACEOF
3413 /* end confdefs.h.  */
3414 #include <ac_nonexistent.h>
3415 _ACEOF
3416 if { (ac_try="$ac_cpp conftest.$ac_ext"
3417 case "(($ac_try" in
3418   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3419   *) ac_try_echo=$ac_try;;
3420 esac
3421 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3422 $as_echo "$ac_try_echo") >&5
3423   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3424   ac_status=$?
3425   grep -v '^ *+' conftest.er1 >conftest.err
3426   rm -f conftest.er1
3427   cat conftest.err >&5
3428   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3429   (exit $ac_status); } >/dev/null && {
3430          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3431          test ! -s conftest.err
3432        }; then
3433   # Broken: success on invalid input.
3434 continue
3435 else
3436   $as_echo "$as_me: failed program was:" >&5
3437 sed 's/^/| /' conftest.$ac_ext >&5
3438
3439   # Passes both tests.
3440 ac_preproc_ok=:
3441 break
3442 fi
3443
3444 rm -f conftest.err conftest.$ac_ext
3445
3446 done
3447 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3448 rm -f conftest.err conftest.$ac_ext
3449 if $ac_preproc_ok; then
3450   :
3451 else
3452   { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3453 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3454 { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3455 See \`config.log' for more details." >&5
3456 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3457 See \`config.log' for more details." >&2;}
3458    { (exit 1); exit 1; }; }; }
3459 fi
3460
3461 ac_ext=c
3462 ac_cpp='$CPP $CPPFLAGS'
3463 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3464 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3465 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3466
3467
3468     # Find a good install program.  We prefer a C program (faster),
3469 # so one script is as good as another.  But avoid the broken or
3470 # incompatible versions:
3471 # SysV /etc/install, /usr/sbin/install
3472 # SunOS /usr/etc/install
3473 # IRIX /sbin/install
3474 # AIX /bin/install
3475 # AmigaOS /C/install, which installs bootblocks on floppy discs
3476 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3477 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3478 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3479 # OS/2's system install, which has a completely different semantic
3480 # ./install, which can be erroneously created by make from ./install.sh.
3481 # Reject install programs that cannot install multiple files.
3482 { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3483 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3484 if test -z "$INSTALL"; then
3485 if test "${ac_cv_path_install+set}" = set; then
3486   $as_echo_n "(cached) " >&6
3487 else
3488   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3489 for as_dir in $PATH
3490 do
3491   IFS=$as_save_IFS
3492   test -z "$as_dir" && as_dir=.
3493   # Account for people who put trailing slashes in PATH elements.
3494 case $as_dir/ in
3495   ./ | .// | /cC/* | \
3496   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3497   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3498   /usr/ucb/* ) ;;
3499   *)
3500     # OSF1 and SCO ODT 3.0 have their own names for install.
3501     # Don't use installbsd from OSF since it installs stuff as root
3502     # by default.
3503     for ac_prog in ginstall scoinst install; do
3504       for ac_exec_ext in '' $ac_executable_extensions; do
3505         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3506           if test $ac_prog = install &&
3507             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3508             # AIX install.  It has an incompatible calling convention.
3509             :
3510           elif test $ac_prog = install &&
3511             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3512             # program-specific install script used by HP pwplus--don't use.
3513             :
3514           else
3515             rm -rf conftest.one conftest.two conftest.dir
3516             echo one > conftest.one
3517             echo two > conftest.two
3518             mkdir conftest.dir
3519             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3520               test -s conftest.one && test -s conftest.two &&
3521               test -s conftest.dir/conftest.one &&
3522               test -s conftest.dir/conftest.two
3523             then
3524               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3525               break 3
3526             fi
3527           fi
3528         fi
3529       done
3530     done
3531     ;;
3532 esac
3533
3534 done
3535 IFS=$as_save_IFS
3536
3537 rm -rf conftest.one conftest.two conftest.dir
3538
3539 fi
3540   if test "${ac_cv_path_install+set}" = set; then
3541     INSTALL=$ac_cv_path_install
3542   else
3543     # As a last resort, use the slow shell script.  Don't cache a
3544     # value for INSTALL within a source directory, because that will
3545     # break other packages using the cache if that directory is
3546     # removed, or if the value is a relative name.
3547     INSTALL=$ac_install_sh
3548   fi
3549 fi
3550 { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
3551 $as_echo "$INSTALL" >&6; }
3552
3553 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3554 # It thinks the first close brace ends the variable substitution.
3555 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3556
3557 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3558
3559 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3560
3561
3562     #--------------------------------------------------------------------
3563     # Checks to see if the make program sets the $MAKE variable.
3564     #--------------------------------------------------------------------
3565
3566     { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3567 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3568 set x ${MAKE-make}
3569 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3570 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
3571   $as_echo_n "(cached) " >&6
3572 else
3573   cat >conftest.make <<\_ACEOF
3574 SHELL = /bin/sh
3575 all:
3576         @echo '@@@%%%=$(MAKE)=@@@%%%'
3577 _ACEOF
3578 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3579 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3580   *@@@%%%=?*=@@@%%%*)
3581     eval ac_cv_prog_make_${ac_make}_set=yes;;
3582   *)
3583     eval ac_cv_prog_make_${ac_make}_set=no;;
3584 esac
3585 rm -f conftest.make
3586 fi
3587 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3588   { $as_echo "$as_me:$LINENO: result: yes" >&5
3589 $as_echo "yes" >&6; }
3590   SET_MAKE=
3591 else
3592   { $as_echo "$as_me:$LINENO: result: no" >&5
3593 $as_echo "no" >&6; }
3594   SET_MAKE="MAKE=${MAKE-make}"
3595 fi
3596
3597
3598     #--------------------------------------------------------------------
3599     # Find ranlib
3600     #--------------------------------------------------------------------
3601
3602     if test -n "$ac_tool_prefix"; then
3603   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3604 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3605 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3606 $as_echo_n "checking for $ac_word... " >&6; }
3607 if test "${ac_cv_prog_RANLIB+set}" = set; then
3608   $as_echo_n "(cached) " >&6
3609 else
3610   if test -n "$RANLIB"; then
3611   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3612 else
3613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3614 for as_dir in $PATH
3615 do
3616   IFS=$as_save_IFS
3617   test -z "$as_dir" && as_dir=.
3618   for ac_exec_ext in '' $ac_executable_extensions; do
3619   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3620     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3621     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3622     break 2
3623   fi
3624 done
3625 done
3626 IFS=$as_save_IFS
3627
3628 fi
3629 fi
3630 RANLIB=$ac_cv_prog_RANLIB
3631 if test -n "$RANLIB"; then
3632   { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
3633 $as_echo "$RANLIB" >&6; }
3634 else
3635   { $as_echo "$as_me:$LINENO: result: no" >&5
3636 $as_echo "no" >&6; }
3637 fi
3638
3639
3640 fi
3641 if test -z "$ac_cv_prog_RANLIB"; then
3642   ac_ct_RANLIB=$RANLIB
3643   # Extract the first word of "ranlib", so it can be a program name with args.
3644 set dummy ranlib; ac_word=$2
3645 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3646 $as_echo_n "checking for $ac_word... " >&6; }
3647 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3648   $as_echo_n "(cached) " >&6
3649 else
3650   if test -n "$ac_ct_RANLIB"; then
3651   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3652 else
3653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3654 for as_dir in $PATH
3655 do
3656   IFS=$as_save_IFS
3657   test -z "$as_dir" && as_dir=.
3658   for ac_exec_ext in '' $ac_executable_extensions; do
3659   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3660     ac_cv_prog_ac_ct_RANLIB="ranlib"
3661     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3662     break 2
3663   fi
3664 done
3665 done
3666 IFS=$as_save_IFS
3667
3668 fi
3669 fi
3670 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3671 if test -n "$ac_ct_RANLIB"; then
3672   { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3673 $as_echo "$ac_ct_RANLIB" >&6; }
3674 else
3675   { $as_echo "$as_me:$LINENO: result: no" >&5
3676 $as_echo "no" >&6; }
3677 fi
3678
3679   if test "x$ac_ct_RANLIB" = x; then
3680     RANLIB=":"
3681   else
3682     case $cross_compiling:$ac_tool_warned in
3683 yes:)
3684 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
3685 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3686 ac_tool_warned=yes ;;
3687 esac
3688     RANLIB=$ac_ct_RANLIB
3689   fi
3690 else
3691   RANLIB="$ac_cv_prog_RANLIB"
3692 fi
3693
3694
3695     #--------------------------------------------------------------------
3696     # Determines the correct binary file extension (.o, .obj, .exe etc.)
3697     #--------------------------------------------------------------------
3698
3699
3700
3701
3702
3703
3704 { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3705 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3706 if test "${ac_cv_path_GREP+set}" = set; then
3707   $as_echo_n "(cached) " >&6
3708 else
3709   if test -z "$GREP"; then
3710   ac_path_GREP_found=false
3711   # Loop through the user's path and test for each of PROGNAME-LIST
3712   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3714 do
3715   IFS=$as_save_IFS
3716   test -z "$as_dir" && as_dir=.
3717   for ac_prog in grep ggrep; do
3718     for ac_exec_ext in '' $ac_executable_extensions; do
3719       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3720       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3721 # Check for GNU ac_path_GREP and select it if it is found.
3722   # Check for GNU $ac_path_GREP
3723 case `"$ac_path_GREP" --version 2>&1` in
3724 *GNU*)
3725   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3726 *)
3727   ac_count=0
3728   $as_echo_n 0123456789 >"conftest.in"
3729   while :
3730   do
3731     cat "conftest.in" "conftest.in" >"conftest.tmp"
3732     mv "conftest.tmp" "conftest.in"
3733     cp "conftest.in" "conftest.nl"
3734     $as_echo 'GREP' >> "conftest.nl"
3735     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3736     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3737     ac_count=`expr $ac_count + 1`
3738     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3739       # Best one so far, save it but keep looking for a better one
3740       ac_cv_path_GREP="$ac_path_GREP"
3741       ac_path_GREP_max=$ac_count
3742     fi
3743     # 10*(2^10) chars as input seems more than enough
3744     test $ac_count -gt 10 && break
3745   done
3746   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3747 esac
3748
3749       $ac_path_GREP_found && break 3
3750     done
3751   done
3752 done
3753 IFS=$as_save_IFS
3754   if test -z "$ac_cv_path_GREP"; then
3755     { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3756 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3757    { (exit 1); exit 1; }; }
3758   fi
3759 else
3760   ac_cv_path_GREP=$GREP
3761 fi
3762
3763 fi
3764 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3765 $as_echo "$ac_cv_path_GREP" >&6; }
3766  GREP="$ac_cv_path_GREP"
3767
3768
3769 { $as_echo "$as_me:$LINENO: checking for egrep" >&5
3770 $as_echo_n "checking for egrep... " >&6; }
3771 if test "${ac_cv_path_EGREP+set}" = set; then
3772   $as_echo_n "(cached) " >&6
3773 else
3774   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3775    then ac_cv_path_EGREP="$GREP -E"
3776    else
3777      if test -z "$EGREP"; then
3778   ac_path_EGREP_found=false
3779   # Loop through the user's path and test for each of PROGNAME-LIST
3780   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3782 do
3783   IFS=$as_save_IFS
3784   test -z "$as_dir" && as_dir=.
3785   for ac_prog in egrep; do
3786     for ac_exec_ext in '' $ac_executable_extensions; do
3787       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3788       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3789 # Check for GNU ac_path_EGREP and select it if it is found.
3790   # Check for GNU $ac_path_EGREP
3791 case `"$ac_path_EGREP" --version 2>&1` in
3792 *GNU*)
3793   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3794 *)
3795   ac_count=0
3796   $as_echo_n 0123456789 >"conftest.in"
3797   while :
3798   do
3799     cat "conftest.in" "conftest.in" >"conftest.tmp"
3800     mv "conftest.tmp" "conftest.in"
3801     cp "conftest.in" "conftest.nl"
3802     $as_echo 'EGREP' >> "conftest.nl"
3803     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3804     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3805     ac_count=`expr $ac_count + 1`
3806     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3807       # Best one so far, save it but keep looking for a better one
3808       ac_cv_path_EGREP="$ac_path_EGREP"
3809       ac_path_EGREP_max=$ac_count
3810     fi
3811     # 10*(2^10) chars as input seems more than enough
3812     test $ac_count -gt 10 && break
3813   done
3814   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3815 esac
3816
3817       $ac_path_EGREP_found && break 3
3818     done
3819   done
3820 done
3821 IFS=$as_save_IFS
3822   if test -z "$ac_cv_path_EGREP"; then
3823     { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3824 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3825    { (exit 1); exit 1; }; }
3826   fi
3827 else
3828   ac_cv_path_EGREP=$EGREP
3829 fi
3830
3831    fi
3832 fi
3833 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3834 $as_echo "$ac_cv_path_EGREP" >&6; }
3835  EGREP="$ac_cv_path_EGREP"
3836
3837
3838 { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3839 $as_echo_n "checking for ANSI C header files... " >&6; }
3840 if test "${ac_cv_header_stdc+set}" = set; then
3841   $as_echo_n "(cached) " >&6
3842 else
3843   cat >conftest.$ac_ext <<_ACEOF
3844 /* confdefs.h.  */
3845 _ACEOF
3846 cat confdefs.h >>conftest.$ac_ext
3847 cat >>conftest.$ac_ext <<_ACEOF
3848 /* end confdefs.h.  */
3849 #include <stdlib.h>
3850 #include <stdarg.h>
3851 #include <string.h>
3852 #include <float.h>
3853
3854 int
3855 main ()
3856 {
3857
3858   ;
3859   return 0;
3860 }
3861 _ACEOF
3862 rm -f conftest.$ac_objext
3863 if { (ac_try="$ac_compile"
3864 case "(($ac_try" in
3865   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3866   *) ac_try_echo=$ac_try;;
3867 esac
3868 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3869 $as_echo "$ac_try_echo") >&5
3870   (eval "$ac_compile") 2>conftest.er1
3871   ac_status=$?
3872   grep -v '^ *+' conftest.er1 >conftest.err
3873   rm -f conftest.er1
3874   cat conftest.err >&5
3875   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3876   (exit $ac_status); } && {
3877          test -z "$ac_c_werror_flag" ||
3878          test ! -s conftest.err
3879        } && test -s conftest.$ac_objext; then
3880   ac_cv_header_stdc=yes
3881 else
3882   $as_echo "$as_me: failed program was:" >&5
3883 sed 's/^/| /' conftest.$ac_ext >&5
3884
3885         ac_cv_header_stdc=no
3886 fi
3887
3888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3889
3890 if test $ac_cv_header_stdc = yes; then
3891   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3892   cat >conftest.$ac_ext <<_ACEOF
3893 /* confdefs.h.  */
3894 _ACEOF
3895 cat confdefs.h >>conftest.$ac_ext
3896 cat >>conftest.$ac_ext <<_ACEOF
3897 /* end confdefs.h.  */
3898 #include <string.h>
3899
3900 _ACEOF
3901 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3902   $EGREP "memchr" >/dev/null 2>&1; then
3903   :
3904 else
3905   ac_cv_header_stdc=no
3906 fi
3907 rm -f conftest*
3908
3909 fi
3910
3911 if test $ac_cv_header_stdc = yes; then
3912   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3913   cat >conftest.$ac_ext <<_ACEOF
3914 /* confdefs.h.  */
3915 _ACEOF
3916 cat confdefs.h >>conftest.$ac_ext
3917 cat >>conftest.$ac_ext <<_ACEOF
3918 /* end confdefs.h.  */
3919 #include <stdlib.h>
3920
3921 _ACEOF
3922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3923   $EGREP "free" >/dev/null 2>&1; then
3924   :
3925 else
3926   ac_cv_header_stdc=no
3927 fi
3928 rm -f conftest*
3929
3930 fi
3931
3932 if test $ac_cv_header_stdc = yes; then
3933   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3934   if test "$cross_compiling" = yes; then
3935   :
3936 else
3937   cat >conftest.$ac_ext <<_ACEOF
3938 /* confdefs.h.  */
3939 _ACEOF
3940 cat confdefs.h >>conftest.$ac_ext
3941 cat >>conftest.$ac_ext <<_ACEOF
3942 /* end confdefs.h.  */
3943 #include <ctype.h>
3944 #include <stdlib.h>
3945 #if ((' ' & 0x0FF) == 0x020)
3946 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3947 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3948 #else
3949 # define ISLOWER(c) \
3950                    (('a' <= (c) && (c) <= 'i') \
3951                      || ('j' <= (c) && (c) <= 'r') \
3952                      || ('s' <= (c) && (c) <= 'z'))
3953 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3954 #endif
3955
3956 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3957 int
3958 main ()
3959 {
3960   int i;
3961   for (i = 0; i < 256; i++)
3962     if (XOR (islower (i), ISLOWER (i))
3963         || toupper (i) != TOUPPER (i))
3964       return 2;
3965   return 0;
3966 }
3967 _ACEOF
3968 rm -f conftest$ac_exeext
3969 if { (ac_try="$ac_link"
3970 case "(($ac_try" in
3971   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3972   *) ac_try_echo=$ac_try;;
3973 esac
3974 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3975 $as_echo "$ac_try_echo") >&5
3976   (eval "$ac_link") 2>&5
3977   ac_status=$?
3978   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3979   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3980   { (case "(($ac_try" in
3981   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3982   *) ac_try_echo=$ac_try;;
3983 esac
3984 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3985 $as_echo "$ac_try_echo") >&5
3986   (eval "$ac_try") 2>&5
3987   ac_status=$?
3988   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3989   (exit $ac_status); }; }; then
3990   :
3991 else
3992   $as_echo "$as_me: program exited with status $ac_status" >&5
3993 $as_echo "$as_me: failed program was:" >&5
3994 sed 's/^/| /' conftest.$ac_ext >&5
3995
3996 ( exit $ac_status )
3997 ac_cv_header_stdc=no
3998 fi
3999 rm -rf conftest.dSYM
4000 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4001 fi
4002
4003
4004 fi
4005 fi
4006 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4007 $as_echo "$ac_cv_header_stdc" >&6; }
4008 if test $ac_cv_header_stdc = yes; then
4009
4010 cat >>confdefs.h <<\_ACEOF
4011 #define STDC_HEADERS 1
4012 _ACEOF
4013
4014 fi
4015
4016 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4027                   inttypes.h stdint.h unistd.h
4028 do
4029 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4030 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4031 $as_echo_n "checking for $ac_header... " >&6; }
4032 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4033   $as_echo_n "(cached) " >&6
4034 else
4035   cat >conftest.$ac_ext <<_ACEOF
4036 /* confdefs.h.  */
4037 _ACEOF
4038 cat confdefs.h >>conftest.$ac_ext
4039 cat >>conftest.$ac_ext <<_ACEOF
4040 /* end confdefs.h.  */
4041 $ac_includes_default
4042
4043 #include <$ac_header>
4044 _ACEOF
4045 rm -f conftest.$ac_objext
4046 if { (ac_try="$ac_compile"
4047 case "(($ac_try" in
4048   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4049   *) ac_try_echo=$ac_try;;
4050 esac
4051 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4052 $as_echo "$ac_try_echo") >&5
4053   (eval "$ac_compile") 2>conftest.er1
4054   ac_status=$?
4055   grep -v '^ *+' conftest.er1 >conftest.err
4056   rm -f conftest.er1
4057   cat conftest.err >&5
4058   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4059   (exit $ac_status); } && {
4060          test -z "$ac_c_werror_flag" ||
4061          test ! -s conftest.err
4062        } && test -s conftest.$ac_objext; then
4063   eval "$as_ac_Header=yes"
4064 else
4065   $as_echo "$as_me: failed program was:" >&5
4066 sed 's/^/| /' conftest.$ac_ext >&5
4067
4068         eval "$as_ac_Header=no"
4069 fi
4070
4071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4072 fi
4073 ac_res=`eval 'as_val=${'$as_ac_Header'}
4074                  $as_echo "$as_val"'`
4075                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4076 $as_echo "$ac_res" >&6; }
4077 as_val=`eval 'as_val=${'$as_ac_Header'}
4078                  $as_echo "$as_val"'`
4079    if test "x$as_val" = x""yes; then
4080   cat >>confdefs.h <<_ACEOF
4081 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4082 _ACEOF
4083
4084 fi
4085
4086 done
4087
4088
4089
4090     # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4091
4092
4093     #------------------------------------------------------------------------
4094     # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4095     # It makes compiling go faster.  (This is only a performance feature.)
4096     #------------------------------------------------------------------------
4097
4098     if test -z "$no_pipe" -a -n "$GCC"; then
4099         { $as_echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
4100 $as_echo_n "checking if the compiler understands -pipe... " >&6; }
4101 if test "${tcl_cv_cc_pipe+set}" = set; then
4102   $as_echo_n "(cached) " >&6
4103 else
4104
4105             hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4106             cat >conftest.$ac_ext <<_ACEOF
4107 /* confdefs.h.  */
4108 _ACEOF
4109 cat confdefs.h >>conftest.$ac_ext
4110 cat >>conftest.$ac_ext <<_ACEOF
4111 /* end confdefs.h.  */
4112
4113 int
4114 main ()
4115 {
4116
4117   ;
4118   return 0;
4119 }
4120 _ACEOF
4121 rm -f conftest.$ac_objext
4122 if { (ac_try="$ac_compile"
4123 case "(($ac_try" in
4124   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4125   *) ac_try_echo=$ac_try;;
4126 esac
4127 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4128 $as_echo "$ac_try_echo") >&5
4129   (eval "$ac_compile") 2>conftest.er1
4130   ac_status=$?
4131   grep -v '^ *+' conftest.er1 >conftest.err
4132   rm -f conftest.er1
4133   cat conftest.err >&5
4134   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4135   (exit $ac_status); } && {
4136          test -z "$ac_c_werror_flag" ||
4137          test ! -s conftest.err
4138        } && test -s conftest.$ac_objext; then
4139   tcl_cv_cc_pipe=yes
4140 else
4141   $as_echo "$as_me: failed program was:" >&5
4142 sed 's/^/| /' conftest.$ac_ext >&5
4143
4144         tcl_cv_cc_pipe=no
4145 fi
4146
4147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4148             CFLAGS=$hold_cflags
4149 fi
4150 { $as_echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
4151 $as_echo "$tcl_cv_cc_pipe" >&6; }
4152         if test $tcl_cv_cc_pipe = yes; then
4153             CFLAGS="$CFLAGS -pipe"
4154         fi
4155     fi
4156
4157     #--------------------------------------------------------------------
4158     # Common compiler flag setup
4159     #--------------------------------------------------------------------
4160
4161
4162  { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
4163 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
4164 if test "${ac_cv_c_bigendian+set}" = set; then
4165   $as_echo_n "(cached) " >&6
4166 else
4167   ac_cv_c_bigendian=unknown
4168     # See if we're dealing with a universal compiler.
4169     cat >conftest.$ac_ext <<_ACEOF
4170 /* confdefs.h.  */
4171 _ACEOF
4172 cat confdefs.h >>conftest.$ac_ext
4173 cat >>conftest.$ac_ext <<_ACEOF
4174 /* end confdefs.h.  */
4175 #ifndef __APPLE_CC__
4176                not a universal capable compiler
4177              #endif
4178              typedef int dummy;
4179
4180 _ACEOF
4181 rm -f conftest.$ac_objext
4182 if { (ac_try="$ac_compile"
4183 case "(($ac_try" in
4184   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4185   *) ac_try_echo=$ac_try;;
4186 esac
4187 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4188 $as_echo "$ac_try_echo") >&5
4189   (eval "$ac_compile") 2>conftest.er1
4190   ac_status=$?
4191   grep -v '^ *+' conftest.er1 >conftest.err
4192   rm -f conftest.er1
4193   cat conftest.err >&5
4194   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4195   (exit $ac_status); } && {
4196          test -z "$ac_c_werror_flag" ||
4197          test ! -s conftest.err
4198        } && test -s conftest.$ac_objext; then
4199
4200         # Check for potential -arch flags.  It is not universal unless
4201         # there are some -arch flags.  Note that *ppc* also matches
4202         # ppc64.  This check is also rather less than ideal.
4203         case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
4204           *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
4205         esac
4206 else
4207   $as_echo "$as_me: failed program was:" >&5
4208 sed 's/^/| /' conftest.$ac_ext >&5
4209
4210
4211 fi
4212
4213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4214     if test $ac_cv_c_bigendian = unknown; then
4215       # See if sys/param.h defines the BYTE_ORDER macro.
4216       cat >conftest.$ac_ext <<_ACEOF
4217 /* confdefs.h.  */
4218 _ACEOF
4219 cat confdefs.h >>conftest.$ac_ext
4220 cat >>conftest.$ac_ext <<_ACEOF
4221 /* end confdefs.h.  */
4222 #include <sys/types.h>
4223              #include <sys/param.h>
4224
4225 int
4226 main ()
4227 {
4228 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
4229                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
4230                      && LITTLE_ENDIAN)
4231               bogus endian macros
4232              #endif
4233
4234   ;
4235   return 0;
4236 }
4237 _ACEOF
4238 rm -f conftest.$ac_objext
4239 if { (ac_try="$ac_compile"
4240 case "(($ac_try" in
4241   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4242   *) ac_try_echo=$ac_try;;
4243 esac
4244 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4245 $as_echo "$ac_try_echo") >&5
4246   (eval "$ac_compile") 2>conftest.er1
4247   ac_status=$?
4248   grep -v '^ *+' conftest.er1 >conftest.err
4249   rm -f conftest.er1
4250   cat conftest.err >&5
4251   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4252   (exit $ac_status); } && {
4253          test -z "$ac_c_werror_flag" ||
4254          test ! -s conftest.err
4255        } && test -s conftest.$ac_objext; then
4256   # It does; now see whether it defined to BIG_ENDIAN or not.
4257          cat >conftest.$ac_ext <<_ACEOF
4258 /* confdefs.h.  */
4259 _ACEOF
4260 cat confdefs.h >>conftest.$ac_ext
4261 cat >>conftest.$ac_ext <<_ACEOF
4262 /* end confdefs.h.  */
4263 #include <sys/types.h>
4264                 #include <sys/param.h>
4265
4266 int
4267 main ()
4268 {
4269 #if BYTE_ORDER != BIG_ENDIAN
4270                  not big endian
4271                 #endif
4272
4273   ;
4274   return 0;
4275 }
4276 _ACEOF
4277 rm -f conftest.$ac_objext
4278 if { (ac_try="$ac_compile"
4279 case "(($ac_try" in
4280   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4281   *) ac_try_echo=$ac_try;;
4282 esac
4283 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4284 $as_echo "$ac_try_echo") >&5
4285   (eval "$ac_compile") 2>conftest.er1
4286   ac_status=$?
4287   grep -v '^ *+' conftest.er1 >conftest.err
4288   rm -f conftest.er1
4289   cat conftest.err >&5
4290   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4291   (exit $ac_status); } && {
4292          test -z "$ac_c_werror_flag" ||
4293          test ! -s conftest.err
4294        } && test -s conftest.$ac_objext; then
4295   ac_cv_c_bigendian=yes
4296 else
4297   $as_echo "$as_me: failed program was:" >&5
4298 sed 's/^/| /' conftest.$ac_ext >&5
4299
4300         ac_cv_c_bigendian=no
4301 fi
4302
4303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4304 else
4305   $as_echo "$as_me: failed program was:" >&5
4306 sed 's/^/| /' conftest.$ac_ext >&5
4307
4308
4309 fi
4310
4311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4312     fi
4313     if test $ac_cv_c_bigendian = unknown; then
4314       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
4315       cat >conftest.$ac_ext <<_ACEOF
4316 /* confdefs.h.  */
4317 _ACEOF
4318 cat confdefs.h >>conftest.$ac_ext
4319 cat >>conftest.$ac_ext <<_ACEOF
4320 /* end confdefs.h.  */
4321 #include <limits.h>
4322
4323 int
4324 main ()
4325 {
4326 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
4327               bogus endian macros
4328              #endif
4329
4330   ;
4331   return 0;
4332 }
4333 _ACEOF
4334 rm -f conftest.$ac_objext
4335 if { (ac_try="$ac_compile"
4336 case "(($ac_try" in
4337   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4338   *) ac_try_echo=$ac_try;;
4339 esac
4340 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4341 $as_echo "$ac_try_echo") >&5
4342   (eval "$ac_compile") 2>conftest.er1
4343   ac_status=$?
4344   grep -v '^ *+' conftest.er1 >conftest.err
4345   rm -f conftest.er1
4346   cat conftest.err >&5
4347   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4348   (exit $ac_status); } && {
4349          test -z "$ac_c_werror_flag" ||
4350          test ! -s conftest.err
4351        } && test -s conftest.$ac_objext; then
4352   # It does; now see whether it defined to _BIG_ENDIAN or not.
4353          cat >conftest.$ac_ext <<_ACEOF
4354 /* confdefs.h.  */
4355 _ACEOF
4356 cat confdefs.h >>conftest.$ac_ext
4357 cat >>conftest.$ac_ext <<_ACEOF
4358 /* end confdefs.h.  */
4359 #include <limits.h>
4360
4361 int
4362 main ()
4363 {
4364 #ifndef _BIG_ENDIAN
4365                  not big endian
4366                 #endif
4367
4368   ;
4369   return 0;
4370 }
4371 _ACEOF
4372 rm -f conftest.$ac_objext
4373 if { (ac_try="$ac_compile"
4374 case "(($ac_try" in
4375   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4376   *) ac_try_echo=$ac_try;;
4377 esac
4378 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4379 $as_echo "$ac_try_echo") >&5
4380   (eval "$ac_compile") 2>conftest.er1
4381   ac_status=$?
4382   grep -v '^ *+' conftest.er1 >conftest.err
4383   rm -f conftest.er1
4384   cat conftest.err >&5
4385   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4386   (exit $ac_status); } && {
4387          test -z "$ac_c_werror_flag" ||
4388          test ! -s conftest.err
4389        } && test -s conftest.$ac_objext; then
4390   ac_cv_c_bigendian=yes
4391 else
4392   $as_echo "$as_me: failed program was:" >&5
4393 sed 's/^/| /' conftest.$ac_ext >&5
4394
4395         ac_cv_c_bigendian=no
4396 fi
4397
4398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4399 else
4400   $as_echo "$as_me: failed program was:" >&5
4401 sed 's/^/| /' conftest.$ac_ext >&5
4402
4403
4404 fi
4405
4406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4407     fi
4408     if test $ac_cv_c_bigendian = unknown; then
4409       # Compile a test program.
4410       if test "$cross_compiling" = yes; then
4411   # Try to guess by grepping values from an object file.
4412          cat >conftest.$ac_ext <<_ACEOF
4413 /* confdefs.h.  */
4414 _ACEOF
4415 cat confdefs.h >>conftest.$ac_ext
4416 cat >>conftest.$ac_ext <<_ACEOF
4417 /* end confdefs.h.  */
4418 short int ascii_mm[] =
4419                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4420                 short int ascii_ii[] =
4421                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4422                 int use_ascii (int i) {
4423                   return ascii_mm[i] + ascii_ii[i];
4424                 }
4425                 short int ebcdic_ii[] =
4426                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4427                 short int ebcdic_mm[] =
4428                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4429                 int use_ebcdic (int i) {
4430                   return ebcdic_mm[i] + ebcdic_ii[i];
4431                 }
4432                 extern int foo;
4433
4434 int
4435 main ()
4436 {
4437 return use_ascii (foo) == use_ebcdic (foo);
4438   ;
4439   return 0;
4440 }
4441 _ACEOF
4442 rm -f conftest.$ac_objext
4443 if { (ac_try="$ac_compile"
4444 case "(($ac_try" in
4445   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4446   *) ac_try_echo=$ac_try;;
4447 esac
4448 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4449 $as_echo "$ac_try_echo") >&5
4450   (eval "$ac_compile") 2>conftest.er1
4451   ac_status=$?
4452   grep -v '^ *+' conftest.er1 >conftest.err
4453   rm -f conftest.er1
4454   cat conftest.err >&5
4455   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4456   (exit $ac_status); } && {
4457          test -z "$ac_c_werror_flag" ||
4458          test ! -s conftest.err
4459        } && test -s conftest.$ac_objext; then
4460   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4461               ac_cv_c_bigendian=yes
4462             fi
4463             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4464               if test "$ac_cv_c_bigendian" = unknown; then
4465                 ac_cv_c_bigendian=no
4466               else
4467                 # finding both strings is unlikely to happen, but who knows?
4468                 ac_cv_c_bigendian=unknown
4469               fi
4470             fi
4471 else
4472   $as_echo "$as_me: failed program was:" >&5
4473 sed 's/^/| /' conftest.$ac_ext >&5
4474
4475
4476 fi
4477
4478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4479 else
4480   cat >conftest.$ac_ext <<_ACEOF
4481 /* confdefs.h.  */
4482 _ACEOF
4483 cat confdefs.h >>conftest.$ac_ext
4484 cat >>conftest.$ac_ext <<_ACEOF
4485 /* end confdefs.h.  */
4486 $ac_includes_default
4487 int
4488 main ()
4489 {
4490
4491              /* Are we little or big endian?  From Harbison&Steele.  */
4492              union
4493              {
4494                long int l;
4495                char c[sizeof (long int)];
4496              } u;
4497              u.l = 1;
4498              return u.c[sizeof (long int) - 1] == 1;
4499
4500   ;
4501   return 0;
4502 }
4503 _ACEOF
4504 rm -f conftest$ac_exeext
4505 if { (ac_try="$ac_link"
4506 case "(($ac_try" in
4507   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4508   *) ac_try_echo=$ac_try;;
4509 esac
4510 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4511 $as_echo "$ac_try_echo") >&5
4512   (eval "$ac_link") 2>&5
4513   ac_status=$?
4514   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4515   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4516   { (case "(($ac_try" in
4517   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4518   *) ac_try_echo=$ac_try;;
4519 esac
4520 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4521 $as_echo "$ac_try_echo") >&5
4522   (eval "$ac_try") 2>&5
4523   ac_status=$?
4524   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4525   (exit $ac_status); }; }; then
4526   ac_cv_c_bigendian=no
4527 else
4528   $as_echo "$as_me: program exited with status $ac_status" >&5
4529 $as_echo "$as_me: failed program was:" >&5
4530 sed 's/^/| /' conftest.$ac_ext >&5
4531
4532 ( exit $ac_status )
4533 ac_cv_c_bigendian=yes
4534 fi
4535 rm -rf conftest.dSYM
4536 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4537 fi
4538
4539
4540     fi
4541 fi
4542 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
4543 $as_echo "$ac_cv_c_bigendian" >&6; }
4544  case $ac_cv_c_bigendian in #(
4545    yes)
4546      cat >>confdefs.h <<\_ACEOF
4547 #define WORDS_BIGENDIAN 1
4548 _ACEOF
4549 ;; #(
4550    no)
4551       ;; #(
4552    universal)
4553
4554 cat >>confdefs.h <<\_ACEOF
4555 #define AC_APPLE_UNIVERSAL_BUILD 1
4556 _ACEOF
4557
4558      ;; #(
4559    *)
4560      { { $as_echo "$as_me:$LINENO: error: unknown endianness
4561  presetting ac_cv_c_bigendian=no (or yes) will help" >&5
4562 $as_echo "$as_me: error: unknown endianness
4563  presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
4564    { (exit 1); exit 1; }; } ;;
4565  esac
4566
4567     if test "${TEA_PLATFORM}" = "unix" ; then
4568
4569     #--------------------------------------------------------------------
4570     # On a few very rare systems, all of the libm.a stuff is
4571     # already in libc.a.  Set compiler flags accordingly.
4572     # Also, Linux requires the "ieee" library for math to work
4573     # right (and it must appear before "-lm").
4574     #--------------------------------------------------------------------
4575
4576     { $as_echo "$as_me:$LINENO: checking for sin" >&5
4577 $as_echo_n "checking for sin... " >&6; }
4578 if test "${ac_cv_func_sin+set}" = set; then
4579   $as_echo_n "(cached) " >&6
4580 else
4581   cat >conftest.$ac_ext <<_ACEOF
4582 /* confdefs.h.  */
4583 _ACEOF
4584 cat confdefs.h >>conftest.$ac_ext
4585 cat >>conftest.$ac_ext <<_ACEOF
4586 /* end confdefs.h.  */
4587 /* Define sin to an innocuous variant, in case <limits.h> declares sin.
4588    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4589 #define sin innocuous_sin
4590
4591 /* System header to define __stub macros and hopefully few prototypes,
4592     which can conflict with char sin (); below.
4593     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4594     <limits.h> exists even on freestanding compilers.  */
4595
4596 #ifdef __STDC__
4597 # include <limits.h>
4598 #else
4599 # include <assert.h>
4600 #endif
4601
4602 #undef sin
4603
4604 /* Override any GCC internal prototype to avoid an error.
4605    Use char because int might match the return type of a GCC
4606    builtin and then its argument prototype would still apply.  */
4607 #ifdef __cplusplus
4608 extern "C"
4609 #endif
4610 char sin ();
4611 /* The GNU C library defines this for functions which it implements
4612     to always fail with ENOSYS.  Some functions are actually named
4613     something starting with __ and the normal name is an alias.  */
4614 #if defined __stub_sin || defined __stub___sin
4615 choke me
4616 #endif
4617
4618 int
4619 main ()
4620 {
4621 return sin ();
4622   ;
4623   return 0;
4624 }
4625 _ACEOF
4626 rm -f conftest.$ac_objext conftest$ac_exeext
4627 if { (ac_try="$ac_link"
4628 case "(($ac_try" in
4629   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4630   *) ac_try_echo=$ac_try;;
4631 esac
4632 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4633 $as_echo "$ac_try_echo") >&5
4634   (eval "$ac_link") 2>conftest.er1
4635   ac_status=$?
4636   grep -v '^ *+' conftest.er1 >conftest.err
4637   rm -f conftest.er1
4638   cat conftest.err >&5
4639   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4640   (exit $ac_status); } && {
4641          test -z "$ac_c_werror_flag" ||
4642          test ! -s conftest.err
4643        } && test -s conftest$ac_exeext && {
4644          test "$cross_compiling" = yes ||
4645          $as_test_x conftest$ac_exeext
4646        }; then
4647   ac_cv_func_sin=yes
4648 else
4649   $as_echo "$as_me: failed program was:" >&5
4650 sed 's/^/| /' conftest.$ac_ext >&5
4651
4652         ac_cv_func_sin=no
4653 fi
4654
4655 rm -rf conftest.dSYM
4656 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4657       conftest$ac_exeext conftest.$ac_ext
4658 fi
4659 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
4660 $as_echo "$ac_cv_func_sin" >&6; }
4661 if test "x$ac_cv_func_sin" = x""yes; then
4662   MATH_LIBS=""
4663 else
4664   MATH_LIBS="-lm"
4665 fi
4666
4667     { $as_echo "$as_me:$LINENO: checking for main in -lieee" >&5
4668 $as_echo_n "checking for main in -lieee... " >&6; }
4669 if test "${ac_cv_lib_ieee_main+set}" = set; then
4670   $as_echo_n "(cached) " >&6
4671 else
4672   ac_check_lib_save_LIBS=$LIBS
4673 LIBS="-lieee  $LIBS"
4674 cat >conftest.$ac_ext <<_ACEOF
4675 /* confdefs.h.  */
4676 _ACEOF
4677 cat confdefs.h >>conftest.$ac_ext
4678 cat >>conftest.$ac_ext <<_ACEOF
4679 /* end confdefs.h.  */
4680
4681
4682 int
4683 main ()
4684 {
4685 return main ();
4686   ;
4687   return 0;
4688 }
4689 _ACEOF
4690 rm -f conftest.$ac_objext conftest$ac_exeext
4691 if { (ac_try="$ac_link"
4692 case "(($ac_try" in
4693   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4694   *) ac_try_echo=$ac_try;;
4695 esac
4696 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4697 $as_echo "$ac_try_echo") >&5
4698   (eval "$ac_link") 2>conftest.er1
4699   ac_status=$?
4700   grep -v '^ *+' conftest.er1 >conftest.err
4701   rm -f conftest.er1
4702   cat conftest.err >&5
4703   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4704   (exit $ac_status); } && {
4705          test -z "$ac_c_werror_flag" ||
4706          test ! -s conftest.err
4707        } && test -s conftest$ac_exeext && {
4708          test "$cross_compiling" = yes ||
4709          $as_test_x conftest$ac_exeext
4710        }; then
4711   ac_cv_lib_ieee_main=yes
4712 else
4713   $as_echo "$as_me: failed program was:" >&5
4714 sed 's/^/| /' conftest.$ac_ext >&5
4715
4716         ac_cv_lib_ieee_main=no
4717 fi
4718
4719 rm -rf conftest.dSYM
4720 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4721       conftest$ac_exeext conftest.$ac_ext
4722 LIBS=$ac_check_lib_save_LIBS
4723 fi
4724 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
4725 $as_echo "$ac_cv_lib_ieee_main" >&6; }
4726 if test "x$ac_cv_lib_ieee_main" = x""yes; then
4727   MATH_LIBS="-lieee $MATH_LIBS"
4728 fi
4729
4730
4731     #--------------------------------------------------------------------
4732     # Interactive UNIX requires -linet instead of -lsocket, plus it
4733     # needs net/errno.h to define the socket-related error codes.
4734     #--------------------------------------------------------------------
4735
4736     { $as_echo "$as_me:$LINENO: checking for main in -linet" >&5
4737 $as_echo_n "checking for main in -linet... " >&6; }
4738 if test "${ac_cv_lib_inet_main+set}" = set; then
4739   $as_echo_n "(cached) " >&6
4740 else
4741   ac_check_lib_save_LIBS=$LIBS
4742 LIBS="-linet  $LIBS"
4743 cat >conftest.$ac_ext <<_ACEOF
4744 /* confdefs.h.  */
4745 _ACEOF
4746 cat confdefs.h >>conftest.$ac_ext
4747 cat >>conftest.$ac_ext <<_ACEOF
4748 /* end confdefs.h.  */
4749
4750
4751 int
4752 main ()
4753 {
4754 return main ();
4755   ;
4756   return 0;
4757 }
4758 _ACEOF
4759 rm -f conftest.$ac_objext conftest$ac_exeext
4760 if { (ac_try="$ac_link"
4761 case "(($ac_try" in
4762   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4763   *) ac_try_echo=$ac_try;;
4764 esac
4765 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4766 $as_echo "$ac_try_echo") >&5
4767   (eval "$ac_link") 2>conftest.er1
4768   ac_status=$?
4769   grep -v '^ *+' conftest.er1 >conftest.err
4770   rm -f conftest.er1
4771   cat conftest.err >&5
4772   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4773   (exit $ac_status); } && {
4774          test -z "$ac_c_werror_flag" ||
4775          test ! -s conftest.err
4776        } && test -s conftest$ac_exeext && {
4777          test "$cross_compiling" = yes ||
4778          $as_test_x conftest$ac_exeext
4779        }; then
4780   ac_cv_lib_inet_main=yes
4781 else
4782   $as_echo "$as_me: failed program was:" >&5
4783 sed 's/^/| /' conftest.$ac_ext >&5
4784
4785         ac_cv_lib_inet_main=no
4786 fi
4787
4788 rm -rf conftest.dSYM
4789 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4790       conftest$ac_exeext conftest.$ac_ext
4791 LIBS=$ac_check_lib_save_LIBS
4792 fi
4793 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
4794 $as_echo "$ac_cv_lib_inet_main" >&6; }
4795 if test "x$ac_cv_lib_inet_main" = x""yes; then
4796   LIBS="$LIBS -linet"
4797 fi
4798
4799     if test "${ac_cv_header_net_errno_h+set}" = set; then
4800   { $as_echo "$as_me:$LINENO: checking for net/errno.h" >&5
4801 $as_echo_n "checking for net/errno.h... " >&6; }
4802 if test "${ac_cv_header_net_errno_h+set}" = set; then
4803   $as_echo_n "(cached) " >&6
4804 fi
4805 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4806 $as_echo "$ac_cv_header_net_errno_h" >&6; }
4807 else
4808   # Is the header compilable?
4809 { $as_echo "$as_me:$LINENO: checking net/errno.h usability" >&5
4810 $as_echo_n "checking net/errno.h usability... " >&6; }
4811 cat >conftest.$ac_ext <<_ACEOF
4812 /* confdefs.h.  */
4813 _ACEOF
4814 cat confdefs.h >>conftest.$ac_ext
4815 cat >>conftest.$ac_ext <<_ACEOF
4816 /* end confdefs.h.  */
4817 $ac_includes_default
4818 #include <net/errno.h>
4819 _ACEOF
4820 rm -f conftest.$ac_objext
4821 if { (ac_try="$ac_compile"
4822 case "(($ac_try" in
4823   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4824   *) ac_try_echo=$ac_try;;
4825 esac
4826 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4827 $as_echo "$ac_try_echo") >&5
4828   (eval "$ac_compile") 2>conftest.er1
4829   ac_status=$?
4830   grep -v '^ *+' conftest.er1 >conftest.err
4831   rm -f conftest.er1
4832   cat conftest.err >&5
4833   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4834   (exit $ac_status); } && {
4835          test -z "$ac_c_werror_flag" ||
4836          test ! -s conftest.err
4837        } && test -s conftest.$ac_objext; then
4838   ac_header_compiler=yes
4839 else
4840   $as_echo "$as_me: failed program was:" >&5
4841 sed 's/^/| /' conftest.$ac_ext >&5
4842
4843         ac_header_compiler=no
4844 fi
4845
4846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4847 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4848 $as_echo "$ac_header_compiler" >&6; }
4849
4850 # Is the header present?
4851 { $as_echo "$as_me:$LINENO: checking net/errno.h presence" >&5
4852 $as_echo_n "checking net/errno.h presence... " >&6; }
4853 cat >conftest.$ac_ext <<_ACEOF
4854 /* confdefs.h.  */
4855 _ACEOF
4856 cat confdefs.h >>conftest.$ac_ext
4857 cat >>conftest.$ac_ext <<_ACEOF
4858 /* end confdefs.h.  */
4859 #include <net/errno.h>
4860 _ACEOF
4861 if { (ac_try="$ac_cpp conftest.$ac_ext"
4862 case "(($ac_try" in
4863   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4864   *) ac_try_echo=$ac_try;;
4865 esac
4866 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4867 $as_echo "$ac_try_echo") >&5
4868   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4869   ac_status=$?
4870   grep -v '^ *+' conftest.er1 >conftest.err
4871   rm -f conftest.er1
4872   cat conftest.err >&5
4873   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4874   (exit $ac_status); } >/dev/null && {
4875          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4876          test ! -s conftest.err
4877        }; then
4878   ac_header_preproc=yes
4879 else
4880   $as_echo "$as_me: failed program was:" >&5
4881 sed 's/^/| /' conftest.$ac_ext >&5
4882
4883   ac_header_preproc=no
4884 fi
4885
4886 rm -f conftest.err conftest.$ac_ext
4887 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4888 $as_echo "$ac_header_preproc" >&6; }
4889
4890 # So?  What about this header?
4891 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4892   yes:no: )
4893     { $as_echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
4894 $as_echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4895     { $as_echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
4896 $as_echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
4897     ac_header_preproc=yes
4898     ;;
4899   no:yes:* )
4900     { $as_echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
4901 $as_echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
4902     { $as_echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
4903 $as_echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
4904     { $as_echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
4905 $as_echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
4906     { $as_echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
4907 $as_echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4908     { $as_echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
4909 $as_echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
4910     { $as_echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
4911 $as_echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
4912
4913     ;;
4914 esac
4915 { $as_echo "$as_me:$LINENO: checking for net/errno.h" >&5
4916 $as_echo_n "checking for net/errno.h... " >&6; }
4917 if test "${ac_cv_header_net_errno_h+set}" = set; then
4918   $as_echo_n "(cached) " >&6
4919 else
4920   ac_cv_header_net_errno_h=$ac_header_preproc
4921 fi
4922 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4923 $as_echo "$ac_cv_header_net_errno_h" >&6; }
4924
4925 fi
4926 if test "x$ac_cv_header_net_errno_h" = x""yes; then
4927
4928
4929 cat >>confdefs.h <<\_ACEOF
4930 #define HAVE_NET_ERRNO_H 1
4931 _ACEOF
4932
4933 fi
4934
4935
4936
4937     #--------------------------------------------------------------------
4938     #   Check for the existence of the -lsocket and -lnsl libraries.
4939     #   The order here is important, so that they end up in the right
4940     #   order in the command line generated by make.  Here are some
4941     #   special considerations:
4942     #   1. Use "connect" and "accept" to check for -lsocket, and
4943     #      "gethostbyname" to check for -lnsl.
4944     #   2. Use each function name only once:  can't redo a check because
4945     #      autoconf caches the results of the last check and won't redo it.
4946     #   3. Use -lnsl and -lsocket only if they supply procedures that
4947     #      aren't already present in the normal libraries.  This is because
4948     #      IRIX 5.2 has libraries, but they aren't needed and they're
4949     #      bogus:  they goof up name resolution if used.
4950     #   4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4951     #      To get around this problem, check for both libraries together
4952     #      if -lsocket doesn't work by itself.
4953     #--------------------------------------------------------------------
4954
4955     tcl_checkBoth=0
4956     { $as_echo "$as_me:$LINENO: checking for connect" >&5
4957 $as_echo_n "checking for connect... " >&6; }
4958 if test "${ac_cv_func_connect+set}" = set; then
4959   $as_echo_n "(cached) " >&6
4960 else
4961   cat >conftest.$ac_ext <<_ACEOF
4962 /* confdefs.h.  */
4963 _ACEOF
4964 cat confdefs.h >>conftest.$ac_ext
4965 cat >>conftest.$ac_ext <<_ACEOF
4966 /* end confdefs.h.  */
4967 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
4968    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4969 #define connect innocuous_connect
4970
4971 /* System header to define __stub macros and hopefully few prototypes,
4972     which can conflict with char connect (); below.
4973     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4974     <limits.h> exists even on freestanding compilers.  */
4975
4976 #ifdef __STDC__
4977 # include <limits.h>
4978 #else
4979 # include <assert.h>
4980 #endif
4981
4982 #undef connect
4983
4984 /* Override any GCC internal prototype to avoid an error.
4985    Use char because int might match the return type of a GCC
4986    builtin and then its argument prototype would still apply.  */
4987 #ifdef __cplusplus
4988 extern "C"
4989 #endif
4990 char connect ();
4991 /* The GNU C library defines this for functions which it implements
4992     to always fail with ENOSYS.  Some functions are actually named
4993     something starting with __ and the normal name is an alias.  */
4994 #if defined __stub_connect || defined __stub___connect
4995 choke me
4996 #endif
4997
4998 int
4999 main ()
5000 {
5001 return connect ();
5002   ;
5003   return 0;
5004 }
5005 _ACEOF
5006 rm -f conftest.$ac_objext conftest$ac_exeext
5007 if { (ac_try="$ac_link"
5008 case "(($ac_try" in
5009   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5010   *) ac_try_echo=$ac_try;;
5011 esac
5012 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5013 $as_echo "$ac_try_echo") >&5
5014   (eval "$ac_link") 2>conftest.er1
5015   ac_status=$?
5016   grep -v '^ *+' conftest.er1 >conftest.err
5017   rm -f conftest.er1
5018   cat conftest.err >&5
5019   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5020   (exit $ac_status); } && {
5021          test -z "$ac_c_werror_flag" ||
5022          test ! -s conftest.err
5023        } && test -s conftest$ac_exeext && {
5024          test "$cross_compiling" = yes ||
5025          $as_test_x conftest$ac_exeext
5026        }; then
5027   ac_cv_func_connect=yes
5028 else
5029   $as_echo "$as_me: failed program was:" >&5
5030 sed 's/^/| /' conftest.$ac_ext >&5
5031
5032         ac_cv_func_connect=no
5033 fi
5034
5035 rm -rf conftest.dSYM
5036 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5037       conftest$ac_exeext conftest.$ac_ext
5038 fi
5039 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5040 $as_echo "$ac_cv_func_connect" >&6; }
5041 if test "x$ac_cv_func_connect" = x""yes; then
5042   tcl_checkSocket=0
5043 else
5044   tcl_checkSocket=1
5045 fi
5046
5047     if test "$tcl_checkSocket" = 1; then
5048         { $as_echo "$as_me:$LINENO: checking for setsockopt" >&5
5049 $as_echo_n "checking for setsockopt... " >&6; }
5050 if test "${ac_cv_func_setsockopt+set}" = set; then
5051   $as_echo_n "(cached) " >&6
5052 else
5053   cat >conftest.$ac_ext <<_ACEOF
5054 /* confdefs.h.  */
5055 _ACEOF
5056 cat confdefs.h >>conftest.$ac_ext
5057 cat >>conftest.$ac_ext <<_ACEOF
5058 /* end confdefs.h.  */
5059 /* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
5060    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5061 #define setsockopt innocuous_setsockopt
5062
5063 /* System header to define __stub macros and hopefully few prototypes,
5064     which can conflict with char setsockopt (); below.
5065     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5066     <limits.h> exists even on freestanding compilers.  */
5067
5068 #ifdef __STDC__
5069 # include <limits.h>
5070 #else
5071 # include <assert.h>
5072 #endif
5073
5074 #undef setsockopt
5075
5076 /* Override any GCC internal prototype to avoid an error.
5077    Use char because int might match the return type of a GCC
5078    builtin and then its argument prototype would still apply.  */
5079 #ifdef __cplusplus
5080 extern "C"
5081 #endif
5082 char setsockopt ();
5083 /* The GNU C library defines this for functions which it implements
5084     to always fail with ENOSYS.  Some functions are actually named
5085     something starting with __ and the normal name is an alias.  */
5086 #if defined __stub_setsockopt || defined __stub___setsockopt
5087 choke me
5088 #endif
5089
5090 int
5091 main ()
5092 {
5093 return setsockopt ();
5094   ;
5095   return 0;
5096 }
5097 _ACEOF
5098 rm -f conftest.$ac_objext conftest$ac_exeext
5099 if { (ac_try="$ac_link"
5100 case "(($ac_try" in
5101   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5102   *) ac_try_echo=$ac_try;;
5103 esac
5104 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5105 $as_echo "$ac_try_echo") >&5
5106   (eval "$ac_link") 2>conftest.er1
5107   ac_status=$?
5108   grep -v '^ *+' conftest.er1 >conftest.err
5109   rm -f conftest.er1
5110   cat conftest.err >&5
5111   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5112   (exit $ac_status); } && {
5113          test -z "$ac_c_werror_flag" ||
5114          test ! -s conftest.err
5115        } && test -s conftest$ac_exeext && {
5116          test "$cross_compiling" = yes ||
5117          $as_test_x conftest$ac_exeext
5118        }; then
5119   ac_cv_func_setsockopt=yes
5120 else
5121   $as_echo "$as_me: failed program was:" >&5
5122 sed 's/^/| /' conftest.$ac_ext >&5
5123
5124         ac_cv_func_setsockopt=no
5125 fi
5126
5127 rm -rf conftest.dSYM
5128 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5129       conftest$ac_exeext conftest.$ac_ext
5130 fi
5131 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
5132 $as_echo "$ac_cv_func_setsockopt" >&6; }
5133 if test "x$ac_cv_func_setsockopt" = x""yes; then
5134   :
5135 else
5136   { $as_echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
5137 $as_echo_n "checking for setsockopt in -lsocket... " >&6; }
5138 if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
5139   $as_echo_n "(cached) " >&6
5140 else
5141   ac_check_lib_save_LIBS=$LIBS
5142 LIBS="-lsocket  $LIBS"
5143 cat >conftest.$ac_ext <<_ACEOF
5144 /* confdefs.h.  */
5145 _ACEOF
5146 cat confdefs.h >>conftest.$ac_ext
5147 cat >>conftest.$ac_ext <<_ACEOF
5148 /* end confdefs.h.  */
5149
5150 /* Override any GCC internal prototype to avoid an error.
5151    Use char because int might match the return type of a GCC
5152    builtin and then its argument prototype would still apply.  */
5153 #ifdef __cplusplus
5154 extern "C"
5155 #endif
5156 char setsockopt ();
5157 int
5158 main ()
5159 {
5160 return setsockopt ();
5161   ;
5162   return 0;
5163 }
5164 _ACEOF
5165 rm -f conftest.$ac_objext conftest$ac_exeext
5166 if { (ac_try="$ac_link"
5167 case "(($ac_try" in
5168   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5169   *) ac_try_echo=$ac_try;;
5170 esac
5171 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5172 $as_echo "$ac_try_echo") >&5
5173   (eval "$ac_link") 2>conftest.er1
5174   ac_status=$?
5175   grep -v '^ *+' conftest.er1 >conftest.err
5176   rm -f conftest.er1
5177   cat conftest.err >&5
5178   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5179   (exit $ac_status); } && {
5180          test -z "$ac_c_werror_flag" ||
5181          test ! -s conftest.err
5182        } && test -s conftest$ac_exeext && {
5183          test "$cross_compiling" = yes ||
5184          $as_test_x conftest$ac_exeext
5185        }; then
5186   ac_cv_lib_socket_setsockopt=yes
5187 else
5188   $as_echo "$as_me: failed program was:" >&5
5189 sed 's/^/| /' conftest.$ac_ext >&5
5190
5191         ac_cv_lib_socket_setsockopt=no
5192 fi
5193
5194 rm -rf conftest.dSYM
5195 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5196       conftest$ac_exeext conftest.$ac_ext
5197 LIBS=$ac_check_lib_save_LIBS
5198 fi
5199 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
5200 $as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
5201 if test "x$ac_cv_lib_socket_setsockopt" = x""yes; then
5202   LIBS="$LIBS -lsocket"
5203 else
5204   tcl_checkBoth=1
5205 fi
5206
5207 fi
5208
5209     fi
5210     if test "$tcl_checkBoth" = 1; then
5211         tk_oldLibs=$LIBS
5212         LIBS="$LIBS -lsocket -lnsl"
5213         { $as_echo "$as_me:$LINENO: checking for accept" >&5
5214 $as_echo_n "checking for accept... " >&6; }
5215 if test "${ac_cv_func_accept+set}" = set; then
5216   $as_echo_n "(cached) " >&6
5217 else
5218   cat >conftest.$ac_ext <<_ACEOF
5219 /* confdefs.h.  */
5220 _ACEOF
5221 cat confdefs.h >>conftest.$ac_ext
5222 cat >>conftest.$ac_ext <<_ACEOF
5223 /* end confdefs.h.  */
5224 /* Define accept to an innocuous variant, in case <limits.h> declares accept.
5225    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5226 #define accept innocuous_accept
5227
5228 /* System header to define __stub macros and hopefully few prototypes,
5229     which can conflict with char accept (); below.
5230     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5231     <limits.h> exists even on freestanding compilers.  */
5232
5233 #ifdef __STDC__
5234 # include <limits.h>
5235 #else
5236 # include <assert.h>
5237 #endif
5238
5239 #undef accept
5240
5241 /* Override any GCC internal prototype to avoid an error.
5242    Use char because int might match the return type of a GCC
5243    builtin and then its argument prototype would still apply.  */
5244 #ifdef __cplusplus
5245 extern "C"
5246 #endif
5247 char accept ();
5248 /* The GNU C library defines this for functions which it implements
5249     to always fail with ENOSYS.  Some functions are actually named
5250     something starting with __ and the normal name is an alias.  */
5251 #if defined __stub_accept || defined __stub___accept
5252 choke me
5253 #endif
5254
5255 int
5256 main ()
5257 {
5258 return accept ();
5259   ;
5260   return 0;
5261 }
5262 _ACEOF
5263 rm -f conftest.$ac_objext conftest$ac_exeext
5264 if { (ac_try="$ac_link"
5265 case "(($ac_try" in
5266   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5267   *) ac_try_echo=$ac_try;;
5268 esac
5269 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5270 $as_echo "$ac_try_echo") >&5
5271   (eval "$ac_link") 2>conftest.er1
5272   ac_status=$?
5273   grep -v '^ *+' conftest.er1 >conftest.err
5274   rm -f conftest.er1
5275   cat conftest.err >&5
5276   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5277   (exit $ac_status); } && {
5278          test -z "$ac_c_werror_flag" ||
5279          test ! -s conftest.err
5280        } && test -s conftest$ac_exeext && {
5281          test "$cross_compiling" = yes ||
5282          $as_test_x conftest$ac_exeext
5283        }; then
5284   ac_cv_func_accept=yes
5285 else
5286   $as_echo "$as_me: failed program was:" >&5
5287 sed 's/^/| /' conftest.$ac_ext >&5
5288
5289         ac_cv_func_accept=no
5290 fi
5291
5292 rm -rf conftest.dSYM
5293 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5294       conftest$ac_exeext conftest.$ac_ext
5295 fi
5296 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
5297 $as_echo "$ac_cv_func_accept" >&6; }
5298 if test "x$ac_cv_func_accept" = x""yes; then
5299   tcl_checkNsl=0
5300 else
5301   LIBS=$tk_oldLibs
5302 fi
5303
5304     fi
5305     { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5
5306 $as_echo_n "checking for gethostbyname... " >&6; }
5307 if test "${ac_cv_func_gethostbyname+set}" = set; then
5308   $as_echo_n "(cached) " >&6
5309 else
5310   cat >conftest.$ac_ext <<_ACEOF
5311 /* confdefs.h.  */
5312 _ACEOF
5313 cat confdefs.h >>conftest.$ac_ext
5314 cat >>conftest.$ac_ext <<_ACEOF
5315 /* end confdefs.h.  */
5316 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5317    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5318 #define gethostbyname innocuous_gethostbyname
5319
5320 /* System header to define __stub macros and hopefully few prototypes,
5321     which can conflict with char gethostbyname (); below.
5322     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5323     <limits.h> exists even on freestanding compilers.  */
5324
5325 #ifdef __STDC__
5326 # include <limits.h>
5327 #else
5328 # include <assert.h>
5329 #endif
5330
5331 #undef gethostbyname
5332
5333 /* Override any GCC internal prototype to avoid an error.
5334    Use char because int might match the return type of a GCC
5335    builtin and then its argument prototype would still apply.  */
5336 #ifdef __cplusplus
5337 extern "C"
5338 #endif
5339 char gethostbyname ();
5340 /* The GNU C library defines this for functions which it implements
5341     to always fail with ENOSYS.  Some functions are actually named
5342     something starting with __ and the normal name is an alias.  */
5343 #if defined __stub_gethostbyname || defined __stub___gethostbyname
5344 choke me
5345 #endif
5346
5347 int
5348 main ()
5349 {
5350 return gethostbyname ();
5351   ;
5352   return 0;
5353 }
5354 _ACEOF
5355 rm -f conftest.$ac_objext conftest$ac_exeext
5356 if { (ac_try="$ac_link"
5357 case "(($ac_try" in
5358   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5359   *) ac_try_echo=$ac_try;;
5360 esac
5361 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5362 $as_echo "$ac_try_echo") >&5
5363   (eval "$ac_link") 2>conftest.er1
5364   ac_status=$?
5365   grep -v '^ *+' conftest.er1 >conftest.err
5366   rm -f conftest.er1
5367   cat conftest.err >&5
5368   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5369   (exit $ac_status); } && {
5370          test -z "$ac_c_werror_flag" ||
5371          test ! -s conftest.err
5372        } && test -s conftest$ac_exeext && {
5373          test "$cross_compiling" = yes ||
5374          $as_test_x conftest$ac_exeext
5375        }; then
5376   ac_cv_func_gethostbyname=yes
5377 else
5378   $as_echo "$as_me: failed program was:" >&5
5379 sed 's/^/| /' conftest.$ac_ext >&5
5380
5381         ac_cv_func_gethostbyname=no
5382 fi
5383
5384 rm -rf conftest.dSYM
5385 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5386       conftest$ac_exeext conftest.$ac_ext
5387 fi
5388 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5389 $as_echo "$ac_cv_func_gethostbyname" >&6; }
5390 if test "x$ac_cv_func_gethostbyname" = x""yes; then
5391   :
5392 else
5393   { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5394 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
5395 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5396   $as_echo_n "(cached) " >&6
5397 else
5398   ac_check_lib_save_LIBS=$LIBS
5399 LIBS="-lnsl  $LIBS"
5400 cat >conftest.$ac_ext <<_ACEOF
5401 /* confdefs.h.  */
5402 _ACEOF
5403 cat confdefs.h >>conftest.$ac_ext
5404 cat >>conftest.$ac_ext <<_ACEOF
5405 /* end confdefs.h.  */
5406
5407 /* Override any GCC internal prototype to avoid an error.
5408    Use char because int might match the return type of a GCC
5409    builtin and then its argument prototype would still apply.  */
5410 #ifdef __cplusplus
5411 extern "C"
5412 #endif
5413 char gethostbyname ();
5414 int
5415 main ()
5416 {
5417 return gethostbyname ();
5418   ;
5419   return 0;
5420 }
5421 _ACEOF
5422 rm -f conftest.$ac_objext conftest$ac_exeext
5423 if { (ac_try="$ac_link"
5424 case "(($ac_try" in
5425   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5426   *) ac_try_echo=$ac_try;;
5427 esac
5428 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5429 $as_echo "$ac_try_echo") >&5
5430   (eval "$ac_link") 2>conftest.er1
5431   ac_status=$?
5432   grep -v '^ *+' conftest.er1 >conftest.err
5433   rm -f conftest.er1
5434   cat conftest.err >&5
5435   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5436   (exit $ac_status); } && {
5437          test -z "$ac_c_werror_flag" ||
5438          test ! -s conftest.err
5439        } && test -s conftest$ac_exeext && {
5440          test "$cross_compiling" = yes ||
5441          $as_test_x conftest$ac_exeext
5442        }; then
5443   ac_cv_lib_nsl_gethostbyname=yes
5444 else
5445   $as_echo "$as_me: failed program was:" >&5
5446 sed 's/^/| /' conftest.$ac_ext >&5
5447
5448         ac_cv_lib_nsl_gethostbyname=no
5449 fi
5450
5451 rm -rf conftest.dSYM
5452 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5453       conftest$ac_exeext conftest.$ac_ext
5454 LIBS=$ac_check_lib_save_LIBS
5455 fi
5456 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5457 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
5458 if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
5459   LIBS="$LIBS -lnsl"
5460 fi
5461
5462 fi
5463
5464
5465     # TEA specific: Don't perform the eval of the libraries here because
5466     # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
5467
5468     TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
5469
5470
5471
5472
5473     { $as_echo "$as_me:$LINENO: checking dirent.h" >&5
5474 $as_echo_n "checking dirent.h... " >&6; }
5475 if test "${tcl_cv_dirent_h+set}" = set; then
5476   $as_echo_n "(cached) " >&6
5477 else
5478
5479     cat >conftest.$ac_ext <<_ACEOF
5480 /* confdefs.h.  */
5481 _ACEOF
5482 cat confdefs.h >>conftest.$ac_ext
5483 cat >>conftest.$ac_ext <<_ACEOF
5484 /* end confdefs.h.  */
5485 #include <sys/types.h>
5486 #include <dirent.h>
5487 int
5488 main ()
5489 {
5490
5491 #ifndef _POSIX_SOURCE
5492 #   ifdef __Lynx__
5493         /*
5494          * Generate compilation error to make the test fail:  Lynx headers
5495          * are only valid if really in the POSIX environment.
5496          */
5497
5498         missing_procedure();
5499 #   endif
5500 #endif
5501 DIR *d;
5502 struct dirent *entryPtr;
5503 char *p;
5504 d = opendir("foobar");
5505 entryPtr = readdir(d);
5506 p = entryPtr->d_name;
5507 closedir(d);
5508
5509   ;
5510   return 0;
5511 }
5512 _ACEOF
5513 rm -f conftest.$ac_objext conftest$ac_exeext
5514 if { (ac_try="$ac_link"
5515 case "(($ac_try" in
5516   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5517   *) ac_try_echo=$ac_try;;
5518 esac
5519 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5520 $as_echo "$ac_try_echo") >&5
5521   (eval "$ac_link") 2>conftest.er1
5522   ac_status=$?
5523   grep -v '^ *+' conftest.er1 >conftest.err
5524   rm -f conftest.er1
5525   cat conftest.err >&5
5526   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5527   (exit $ac_status); } && {
5528          test -z "$ac_c_werror_flag" ||
5529          test ! -s conftest.err
5530        } && test -s conftest$ac_exeext && {
5531          test "$cross_compiling" = yes ||
5532          $as_test_x conftest$ac_exeext
5533        }; then
5534   tcl_cv_dirent_h=yes
5535 else
5536   $as_echo "$as_me: failed program was:" >&5
5537 sed 's/^/| /' conftest.$ac_ext >&5
5538
5539         tcl_cv_dirent_h=no
5540 fi
5541
5542 rm -rf conftest.dSYM
5543 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5544       conftest$ac_exeext conftest.$ac_ext
5545 fi
5546 { $as_echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
5547 $as_echo "$tcl_cv_dirent_h" >&6; }
5548
5549     if test $tcl_cv_dirent_h = no; then
5550
5551 cat >>confdefs.h <<\_ACEOF
5552 #define NO_DIRENT_H 1
5553 _ACEOF
5554
5555     fi
5556
5557     # TEA specific:
5558     if test "${ac_cv_header_errno_h+set}" = set; then
5559   { $as_echo "$as_me:$LINENO: checking for errno.h" >&5
5560 $as_echo_n "checking for errno.h... " >&6; }
5561 if test "${ac_cv_header_errno_h+set}" = set; then
5562   $as_echo_n "(cached) " >&6
5563 fi
5564 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5565 $as_echo "$ac_cv_header_errno_h" >&6; }
5566 else
5567   # Is the header compilable?
5568 { $as_echo "$as_me:$LINENO: checking errno.h usability" >&5
5569 $as_echo_n "checking errno.h usability... " >&6; }
5570 cat >conftest.$ac_ext <<_ACEOF
5571 /* confdefs.h.  */
5572 _ACEOF
5573 cat confdefs.h >>conftest.$ac_ext
5574 cat >>conftest.$ac_ext <<_ACEOF
5575 /* end confdefs.h.  */
5576 $ac_includes_default
5577 #include <errno.h>
5578 _ACEOF
5579 rm -f conftest.$ac_objext
5580 if { (ac_try="$ac_compile"
5581 case "(($ac_try" in
5582   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5583   *) ac_try_echo=$ac_try;;
5584 esac
5585 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5586 $as_echo "$ac_try_echo") >&5
5587   (eval "$ac_compile") 2>conftest.er1
5588   ac_status=$?
5589   grep -v '^ *+' conftest.er1 >conftest.err
5590   rm -f conftest.er1
5591   cat conftest.err >&5
5592   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5593   (exit $ac_status); } && {
5594          test -z "$ac_c_werror_flag" ||
5595          test ! -s conftest.err
5596        } && test -s conftest.$ac_objext; then
5597   ac_header_compiler=yes
5598 else
5599   $as_echo "$as_me: failed program was:" >&5
5600 sed 's/^/| /' conftest.$ac_ext >&5
5601
5602         ac_header_compiler=no
5603 fi
5604
5605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5606 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5607 $as_echo "$ac_header_compiler" >&6; }
5608
5609 # Is the header present?
5610 { $as_echo "$as_me:$LINENO: checking errno.h presence" >&5
5611 $as_echo_n "checking errno.h presence... " >&6; }
5612 cat >conftest.$ac_ext <<_ACEOF
5613 /* confdefs.h.  */
5614 _ACEOF
5615 cat confdefs.h >>conftest.$ac_ext
5616 cat >>conftest.$ac_ext <<_ACEOF
5617 /* end confdefs.h.  */
5618 #include <errno.h>
5619 _ACEOF
5620 if { (ac_try="$ac_cpp conftest.$ac_ext"
5621 case "(($ac_try" in
5622   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5623   *) ac_try_echo=$ac_try;;
5624 esac
5625 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5626 $as_echo "$ac_try_echo") >&5
5627   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5628   ac_status=$?
5629   grep -v '^ *+' conftest.er1 >conftest.err
5630   rm -f conftest.er1
5631   cat conftest.err >&5
5632   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5633   (exit $ac_status); } >/dev/null && {
5634          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5635          test ! -s conftest.err
5636        }; then
5637   ac_header_preproc=yes
5638 else
5639   $as_echo "$as_me: failed program was:" >&5
5640 sed 's/^/| /' conftest.$ac_ext >&5
5641
5642   ac_header_preproc=no
5643 fi
5644
5645 rm -f conftest.err conftest.$ac_ext
5646 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5647 $as_echo "$ac_header_preproc" >&6; }
5648
5649 # So?  What about this header?
5650 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5651   yes:no: )
5652     { $as_echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5653 $as_echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5654     { $as_echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
5655 $as_echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
5656     ac_header_preproc=yes
5657     ;;
5658   no:yes:* )
5659     { $as_echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
5660 $as_echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
5661     { $as_echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
5662 $as_echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
5663     { $as_echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
5664 $as_echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
5665     { $as_echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5666 $as_echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5667     { $as_echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
5668 $as_echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
5669     { $as_echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
5670 $as_echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
5671
5672     ;;
5673 esac
5674 { $as_echo "$as_me:$LINENO: checking for errno.h" >&5
5675 $as_echo_n "checking for errno.h... " >&6; }
5676 if test "${ac_cv_header_errno_h+set}" = set; then
5677   $as_echo_n "(cached) " >&6
5678 else
5679   ac_cv_header_errno_h=$ac_header_preproc
5680 fi
5681 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5682 $as_echo "$ac_cv_header_errno_h" >&6; }
5683
5684 fi
5685 if test "x$ac_cv_header_errno_h" = x""yes; then
5686   :
5687 else
5688
5689 cat >>confdefs.h <<\_ACEOF
5690 #define NO_ERRNO_H 1
5691 _ACEOF
5692
5693 fi
5694
5695
5696     if test "${ac_cv_header_float_h+set}" = set; then
5697   { $as_echo "$as_me:$LINENO: checking for float.h" >&5
5698 $as_echo_n "checking for float.h... " >&6; }
5699 if test "${ac_cv_header_float_h+set}" = set; then
5700   $as_echo_n "(cached) " >&6
5701 fi
5702 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5703 $as_echo "$ac_cv_header_float_h" >&6; }
5704 else
5705   # Is the header compilable?
5706 { $as_echo "$as_me:$LINENO: checking float.h usability" >&5
5707 $as_echo_n "checking float.h usability... " >&6; }
5708 cat >conftest.$ac_ext <<_ACEOF
5709 /* confdefs.h.  */
5710 _ACEOF
5711 cat confdefs.h >>conftest.$ac_ext
5712 cat >>conftest.$ac_ext <<_ACEOF
5713 /* end confdefs.h.  */
5714 $ac_includes_default
5715 #include <float.h>
5716 _ACEOF
5717 rm -f conftest.$ac_objext
5718 if { (ac_try="$ac_compile"
5719 case "(($ac_try" in
5720   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5721   *) ac_try_echo=$ac_try;;
5722 esac
5723 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5724 $as_echo "$ac_try_echo") >&5
5725   (eval "$ac_compile") 2>conftest.er1
5726   ac_status=$?
5727   grep -v '^ *+' conftest.er1 >conftest.err
5728   rm -f conftest.er1
5729   cat conftest.err >&5
5730   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5731   (exit $ac_status); } && {
5732          test -z "$ac_c_werror_flag" ||
5733          test ! -s conftest.err
5734        } && test -s conftest.$ac_objext; then
5735   ac_header_compiler=yes
5736 else
5737   $as_echo "$as_me: failed program was:" >&5
5738 sed 's/^/| /' conftest.$ac_ext >&5
5739
5740         ac_header_compiler=no
5741 fi
5742
5743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5744 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5745 $as_echo "$ac_header_compiler" >&6; }
5746
5747 # Is the header present?
5748 { $as_echo "$as_me:$LINENO: checking float.h presence" >&5
5749 $as_echo_n "checking float.h presence... " >&6; }
5750 cat >conftest.$ac_ext <<_ACEOF
5751 /* confdefs.h.  */
5752 _ACEOF
5753 cat confdefs.h >>conftest.$ac_ext
5754 cat >>conftest.$ac_ext <<_ACEOF
5755 /* end confdefs.h.  */
5756 #include <float.h>
5757 _ACEOF
5758 if { (ac_try="$ac_cpp conftest.$ac_ext"
5759 case "(($ac_try" in
5760   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5761   *) ac_try_echo=$ac_try;;
5762 esac
5763 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5764 $as_echo "$ac_try_echo") >&5
5765   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5766   ac_status=$?
5767   grep -v '^ *+' conftest.er1 >conftest.err
5768   rm -f conftest.er1
5769   cat conftest.err >&5
5770   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5771   (exit $ac_status); } >/dev/null && {
5772          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5773          test ! -s conftest.err
5774        }; then
5775   ac_header_preproc=yes
5776 else
5777   $as_echo "$as_me: failed program was:" >&5
5778 sed 's/^/| /' conftest.$ac_ext >&5
5779
5780   ac_header_preproc=no
5781 fi
5782
5783 rm -f conftest.err conftest.$ac_ext
5784 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5785 $as_echo "$ac_header_preproc" >&6; }
5786
5787 # So?  What about this header?
5788 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5789   yes:no: )
5790     { $as_echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
5791 $as_echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5792     { $as_echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
5793 $as_echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
5794     ac_header_preproc=yes
5795     ;;
5796   no:yes:* )
5797     { $as_echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
5798 $as_echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
5799     { $as_echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
5800 $as_echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
5801     { $as_echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
5802 $as_echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
5803     { $as_echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
5804 $as_echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5805     { $as_echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
5806 $as_echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
5807     { $as_echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
5808 $as_echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
5809
5810     ;;
5811 esac
5812 { $as_echo "$as_me:$LINENO: checking for float.h" >&5
5813 $as_echo_n "checking for float.h... " >&6; }
5814 if test "${ac_cv_header_float_h+set}" = set; then
5815   $as_echo_n "(cached) " >&6
5816 else
5817   ac_cv_header_float_h=$ac_header_preproc
5818 fi
5819 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5820 $as_echo "$ac_cv_header_float_h" >&6; }
5821
5822 fi
5823 if test "x$ac_cv_header_float_h" = x""yes; then
5824   :
5825 else
5826
5827 cat >>confdefs.h <<\_ACEOF
5828 #define NO_FLOAT_H 1
5829 _ACEOF
5830
5831 fi
5832
5833
5834     if test "${ac_cv_header_values_h+set}" = set; then
5835   { $as_echo "$as_me:$LINENO: checking for values.h" >&5
5836 $as_echo_n "checking for values.h... " >&6; }
5837 if test "${ac_cv_header_values_h+set}" = set; then
5838   $as_echo_n "(cached) " >&6
5839 fi
5840 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5841 $as_echo "$ac_cv_header_values_h" >&6; }
5842 else
5843   # Is the header compilable?
5844 { $as_echo "$as_me:$LINENO: checking values.h usability" >&5
5845 $as_echo_n "checking values.h usability... " >&6; }
5846 cat >conftest.$ac_ext <<_ACEOF
5847 /* confdefs.h.  */
5848 _ACEOF
5849 cat confdefs.h >>conftest.$ac_ext
5850 cat >>conftest.$ac_ext <<_ACEOF
5851 /* end confdefs.h.  */
5852 $ac_includes_default
5853 #include <values.h>
5854 _ACEOF
5855 rm -f conftest.$ac_objext
5856 if { (ac_try="$ac_compile"
5857 case "(($ac_try" in
5858   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5859   *) ac_try_echo=$ac_try;;
5860 esac
5861 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5862 $as_echo "$ac_try_echo") >&5
5863   (eval "$ac_compile") 2>conftest.er1
5864   ac_status=$?
5865   grep -v '^ *+' conftest.er1 >conftest.err
5866   rm -f conftest.er1
5867   cat conftest.err >&5
5868   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5869   (exit $ac_status); } && {
5870          test -z "$ac_c_werror_flag" ||
5871          test ! -s conftest.err
5872        } && test -s conftest.$ac_objext; then
5873   ac_header_compiler=yes
5874 else
5875   $as_echo "$as_me: failed program was:" >&5
5876 sed 's/^/| /' conftest.$ac_ext >&5
5877
5878         ac_header_compiler=no
5879 fi
5880
5881 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5882 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5883 $as_echo "$ac_header_compiler" >&6; }
5884
5885 # Is the header present?
5886 { $as_echo "$as_me:$LINENO: checking values.h presence" >&5
5887 $as_echo_n "checking values.h presence... " >&6; }
5888 cat >conftest.$ac_ext <<_ACEOF
5889 /* confdefs.h.  */
5890 _ACEOF
5891 cat confdefs.h >>conftest.$ac_ext
5892 cat >>conftest.$ac_ext <<_ACEOF
5893 /* end confdefs.h.  */
5894 #include <values.h>
5895 _ACEOF
5896 if { (ac_try="$ac_cpp conftest.$ac_ext"
5897 case "(($ac_try" in
5898   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5899   *) ac_try_echo=$ac_try;;
5900 esac
5901 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5902 $as_echo "$ac_try_echo") >&5
5903   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5904   ac_status=$?
5905   grep -v '^ *+' conftest.er1 >conftest.err
5906   rm -f conftest.er1
5907   cat conftest.err >&5
5908   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5909   (exit $ac_status); } >/dev/null && {
5910          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5911          test ! -s conftest.err
5912        }; then
5913   ac_header_preproc=yes
5914 else
5915   $as_echo "$as_me: failed program was:" >&5
5916 sed 's/^/| /' conftest.$ac_ext >&5
5917
5918   ac_header_preproc=no
5919 fi
5920
5921 rm -f conftest.err conftest.$ac_ext
5922 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5923 $as_echo "$ac_header_preproc" >&6; }
5924
5925 # So?  What about this header?
5926 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5927   yes:no: )
5928     { $as_echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
5929 $as_echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5930     { $as_echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
5931 $as_echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
5932     ac_header_preproc=yes
5933     ;;
5934   no:yes:* )
5935     { $as_echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
5936 $as_echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
5937     { $as_echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
5938 $as_echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
5939     { $as_echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
5940 $as_echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
5941     { $as_echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
5942 $as_echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5943     { $as_echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
5944 $as_echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
5945     { $as_echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
5946 $as_echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
5947
5948     ;;
5949 esac
5950 { $as_echo "$as_me:$LINENO: checking for values.h" >&5
5951 $as_echo_n "checking for values.h... " >&6; }
5952 if test "${ac_cv_header_values_h+set}" = set; then
5953   $as_echo_n "(cached) " >&6
5954 else
5955   ac_cv_header_values_h=$ac_header_preproc
5956 fi
5957 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5958 $as_echo "$ac_cv_header_values_h" >&6; }
5959
5960 fi
5961 if test "x$ac_cv_header_values_h" = x""yes; then
5962   :
5963 else
5964
5965 cat >>confdefs.h <<\_ACEOF
5966 #define NO_VALUES_H 1
5967 _ACEOF
5968
5969 fi
5970
5971
5972     if test "${ac_cv_header_limits_h+set}" = set; then
5973   { $as_echo "$as_me:$LINENO: checking for limits.h" >&5
5974 $as_echo_n "checking for limits.h... " >&6; }
5975 if test "${ac_cv_header_limits_h+set}" = set; then
5976   $as_echo_n "(cached) " >&6
5977 fi
5978 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5979 $as_echo "$ac_cv_header_limits_h" >&6; }
5980 else
5981   # Is the header compilable?
5982 { $as_echo "$as_me:$LINENO: checking limits.h usability" >&5
5983 $as_echo_n "checking limits.h usability... " >&6; }
5984 cat >conftest.$ac_ext <<_ACEOF
5985 /* confdefs.h.  */
5986 _ACEOF
5987 cat confdefs.h >>conftest.$ac_ext
5988 cat >>conftest.$ac_ext <<_ACEOF
5989 /* end confdefs.h.  */
5990 $ac_includes_default
5991 #include <limits.h>
5992 _ACEOF
5993 rm -f conftest.$ac_objext
5994 if { (ac_try="$ac_compile"
5995 case "(($ac_try" in
5996   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5997   *) ac_try_echo=$ac_try;;
5998 esac
5999 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6000 $as_echo "$ac_try_echo") >&5
6001   (eval "$ac_compile") 2>conftest.er1
6002   ac_status=$?
6003   grep -v '^ *+' conftest.er1 >conftest.err
6004   rm -f conftest.er1
6005   cat conftest.err >&5
6006   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6007   (exit $ac_status); } && {
6008          test -z "$ac_c_werror_flag" ||
6009          test ! -s conftest.err
6010        } && test -s conftest.$ac_objext; then
6011   ac_header_compiler=yes
6012 else
6013   $as_echo "$as_me: failed program was:" >&5
6014 sed 's/^/| /' conftest.$ac_ext >&5
6015
6016         ac_header_compiler=no
6017 fi
6018
6019 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6020 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6021 $as_echo "$ac_header_compiler" >&6; }
6022
6023 # Is the header present?
6024 { $as_echo "$as_me:$LINENO: checking limits.h presence" >&5
6025 $as_echo_n "checking limits.h presence... " >&6; }
6026 cat >conftest.$ac_ext <<_ACEOF
6027 /* confdefs.h.  */
6028 _ACEOF
6029 cat confdefs.h >>conftest.$ac_ext
6030 cat >>conftest.$ac_ext <<_ACEOF
6031 /* end confdefs.h.  */
6032 #include <limits.h>
6033 _ACEOF
6034 if { (ac_try="$ac_cpp conftest.$ac_ext"
6035 case "(($ac_try" in
6036   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6037   *) ac_try_echo=$ac_try;;
6038 esac
6039 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6040 $as_echo "$ac_try_echo") >&5
6041   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6042   ac_status=$?
6043   grep -v '^ *+' conftest.er1 >conftest.err
6044   rm -f conftest.er1
6045   cat conftest.err >&5
6046   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6047   (exit $ac_status); } >/dev/null && {
6048          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6049          test ! -s conftest.err
6050        }; then
6051   ac_header_preproc=yes
6052 else
6053   $as_echo "$as_me: failed program was:" >&5
6054 sed 's/^/| /' conftest.$ac_ext >&5
6055
6056   ac_header_preproc=no
6057 fi
6058
6059 rm -f conftest.err conftest.$ac_ext
6060 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6061 $as_echo "$ac_header_preproc" >&6; }
6062
6063 # So?  What about this header?
6064 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6065   yes:no: )
6066     { $as_echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
6067 $as_echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6068     { $as_echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
6069 $as_echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
6070     ac_header_preproc=yes
6071     ;;
6072   no:yes:* )
6073     { $as_echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
6074 $as_echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
6075     { $as_echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
6076 $as_echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
6077     { $as_echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
6078 $as_echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
6079     { $as_echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
6080 $as_echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6081     { $as_echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
6082 $as_echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
6083     { $as_echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
6084 $as_echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
6085
6086     ;;
6087 esac
6088 { $as_echo "$as_me:$LINENO: checking for limits.h" >&5
6089 $as_echo_n "checking for limits.h... " >&6; }
6090 if test "${ac_cv_header_limits_h+set}" = set; then
6091   $as_echo_n "(cached) " >&6
6092 else
6093   ac_cv_header_limits_h=$ac_header_preproc
6094 fi
6095 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
6096 $as_echo "$ac_cv_header_limits_h" >&6; }
6097
6098 fi
6099 if test "x$ac_cv_header_limits_h" = x""yes; then
6100
6101 cat >>confdefs.h <<\_ACEOF
6102 #define HAVE_LIMITS_H 1
6103 _ACEOF
6104
6105 else
6106
6107 cat >>confdefs.h <<\_ACEOF
6108 #define NO_LIMITS_H 1
6109 _ACEOF
6110
6111 fi
6112
6113
6114     if test "${ac_cv_header_stdlib_h+set}" = set; then
6115   { $as_echo "$as_me:$LINENO: checking for stdlib.h" >&5
6116 $as_echo_n "checking for stdlib.h... " >&6; }
6117 if test "${ac_cv_header_stdlib_h+set}" = set; then
6118   $as_echo_n "(cached) " >&6
6119 fi
6120 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
6121 $as_echo "$ac_cv_header_stdlib_h" >&6; }
6122 else
6123   # Is the header compilable?
6124 { $as_echo "$as_me:$LINENO: checking stdlib.h usability" >&5
6125 $as_echo_n "checking stdlib.h usability... " >&6; }
6126 cat >conftest.$ac_ext <<_ACEOF
6127 /* confdefs.h.  */
6128 _ACEOF
6129 cat confdefs.h >>conftest.$ac_ext
6130 cat >>conftest.$ac_ext <<_ACEOF
6131 /* end confdefs.h.  */
6132 $ac_includes_default
6133 #include <stdlib.h>
6134 _ACEOF
6135 rm -f conftest.$ac_objext
6136 if { (ac_try="$ac_compile"
6137 case "(($ac_try" in
6138   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6139   *) ac_try_echo=$ac_try;;
6140 esac
6141 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6142 $as_echo "$ac_try_echo") >&5
6143   (eval "$ac_compile") 2>conftest.er1
6144   ac_status=$?
6145   grep -v '^ *+' conftest.er1 >conftest.err
6146   rm -f conftest.er1
6147   cat conftest.err >&5
6148   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6149   (exit $ac_status); } && {
6150          test -z "$ac_c_werror_flag" ||
6151          test ! -s conftest.err
6152        } && test -s conftest.$ac_objext; then
6153   ac_header_compiler=yes
6154 else
6155   $as_echo "$as_me: failed program was:" >&5
6156 sed 's/^/| /' conftest.$ac_ext >&5
6157
6158         ac_header_compiler=no
6159 fi
6160
6161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6162 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6163 $as_echo "$ac_header_compiler" >&6; }
6164
6165 # Is the header present?
6166 { $as_echo "$as_me:$LINENO: checking stdlib.h presence" >&5
6167 $as_echo_n "checking stdlib.h presence... " >&6; }
6168 cat >conftest.$ac_ext <<_ACEOF
6169 /* confdefs.h.  */
6170 _ACEOF
6171 cat confdefs.h >>conftest.$ac_ext
6172 cat >>conftest.$ac_ext <<_ACEOF
6173 /* end confdefs.h.  */
6174 #include <stdlib.h>
6175 _ACEOF
6176 if { (ac_try="$ac_cpp conftest.$ac_ext"
6177 case "(($ac_try" in
6178   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6179   *) ac_try_echo=$ac_try;;
6180 esac
6181 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6182 $as_echo "$ac_try_echo") >&5
6183   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6184   ac_status=$?
6185   grep -v '^ *+' conftest.er1 >conftest.err
6186   rm -f conftest.er1
6187   cat conftest.err >&5
6188   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6189   (exit $ac_status); } >/dev/null && {
6190          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6191          test ! -s conftest.err
6192        }; then
6193   ac_header_preproc=yes
6194 else
6195   $as_echo "$as_me: failed program was:" >&5
6196 sed 's/^/| /' conftest.$ac_ext >&5
6197
6198   ac_header_preproc=no
6199 fi
6200
6201 rm -f conftest.err conftest.$ac_ext
6202 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6203 $as_echo "$ac_header_preproc" >&6; }
6204
6205 # So?  What about this header?
6206 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6207   yes:no: )
6208     { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
6209 $as_echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6210     { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
6211 $as_echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
6212     ac_header_preproc=yes
6213     ;;
6214   no:yes:* )
6215     { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
6216 $as_echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
6217     { $as_echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
6218 $as_echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
6219     { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
6220 $as_echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
6221     { $as_echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
6222 $as_echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6223     { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
6224 $as_echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
6225     { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
6226 $as_echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
6227
6228     ;;
6229 esac
6230 { $as_echo "$as_me:$LINENO: checking for stdlib.h" >&5
6231 $as_echo_n "checking for stdlib.h... " >&6; }
6232 if test "${ac_cv_header_stdlib_h+set}" = set; then
6233   $as_echo_n "(cached) " >&6
6234 else
6235   ac_cv_header_stdlib_h=$ac_header_preproc
6236 fi
6237 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
6238 $as_echo "$ac_cv_header_stdlib_h" >&6; }
6239
6240 fi
6241 if test "x$ac_cv_header_stdlib_h" = x""yes; then
6242   tcl_ok=1
6243 else
6244   tcl_ok=0
6245 fi
6246
6247
6248     cat >conftest.$ac_ext <<_ACEOF
6249 /* confdefs.h.  */
6250 _ACEOF
6251 cat confdefs.h >>conftest.$ac_ext
6252 cat >>conftest.$ac_ext <<_ACEOF
6253 /* end confdefs.h.  */
6254 #include <stdlib.h>
6255
6256 _ACEOF
6257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6258   $EGREP "strtol" >/dev/null 2>&1; then
6259   :
6260 else
6261   tcl_ok=0
6262 fi
6263 rm -f conftest*
6264
6265     cat >conftest.$ac_ext <<_ACEOF
6266 /* confdefs.h.  */
6267 _ACEOF
6268 cat confdefs.h >>conftest.$ac_ext
6269 cat >>conftest.$ac_ext <<_ACEOF
6270 /* end confdefs.h.  */
6271 #include <stdlib.h>
6272
6273 _ACEOF
6274 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6275   $EGREP "strtoul" >/dev/null 2>&1; then
6276   :
6277 else
6278   tcl_ok=0
6279 fi
6280 rm -f conftest*
6281
6282     cat >conftest.$ac_ext <<_ACEOF
6283 /* confdefs.h.  */
6284 _ACEOF
6285 cat confdefs.h >>conftest.$ac_ext
6286 cat >>conftest.$ac_ext <<_ACEOF
6287 /* end confdefs.h.  */
6288 #include <stdlib.h>
6289
6290 _ACEOF
6291 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6292   $EGREP "strtod" >/dev/null 2>&1; then
6293   :
6294 else
6295   tcl_ok=0
6296 fi
6297 rm -f conftest*
6298
6299     if test $tcl_ok = 0; then
6300
6301 cat >>confdefs.h <<\_ACEOF
6302 #define NO_STDLIB_H 1
6303 _ACEOF
6304
6305     fi
6306     if test "${ac_cv_header_string_h+set}" = set; then
6307   { $as_echo "$as_me:$LINENO: checking for string.h" >&5
6308 $as_echo_n "checking for string.h... " >&6; }
6309 if test "${ac_cv_header_string_h+set}" = set; then
6310   $as_echo_n "(cached) " >&6
6311 fi
6312 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6313 $as_echo "$ac_cv_header_string_h" >&6; }
6314 else
6315   # Is the header compilable?
6316 { $as_echo "$as_me:$LINENO: checking string.h usability" >&5
6317 $as_echo_n "checking string.h usability... " >&6; }
6318 cat >conftest.$ac_ext <<_ACEOF
6319 /* confdefs.h.  */
6320 _ACEOF
6321 cat confdefs.h >>conftest.$ac_ext
6322 cat >>conftest.$ac_ext <<_ACEOF
6323 /* end confdefs.h.  */
6324 $ac_includes_default
6325 #include <string.h>
6326 _ACEOF
6327 rm -f conftest.$ac_objext
6328 if { (ac_try="$ac_compile"
6329 case "(($ac_try" in
6330   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6331   *) ac_try_echo=$ac_try;;
6332 esac
6333 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6334 $as_echo "$ac_try_echo") >&5
6335   (eval "$ac_compile") 2>conftest.er1
6336   ac_status=$?
6337   grep -v '^ *+' conftest.er1 >conftest.err
6338   rm -f conftest.er1
6339   cat conftest.err >&5
6340   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6341   (exit $ac_status); } && {
6342          test -z "$ac_c_werror_flag" ||
6343          test ! -s conftest.err
6344        } && test -s conftest.$ac_objext; then
6345   ac_header_compiler=yes
6346 else
6347   $as_echo "$as_me: failed program was:" >&5
6348 sed 's/^/| /' conftest.$ac_ext >&5
6349
6350         ac_header_compiler=no
6351 fi
6352
6353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6354 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6355 $as_echo "$ac_header_compiler" >&6; }
6356
6357 # Is the header present?
6358 { $as_echo "$as_me:$LINENO: checking string.h presence" >&5
6359 $as_echo_n "checking string.h presence... " >&6; }
6360 cat >conftest.$ac_ext <<_ACEOF
6361 /* confdefs.h.  */
6362 _ACEOF
6363 cat confdefs.h >>conftest.$ac_ext
6364 cat >>conftest.$ac_ext <<_ACEOF
6365 /* end confdefs.h.  */
6366 #include <string.h>
6367 _ACEOF
6368 if { (ac_try="$ac_cpp conftest.$ac_ext"
6369 case "(($ac_try" in
6370   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6371   *) ac_try_echo=$ac_try;;
6372 esac
6373 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6374 $as_echo "$ac_try_echo") >&5
6375   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6376   ac_status=$?
6377   grep -v '^ *+' conftest.er1 >conftest.err
6378   rm -f conftest.er1
6379   cat conftest.err >&5
6380   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6381   (exit $ac_status); } >/dev/null && {
6382          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6383          test ! -s conftest.err
6384        }; then
6385   ac_header_preproc=yes
6386 else
6387   $as_echo "$as_me: failed program was:" >&5
6388 sed 's/^/| /' conftest.$ac_ext >&5
6389
6390   ac_header_preproc=no
6391 fi
6392
6393 rm -f conftest.err conftest.$ac_ext
6394 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6395 $as_echo "$ac_header_preproc" >&6; }
6396
6397 # So?  What about this header?
6398 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6399   yes:no: )
6400     { $as_echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
6401 $as_echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6402     { $as_echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
6403 $as_echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
6404     ac_header_preproc=yes
6405     ;;
6406   no:yes:* )
6407     { $as_echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
6408 $as_echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
6409     { $as_echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
6410 $as_echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
6411     { $as_echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
6412 $as_echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
6413     { $as_echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
6414 $as_echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6415     { $as_echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
6416 $as_echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
6417     { $as_echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
6418 $as_echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
6419
6420     ;;
6421 esac
6422 { $as_echo "$as_me:$LINENO: checking for string.h" >&5
6423 $as_echo_n "checking for string.h... " >&6; }
6424 if test "${ac_cv_header_string_h+set}" = set; then
6425   $as_echo_n "(cached) " >&6
6426 else
6427   ac_cv_header_string_h=$ac_header_preproc
6428 fi
6429 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6430 $as_echo "$ac_cv_header_string_h" >&6; }
6431
6432 fi
6433 if test "x$ac_cv_header_string_h" = x""yes; then
6434   tcl_ok=1
6435 else
6436   tcl_ok=0
6437 fi
6438
6439
6440     cat >conftest.$ac_ext <<_ACEOF
6441 /* confdefs.h.  */
6442 _ACEOF
6443 cat confdefs.h >>conftest.$ac_ext
6444 cat >>conftest.$ac_ext <<_ACEOF
6445 /* end confdefs.h.  */
6446 #include <string.h>
6447
6448 _ACEOF
6449 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6450   $EGREP "strstr" >/dev/null 2>&1; then
6451   :
6452 else
6453   tcl_ok=0
6454 fi
6455 rm -f conftest*
6456
6457     cat >conftest.$ac_ext <<_ACEOF
6458 /* confdefs.h.  */
6459 _ACEOF
6460 cat confdefs.h >>conftest.$ac_ext
6461 cat >>conftest.$ac_ext <<_ACEOF
6462 /* end confdefs.h.  */
6463 #include <string.h>
6464
6465 _ACEOF
6466 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6467   $EGREP "strerror" >/dev/null 2>&1; then
6468   :
6469 else
6470   tcl_ok=0
6471 fi
6472 rm -f conftest*
6473
6474
6475     # See also memmove check below for a place where NO_STRING_H can be
6476     # set and why.
6477
6478     if test $tcl_ok = 0; then
6479
6480 cat >>confdefs.h <<\_ACEOF
6481 #define NO_STRING_H 1
6482 _ACEOF
6483
6484     fi
6485
6486     if test "${ac_cv_header_sys_wait_h+set}" = set; then
6487   { $as_echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6488 $as_echo_n "checking for sys/wait.h... " >&6; }
6489 if test "${ac_cv_header_sys_wait_h+set}" = set; then
6490   $as_echo_n "(cached) " >&6
6491 fi
6492 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6493 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
6494 else
6495   # Is the header compilable?
6496 { $as_echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
6497 $as_echo_n "checking sys/wait.h usability... " >&6; }
6498 cat >conftest.$ac_ext <<_ACEOF
6499 /* confdefs.h.  */
6500 _ACEOF
6501 cat confdefs.h >>conftest.$ac_ext
6502 cat >>conftest.$ac_ext <<_ACEOF
6503 /* end confdefs.h.  */
6504 $ac_includes_default
6505 #include <sys/wait.h>
6506 _ACEOF
6507 rm -f conftest.$ac_objext
6508 if { (ac_try="$ac_compile"
6509 case "(($ac_try" in
6510   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6511   *) ac_try_echo=$ac_try;;
6512 esac
6513 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6514 $as_echo "$ac_try_echo") >&5
6515   (eval "$ac_compile") 2>conftest.er1
6516   ac_status=$?
6517   grep -v '^ *+' conftest.er1 >conftest.err
6518   rm -f conftest.er1
6519   cat conftest.err >&5
6520   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6521   (exit $ac_status); } && {
6522          test -z "$ac_c_werror_flag" ||
6523          test ! -s conftest.err
6524        } && test -s conftest.$ac_objext; then
6525   ac_header_compiler=yes
6526 else
6527   $as_echo "$as_me: failed program was:" >&5
6528 sed 's/^/| /' conftest.$ac_ext >&5
6529
6530         ac_header_compiler=no
6531 fi
6532
6533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6534 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6535 $as_echo "$ac_header_compiler" >&6; }
6536
6537 # Is the header present?
6538 { $as_echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
6539 $as_echo_n "checking sys/wait.h presence... " >&6; }
6540 cat >conftest.$ac_ext <<_ACEOF
6541 /* confdefs.h.  */
6542 _ACEOF
6543 cat confdefs.h >>conftest.$ac_ext
6544 cat >>conftest.$ac_ext <<_ACEOF
6545 /* end confdefs.h.  */
6546 #include <sys/wait.h>
6547 _ACEOF
6548 if { (ac_try="$ac_cpp conftest.$ac_ext"
6549 case "(($ac_try" in
6550   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6551   *) ac_try_echo=$ac_try;;
6552 esac
6553 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6554 $as_echo "$ac_try_echo") >&5
6555   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6556   ac_status=$?
6557   grep -v '^ *+' conftest.er1 >conftest.err
6558   rm -f conftest.er1
6559   cat conftest.err >&5
6560   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6561   (exit $ac_status); } >/dev/null && {
6562          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6563          test ! -s conftest.err
6564        }; then
6565   ac_header_preproc=yes
6566 else
6567   $as_echo "$as_me: failed program was:" >&5
6568 sed 's/^/| /' conftest.$ac_ext >&5
6569
6570   ac_header_preproc=no
6571 fi
6572
6573 rm -f conftest.err conftest.$ac_ext
6574 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6575 $as_echo "$ac_header_preproc" >&6; }
6576
6577 # So?  What about this header?
6578 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6579   yes:no: )
6580     { $as_echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
6581 $as_echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6582     { $as_echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
6583 $as_echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
6584     ac_header_preproc=yes
6585     ;;
6586   no:yes:* )
6587     { $as_echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
6588 $as_echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
6589     { $as_echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
6590 $as_echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
6591     { $as_echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
6592 $as_echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
6593     { $as_echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
6594 $as_echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6595     { $as_echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
6596 $as_echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
6597     { $as_echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
6598 $as_echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
6599
6600     ;;
6601 esac
6602 { $as_echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6603 $as_echo_n "checking for sys/wait.h... " >&6; }
6604 if test "${ac_cv_header_sys_wait_h+set}" = set; then
6605   $as_echo_n "(cached) " >&6
6606 else
6607   ac_cv_header_sys_wait_h=$ac_header_preproc
6608 fi
6609 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6610 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
6611
6612 fi
6613 if test "x$ac_cv_header_sys_wait_h" = x""yes; then
6614   :
6615 else
6616
6617 cat >>confdefs.h <<\_ACEOF
6618 #define NO_SYS_WAIT_H 1
6619 _ACEOF
6620
6621 fi
6622
6623
6624     if test "${ac_cv_header_dlfcn_h+set}" = set; then
6625   { $as_echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6626 $as_echo_n "checking for dlfcn.h... " >&6; }
6627 if test "${ac_cv_header_dlfcn_h+set}" = set; then
6628   $as_echo_n "(cached) " >&6
6629 fi
6630 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6631 $as_echo "$ac_cv_header_dlfcn_h" >&6; }
6632 else
6633   # Is the header compilable?
6634 { $as_echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
6635 $as_echo_n "checking dlfcn.h usability... " >&6; }
6636 cat >conftest.$ac_ext <<_ACEOF
6637 /* confdefs.h.  */
6638 _ACEOF
6639 cat confdefs.h >>conftest.$ac_ext
6640 cat >>conftest.$ac_ext <<_ACEOF
6641 /* end confdefs.h.  */
6642 $ac_includes_default
6643 #include <dlfcn.h>
6644 _ACEOF
6645 rm -f conftest.$ac_objext
6646 if { (ac_try="$ac_compile"
6647 case "(($ac_try" in
6648   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6649   *) ac_try_echo=$ac_try;;
6650 esac
6651 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6652 $as_echo "$ac_try_echo") >&5
6653   (eval "$ac_compile") 2>conftest.er1
6654   ac_status=$?
6655   grep -v '^ *+' conftest.er1 >conftest.err
6656   rm -f conftest.er1
6657   cat conftest.err >&5
6658   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6659   (exit $ac_status); } && {
6660          test -z "$ac_c_werror_flag" ||
6661          test ! -s conftest.err
6662        } && test -s conftest.$ac_objext; then
6663   ac_header_compiler=yes
6664 else
6665   $as_echo "$as_me: failed program was:" >&5
6666 sed 's/^/| /' conftest.$ac_ext >&5
6667
6668         ac_header_compiler=no
6669 fi
6670
6671 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6672 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6673 $as_echo "$ac_header_compiler" >&6; }
6674
6675 # Is the header present?
6676 { $as_echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
6677 $as_echo_n "checking dlfcn.h presence... " >&6; }
6678 cat >conftest.$ac_ext <<_ACEOF
6679 /* confdefs.h.  */
6680 _ACEOF
6681 cat confdefs.h >>conftest.$ac_ext
6682 cat >>conftest.$ac_ext <<_ACEOF
6683 /* end confdefs.h.  */
6684 #include <dlfcn.h>
6685 _ACEOF
6686 if { (ac_try="$ac_cpp conftest.$ac_ext"
6687 case "(($ac_try" in
6688   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6689   *) ac_try_echo=$ac_try;;
6690 esac
6691 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6692 $as_echo "$ac_try_echo") >&5
6693   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6694   ac_status=$?
6695   grep -v '^ *+' conftest.er1 >conftest.err
6696   rm -f conftest.er1
6697   cat conftest.err >&5
6698   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6699   (exit $ac_status); } >/dev/null && {
6700          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6701          test ! -s conftest.err
6702        }; then
6703   ac_header_preproc=yes
6704 else
6705   $as_echo "$as_me: failed program was:" >&5
6706 sed 's/^/| /' conftest.$ac_ext >&5
6707
6708   ac_header_preproc=no
6709 fi
6710
6711 rm -f conftest.err conftest.$ac_ext
6712 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6713 $as_echo "$ac_header_preproc" >&6; }
6714
6715 # So?  What about this header?
6716 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6717   yes:no: )
6718     { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
6719 $as_echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6720     { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
6721 $as_echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
6722     ac_header_preproc=yes
6723     ;;
6724   no:yes:* )
6725     { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
6726 $as_echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
6727     { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
6728 $as_echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
6729     { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
6730 $as_echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
6731     { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
6732 $as_echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6733     { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
6734 $as_echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
6735     { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
6736 $as_echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
6737
6738     ;;
6739 esac
6740 { $as_echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6741 $as_echo_n "checking for dlfcn.h... " >&6; }
6742 if test "${ac_cv_header_dlfcn_h+set}" = set; then
6743   $as_echo_n "(cached) " >&6
6744 else
6745   ac_cv_header_dlfcn_h=$ac_header_preproc
6746 fi
6747 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6748 $as_echo "$ac_cv_header_dlfcn_h" >&6; }
6749
6750 fi
6751 if test "x$ac_cv_header_dlfcn_h" = x""yes; then
6752   :
6753 else
6754
6755 cat >>confdefs.h <<\_ACEOF
6756 #define NO_DLFCN_H 1
6757 _ACEOF
6758
6759 fi
6760
6761
6762
6763     # OS/390 lacks sys/param.h (and doesn't need it, by chance).
6764
6765 for ac_header in sys/param.h
6766 do
6767 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6768 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6769   { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6770 $as_echo_n "checking for $ac_header... " >&6; }
6771 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6772   $as_echo_n "(cached) " >&6
6773 fi
6774 ac_res=`eval 'as_val=${'$as_ac_Header'}
6775                  $as_echo "$as_val"'`
6776                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6777 $as_echo "$ac_res" >&6; }
6778 else
6779   # Is the header compilable?
6780 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
6781 $as_echo_n "checking $ac_header usability... " >&6; }
6782 cat >conftest.$ac_ext <<_ACEOF
6783 /* confdefs.h.  */
6784 _ACEOF
6785 cat confdefs.h >>conftest.$ac_ext
6786 cat >>conftest.$ac_ext <<_ACEOF
6787 /* end confdefs.h.  */
6788 $ac_includes_default
6789 #include <$ac_header>
6790 _ACEOF
6791 rm -f conftest.$ac_objext
6792 if { (ac_try="$ac_compile"
6793 case "(($ac_try" in
6794   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6795   *) ac_try_echo=$ac_try;;
6796 esac
6797 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6798 $as_echo "$ac_try_echo") >&5
6799   (eval "$ac_compile") 2>conftest.er1
6800   ac_status=$?
6801   grep -v '^ *+' conftest.er1 >conftest.err
6802   rm -f conftest.er1
6803   cat conftest.err >&5
6804   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6805   (exit $ac_status); } && {
6806          test -z "$ac_c_werror_flag" ||
6807          test ! -s conftest.err
6808        } && test -s conftest.$ac_objext; then
6809   ac_header_compiler=yes
6810 else
6811   $as_echo "$as_me: failed program was:" >&5
6812 sed 's/^/| /' conftest.$ac_ext >&5
6813
6814         ac_header_compiler=no
6815 fi
6816
6817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6818 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6819 $as_echo "$ac_header_compiler" >&6; }
6820
6821 # Is the header present?
6822 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
6823 $as_echo_n "checking $ac_header presence... " >&6; }
6824 cat >conftest.$ac_ext <<_ACEOF
6825 /* confdefs.h.  */
6826 _ACEOF
6827 cat confdefs.h >>conftest.$ac_ext
6828 cat >>conftest.$ac_ext <<_ACEOF
6829 /* end confdefs.h.  */
6830 #include <$ac_header>
6831 _ACEOF
6832 if { (ac_try="$ac_cpp conftest.$ac_ext"
6833 case "(($ac_try" in
6834   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6835   *) ac_try_echo=$ac_try;;
6836 esac
6837 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6838 $as_echo "$ac_try_echo") >&5
6839   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6840   ac_status=$?
6841   grep -v '^ *+' conftest.er1 >conftest.err
6842   rm -f conftest.er1
6843   cat conftest.err >&5
6844   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6845   (exit $ac_status); } >/dev/null && {
6846          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6847          test ! -s conftest.err
6848        }; then
6849   ac_header_preproc=yes
6850 else
6851   $as_echo "$as_me: failed program was:" >&5
6852 sed 's/^/| /' conftest.$ac_ext >&5
6853
6854   ac_header_preproc=no
6855 fi
6856
6857 rm -f conftest.err conftest.$ac_ext
6858 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6859 $as_echo "$ac_header_preproc" >&6; }
6860
6861 # So?  What about this header?
6862 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6863   yes:no: )
6864     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6865 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6866     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6867 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6868     ac_header_preproc=yes
6869     ;;
6870   no:yes:* )
6871     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6872 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6873     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6874 $as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6875     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6876 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6877     { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6878 $as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6879     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6880 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6881     { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6882 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6883
6884     ;;
6885 esac
6886 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6887 $as_echo_n "checking for $ac_header... " >&6; }
6888 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6889   $as_echo_n "(cached) " >&6
6890 else
6891   eval "$as_ac_Header=\$ac_header_preproc"
6892 fi
6893 ac_res=`eval 'as_val=${'$as_ac_Header'}
6894                  $as_echo "$as_val"'`
6895                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6896 $as_echo "$ac_res" >&6; }
6897
6898 fi
6899 as_val=`eval 'as_val=${'$as_ac_Header'}
6900                  $as_echo "$as_val"'`
6901    if test "x$as_val" = x""yes; then
6902   cat >>confdefs.h <<_ACEOF
6903 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6904 _ACEOF
6905
6906 fi
6907
6908 done
6909
6910
6911         # Let the user call this, because if it triggers, they will
6912         # need a compat/strtod.c that is correct.  Users can also
6913         # use Tcl_GetDouble(FromObj) instead.
6914         #TEA_BUGGY_STRTOD
6915     fi
6916
6917
6918 #-----------------------------------------------------------------------
6919 # __CHANGE__
6920 # Specify the C source files to compile in TEA_ADD_SOURCES,
6921 # public headers that need to be installed in TEA_ADD_HEADERS,
6922 # stub library C source files to compile in TEA_ADD_STUB_SOURCES,
6923 # and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
6924 # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
6925 # and PKG_TCL_SOURCES.
6926 #-----------------------------------------------------------------------
6927
6928
6929     vars="tclcurl.c multi.c"
6930     for i in $vars; do
6931         case $i in
6932             \$*)
6933                 # allow $-var names
6934                 PKG_SOURCES="$PKG_SOURCES $i"
6935                 PKG_OBJECTS="$PKG_OBJECTS $i"
6936                 ;;
6937             *)
6938                 # check for existence - allows for generic/win/unix VPATH
6939                 # To add more dirs here (like 'src'), you have to update VPATH
6940                 # in Makefile.in as well
6941                 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6942                     -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6943                     ; then
6944                     { { $as_echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
6945 $as_echo "$as_me: error: could not find source file '$i'" >&2;}
6946    { (exit 1); exit 1; }; }
6947                 fi
6948                 PKG_SOURCES="$PKG_SOURCES $i"
6949                 # this assumes it is in a VPATH dir
6950                 i=`basename $i`
6951                 # handle user calling this before or after TEA_SETUP_COMPILER
6952                 if test x"${OBJEXT}" != x ; then
6953                     j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6954                 else
6955                     j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6956                 fi
6957                 PKG_OBJECTS="$PKG_OBJECTS $j"
6958                 ;;
6959         esac
6960     done
6961
6962
6963
6964 TCLCURL_SCRIPTS=tclcurl.tcl
6965
6966
6967 #--------------------------------------------------------------------
6968 # Find libcurl, if it's not present, it makes no sense to compile
6969 # this.
6970 #--------------------------------------------------------------------
6971
6972
6973 # Check whether --with-curlprefix was given.
6974 if test "${with_curlprefix+set}" = set; then
6975   withval=$with_curlprefix;
6976     curlprefix=$withval
6977     curlpath=$curlprefix/bin
6978     # Extract the first word of "curl", so it can be a program name with args.
6979 set dummy curl; ac_word=$2
6980 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
6981 $as_echo_n "checking for $ac_word... " >&6; }
6982 if test "${ac_cv_prog_curl+set}" = set; then
6983   $as_echo_n "(cached) " >&6
6984 else
6985   if test -n "$curl"; then
6986   ac_cv_prog_curl="$curl" # Let the user override the test.
6987 else
6988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6989 for as_dir in $curlpath
6990 do
6991   IFS=$as_save_IFS
6992   test -z "$as_dir" && as_dir=.
6993   for ac_exec_ext in '' $ac_executable_extensions; do
6994   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6995     ac_cv_prog_curl="yes"
6996     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6997     break 2
6998   fi
6999 done
7000 done
7001 IFS=$as_save_IFS
7002
7003   test -z "$ac_cv_prog_curl" && ac_cv_prog_curl="no"
7004 fi
7005 fi
7006 curl=$ac_cv_prog_curl
7007 if test -n "$curl"; then
7008   { $as_echo "$as_me:$LINENO: result: $curl" >&5
7009 $as_echo "$curl" >&6; }
7010 else
7011   { $as_echo "$as_me:$LINENO: result: no" >&5
7012 $as_echo "no" >&6; }
7013 fi
7014
7015
7016     if test "x$curl" = xno ; then
7017        { { $as_echo "$as_me:$LINENO: error: can not find cURL in $curlpath" >&5
7018 $as_echo "$as_me: error: can not find cURL in $curlpath" >&2;}
7019    { (exit 1); exit 1; }; }
7020     fi
7021
7022 else
7023
7024     # Extract the first word of "curl-config", so it can be a program name with args.
7025 set dummy curl-config; ac_word=$2
7026 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
7027 $as_echo_n "checking for $ac_word... " >&6; }
7028 if test "${ac_cv_prog_curl+set}" = set; then
7029   $as_echo_n "(cached) " >&6
7030 else
7031   if test -n "$curl"; then
7032   ac_cv_prog_curl="$curl" # Let the user override the test.
7033 else
7034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7035 for as_dir in $PATH
7036 do
7037   IFS=$as_save_IFS
7038   test -z "$as_dir" && as_dir=.
7039   for ac_exec_ext in '' $ac_executable_extensions; do
7040   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7041     ac_cv_prog_curl="yes"
7042     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7043     break 2
7044   fi
7045 done
7046 done
7047 IFS=$as_save_IFS
7048
7049   test -z "$ac_cv_prog_curl" && ac_cv_prog_curl="no"
7050 fi
7051 fi
7052 curl=$ac_cv_prog_curl
7053 if test -n "$curl"; then
7054   { $as_echo "$as_me:$LINENO: result: $curl" >&5
7055 $as_echo "$curl" >&6; }
7056 else
7057   { $as_echo "$as_me:$LINENO: result: no" >&5
7058 $as_echo "no" >&6; }
7059 fi
7060
7061
7062     if test "x$curl" = xno ; then
7063         { { $as_echo "$as_me:$LINENO: error: can not find cURL or libcurl... go to http://curl.haxx.se/ to download and then install it first" >&5
7064 $as_echo "$as_me: error: can not find cURL or libcurl... go to http://curl.haxx.se/ to download and then install it first" >&2;}
7065    { (exit 1); exit 1; }; }
7066     else
7067         curlprefix=`curl-config --prefix`
7068         curlpath=$curlprefix/bin
7069     fi
7070
7071 fi
7072
7073
7074
7075 # Check whether --with-curlinclude was given.
7076 if test "${with_curlinclude+set}" = set; then
7077   withval=$with_curlinclude;
7078
7079     vars="-I$withval"
7080     for i in $vars; do
7081         PKG_INCLUDES="$PKG_INCLUDES $i"
7082     done
7083
7084
7085     curlinclude=$withval
7086
7087 else
7088
7089
7090     vars="-I$curlprefix/include"
7091     for i in $vars; do
7092         PKG_INCLUDES="$PKG_INCLUDES $i"
7093     done
7094
7095
7096      curlinclude=$curlprefix/include
7097
7098 fi
7099
7100
7101 if test "${ac_cv_header_curl_curl_h+set}" = set; then
7102   { $as_echo "$as_me:$LINENO: checking for curl/curl.h" >&5
7103 $as_echo_n "checking for curl/curl.h... " >&6; }
7104 if test "${ac_cv_header_curl_curl_h+set}" = set; then
7105   $as_echo_n "(cached) " >&6
7106 fi
7107 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_curl_curl_h" >&5
7108 $as_echo "$ac_cv_header_curl_curl_h" >&6; }
7109 else
7110   # Is the header compilable?
7111 { $as_echo "$as_me:$LINENO: checking curl/curl.h usability" >&5
7112 $as_echo_n "checking curl/curl.h usability... " >&6; }
7113 cat >conftest.$ac_ext <<_ACEOF
7114 /* confdefs.h.  */
7115 _ACEOF
7116 cat confdefs.h >>conftest.$ac_ext
7117 cat >>conftest.$ac_ext <<_ACEOF
7118 /* end confdefs.h.  */
7119 $ac_includes_default
7120 #include <curl/curl.h>
7121 _ACEOF
7122 rm -f conftest.$ac_objext
7123 if { (ac_try="$ac_compile"
7124 case "(($ac_try" in
7125   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7126   *) ac_try_echo=$ac_try;;
7127 esac
7128 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7129 $as_echo "$ac_try_echo") >&5
7130   (eval "$ac_compile") 2>conftest.er1
7131   ac_status=$?
7132   grep -v '^ *+' conftest.er1 >conftest.err
7133   rm -f conftest.er1
7134   cat conftest.err >&5
7135   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7136   (exit $ac_status); } && {
7137          test -z "$ac_c_werror_flag" ||
7138          test ! -s conftest.err
7139        } && test -s conftest.$ac_objext; then
7140   ac_header_compiler=yes
7141 else
7142   $as_echo "$as_me: failed program was:" >&5
7143 sed 's/^/| /' conftest.$ac_ext >&5
7144
7145         ac_header_compiler=no
7146 fi
7147
7148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7149 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7150 $as_echo "$ac_header_compiler" >&6; }
7151
7152 # Is the header present?
7153 { $as_echo "$as_me:$LINENO: checking curl/curl.h presence" >&5
7154 $as_echo_n "checking curl/curl.h presence... " >&6; }
7155 cat >conftest.$ac_ext <<_ACEOF
7156 /* confdefs.h.  */
7157 _ACEOF
7158 cat confdefs.h >>conftest.$ac_ext
7159 cat >>conftest.$ac_ext <<_ACEOF
7160 /* end confdefs.h.  */
7161 #include <curl/curl.h>
7162 _ACEOF
7163 if { (ac_try="$ac_cpp conftest.$ac_ext"
7164 case "(($ac_try" in
7165   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7166   *) ac_try_echo=$ac_try;;
7167 esac
7168 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7169 $as_echo "$ac_try_echo") >&5
7170   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7171   ac_status=$?
7172   grep -v '^ *+' conftest.er1 >conftest.err
7173   rm -f conftest.er1
7174   cat conftest.err >&5
7175   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7176   (exit $ac_status); } >/dev/null && {
7177          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7178          test ! -s conftest.err
7179        }; then
7180   ac_header_preproc=yes
7181 else
7182   $as_echo "$as_me: failed program was:" >&5
7183 sed 's/^/| /' conftest.$ac_ext >&5
7184
7185   ac_header_preproc=no
7186 fi
7187
7188 rm -f conftest.err conftest.$ac_ext
7189 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7190 $as_echo "$ac_header_preproc" >&6; }
7191
7192 # So?  What about this header?
7193 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7194   yes:no: )
7195     { $as_echo "$as_me:$LINENO: WARNING: curl/curl.h: accepted by the compiler, rejected by the preprocessor!" >&5
7196 $as_echo "$as_me: WARNING: curl/curl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7197     { $as_echo "$as_me:$LINENO: WARNING: curl/curl.h: proceeding with the compiler's result" >&5
7198 $as_echo "$as_me: WARNING: curl/curl.h: proceeding with the compiler's result" >&2;}
7199     ac_header_preproc=yes
7200     ;;
7201   no:yes:* )
7202     { $as_echo "$as_me:$LINENO: WARNING: curl/curl.h: present but cannot be compiled" >&5
7203 $as_echo "$as_me: WARNING: curl/curl.h: present but cannot be compiled" >&2;}
7204     { $as_echo "$as_me:$LINENO: WARNING: curl/curl.h:     check for missing prerequisite headers?" >&5
7205 $as_echo "$as_me: WARNING: curl/curl.h:     check for missing prerequisite headers?" >&2;}
7206     { $as_echo "$as_me:$LINENO: WARNING: curl/curl.h: see the Autoconf documentation" >&5
7207 $as_echo "$as_me: WARNING: curl/curl.h: see the Autoconf documentation" >&2;}
7208     { $as_echo "$as_me:$LINENO: WARNING: curl/curl.h:     section \"Present But Cannot Be Compiled\"" >&5
7209 $as_echo "$as_me: WARNING: curl/curl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
7210     { $as_echo "$as_me:$LINENO: WARNING: curl/curl.h: proceeding with the preprocessor's result" >&5
7211 $as_echo "$as_me: WARNING: curl/curl.h: proceeding with the preprocessor's result" >&2;}
7212     { $as_echo "$as_me:$LINENO: WARNING: curl/curl.h: in the future, the compiler will take precedence" >&5
7213 $as_echo "$as_me: WARNING: curl/curl.h: in the future, the compiler will take precedence" >&2;}
7214
7215     ;;
7216 esac
7217 { $as_echo "$as_me:$LINENO: checking for curl/curl.h" >&5
7218 $as_echo_n "checking for curl/curl.h... " >&6; }
7219 if test "${ac_cv_header_curl_curl_h+set}" = set; then
7220   $as_echo_n "(cached) " >&6
7221 else
7222   ac_cv_header_curl_curl_h=$ac_header_preproc
7223 fi
7224 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_curl_curl_h" >&5
7225 $as_echo "$ac_cv_header_curl_curl_h" >&6; }
7226
7227 fi
7228 if test "x$ac_cv_header_curl_curl_h" = x""yes; then
7229   headercurl=yes
7230 else
7231   headercurl=no
7232 fi
7233
7234
7235 if test "x$headercurl" = xno ; then
7236     { $as_echo "$as_me:$LINENO: checking checking for headers at $curlinclude" >&5
7237 $as_echo_n "checking checking for headers at $curlinclude... " >&6; }
7238     if test  ! -r $curlinclude/curl/curl.h  ; then
7239         { { $as_echo "$as_me:$LINENO: error: cURL headers not found, you may need to install a curl-devel package" >&5
7240 $as_echo "$as_me: error: cURL headers not found, you may need to install a curl-devel package" >&2;}
7241    { (exit 1); exit 1; }; }
7242     fi
7243     { $as_echo "$as_me:$LINENO: result: found" >&5
7244 $as_echo "found" >&6; }
7245 fi
7246
7247
7248 # Check whether --with-libcurl was given.
7249 if test "${with_libcurl+set}" = set; then
7250   withval=$with_libcurl;
7251
7252     vars="-L$withval"
7253     for i in $vars; do
7254         if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7255             # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7256             i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7257         fi
7258         PKG_LIBS="$PKG_LIBS $i"
7259     done
7260
7261
7262
7263 else
7264
7265
7266     vars="-L$curlprefix/lib"
7267     for i in $vars; do
7268         if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7269             # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7270             i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7271         fi
7272         PKG_LIBS="$PKG_LIBS $i"
7273     done
7274
7275
7276
7277 fi
7278
7279
7280 { $as_echo "$as_me:$LINENO: checking if libcurl version is recent enough" >&5
7281 $as_echo_n "checking if libcurl version is recent enough... " >&6; }
7282 CURL_VERSION=`$curlpath/curl-config --checkfor 7.19.6`
7283 if test "${CURL_VERSION}" != "" ; then
7284     echo ${CURL_VERSION}
7285     { { $as_echo "$as_me:$LINENO: error: libcurl version too old, please upgrade" >&5
7286 $as_echo "$as_me: error: libcurl version too old, please upgrade" >&2;}
7287    { (exit 1); exit 1; }; }
7288 fi
7289 { $as_echo "$as_me:$LINENO: result: yes" >&5
7290 $as_echo "yes" >&6; }
7291
7292
7293     vars="`$curlpath/curl-config --libs`"
7294     for i in $vars; do
7295         if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7296             # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7297             i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7298         fi
7299         PKG_LIBS="$PKG_LIBS $i"
7300     done
7301
7302
7303
7304 #--------------------------------------------------------------------
7305 # __CHANGE__
7306 # A few miscellaneous platform-specific items:
7307 #
7308 # Define a special symbol for Windows (BUILD_sample in this case) so
7309 # that we create the export library with the dll.
7310 #
7311 # Windows creates a few extra files that need to be cleaned up.
7312 # You can add more files to clean if your extension creates any extra
7313 # files.
7314 #
7315 # TEA_ADD_* any platform specific compiler/build info here.
7316 #--------------------------------------------------------------------
7317
7318 # Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
7319 # and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
7320 #CLEANFILES="pkgIndex.tcl"
7321 if test "${TEA_PLATFORM}" = "windows" ; then
7322
7323 cat >>confdefs.h <<\_ACEOF
7324 #define BUILD_sample 1
7325 _ACEOF
7326
7327     CLEANFILES="$CLEANFILES *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
7328     #TEA_ADD_SOURCES([win/winFile.c])
7329     #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
7330 else
7331     # Ensure no empty else clauses
7332     :
7333     #TEA_ADD_SOURCES([unix/unixFile.c])
7334     #TEA_ADD_LIBS([-lsuperfly])
7335 fi
7336
7337
7338 #--------------------------------------------------------------------
7339 # __CHANGE__
7340 # Choose which headers you need.  Extension authors should try very
7341 # hard to only rely on the Tcl public header files.  Internal headers
7342 # contain private data structures and are subject to change without
7343 # notice.
7344 # This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
7345 #--------------------------------------------------------------------
7346
7347
7348     { $as_echo "$as_me:$LINENO: checking for Tcl public headers" >&5
7349 $as_echo_n "checking for Tcl public headers... " >&6; }
7350
7351
7352 # Check whether --with-tclinclude was given.
7353 if test "${with_tclinclude+set}" = set; then
7354   withval=$with_tclinclude; with_tclinclude=${withval}
7355 fi
7356
7357
7358     if test "${ac_cv_c_tclh+set}" = set; then
7359   $as_echo_n "(cached) " >&6
7360 else
7361
7362         # Use the value from --with-tclinclude, if it was given
7363
7364         if test x"${with_tclinclude}" != x ; then
7365             if test -f "${with_tclinclude}/tcl.h" ; then
7366                 ac_cv_c_tclh=${with_tclinclude}
7367             else
7368                 { { $as_echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
7369 $as_echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
7370    { (exit 1); exit 1; }; }
7371             fi
7372         else
7373             list=""
7374             if test "`uname -s`" = "Darwin"; then
7375                 # If Tcl was built as a framework, attempt to use
7376                 # the framework's Headers directory
7377                 case ${TCL_DEFS} in
7378                     *TCL_FRAMEWORK*)
7379                         list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
7380                         ;;
7381                 esac
7382             fi
7383
7384             # Look in the source dir only if Tcl is not installed,
7385             # and in that situation, look there before installed locations.
7386             if test -f "${TCL_BIN_DIR}/Makefile" ; then
7387                 list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
7388             fi
7389
7390             # Check order: pkg --prefix location, Tcl's --prefix location,
7391             # relative to directory of tclConfig.sh.
7392
7393             eval "temp_includedir=${includedir}"
7394             list="$list \
7395                 `ls -d ${temp_includedir}        2>/dev/null` \
7396                 `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
7397                 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
7398             if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
7399                 list="$list /usr/local/include /usr/include"
7400                 if test x"${TCL_INCLUDE_SPEC}" != x ; then
7401                     d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
7402                     list="$list `ls -d ${d} 2>/dev/null`"
7403                 fi
7404             fi
7405             for i in $list ; do
7406                 if test -f "$i/tcl.h" ; then
7407                     ac_cv_c_tclh=$i
7408                     break
7409                 fi
7410             done
7411         fi
7412
7413 fi
7414
7415
7416     # Print a message based on how we determined the include path
7417
7418     if test x"${ac_cv_c_tclh}" = x ; then
7419         { { $as_echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
7420 $as_echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
7421    { (exit 1); exit 1; }; }
7422     else
7423         { $as_echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
7424 $as_echo "${ac_cv_c_tclh}" >&6; }
7425     fi
7426
7427     # Convert to a native path and substitute into the output files.
7428
7429     INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
7430
7431     TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
7432
7433
7434
7435 #TEA_PRIVATE_TCL_HEADERS
7436
7437 #TEA_PUBLIC_TK_HEADERS
7438 #TEA_PRIVATE_TK_HEADERS
7439 #TEA_PATH_X
7440
7441 #--------------------------------------------------------------------
7442 # Check whether --enable-threads or --disable-threads was given.
7443 # This auto-enables if Tcl was compiled threaded.
7444 #--------------------------------------------------------------------
7445
7446
7447     # Check whether --enable-threads was given.
7448 if test "${enable_threads+set}" = set; then
7449   enableval=$enable_threads; tcl_ok=$enableval
7450 else
7451   tcl_ok=yes
7452 fi
7453
7454
7455     if test "${enable_threads+set}" = set; then
7456         enableval="$enable_threads"
7457         tcl_ok=$enableval
7458     else
7459         tcl_ok=yes
7460     fi
7461
7462     if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
7463         TCL_THREADS=1
7464
7465         if test "${TEA_PLATFORM}" != "windows" ; then
7466             # We are always OK on Windows, so check what this platform wants:
7467
7468             # USE_THREAD_ALLOC tells us to try the special thread-based
7469             # allocator that significantly reduces lock contention
7470
7471 cat >>confdefs.h <<\_ACEOF
7472 #define USE_THREAD_ALLOC 1
7473 _ACEOF
7474
7475
7476 cat >>confdefs.h <<\_ACEOF
7477 #define _REENTRANT 1
7478 _ACEOF
7479
7480             if test "`uname -s`" = "SunOS" ; then
7481
7482 cat >>confdefs.h <<\_ACEOF
7483 #define _POSIX_PTHREAD_SEMANTICS 1
7484 _ACEOF
7485
7486             fi
7487
7488 cat >>confdefs.h <<\_ACEOF
7489 #define _THREAD_SAFE 1
7490 _ACEOF
7491
7492             { $as_echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
7493 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; }
7494 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
7495   $as_echo_n "(cached) " >&6
7496 else
7497   ac_check_lib_save_LIBS=$LIBS
7498 LIBS="-lpthread  $LIBS"
7499 cat >conftest.$ac_ext <<_ACEOF
7500 /* confdefs.h.  */
7501 _ACEOF
7502 cat confdefs.h >>conftest.$ac_ext
7503 cat >>conftest.$ac_ext <<_ACEOF
7504 /* end confdefs.h.  */
7505
7506 /* Override any GCC internal prototype to avoid an error.
7507    Use char because int might match the return type of a GCC
7508    builtin and then its argument prototype would still apply.  */
7509 #ifdef __cplusplus
7510 extern "C"
7511 #endif
7512 char pthread_mutex_init ();
7513 int
7514 main ()
7515 {
7516 return pthread_mutex_init ();
7517   ;
7518   return 0;
7519 }
7520 _ACEOF
7521 rm -f conftest.$ac_objext conftest$ac_exeext
7522 if { (ac_try="$ac_link"
7523 case "(($ac_try" in
7524   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7525   *) ac_try_echo=$ac_try;;
7526 esac
7527 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7528 $as_echo "$ac_try_echo") >&5
7529   (eval "$ac_link") 2>conftest.er1
7530   ac_status=$?
7531   grep -v '^ *+' conftest.er1 >conftest.err
7532   rm -f conftest.er1
7533   cat conftest.err >&5
7534   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7535   (exit $ac_status); } && {
7536          test -z "$ac_c_werror_flag" ||
7537          test ! -s conftest.err
7538        } && test -s conftest$ac_exeext && {
7539          test "$cross_compiling" = yes ||
7540          $as_test_x conftest$ac_exeext
7541        }; then
7542   ac_cv_lib_pthread_pthread_mutex_init=yes
7543 else
7544   $as_echo "$as_me: failed program was:" >&5
7545 sed 's/^/| /' conftest.$ac_ext >&5
7546
7547         ac_cv_lib_pthread_pthread_mutex_init=no
7548 fi
7549
7550 rm -rf conftest.dSYM
7551 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7552       conftest$ac_exeext conftest.$ac_ext
7553 LIBS=$ac_check_lib_save_LIBS
7554 fi
7555 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
7556 $as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
7557 if test "x$ac_cv_lib_pthread_pthread_mutex_init" = x""yes; then
7558   tcl_ok=yes
7559 else
7560   tcl_ok=no
7561 fi
7562
7563             if test "$tcl_ok" = "no"; then
7564                 # Check a little harder for __pthread_mutex_init in the same
7565                 # library, as some systems hide it there until pthread.h is
7566                 # defined.  We could alternatively do an AC_TRY_COMPILE with
7567                 # pthread.h, but that will work with libpthread really doesn't
7568                 # exist, like AIX 4.2.  [Bug: 4359]
7569                 { $as_echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
7570 $as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; }
7571 if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
7572   $as_echo_n "(cached) " >&6
7573 else
7574   ac_check_lib_save_LIBS=$LIBS
7575 LIBS="-lpthread  $LIBS"
7576 cat >conftest.$ac_ext <<_ACEOF
7577 /* confdefs.h.  */
7578 _ACEOF
7579 cat confdefs.h >>conftest.$ac_ext
7580 cat >>conftest.$ac_ext <<_ACEOF
7581 /* end confdefs.h.  */
7582
7583 /* Override any GCC internal prototype to avoid an error.
7584    Use char because int might match the return type of a GCC
7585    builtin and then its argument prototype would still apply.  */
7586 #ifdef __cplusplus
7587 extern "C"
7588 #endif
7589 char __pthread_mutex_init ();
7590 int
7591 main ()
7592 {
7593 return __pthread_mutex_init ();
7594   ;
7595   return 0;
7596 }
7597 _ACEOF
7598 rm -f conftest.$ac_objext conftest$ac_exeext
7599 if { (ac_try="$ac_link"
7600 case "(($ac_try" in
7601   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7602   *) ac_try_echo=$ac_try;;
7603 esac
7604 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7605 $as_echo "$ac_try_echo") >&5
7606   (eval "$ac_link") 2>conftest.er1
7607   ac_status=$?
7608   grep -v '^ *+' conftest.er1 >conftest.err
7609   rm -f conftest.er1
7610   cat conftest.err >&5
7611   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7612   (exit $ac_status); } && {
7613          test -z "$ac_c_werror_flag" ||
7614          test ! -s conftest.err
7615        } && test -s conftest$ac_exeext && {
7616          test "$cross_compiling" = yes ||
7617          $as_test_x conftest$ac_exeext
7618        }; then
7619   ac_cv_lib_pthread___pthread_mutex_init=yes
7620 else
7621   $as_echo "$as_me: failed program was:" >&5
7622 sed 's/^/| /' conftest.$ac_ext >&5
7623
7624         ac_cv_lib_pthread___pthread_mutex_init=no
7625 fi
7626
7627 rm -rf conftest.dSYM
7628 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7629       conftest$ac_exeext conftest.$ac_ext
7630 LIBS=$ac_check_lib_save_LIBS
7631 fi
7632 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
7633 $as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
7634 if test "x$ac_cv_lib_pthread___pthread_mutex_init" = x""yes; then
7635   tcl_ok=yes
7636 else
7637   tcl_ok=no
7638 fi
7639
7640             fi
7641
7642             if test "$tcl_ok" = "yes"; then
7643                 # The space is needed
7644                 THREADS_LIBS=" -lpthread"
7645             else
7646                 { $as_echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
7647 $as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; }
7648 if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
7649   $as_echo_n "(cached) " >&6
7650 else
7651   ac_check_lib_save_LIBS=$LIBS
7652 LIBS="-lpthreads  $LIBS"
7653 cat >conftest.$ac_ext <<_ACEOF
7654 /* confdefs.h.  */
7655 _ACEOF
7656 cat confdefs.h >>conftest.$ac_ext
7657 cat >>conftest.$ac_ext <<_ACEOF
7658 /* end confdefs.h.  */
7659
7660 /* Override any GCC internal prototype to avoid an error.
7661    Use char because int might match the return type of a GCC
7662    builtin and then its argument prototype would still apply.  */
7663 #ifdef __cplusplus
7664 extern "C"
7665 #endif
7666 char pthread_mutex_init ();
7667 int
7668 main ()
7669 {
7670 return pthread_mutex_init ();
7671   ;
7672   return 0;
7673 }
7674 _ACEOF
7675 rm -f conftest.$ac_objext conftest$ac_exeext
7676 if { (ac_try="$ac_link"
7677 case "(($ac_try" in
7678   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7679   *) ac_try_echo=$ac_try;;
7680 esac
7681 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7682 $as_echo "$ac_try_echo") >&5
7683   (eval "$ac_link") 2>conftest.er1
7684   ac_status=$?
7685   grep -v '^ *+' conftest.er1 >conftest.err
7686   rm -f conftest.er1
7687   cat conftest.err >&5
7688   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7689   (exit $ac_status); } && {
7690          test -z "$ac_c_werror_flag" ||
7691          test ! -s conftest.err
7692        } && test -s conftest$ac_exeext && {
7693          test "$cross_compiling" = yes ||
7694          $as_test_x conftest$ac_exeext
7695        }; then
7696   ac_cv_lib_pthreads_pthread_mutex_init=yes
7697 else
7698   $as_echo "$as_me: failed program was:" >&5
7699 sed 's/^/| /' conftest.$ac_ext >&5
7700
7701         ac_cv_lib_pthreads_pthread_mutex_init=no
7702 fi
7703
7704 rm -rf conftest.dSYM
7705 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7706       conftest$ac_exeext conftest.$ac_ext
7707 LIBS=$ac_check_lib_save_LIBS
7708 fi
7709 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
7710 $as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
7711 if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = x""yes; then
7712   tcl_ok=yes
7713 else
7714   tcl_ok=no
7715 fi
7716
7717                 if test "$tcl_ok" = "yes"; then
7718                     # The space is needed
7719                     THREADS_LIBS=" -lpthreads"
7720                 else
7721                     { $as_echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
7722 $as_echo_n "checking for pthread_mutex_init in -lc... " >&6; }
7723 if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
7724   $as_echo_n "(cached) " >&6
7725 else
7726   ac_check_lib_save_LIBS=$LIBS
7727 LIBS="-lc  $LIBS"
7728 cat >conftest.$ac_ext <<_ACEOF
7729 /* confdefs.h.  */
7730 _ACEOF
7731 cat confdefs.h >>conftest.$ac_ext
7732 cat >>conftest.$ac_ext <<_ACEOF
7733 /* end confdefs.h.  */
7734
7735 /* Override any GCC internal prototype to avoid an error.
7736    Use char because int might match the return type of a GCC
7737    builtin and then its argument prototype would still apply.  */
7738 #ifdef __cplusplus
7739 extern "C"
7740 #endif
7741 char pthread_mutex_init ();
7742 int
7743 main ()
7744 {
7745 return pthread_mutex_init ();
7746   ;
7747   return 0;
7748 }
7749 _ACEOF
7750 rm -f conftest.$ac_objext conftest$ac_exeext
7751 if { (ac_try="$ac_link"
7752 case "(($ac_try" in
7753   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7754   *) ac_try_echo=$ac_try;;
7755 esac
7756 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7757 $as_echo "$ac_try_echo") >&5
7758   (eval "$ac_link") 2>conftest.er1
7759   ac_status=$?
7760   grep -v '^ *+' conftest.er1 >conftest.err
7761   rm -f conftest.er1
7762   cat conftest.err >&5
7763   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7764   (exit $ac_status); } && {
7765          test -z "$ac_c_werror_flag" ||
7766          test ! -s conftest.err
7767        } && test -s conftest$ac_exeext && {
7768          test "$cross_compiling" = yes ||
7769          $as_test_x conftest$ac_exeext
7770        }; then
7771   ac_cv_lib_c_pthread_mutex_init=yes
7772 else
7773   $as_echo "$as_me: failed program was:" >&5
7774 sed 's/^/| /' conftest.$ac_ext >&5
7775
7776         ac_cv_lib_c_pthread_mutex_init=no
7777 fi
7778
7779 rm -rf conftest.dSYM
7780 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7781       conftest$ac_exeext conftest.$ac_ext
7782 LIBS=$ac_check_lib_save_LIBS
7783 fi
7784 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
7785 $as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; }
7786 if test "x$ac_cv_lib_c_pthread_mutex_init" = x""yes; then
7787   tcl_ok=yes
7788 else
7789   tcl_ok=no
7790 fi
7791
7792                     if test "$tcl_ok" = "no"; then
7793                         { $as_echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
7794 $as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; }
7795 if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
7796   $as_echo_n "(cached) " >&6
7797 else
7798   ac_check_lib_save_LIBS=$LIBS
7799 LIBS="-lc_r  $LIBS"
7800 cat >conftest.$ac_ext <<_ACEOF
7801 /* confdefs.h.  */
7802 _ACEOF
7803 cat confdefs.h >>conftest.$ac_ext
7804 cat >>conftest.$ac_ext <<_ACEOF
7805 /* end confdefs.h.  */
7806
7807 /* Override any GCC internal prototype to avoid an error.
7808    Use char because int might match the return type of a GCC
7809    builtin and then its argument prototype would still apply.  */
7810 #ifdef __cplusplus
7811 extern "C"
7812 #endif
7813 char pthread_mutex_init ();
7814 int
7815 main ()
7816 {
7817 return pthread_mutex_init ();
7818   ;
7819   return 0;
7820 }
7821 _ACEOF
7822 rm -f conftest.$ac_objext conftest$ac_exeext
7823 if { (ac_try="$ac_link"
7824 case "(($ac_try" in
7825   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7826   *) ac_try_echo=$ac_try;;
7827 esac
7828 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7829 $as_echo "$ac_try_echo") >&5
7830   (eval "$ac_link") 2>conftest.er1
7831   ac_status=$?
7832   grep -v '^ *+' conftest.er1 >conftest.err
7833   rm -f conftest.er1
7834   cat conftest.err >&5
7835   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7836   (exit $ac_status); } && {
7837          test -z "$ac_c_werror_flag" ||
7838          test ! -s conftest.err
7839        } && test -s conftest$ac_exeext && {
7840          test "$cross_compiling" = yes ||
7841          $as_test_x conftest$ac_exeext
7842        }; then
7843   ac_cv_lib_c_r_pthread_mutex_init=yes
7844 else
7845   $as_echo "$as_me: failed program was:" >&5
7846 sed 's/^/| /' conftest.$ac_ext >&5
7847
7848         ac_cv_lib_c_r_pthread_mutex_init=no
7849 fi
7850
7851 rm -rf conftest.dSYM
7852 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7853       conftest$ac_exeext conftest.$ac_ext
7854 LIBS=$ac_check_lib_save_LIBS
7855 fi
7856 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
7857 $as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
7858 if test "x$ac_cv_lib_c_r_pthread_mutex_init" = x""yes; then
7859   tcl_ok=yes
7860 else
7861   tcl_ok=no
7862 fi
7863
7864                         if test "$tcl_ok" = "yes"; then
7865                             # The space is needed
7866                             THREADS_LIBS=" -pthread"
7867                         else
7868                             TCL_THREADS=0
7869                             { $as_echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
7870 $as_echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
7871                         fi
7872                     fi
7873                 fi
7874             fi
7875         fi
7876     else
7877         TCL_THREADS=0
7878     fi
7879     # Do checking message here to not mess up interleaved configure output
7880     { $as_echo "$as_me:$LINENO: checking for building with threads" >&5
7881 $as_echo_n "checking for building with threads... " >&6; }
7882     if test "${TCL_THREADS}" = 1; then
7883
7884 cat >>confdefs.h <<\_ACEOF
7885 #define TCL_THREADS 1
7886 _ACEOF
7887
7888         { $as_echo "$as_me:$LINENO: result: yes (default)" >&5
7889 $as_echo "yes (default)" >&6; }
7890     else
7891         { $as_echo "$as_me:$LINENO: result: no" >&5
7892 $as_echo "no" >&6; }
7893     fi
7894     # TCL_THREADS sanity checking.  See if our request for building with
7895     # threads is the same as the way Tcl was built.  If not, warn the user.
7896     case ${TCL_DEFS} in
7897         *THREADS=1*)
7898             if test "${TCL_THREADS}" = "0"; then
7899                 { $as_echo "$as_me:$LINENO: WARNING:
7900     Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7901     that IS thread-enabled.  It is recommended to use --enable-threads." >&5
7902 $as_echo "$as_me: WARNING:
7903     Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7904     that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
7905             fi
7906             ;;
7907         *)
7908             if test "${TCL_THREADS}" = "1"; then
7909                 { $as_echo "$as_me:$LINENO: WARNING:
7910     --enable-threads requested, but building against a Tcl that is NOT
7911     thread-enabled.  This is an OK configuration that will also run in
7912     a thread-enabled core." >&5
7913 $as_echo "$as_me: WARNING:
7914     --enable-threads requested, but building against a Tcl that is NOT
7915     thread-enabled.  This is an OK configuration that will also run in
7916     a thread-enabled core." >&2;}
7917             fi
7918             ;;
7919     esac
7920
7921
7922
7923 #--------------------------------------------------------------------
7924 # The statement below defines a collection of symbols related to
7925 # building as a shared library instead of a static library.
7926 #--------------------------------------------------------------------
7927
7928
7929     { $as_echo "$as_me:$LINENO: checking how to build libraries" >&5
7930 $as_echo_n "checking how to build libraries... " >&6; }
7931     # Check whether --enable-shared was given.
7932 if test "${enable_shared+set}" = set; then
7933   enableval=$enable_shared; tcl_ok=$enableval
7934 else
7935   tcl_ok=yes
7936 fi
7937
7938
7939     if test "${enable_shared+set}" = set; then
7940         enableval="$enable_shared"
7941         tcl_ok=$enableval
7942     else
7943         tcl_ok=yes
7944     fi
7945
7946     if test "$tcl_ok" = "yes" ; then
7947         { $as_echo "$as_me:$LINENO: result: shared" >&5
7948 $as_echo "shared" >&6; }
7949         SHARED_BUILD=1
7950     else
7951         { $as_echo "$as_me:$LINENO: result: static" >&5
7952 $as_echo "static" >&6; }
7953         SHARED_BUILD=0
7954
7955 cat >>confdefs.h <<\_ACEOF
7956 #define STATIC_BUILD 1
7957 _ACEOF
7958
7959     fi
7960
7961
7962
7963 #--------------------------------------------------------------------
7964 # This macro figures out what flags to use with the compiler/linker
7965 # when building shared/static debug/optimized objects.  This information
7966 # can be taken from the tclConfig.sh file, but this figures it all out.
7967 #--------------------------------------------------------------------
7968
7969
7970
7971
7972     # Step 0.a: Enable 64 bit support?
7973
7974     { $as_echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
7975 $as_echo_n "checking if 64bit support is requested... " >&6; }
7976     # Check whether --enable-64bit was given.
7977 if test "${enable_64bit+set}" = set; then
7978   enableval=$enable_64bit; do64bit=$enableval
7979 else
7980   do64bit=no
7981 fi
7982
7983     { $as_echo "$as_me:$LINENO: result: $do64bit" >&5
7984 $as_echo "$do64bit" >&6; }
7985
7986     # Step 0.b: Enable Solaris 64 bit VIS support?
7987
7988     { $as_echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
7989 $as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; }
7990     # Check whether --enable-64bit-vis was given.
7991 if test "${enable_64bit_vis+set}" = set; then
7992   enableval=$enable_64bit_vis; do64bitVIS=$enableval
7993 else
7994   do64bitVIS=no
7995 fi
7996
7997     { $as_echo "$as_me:$LINENO: result: $do64bitVIS" >&5
7998 $as_echo "$do64bitVIS" >&6; }
7999     # Force 64bit on with VIS
8000     if test "$do64bitVIS" = "yes"; then
8001   do64bit=yes
8002 fi
8003
8004
8005     # Step 0.c: Check if visibility support is available. Do this here so
8006     # that platform specific alternatives can be used below if this fails.
8007
8008     { $as_echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
8009 $as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; }
8010 if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
8011   $as_echo_n "(cached) " >&6
8012 else
8013
8014         hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
8015         cat >conftest.$ac_ext <<_ACEOF
8016 /* confdefs.h.  */
8017 _ACEOF
8018 cat confdefs.h >>conftest.$ac_ext
8019 cat >>conftest.$ac_ext <<_ACEOF
8020 /* end confdefs.h.  */
8021
8022             extern __attribute__((__visibility__("hidden"))) void f(void);
8023             void f(void) {}
8024 int
8025 main ()
8026 {
8027 f();
8028   ;
8029   return 0;
8030 }
8031 _ACEOF
8032 rm -f conftest.$ac_objext conftest$ac_exeext
8033 if { (ac_try="$ac_link"
8034 case "(($ac_try" in
8035   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8036   *) ac_try_echo=$ac_try;;
8037 esac
8038 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8039 $as_echo "$ac_try_echo") >&5
8040   (eval "$ac_link") 2>conftest.er1
8041   ac_status=$?
8042   grep -v '^ *+' conftest.er1 >conftest.err
8043   rm -f conftest.er1
8044   cat conftest.err >&5
8045   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8046   (exit $ac_status); } && {
8047          test -z "$ac_c_werror_flag" ||
8048          test ! -s conftest.err
8049        } && test -s conftest$ac_exeext && {
8050          test "$cross_compiling" = yes ||
8051          $as_test_x conftest$ac_exeext
8052        }; then
8053   tcl_cv_cc_visibility_hidden=yes
8054 else
8055   $as_echo "$as_me: failed program was:" >&5
8056 sed 's/^/| /' conftest.$ac_ext >&5
8057
8058         tcl_cv_cc_visibility_hidden=no
8059 fi
8060
8061 rm -rf conftest.dSYM
8062 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8063       conftest$ac_exeext conftest.$ac_ext
8064         CFLAGS=$hold_cflags
8065 fi
8066 { $as_echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
8067 $as_echo "$tcl_cv_cc_visibility_hidden" >&6; }
8068     if test $tcl_cv_cc_visibility_hidden = yes; then
8069
8070
8071 cat >>confdefs.h <<\_ACEOF
8072 #define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
8073 _ACEOF
8074
8075
8076 fi
8077
8078
8079     # Step 0.d: Disable -rpath support?
8080
8081     { $as_echo "$as_me:$LINENO: checking if rpath support is requested" >&5
8082 $as_echo_n "checking if rpath support is requested... " >&6; }
8083     # Check whether --enable-rpath was given.
8084 if test "${enable_rpath+set}" = set; then
8085   enableval=$enable_rpath; doRpath=$enableval
8086 else
8087   doRpath=yes
8088 fi
8089
8090     { $as_echo "$as_me:$LINENO: result: $doRpath" >&5
8091 $as_echo "$doRpath" >&6; }
8092
8093     # TEA specific: Cross-compiling options for Windows/CE builds?
8094
8095     if test "${TEA_PLATFORM}" = windows; then
8096
8097         { $as_echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
8098 $as_echo_n "checking if Windows/CE build is requested... " >&6; }
8099         # Check whether --enable-wince was given.
8100 if test "${enable_wince+set}" = set; then
8101   enableval=$enable_wince; doWince=$enableval
8102 else
8103   doWince=no
8104 fi
8105
8106         { $as_echo "$as_me:$LINENO: result: $doWince" >&5
8107 $as_echo "$doWince" >&6; }
8108
8109 fi
8110
8111
8112     # Step 1: set the variable "system" to hold the name and version number
8113     # for the system.
8114
8115
8116     { $as_echo "$as_me:$LINENO: checking system version" >&5
8117 $as_echo_n "checking system version... " >&6; }
8118 if test "${tcl_cv_sys_version+set}" = set; then
8119   $as_echo_n "(cached) " >&6
8120 else
8121
8122         # TEA specific:
8123         if test "${TEA_PLATFORM}" = "windows" ; then
8124             tcl_cv_sys_version=windows
8125         elif test -f /usr/lib/NextStep/software_version; then
8126             tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
8127         else
8128             tcl_cv_sys_version=`uname -s`-`uname -r`
8129             if test "$?" -ne 0 ; then
8130                 { $as_echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
8131 $as_echo "$as_me: WARNING: can't find uname command" >&2;}
8132                 tcl_cv_sys_version=unknown
8133             else
8134                 # Special check for weird MP-RAS system (uname returns weird
8135                 # results, and the version is kept in special file).
8136
8137                 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
8138                     tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
8139                 fi
8140                 if test "`uname -s`" = "AIX" ; then
8141                     tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
8142                 fi
8143             fi
8144         fi
8145
8146 fi
8147 { $as_echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
8148 $as_echo "$tcl_cv_sys_version" >&6; }
8149     system=$tcl_cv_sys_version
8150
8151
8152     # Step 2: check for existence of -ldl library.  This is needed because
8153     # Linux can use either -ldl or -ldld for dynamic loading.
8154
8155     { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8156 $as_echo_n "checking for dlopen in -ldl... " >&6; }
8157 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8158   $as_echo_n "(cached) " >&6
8159 else
8160   ac_check_lib_save_LIBS=$LIBS
8161 LIBS="-ldl  $LIBS"
8162 cat >conftest.$ac_ext <<_ACEOF
8163 /* confdefs.h.  */
8164 _ACEOF
8165 cat confdefs.h >>conftest.$ac_ext
8166 cat >>conftest.$ac_ext <<_ACEOF
8167 /* end confdefs.h.  */
8168
8169 /* Override any GCC internal prototype to avoid an error.
8170    Use char because int might match the return type of a GCC
8171    builtin and then its argument prototype would still apply.  */
8172 #ifdef __cplusplus
8173 extern "C"
8174 #endif
8175 char dlopen ();
8176 int
8177 main ()
8178 {
8179 return dlopen ();
8180   ;
8181   return 0;
8182 }
8183 _ACEOF
8184 rm -f conftest.$ac_objext conftest$ac_exeext
8185 if { (ac_try="$ac_link"
8186 case "(($ac_try" in
8187   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8188   *) ac_try_echo=$ac_try;;
8189 esac
8190 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8191 $as_echo "$ac_try_echo") >&5
8192   (eval "$ac_link") 2>conftest.er1
8193   ac_status=$?
8194   grep -v '^ *+' conftest.er1 >conftest.err
8195   rm -f conftest.er1
8196   cat conftest.err >&5
8197   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8198   (exit $ac_status); } && {
8199          test -z "$ac_c_werror_flag" ||
8200          test ! -s conftest.err
8201        } && test -s conftest$ac_exeext && {
8202          test "$cross_compiling" = yes ||
8203          $as_test_x conftest$ac_exeext
8204        }; then
8205   ac_cv_lib_dl_dlopen=yes
8206 else
8207   $as_echo "$as_me: failed program was:" >&5
8208 sed 's/^/| /' conftest.$ac_ext >&5
8209
8210         ac_cv_lib_dl_dlopen=no
8211 fi
8212
8213 rm -rf conftest.dSYM
8214 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8215       conftest$ac_exeext conftest.$ac_ext
8216 LIBS=$ac_check_lib_save_LIBS
8217 fi
8218 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8219 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
8220 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
8221   have_dl=yes
8222 else
8223   have_dl=no
8224 fi
8225
8226
8227     # Require ranlib early so we can override it in special cases below.
8228
8229
8230
8231     # Step 3: set configuration options based on system name and version.
8232     # This is similar to Tcl's unix/tcl.m4 except that we've added a
8233     # "windows" case.
8234
8235     do64bit_ok=no
8236     LDFLAGS_ORIG="$LDFLAGS"
8237     # When ld needs options to work in 64-bit mode, put them in
8238     # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
8239     # is disabled by the user. [Bug 1016796]
8240     LDFLAGS_ARCH=""
8241     TCL_EXPORT_FILE_SUFFIX=""
8242     UNSHARED_LIB_SUFFIX=""
8243     # TEA specific: use PACKAGE_VERSION instead of VERSION
8244     TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
8245     ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
8246     TCL_LIB_VERSIONS_OK=ok
8247     CFLAGS_DEBUG=-g
8248     CFLAGS_OPTIMIZE=-O
8249     if test "$GCC" = yes; then
8250
8251         # TEA specific:
8252         CFLAGS_OPTIMIZE=-O2
8253         CFLAGS_WARNING="-Wall"
8254
8255 else
8256   CFLAGS_WARNING=""
8257 fi
8258
8259     TCL_NEEDS_EXP_FILE=0
8260     TCL_BUILD_EXP_FILE=""
8261     TCL_EXP_FILE=""
8262     # Extract the first word of "ar", so it can be a program name with args.
8263 set dummy ar; ac_word=$2
8264 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8265 $as_echo_n "checking for $ac_word... " >&6; }
8266 if test "${ac_cv_prog_AR+set}" = set; then
8267   $as_echo_n "(cached) " >&6
8268 else
8269   if test -n "$AR"; then
8270   ac_cv_prog_AR="$AR" # Let the user override the test.
8271 else
8272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8273 for as_dir in $PATH
8274 do
8275   IFS=$as_save_IFS
8276   test -z "$as_dir" && as_dir=.
8277   for ac_exec_ext in '' $ac_executable_extensions; do
8278   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8279     ac_cv_prog_AR="ar"
8280     $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8281     break 2
8282   fi
8283 done
8284 done
8285 IFS=$as_save_IFS
8286
8287 fi
8288 fi
8289 AR=$ac_cv_prog_AR
8290 if test -n "$AR"; then
8291   { $as_echo "$as_me:$LINENO: result: $AR" >&5
8292 $as_echo "$AR" >&6; }
8293 else
8294   { $as_echo "$as_me:$LINENO: result: no" >&5
8295 $as_echo "no" >&6; }
8296 fi
8297
8298
8299     STLIB_LD='${AR} cr'
8300     LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
8301     if test "x$SHLIB_VERSION" = x; then
8302   SHLIB_VERSION="1.0"
8303 fi
8304
8305     case $system in
8306         # TEA specific:
8307         windows)
8308             # This is a 2-stage check to make sure we have the 64-bit SDK
8309             # We have to know where the SDK is installed.
8310             # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
8311             # MACHINE is IX86 for LINK, but this is used by the manifest,
8312             # which requires x86|amd64|ia64.
8313             MACHINE="X86"
8314             if test "$do64bit" != "no" ; then
8315                 if test "x${MSSDK}x" = "xx" ; then
8316                     MSSDK="C:/Progra~1/Microsoft Platform SDK"
8317                 fi
8318                 MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
8319                 PATH64=""
8320                 case "$do64bit" in
8321                     amd64|x64|yes)
8322                         MACHINE="AMD64" ; # default to AMD64 64-bit build
8323                         PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
8324                         ;;
8325                     ia64)
8326                         MACHINE="IA64"
8327                         PATH64="${MSSDK}/Bin/Win64"
8328                         ;;
8329                 esac
8330                 if test ! -d "${PATH64}" ; then
8331                     { $as_echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
8332 $as_echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
8333                     { $as_echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
8334 $as_echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
8335                     do64bit="no"
8336                 else
8337                     { $as_echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
8338 $as_echo "   Using 64-bit $MACHINE mode" >&6; }
8339                     do64bit_ok="yes"
8340                 fi
8341             fi
8342
8343             if test "$doWince" != "no" ; then
8344                 if test "$do64bit" != "no" ; then
8345                     { { $as_echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
8346 $as_echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
8347    { (exit 1); exit 1; }; }
8348                 fi
8349                 if test "$GCC" = "yes" ; then
8350                     { { $as_echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
8351 $as_echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
8352    { (exit 1); exit 1; }; }
8353                 fi
8354
8355     # First, look for one uninstalled.
8356     # the alternative search directory is invoked by --with-celib
8357
8358     if test x"${no_celib}" = x ; then
8359         # we reset no_celib in case something fails here
8360         no_celib=true
8361
8362 # Check whether --with-celib was given.
8363 if test "${with_celib+set}" = set; then
8364   withval=$with_celib; with_celibconfig=${withval}
8365 fi
8366
8367         { $as_echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
8368 $as_echo_n "checking for Windows/CE celib directory... " >&6; }
8369         if test "${ac_cv_c_celibconfig+set}" = set; then
8370   $as_echo_n "(cached) " >&6
8371 else
8372
8373             # First check to see if --with-celibconfig was specified.
8374             if test x"${with_celibconfig}" != x ; then
8375                 if test -d "${with_celibconfig}/inc" ; then
8376                     ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
8377                 else
8378                     { { $as_echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
8379 $as_echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
8380    { (exit 1); exit 1; }; }
8381                 fi
8382             fi
8383
8384             # then check for a celib library
8385             if test x"${ac_cv_c_celibconfig}" = x ; then
8386                 for i in \
8387                         ../celib-palm-3.0 \
8388                         ../celib \
8389                         ../../celib-palm-3.0 \
8390                         ../../celib \
8391                         `ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
8392                         ${srcdir}/../celib-palm-3.0 \
8393                         ${srcdir}/../celib \
8394                         `ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
8395                         ; do
8396                     if test -d "$i/inc" ; then
8397                         ac_cv_c_celibconfig=`(cd $i; pwd)`
8398                         break
8399                     fi
8400                 done
8401             fi
8402
8403 fi
8404
8405         if test x"${ac_cv_c_celibconfig}" = x ; then
8406             { { $as_echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
8407 $as_echo "$as_me: error: Cannot find celib support library directory" >&2;}
8408    { (exit 1); exit 1; }; }
8409         else
8410             no_celib=
8411             CELIB_DIR=${ac_cv_c_celibconfig}
8412             CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
8413             { $as_echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
8414 $as_echo "found $CELIB_DIR" >&6; }
8415         fi
8416     fi
8417
8418                 # Set defaults for common evc4/PPC2003 setup
8419                 # Currently Tcl requires 300+, possibly 420+ for sockets
8420                 CEVERSION=420;          # could be 211 300 301 400 420 ...
8421                 TARGETCPU=ARMV4;        # could be ARMV4 ARM MIPS SH3 X86 ...
8422                 ARCH=ARM;               # could be ARM MIPS X86EM ...
8423                 PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
8424                 if test "$doWince" != "yes"; then
8425                     # If !yes then the user specified something
8426                     # Reset ARCH to allow user to skip specifying it
8427                     ARCH=
8428                     eval `echo $doWince | awk -F, '{ \
8429             if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
8430             if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
8431             if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
8432             if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
8433             if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
8434                     }'`
8435                     if test "x${ARCH}" = "x" ; then
8436                         ARCH=$TARGETCPU;
8437                     fi
8438                 fi
8439                 OSVERSION=WCE$CEVERSION;
8440                 if test "x${WCEROOT}" = "x" ; then
8441                         WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
8442                     if test ! -d "${WCEROOT}" ; then
8443                         WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
8444                     fi
8445                 fi
8446                 if test "x${SDKROOT}" = "x" ; then
8447                     SDKROOT="C:/Program Files/Windows CE Tools"
8448                     if test ! -d "${SDKROOT}" ; then
8449                         SDKROOT="C:/Windows CE Tools"
8450                     fi
8451                 fi
8452                 WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
8453                 SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
8454                 if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
8455                     -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
8456                     { { $as_echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
8457 $as_echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
8458    { (exit 1); exit 1; }; }
8459                     doWince="no"
8460                 else
8461                     # We could PATH_NOSPACE these, but that's not important,
8462                     # as long as we quote them when used.
8463                     CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
8464                     if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
8465                         CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
8466                     fi
8467                     CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
8468                 fi
8469             fi
8470
8471             if test "$GCC" != "yes" ; then
8472                 if test "${SHARED_BUILD}" = "0" ; then
8473                     runtime=-MT
8474                 else
8475                     runtime=-MD
8476                 fi
8477
8478                 if test "$do64bit" != "no" ; then
8479                     # All this magic is necessary for the Win64 SDK RC1 - hobbs
8480                     CC="\"${PATH64}/cl.exe\""
8481                     CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
8482                     RC="\"${MSSDK}/bin/rc.exe\""
8483                     lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
8484                     LINKBIN="\"${PATH64}/link.exe\""
8485                     CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
8486                     CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
8487                     # Avoid 'unresolved external symbol __security_cookie'
8488                     # errors, c.f. http://support.microsoft.com/?id=894573
8489
8490     vars="bufferoverflowU.lib"
8491     for i in $vars; do
8492         if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
8493             # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
8494             i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
8495         fi
8496         PKG_LIBS="$PKG_LIBS $i"
8497     done
8498
8499
8500                 elif test "$doWince" != "no" ; then
8501                     CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
8502                     if test "${TARGETCPU}" = "X86"; then
8503                         CC="\"${CEBINROOT}/cl.exe\""
8504                     else
8505                         CC="\"${CEBINROOT}/cl${ARCH}.exe\""
8506                     fi
8507                     CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
8508                     RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
8509                     arch=`echo ${ARCH} | awk '{print tolower($0)}'`
8510                     defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
8511                     if test "${SHARED_BUILD}" = "1" ; then
8512                         # Static CE builds require static celib as well
8513                         defs="${defs} _DLL"
8514                     fi
8515                     for i in $defs ; do
8516
8517 cat >>confdefs.h <<_ACEOF
8518 #define $i 1
8519 _ACEOF
8520
8521                     done
8522
8523 cat >>confdefs.h <<_ACEOF
8524 #define _WIN32_WCE $CEVERSION
8525 _ACEOF
8526
8527
8528 cat >>confdefs.h <<_ACEOF
8529 #define UNDER_CE $CEVERSION
8530 _ACEOF
8531
8532                     CFLAGS_DEBUG="-nologo -Zi -Od"
8533                     CFLAGS_OPTIMIZE="-nologo -Ox"
8534                     lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
8535                     lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
8536                     LINKBIN="\"${CEBINROOT}/link.exe\""
8537
8538                 else
8539                     RC="rc"
8540                     lflags="-nologo"
8541                     LINKBIN="link"
8542                     CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
8543                     CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
8544                 fi
8545             fi
8546
8547             if test "$GCC" = "yes"; then
8548                 # mingw gcc mode
8549                 RC="windres"
8550                 CFLAGS_DEBUG="-g"
8551                 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8552                 SHLIB_LD="$CC -shared"
8553                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8554                 LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
8555                 LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
8556             else
8557                 SHLIB_LD="${LINKBIN} -dll ${lflags}"
8558                 # link -lib only works when -lib is the first arg
8559                 STLIB_LD="${LINKBIN} -lib ${lflags}"
8560                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
8561                 PATHTYPE=-w
8562                 # For information on what debugtype is most useful, see:
8563                 # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
8564                 # and also
8565                 # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
8566                 # This essentially turns it all on.
8567                 LDFLAGS_DEBUG="-debug -debugtype:cv"
8568                 LDFLAGS_OPTIMIZE="-release"
8569                 if test "$doWince" != "no" ; then
8570                     LDFLAGS_CONSOLE="-link ${lflags}"
8571                     LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
8572                 else
8573                     LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
8574                     LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
8575                 fi
8576             fi
8577
8578             SHLIB_LD_LIBS='${LIBS}'
8579             SHLIB_SUFFIX=".dll"
8580             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
8581
8582             TCL_LIB_VERSIONS_OK=nodots
8583             # Bogus to avoid getting this turned off
8584             DL_OBJS="tclLoadNone.obj"
8585             ;;
8586         AIX-*)
8587             if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
8588
8589                 # AIX requires the _r compiler when gcc isn't being used
8590                 case "${CC}" in
8591                     *_r|*_r\ *)
8592                         # ok ...
8593                         ;;
8594                     *)
8595                         # Make sure only first arg gets _r
8596                         CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
8597                         ;;
8598                 esac
8599                 { $as_echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
8600 $as_echo "Using $CC for compiling with threads" >&6; }
8601
8602 fi
8603
8604             LIBS="$LIBS -lc"
8605             SHLIB_CFLAGS=""
8606             SHLIB_LD_LIBS='${LIBS}'
8607             SHLIB_SUFFIX=".so"
8608
8609             DL_OBJS="tclLoadDl.o"
8610             LD_LIBRARY_PATH_VAR="LIBPATH"
8611
8612             # Check to enable 64-bit flags for compiler/linker on AIX 4+
8613             if test "$do64bit" = yes -a "`uname -v`" -gt 3; then
8614
8615                 if test "$GCC" = yes; then
8616
8617                     { $as_echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8618 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8619
8620 else
8621
8622                     do64bit_ok=yes
8623                     CFLAGS="$CFLAGS -q64"
8624                     LDFLAGS_ARCH="-q64"
8625                     RANLIB="${RANLIB} -X64"
8626                     AR="${AR} -X64"
8627                     SHLIB_LD_FLAGS="-b64"
8628
8629 fi
8630
8631
8632 fi
8633
8634
8635             if test "`uname -m`" = ia64; then
8636
8637                 # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
8638                 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8639                 # AIX-5 has dl* in libc.so
8640                 DL_LIBS=""
8641                 if test "$GCC" = yes; then
8642
8643                     CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8644
8645 else
8646
8647                     CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
8648
8649 fi
8650
8651                 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8652
8653 else
8654
8655                 if test "$GCC" = yes; then
8656   SHLIB_LD='${CC} -shared'
8657 else
8658
8659                     SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
8660
8661 fi
8662
8663                 SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
8664                 DL_LIBS="-ldl"
8665                 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
8666                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8667                 TCL_NEEDS_EXP_FILE=1
8668                 # TEA specific: use PACKAGE_VERSION instead of VERSION
8669                 TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp'
8670
8671 fi
8672
8673
8674             # AIX v<=4.1 has some different flags than 4.2+
8675             if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then
8676
8677                 case " $LIBOBJS " in
8678   *" tclLoadAix.$ac_objext "* ) ;;
8679   *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext"
8680  ;;
8681 esac
8682
8683                 DL_LIBS="-lld"
8684
8685 fi
8686
8687
8688             # On AIX <=v4 systems, libbsd.a has to be linked in to support
8689             # non-blocking file IO.  This library has to be linked in after
8690             # the MATH_LIBS or it breaks the pow() function.  The way to
8691             # insure proper sequencing, is to add it to the tail of MATH_LIBS.
8692             # This library also supplies gettimeofday.
8693             #
8694             # AIX does not have a timezone field in struct tm. When the AIX
8695             # bsd library is used, the timezone global and the gettimeofday
8696             # methods are to be avoided for timezone deduction instead, we
8697             # deduce the timezone by comparing the localtime result on a
8698             # known GMT value.
8699
8700             { $as_echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5
8701 $as_echo_n "checking for gettimeofday in -lbsd... " >&6; }
8702 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
8703   $as_echo_n "(cached) " >&6
8704 else
8705   ac_check_lib_save_LIBS=$LIBS
8706 LIBS="-lbsd  $LIBS"
8707 cat >conftest.$ac_ext <<_ACEOF
8708 /* confdefs.h.  */
8709 _ACEOF
8710 cat confdefs.h >>conftest.$ac_ext
8711 cat >>conftest.$ac_ext <<_ACEOF
8712 /* end confdefs.h.  */
8713
8714 /* Override any GCC internal prototype to avoid an error.
8715    Use char because int might match the return type of a GCC
8716    builtin and then its argument prototype would still apply.  */
8717 #ifdef __cplusplus
8718 extern "C"
8719 #endif
8720 char gettimeofday ();
8721 int
8722 main ()
8723 {
8724 return gettimeofday ();
8725   ;
8726   return 0;
8727 }
8728 _ACEOF
8729 rm -f conftest.$ac_objext conftest$ac_exeext
8730 if { (ac_try="$ac_link"
8731 case "(($ac_try" in
8732   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8733   *) ac_try_echo=$ac_try;;
8734 esac
8735 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8736 $as_echo "$ac_try_echo") >&5
8737   (eval "$ac_link") 2>conftest.er1
8738   ac_status=$?
8739   grep -v '^ *+' conftest.er1 >conftest.err
8740   rm -f conftest.er1
8741   cat conftest.err >&5
8742   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8743   (exit $ac_status); } && {
8744          test -z "$ac_c_werror_flag" ||
8745          test ! -s conftest.err
8746        } && test -s conftest$ac_exeext && {
8747          test "$cross_compiling" = yes ||
8748          $as_test_x conftest$ac_exeext
8749        }; then
8750   ac_cv_lib_bsd_gettimeofday=yes
8751 else
8752   $as_echo "$as_me: failed program was:" >&5
8753 sed 's/^/| /' conftest.$ac_ext >&5
8754
8755         ac_cv_lib_bsd_gettimeofday=no
8756 fi
8757
8758 rm -rf conftest.dSYM
8759 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8760       conftest$ac_exeext conftest.$ac_ext
8761 LIBS=$ac_check_lib_save_LIBS
8762 fi
8763 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5
8764 $as_echo "$ac_cv_lib_bsd_gettimeofday" >&6; }
8765 if test "x$ac_cv_lib_bsd_gettimeofday" = x""yes; then
8766   libbsd=yes
8767 else
8768   libbsd=no
8769 fi
8770
8771             if test $libbsd = yes; then
8772
8773                 MATH_LIBS="$MATH_LIBS -lbsd"
8774
8775 cat >>confdefs.h <<\_ACEOF
8776 #define USE_DELTA_FOR_TZ 1
8777 _ACEOF
8778
8779
8780 fi
8781
8782             ;;
8783         BeOS*)
8784             SHLIB_CFLAGS="-fPIC"
8785             SHLIB_LD='${CC} -nostart'
8786             SHLIB_LD_LIBS='${LIBS}'
8787             SHLIB_SUFFIX=".so"
8788             DL_OBJS="tclLoadDl.o"
8789             DL_LIBS="-ldl"
8790
8791             #-----------------------------------------------------------
8792             # Check for inet_ntoa in -lbind, for BeOS (which also needs
8793             # -lsocket, even if the network functions are in -lnet which
8794             # is always linked to, for compatibility.
8795             #-----------------------------------------------------------
8796             { $as_echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
8797 $as_echo_n "checking for inet_ntoa in -lbind... " >&6; }
8798 if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
8799   $as_echo_n "(cached) " >&6
8800 else
8801   ac_check_lib_save_LIBS=$LIBS
8802 LIBS="-lbind  $LIBS"
8803 cat >conftest.$ac_ext <<_ACEOF
8804 /* confdefs.h.  */
8805 _ACEOF
8806 cat confdefs.h >>conftest.$ac_ext
8807 cat >>conftest.$ac_ext <<_ACEOF
8808 /* end confdefs.h.  */
8809
8810 /* Override any GCC internal prototype to avoid an error.
8811    Use char because int might match the return type of a GCC
8812    builtin and then its argument prototype would still apply.  */
8813 #ifdef __cplusplus
8814 extern "C"
8815 #endif
8816 char inet_ntoa ();
8817 int
8818 main ()
8819 {
8820 return inet_ntoa ();
8821   ;
8822   return 0;
8823 }
8824 _ACEOF
8825 rm -f conftest.$ac_objext conftest$ac_exeext
8826 if { (ac_try="$ac_link"
8827 case "(($ac_try" in
8828   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8829   *) ac_try_echo=$ac_try;;
8830 esac
8831 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8832 $as_echo "$ac_try_echo") >&5
8833   (eval "$ac_link") 2>conftest.er1
8834   ac_status=$?
8835   grep -v '^ *+' conftest.er1 >conftest.err
8836   rm -f conftest.er1
8837   cat conftest.err >&5
8838   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8839   (exit $ac_status); } && {
8840          test -z "$ac_c_werror_flag" ||
8841          test ! -s conftest.err
8842        } && test -s conftest$ac_exeext && {
8843          test "$cross_compiling" = yes ||
8844          $as_test_x conftest$ac_exeext
8845        }; then
8846   ac_cv_lib_bind_inet_ntoa=yes
8847 else
8848   $as_echo "$as_me: failed program was:" >&5
8849 sed 's/^/| /' conftest.$ac_ext >&5
8850
8851         ac_cv_lib_bind_inet_ntoa=no
8852 fi
8853
8854 rm -rf conftest.dSYM
8855 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8856       conftest$ac_exeext conftest.$ac_ext
8857 LIBS=$ac_check_lib_save_LIBS
8858 fi
8859 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
8860 $as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; }
8861 if test "x$ac_cv_lib_bind_inet_ntoa" = x""yes; then
8862   LIBS="$LIBS -lbind -lsocket"
8863 fi
8864
8865             ;;
8866         BSD/OS-2.1*|BSD/OS-3*)
8867             SHLIB_CFLAGS=""
8868             SHLIB_LD="shlicc -r"
8869             SHLIB_LD_LIBS='${LIBS}'
8870             SHLIB_SUFFIX=".so"
8871             DL_OBJS="tclLoadDl.o"
8872             DL_LIBS="-ldl"
8873             CC_SEARCH_FLAGS=""
8874             LD_SEARCH_FLAGS=""
8875             ;;
8876         BSD/OS-4.*)
8877             SHLIB_CFLAGS="-export-dynamic -fPIC"
8878             SHLIB_LD='${CC} -shared'
8879             SHLIB_LD_LIBS='${LIBS}'
8880             SHLIB_SUFFIX=".so"
8881             DL_OBJS="tclLoadDl.o"
8882             DL_LIBS="-ldl"
8883             LDFLAGS="$LDFLAGS -export-dynamic"
8884             CC_SEARCH_FLAGS=""
8885             LD_SEARCH_FLAGS=""
8886             ;;
8887         dgux*)
8888             SHLIB_CFLAGS="-K PIC"
8889             SHLIB_LD='${CC} -G'
8890             SHLIB_LD_LIBS=""
8891             SHLIB_SUFFIX=".so"
8892             DL_OBJS="tclLoadDl.o"
8893             DL_LIBS="-ldl"
8894             CC_SEARCH_FLAGS=""
8895             LD_SEARCH_FLAGS=""
8896             ;;
8897         HP-UX-*.11.*)
8898             # Use updated header definitions where possible
8899
8900 cat >>confdefs.h <<\_ACEOF
8901 #define _XOPEN_SOURCE_EXTENDED 1
8902 _ACEOF
8903
8904             # TEA specific: Needed by Tcl, but not most extensions
8905             #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
8906             #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
8907
8908             if test "`uname -m`" = ia64; then
8909
8910                 SHLIB_SUFFIX=".so"
8911                 # Use newer C++ library for C++ extensions
8912                 #if test "$GCC" != "yes" ; then
8913                 #   CPPFLAGS="-AA"
8914                 #fi
8915
8916 else
8917
8918                 SHLIB_SUFFIX=".sl"
8919
8920 fi
8921
8922             { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8923 $as_echo_n "checking for shl_load in -ldld... " >&6; }
8924 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8925   $as_echo_n "(cached) " >&6
8926 else
8927   ac_check_lib_save_LIBS=$LIBS
8928 LIBS="-ldld  $LIBS"
8929 cat >conftest.$ac_ext <<_ACEOF
8930 /* confdefs.h.  */
8931 _ACEOF
8932 cat confdefs.h >>conftest.$ac_ext
8933 cat >>conftest.$ac_ext <<_ACEOF
8934 /* end confdefs.h.  */
8935
8936 /* Override any GCC internal prototype to avoid an error.
8937    Use char because int might match the return type of a GCC
8938    builtin and then its argument prototype would still apply.  */
8939 #ifdef __cplusplus
8940 extern "C"
8941 #endif
8942 char shl_load ();
8943 int
8944 main ()
8945 {
8946 return shl_load ();
8947   ;
8948   return 0;
8949 }
8950 _ACEOF
8951 rm -f conftest.$ac_objext conftest$ac_exeext
8952 if { (ac_try="$ac_link"
8953 case "(($ac_try" in
8954   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8955   *) ac_try_echo=$ac_try;;
8956 esac
8957 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8958 $as_echo "$ac_try_echo") >&5
8959   (eval "$ac_link") 2>conftest.er1
8960   ac_status=$?
8961   grep -v '^ *+' conftest.er1 >conftest.err
8962   rm -f conftest.er1
8963   cat conftest.err >&5
8964   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8965   (exit $ac_status); } && {
8966          test -z "$ac_c_werror_flag" ||
8967          test ! -s conftest.err
8968        } && test -s conftest$ac_exeext && {
8969          test "$cross_compiling" = yes ||
8970          $as_test_x conftest$ac_exeext
8971        }; then
8972   ac_cv_lib_dld_shl_load=yes
8973 else
8974   $as_echo "$as_me: failed program was:" >&5
8975 sed 's/^/| /' conftest.$ac_ext >&5
8976
8977         ac_cv_lib_dld_shl_load=no
8978 fi
8979
8980 rm -rf conftest.dSYM
8981 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8982       conftest$ac_exeext conftest.$ac_ext
8983 LIBS=$ac_check_lib_save_LIBS
8984 fi
8985 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
8986 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
8987 if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
8988   tcl_ok=yes
8989 else
8990   tcl_ok=no
8991 fi
8992
8993             if test "$tcl_ok" = yes; then
8994
8995                 SHLIB_LD_LIBS='${LIBS}'
8996                 DL_OBJS="tclLoadShl.o"
8997                 DL_LIBS="-ldld"
8998                 LDFLAGS="$LDFLAGS -E"
8999                 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
9000                 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
9001                 LD_LIBRARY_PATH_VAR="SHLIB_PATH"
9002
9003 fi
9004
9005             if test "$GCC" = yes; then
9006
9007                 SHLIB_LD='${CC} -shared'
9008                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9009
9010 else
9011
9012                 CFLAGS="$CFLAGS -z"
9013                 # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
9014                 #CFLAGS="$CFLAGS +DAportable"
9015                 SHLIB_CFLAGS="+z"
9016                 SHLIB_LD="ld -b"
9017
9018 fi
9019
9020
9021             # Check to enable 64-bit flags for compiler/linker
9022             if test "$do64bit" = "yes"; then
9023
9024                 if test "$GCC" = yes; then
9025
9026                     case `${CC} -dumpmachine` in
9027                         hppa64*)
9028                             # 64-bit gcc in use.  Fix flags for GNU ld.
9029                             do64bit_ok=yes
9030                             SHLIB_LD='${CC} -shared'
9031                             SHLIB_LD_LIBS='${LIBS}'
9032                             if test $doRpath = yes; then
9033
9034                                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9035 fi
9036
9037                             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9038                             ;;
9039                         *)
9040                             { $as_echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
9041 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
9042                             ;;
9043                     esac
9044
9045 else
9046
9047                     do64bit_ok=yes
9048                     CFLAGS="$CFLAGS +DD64"
9049                     LDFLAGS_ARCH="+DD64"
9050
9051 fi
9052
9053
9054 fi
9055  ;;
9056         HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
9057             SHLIB_SUFFIX=".sl"
9058             { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9059 $as_echo_n "checking for shl_load in -ldld... " >&6; }
9060 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9061   $as_echo_n "(cached) " >&6
9062 else
9063   ac_check_lib_save_LIBS=$LIBS
9064 LIBS="-ldld  $LIBS"
9065 cat >conftest.$ac_ext <<_ACEOF
9066 /* confdefs.h.  */
9067 _ACEOF
9068 cat confdefs.h >>conftest.$ac_ext
9069 cat >>conftest.$ac_ext <<_ACEOF
9070 /* end confdefs.h.  */
9071
9072 /* Override any GCC internal prototype to avoid an error.
9073    Use char because int might match the return type of a GCC
9074    builtin and then its argument prototype would still apply.  */
9075 #ifdef __cplusplus
9076 extern "C"
9077 #endif
9078 char shl_load ();
9079 int
9080 main ()
9081 {
9082 return shl_load ();
9083   ;
9084   return 0;
9085 }
9086 _ACEOF
9087 rm -f conftest.$ac_objext conftest$ac_exeext
9088 if { (ac_try="$ac_link"
9089 case "(($ac_try" in
9090   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9091   *) ac_try_echo=$ac_try;;
9092 esac
9093 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9094 $as_echo "$ac_try_echo") >&5
9095   (eval "$ac_link") 2>conftest.er1
9096   ac_status=$?
9097   grep -v '^ *+' conftest.er1 >conftest.err
9098   rm -f conftest.er1
9099   cat conftest.err >&5
9100   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9101   (exit $ac_status); } && {
9102          test -z "$ac_c_werror_flag" ||
9103          test ! -s conftest.err
9104        } && test -s conftest$ac_exeext && {
9105          test "$cross_compiling" = yes ||
9106          $as_test_x conftest$ac_exeext
9107        }; then
9108   ac_cv_lib_dld_shl_load=yes
9109 else
9110   $as_echo "$as_me: failed program was:" >&5
9111 sed 's/^/| /' conftest.$ac_ext >&5
9112
9113         ac_cv_lib_dld_shl_load=no
9114 fi
9115
9116 rm -rf conftest.dSYM
9117 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9118       conftest$ac_exeext conftest.$ac_ext
9119 LIBS=$ac_check_lib_save_LIBS
9120 fi
9121 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9122 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
9123 if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
9124   tcl_ok=yes
9125 else
9126   tcl_ok=no
9127 fi
9128
9129             if test "$tcl_ok" = yes; then
9130
9131                 SHLIB_CFLAGS="+z"
9132                 SHLIB_LD="ld -b"
9133                 SHLIB_LD_LIBS=""
9134                 DL_OBJS="tclLoadShl.o"
9135                 DL_LIBS="-ldld"
9136                 LDFLAGS="$LDFLAGS -Wl,-E"
9137                 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
9138                 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
9139                 LD_LIBRARY_PATH_VAR="SHLIB_PATH"
9140
9141 fi
9142  ;;
9143         IRIX-5.*)
9144             SHLIB_CFLAGS=""
9145             SHLIB_LD="ld -shared -rdata_shared"
9146             SHLIB_LD_LIBS='${LIBS}'
9147             SHLIB_SUFFIX=".so"
9148             DL_OBJS="tclLoadDl.o"
9149             DL_LIBS=""
9150             if test $doRpath = yes; then
9151
9152                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9153                 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9154 fi
9155
9156             ;;
9157         IRIX-6.*)
9158             SHLIB_CFLAGS=""
9159             SHLIB_LD="ld -n32 -shared -rdata_shared"
9160             SHLIB_LD_LIBS='${LIBS}'
9161             SHLIB_SUFFIX=".so"
9162             DL_OBJS="tclLoadDl.o"
9163             DL_LIBS=""
9164             if test $doRpath = yes; then
9165
9166                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9167                 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9168 fi
9169
9170             if test "$GCC" = yes; then
9171
9172                 CFLAGS="$CFLAGS -mabi=n32"
9173                 LDFLAGS="$LDFLAGS -mabi=n32"
9174
9175 else
9176
9177                 case $system in
9178                     IRIX-6.3)
9179                         # Use to build 6.2 compatible binaries on 6.3.
9180                         CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
9181                         ;;
9182                     *)
9183                         CFLAGS="$CFLAGS -n32"
9184                         ;;
9185                 esac
9186                 LDFLAGS="$LDFLAGS -n32"
9187
9188 fi
9189
9190             ;;
9191         IRIX64-6.*)
9192             SHLIB_CFLAGS=""
9193             SHLIB_LD="ld -n32 -shared -rdata_shared"
9194             SHLIB_LD_LIBS='${LIBS}'
9195             SHLIB_SUFFIX=".so"
9196             DL_OBJS="tclLoadDl.o"
9197             DL_LIBS=""
9198             if test $doRpath = yes; then
9199
9200                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9201                 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9202 fi
9203
9204
9205             # Check to enable 64-bit flags for compiler/linker
9206
9207             if test "$do64bit" = yes; then
9208
9209                 if test "$GCC" = yes; then
9210
9211                     { $as_echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
9212 $as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
9213
9214 else
9215
9216                     do64bit_ok=yes
9217                     SHLIB_LD="ld -64 -shared -rdata_shared"
9218                     CFLAGS="$CFLAGS -64"
9219                     LDFLAGS_ARCH="-64"
9220
9221 fi
9222
9223
9224 fi
9225
9226             ;;
9227         Linux*)
9228             SHLIB_CFLAGS="-fPIC"
9229             SHLIB_LD_LIBS='${LIBS}'
9230             SHLIB_SUFFIX=".so"
9231
9232             # TEA specific:
9233             CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
9234             # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
9235             # when you inline the string and math operations.  Turn this off to
9236             # get rid of the warnings.
9237             #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
9238
9239             # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9240             SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
9241             DL_OBJS="tclLoadDl.o"
9242             DL_LIBS="-ldl"
9243             LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
9244             if test $doRpath = yes; then
9245
9246                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9247 fi
9248
9249             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9250             if test "`uname -m`" = "alpha"; then
9251   CFLAGS="$CFLAGS -mieee"
9252 fi
9253
9254             if test $do64bit = yes; then
9255
9256                 { $as_echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
9257 $as_echo_n "checking if compiler accepts -m64 flag... " >&6; }
9258 if test "${tcl_cv_cc_m64+set}" = set; then
9259   $as_echo_n "(cached) " >&6
9260 else
9261
9262                     hold_cflags=$CFLAGS
9263                     CFLAGS="$CFLAGS -m64"
9264                     cat >conftest.$ac_ext <<_ACEOF
9265 /* confdefs.h.  */
9266 _ACEOF
9267 cat confdefs.h >>conftest.$ac_ext
9268 cat >>conftest.$ac_ext <<_ACEOF
9269 /* end confdefs.h.  */
9270
9271 int
9272 main ()
9273 {
9274
9275   ;
9276   return 0;
9277 }
9278 _ACEOF
9279 rm -f conftest.$ac_objext conftest$ac_exeext
9280 if { (ac_try="$ac_link"
9281 case "(($ac_try" in
9282   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9283   *) ac_try_echo=$ac_try;;
9284 esac
9285 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9286 $as_echo "$ac_try_echo") >&5
9287   (eval "$ac_link") 2>conftest.er1
9288   ac_status=$?
9289   grep -v '^ *+' conftest.er1 >conftest.err
9290   rm -f conftest.er1
9291   cat conftest.err >&5
9292   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9293   (exit $ac_status); } && {
9294          test -z "$ac_c_werror_flag" ||
9295          test ! -s conftest.err
9296        } && test -s conftest$ac_exeext && {
9297          test "$cross_compiling" = yes ||
9298          $as_test_x conftest$ac_exeext
9299        }; then
9300   tcl_cv_cc_m64=yes
9301 else
9302   $as_echo "$as_me: failed program was:" >&5
9303 sed 's/^/| /' conftest.$ac_ext >&5
9304
9305         tcl_cv_cc_m64=no
9306 fi
9307
9308 rm -rf conftest.dSYM
9309 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9310       conftest$ac_exeext conftest.$ac_ext
9311                     CFLAGS=$hold_cflags
9312 fi
9313 { $as_echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
9314 $as_echo "$tcl_cv_cc_m64" >&6; }
9315                 if test $tcl_cv_cc_m64 = yes; then
9316
9317                     CFLAGS="$CFLAGS -m64"
9318                     do64bit_ok=yes
9319
9320 fi
9321
9322
9323 fi
9324
9325
9326             # The combo of gcc + glibc has a bug related to inlining of
9327             # functions like strtod(). The -fno-builtin flag should address
9328             # this problem but it does not work. The -fno-inline flag is kind
9329             # of overkill but it works. Disable inlining only when one of the
9330             # files in compat/*.c is being linked in.
9331
9332             if test x"${USE_COMPAT}" != x; then
9333   CFLAGS="$CFLAGS -fno-inline"
9334 fi
9335
9336
9337             ;;
9338         GNU*)
9339             SHLIB_CFLAGS="-fPIC"
9340             SHLIB_LD_LIBS='${LIBS}'
9341             SHLIB_SUFFIX=".so"
9342
9343             SHLIB_LD='${CC} -shared'
9344             DL_OBJS=""
9345             DL_LIBS="-ldl"
9346             LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
9347             CC_SEARCH_FLAGS=""
9348             LD_SEARCH_FLAGS=""
9349             if test "`uname -m`" = "alpha"; then
9350   CFLAGS="$CFLAGS -mieee"
9351 fi
9352
9353             ;;
9354         Lynx*)
9355             SHLIB_CFLAGS="-fPIC"
9356             SHLIB_LD_LIBS='${LIBS}'
9357             SHLIB_SUFFIX=".so"
9358             CFLAGS_OPTIMIZE=-02
9359             SHLIB_LD='${CC} -shared'
9360             DL_OBJS="tclLoadDl.o"
9361             DL_LIBS="-mshared -ldl"
9362             LD_FLAGS="-Wl,--export-dynamic"
9363             if test $doRpath = yes; then
9364
9365                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9366                 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9367 fi
9368
9369             ;;
9370         MP-RAS-02*)
9371             SHLIB_CFLAGS="-K PIC"
9372             SHLIB_LD='${CC} -G'
9373             SHLIB_LD_LIBS=""
9374             SHLIB_SUFFIX=".so"
9375             DL_OBJS="tclLoadDl.o"
9376             DL_LIBS="-ldl"
9377             CC_SEARCH_FLAGS=""
9378             LD_SEARCH_FLAGS=""
9379             ;;
9380         MP-RAS-*)
9381             SHLIB_CFLAGS="-K PIC"
9382             SHLIB_LD='${CC} -G'
9383             SHLIB_LD_LIBS=""
9384             SHLIB_SUFFIX=".so"
9385             DL_OBJS="tclLoadDl.o"
9386             DL_LIBS="-ldl"
9387             LDFLAGS="$LDFLAGS -Wl,-Bexport"
9388             CC_SEARCH_FLAGS=""
9389             LD_SEARCH_FLAGS=""
9390             ;;
9391         NetBSD-1.*|FreeBSD-[1-2].*)
9392             SHLIB_CFLAGS="-fPIC"
9393             SHLIB_LD="ld -Bshareable -x"
9394             SHLIB_LD_LIBS='${LIBS}'
9395             SHLIB_SUFFIX=".so"
9396             DL_OBJS="tclLoadDl.o"
9397             DL_LIBS=""
9398             if test $doRpath = yes; then
9399
9400                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9401                 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9402 fi
9403
9404             { $as_echo "$as_me:$LINENO: checking for ELF" >&5
9405 $as_echo_n "checking for ELF... " >&6; }
9406 if test "${tcl_cv_ld_elf+set}" = set; then
9407   $as_echo_n "(cached) " >&6
9408 else
9409
9410                 cat >conftest.$ac_ext <<_ACEOF
9411 /* confdefs.h.  */
9412 _ACEOF
9413 cat confdefs.h >>conftest.$ac_ext
9414 cat >>conftest.$ac_ext <<_ACEOF
9415 /* end confdefs.h.  */
9416
9417 #ifdef __ELF__
9418         yes
9419 #endif
9420
9421 _ACEOF
9422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9423   $EGREP "yes" >/dev/null 2>&1; then
9424   tcl_cv_ld_elf=yes
9425 else
9426   tcl_cv_ld_elf=no
9427 fi
9428 rm -f conftest*
9429
9430 fi
9431 { $as_echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
9432 $as_echo "$tcl_cv_ld_elf" >&6; }
9433             if test $tcl_cv_ld_elf = yes; then
9434
9435                 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
9436
9437 else
9438
9439                 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
9440
9441 fi
9442
9443
9444             # Ancient FreeBSD doesn't handle version numbers with dots.
9445
9446             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9447             TCL_LIB_VERSIONS_OK=nodots
9448             ;;
9449         OpenBSD-*)
9450             SHLIB_CFLAGS="-fPIC"
9451             SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
9452             SHLIB_LD_LIBS='${LIBS}'
9453             SHLIB_SUFFIX=".so"
9454             DL_OBJS="tclLoadDl.o"
9455             DL_LIBS=""
9456             if test $doRpath = yes; then
9457
9458                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9459 fi
9460
9461             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9462             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
9463             { $as_echo "$as_me:$LINENO: checking for ELF" >&5
9464 $as_echo_n "checking for ELF... " >&6; }
9465 if test "${tcl_cv_ld_elf+set}" = set; then
9466   $as_echo_n "(cached) " >&6
9467 else
9468
9469                 cat >conftest.$ac_ext <<_ACEOF
9470 /* confdefs.h.  */
9471 _ACEOF
9472 cat confdefs.h >>conftest.$ac_ext
9473 cat >>conftest.$ac_ext <<_ACEOF
9474 /* end confdefs.h.  */
9475
9476 #ifdef __ELF__
9477         yes
9478 #endif
9479
9480 _ACEOF
9481 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9482   $EGREP "yes" >/dev/null 2>&1; then
9483   tcl_cv_ld_elf=yes
9484 else
9485   tcl_cv_ld_elf=no
9486 fi
9487 rm -f conftest*
9488
9489 fi
9490 { $as_echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
9491 $as_echo "$tcl_cv_ld_elf" >&6; }
9492             if test $tcl_cv_ld_elf = yes; then
9493
9494                 LDFLAGS=-Wl,-export-dynamic
9495
9496 else
9497   LDFLAGS=""
9498 fi
9499
9500
9501             # OpenBSD doesn't do version numbers with dots.
9502             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9503             TCL_LIB_VERSIONS_OK=nodots
9504             ;;
9505         NetBSD-*|FreeBSD-*)
9506             # FreeBSD 3.* and greater have ELF.
9507             # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
9508             SHLIB_CFLAGS="-fPIC"
9509             SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
9510             SHLIB_LD_LIBS='${LIBS}'
9511             SHLIB_SUFFIX=".so"
9512             DL_OBJS="tclLoadDl.o"
9513             DL_LIBS=""
9514             LDFLAGS="$LDFLAGS -export-dynamic"
9515             if test $doRpath = yes; then
9516
9517                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9518 fi
9519
9520             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9521             if test "${TCL_THREADS}" = "1"; then
9522
9523                 # The -pthread needs to go in the CFLAGS, not LIBS
9524                 LIBS=`echo $LIBS | sed s/-pthread//`
9525                 CFLAGS="$CFLAGS -pthread"
9526                 LDFLAGS="$LDFLAGS -pthread"
9527
9528 fi
9529
9530             case $system in
9531             FreeBSD-3.*)
9532                 # FreeBSD-3 doesn't handle version numbers with dots.
9533                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
9534                 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
9535                 TCL_LIB_VERSIONS_OK=nodots
9536                 ;;
9537             esac
9538             ;;
9539         Darwin-*)
9540             CFLAGS_OPTIMIZE="-Os"
9541             SHLIB_CFLAGS="-fno-common"
9542             # To avoid discrepancies between what headers configure sees during
9543             # preprocessing tests and compiling tests, move any -isysroot and
9544             # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
9545             CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
9546                 awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
9547                 if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
9548             CFLAGS="`echo " ${CFLAGS}" | \
9549                 awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
9550                 if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
9551             if test $do64bit = yes; then
9552
9553                 case `arch` in
9554                     ppc)
9555                         { $as_echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
9556 $as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; }
9557 if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
9558   $as_echo_n "(cached) " >&6
9559 else
9560
9561                             hold_cflags=$CFLAGS
9562                             CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
9563                             cat >conftest.$ac_ext <<_ACEOF
9564 /* confdefs.h.  */
9565 _ACEOF
9566 cat confdefs.h >>conftest.$ac_ext
9567 cat >>conftest.$ac_ext <<_ACEOF
9568 /* end confdefs.h.  */
9569
9570 int
9571 main ()
9572 {
9573
9574   ;
9575   return 0;
9576 }
9577 _ACEOF
9578 rm -f conftest.$ac_objext conftest$ac_exeext
9579 if { (ac_try="$ac_link"
9580 case "(($ac_try" in
9581   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9582   *) ac_try_echo=$ac_try;;
9583 esac
9584 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9585 $as_echo "$ac_try_echo") >&5
9586   (eval "$ac_link") 2>conftest.er1
9587   ac_status=$?
9588   grep -v '^ *+' conftest.er1 >conftest.err
9589   rm -f conftest.er1
9590   cat conftest.err >&5
9591   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9592   (exit $ac_status); } && {
9593          test -z "$ac_c_werror_flag" ||
9594          test ! -s conftest.err
9595        } && test -s conftest$ac_exeext && {
9596          test "$cross_compiling" = yes ||
9597          $as_test_x conftest$ac_exeext
9598        }; then
9599   tcl_cv_cc_arch_ppc64=yes
9600 else
9601   $as_echo "$as_me: failed program was:" >&5
9602 sed 's/^/| /' conftest.$ac_ext >&5
9603
9604         tcl_cv_cc_arch_ppc64=no
9605 fi
9606
9607 rm -rf conftest.dSYM
9608 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9609       conftest$ac_exeext conftest.$ac_ext
9610                             CFLAGS=$hold_cflags
9611 fi
9612 { $as_echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
9613 $as_echo "$tcl_cv_cc_arch_ppc64" >&6; }
9614                         if test $tcl_cv_cc_arch_ppc64 = yes; then
9615
9616                             CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
9617                             do64bit_ok=yes
9618
9619 fi
9620 ;;
9621                     i386)
9622                         { $as_echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
9623 $as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; }
9624 if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
9625   $as_echo_n "(cached) " >&6
9626 else
9627
9628                             hold_cflags=$CFLAGS
9629                             CFLAGS="$CFLAGS -arch x86_64"
9630                             cat >conftest.$ac_ext <<_ACEOF
9631 /* confdefs.h.  */
9632 _ACEOF
9633 cat confdefs.h >>conftest.$ac_ext
9634 cat >>conftest.$ac_ext <<_ACEOF
9635 /* end confdefs.h.  */
9636
9637 int
9638 main ()
9639 {
9640
9641   ;
9642   return 0;
9643 }
9644 _ACEOF
9645 rm -f conftest.$ac_objext conftest$ac_exeext
9646 if { (ac_try="$ac_link"
9647 case "(($ac_try" in
9648   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9649   *) ac_try_echo=$ac_try;;
9650 esac
9651 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9652 $as_echo "$ac_try_echo") >&5
9653   (eval "$ac_link") 2>conftest.er1
9654   ac_status=$?
9655   grep -v '^ *+' conftest.er1 >conftest.err
9656   rm -f conftest.er1
9657   cat conftest.err >&5
9658   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9659   (exit $ac_status); } && {
9660          test -z "$ac_c_werror_flag" ||
9661          test ! -s conftest.err
9662        } && test -s conftest$ac_exeext && {
9663          test "$cross_compiling" = yes ||
9664          $as_test_x conftest$ac_exeext
9665        }; then
9666   tcl_cv_cc_arch_x86_64=yes
9667 else
9668   $as_echo "$as_me: failed program was:" >&5
9669 sed 's/^/| /' conftest.$ac_ext >&5
9670
9671         tcl_cv_cc_arch_x86_64=no
9672 fi
9673
9674 rm -rf conftest.dSYM
9675 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9676       conftest$ac_exeext conftest.$ac_ext
9677                             CFLAGS=$hold_cflags
9678 fi
9679 { $as_echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
9680 $as_echo "$tcl_cv_cc_arch_x86_64" >&6; }
9681                         if test $tcl_cv_cc_arch_x86_64 = yes; then
9682
9683                             CFLAGS="$CFLAGS -arch x86_64"
9684                             do64bit_ok=yes
9685
9686 fi
9687 ;;
9688                     *)
9689                         { $as_echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
9690 $as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
9691                 esac
9692
9693 else
9694
9695                 # Check for combined 32-bit and 64-bit fat build
9696                 if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
9697                     && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
9698
9699                     fat_32_64=yes
9700 fi
9701
9702
9703 fi
9704
9705             # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9706             SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
9707             { $as_echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
9708 $as_echo_n "checking if ld accepts -single_module flag... " >&6; }
9709 if test "${tcl_cv_ld_single_module+set}" = set; then
9710   $as_echo_n "(cached) " >&6
9711 else
9712
9713                 hold_ldflags=$LDFLAGS
9714                 LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
9715                 cat >conftest.$ac_ext <<_ACEOF
9716 /* confdefs.h.  */
9717 _ACEOF
9718 cat confdefs.h >>conftest.$ac_ext
9719 cat >>conftest.$ac_ext <<_ACEOF
9720 /* end confdefs.h.  */
9721
9722 int
9723 main ()
9724 {
9725 int i;
9726   ;
9727   return 0;
9728 }
9729 _ACEOF
9730 rm -f conftest.$ac_objext conftest$ac_exeext
9731 if { (ac_try="$ac_link"
9732 case "(($ac_try" in
9733   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9734   *) ac_try_echo=$ac_try;;
9735 esac
9736 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9737 $as_echo "$ac_try_echo") >&5
9738   (eval "$ac_link") 2>conftest.er1
9739   ac_status=$?
9740   grep -v '^ *+' conftest.er1 >conftest.err
9741   rm -f conftest.er1
9742   cat conftest.err >&5
9743   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9744   (exit $ac_status); } && {
9745          test -z "$ac_c_werror_flag" ||
9746          test ! -s conftest.err
9747        } && test -s conftest$ac_exeext && {
9748          test "$cross_compiling" = yes ||
9749          $as_test_x conftest$ac_exeext
9750        }; then
9751   tcl_cv_ld_single_module=yes
9752 else
9753   $as_echo "$as_me: failed program was:" >&5
9754 sed 's/^/| /' conftest.$ac_ext >&5
9755
9756         tcl_cv_ld_single_module=no
9757 fi
9758
9759 rm -rf conftest.dSYM
9760 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9761       conftest$ac_exeext conftest.$ac_ext
9762                 LDFLAGS=$hold_ldflags
9763 fi
9764 { $as_echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
9765 $as_echo "$tcl_cv_ld_single_module" >&6; }
9766             if test $tcl_cv_ld_single_module = yes; then
9767
9768                 SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
9769
9770 fi
9771
9772             # TEA specific: link shlib with current and compatiblity version flags
9773             vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
9774             SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
9775             SHLIB_LD_LIBS='${LIBS}'
9776             SHLIB_SUFFIX=".dylib"
9777             DL_OBJS="tclLoadDyld.o"
9778             DL_LIBS=""
9779             # Don't use -prebind when building for Mac OS X 10.4 or later only:
9780             if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
9781                 "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
9782
9783                 LDFLAGS="$LDFLAGS -prebind"
9784 fi
9785
9786             LDFLAGS="$LDFLAGS -headerpad_max_install_names"
9787             { $as_echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
9788 $as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; }
9789 if test "${tcl_cv_ld_search_paths_first+set}" = set; then
9790   $as_echo_n "(cached) " >&6
9791 else
9792
9793                 hold_ldflags=$LDFLAGS
9794                 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9795                 cat >conftest.$ac_ext <<_ACEOF
9796 /* confdefs.h.  */
9797 _ACEOF
9798 cat confdefs.h >>conftest.$ac_ext
9799 cat >>conftest.$ac_ext <<_ACEOF
9800 /* end confdefs.h.  */
9801
9802 int
9803 main ()
9804 {
9805 int i;
9806   ;
9807   return 0;
9808 }
9809 _ACEOF
9810 rm -f conftest.$ac_objext conftest$ac_exeext
9811 if { (ac_try="$ac_link"
9812 case "(($ac_try" in
9813   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9814   *) ac_try_echo=$ac_try;;
9815 esac
9816 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9817 $as_echo "$ac_try_echo") >&5
9818   (eval "$ac_link") 2>conftest.er1
9819   ac_status=$?
9820   grep -v '^ *+' conftest.er1 >conftest.err
9821   rm -f conftest.er1
9822   cat conftest.err >&5
9823   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9824   (exit $ac_status); } && {
9825          test -z "$ac_c_werror_flag" ||
9826          test ! -s conftest.err
9827        } && test -s conftest$ac_exeext && {
9828          test "$cross_compiling" = yes ||
9829          $as_test_x conftest$ac_exeext
9830        }; then
9831   tcl_cv_ld_search_paths_first=yes
9832 else
9833   $as_echo "$as_me: failed program was:" >&5
9834 sed 's/^/| /' conftest.$ac_ext >&5
9835
9836         tcl_cv_ld_search_paths_first=no
9837 fi
9838
9839 rm -rf conftest.dSYM
9840 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9841       conftest$ac_exeext conftest.$ac_ext
9842                 LDFLAGS=$hold_ldflags
9843 fi
9844 { $as_echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
9845 $as_echo "$tcl_cv_ld_search_paths_first" >&6; }
9846             if test $tcl_cv_ld_search_paths_first = yes; then
9847
9848                 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9849
9850 fi
9851
9852             if test "$tcl_cv_cc_visibility_hidden" != yes; then
9853
9854
9855 cat >>confdefs.h <<\_ACEOF
9856 #define MODULE_SCOPE __private_extern__
9857 _ACEOF
9858
9859
9860 fi
9861
9862             CC_SEARCH_FLAGS=""
9863             LD_SEARCH_FLAGS=""
9864             LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
9865             # TEA specific: for combined 32 & 64 bit fat builds of Tk
9866             # extensions, verify that 64-bit build is possible.
9867             if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then
9868
9869                 if test "${TEA_WINDOWINGSYSTEM}" = x11; then
9870
9871                     { $as_echo "$as_me:$LINENO: checking for 64-bit X11" >&5
9872 $as_echo_n "checking for 64-bit X11... " >&6; }
9873 if test "${tcl_cv_lib_x11_64+set}" = set; then
9874   $as_echo_n "(cached) " >&6
9875 else
9876
9877                         for v in CFLAGS CPPFLAGS LDFLAGS; do
9878                             eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
9879                         done
9880                         CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
9881                         LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
9882                         cat >conftest.$ac_ext <<_ACEOF
9883 /* confdefs.h.  */
9884 _ACEOF
9885 cat confdefs.h >>conftest.$ac_ext
9886 cat >>conftest.$ac_ext <<_ACEOF
9887 /* end confdefs.h.  */
9888 #include <X11/Xlib.h>
9889 int
9890 main ()
9891 {
9892 XrmInitialize();
9893   ;
9894   return 0;
9895 }
9896 _ACEOF
9897 rm -f conftest.$ac_objext conftest$ac_exeext
9898 if { (ac_try="$ac_link"
9899 case "(($ac_try" in
9900   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9901   *) ac_try_echo=$ac_try;;
9902 esac
9903 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9904 $as_echo "$ac_try_echo") >&5
9905   (eval "$ac_link") 2>conftest.er1
9906   ac_status=$?
9907   grep -v '^ *+' conftest.er1 >conftest.err
9908   rm -f conftest.er1
9909   cat conftest.err >&5
9910   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9911   (exit $ac_status); } && {
9912          test -z "$ac_c_werror_flag" ||
9913          test ! -s conftest.err
9914        } && test -s conftest$ac_exeext && {
9915          test "$cross_compiling" = yes ||
9916          $as_test_x conftest$ac_exeext
9917        }; then
9918   tcl_cv_lib_x11_64=yes
9919 else
9920   $as_echo "$as_me: failed program was:" >&5
9921 sed 's/^/| /' conftest.$ac_ext >&5
9922
9923         tcl_cv_lib_x11_64=no
9924 fi
9925
9926 rm -rf conftest.dSYM
9927 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9928       conftest$ac_exeext conftest.$ac_ext
9929                         for v in CFLAGS CPPFLAGS LDFLAGS; do
9930                             eval $v'="$hold_'$v'"'
9931                         done
9932 fi
9933 { $as_echo "$as_me:$LINENO: result: $tcl_cv_lib_x11_64" >&5
9934 $as_echo "$tcl_cv_lib_x11_64" >&6; }
9935
9936 fi
9937
9938                 if test "${TEA_WINDOWINGSYSTEM}" = aqua; then
9939
9940                     { $as_echo "$as_me:$LINENO: checking for 64-bit Tk" >&5
9941 $as_echo_n "checking for 64-bit Tk... " >&6; }
9942 if test "${tcl_cv_lib_tk_64+set}" = set; then
9943   $as_echo_n "(cached) " >&6
9944 else
9945
9946                         for v in CFLAGS CPPFLAGS LDFLAGS; do
9947                             eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
9948                         done
9949                         CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
9950                         LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
9951                         cat >conftest.$ac_ext <<_ACEOF
9952 /* confdefs.h.  */
9953 _ACEOF
9954 cat confdefs.h >>conftest.$ac_ext
9955 cat >>conftest.$ac_ext <<_ACEOF
9956 /* end confdefs.h.  */
9957 #include <tk.h>
9958 int
9959 main ()
9960 {
9961 Tk_InitStubs(NULL, "", 0);
9962   ;
9963   return 0;
9964 }
9965 _ACEOF
9966 rm -f conftest.$ac_objext conftest$ac_exeext
9967 if { (ac_try="$ac_link"
9968 case "(($ac_try" in
9969   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9970   *) ac_try_echo=$ac_try;;
9971 esac
9972 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9973 $as_echo "$ac_try_echo") >&5
9974   (eval "$ac_link") 2>conftest.er1
9975   ac_status=$?
9976   grep -v '^ *+' conftest.er1 >conftest.err
9977   rm -f conftest.er1
9978   cat conftest.err >&5
9979   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9980   (exit $ac_status); } && {
9981          test -z "$ac_c_werror_flag" ||
9982          test ! -s conftest.err
9983        } && test -s conftest$ac_exeext && {
9984          test "$cross_compiling" = yes ||
9985          $as_test_x conftest$ac_exeext
9986        }; then
9987   tcl_cv_lib_tk_64=yes
9988 else
9989   $as_echo "$as_me: failed program was:" >&5
9990 sed 's/^/| /' conftest.$ac_ext >&5
9991
9992         tcl_cv_lib_tk_64=no
9993 fi
9994
9995 rm -rf conftest.dSYM
9996 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9997       conftest$ac_exeext conftest.$ac_ext
9998                         for v in CFLAGS CPPFLAGS LDFLAGS; do
9999                             eval $v'="$hold_'$v'"'
10000                         done
10001 fi
10002 { $as_echo "$as_me:$LINENO: result: $tcl_cv_lib_tk_64" >&5
10003 $as_echo "$tcl_cv_lib_tk_64" >&6; }
10004
10005 fi
10006
10007                 # remove 64-bit arch flags from CFLAGS et al. if configuration
10008                 # does not support 64-bit.
10009                 if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then
10010
10011                     { $as_echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
10012 $as_echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
10013                     for v in CFLAGS CPPFLAGS LDFLAGS; do
10014                         eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
10015                     done
10016 fi
10017
10018
10019 fi
10020
10021             ;;
10022         NEXTSTEP-*)
10023             SHLIB_CFLAGS=""
10024             SHLIB_LD='${CC} -nostdlib -r'
10025             SHLIB_LD_LIBS=""
10026             SHLIB_SUFFIX=".so"
10027             DL_OBJS="tclLoadNext.o"
10028             DL_LIBS=""
10029             CC_SEARCH_FLAGS=""
10030             LD_SEARCH_FLAGS=""
10031             ;;
10032         OS/390-*)
10033             CFLAGS_OPTIMIZE=""          # Optimizer is buggy
10034
10035 cat >>confdefs.h <<\_ACEOF
10036 #define _OE_SOCKETS 1
10037 _ACEOF
10038
10039             ;;
10040         OSF1-1.0|OSF1-1.1|OSF1-1.2)
10041             # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
10042             SHLIB_CFLAGS=""
10043             # Hack: make package name same as library name
10044             SHLIB_LD='ld -R -export :'
10045             SHLIB_LD_LIBS=""
10046             SHLIB_SUFFIX=".so"
10047             DL_OBJS="tclLoadOSF.o"
10048             DL_LIBS=""
10049             CC_SEARCH_FLAGS=""
10050             LD_SEARCH_FLAGS=""
10051             ;;
10052         OSF1-1.*)
10053             # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
10054             SHLIB_CFLAGS="-fPIC"
10055             if test "$SHARED_BUILD" = 1; then
10056   SHLIB_LD="ld -shared"
10057 else
10058
10059                 SHLIB_LD="ld -non_shared"
10060
10061 fi
10062
10063             SHLIB_LD_LIBS=""
10064             SHLIB_SUFFIX=".so"
10065             DL_OBJS="tclLoadDl.o"
10066             DL_LIBS=""
10067             CC_SEARCH_FLAGS=""
10068             LD_SEARCH_FLAGS=""
10069             ;;
10070         OSF1-V*)
10071             # Digital OSF/1
10072             SHLIB_CFLAGS=""
10073             if test "$SHARED_BUILD" = 1; then
10074
10075                 SHLIB_LD='ld -shared -expect_unresolved "*"'
10076
10077 else
10078
10079                 SHLIB_LD='ld -non_shared -expect_unresolved "*"'
10080
10081 fi
10082
10083             SHLIB_LD_LIBS=""
10084             SHLIB_SUFFIX=".so"
10085             DL_OBJS="tclLoadDl.o"
10086             DL_LIBS=""
10087             if test $doRpath = yes; then
10088
10089                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
10090                 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
10091 fi
10092
10093             if test "$GCC" = yes; then
10094   CFLAGS="$CFLAGS -mieee"
10095 else
10096
10097                 CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
10098 fi
10099
10100             # see pthread_intro(3) for pthread support on osf1, k.furukawa
10101             if test "${TCL_THREADS}" = 1; then
10102
10103                 CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
10104                 CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
10105                 LIBS=`echo $LIBS | sed s/-lpthreads//`
10106                 if test "$GCC" = yes; then
10107
10108                     LIBS="$LIBS -lpthread -lmach -lexc"
10109
10110 else
10111
10112                     CFLAGS="$CFLAGS -pthread"
10113                     LDFLAGS="$LDFLAGS -pthread"
10114
10115 fi
10116
10117
10118 fi
10119
10120             ;;
10121         QNX-6*)
10122             # QNX RTP
10123             # This may work for all QNX, but it was only reported for v6.
10124             SHLIB_CFLAGS="-fPIC"
10125             SHLIB_LD="ld -Bshareable -x"
10126             SHLIB_LD_LIBS=""
10127             SHLIB_SUFFIX=".so"
10128             DL_OBJS="tclLoadDl.o"
10129             # dlopen is in -lc on QNX
10130             DL_LIBS=""
10131             CC_SEARCH_FLAGS=""
10132             LD_SEARCH_FLAGS=""
10133             ;;
10134         SCO_SV-3.2*)
10135             # Note, dlopen is available only on SCO 3.2.5 and greater. However,
10136             # this test works, since "uname -s" was non-standard in 3.2.4 and
10137             # below.
10138             if test "$GCC" = yes; then
10139
10140                 SHLIB_CFLAGS="-fPIC -melf"
10141                 LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
10142
10143 else
10144
10145                 SHLIB_CFLAGS="-Kpic -belf"
10146                 LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
10147
10148 fi
10149
10150             SHLIB_LD="ld -G"
10151             SHLIB_LD_LIBS=""
10152             SHLIB_SUFFIX=".so"
10153             DL_OBJS="tclLoadDl.o"
10154             DL_LIBS=""
10155             CC_SEARCH_FLAGS=""
10156             LD_SEARCH_FLAGS=""
10157             ;;
10158         SINIX*5.4*)
10159             SHLIB_CFLAGS="-K PIC"
10160             SHLIB_LD='${CC} -G'
10161             SHLIB_LD_LIBS=""
10162             SHLIB_SUFFIX=".so"
10163             DL_OBJS="tclLoadDl.o"
10164             DL_LIBS="-ldl"
10165             CC_SEARCH_FLAGS=""
10166             LD_SEARCH_FLAGS=""
10167             ;;
10168         SunOS-4*)
10169             SHLIB_CFLAGS="-PIC"
10170             SHLIB_LD="ld"
10171             SHLIB_LD_LIBS=""
10172             SHLIB_SUFFIX=".so"
10173             DL_OBJS="tclLoadDl.o"
10174             DL_LIBS="-ldl"
10175             CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
10176             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
10177
10178             # SunOS can't handle version numbers with dots in them in library
10179             # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
10180             # requires an extra version number at the end of .so file names.
10181             # So, the library has to have a name like libtcl75.so.1.0
10182
10183             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
10184             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
10185             TCL_LIB_VERSIONS_OK=nodots
10186             ;;
10187         SunOS-5.[0-6])
10188             # Careful to not let 5.10+ fall into this case
10189
10190             # Note: If _REENTRANT isn't defined, then Solaris
10191             # won't define thread-safe library routines.
10192
10193
10194 cat >>confdefs.h <<\_ACEOF
10195 #define _REENTRANT 1
10196 _ACEOF
10197
10198
10199 cat >>confdefs.h <<\_ACEOF
10200 #define _POSIX_PTHREAD_SEMANTICS 1
10201 _ACEOF
10202
10203
10204             SHLIB_CFLAGS="-KPIC"
10205
10206             # Note: need the LIBS below, otherwise Tk won't find Tcl's
10207             # symbols when dynamically loaded into tclsh.
10208
10209             SHLIB_LD_LIBS='${LIBS}'
10210             SHLIB_SUFFIX=".so"
10211             DL_OBJS="tclLoadDl.o"
10212             DL_LIBS="-ldl"
10213             if test "$GCC" = yes; then
10214
10215                 SHLIB_LD='${CC} -shared'
10216                 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
10217                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
10218
10219 else
10220
10221                 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
10222                 CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
10223                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
10224
10225 fi
10226
10227             ;;
10228         SunOS-5*)
10229             # Note: If _REENTRANT isn't defined, then Solaris
10230             # won't define thread-safe library routines.
10231
10232
10233 cat >>confdefs.h <<\_ACEOF
10234 #define _REENTRANT 1
10235 _ACEOF
10236
10237
10238 cat >>confdefs.h <<\_ACEOF
10239 #define _POSIX_PTHREAD_SEMANTICS 1
10240 _ACEOF
10241
10242
10243             SHLIB_CFLAGS="-KPIC"
10244
10245             # Check to enable 64-bit flags for compiler/linker
10246             if test "$do64bit" = yes; then
10247
10248                 arch=`isainfo`
10249                 if test "$arch" = "sparcv9 sparc"; then
10250
10251                     if test "$GCC" = yes; then
10252
10253                         if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
10254
10255                             { $as_echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
10256 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
10257
10258 else
10259
10260                             do64bit_ok=yes
10261                             CFLAGS="$CFLAGS -m64 -mcpu=v9"
10262                             LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
10263                             SHLIB_CFLAGS="-fPIC"
10264
10265 fi
10266
10267
10268 else
10269
10270                         do64bit_ok=yes
10271                         if test "$do64bitVIS" = yes; then
10272
10273                             CFLAGS="$CFLAGS -xarch=v9a"
10274                             LDFLAGS_ARCH="-xarch=v9a"
10275
10276 else
10277
10278                             CFLAGS="$CFLAGS -xarch=v9"
10279                             LDFLAGS_ARCH="-xarch=v9"
10280
10281 fi
10282
10283                         # Solaris 64 uses this as well
10284                         #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
10285
10286 fi
10287
10288
10289 else
10290   if test "$arch" = "amd64 i386"; then
10291
10292                     if test "$GCC" = yes; then
10293
10294                         case $system in
10295                             SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
10296                                 do64bit_ok=yes
10297                                 CFLAGS="$CFLAGS -m64"
10298                                 LDFLAGS="$LDFLAGS -m64";;
10299                             *)
10300                                 { $as_echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
10301 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
10302                         esac
10303
10304 else
10305
10306                         do64bit_ok=yes
10307                         case $system in
10308                             SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
10309                                 CFLAGS="$CFLAGS -m64"
10310                                 LDFLAGS="$LDFLAGS -m64";;
10311                             *)
10312                                 CFLAGS="$CFLAGS -xarch=amd64"
10313                                 LDFLAGS="$LDFLAGS -xarch=amd64";;
10314                         esac
10315
10316 fi
10317
10318
10319 else
10320   { $as_echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
10321 $as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
10322 fi
10323
10324 fi
10325
10326
10327 fi
10328
10329
10330             # Note: need the LIBS below, otherwise Tk won't find Tcl's
10331             # symbols when dynamically loaded into tclsh.
10332
10333             SHLIB_LD_LIBS='${LIBS}'
10334             SHLIB_SUFFIX=".so"
10335             DL_OBJS="tclLoadDl.o"
10336             DL_LIBS="-ldl"
10337             if test "$GCC" = yes; then
10338
10339                 SHLIB_LD='${CC} -shared'
10340                 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
10341                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
10342                 if test "$do64bit_ok" = yes; then
10343
10344                     if test "$arch" = "sparcv9 sparc"; then
10345
10346                         # We need to specify -static-libgcc or we need to
10347                         # add the path to the sparv9 libgcc.
10348                         # JH: static-libgcc is necessary for core Tcl, but may
10349                         # not be necessary for extensions.
10350                         SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
10351                         # for finding sparcv9 libgcc, get the regular libgcc
10352                         # path, remove so name and append 'sparcv9'
10353                         #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
10354                         #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
10355
10356 else
10357   if test "$arch" = "amd64 i386"; then
10358
10359                         # JH: static-libgcc is necessary for core Tcl, but may
10360                         # not be necessary for extensions.
10361                         SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
10362
10363 fi
10364
10365 fi
10366
10367
10368 fi
10369
10370
10371 else
10372
10373                 case $system in
10374                     SunOS-5.[1-9][0-9]*)
10375                         # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
10376                         SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
10377                     *)
10378                         SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
10379                 esac
10380                 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
10381                 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
10382
10383 fi
10384
10385             ;;
10386         UNIX_SV* | UnixWare-5*)
10387             SHLIB_CFLAGS="-KPIC"
10388             SHLIB_LD='${CC} -G'
10389             SHLIB_LD_LIBS=""
10390             SHLIB_SUFFIX=".so"
10391             DL_OBJS="tclLoadDl.o"
10392             DL_LIBS="-ldl"
10393             # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
10394             # that don't grok the -Bexport option.  Test that it does.
10395             { $as_echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
10396 $as_echo_n "checking for ld accepts -Bexport flag... " >&6; }
10397 if test "${tcl_cv_ld_Bexport+set}" = set; then
10398   $as_echo_n "(cached) " >&6
10399 else
10400
10401                 hold_ldflags=$LDFLAGS
10402                 LDFLAGS="$LDFLAGS -Wl,-Bexport"
10403                 cat >conftest.$ac_ext <<_ACEOF
10404 /* confdefs.h.  */
10405 _ACEOF
10406 cat confdefs.h >>conftest.$ac_ext
10407 cat >>conftest.$ac_ext <<_ACEOF
10408 /* end confdefs.h.  */
10409
10410 int
10411 main ()
10412 {
10413 int i;
10414   ;
10415   return 0;
10416 }
10417 _ACEOF
10418 rm -f conftest.$ac_objext conftest$ac_exeext
10419 if { (ac_try="$ac_link"
10420 case "(($ac_try" in
10421   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10422   *) ac_try_echo=$ac_try;;
10423 esac
10424 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10425 $as_echo "$ac_try_echo") >&5
10426   (eval "$ac_link") 2>conftest.er1
10427   ac_status=$?
10428   grep -v '^ *+' conftest.er1 >conftest.err
10429   rm -f conftest.er1
10430   cat conftest.err >&5
10431   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10432   (exit $ac_status); } && {
10433          test -z "$ac_c_werror_flag" ||
10434          test ! -s conftest.err
10435        } && test -s conftest$ac_exeext && {
10436          test "$cross_compiling" = yes ||
10437          $as_test_x conftest$ac_exeext
10438        }; then
10439   tcl_cv_ld_Bexport=yes
10440 else
10441   $as_echo "$as_me: failed program was:" >&5
10442 sed 's/^/| /' conftest.$ac_ext >&5
10443
10444         tcl_cv_ld_Bexport=no
10445 fi
10446
10447 rm -rf conftest.dSYM
10448 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10449       conftest$ac_exeext conftest.$ac_ext
10450                 LDFLAGS=$hold_ldflags
10451 fi
10452 { $as_echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5
10453 $as_echo "$tcl_cv_ld_Bexport" >&6; }
10454             if test $tcl_cv_ld_Bexport = yes; then
10455
10456                 LDFLAGS="$LDFLAGS -Wl,-Bexport"
10457
10458 fi
10459
10460             CC_SEARCH_FLAGS=""
10461             LD_SEARCH_FLAGS=""
10462             ;;
10463     esac
10464
10465     if test "$do64bit" = yes -a "$do64bit_ok" = no; then
10466
10467         { $as_echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
10468 $as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
10469
10470 fi
10471
10472
10473
10474
10475     # Step 4: disable dynamic loading if requested via a command-line switch.
10476
10477     # Check whether --enable-load was given.
10478 if test "${enable_load+set}" = set; then
10479   enableval=$enable_load; tcl_ok=$enableval
10480 else
10481   tcl_ok=yes
10482 fi
10483
10484     if test "$tcl_ok" = no; then
10485   DL_OBJS=""
10486 fi
10487
10488
10489     if test "x$DL_OBJS" != x; then
10490   BUILD_DLTEST="\$(DLTEST_TARGETS)"
10491 else
10492
10493         { $as_echo "$as_me:$LINENO: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5
10494 $as_echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;}
10495         SHLIB_CFLAGS=""
10496         SHLIB_LD=""
10497         SHLIB_SUFFIX=""
10498         DL_OBJS="tclLoadNone.o"
10499         DL_LIBS=""
10500         LDFLAGS="$LDFLAGS_ORIG"
10501         CC_SEARCH_FLAGS=""
10502         LD_SEARCH_FLAGS=""
10503         BUILD_DLTEST=""
10504
10505 fi
10506
10507     LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
10508
10509     # If we're running gcc, then change the C flags for compiling shared
10510     # libraries to the right flags for gcc, instead of those for the
10511     # standard manufacturer compiler.
10512
10513     if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then
10514
10515         case $system in
10516             AIX-*) ;;
10517             BSD/OS*) ;;
10518             IRIX*) ;;
10519             NetBSD-*|FreeBSD-*) ;;
10520             Darwin-*) ;;
10521             SCO_SV-3.2*) ;;
10522             windows) ;;
10523             *) SHLIB_CFLAGS="-fPIC" ;;
10524         esac
10525 fi
10526
10527
10528     if test "$SHARED_LIB_SUFFIX" = ""; then
10529
10530         # TEA specific: use PACKAGE_VERSION instead of VERSION
10531         SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
10532 fi
10533
10534     if test "$UNSHARED_LIB_SUFFIX" = ""; then
10535
10536         # TEA specific: use PACKAGE_VERSION instead of VERSION
10537         UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
10538 fi
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555     # These must be called after we do the basic CFLAGS checks and
10556     # verify any possible 64-bit or similar switches are necessary
10557
10558     { $as_echo "$as_me:$LINENO: checking for required early compiler flags" >&5
10559 $as_echo_n "checking for required early compiler flags... " >&6; }
10560     tcl_flags=""
10561
10562     if test "${tcl_cv_flag__isoc99_source+set}" = set; then
10563   $as_echo_n "(cached) " >&6
10564 else
10565   cat >conftest.$ac_ext <<_ACEOF
10566 /* confdefs.h.  */
10567 _ACEOF
10568 cat confdefs.h >>conftest.$ac_ext
10569 cat >>conftest.$ac_ext <<_ACEOF
10570 /* end confdefs.h.  */
10571 #include <stdlib.h>
10572 int
10573 main ()
10574 {
10575 char *p = (char *)strtoll; char *q = (char *)strtoull;
10576   ;
10577   return 0;
10578 }
10579 _ACEOF
10580 rm -f conftest.$ac_objext
10581 if { (ac_try="$ac_compile"
10582 case "(($ac_try" in
10583   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10584   *) ac_try_echo=$ac_try;;
10585 esac
10586 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10587 $as_echo "$ac_try_echo") >&5
10588   (eval "$ac_compile") 2>conftest.er1
10589   ac_status=$?
10590   grep -v '^ *+' conftest.er1 >conftest.err
10591   rm -f conftest.er1
10592   cat conftest.err >&5
10593   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10594   (exit $ac_status); } && {
10595          test -z "$ac_c_werror_flag" ||
10596          test ! -s conftest.err
10597        } && test -s conftest.$ac_objext; then
10598   tcl_cv_flag__isoc99_source=no
10599 else
10600   $as_echo "$as_me: failed program was:" >&5
10601 sed 's/^/| /' conftest.$ac_ext >&5
10602
10603         cat >conftest.$ac_ext <<_ACEOF
10604 /* confdefs.h.  */
10605 _ACEOF
10606 cat confdefs.h >>conftest.$ac_ext
10607 cat >>conftest.$ac_ext <<_ACEOF
10608 /* end confdefs.h.  */
10609 #define _ISOC99_SOURCE 1
10610 #include <stdlib.h>
10611 int
10612 main ()
10613 {
10614 char *p = (char *)strtoll; char *q = (char *)strtoull;
10615   ;
10616   return 0;
10617 }
10618 _ACEOF
10619 rm -f conftest.$ac_objext
10620 if { (ac_try="$ac_compile"
10621 case "(($ac_try" in
10622   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10623   *) ac_try_echo=$ac_try;;
10624 esac
10625 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10626 $as_echo "$ac_try_echo") >&5
10627   (eval "$ac_compile") 2>conftest.er1
10628   ac_status=$?
10629   grep -v '^ *+' conftest.er1 >conftest.err
10630   rm -f conftest.er1
10631   cat conftest.err >&5
10632   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10633   (exit $ac_status); } && {
10634          test -z "$ac_c_werror_flag" ||
10635          test ! -s conftest.err
10636        } && test -s conftest.$ac_objext; then
10637   tcl_cv_flag__isoc99_source=yes
10638 else
10639   $as_echo "$as_me: failed program was:" >&5
10640 sed 's/^/| /' conftest.$ac_ext >&5
10641
10642         tcl_cv_flag__isoc99_source=no
10643 fi
10644
10645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10646 fi
10647
10648 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10649 fi
10650
10651     if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
10652
10653 cat >>confdefs.h <<\_ACEOF
10654 #define _ISOC99_SOURCE 1
10655 _ACEOF
10656
10657         tcl_flags="$tcl_flags _ISOC99_SOURCE"
10658     fi
10659
10660
10661     if test "${tcl_cv_flag__largefile64_source+set}" = set; then
10662   $as_echo_n "(cached) " >&6
10663 else
10664   cat >conftest.$ac_ext <<_ACEOF
10665 /* confdefs.h.  */
10666 _ACEOF
10667 cat confdefs.h >>conftest.$ac_ext
10668 cat >>conftest.$ac_ext <<_ACEOF
10669 /* end confdefs.h.  */
10670 #include <sys/stat.h>
10671 int
10672 main ()
10673 {
10674 struct stat64 buf; int i = stat64("/", &buf);
10675   ;
10676   return 0;
10677 }
10678 _ACEOF
10679 rm -f conftest.$ac_objext
10680 if { (ac_try="$ac_compile"
10681 case "(($ac_try" in
10682   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10683   *) ac_try_echo=$ac_try;;
10684 esac
10685 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10686 $as_echo "$ac_try_echo") >&5
10687   (eval "$ac_compile") 2>conftest.er1
10688   ac_status=$?
10689   grep -v '^ *+' conftest.er1 >conftest.err
10690   rm -f conftest.er1
10691   cat conftest.err >&5
10692   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10693   (exit $ac_status); } && {
10694          test -z "$ac_c_werror_flag" ||
10695          test ! -s conftest.err
10696        } && test -s conftest.$ac_objext; then
10697   tcl_cv_flag__largefile64_source=no
10698 else
10699   $as_echo "$as_me: failed program was:" >&5
10700 sed 's/^/| /' conftest.$ac_ext >&5
10701
10702         cat >conftest.$ac_ext <<_ACEOF
10703 /* confdefs.h.  */
10704 _ACEOF
10705 cat confdefs.h >>conftest.$ac_ext
10706 cat >>conftest.$ac_ext <<_ACEOF
10707 /* end confdefs.h.  */
10708 #define _LARGEFILE64_SOURCE 1
10709 #include <sys/stat.h>
10710 int
10711 main ()
10712 {
10713 struct stat64 buf; int i = stat64("/", &buf);
10714   ;
10715   return 0;
10716 }
10717 _ACEOF
10718 rm -f conftest.$ac_objext
10719 if { (ac_try="$ac_compile"
10720 case "(($ac_try" in
10721   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10722   *) ac_try_echo=$ac_try;;
10723 esac
10724 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10725 $as_echo "$ac_try_echo") >&5
10726   (eval "$ac_compile") 2>conftest.er1
10727   ac_status=$?
10728   grep -v '^ *+' conftest.er1 >conftest.err
10729   rm -f conftest.er1
10730   cat conftest.err >&5
10731   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10732   (exit $ac_status); } && {
10733          test -z "$ac_c_werror_flag" ||
10734          test ! -s conftest.err
10735        } && test -s conftest.$ac_objext; then
10736   tcl_cv_flag__largefile64_source=yes
10737 else
10738   $as_echo "$as_me: failed program was:" >&5
10739 sed 's/^/| /' conftest.$ac_ext >&5
10740
10741         tcl_cv_flag__largefile64_source=no
10742 fi
10743
10744 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10745 fi
10746
10747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10748 fi
10749
10750     if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
10751
10752 cat >>confdefs.h <<\_ACEOF
10753 #define _LARGEFILE64_SOURCE 1
10754 _ACEOF
10755
10756         tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
10757     fi
10758
10759
10760     if test "${tcl_cv_flag__largefile_source64+set}" = set; then
10761   $as_echo_n "(cached) " >&6
10762 else
10763   cat >conftest.$ac_ext <<_ACEOF
10764 /* confdefs.h.  */
10765 _ACEOF
10766 cat confdefs.h >>conftest.$ac_ext
10767 cat >>conftest.$ac_ext <<_ACEOF
10768 /* end confdefs.h.  */
10769 #include <sys/stat.h>
10770 int
10771 main ()
10772 {
10773 char *p = (char *)open64;
10774   ;
10775   return 0;
10776 }
10777 _ACEOF
10778 rm -f conftest.$ac_objext
10779 if { (ac_try="$ac_compile"
10780 case "(($ac_try" in
10781   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10782   *) ac_try_echo=$ac_try;;
10783 esac
10784 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10785 $as_echo "$ac_try_echo") >&5
10786   (eval "$ac_compile") 2>conftest.er1
10787   ac_status=$?
10788   grep -v '^ *+' conftest.er1 >conftest.err
10789   rm -f conftest.er1
10790   cat conftest.err >&5
10791   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10792   (exit $ac_status); } && {
10793          test -z "$ac_c_werror_flag" ||
10794          test ! -s conftest.err
10795        } && test -s conftest.$ac_objext; then
10796   tcl_cv_flag__largefile_source64=no
10797 else
10798   $as_echo "$as_me: failed program was:" >&5
10799 sed 's/^/| /' conftest.$ac_ext >&5
10800
10801         cat >conftest.$ac_ext <<_ACEOF
10802 /* confdefs.h.  */
10803 _ACEOF
10804 cat confdefs.h >>conftest.$ac_ext
10805 cat >>conftest.$ac_ext <<_ACEOF
10806 /* end confdefs.h.  */
10807 #define _LARGEFILE_SOURCE64 1
10808 #include <sys/stat.h>
10809 int
10810 main ()
10811 {
10812 char *p = (char *)open64;
10813   ;
10814   return 0;
10815 }
10816 _ACEOF
10817 rm -f conftest.$ac_objext
10818 if { (ac_try="$ac_compile"
10819 case "(($ac_try" in
10820   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10821   *) ac_try_echo=$ac_try;;
10822 esac
10823 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10824 $as_echo "$ac_try_echo") >&5
10825   (eval "$ac_compile") 2>conftest.er1
10826   ac_status=$?
10827   grep -v '^ *+' conftest.er1 >conftest.err
10828   rm -f conftest.er1
10829   cat conftest.err >&5
10830   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10831   (exit $ac_status); } && {
10832          test -z "$ac_c_werror_flag" ||
10833          test ! -s conftest.err
10834        } && test -s conftest.$ac_objext; then
10835   tcl_cv_flag__largefile_source64=yes
10836 else
10837   $as_echo "$as_me: failed program was:" >&5
10838 sed 's/^/| /' conftest.$ac_ext >&5
10839
10840         tcl_cv_flag__largefile_source64=no
10841 fi
10842
10843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10844 fi
10845
10846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10847 fi
10848
10849     if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
10850
10851 cat >>confdefs.h <<\_ACEOF
10852 #define _LARGEFILE_SOURCE64 1
10853 _ACEOF
10854
10855         tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
10856     fi
10857
10858     if test "x${tcl_flags}" = "x" ; then
10859         { $as_echo "$as_me:$LINENO: result: none" >&5
10860 $as_echo "none" >&6; }
10861     else
10862         { $as_echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
10863 $as_echo "${tcl_flags}" >&6; }
10864     fi
10865
10866
10867     { $as_echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
10868 $as_echo_n "checking for 64-bit integer type... " >&6; }
10869     if test "${tcl_cv_type_64bit+set}" = set; then
10870   $as_echo_n "(cached) " >&6
10871 else
10872
10873         tcl_cv_type_64bit=none
10874         # See if the compiler knows natively about __int64
10875         cat >conftest.$ac_ext <<_ACEOF
10876 /* confdefs.h.  */
10877 _ACEOF
10878 cat confdefs.h >>conftest.$ac_ext
10879 cat >>conftest.$ac_ext <<_ACEOF
10880 /* end confdefs.h.  */
10881
10882 int
10883 main ()
10884 {
10885 __int64 value = (__int64) 0;
10886   ;
10887   return 0;
10888 }
10889 _ACEOF
10890 rm -f conftest.$ac_objext
10891 if { (ac_try="$ac_compile"
10892 case "(($ac_try" in
10893   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10894   *) ac_try_echo=$ac_try;;
10895 esac
10896 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10897 $as_echo "$ac_try_echo") >&5
10898   (eval "$ac_compile") 2>conftest.er1
10899   ac_status=$?
10900   grep -v '^ *+' conftest.er1 >conftest.err
10901   rm -f conftest.er1
10902   cat conftest.err >&5
10903   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10904   (exit $ac_status); } && {
10905          test -z "$ac_c_werror_flag" ||
10906          test ! -s conftest.err
10907        } && test -s conftest.$ac_objext; then
10908   tcl_type_64bit=__int64
10909 else
10910   $as_echo "$as_me: failed program was:" >&5
10911 sed 's/^/| /' conftest.$ac_ext >&5
10912
10913         tcl_type_64bit="long long"
10914 fi
10915
10916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10917         # See if we should use long anyway  Note that we substitute in the
10918         # type that is our current guess for a 64-bit type inside this check
10919         # program, so it should be modified only carefully...
10920         cat >conftest.$ac_ext <<_ACEOF
10921 /* confdefs.h.  */
10922 _ACEOF
10923 cat confdefs.h >>conftest.$ac_ext
10924 cat >>conftest.$ac_ext <<_ACEOF
10925 /* end confdefs.h.  */
10926
10927 int
10928 main ()
10929 {
10930 switch (0) {
10931             case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
10932         }
10933   ;
10934   return 0;
10935 }
10936 _ACEOF
10937 rm -f conftest.$ac_objext
10938 if { (ac_try="$ac_compile"
10939 case "(($ac_try" in
10940   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10941   *) ac_try_echo=$ac_try;;
10942 esac
10943 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10944 $as_echo "$ac_try_echo") >&5
10945   (eval "$ac_compile") 2>conftest.er1
10946   ac_status=$?
10947   grep -v '^ *+' conftest.er1 >conftest.err
10948   rm -f conftest.er1
10949   cat conftest.err >&5
10950   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10951   (exit $ac_status); } && {
10952          test -z "$ac_c_werror_flag" ||
10953          test ! -s conftest.err
10954        } && test -s conftest.$ac_objext; then
10955   tcl_cv_type_64bit=${tcl_type_64bit}
10956 else
10957   $as_echo "$as_me: failed program was:" >&5
10958 sed 's/^/| /' conftest.$ac_ext >&5
10959
10960
10961 fi
10962
10963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10964 fi
10965
10966     if test "${tcl_cv_type_64bit}" = none ; then
10967
10968 cat >>confdefs.h <<\_ACEOF
10969 #define TCL_WIDE_INT_IS_LONG 1
10970 _ACEOF
10971
10972         { $as_echo "$as_me:$LINENO: result: using long" >&5
10973 $as_echo "using long" >&6; }
10974     elif test "${tcl_cv_type_64bit}" = "__int64" \
10975                 -a "${TEA_PLATFORM}" = "windows" ; then
10976         # TEA specific: We actually want to use the default tcl.h checks in
10977         # this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
10978         { $as_echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
10979 $as_echo "using Tcl header defaults" >&6; }
10980     else
10981
10982 cat >>confdefs.h <<_ACEOF
10983 #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
10984 _ACEOF
10985
10986         { $as_echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
10987 $as_echo "${tcl_cv_type_64bit}" >&6; }
10988
10989         # Now check for auxiliary declarations
10990         { $as_echo "$as_me:$LINENO: checking for struct dirent64" >&5
10991 $as_echo_n "checking for struct dirent64... " >&6; }
10992 if test "${tcl_cv_struct_dirent64+set}" = set; then
10993   $as_echo_n "(cached) " >&6
10994 else
10995
10996             cat >conftest.$ac_ext <<_ACEOF
10997 /* confdefs.h.  */
10998 _ACEOF
10999 cat confdefs.h >>conftest.$ac_ext
11000 cat >>conftest.$ac_ext <<_ACEOF
11001 /* end confdefs.h.  */
11002 #include <sys/types.h>
11003 #include <sys/dirent.h>
11004 int
11005 main ()
11006 {
11007 struct dirent64 p;
11008   ;
11009   return 0;
11010 }
11011 _ACEOF
11012 rm -f conftest.$ac_objext
11013 if { (ac_try="$ac_compile"
11014 case "(($ac_try" in
11015   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11016   *) ac_try_echo=$ac_try;;
11017 esac
11018 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11019 $as_echo "$ac_try_echo") >&5
11020   (eval "$ac_compile") 2>conftest.er1
11021   ac_status=$?
11022   grep -v '^ *+' conftest.er1 >conftest.err
11023   rm -f conftest.er1
11024   cat conftest.err >&5
11025   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11026   (exit $ac_status); } && {
11027          test -z "$ac_c_werror_flag" ||
11028          test ! -s conftest.err
11029        } && test -s conftest.$ac_objext; then
11030   tcl_cv_struct_dirent64=yes
11031 else
11032   $as_echo "$as_me: failed program was:" >&5
11033 sed 's/^/| /' conftest.$ac_ext >&5
11034
11035         tcl_cv_struct_dirent64=no
11036 fi
11037
11038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11039 fi
11040 { $as_echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
11041 $as_echo "$tcl_cv_struct_dirent64" >&6; }
11042         if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
11043
11044 cat >>confdefs.h <<\_ACEOF
11045 #define HAVE_STRUCT_DIRENT64 1
11046 _ACEOF
11047
11048         fi
11049
11050         { $as_echo "$as_me:$LINENO: checking for struct stat64" >&5
11051 $as_echo_n "checking for struct stat64... " >&6; }
11052 if test "${tcl_cv_struct_stat64+set}" = set; then
11053   $as_echo_n "(cached) " >&6
11054 else
11055
11056             cat >conftest.$ac_ext <<_ACEOF
11057 /* confdefs.h.  */
11058 _ACEOF
11059 cat confdefs.h >>conftest.$ac_ext
11060 cat >>conftest.$ac_ext <<_ACEOF
11061 /* end confdefs.h.  */
11062 #include <sys/stat.h>
11063 int
11064 main ()
11065 {
11066 struct stat64 p;
11067
11068   ;
11069   return 0;
11070 }
11071 _ACEOF
11072 rm -f conftest.$ac_objext
11073 if { (ac_try="$ac_compile"
11074 case "(($ac_try" in
11075   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11076   *) ac_try_echo=$ac_try;;
11077 esac
11078 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11079 $as_echo "$ac_try_echo") >&5
11080   (eval "$ac_compile") 2>conftest.er1
11081   ac_status=$?
11082   grep -v '^ *+' conftest.er1 >conftest.err
11083   rm -f conftest.er1
11084   cat conftest.err >&5
11085   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11086   (exit $ac_status); } && {
11087          test -z "$ac_c_werror_flag" ||
11088          test ! -s conftest.err
11089        } && test -s conftest.$ac_objext; then
11090   tcl_cv_struct_stat64=yes
11091 else
11092   $as_echo "$as_me: failed program was:" >&5
11093 sed 's/^/| /' conftest.$ac_ext >&5
11094
11095         tcl_cv_struct_stat64=no
11096 fi
11097
11098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11099 fi
11100 { $as_echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
11101 $as_echo "$tcl_cv_struct_stat64" >&6; }
11102         if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
11103
11104 cat >>confdefs.h <<\_ACEOF
11105 #define HAVE_STRUCT_STAT64 1
11106 _ACEOF
11107
11108         fi
11109
11110
11111
11112 for ac_func in open64 lseek64
11113 do
11114 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11115 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
11116 $as_echo_n "checking for $ac_func... " >&6; }
11117 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11118   $as_echo_n "(cached) " >&6
11119 else
11120   cat >conftest.$ac_ext <<_ACEOF
11121 /* confdefs.h.  */
11122 _ACEOF
11123 cat confdefs.h >>conftest.$ac_ext
11124 cat >>conftest.$ac_ext <<_ACEOF
11125 /* end confdefs.h.  */
11126 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11127    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11128 #define $ac_func innocuous_$ac_func
11129
11130 /* System header to define __stub macros and hopefully few prototypes,
11131     which can conflict with char $ac_func (); below.
11132     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11133     <limits.h> exists even on freestanding compilers.  */
11134
11135 #ifdef __STDC__
11136 # include <limits.h>
11137 #else
11138 # include <assert.h>
11139 #endif
11140
11141 #undef $ac_func
11142
11143 /* Override any GCC internal prototype to avoid an error.
11144    Use char because int might match the return type of a GCC
11145    builtin and then its argument prototype would still apply.  */
11146 #ifdef __cplusplus
11147 extern "C"
11148 #endif
11149 char $ac_func ();
11150 /* The GNU C library defines this for functions which it implements
11151     to always fail with ENOSYS.  Some functions are actually named
11152     something starting with __ and the normal name is an alias.  */
11153 #if defined __stub_$ac_func || defined __stub___$ac_func
11154 choke me
11155 #endif
11156
11157 int
11158 main ()
11159 {
11160 return $ac_func ();
11161   ;
11162   return 0;
11163 }
11164 _ACEOF
11165 rm -f conftest.$ac_objext conftest$ac_exeext
11166 if { (ac_try="$ac_link"
11167 case "(($ac_try" in
11168   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11169   *) ac_try_echo=$ac_try;;
11170 esac
11171 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11172 $as_echo "$ac_try_echo") >&5
11173   (eval "$ac_link") 2>conftest.er1
11174   ac_status=$?
11175   grep -v '^ *+' conftest.er1 >conftest.err
11176   rm -f conftest.er1
11177   cat conftest.err >&5
11178   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11179   (exit $ac_status); } && {
11180          test -z "$ac_c_werror_flag" ||
11181          test ! -s conftest.err
11182        } && test -s conftest$ac_exeext && {
11183          test "$cross_compiling" = yes ||
11184          $as_test_x conftest$ac_exeext
11185        }; then
11186   eval "$as_ac_var=yes"
11187 else
11188   $as_echo "$as_me: failed program was:" >&5
11189 sed 's/^/| /' conftest.$ac_ext >&5
11190
11191         eval "$as_ac_var=no"
11192 fi
11193
11194 rm -rf conftest.dSYM
11195 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11196       conftest$ac_exeext conftest.$ac_ext
11197 fi
11198 ac_res=`eval 'as_val=${'$as_ac_var'}
11199                  $as_echo "$as_val"'`
11200                { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11201 $as_echo "$ac_res" >&6; }
11202 as_val=`eval 'as_val=${'$as_ac_var'}
11203                  $as_echo "$as_val"'`
11204    if test "x$as_val" = x""yes; then
11205   cat >>confdefs.h <<_ACEOF
11206 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11207 _ACEOF
11208
11209 fi
11210 done
11211
11212         { $as_echo "$as_me:$LINENO: checking for off64_t" >&5
11213 $as_echo_n "checking for off64_t... " >&6; }
11214         if test "${tcl_cv_type_off64_t+set}" = set; then
11215   $as_echo_n "(cached) " >&6
11216 else
11217
11218             cat >conftest.$ac_ext <<_ACEOF
11219 /* confdefs.h.  */
11220 _ACEOF
11221 cat confdefs.h >>conftest.$ac_ext
11222 cat >>conftest.$ac_ext <<_ACEOF
11223 /* end confdefs.h.  */
11224 #include <sys/types.h>
11225 int
11226 main ()
11227 {
11228 off64_t offset;
11229
11230   ;
11231   return 0;
11232 }
11233 _ACEOF
11234 rm -f conftest.$ac_objext
11235 if { (ac_try="$ac_compile"
11236 case "(($ac_try" in
11237   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11238   *) ac_try_echo=$ac_try;;
11239 esac
11240 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11241 $as_echo "$ac_try_echo") >&5
11242   (eval "$ac_compile") 2>conftest.er1
11243   ac_status=$?
11244   grep -v '^ *+' conftest.er1 >conftest.err
11245   rm -f conftest.er1
11246   cat conftest.err >&5
11247   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11248   (exit $ac_status); } && {
11249          test -z "$ac_c_werror_flag" ||
11250          test ! -s conftest.err
11251        } && test -s conftest.$ac_objext; then
11252   tcl_cv_type_off64_t=yes
11253 else
11254   $as_echo "$as_me: failed program was:" >&5
11255 sed 's/^/| /' conftest.$ac_ext >&5
11256
11257         tcl_cv_type_off64_t=no
11258 fi
11259
11260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11261 fi
11262
11263                         if test "x${tcl_cv_type_off64_t}" = "xyes" && \
11264                 test "x${ac_cv_func_lseek64}" = "xyes" && \
11265                 test "x${ac_cv_func_open64}" = "xyes" ; then
11266
11267 cat >>confdefs.h <<\_ACEOF
11268 #define HAVE_TYPE_OFF64_T 1
11269 _ACEOF
11270
11271             { $as_echo "$as_me:$LINENO: result: yes" >&5
11272 $as_echo "yes" >&6; }
11273         else
11274             { $as_echo "$as_me:$LINENO: result: no" >&5
11275 $as_echo "no" >&6; }
11276         fi
11277     fi
11278
11279
11280
11281 #--------------------------------------------------------------------
11282 # Set the default compiler switches based on the --enable-symbols option.
11283 #--------------------------------------------------------------------
11284
11285
11286
11287     { $as_echo "$as_me:$LINENO: checking for build with symbols" >&5
11288 $as_echo_n "checking for build with symbols... " >&6; }
11289     # Check whether --enable-symbols was given.
11290 if test "${enable_symbols+set}" = set; then
11291   enableval=$enable_symbols; tcl_ok=$enableval
11292 else
11293   tcl_ok=no
11294 fi
11295
11296     DBGX=""
11297     if test "$tcl_ok" = "no"; then
11298         CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
11299         LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
11300         { $as_echo "$as_me:$LINENO: result: no" >&5
11301 $as_echo "no" >&6; }
11302     else
11303         CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
11304         LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
11305         if test "$tcl_ok" = "yes"; then
11306             { $as_echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
11307 $as_echo "yes (standard debugging)" >&6; }
11308         fi
11309     fi
11310     # TEA specific:
11311     if test "${TEA_PLATFORM}" != "windows" ; then
11312         LDFLAGS_DEFAULT="${LDFLAGS}"
11313     fi
11314
11315
11316
11317
11318     if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
11319
11320 cat >>confdefs.h <<\_ACEOF
11321 #define TCL_MEM_DEBUG 1
11322 _ACEOF
11323
11324     fi
11325
11326     if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
11327         if test "$tcl_ok" = "all"; then
11328             { $as_echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
11329 $as_echo "enabled symbols mem debugging" >&6; }
11330         else
11331             { $as_echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
11332 $as_echo "enabled $tcl_ok debugging" >&6; }
11333         fi
11334     fi
11335
11336
11337 #--------------------------------------------------------------------
11338 # Everyone should be linking against the Tcl stub library.  If you
11339 # can't for some reason, remove this definition.  If you aren't using
11340 # stubs, you also need to modify the SHLIB_LD_LIBS setting below to
11341 # link against the non-stubbed Tcl library.  Add Tk too if necessary.
11342 #--------------------------------------------------------------------
11343
11344
11345 cat >>confdefs.h <<\_ACEOF
11346 #define USE_TCL_STUBS 1
11347 _ACEOF
11348
11349 #AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
11350
11351 #--------------------------------------------------------------------
11352 # This macro generates a line to use when building a library.  It
11353 # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
11354 # and TEA_LOAD_TCLCONFIG macros above.
11355 #--------------------------------------------------------------------
11356
11357
11358     if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
11359         MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
11360         MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
11361         MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
11362     else
11363         MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
11364         MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
11365         MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
11366     fi
11367
11368     if test "${SHARED_BUILD}" = "1" ; then
11369         MAKE_LIB="${MAKE_SHARED_LIB} "
11370     else
11371         MAKE_LIB="${MAKE_STATIC_LIB} "
11372     fi
11373
11374     #--------------------------------------------------------------------
11375     # Shared libraries and static libraries have different names.
11376     # Use the double eval to make sure any variables in the suffix is
11377     # substituted. (@@@ Might not be necessary anymore)
11378     #--------------------------------------------------------------------
11379
11380     if test "${TEA_PLATFORM}" = "windows" ; then
11381         if test "${SHARED_BUILD}" = "1" ; then
11382             # We force the unresolved linking of symbols that are really in
11383             # the private libraries of Tcl and Tk.
11384             SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
11385             if test x"${TK_BIN_DIR}" != x ; then
11386                 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
11387             fi
11388             eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
11389         else
11390             eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
11391         fi
11392         # Some packages build their own stubs libraries
11393         eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
11394         if test "$GCC" = "yes"; then
11395             PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
11396         fi
11397         # These aren't needed on Windows (either MSVC or gcc)
11398         RANLIB=:
11399         RANLIB_STUB=:
11400     else
11401         RANLIB_STUB="${RANLIB}"
11402         if test "${SHARED_BUILD}" = "1" ; then
11403             SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
11404             if test x"${TK_BIN_DIR}" != x ; then
11405                 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
11406             fi
11407             eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
11408             RANLIB=:
11409         else
11410             eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
11411         fi
11412         # Some packages build their own stubs libraries
11413         eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
11414     fi
11415
11416     # These are escaped so that only CFLAGS is picked up at configure time.
11417     # The other values will be substituted at make time.
11418     CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
11419     if test "${SHARED_BUILD}" = "1" ; then
11420         CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
11421     fi
11422
11423
11424
11425
11426
11427
11428
11429
11430 #--------------------------------------------------------------------
11431 # Determine the name of the tclsh and/or wish executables in the
11432 # Tcl and Tk build directories or the location they were installed
11433 # into. These paths are used to support running test cases only,
11434 # the Makefile should not be making use of these paths to generate
11435 # a pkgIndex.tcl file or anything else at extension build time.
11436 #--------------------------------------------------------------------
11437
11438
11439     { $as_echo "$as_me:$LINENO: checking for tclsh" >&5
11440 $as_echo_n "checking for tclsh... " >&6; }
11441     if test -f "${TCL_BIN_DIR}/Makefile" ; then
11442         # tclConfig.sh is in Tcl build directory
11443         if test "${TEA_PLATFORM}" = "windows"; then
11444             TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
11445         else
11446             TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
11447         fi
11448     else
11449         # tclConfig.sh is in install location
11450         if test "${TEA_PLATFORM}" = "windows"; then
11451             TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
11452         else
11453             TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
11454         fi
11455         list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
11456               `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
11457               `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
11458         for i in $list ; do
11459             if test -f "$i/${TCLSH_PROG}" ; then
11460                 REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
11461                 break
11462             fi
11463         done
11464         TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
11465     fi
11466     { $as_echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
11467 $as_echo "${TCLSH_PROG}" >&6; }
11468
11469
11470 #TEA_PROG_WISH
11471
11472 #--------------------------------------------------------------------
11473 # Finally, substitute all of the various values into the Makefile.
11474 # You may alternatively have a special pkgIndex.tcl.in or other files
11475 # which require substituting th AC variables in.  Include these here.
11476 #--------------------------------------------------------------------
11477
11478 ac_config_files="$ac_config_files Makefile pkgIndex.tcl"
11479
11480 cat >confcache <<\_ACEOF
11481 # This file is a shell script that caches the results of configure
11482 # tests run on this system so they can be shared between configure
11483 # scripts and configure runs, see configure's option --config-cache.
11484 # It is not useful on other systems.  If it contains results you don't
11485 # want to keep, you may remove or edit it.
11486 #
11487 # config.status only pays attention to the cache file if you give it
11488 # the --recheck option to rerun configure.
11489 #
11490 # `ac_cv_env_foo' variables (set or unset) will be overridden when
11491 # loading this file, other *unset* `ac_cv_foo' will be assigned the
11492 # following values.
11493
11494 _ACEOF
11495
11496 # The following way of writing the cache mishandles newlines in values,
11497 # but we know of no workaround that is simple, portable, and efficient.
11498 # So, we kill variables containing newlines.
11499 # Ultrix sh set writes to stderr and can't be redirected directly,
11500 # and sets the high bit in the cache file unless we assign to the vars.
11501 (
11502   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
11503     eval ac_val=\$$ac_var
11504     case $ac_val in #(
11505     *${as_nl}*)
11506       case $ac_var in #(
11507       *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
11508 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
11509       esac
11510       case $ac_var in #(
11511       _ | IFS | as_nl) ;; #(
11512       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
11513       *) $as_unset $ac_var ;;
11514       esac ;;
11515     esac
11516   done
11517
11518   (set) 2>&1 |
11519     case $as_nl`(ac_space=' '; set) 2>&1` in #(
11520     *${as_nl}ac_space=\ *)
11521       # `set' does not quote correctly, so add quotes (double-quote
11522       # substitution turns \\\\ into \\, and sed turns \\ into \).
11523       sed -n \
11524         "s/'/'\\\\''/g;
11525           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11526       ;; #(
11527     *)
11528       # `set' quotes correctly as required by POSIX, so do not add quotes.
11529       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
11530       ;;
11531     esac |
11532     sort
11533 ) |
11534   sed '
11535      /^ac_cv_env_/b end
11536      t clear
11537      :clear
11538      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11539      t end
11540      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11541      :end' >>confcache
11542 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
11543   if test -w "$cache_file"; then
11544     test "x$cache_file" != "x/dev/null" &&
11545       { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
11546 $as_echo "$as_me: updating cache $cache_file" >&6;}
11547     cat confcache >$cache_file
11548   else
11549     { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
11550 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
11551   fi
11552 fi
11553 rm -f confcache
11554
11555 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11556 # Let make expand exec_prefix.
11557 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11558
11559 # Transform confdefs.h into DEFS.
11560 # Protect against shell expansion while executing Makefile rules.
11561 # Protect against Makefile macro expansion.
11562 #
11563 # If the first sed substitution is executed (which looks for macros that
11564 # take arguments), then branch to the quote section.  Otherwise,
11565 # look for a macro that doesn't take arguments.
11566 ac_script='
11567 :mline
11568 /\\$/{
11569  N
11570  s,\\\n,,
11571  b mline
11572 }
11573 t clear
11574 :clear
11575 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
11576 t quote
11577 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
11578 t quote
11579 b any
11580 :quote
11581 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
11582 s/\[/\\&/g
11583 s/\]/\\&/g
11584 s/\$/$$/g
11585 H
11586 :any
11587 ${
11588         g
11589         s/^\n//
11590         s/\n/ /g
11591         p
11592 }
11593 '
11594 DEFS=`sed -n "$ac_script" confdefs.h`
11595
11596
11597 ac_libobjs=
11598 ac_ltlibobjs=
11599 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
11600   # 1. Remove the extension, and $U if already installed.
11601   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
11602   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
11603   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
11604   #    will be set to the directory where LIBOBJS objects are built.
11605   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
11606   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
11607 done
11608 LIBOBJS=$ac_libobjs
11609
11610 LTLIBOBJS=$ac_ltlibobjs
11611
11612
11613
11614 CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
11615
11616 : ${CONFIG_STATUS=./config.status}
11617 ac_write_fail=0
11618 ac_clean_files_save=$ac_clean_files
11619 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11620 { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
11621 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
11622 cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11623 #! $SHELL
11624 # Generated by $as_me.
11625 # Run this file to recreate the current configuration.
11626 # Compiler output produced by configure, useful for debugging
11627 # configure, is in config.log if it exists.
11628
11629 debug=false
11630 ac_cs_recheck=false
11631 ac_cs_silent=false
11632 SHELL=\${CONFIG_SHELL-$SHELL}
11633 _ACEOF
11634
11635 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11636 ## --------------------- ##
11637 ## M4sh Initialization.  ##
11638 ## --------------------- ##
11639
11640 # Be more Bourne compatible
11641 DUALCASE=1; export DUALCASE # for MKS sh
11642 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11643   emulate sh
11644   NULLCMD=:
11645   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
11646   # is contrary to our usage.  Disable this feature.
11647   alias -g '${1+"$@"}'='"$@"'
11648   setopt NO_GLOB_SUBST
11649 else
11650   case `(set -o) 2>/dev/null` in
11651   *posix*) set -o posix ;;
11652 esac
11653
11654 fi
11655
11656
11657
11658
11659 # PATH needs CR
11660 # Avoid depending upon Character Ranges.
11661 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11662 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11663 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11664 as_cr_digits='0123456789'
11665 as_cr_alnum=$as_cr_Letters$as_cr_digits
11666
11667 as_nl='
11668 '
11669 export as_nl
11670 # Printing a long string crashes Solaris 7 /usr/bin/printf.
11671 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11672 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
11673 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
11674 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
11675   as_echo='printf %s\n'
11676   as_echo_n='printf %s'
11677 else
11678   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
11679     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
11680     as_echo_n='/usr/ucb/echo -n'
11681   else
11682     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
11683     as_echo_n_body='eval
11684       arg=$1;
11685       case $arg in
11686       *"$as_nl"*)
11687         expr "X$arg" : "X\\(.*\\)$as_nl";
11688         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
11689       esac;
11690       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
11691     '
11692     export as_echo_n_body
11693     as_echo_n='sh -c $as_echo_n_body as_echo'
11694   fi
11695   export as_echo_body
11696   as_echo='sh -c $as_echo_body as_echo'
11697 fi
11698
11699 # The user is always right.
11700 if test "${PATH_SEPARATOR+set}" != set; then
11701   PATH_SEPARATOR=:
11702   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
11703     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
11704       PATH_SEPARATOR=';'
11705   }
11706 fi
11707
11708 # Support unset when possible.
11709 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
11710   as_unset=unset
11711 else
11712   as_unset=false
11713 fi
11714
11715
11716 # IFS
11717 # We need space, tab and new line, in precisely that order.  Quoting is
11718 # there to prevent editors from complaining about space-tab.
11719 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
11720 # splitting by setting IFS to empty value.)
11721 IFS=" ""        $as_nl"
11722
11723 # Find who we are.  Look in the path if we contain no directory separator.
11724 case $0 in
11725   *[\\/]* ) as_myself=$0 ;;
11726   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11727 for as_dir in $PATH
11728 do
11729   IFS=$as_save_IFS
11730   test -z "$as_dir" && as_dir=.
11731   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
11732 done
11733 IFS=$as_save_IFS
11734
11735      ;;
11736 esac
11737 # We did not find ourselves, most probably we were run as `sh COMMAND'
11738 # in which case we are not to be found in the path.
11739 if test "x$as_myself" = x; then
11740   as_myself=$0
11741 fi
11742 if test ! -f "$as_myself"; then
11743   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
11744   { (exit 1); exit 1; }
11745 fi
11746
11747 # Work around bugs in pre-3.0 UWIN ksh.
11748 for as_var in ENV MAIL MAILPATH
11749 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
11750 done
11751 PS1='$ '
11752 PS2='> '
11753 PS4='+ '
11754
11755 # NLS nuisances.
11756 LC_ALL=C
11757 export LC_ALL
11758 LANGUAGE=C
11759 export LANGUAGE
11760
11761 # Required to use basename.
11762 if expr a : '\(a\)' >/dev/null 2>&1 &&
11763    test "X`expr 00001 : '.*\(...\)'`" = X001; then
11764   as_expr=expr
11765 else
11766   as_expr=false
11767 fi
11768
11769 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
11770   as_basename=basename
11771 else
11772   as_basename=false
11773 fi
11774
11775
11776 # Name of the executable.
11777 as_me=`$as_basename -- "$0" ||
11778 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11779          X"$0" : 'X\(//\)$' \| \
11780          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
11781 $as_echo X/"$0" |
11782     sed '/^.*\/\([^/][^/]*\)\/*$/{
11783             s//\1/
11784             q
11785           }
11786           /^X\/\(\/\/\)$/{
11787             s//\1/
11788             q
11789           }
11790           /^X\/\(\/\).*/{
11791             s//\1/
11792             q
11793           }
11794           s/.*/./; q'`
11795
11796 # CDPATH.
11797 $as_unset CDPATH
11798
11799
11800
11801   as_lineno_1=$LINENO
11802   as_lineno_2=$LINENO
11803   test "x$as_lineno_1" != "x$as_lineno_2" &&
11804   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
11805
11806   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
11807   # uniformly replaced by the line number.  The first 'sed' inserts a
11808   # line-number line after each line using $LINENO; the second 'sed'
11809   # does the real work.  The second script uses 'N' to pair each
11810   # line-number line with the line containing $LINENO, and appends
11811   # trailing '-' during substitution so that $LINENO is not a special
11812   # case at line end.
11813   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
11814   # scripts with optimization help from Paolo Bonzini.  Blame Lee
11815   # E. McMahon (1931-1989) for sed's syntax.  :-)
11816   sed -n '
11817     p
11818     /[$]LINENO/=
11819   ' <$as_myself |
11820     sed '
11821       s/[$]LINENO.*/&-/
11822       t lineno
11823       b
11824       :lineno
11825       N
11826       :loop
11827       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
11828       t loop
11829       s/-\n.*//
11830     ' >$as_me.lineno &&
11831   chmod +x "$as_me.lineno" ||
11832     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
11833    { (exit 1); exit 1; }; }
11834
11835   # Don't try to exec as it changes $[0], causing all sort of problems
11836   # (the dirname of $[0] is not the place where we might find the
11837   # original and so on.  Autoconf is especially sensitive to this).
11838   . "./$as_me.lineno"
11839   # Exit status is that of the last command.
11840   exit
11841 }
11842
11843
11844 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
11845   as_dirname=dirname
11846 else
11847   as_dirname=false
11848 fi
11849
11850 ECHO_C= ECHO_N= ECHO_T=
11851 case `echo -n x` in
11852 -n*)
11853   case `echo 'x\c'` in
11854   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
11855   *)   ECHO_C='\c';;
11856   esac;;
11857 *)
11858   ECHO_N='-n';;
11859 esac
11860 if expr a : '\(a\)' >/dev/null 2>&1 &&
11861    test "X`expr 00001 : '.*\(...\)'`" = X001; then
11862   as_expr=expr
11863 else
11864   as_expr=false
11865 fi
11866
11867 rm -f conf$$ conf$$.exe conf$$.file
11868 if test -d conf$$.dir; then
11869   rm -f conf$$.dir/conf$$.file
11870 else
11871   rm -f conf$$.dir
11872   mkdir conf$$.dir 2>/dev/null
11873 fi
11874 if (echo >conf$$.file) 2>/dev/null; then
11875   if ln -s conf$$.file conf$$ 2>/dev/null; then
11876     as_ln_s='ln -s'
11877     # ... but there are two gotchas:
11878     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
11879     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
11880     # In both cases, we have to default to `cp -p'.
11881     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
11882       as_ln_s='cp -p'
11883   elif ln conf$$.file conf$$ 2>/dev/null; then
11884     as_ln_s=ln
11885   else
11886     as_ln_s='cp -p'
11887   fi
11888 else
11889   as_ln_s='cp -p'
11890 fi
11891 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11892 rmdir conf$$.dir 2>/dev/null
11893
11894 if mkdir -p . 2>/dev/null; then
11895   as_mkdir_p=:
11896 else
11897   test -d ./-p && rmdir ./-p
11898   as_mkdir_p=false
11899 fi
11900
11901 if test -x / >/dev/null 2>&1; then
11902   as_test_x='test -x'
11903 else
11904   if ls -dL / >/dev/null 2>&1; then
11905     as_ls_L_option=L
11906   else
11907     as_ls_L_option=
11908   fi
11909   as_test_x='
11910     eval sh -c '\''
11911       if test -d "$1"; then
11912         test -d "$1/.";
11913       else
11914         case $1 in
11915         -*)set "./$1";;
11916         esac;
11917         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
11918         ???[sx]*):;;*)false;;esac;fi
11919     '\'' sh
11920   '
11921 fi
11922 as_executable_p=$as_test_x
11923
11924 # Sed expression to map a string onto a valid CPP name.
11925 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
11926
11927 # Sed expression to map a string onto a valid variable name.
11928 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
11929
11930
11931 exec 6>&1
11932
11933 # Save the log message, to keep $[0] and so on meaningful, and to
11934 # report actual input values of CONFIG_FILES etc. instead of their
11935 # values after options handling.
11936 ac_log="
11937 This file was extended by TclCurl $as_me 7.19.6, which was
11938 generated by GNU Autoconf 2.63.  Invocation command line was
11939
11940   CONFIG_FILES    = $CONFIG_FILES
11941   CONFIG_HEADERS  = $CONFIG_HEADERS
11942   CONFIG_LINKS    = $CONFIG_LINKS
11943   CONFIG_COMMANDS = $CONFIG_COMMANDS
11944   $ $0 $@
11945
11946 on `(hostname || uname -n) 2>/dev/null | sed 1q`
11947 "
11948
11949 _ACEOF
11950
11951 case $ac_config_files in *"
11952 "*) set x $ac_config_files; shift; ac_config_files=$*;;
11953 esac
11954
11955
11956
11957 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11958 # Files that config.status was made for.
11959 config_files="`echo $ac_config_files`"
11960
11961 _ACEOF
11962
11963 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11964 ac_cs_usage="\
11965 \`$as_me' instantiates files from templates according to the
11966 current configuration.
11967
11968 Usage: $0 [OPTION]... [FILE]...
11969
11970   -h, --help       print this help, then exit
11971   -V, --version    print version number and configuration settings, then exit
11972   -q, --quiet, --silent
11973                    do not print progress messages
11974   -d, --debug      don't remove temporary files
11975       --recheck    update $as_me by reconfiguring in the same conditions
11976       --file=FILE[:TEMPLATE]
11977                    instantiate the configuration file FILE
11978
11979 Configuration files:
11980 $config_files
11981
11982 Report bugs to <bug-autoconf@gnu.org>."
11983
11984 _ACEOF
11985 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11986 ac_cs_version="\\
11987 TclCurl config.status 7.19.6
11988 configured by $0, generated by GNU Autoconf 2.63,
11989   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
11990
11991 Copyright (C) 2008 Free Software Foundation, Inc.
11992 This config.status script is free software; the Free Software Foundation
11993 gives unlimited permission to copy, distribute and modify it."
11994
11995 ac_pwd='$ac_pwd'
11996 srcdir='$srcdir'
11997 INSTALL='$INSTALL'
11998 test -n "\$AWK" || AWK=awk
11999 _ACEOF
12000
12001 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12002 # The default lists apply if the user does not specify any file.
12003 ac_need_defaults=:
12004 while test $# != 0
12005 do
12006   case $1 in
12007   --*=*)
12008     ac_option=`expr "X$1" : 'X\([^=]*\)='`
12009     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
12010     ac_shift=:
12011     ;;
12012   *)
12013     ac_option=$1
12014     ac_optarg=$2
12015     ac_shift=shift
12016     ;;
12017   esac
12018
12019   case $ac_option in
12020   # Handling of the options.
12021   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12022     ac_cs_recheck=: ;;
12023   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
12024     $as_echo "$ac_cs_version"; exit ;;
12025   --debug | --debu | --deb | --de | --d | -d )
12026     debug=: ;;
12027   --file | --fil | --fi | --f )
12028     $ac_shift
12029     case $ac_optarg in
12030     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
12031     esac
12032     CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
12033     ac_need_defaults=false;;
12034   --he | --h |  --help | --hel | -h )
12035     $as_echo "$ac_cs_usage"; exit ;;
12036   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
12037   | -silent | --silent | --silen | --sile | --sil | --si | --s)
12038     ac_cs_silent=: ;;
12039
12040   # This is an error.
12041   -*) { $as_echo "$as_me: error: unrecognized option: $1
12042 Try \`$0 --help' for more information." >&2
12043    { (exit 1); exit 1; }; } ;;
12044
12045   *) ac_config_targets="$ac_config_targets $1"
12046      ac_need_defaults=false ;;
12047
12048   esac
12049   shift
12050 done
12051
12052 ac_configure_extra_args=
12053
12054 if $ac_cs_silent; then
12055   exec 6>/dev/null
12056   ac_configure_extra_args="$ac_configure_extra_args --silent"
12057 fi
12058
12059 _ACEOF
12060 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12061 if \$ac_cs_recheck; then
12062   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12063   shift
12064   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
12065   CONFIG_SHELL='$SHELL'
12066   export CONFIG_SHELL
12067   exec "\$@"
12068 fi
12069
12070 _ACEOF
12071 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12072 exec 5>>config.log
12073 {
12074   echo
12075   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
12076 ## Running $as_me. ##
12077 _ASBOX
12078   $as_echo "$ac_log"
12079 } >&5
12080
12081 _ACEOF
12082 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12083 _ACEOF
12084
12085 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12086
12087 # Handling of arguments.
12088 for ac_config_target in $ac_config_targets
12089 do
12090   case $ac_config_target in
12091     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12092     "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;;
12093
12094   *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
12095 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12096    { (exit 1); exit 1; }; };;
12097   esac
12098 done
12099
12100
12101 # If the user did not use the arguments to specify the items to instantiate,
12102 # then the envvar interface is used.  Set only those that are not.
12103 # We use the long form for the default assignment because of an extremely
12104 # bizarre bug on SunOS 4.1.3.
12105 if $ac_need_defaults; then
12106   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12107 fi
12108
12109 # Have a temporary directory for convenience.  Make it in the build tree
12110 # simply because there is no reason against having it here, and in addition,
12111 # creating and moving files from /tmp can sometimes cause problems.
12112 # Hook for its removal unless debugging.
12113 # Note that there is a small window in which the directory will not be cleaned:
12114 # after its creation but before its name has been assigned to `$tmp'.
12115 $debug ||
12116 {
12117   tmp=
12118   trap 'exit_status=$?
12119   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
12120 ' 0
12121   trap '{ (exit 1); exit 1; }' 1 2 13 15
12122 }
12123 # Create a (secure) tmp directory for tmp files.
12124
12125 {
12126   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
12127   test -n "$tmp" && test -d "$tmp"
12128 }  ||
12129 {
12130   tmp=./conf$$-$RANDOM
12131   (umask 077 && mkdir "$tmp")
12132 } ||
12133 {
12134    $as_echo "$as_me: cannot create a temporary directory in ." >&2
12135    { (exit 1); exit 1; }
12136 }
12137
12138 # Set up the scripts for CONFIG_FILES section.
12139 # No need to generate them if there are no CONFIG_FILES.
12140 # This happens for instance with `./config.status config.h'.
12141 if test -n "$CONFIG_FILES"; then
12142
12143
12144 ac_cr='\r'
12145 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
12146 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
12147   ac_cs_awk_cr='\\r'
12148 else
12149   ac_cs_awk_cr=$ac_cr
12150 fi
12151
12152 echo 'BEGIN {' >"$tmp/subs1.awk" &&
12153 _ACEOF
12154
12155
12156 {
12157   echo "cat >conf$$subs.awk <<_ACEOF" &&
12158   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
12159   echo "_ACEOF"
12160 } >conf$$subs.sh ||
12161   { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
12162 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
12163    { (exit 1); exit 1; }; }
12164 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
12165 ac_delim='%!_!# '
12166 for ac_last_try in false false false false false :; do
12167   . ./conf$$subs.sh ||
12168     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
12169 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
12170    { (exit 1); exit 1; }; }
12171
12172   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
12173   if test $ac_delim_n = $ac_delim_num; then
12174     break
12175   elif $ac_last_try; then
12176     { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
12177 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
12178    { (exit 1); exit 1; }; }
12179   else
12180     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12181   fi
12182 done
12183 rm -f conf$$subs.sh
12184
12185 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12186 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
12187 _ACEOF
12188 sed -n '
12189 h
12190 s/^/S["/; s/!.*/"]=/
12191 p
12192 g
12193 s/^[^!]*!//
12194 :repl
12195 t repl
12196 s/'"$ac_delim"'$//
12197 t delim
12198 :nl
12199 h
12200 s/\(.\{148\}\).*/\1/
12201 t more1
12202 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
12203 p
12204 n
12205 b repl
12206 :more1
12207 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
12208 p
12209 g
12210 s/.\{148\}//
12211 t nl
12212 :delim
12213 h
12214 s/\(.\{148\}\).*/\1/
12215 t more2
12216 s/["\\]/\\&/g; s/^/"/; s/$/"/
12217 p
12218 b
12219 :more2
12220 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
12221 p
12222 g
12223 s/.\{148\}//
12224 t delim
12225 ' <conf$$subs.awk | sed '
12226 /^[^""]/{
12227   N
12228   s/\n//
12229 }
12230 ' >>$CONFIG_STATUS || ac_write_fail=1
12231 rm -f conf$$subs.awk
12232 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12233 _ACAWK
12234 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
12235   for (key in S) S_is_set[key] = 1
12236   FS = "\a"
12237
12238 }
12239 {
12240   line = $ 0
12241   nfields = split(line, field, "@")
12242   substed = 0
12243   len = length(field[1])
12244   for (i = 2; i < nfields; i++) {
12245     key = field[i]
12246     keylen = length(key)
12247     if (S_is_set[key]) {
12248       value = S[key]
12249       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
12250       len += length(value) + length(field[++i])
12251       substed = 1
12252     } else
12253       len += 1 + keylen
12254   }
12255
12256   print line
12257 }
12258
12259 _ACAWK
12260 _ACEOF
12261 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12262 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
12263   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
12264 else
12265   cat
12266 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
12267   || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
12268 $as_echo "$as_me: error: could not setup config files machinery" >&2;}
12269    { (exit 1); exit 1; }; }
12270 _ACEOF
12271
12272 # VPATH may cause trouble with some makes, so we remove $(srcdir),
12273 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12274 # trailing colons and then remove the whole line if VPATH becomes empty
12275 # (actually we leave an empty line to preserve line numbers).
12276 if test "x$srcdir" = x.; then
12277   ac_vpsub='/^[  ]*VPATH[        ]*=/{
12278 s/:*\$(srcdir):*/:/
12279 s/:*\${srcdir}:*/:/
12280 s/:*@srcdir@:*/:/
12281 s/^\([^=]*=[     ]*\):*/\1/
12282 s/:*$//
12283 s/^[^=]*=[       ]*$//
12284 }'
12285 fi
12286
12287 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12288 fi # test -n "$CONFIG_FILES"
12289
12290
12291 eval set X "  :F $CONFIG_FILES      "
12292 shift
12293 for ac_tag
12294 do
12295   case $ac_tag in
12296   :[FHLC]) ac_mode=$ac_tag; continue;;
12297   esac
12298   case $ac_mode$ac_tag in
12299   :[FHL]*:*);;
12300   :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
12301 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
12302    { (exit 1); exit 1; }; };;
12303   :[FH]-) ac_tag=-:-;;
12304   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
12305   esac
12306   ac_save_IFS=$IFS
12307   IFS=:
12308   set x $ac_tag
12309   IFS=$ac_save_IFS
12310   shift
12311   ac_file=$1
12312   shift
12313
12314   case $ac_mode in
12315   :L) ac_source=$1;;
12316   :[FH])
12317     ac_file_inputs=
12318     for ac_f
12319     do
12320       case $ac_f in
12321       -) ac_f="$tmp/stdin";;
12322       *) # Look for the file first in the build tree, then in the source tree
12323          # (if the path is not absolute).  The absolute path cannot be DOS-style,
12324          # because $ac_f cannot contain `:'.
12325          test -f "$ac_f" ||
12326            case $ac_f in
12327            [\\/$]*) false;;
12328            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
12329            esac ||
12330            { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
12331 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
12332    { (exit 1); exit 1; }; };;
12333       esac
12334       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
12335       ac_file_inputs="$ac_file_inputs '$ac_f'"
12336     done
12337
12338     # Let's still pretend it is `configure' which instantiates (i.e., don't
12339     # use $as_me), people would be surprised to read:
12340     #    /* config.h.  Generated by config.status.  */
12341     configure_input='Generated from '`
12342           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
12343         `' by configure.'
12344     if test x"$ac_file" != x-; then
12345       configure_input="$ac_file.  $configure_input"
12346       { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
12347 $as_echo "$as_me: creating $ac_file" >&6;}
12348     fi
12349     # Neutralize special characters interpreted by sed in replacement strings.
12350     case $configure_input in #(
12351     *\&* | *\|* | *\\* )
12352        ac_sed_conf_input=`$as_echo "$configure_input" |
12353        sed 's/[\\\\&|]/\\\\&/g'`;; #(
12354     *) ac_sed_conf_input=$configure_input;;
12355     esac
12356
12357     case $ac_tag in
12358     *:-:* | *:-) cat >"$tmp/stdin" \
12359       || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
12360 $as_echo "$as_me: error: could not create $ac_file" >&2;}
12361    { (exit 1); exit 1; }; } ;;
12362     esac
12363     ;;
12364   esac
12365
12366   ac_dir=`$as_dirname -- "$ac_file" ||
12367 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12368          X"$ac_file" : 'X\(//\)[^/]' \| \
12369          X"$ac_file" : 'X\(//\)$' \| \
12370          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
12371 $as_echo X"$ac_file" |
12372     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12373             s//\1/
12374             q
12375           }
12376           /^X\(\/\/\)[^/].*/{
12377             s//\1/
12378             q
12379           }
12380           /^X\(\/\/\)$/{
12381             s//\1/
12382             q
12383           }
12384           /^X\(\/\).*/{
12385             s//\1/
12386             q
12387           }
12388           s/.*/./; q'`
12389   { as_dir="$ac_dir"
12390   case $as_dir in #(
12391   -*) as_dir=./$as_dir;;
12392   esac
12393   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
12394     as_dirs=
12395     while :; do
12396       case $as_dir in #(
12397       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
12398       *) as_qdir=$as_dir;;
12399       esac
12400       as_dirs="'$as_qdir' $as_dirs"
12401       as_dir=`$as_dirname -- "$as_dir" ||
12402 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12403          X"$as_dir" : 'X\(//\)[^/]' \| \
12404          X"$as_dir" : 'X\(//\)$' \| \
12405          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
12406 $as_echo X"$as_dir" |
12407     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12408             s//\1/
12409             q
12410           }
12411           /^X\(\/\/\)[^/].*/{
12412             s//\1/
12413             q
12414           }
12415           /^X\(\/\/\)$/{
12416             s//\1/
12417             q
12418           }
12419           /^X\(\/\).*/{
12420             s//\1/
12421             q
12422           }
12423           s/.*/./; q'`
12424       test -d "$as_dir" && break
12425     done
12426     test -z "$as_dirs" || eval "mkdir $as_dirs"
12427   } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
12428 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
12429    { (exit 1); exit 1; }; }; }
12430   ac_builddir=.
12431
12432 case "$ac_dir" in
12433 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
12434 *)
12435   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
12436   # A ".." for each directory in $ac_dir_suffix.
12437   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
12438   case $ac_top_builddir_sub in
12439   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
12440   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
12441   esac ;;
12442 esac
12443 ac_abs_top_builddir=$ac_pwd
12444 ac_abs_builddir=$ac_pwd$ac_dir_suffix
12445 # for backward compatibility:
12446 ac_top_builddir=$ac_top_build_prefix
12447
12448 case $srcdir in
12449   .)  # We are building in place.
12450     ac_srcdir=.
12451     ac_top_srcdir=$ac_top_builddir_sub
12452     ac_abs_top_srcdir=$ac_pwd ;;
12453   [\\/]* | ?:[\\/]* )  # Absolute name.
12454     ac_srcdir=$srcdir$ac_dir_suffix;
12455     ac_top_srcdir=$srcdir
12456     ac_abs_top_srcdir=$srcdir ;;
12457   *) # Relative name.
12458     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
12459     ac_top_srcdir=$ac_top_build_prefix$srcdir
12460     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
12461 esac
12462 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
12463
12464
12465   case $ac_mode in
12466   :F)
12467   #
12468   # CONFIG_FILE
12469   #
12470
12471   case $INSTALL in
12472   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12473   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
12474   esac
12475 _ACEOF
12476
12477 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12478 # If the template does not know about datarootdir, expand it.
12479 # FIXME: This hack should be removed a few years after 2.60.
12480 ac_datarootdir_hack=; ac_datarootdir_seen=
12481
12482 ac_sed_dataroot='
12483 /datarootdir/ {
12484   p
12485   q
12486 }
12487 /@datadir@/p
12488 /@docdir@/p
12489 /@infodir@/p
12490 /@localedir@/p
12491 /@mandir@/p
12492 '
12493 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
12494 *datarootdir*) ac_datarootdir_seen=yes;;
12495 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
12496   { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
12497 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
12498 _ACEOF
12499 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12500   ac_datarootdir_hack='
12501   s&@datadir@&$datadir&g
12502   s&@docdir@&$docdir&g
12503   s&@infodir@&$infodir&g
12504   s&@localedir@&$localedir&g
12505   s&@mandir@&$mandir&g
12506     s&\\\${datarootdir}&$datarootdir&g' ;;
12507 esac
12508 _ACEOF
12509
12510 # Neutralize VPATH when `$srcdir' = `.'.
12511 # Shell code in configure.ac might set extrasub.
12512 # FIXME: do we really want to maintain this feature?
12513 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12514 ac_sed_extra="$ac_vpsub
12515 $extrasub
12516 _ACEOF
12517 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12518 :t
12519 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12520 s|@configure_input@|$ac_sed_conf_input|;t t
12521 s&@top_builddir@&$ac_top_builddir_sub&;t t
12522 s&@top_build_prefix@&$ac_top_build_prefix&;t t
12523 s&@srcdir@&$ac_srcdir&;t t
12524 s&@abs_srcdir@&$ac_abs_srcdir&;t t
12525 s&@top_srcdir@&$ac_top_srcdir&;t t
12526 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
12527 s&@builddir@&$ac_builddir&;t t
12528 s&@abs_builddir@&$ac_abs_builddir&;t t
12529 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
12530 s&@INSTALL@&$ac_INSTALL&;t t
12531 $ac_datarootdir_hack
12532 "
12533 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
12534   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
12535 $as_echo "$as_me: error: could not create $ac_file" >&2;}
12536    { (exit 1); exit 1; }; }
12537
12538 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
12539   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
12540   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
12541   { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12542 which seems to be undefined.  Please make sure it is defined." >&5
12543 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
12544 which seems to be undefined.  Please make sure it is defined." >&2;}
12545
12546   rm -f "$tmp/stdin"
12547   case $ac_file in
12548   -) cat "$tmp/out" && rm -f "$tmp/out";;
12549   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
12550   esac \
12551   || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
12552 $as_echo "$as_me: error: could not create $ac_file" >&2;}
12553    { (exit 1); exit 1; }; }
12554  ;;
12555
12556
12557
12558   esac
12559
12560 done # for ac_tag
12561
12562
12563 { (exit 0); exit 0; }
12564 _ACEOF
12565 chmod +x $CONFIG_STATUS
12566 ac_clean_files=$ac_clean_files_save
12567
12568 test $ac_write_fail = 0 ||
12569   { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
12570 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
12571    { (exit 1); exit 1; }; }
12572
12573
12574 # configure is writing to config.log, and then calls config.status.
12575 # config.status does its own redirection, appending to config.log.
12576 # Unfortunately, on DOS this fails, as config.log is still kept open
12577 # by configure, so config.status won't be able to write to it; its
12578 # output is simply discarded.  So we exec the FD to /dev/null,
12579 # effectively closing config.log, so it can be properly (re)opened and
12580 # appended to by config.status.  When coming back to configure, we
12581 # need to make the FD available again.
12582 if test "$no_create" != yes; then
12583   ac_cs_success=:
12584   ac_config_status_args=
12585   test "$silent" = yes &&
12586     ac_config_status_args="$ac_config_status_args --quiet"
12587   exec 5>/dev/null
12588   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
12589   exec 5>>config.log
12590   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12591   # would make configure fail if this is the last instruction.
12592   $ac_cs_success || { (exit 1); exit 1; }
12593 fi
12594 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
12595   { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
12596 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
12597 fi
12598