]> git.sven.stormbind.net Git - sven/mysqltcl.git/blob - configure
Update VCS-* information in debian/control to the new git repository.
[sven/mysqltcl.git] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.61 for mysqltcl 3.05.
4 #
5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006 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   # Zsh 3.x and 4.x performs 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 # The user is always right.
41 if test "${PATH_SEPARATOR+set}" != set; then
42   echo "#! /bin/sh" >conf$$.sh
43   echo  "exit 0"   >>conf$$.sh
44   chmod +x conf$$.sh
45   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
46     PATH_SEPARATOR=';'
47   else
48     PATH_SEPARATOR=:
49   fi
50   rm -f conf$$.sh
51 fi
52
53 # Support unset when possible.
54 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
55   as_unset=unset
56 else
57   as_unset=false
58 fi
59
60
61 # IFS
62 # We need space, tab and new line, in precisely that order.  Quoting is
63 # there to prevent editors from complaining about space-tab.
64 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
65 # splitting by setting IFS to empty value.)
66 as_nl='
67 '
68 IFS=" ""        $as_nl"
69
70 # Find who we are.  Look in the path if we contain no directory separator.
71 case $0 in
72   *[\\/]* ) as_myself=$0 ;;
73   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
74 for as_dir in $PATH
75 do
76   IFS=$as_save_IFS
77   test -z "$as_dir" && as_dir=.
78   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
79 done
80 IFS=$as_save_IFS
81
82      ;;
83 esac
84 # We did not find ourselves, most probably we were run as `sh COMMAND'
85 # in which case we are not to be found in the path.
86 if test "x$as_myself" = x; then
87   as_myself=$0
88 fi
89 if test ! -f "$as_myself"; then
90   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
91   { (exit 1); exit 1; }
92 fi
93
94 # Work around bugs in pre-3.0 UWIN ksh.
95 for as_var in ENV MAIL MAILPATH
96 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
97 done
98 PS1='$ '
99 PS2='> '
100 PS4='+ '
101
102 # NLS nuisances.
103 for as_var in \
104   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
105   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
106   LC_TELEPHONE LC_TIME
107 do
108   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
109     eval $as_var=C; export $as_var
110   else
111     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
112   fi
113 done
114
115 # Required to use basename.
116 if expr a : '\(a\)' >/dev/null 2>&1 &&
117    test "X`expr 00001 : '.*\(...\)'`" = X001; then
118   as_expr=expr
119 else
120   as_expr=false
121 fi
122
123 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
124   as_basename=basename
125 else
126   as_basename=false
127 fi
128
129
130 # Name of the executable.
131 as_me=`$as_basename -- "$0" ||
132 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133          X"$0" : 'X\(//\)$' \| \
134          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
135 echo X/"$0" |
136     sed '/^.*\/\([^/][^/]*\)\/*$/{
137             s//\1/
138             q
139           }
140           /^X\/\(\/\/\)$/{
141             s//\1/
142             q
143           }
144           /^X\/\(\/\).*/{
145             s//\1/
146             q
147           }
148           s/.*/./; q'`
149
150 # CDPATH.
151 $as_unset CDPATH
152
153
154 if test "x$CONFIG_SHELL" = x; then
155   if (eval ":") 2>/dev/null; then
156   as_have_required=yes
157 else
158   as_have_required=no
159 fi
160
161   if test $as_have_required = yes &&     (eval ":
162 (as_func_return () {
163   (exit \$1)
164 }
165 as_func_success () {
166   as_func_return 0
167 }
168 as_func_failure () {
169   as_func_return 1
170 }
171 as_func_ret_success () {
172   return 0
173 }
174 as_func_ret_failure () {
175   return 1
176 }
177
178 exitcode=0
179 if as_func_success; then
180   :
181 else
182   exitcode=1
183   echo as_func_success failed.
184 fi
185
186 if as_func_failure; then
187   exitcode=1
188   echo as_func_failure succeeded.
189 fi
190
191 if as_func_ret_success; then
192   :
193 else
194   exitcode=1
195   echo as_func_ret_success failed.
196 fi
197
198 if as_func_ret_failure; then
199   exitcode=1
200   echo as_func_ret_failure succeeded.
201 fi
202
203 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
204   :
205 else
206   exitcode=1
207   echo positional parameters were not saved.
208 fi
209
210 test \$exitcode = 0) || { (exit 1); exit 1; }
211
212 (
213   as_lineno_1=\$LINENO
214   as_lineno_2=\$LINENO
215   test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
216   test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
217 ") 2> /dev/null; then
218   :
219 else
220   as_candidate_shells=
221     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
222 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
223 do
224   IFS=$as_save_IFS
225   test -z "$as_dir" && as_dir=.
226   case $as_dir in
227          /*)
228            for as_base in sh bash ksh sh5; do
229              as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
230            done;;
231        esac
232 done
233 IFS=$as_save_IFS
234
235
236       for as_shell in $as_candidate_shells $SHELL; do
237          # Try only shells that exist, to save several forks.
238          if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
239                 { ("$as_shell") 2> /dev/null <<\_ASEOF
240 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241   emulate sh
242   NULLCMD=:
243   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244   # is contrary to our usage.  Disable this feature.
245   alias -g '${1+"$@"}'='"$@"'
246   setopt NO_GLOB_SUBST
247 else
248   case `(set -o) 2>/dev/null` in
249   *posix*) set -o posix ;;
250 esac
251
252 fi
253
254
255 :
256 _ASEOF
257 }; then
258   CONFIG_SHELL=$as_shell
259                as_have_required=yes
260                if { "$as_shell" 2> /dev/null <<\_ASEOF
261 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262   emulate sh
263   NULLCMD=:
264   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
265   # is contrary to our usage.  Disable this feature.
266   alias -g '${1+"$@"}'='"$@"'
267   setopt NO_GLOB_SUBST
268 else
269   case `(set -o) 2>/dev/null` in
270   *posix*) set -o posix ;;
271 esac
272
273 fi
274
275
276 :
277 (as_func_return () {
278   (exit $1)
279 }
280 as_func_success () {
281   as_func_return 0
282 }
283 as_func_failure () {
284   as_func_return 1
285 }
286 as_func_ret_success () {
287   return 0
288 }
289 as_func_ret_failure () {
290   return 1
291 }
292
293 exitcode=0
294 if as_func_success; then
295   :
296 else
297   exitcode=1
298   echo as_func_success failed.
299 fi
300
301 if as_func_failure; then
302   exitcode=1
303   echo as_func_failure succeeded.
304 fi
305
306 if as_func_ret_success; then
307   :
308 else
309   exitcode=1
310   echo as_func_ret_success failed.
311 fi
312
313 if as_func_ret_failure; then
314   exitcode=1
315   echo as_func_ret_failure succeeded.
316 fi
317
318 if ( set x; as_func_ret_success y && test x = "$1" ); then
319   :
320 else
321   exitcode=1
322   echo positional parameters were not saved.
323 fi
324
325 test $exitcode = 0) || { (exit 1); exit 1; }
326
327 (
328   as_lineno_1=$LINENO
329   as_lineno_2=$LINENO
330   test "x$as_lineno_1" != "x$as_lineno_2" &&
331   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
332
333 _ASEOF
334 }; then
335   break
336 fi
337
338 fi
339
340       done
341
342       if test "x$CONFIG_SHELL" != x; then
343   for as_var in BASH_ENV ENV
344         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
345         done
346         export CONFIG_SHELL
347         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
348 fi
349
350
351     if test $as_have_required = no; then
352   echo This script requires a shell more modern than all the
353       echo shells that I found on your system.  Please install a
354       echo modern shell, or manually run the script under such a
355       echo shell if you do have one.
356       { (exit 1); exit 1; }
357 fi
358
359
360 fi
361
362 fi
363
364
365
366 (eval "as_func_return () {
367   (exit \$1)
368 }
369 as_func_success () {
370   as_func_return 0
371 }
372 as_func_failure () {
373   as_func_return 1
374 }
375 as_func_ret_success () {
376   return 0
377 }
378 as_func_ret_failure () {
379   return 1
380 }
381
382 exitcode=0
383 if as_func_success; then
384   :
385 else
386   exitcode=1
387   echo as_func_success failed.
388 fi
389
390 if as_func_failure; then
391   exitcode=1
392   echo as_func_failure succeeded.
393 fi
394
395 if as_func_ret_success; then
396   :
397 else
398   exitcode=1
399   echo as_func_ret_success failed.
400 fi
401
402 if as_func_ret_failure; then
403   exitcode=1
404   echo as_func_ret_failure succeeded.
405 fi
406
407 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
408   :
409 else
410   exitcode=1
411   echo positional parameters were not saved.
412 fi
413
414 test \$exitcode = 0") || {
415   echo No shell found that supports shell functions.
416   echo Please tell autoconf@gnu.org about your system,
417   echo including any error possibly output before this
418   echo message
419 }
420
421
422
423   as_lineno_1=$LINENO
424   as_lineno_2=$LINENO
425   test "x$as_lineno_1" != "x$as_lineno_2" &&
426   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
427
428   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
429   # uniformly replaced by the line number.  The first 'sed' inserts a
430   # line-number line after each line using $LINENO; the second 'sed'
431   # does the real work.  The second script uses 'N' to pair each
432   # line-number line with the line containing $LINENO, and appends
433   # trailing '-' during substitution so that $LINENO is not a special
434   # case at line end.
435   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
436   # scripts with optimization help from Paolo Bonzini.  Blame Lee
437   # E. McMahon (1931-1989) for sed's syntax.  :-)
438   sed -n '
439     p
440     /[$]LINENO/=
441   ' <$as_myself |
442     sed '
443       s/[$]LINENO.*/&-/
444       t lineno
445       b
446       :lineno
447       N
448       :loop
449       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
450       t loop
451       s/-\n.*//
452     ' >$as_me.lineno &&
453   chmod +x "$as_me.lineno" ||
454     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
455    { (exit 1); exit 1; }; }
456
457   # Don't try to exec as it changes $[0], causing all sort of problems
458   # (the dirname of $[0] is not the place where we might find the
459   # original and so on.  Autoconf is especially sensitive to this).
460   . "./$as_me.lineno"
461   # Exit status is that of the last command.
462   exit
463 }
464
465
466 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
467   as_dirname=dirname
468 else
469   as_dirname=false
470 fi
471
472 ECHO_C= ECHO_N= ECHO_T=
473 case `echo -n x` in
474 -n*)
475   case `echo 'x\c'` in
476   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
477   *)   ECHO_C='\c';;
478   esac;;
479 *)
480   ECHO_N='-n';;
481 esac
482
483 if expr a : '\(a\)' >/dev/null 2>&1 &&
484    test "X`expr 00001 : '.*\(...\)'`" = X001; then
485   as_expr=expr
486 else
487   as_expr=false
488 fi
489
490 rm -f conf$$ conf$$.exe conf$$.file
491 if test -d conf$$.dir; then
492   rm -f conf$$.dir/conf$$.file
493 else
494   rm -f conf$$.dir
495   mkdir conf$$.dir
496 fi
497 echo >conf$$.file
498 if ln -s conf$$.file conf$$ 2>/dev/null; then
499   as_ln_s='ln -s'
500   # ... but there are two gotchas:
501   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
502   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
503   # In both cases, we have to default to `cp -p'.
504   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
505     as_ln_s='cp -p'
506 elif ln conf$$.file conf$$ 2>/dev/null; then
507   as_ln_s=ln
508 else
509   as_ln_s='cp -p'
510 fi
511 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
512 rmdir conf$$.dir 2>/dev/null
513
514 if mkdir -p . 2>/dev/null; then
515   as_mkdir_p=:
516 else
517   test -d ./-p && rmdir ./-p
518   as_mkdir_p=false
519 fi
520
521 if test -x / >/dev/null 2>&1; then
522   as_test_x='test -x'
523 else
524   if ls -dL / >/dev/null 2>&1; then
525     as_ls_L_option=L
526   else
527     as_ls_L_option=
528   fi
529   as_test_x='
530     eval sh -c '\''
531       if test -d "$1"; then
532         test -d "$1/.";
533       else
534         case $1 in
535         -*)set "./$1";;
536         esac;
537         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
538         ???[sx]*):;;*)false;;esac;fi
539     '\'' sh
540   '
541 fi
542 as_executable_p=$as_test_x
543
544 # Sed expression to map a string onto a valid CPP name.
545 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
546
547 # Sed expression to map a string onto a valid variable name.
548 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
549
550
551
552 exec 7<&0 </dev/null 6>&1
553
554 # Name of the host.
555 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
556 # so uname gets run too.
557 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
558
559 #
560 # Initializations.
561 #
562 ac_default_prefix=/usr/local
563 ac_clean_files=
564 ac_config_libobj_dir=.
565 LIBOBJS=
566 cross_compiling=no
567 subdirs=
568 MFLAGS=
569 MAKEFLAGS=
570 SHELL=${CONFIG_SHELL-/bin/sh}
571
572 # Identity of this package.
573 PACKAGE_NAME='mysqltcl'
574 PACKAGE_TARNAME='mysqltcl'
575 PACKAGE_VERSION='3.05'
576 PACKAGE_STRING='mysqltcl 3.05'
577 PACKAGE_BUGREPORT=''
578
579 # Factoring default headers for most tests.
580 ac_includes_default="\
581 #include <stdio.h>
582 #ifdef HAVE_SYS_TYPES_H
583 # include <sys/types.h>
584 #endif
585 #ifdef HAVE_SYS_STAT_H
586 # include <sys/stat.h>
587 #endif
588 #ifdef STDC_HEADERS
589 # include <stdlib.h>
590 # include <stddef.h>
591 #else
592 # ifdef HAVE_STDLIB_H
593 #  include <stdlib.h>
594 # endif
595 #endif
596 #ifdef HAVE_STRING_H
597 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
598 #  include <memory.h>
599 # endif
600 # include <string.h>
601 #endif
602 #ifdef HAVE_STRINGS_H
603 # include <strings.h>
604 #endif
605 #ifdef HAVE_INTTYPES_H
606 # include <inttypes.h>
607 #endif
608 #ifdef HAVE_STDINT_H
609 # include <stdint.h>
610 #endif
611 #ifdef HAVE_UNISTD_H
612 # include <unistd.h>
613 #endif"
614
615 ac_subst_vars='SHELL
616 PATH_SEPARATOR
617 PACKAGE_NAME
618 PACKAGE_TARNAME
619 PACKAGE_VERSION
620 PACKAGE_STRING
621 PACKAGE_BUGREPORT
622 exec_prefix
623 prefix
624 program_transform_name
625 bindir
626 sbindir
627 libexecdir
628 datarootdir
629 datadir
630 sysconfdir
631 sharedstatedir
632 localstatedir
633 includedir
634 oldincludedir
635 docdir
636 infodir
637 htmldir
638 dvidir
639 pdfdir
640 psdir
641 libdir
642 localedir
643 mandir
644 DEFS
645 ECHO_C
646 ECHO_N
647 ECHO_T
648 LIBS
649 build_alias
650 host_alias
651 target_alias
652 CYGPATH
653 EXEEXT
654 PKG_LIB_FILE
655 PKG_STUB_LIB_FILE
656 PKG_STUB_SOURCES
657 PKG_STUB_OBJECTS
658 PKG_TCL_SOURCES
659 PKG_HEADERS
660 PKG_INCLUDES
661 PKG_LIBS
662 PKG_CFLAGS
663 TCL_VERSION
664 TCL_BIN_DIR
665 TCL_SRC_DIR
666 TCL_LIB_FILE
667 TCL_LIB_FLAG
668 TCL_LIB_SPEC
669 TCL_STUB_LIB_FILE
670 TCL_STUB_LIB_FLAG
671 TCL_STUB_LIB_SPEC
672 TCL_LIBS
673 TCL_DEFS
674 TCL_EXTRA_CFLAGS
675 TCL_LD_FLAGS
676 TCL_SHLIB_LD_LIBS
677 CC
678 CFLAGS
679 LDFLAGS
680 CPPFLAGS
681 ac_ct_CC
682 OBJEXT
683 CPP
684 INSTALL_PROGRAM
685 INSTALL_SCRIPT
686 INSTALL_DATA
687 SET_MAKE
688 RANLIB
689 GREP
690 EGREP
691 MATH_LIBS
692 PKG_SOURCES
693 PKG_OBJECTS
694 CLEANFILES
695 TCL_INCLUDES
696 TCL_THREADS
697 SHARED_BUILD
698 AR
699 CELIB_DIR
700 LIBOBJS
701 DL_LIBS
702 CFLAGS_DEBUG
703 CFLAGS_OPTIMIZE
704 CFLAGS_WARNING
705 STLIB_LD
706 SHLIB_LD
707 SHLIB_LD_LIBS
708 SHLIB_CFLAGS
709 LD_LIBRARY_PATH_VAR
710 TCL_DBGX
711 CFLAGS_DEFAULT
712 LDFLAGS_DEFAULT
713 MAKE_LIB
714 MAKE_SHARED_LIB
715 MAKE_STATIC_LIB
716 MAKE_STUB_LIB
717 RANLIB_STUB
718 LIBMYSQL
719 MYSQL_INCLUDES
720 MYSQL_LIBS
721 MYSQL_LIB_DIR
722 TCLSH_PROG
723 LTLIBOBJS'
724 ac_subst_files=''
725       ac_precious_vars='build_alias
726 host_alias
727 target_alias
728 CC
729 CFLAGS
730 LDFLAGS
731 LIBS
732 CPPFLAGS
733 CPP'
734
735
736 # Initialize some variables set by options.
737 ac_init_help=
738 ac_init_version=false
739 # The variables have the same names as the options, with
740 # dashes changed to underlines.
741 cache_file=/dev/null
742 exec_prefix=NONE
743 no_create=
744 no_recursion=
745 prefix=NONE
746 program_prefix=NONE
747 program_suffix=NONE
748 program_transform_name=s,x,x,
749 silent=
750 site=
751 srcdir=
752 verbose=
753 x_includes=NONE
754 x_libraries=NONE
755
756 # Installation directory options.
757 # These are left unexpanded so users can "make install exec_prefix=/foo"
758 # and all the variables that are supposed to be based on exec_prefix
759 # by default will actually change.
760 # Use braces instead of parens because sh, perl, etc. also accept them.
761 # (The list follows the same order as the GNU Coding Standards.)
762 bindir='${exec_prefix}/bin'
763 sbindir='${exec_prefix}/sbin'
764 libexecdir='${exec_prefix}/libexec'
765 datarootdir='${prefix}/share'
766 datadir='${datarootdir}'
767 sysconfdir='${prefix}/etc'
768 sharedstatedir='${prefix}/com'
769 localstatedir='${prefix}/var'
770 includedir='${prefix}/include'
771 oldincludedir='/usr/include'
772 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
773 infodir='${datarootdir}/info'
774 htmldir='${docdir}'
775 dvidir='${docdir}'
776 pdfdir='${docdir}'
777 psdir='${docdir}'
778 libdir='${exec_prefix}/lib'
779 localedir='${datarootdir}/locale'
780 mandir='${datarootdir}/man'
781
782 ac_prev=
783 ac_dashdash=
784 for ac_option
785 do
786   # If the previous option needs an argument, assign it.
787   if test -n "$ac_prev"; then
788     eval $ac_prev=\$ac_option
789     ac_prev=
790     continue
791   fi
792
793   case $ac_option in
794   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
795   *)    ac_optarg=yes ;;
796   esac
797
798   # Accept the important Cygnus configure options, so we can diagnose typos.
799
800   case $ac_dashdash$ac_option in
801   --)
802     ac_dashdash=yes ;;
803
804   -bindir | --bindir | --bindi | --bind | --bin | --bi)
805     ac_prev=bindir ;;
806   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
807     bindir=$ac_optarg ;;
808
809   -build | --build | --buil | --bui | --bu)
810     ac_prev=build_alias ;;
811   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
812     build_alias=$ac_optarg ;;
813
814   -cache-file | --cache-file | --cache-fil | --cache-fi \
815   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
816     ac_prev=cache_file ;;
817   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
818   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
819     cache_file=$ac_optarg ;;
820
821   --config-cache | -C)
822     cache_file=config.cache ;;
823
824   -datadir | --datadir | --datadi | --datad)
825     ac_prev=datadir ;;
826   -datadir=* | --datadir=* | --datadi=* | --datad=*)
827     datadir=$ac_optarg ;;
828
829   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
830   | --dataroo | --dataro | --datar)
831     ac_prev=datarootdir ;;
832   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
833   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
834     datarootdir=$ac_optarg ;;
835
836   -disable-* | --disable-*)
837     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
838     # Reject names that are not valid shell variable names.
839     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
840       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
841    { (exit 1); exit 1; }; }
842     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
843     eval enable_$ac_feature=no ;;
844
845   -docdir | --docdir | --docdi | --doc | --do)
846     ac_prev=docdir ;;
847   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
848     docdir=$ac_optarg ;;
849
850   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
851     ac_prev=dvidir ;;
852   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
853     dvidir=$ac_optarg ;;
854
855   -enable-* | --enable-*)
856     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
857     # Reject names that are not valid shell variable names.
858     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
859       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
860    { (exit 1); exit 1; }; }
861     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
862     eval enable_$ac_feature=\$ac_optarg ;;
863
864   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
865   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
866   | --exec | --exe | --ex)
867     ac_prev=exec_prefix ;;
868   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
869   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
870   | --exec=* | --exe=* | --ex=*)
871     exec_prefix=$ac_optarg ;;
872
873   -gas | --gas | --ga | --g)
874     # Obsolete; use --with-gas.
875     with_gas=yes ;;
876
877   -help | --help | --hel | --he | -h)
878     ac_init_help=long ;;
879   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
880     ac_init_help=recursive ;;
881   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
882     ac_init_help=short ;;
883
884   -host | --host | --hos | --ho)
885     ac_prev=host_alias ;;
886   -host=* | --host=* | --hos=* | --ho=*)
887     host_alias=$ac_optarg ;;
888
889   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
890     ac_prev=htmldir ;;
891   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
892   | --ht=*)
893     htmldir=$ac_optarg ;;
894
895   -includedir | --includedir | --includedi | --included | --include \
896   | --includ | --inclu | --incl | --inc)
897     ac_prev=includedir ;;
898   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
899   | --includ=* | --inclu=* | --incl=* | --inc=*)
900     includedir=$ac_optarg ;;
901
902   -infodir | --infodir | --infodi | --infod | --info | --inf)
903     ac_prev=infodir ;;
904   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
905     infodir=$ac_optarg ;;
906
907   -libdir | --libdir | --libdi | --libd)
908     ac_prev=libdir ;;
909   -libdir=* | --libdir=* | --libdi=* | --libd=*)
910     libdir=$ac_optarg ;;
911
912   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
913   | --libexe | --libex | --libe)
914     ac_prev=libexecdir ;;
915   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
916   | --libexe=* | --libex=* | --libe=*)
917     libexecdir=$ac_optarg ;;
918
919   -localedir | --localedir | --localedi | --localed | --locale)
920     ac_prev=localedir ;;
921   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
922     localedir=$ac_optarg ;;
923
924   -localstatedir | --localstatedir | --localstatedi | --localstated \
925   | --localstate | --localstat | --localsta | --localst | --locals)
926     ac_prev=localstatedir ;;
927   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
928   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
929     localstatedir=$ac_optarg ;;
930
931   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
932     ac_prev=mandir ;;
933   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
934     mandir=$ac_optarg ;;
935
936   -nfp | --nfp | --nf)
937     # Obsolete; use --without-fp.
938     with_fp=no ;;
939
940   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
941   | --no-cr | --no-c | -n)
942     no_create=yes ;;
943
944   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
945   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
946     no_recursion=yes ;;
947
948   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
949   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
950   | --oldin | --oldi | --old | --ol | --o)
951     ac_prev=oldincludedir ;;
952   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
953   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
954   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
955     oldincludedir=$ac_optarg ;;
956
957   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
958     ac_prev=prefix ;;
959   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
960     prefix=$ac_optarg ;;
961
962   -program-prefix | --program-prefix | --program-prefi | --program-pref \
963   | --program-pre | --program-pr | --program-p)
964     ac_prev=program_prefix ;;
965   -program-prefix=* | --program-prefix=* | --program-prefi=* \
966   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
967     program_prefix=$ac_optarg ;;
968
969   -program-suffix | --program-suffix | --program-suffi | --program-suff \
970   | --program-suf | --program-su | --program-s)
971     ac_prev=program_suffix ;;
972   -program-suffix=* | --program-suffix=* | --program-suffi=* \
973   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
974     program_suffix=$ac_optarg ;;
975
976   -program-transform-name | --program-transform-name \
977   | --program-transform-nam | --program-transform-na \
978   | --program-transform-n | --program-transform- \
979   | --program-transform | --program-transfor \
980   | --program-transfo | --program-transf \
981   | --program-trans | --program-tran \
982   | --progr-tra | --program-tr | --program-t)
983     ac_prev=program_transform_name ;;
984   -program-transform-name=* | --program-transform-name=* \
985   | --program-transform-nam=* | --program-transform-na=* \
986   | --program-transform-n=* | --program-transform-=* \
987   | --program-transform=* | --program-transfor=* \
988   | --program-transfo=* | --program-transf=* \
989   | --program-trans=* | --program-tran=* \
990   | --progr-tra=* | --program-tr=* | --program-t=*)
991     program_transform_name=$ac_optarg ;;
992
993   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
994     ac_prev=pdfdir ;;
995   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
996     pdfdir=$ac_optarg ;;
997
998   -psdir | --psdir | --psdi | --psd | --ps)
999     ac_prev=psdir ;;
1000   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1001     psdir=$ac_optarg ;;
1002
1003   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1004   | -silent | --silent | --silen | --sile | --sil)
1005     silent=yes ;;
1006
1007   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1008     ac_prev=sbindir ;;
1009   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1010   | --sbi=* | --sb=*)
1011     sbindir=$ac_optarg ;;
1012
1013   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1014   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1015   | --sharedst | --shareds | --shared | --share | --shar \
1016   | --sha | --sh)
1017     ac_prev=sharedstatedir ;;
1018   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1019   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1020   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1021   | --sha=* | --sh=*)
1022     sharedstatedir=$ac_optarg ;;
1023
1024   -site | --site | --sit)
1025     ac_prev=site ;;
1026   -site=* | --site=* | --sit=*)
1027     site=$ac_optarg ;;
1028
1029   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1030     ac_prev=srcdir ;;
1031   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1032     srcdir=$ac_optarg ;;
1033
1034   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1035   | --syscon | --sysco | --sysc | --sys | --sy)
1036     ac_prev=sysconfdir ;;
1037   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1038   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1039     sysconfdir=$ac_optarg ;;
1040
1041   -target | --target | --targe | --targ | --tar | --ta | --t)
1042     ac_prev=target_alias ;;
1043   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1044     target_alias=$ac_optarg ;;
1045
1046   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1047     verbose=yes ;;
1048
1049   -version | --version | --versio | --versi | --vers | -V)
1050     ac_init_version=: ;;
1051
1052   -with-* | --with-*)
1053     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1054     # Reject names that are not valid shell variable names.
1055     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1056       { echo "$as_me: error: invalid package name: $ac_package" >&2
1057    { (exit 1); exit 1; }; }
1058     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1059     eval with_$ac_package=\$ac_optarg ;;
1060
1061   -without-* | --without-*)
1062     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1063     # Reject names that are not valid shell variable names.
1064     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1065       { echo "$as_me: error: invalid package name: $ac_package" >&2
1066    { (exit 1); exit 1; }; }
1067     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1068     eval with_$ac_package=no ;;
1069
1070   --x)
1071     # Obsolete; use --with-x.
1072     with_x=yes ;;
1073
1074   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1075   | --x-incl | --x-inc | --x-in | --x-i)
1076     ac_prev=x_includes ;;
1077   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1078   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1079     x_includes=$ac_optarg ;;
1080
1081   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1082   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1083     ac_prev=x_libraries ;;
1084   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1085   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1086     x_libraries=$ac_optarg ;;
1087
1088   -*) { echo "$as_me: error: unrecognized option: $ac_option
1089 Try \`$0 --help' for more information." >&2
1090    { (exit 1); exit 1; }; }
1091     ;;
1092
1093   *=*)
1094     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1095     # Reject names that are not valid shell variable names.
1096     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1097       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1098    { (exit 1); exit 1; }; }
1099     eval $ac_envvar=\$ac_optarg
1100     export $ac_envvar ;;
1101
1102   *)
1103     # FIXME: should be removed in autoconf 3.0.
1104     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1105     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1106       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1107     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1108     ;;
1109
1110   esac
1111 done
1112
1113 if test -n "$ac_prev"; then
1114   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1115   { echo "$as_me: error: missing argument to $ac_option" >&2
1116    { (exit 1); exit 1; }; }
1117 fi
1118
1119 # Be sure to have absolute directory names.
1120 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1121                 datadir sysconfdir sharedstatedir localstatedir includedir \
1122                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1123                 libdir localedir mandir
1124 do
1125   eval ac_val=\$$ac_var
1126   case $ac_val in
1127     [\\/$]* | ?:[\\/]* )  continue;;
1128     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1129   esac
1130   { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1131    { (exit 1); exit 1; }; }
1132 done
1133
1134 # There might be people who depend on the old broken behavior: `$host'
1135 # used to hold the argument of --host etc.
1136 # FIXME: To remove some day.
1137 build=$build_alias
1138 host=$host_alias
1139 target=$target_alias
1140
1141 # FIXME: To remove some day.
1142 if test "x$host_alias" != x; then
1143   if test "x$build_alias" = x; then
1144     cross_compiling=maybe
1145     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1146     If a cross compiler is detected then cross compile mode will be used." >&2
1147   elif test "x$build_alias" != "x$host_alias"; then
1148     cross_compiling=yes
1149   fi
1150 fi
1151
1152 ac_tool_prefix=
1153 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1154
1155 test "$silent" = yes && exec 6>/dev/null
1156
1157
1158 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1159 ac_ls_di=`ls -di .` &&
1160 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1161   { echo "$as_me: error: Working directory cannot be determined" >&2
1162    { (exit 1); exit 1; }; }
1163 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1164   { echo "$as_me: error: pwd does not report name of working directory" >&2
1165    { (exit 1); exit 1; }; }
1166
1167
1168 # Find the source files, if location was not specified.
1169 if test -z "$srcdir"; then
1170   ac_srcdir_defaulted=yes
1171   # Try the directory containing this script, then the parent directory.
1172   ac_confdir=`$as_dirname -- "$0" ||
1173 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1174          X"$0" : 'X\(//\)[^/]' \| \
1175          X"$0" : 'X\(//\)$' \| \
1176          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1177 echo X"$0" |
1178     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1179             s//\1/
1180             q
1181           }
1182           /^X\(\/\/\)[^/].*/{
1183             s//\1/
1184             q
1185           }
1186           /^X\(\/\/\)$/{
1187             s//\1/
1188             q
1189           }
1190           /^X\(\/\).*/{
1191             s//\1/
1192             q
1193           }
1194           s/.*/./; q'`
1195   srcdir=$ac_confdir
1196   if test ! -r "$srcdir/$ac_unique_file"; then
1197     srcdir=..
1198   fi
1199 else
1200   ac_srcdir_defaulted=no
1201 fi
1202 if test ! -r "$srcdir/$ac_unique_file"; then
1203   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1204   { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1205    { (exit 1); exit 1; }; }
1206 fi
1207 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1208 ac_abs_confdir=`(
1209         cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1210    { (exit 1); exit 1; }; }
1211         pwd)`
1212 # When building in place, set srcdir=.
1213 if test "$ac_abs_confdir" = "$ac_pwd"; then
1214   srcdir=.
1215 fi
1216 # Remove unnecessary trailing slashes from srcdir.
1217 # Double slashes in file names in object file debugging info
1218 # mess up M-x gdb in Emacs.
1219 case $srcdir in
1220 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1221 esac
1222 for ac_var in $ac_precious_vars; do
1223   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1224   eval ac_env_${ac_var}_value=\$${ac_var}
1225   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1226   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1227 done
1228
1229 #
1230 # Report the --help message.
1231 #
1232 if test "$ac_init_help" = "long"; then
1233   # Omit some internal or obsolete options to make the list less imposing.
1234   # This message is too long to be a string in the A/UX 3.1 sh.
1235   cat <<_ACEOF
1236 \`configure' configures mysqltcl 3.05 to adapt to many kinds of systems.
1237
1238 Usage: $0 [OPTION]... [VAR=VALUE]...
1239
1240 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1241 VAR=VALUE.  See below for descriptions of some of the useful variables.
1242
1243 Defaults for the options are specified in brackets.
1244
1245 Configuration:
1246   -h, --help              display this help and exit
1247       --help=short        display options specific to this package
1248       --help=recursive    display the short help of all the included packages
1249   -V, --version           display version information and exit
1250   -q, --quiet, --silent   do not print \`checking...' messages
1251       --cache-file=FILE   cache test results in FILE [disabled]
1252   -C, --config-cache      alias for \`--cache-file=config.cache'
1253   -n, --no-create         do not create output files
1254       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1255
1256 Installation directories:
1257   --prefix=PREFIX         install architecture-independent files in PREFIX
1258                           [$ac_default_prefix]
1259   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1260                           [PREFIX]
1261
1262 By default, \`make install' will install all the files in
1263 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1264 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1265 for instance \`--prefix=\$HOME'.
1266
1267 For better control, use the options below.
1268
1269 Fine tuning of the installation directories:
1270   --bindir=DIR           user executables [EPREFIX/bin]
1271   --sbindir=DIR          system admin executables [EPREFIX/sbin]
1272   --libexecdir=DIR       program executables [EPREFIX/libexec]
1273   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1274   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1275   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1276   --libdir=DIR           object code libraries [EPREFIX/lib]
1277   --includedir=DIR       C header files [PREFIX/include]
1278   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1279   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1280   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1281   --infodir=DIR          info documentation [DATAROOTDIR/info]
1282   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1283   --mandir=DIR           man documentation [DATAROOTDIR/man]
1284   --docdir=DIR           documentation root [DATAROOTDIR/doc/mysqltcl]
1285   --htmldir=DIR          html documentation [DOCDIR]
1286   --dvidir=DIR           dvi documentation [DOCDIR]
1287   --pdfdir=DIR           pdf documentation [DOCDIR]
1288   --psdir=DIR            ps documentation [DOCDIR]
1289 _ACEOF
1290
1291   cat <<\_ACEOF
1292 _ACEOF
1293 fi
1294
1295 if test -n "$ac_init_help"; then
1296   case $ac_init_help in
1297      short | recursive ) echo "Configuration of mysqltcl 3.05:";;
1298    esac
1299   cat <<\_ACEOF
1300
1301 Optional Features:
1302   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1303   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1304   --enable-threads        build with threads
1305   --enable-shared         build and link with shared libraries (default: on)
1306   --enable-64bit          enable 64bit support (default: off)
1307   --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1308   --enable-wince          enable Win/CE support (where applicable)
1309   --disable-load          disallow dynamic loading and "load" command
1310                           (default: enabled)
1311   --enable-symbols        build with debugging symbols (default: off)
1312   --enable-mysqlstatic      link static with libmysqlclient.a
1313
1314 Optional Packages:
1315   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1316   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1317   --with-tcl              directory containing tcl configuration
1318                           (tclConfig.sh)
1319   --with-tclinclude       directory containing the public Tcl header files
1320   --with-celib=DIR        use Windows/CE support library from DIR
1321  --with-mysql-include=DIR Mysql includes are in DIR
1322   --with-mysql-lib=DIR  Mysql libraries are in DIR
1323
1324 Some influential environment variables:
1325   CC          C compiler command
1326   CFLAGS      C compiler flags
1327   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1328               nonstandard directory <lib dir>
1329   LIBS        libraries to pass to the linker, e.g. -l<library>
1330   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1331               you have headers in a nonstandard directory <include dir>
1332   CPP         C preprocessor
1333
1334 Use these variables to override the choices made by `configure' or to help
1335 it to find libraries and programs with nonstandard names/locations.
1336
1337 _ACEOF
1338 ac_status=$?
1339 fi
1340
1341 if test "$ac_init_help" = "recursive"; then
1342   # If there are subdirs, report their specific --help.
1343   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1344     test -d "$ac_dir" || continue
1345     ac_builddir=.
1346
1347 case "$ac_dir" in
1348 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1349 *)
1350   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1351   # A ".." for each directory in $ac_dir_suffix.
1352   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1353   case $ac_top_builddir_sub in
1354   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1355   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1356   esac ;;
1357 esac
1358 ac_abs_top_builddir=$ac_pwd
1359 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1360 # for backward compatibility:
1361 ac_top_builddir=$ac_top_build_prefix
1362
1363 case $srcdir in
1364   .)  # We are building in place.
1365     ac_srcdir=.
1366     ac_top_srcdir=$ac_top_builddir_sub
1367     ac_abs_top_srcdir=$ac_pwd ;;
1368   [\\/]* | ?:[\\/]* )  # Absolute name.
1369     ac_srcdir=$srcdir$ac_dir_suffix;
1370     ac_top_srcdir=$srcdir
1371     ac_abs_top_srcdir=$srcdir ;;
1372   *) # Relative name.
1373     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1374     ac_top_srcdir=$ac_top_build_prefix$srcdir
1375     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1376 esac
1377 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1378
1379     cd "$ac_dir" || { ac_status=$?; continue; }
1380     # Check for guested configure.
1381     if test -f "$ac_srcdir/configure.gnu"; then
1382       echo &&
1383       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1384     elif test -f "$ac_srcdir/configure"; then
1385       echo &&
1386       $SHELL "$ac_srcdir/configure" --help=recursive
1387     else
1388       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1389     fi || ac_status=$?
1390     cd "$ac_pwd" || { ac_status=$?; break; }
1391   done
1392 fi
1393
1394 test -n "$ac_init_help" && exit $ac_status
1395 if $ac_init_version; then
1396   cat <<\_ACEOF
1397 mysqltcl configure 3.05
1398 generated by GNU Autoconf 2.61
1399
1400 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1401 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1402 This configure script is free software; the Free Software Foundation
1403 gives unlimited permission to copy, distribute and modify it.
1404 _ACEOF
1405   exit
1406 fi
1407 cat >config.log <<_ACEOF
1408 This file contains any messages produced by compilers while
1409 running configure, to aid debugging if configure makes a mistake.
1410
1411 It was created by mysqltcl $as_me 3.05, which was
1412 generated by GNU Autoconf 2.61.  Invocation command line was
1413
1414   $ $0 $@
1415
1416 _ACEOF
1417 exec 5>>config.log
1418 {
1419 cat <<_ASUNAME
1420 ## --------- ##
1421 ## Platform. ##
1422 ## --------- ##
1423
1424 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1425 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1426 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1427 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1428 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1429
1430 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1431 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1432
1433 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1434 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1435 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1436 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1437 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1438 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1439 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1440
1441 _ASUNAME
1442
1443 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1444 for as_dir in $PATH
1445 do
1446   IFS=$as_save_IFS
1447   test -z "$as_dir" && as_dir=.
1448   echo "PATH: $as_dir"
1449 done
1450 IFS=$as_save_IFS
1451
1452 } >&5
1453
1454 cat >&5 <<_ACEOF
1455
1456
1457 ## ----------- ##
1458 ## Core tests. ##
1459 ## ----------- ##
1460
1461 _ACEOF
1462
1463
1464 # Keep a trace of the command line.
1465 # Strip out --no-create and --no-recursion so they do not pile up.
1466 # Strip out --silent because we don't want to record it for future runs.
1467 # Also quote any args containing shell meta-characters.
1468 # Make two passes to allow for proper duplicate-argument suppression.
1469 ac_configure_args=
1470 ac_configure_args0=
1471 ac_configure_args1=
1472 ac_must_keep_next=false
1473 for ac_pass in 1 2
1474 do
1475   for ac_arg
1476   do
1477     case $ac_arg in
1478     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1479     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1480     | -silent | --silent | --silen | --sile | --sil)
1481       continue ;;
1482     *\'*)
1483       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1484     esac
1485     case $ac_pass in
1486     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1487     2)
1488       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1489       if test $ac_must_keep_next = true; then
1490         ac_must_keep_next=false # Got value, back to normal.
1491       else
1492         case $ac_arg in
1493           *=* | --config-cache | -C | -disable-* | --disable-* \
1494           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1495           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1496           | -with-* | --with-* | -without-* | --without-* | --x)
1497             case "$ac_configure_args0 " in
1498               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1499             esac
1500             ;;
1501           -* ) ac_must_keep_next=true ;;
1502         esac
1503       fi
1504       ac_configure_args="$ac_configure_args '$ac_arg'"
1505       ;;
1506     esac
1507   done
1508 done
1509 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1510 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1511
1512 # When interrupted or exit'd, cleanup temporary files, and complete
1513 # config.log.  We remove comments because anyway the quotes in there
1514 # would cause problems or look ugly.
1515 # WARNING: Use '\'' to represent an apostrophe within the trap.
1516 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1517 trap 'exit_status=$?
1518   # Save into config.log some information that might help in debugging.
1519   {
1520     echo
1521
1522     cat <<\_ASBOX
1523 ## ---------------- ##
1524 ## Cache variables. ##
1525 ## ---------------- ##
1526 _ASBOX
1527     echo
1528     # The following way of writing the cache mishandles newlines in values,
1529 (
1530   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1531     eval ac_val=\$$ac_var
1532     case $ac_val in #(
1533     *${as_nl}*)
1534       case $ac_var in #(
1535       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1536 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1537       esac
1538       case $ac_var in #(
1539       _ | IFS | as_nl) ;; #(
1540       *) $as_unset $ac_var ;;
1541       esac ;;
1542     esac
1543   done
1544   (set) 2>&1 |
1545     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1546     *${as_nl}ac_space=\ *)
1547       sed -n \
1548         "s/'\''/'\''\\\\'\'''\''/g;
1549           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1550       ;; #(
1551     *)
1552       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1553       ;;
1554     esac |
1555     sort
1556 )
1557     echo
1558
1559     cat <<\_ASBOX
1560 ## ----------------- ##
1561 ## Output variables. ##
1562 ## ----------------- ##
1563 _ASBOX
1564     echo
1565     for ac_var in $ac_subst_vars
1566     do
1567       eval ac_val=\$$ac_var
1568       case $ac_val in
1569       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1570       esac
1571       echo "$ac_var='\''$ac_val'\''"
1572     done | sort
1573     echo
1574
1575     if test -n "$ac_subst_files"; then
1576       cat <<\_ASBOX
1577 ## ------------------- ##
1578 ## File substitutions. ##
1579 ## ------------------- ##
1580 _ASBOX
1581       echo
1582       for ac_var in $ac_subst_files
1583       do
1584         eval ac_val=\$$ac_var
1585         case $ac_val in
1586         *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1587         esac
1588         echo "$ac_var='\''$ac_val'\''"
1589       done | sort
1590       echo
1591     fi
1592
1593     if test -s confdefs.h; then
1594       cat <<\_ASBOX
1595 ## ----------- ##
1596 ## confdefs.h. ##
1597 ## ----------- ##
1598 _ASBOX
1599       echo
1600       cat confdefs.h
1601       echo
1602     fi
1603     test "$ac_signal" != 0 &&
1604       echo "$as_me: caught signal $ac_signal"
1605     echo "$as_me: exit $exit_status"
1606   } >&5
1607   rm -f core *.core core.conftest.* &&
1608     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1609     exit $exit_status
1610 ' 0
1611 for ac_signal in 1 2 13 15; do
1612   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1613 done
1614 ac_signal=0
1615
1616 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1617 rm -f -r conftest* confdefs.h
1618
1619 # Predefined preprocessor variables.
1620
1621 cat >>confdefs.h <<_ACEOF
1622 #define PACKAGE_NAME "$PACKAGE_NAME"
1623 _ACEOF
1624
1625
1626 cat >>confdefs.h <<_ACEOF
1627 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1628 _ACEOF
1629
1630
1631 cat >>confdefs.h <<_ACEOF
1632 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1633 _ACEOF
1634
1635
1636 cat >>confdefs.h <<_ACEOF
1637 #define PACKAGE_STRING "$PACKAGE_STRING"
1638 _ACEOF
1639
1640
1641 cat >>confdefs.h <<_ACEOF
1642 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1643 _ACEOF
1644
1645
1646 # Let the site file select an alternate cache file if it wants to.
1647 # Prefer explicitly selected file to automatically selected ones.
1648 if test -n "$CONFIG_SITE"; then
1649   set x "$CONFIG_SITE"
1650 elif test "x$prefix" != xNONE; then
1651   set x "$prefix/share/config.site" "$prefix/etc/config.site"
1652 else
1653   set x "$ac_default_prefix/share/config.site" \
1654         "$ac_default_prefix/etc/config.site"
1655 fi
1656 shift
1657 for ac_site_file
1658 do
1659   if test -r "$ac_site_file"; then
1660     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1661 echo "$as_me: loading site script $ac_site_file" >&6;}
1662     sed 's/^/| /' "$ac_site_file" >&5
1663     . "$ac_site_file"
1664   fi
1665 done
1666
1667 if test -r "$cache_file"; then
1668   # Some versions of bash will fail to source /dev/null (special
1669   # files actually), so we avoid doing that.
1670   if test -f "$cache_file"; then
1671     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1672 echo "$as_me: loading cache $cache_file" >&6;}
1673     case $cache_file in
1674       [\\/]* | ?:[\\/]* ) . "$cache_file";;
1675       *)                      . "./$cache_file";;
1676     esac
1677   fi
1678 else
1679   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1680 echo "$as_me: creating cache $cache_file" >&6;}
1681   >$cache_file
1682 fi
1683
1684 # Check that the precious variables saved in the cache have kept the same
1685 # value.
1686 ac_cache_corrupted=false
1687 for ac_var in $ac_precious_vars; do
1688   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1689   eval ac_new_set=\$ac_env_${ac_var}_set
1690   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1691   eval ac_new_val=\$ac_env_${ac_var}_value
1692   case $ac_old_set,$ac_new_set in
1693     set,)
1694       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1695 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1696       ac_cache_corrupted=: ;;
1697     ,set)
1698       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1699 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1700       ac_cache_corrupted=: ;;
1701     ,);;
1702     *)
1703       if test "x$ac_old_val" != "x$ac_new_val"; then
1704         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1705 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1706         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1707 echo "$as_me:   former value:  $ac_old_val" >&2;}
1708         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1709 echo "$as_me:   current value: $ac_new_val" >&2;}
1710         ac_cache_corrupted=:
1711       fi;;
1712   esac
1713   # Pass precious variables to config.status.
1714   if test "$ac_new_set" = set; then
1715     case $ac_new_val in
1716     *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1717     *) ac_arg=$ac_var=$ac_new_val ;;
1718     esac
1719     case " $ac_configure_args " in
1720       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1721       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1722     esac
1723   fi
1724 done
1725 if $ac_cache_corrupted; then
1726   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1727 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1728   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1729 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1730    { (exit 1); exit 1; }; }
1731 fi
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757 ac_ext=c
1758 ac_cpp='$CPP $CPPFLAGS'
1759 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1760 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1761 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1762
1763
1764
1765 #--------------------------------------------------------------------
1766 # Call TEA_INIT as the first TEA_ macro to set up initial vars.
1767 # This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
1768 # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
1769 #--------------------------------------------------------------------
1770
1771
1772     # TEA extensions pass this us the version of TEA they think they
1773     # are compatible with.
1774     TEA_VERSION="3.5"
1775
1776     { echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
1777 echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6; }
1778     if test x"${PACKAGE_NAME}" = x ; then
1779         { { echo "$as_me:$LINENO: error:
1780 The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
1781 echo "$as_me: error:
1782 The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
1783    { (exit 1); exit 1; }; }
1784     fi
1785     if test x"3.5" = x ; then
1786         { { echo "$as_me:$LINENO: error:
1787 TEA version not specified." >&5
1788 echo "$as_me: error:
1789 TEA version not specified." >&2;}
1790    { (exit 1); exit 1; }; }
1791     elif test "3.5" != "${TEA_VERSION}" ; then
1792         { echo "$as_me:$LINENO: result: warning: requested TEA version \"3.5\", have \"${TEA_VERSION}\"" >&5
1793 echo "${ECHO_T}warning: requested TEA version \"3.5\", have \"${TEA_VERSION}\"" >&6; }
1794     else
1795         { echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
1796 echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6; }
1797     fi
1798     case "`uname -s`" in
1799         *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
1800             # Extract the first word of "cygpath", so it can be a program name with args.
1801 set dummy cygpath; ac_word=$2
1802 { echo "$as_me:$LINENO: checking for $ac_word" >&5
1803 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1804 if test "${ac_cv_prog_CYGPATH+set}" = set; then
1805   echo $ECHO_N "(cached) $ECHO_C" >&6
1806 else
1807   if test -n "$CYGPATH"; then
1808   ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1809 else
1810 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1811 for as_dir in $PATH
1812 do
1813   IFS=$as_save_IFS
1814   test -z "$as_dir" && as_dir=.
1815   for ac_exec_ext in '' $ac_executable_extensions; do
1816   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1817     ac_cv_prog_CYGPATH="cygpath -w"
1818     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1819     break 2
1820   fi
1821 done
1822 done
1823 IFS=$as_save_IFS
1824
1825   test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1826 fi
1827 fi
1828 CYGPATH=$ac_cv_prog_CYGPATH
1829 if test -n "$CYGPATH"; then
1830   { echo "$as_me:$LINENO: result: $CYGPATH" >&5
1831 echo "${ECHO_T}$CYGPATH" >&6; }
1832 else
1833   { echo "$as_me:$LINENO: result: no" >&5
1834 echo "${ECHO_T}no" >&6; }
1835 fi
1836
1837
1838             EXEEXT=".exe"
1839             TEA_PLATFORM="windows"
1840             ;;
1841         *)
1842             CYGPATH=echo
1843             EXEEXT=""
1844             TEA_PLATFORM="unix"
1845             ;;
1846     esac
1847
1848     # Check if exec_prefix is set. If not use fall back to prefix.
1849     # Note when adjusted, so that TEA_PREFIX can correct for this.
1850     # This is needed for recursive configures, since autoconf propagates
1851     # $prefix, but not $exec_prefix (doh!).
1852     if test x$exec_prefix = xNONE ; then
1853         exec_prefix_default=yes
1854         exec_prefix=$prefix
1855     fi
1856
1857
1858
1859
1860     # This package name must be replaced statically for AC_SUBST to work
1861
1862     # Substitute STUB_LIB_FILE in case package creates a stub library too.
1863
1864
1865     # We AC_SUBST these here to ensure they are subst'ed,
1866     # in case the user doesn't call TEA_ADD_...
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876 ac_aux_dir=
1877 for ac_dir in tclconfig "$srcdir"/tclconfig; do
1878   if test -f "$ac_dir/install-sh"; then
1879     ac_aux_dir=$ac_dir
1880     ac_install_sh="$ac_aux_dir/install-sh -c"
1881     break
1882   elif test -f "$ac_dir/install.sh"; then
1883     ac_aux_dir=$ac_dir
1884     ac_install_sh="$ac_aux_dir/install.sh -c"
1885     break
1886   elif test -f "$ac_dir/shtool"; then
1887     ac_aux_dir=$ac_dir
1888     ac_install_sh="$ac_aux_dir/shtool install -c"
1889     break
1890   fi
1891 done
1892 if test -z "$ac_aux_dir"; then
1893   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in tclconfig \"$srcdir\"/tclconfig" >&5
1894 echo "$as_me: error: cannot find install-sh or install.sh in tclconfig \"$srcdir\"/tclconfig" >&2;}
1895    { (exit 1); exit 1; }; }
1896 fi
1897
1898 # These three variables are undocumented and unsupported,
1899 # and are intended to be withdrawn in a future Autoconf release.
1900 # They can cause serious problems if a builder's source tree is in a directory
1901 # whose full name contains unusual characters.
1902 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1903 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1904 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1905
1906
1907
1908 #--------------------------------------------------------------------
1909 # Load the tclConfig.sh file
1910 #--------------------------------------------------------------------
1911
1912
1913
1914     #
1915     # Ok, lets find the tcl configuration
1916     # First, look for one uninstalled.
1917     # the alternative search directory is invoked by --with-tcl
1918     #
1919
1920     if test x"${no_tcl}" = x ; then
1921         # we reset no_tcl in case something fails here
1922         no_tcl=true
1923
1924 # Check whether --with-tcl was given.
1925 if test "${with_tcl+set}" = set; then
1926   withval=$with_tcl; with_tclconfig=${withval}
1927 fi
1928
1929         { echo "$as_me:$LINENO: checking for Tcl configuration" >&5
1930 echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6; }
1931         if test "${ac_cv_c_tclconfig+set}" = set; then
1932   echo $ECHO_N "(cached) $ECHO_C" >&6
1933 else
1934
1935
1936             # First check to see if --with-tcl was specified.
1937             if test x"${with_tclconfig}" != x ; then
1938                 case ${with_tclconfig} in
1939                     */tclConfig.sh )
1940                         if test -f ${with_tclconfig}; then
1941                             { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
1942 echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
1943                             with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'`
1944                         fi ;;
1945                 esac
1946                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
1947                     ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
1948                 else
1949                     { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
1950 echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
1951    { (exit 1); exit 1; }; }
1952                 fi
1953             fi
1954
1955             # then check for a private Tcl installation
1956             if test x"${ac_cv_c_tclconfig}" = x ; then
1957                 for i in \
1958                         ../tcl \
1959                         `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1960                         `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
1961                         `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
1962                         ../../tcl \
1963                         `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1964                         `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
1965                         `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
1966                         ../../../tcl \
1967                         `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1968                         `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
1969                         `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
1970                     if test -f "$i/unix/tclConfig.sh" ; then
1971                         ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
1972                         break
1973                     fi
1974                 done
1975             fi
1976
1977             # on Darwin, check in Framework installation locations
1978             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
1979                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
1980                         `ls -d /Library/Frameworks 2>/dev/null` \
1981                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
1982                         `ls -d /System/Library/Frameworks 2>/dev/null` \
1983                         ; do
1984                     if test -f "$i/Tcl.framework/tclConfig.sh" ; then
1985                         ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
1986                         break
1987                     fi
1988                 done
1989             fi
1990
1991             # on Windows, check in common installation locations
1992             if test "${TEA_PLATFORM}" = "windows" \
1993                 -a x"${ac_cv_c_tclconfig}" = x ; then
1994                 for i in `ls -d C:/Tcl/lib 2>/dev/null` \
1995                         `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
1996                         ; do
1997                     if test -f "$i/tclConfig.sh" ; then
1998                         ac_cv_c_tclconfig=`(cd $i; pwd)`
1999                         break
2000                     fi
2001                 done
2002             fi
2003
2004             # check in a few common install locations
2005             if test x"${ac_cv_c_tclconfig}" = x ; then
2006                 for i in `ls -d ${libdir} 2>/dev/null` \
2007                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
2008                         `ls -d ${prefix}/lib 2>/dev/null` \
2009                         `ls -d /usr/local/lib 2>/dev/null` \
2010                         `ls -d /usr/contrib/lib 2>/dev/null` \
2011                         `ls -d /usr/lib 2>/dev/null` \
2012                         ; do
2013                     if test -f "$i/tclConfig.sh" ; then
2014                         ac_cv_c_tclconfig=`(cd $i; pwd)`
2015                         break
2016                     fi
2017                 done
2018             fi
2019
2020             # check in a few other private locations
2021             if test x"${ac_cv_c_tclconfig}" = x ; then
2022                 for i in \
2023                         ${srcdir}/../tcl \
2024                         `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2025                         `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2026                         `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2027                     if test -f "$i/unix/tclConfig.sh" ; then
2028                     ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
2029                     break
2030                 fi
2031                 done
2032             fi
2033
2034 fi
2035
2036
2037         if test x"${ac_cv_c_tclconfig}" = x ; then
2038             TCL_BIN_DIR="# no Tcl configs found"
2039             { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5
2040 echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
2041             exit 0
2042         else
2043             no_tcl=
2044             TCL_BIN_DIR=${ac_cv_c_tclconfig}
2045             { echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2046 echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2047         fi
2048     fi
2049
2050
2051     { echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
2052 echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6; }
2053
2054     if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
2055         { echo "$as_me:$LINENO: result: loading" >&5
2056 echo "${ECHO_T}loading" >&6; }
2057         . ${TCL_BIN_DIR}/tclConfig.sh
2058     else
2059         { echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
2060 echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2061     fi
2062
2063     # eval is required to do the TCL_DBGX substitution
2064     eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
2065     eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
2066
2067     # If the TCL_BIN_DIR is the build directory (not the install directory),
2068     # then set the common variable name to the value of the build variables.
2069     # For example, the variable TCL_LIB_SPEC will be set to the value
2070     # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
2071     # instead of TCL_BUILD_LIB_SPEC since it will work with both an
2072     # installed and uninstalled version of Tcl.
2073     if test -f ${TCL_BIN_DIR}/Makefile ; then
2074         TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
2075         TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
2076         TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
2077     elif test "`uname -s`" = "Darwin"; then
2078         # If Tcl was built as a framework, attempt to use the libraries
2079         # from the framework at the given location so that linking works
2080         # against Tcl.framework installed in an arbitary location.
2081         case ${TCL_DEFS} in
2082             *TCL_FRAMEWORK*)
2083                 if test -f ${TCL_BIN_DIR}/${TCL_LIB_FILE}; then
2084                     for i in "`cd ${TCL_BIN_DIR}; pwd`" \
2085                              "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
2086                         if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
2087                             TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
2088                             break
2089                         fi
2090                     done
2091                 fi
2092                 if test -f ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}; then
2093                     TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
2094                     TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
2095                 fi
2096                 ;;
2097         esac
2098     fi
2099
2100     # eval is required to do the TCL_DBGX substitution
2101     eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
2102     eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
2103     eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
2104     eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125 #--------------------------------------------------------------------
2126 # Load the tkConfig.sh file if necessary (Tk extension)
2127 #--------------------------------------------------------------------
2128
2129 #TEA_PATH_TKCONFIG
2130 #TEA_LOAD_TKCONFIG
2131
2132 #-----------------------------------------------------------------------
2133 # Handle the --prefix=... option by defaulting to what Tcl gave.
2134 # Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
2135 #-----------------------------------------------------------------------
2136
2137
2138     if test "${prefix}" = "NONE"; then
2139         prefix_default=yes
2140         if test x"${TCL_PREFIX}" != x; then
2141             { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
2142 echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
2143             prefix=${TCL_PREFIX}
2144         else
2145             { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
2146 echo "$as_me: --prefix defaulting to /usr/local" >&6;}
2147             prefix=/usr/local
2148         fi
2149     fi
2150     if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
2151         -o x"${exec_prefix_default}" = x"yes" ; then
2152         if test x"${TCL_EXEC_PREFIX}" != x; then
2153             { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
2154 echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
2155             exec_prefix=${TCL_EXEC_PREFIX}
2156         else
2157             { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
2158 echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
2159             exec_prefix=$prefix
2160         fi
2161     fi
2162
2163
2164 #-----------------------------------------------------------------------
2165 # Standard compiler checks.
2166 # This sets up CC by using the CC env var, or looks for gcc otherwise.
2167 # This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
2168 # the basic setup necessary to compile executables.
2169 #-----------------------------------------------------------------------
2170
2171
2172     # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
2173     # in this macro, they need to go into TEA_SETUP_COMPILER instead.
2174
2175     # If the user did not set CFLAGS, set it now to keep
2176     # the AC_PROG_CC macro from adding "-g -O2".
2177     if test "${CFLAGS+set}" != "set" ; then
2178         CFLAGS=""
2179     fi
2180
2181     ac_ext=c
2182 ac_cpp='$CPP $CPPFLAGS'
2183 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2184 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2185 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2186 if test -n "$ac_tool_prefix"; then
2187   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2188 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2189 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2191 if test "${ac_cv_prog_CC+set}" = set; then
2192   echo $ECHO_N "(cached) $ECHO_C" >&6
2193 else
2194   if test -n "$CC"; then
2195   ac_cv_prog_CC="$CC" # Let the user override the test.
2196 else
2197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2198 for as_dir in $PATH
2199 do
2200   IFS=$as_save_IFS
2201   test -z "$as_dir" && as_dir=.
2202   for ac_exec_ext in '' $ac_executable_extensions; do
2203   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2204     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2205     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2206     break 2
2207   fi
2208 done
2209 done
2210 IFS=$as_save_IFS
2211
2212 fi
2213 fi
2214 CC=$ac_cv_prog_CC
2215 if test -n "$CC"; then
2216   { echo "$as_me:$LINENO: result: $CC" >&5
2217 echo "${ECHO_T}$CC" >&6; }
2218 else
2219   { echo "$as_me:$LINENO: result: no" >&5
2220 echo "${ECHO_T}no" >&6; }
2221 fi
2222
2223
2224 fi
2225 if test -z "$ac_cv_prog_CC"; then
2226   ac_ct_CC=$CC
2227   # Extract the first word of "gcc", so it can be a program name with args.
2228 set dummy gcc; ac_word=$2
2229 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2230 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2231 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2232   echo $ECHO_N "(cached) $ECHO_C" >&6
2233 else
2234   if test -n "$ac_ct_CC"; then
2235   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2236 else
2237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2238 for as_dir in $PATH
2239 do
2240   IFS=$as_save_IFS
2241   test -z "$as_dir" && as_dir=.
2242   for ac_exec_ext in '' $ac_executable_extensions; do
2243   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2244     ac_cv_prog_ac_ct_CC="gcc"
2245     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2246     break 2
2247   fi
2248 done
2249 done
2250 IFS=$as_save_IFS
2251
2252 fi
2253 fi
2254 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2255 if test -n "$ac_ct_CC"; then
2256   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2257 echo "${ECHO_T}$ac_ct_CC" >&6; }
2258 else
2259   { echo "$as_me:$LINENO: result: no" >&5
2260 echo "${ECHO_T}no" >&6; }
2261 fi
2262
2263   if test "x$ac_ct_CC" = x; then
2264     CC=""
2265   else
2266     case $cross_compiling:$ac_tool_warned in
2267 yes:)
2268 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2269 whose name does not start with the host triplet.  If you think this
2270 configuration is useful to you, please write to autoconf@gnu.org." >&5
2271 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2272 whose name does not start with the host triplet.  If you think this
2273 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2274 ac_tool_warned=yes ;;
2275 esac
2276     CC=$ac_ct_CC
2277   fi
2278 else
2279   CC="$ac_cv_prog_CC"
2280 fi
2281
2282 if test -z "$CC"; then
2283           if test -n "$ac_tool_prefix"; then
2284     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2285 set dummy ${ac_tool_prefix}cc; ac_word=$2
2286 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2287 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2288 if test "${ac_cv_prog_CC+set}" = set; then
2289   echo $ECHO_N "(cached) $ECHO_C" >&6
2290 else
2291   if test -n "$CC"; then
2292   ac_cv_prog_CC="$CC" # Let the user override the test.
2293 else
2294 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2295 for as_dir in $PATH
2296 do
2297   IFS=$as_save_IFS
2298   test -z "$as_dir" && as_dir=.
2299   for ac_exec_ext in '' $ac_executable_extensions; do
2300   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2301     ac_cv_prog_CC="${ac_tool_prefix}cc"
2302     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2303     break 2
2304   fi
2305 done
2306 done
2307 IFS=$as_save_IFS
2308
2309 fi
2310 fi
2311 CC=$ac_cv_prog_CC
2312 if test -n "$CC"; then
2313   { echo "$as_me:$LINENO: result: $CC" >&5
2314 echo "${ECHO_T}$CC" >&6; }
2315 else
2316   { echo "$as_me:$LINENO: result: no" >&5
2317 echo "${ECHO_T}no" >&6; }
2318 fi
2319
2320
2321   fi
2322 fi
2323 if test -z "$CC"; then
2324   # Extract the first word of "cc", so it can be a program name with args.
2325 set dummy cc; ac_word=$2
2326 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2327 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2328 if test "${ac_cv_prog_CC+set}" = set; then
2329   echo $ECHO_N "(cached) $ECHO_C" >&6
2330 else
2331   if test -n "$CC"; then
2332   ac_cv_prog_CC="$CC" # Let the user override the test.
2333 else
2334   ac_prog_rejected=no
2335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2336 for as_dir in $PATH
2337 do
2338   IFS=$as_save_IFS
2339   test -z "$as_dir" && as_dir=.
2340   for ac_exec_ext in '' $ac_executable_extensions; do
2341   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2342     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2343        ac_prog_rejected=yes
2344        continue
2345      fi
2346     ac_cv_prog_CC="cc"
2347     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2348     break 2
2349   fi
2350 done
2351 done
2352 IFS=$as_save_IFS
2353
2354 if test $ac_prog_rejected = yes; then
2355   # We found a bogon in the path, so make sure we never use it.
2356   set dummy $ac_cv_prog_CC
2357   shift
2358   if test $# != 0; then
2359     # We chose a different compiler from the bogus one.
2360     # However, it has the same basename, so the bogon will be chosen
2361     # first if we set CC to just the basename; use the full file name.
2362     shift
2363     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2364   fi
2365 fi
2366 fi
2367 fi
2368 CC=$ac_cv_prog_CC
2369 if test -n "$CC"; then
2370   { echo "$as_me:$LINENO: result: $CC" >&5
2371 echo "${ECHO_T}$CC" >&6; }
2372 else
2373   { echo "$as_me:$LINENO: result: no" >&5
2374 echo "${ECHO_T}no" >&6; }
2375 fi
2376
2377
2378 fi
2379 if test -z "$CC"; then
2380   if test -n "$ac_tool_prefix"; then
2381   for ac_prog in cl.exe
2382   do
2383     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2384 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2385 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2386 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2387 if test "${ac_cv_prog_CC+set}" = set; then
2388   echo $ECHO_N "(cached) $ECHO_C" >&6
2389 else
2390   if test -n "$CC"; then
2391   ac_cv_prog_CC="$CC" # Let the user override the test.
2392 else
2393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2394 for as_dir in $PATH
2395 do
2396   IFS=$as_save_IFS
2397   test -z "$as_dir" && as_dir=.
2398   for ac_exec_ext in '' $ac_executable_extensions; do
2399   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2400     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2401     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2402     break 2
2403   fi
2404 done
2405 done
2406 IFS=$as_save_IFS
2407
2408 fi
2409 fi
2410 CC=$ac_cv_prog_CC
2411 if test -n "$CC"; then
2412   { echo "$as_me:$LINENO: result: $CC" >&5
2413 echo "${ECHO_T}$CC" >&6; }
2414 else
2415   { echo "$as_me:$LINENO: result: no" >&5
2416 echo "${ECHO_T}no" >&6; }
2417 fi
2418
2419
2420     test -n "$CC" && break
2421   done
2422 fi
2423 if test -z "$CC"; then
2424   ac_ct_CC=$CC
2425   for ac_prog in cl.exe
2426 do
2427   # Extract the first word of "$ac_prog", so it can be a program name with args.
2428 set dummy $ac_prog; ac_word=$2
2429 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2430 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2431 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2432   echo $ECHO_N "(cached) $ECHO_C" >&6
2433 else
2434   if test -n "$ac_ct_CC"; then
2435   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2436 else
2437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2438 for as_dir in $PATH
2439 do
2440   IFS=$as_save_IFS
2441   test -z "$as_dir" && as_dir=.
2442   for ac_exec_ext in '' $ac_executable_extensions; do
2443   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2444     ac_cv_prog_ac_ct_CC="$ac_prog"
2445     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2446     break 2
2447   fi
2448 done
2449 done
2450 IFS=$as_save_IFS
2451
2452 fi
2453 fi
2454 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2455 if test -n "$ac_ct_CC"; then
2456   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2457 echo "${ECHO_T}$ac_ct_CC" >&6; }
2458 else
2459   { echo "$as_me:$LINENO: result: no" >&5
2460 echo "${ECHO_T}no" >&6; }
2461 fi
2462
2463
2464   test -n "$ac_ct_CC" && break
2465 done
2466
2467   if test "x$ac_ct_CC" = x; then
2468     CC=""
2469   else
2470     case $cross_compiling:$ac_tool_warned in
2471 yes:)
2472 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2473 whose name does not start with the host triplet.  If you think this
2474 configuration is useful to you, please write to autoconf@gnu.org." >&5
2475 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2476 whose name does not start with the host triplet.  If you think this
2477 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2478 ac_tool_warned=yes ;;
2479 esac
2480     CC=$ac_ct_CC
2481   fi
2482 fi
2483
2484 fi
2485
2486
2487 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2488 See \`config.log' for more details." >&5
2489 echo "$as_me: error: no acceptable C compiler found in \$PATH
2490 See \`config.log' for more details." >&2;}
2491    { (exit 1); exit 1; }; }
2492
2493 # Provide some information about the compiler.
2494 echo "$as_me:$LINENO: checking for C compiler version" >&5
2495 ac_compiler=`set X $ac_compile; echo $2`
2496 { (ac_try="$ac_compiler --version >&5"
2497 case "(($ac_try" in
2498   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2499   *) ac_try_echo=$ac_try;;
2500 esac
2501 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2502   (eval "$ac_compiler --version >&5") 2>&5
2503   ac_status=$?
2504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2505   (exit $ac_status); }
2506 { (ac_try="$ac_compiler -v >&5"
2507 case "(($ac_try" in
2508   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2509   *) ac_try_echo=$ac_try;;
2510 esac
2511 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2512   (eval "$ac_compiler -v >&5") 2>&5
2513   ac_status=$?
2514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2515   (exit $ac_status); }
2516 { (ac_try="$ac_compiler -V >&5"
2517 case "(($ac_try" in
2518   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2519   *) ac_try_echo=$ac_try;;
2520 esac
2521 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2522   (eval "$ac_compiler -V >&5") 2>&5
2523   ac_status=$?
2524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2525   (exit $ac_status); }
2526
2527 cat >conftest.$ac_ext <<_ACEOF
2528 /* confdefs.h.  */
2529 _ACEOF
2530 cat confdefs.h >>conftest.$ac_ext
2531 cat >>conftest.$ac_ext <<_ACEOF
2532 /* end confdefs.h.  */
2533
2534 int
2535 main ()
2536 {
2537
2538   ;
2539   return 0;
2540 }
2541 _ACEOF
2542 ac_clean_files_save=$ac_clean_files
2543 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2544 # Try to create an executable without -o first, disregard a.out.
2545 # It will help us diagnose broken compilers, and finding out an intuition
2546 # of exeext.
2547 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2548 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2549 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2550 #
2551 # List of possible output files, starting from the most likely.
2552 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2553 # only as a last resort.  b.out is created by i960 compilers.
2554 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2555 #
2556 # The IRIX 6 linker writes into existing files which may not be
2557 # executable, retaining their permissions.  Remove them first so a
2558 # subsequent execution test works.
2559 ac_rmfiles=
2560 for ac_file in $ac_files
2561 do
2562   case $ac_file in
2563     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2564     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2565   esac
2566 done
2567 rm -f $ac_rmfiles
2568
2569 if { (ac_try="$ac_link_default"
2570 case "(($ac_try" in
2571   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2572   *) ac_try_echo=$ac_try;;
2573 esac
2574 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2575   (eval "$ac_link_default") 2>&5
2576   ac_status=$?
2577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2578   (exit $ac_status); }; then
2579   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2580 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2581 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2582 # so that the user can short-circuit this test for compilers unknown to
2583 # Autoconf.
2584 for ac_file in $ac_files ''
2585 do
2586   test -f "$ac_file" || continue
2587   case $ac_file in
2588     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2589         ;;
2590     [ab].out )
2591         # We found the default executable, but exeext='' is most
2592         # certainly right.
2593         break;;
2594     *.* )
2595         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2596         then :; else
2597            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2598         fi
2599         # We set ac_cv_exeext here because the later test for it is not
2600         # safe: cross compilers may not add the suffix if given an `-o'
2601         # argument, so we may need to know it at that point already.
2602         # Even if this section looks crufty: it has the advantage of
2603         # actually working.
2604         break;;
2605     * )
2606         break;;
2607   esac
2608 done
2609 test "$ac_cv_exeext" = no && ac_cv_exeext=
2610
2611 else
2612   ac_file=''
2613 fi
2614
2615 { echo "$as_me:$LINENO: result: $ac_file" >&5
2616 echo "${ECHO_T}$ac_file" >&6; }
2617 if test -z "$ac_file"; then
2618   echo "$as_me: failed program was:" >&5
2619 sed 's/^/| /' conftest.$ac_ext >&5
2620
2621 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2622 See \`config.log' for more details." >&5
2623 echo "$as_me: error: C compiler cannot create executables
2624 See \`config.log' for more details." >&2;}
2625    { (exit 77); exit 77; }; }
2626 fi
2627
2628 ac_exeext=$ac_cv_exeext
2629
2630 # Check that the compiler produces executables we can run.  If not, either
2631 # the compiler is broken, or we cross compile.
2632 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2633 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2634 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2635 # If not cross compiling, check that we can run a simple program.
2636 if test "$cross_compiling" != yes; then
2637   if { ac_try='./$ac_file'
2638   { (case "(($ac_try" in
2639   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2640   *) ac_try_echo=$ac_try;;
2641 esac
2642 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2643   (eval "$ac_try") 2>&5
2644   ac_status=$?
2645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2646   (exit $ac_status); }; }; then
2647     cross_compiling=no
2648   else
2649     if test "$cross_compiling" = maybe; then
2650         cross_compiling=yes
2651     else
2652         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2653 If you meant to cross compile, use \`--host'.
2654 See \`config.log' for more details." >&5
2655 echo "$as_me: error: cannot run C compiled programs.
2656 If you meant to cross compile, use \`--host'.
2657 See \`config.log' for more details." >&2;}
2658    { (exit 1); exit 1; }; }
2659     fi
2660   fi
2661 fi
2662 { echo "$as_me:$LINENO: result: yes" >&5
2663 echo "${ECHO_T}yes" >&6; }
2664
2665 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2666 ac_clean_files=$ac_clean_files_save
2667 # Check that the compiler produces executables we can run.  If not, either
2668 # the compiler is broken, or we cross compile.
2669 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2670 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2671 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
2672 echo "${ECHO_T}$cross_compiling" >&6; }
2673
2674 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
2675 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2676 if { (ac_try="$ac_link"
2677 case "(($ac_try" in
2678   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2679   *) ac_try_echo=$ac_try;;
2680 esac
2681 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2682   (eval "$ac_link") 2>&5
2683   ac_status=$?
2684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2685   (exit $ac_status); }; then
2686   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2687 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2688 # work properly (i.e., refer to `conftest.exe'), while it won't with
2689 # `rm'.
2690 for ac_file in conftest.exe conftest conftest.*; do
2691   test -f "$ac_file" || continue
2692   case $ac_file in
2693     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2694     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2695           break;;
2696     * ) break;;
2697   esac
2698 done
2699 else
2700   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2701 See \`config.log' for more details." >&5
2702 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2703 See \`config.log' for more details." >&2;}
2704    { (exit 1); exit 1; }; }
2705 fi
2706
2707 rm -f conftest$ac_cv_exeext
2708 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2709 echo "${ECHO_T}$ac_cv_exeext" >&6; }
2710
2711 rm -f conftest.$ac_ext
2712 EXEEXT=$ac_cv_exeext
2713 ac_exeext=$EXEEXT
2714 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
2715 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2716 if test "${ac_cv_objext+set}" = set; then
2717   echo $ECHO_N "(cached) $ECHO_C" >&6
2718 else
2719   cat >conftest.$ac_ext <<_ACEOF
2720 /* confdefs.h.  */
2721 _ACEOF
2722 cat confdefs.h >>conftest.$ac_ext
2723 cat >>conftest.$ac_ext <<_ACEOF
2724 /* end confdefs.h.  */
2725
2726 int
2727 main ()
2728 {
2729
2730   ;
2731   return 0;
2732 }
2733 _ACEOF
2734 rm -f conftest.o conftest.obj
2735 if { (ac_try="$ac_compile"
2736 case "(($ac_try" in
2737   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2738   *) ac_try_echo=$ac_try;;
2739 esac
2740 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2741   (eval "$ac_compile") 2>&5
2742   ac_status=$?
2743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2744   (exit $ac_status); }; then
2745   for ac_file in conftest.o conftest.obj conftest.*; do
2746   test -f "$ac_file" || continue;
2747   case $ac_file in
2748     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2749     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2750        break;;
2751   esac
2752 done
2753 else
2754   echo "$as_me: failed program was:" >&5
2755 sed 's/^/| /' conftest.$ac_ext >&5
2756
2757 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2758 See \`config.log' for more details." >&5
2759 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2760 See \`config.log' for more details." >&2;}
2761    { (exit 1); exit 1; }; }
2762 fi
2763
2764 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2765 fi
2766 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2767 echo "${ECHO_T}$ac_cv_objext" >&6; }
2768 OBJEXT=$ac_cv_objext
2769 ac_objext=$OBJEXT
2770 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2771 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
2772 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2773   echo $ECHO_N "(cached) $ECHO_C" >&6
2774 else
2775   cat >conftest.$ac_ext <<_ACEOF
2776 /* confdefs.h.  */
2777 _ACEOF
2778 cat confdefs.h >>conftest.$ac_ext
2779 cat >>conftest.$ac_ext <<_ACEOF
2780 /* end confdefs.h.  */
2781
2782 int
2783 main ()
2784 {
2785 #ifndef __GNUC__
2786        choke me
2787 #endif
2788
2789   ;
2790   return 0;
2791 }
2792 _ACEOF
2793 rm -f conftest.$ac_objext
2794 if { (ac_try="$ac_compile"
2795 case "(($ac_try" in
2796   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2797   *) ac_try_echo=$ac_try;;
2798 esac
2799 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2800   (eval "$ac_compile") 2>conftest.er1
2801   ac_status=$?
2802   grep -v '^ *+' conftest.er1 >conftest.err
2803   rm -f conftest.er1
2804   cat conftest.err >&5
2805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2806   (exit $ac_status); } && {
2807          test -z "$ac_c_werror_flag" ||
2808          test ! -s conftest.err
2809        } && test -s conftest.$ac_objext; then
2810   ac_compiler_gnu=yes
2811 else
2812   echo "$as_me: failed program was:" >&5
2813 sed 's/^/| /' conftest.$ac_ext >&5
2814
2815         ac_compiler_gnu=no
2816 fi
2817
2818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2819 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2820
2821 fi
2822 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2823 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2824 GCC=`test $ac_compiler_gnu = yes && echo yes`
2825 ac_test_CFLAGS=${CFLAGS+set}
2826 ac_save_CFLAGS=$CFLAGS
2827 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2828 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
2829 if test "${ac_cv_prog_cc_g+set}" = set; then
2830   echo $ECHO_N "(cached) $ECHO_C" >&6
2831 else
2832   ac_save_c_werror_flag=$ac_c_werror_flag
2833    ac_c_werror_flag=yes
2834    ac_cv_prog_cc_g=no
2835    CFLAGS="-g"
2836    cat >conftest.$ac_ext <<_ACEOF
2837 /* confdefs.h.  */
2838 _ACEOF
2839 cat confdefs.h >>conftest.$ac_ext
2840 cat >>conftest.$ac_ext <<_ACEOF
2841 /* end confdefs.h.  */
2842
2843 int
2844 main ()
2845 {
2846
2847   ;
2848   return 0;
2849 }
2850 _ACEOF
2851 rm -f conftest.$ac_objext
2852 if { (ac_try="$ac_compile"
2853 case "(($ac_try" in
2854   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2855   *) ac_try_echo=$ac_try;;
2856 esac
2857 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2858   (eval "$ac_compile") 2>conftest.er1
2859   ac_status=$?
2860   grep -v '^ *+' conftest.er1 >conftest.err
2861   rm -f conftest.er1
2862   cat conftest.err >&5
2863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2864   (exit $ac_status); } && {
2865          test -z "$ac_c_werror_flag" ||
2866          test ! -s conftest.err
2867        } && test -s conftest.$ac_objext; then
2868   ac_cv_prog_cc_g=yes
2869 else
2870   echo "$as_me: failed program was:" >&5
2871 sed 's/^/| /' conftest.$ac_ext >&5
2872
2873         CFLAGS=""
2874       cat >conftest.$ac_ext <<_ACEOF
2875 /* confdefs.h.  */
2876 _ACEOF
2877 cat confdefs.h >>conftest.$ac_ext
2878 cat >>conftest.$ac_ext <<_ACEOF
2879 /* end confdefs.h.  */
2880
2881 int
2882 main ()
2883 {
2884
2885   ;
2886   return 0;
2887 }
2888 _ACEOF
2889 rm -f conftest.$ac_objext
2890 if { (ac_try="$ac_compile"
2891 case "(($ac_try" in
2892   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2893   *) ac_try_echo=$ac_try;;
2894 esac
2895 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2896   (eval "$ac_compile") 2>conftest.er1
2897   ac_status=$?
2898   grep -v '^ *+' conftest.er1 >conftest.err
2899   rm -f conftest.er1
2900   cat conftest.err >&5
2901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2902   (exit $ac_status); } && {
2903          test -z "$ac_c_werror_flag" ||
2904          test ! -s conftest.err
2905        } && test -s conftest.$ac_objext; then
2906   :
2907 else
2908   echo "$as_me: failed program was:" >&5
2909 sed 's/^/| /' conftest.$ac_ext >&5
2910
2911         ac_c_werror_flag=$ac_save_c_werror_flag
2912          CFLAGS="-g"
2913          cat >conftest.$ac_ext <<_ACEOF
2914 /* confdefs.h.  */
2915 _ACEOF
2916 cat confdefs.h >>conftest.$ac_ext
2917 cat >>conftest.$ac_ext <<_ACEOF
2918 /* end confdefs.h.  */
2919
2920 int
2921 main ()
2922 {
2923
2924   ;
2925   return 0;
2926 }
2927 _ACEOF
2928 rm -f conftest.$ac_objext
2929 if { (ac_try="$ac_compile"
2930 case "(($ac_try" in
2931   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2932   *) ac_try_echo=$ac_try;;
2933 esac
2934 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2935   (eval "$ac_compile") 2>conftest.er1
2936   ac_status=$?
2937   grep -v '^ *+' conftest.er1 >conftest.err
2938   rm -f conftest.er1
2939   cat conftest.err >&5
2940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2941   (exit $ac_status); } && {
2942          test -z "$ac_c_werror_flag" ||
2943          test ! -s conftest.err
2944        } && test -s conftest.$ac_objext; then
2945   ac_cv_prog_cc_g=yes
2946 else
2947   echo "$as_me: failed program was:" >&5
2948 sed 's/^/| /' conftest.$ac_ext >&5
2949
2950
2951 fi
2952
2953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2954 fi
2955
2956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2957 fi
2958
2959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2960    ac_c_werror_flag=$ac_save_c_werror_flag
2961 fi
2962 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2963 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
2964 if test "$ac_test_CFLAGS" = set; then
2965   CFLAGS=$ac_save_CFLAGS
2966 elif test $ac_cv_prog_cc_g = yes; then
2967   if test "$GCC" = yes; then
2968     CFLAGS="-g -O2"
2969   else
2970     CFLAGS="-g"
2971   fi
2972 else
2973   if test "$GCC" = yes; then
2974     CFLAGS="-O2"
2975   else
2976     CFLAGS=
2977   fi
2978 fi
2979 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
2980 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
2981 if test "${ac_cv_prog_cc_c89+set}" = set; then
2982   echo $ECHO_N "(cached) $ECHO_C" >&6
2983 else
2984   ac_cv_prog_cc_c89=no
2985 ac_save_CC=$CC
2986 cat >conftest.$ac_ext <<_ACEOF
2987 /* confdefs.h.  */
2988 _ACEOF
2989 cat confdefs.h >>conftest.$ac_ext
2990 cat >>conftest.$ac_ext <<_ACEOF
2991 /* end confdefs.h.  */
2992 #include <stdarg.h>
2993 #include <stdio.h>
2994 #include <sys/types.h>
2995 #include <sys/stat.h>
2996 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2997 struct buf { int x; };
2998 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2999 static char *e (p, i)
3000      char **p;
3001      int i;
3002 {
3003   return p[i];
3004 }
3005 static char *f (char * (*g) (char **, int), char **p, ...)
3006 {
3007   char *s;
3008   va_list v;
3009   va_start (v,p);
3010   s = g (p, va_arg (v,int));
3011   va_end (v);
3012   return s;
3013 }
3014
3015 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3016    function prototypes and stuff, but not '\xHH' hex character constants.
3017    These don't provoke an error unfortunately, instead are silently treated
3018    as 'x'.  The following induces an error, until -std is added to get
3019    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3020    array size at least.  It's necessary to write '\x00'==0 to get something
3021    that's true only with -std.  */
3022 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3023
3024 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3025    inside strings and character constants.  */
3026 #define FOO(x) 'x'
3027 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3028
3029 int test (int i, double x);
3030 struct s1 {int (*f) (int a);};
3031 struct s2 {int (*f) (double a);};
3032 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3033 int argc;
3034 char **argv;
3035 int
3036 main ()
3037 {
3038 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3039   ;
3040   return 0;
3041 }
3042 _ACEOF
3043 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3044         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3045 do
3046   CC="$ac_save_CC $ac_arg"
3047   rm -f conftest.$ac_objext
3048 if { (ac_try="$ac_compile"
3049 case "(($ac_try" in
3050   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3051   *) ac_try_echo=$ac_try;;
3052 esac
3053 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3054   (eval "$ac_compile") 2>conftest.er1
3055   ac_status=$?
3056   grep -v '^ *+' conftest.er1 >conftest.err
3057   rm -f conftest.er1
3058   cat conftest.err >&5
3059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3060   (exit $ac_status); } && {
3061          test -z "$ac_c_werror_flag" ||
3062          test ! -s conftest.err
3063        } && test -s conftest.$ac_objext; then
3064   ac_cv_prog_cc_c89=$ac_arg
3065 else
3066   echo "$as_me: failed program was:" >&5
3067 sed 's/^/| /' conftest.$ac_ext >&5
3068
3069
3070 fi
3071
3072 rm -f core conftest.err conftest.$ac_objext
3073   test "x$ac_cv_prog_cc_c89" != "xno" && break
3074 done
3075 rm -f conftest.$ac_ext
3076 CC=$ac_save_CC
3077
3078 fi
3079 # AC_CACHE_VAL
3080 case "x$ac_cv_prog_cc_c89" in
3081   x)
3082     { echo "$as_me:$LINENO: result: none needed" >&5
3083 echo "${ECHO_T}none needed" >&6; } ;;
3084   xno)
3085     { echo "$as_me:$LINENO: result: unsupported" >&5
3086 echo "${ECHO_T}unsupported" >&6; } ;;
3087   *)
3088     CC="$CC $ac_cv_prog_cc_c89"
3089     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3090 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3091 esac
3092
3093
3094 ac_ext=c
3095 ac_cpp='$CPP $CPPFLAGS'
3096 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3097 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3098 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3099
3100     ac_ext=c
3101 ac_cpp='$CPP $CPPFLAGS'
3102 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3103 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3104 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3105 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3106 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3107 # On Suns, sometimes $CPP names a directory.
3108 if test -n "$CPP" && test -d "$CPP"; then
3109   CPP=
3110 fi
3111 if test -z "$CPP"; then
3112   if test "${ac_cv_prog_CPP+set}" = set; then
3113   echo $ECHO_N "(cached) $ECHO_C" >&6
3114 else
3115       # Double quotes because CPP needs to be expanded
3116     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3117     do
3118       ac_preproc_ok=false
3119 for ac_c_preproc_warn_flag in '' yes
3120 do
3121   # Use a header file that comes with gcc, so configuring glibc
3122   # with a fresh cross-compiler works.
3123   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3124   # <limits.h> exists even on freestanding compilers.
3125   # On the NeXT, cc -E runs the code through the compiler's parser,
3126   # not just through cpp. "Syntax error" is here to catch this case.
3127   cat >conftest.$ac_ext <<_ACEOF
3128 /* confdefs.h.  */
3129 _ACEOF
3130 cat confdefs.h >>conftest.$ac_ext
3131 cat >>conftest.$ac_ext <<_ACEOF
3132 /* end confdefs.h.  */
3133 #ifdef __STDC__
3134 # include <limits.h>
3135 #else
3136 # include <assert.h>
3137 #endif
3138                      Syntax error
3139 _ACEOF
3140 if { (ac_try="$ac_cpp conftest.$ac_ext"
3141 case "(($ac_try" in
3142   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3143   *) ac_try_echo=$ac_try;;
3144 esac
3145 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3146   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3147   ac_status=$?
3148   grep -v '^ *+' conftest.er1 >conftest.err
3149   rm -f conftest.er1
3150   cat conftest.err >&5
3151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3152   (exit $ac_status); } >/dev/null && {
3153          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3154          test ! -s conftest.err
3155        }; then
3156   :
3157 else
3158   echo "$as_me: failed program was:" >&5
3159 sed 's/^/| /' conftest.$ac_ext >&5
3160
3161   # Broken: fails on valid input.
3162 continue
3163 fi
3164
3165 rm -f conftest.err conftest.$ac_ext
3166
3167   # OK, works on sane cases.  Now check whether nonexistent headers
3168   # can be detected and how.
3169   cat >conftest.$ac_ext <<_ACEOF
3170 /* confdefs.h.  */
3171 _ACEOF
3172 cat confdefs.h >>conftest.$ac_ext
3173 cat >>conftest.$ac_ext <<_ACEOF
3174 /* end confdefs.h.  */
3175 #include <ac_nonexistent.h>
3176 _ACEOF
3177 if { (ac_try="$ac_cpp conftest.$ac_ext"
3178 case "(($ac_try" in
3179   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3180   *) ac_try_echo=$ac_try;;
3181 esac
3182 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3183   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3184   ac_status=$?
3185   grep -v '^ *+' conftest.er1 >conftest.err
3186   rm -f conftest.er1
3187   cat conftest.err >&5
3188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3189   (exit $ac_status); } >/dev/null && {
3190          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3191          test ! -s conftest.err
3192        }; then
3193   # Broken: success on invalid input.
3194 continue
3195 else
3196   echo "$as_me: failed program was:" >&5
3197 sed 's/^/| /' conftest.$ac_ext >&5
3198
3199   # Passes both tests.
3200 ac_preproc_ok=:
3201 break
3202 fi
3203
3204 rm -f conftest.err conftest.$ac_ext
3205
3206 done
3207 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3208 rm -f conftest.err conftest.$ac_ext
3209 if $ac_preproc_ok; then
3210   break
3211 fi
3212
3213     done
3214     ac_cv_prog_CPP=$CPP
3215
3216 fi
3217   CPP=$ac_cv_prog_CPP
3218 else
3219   ac_cv_prog_CPP=$CPP
3220 fi
3221 { echo "$as_me:$LINENO: result: $CPP" >&5
3222 echo "${ECHO_T}$CPP" >&6; }
3223 ac_preproc_ok=false
3224 for ac_c_preproc_warn_flag in '' yes
3225 do
3226   # Use a header file that comes with gcc, so configuring glibc
3227   # with a fresh cross-compiler works.
3228   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3229   # <limits.h> exists even on freestanding compilers.
3230   # On the NeXT, cc -E runs the code through the compiler's parser,
3231   # not just through cpp. "Syntax error" is here to catch this case.
3232   cat >conftest.$ac_ext <<_ACEOF
3233 /* confdefs.h.  */
3234 _ACEOF
3235 cat confdefs.h >>conftest.$ac_ext
3236 cat >>conftest.$ac_ext <<_ACEOF
3237 /* end confdefs.h.  */
3238 #ifdef __STDC__
3239 # include <limits.h>
3240 #else
3241 # include <assert.h>
3242 #endif
3243                      Syntax error
3244 _ACEOF
3245 if { (ac_try="$ac_cpp conftest.$ac_ext"
3246 case "(($ac_try" in
3247   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3248   *) ac_try_echo=$ac_try;;
3249 esac
3250 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3251   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3252   ac_status=$?
3253   grep -v '^ *+' conftest.er1 >conftest.err
3254   rm -f conftest.er1
3255   cat conftest.err >&5
3256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3257   (exit $ac_status); } >/dev/null && {
3258          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3259          test ! -s conftest.err
3260        }; then
3261   :
3262 else
3263   echo "$as_me: failed program was:" >&5
3264 sed 's/^/| /' conftest.$ac_ext >&5
3265
3266   # Broken: fails on valid input.
3267 continue
3268 fi
3269
3270 rm -f conftest.err conftest.$ac_ext
3271
3272   # OK, works on sane cases.  Now check whether nonexistent headers
3273   # can be detected and how.
3274   cat >conftest.$ac_ext <<_ACEOF
3275 /* confdefs.h.  */
3276 _ACEOF
3277 cat confdefs.h >>conftest.$ac_ext
3278 cat >>conftest.$ac_ext <<_ACEOF
3279 /* end confdefs.h.  */
3280 #include <ac_nonexistent.h>
3281 _ACEOF
3282 if { (ac_try="$ac_cpp conftest.$ac_ext"
3283 case "(($ac_try" in
3284   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3285   *) ac_try_echo=$ac_try;;
3286 esac
3287 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3288   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3289   ac_status=$?
3290   grep -v '^ *+' conftest.er1 >conftest.err
3291   rm -f conftest.er1
3292   cat conftest.err >&5
3293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3294   (exit $ac_status); } >/dev/null && {
3295          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3296          test ! -s conftest.err
3297        }; then
3298   # Broken: success on invalid input.
3299 continue
3300 else
3301   echo "$as_me: failed program was:" >&5
3302 sed 's/^/| /' conftest.$ac_ext >&5
3303
3304   # Passes both tests.
3305 ac_preproc_ok=:
3306 break
3307 fi
3308
3309 rm -f conftest.err conftest.$ac_ext
3310
3311 done
3312 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3313 rm -f conftest.err conftest.$ac_ext
3314 if $ac_preproc_ok; then
3315   :
3316 else
3317   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3318 See \`config.log' for more details." >&5
3319 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3320 See \`config.log' for more details." >&2;}
3321    { (exit 1); exit 1; }; }
3322 fi
3323
3324 ac_ext=c
3325 ac_cpp='$CPP $CPPFLAGS'
3326 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3327 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3328 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3329
3330
3331     # Find a good install program.  We prefer a C program (faster),
3332 # so one script is as good as another.  But avoid the broken or
3333 # incompatible versions:
3334 # SysV /etc/install, /usr/sbin/install
3335 # SunOS /usr/etc/install
3336 # IRIX /sbin/install
3337 # AIX /bin/install
3338 # AmigaOS /C/install, which installs bootblocks on floppy discs
3339 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3340 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3341 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3342 # OS/2's system install, which has a completely different semantic
3343 # ./install, which can be erroneously created by make from ./install.sh.
3344 { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3345 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
3346 if test -z "$INSTALL"; then
3347 if test "${ac_cv_path_install+set}" = set; then
3348   echo $ECHO_N "(cached) $ECHO_C" >&6
3349 else
3350   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3351 for as_dir in $PATH
3352 do
3353   IFS=$as_save_IFS
3354   test -z "$as_dir" && as_dir=.
3355   # Account for people who put trailing slashes in PATH elements.
3356 case $as_dir/ in
3357   ./ | .// | /cC/* | \
3358   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3359   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3360   /usr/ucb/* ) ;;
3361   *)
3362     # OSF1 and SCO ODT 3.0 have their own names for install.
3363     # Don't use installbsd from OSF since it installs stuff as root
3364     # by default.
3365     for ac_prog in ginstall scoinst install; do
3366       for ac_exec_ext in '' $ac_executable_extensions; do
3367         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3368           if test $ac_prog = install &&
3369             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3370             # AIX install.  It has an incompatible calling convention.
3371             :
3372           elif test $ac_prog = install &&
3373             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3374             # program-specific install script used by HP pwplus--don't use.
3375             :
3376           else
3377             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3378             break 3
3379           fi
3380         fi
3381       done
3382     done
3383     ;;
3384 esac
3385 done
3386 IFS=$as_save_IFS
3387
3388
3389 fi
3390   if test "${ac_cv_path_install+set}" = set; then
3391     INSTALL=$ac_cv_path_install
3392   else
3393     # As a last resort, use the slow shell script.  Don't cache a
3394     # value for INSTALL within a source directory, because that will
3395     # break other packages using the cache if that directory is
3396     # removed, or if the value is a relative name.
3397     INSTALL=$ac_install_sh
3398   fi
3399 fi
3400 { echo "$as_me:$LINENO: result: $INSTALL" >&5
3401 echo "${ECHO_T}$INSTALL" >&6; }
3402
3403 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3404 # It thinks the first close brace ends the variable substitution.
3405 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3406
3407 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3408
3409 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3410
3411
3412     #--------------------------------------------------------------------
3413     # Checks to see if the make program sets the $MAKE variable.
3414     #--------------------------------------------------------------------
3415
3416     { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3417 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
3418 set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3419 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
3420   echo $ECHO_N "(cached) $ECHO_C" >&6
3421 else
3422   cat >conftest.make <<\_ACEOF
3423 SHELL = /bin/sh
3424 all:
3425         @echo '@@@%%%=$(MAKE)=@@@%%%'
3426 _ACEOF
3427 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3428 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3429   *@@@%%%=?*=@@@%%%*)
3430     eval ac_cv_prog_make_${ac_make}_set=yes;;
3431   *)
3432     eval ac_cv_prog_make_${ac_make}_set=no;;
3433 esac
3434 rm -f conftest.make
3435 fi
3436 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3437   { echo "$as_me:$LINENO: result: yes" >&5
3438 echo "${ECHO_T}yes" >&6; }
3439   SET_MAKE=
3440 else
3441   { echo "$as_me:$LINENO: result: no" >&5
3442 echo "${ECHO_T}no" >&6; }
3443   SET_MAKE="MAKE=${MAKE-make}"
3444 fi
3445
3446
3447     #--------------------------------------------------------------------
3448     # Find ranlib
3449     #--------------------------------------------------------------------
3450
3451     if test -n "$ac_tool_prefix"; then
3452   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3453 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3454 { echo "$as_me:$LINENO: checking for $ac_word" >&5
3455 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3456 if test "${ac_cv_prog_RANLIB+set}" = set; then
3457   echo $ECHO_N "(cached) $ECHO_C" >&6
3458 else
3459   if test -n "$RANLIB"; then
3460   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3461 else
3462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3463 for as_dir in $PATH
3464 do
3465   IFS=$as_save_IFS
3466   test -z "$as_dir" && as_dir=.
3467   for ac_exec_ext in '' $ac_executable_extensions; do
3468   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3469     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3470     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3471     break 2
3472   fi
3473 done
3474 done
3475 IFS=$as_save_IFS
3476
3477 fi
3478 fi
3479 RANLIB=$ac_cv_prog_RANLIB
3480 if test -n "$RANLIB"; then
3481   { echo "$as_me:$LINENO: result: $RANLIB" >&5
3482 echo "${ECHO_T}$RANLIB" >&6; }
3483 else
3484   { echo "$as_me:$LINENO: result: no" >&5
3485 echo "${ECHO_T}no" >&6; }
3486 fi
3487
3488
3489 fi
3490 if test -z "$ac_cv_prog_RANLIB"; then
3491   ac_ct_RANLIB=$RANLIB
3492   # Extract the first word of "ranlib", so it can be a program name with args.
3493 set dummy ranlib; ac_word=$2
3494 { echo "$as_me:$LINENO: checking for $ac_word" >&5
3495 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3496 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3497   echo $ECHO_N "(cached) $ECHO_C" >&6
3498 else
3499   if test -n "$ac_ct_RANLIB"; then
3500   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3501 else
3502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3503 for as_dir in $PATH
3504 do
3505   IFS=$as_save_IFS
3506   test -z "$as_dir" && as_dir=.
3507   for ac_exec_ext in '' $ac_executable_extensions; do
3508   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3509     ac_cv_prog_ac_ct_RANLIB="ranlib"
3510     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3511     break 2
3512   fi
3513 done
3514 done
3515 IFS=$as_save_IFS
3516
3517 fi
3518 fi
3519 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3520 if test -n "$ac_ct_RANLIB"; then
3521   { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3522 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
3523 else
3524   { echo "$as_me:$LINENO: result: no" >&5
3525 echo "${ECHO_T}no" >&6; }
3526 fi
3527
3528   if test "x$ac_ct_RANLIB" = x; then
3529     RANLIB=":"
3530   else
3531     case $cross_compiling:$ac_tool_warned in
3532 yes:)
3533 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3534 whose name does not start with the host triplet.  If you think this
3535 configuration is useful to you, please write to autoconf@gnu.org." >&5
3536 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3537 whose name does not start with the host triplet.  If you think this
3538 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3539 ac_tool_warned=yes ;;
3540 esac
3541     RANLIB=$ac_ct_RANLIB
3542   fi
3543 else
3544   RANLIB="$ac_cv_prog_RANLIB"
3545 fi
3546
3547
3548     #--------------------------------------------------------------------
3549     # Determines the correct binary file extension (.o, .obj, .exe etc.)
3550     #--------------------------------------------------------------------
3551
3552
3553
3554
3555
3556
3557 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3558 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3559 if test "${ac_cv_path_GREP+set}" = set; then
3560   echo $ECHO_N "(cached) $ECHO_C" >&6
3561 else
3562   # Extract the first word of "grep ggrep" to use in msg output
3563 if test -z "$GREP"; then
3564 set dummy grep ggrep; ac_prog_name=$2
3565 if test "${ac_cv_path_GREP+set}" = set; then
3566   echo $ECHO_N "(cached) $ECHO_C" >&6
3567 else
3568   ac_path_GREP_found=false
3569 # Loop through the user's path and test for each of PROGNAME-LIST
3570 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3571 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3572 do
3573   IFS=$as_save_IFS
3574   test -z "$as_dir" && as_dir=.
3575   for ac_prog in grep ggrep; do
3576   for ac_exec_ext in '' $ac_executable_extensions; do
3577     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3578     { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3579     # Check for GNU ac_path_GREP and select it if it is found.
3580   # Check for GNU $ac_path_GREP
3581 case `"$ac_path_GREP" --version 2>&1` in
3582 *GNU*)
3583   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3584 *)
3585   ac_count=0
3586   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3587   while :
3588   do
3589     cat "conftest.in" "conftest.in" >"conftest.tmp"
3590     mv "conftest.tmp" "conftest.in"
3591     cp "conftest.in" "conftest.nl"
3592     echo 'GREP' >> "conftest.nl"
3593     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3594     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3595     ac_count=`expr $ac_count + 1`
3596     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3597       # Best one so far, save it but keep looking for a better one
3598       ac_cv_path_GREP="$ac_path_GREP"
3599       ac_path_GREP_max=$ac_count
3600     fi
3601     # 10*(2^10) chars as input seems more than enough
3602     test $ac_count -gt 10 && break
3603   done
3604   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3605 esac
3606
3607
3608     $ac_path_GREP_found && break 3
3609   done
3610 done
3611
3612 done
3613 IFS=$as_save_IFS
3614
3615
3616 fi
3617
3618 GREP="$ac_cv_path_GREP"
3619 if test -z "$GREP"; then
3620   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3621 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3622    { (exit 1); exit 1; }; }
3623 fi
3624
3625 else
3626   ac_cv_path_GREP=$GREP
3627 fi
3628
3629
3630 fi
3631 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3632 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3633  GREP="$ac_cv_path_GREP"
3634
3635
3636 { echo "$as_me:$LINENO: checking for egrep" >&5
3637 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3638 if test "${ac_cv_path_EGREP+set}" = set; then
3639   echo $ECHO_N "(cached) $ECHO_C" >&6
3640 else
3641   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3642    then ac_cv_path_EGREP="$GREP -E"
3643    else
3644      # Extract the first word of "egrep" to use in msg output
3645 if test -z "$EGREP"; then
3646 set dummy egrep; ac_prog_name=$2
3647 if test "${ac_cv_path_EGREP+set}" = set; then
3648   echo $ECHO_N "(cached) $ECHO_C" >&6
3649 else
3650   ac_path_EGREP_found=false
3651 # Loop through the user's path and test for each of PROGNAME-LIST
3652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3653 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3654 do
3655   IFS=$as_save_IFS
3656   test -z "$as_dir" && as_dir=.
3657   for ac_prog in egrep; do
3658   for ac_exec_ext in '' $ac_executable_extensions; do
3659     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3660     { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3661     # Check for GNU ac_path_EGREP and select it if it is found.
3662   # Check for GNU $ac_path_EGREP
3663 case `"$ac_path_EGREP" --version 2>&1` in
3664 *GNU*)
3665   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3666 *)
3667   ac_count=0
3668   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3669   while :
3670   do
3671     cat "conftest.in" "conftest.in" >"conftest.tmp"
3672     mv "conftest.tmp" "conftest.in"
3673     cp "conftest.in" "conftest.nl"
3674     echo 'EGREP' >> "conftest.nl"
3675     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3676     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3677     ac_count=`expr $ac_count + 1`
3678     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3679       # Best one so far, save it but keep looking for a better one
3680       ac_cv_path_EGREP="$ac_path_EGREP"
3681       ac_path_EGREP_max=$ac_count
3682     fi
3683     # 10*(2^10) chars as input seems more than enough
3684     test $ac_count -gt 10 && break
3685   done
3686   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3687 esac
3688
3689
3690     $ac_path_EGREP_found && break 3
3691   done
3692 done
3693
3694 done
3695 IFS=$as_save_IFS
3696
3697
3698 fi
3699
3700 EGREP="$ac_cv_path_EGREP"
3701 if test -z "$EGREP"; then
3702   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3703 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3704    { (exit 1); exit 1; }; }
3705 fi
3706
3707 else
3708   ac_cv_path_EGREP=$EGREP
3709 fi
3710
3711
3712    fi
3713 fi
3714 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3715 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3716  EGREP="$ac_cv_path_EGREP"
3717
3718
3719 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3720 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
3721 if test "${ac_cv_header_stdc+set}" = set; then
3722   echo $ECHO_N "(cached) $ECHO_C" >&6
3723 else
3724   cat >conftest.$ac_ext <<_ACEOF
3725 /* confdefs.h.  */
3726 _ACEOF
3727 cat confdefs.h >>conftest.$ac_ext
3728 cat >>conftest.$ac_ext <<_ACEOF
3729 /* end confdefs.h.  */
3730 #include <stdlib.h>
3731 #include <stdarg.h>
3732 #include <string.h>
3733 #include <float.h>
3734
3735 int
3736 main ()
3737 {
3738
3739   ;
3740   return 0;
3741 }
3742 _ACEOF
3743 rm -f conftest.$ac_objext
3744 if { (ac_try="$ac_compile"
3745 case "(($ac_try" in
3746   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3747   *) ac_try_echo=$ac_try;;
3748 esac
3749 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3750   (eval "$ac_compile") 2>conftest.er1
3751   ac_status=$?
3752   grep -v '^ *+' conftest.er1 >conftest.err
3753   rm -f conftest.er1
3754   cat conftest.err >&5
3755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3756   (exit $ac_status); } && {
3757          test -z "$ac_c_werror_flag" ||
3758          test ! -s conftest.err
3759        } && test -s conftest.$ac_objext; then
3760   ac_cv_header_stdc=yes
3761 else
3762   echo "$as_me: failed program was:" >&5
3763 sed 's/^/| /' conftest.$ac_ext >&5
3764
3765         ac_cv_header_stdc=no
3766 fi
3767
3768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3769
3770 if test $ac_cv_header_stdc = yes; then
3771   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3772   cat >conftest.$ac_ext <<_ACEOF
3773 /* confdefs.h.  */
3774 _ACEOF
3775 cat confdefs.h >>conftest.$ac_ext
3776 cat >>conftest.$ac_ext <<_ACEOF
3777 /* end confdefs.h.  */
3778 #include <string.h>
3779
3780 _ACEOF
3781 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3782   $EGREP "memchr" >/dev/null 2>&1; then
3783   :
3784 else
3785   ac_cv_header_stdc=no
3786 fi
3787 rm -f conftest*
3788
3789 fi
3790
3791 if test $ac_cv_header_stdc = yes; then
3792   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3793   cat >conftest.$ac_ext <<_ACEOF
3794 /* confdefs.h.  */
3795 _ACEOF
3796 cat confdefs.h >>conftest.$ac_ext
3797 cat >>conftest.$ac_ext <<_ACEOF
3798 /* end confdefs.h.  */
3799 #include <stdlib.h>
3800
3801 _ACEOF
3802 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3803   $EGREP "free" >/dev/null 2>&1; then
3804   :
3805 else
3806   ac_cv_header_stdc=no
3807 fi
3808 rm -f conftest*
3809
3810 fi
3811
3812 if test $ac_cv_header_stdc = yes; then
3813   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3814   if test "$cross_compiling" = yes; then
3815   :
3816 else
3817   cat >conftest.$ac_ext <<_ACEOF
3818 /* confdefs.h.  */
3819 _ACEOF
3820 cat confdefs.h >>conftest.$ac_ext
3821 cat >>conftest.$ac_ext <<_ACEOF
3822 /* end confdefs.h.  */
3823 #include <ctype.h>
3824 #include <stdlib.h>
3825 #if ((' ' & 0x0FF) == 0x020)
3826 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3827 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3828 #else
3829 # define ISLOWER(c) \
3830                    (('a' <= (c) && (c) <= 'i') \
3831                      || ('j' <= (c) && (c) <= 'r') \
3832                      || ('s' <= (c) && (c) <= 'z'))
3833 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3834 #endif
3835
3836 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3837 int
3838 main ()
3839 {
3840   int i;
3841   for (i = 0; i < 256; i++)
3842     if (XOR (islower (i), ISLOWER (i))
3843         || toupper (i) != TOUPPER (i))
3844       return 2;
3845   return 0;
3846 }
3847 _ACEOF
3848 rm -f conftest$ac_exeext
3849 if { (ac_try="$ac_link"
3850 case "(($ac_try" in
3851   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3852   *) ac_try_echo=$ac_try;;
3853 esac
3854 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3855   (eval "$ac_link") 2>&5
3856   ac_status=$?
3857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3858   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3859   { (case "(($ac_try" in
3860   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3861   *) ac_try_echo=$ac_try;;
3862 esac
3863 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3864   (eval "$ac_try") 2>&5
3865   ac_status=$?
3866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3867   (exit $ac_status); }; }; then
3868   :
3869 else
3870   echo "$as_me: program exited with status $ac_status" >&5
3871 echo "$as_me: failed program was:" >&5
3872 sed 's/^/| /' conftest.$ac_ext >&5
3873
3874 ( exit $ac_status )
3875 ac_cv_header_stdc=no
3876 fi
3877 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3878 fi
3879
3880
3881 fi
3882 fi
3883 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3884 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
3885 if test $ac_cv_header_stdc = yes; then
3886
3887 cat >>confdefs.h <<\_ACEOF
3888 #define STDC_HEADERS 1
3889 _ACEOF
3890
3891 fi
3892
3893 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3904                   inttypes.h stdint.h unistd.h
3905 do
3906 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3907 { echo "$as_me:$LINENO: checking for $ac_header" >&5
3908 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
3909 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
3910   echo $ECHO_N "(cached) $ECHO_C" >&6
3911 else
3912   cat >conftest.$ac_ext <<_ACEOF
3913 /* confdefs.h.  */
3914 _ACEOF
3915 cat confdefs.h >>conftest.$ac_ext
3916 cat >>conftest.$ac_ext <<_ACEOF
3917 /* end confdefs.h.  */
3918 $ac_includes_default
3919
3920 #include <$ac_header>
3921 _ACEOF
3922 rm -f conftest.$ac_objext
3923 if { (ac_try="$ac_compile"
3924 case "(($ac_try" in
3925   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3926   *) ac_try_echo=$ac_try;;
3927 esac
3928 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3929   (eval "$ac_compile") 2>conftest.er1
3930   ac_status=$?
3931   grep -v '^ *+' conftest.er1 >conftest.err
3932   rm -f conftest.er1
3933   cat conftest.err >&5
3934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3935   (exit $ac_status); } && {
3936          test -z "$ac_c_werror_flag" ||
3937          test ! -s conftest.err
3938        } && test -s conftest.$ac_objext; then
3939   eval "$as_ac_Header=yes"
3940 else
3941   echo "$as_me: failed program was:" >&5
3942 sed 's/^/| /' conftest.$ac_ext >&5
3943
3944         eval "$as_ac_Header=no"
3945 fi
3946
3947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3948 fi
3949 ac_res=`eval echo '${'$as_ac_Header'}'`
3950                { echo "$as_me:$LINENO: result: $ac_res" >&5
3951 echo "${ECHO_T}$ac_res" >&6; }
3952 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3953   cat >>confdefs.h <<_ACEOF
3954 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3955 _ACEOF
3956
3957 fi
3958
3959 done
3960
3961
3962
3963     # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
3964
3965
3966     #------------------------------------------------------------------------
3967     # If we're using GCC, see if the compiler understands -pipe. If so, use it.
3968     # It makes compiling go faster.  (This is only a performance feature.)
3969     #------------------------------------------------------------------------
3970
3971     if test -z "$no_pipe" -a -n "$GCC"; then
3972         { echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
3973 echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; }
3974         OLDCC="$CC"
3975         CC="$CC -pipe"
3976         cat >conftest.$ac_ext <<_ACEOF
3977 /* confdefs.h.  */
3978 _ACEOF
3979 cat confdefs.h >>conftest.$ac_ext
3980 cat >>conftest.$ac_ext <<_ACEOF
3981 /* end confdefs.h.  */
3982
3983 int
3984 main ()
3985 {
3986
3987   ;
3988   return 0;
3989 }
3990 _ACEOF
3991 rm -f conftest.$ac_objext
3992 if { (ac_try="$ac_compile"
3993 case "(($ac_try" in
3994   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3995   *) ac_try_echo=$ac_try;;
3996 esac
3997 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3998   (eval "$ac_compile") 2>conftest.er1
3999   ac_status=$?
4000   grep -v '^ *+' conftest.er1 >conftest.err
4001   rm -f conftest.er1
4002   cat conftest.err >&5
4003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4004   (exit $ac_status); } && {
4005          test -z "$ac_c_werror_flag" ||
4006          test ! -s conftest.err
4007        } && test -s conftest.$ac_objext; then
4008   { echo "$as_me:$LINENO: result: yes" >&5
4009 echo "${ECHO_T}yes" >&6; }
4010 else
4011   echo "$as_me: failed program was:" >&5
4012 sed 's/^/| /' conftest.$ac_ext >&5
4013
4014         CC="$OLDCC"
4015             { echo "$as_me:$LINENO: result: no" >&5
4016 echo "${ECHO_T}no" >&6; }
4017 fi
4018
4019 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4020     fi
4021
4022     #--------------------------------------------------------------------
4023     # Common compiler flag setup
4024     #--------------------------------------------------------------------
4025
4026     { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
4027 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
4028 if test "${ac_cv_c_bigendian+set}" = set; then
4029   echo $ECHO_N "(cached) $ECHO_C" >&6
4030 else
4031   # See if sys/param.h defines the BYTE_ORDER macro.
4032 cat >conftest.$ac_ext <<_ACEOF
4033 /* confdefs.h.  */
4034 _ACEOF
4035 cat confdefs.h >>conftest.$ac_ext
4036 cat >>conftest.$ac_ext <<_ACEOF
4037 /* end confdefs.h.  */
4038 #include <sys/types.h>
4039 #include <sys/param.h>
4040
4041 int
4042 main ()
4043 {
4044 #if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
4045         && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
4046  bogus endian macros
4047 #endif
4048
4049   ;
4050   return 0;
4051 }
4052 _ACEOF
4053 rm -f conftest.$ac_objext
4054 if { (ac_try="$ac_compile"
4055 case "(($ac_try" in
4056   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4057   *) ac_try_echo=$ac_try;;
4058 esac
4059 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4060   (eval "$ac_compile") 2>conftest.er1
4061   ac_status=$?
4062   grep -v '^ *+' conftest.er1 >conftest.err
4063   rm -f conftest.er1
4064   cat conftest.err >&5
4065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4066   (exit $ac_status); } && {
4067          test -z "$ac_c_werror_flag" ||
4068          test ! -s conftest.err
4069        } && test -s conftest.$ac_objext; then
4070   # It does; now see whether it defined to BIG_ENDIAN or not.
4071 cat >conftest.$ac_ext <<_ACEOF
4072 /* confdefs.h.  */
4073 _ACEOF
4074 cat confdefs.h >>conftest.$ac_ext
4075 cat >>conftest.$ac_ext <<_ACEOF
4076 /* end confdefs.h.  */
4077 #include <sys/types.h>
4078 #include <sys/param.h>
4079
4080 int
4081 main ()
4082 {
4083 #if BYTE_ORDER != BIG_ENDIAN
4084  not big endian
4085 #endif
4086
4087   ;
4088   return 0;
4089 }
4090 _ACEOF
4091 rm -f conftest.$ac_objext
4092 if { (ac_try="$ac_compile"
4093 case "(($ac_try" in
4094   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4095   *) ac_try_echo=$ac_try;;
4096 esac
4097 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4098   (eval "$ac_compile") 2>conftest.er1
4099   ac_status=$?
4100   grep -v '^ *+' conftest.er1 >conftest.err
4101   rm -f conftest.er1
4102   cat conftest.err >&5
4103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4104   (exit $ac_status); } && {
4105          test -z "$ac_c_werror_flag" ||
4106          test ! -s conftest.err
4107        } && test -s conftest.$ac_objext; then
4108   ac_cv_c_bigendian=yes
4109 else
4110   echo "$as_me: failed program was:" >&5
4111 sed 's/^/| /' conftest.$ac_ext >&5
4112
4113         ac_cv_c_bigendian=no
4114 fi
4115
4116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4117 else
4118   echo "$as_me: failed program was:" >&5
4119 sed 's/^/| /' conftest.$ac_ext >&5
4120
4121         # It does not; compile a test program.
4122 if test "$cross_compiling" = yes; then
4123   # try to guess the endianness by grepping values into an object file
4124   ac_cv_c_bigendian=unknown
4125   cat >conftest.$ac_ext <<_ACEOF
4126 /* confdefs.h.  */
4127 _ACEOF
4128 cat confdefs.h >>conftest.$ac_ext
4129 cat >>conftest.$ac_ext <<_ACEOF
4130 /* end confdefs.h.  */
4131 short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4132 short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4133 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
4134 short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4135 short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4136 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
4137 int
4138 main ()
4139 {
4140  _ascii (); _ebcdic ();
4141   ;
4142   return 0;
4143 }
4144 _ACEOF
4145 rm -f conftest.$ac_objext
4146 if { (ac_try="$ac_compile"
4147 case "(($ac_try" in
4148   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4149   *) ac_try_echo=$ac_try;;
4150 esac
4151 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4152   (eval "$ac_compile") 2>conftest.er1
4153   ac_status=$?
4154   grep -v '^ *+' conftest.er1 >conftest.err
4155   rm -f conftest.er1
4156   cat conftest.err >&5
4157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4158   (exit $ac_status); } && {
4159          test -z "$ac_c_werror_flag" ||
4160          test ! -s conftest.err
4161        } && test -s conftest.$ac_objext; then
4162   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
4163   ac_cv_c_bigendian=yes
4164 fi
4165 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4166   if test "$ac_cv_c_bigendian" = unknown; then
4167     ac_cv_c_bigendian=no
4168   else
4169     # finding both strings is unlikely to happen, but who knows?
4170     ac_cv_c_bigendian=unknown
4171   fi
4172 fi
4173 else
4174   echo "$as_me: failed program was:" >&5
4175 sed 's/^/| /' conftest.$ac_ext >&5
4176
4177
4178 fi
4179
4180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4181 else
4182   cat >conftest.$ac_ext <<_ACEOF
4183 /* confdefs.h.  */
4184 _ACEOF
4185 cat confdefs.h >>conftest.$ac_ext
4186 cat >>conftest.$ac_ext <<_ACEOF
4187 /* end confdefs.h.  */
4188 $ac_includes_default
4189 int
4190 main ()
4191 {
4192
4193   /* Are we little or big endian?  From Harbison&Steele.  */
4194   union
4195   {
4196     long int l;
4197     char c[sizeof (long int)];
4198   } u;
4199   u.l = 1;
4200   return u.c[sizeof (long int) - 1] == 1;
4201
4202   ;
4203   return 0;
4204 }
4205 _ACEOF
4206 rm -f conftest$ac_exeext
4207 if { (ac_try="$ac_link"
4208 case "(($ac_try" in
4209   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4210   *) ac_try_echo=$ac_try;;
4211 esac
4212 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4213   (eval "$ac_link") 2>&5
4214   ac_status=$?
4215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4216   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4217   { (case "(($ac_try" in
4218   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4219   *) ac_try_echo=$ac_try;;
4220 esac
4221 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4222   (eval "$ac_try") 2>&5
4223   ac_status=$?
4224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4225   (exit $ac_status); }; }; then
4226   ac_cv_c_bigendian=no
4227 else
4228   echo "$as_me: program exited with status $ac_status" >&5
4229 echo "$as_me: failed program was:" >&5
4230 sed 's/^/| /' conftest.$ac_ext >&5
4231
4232 ( exit $ac_status )
4233 ac_cv_c_bigendian=yes
4234 fi
4235 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4236 fi
4237
4238
4239 fi
4240
4241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4242 fi
4243 { echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
4244 echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
4245 case $ac_cv_c_bigendian in
4246   yes)
4247
4248 cat >>confdefs.h <<\_ACEOF
4249 #define WORDS_BIGENDIAN 1
4250 _ACEOF
4251  ;;
4252   no)
4253      ;;
4254   *)
4255     { { echo "$as_me:$LINENO: error: unknown endianness
4256 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
4257 echo "$as_me: error: unknown endianness
4258 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
4259    { (exit 1); exit 1; }; } ;;
4260 esac
4261
4262     if test "${TEA_PLATFORM}" = "unix" ; then
4263
4264     #--------------------------------------------------------------------
4265     # On a few very rare systems, all of the libm.a stuff is
4266     # already in libc.a.  Set compiler flags accordingly.
4267     # Also, Linux requires the "ieee" library for math to work
4268     # right (and it must appear before "-lm").
4269     #--------------------------------------------------------------------
4270
4271     { echo "$as_me:$LINENO: checking for sin" >&5
4272 echo $ECHO_N "checking for sin... $ECHO_C" >&6; }
4273 if test "${ac_cv_func_sin+set}" = set; then
4274   echo $ECHO_N "(cached) $ECHO_C" >&6
4275 else
4276   cat >conftest.$ac_ext <<_ACEOF
4277 /* confdefs.h.  */
4278 _ACEOF
4279 cat confdefs.h >>conftest.$ac_ext
4280 cat >>conftest.$ac_ext <<_ACEOF
4281 /* end confdefs.h.  */
4282 /* Define sin to an innocuous variant, in case <limits.h> declares sin.
4283    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4284 #define sin innocuous_sin
4285
4286 /* System header to define __stub macros and hopefully few prototypes,
4287     which can conflict with char sin (); below.
4288     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4289     <limits.h> exists even on freestanding compilers.  */
4290
4291 #ifdef __STDC__
4292 # include <limits.h>
4293 #else
4294 # include <assert.h>
4295 #endif
4296
4297 #undef sin
4298
4299 /* Override any GCC internal prototype to avoid an error.
4300    Use char because int might match the return type of a GCC
4301    builtin and then its argument prototype would still apply.  */
4302 #ifdef __cplusplus
4303 extern "C"
4304 #endif
4305 char sin ();
4306 /* The GNU C library defines this for functions which it implements
4307     to always fail with ENOSYS.  Some functions are actually named
4308     something starting with __ and the normal name is an alias.  */
4309 #if defined __stub_sin || defined __stub___sin
4310 choke me
4311 #endif
4312
4313 int
4314 main ()
4315 {
4316 return sin ();
4317   ;
4318   return 0;
4319 }
4320 _ACEOF
4321 rm -f conftest.$ac_objext conftest$ac_exeext
4322 if { (ac_try="$ac_link"
4323 case "(($ac_try" in
4324   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4325   *) ac_try_echo=$ac_try;;
4326 esac
4327 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4328   (eval "$ac_link") 2>conftest.er1
4329   ac_status=$?
4330   grep -v '^ *+' conftest.er1 >conftest.err
4331   rm -f conftest.er1
4332   cat conftest.err >&5
4333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4334   (exit $ac_status); } && {
4335          test -z "$ac_c_werror_flag" ||
4336          test ! -s conftest.err
4337        } && test -s conftest$ac_exeext &&
4338        $as_test_x conftest$ac_exeext; then
4339   ac_cv_func_sin=yes
4340 else
4341   echo "$as_me: failed program was:" >&5
4342 sed 's/^/| /' conftest.$ac_ext >&5
4343
4344         ac_cv_func_sin=no
4345 fi
4346
4347 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4348       conftest$ac_exeext conftest.$ac_ext
4349 fi
4350 { echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
4351 echo "${ECHO_T}$ac_cv_func_sin" >&6; }
4352 if test $ac_cv_func_sin = yes; then
4353   MATH_LIBS=""
4354 else
4355   MATH_LIBS="-lm"
4356 fi
4357
4358     { echo "$as_me:$LINENO: checking for main in -lieee" >&5
4359 echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; }
4360 if test "${ac_cv_lib_ieee_main+set}" = set; then
4361   echo $ECHO_N "(cached) $ECHO_C" >&6
4362 else
4363   ac_check_lib_save_LIBS=$LIBS
4364 LIBS="-lieee  $LIBS"
4365 cat >conftest.$ac_ext <<_ACEOF
4366 /* confdefs.h.  */
4367 _ACEOF
4368 cat confdefs.h >>conftest.$ac_ext
4369 cat >>conftest.$ac_ext <<_ACEOF
4370 /* end confdefs.h.  */
4371
4372
4373 int
4374 main ()
4375 {
4376 return main ();
4377   ;
4378   return 0;
4379 }
4380 _ACEOF
4381 rm -f conftest.$ac_objext conftest$ac_exeext
4382 if { (ac_try="$ac_link"
4383 case "(($ac_try" in
4384   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4385   *) ac_try_echo=$ac_try;;
4386 esac
4387 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4388   (eval "$ac_link") 2>conftest.er1
4389   ac_status=$?
4390   grep -v '^ *+' conftest.er1 >conftest.err
4391   rm -f conftest.er1
4392   cat conftest.err >&5
4393   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4394   (exit $ac_status); } && {
4395          test -z "$ac_c_werror_flag" ||
4396          test ! -s conftest.err
4397        } && test -s conftest$ac_exeext &&
4398        $as_test_x conftest$ac_exeext; then
4399   ac_cv_lib_ieee_main=yes
4400 else
4401   echo "$as_me: failed program was:" >&5
4402 sed 's/^/| /' conftest.$ac_ext >&5
4403
4404         ac_cv_lib_ieee_main=no
4405 fi
4406
4407 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4408       conftest$ac_exeext conftest.$ac_ext
4409 LIBS=$ac_check_lib_save_LIBS
4410 fi
4411 { echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
4412 echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; }
4413 if test $ac_cv_lib_ieee_main = yes; then
4414   MATH_LIBS="-lieee $MATH_LIBS"
4415 fi
4416
4417
4418     #--------------------------------------------------------------------
4419     # Interactive UNIX requires -linet instead of -lsocket, plus it
4420     # needs net/errno.h to define the socket-related error codes.
4421     #--------------------------------------------------------------------
4422
4423     { echo "$as_me:$LINENO: checking for main in -linet" >&5
4424 echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; }
4425 if test "${ac_cv_lib_inet_main+set}" = set; then
4426   echo $ECHO_N "(cached) $ECHO_C" >&6
4427 else
4428   ac_check_lib_save_LIBS=$LIBS
4429 LIBS="-linet  $LIBS"
4430 cat >conftest.$ac_ext <<_ACEOF
4431 /* confdefs.h.  */
4432 _ACEOF
4433 cat confdefs.h >>conftest.$ac_ext
4434 cat >>conftest.$ac_ext <<_ACEOF
4435 /* end confdefs.h.  */
4436
4437
4438 int
4439 main ()
4440 {
4441 return main ();
4442   ;
4443   return 0;
4444 }
4445 _ACEOF
4446 rm -f conftest.$ac_objext conftest$ac_exeext
4447 if { (ac_try="$ac_link"
4448 case "(($ac_try" in
4449   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4450   *) ac_try_echo=$ac_try;;
4451 esac
4452 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4453   (eval "$ac_link") 2>conftest.er1
4454   ac_status=$?
4455   grep -v '^ *+' conftest.er1 >conftest.err
4456   rm -f conftest.er1
4457   cat conftest.err >&5
4458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4459   (exit $ac_status); } && {
4460          test -z "$ac_c_werror_flag" ||
4461          test ! -s conftest.err
4462        } && test -s conftest$ac_exeext &&
4463        $as_test_x conftest$ac_exeext; then
4464   ac_cv_lib_inet_main=yes
4465 else
4466   echo "$as_me: failed program was:" >&5
4467 sed 's/^/| /' conftest.$ac_ext >&5
4468
4469         ac_cv_lib_inet_main=no
4470 fi
4471
4472 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4473       conftest$ac_exeext conftest.$ac_ext
4474 LIBS=$ac_check_lib_save_LIBS
4475 fi
4476 { echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
4477 echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; }
4478 if test $ac_cv_lib_inet_main = yes; then
4479   LIBS="$LIBS -linet"
4480 fi
4481
4482     if test "${ac_cv_header_net_errno_h+set}" = set; then
4483   { echo "$as_me:$LINENO: checking for net/errno.h" >&5
4484 echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4485 if test "${ac_cv_header_net_errno_h+set}" = set; then
4486   echo $ECHO_N "(cached) $ECHO_C" >&6
4487 fi
4488 { echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4489 echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4490 else
4491   # Is the header compilable?
4492 { echo "$as_me:$LINENO: checking net/errno.h usability" >&5
4493 echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; }
4494 cat >conftest.$ac_ext <<_ACEOF
4495 /* confdefs.h.  */
4496 _ACEOF
4497 cat confdefs.h >>conftest.$ac_ext
4498 cat >>conftest.$ac_ext <<_ACEOF
4499 /* end confdefs.h.  */
4500 $ac_includes_default
4501 #include <net/errno.h>
4502 _ACEOF
4503 rm -f conftest.$ac_objext
4504 if { (ac_try="$ac_compile"
4505 case "(($ac_try" in
4506   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4507   *) ac_try_echo=$ac_try;;
4508 esac
4509 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4510   (eval "$ac_compile") 2>conftest.er1
4511   ac_status=$?
4512   grep -v '^ *+' conftest.er1 >conftest.err
4513   rm -f conftest.er1
4514   cat conftest.err >&5
4515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4516   (exit $ac_status); } && {
4517          test -z "$ac_c_werror_flag" ||
4518          test ! -s conftest.err
4519        } && test -s conftest.$ac_objext; then
4520   ac_header_compiler=yes
4521 else
4522   echo "$as_me: failed program was:" >&5
4523 sed 's/^/| /' conftest.$ac_ext >&5
4524
4525         ac_header_compiler=no
4526 fi
4527
4528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4529 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4530 echo "${ECHO_T}$ac_header_compiler" >&6; }
4531
4532 # Is the header present?
4533 { echo "$as_me:$LINENO: checking net/errno.h presence" >&5
4534 echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; }
4535 cat >conftest.$ac_ext <<_ACEOF
4536 /* confdefs.h.  */
4537 _ACEOF
4538 cat confdefs.h >>conftest.$ac_ext
4539 cat >>conftest.$ac_ext <<_ACEOF
4540 /* end confdefs.h.  */
4541 #include <net/errno.h>
4542 _ACEOF
4543 if { (ac_try="$ac_cpp conftest.$ac_ext"
4544 case "(($ac_try" in
4545   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4546   *) ac_try_echo=$ac_try;;
4547 esac
4548 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4549   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4550   ac_status=$?
4551   grep -v '^ *+' conftest.er1 >conftest.err
4552   rm -f conftest.er1
4553   cat conftest.err >&5
4554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4555   (exit $ac_status); } >/dev/null && {
4556          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4557          test ! -s conftest.err
4558        }; then
4559   ac_header_preproc=yes
4560 else
4561   echo "$as_me: failed program was:" >&5
4562 sed 's/^/| /' conftest.$ac_ext >&5
4563
4564   ac_header_preproc=no
4565 fi
4566
4567 rm -f conftest.err conftest.$ac_ext
4568 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4569 echo "${ECHO_T}$ac_header_preproc" >&6; }
4570
4571 # So?  What about this header?
4572 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4573   yes:no: )
4574     { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
4575 echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4576     { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
4577 echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
4578     ac_header_preproc=yes
4579     ;;
4580   no:yes:* )
4581     { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
4582 echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
4583     { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
4584 echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
4585     { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
4586 echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
4587     { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
4588 echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4589     { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
4590 echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
4591     { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
4592 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
4593
4594     ;;
4595 esac
4596 { echo "$as_me:$LINENO: checking for net/errno.h" >&5
4597 echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4598 if test "${ac_cv_header_net_errno_h+set}" = set; then
4599   echo $ECHO_N "(cached) $ECHO_C" >&6
4600 else
4601   ac_cv_header_net_errno_h=$ac_header_preproc
4602 fi
4603 { echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4604 echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4605
4606 fi
4607 if test $ac_cv_header_net_errno_h = yes; then
4608
4609
4610 cat >>confdefs.h <<\_ACEOF
4611 #define HAVE_NET_ERRNO_H 1
4612 _ACEOF
4613
4614 fi
4615
4616
4617
4618     #--------------------------------------------------------------------
4619     #   Check for the existence of the -lsocket and -lnsl libraries.
4620     #   The order here is important, so that they end up in the right
4621     #   order in the command line generated by make.  Here are some
4622     #   special considerations:
4623     #   1. Use "connect" and "accept" to check for -lsocket, and
4624     #      "gethostbyname" to check for -lnsl.
4625     #   2. Use each function name only once:  can't redo a check because
4626     #      autoconf caches the results of the last check and won't redo it.
4627     #   3. Use -lnsl and -lsocket only if they supply procedures that
4628     #      aren't already present in the normal libraries.  This is because
4629     #      IRIX 5.2 has libraries, but they aren't needed and they're
4630     #      bogus:  they goof up name resolution if used.
4631     #   4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4632     #      To get around this problem, check for both libraries together
4633     #      if -lsocket doesn't work by itself.
4634     #--------------------------------------------------------------------
4635
4636     tcl_checkBoth=0
4637     { echo "$as_me:$LINENO: checking for connect" >&5
4638 echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
4639 if test "${ac_cv_func_connect+set}" = set; then
4640   echo $ECHO_N "(cached) $ECHO_C" >&6
4641 else
4642   cat >conftest.$ac_ext <<_ACEOF
4643 /* confdefs.h.  */
4644 _ACEOF
4645 cat confdefs.h >>conftest.$ac_ext
4646 cat >>conftest.$ac_ext <<_ACEOF
4647 /* end confdefs.h.  */
4648 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
4649    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4650 #define connect innocuous_connect
4651
4652 /* System header to define __stub macros and hopefully few prototypes,
4653     which can conflict with char connect (); below.
4654     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4655     <limits.h> exists even on freestanding compilers.  */
4656
4657 #ifdef __STDC__
4658 # include <limits.h>
4659 #else
4660 # include <assert.h>
4661 #endif
4662
4663 #undef connect
4664
4665 /* Override any GCC internal prototype to avoid an error.
4666    Use char because int might match the return type of a GCC
4667    builtin and then its argument prototype would still apply.  */
4668 #ifdef __cplusplus
4669 extern "C"
4670 #endif
4671 char connect ();
4672 /* The GNU C library defines this for functions which it implements
4673     to always fail with ENOSYS.  Some functions are actually named
4674     something starting with __ and the normal name is an alias.  */
4675 #if defined __stub_connect || defined __stub___connect
4676 choke me
4677 #endif
4678
4679 int
4680 main ()
4681 {
4682 return connect ();
4683   ;
4684   return 0;
4685 }
4686 _ACEOF
4687 rm -f conftest.$ac_objext conftest$ac_exeext
4688 if { (ac_try="$ac_link"
4689 case "(($ac_try" in
4690   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4691   *) ac_try_echo=$ac_try;;
4692 esac
4693 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4694   (eval "$ac_link") 2>conftest.er1
4695   ac_status=$?
4696   grep -v '^ *+' conftest.er1 >conftest.err
4697   rm -f conftest.er1
4698   cat conftest.err >&5
4699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4700   (exit $ac_status); } && {
4701          test -z "$ac_c_werror_flag" ||
4702          test ! -s conftest.err
4703        } && test -s conftest$ac_exeext &&
4704        $as_test_x conftest$ac_exeext; then
4705   ac_cv_func_connect=yes
4706 else
4707   echo "$as_me: failed program was:" >&5
4708 sed 's/^/| /' conftest.$ac_ext >&5
4709
4710         ac_cv_func_connect=no
4711 fi
4712
4713 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4714       conftest$ac_exeext conftest.$ac_ext
4715 fi
4716 { echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
4717 echo "${ECHO_T}$ac_cv_func_connect" >&6; }
4718 if test $ac_cv_func_connect = yes; then
4719   tcl_checkSocket=0
4720 else
4721   tcl_checkSocket=1
4722 fi
4723
4724     if test "$tcl_checkSocket" = 1; then
4725         { echo "$as_me:$LINENO: checking for setsockopt" >&5
4726 echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; }
4727 if test "${ac_cv_func_setsockopt+set}" = set; then
4728   echo $ECHO_N "(cached) $ECHO_C" >&6
4729 else
4730   cat >conftest.$ac_ext <<_ACEOF
4731 /* confdefs.h.  */
4732 _ACEOF
4733 cat confdefs.h >>conftest.$ac_ext
4734 cat >>conftest.$ac_ext <<_ACEOF
4735 /* end confdefs.h.  */
4736 /* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
4737    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4738 #define setsockopt innocuous_setsockopt
4739
4740 /* System header to define __stub macros and hopefully few prototypes,
4741     which can conflict with char setsockopt (); below.
4742     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4743     <limits.h> exists even on freestanding compilers.  */
4744
4745 #ifdef __STDC__
4746 # include <limits.h>
4747 #else
4748 # include <assert.h>
4749 #endif
4750
4751 #undef setsockopt
4752
4753 /* Override any GCC internal prototype to avoid an error.
4754    Use char because int might match the return type of a GCC
4755    builtin and then its argument prototype would still apply.  */
4756 #ifdef __cplusplus
4757 extern "C"
4758 #endif
4759 char setsockopt ();
4760 /* The GNU C library defines this for functions which it implements
4761     to always fail with ENOSYS.  Some functions are actually named
4762     something starting with __ and the normal name is an alias.  */
4763 #if defined __stub_setsockopt || defined __stub___setsockopt
4764 choke me
4765 #endif
4766
4767 int
4768 main ()
4769 {
4770 return setsockopt ();
4771   ;
4772   return 0;
4773 }
4774 _ACEOF
4775 rm -f conftest.$ac_objext conftest$ac_exeext
4776 if { (ac_try="$ac_link"
4777 case "(($ac_try" in
4778   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4779   *) ac_try_echo=$ac_try;;
4780 esac
4781 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4782   (eval "$ac_link") 2>conftest.er1
4783   ac_status=$?
4784   grep -v '^ *+' conftest.er1 >conftest.err
4785   rm -f conftest.er1
4786   cat conftest.err >&5
4787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4788   (exit $ac_status); } && {
4789          test -z "$ac_c_werror_flag" ||
4790          test ! -s conftest.err
4791        } && test -s conftest$ac_exeext &&
4792        $as_test_x conftest$ac_exeext; then
4793   ac_cv_func_setsockopt=yes
4794 else
4795   echo "$as_me: failed program was:" >&5
4796 sed 's/^/| /' conftest.$ac_ext >&5
4797
4798         ac_cv_func_setsockopt=no
4799 fi
4800
4801 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4802       conftest$ac_exeext conftest.$ac_ext
4803 fi
4804 { echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
4805 echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
4806 if test $ac_cv_func_setsockopt = yes; then
4807   :
4808 else
4809   { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
4810 echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
4811 if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
4812   echo $ECHO_N "(cached) $ECHO_C" >&6
4813 else
4814   ac_check_lib_save_LIBS=$LIBS
4815 LIBS="-lsocket  $LIBS"
4816 cat >conftest.$ac_ext <<_ACEOF
4817 /* confdefs.h.  */
4818 _ACEOF
4819 cat confdefs.h >>conftest.$ac_ext
4820 cat >>conftest.$ac_ext <<_ACEOF
4821 /* end confdefs.h.  */
4822
4823 /* Override any GCC internal prototype to avoid an error.
4824    Use char because int might match the return type of a GCC
4825    builtin and then its argument prototype would still apply.  */
4826 #ifdef __cplusplus
4827 extern "C"
4828 #endif
4829 char setsockopt ();
4830 int
4831 main ()
4832 {
4833 return setsockopt ();
4834   ;
4835   return 0;
4836 }
4837 _ACEOF
4838 rm -f conftest.$ac_objext conftest$ac_exeext
4839 if { (ac_try="$ac_link"
4840 case "(($ac_try" in
4841   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4842   *) ac_try_echo=$ac_try;;
4843 esac
4844 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4845   (eval "$ac_link") 2>conftest.er1
4846   ac_status=$?
4847   grep -v '^ *+' conftest.er1 >conftest.err
4848   rm -f conftest.er1
4849   cat conftest.err >&5
4850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4851   (exit $ac_status); } && {
4852          test -z "$ac_c_werror_flag" ||
4853          test ! -s conftest.err
4854        } && test -s conftest$ac_exeext &&
4855        $as_test_x conftest$ac_exeext; then
4856   ac_cv_lib_socket_setsockopt=yes
4857 else
4858   echo "$as_me: failed program was:" >&5
4859 sed 's/^/| /' conftest.$ac_ext >&5
4860
4861         ac_cv_lib_socket_setsockopt=no
4862 fi
4863
4864 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4865       conftest$ac_exeext conftest.$ac_ext
4866 LIBS=$ac_check_lib_save_LIBS
4867 fi
4868 { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
4869 echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; }
4870 if test $ac_cv_lib_socket_setsockopt = yes; then
4871   LIBS="$LIBS -lsocket"
4872 else
4873   tcl_checkBoth=1
4874 fi
4875
4876 fi
4877
4878     fi
4879     if test "$tcl_checkBoth" = 1; then
4880         tk_oldLibs=$LIBS
4881         LIBS="$LIBS -lsocket -lnsl"
4882         { echo "$as_me:$LINENO: checking for accept" >&5
4883 echo $ECHO_N "checking for accept... $ECHO_C" >&6; }
4884 if test "${ac_cv_func_accept+set}" = set; then
4885   echo $ECHO_N "(cached) $ECHO_C" >&6
4886 else
4887   cat >conftest.$ac_ext <<_ACEOF
4888 /* confdefs.h.  */
4889 _ACEOF
4890 cat confdefs.h >>conftest.$ac_ext
4891 cat >>conftest.$ac_ext <<_ACEOF
4892 /* end confdefs.h.  */
4893 /* Define accept to an innocuous variant, in case <limits.h> declares accept.
4894    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4895 #define accept innocuous_accept
4896
4897 /* System header to define __stub macros and hopefully few prototypes,
4898     which can conflict with char accept (); below.
4899     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4900     <limits.h> exists even on freestanding compilers.  */
4901
4902 #ifdef __STDC__
4903 # include <limits.h>
4904 #else
4905 # include <assert.h>
4906 #endif
4907
4908 #undef accept
4909
4910 /* Override any GCC internal prototype to avoid an error.
4911    Use char because int might match the return type of a GCC
4912    builtin and then its argument prototype would still apply.  */
4913 #ifdef __cplusplus
4914 extern "C"
4915 #endif
4916 char accept ();
4917 /* The GNU C library defines this for functions which it implements
4918     to always fail with ENOSYS.  Some functions are actually named
4919     something starting with __ and the normal name is an alias.  */
4920 #if defined __stub_accept || defined __stub___accept
4921 choke me
4922 #endif
4923
4924 int
4925 main ()
4926 {
4927 return accept ();
4928   ;
4929   return 0;
4930 }
4931 _ACEOF
4932 rm -f conftest.$ac_objext conftest$ac_exeext
4933 if { (ac_try="$ac_link"
4934 case "(($ac_try" in
4935   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4936   *) ac_try_echo=$ac_try;;
4937 esac
4938 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4939   (eval "$ac_link") 2>conftest.er1
4940   ac_status=$?
4941   grep -v '^ *+' conftest.er1 >conftest.err
4942   rm -f conftest.er1
4943   cat conftest.err >&5
4944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4945   (exit $ac_status); } && {
4946          test -z "$ac_c_werror_flag" ||
4947          test ! -s conftest.err
4948        } && test -s conftest$ac_exeext &&
4949        $as_test_x conftest$ac_exeext; then
4950   ac_cv_func_accept=yes
4951 else
4952   echo "$as_me: failed program was:" >&5
4953 sed 's/^/| /' conftest.$ac_ext >&5
4954
4955         ac_cv_func_accept=no
4956 fi
4957
4958 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4959       conftest$ac_exeext conftest.$ac_ext
4960 fi
4961 { echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
4962 echo "${ECHO_T}$ac_cv_func_accept" >&6; }
4963 if test $ac_cv_func_accept = yes; then
4964   tcl_checkNsl=0
4965 else
4966   LIBS=$tk_oldLibs
4967 fi
4968
4969     fi
4970     { echo "$as_me:$LINENO: checking for gethostbyname" >&5
4971 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
4972 if test "${ac_cv_func_gethostbyname+set}" = set; then
4973   echo $ECHO_N "(cached) $ECHO_C" >&6
4974 else
4975   cat >conftest.$ac_ext <<_ACEOF
4976 /* confdefs.h.  */
4977 _ACEOF
4978 cat confdefs.h >>conftest.$ac_ext
4979 cat >>conftest.$ac_ext <<_ACEOF
4980 /* end confdefs.h.  */
4981 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
4982    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4983 #define gethostbyname innocuous_gethostbyname
4984
4985 /* System header to define __stub macros and hopefully few prototypes,
4986     which can conflict with char gethostbyname (); below.
4987     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4988     <limits.h> exists even on freestanding compilers.  */
4989
4990 #ifdef __STDC__
4991 # include <limits.h>
4992 #else
4993 # include <assert.h>
4994 #endif
4995
4996 #undef gethostbyname
4997
4998 /* Override any GCC internal prototype to avoid an error.
4999    Use char because int might match the return type of a GCC
5000    builtin and then its argument prototype would still apply.  */
5001 #ifdef __cplusplus
5002 extern "C"
5003 #endif
5004 char gethostbyname ();
5005 /* The GNU C library defines this for functions which it implements
5006     to always fail with ENOSYS.  Some functions are actually named
5007     something starting with __ and the normal name is an alias.  */
5008 #if defined __stub_gethostbyname || defined __stub___gethostbyname
5009 choke me
5010 #endif
5011
5012 int
5013 main ()
5014 {
5015 return gethostbyname ();
5016   ;
5017   return 0;
5018 }
5019 _ACEOF
5020 rm -f conftest.$ac_objext conftest$ac_exeext
5021 if { (ac_try="$ac_link"
5022 case "(($ac_try" in
5023   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5024   *) ac_try_echo=$ac_try;;
5025 esac
5026 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5027   (eval "$ac_link") 2>conftest.er1
5028   ac_status=$?
5029   grep -v '^ *+' conftest.er1 >conftest.err
5030   rm -f conftest.er1
5031   cat conftest.err >&5
5032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5033   (exit $ac_status); } && {
5034          test -z "$ac_c_werror_flag" ||
5035          test ! -s conftest.err
5036        } && test -s conftest$ac_exeext &&
5037        $as_test_x conftest$ac_exeext; then
5038   ac_cv_func_gethostbyname=yes
5039 else
5040   echo "$as_me: failed program was:" >&5
5041 sed 's/^/| /' conftest.$ac_ext >&5
5042
5043         ac_cv_func_gethostbyname=no
5044 fi
5045
5046 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5047       conftest$ac_exeext conftest.$ac_ext
5048 fi
5049 { echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5050 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
5051 if test $ac_cv_func_gethostbyname = yes; then
5052   :
5053 else
5054   { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5055 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
5056 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5057   echo $ECHO_N "(cached) $ECHO_C" >&6
5058 else
5059   ac_check_lib_save_LIBS=$LIBS
5060 LIBS="-lnsl  $LIBS"
5061 cat >conftest.$ac_ext <<_ACEOF
5062 /* confdefs.h.  */
5063 _ACEOF
5064 cat confdefs.h >>conftest.$ac_ext
5065 cat >>conftest.$ac_ext <<_ACEOF
5066 /* end confdefs.h.  */
5067
5068 /* Override any GCC internal prototype to avoid an error.
5069    Use char because int might match the return type of a GCC
5070    builtin and then its argument prototype would still apply.  */
5071 #ifdef __cplusplus
5072 extern "C"
5073 #endif
5074 char gethostbyname ();
5075 int
5076 main ()
5077 {
5078 return gethostbyname ();
5079   ;
5080   return 0;
5081 }
5082 _ACEOF
5083 rm -f conftest.$ac_objext conftest$ac_exeext
5084 if { (ac_try="$ac_link"
5085 case "(($ac_try" in
5086   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5087   *) ac_try_echo=$ac_try;;
5088 esac
5089 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5090   (eval "$ac_link") 2>conftest.er1
5091   ac_status=$?
5092   grep -v '^ *+' conftest.er1 >conftest.err
5093   rm -f conftest.er1
5094   cat conftest.err >&5
5095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5096   (exit $ac_status); } && {
5097          test -z "$ac_c_werror_flag" ||
5098          test ! -s conftest.err
5099        } && test -s conftest$ac_exeext &&
5100        $as_test_x conftest$ac_exeext; then
5101   ac_cv_lib_nsl_gethostbyname=yes
5102 else
5103   echo "$as_me: failed program was:" >&5
5104 sed 's/^/| /' conftest.$ac_ext >&5
5105
5106         ac_cv_lib_nsl_gethostbyname=no
5107 fi
5108
5109 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5110       conftest$ac_exeext conftest.$ac_ext
5111 LIBS=$ac_check_lib_save_LIBS
5112 fi
5113 { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5114 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
5115 if test $ac_cv_lib_nsl_gethostbyname = yes; then
5116   LIBS="$LIBS -lnsl"
5117 fi
5118
5119 fi
5120
5121
5122     # Don't perform the eval of the libraries here because DL_LIBS
5123     # won't be set until we call TEA_CONFIG_CFLAGS
5124
5125     TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
5126
5127
5128
5129
5130     { echo "$as_me:$LINENO: checking dirent.h" >&5
5131 echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; }
5132 if test "${tcl_cv_dirent_h+set}" = set; then
5133   echo $ECHO_N "(cached) $ECHO_C" >&6
5134 else
5135   cat >conftest.$ac_ext <<_ACEOF
5136 /* confdefs.h.  */
5137 _ACEOF
5138 cat confdefs.h >>conftest.$ac_ext
5139 cat >>conftest.$ac_ext <<_ACEOF
5140 /* end confdefs.h.  */
5141 #include <sys/types.h>
5142 #include <dirent.h>
5143 int
5144 main ()
5145 {
5146
5147 #ifndef _POSIX_SOURCE
5148 #   ifdef __Lynx__
5149         /*
5150          * Generate compilation error to make the test fail:  Lynx headers
5151          * are only valid if really in the POSIX environment.
5152          */
5153
5154         missing_procedure();
5155 #   endif
5156 #endif
5157 DIR *d;
5158 struct dirent *entryPtr;
5159 char *p;
5160 d = opendir("foobar");
5161 entryPtr = readdir(d);
5162 p = entryPtr->d_name;
5163 closedir(d);
5164
5165   ;
5166   return 0;
5167 }
5168 _ACEOF
5169 rm -f conftest.$ac_objext conftest$ac_exeext
5170 if { (ac_try="$ac_link"
5171 case "(($ac_try" in
5172   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5173   *) ac_try_echo=$ac_try;;
5174 esac
5175 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5176   (eval "$ac_link") 2>conftest.er1
5177   ac_status=$?
5178   grep -v '^ *+' conftest.er1 >conftest.err
5179   rm -f conftest.er1
5180   cat conftest.err >&5
5181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5182   (exit $ac_status); } && {
5183          test -z "$ac_c_werror_flag" ||
5184          test ! -s conftest.err
5185        } && test -s conftest$ac_exeext &&
5186        $as_test_x conftest$ac_exeext; then
5187   tcl_cv_dirent_h=yes
5188 else
5189   echo "$as_me: failed program was:" >&5
5190 sed 's/^/| /' conftest.$ac_ext >&5
5191
5192         tcl_cv_dirent_h=no
5193 fi
5194
5195 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5196       conftest$ac_exeext conftest.$ac_ext
5197 fi
5198 { echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
5199 echo "${ECHO_T}$tcl_cv_dirent_h" >&6; }
5200
5201     if test $tcl_cv_dirent_h = no; then
5202
5203 cat >>confdefs.h <<\_ACEOF
5204 #define NO_DIRENT_H 1
5205 _ACEOF
5206
5207     fi
5208
5209     if test "${ac_cv_header_errno_h+set}" = set; then
5210   { echo "$as_me:$LINENO: checking for errno.h" >&5
5211 echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5212 if test "${ac_cv_header_errno_h+set}" = set; then
5213   echo $ECHO_N "(cached) $ECHO_C" >&6
5214 fi
5215 { echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5216 echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5217 else
5218   # Is the header compilable?
5219 { echo "$as_me:$LINENO: checking errno.h usability" >&5
5220 echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6; }
5221 cat >conftest.$ac_ext <<_ACEOF
5222 /* confdefs.h.  */
5223 _ACEOF
5224 cat confdefs.h >>conftest.$ac_ext
5225 cat >>conftest.$ac_ext <<_ACEOF
5226 /* end confdefs.h.  */
5227 $ac_includes_default
5228 #include <errno.h>
5229 _ACEOF
5230 rm -f conftest.$ac_objext
5231 if { (ac_try="$ac_compile"
5232 case "(($ac_try" in
5233   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5234   *) ac_try_echo=$ac_try;;
5235 esac
5236 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5237   (eval "$ac_compile") 2>conftest.er1
5238   ac_status=$?
5239   grep -v '^ *+' conftest.er1 >conftest.err
5240   rm -f conftest.er1
5241   cat conftest.err >&5
5242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5243   (exit $ac_status); } && {
5244          test -z "$ac_c_werror_flag" ||
5245          test ! -s conftest.err
5246        } && test -s conftest.$ac_objext; then
5247   ac_header_compiler=yes
5248 else
5249   echo "$as_me: failed program was:" >&5
5250 sed 's/^/| /' conftest.$ac_ext >&5
5251
5252         ac_header_compiler=no
5253 fi
5254
5255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5256 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5257 echo "${ECHO_T}$ac_header_compiler" >&6; }
5258
5259 # Is the header present?
5260 { echo "$as_me:$LINENO: checking errno.h presence" >&5
5261 echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6; }
5262 cat >conftest.$ac_ext <<_ACEOF
5263 /* confdefs.h.  */
5264 _ACEOF
5265 cat confdefs.h >>conftest.$ac_ext
5266 cat >>conftest.$ac_ext <<_ACEOF
5267 /* end confdefs.h.  */
5268 #include <errno.h>
5269 _ACEOF
5270 if { (ac_try="$ac_cpp conftest.$ac_ext"
5271 case "(($ac_try" in
5272   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5273   *) ac_try_echo=$ac_try;;
5274 esac
5275 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5276   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5277   ac_status=$?
5278   grep -v '^ *+' conftest.er1 >conftest.err
5279   rm -f conftest.er1
5280   cat conftest.err >&5
5281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5282   (exit $ac_status); } >/dev/null && {
5283          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5284          test ! -s conftest.err
5285        }; then
5286   ac_header_preproc=yes
5287 else
5288   echo "$as_me: failed program was:" >&5
5289 sed 's/^/| /' conftest.$ac_ext >&5
5290
5291   ac_header_preproc=no
5292 fi
5293
5294 rm -f conftest.err conftest.$ac_ext
5295 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5296 echo "${ECHO_T}$ac_header_preproc" >&6; }
5297
5298 # So?  What about this header?
5299 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5300   yes:no: )
5301     { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5302 echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5303     { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
5304 echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
5305     ac_header_preproc=yes
5306     ;;
5307   no:yes:* )
5308     { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
5309 echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
5310     { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
5311 echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
5312     { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
5313 echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
5314     { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5315 echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5316     { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
5317 echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
5318     { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
5319 echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
5320
5321     ;;
5322 esac
5323 { echo "$as_me:$LINENO: checking for errno.h" >&5
5324 echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5325 if test "${ac_cv_header_errno_h+set}" = set; then
5326   echo $ECHO_N "(cached) $ECHO_C" >&6
5327 else
5328   ac_cv_header_errno_h=$ac_header_preproc
5329 fi
5330 { echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5331 echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5332
5333 fi
5334 if test $ac_cv_header_errno_h = yes; then
5335   :
5336 else
5337
5338 cat >>confdefs.h <<\_ACEOF
5339 #define NO_ERRNO_H 1
5340 _ACEOF
5341
5342 fi
5343
5344
5345     if test "${ac_cv_header_float_h+set}" = set; then
5346   { echo "$as_me:$LINENO: checking for float.h" >&5
5347 echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5348 if test "${ac_cv_header_float_h+set}" = set; then
5349   echo $ECHO_N "(cached) $ECHO_C" >&6
5350 fi
5351 { echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5352 echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5353 else
5354   # Is the header compilable?
5355 { echo "$as_me:$LINENO: checking float.h usability" >&5
5356 echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; }
5357 cat >conftest.$ac_ext <<_ACEOF
5358 /* confdefs.h.  */
5359 _ACEOF
5360 cat confdefs.h >>conftest.$ac_ext
5361 cat >>conftest.$ac_ext <<_ACEOF
5362 /* end confdefs.h.  */
5363 $ac_includes_default
5364 #include <float.h>
5365 _ACEOF
5366 rm -f conftest.$ac_objext
5367 if { (ac_try="$ac_compile"
5368 case "(($ac_try" in
5369   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5370   *) ac_try_echo=$ac_try;;
5371 esac
5372 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5373   (eval "$ac_compile") 2>conftest.er1
5374   ac_status=$?
5375   grep -v '^ *+' conftest.er1 >conftest.err
5376   rm -f conftest.er1
5377   cat conftest.err >&5
5378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5379   (exit $ac_status); } && {
5380          test -z "$ac_c_werror_flag" ||
5381          test ! -s conftest.err
5382        } && test -s conftest.$ac_objext; then
5383   ac_header_compiler=yes
5384 else
5385   echo "$as_me: failed program was:" >&5
5386 sed 's/^/| /' conftest.$ac_ext >&5
5387
5388         ac_header_compiler=no
5389 fi
5390
5391 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5392 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5393 echo "${ECHO_T}$ac_header_compiler" >&6; }
5394
5395 # Is the header present?
5396 { echo "$as_me:$LINENO: checking float.h presence" >&5
5397 echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; }
5398 cat >conftest.$ac_ext <<_ACEOF
5399 /* confdefs.h.  */
5400 _ACEOF
5401 cat confdefs.h >>conftest.$ac_ext
5402 cat >>conftest.$ac_ext <<_ACEOF
5403 /* end confdefs.h.  */
5404 #include <float.h>
5405 _ACEOF
5406 if { (ac_try="$ac_cpp conftest.$ac_ext"
5407 case "(($ac_try" in
5408   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5409   *) ac_try_echo=$ac_try;;
5410 esac
5411 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5412   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5413   ac_status=$?
5414   grep -v '^ *+' conftest.er1 >conftest.err
5415   rm -f conftest.er1
5416   cat conftest.err >&5
5417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5418   (exit $ac_status); } >/dev/null && {
5419          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5420          test ! -s conftest.err
5421        }; then
5422   ac_header_preproc=yes
5423 else
5424   echo "$as_me: failed program was:" >&5
5425 sed 's/^/| /' conftest.$ac_ext >&5
5426
5427   ac_header_preproc=no
5428 fi
5429
5430 rm -f conftest.err conftest.$ac_ext
5431 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5432 echo "${ECHO_T}$ac_header_preproc" >&6; }
5433
5434 # So?  What about this header?
5435 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5436   yes:no: )
5437     { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
5438 echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5439     { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
5440 echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
5441     ac_header_preproc=yes
5442     ;;
5443   no:yes:* )
5444     { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
5445 echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
5446     { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
5447 echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
5448     { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
5449 echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
5450     { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
5451 echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5452     { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
5453 echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
5454     { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
5455 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
5456
5457     ;;
5458 esac
5459 { echo "$as_me:$LINENO: checking for float.h" >&5
5460 echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5461 if test "${ac_cv_header_float_h+set}" = set; then
5462   echo $ECHO_N "(cached) $ECHO_C" >&6
5463 else
5464   ac_cv_header_float_h=$ac_header_preproc
5465 fi
5466 { echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5467 echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5468
5469 fi
5470 if test $ac_cv_header_float_h = yes; then
5471   :
5472 else
5473
5474 cat >>confdefs.h <<\_ACEOF
5475 #define NO_FLOAT_H 1
5476 _ACEOF
5477
5478 fi
5479
5480
5481     if test "${ac_cv_header_values_h+set}" = set; then
5482   { echo "$as_me:$LINENO: checking for values.h" >&5
5483 echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5484 if test "${ac_cv_header_values_h+set}" = set; then
5485   echo $ECHO_N "(cached) $ECHO_C" >&6
5486 fi
5487 { echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5488 echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5489 else
5490   # Is the header compilable?
5491 { echo "$as_me:$LINENO: checking values.h usability" >&5
5492 echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; }
5493 cat >conftest.$ac_ext <<_ACEOF
5494 /* confdefs.h.  */
5495 _ACEOF
5496 cat confdefs.h >>conftest.$ac_ext
5497 cat >>conftest.$ac_ext <<_ACEOF
5498 /* end confdefs.h.  */
5499 $ac_includes_default
5500 #include <values.h>
5501 _ACEOF
5502 rm -f conftest.$ac_objext
5503 if { (ac_try="$ac_compile"
5504 case "(($ac_try" in
5505   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5506   *) ac_try_echo=$ac_try;;
5507 esac
5508 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5509   (eval "$ac_compile") 2>conftest.er1
5510   ac_status=$?
5511   grep -v '^ *+' conftest.er1 >conftest.err
5512   rm -f conftest.er1
5513   cat conftest.err >&5
5514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5515   (exit $ac_status); } && {
5516          test -z "$ac_c_werror_flag" ||
5517          test ! -s conftest.err
5518        } && test -s conftest.$ac_objext; then
5519   ac_header_compiler=yes
5520 else
5521   echo "$as_me: failed program was:" >&5
5522 sed 's/^/| /' conftest.$ac_ext >&5
5523
5524         ac_header_compiler=no
5525 fi
5526
5527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5528 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5529 echo "${ECHO_T}$ac_header_compiler" >&6; }
5530
5531 # Is the header present?
5532 { echo "$as_me:$LINENO: checking values.h presence" >&5
5533 echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; }
5534 cat >conftest.$ac_ext <<_ACEOF
5535 /* confdefs.h.  */
5536 _ACEOF
5537 cat confdefs.h >>conftest.$ac_ext
5538 cat >>conftest.$ac_ext <<_ACEOF
5539 /* end confdefs.h.  */
5540 #include <values.h>
5541 _ACEOF
5542 if { (ac_try="$ac_cpp conftest.$ac_ext"
5543 case "(($ac_try" in
5544   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5545   *) ac_try_echo=$ac_try;;
5546 esac
5547 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5548   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5549   ac_status=$?
5550   grep -v '^ *+' conftest.er1 >conftest.err
5551   rm -f conftest.er1
5552   cat conftest.err >&5
5553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5554   (exit $ac_status); } >/dev/null && {
5555          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5556          test ! -s conftest.err
5557        }; then
5558   ac_header_preproc=yes
5559 else
5560   echo "$as_me: failed program was:" >&5
5561 sed 's/^/| /' conftest.$ac_ext >&5
5562
5563   ac_header_preproc=no
5564 fi
5565
5566 rm -f conftest.err conftest.$ac_ext
5567 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5568 echo "${ECHO_T}$ac_header_preproc" >&6; }
5569
5570 # So?  What about this header?
5571 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5572   yes:no: )
5573     { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
5574 echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5575     { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
5576 echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
5577     ac_header_preproc=yes
5578     ;;
5579   no:yes:* )
5580     { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
5581 echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
5582     { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
5583 echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
5584     { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
5585 echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
5586     { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
5587 echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5588     { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
5589 echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
5590     { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
5591 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
5592
5593     ;;
5594 esac
5595 { echo "$as_me:$LINENO: checking for values.h" >&5
5596 echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5597 if test "${ac_cv_header_values_h+set}" = set; then
5598   echo $ECHO_N "(cached) $ECHO_C" >&6
5599 else
5600   ac_cv_header_values_h=$ac_header_preproc
5601 fi
5602 { echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5603 echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5604
5605 fi
5606 if test $ac_cv_header_values_h = yes; then
5607   :
5608 else
5609
5610 cat >>confdefs.h <<\_ACEOF
5611 #define NO_VALUES_H 1
5612 _ACEOF
5613
5614 fi
5615
5616
5617     if test "${ac_cv_header_limits_h+set}" = set; then
5618   { echo "$as_me:$LINENO: checking for limits.h" >&5
5619 echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5620 if test "${ac_cv_header_limits_h+set}" = set; then
5621   echo $ECHO_N "(cached) $ECHO_C" >&6
5622 fi
5623 { echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5624 echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5625 else
5626   # Is the header compilable?
5627 { echo "$as_me:$LINENO: checking limits.h usability" >&5
5628 echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; }
5629 cat >conftest.$ac_ext <<_ACEOF
5630 /* confdefs.h.  */
5631 _ACEOF
5632 cat confdefs.h >>conftest.$ac_ext
5633 cat >>conftest.$ac_ext <<_ACEOF
5634 /* end confdefs.h.  */
5635 $ac_includes_default
5636 #include <limits.h>
5637 _ACEOF
5638 rm -f conftest.$ac_objext
5639 if { (ac_try="$ac_compile"
5640 case "(($ac_try" in
5641   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5642   *) ac_try_echo=$ac_try;;
5643 esac
5644 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5645   (eval "$ac_compile") 2>conftest.er1
5646   ac_status=$?
5647   grep -v '^ *+' conftest.er1 >conftest.err
5648   rm -f conftest.er1
5649   cat conftest.err >&5
5650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5651   (exit $ac_status); } && {
5652          test -z "$ac_c_werror_flag" ||
5653          test ! -s conftest.err
5654        } && test -s conftest.$ac_objext; then
5655   ac_header_compiler=yes
5656 else
5657   echo "$as_me: failed program was:" >&5
5658 sed 's/^/| /' conftest.$ac_ext >&5
5659
5660         ac_header_compiler=no
5661 fi
5662
5663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5664 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5665 echo "${ECHO_T}$ac_header_compiler" >&6; }
5666
5667 # Is the header present?
5668 { echo "$as_me:$LINENO: checking limits.h presence" >&5
5669 echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; }
5670 cat >conftest.$ac_ext <<_ACEOF
5671 /* confdefs.h.  */
5672 _ACEOF
5673 cat confdefs.h >>conftest.$ac_ext
5674 cat >>conftest.$ac_ext <<_ACEOF
5675 /* end confdefs.h.  */
5676 #include <limits.h>
5677 _ACEOF
5678 if { (ac_try="$ac_cpp conftest.$ac_ext"
5679 case "(($ac_try" in
5680   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5681   *) ac_try_echo=$ac_try;;
5682 esac
5683 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5684   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5685   ac_status=$?
5686   grep -v '^ *+' conftest.er1 >conftest.err
5687   rm -f conftest.er1
5688   cat conftest.err >&5
5689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5690   (exit $ac_status); } >/dev/null && {
5691          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5692          test ! -s conftest.err
5693        }; then
5694   ac_header_preproc=yes
5695 else
5696   echo "$as_me: failed program was:" >&5
5697 sed 's/^/| /' conftest.$ac_ext >&5
5698
5699   ac_header_preproc=no
5700 fi
5701
5702 rm -f conftest.err conftest.$ac_ext
5703 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5704 echo "${ECHO_T}$ac_header_preproc" >&6; }
5705
5706 # So?  What about this header?
5707 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5708   yes:no: )
5709     { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
5710 echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5711     { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
5712 echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
5713     ac_header_preproc=yes
5714     ;;
5715   no:yes:* )
5716     { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
5717 echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
5718     { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
5719 echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
5720     { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
5721 echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
5722     { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
5723 echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5724     { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
5725 echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
5726     { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
5727 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
5728
5729     ;;
5730 esac
5731 { echo "$as_me:$LINENO: checking for limits.h" >&5
5732 echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5733 if test "${ac_cv_header_limits_h+set}" = set; then
5734   echo $ECHO_N "(cached) $ECHO_C" >&6
5735 else
5736   ac_cv_header_limits_h=$ac_header_preproc
5737 fi
5738 { echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5739 echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5740
5741 fi
5742 if test $ac_cv_header_limits_h = yes; then
5743
5744 cat >>confdefs.h <<\_ACEOF
5745 #define HAVE_LIMITS_H 1
5746 _ACEOF
5747
5748 else
5749
5750 cat >>confdefs.h <<\_ACEOF
5751 #define NO_LIMITS_H 1
5752 _ACEOF
5753
5754 fi
5755
5756
5757     if test "${ac_cv_header_stdlib_h+set}" = set; then
5758   { echo "$as_me:$LINENO: checking for stdlib.h" >&5
5759 echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
5760 if test "${ac_cv_header_stdlib_h+set}" = set; then
5761   echo $ECHO_N "(cached) $ECHO_C" >&6
5762 fi
5763 { echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
5764 echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
5765 else
5766   # Is the header compilable?
5767 { echo "$as_me:$LINENO: checking stdlib.h usability" >&5
5768 echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; }
5769 cat >conftest.$ac_ext <<_ACEOF
5770 /* confdefs.h.  */
5771 _ACEOF
5772 cat confdefs.h >>conftest.$ac_ext
5773 cat >>conftest.$ac_ext <<_ACEOF
5774 /* end confdefs.h.  */
5775 $ac_includes_default
5776 #include <stdlib.h>
5777 _ACEOF
5778 rm -f conftest.$ac_objext
5779 if { (ac_try="$ac_compile"
5780 case "(($ac_try" in
5781   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5782   *) ac_try_echo=$ac_try;;
5783 esac
5784 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5785   (eval "$ac_compile") 2>conftest.er1
5786   ac_status=$?
5787   grep -v '^ *+' conftest.er1 >conftest.err
5788   rm -f conftest.er1
5789   cat conftest.err >&5
5790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5791   (exit $ac_status); } && {
5792          test -z "$ac_c_werror_flag" ||
5793          test ! -s conftest.err
5794        } && test -s conftest.$ac_objext; then
5795   ac_header_compiler=yes
5796 else
5797   echo "$as_me: failed program was:" >&5
5798 sed 's/^/| /' conftest.$ac_ext >&5
5799
5800         ac_header_compiler=no
5801 fi
5802
5803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5804 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5805 echo "${ECHO_T}$ac_header_compiler" >&6; }
5806
5807 # Is the header present?
5808 { echo "$as_me:$LINENO: checking stdlib.h presence" >&5
5809 echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; }
5810 cat >conftest.$ac_ext <<_ACEOF
5811 /* confdefs.h.  */
5812 _ACEOF
5813 cat confdefs.h >>conftest.$ac_ext
5814 cat >>conftest.$ac_ext <<_ACEOF
5815 /* end confdefs.h.  */
5816 #include <stdlib.h>
5817 _ACEOF
5818 if { (ac_try="$ac_cpp conftest.$ac_ext"
5819 case "(($ac_try" in
5820   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5821   *) ac_try_echo=$ac_try;;
5822 esac
5823 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5824   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5825   ac_status=$?
5826   grep -v '^ *+' conftest.er1 >conftest.err
5827   rm -f conftest.er1
5828   cat conftest.err >&5
5829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5830   (exit $ac_status); } >/dev/null && {
5831          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5832          test ! -s conftest.err
5833        }; then
5834   ac_header_preproc=yes
5835 else
5836   echo "$as_me: failed program was:" >&5
5837 sed 's/^/| /' conftest.$ac_ext >&5
5838
5839   ac_header_preproc=no
5840 fi
5841
5842 rm -f conftest.err conftest.$ac_ext
5843 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5844 echo "${ECHO_T}$ac_header_preproc" >&6; }
5845
5846 # So?  What about this header?
5847 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5848   yes:no: )
5849     { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
5850 echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5851     { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
5852 echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
5853     ac_header_preproc=yes
5854     ;;
5855   no:yes:* )
5856     { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
5857 echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
5858     { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
5859 echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
5860     { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
5861 echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
5862     { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
5863 echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5864     { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
5865 echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
5866     { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
5867 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
5868
5869     ;;
5870 esac
5871 { echo "$as_me:$LINENO: checking for stdlib.h" >&5
5872 echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
5873 if test "${ac_cv_header_stdlib_h+set}" = set; then
5874   echo $ECHO_N "(cached) $ECHO_C" >&6
5875 else
5876   ac_cv_header_stdlib_h=$ac_header_preproc
5877 fi
5878 { echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
5879 echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
5880
5881 fi
5882 if test $ac_cv_header_stdlib_h = yes; then
5883   tcl_ok=1
5884 else
5885   tcl_ok=0
5886 fi
5887
5888
5889     cat >conftest.$ac_ext <<_ACEOF
5890 /* confdefs.h.  */
5891 _ACEOF
5892 cat confdefs.h >>conftest.$ac_ext
5893 cat >>conftest.$ac_ext <<_ACEOF
5894 /* end confdefs.h.  */
5895 #include <stdlib.h>
5896
5897 _ACEOF
5898 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5899   $EGREP "strtol" >/dev/null 2>&1; then
5900   :
5901 else
5902   tcl_ok=0
5903 fi
5904 rm -f conftest*
5905
5906     cat >conftest.$ac_ext <<_ACEOF
5907 /* confdefs.h.  */
5908 _ACEOF
5909 cat confdefs.h >>conftest.$ac_ext
5910 cat >>conftest.$ac_ext <<_ACEOF
5911 /* end confdefs.h.  */
5912 #include <stdlib.h>
5913
5914 _ACEOF
5915 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5916   $EGREP "strtoul" >/dev/null 2>&1; then
5917   :
5918 else
5919   tcl_ok=0
5920 fi
5921 rm -f conftest*
5922
5923     cat >conftest.$ac_ext <<_ACEOF
5924 /* confdefs.h.  */
5925 _ACEOF
5926 cat confdefs.h >>conftest.$ac_ext
5927 cat >>conftest.$ac_ext <<_ACEOF
5928 /* end confdefs.h.  */
5929 #include <stdlib.h>
5930
5931 _ACEOF
5932 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5933   $EGREP "strtod" >/dev/null 2>&1; then
5934   :
5935 else
5936   tcl_ok=0
5937 fi
5938 rm -f conftest*
5939
5940     if test $tcl_ok = 0; then
5941
5942 cat >>confdefs.h <<\_ACEOF
5943 #define NO_STDLIB_H 1
5944 _ACEOF
5945
5946     fi
5947     if test "${ac_cv_header_string_h+set}" = set; then
5948   { echo "$as_me:$LINENO: checking for string.h" >&5
5949 echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
5950 if test "${ac_cv_header_string_h+set}" = set; then
5951   echo $ECHO_N "(cached) $ECHO_C" >&6
5952 fi
5953 { echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
5954 echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
5955 else
5956   # Is the header compilable?
5957 { echo "$as_me:$LINENO: checking string.h usability" >&5
5958 echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; }
5959 cat >conftest.$ac_ext <<_ACEOF
5960 /* confdefs.h.  */
5961 _ACEOF
5962 cat confdefs.h >>conftest.$ac_ext
5963 cat >>conftest.$ac_ext <<_ACEOF
5964 /* end confdefs.h.  */
5965 $ac_includes_default
5966 #include <string.h>
5967 _ACEOF
5968 rm -f conftest.$ac_objext
5969 if { (ac_try="$ac_compile"
5970 case "(($ac_try" in
5971   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5972   *) ac_try_echo=$ac_try;;
5973 esac
5974 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5975   (eval "$ac_compile") 2>conftest.er1
5976   ac_status=$?
5977   grep -v '^ *+' conftest.er1 >conftest.err
5978   rm -f conftest.er1
5979   cat conftest.err >&5
5980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5981   (exit $ac_status); } && {
5982          test -z "$ac_c_werror_flag" ||
5983          test ! -s conftest.err
5984        } && test -s conftest.$ac_objext; then
5985   ac_header_compiler=yes
5986 else
5987   echo "$as_me: failed program was:" >&5
5988 sed 's/^/| /' conftest.$ac_ext >&5
5989
5990         ac_header_compiler=no
5991 fi
5992
5993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5994 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5995 echo "${ECHO_T}$ac_header_compiler" >&6; }
5996
5997 # Is the header present?
5998 { echo "$as_me:$LINENO: checking string.h presence" >&5
5999 echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; }
6000 cat >conftest.$ac_ext <<_ACEOF
6001 /* confdefs.h.  */
6002 _ACEOF
6003 cat confdefs.h >>conftest.$ac_ext
6004 cat >>conftest.$ac_ext <<_ACEOF
6005 /* end confdefs.h.  */
6006 #include <string.h>
6007 _ACEOF
6008 if { (ac_try="$ac_cpp conftest.$ac_ext"
6009 case "(($ac_try" in
6010   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6011   *) ac_try_echo=$ac_try;;
6012 esac
6013 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6014   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6015   ac_status=$?
6016   grep -v '^ *+' conftest.er1 >conftest.err
6017   rm -f conftest.er1
6018   cat conftest.err >&5
6019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6020   (exit $ac_status); } >/dev/null && {
6021          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6022          test ! -s conftest.err
6023        }; then
6024   ac_header_preproc=yes
6025 else
6026   echo "$as_me: failed program was:" >&5
6027 sed 's/^/| /' conftest.$ac_ext >&5
6028
6029   ac_header_preproc=no
6030 fi
6031
6032 rm -f conftest.err conftest.$ac_ext
6033 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6034 echo "${ECHO_T}$ac_header_preproc" >&6; }
6035
6036 # So?  What about this header?
6037 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6038   yes:no: )
6039     { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
6040 echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6041     { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
6042 echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
6043     ac_header_preproc=yes
6044     ;;
6045   no:yes:* )
6046     { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
6047 echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
6048     { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
6049 echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
6050     { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
6051 echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
6052     { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
6053 echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6054     { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
6055 echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
6056     { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
6057 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
6058
6059     ;;
6060 esac
6061 { echo "$as_me:$LINENO: checking for string.h" >&5
6062 echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6063 if test "${ac_cv_header_string_h+set}" = set; then
6064   echo $ECHO_N "(cached) $ECHO_C" >&6
6065 else
6066   ac_cv_header_string_h=$ac_header_preproc
6067 fi
6068 { echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6069 echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6070
6071 fi
6072 if test $ac_cv_header_string_h = yes; then
6073   tcl_ok=1
6074 else
6075   tcl_ok=0
6076 fi
6077
6078
6079     cat >conftest.$ac_ext <<_ACEOF
6080 /* confdefs.h.  */
6081 _ACEOF
6082 cat confdefs.h >>conftest.$ac_ext
6083 cat >>conftest.$ac_ext <<_ACEOF
6084 /* end confdefs.h.  */
6085 #include <string.h>
6086
6087 _ACEOF
6088 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6089   $EGREP "strstr" >/dev/null 2>&1; then
6090   :
6091 else
6092   tcl_ok=0
6093 fi
6094 rm -f conftest*
6095
6096     cat >conftest.$ac_ext <<_ACEOF
6097 /* confdefs.h.  */
6098 _ACEOF
6099 cat confdefs.h >>conftest.$ac_ext
6100 cat >>conftest.$ac_ext <<_ACEOF
6101 /* end confdefs.h.  */
6102 #include <string.h>
6103
6104 _ACEOF
6105 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6106   $EGREP "strerror" >/dev/null 2>&1; then
6107   :
6108 else
6109   tcl_ok=0
6110 fi
6111 rm -f conftest*
6112
6113
6114     # See also memmove check below for a place where NO_STRING_H can be
6115     # set and why.
6116
6117     if test $tcl_ok = 0; then
6118
6119 cat >>confdefs.h <<\_ACEOF
6120 #define NO_STRING_H 1
6121 _ACEOF
6122
6123     fi
6124
6125     if test "${ac_cv_header_sys_wait_h+set}" = set; then
6126   { echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6127 echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6128 if test "${ac_cv_header_sys_wait_h+set}" = set; then
6129   echo $ECHO_N "(cached) $ECHO_C" >&6
6130 fi
6131 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6132 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6133 else
6134   # Is the header compilable?
6135 { echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
6136 echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; }
6137 cat >conftest.$ac_ext <<_ACEOF
6138 /* confdefs.h.  */
6139 _ACEOF
6140 cat confdefs.h >>conftest.$ac_ext
6141 cat >>conftest.$ac_ext <<_ACEOF
6142 /* end confdefs.h.  */
6143 $ac_includes_default
6144 #include <sys/wait.h>
6145 _ACEOF
6146 rm -f conftest.$ac_objext
6147 if { (ac_try="$ac_compile"
6148 case "(($ac_try" in
6149   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6150   *) ac_try_echo=$ac_try;;
6151 esac
6152 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6153   (eval "$ac_compile") 2>conftest.er1
6154   ac_status=$?
6155   grep -v '^ *+' conftest.er1 >conftest.err
6156   rm -f conftest.er1
6157   cat conftest.err >&5
6158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6159   (exit $ac_status); } && {
6160          test -z "$ac_c_werror_flag" ||
6161          test ! -s conftest.err
6162        } && test -s conftest.$ac_objext; then
6163   ac_header_compiler=yes
6164 else
6165   echo "$as_me: failed program was:" >&5
6166 sed 's/^/| /' conftest.$ac_ext >&5
6167
6168         ac_header_compiler=no
6169 fi
6170
6171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6172 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6173 echo "${ECHO_T}$ac_header_compiler" >&6; }
6174
6175 # Is the header present?
6176 { echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
6177 echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; }
6178 cat >conftest.$ac_ext <<_ACEOF
6179 /* confdefs.h.  */
6180 _ACEOF
6181 cat confdefs.h >>conftest.$ac_ext
6182 cat >>conftest.$ac_ext <<_ACEOF
6183 /* end confdefs.h.  */
6184 #include <sys/wait.h>
6185 _ACEOF
6186 if { (ac_try="$ac_cpp conftest.$ac_ext"
6187 case "(($ac_try" in
6188   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6189   *) ac_try_echo=$ac_try;;
6190 esac
6191 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6192   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6193   ac_status=$?
6194   grep -v '^ *+' conftest.er1 >conftest.err
6195   rm -f conftest.er1
6196   cat conftest.err >&5
6197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6198   (exit $ac_status); } >/dev/null && {
6199          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6200          test ! -s conftest.err
6201        }; then
6202   ac_header_preproc=yes
6203 else
6204   echo "$as_me: failed program was:" >&5
6205 sed 's/^/| /' conftest.$ac_ext >&5
6206
6207   ac_header_preproc=no
6208 fi
6209
6210 rm -f conftest.err conftest.$ac_ext
6211 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6212 echo "${ECHO_T}$ac_header_preproc" >&6; }
6213
6214 # So?  What about this header?
6215 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6216   yes:no: )
6217     { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
6218 echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6219     { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
6220 echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
6221     ac_header_preproc=yes
6222     ;;
6223   no:yes:* )
6224     { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
6225 echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
6226     { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
6227 echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
6228     { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
6229 echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
6230     { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
6231 echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6232     { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
6233 echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
6234     { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
6235 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
6236
6237     ;;
6238 esac
6239 { echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6240 echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6241 if test "${ac_cv_header_sys_wait_h+set}" = set; then
6242   echo $ECHO_N "(cached) $ECHO_C" >&6
6243 else
6244   ac_cv_header_sys_wait_h=$ac_header_preproc
6245 fi
6246 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6247 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6248
6249 fi
6250 if test $ac_cv_header_sys_wait_h = yes; then
6251   :
6252 else
6253
6254 cat >>confdefs.h <<\_ACEOF
6255 #define NO_SYS_WAIT_H 1
6256 _ACEOF
6257
6258 fi
6259
6260
6261     if test "${ac_cv_header_dlfcn_h+set}" = set; then
6262   { echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6263 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6264 if test "${ac_cv_header_dlfcn_h+set}" = set; then
6265   echo $ECHO_N "(cached) $ECHO_C" >&6
6266 fi
6267 { echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6268 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6269 else
6270   # Is the header compilable?
6271 { echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
6272 echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; }
6273 cat >conftest.$ac_ext <<_ACEOF
6274 /* confdefs.h.  */
6275 _ACEOF
6276 cat confdefs.h >>conftest.$ac_ext
6277 cat >>conftest.$ac_ext <<_ACEOF
6278 /* end confdefs.h.  */
6279 $ac_includes_default
6280 #include <dlfcn.h>
6281 _ACEOF
6282 rm -f conftest.$ac_objext
6283 if { (ac_try="$ac_compile"
6284 case "(($ac_try" in
6285   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6286   *) ac_try_echo=$ac_try;;
6287 esac
6288 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6289   (eval "$ac_compile") 2>conftest.er1
6290   ac_status=$?
6291   grep -v '^ *+' conftest.er1 >conftest.err
6292   rm -f conftest.er1
6293   cat conftest.err >&5
6294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6295   (exit $ac_status); } && {
6296          test -z "$ac_c_werror_flag" ||
6297          test ! -s conftest.err
6298        } && test -s conftest.$ac_objext; then
6299   ac_header_compiler=yes
6300 else
6301   echo "$as_me: failed program was:" >&5
6302 sed 's/^/| /' conftest.$ac_ext >&5
6303
6304         ac_header_compiler=no
6305 fi
6306
6307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6308 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6309 echo "${ECHO_T}$ac_header_compiler" >&6; }
6310
6311 # Is the header present?
6312 { echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
6313 echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; }
6314 cat >conftest.$ac_ext <<_ACEOF
6315 /* confdefs.h.  */
6316 _ACEOF
6317 cat confdefs.h >>conftest.$ac_ext
6318 cat >>conftest.$ac_ext <<_ACEOF
6319 /* end confdefs.h.  */
6320 #include <dlfcn.h>
6321 _ACEOF
6322 if { (ac_try="$ac_cpp conftest.$ac_ext"
6323 case "(($ac_try" in
6324   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6325   *) ac_try_echo=$ac_try;;
6326 esac
6327 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6328   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6329   ac_status=$?
6330   grep -v '^ *+' conftest.er1 >conftest.err
6331   rm -f conftest.er1
6332   cat conftest.err >&5
6333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6334   (exit $ac_status); } >/dev/null && {
6335          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6336          test ! -s conftest.err
6337        }; then
6338   ac_header_preproc=yes
6339 else
6340   echo "$as_me: failed program was:" >&5
6341 sed 's/^/| /' conftest.$ac_ext >&5
6342
6343   ac_header_preproc=no
6344 fi
6345
6346 rm -f conftest.err conftest.$ac_ext
6347 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6348 echo "${ECHO_T}$ac_header_preproc" >&6; }
6349
6350 # So?  What about this header?
6351 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6352   yes:no: )
6353     { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
6354 echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6355     { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
6356 echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
6357     ac_header_preproc=yes
6358     ;;
6359   no:yes:* )
6360     { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
6361 echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
6362     { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
6363 echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
6364     { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
6365 echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
6366     { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
6367 echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6368     { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
6369 echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
6370     { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
6371 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
6372
6373     ;;
6374 esac
6375 { echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6376 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6377 if test "${ac_cv_header_dlfcn_h+set}" = set; then
6378   echo $ECHO_N "(cached) $ECHO_C" >&6
6379 else
6380   ac_cv_header_dlfcn_h=$ac_header_preproc
6381 fi
6382 { echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6383 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6384
6385 fi
6386 if test $ac_cv_header_dlfcn_h = yes; then
6387   :
6388 else
6389
6390 cat >>confdefs.h <<\_ACEOF
6391 #define NO_DLFCN_H 1
6392 _ACEOF
6393
6394 fi
6395
6396
6397
6398     # OS/390 lacks sys/param.h (and doesn't need it, by chance).
6399
6400 for ac_header in sys/param.h
6401 do
6402 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6403 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6404   { echo "$as_me:$LINENO: checking for $ac_header" >&5
6405 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6406 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6407   echo $ECHO_N "(cached) $ECHO_C" >&6
6408 fi
6409 ac_res=`eval echo '${'$as_ac_Header'}'`
6410                { echo "$as_me:$LINENO: result: $ac_res" >&5
6411 echo "${ECHO_T}$ac_res" >&6; }
6412 else
6413   # Is the header compilable?
6414 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
6415 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6416 cat >conftest.$ac_ext <<_ACEOF
6417 /* confdefs.h.  */
6418 _ACEOF
6419 cat confdefs.h >>conftest.$ac_ext
6420 cat >>conftest.$ac_ext <<_ACEOF
6421 /* end confdefs.h.  */
6422 $ac_includes_default
6423 #include <$ac_header>
6424 _ACEOF
6425 rm -f conftest.$ac_objext
6426 if { (ac_try="$ac_compile"
6427 case "(($ac_try" in
6428   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6429   *) ac_try_echo=$ac_try;;
6430 esac
6431 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6432   (eval "$ac_compile") 2>conftest.er1
6433   ac_status=$?
6434   grep -v '^ *+' conftest.er1 >conftest.err
6435   rm -f conftest.er1
6436   cat conftest.err >&5
6437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6438   (exit $ac_status); } && {
6439          test -z "$ac_c_werror_flag" ||
6440          test ! -s conftest.err
6441        } && test -s conftest.$ac_objext; then
6442   ac_header_compiler=yes
6443 else
6444   echo "$as_me: failed program was:" >&5
6445 sed 's/^/| /' conftest.$ac_ext >&5
6446
6447         ac_header_compiler=no
6448 fi
6449
6450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6451 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6452 echo "${ECHO_T}$ac_header_compiler" >&6; }
6453
6454 # Is the header present?
6455 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
6456 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
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 <$ac_header>
6464 _ACEOF
6465 if { (ac_try="$ac_cpp conftest.$ac_ext"
6466 case "(($ac_try" in
6467   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6468   *) ac_try_echo=$ac_try;;
6469 esac
6470 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6471   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6472   ac_status=$?
6473   grep -v '^ *+' conftest.er1 >conftest.err
6474   rm -f conftest.er1
6475   cat conftest.err >&5
6476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6477   (exit $ac_status); } >/dev/null && {
6478          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6479          test ! -s conftest.err
6480        }; then
6481   ac_header_preproc=yes
6482 else
6483   echo "$as_me: failed program was:" >&5
6484 sed 's/^/| /' conftest.$ac_ext >&5
6485
6486   ac_header_preproc=no
6487 fi
6488
6489 rm -f conftest.err conftest.$ac_ext
6490 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6491 echo "${ECHO_T}$ac_header_preproc" >&6; }
6492
6493 # So?  What about this header?
6494 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6495   yes:no: )
6496     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6497 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6498     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6499 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6500     ac_header_preproc=yes
6501     ;;
6502   no:yes:* )
6503     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6504 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6505     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6506 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6507     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6508 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6509     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6510 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6511     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6512 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6513     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6514 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6515
6516     ;;
6517 esac
6518 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6519 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6520 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6521   echo $ECHO_N "(cached) $ECHO_C" >&6
6522 else
6523   eval "$as_ac_Header=\$ac_header_preproc"
6524 fi
6525 ac_res=`eval echo '${'$as_ac_Header'}'`
6526                { echo "$as_me:$LINENO: result: $ac_res" >&5
6527 echo "${ECHO_T}$ac_res" >&6; }
6528
6529 fi
6530 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6531   cat >>confdefs.h <<_ACEOF
6532 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6533 _ACEOF
6534
6535 fi
6536
6537 done
6538
6539
6540         # Let the user call this, because if it triggers, they will
6541         # need a compat/strtod.c that is correct.  Users can also
6542         # use Tcl_GetDouble(FromObj) instead.
6543         #TEA_BUGGY_STRTOD
6544     fi
6545
6546
6547 #-----------------------------------------------------------------------
6548 # __CHANGE__
6549 # Specify the C source files to compile in TEA_ADD_SOURCES,
6550 # public headers that need to be installed in TEA_ADD_HEADERS,
6551 # stub library C source files to compile in TEA_ADD_STUB_SOURCES,
6552 # and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
6553 # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
6554 # and PKG_TCL_SOURCES.
6555 #-----------------------------------------------------------------------
6556
6557
6558     vars="mysqltcl.c"
6559     for i in $vars; do
6560         case $i in
6561             \$*)
6562                 # allow $-var names
6563                 PKG_SOURCES="$PKG_SOURCES $i"
6564                 PKG_OBJECTS="$PKG_OBJECTS $i"
6565                 ;;
6566             *)
6567                 # check for existence - allows for generic/win/unix VPATH
6568                 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6569                     -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6570                     ; then
6571                     { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
6572 echo "$as_me: error: could not find source file '$i'" >&2;}
6573    { (exit 1); exit 1; }; }
6574                 fi
6575                 PKG_SOURCES="$PKG_SOURCES $i"
6576                 # this assumes it is in a VPATH dir
6577                 i=`basename $i`
6578                 # handle user calling this before or after TEA_SETUP_COMPILER
6579                 if test x"${OBJEXT}" != x ; then
6580                     j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6581                 else
6582                     j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6583                 fi
6584                 PKG_OBJECTS="$PKG_OBJECTS $j"
6585                 ;;
6586         esac
6587     done
6588
6589
6590
6591
6592     vars=""
6593     for i in $vars; do
6594         # check for existence, be strict because it is installed
6595         if test ! -f "${srcdir}/$i" ; then
6596             { { echo "$as_me:$LINENO: error: could not find header file '${srcdir}/$i'" >&5
6597 echo "$as_me: error: could not find header file '${srcdir}/$i'" >&2;}
6598    { (exit 1); exit 1; }; }
6599         fi
6600         PKG_HEADERS="$PKG_HEADERS $i"
6601     done
6602
6603
6604
6605     vars=""
6606     for i in $vars; do
6607         PKG_INCLUDES="$PKG_INCLUDES $i"
6608     done
6609
6610
6611
6612     vars=""
6613     for i in $vars; do
6614         if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6615             # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
6616             i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
6617         fi
6618         PKG_LIBS="$PKG_LIBS $i"
6619     done
6620
6621
6622
6623     PKG_CFLAGS="$PKG_CFLAGS "
6624
6625
6626
6627     vars=""
6628     for i in $vars; do
6629         # check for existence - allows for generic/win/unix VPATH
6630         if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6631             -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6632             ; then
6633             { { echo "$as_me:$LINENO: error: could not find stub source file '$i'" >&5
6634 echo "$as_me: error: could not find stub source file '$i'" >&2;}
6635    { (exit 1); exit 1; }; }
6636         fi
6637         PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
6638         # this assumes it is in a VPATH dir
6639         i=`basename $i`
6640         # handle user calling this before or after TEA_SETUP_COMPILER
6641         if test x"${OBJEXT}" != x ; then
6642             j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6643         else
6644             j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6645         fi
6646         PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
6647     done
6648
6649
6650
6651
6652     vars=""
6653     for i in $vars; do
6654         # check for existence, be strict because it is installed
6655         if test ! -f "${srcdir}/$i" ; then
6656             { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
6657 echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
6658    { (exit 1); exit 1; }; }
6659         fi
6660         PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
6661     done
6662
6663
6664
6665 #--------------------------------------------------------------------
6666 # __CHANGE__
6667 # A few miscellaneous platform-specific items:
6668 #
6669 # Define a special symbol for Windows (BUILD_sample in this case) so
6670 # that we create the export library with the dll.
6671 #
6672 # Windows creates a few extra files that need to be cleaned up.
6673 # You can add more files to clean if your extension creates any extra
6674 # files.
6675 #
6676 # TEA_ADD_* any platform specific compiler/build info here.
6677 #--------------------------------------------------------------------
6678
6679 if test "${TEA_PLATFORM}" = "windows" ; then
6680
6681 cat >>confdefs.h <<\_ACEOF
6682 #define BUILD_sample 1
6683 _ACEOF
6684
6685     CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
6686     #TEA_ADD_SOURCES([win/winFile.c])
6687     #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
6688 else
6689     CLEANFILES="pkgIndex.tcl"
6690     #TEA_ADD_SOURCES([unix/unixFile.c])
6691     #TEA_ADD_LIBS([-lsuperfly])
6692 fi
6693
6694
6695 #--------------------------------------------------------------------
6696 # __CHANGE__
6697 # Choose which headers you need.  Extension authors should try very
6698 # hard to only rely on the Tcl public header files.  Internal headers
6699 # contain private data structures and are subject to change without
6700 # notice.
6701 # This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
6702 #--------------------------------------------------------------------
6703
6704
6705     { echo "$as_me:$LINENO: checking for Tcl public headers" >&5
6706 echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6; }
6707
6708
6709 # Check whether --with-tclinclude was given.
6710 if test "${with_tclinclude+set}" = set; then
6711   withval=$with_tclinclude; with_tclinclude=${withval}
6712 fi
6713
6714
6715     if test "${ac_cv_c_tclh+set}" = set; then
6716   echo $ECHO_N "(cached) $ECHO_C" >&6
6717 else
6718
6719         # Use the value from --with-tclinclude, if it was given
6720
6721         if test x"${with_tclinclude}" != x ; then
6722             if test -f "${with_tclinclude}/tcl.h" ; then
6723                 ac_cv_c_tclh=${with_tclinclude}
6724             else
6725                 { { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
6726 echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
6727    { (exit 1); exit 1; }; }
6728             fi
6729         else
6730             if test "`uname -s`" = "Darwin"; then
6731                 # If Tcl was built as a framework, attempt to use
6732                 # the framework's Headers directory
6733                 case ${TCL_DEFS} in
6734                     *TCL_FRAMEWORK*)
6735                         list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
6736                         ;;
6737                 esac
6738             fi
6739
6740             # Look in the source dir only if Tcl is not installed,
6741             # and in that situation, look there before installed locations.
6742             if test -f "${TCL_BIN_DIR}/Makefile" ; then
6743                 list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
6744             fi
6745
6746             # Check order: pkg --prefix location, Tcl's --prefix location,
6747             # relative to directory of tclConfig.sh.
6748
6749             eval "temp_includedir=${includedir}"
6750             list="$list \
6751                 `ls -d ${temp_includedir}        2>/dev/null` \
6752                 `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
6753                 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
6754             if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
6755                 list="$list /usr/local/include /usr/include"
6756                 if test x"${TCL_INCLUDE_SPEC}" != x ; then
6757                     d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
6758                     list="$list `ls -d ${d} 2>/dev/null`"
6759                 fi
6760             fi
6761             for i in $list ; do
6762                 if test -f "$i/tcl.h" ; then
6763                     ac_cv_c_tclh=$i
6764                     break
6765                 fi
6766             done
6767         fi
6768
6769 fi
6770
6771
6772     # Print a message based on how we determined the include path
6773
6774     if test x"${ac_cv_c_tclh}" = x ; then
6775         { { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
6776 echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
6777    { (exit 1); exit 1; }; }
6778     else
6779         { echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
6780 echo "${ECHO_T}${ac_cv_c_tclh}" >&6; }
6781     fi
6782
6783     # Convert to a native path and substitute into the output files.
6784
6785     INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
6786
6787     TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
6788
6789
6790
6791 #TEA_PRIVATE_TCL_HEADERS
6792
6793 #TEA_PUBLIC_TK_HEADERS
6794 #TEA_PRIVATE_TK_HEADERS
6795 #TEA_PATH_X
6796
6797 #--------------------------------------------------------------------
6798 # Check whether --enable-threads or --disable-threads was given.
6799 # This auto-enables if Tcl was compiled threaded.
6800 #--------------------------------------------------------------------
6801
6802
6803     # Check whether --enable-threads was given.
6804 if test "${enable_threads+set}" = set; then
6805   enableval=$enable_threads; tcl_ok=$enableval
6806 else
6807   tcl_ok=yes
6808 fi
6809
6810
6811     if test "${enable_threads+set}" = set; then
6812         enableval="$enable_threads"
6813         tcl_ok=$enableval
6814     else
6815         tcl_ok=yes
6816     fi
6817
6818     if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
6819         TCL_THREADS=1
6820
6821         if test "${TEA_PLATFORM}" != "windows" ; then
6822             # We are always OK on Windows, so check what this platform wants:
6823
6824             # USE_THREAD_ALLOC tells us to try the special thread-based
6825             # allocator that significantly reduces lock contention
6826
6827 cat >>confdefs.h <<\_ACEOF
6828 #define USE_THREAD_ALLOC 1
6829 _ACEOF
6830
6831
6832 cat >>confdefs.h <<\_ACEOF
6833 #define _REENTRANT 1
6834 _ACEOF
6835
6836             if test "`uname -s`" = "SunOS" ; then
6837
6838 cat >>confdefs.h <<\_ACEOF
6839 #define _POSIX_PTHREAD_SEMANTICS 1
6840 _ACEOF
6841
6842             fi
6843
6844 cat >>confdefs.h <<\_ACEOF
6845 #define _THREAD_SAFE 1
6846 _ACEOF
6847
6848             { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
6849 echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
6850 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
6851   echo $ECHO_N "(cached) $ECHO_C" >&6
6852 else
6853   ac_check_lib_save_LIBS=$LIBS
6854 LIBS="-lpthread  $LIBS"
6855 cat >conftest.$ac_ext <<_ACEOF
6856 /* confdefs.h.  */
6857 _ACEOF
6858 cat confdefs.h >>conftest.$ac_ext
6859 cat >>conftest.$ac_ext <<_ACEOF
6860 /* end confdefs.h.  */
6861
6862 /* Override any GCC internal prototype to avoid an error.
6863    Use char because int might match the return type of a GCC
6864    builtin and then its argument prototype would still apply.  */
6865 #ifdef __cplusplus
6866 extern "C"
6867 #endif
6868 char pthread_mutex_init ();
6869 int
6870 main ()
6871 {
6872 return pthread_mutex_init ();
6873   ;
6874   return 0;
6875 }
6876 _ACEOF
6877 rm -f conftest.$ac_objext conftest$ac_exeext
6878 if { (ac_try="$ac_link"
6879 case "(($ac_try" in
6880   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6881   *) ac_try_echo=$ac_try;;
6882 esac
6883 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6884   (eval "$ac_link") 2>conftest.er1
6885   ac_status=$?
6886   grep -v '^ *+' conftest.er1 >conftest.err
6887   rm -f conftest.er1
6888   cat conftest.err >&5
6889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6890   (exit $ac_status); } && {
6891          test -z "$ac_c_werror_flag" ||
6892          test ! -s conftest.err
6893        } && test -s conftest$ac_exeext &&
6894        $as_test_x conftest$ac_exeext; then
6895   ac_cv_lib_pthread_pthread_mutex_init=yes
6896 else
6897   echo "$as_me: failed program was:" >&5
6898 sed 's/^/| /' conftest.$ac_ext >&5
6899
6900         ac_cv_lib_pthread_pthread_mutex_init=no
6901 fi
6902
6903 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6904       conftest$ac_exeext conftest.$ac_ext
6905 LIBS=$ac_check_lib_save_LIBS
6906 fi
6907 { echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
6908 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
6909 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
6910   tcl_ok=yes
6911 else
6912   tcl_ok=no
6913 fi
6914
6915             if test "$tcl_ok" = "no"; then
6916                 # Check a little harder for __pthread_mutex_init in the same
6917                 # library, as some systems hide it there until pthread.h is
6918                 # defined.  We could alternatively do an AC_TRY_COMPILE with
6919                 # pthread.h, but that will work with libpthread really doesn't
6920                 # exist, like AIX 4.2.  [Bug: 4359]
6921                 { echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
6922 echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
6923 if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
6924   echo $ECHO_N "(cached) $ECHO_C" >&6
6925 else
6926   ac_check_lib_save_LIBS=$LIBS
6927 LIBS="-lpthread  $LIBS"
6928 cat >conftest.$ac_ext <<_ACEOF
6929 /* confdefs.h.  */
6930 _ACEOF
6931 cat confdefs.h >>conftest.$ac_ext
6932 cat >>conftest.$ac_ext <<_ACEOF
6933 /* end confdefs.h.  */
6934
6935 /* Override any GCC internal prototype to avoid an error.
6936    Use char because int might match the return type of a GCC
6937    builtin and then its argument prototype would still apply.  */
6938 #ifdef __cplusplus
6939 extern "C"
6940 #endif
6941 char __pthread_mutex_init ();
6942 int
6943 main ()
6944 {
6945 return __pthread_mutex_init ();
6946   ;
6947   return 0;
6948 }
6949 _ACEOF
6950 rm -f conftest.$ac_objext conftest$ac_exeext
6951 if { (ac_try="$ac_link"
6952 case "(($ac_try" in
6953   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6954   *) ac_try_echo=$ac_try;;
6955 esac
6956 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6957   (eval "$ac_link") 2>conftest.er1
6958   ac_status=$?
6959   grep -v '^ *+' conftest.er1 >conftest.err
6960   rm -f conftest.er1
6961   cat conftest.err >&5
6962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6963   (exit $ac_status); } && {
6964          test -z "$ac_c_werror_flag" ||
6965          test ! -s conftest.err
6966        } && test -s conftest$ac_exeext &&
6967        $as_test_x conftest$ac_exeext; then
6968   ac_cv_lib_pthread___pthread_mutex_init=yes
6969 else
6970   echo "$as_me: failed program was:" >&5
6971 sed 's/^/| /' conftest.$ac_ext >&5
6972
6973         ac_cv_lib_pthread___pthread_mutex_init=no
6974 fi
6975
6976 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6977       conftest$ac_exeext conftest.$ac_ext
6978 LIBS=$ac_check_lib_save_LIBS
6979 fi
6980 { echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
6981 echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
6982 if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
6983   tcl_ok=yes
6984 else
6985   tcl_ok=no
6986 fi
6987
6988             fi
6989
6990             if test "$tcl_ok" = "yes"; then
6991                 # The space is needed
6992                 THREADS_LIBS=" -lpthread"
6993             else
6994                 { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
6995 echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; }
6996 if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
6997   echo $ECHO_N "(cached) $ECHO_C" >&6
6998 else
6999   ac_check_lib_save_LIBS=$LIBS
7000 LIBS="-lpthreads  $LIBS"
7001 cat >conftest.$ac_ext <<_ACEOF
7002 /* confdefs.h.  */
7003 _ACEOF
7004 cat confdefs.h >>conftest.$ac_ext
7005 cat >>conftest.$ac_ext <<_ACEOF
7006 /* end confdefs.h.  */
7007
7008 /* Override any GCC internal prototype to avoid an error.
7009    Use char because int might match the return type of a GCC
7010    builtin and then its argument prototype would still apply.  */
7011 #ifdef __cplusplus
7012 extern "C"
7013 #endif
7014 char pthread_mutex_init ();
7015 int
7016 main ()
7017 {
7018 return pthread_mutex_init ();
7019   ;
7020   return 0;
7021 }
7022 _ACEOF
7023 rm -f conftest.$ac_objext conftest$ac_exeext
7024 if { (ac_try="$ac_link"
7025 case "(($ac_try" in
7026   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7027   *) ac_try_echo=$ac_try;;
7028 esac
7029 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7030   (eval "$ac_link") 2>conftest.er1
7031   ac_status=$?
7032   grep -v '^ *+' conftest.er1 >conftest.err
7033   rm -f conftest.er1
7034   cat conftest.err >&5
7035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7036   (exit $ac_status); } && {
7037          test -z "$ac_c_werror_flag" ||
7038          test ! -s conftest.err
7039        } && test -s conftest$ac_exeext &&
7040        $as_test_x conftest$ac_exeext; then
7041   ac_cv_lib_pthreads_pthread_mutex_init=yes
7042 else
7043   echo "$as_me: failed program was:" >&5
7044 sed 's/^/| /' conftest.$ac_ext >&5
7045
7046         ac_cv_lib_pthreads_pthread_mutex_init=no
7047 fi
7048
7049 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7050       conftest$ac_exeext conftest.$ac_ext
7051 LIBS=$ac_check_lib_save_LIBS
7052 fi
7053 { echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
7054 echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
7055 if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
7056   tcl_ok=yes
7057 else
7058   tcl_ok=no
7059 fi
7060
7061                 if test "$tcl_ok" = "yes"; then
7062                     # The space is needed
7063                     THREADS_LIBS=" -lpthreads"
7064                 else
7065                     { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
7066 echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; }
7067 if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
7068   echo $ECHO_N "(cached) $ECHO_C" >&6
7069 else
7070   ac_check_lib_save_LIBS=$LIBS
7071 LIBS="-lc  $LIBS"
7072 cat >conftest.$ac_ext <<_ACEOF
7073 /* confdefs.h.  */
7074 _ACEOF
7075 cat confdefs.h >>conftest.$ac_ext
7076 cat >>conftest.$ac_ext <<_ACEOF
7077 /* end confdefs.h.  */
7078
7079 /* Override any GCC internal prototype to avoid an error.
7080    Use char because int might match the return type of a GCC
7081    builtin and then its argument prototype would still apply.  */
7082 #ifdef __cplusplus
7083 extern "C"
7084 #endif
7085 char pthread_mutex_init ();
7086 int
7087 main ()
7088 {
7089 return pthread_mutex_init ();
7090   ;
7091   return 0;
7092 }
7093 _ACEOF
7094 rm -f conftest.$ac_objext conftest$ac_exeext
7095 if { (ac_try="$ac_link"
7096 case "(($ac_try" in
7097   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7098   *) ac_try_echo=$ac_try;;
7099 esac
7100 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7101   (eval "$ac_link") 2>conftest.er1
7102   ac_status=$?
7103   grep -v '^ *+' conftest.er1 >conftest.err
7104   rm -f conftest.er1
7105   cat conftest.err >&5
7106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7107   (exit $ac_status); } && {
7108          test -z "$ac_c_werror_flag" ||
7109          test ! -s conftest.err
7110        } && test -s conftest$ac_exeext &&
7111        $as_test_x conftest$ac_exeext; then
7112   ac_cv_lib_c_pthread_mutex_init=yes
7113 else
7114   echo "$as_me: failed program was:" >&5
7115 sed 's/^/| /' conftest.$ac_ext >&5
7116
7117         ac_cv_lib_c_pthread_mutex_init=no
7118 fi
7119
7120 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7121       conftest$ac_exeext conftest.$ac_ext
7122 LIBS=$ac_check_lib_save_LIBS
7123 fi
7124 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
7125 echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; }
7126 if test $ac_cv_lib_c_pthread_mutex_init = yes; then
7127   tcl_ok=yes
7128 else
7129   tcl_ok=no
7130 fi
7131
7132                     if test "$tcl_ok" = "no"; then
7133                         { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
7134 echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; }
7135 if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
7136   echo $ECHO_N "(cached) $ECHO_C" >&6
7137 else
7138   ac_check_lib_save_LIBS=$LIBS
7139 LIBS="-lc_r  $LIBS"
7140 cat >conftest.$ac_ext <<_ACEOF
7141 /* confdefs.h.  */
7142 _ACEOF
7143 cat confdefs.h >>conftest.$ac_ext
7144 cat >>conftest.$ac_ext <<_ACEOF
7145 /* end confdefs.h.  */
7146
7147 /* Override any GCC internal prototype to avoid an error.
7148    Use char because int might match the return type of a GCC
7149    builtin and then its argument prototype would still apply.  */
7150 #ifdef __cplusplus
7151 extern "C"
7152 #endif
7153 char pthread_mutex_init ();
7154 int
7155 main ()
7156 {
7157 return pthread_mutex_init ();
7158   ;
7159   return 0;
7160 }
7161 _ACEOF
7162 rm -f conftest.$ac_objext conftest$ac_exeext
7163 if { (ac_try="$ac_link"
7164 case "(($ac_try" in
7165   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7166   *) ac_try_echo=$ac_try;;
7167 esac
7168 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7169   (eval "$ac_link") 2>conftest.er1
7170   ac_status=$?
7171   grep -v '^ *+' conftest.er1 >conftest.err
7172   rm -f conftest.er1
7173   cat conftest.err >&5
7174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7175   (exit $ac_status); } && {
7176          test -z "$ac_c_werror_flag" ||
7177          test ! -s conftest.err
7178        } && test -s conftest$ac_exeext &&
7179        $as_test_x conftest$ac_exeext; then
7180   ac_cv_lib_c_r_pthread_mutex_init=yes
7181 else
7182   echo "$as_me: failed program was:" >&5
7183 sed 's/^/| /' conftest.$ac_ext >&5
7184
7185         ac_cv_lib_c_r_pthread_mutex_init=no
7186 fi
7187
7188 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7189       conftest$ac_exeext conftest.$ac_ext
7190 LIBS=$ac_check_lib_save_LIBS
7191 fi
7192 { echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
7193 echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
7194 if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
7195   tcl_ok=yes
7196 else
7197   tcl_ok=no
7198 fi
7199
7200                         if test "$tcl_ok" = "yes"; then
7201                             # The space is needed
7202                             THREADS_LIBS=" -pthread"
7203                         else
7204                             TCL_THREADS=0
7205                             { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
7206 echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
7207                         fi
7208                     fi
7209                 fi
7210             fi
7211         fi
7212     else
7213         TCL_THREADS=0
7214     fi
7215     # Do checking message here to not mess up interleaved configure output
7216     { echo "$as_me:$LINENO: checking for building with threads" >&5
7217 echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; }
7218     if test "${TCL_THREADS}" = 1; then
7219
7220 cat >>confdefs.h <<\_ACEOF
7221 #define TCL_THREADS 1
7222 _ACEOF
7223
7224         { echo "$as_me:$LINENO: result: yes (default)" >&5
7225 echo "${ECHO_T}yes (default)" >&6; }
7226     else
7227         { echo "$as_me:$LINENO: result: no" >&5
7228 echo "${ECHO_T}no" >&6; }
7229     fi
7230     # TCL_THREADS sanity checking.  See if our request for building with
7231     # threads is the same as the way Tcl was built.  If not, warn the user.
7232     case ${TCL_DEFS} in
7233         *THREADS=1*)
7234             if test "${TCL_THREADS}" = "0"; then
7235                 { echo "$as_me:$LINENO: WARNING:
7236     Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7237     that IS thread-enabled.  It is recommended to use --enable-threads." >&5
7238 echo "$as_me: WARNING:
7239     Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7240     that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
7241             fi
7242             ;;
7243         *)
7244             if test "${TCL_THREADS}" = "1"; then
7245                 { echo "$as_me:$LINENO: WARNING:
7246     --enable-threads requested, but building against a Tcl that is NOT
7247     thread-enabled.  This is an OK configuration that will also run in
7248     a thread-enabled core." >&5
7249 echo "$as_me: WARNING:
7250     --enable-threads requested, but building against a Tcl that is NOT
7251     thread-enabled.  This is an OK configuration that will also run in
7252     a thread-enabled core." >&2;}
7253             fi
7254             ;;
7255     esac
7256
7257
7258
7259 #--------------------------------------------------------------------
7260 # The statement below defines a collection of symbols related to
7261 # building as a shared library instead of a static library.
7262 #--------------------------------------------------------------------
7263
7264
7265     { echo "$as_me:$LINENO: checking how to build libraries" >&5
7266 echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; }
7267     # Check whether --enable-shared was given.
7268 if test "${enable_shared+set}" = set; then
7269   enableval=$enable_shared; tcl_ok=$enableval
7270 else
7271   tcl_ok=yes
7272 fi
7273
7274
7275     if test "${enable_shared+set}" = set; then
7276         enableval="$enable_shared"
7277         tcl_ok=$enableval
7278     else
7279         tcl_ok=yes
7280     fi
7281
7282     if test "$tcl_ok" = "yes" ; then
7283         { echo "$as_me:$LINENO: result: shared" >&5
7284 echo "${ECHO_T}shared" >&6; }
7285         SHARED_BUILD=1
7286     else
7287         { echo "$as_me:$LINENO: result: static" >&5
7288 echo "${ECHO_T}static" >&6; }
7289         SHARED_BUILD=0
7290
7291 cat >>confdefs.h <<\_ACEOF
7292 #define STATIC_BUILD 1
7293 _ACEOF
7294
7295     fi
7296
7297
7298
7299 #--------------------------------------------------------------------
7300 # This macro figures out what flags to use with the compiler/linker
7301 # when building shared/static debug/optimized objects.  This information
7302 # can be taken from the tclConfig.sh file, but this figures it all out.
7303 #--------------------------------------------------------------------
7304
7305
7306
7307
7308     # Step 0.a: Enable 64 bit support?
7309
7310     { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
7311 echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; }
7312     # Check whether --enable-64bit was given.
7313 if test "${enable_64bit+set}" = set; then
7314   enableval=$enable_64bit; do64bit=$enableval
7315 else
7316   do64bit=no
7317 fi
7318
7319     { echo "$as_me:$LINENO: result: $do64bit" >&5
7320 echo "${ECHO_T}$do64bit" >&6; }
7321
7322     # Step 0.b: Enable Solaris 64 bit VIS support?
7323
7324     { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
7325 echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; }
7326     # Check whether --enable-64bit-vis was given.
7327 if test "${enable_64bit_vis+set}" = set; then
7328   enableval=$enable_64bit_vis; do64bitVIS=$enableval
7329 else
7330   do64bitVIS=no
7331 fi
7332
7333     { echo "$as_me:$LINENO: result: $do64bitVIS" >&5
7334 echo "${ECHO_T}$do64bitVIS" >&6; }
7335
7336     if test "$do64bitVIS" = "yes"; then
7337         # Force 64bit on with VIS
7338         do64bit=yes
7339     fi
7340
7341     # Step 0.c: Cross-compiling options for Windows/CE builds?
7342
7343     if test "${TEA_PLATFORM}" = "windows" ; then
7344         { echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
7345 echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6; }
7346         # Check whether --enable-wince was given.
7347 if test "${enable_wince+set}" = set; then
7348   enableval=$enable_wince; doWince=$enableval
7349 else
7350   doWince=no
7351 fi
7352
7353         { echo "$as_me:$LINENO: result: $doWince" >&5
7354 echo "${ECHO_T}$doWince" >&6; }
7355     fi
7356
7357     # Step 1: set the variable "system" to hold the name and version number
7358     # for the system.
7359
7360
7361     { echo "$as_me:$LINENO: checking system version" >&5
7362 echo $ECHO_N "checking system version... $ECHO_C" >&6; }
7363 if test "${tcl_cv_sys_version+set}" = set; then
7364   echo $ECHO_N "(cached) $ECHO_C" >&6
7365 else
7366
7367         if test "${TEA_PLATFORM}" = "windows" ; then
7368             tcl_cv_sys_version=windows
7369         elif test -f /usr/lib/NextStep/software_version; then
7370             tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
7371         else
7372             tcl_cv_sys_version=`uname -s`-`uname -r`
7373             if test "$?" -ne 0 ; then
7374                 { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
7375 echo "$as_me: WARNING: can't find uname command" >&2;}
7376                 tcl_cv_sys_version=unknown
7377             else
7378                 # Special check for weird MP-RAS system (uname returns weird
7379                 # results, and the version is kept in special file).
7380
7381                 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
7382                     tcl_cv_sys_version=MP-RAS-`awk '{print }' /etc/.relid`
7383                 fi
7384                 if test "`uname -s`" = "AIX" ; then
7385                     tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
7386                 fi
7387             fi
7388         fi
7389
7390 fi
7391 { echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
7392 echo "${ECHO_T}$tcl_cv_sys_version" >&6; }
7393     system=$tcl_cv_sys_version
7394
7395
7396     # Step 2: check for existence of -ldl library.  This is needed because
7397     # Linux can use either -ldl or -ldld for dynamic loading.
7398
7399     { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
7400 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
7401 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
7402   echo $ECHO_N "(cached) $ECHO_C" >&6
7403 else
7404   ac_check_lib_save_LIBS=$LIBS
7405 LIBS="-ldl  $LIBS"
7406 cat >conftest.$ac_ext <<_ACEOF
7407 /* confdefs.h.  */
7408 _ACEOF
7409 cat confdefs.h >>conftest.$ac_ext
7410 cat >>conftest.$ac_ext <<_ACEOF
7411 /* end confdefs.h.  */
7412
7413 /* Override any GCC internal prototype to avoid an error.
7414    Use char because int might match the return type of a GCC
7415    builtin and then its argument prototype would still apply.  */
7416 #ifdef __cplusplus
7417 extern "C"
7418 #endif
7419 char dlopen ();
7420 int
7421 main ()
7422 {
7423 return dlopen ();
7424   ;
7425   return 0;
7426 }
7427 _ACEOF
7428 rm -f conftest.$ac_objext conftest$ac_exeext
7429 if { (ac_try="$ac_link"
7430 case "(($ac_try" in
7431   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7432   *) ac_try_echo=$ac_try;;
7433 esac
7434 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7435   (eval "$ac_link") 2>conftest.er1
7436   ac_status=$?
7437   grep -v '^ *+' conftest.er1 >conftest.err
7438   rm -f conftest.er1
7439   cat conftest.err >&5
7440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7441   (exit $ac_status); } && {
7442          test -z "$ac_c_werror_flag" ||
7443          test ! -s conftest.err
7444        } && test -s conftest$ac_exeext &&
7445        $as_test_x conftest$ac_exeext; then
7446   ac_cv_lib_dl_dlopen=yes
7447 else
7448   echo "$as_me: failed program was:" >&5
7449 sed 's/^/| /' conftest.$ac_ext >&5
7450
7451         ac_cv_lib_dl_dlopen=no
7452 fi
7453
7454 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7455       conftest$ac_exeext conftest.$ac_ext
7456 LIBS=$ac_check_lib_save_LIBS
7457 fi
7458 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
7459 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
7460 if test $ac_cv_lib_dl_dlopen = yes; then
7461   have_dl=yes
7462 else
7463   have_dl=no
7464 fi
7465
7466
7467     # Require ranlib early so we can override it in special cases below.
7468
7469
7470
7471     # Step 3: set configuration options based on system name and version.
7472     # This is similar to Tcl's unix/tcl.m4 except that we've added a
7473     # "windows" case.
7474
7475     do64bit_ok=no
7476     LDFLAGS_ORIG="$LDFLAGS"
7477     # When ld needs options to work in 64-bit mode, put them in
7478     # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
7479     # is disabled by the user. [Bug 1016796]
7480     LDFLAGS_ARCH=""
7481     TCL_EXPORT_FILE_SUFFIX=""
7482     UNSHARED_LIB_SUFFIX=""
7483     TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
7484     ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
7485     TCL_LIB_VERSIONS_OK=ok
7486     CFLAGS_DEBUG=-g
7487     CFLAGS_OPTIMIZE=-O
7488     if test "$GCC" = "yes" ; then
7489         CFLAGS_OPTIMIZE=-O2
7490         CFLAGS_WARNING="-Wall -Wno-implicit-int"
7491     else
7492         CFLAGS_WARNING=""
7493     fi
7494     TCL_NEEDS_EXP_FILE=0
7495     TCL_BUILD_EXP_FILE=""
7496     TCL_EXP_FILE=""
7497     # Extract the first word of "ar", so it can be a program name with args.
7498 set dummy ar; ac_word=$2
7499 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7500 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7501 if test "${ac_cv_prog_AR+set}" = set; then
7502   echo $ECHO_N "(cached) $ECHO_C" >&6
7503 else
7504   if test -n "$AR"; then
7505   ac_cv_prog_AR="$AR" # Let the user override the test.
7506 else
7507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7508 for as_dir in $PATH
7509 do
7510   IFS=$as_save_IFS
7511   test -z "$as_dir" && as_dir=.
7512   for ac_exec_ext in '' $ac_executable_extensions; do
7513   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7514     ac_cv_prog_AR="ar"
7515     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7516     break 2
7517   fi
7518 done
7519 done
7520 IFS=$as_save_IFS
7521
7522 fi
7523 fi
7524 AR=$ac_cv_prog_AR
7525 if test -n "$AR"; then
7526   { echo "$as_me:$LINENO: result: $AR" >&5
7527 echo "${ECHO_T}$AR" >&6; }
7528 else
7529   { echo "$as_me:$LINENO: result: no" >&5
7530 echo "${ECHO_T}no" >&6; }
7531 fi
7532
7533
7534     STLIB_LD='${AR} cr'
7535     LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
7536     case $system in
7537         windows)
7538             # This is a 2-stage check to make sure we have the 64-bit SDK
7539             # We have to know where the SDK is installed.
7540             # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
7541             # MACHINE is IX86 for LINK, but this is used by the manifest,
7542             # which requires x86|amd64|ia64.
7543             MACHINE="X86"
7544             if test "$do64bit" != "no" ; then
7545                 if test "x${MSSDK}x" = "xx" ; then
7546                     MSSDK="C:/Progra~1/Microsoft Platform SDK"
7547                 fi
7548                 MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
7549                 PATH64=""
7550                 case "$do64bit" in
7551                     amd64|x64|yes)
7552                         MACHINE="AMD64" ; # default to AMD64 64-bit build
7553                         PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
7554                         ;;
7555                     ia64)
7556                         MACHINE="IA64"
7557                         PATH64="${MSSDK}/Bin/Win64"
7558                         ;;
7559                 esac
7560                 if test ! -d "${PATH64}" ; then
7561                     { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
7562 echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
7563                     { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
7564 echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
7565                     do64bit="no"
7566                 else
7567                     { echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
7568 echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6; }
7569                     do64bit_ok="yes"
7570                 fi
7571             fi
7572
7573             if test "$doWince" != "no" ; then
7574                 if test "$do64bit" != "no" ; then
7575                     { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
7576 echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
7577    { (exit 1); exit 1; }; }
7578                 fi
7579                 if test "$GCC" = "yes" ; then
7580                     { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
7581 echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
7582    { (exit 1); exit 1; }; }
7583                 fi
7584
7585     # First, look for one uninstalled.
7586     # the alternative search directory is invoked by --with-celib
7587
7588     if test x"${no_celib}" = x ; then
7589         # we reset no_celib in case something fails here
7590         no_celib=true
7591
7592 # Check whether --with-celib was given.
7593 if test "${with_celib+set}" = set; then
7594   withval=$with_celib; with_celibconfig=${withval}
7595 fi
7596
7597         { echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
7598 echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6; }
7599         if test "${ac_cv_c_celibconfig+set}" = set; then
7600   echo $ECHO_N "(cached) $ECHO_C" >&6
7601 else
7602
7603             # First check to see if --with-celibconfig was specified.
7604             if test x"${with_celibconfig}" != x ; then
7605                 if test -d "${with_celibconfig}/inc" ; then
7606                     ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
7607                 else
7608                     { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
7609 echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
7610    { (exit 1); exit 1; }; }
7611                 fi
7612             fi
7613
7614             # then check for a celib library
7615             if test x"${ac_cv_c_celibconfig}" = x ; then
7616                 for i in \
7617                         ../celib-palm-3.0 \
7618                         ../celib \
7619                         ../../celib-palm-3.0 \
7620                         ../../celib \
7621                         `ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
7622                         ${srcdir}/../celib-palm-3.0 \
7623                         ${srcdir}/../celib \
7624                         `ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
7625                         ; do
7626                     if test -d "$i/inc" ; then
7627                         ac_cv_c_celibconfig=`(cd $i; pwd)`
7628                         break
7629                     fi
7630                 done
7631             fi
7632
7633 fi
7634
7635         if test x"${ac_cv_c_celibconfig}" = x ; then
7636             { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
7637 echo "$as_me: error: Cannot find celib support library directory" >&2;}
7638    { (exit 1); exit 1; }; }
7639         else
7640             no_celib=
7641             CELIB_DIR=${ac_cv_c_celibconfig}
7642             CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
7643             { echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
7644 echo "${ECHO_T}found $CELIB_DIR" >&6; }
7645         fi
7646     fi
7647
7648                 # Set defaults for common evc4/PPC2003 setup
7649                 # Currently Tcl requires 300+, possibly 420+ for sockets
7650                 CEVERSION=420;          # could be 211 300 301 400 420 ...
7651                 TARGETCPU=ARMV4;        # could be ARMV4 ARM MIPS SH3 X86 ...
7652                 ARCH=ARM;               # could be ARM MIPS X86EM ...
7653                 PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
7654                 if test "$doWince" != "yes"; then
7655                     # If !yes then the user specified something
7656                     # Reset ARCH to allow user to skip specifying it
7657                     ARCH=
7658                     eval `echo $doWince | awk -F, '{ \
7659             if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
7660             if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
7661             if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
7662             if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
7663             if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
7664                     }'`
7665                     if test "x${ARCH}" = "x" ; then
7666                         ARCH=$TARGETCPU;
7667                     fi
7668                 fi
7669                 OSVERSION=WCE$CEVERSION;
7670                 if test "x${WCEROOT}" = "x" ; then
7671                         WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
7672                     if test ! -d "${WCEROOT}" ; then
7673                         WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
7674                     fi
7675                 fi
7676                 if test "x${SDKROOT}" = "x" ; then
7677                     SDKROOT="C:/Program Files/Windows CE Tools"
7678                     if test ! -d "${SDKROOT}" ; then
7679                         SDKROOT="C:/Windows CE Tools"
7680                     fi
7681                 fi
7682                 WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
7683                 SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
7684                 if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
7685                     -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
7686                     { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
7687 echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
7688    { (exit 1); exit 1; }; }
7689                     doWince="no"
7690                 else
7691                     # We could PATH_NOSPACE these, but that's not important,
7692                     # as long as we quote them when used.
7693                     CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
7694                     if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
7695                         CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
7696                     fi
7697                     CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
7698                 fi
7699             fi
7700
7701             if test "$GCC" != "yes" ; then
7702                 if test "${SHARED_BUILD}" = "0" ; then
7703                     runtime=-MT
7704                 else
7705                     runtime=-MD
7706                 fi
7707
7708                 if test "$do64bit" != "no" ; then
7709                     # All this magic is necessary for the Win64 SDK RC1 - hobbs
7710                     CC="\"${PATH64}/cl.exe\""
7711                     CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
7712                     RC="\"${MSSDK}/bin/rc.exe\""
7713                     lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
7714                     LINKBIN="\"${PATH64}/link.exe\""
7715                     CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
7716                     CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
7717                     # Avoid 'unresolved external symbol __security_cookie'
7718                     # errors, c.f. http://support.microsoft.com/?id=894573
7719
7720     vars="bufferoverflowU.lib"
7721     for i in $vars; do
7722         if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7723             # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7724             i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7725         fi
7726         PKG_LIBS="$PKG_LIBS $i"
7727     done
7728
7729
7730                 elif test "$doWince" != "no" ; then
7731                     CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
7732                     if test "${TARGETCPU}" = "X86"; then
7733                         CC="\"${CEBINROOT}/cl.exe\""
7734                     else
7735                         CC="\"${CEBINROOT}/cl${ARCH}.exe\""
7736                     fi
7737                     CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
7738                     RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
7739                     arch=`echo ${ARCH} | awk '{print tolower($0)}'`
7740                     defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
7741                     if test "${SHARED_BUILD}" = "1" ; then
7742                         # Static CE builds require static celib as well
7743                         defs="${defs} _DLL"
7744                     fi
7745                     for i in $defs ; do
7746
7747 cat >>confdefs.h <<_ACEOF
7748 #define $i 1
7749 _ACEOF
7750
7751                     done
7752
7753 cat >>confdefs.h <<_ACEOF
7754 #define _WIN32_WCE $CEVERSION
7755 _ACEOF
7756
7757
7758 cat >>confdefs.h <<_ACEOF
7759 #define UNDER_CE $CEVERSION
7760 _ACEOF
7761
7762                     CFLAGS_DEBUG="-nologo -Zi -Od"
7763                     CFLAGS_OPTIMIZE="-nologo -Ox"
7764                     lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
7765                     lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
7766                     LINKBIN="\"${CEBINROOT}/link.exe\""
7767
7768                 else
7769                     RC="rc"
7770                     lflags="-nologo"
7771                     LINKBIN="link"
7772                     CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
7773                     CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
7774                 fi
7775             fi
7776
7777             if test "$GCC" = "yes"; then
7778                 # mingw gcc mode
7779                 RC="windres"
7780                 CFLAGS_DEBUG="-g"
7781                 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
7782                 SHLIB_LD="$CC -shared"
7783                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7784                 LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
7785                 LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
7786             else
7787                 SHLIB_LD="${LINKBIN} -dll ${lflags}"
7788                 # link -lib only works when -lib is the first arg
7789                 STLIB_LD="${LINKBIN} -lib ${lflags}"
7790                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
7791                 PATHTYPE=-w
7792                 # For information on what debugtype is most useful, see:
7793                 # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
7794                 # This essentially turns it all on.
7795                 LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
7796                 LDFLAGS_OPTIMIZE="-release"
7797                 if test "$doWince" != "no" ; then
7798                     LDFLAGS_CONSOLE="-link ${lflags}"
7799                     LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
7800                 else
7801                     LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
7802                     LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
7803                 fi
7804             fi
7805
7806             SHLIB_LD_LIBS='${LIBS}'
7807             SHLIB_SUFFIX=".dll"
7808             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
7809
7810             TCL_LIB_VERSIONS_OK=nodots
7811             # Bogus to avoid getting this turned off
7812             DL_OBJS="tclLoadNone.obj"
7813             ;;
7814         AIX-*)
7815             if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
7816                 # AIX requires the _r compiler when gcc isn't being used
7817                 case "${CC}" in
7818                     *_r)
7819                         # ok ...
7820                         ;;
7821                     *)
7822                         CC=${CC}_r
7823                         ;;
7824                 esac
7825                 { echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
7826 echo "${ECHO_T}Using $CC for compiling with threads" >&6; }
7827             fi
7828             LIBS="$LIBS -lc"
7829             SHLIB_CFLAGS=""
7830             SHLIB_LD_LIBS='${LIBS}'
7831             SHLIB_SUFFIX=".so"
7832
7833             DL_OBJS="tclLoadDl.o"
7834             LD_LIBRARY_PATH_VAR="LIBPATH"
7835
7836             # Check to enable 64-bit flags for compiler/linker on AIX 4+
7837             if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
7838                 if test "$GCC" = "yes" ; then
7839                     { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
7840 echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7841                 else
7842                     do64bit_ok=yes
7843                     CFLAGS="$CFLAGS -q64"
7844                     LDFLAGS_ARCH="-q64"
7845                     RANLIB="${RANLIB} -X64"
7846                     AR="${AR} -X64"
7847                     SHLIB_LD_FLAGS="-b64"
7848                 fi
7849             fi
7850
7851             if test "`uname -m`" = "ia64" ; then
7852                 # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
7853                 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
7854                 # AIX-5 has dl* in libc.so
7855                 DL_LIBS=""
7856                 if test "$GCC" = "yes" ; then
7857                     CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7858                 else
7859                     CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
7860                 fi
7861                 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
7862             else
7863                 if test "$GCC" = "yes" ; then
7864                     SHLIB_LD="gcc -shared"
7865                 else
7866                     SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
7867                 fi
7868                 SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
7869                 DL_LIBS="-ldl"
7870                 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
7871                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7872                 TCL_NEEDS_EXP_FILE=1
7873                 TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp'
7874             fi
7875
7876             # AIX v<=4.1 has some different flags than 4.2+
7877             if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
7878                 case " $LIBOBJS " in
7879   *" tclLoadAix.$ac_objext "* ) ;;
7880   *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext"
7881  ;;
7882 esac
7883
7884                 DL_LIBS="-lld"
7885             fi
7886
7887             # On AIX <=v4 systems, libbsd.a has to be linked in to support
7888             # non-blocking file IO.  This library has to be linked in after
7889             # the MATH_LIBS or it breaks the pow() function.  The way to
7890             # insure proper sequencing, is to add it to the tail of MATH_LIBS.
7891             # This library also supplies gettimeofday.
7892             #
7893             # AIX does not have a timezone field in struct tm. When the AIX
7894             # bsd library is used, the timezone global and the gettimeofday
7895             # methods are to be avoided for timezone deduction instead, we
7896             # deduce the timezone by comparing the localtime result on a
7897             # known GMT value.
7898
7899             { echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5
7900 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6; }
7901 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
7902   echo $ECHO_N "(cached) $ECHO_C" >&6
7903 else
7904   ac_check_lib_save_LIBS=$LIBS
7905 LIBS="-lbsd  $LIBS"
7906 cat >conftest.$ac_ext <<_ACEOF
7907 /* confdefs.h.  */
7908 _ACEOF
7909 cat confdefs.h >>conftest.$ac_ext
7910 cat >>conftest.$ac_ext <<_ACEOF
7911 /* end confdefs.h.  */
7912
7913 /* Override any GCC internal prototype to avoid an error.
7914    Use char because int might match the return type of a GCC
7915    builtin and then its argument prototype would still apply.  */
7916 #ifdef __cplusplus
7917 extern "C"
7918 #endif
7919 char gettimeofday ();
7920 int
7921 main ()
7922 {
7923 return gettimeofday ();
7924   ;
7925   return 0;
7926 }
7927 _ACEOF
7928 rm -f conftest.$ac_objext conftest$ac_exeext
7929 if { (ac_try="$ac_link"
7930 case "(($ac_try" in
7931   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7932   *) ac_try_echo=$ac_try;;
7933 esac
7934 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7935   (eval "$ac_link") 2>conftest.er1
7936   ac_status=$?
7937   grep -v '^ *+' conftest.er1 >conftest.err
7938   rm -f conftest.er1
7939   cat conftest.err >&5
7940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7941   (exit $ac_status); } && {
7942          test -z "$ac_c_werror_flag" ||
7943          test ! -s conftest.err
7944        } && test -s conftest$ac_exeext &&
7945        $as_test_x conftest$ac_exeext; then
7946   ac_cv_lib_bsd_gettimeofday=yes
7947 else
7948   echo "$as_me: failed program was:" >&5
7949 sed 's/^/| /' conftest.$ac_ext >&5
7950
7951         ac_cv_lib_bsd_gettimeofday=no
7952 fi
7953
7954 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7955       conftest$ac_exeext conftest.$ac_ext
7956 LIBS=$ac_check_lib_save_LIBS
7957 fi
7958 { echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5
7959 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6; }
7960 if test $ac_cv_lib_bsd_gettimeofday = yes; then
7961   libbsd=yes
7962 else
7963   libbsd=no
7964 fi
7965
7966             if test $libbsd = yes; then
7967                 MATH_LIBS="$MATH_LIBS -lbsd"
7968
7969 cat >>confdefs.h <<\_ACEOF
7970 #define USE_DELTA_FOR_TZ 1
7971 _ACEOF
7972
7973             fi
7974             ;;
7975         BeOS*)
7976             SHLIB_CFLAGS="-fPIC"
7977             SHLIB_LD="${CC} -nostart"
7978             SHLIB_LD_LIBS='${LIBS}'
7979             SHLIB_SUFFIX=".so"
7980             DL_OBJS="tclLoadDl.o"
7981             DL_LIBS="-ldl"
7982
7983             #-----------------------------------------------------------
7984             # Check for inet_ntoa in -lbind, for BeOS (which also needs
7985             # -lsocket, even if the network functions are in -lnet which
7986             # is always linked to, for compatibility.
7987             #-----------------------------------------------------------
7988             { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
7989 echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; }
7990 if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
7991   echo $ECHO_N "(cached) $ECHO_C" >&6
7992 else
7993   ac_check_lib_save_LIBS=$LIBS
7994 LIBS="-lbind  $LIBS"
7995 cat >conftest.$ac_ext <<_ACEOF
7996 /* confdefs.h.  */
7997 _ACEOF
7998 cat confdefs.h >>conftest.$ac_ext
7999 cat >>conftest.$ac_ext <<_ACEOF
8000 /* end confdefs.h.  */
8001
8002 /* Override any GCC internal prototype to avoid an error.
8003    Use char because int might match the return type of a GCC
8004    builtin and then its argument prototype would still apply.  */
8005 #ifdef __cplusplus
8006 extern "C"
8007 #endif
8008 char inet_ntoa ();
8009 int
8010 main ()
8011 {
8012 return inet_ntoa ();
8013   ;
8014   return 0;
8015 }
8016 _ACEOF
8017 rm -f conftest.$ac_objext conftest$ac_exeext
8018 if { (ac_try="$ac_link"
8019 case "(($ac_try" in
8020   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8021   *) ac_try_echo=$ac_try;;
8022 esac
8023 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8024   (eval "$ac_link") 2>conftest.er1
8025   ac_status=$?
8026   grep -v '^ *+' conftest.er1 >conftest.err
8027   rm -f conftest.er1
8028   cat conftest.err >&5
8029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8030   (exit $ac_status); } && {
8031          test -z "$ac_c_werror_flag" ||
8032          test ! -s conftest.err
8033        } && test -s conftest$ac_exeext &&
8034        $as_test_x conftest$ac_exeext; then
8035   ac_cv_lib_bind_inet_ntoa=yes
8036 else
8037   echo "$as_me: failed program was:" >&5
8038 sed 's/^/| /' conftest.$ac_ext >&5
8039
8040         ac_cv_lib_bind_inet_ntoa=no
8041 fi
8042
8043 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8044       conftest$ac_exeext conftest.$ac_ext
8045 LIBS=$ac_check_lib_save_LIBS
8046 fi
8047 { echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
8048 echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; }
8049 if test $ac_cv_lib_bind_inet_ntoa = yes; then
8050   LIBS="$LIBS -lbind -lsocket"
8051 fi
8052
8053             ;;
8054         BSD/OS-2.1*|BSD/OS-3*)
8055             SHLIB_CFLAGS=""
8056             SHLIB_LD="shlicc -r"
8057             SHLIB_LD_LIBS='${LIBS}'
8058             SHLIB_SUFFIX=".so"
8059             DL_OBJS="tclLoadDl.o"
8060             DL_LIBS="-ldl"
8061             CC_SEARCH_FLAGS=""
8062             LD_SEARCH_FLAGS=""
8063             ;;
8064         BSD/OS-4.*)
8065             SHLIB_CFLAGS="-export-dynamic -fPIC"
8066             SHLIB_LD="cc -shared"
8067             SHLIB_LD_LIBS='${LIBS}'
8068             SHLIB_SUFFIX=".so"
8069             DL_OBJS="tclLoadDl.o"
8070             DL_LIBS="-ldl"
8071             LDFLAGS="$LDFLAGS -export-dynamic"
8072             CC_SEARCH_FLAGS=""
8073             LD_SEARCH_FLAGS=""
8074             ;;
8075         dgux*)
8076             SHLIB_CFLAGS="-K PIC"
8077             SHLIB_LD="cc -G"
8078             SHLIB_LD_LIBS=""
8079             SHLIB_SUFFIX=".so"
8080             DL_OBJS="tclLoadDl.o"
8081             DL_LIBS="-ldl"
8082             CC_SEARCH_FLAGS=""
8083             LD_SEARCH_FLAGS=""
8084             ;;
8085         HP-UX-*.11.*)
8086             # Use updated header definitions where possible
8087
8088 cat >>confdefs.h <<\_ACEOF
8089 #define _XOPEN_SOURCE_EXTENDED 1
8090 _ACEOF
8091
8092             # Needed by Tcl, but not most extensions
8093             #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
8094             #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
8095
8096             SHLIB_SUFFIX=".sl"
8097             { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8098 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
8099 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8100   echo $ECHO_N "(cached) $ECHO_C" >&6
8101 else
8102   ac_check_lib_save_LIBS=$LIBS
8103 LIBS="-ldld  $LIBS"
8104 cat >conftest.$ac_ext <<_ACEOF
8105 /* confdefs.h.  */
8106 _ACEOF
8107 cat confdefs.h >>conftest.$ac_ext
8108 cat >>conftest.$ac_ext <<_ACEOF
8109 /* end confdefs.h.  */
8110
8111 /* Override any GCC internal prototype to avoid an error.
8112    Use char because int might match the return type of a GCC
8113    builtin and then its argument prototype would still apply.  */
8114 #ifdef __cplusplus
8115 extern "C"
8116 #endif
8117 char shl_load ();
8118 int
8119 main ()
8120 {
8121 return shl_load ();
8122   ;
8123   return 0;
8124 }
8125 _ACEOF
8126 rm -f conftest.$ac_objext conftest$ac_exeext
8127 if { (ac_try="$ac_link"
8128 case "(($ac_try" in
8129   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8130   *) ac_try_echo=$ac_try;;
8131 esac
8132 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8133   (eval "$ac_link") 2>conftest.er1
8134   ac_status=$?
8135   grep -v '^ *+' conftest.er1 >conftest.err
8136   rm -f conftest.er1
8137   cat conftest.err >&5
8138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8139   (exit $ac_status); } && {
8140          test -z "$ac_c_werror_flag" ||
8141          test ! -s conftest.err
8142        } && test -s conftest$ac_exeext &&
8143        $as_test_x conftest$ac_exeext; then
8144   ac_cv_lib_dld_shl_load=yes
8145 else
8146   echo "$as_me: failed program was:" >&5
8147 sed 's/^/| /' conftest.$ac_ext >&5
8148
8149         ac_cv_lib_dld_shl_load=no
8150 fi
8151
8152 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8153       conftest$ac_exeext conftest.$ac_ext
8154 LIBS=$ac_check_lib_save_LIBS
8155 fi
8156 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
8157 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
8158 if test $ac_cv_lib_dld_shl_load = yes; then
8159   tcl_ok=yes
8160 else
8161   tcl_ok=no
8162 fi
8163
8164             if test "$tcl_ok" = yes; then
8165                 SHLIB_CFLAGS="+z"
8166                 SHLIB_LD="ld -b"
8167                 SHLIB_LD_LIBS='${LIBS}'
8168                 DL_OBJS="tclLoadShl.o"
8169                 DL_LIBS="-ldld"
8170                 LDFLAGS="$LDFLAGS -Wl,-E"
8171                 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
8172                 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
8173                 LD_LIBRARY_PATH_VAR="SHLIB_PATH"
8174             fi
8175             if test "$GCC" = "yes" ; then
8176                 SHLIB_LD="gcc -shared"
8177                 SHLIB_LD_LIBS='${LIBS}'
8178                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8179             fi
8180
8181             # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
8182             #CFLAGS="$CFLAGS +DAportable"
8183
8184             # Check to enable 64-bit flags for compiler/linker
8185             if test "$do64bit" = "yes" ; then
8186                 if test "$GCC" = "yes" ; then
8187                     hpux_arch=`${CC} -dumpmachine`
8188                     case $hpux_arch in
8189                         hppa64*)
8190                             # 64-bit gcc in use.  Fix flags for GNU ld.
8191                             do64bit_ok=yes
8192                             SHLIB_LD="${CC} -shared"
8193                             SHLIB_LD_LIBS='${LIBS}'
8194                             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8195                             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8196                             ;;
8197                         *)
8198                             { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8199 echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8200                             ;;
8201                     esac
8202                 else
8203                     do64bit_ok=yes
8204                     CFLAGS="$CFLAGS +DD64"
8205                     LDFLAGS_ARCH="+DD64"
8206                 fi
8207             fi
8208             ;;
8209         HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
8210             SHLIB_SUFFIX=".sl"
8211             { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8212 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
8213 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8214   echo $ECHO_N "(cached) $ECHO_C" >&6
8215 else
8216   ac_check_lib_save_LIBS=$LIBS
8217 LIBS="-ldld  $LIBS"
8218 cat >conftest.$ac_ext <<_ACEOF
8219 /* confdefs.h.  */
8220 _ACEOF
8221 cat confdefs.h >>conftest.$ac_ext
8222 cat >>conftest.$ac_ext <<_ACEOF
8223 /* end confdefs.h.  */
8224
8225 /* Override any GCC internal prototype to avoid an error.
8226    Use char because int might match the return type of a GCC
8227    builtin and then its argument prototype would still apply.  */
8228 #ifdef __cplusplus
8229 extern "C"
8230 #endif
8231 char shl_load ();
8232 int
8233 main ()
8234 {
8235 return shl_load ();
8236   ;
8237   return 0;
8238 }
8239 _ACEOF
8240 rm -f conftest.$ac_objext conftest$ac_exeext
8241 if { (ac_try="$ac_link"
8242 case "(($ac_try" in
8243   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8244   *) ac_try_echo=$ac_try;;
8245 esac
8246 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8247   (eval "$ac_link") 2>conftest.er1
8248   ac_status=$?
8249   grep -v '^ *+' conftest.er1 >conftest.err
8250   rm -f conftest.er1
8251   cat conftest.err >&5
8252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8253   (exit $ac_status); } && {
8254          test -z "$ac_c_werror_flag" ||
8255          test ! -s conftest.err
8256        } && test -s conftest$ac_exeext &&
8257        $as_test_x conftest$ac_exeext; then
8258   ac_cv_lib_dld_shl_load=yes
8259 else
8260   echo "$as_me: failed program was:" >&5
8261 sed 's/^/| /' conftest.$ac_ext >&5
8262
8263         ac_cv_lib_dld_shl_load=no
8264 fi
8265
8266 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8267       conftest$ac_exeext conftest.$ac_ext
8268 LIBS=$ac_check_lib_save_LIBS
8269 fi
8270 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
8271 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
8272 if test $ac_cv_lib_dld_shl_load = yes; then
8273   tcl_ok=yes
8274 else
8275   tcl_ok=no
8276 fi
8277
8278             if test "$tcl_ok" = yes; then
8279                 SHLIB_CFLAGS="+z"
8280                 SHLIB_LD="ld -b"
8281                 SHLIB_LD_LIBS=""
8282                 DL_OBJS="tclLoadShl.o"
8283                 DL_LIBS="-ldld"
8284                 LDFLAGS="$LDFLAGS -Wl,-E"
8285                 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
8286                 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
8287                 LD_LIBRARY_PATH_VAR="SHLIB_PATH"
8288             fi
8289             ;;
8290         IRIX-5.*)
8291             SHLIB_CFLAGS=""
8292             SHLIB_LD="ld -shared -rdata_shared"
8293             SHLIB_LD_LIBS='${LIBS}'
8294             SHLIB_SUFFIX=".so"
8295             DL_OBJS="tclLoadDl.o"
8296             DL_LIBS=""
8297             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8298             LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8299             ;;
8300         IRIX-6.*)
8301             SHLIB_CFLAGS=""
8302             SHLIB_LD="ld -n32 -shared -rdata_shared"
8303             SHLIB_LD_LIBS='${LIBS}'
8304             SHLIB_SUFFIX=".so"
8305             DL_OBJS="tclLoadDl.o"
8306             DL_LIBS=""
8307             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8308             LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8309             if test "$GCC" = "yes" ; then
8310                 CFLAGS="$CFLAGS -mabi=n32"
8311                 LDFLAGS="$LDFLAGS -mabi=n32"
8312             else
8313                 case $system in
8314                     IRIX-6.3)
8315                         # Use to build 6.2 compatible binaries on 6.3.
8316                         CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
8317                         ;;
8318                     *)
8319                         CFLAGS="$CFLAGS -n32"
8320                         ;;
8321                 esac
8322                 LDFLAGS="$LDFLAGS -n32"
8323             fi
8324             ;;
8325         IRIX64-6.*)
8326             SHLIB_CFLAGS=""
8327             SHLIB_LD="ld -n32 -shared -rdata_shared"
8328             SHLIB_LD_LIBS='${LIBS}'
8329             SHLIB_SUFFIX=".so"
8330             DL_OBJS="tclLoadDl.o"
8331             DL_LIBS=""
8332             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8333             LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8334
8335             # Check to enable 64-bit flags for compiler/linker
8336
8337             if test "$do64bit" = "yes" ; then
8338                 if test "$GCC" = "yes" ; then
8339                     { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
8340 echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
8341                 else
8342                     do64bit_ok=yes
8343                     SHLIB_LD="ld -64 -shared -rdata_shared"
8344                     CFLAGS="$CFLAGS -64"
8345                     LDFLAGS_ARCH="-64"
8346                 fi
8347             fi
8348             ;;
8349         Linux*)
8350             SHLIB_CFLAGS="-fPIC"
8351             SHLIB_LD_LIBS='${LIBS}'
8352             SHLIB_SUFFIX=".so"
8353
8354             CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8355             # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
8356             # when you inline the string and math operations.  Turn this off to
8357             # get rid of the warnings.
8358             #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
8359
8360             SHLIB_LD="${CC} -shared"
8361             DL_OBJS="tclLoadDl.o"
8362             DL_LIBS="-ldl"
8363             LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8364             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8365             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8366             if test "`uname -m`" = "alpha" ; then
8367                 CFLAGS="$CFLAGS -mieee"
8368             fi
8369
8370             # The combo of gcc + glibc has a bug related
8371             # to inlining of functions like strtod(). The
8372             # -fno-builtin flag should address this problem
8373             # but it does not work. The -fno-inline flag
8374             # is kind of overkill but it works.
8375             # Disable inlining only when one of the
8376             # files in compat/*.c is being linked in.
8377             if test x"${USE_COMPAT}" != x ; then
8378                 CFLAGS="$CFLAGS -fno-inline"
8379             fi
8380
8381             ;;
8382         GNU*)
8383             SHLIB_CFLAGS="-fPIC"
8384             SHLIB_LD_LIBS='${LIBS}'
8385             SHLIB_SUFFIX=".so"
8386
8387             SHLIB_LD="${CC} -shared"
8388             DL_OBJS=""
8389             DL_LIBS="-ldl"
8390             LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8391             CC_SEARCH_FLAGS=""
8392             LD_SEARCH_FLAGS=""
8393             if test "`uname -m`" = "alpha" ; then
8394                 CFLAGS="$CFLAGS -mieee"
8395             fi
8396             ;;
8397         Lynx*)
8398             SHLIB_CFLAGS="-fPIC"
8399             SHLIB_LD_LIBS='${LIBS}'
8400             SHLIB_SUFFIX=".so"
8401             CFLAGS_OPTIMIZE=-02
8402             SHLIB_LD="${CC} -shared "
8403             DL_OBJS="tclLoadDl.o"
8404             DL_LIBS="-mshared -ldl"
8405             LD_FLAGS="-Wl,--export-dynamic"
8406             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8407             LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8408             ;;
8409         MP-RAS-02*)
8410             SHLIB_CFLAGS="-K PIC"
8411             SHLIB_LD="cc -G"
8412             SHLIB_LD_LIBS=""
8413             SHLIB_SUFFIX=".so"
8414             DL_OBJS="tclLoadDl.o"
8415             DL_LIBS="-ldl"
8416             CC_SEARCH_FLAGS=""
8417             LD_SEARCH_FLAGS=""
8418             ;;
8419         MP-RAS-*)
8420             SHLIB_CFLAGS="-K PIC"
8421             SHLIB_LD="cc -G"
8422             SHLIB_LD_LIBS=""
8423             SHLIB_SUFFIX=".so"
8424             DL_OBJS="tclLoadDl.o"
8425             DL_LIBS="-ldl"
8426             LDFLAGS="$LDFLAGS -Wl,-Bexport"
8427             CC_SEARCH_FLAGS=""
8428             LD_SEARCH_FLAGS=""
8429             ;;
8430         NetBSD-*|FreeBSD-[1-2].*)
8431             # NetBSD/SPARC needs -fPIC, -fpic will not do.
8432             SHLIB_CFLAGS="-fPIC"
8433             SHLIB_LD="ld -Bshareable -x"
8434             SHLIB_LD_LIBS=""
8435             SHLIB_SUFFIX=".so"
8436             DL_OBJS="tclLoadDl.o"
8437             DL_LIBS=""
8438             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8439             LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8440             { echo "$as_me:$LINENO: checking for ELF" >&5
8441 echo $ECHO_N "checking for ELF... $ECHO_C" >&6; }
8442 if test "${tcl_cv_ld_elf+set}" = set; then
8443   echo $ECHO_N "(cached) $ECHO_C" >&6
8444 else
8445
8446                 cat >conftest.$ac_ext <<_ACEOF
8447 /* confdefs.h.  */
8448 _ACEOF
8449 cat confdefs.h >>conftest.$ac_ext
8450 cat >>conftest.$ac_ext <<_ACEOF
8451 /* end confdefs.h.  */
8452
8453 #ifdef __ELF__
8454         yes
8455 #endif
8456
8457 _ACEOF
8458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8459   $EGREP "yes" >/dev/null 2>&1; then
8460   tcl_cv_ld_elf=yes
8461 else
8462   tcl_cv_ld_elf=no
8463 fi
8464 rm -f conftest*
8465
8466 fi
8467 { echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
8468 echo "${ECHO_T}$tcl_cv_ld_elf" >&6; }
8469             if test $tcl_cv_ld_elf = yes; then
8470                 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
8471             else
8472                 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
8473             fi
8474
8475             # Ancient FreeBSD doesn't handle version numbers with dots.
8476
8477             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8478             TCL_LIB_VERSIONS_OK=nodots
8479             ;;
8480         OpenBSD-*)
8481             # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do.
8482             case `machine` in
8483             sparc|sparc64)
8484                 SHLIB_CFLAGS="-fPIC";;
8485             *)
8486                 SHLIB_CFLAGS="-fpic";;
8487             esac
8488             SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
8489             SHLIB_LD_LIBS='${LIBS}'
8490             SHLIB_SUFFIX=".so"
8491             DL_OBJS="tclLoadDl.o"
8492             DL_LIBS=""
8493             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8494             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8495             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
8496             { echo "$as_me:$LINENO: checking for ELF" >&5
8497 echo $ECHO_N "checking for ELF... $ECHO_C" >&6; }
8498 if test "${tcl_cv_ld_elf+set}" = set; then
8499   echo $ECHO_N "(cached) $ECHO_C" >&6
8500 else
8501
8502                 cat >conftest.$ac_ext <<_ACEOF
8503 /* confdefs.h.  */
8504 _ACEOF
8505 cat confdefs.h >>conftest.$ac_ext
8506 cat >>conftest.$ac_ext <<_ACEOF
8507 /* end confdefs.h.  */
8508
8509 #ifdef __ELF__
8510         yes
8511 #endif
8512
8513 _ACEOF
8514 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8515   $EGREP "yes" >/dev/null 2>&1; then
8516   tcl_cv_ld_elf=yes
8517 else
8518   tcl_cv_ld_elf=no
8519 fi
8520 rm -f conftest*
8521
8522 fi
8523 { echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
8524 echo "${ECHO_T}$tcl_cv_ld_elf" >&6; }
8525             if test $tcl_cv_ld_elf = yes; then
8526                 LDFLAGS=-Wl,-export-dynamic
8527             else
8528                 LDFLAGS=""
8529             fi
8530
8531             # OpenBSD doesn't do version numbers with dots.
8532             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8533             TCL_LIB_VERSIONS_OK=nodots
8534             ;;
8535         FreeBSD-*)
8536             # FreeBSD 3.* and greater have ELF.
8537             SHLIB_CFLAGS="-fPIC"
8538             SHLIB_LD="ld -Bshareable -x"
8539             SHLIB_LD_LIBS='${LIBS}'
8540             SHLIB_SUFFIX=".so"
8541             DL_OBJS="tclLoadDl.o"
8542             DL_LIBS=""
8543             LDFLAGS="$LDFLAGS -export-dynamic"
8544             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8545             LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8546             if test "${TCL_THREADS}" = "1" ; then
8547                 # The -pthread needs to go in the CFLAGS, not LIBS
8548                 LIBS=`echo $LIBS | sed s/-pthread//`
8549                 CFLAGS="$CFLAGS -pthread"
8550                 LDFLAGS="$LDFLAGS -pthread"
8551             fi
8552             case $system in
8553             FreeBSD-3.*)
8554                 # FreeBSD-3 doesn't handle version numbers with dots.
8555                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8556                 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
8557                 TCL_LIB_VERSIONS_OK=nodots
8558                 ;;
8559             esac
8560             ;;
8561         Darwin-*)
8562             CFLAGS_OPTIMIZE="-Os"
8563             SHLIB_CFLAGS="-fno-common"
8564             if test $do64bit = yes; then
8565                 do64bit_ok=yes
8566                 CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8567             fi
8568             # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS here:
8569             SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
8570             { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
8571 echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; }
8572 if test "${tcl_cv_ld_single_module+set}" = set; then
8573   echo $ECHO_N "(cached) $ECHO_C" >&6
8574 else
8575
8576                 hold_ldflags=$LDFLAGS
8577                 LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
8578                 cat >conftest.$ac_ext <<_ACEOF
8579 /* confdefs.h.  */
8580 _ACEOF
8581 cat confdefs.h >>conftest.$ac_ext
8582 cat >>conftest.$ac_ext <<_ACEOF
8583 /* end confdefs.h.  */
8584
8585 int
8586 main ()
8587 {
8588 int i;
8589   ;
8590   return 0;
8591 }
8592 _ACEOF
8593 rm -f conftest.$ac_objext conftest$ac_exeext
8594 if { (ac_try="$ac_link"
8595 case "(($ac_try" in
8596   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8597   *) ac_try_echo=$ac_try;;
8598 esac
8599 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8600   (eval "$ac_link") 2>conftest.er1
8601   ac_status=$?
8602   grep -v '^ *+' conftest.er1 >conftest.err
8603   rm -f conftest.er1
8604   cat conftest.err >&5
8605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8606   (exit $ac_status); } && {
8607          test -z "$ac_c_werror_flag" ||
8608          test ! -s conftest.err
8609        } && test -s conftest$ac_exeext &&
8610        $as_test_x conftest$ac_exeext; then
8611   tcl_cv_ld_single_module=yes
8612 else
8613   echo "$as_me: failed program was:" >&5
8614 sed 's/^/| /' conftest.$ac_ext >&5
8615
8616         tcl_cv_ld_single_module=no
8617 fi
8618
8619 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8620       conftest$ac_exeext conftest.$ac_ext
8621                 LDFLAGS=$hold_ldflags
8622 fi
8623 { echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
8624 echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; }
8625             if test $tcl_cv_ld_single_module = yes; then
8626                 SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
8627             fi
8628             SHLIB_LD_LIBS='${LIBS}'
8629             SHLIB_SUFFIX=".dylib"
8630             DL_OBJS="tclLoadDyld.o"
8631             DL_LIBS=""
8632             # Don't use -prebind when building for Mac OS X 10.4 or later only:
8633             test -z "${MACOSX_DEPLOYMENT_TARGET}" || \
8634                 test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F. '{print $2}'`" -lt 4 && \
8635                 LDFLAGS="$LDFLAGS -prebind"
8636             LDFLAGS="$LDFLAGS -headerpad_max_install_names"
8637             { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
8638 echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; }
8639 if test "${tcl_cv_ld_search_paths_first+set}" = set; then
8640   echo $ECHO_N "(cached) $ECHO_C" >&6
8641 else
8642
8643                 hold_ldflags=$LDFLAGS
8644                 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
8645                 cat >conftest.$ac_ext <<_ACEOF
8646 /* confdefs.h.  */
8647 _ACEOF
8648 cat confdefs.h >>conftest.$ac_ext
8649 cat >>conftest.$ac_ext <<_ACEOF
8650 /* end confdefs.h.  */
8651
8652 int
8653 main ()
8654 {
8655 int i;
8656   ;
8657   return 0;
8658 }
8659 _ACEOF
8660 rm -f conftest.$ac_objext conftest$ac_exeext
8661 if { (ac_try="$ac_link"
8662 case "(($ac_try" in
8663   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8664   *) ac_try_echo=$ac_try;;
8665 esac
8666 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8667   (eval "$ac_link") 2>conftest.er1
8668   ac_status=$?
8669   grep -v '^ *+' conftest.er1 >conftest.err
8670   rm -f conftest.er1
8671   cat conftest.err >&5
8672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8673   (exit $ac_status); } && {
8674          test -z "$ac_c_werror_flag" ||
8675          test ! -s conftest.err
8676        } && test -s conftest$ac_exeext &&
8677        $as_test_x conftest$ac_exeext; then
8678   tcl_cv_ld_search_paths_first=yes
8679 else
8680   echo "$as_me: failed program was:" >&5
8681 sed 's/^/| /' conftest.$ac_ext >&5
8682
8683         tcl_cv_ld_search_paths_first=no
8684 fi
8685
8686 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8687       conftest$ac_exeext conftest.$ac_ext
8688                 LDFLAGS=$hold_ldflags
8689 fi
8690 { echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
8691 echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; }
8692             if test $tcl_cv_ld_search_paths_first = yes; then
8693                 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
8694             fi
8695             CC_SEARCH_FLAGS=""
8696             LD_SEARCH_FLAGS=""
8697             LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
8698
8699             # TEA specific: for Tk extensions, remove -arch ppc64 from CFLAGS
8700             # for fat builds, as neither TkAqua nor TkX11 can be built for 64bit
8701             # at present (no 64bit GUI libraries).
8702             test $do64bit_ok = no && test -n "${TK_BIN_DIR}" && \
8703                 CFLAGS="`echo "$CFLAGS" | sed -e 's/-arch ppc64/-arch ppc/g'`"
8704             ;;
8705         NEXTSTEP-*)
8706             SHLIB_CFLAGS=""
8707             SHLIB_LD="cc -nostdlib -r"
8708             SHLIB_LD_LIBS=""
8709             SHLIB_SUFFIX=".so"
8710             DL_OBJS="tclLoadNext.o"
8711             DL_LIBS=""
8712             CC_SEARCH_FLAGS=""
8713             LD_SEARCH_FLAGS=""
8714             ;;
8715         OS/390-*)
8716             CFLAGS_OPTIMIZE=""          # Optimizer is buggy
8717
8718 cat >>confdefs.h <<\_ACEOF
8719 #define _OE_SOCKETS 1
8720 _ACEOF
8721
8722             ;;
8723         OSF1-1.0|OSF1-1.1|OSF1-1.2)
8724             # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
8725             SHLIB_CFLAGS=""
8726             # Hack: make package name same as library name
8727             SHLIB_LD='ld -R -export :'
8728             SHLIB_LD_LIBS=""
8729             SHLIB_SUFFIX=".so"
8730             DL_OBJS="tclLoadOSF.o"
8731             DL_LIBS=""
8732             CC_SEARCH_FLAGS=""
8733             LD_SEARCH_FLAGS=""
8734             ;;
8735         OSF1-1.*)
8736             # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
8737             SHLIB_CFLAGS="-fPIC"
8738             if test "$SHARED_BUILD" = "1" ; then
8739                 SHLIB_LD="ld -shared"
8740             else
8741                 SHLIB_LD="ld -non_shared"
8742             fi
8743             SHLIB_LD_LIBS=""
8744             SHLIB_SUFFIX=".so"
8745             DL_OBJS="tclLoadDl.o"
8746             DL_LIBS=""
8747             CC_SEARCH_FLAGS=""
8748             LD_SEARCH_FLAGS=""
8749             ;;
8750         OSF1-V*)
8751             # Digital OSF/1
8752             SHLIB_CFLAGS=""
8753             if test "$SHARED_BUILD" = "1" ; then
8754                 SHLIB_LD='ld -shared -expect_unresolved "*"'
8755             else
8756                 SHLIB_LD='ld -non_shared -expect_unresolved "*"'
8757             fi
8758             SHLIB_LD_LIBS=""
8759             SHLIB_SUFFIX=".so"
8760             DL_OBJS="tclLoadDl.o"
8761             DL_LIBS=""
8762             CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8763             LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8764             if test "$GCC" = "yes" ; then
8765                 CFLAGS="$CFLAGS -mieee"
8766             else
8767                 CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
8768             fi
8769             # see pthread_intro(3) for pthread support on osf1, k.furukawa
8770             if test "${TCL_THREADS}" = "1" ; then
8771                 CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
8772                 CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
8773                 LIBS=`echo $LIBS | sed s/-lpthreads//`
8774                 if test "$GCC" = "yes" ; then
8775                     LIBS="$LIBS -lpthread -lmach -lexc"
8776                 else
8777                     CFLAGS="$CFLAGS -pthread"
8778                     LDFLAGS="$LDFLAGS -pthread"
8779                 fi
8780             fi
8781
8782             ;;
8783         QNX-6*)
8784             # QNX RTP
8785             # This may work for all QNX, but it was only reported for v6.
8786             SHLIB_CFLAGS="-fPIC"
8787             SHLIB_LD="ld -Bshareable -x"
8788             SHLIB_LD_LIBS=""
8789             SHLIB_SUFFIX=".so"
8790             DL_OBJS="tclLoadDl.o"
8791             # dlopen is in -lc on QNX
8792             DL_LIBS=""
8793             CC_SEARCH_FLAGS=""
8794             LD_SEARCH_FLAGS=""
8795             ;;
8796         SCO_SV-3.2*)
8797             # Note, dlopen is available only on SCO 3.2.5 and greater. However,
8798             # this test works, since "uname -s" was non-standard in 3.2.4 and
8799             # below.
8800             if test "$GCC" = "yes" ; then
8801                 SHLIB_CFLAGS="-fPIC -melf"
8802                 LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
8803             else
8804                 SHLIB_CFLAGS="-Kpic -belf"
8805                 LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
8806             fi
8807             SHLIB_LD="ld -G"
8808             SHLIB_LD_LIBS=""
8809             SHLIB_SUFFIX=".so"
8810             DL_OBJS="tclLoadDl.o"
8811             DL_LIBS=""
8812             CC_SEARCH_FLAGS=""
8813             LD_SEARCH_FLAGS=""
8814             ;;
8815         SINIX*5.4*)
8816             SHLIB_CFLAGS="-K PIC"
8817             SHLIB_LD="cc -G"
8818             SHLIB_LD_LIBS=""
8819             SHLIB_SUFFIX=".so"
8820             DL_OBJS="tclLoadDl.o"
8821             DL_LIBS="-ldl"
8822             CC_SEARCH_FLAGS=""
8823             LD_SEARCH_FLAGS=""
8824             ;;
8825         SunOS-4*)
8826             SHLIB_CFLAGS="-PIC"
8827             SHLIB_LD="ld"
8828             SHLIB_LD_LIBS=""
8829             SHLIB_SUFFIX=".so"
8830             DL_OBJS="tclLoadDl.o"
8831             DL_LIBS="-ldl"
8832             CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
8833             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8834
8835             # SunOS can't handle version numbers with dots in them in library
8836             # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
8837             # requires an extra version number at the end of .so file names.
8838             # So, the library has to have a name like libtcl75.so.1.0
8839
8840             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
8841             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8842             TCL_LIB_VERSIONS_OK=nodots
8843             ;;
8844         SunOS-5.[0-6])
8845             # Careful to not let 5.10+ fall into this case
8846
8847             # Note: If _REENTRANT isn't defined, then Solaris
8848             # won't define thread-safe library routines.
8849
8850
8851 cat >>confdefs.h <<\_ACEOF
8852 #define _REENTRANT 1
8853 _ACEOF
8854
8855
8856 cat >>confdefs.h <<\_ACEOF
8857 #define _POSIX_PTHREAD_SEMANTICS 1
8858 _ACEOF
8859
8860
8861             SHLIB_CFLAGS="-KPIC"
8862
8863             # Note: need the LIBS below, otherwise Tk won't find Tcl's
8864             # symbols when dynamically loaded into tclsh.
8865
8866             SHLIB_LD_LIBS='${LIBS}'
8867             SHLIB_SUFFIX=".so"
8868             DL_OBJS="tclLoadDl.o"
8869             DL_LIBS="-ldl"
8870             if test "$GCC" = "yes" ; then
8871                 SHLIB_LD="$CC -shared"
8872                 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8873                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8874             else
8875                 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8876                 CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8877                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8878             fi
8879             ;;
8880         SunOS-5*)
8881             # Note: If _REENTRANT isn't defined, then Solaris
8882             # won't define thread-safe library routines.
8883
8884
8885 cat >>confdefs.h <<\_ACEOF
8886 #define _REENTRANT 1
8887 _ACEOF
8888
8889
8890 cat >>confdefs.h <<\_ACEOF
8891 #define _POSIX_PTHREAD_SEMANTICS 1
8892 _ACEOF
8893
8894
8895             SHLIB_CFLAGS="-KPIC"
8896
8897             # Check to enable 64-bit flags for compiler/linker
8898             if test "$do64bit" = "yes" ; then
8899                 arch=`isainfo`
8900                 if test "$arch" = "sparcv9 sparc" ; then
8901                         if test "$GCC" = "yes" ; then
8902                             if test "`gcc -dumpversion | awk -F. '{print $1}'`" -lt "3" ; then
8903                                 { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
8904 echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
8905                             else
8906                                 do64bit_ok=yes
8907                                 CFLAGS="$CFLAGS -m64 -mcpu=v9"
8908                                 LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
8909                                 SHLIB_CFLAGS="-fPIC"
8910                             fi
8911                         else
8912                             do64bit_ok=yes
8913                             if test "$do64bitVIS" = "yes" ; then
8914                                 CFLAGS="$CFLAGS -xarch=v9a"
8915                                 LDFLAGS_ARCH="-xarch=v9a"
8916                             else
8917                                 CFLAGS="$CFLAGS -xarch=v9"
8918                                 LDFLAGS_ARCH="-xarch=v9"
8919                             fi
8920                             # Solaris 64 uses this as well
8921                             #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
8922                         fi
8923                 elif test "$arch" = "amd64 i386" ; then
8924                     if test "$GCC" = "yes" ; then
8925                         { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8926 echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8927                     else
8928                         do64bit_ok=yes
8929                         CFLAGS="$CFLAGS -xarch=amd64"
8930                         LDFLAGS="$LDFLAGS -xarch=amd64"
8931                     fi
8932                 else
8933                     { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
8934 echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
8935                 fi
8936             fi
8937
8938             # Note: need the LIBS below, otherwise Tk won't find Tcl's
8939             # symbols when dynamically loaded into tclsh.
8940
8941             SHLIB_LD_LIBS='${LIBS}'
8942             SHLIB_SUFFIX=".so"
8943             DL_OBJS="tclLoadDl.o"
8944             DL_LIBS="-ldl"
8945             if test "$GCC" = "yes" ; then
8946                 SHLIB_LD="$CC -shared"
8947                 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8948                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8949                 if test "$do64bit_ok" = "yes" ; then
8950                     # We need to specify -static-libgcc or we need to
8951                     # add the path to the sparv9 libgcc.
8952                     # JH: static-libgcc is necessary for core Tcl, but may
8953                     # not be necessary for extensions.
8954                     SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
8955                     # for finding sparcv9 libgcc, get the regular libgcc
8956                     # path, remove so name and append 'sparcv9'
8957                     #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
8958                     #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
8959                 fi
8960             else
8961                 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8962                 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8963                 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8964             fi
8965             ;;
8966         UNIX_SV* | UnixWare-5*)
8967             SHLIB_CFLAGS="-KPIC"
8968             SHLIB_LD="cc -G"
8969             SHLIB_LD_LIBS=""
8970             SHLIB_SUFFIX=".so"
8971             DL_OBJS="tclLoadDl.o"
8972             DL_LIBS="-ldl"
8973             # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
8974             # that don't grok the -Bexport option.  Test that it does.
8975             { echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
8976 echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6; }
8977 if test "${tcl_cv_ld_Bexport+set}" = set; then
8978   echo $ECHO_N "(cached) $ECHO_C" >&6
8979 else
8980
8981                 hold_ldflags=$LDFLAGS
8982                 LDFLAGS="$LDFLAGS -Wl,-Bexport"
8983                 cat >conftest.$ac_ext <<_ACEOF
8984 /* confdefs.h.  */
8985 _ACEOF
8986 cat confdefs.h >>conftest.$ac_ext
8987 cat >>conftest.$ac_ext <<_ACEOF
8988 /* end confdefs.h.  */
8989
8990 int
8991 main ()
8992 {
8993 int i;
8994   ;
8995   return 0;
8996 }
8997 _ACEOF
8998 rm -f conftest.$ac_objext conftest$ac_exeext
8999 if { (ac_try="$ac_link"
9000 case "(($ac_try" in
9001   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9002   *) ac_try_echo=$ac_try;;
9003 esac
9004 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9005   (eval "$ac_link") 2>conftest.er1
9006   ac_status=$?
9007   grep -v '^ *+' conftest.er1 >conftest.err
9008   rm -f conftest.er1
9009   cat conftest.err >&5
9010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9011   (exit $ac_status); } && {
9012          test -z "$ac_c_werror_flag" ||
9013          test ! -s conftest.err
9014        } && test -s conftest$ac_exeext &&
9015        $as_test_x conftest$ac_exeext; then
9016   tcl_cv_ld_Bexport=yes
9017 else
9018   echo "$as_me: failed program was:" >&5
9019 sed 's/^/| /' conftest.$ac_ext >&5
9020
9021         tcl_cv_ld_Bexport=no
9022 fi
9023
9024 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9025       conftest$ac_exeext conftest.$ac_ext
9026                 LDFLAGS=$hold_ldflags
9027 fi
9028 { echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5
9029 echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6; }
9030             if test $tcl_cv_ld_Bexport = yes; then
9031                 LDFLAGS="$LDFLAGS -Wl,-Bexport"
9032             fi
9033             CC_SEARCH_FLAGS=""
9034             LD_SEARCH_FLAGS=""
9035             ;;
9036     esac
9037
9038     if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
9039         { echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
9040 echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
9041     fi
9042
9043     # Step 4: disable dynamic loading if requested via a command-line switch.
9044
9045     # Check whether --enable-load was given.
9046 if test "${enable_load+set}" = set; then
9047   enableval=$enable_load; tcl_ok=$enableval
9048 else
9049   tcl_ok=yes
9050 fi
9051
9052     if test "$tcl_ok" = "no"; then
9053         DL_OBJS=""
9054     fi
9055
9056     if test "x$DL_OBJS" != "x" ; then
9057         BUILD_DLTEST="\$(DLTEST_TARGETS)"
9058     else
9059         echo "Can't figure out how to do dynamic loading or shared libraries"
9060         echo "on this system."
9061         SHLIB_CFLAGS=""
9062         SHLIB_LD=""
9063         SHLIB_SUFFIX=""
9064         DL_OBJS="tclLoadNone.o"
9065         DL_LIBS=""
9066         LDFLAGS="$LDFLAGS_ORIG"
9067         CC_SEARCH_FLAGS=""
9068         LD_SEARCH_FLAGS=""
9069         BUILD_DLTEST=""
9070     fi
9071     LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
9072
9073     # If we're running gcc, then change the C flags for compiling shared
9074     # libraries to the right flags for gcc, instead of those for the
9075     # standard manufacturer compiler.
9076
9077     if test "$DL_OBJS" != "tclLoadNone.o" ; then
9078         if test "$GCC" = "yes" ; then
9079             case $system in
9080                 AIX-*)
9081                     ;;
9082                 BSD/OS*)
9083                     ;;
9084                 IRIX*)
9085                     ;;
9086                 NetBSD-*|FreeBSD-*)
9087                     ;;
9088                 Darwin-*)
9089                     ;;
9090                 SCO_SV-3.2*)
9091                     ;;
9092                 windows)
9093                     ;;
9094                 *)
9095                     SHLIB_CFLAGS="-fPIC"
9096                     ;;
9097             esac
9098         fi
9099     fi
9100
9101     if test "$SHARED_LIB_SUFFIX" = "" ; then
9102         SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
9103     fi
9104     if test "$UNSHARED_LIB_SUFFIX" = "" ; then
9105         UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
9106     fi
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122     # These must be called after we do the basic CFLAGS checks and
9123     # verify any possible 64-bit or similar switches are necessary
9124
9125     { echo "$as_me:$LINENO: checking for required early compiler flags" >&5
9126 echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; }
9127     tcl_flags=""
9128
9129     if test "${tcl_cv_flag__isoc99_source+set}" = set; then
9130   echo $ECHO_N "(cached) $ECHO_C" >&6
9131 else
9132   cat >conftest.$ac_ext <<_ACEOF
9133 /* confdefs.h.  */
9134 _ACEOF
9135 cat confdefs.h >>conftest.$ac_ext
9136 cat >>conftest.$ac_ext <<_ACEOF
9137 /* end confdefs.h.  */
9138 #include <stdlib.h>
9139 int
9140 main ()
9141 {
9142 char *p = (char *)strtoll; char *q = (char *)strtoull;
9143   ;
9144   return 0;
9145 }
9146 _ACEOF
9147 rm -f conftest.$ac_objext
9148 if { (ac_try="$ac_compile"
9149 case "(($ac_try" in
9150   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9151   *) ac_try_echo=$ac_try;;
9152 esac
9153 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9154   (eval "$ac_compile") 2>conftest.er1
9155   ac_status=$?
9156   grep -v '^ *+' conftest.er1 >conftest.err
9157   rm -f conftest.er1
9158   cat conftest.err >&5
9159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9160   (exit $ac_status); } && {
9161          test -z "$ac_c_werror_flag" ||
9162          test ! -s conftest.err
9163        } && test -s conftest.$ac_objext; then
9164   tcl_cv_flag__isoc99_source=no
9165 else
9166   echo "$as_me: failed program was:" >&5
9167 sed 's/^/| /' conftest.$ac_ext >&5
9168
9169         cat >conftest.$ac_ext <<_ACEOF
9170 /* confdefs.h.  */
9171 _ACEOF
9172 cat confdefs.h >>conftest.$ac_ext
9173 cat >>conftest.$ac_ext <<_ACEOF
9174 /* end confdefs.h.  */
9175 #define _ISOC99_SOURCE 1
9176 #include <stdlib.h>
9177 int
9178 main ()
9179 {
9180 char *p = (char *)strtoll; char *q = (char *)strtoull;
9181   ;
9182   return 0;
9183 }
9184 _ACEOF
9185 rm -f conftest.$ac_objext
9186 if { (ac_try="$ac_compile"
9187 case "(($ac_try" in
9188   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9189   *) ac_try_echo=$ac_try;;
9190 esac
9191 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9192   (eval "$ac_compile") 2>conftest.er1
9193   ac_status=$?
9194   grep -v '^ *+' conftest.er1 >conftest.err
9195   rm -f conftest.er1
9196   cat conftest.err >&5
9197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9198   (exit $ac_status); } && {
9199          test -z "$ac_c_werror_flag" ||
9200          test ! -s conftest.err
9201        } && test -s conftest.$ac_objext; then
9202   tcl_cv_flag__isoc99_source=yes
9203 else
9204   echo "$as_me: failed program was:" >&5
9205 sed 's/^/| /' conftest.$ac_ext >&5
9206
9207         tcl_cv_flag__isoc99_source=no
9208 fi
9209
9210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9211 fi
9212
9213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9214 fi
9215
9216     if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
9217
9218 cat >>confdefs.h <<\_ACEOF
9219 #define _ISOC99_SOURCE 1
9220 _ACEOF
9221
9222         tcl_flags="$tcl_flags _ISOC99_SOURCE"
9223     fi
9224
9225
9226     if test "${tcl_cv_flag__largefile64_source+set}" = set; then
9227   echo $ECHO_N "(cached) $ECHO_C" >&6
9228 else
9229   cat >conftest.$ac_ext <<_ACEOF
9230 /* confdefs.h.  */
9231 _ACEOF
9232 cat confdefs.h >>conftest.$ac_ext
9233 cat >>conftest.$ac_ext <<_ACEOF
9234 /* end confdefs.h.  */
9235 #include <sys/stat.h>
9236 int
9237 main ()
9238 {
9239 struct stat64 buf; int i = stat64("/", &buf);
9240   ;
9241   return 0;
9242 }
9243 _ACEOF
9244 rm -f conftest.$ac_objext
9245 if { (ac_try="$ac_compile"
9246 case "(($ac_try" in
9247   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9248   *) ac_try_echo=$ac_try;;
9249 esac
9250 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9251   (eval "$ac_compile") 2>conftest.er1
9252   ac_status=$?
9253   grep -v '^ *+' conftest.er1 >conftest.err
9254   rm -f conftest.er1
9255   cat conftest.err >&5
9256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9257   (exit $ac_status); } && {
9258          test -z "$ac_c_werror_flag" ||
9259          test ! -s conftest.err
9260        } && test -s conftest.$ac_objext; then
9261   tcl_cv_flag__largefile64_source=no
9262 else
9263   echo "$as_me: failed program was:" >&5
9264 sed 's/^/| /' conftest.$ac_ext >&5
9265
9266         cat >conftest.$ac_ext <<_ACEOF
9267 /* confdefs.h.  */
9268 _ACEOF
9269 cat confdefs.h >>conftest.$ac_ext
9270 cat >>conftest.$ac_ext <<_ACEOF
9271 /* end confdefs.h.  */
9272 #define _LARGEFILE64_SOURCE 1
9273 #include <sys/stat.h>
9274 int
9275 main ()
9276 {
9277 struct stat64 buf; int i = stat64("/", &buf);
9278   ;
9279   return 0;
9280 }
9281 _ACEOF
9282 rm -f conftest.$ac_objext
9283 if { (ac_try="$ac_compile"
9284 case "(($ac_try" in
9285   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9286   *) ac_try_echo=$ac_try;;
9287 esac
9288 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9289   (eval "$ac_compile") 2>conftest.er1
9290   ac_status=$?
9291   grep -v '^ *+' conftest.er1 >conftest.err
9292   rm -f conftest.er1
9293   cat conftest.err >&5
9294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9295   (exit $ac_status); } && {
9296          test -z "$ac_c_werror_flag" ||
9297          test ! -s conftest.err
9298        } && test -s conftest.$ac_objext; then
9299   tcl_cv_flag__largefile64_source=yes
9300 else
9301   echo "$as_me: failed program was:" >&5
9302 sed 's/^/| /' conftest.$ac_ext >&5
9303
9304         tcl_cv_flag__largefile64_source=no
9305 fi
9306
9307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9308 fi
9309
9310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9311 fi
9312
9313     if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
9314
9315 cat >>confdefs.h <<\_ACEOF
9316 #define _LARGEFILE64_SOURCE 1
9317 _ACEOF
9318
9319         tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
9320     fi
9321
9322
9323     if test "${tcl_cv_flag__largefile_source64+set}" = set; then
9324   echo $ECHO_N "(cached) $ECHO_C" >&6
9325 else
9326   cat >conftest.$ac_ext <<_ACEOF
9327 /* confdefs.h.  */
9328 _ACEOF
9329 cat confdefs.h >>conftest.$ac_ext
9330 cat >>conftest.$ac_ext <<_ACEOF
9331 /* end confdefs.h.  */
9332 #include <sys/stat.h>
9333 int
9334 main ()
9335 {
9336 char *p = (char *)open64;
9337   ;
9338   return 0;
9339 }
9340 _ACEOF
9341 rm -f conftest.$ac_objext
9342 if { (ac_try="$ac_compile"
9343 case "(($ac_try" in
9344   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9345   *) ac_try_echo=$ac_try;;
9346 esac
9347 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9348   (eval "$ac_compile") 2>conftest.er1
9349   ac_status=$?
9350   grep -v '^ *+' conftest.er1 >conftest.err
9351   rm -f conftest.er1
9352   cat conftest.err >&5
9353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9354   (exit $ac_status); } && {
9355          test -z "$ac_c_werror_flag" ||
9356          test ! -s conftest.err
9357        } && test -s conftest.$ac_objext; then
9358   tcl_cv_flag__largefile_source64=no
9359 else
9360   echo "$as_me: failed program was:" >&5
9361 sed 's/^/| /' conftest.$ac_ext >&5
9362
9363         cat >conftest.$ac_ext <<_ACEOF
9364 /* confdefs.h.  */
9365 _ACEOF
9366 cat confdefs.h >>conftest.$ac_ext
9367 cat >>conftest.$ac_ext <<_ACEOF
9368 /* end confdefs.h.  */
9369 #define _LARGEFILE_SOURCE64 1
9370 #include <sys/stat.h>
9371 int
9372 main ()
9373 {
9374 char *p = (char *)open64;
9375   ;
9376   return 0;
9377 }
9378 _ACEOF
9379 rm -f conftest.$ac_objext
9380 if { (ac_try="$ac_compile"
9381 case "(($ac_try" in
9382   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9383   *) ac_try_echo=$ac_try;;
9384 esac
9385 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9386   (eval "$ac_compile") 2>conftest.er1
9387   ac_status=$?
9388   grep -v '^ *+' conftest.er1 >conftest.err
9389   rm -f conftest.er1
9390   cat conftest.err >&5
9391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9392   (exit $ac_status); } && {
9393          test -z "$ac_c_werror_flag" ||
9394          test ! -s conftest.err
9395        } && test -s conftest.$ac_objext; then
9396   tcl_cv_flag__largefile_source64=yes
9397 else
9398   echo "$as_me: failed program was:" >&5
9399 sed 's/^/| /' conftest.$ac_ext >&5
9400
9401         tcl_cv_flag__largefile_source64=no
9402 fi
9403
9404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9405 fi
9406
9407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9408 fi
9409
9410     if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
9411
9412 cat >>confdefs.h <<\_ACEOF
9413 #define _LARGEFILE_SOURCE64 1
9414 _ACEOF
9415
9416         tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
9417     fi
9418
9419     if test "x${tcl_flags}" = "x" ; then
9420         { echo "$as_me:$LINENO: result: none" >&5
9421 echo "${ECHO_T}none" >&6; }
9422     else
9423         { echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
9424 echo "${ECHO_T}${tcl_flags}" >&6; }
9425     fi
9426
9427
9428     { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
9429 echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; }
9430     if test "${tcl_cv_type_64bit+set}" = set; then
9431   echo $ECHO_N "(cached) $ECHO_C" >&6
9432 else
9433
9434         tcl_cv_type_64bit=none
9435         # See if the compiler knows natively about __int64
9436         cat >conftest.$ac_ext <<_ACEOF
9437 /* confdefs.h.  */
9438 _ACEOF
9439 cat confdefs.h >>conftest.$ac_ext
9440 cat >>conftest.$ac_ext <<_ACEOF
9441 /* end confdefs.h.  */
9442
9443 int
9444 main ()
9445 {
9446 __int64 value = (__int64) 0;
9447   ;
9448   return 0;
9449 }
9450 _ACEOF
9451 rm -f conftest.$ac_objext
9452 if { (ac_try="$ac_compile"
9453 case "(($ac_try" in
9454   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9455   *) ac_try_echo=$ac_try;;
9456 esac
9457 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9458   (eval "$ac_compile") 2>conftest.er1
9459   ac_status=$?
9460   grep -v '^ *+' conftest.er1 >conftest.err
9461   rm -f conftest.er1
9462   cat conftest.err >&5
9463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9464   (exit $ac_status); } && {
9465          test -z "$ac_c_werror_flag" ||
9466          test ! -s conftest.err
9467        } && test -s conftest.$ac_objext; then
9468   tcl_type_64bit=__int64
9469 else
9470   echo "$as_me: failed program was:" >&5
9471 sed 's/^/| /' conftest.$ac_ext >&5
9472
9473         tcl_type_64bit="long long"
9474 fi
9475
9476 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9477         # See if we should use long anyway  Note that we substitute in the
9478         # type that is our current guess for a 64-bit type inside this check
9479         # program, so it should be modified only carefully...
9480         cat >conftest.$ac_ext <<_ACEOF
9481 /* confdefs.h.  */
9482 _ACEOF
9483 cat confdefs.h >>conftest.$ac_ext
9484 cat >>conftest.$ac_ext <<_ACEOF
9485 /* end confdefs.h.  */
9486
9487 int
9488 main ()
9489 {
9490 switch (0) {
9491             case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
9492         }
9493   ;
9494   return 0;
9495 }
9496 _ACEOF
9497 rm -f conftest.$ac_objext
9498 if { (ac_try="$ac_compile"
9499 case "(($ac_try" in
9500   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9501   *) ac_try_echo=$ac_try;;
9502 esac
9503 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9504   (eval "$ac_compile") 2>conftest.er1
9505   ac_status=$?
9506   grep -v '^ *+' conftest.er1 >conftest.err
9507   rm -f conftest.er1
9508   cat conftest.err >&5
9509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9510   (exit $ac_status); } && {
9511          test -z "$ac_c_werror_flag" ||
9512          test ! -s conftest.err
9513        } && test -s conftest.$ac_objext; then
9514   tcl_cv_type_64bit=${tcl_type_64bit}
9515 else
9516   echo "$as_me: failed program was:" >&5
9517 sed 's/^/| /' conftest.$ac_ext >&5
9518
9519
9520 fi
9521
9522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9523 fi
9524
9525     if test "${tcl_cv_type_64bit}" = none ; then
9526
9527 cat >>confdefs.h <<\_ACEOF
9528 #define TCL_WIDE_INT_IS_LONG 1
9529 _ACEOF
9530
9531         { echo "$as_me:$LINENO: result: using long" >&5
9532 echo "${ECHO_T}using long" >&6; }
9533     elif test "${tcl_cv_type_64bit}" = "__int64" \
9534                 -a "${TEA_PLATFORM}" = "windows" ; then
9535         # We actually want to use the default tcl.h checks in this
9536         # case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
9537         { echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
9538 echo "${ECHO_T}using Tcl header defaults" >&6; }
9539     else
9540
9541 cat >>confdefs.h <<_ACEOF
9542 #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
9543 _ACEOF
9544
9545         { echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
9546 echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; }
9547
9548         # Now check for auxiliary declarations
9549         { echo "$as_me:$LINENO: checking for struct dirent64" >&5
9550 echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; }
9551 if test "${tcl_cv_struct_dirent64+set}" = set; then
9552   echo $ECHO_N "(cached) $ECHO_C" >&6
9553 else
9554
9555             cat >conftest.$ac_ext <<_ACEOF
9556 /* confdefs.h.  */
9557 _ACEOF
9558 cat confdefs.h >>conftest.$ac_ext
9559 cat >>conftest.$ac_ext <<_ACEOF
9560 /* end confdefs.h.  */
9561 #include <sys/types.h>
9562 #include <sys/dirent.h>
9563 int
9564 main ()
9565 {
9566 struct dirent64 p;
9567   ;
9568   return 0;
9569 }
9570 _ACEOF
9571 rm -f conftest.$ac_objext
9572 if { (ac_try="$ac_compile"
9573 case "(($ac_try" in
9574   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9575   *) ac_try_echo=$ac_try;;
9576 esac
9577 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9578   (eval "$ac_compile") 2>conftest.er1
9579   ac_status=$?
9580   grep -v '^ *+' conftest.er1 >conftest.err
9581   rm -f conftest.er1
9582   cat conftest.err >&5
9583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9584   (exit $ac_status); } && {
9585          test -z "$ac_c_werror_flag" ||
9586          test ! -s conftest.err
9587        } && test -s conftest.$ac_objext; then
9588   tcl_cv_struct_dirent64=yes
9589 else
9590   echo "$as_me: failed program was:" >&5
9591 sed 's/^/| /' conftest.$ac_ext >&5
9592
9593         tcl_cv_struct_dirent64=no
9594 fi
9595
9596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9597 fi
9598 { echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
9599 echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; }
9600         if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
9601
9602 cat >>confdefs.h <<\_ACEOF
9603 #define HAVE_STRUCT_DIRENT64 1
9604 _ACEOF
9605
9606         fi
9607
9608         { echo "$as_me:$LINENO: checking for struct stat64" >&5
9609 echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; }
9610 if test "${tcl_cv_struct_stat64+set}" = set; then
9611   echo $ECHO_N "(cached) $ECHO_C" >&6
9612 else
9613
9614             cat >conftest.$ac_ext <<_ACEOF
9615 /* confdefs.h.  */
9616 _ACEOF
9617 cat confdefs.h >>conftest.$ac_ext
9618 cat >>conftest.$ac_ext <<_ACEOF
9619 /* end confdefs.h.  */
9620 #include <sys/stat.h>
9621 int
9622 main ()
9623 {
9624 struct stat64 p;
9625
9626   ;
9627   return 0;
9628 }
9629 _ACEOF
9630 rm -f conftest.$ac_objext
9631 if { (ac_try="$ac_compile"
9632 case "(($ac_try" in
9633   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9634   *) ac_try_echo=$ac_try;;
9635 esac
9636 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9637   (eval "$ac_compile") 2>conftest.er1
9638   ac_status=$?
9639   grep -v '^ *+' conftest.er1 >conftest.err
9640   rm -f conftest.er1
9641   cat conftest.err >&5
9642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9643   (exit $ac_status); } && {
9644          test -z "$ac_c_werror_flag" ||
9645          test ! -s conftest.err
9646        } && test -s conftest.$ac_objext; then
9647   tcl_cv_struct_stat64=yes
9648 else
9649   echo "$as_me: failed program was:" >&5
9650 sed 's/^/| /' conftest.$ac_ext >&5
9651
9652         tcl_cv_struct_stat64=no
9653 fi
9654
9655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9656 fi
9657 { echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
9658 echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; }
9659         if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
9660
9661 cat >>confdefs.h <<\_ACEOF
9662 #define HAVE_STRUCT_STAT64 1
9663 _ACEOF
9664
9665         fi
9666
9667
9668
9669 for ac_func in open64 lseek64
9670 do
9671 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9672 { echo "$as_me:$LINENO: checking for $ac_func" >&5
9673 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9674 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9675   echo $ECHO_N "(cached) $ECHO_C" >&6
9676 else
9677   cat >conftest.$ac_ext <<_ACEOF
9678 /* confdefs.h.  */
9679 _ACEOF
9680 cat confdefs.h >>conftest.$ac_ext
9681 cat >>conftest.$ac_ext <<_ACEOF
9682 /* end confdefs.h.  */
9683 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9684    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9685 #define $ac_func innocuous_$ac_func
9686
9687 /* System header to define __stub macros and hopefully few prototypes,
9688     which can conflict with char $ac_func (); below.
9689     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9690     <limits.h> exists even on freestanding compilers.  */
9691
9692 #ifdef __STDC__
9693 # include <limits.h>
9694 #else
9695 # include <assert.h>
9696 #endif
9697
9698 #undef $ac_func
9699
9700 /* Override any GCC internal prototype to avoid an error.
9701    Use char because int might match the return type of a GCC
9702    builtin and then its argument prototype would still apply.  */
9703 #ifdef __cplusplus
9704 extern "C"
9705 #endif
9706 char $ac_func ();
9707 /* The GNU C library defines this for functions which it implements
9708     to always fail with ENOSYS.  Some functions are actually named
9709     something starting with __ and the normal name is an alias.  */
9710 #if defined __stub_$ac_func || defined __stub___$ac_func
9711 choke me
9712 #endif
9713
9714 int
9715 main ()
9716 {
9717 return $ac_func ();
9718   ;
9719   return 0;
9720 }
9721 _ACEOF
9722 rm -f conftest.$ac_objext conftest$ac_exeext
9723 if { (ac_try="$ac_link"
9724 case "(($ac_try" in
9725   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9726   *) ac_try_echo=$ac_try;;
9727 esac
9728 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9729   (eval "$ac_link") 2>conftest.er1
9730   ac_status=$?
9731   grep -v '^ *+' conftest.er1 >conftest.err
9732   rm -f conftest.er1
9733   cat conftest.err >&5
9734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9735   (exit $ac_status); } && {
9736          test -z "$ac_c_werror_flag" ||
9737          test ! -s conftest.err
9738        } && test -s conftest$ac_exeext &&
9739        $as_test_x conftest$ac_exeext; then
9740   eval "$as_ac_var=yes"
9741 else
9742   echo "$as_me: failed program was:" >&5
9743 sed 's/^/| /' conftest.$ac_ext >&5
9744
9745         eval "$as_ac_var=no"
9746 fi
9747
9748 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9749       conftest$ac_exeext conftest.$ac_ext
9750 fi
9751 ac_res=`eval echo '${'$as_ac_var'}'`
9752                { echo "$as_me:$LINENO: result: $ac_res" >&5
9753 echo "${ECHO_T}$ac_res" >&6; }
9754 if test `eval echo '${'$as_ac_var'}'` = yes; then
9755   cat >>confdefs.h <<_ACEOF
9756 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9757 _ACEOF
9758
9759 fi
9760 done
9761
9762         { echo "$as_me:$LINENO: checking for off64_t" >&5
9763 echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; }
9764         if test "${tcl_cv_type_off64_t+set}" = set; then
9765   echo $ECHO_N "(cached) $ECHO_C" >&6
9766 else
9767
9768             cat >conftest.$ac_ext <<_ACEOF
9769 /* confdefs.h.  */
9770 _ACEOF
9771 cat confdefs.h >>conftest.$ac_ext
9772 cat >>conftest.$ac_ext <<_ACEOF
9773 /* end confdefs.h.  */
9774 #include <sys/types.h>
9775 int
9776 main ()
9777 {
9778 off64_t offset;
9779
9780   ;
9781   return 0;
9782 }
9783 _ACEOF
9784 rm -f conftest.$ac_objext
9785 if { (ac_try="$ac_compile"
9786 case "(($ac_try" in
9787   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9788   *) ac_try_echo=$ac_try;;
9789 esac
9790 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9791   (eval "$ac_compile") 2>conftest.er1
9792   ac_status=$?
9793   grep -v '^ *+' conftest.er1 >conftest.err
9794   rm -f conftest.er1
9795   cat conftest.err >&5
9796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9797   (exit $ac_status); } && {
9798          test -z "$ac_c_werror_flag" ||
9799          test ! -s conftest.err
9800        } && test -s conftest.$ac_objext; then
9801   tcl_cv_type_off64_t=yes
9802 else
9803   echo "$as_me: failed program was:" >&5
9804 sed 's/^/| /' conftest.$ac_ext >&5
9805
9806         tcl_cv_type_off64_t=no
9807 fi
9808
9809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9810 fi
9811
9812                         if test "x${tcl_cv_type_off64_t}" = "xyes" && \
9813                 test "x${ac_cv_func_lseek64}" = "xyes" && \
9814                 test "x${ac_cv_func_open64}" = "xyes" ; then
9815
9816 cat >>confdefs.h <<\_ACEOF
9817 #define HAVE_TYPE_OFF64_T 1
9818 _ACEOF
9819
9820             { echo "$as_me:$LINENO: result: yes" >&5
9821 echo "${ECHO_T}yes" >&6; }
9822         else
9823             { echo "$as_me:$LINENO: result: no" >&5
9824 echo "${ECHO_T}no" >&6; }
9825         fi
9826     fi
9827
9828
9829
9830 #--------------------------------------------------------------------
9831 # Set the default compiler switches based on the --enable-symbols option.
9832 #--------------------------------------------------------------------
9833
9834
9835
9836     { echo "$as_me:$LINENO: checking for build with symbols" >&5
9837 echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; }
9838     # Check whether --enable-symbols was given.
9839 if test "${enable_symbols+set}" = set; then
9840   enableval=$enable_symbols; tcl_ok=$enableval
9841 else
9842   tcl_ok=no
9843 fi
9844
9845     DBGX=""
9846     if test "$tcl_ok" = "no"; then
9847         CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
9848         LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
9849         { echo "$as_me:$LINENO: result: no" >&5
9850 echo "${ECHO_T}no" >&6; }
9851     else
9852         CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
9853         LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
9854         if test "$tcl_ok" = "yes"; then
9855             { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
9856 echo "${ECHO_T}yes (standard debugging)" >&6; }
9857         fi
9858     fi
9859     if test "${TEA_PLATFORM}" != "windows" ; then
9860         LDFLAGS_DEFAULT="${LDFLAGS}"
9861     fi
9862
9863
9864
9865
9866
9867     if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
9868
9869 cat >>confdefs.h <<\_ACEOF
9870 #define TCL_MEM_DEBUG 1
9871 _ACEOF
9872
9873     fi
9874
9875     if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
9876         if test "$tcl_ok" = "all"; then
9877             { echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
9878 echo "${ECHO_T}enabled symbols mem debugging" >&6; }
9879         else
9880             { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
9881 echo "${ECHO_T}enabled $tcl_ok debugging" >&6; }
9882         fi
9883     fi
9884
9885
9886 #--------------------------------------------------------------------
9887 # Everyone should be linking against the Tcl stub library.  If you
9888 # can't for some reason, remove this definition.  If you aren't using
9889 # stubs, you also need to modify the SHLIB_LD_LIBS setting below to
9890 # link against the non-stubbed Tcl library.  Add Tk too if necessary.
9891 #--------------------------------------------------------------------
9892
9893
9894 cat >>confdefs.h <<\_ACEOF
9895 #define USE_TCL_STUBS 1
9896 _ACEOF
9897
9898 #AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
9899
9900 #--------------------------------------------------------------------
9901 # This macro generates a line to use when building a library.  It
9902 # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
9903 # and TEA_LOAD_TCLCONFIG macros above.
9904 #--------------------------------------------------------------------
9905
9906
9907     if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
9908         MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
9909         MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
9910         MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
9911     else
9912         MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
9913         MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
9914         MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
9915     fi
9916
9917     if test "${SHARED_BUILD}" = "1" ; then
9918         MAKE_LIB="${MAKE_SHARED_LIB} "
9919     else
9920         MAKE_LIB="${MAKE_STATIC_LIB} "
9921     fi
9922
9923     #--------------------------------------------------------------------
9924     # Shared libraries and static libraries have different names.
9925     # Use the double eval to make sure any variables in the suffix is
9926     # substituted. (@@@ Might not be necessary anymore)
9927     #--------------------------------------------------------------------
9928
9929     if test "${TEA_PLATFORM}" = "windows" ; then
9930         if test "${SHARED_BUILD}" = "1" ; then
9931             # We force the unresolved linking of symbols that are really in
9932             # the private libraries of Tcl and Tk.
9933             SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
9934             if test x"${TK_BIN_DIR}" != x ; then
9935                 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
9936             fi
9937             eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
9938         else
9939             eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
9940         fi
9941         # Some packages build their own stubs libraries
9942         eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
9943         # These aren't needed on Windows (either MSVC or gcc)
9944         RANLIB=:
9945         RANLIB_STUB=:
9946     else
9947         RANLIB_STUB="${RANLIB}"
9948         if test "${SHARED_BUILD}" = "1" ; then
9949             SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
9950             if test x"${TK_BIN_DIR}" != x ; then
9951                 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
9952             fi
9953             eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
9954             RANLIB=:
9955         else
9956             eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
9957         fi
9958         # Some packages build their own stubs libraries
9959         eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
9960     fi
9961
9962     # These are escaped so that only CFLAGS is picked up at configure time.
9963     # The other values will be substituted at make time.
9964     CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
9965     if test "${SHARED_BUILD}" = "1" ; then
9966         CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
9967     fi
9968
9969
9970
9971
9972
9973
9974
9975
9976 LIBMYSQL=""
9977
9978 # Check whether --with-mysql-include was given.
9979 if test "${with_mysql_include+set}" = set; then
9980   withval=$with_mysql_include; MYSQL_INC_DIR=$withval
9981 else
9982   MYSQL_INC_DIR="/usr/include/mysql"
9983 fi
9984
9985
9986 # Check whether --with-mysql-lib was given.
9987 if test "${with_mysql_lib+set}" = set; then
9988   withval=$with_mysql_lib; MYSQL_LIB_DIR=$withval
9989 else
9990   MYSQL_LIB_DIR="/usr/lib/mysql"
9991 fi
9992
9993 MYSQL_INCLUDES="-I$MYSQL_INC_DIR"
9994
9995
9996 # Check whether --enable-mysqlstatic was given.
9997 if test "${enable_mysqlstatic+set}" = set; then
9998   enableval=$enable_mysqlstatic; tcl_ok=$enableval
9999 else
10000   tcl_ok=$1
10001 fi
10002
10003
10004 if test "$tcl_ok" = "yes"; then
10005    LIBS="${LIBS} ${MYSQL_LIB_DIR}/libmysqlclient.a -lz -lcrypt -lnsl -lm"
10006 else
10007    if test ! -f $MSQL_LIB_DIR/libmysqlclient${SHLIB_SUFFIX} -a -f /usr/lib/libmysqlclient${SHLIB_SUFFIX}; then
10008       MYSQL_LIB_DIR=/usr/lib
10009    fi
10010    MYSQL_LIBS="-L$MYSQL_LIB_DIR -lmysqlclient"
10011    if test ! "$MYSQL_LIB_DIR" = ""; then
10012      LIBMYSQL="libmysqclient${SHLIB_SUFFIX}"
10013    fi
10014 fi
10015
10016
10017
10018
10019
10020
10021 { echo "$as_me:$LINENO: checking for mysql header" >&5
10022 echo $ECHO_N "checking for mysql header... $ECHO_C" >&6; }
10023 if test ! -f ${MYSQL_INC_DIR}/mysql.h ; then
10024    { { echo "$as_me:$LINENO: error: Cannot find mysql.h in $MYSQL_INC_DIR use -with-mysql-include=?" >&5
10025 echo "$as_me: error: Cannot find mysql.h in $MYSQL_INC_DIR use -with-mysql-include=?" >&2;}
10026    { (exit 1); exit 1; }; }
10027 fi
10028 { echo "$as_me:$LINENO: result: yes" >&5
10029 echo "${ECHO_T}yes" >&6; }
10030 { echo "$as_me:$LINENO: checking for libmysqlclient lib" >&5
10031 echo $ECHO_N "checking for libmysqlclient lib... $ECHO_C" >&6; }
10032 if test "$tcl_ok" = "yes"; then
10033    if test ! -f ${MYSQL_LIB_DIR}/libmysqlclient.a ; then
10034         { { echo "$as_me:$LINENO: error: Cannot find libmysqlclient.a in $MYSQL_LIB_DIR use --with-mysql-lib=?" >&5
10035 echo "$as_me: error: Cannot find libmysqlclient.a in $MYSQL_LIB_DIR use --with-mysql-lib=?" >&2;}
10036    { (exit 1); exit 1; }; }
10037    fi
10038 else
10039    if test ! -f ${MYSQL_LIB_DIR}/libmysqlclient${SHLIB_SUFFIX} ; then
10040         { { echo "$as_me:$LINENO: error: Cannot find libmysqlclient${SHLIB_SUFFIX} in $MYSQL_LIB_DIR use --with-mysql-lib=?" >&5
10041 echo "$as_me: error: Cannot find libmysqlclient${SHLIB_SUFFIX} in $MYSQL_LIB_DIR use --with-mysql-lib=?" >&2;}
10042    { (exit 1); exit 1; }; }
10043    fi
10044 fi
10045 { echo "$as_me:$LINENO: result: yes" >&5
10046 echo "${ECHO_T}yes" >&6; }
10047
10048 #--------------------------------------------------------------------
10049 # Determine the name of the tclsh and/or wish executables in the
10050 # Tcl and Tk build directories or the location they were installed
10051 # into. These paths are used to support running test cases only,
10052 # the Makefile should not be making use of these paths to generate
10053 # a pkgIndex.tcl file or anything else at extension build time.
10054 #--------------------------------------------------------------------
10055
10056
10057     { echo "$as_me:$LINENO: checking for tclsh" >&5
10058 echo $ECHO_N "checking for tclsh... $ECHO_C" >&6; }
10059     if test -f "${TCL_BIN_DIR}/Makefile" ; then
10060         # tclConfig.sh is in Tcl build directory
10061         if test "${TEA_PLATFORM}" = "windows"; then
10062             TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
10063         else
10064             TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
10065         fi
10066     else
10067         # tclConfig.sh is in install location
10068         if test "${TEA_PLATFORM}" = "windows"; then
10069             TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
10070         else
10071             TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
10072         fi
10073         list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
10074               `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
10075               `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
10076         for i in $list ; do
10077             if test -f "$i/${TCLSH_PROG}" ; then
10078                 REAL_TCL_BIN_DIR="`cd "$i"; pwd`"
10079                 break
10080             fi
10081         done
10082         TCLSH_PROG="${REAL_TCL_BIN_DIR}/${TCLSH_PROG}"
10083     fi
10084     { echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
10085 echo "${ECHO_T}${TCLSH_PROG}" >&6; }
10086
10087
10088 #TEA_PROG_WISH
10089
10090 #--------------------------------------------------------------------
10091 # Finally, substitute all of the various values into the Makefile.
10092 # You may alternatively have a special pkgIndex.tcl.in or other files
10093 # which require substituting th AC variables in.  Include these here.
10094 #--------------------------------------------------------------------
10095
10096 ac_config_files="$ac_config_files Makefile pkgIndex.tcl"
10097
10098 cat >confcache <<\_ACEOF
10099 # This file is a shell script that caches the results of configure
10100 # tests run on this system so they can be shared between configure
10101 # scripts and configure runs, see configure's option --config-cache.
10102 # It is not useful on other systems.  If it contains results you don't
10103 # want to keep, you may remove or edit it.
10104 #
10105 # config.status only pays attention to the cache file if you give it
10106 # the --recheck option to rerun configure.
10107 #
10108 # `ac_cv_env_foo' variables (set or unset) will be overridden when
10109 # loading this file, other *unset* `ac_cv_foo' will be assigned the
10110 # following values.
10111
10112 _ACEOF
10113
10114 # The following way of writing the cache mishandles newlines in values,
10115 # but we know of no workaround that is simple, portable, and efficient.
10116 # So, we kill variables containing newlines.
10117 # Ultrix sh set writes to stderr and can't be redirected directly,
10118 # and sets the high bit in the cache file unless we assign to the vars.
10119 (
10120   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
10121     eval ac_val=\$$ac_var
10122     case $ac_val in #(
10123     *${as_nl}*)
10124       case $ac_var in #(
10125       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
10126 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
10127       esac
10128       case $ac_var in #(
10129       _ | IFS | as_nl) ;; #(
10130       *) $as_unset $ac_var ;;
10131       esac ;;
10132     esac
10133   done
10134
10135   (set) 2>&1 |
10136     case $as_nl`(ac_space=' '; set) 2>&1` in #(
10137     *${as_nl}ac_space=\ *)
10138       # `set' does not quote correctly, so add quotes (double-quote
10139       # substitution turns \\\\ into \\, and sed turns \\ into \).
10140       sed -n \
10141         "s/'/'\\\\''/g;
10142           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
10143       ;; #(
10144     *)
10145       # `set' quotes correctly as required by POSIX, so do not add quotes.
10146       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
10147       ;;
10148     esac |
10149     sort
10150 ) |
10151   sed '
10152      /^ac_cv_env_/b end
10153      t clear
10154      :clear
10155      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10156      t end
10157      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10158      :end' >>confcache
10159 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
10160   if test -w "$cache_file"; then
10161     test "x$cache_file" != "x/dev/null" &&
10162       { echo "$as_me:$LINENO: updating cache $cache_file" >&5
10163 echo "$as_me: updating cache $cache_file" >&6;}
10164     cat confcache >$cache_file
10165   else
10166     { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
10167 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
10168   fi
10169 fi
10170 rm -f confcache
10171
10172 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10173 # Let make expand exec_prefix.
10174 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10175
10176 # Transform confdefs.h into DEFS.
10177 # Protect against shell expansion while executing Makefile rules.
10178 # Protect against Makefile macro expansion.
10179 #
10180 # If the first sed substitution is executed (which looks for macros that
10181 # take arguments), then branch to the quote section.  Otherwise,
10182 # look for a macro that doesn't take arguments.
10183 ac_script='
10184 t clear
10185 :clear
10186 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
10187 t quote
10188 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
10189 t quote
10190 b any
10191 :quote
10192 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
10193 s/\[/\\&/g
10194 s/\]/\\&/g
10195 s/\$/$$/g
10196 H
10197 :any
10198 ${
10199         g
10200         s/^\n//
10201         s/\n/ /g
10202         p
10203 }
10204 '
10205 DEFS=`sed -n "$ac_script" confdefs.h`
10206
10207
10208 ac_libobjs=
10209 ac_ltlibobjs=
10210 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
10211   # 1. Remove the extension, and $U if already installed.
10212   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
10213   ac_i=`echo "$ac_i" | sed "$ac_script"`
10214   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
10215   #    will be set to the directory where LIBOBJS objects are built.
10216   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
10217   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
10218 done
10219 LIBOBJS=$ac_libobjs
10220
10221 LTLIBOBJS=$ac_ltlibobjs
10222
10223
10224
10225 : ${CONFIG_STATUS=./config.status}
10226 ac_clean_files_save=$ac_clean_files
10227 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
10228 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
10229 echo "$as_me: creating $CONFIG_STATUS" >&6;}
10230 cat >$CONFIG_STATUS <<_ACEOF
10231 #! $SHELL
10232 # Generated by $as_me.
10233 # Run this file to recreate the current configuration.
10234 # Compiler output produced by configure, useful for debugging
10235 # configure, is in config.log if it exists.
10236
10237 debug=false
10238 ac_cs_recheck=false
10239 ac_cs_silent=false
10240 SHELL=\${CONFIG_SHELL-$SHELL}
10241 _ACEOF
10242
10243 cat >>$CONFIG_STATUS <<\_ACEOF
10244 ## --------------------- ##
10245 ## M4sh Initialization.  ##
10246 ## --------------------- ##
10247
10248 # Be more Bourne compatible
10249 DUALCASE=1; export DUALCASE # for MKS sh
10250 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
10251   emulate sh
10252   NULLCMD=:
10253   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
10254   # is contrary to our usage.  Disable this feature.
10255   alias -g '${1+"$@"}'='"$@"'
10256   setopt NO_GLOB_SUBST
10257 else
10258   case `(set -o) 2>/dev/null` in
10259   *posix*) set -o posix ;;
10260 esac
10261
10262 fi
10263
10264
10265
10266
10267 # PATH needs CR
10268 # Avoid depending upon Character Ranges.
10269 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
10270 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
10271 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
10272 as_cr_digits='0123456789'
10273 as_cr_alnum=$as_cr_Letters$as_cr_digits
10274
10275 # The user is always right.
10276 if test "${PATH_SEPARATOR+set}" != set; then
10277   echo "#! /bin/sh" >conf$$.sh
10278   echo  "exit 0"   >>conf$$.sh
10279   chmod +x conf$$.sh
10280   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10281     PATH_SEPARATOR=';'
10282   else
10283     PATH_SEPARATOR=:
10284   fi
10285   rm -f conf$$.sh
10286 fi
10287
10288 # Support unset when possible.
10289 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
10290   as_unset=unset
10291 else
10292   as_unset=false
10293 fi
10294
10295
10296 # IFS
10297 # We need space, tab and new line, in precisely that order.  Quoting is
10298 # there to prevent editors from complaining about space-tab.
10299 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
10300 # splitting by setting IFS to empty value.)
10301 as_nl='
10302 '
10303 IFS=" ""        $as_nl"
10304
10305 # Find who we are.  Look in the path if we contain no directory separator.
10306 case $0 in
10307   *[\\/]* ) as_myself=$0 ;;
10308   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10309 for as_dir in $PATH
10310 do
10311   IFS=$as_save_IFS
10312   test -z "$as_dir" && as_dir=.
10313   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
10314 done
10315 IFS=$as_save_IFS
10316
10317      ;;
10318 esac
10319 # We did not find ourselves, most probably we were run as `sh COMMAND'
10320 # in which case we are not to be found in the path.
10321 if test "x$as_myself" = x; then
10322   as_myself=$0
10323 fi
10324 if test ! -f "$as_myself"; then
10325   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
10326   { (exit 1); exit 1; }
10327 fi
10328
10329 # Work around bugs in pre-3.0 UWIN ksh.
10330 for as_var in ENV MAIL MAILPATH
10331 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
10332 done
10333 PS1='$ '
10334 PS2='> '
10335 PS4='+ '
10336
10337 # NLS nuisances.
10338 for as_var in \
10339   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
10340   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
10341   LC_TELEPHONE LC_TIME
10342 do
10343   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
10344     eval $as_var=C; export $as_var
10345   else
10346     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
10347   fi
10348 done
10349
10350 # Required to use basename.
10351 if expr a : '\(a\)' >/dev/null 2>&1 &&
10352    test "X`expr 00001 : '.*\(...\)'`" = X001; then
10353   as_expr=expr
10354 else
10355   as_expr=false
10356 fi
10357
10358 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
10359   as_basename=basename
10360 else
10361   as_basename=false
10362 fi
10363
10364
10365 # Name of the executable.
10366 as_me=`$as_basename -- "$0" ||
10367 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
10368          X"$0" : 'X\(//\)$' \| \
10369          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
10370 echo X/"$0" |
10371     sed '/^.*\/\([^/][^/]*\)\/*$/{
10372             s//\1/
10373             q
10374           }
10375           /^X\/\(\/\/\)$/{
10376             s//\1/
10377             q
10378           }
10379           /^X\/\(\/\).*/{
10380             s//\1/
10381             q
10382           }
10383           s/.*/./; q'`
10384
10385 # CDPATH.
10386 $as_unset CDPATH
10387
10388
10389
10390   as_lineno_1=$LINENO
10391   as_lineno_2=$LINENO
10392   test "x$as_lineno_1" != "x$as_lineno_2" &&
10393   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
10394
10395   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
10396   # uniformly replaced by the line number.  The first 'sed' inserts a
10397   # line-number line after each line using $LINENO; the second 'sed'
10398   # does the real work.  The second script uses 'N' to pair each
10399   # line-number line with the line containing $LINENO, and appends
10400   # trailing '-' during substitution so that $LINENO is not a special
10401   # case at line end.
10402   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
10403   # scripts with optimization help from Paolo Bonzini.  Blame Lee
10404   # E. McMahon (1931-1989) for sed's syntax.  :-)
10405   sed -n '
10406     p
10407     /[$]LINENO/=
10408   ' <$as_myself |
10409     sed '
10410       s/[$]LINENO.*/&-/
10411       t lineno
10412       b
10413       :lineno
10414       N
10415       :loop
10416       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
10417       t loop
10418       s/-\n.*//
10419     ' >$as_me.lineno &&
10420   chmod +x "$as_me.lineno" ||
10421     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
10422    { (exit 1); exit 1; }; }
10423
10424   # Don't try to exec as it changes $[0], causing all sort of problems
10425   # (the dirname of $[0] is not the place where we might find the
10426   # original and so on.  Autoconf is especially sensitive to this).
10427   . "./$as_me.lineno"
10428   # Exit status is that of the last command.
10429   exit
10430 }
10431
10432
10433 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
10434   as_dirname=dirname
10435 else
10436   as_dirname=false
10437 fi
10438
10439 ECHO_C= ECHO_N= ECHO_T=
10440 case `echo -n x` in
10441 -n*)
10442   case `echo 'x\c'` in
10443   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
10444   *)   ECHO_C='\c';;
10445   esac;;
10446 *)
10447   ECHO_N='-n';;
10448 esac
10449
10450 if expr a : '\(a\)' >/dev/null 2>&1 &&
10451    test "X`expr 00001 : '.*\(...\)'`" = X001; then
10452   as_expr=expr
10453 else
10454   as_expr=false
10455 fi
10456
10457 rm -f conf$$ conf$$.exe conf$$.file
10458 if test -d conf$$.dir; then
10459   rm -f conf$$.dir/conf$$.file
10460 else
10461   rm -f conf$$.dir
10462   mkdir conf$$.dir
10463 fi
10464 echo >conf$$.file
10465 if ln -s conf$$.file conf$$ 2>/dev/null; then
10466   as_ln_s='ln -s'
10467   # ... but there are two gotchas:
10468   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
10469   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
10470   # In both cases, we have to default to `cp -p'.
10471   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
10472     as_ln_s='cp -p'
10473 elif ln conf$$.file conf$$ 2>/dev/null; then
10474   as_ln_s=ln
10475 else
10476   as_ln_s='cp -p'
10477 fi
10478 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
10479 rmdir conf$$.dir 2>/dev/null
10480
10481 if mkdir -p . 2>/dev/null; then
10482   as_mkdir_p=:
10483 else
10484   test -d ./-p && rmdir ./-p
10485   as_mkdir_p=false
10486 fi
10487
10488 if test -x / >/dev/null 2>&1; then
10489   as_test_x='test -x'
10490 else
10491   if ls -dL / >/dev/null 2>&1; then
10492     as_ls_L_option=L
10493   else
10494     as_ls_L_option=
10495   fi
10496   as_test_x='
10497     eval sh -c '\''
10498       if test -d "$1"; then
10499         test -d "$1/.";
10500       else
10501         case $1 in
10502         -*)set "./$1";;
10503         esac;
10504         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
10505         ???[sx]*):;;*)false;;esac;fi
10506     '\'' sh
10507   '
10508 fi
10509 as_executable_p=$as_test_x
10510
10511 # Sed expression to map a string onto a valid CPP name.
10512 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
10513
10514 # Sed expression to map a string onto a valid variable name.
10515 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
10516
10517
10518 exec 6>&1
10519
10520 # Save the log message, to keep $[0] and so on meaningful, and to
10521 # report actual input values of CONFIG_FILES etc. instead of their
10522 # values after options handling.
10523 ac_log="
10524 This file was extended by mysqltcl $as_me 3.05, which was
10525 generated by GNU Autoconf 2.61.  Invocation command line was
10526
10527   CONFIG_FILES    = $CONFIG_FILES
10528   CONFIG_HEADERS  = $CONFIG_HEADERS
10529   CONFIG_LINKS    = $CONFIG_LINKS
10530   CONFIG_COMMANDS = $CONFIG_COMMANDS
10531   $ $0 $@
10532
10533 on `(hostname || uname -n) 2>/dev/null | sed 1q`
10534 "
10535
10536 _ACEOF
10537
10538 cat >>$CONFIG_STATUS <<_ACEOF
10539 # Files that config.status was made for.
10540 config_files="$ac_config_files"
10541
10542 _ACEOF
10543
10544 cat >>$CONFIG_STATUS <<\_ACEOF
10545 ac_cs_usage="\
10546 \`$as_me' instantiates files from templates according to the
10547 current configuration.
10548
10549 Usage: $0 [OPTIONS] [FILE]...
10550
10551   -h, --help       print this help, then exit
10552   -V, --version    print version number and configuration settings, then exit
10553   -q, --quiet      do not print progress messages
10554   -d, --debug      don't remove temporary files
10555       --recheck    update $as_me by reconfiguring in the same conditions
10556   --file=FILE[:TEMPLATE]
10557                    instantiate the configuration file FILE
10558
10559 Configuration files:
10560 $config_files
10561
10562 Report bugs to <bug-autoconf@gnu.org>."
10563
10564 _ACEOF
10565 cat >>$CONFIG_STATUS <<_ACEOF
10566 ac_cs_version="\\
10567 mysqltcl config.status 3.05
10568 configured by $0, generated by GNU Autoconf 2.61,
10569   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
10570
10571 Copyright (C) 2006 Free Software Foundation, Inc.
10572 This config.status script is free software; the Free Software Foundation
10573 gives unlimited permission to copy, distribute and modify it."
10574
10575 ac_pwd='$ac_pwd'
10576 srcdir='$srcdir'
10577 INSTALL='$INSTALL'
10578 _ACEOF
10579
10580 cat >>$CONFIG_STATUS <<\_ACEOF
10581 # If no file are specified by the user, then we need to provide default
10582 # value.  By we need to know if files were specified by the user.
10583 ac_need_defaults=:
10584 while test $# != 0
10585 do
10586   case $1 in
10587   --*=*)
10588     ac_option=`expr "X$1" : 'X\([^=]*\)='`
10589     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
10590     ac_shift=:
10591     ;;
10592   *)
10593     ac_option=$1
10594     ac_optarg=$2
10595     ac_shift=shift
10596     ;;
10597   esac
10598
10599   case $ac_option in
10600   # Handling of the options.
10601   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10602     ac_cs_recheck=: ;;
10603   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
10604     echo "$ac_cs_version"; exit ;;
10605   --debug | --debu | --deb | --de | --d | -d )
10606     debug=: ;;
10607   --file | --fil | --fi | --f )
10608     $ac_shift
10609     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
10610     ac_need_defaults=false;;
10611   --he | --h |  --help | --hel | -h )
10612     echo "$ac_cs_usage"; exit ;;
10613   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
10614   | -silent | --silent | --silen | --sile | --sil | --si | --s)
10615     ac_cs_silent=: ;;
10616
10617   # This is an error.
10618   -*) { echo "$as_me: error: unrecognized option: $1
10619 Try \`$0 --help' for more information." >&2
10620    { (exit 1); exit 1; }; } ;;
10621
10622   *) ac_config_targets="$ac_config_targets $1"
10623      ac_need_defaults=false ;;
10624
10625   esac
10626   shift
10627 done
10628
10629 ac_configure_extra_args=
10630
10631 if $ac_cs_silent; then
10632   exec 6>/dev/null
10633   ac_configure_extra_args="$ac_configure_extra_args --silent"
10634 fi
10635
10636 _ACEOF
10637 cat >>$CONFIG_STATUS <<_ACEOF
10638 if \$ac_cs_recheck; then
10639   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
10640   CONFIG_SHELL=$SHELL
10641   export CONFIG_SHELL
10642   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
10643 fi
10644
10645 _ACEOF
10646 cat >>$CONFIG_STATUS <<\_ACEOF
10647 exec 5>>config.log
10648 {
10649   echo
10650   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
10651 ## Running $as_me. ##
10652 _ASBOX
10653   echo "$ac_log"
10654 } >&5
10655
10656 _ACEOF
10657 cat >>$CONFIG_STATUS <<_ACEOF
10658 _ACEOF
10659
10660 cat >>$CONFIG_STATUS <<\_ACEOF
10661
10662 # Handling of arguments.
10663 for ac_config_target in $ac_config_targets
10664 do
10665   case $ac_config_target in
10666     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
10667     "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;;
10668
10669   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
10670 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
10671    { (exit 1); exit 1; }; };;
10672   esac
10673 done
10674
10675
10676 # If the user did not use the arguments to specify the items to instantiate,
10677 # then the envvar interface is used.  Set only those that are not.
10678 # We use the long form for the default assignment because of an extremely
10679 # bizarre bug on SunOS 4.1.3.
10680 if $ac_need_defaults; then
10681   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
10682 fi
10683
10684 # Have a temporary directory for convenience.  Make it in the build tree
10685 # simply because there is no reason against having it here, and in addition,
10686 # creating and moving files from /tmp can sometimes cause problems.
10687 # Hook for its removal unless debugging.
10688 # Note that there is a small window in which the directory will not be cleaned:
10689 # after its creation but before its name has been assigned to `$tmp'.
10690 $debug ||
10691 {
10692   tmp=
10693   trap 'exit_status=$?
10694   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
10695 ' 0
10696   trap '{ (exit 1); exit 1; }' 1 2 13 15
10697 }
10698 # Create a (secure) tmp directory for tmp files.
10699
10700 {
10701   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
10702   test -n "$tmp" && test -d "$tmp"
10703 }  ||
10704 {
10705   tmp=./conf$$-$RANDOM
10706   (umask 077 && mkdir "$tmp")
10707 } ||
10708 {
10709    echo "$me: cannot create a temporary directory in ." >&2
10710    { (exit 1); exit 1; }
10711 }
10712
10713 #
10714 # Set up the sed scripts for CONFIG_FILES section.
10715 #
10716
10717 # No need to generate the scripts if there are no CONFIG_FILES.
10718 # This happens for instance when ./config.status config.h
10719 if test -n "$CONFIG_FILES"; then
10720
10721 _ACEOF
10722
10723
10724
10725 ac_delim='%!_!# '
10726 for ac_last_try in false false false false false :; do
10727   cat >conf$$subs.sed <<_ACEOF
10728 SHELL!$SHELL$ac_delim
10729 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
10730 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
10731 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
10732 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
10733 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
10734 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
10735 exec_prefix!$exec_prefix$ac_delim
10736 prefix!$prefix$ac_delim
10737 program_transform_name!$program_transform_name$ac_delim
10738 bindir!$bindir$ac_delim
10739 sbindir!$sbindir$ac_delim
10740 libexecdir!$libexecdir$ac_delim
10741 datarootdir!$datarootdir$ac_delim
10742 datadir!$datadir$ac_delim
10743 sysconfdir!$sysconfdir$ac_delim
10744 sharedstatedir!$sharedstatedir$ac_delim
10745 localstatedir!$localstatedir$ac_delim
10746 includedir!$includedir$ac_delim
10747 oldincludedir!$oldincludedir$ac_delim
10748 docdir!$docdir$ac_delim
10749 infodir!$infodir$ac_delim
10750 htmldir!$htmldir$ac_delim
10751 dvidir!$dvidir$ac_delim
10752 pdfdir!$pdfdir$ac_delim
10753 psdir!$psdir$ac_delim
10754 libdir!$libdir$ac_delim
10755 localedir!$localedir$ac_delim
10756 mandir!$mandir$ac_delim
10757 DEFS!$DEFS$ac_delim
10758 ECHO_C!$ECHO_C$ac_delim
10759 ECHO_N!$ECHO_N$ac_delim
10760 ECHO_T!$ECHO_T$ac_delim
10761 LIBS!$LIBS$ac_delim
10762 build_alias!$build_alias$ac_delim
10763 host_alias!$host_alias$ac_delim
10764 target_alias!$target_alias$ac_delim
10765 CYGPATH!$CYGPATH$ac_delim
10766 EXEEXT!$EXEEXT$ac_delim
10767 PKG_LIB_FILE!$PKG_LIB_FILE$ac_delim
10768 PKG_STUB_LIB_FILE!$PKG_STUB_LIB_FILE$ac_delim
10769 PKG_STUB_SOURCES!$PKG_STUB_SOURCES$ac_delim
10770 PKG_STUB_OBJECTS!$PKG_STUB_OBJECTS$ac_delim
10771 PKG_TCL_SOURCES!$PKG_TCL_SOURCES$ac_delim
10772 PKG_HEADERS!$PKG_HEADERS$ac_delim
10773 PKG_INCLUDES!$PKG_INCLUDES$ac_delim
10774 PKG_LIBS!$PKG_LIBS$ac_delim
10775 PKG_CFLAGS!$PKG_CFLAGS$ac_delim
10776 TCL_VERSION!$TCL_VERSION$ac_delim
10777 TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim
10778 TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim
10779 TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
10780 TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim
10781 TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
10782 TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim
10783 TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim
10784 TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim
10785 TCL_LIBS!$TCL_LIBS$ac_delim
10786 TCL_DEFS!$TCL_DEFS$ac_delim
10787 TCL_EXTRA_CFLAGS!$TCL_EXTRA_CFLAGS$ac_delim
10788 TCL_LD_FLAGS!$TCL_LD_FLAGS$ac_delim
10789 TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
10790 CC!$CC$ac_delim
10791 CFLAGS!$CFLAGS$ac_delim
10792 LDFLAGS!$LDFLAGS$ac_delim
10793 CPPFLAGS!$CPPFLAGS$ac_delim
10794 ac_ct_CC!$ac_ct_CC$ac_delim
10795 OBJEXT!$OBJEXT$ac_delim
10796 CPP!$CPP$ac_delim
10797 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
10798 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
10799 INSTALL_DATA!$INSTALL_DATA$ac_delim
10800 SET_MAKE!$SET_MAKE$ac_delim
10801 RANLIB!$RANLIB$ac_delim
10802 GREP!$GREP$ac_delim
10803 EGREP!$EGREP$ac_delim
10804 MATH_LIBS!$MATH_LIBS$ac_delim
10805 PKG_SOURCES!$PKG_SOURCES$ac_delim
10806 PKG_OBJECTS!$PKG_OBJECTS$ac_delim
10807 CLEANFILES!$CLEANFILES$ac_delim
10808 TCL_INCLUDES!$TCL_INCLUDES$ac_delim
10809 TCL_THREADS!$TCL_THREADS$ac_delim
10810 SHARED_BUILD!$SHARED_BUILD$ac_delim
10811 AR!$AR$ac_delim
10812 CELIB_DIR!$CELIB_DIR$ac_delim
10813 LIBOBJS!$LIBOBJS$ac_delim
10814 DL_LIBS!$DL_LIBS$ac_delim
10815 CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim
10816 CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim
10817 CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim
10818 STLIB_LD!$STLIB_LD$ac_delim
10819 SHLIB_LD!$SHLIB_LD$ac_delim
10820 SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim
10821 SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim
10822 LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim
10823 TCL_DBGX!$TCL_DBGX$ac_delim
10824 CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim
10825 _ACEOF
10826
10827   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
10828     break
10829   elif $ac_last_try; then
10830     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
10831 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
10832    { (exit 1); exit 1; }; }
10833   else
10834     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
10835   fi
10836 done
10837
10838 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
10839 if test -n "$ac_eof"; then
10840   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
10841   ac_eof=`expr $ac_eof + 1`
10842 fi
10843
10844 cat >>$CONFIG_STATUS <<_ACEOF
10845 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
10846 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
10847 _ACEOF
10848 sed '
10849 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
10850 s/^/s,@/; s/!/@,|#_!!_#|/
10851 :n
10852 t n
10853 s/'"$ac_delim"'$/,g/; t
10854 s/$/\\/; p
10855 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
10856 ' >>$CONFIG_STATUS <conf$$subs.sed
10857 rm -f conf$$subs.sed
10858 cat >>$CONFIG_STATUS <<_ACEOF
10859 CEOF$ac_eof
10860 _ACEOF
10861
10862
10863 ac_delim='%!_!# '
10864 for ac_last_try in false false false false false :; do
10865   cat >conf$$subs.sed <<_ACEOF
10866 LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim
10867 MAKE_LIB!$MAKE_LIB$ac_delim
10868 MAKE_SHARED_LIB!$MAKE_SHARED_LIB$ac_delim
10869 MAKE_STATIC_LIB!$MAKE_STATIC_LIB$ac_delim
10870 MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim
10871 RANLIB_STUB!$RANLIB_STUB$ac_delim
10872 LIBMYSQL!$LIBMYSQL$ac_delim
10873 MYSQL_INCLUDES!$MYSQL_INCLUDES$ac_delim
10874 MYSQL_LIBS!$MYSQL_LIBS$ac_delim
10875 MYSQL_LIB_DIR!$MYSQL_LIB_DIR$ac_delim
10876 TCLSH_PROG!$TCLSH_PROG$ac_delim
10877 LTLIBOBJS!$LTLIBOBJS$ac_delim
10878 _ACEOF
10879
10880   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 12; then
10881     break
10882   elif $ac_last_try; then
10883     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
10884 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
10885    { (exit 1); exit 1; }; }
10886   else
10887     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
10888   fi
10889 done
10890
10891 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
10892 if test -n "$ac_eof"; then
10893   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
10894   ac_eof=`expr $ac_eof + 1`
10895 fi
10896
10897 cat >>$CONFIG_STATUS <<_ACEOF
10898 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
10899 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
10900 _ACEOF
10901 sed '
10902 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
10903 s/^/s,@/; s/!/@,|#_!!_#|/
10904 :n
10905 t n
10906 s/'"$ac_delim"'$/,g/; t
10907 s/$/\\/; p
10908 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
10909 ' >>$CONFIG_STATUS <conf$$subs.sed
10910 rm -f conf$$subs.sed
10911 cat >>$CONFIG_STATUS <<_ACEOF
10912 :end
10913 s/|#_!!_#|//g
10914 CEOF$ac_eof
10915 _ACEOF
10916
10917
10918 # VPATH may cause trouble with some makes, so we remove $(srcdir),
10919 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
10920 # trailing colons and then remove the whole line if VPATH becomes empty
10921 # (actually we leave an empty line to preserve line numbers).
10922 if test "x$srcdir" = x.; then
10923   ac_vpsub='/^[  ]*VPATH[        ]*=/{
10924 s/:*\$(srcdir):*/:/
10925 s/:*\${srcdir}:*/:/
10926 s/:*@srcdir@:*/:/
10927 s/^\([^=]*=[     ]*\):*/\1/
10928 s/:*$//
10929 s/^[^=]*=[       ]*$//
10930 }'
10931 fi
10932
10933 cat >>$CONFIG_STATUS <<\_ACEOF
10934 fi # test -n "$CONFIG_FILES"
10935
10936
10937 for ac_tag in  :F $CONFIG_FILES
10938 do
10939   case $ac_tag in
10940   :[FHLC]) ac_mode=$ac_tag; continue;;
10941   esac
10942   case $ac_mode$ac_tag in
10943   :[FHL]*:*);;
10944   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
10945 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
10946    { (exit 1); exit 1; }; };;
10947   :[FH]-) ac_tag=-:-;;
10948   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
10949   esac
10950   ac_save_IFS=$IFS
10951   IFS=:
10952   set x $ac_tag
10953   IFS=$ac_save_IFS
10954   shift
10955   ac_file=$1
10956   shift
10957
10958   case $ac_mode in
10959   :L) ac_source=$1;;
10960   :[FH])
10961     ac_file_inputs=
10962     for ac_f
10963     do
10964       case $ac_f in
10965       -) ac_f="$tmp/stdin";;
10966       *) # Look for the file first in the build tree, then in the source tree
10967          # (if the path is not absolute).  The absolute path cannot be DOS-style,
10968          # because $ac_f cannot contain `:'.
10969          test -f "$ac_f" ||
10970            case $ac_f in
10971            [\\/$]*) false;;
10972            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
10973            esac ||
10974            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
10975 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
10976    { (exit 1); exit 1; }; };;
10977       esac
10978       ac_file_inputs="$ac_file_inputs $ac_f"
10979     done
10980
10981     # Let's still pretend it is `configure' which instantiates (i.e., don't
10982     # use $as_me), people would be surprised to read:
10983     #    /* config.h.  Generated by config.status.  */
10984     configure_input="Generated from "`IFS=:
10985           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
10986     if test x"$ac_file" != x-; then
10987       configure_input="$ac_file.  $configure_input"
10988       { echo "$as_me:$LINENO: creating $ac_file" >&5
10989 echo "$as_me: creating $ac_file" >&6;}
10990     fi
10991
10992     case $ac_tag in
10993     *:-:* | *:-) cat >"$tmp/stdin";;
10994     esac
10995     ;;
10996   esac
10997
10998   ac_dir=`$as_dirname -- "$ac_file" ||
10999 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11000          X"$ac_file" : 'X\(//\)[^/]' \| \
11001          X"$ac_file" : 'X\(//\)$' \| \
11002          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11003 echo X"$ac_file" |
11004     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11005             s//\1/
11006             q
11007           }
11008           /^X\(\/\/\)[^/].*/{
11009             s//\1/
11010             q
11011           }
11012           /^X\(\/\/\)$/{
11013             s//\1/
11014             q
11015           }
11016           /^X\(\/\).*/{
11017             s//\1/
11018             q
11019           }
11020           s/.*/./; q'`
11021   { as_dir="$ac_dir"
11022   case $as_dir in #(
11023   -*) as_dir=./$as_dir;;
11024   esac
11025   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
11026     as_dirs=
11027     while :; do
11028       case $as_dir in #(
11029       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
11030       *) as_qdir=$as_dir;;
11031       esac
11032       as_dirs="'$as_qdir' $as_dirs"
11033       as_dir=`$as_dirname -- "$as_dir" ||
11034 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11035          X"$as_dir" : 'X\(//\)[^/]' \| \
11036          X"$as_dir" : 'X\(//\)$' \| \
11037          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
11038 echo X"$as_dir" |
11039     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11040             s//\1/
11041             q
11042           }
11043           /^X\(\/\/\)[^/].*/{
11044             s//\1/
11045             q
11046           }
11047           /^X\(\/\/\)$/{
11048             s//\1/
11049             q
11050           }
11051           /^X\(\/\).*/{
11052             s//\1/
11053             q
11054           }
11055           s/.*/./; q'`
11056       test -d "$as_dir" && break
11057     done
11058     test -z "$as_dirs" || eval "mkdir $as_dirs"
11059   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
11060 echo "$as_me: error: cannot create directory $as_dir" >&2;}
11061    { (exit 1); exit 1; }; }; }
11062   ac_builddir=.
11063
11064 case "$ac_dir" in
11065 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
11066 *)
11067   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
11068   # A ".." for each directory in $ac_dir_suffix.
11069   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
11070   case $ac_top_builddir_sub in
11071   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
11072   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
11073   esac ;;
11074 esac
11075 ac_abs_top_builddir=$ac_pwd
11076 ac_abs_builddir=$ac_pwd$ac_dir_suffix
11077 # for backward compatibility:
11078 ac_top_builddir=$ac_top_build_prefix
11079
11080 case $srcdir in
11081   .)  # We are building in place.
11082     ac_srcdir=.
11083     ac_top_srcdir=$ac_top_builddir_sub
11084     ac_abs_top_srcdir=$ac_pwd ;;
11085   [\\/]* | ?:[\\/]* )  # Absolute name.
11086     ac_srcdir=$srcdir$ac_dir_suffix;
11087     ac_top_srcdir=$srcdir
11088     ac_abs_top_srcdir=$srcdir ;;
11089   *) # Relative name.
11090     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
11091     ac_top_srcdir=$ac_top_build_prefix$srcdir
11092     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
11093 esac
11094 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
11095
11096
11097   case $ac_mode in
11098   :F)
11099   #
11100   # CONFIG_FILE
11101   #
11102
11103   case $INSTALL in
11104   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11105   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
11106   esac
11107 _ACEOF
11108
11109 cat >>$CONFIG_STATUS <<\_ACEOF
11110 # If the template does not know about datarootdir, expand it.
11111 # FIXME: This hack should be removed a few years after 2.60.
11112 ac_datarootdir_hack=; ac_datarootdir_seen=
11113
11114 case `sed -n '/datarootdir/ {
11115   p
11116   q
11117 }
11118 /@datadir@/p
11119 /@docdir@/p
11120 /@infodir@/p
11121 /@localedir@/p
11122 /@mandir@/p
11123 ' $ac_file_inputs` in
11124 *datarootdir*) ac_datarootdir_seen=yes;;
11125 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
11126   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
11127 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
11128 _ACEOF
11129 cat >>$CONFIG_STATUS <<_ACEOF
11130   ac_datarootdir_hack='
11131   s&@datadir@&$datadir&g
11132   s&@docdir@&$docdir&g
11133   s&@infodir@&$infodir&g
11134   s&@localedir@&$localedir&g
11135   s&@mandir@&$mandir&g
11136     s&\\\${datarootdir}&$datarootdir&g' ;;
11137 esac
11138 _ACEOF
11139
11140 # Neutralize VPATH when `$srcdir' = `.'.
11141 # Shell code in configure.ac might set extrasub.
11142 # FIXME: do we really want to maintain this feature?
11143 cat >>$CONFIG_STATUS <<_ACEOF
11144   sed "$ac_vpsub
11145 $extrasub
11146 _ACEOF
11147 cat >>$CONFIG_STATUS <<\_ACEOF
11148 :t
11149 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11150 s&@configure_input@&$configure_input&;t t
11151 s&@top_builddir@&$ac_top_builddir_sub&;t t
11152 s&@srcdir@&$ac_srcdir&;t t
11153 s&@abs_srcdir@&$ac_abs_srcdir&;t t
11154 s&@top_srcdir@&$ac_top_srcdir&;t t
11155 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
11156 s&@builddir@&$ac_builddir&;t t
11157 s&@abs_builddir@&$ac_abs_builddir&;t t
11158 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
11159 s&@INSTALL@&$ac_INSTALL&;t t
11160 $ac_datarootdir_hack
11161 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
11162
11163 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
11164   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
11165   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
11166   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11167 which seems to be undefined.  Please make sure it is defined." >&5
11168 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11169 which seems to be undefined.  Please make sure it is defined." >&2;}
11170
11171   rm -f "$tmp/stdin"
11172   case $ac_file in
11173   -) cat "$tmp/out"; rm -f "$tmp/out";;
11174   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
11175   esac
11176  ;;
11177
11178
11179
11180   esac
11181
11182 done # for ac_tag
11183
11184
11185 { (exit 0); exit 0; }
11186 _ACEOF
11187 chmod +x $CONFIG_STATUS
11188 ac_clean_files=$ac_clean_files_save
11189
11190
11191 # configure is writing to config.log, and then calls config.status.
11192 # config.status does its own redirection, appending to config.log.
11193 # Unfortunately, on DOS this fails, as config.log is still kept open
11194 # by configure, so config.status won't be able to write to it; its
11195 # output is simply discarded.  So we exec the FD to /dev/null,
11196 # effectively closing config.log, so it can be properly (re)opened and
11197 # appended to by config.status.  When coming back to configure, we
11198 # need to make the FD available again.
11199 if test "$no_create" != yes; then
11200   ac_cs_success=:
11201   ac_config_status_args=
11202   test "$silent" = yes &&
11203     ac_config_status_args="$ac_config_status_args --quiet"
11204   exec 5>/dev/null
11205   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
11206   exec 5>>config.log
11207   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
11208   # would make configure fail if this is the last instruction.
11209   $ac_cs_success || { (exit 1); exit 1; }
11210 fi
11211