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