]> git.sven.stormbind.net Git - sven/tclcurl.git/blob - configure
releasing package tclcurl version 7.22.0+hg20160822-2
[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 # We need to modify this original line to strip a few things
4943 # See: http://lists.debian.org/debian-devel-announce/2006/09/msg00018.html
4944
4945     vars="`$curlpath/curl-config --libs|sed \
4946     -e 's/\-lkrb5\>//g' \
4947     -e 's/\-lgssapi_krb5//g' \
4948     -e 's/\-lk5crypto//g' \
4949     -e 's/\-lkrb5support//g' \
4950  `"
4951
4952     for i in $vars; do
4953         if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
4954             # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
4955             i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
4956         fi
4957         PKG_LIBS="$PKG_LIBS $i"
4958     done
4959
4960
4961
4962 #--------------------------------------------------------------------
4963 # __CHANGE__
4964 # A few miscellaneous platform-specific items:
4965 #
4966 # Define a special symbol for Windows (BUILD_sample in this case) so
4967 # that we create the export library with the dll.
4968 #
4969 # Windows creates a few extra files that need to be cleaned up.
4970 # You can add more files to clean if your extension creates any extra
4971 # files.
4972 #
4973 # TEA_ADD_* any platform specific compiler/build info here.
4974 #--------------------------------------------------------------------
4975
4976 # Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
4977 # and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
4978 #CLEANFILES="pkgIndex.tcl"
4979 if test "${TEA_PLATFORM}" = "windows" ; then
4980
4981 $as_echo "#define BUILD_sample 1" >>confdefs.h
4982
4983     CLEANFILES="$CLEANFILES *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
4984     #TEA_ADD_SOURCES([win/winFile.c])
4985     #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
4986 else
4987     # Ensure no empty else clauses
4988     :
4989     #TEA_ADD_SOURCES([unix/unixFile.c])
4990     #TEA_ADD_LIBS([-lsuperfly])
4991 fi
4992
4993
4994 #--------------------------------------------------------------------
4995 # __CHANGE__
4996 # Choose which headers you need.  Extension authors should try very
4997 # hard to only rely on the Tcl public header files.  Internal headers
4998 # contain private data structures and are subject to change without
4999 # notice.
5000 # This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
5001 #--------------------------------------------------------------------
5002
5003
5004     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl public headers" >&5
5005 $as_echo_n "checking for Tcl public headers... " >&6; }
5006
5007
5008 # Check whether --with-tclinclude was given.
5009 if test "${with_tclinclude+set}" = set; then :
5010   withval=$with_tclinclude; with_tclinclude=${withval}
5011 fi
5012
5013
5014     if test "${ac_cv_c_tclh+set}" = set; then :
5015   $as_echo_n "(cached) " >&6
5016 else
5017
5018         # Use the value from --with-tclinclude, if it was given
5019
5020         if test x"${with_tclinclude}" != x ; then
5021             if test -f "${with_tclinclude}/tcl.h" ; then
5022                 ac_cv_c_tclh=${with_tclinclude}
5023             else
5024                 as_fn_error "${with_tclinclude} directory does not contain tcl.h" "$LINENO" 5
5025             fi
5026         else
5027             list=""
5028             if test "`uname -s`" = "Darwin"; then
5029                 # If Tcl was built as a framework, attempt to use
5030                 # the framework's Headers directory
5031                 case ${TCL_DEFS} in
5032                     *TCL_FRAMEWORK*)
5033                         list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
5034                         ;;
5035                 esac
5036             fi
5037
5038             # Look in the source dir only if Tcl is not installed,
5039             # and in that situation, look there before installed locations.
5040             if test -f "${TCL_BIN_DIR}/Makefile" ; then
5041                 list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
5042             fi
5043
5044             # Check order: pkg --prefix location, Tcl's --prefix location,
5045             # relative to directory of tclConfig.sh.
5046
5047             eval "temp_includedir=${includedir}"
5048             list="$list \
5049                 `ls -d ${temp_includedir}        2>/dev/null` \
5050                 `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
5051                 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
5052             if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
5053                 list="$list /usr/local/include /usr/include"
5054                 if test x"${TCL_INCLUDE_SPEC}" != x ; then
5055                     d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
5056                     list="$list `ls -d ${d} 2>/dev/null`"
5057                 fi
5058             fi
5059             for i in $list ; do
5060                 if test -f "$i/tcl.h" ; then
5061                     ac_cv_c_tclh=$i
5062                     break
5063                 fi
5064             done
5065         fi
5066
5067 fi
5068
5069
5070     # Print a message based on how we determined the include path
5071
5072     if test x"${ac_cv_c_tclh}" = x ; then
5073         as_fn_error "tcl.h not found.  Please specify its location with --with-tclinclude" "$LINENO" 5
5074     else
5075         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5
5076 $as_echo "${ac_cv_c_tclh}" >&6; }
5077     fi
5078
5079     # Convert to a native path and substitute into the output files.
5080
5081     INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
5082
5083     TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
5084
5085
5086
5087 #TEA_PRIVATE_TCL_HEADERS
5088
5089 #TEA_PUBLIC_TK_HEADERS
5090 #TEA_PRIVATE_TK_HEADERS
5091 #TEA_PATH_X
5092
5093 #--------------------------------------------------------------------
5094 # Check whether --enable-threads or --disable-threads was given.
5095 # This auto-enables if Tcl was compiled threaded.
5096 #--------------------------------------------------------------------
5097
5098
5099     # Check whether --enable-threads was given.
5100 if test "${enable_threads+set}" = set; then :
5101   enableval=$enable_threads; tcl_ok=$enableval
5102 else
5103   tcl_ok=yes
5104 fi
5105
5106
5107     if test "${enable_threads+set}" = set; then
5108         enableval="$enable_threads"
5109         tcl_ok=$enableval
5110     else
5111         tcl_ok=yes
5112     fi
5113
5114     if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
5115         TCL_THREADS=1
5116
5117         if test "${TEA_PLATFORM}" != "windows" ; then
5118             # We are always OK on Windows, so check what this platform wants:
5119
5120             # USE_THREAD_ALLOC tells us to try the special thread-based
5121             # allocator that significantly reduces lock contention
5122
5123 $as_echo "#define USE_THREAD_ALLOC 1" >>confdefs.h
5124
5125
5126 $as_echo "#define _REENTRANT 1" >>confdefs.h
5127
5128             if test "`uname -s`" = "SunOS" ; then
5129
5130 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5131
5132             fi
5133
5134 $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
5135
5136             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5
5137 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; }
5138 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then :
5139   $as_echo_n "(cached) " >&6
5140 else
5141   ac_check_lib_save_LIBS=$LIBS
5142 LIBS="-lpthread  $LIBS"
5143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5144 /* end confdefs.h.  */
5145
5146 /* Override any GCC internal prototype to avoid an error.
5147    Use char because int might match the return type of a GCC
5148    builtin and then its argument prototype would still apply.  */
5149 #ifdef __cplusplus
5150 extern "C"
5151 #endif
5152 char pthread_mutex_init ();
5153 int
5154 main ()
5155 {
5156 return pthread_mutex_init ();
5157   ;
5158   return 0;
5159 }
5160 _ACEOF
5161 if ac_fn_c_try_link "$LINENO"; then :
5162   ac_cv_lib_pthread_pthread_mutex_init=yes
5163 else
5164   ac_cv_lib_pthread_pthread_mutex_init=no
5165 fi
5166 rm -f core conftest.err conftest.$ac_objext \
5167     conftest$ac_exeext conftest.$ac_ext
5168 LIBS=$ac_check_lib_save_LIBS
5169 fi
5170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
5171 $as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
5172 if test "x$ac_cv_lib_pthread_pthread_mutex_init" = x""yes; then :
5173   tcl_ok=yes
5174 else
5175   tcl_ok=no
5176 fi
5177
5178             if test "$tcl_ok" = "no"; then
5179                 # Check a little harder for __pthread_mutex_init in the same
5180                 # library, as some systems hide it there until pthread.h is
5181                 # defined.  We could alternatively do an AC_TRY_COMPILE with
5182                 # pthread.h, but that will work with libpthread really doesn't
5183                 # exist, like AIX 4.2.  [Bug: 4359]
5184                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5
5185 $as_echo_n "checking for __pthread_mutex_init in -lpthread... " >&6; }
5186 if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then :
5187   $as_echo_n "(cached) " >&6
5188 else
5189   ac_check_lib_save_LIBS=$LIBS
5190 LIBS="-lpthread  $LIBS"
5191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5192 /* end confdefs.h.  */
5193
5194 /* Override any GCC internal prototype to avoid an error.
5195    Use char because int might match the return type of a GCC
5196    builtin and then its argument prototype would still apply.  */
5197 #ifdef __cplusplus
5198 extern "C"
5199 #endif
5200 char __pthread_mutex_init ();
5201 int
5202 main ()
5203 {
5204 return __pthread_mutex_init ();
5205   ;
5206   return 0;
5207 }
5208 _ACEOF
5209 if ac_fn_c_try_link "$LINENO"; then :
5210   ac_cv_lib_pthread___pthread_mutex_init=yes
5211 else
5212   ac_cv_lib_pthread___pthread_mutex_init=no
5213 fi
5214 rm -f core conftest.err conftest.$ac_objext \
5215     conftest$ac_exeext conftest.$ac_ext
5216 LIBS=$ac_check_lib_save_LIBS
5217 fi
5218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
5219 $as_echo "$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
5220 if test "x$ac_cv_lib_pthread___pthread_mutex_init" = x""yes; then :
5221   tcl_ok=yes
5222 else
5223   tcl_ok=no
5224 fi
5225
5226             fi
5227
5228             if test "$tcl_ok" = "yes"; then
5229                 # The space is needed
5230                 THREADS_LIBS=" -lpthread"
5231             else
5232                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5
5233 $as_echo_n "checking for pthread_mutex_init in -lpthreads... " >&6; }
5234 if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then :
5235   $as_echo_n "(cached) " >&6
5236 else
5237   ac_check_lib_save_LIBS=$LIBS
5238 LIBS="-lpthreads  $LIBS"
5239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5240 /* end confdefs.h.  */
5241
5242 /* Override any GCC internal prototype to avoid an error.
5243    Use char because int might match the return type of a GCC
5244    builtin and then its argument prototype would still apply.  */
5245 #ifdef __cplusplus
5246 extern "C"
5247 #endif
5248 char pthread_mutex_init ();
5249 int
5250 main ()
5251 {
5252 return pthread_mutex_init ();
5253   ;
5254   return 0;
5255 }
5256 _ACEOF
5257 if ac_fn_c_try_link "$LINENO"; then :
5258   ac_cv_lib_pthreads_pthread_mutex_init=yes
5259 else
5260   ac_cv_lib_pthreads_pthread_mutex_init=no
5261 fi
5262 rm -f core conftest.err conftest.$ac_objext \
5263     conftest$ac_exeext conftest.$ac_ext
5264 LIBS=$ac_check_lib_save_LIBS
5265 fi
5266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
5267 $as_echo "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
5268 if test "x$ac_cv_lib_pthreads_pthread_mutex_init" = x""yes; then :
5269   tcl_ok=yes
5270 else
5271   tcl_ok=no
5272 fi
5273
5274                 if test "$tcl_ok" = "yes"; then
5275                     # The space is needed
5276                     THREADS_LIBS=" -lpthreads"
5277                 else
5278                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5
5279 $as_echo_n "checking for pthread_mutex_init in -lc... " >&6; }
5280 if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then :
5281   $as_echo_n "(cached) " >&6
5282 else
5283   ac_check_lib_save_LIBS=$LIBS
5284 LIBS="-lc  $LIBS"
5285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5286 /* end confdefs.h.  */
5287
5288 /* Override any GCC internal prototype to avoid an error.
5289    Use char because int might match the return type of a GCC
5290    builtin and then its argument prototype would still apply.  */
5291 #ifdef __cplusplus
5292 extern "C"
5293 #endif
5294 char pthread_mutex_init ();
5295 int
5296 main ()
5297 {
5298 return pthread_mutex_init ();
5299   ;
5300   return 0;
5301 }
5302 _ACEOF
5303 if ac_fn_c_try_link "$LINENO"; then :
5304   ac_cv_lib_c_pthread_mutex_init=yes
5305 else
5306   ac_cv_lib_c_pthread_mutex_init=no
5307 fi
5308 rm -f core conftest.err conftest.$ac_objext \
5309     conftest$ac_exeext conftest.$ac_ext
5310 LIBS=$ac_check_lib_save_LIBS
5311 fi
5312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5
5313 $as_echo "$ac_cv_lib_c_pthread_mutex_init" >&6; }
5314 if test "x$ac_cv_lib_c_pthread_mutex_init" = x""yes; then :
5315   tcl_ok=yes
5316 else
5317   tcl_ok=no
5318 fi
5319
5320                     if test "$tcl_ok" = "no"; then
5321                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5
5322 $as_echo_n "checking for pthread_mutex_init in -lc_r... " >&6; }
5323 if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then :
5324   $as_echo_n "(cached) " >&6
5325 else
5326   ac_check_lib_save_LIBS=$LIBS
5327 LIBS="-lc_r  $LIBS"
5328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5329 /* end confdefs.h.  */
5330
5331 /* Override any GCC internal prototype to avoid an error.
5332    Use char because int might match the return type of a GCC
5333    builtin and then its argument prototype would still apply.  */
5334 #ifdef __cplusplus
5335 extern "C"
5336 #endif
5337 char pthread_mutex_init ();
5338 int
5339 main ()
5340 {
5341 return pthread_mutex_init ();
5342   ;
5343   return 0;
5344 }
5345 _ACEOF
5346 if ac_fn_c_try_link "$LINENO"; then :
5347   ac_cv_lib_c_r_pthread_mutex_init=yes
5348 else
5349   ac_cv_lib_c_r_pthread_mutex_init=no
5350 fi
5351 rm -f core conftest.err conftest.$ac_objext \
5352     conftest$ac_exeext conftest.$ac_ext
5353 LIBS=$ac_check_lib_save_LIBS
5354 fi
5355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
5356 $as_echo "$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
5357 if test "x$ac_cv_lib_c_r_pthread_mutex_init" = x""yes; then :
5358   tcl_ok=yes
5359 else
5360   tcl_ok=no
5361 fi
5362
5363                         if test "$tcl_ok" = "yes"; then
5364                             # The space is needed
5365                             THREADS_LIBS=" -pthread"
5366                         else
5367                             TCL_THREADS=0
5368                             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
5369 $as_echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
5370                         fi
5371                     fi
5372                 fi
5373             fi
5374         fi
5375     else
5376         TCL_THREADS=0
5377     fi
5378     # Do checking message here to not mess up interleaved configure output
5379     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5
5380 $as_echo_n "checking for building with threads... " >&6; }
5381     if test "${TCL_THREADS}" = 1; then
5382
5383 $as_echo "#define TCL_THREADS 1" >>confdefs.h
5384
5385         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
5386 $as_echo "yes (default)" >&6; }
5387     else
5388         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5389 $as_echo "no" >&6; }
5390     fi
5391     # TCL_THREADS sanity checking.  See if our request for building with
5392     # threads is the same as the way Tcl was built.  If not, warn the user.
5393     case ${TCL_DEFS} in
5394         *THREADS=1*)
5395             if test "${TCL_THREADS}" = "0"; then
5396                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
5397     Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
5398     that IS thread-enabled.  It is recommended to use --enable-threads." >&5
5399 $as_echo "$as_me: WARNING:
5400     Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
5401     that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
5402             fi
5403             ;;
5404         *)
5405             if test "${TCL_THREADS}" = "1"; then
5406                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
5407     --enable-threads requested, but building against a Tcl that is NOT
5408     thread-enabled.  This is an OK configuration that will also run in
5409     a thread-enabled core." >&5
5410 $as_echo "$as_me: WARNING:
5411     --enable-threads requested, but building against a Tcl that is NOT
5412     thread-enabled.  This is an OK configuration that will also run in
5413     a thread-enabled core." >&2;}
5414             fi
5415             ;;
5416     esac
5417
5418
5419
5420 #--------------------------------------------------------------------
5421 # The statement below defines a collection of symbols related to
5422 # building as a shared library instead of a static library.
5423 #--------------------------------------------------------------------
5424
5425
5426     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
5427 $as_echo_n "checking how to build libraries... " >&6; }
5428     # Check whether --enable-shared was given.
5429 if test "${enable_shared+set}" = set; then :
5430   enableval=$enable_shared; tcl_ok=$enableval
5431 else
5432   tcl_ok=yes
5433 fi
5434
5435
5436     if test "${enable_shared+set}" = set; then
5437         enableval="$enable_shared"
5438         tcl_ok=$enableval
5439     else
5440         tcl_ok=yes
5441     fi
5442
5443     if test "$tcl_ok" = "yes" ; then
5444         { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
5445 $as_echo "shared" >&6; }
5446         SHARED_BUILD=1
5447     else
5448         { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
5449 $as_echo "static" >&6; }
5450         SHARED_BUILD=0
5451
5452 $as_echo "#define STATIC_BUILD 1" >>confdefs.h
5453
5454     fi
5455
5456
5457
5458 #--------------------------------------------------------------------
5459 # This macro figures out what flags to use with the compiler/linker
5460 # when building shared/static debug/optimized objects.  This information
5461 # can be taken from the tclConfig.sh file, but this figures it all out.
5462 #--------------------------------------------------------------------
5463
5464
5465
5466
5467     # Step 0.a: Enable 64 bit support?
5468
5469     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5
5470 $as_echo_n "checking if 64bit support is requested... " >&6; }
5471     # Check whether --enable-64bit was given.
5472 if test "${enable_64bit+set}" = set; then :
5473   enableval=$enable_64bit; do64bit=$enableval
5474 else
5475   do64bit=no
5476 fi
5477
5478     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5
5479 $as_echo "$do64bit" >&6; }
5480
5481     # Step 0.b: Enable Solaris 64 bit VIS support?
5482
5483     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5
5484 $as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; }
5485     # Check whether --enable-64bit-vis was given.
5486 if test "${enable_64bit_vis+set}" = set; then :
5487   enableval=$enable_64bit_vis; do64bitVIS=$enableval
5488 else
5489   do64bitVIS=no
5490 fi
5491
5492     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5
5493 $as_echo "$do64bitVIS" >&6; }
5494     # Force 64bit on with VIS
5495     if test "$do64bitVIS" = "yes"; then :
5496   do64bit=yes
5497 fi
5498
5499     # Step 0.c: Check if visibility support is available. Do this here so
5500     # that platform specific alternatives can be used below if this fails.
5501
5502     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5
5503 $as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; }
5504 if test "${tcl_cv_cc_visibility_hidden+set}" = set; then :
5505   $as_echo_n "(cached) " >&6
5506 else
5507
5508         hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
5509         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5510 /* end confdefs.h.  */
5511
5512             extern __attribute__((__visibility__("hidden"))) void f(void);
5513             void f(void) {}
5514 int
5515 main ()
5516 {
5517 f();
5518   ;
5519   return 0;
5520 }
5521 _ACEOF
5522 if ac_fn_c_try_link "$LINENO"; then :
5523   tcl_cv_cc_visibility_hidden=yes
5524 else
5525   tcl_cv_cc_visibility_hidden=no
5526 fi
5527 rm -f core conftest.err conftest.$ac_objext \
5528     conftest$ac_exeext conftest.$ac_ext
5529         CFLAGS=$hold_cflags
5530 fi
5531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5
5532 $as_echo "$tcl_cv_cc_visibility_hidden" >&6; }
5533     if test $tcl_cv_cc_visibility_hidden = yes; then :
5534
5535
5536 $as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h
5537
5538
5539 fi
5540
5541     # Step 0.d: Disable -rpath support?
5542
5543     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5
5544 $as_echo_n "checking if rpath support is requested... " >&6; }
5545     # Check whether --enable-rpath was given.
5546 if test "${enable_rpath+set}" = set; then :
5547   enableval=$enable_rpath; doRpath=$enableval
5548 else
5549   doRpath=yes
5550 fi
5551
5552     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5
5553 $as_echo "$doRpath" >&6; }
5554
5555     # TEA specific: Cross-compiling options for Windows/CE builds?
5556
5557     if test "${TEA_PLATFORM}" = windows; then :
5558
5559         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Windows/CE build is requested" >&5
5560 $as_echo_n "checking if Windows/CE build is requested... " >&6; }
5561         # Check whether --enable-wince was given.
5562 if test "${enable_wince+set}" = set; then :
5563   enableval=$enable_wince; doWince=$enableval
5564 else
5565   doWince=no
5566 fi
5567
5568         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doWince" >&5
5569 $as_echo "$doWince" >&6; }
5570
5571 fi
5572
5573     # Step 1: set the variable "system" to hold the name and version number
5574     # for the system.
5575
5576
5577     { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
5578 $as_echo_n "checking system version... " >&6; }
5579 if test "${tcl_cv_sys_version+set}" = set; then :
5580   $as_echo_n "(cached) " >&6
5581 else
5582
5583         # TEA specific:
5584         if test "${TEA_PLATFORM}" = "windows" ; then
5585             tcl_cv_sys_version=windows
5586         elif test -f /usr/lib/NextStep/software_version; then
5587             tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
5588         else
5589             tcl_cv_sys_version=`uname -s`-`uname -r`
5590             if test "$?" -ne 0 ; then
5591                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
5592 $as_echo "$as_me: WARNING: can't find uname command" >&2;}
5593                 tcl_cv_sys_version=unknown
5594             else
5595                 # Special check for weird MP-RAS system (uname returns weird
5596                 # results, and the version is kept in special file).
5597
5598                 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
5599                     tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
5600                 fi
5601                 if test "`uname -s`" = "AIX" ; then
5602                     tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
5603                 fi
5604             fi
5605         fi
5606
5607 fi
5608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
5609 $as_echo "$tcl_cv_sys_version" >&6; }
5610     system=$tcl_cv_sys_version
5611
5612
5613     # Step 2: check for existence of -ldl library.  This is needed because
5614     # Linux can use either -ldl or -ldld for dynamic loading.
5615
5616     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
5617 $as_echo_n "checking for dlopen in -ldl... " >&6; }
5618 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
5619   $as_echo_n "(cached) " >&6
5620 else
5621   ac_check_lib_save_LIBS=$LIBS
5622 LIBS="-ldl  $LIBS"
5623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5624 /* end confdefs.h.  */
5625
5626 /* Override any GCC internal prototype to avoid an error.
5627    Use char because int might match the return type of a GCC
5628    builtin and then its argument prototype would still apply.  */
5629 #ifdef __cplusplus
5630 extern "C"
5631 #endif
5632 char dlopen ();
5633 int
5634 main ()
5635 {
5636 return dlopen ();
5637   ;
5638   return 0;
5639 }
5640 _ACEOF
5641 if ac_fn_c_try_link "$LINENO"; then :
5642   ac_cv_lib_dl_dlopen=yes
5643 else
5644   ac_cv_lib_dl_dlopen=no
5645 fi
5646 rm -f core conftest.err conftest.$ac_objext \
5647     conftest$ac_exeext conftest.$ac_ext
5648 LIBS=$ac_check_lib_save_LIBS
5649 fi
5650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
5651 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
5652 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
5653   have_dl=yes
5654 else
5655   have_dl=no
5656 fi
5657
5658
5659     # Require ranlib early so we can override it in special cases below.
5660
5661
5662
5663     # Step 3: set configuration options based on system name and version.
5664     # This is similar to Tcl's unix/tcl.m4 except that we've added a
5665     # "windows" case.
5666
5667     do64bit_ok=no
5668     LDFLAGS_ORIG="$LDFLAGS"
5669     # When ld needs options to work in 64-bit mode, put them in
5670     # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
5671     # is disabled by the user. [Bug 1016796]
5672     LDFLAGS_ARCH=""
5673     TCL_EXPORT_FILE_SUFFIX=""
5674     UNSHARED_LIB_SUFFIX=""
5675     # TEA specific: use PACKAGE_VERSION instead of VERSION
5676     TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
5677     ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
5678     TCL_LIB_VERSIONS_OK=ok
5679     CFLAGS_DEBUG=-g
5680     CFLAGS_OPTIMIZE=-O
5681     if test "$GCC" = yes; then :
5682
5683         # TEA specific:
5684         CFLAGS_OPTIMIZE=-O2
5685         CFLAGS_WARNING="-Wall"
5686
5687 else
5688   CFLAGS_WARNING=""
5689 fi
5690     TCL_NEEDS_EXP_FILE=0
5691     TCL_BUILD_EXP_FILE=""
5692     TCL_EXP_FILE=""
5693     # Extract the first word of "ar", so it can be a program name with args.
5694 set dummy ar; ac_word=$2
5695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5696 $as_echo_n "checking for $ac_word... " >&6; }
5697 if test "${ac_cv_prog_AR+set}" = set; then :
5698   $as_echo_n "(cached) " >&6
5699 else
5700   if test -n "$AR"; then
5701   ac_cv_prog_AR="$AR" # Let the user override the test.
5702 else
5703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5704 for as_dir in $PATH
5705 do
5706   IFS=$as_save_IFS
5707   test -z "$as_dir" && as_dir=.
5708     for ac_exec_ext in '' $ac_executable_extensions; do
5709   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5710     ac_cv_prog_AR="ar"
5711     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5712     break 2
5713   fi
5714 done
5715   done
5716 IFS=$as_save_IFS
5717
5718 fi
5719 fi
5720 AR=$ac_cv_prog_AR
5721 if test -n "$AR"; then
5722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5723 $as_echo "$AR" >&6; }
5724 else
5725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5726 $as_echo "no" >&6; }
5727 fi
5728
5729
5730     STLIB_LD='${AR} cr'
5731     LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
5732     if test "x$SHLIB_VERSION" = x; then :
5733   SHLIB_VERSION="1.0"
5734 fi
5735     case $system in
5736         # TEA specific:
5737         windows)
5738             # This is a 2-stage check to make sure we have the 64-bit SDK
5739             # We have to know where the SDK is installed.
5740             # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
5741             # MACHINE is IX86 for LINK, but this is used by the manifest,
5742             # which requires x86|amd64|ia64.
5743             MACHINE="X86"
5744             if test "$do64bit" != "no" ; then
5745                 if test "x${MSSDK}x" = "xx" ; then
5746                     MSSDK="C:/Progra~1/Microsoft Platform SDK"
5747                 fi
5748                 MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
5749                 PATH64=""
5750                 case "$do64bit" in
5751                     amd64|x64|yes)
5752                         MACHINE="AMD64" ; # default to AMD64 64-bit build
5753                         PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
5754                         ;;
5755                     ia64)
5756                         MACHINE="IA64"
5757                         PATH64="${MSSDK}/Bin/Win64"
5758                         ;;
5759                 esac
5760                 if test ! -d "${PATH64}" ; then
5761                     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
5762 $as_echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
5763                     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ensure latest Platform SDK is installed" >&5
5764 $as_echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
5765                     do64bit="no"
5766                 else
5767                     { $as_echo "$as_me:${as_lineno-$LINENO}: result:    Using 64-bit $MACHINE mode" >&5
5768 $as_echo "   Using 64-bit $MACHINE mode" >&6; }
5769                     do64bit_ok="yes"
5770                 fi
5771             fi
5772
5773             if test "$doWince" != "no" ; then
5774                 if test "$do64bit" != "no" ; then
5775                     as_fn_error "Windows/CE and 64-bit builds incompatible" "$LINENO" 5
5776                 fi
5777                 if test "$GCC" = "yes" ; then
5778                     as_fn_error "Windows/CE and GCC builds incompatible" "$LINENO" 5
5779                 fi
5780
5781     # First, look for one uninstalled.
5782     # the alternative search directory is invoked by --with-celib
5783
5784     if test x"${no_celib}" = x ; then
5785         # we reset no_celib in case something fails here
5786         no_celib=true
5787
5788 # Check whether --with-celib was given.
5789 if test "${with_celib+set}" = set; then :
5790   withval=$with_celib; with_celibconfig=${withval}
5791 fi
5792
5793         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows/CE celib directory" >&5
5794 $as_echo_n "checking for Windows/CE celib directory... " >&6; }
5795         if test "${ac_cv_c_celibconfig+set}" = set; then :
5796   $as_echo_n "(cached) " >&6
5797 else
5798
5799             # First check to see if --with-celibconfig was specified.
5800             if test x"${with_celibconfig}" != x ; then
5801                 if test -d "${with_celibconfig}/inc" ; then
5802                     ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
5803                 else
5804                     as_fn_error "${with_celibconfig} directory doesn't contain inc directory" "$LINENO" 5
5805                 fi
5806             fi
5807
5808             # then check for a celib library
5809             if test x"${ac_cv_c_celibconfig}" = x ; then
5810                 for i in \
5811                         ../celib-palm-3.0 \
5812                         ../celib \
5813                         ../../celib-palm-3.0 \
5814                         ../../celib \
5815                         `ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
5816                         ${srcdir}/../celib-palm-3.0 \
5817                         ${srcdir}/../celib \
5818                         `ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
5819                         ; do
5820                     if test -d "$i/inc" ; then
5821                         ac_cv_c_celibconfig=`(cd $i; pwd)`
5822                         break
5823                     fi
5824                 done
5825             fi
5826
5827 fi
5828
5829         if test x"${ac_cv_c_celibconfig}" = x ; then
5830             as_fn_error "Cannot find celib support library directory" "$LINENO" 5
5831         else
5832             no_celib=
5833             CELIB_DIR=${ac_cv_c_celibconfig}
5834             CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
5835             { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $CELIB_DIR" >&5
5836 $as_echo "found $CELIB_DIR" >&6; }
5837         fi
5838     fi
5839
5840                 # Set defaults for common evc4/PPC2003 setup
5841                 # Currently Tcl requires 300+, possibly 420+ for sockets
5842                 CEVERSION=420;          # could be 211 300 301 400 420 ...
5843                 TARGETCPU=ARMV4;        # could be ARMV4 ARM MIPS SH3 X86 ...
5844                 ARCH=ARM;               # could be ARM MIPS X86EM ...
5845                 PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
5846                 if test "$doWince" != "yes"; then
5847                     # If !yes then the user specified something
5848                     # Reset ARCH to allow user to skip specifying it
5849                     ARCH=
5850                     eval `echo $doWince | awk -F, '{ \
5851             if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
5852             if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
5853             if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
5854             if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
5855             if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
5856                     }'`
5857                     if test "x${ARCH}" = "x" ; then
5858                         ARCH=$TARGETCPU;
5859                     fi
5860                 fi
5861                 OSVERSION=WCE$CEVERSION;
5862                 if test "x${WCEROOT}" = "x" ; then
5863                         WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
5864                     if test ! -d "${WCEROOT}" ; then
5865                         WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
5866                     fi
5867                 fi
5868                 if test "x${SDKROOT}" = "x" ; then
5869                     SDKROOT="C:/Program Files/Windows CE Tools"
5870                     if test ! -d "${SDKROOT}" ; then
5871                         SDKROOT="C:/Windows CE Tools"
5872                     fi
5873                 fi
5874                 WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
5875                 SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
5876                 if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
5877                     -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
5878                     as_fn_error "could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" "$LINENO" 5
5879                     doWince="no"
5880                 else
5881                     # We could PATH_NOSPACE these, but that's not important,
5882                     # as long as we quote them when used.
5883                     CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
5884                     if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
5885                         CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
5886                     fi
5887                     CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
5888                 fi
5889             fi
5890
5891             if test "$GCC" != "yes" ; then
5892                 if test "${SHARED_BUILD}" = "0" ; then
5893                     runtime=-MT
5894                 else
5895                     runtime=-MD
5896                 fi
5897
5898                 if test "$do64bit" != "no" ; then
5899                     # All this magic is necessary for the Win64 SDK RC1 - hobbs
5900                     CC="\"${PATH64}/cl.exe\""
5901                     CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
5902                     RC="\"${MSSDK}/bin/rc.exe\""
5903                     lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
5904                     LINKBIN="\"${PATH64}/link.exe\""
5905                     CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
5906                     CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
5907                     # Avoid 'unresolved external symbol __security_cookie'
5908                     # errors, c.f. http://support.microsoft.com/?id=894573
5909
5910     vars="bufferoverflowU.lib"
5911     for i in $vars; do
5912         if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5913             # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
5914             i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
5915         fi
5916         PKG_LIBS="$PKG_LIBS $i"
5917     done
5918
5919
5920                 elif test "$doWince" != "no" ; then
5921                     CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
5922                     if test "${TARGETCPU}" = "X86"; then
5923                         CC="\"${CEBINROOT}/cl.exe\""
5924                     else
5925                         CC="\"${CEBINROOT}/cl${ARCH}.exe\""
5926                     fi
5927                     CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
5928                     RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
5929                     arch=`echo ${ARCH} | awk '{print tolower($0)}'`
5930                     defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
5931                     if test "${SHARED_BUILD}" = "1" ; then
5932                         # Static CE builds require static celib as well
5933                         defs="${defs} _DLL"
5934                     fi
5935                     for i in $defs ; do
5936
5937 cat >>confdefs.h <<_ACEOF
5938 #define $i 1
5939 _ACEOF
5940
5941                     done
5942
5943 cat >>confdefs.h <<_ACEOF
5944 #define _WIN32_WCE $CEVERSION
5945 _ACEOF
5946
5947
5948 cat >>confdefs.h <<_ACEOF
5949 #define UNDER_CE $CEVERSION
5950 _ACEOF
5951
5952                     CFLAGS_DEBUG="-nologo -Zi -Od"
5953                     CFLAGS_OPTIMIZE="-nologo -Ox"
5954                     lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
5955                     lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
5956                     LINKBIN="\"${CEBINROOT}/link.exe\""
5957
5958                 else
5959                     RC="rc"
5960                     lflags="-nologo"
5961                     LINKBIN="link"
5962                     CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
5963                     CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
5964                 fi
5965             fi
5966
5967             if test "$GCC" = "yes"; then
5968                 # mingw gcc mode
5969                 RC="windres"
5970                 CFLAGS_DEBUG="-g"
5971                 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
5972                 SHLIB_LD="$CC -shared"
5973                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
5974                 LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
5975                 LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
5976             else
5977                 SHLIB_LD="${LINKBIN} -dll ${lflags}"
5978                 # link -lib only works when -lib is the first arg
5979                 STLIB_LD="${LINKBIN} -lib ${lflags}"
5980                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
5981                 PATHTYPE=-w
5982                 # For information on what debugtype is most useful, see:
5983                 # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
5984                 # and also
5985                 # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
5986                 # This essentially turns it all on.
5987                 LDFLAGS_DEBUG="-debug -debugtype:cv"
5988                 LDFLAGS_OPTIMIZE="-release"
5989                 if test "$doWince" != "no" ; then
5990                     LDFLAGS_CONSOLE="-link ${lflags}"
5991                     LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
5992                 else
5993                     LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
5994                     LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
5995                 fi
5996             fi
5997
5998             SHLIB_LD_LIBS='${LIBS}'
5999             SHLIB_SUFFIX=".dll"
6000             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
6001
6002             TCL_LIB_VERSIONS_OK=nodots
6003             # Bogus to avoid getting this turned off
6004             DL_OBJS="tclLoadNone.obj"
6005             ;;
6006         AIX-*)
6007             if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then :
6008
6009                 # AIX requires the _r compiler when gcc isn't being used
6010                 case "${CC}" in
6011                     *_r|*_r\ *)
6012                         # ok ...
6013                         ;;
6014                     *)
6015                         # Make sure only first arg gets _r
6016                         CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
6017                         ;;
6018                 esac
6019                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5
6020 $as_echo "Using $CC for compiling with threads" >&6; }
6021
6022 fi
6023             LIBS="$LIBS -lc"
6024             SHLIB_CFLAGS=""
6025             SHLIB_LD_LIBS='${LIBS}'
6026             SHLIB_SUFFIX=".so"
6027
6028             DL_OBJS="tclLoadDl.o"
6029             LD_LIBRARY_PATH_VAR="LIBPATH"
6030
6031             # Check to enable 64-bit flags for compiler/linker on AIX 4+
6032             if test "$do64bit" = yes -a "`uname -v`" -gt 3; then :
6033
6034                 if test "$GCC" = yes; then :
6035
6036                     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
6037 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
6038
6039 else
6040
6041                     do64bit_ok=yes
6042                     CFLAGS="$CFLAGS -q64"
6043                     LDFLAGS_ARCH="-q64"
6044                     RANLIB="${RANLIB} -X64"
6045                     AR="${AR} -X64"
6046                     SHLIB_LD_FLAGS="-b64"
6047
6048 fi
6049
6050 fi
6051
6052             if test "`uname -m`" = ia64; then :
6053
6054                 # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
6055                 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
6056                 # AIX-5 has dl* in libc.so
6057                 DL_LIBS=""
6058                 if test "$GCC" = yes; then :
6059
6060                     CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
6061
6062 else
6063
6064                     CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
6065
6066 fi
6067                 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
6068
6069 else
6070
6071                 if test "$GCC" = yes; then :
6072   SHLIB_LD='${CC} -shared'
6073 else
6074
6075                     SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
6076
6077 fi
6078                 SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
6079                 DL_LIBS="-ldl"
6080                 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
6081                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6082                 TCL_NEEDS_EXP_FILE=1
6083                 # TEA specific: use PACKAGE_VERSION instead of VERSION
6084                 TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp'
6085
6086 fi
6087
6088             # AIX v<=4.1 has some different flags than 4.2+
6089             if test "$system" = "AIX-4.1" -o "`uname -v`" -lt 4; then :
6090
6091                 case " $LIBOBJS " in
6092   *" tclLoadAix.$ac_objext "* ) ;;
6093   *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext"
6094  ;;
6095 esac
6096
6097                 DL_LIBS="-lld"
6098
6099 fi
6100
6101             # On AIX <=v4 systems, libbsd.a has to be linked in to support
6102             # non-blocking file IO.  This library has to be linked in after
6103             # the MATH_LIBS or it breaks the pow() function.  The way to
6104             # insure proper sequencing, is to add it to the tail of MATH_LIBS.
6105             # This library also supplies gettimeofday.
6106             #
6107             # AIX does not have a timezone field in struct tm. When the AIX
6108             # bsd library is used, the timezone global and the gettimeofday
6109             # methods are to be avoided for timezone deduction instead, we
6110             # deduce the timezone by comparing the localtime result on a
6111             # known GMT value.
6112
6113             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday in -lbsd" >&5
6114 $as_echo_n "checking for gettimeofday in -lbsd... " >&6; }
6115 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then :
6116   $as_echo_n "(cached) " >&6
6117 else
6118   ac_check_lib_save_LIBS=$LIBS
6119 LIBS="-lbsd  $LIBS"
6120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6121 /* end confdefs.h.  */
6122
6123 /* Override any GCC internal prototype to avoid an error.
6124    Use char because int might match the return type of a GCC
6125    builtin and then its argument prototype would still apply.  */
6126 #ifdef __cplusplus
6127 extern "C"
6128 #endif
6129 char gettimeofday ();
6130 int
6131 main ()
6132 {
6133 return gettimeofday ();
6134   ;
6135   return 0;
6136 }
6137 _ACEOF
6138 if ac_fn_c_try_link "$LINENO"; then :
6139   ac_cv_lib_bsd_gettimeofday=yes
6140 else
6141   ac_cv_lib_bsd_gettimeofday=no
6142 fi
6143 rm -f core conftest.err conftest.$ac_objext \
6144     conftest$ac_exeext conftest.$ac_ext
6145 LIBS=$ac_check_lib_save_LIBS
6146 fi
6147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gettimeofday" >&5
6148 $as_echo "$ac_cv_lib_bsd_gettimeofday" >&6; }
6149 if test "x$ac_cv_lib_bsd_gettimeofday" = x""yes; then :
6150   libbsd=yes
6151 else
6152   libbsd=no
6153 fi
6154
6155             if test $libbsd = yes; then :
6156
6157                 MATH_LIBS="$MATH_LIBS -lbsd"
6158
6159 $as_echo "#define USE_DELTA_FOR_TZ 1" >>confdefs.h
6160
6161
6162 fi
6163             ;;
6164         BeOS*)
6165             SHLIB_CFLAGS="-fPIC"
6166             SHLIB_LD='${CC} -nostart'
6167             SHLIB_LD_LIBS='${LIBS}'
6168             SHLIB_SUFFIX=".so"
6169             DL_OBJS="tclLoadDl.o"
6170             DL_LIBS="-ldl"
6171
6172             #-----------------------------------------------------------
6173             # Check for inet_ntoa in -lbind, for BeOS (which also needs
6174             # -lsocket, even if the network functions are in -lnet which
6175             # is always linked to, for compatibility.
6176             #-----------------------------------------------------------
6177             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5
6178 $as_echo_n "checking for inet_ntoa in -lbind... " >&6; }
6179 if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then :
6180   $as_echo_n "(cached) " >&6
6181 else
6182   ac_check_lib_save_LIBS=$LIBS
6183 LIBS="-lbind  $LIBS"
6184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6185 /* end confdefs.h.  */
6186
6187 /* Override any GCC internal prototype to avoid an error.
6188    Use char because int might match the return type of a GCC
6189    builtin and then its argument prototype would still apply.  */
6190 #ifdef __cplusplus
6191 extern "C"
6192 #endif
6193 char inet_ntoa ();
6194 int
6195 main ()
6196 {
6197 return inet_ntoa ();
6198   ;
6199   return 0;
6200 }
6201 _ACEOF
6202 if ac_fn_c_try_link "$LINENO"; then :
6203   ac_cv_lib_bind_inet_ntoa=yes
6204 else
6205   ac_cv_lib_bind_inet_ntoa=no
6206 fi
6207 rm -f core conftest.err conftest.$ac_objext \
6208     conftest$ac_exeext conftest.$ac_ext
6209 LIBS=$ac_check_lib_save_LIBS
6210 fi
6211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5
6212 $as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; }
6213 if test "x$ac_cv_lib_bind_inet_ntoa" = x""yes; then :
6214   LIBS="$LIBS -lbind -lsocket"
6215 fi
6216
6217             ;;
6218         BSD/OS-2.1*|BSD/OS-3*)
6219             SHLIB_CFLAGS=""
6220             SHLIB_LD="shlicc -r"
6221             SHLIB_LD_LIBS='${LIBS}'
6222             SHLIB_SUFFIX=".so"
6223             DL_OBJS="tclLoadDl.o"
6224             DL_LIBS="-ldl"
6225             CC_SEARCH_FLAGS=""
6226             LD_SEARCH_FLAGS=""
6227             ;;
6228         BSD/OS-4.*)
6229             SHLIB_CFLAGS="-export-dynamic -fPIC"
6230             SHLIB_LD='${CC} -shared'
6231             SHLIB_LD_LIBS='${LIBS}'
6232             SHLIB_SUFFIX=".so"
6233             DL_OBJS="tclLoadDl.o"
6234             DL_LIBS="-ldl"
6235             LDFLAGS="$LDFLAGS -export-dynamic"
6236             CC_SEARCH_FLAGS=""
6237             LD_SEARCH_FLAGS=""
6238             ;;
6239         dgux*)
6240             SHLIB_CFLAGS="-K PIC"
6241             SHLIB_LD='${CC} -G'
6242             SHLIB_LD_LIBS=""
6243             SHLIB_SUFFIX=".so"
6244             DL_OBJS="tclLoadDl.o"
6245             DL_LIBS="-ldl"
6246             CC_SEARCH_FLAGS=""
6247             LD_SEARCH_FLAGS=""
6248             ;;
6249         HP-UX-*.11.*)
6250             # Use updated header definitions where possible
6251
6252 $as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
6253
6254             # TEA specific: Needed by Tcl, but not most extensions
6255             #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
6256             #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
6257
6258             if test "`uname -m`" = ia64; then :
6259
6260                 SHLIB_SUFFIX=".so"
6261                 # Use newer C++ library for C++ extensions
6262                 #if test "$GCC" != "yes" ; then
6263                 #   CPPFLAGS="-AA"
6264                 #fi
6265
6266 else
6267
6268                 SHLIB_SUFFIX=".sl"
6269
6270 fi
6271             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
6272 $as_echo_n "checking for shl_load in -ldld... " >&6; }
6273 if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
6274   $as_echo_n "(cached) " >&6
6275 else
6276   ac_check_lib_save_LIBS=$LIBS
6277 LIBS="-ldld  $LIBS"
6278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6279 /* end confdefs.h.  */
6280
6281 /* Override any GCC internal prototype to avoid an error.
6282    Use char because int might match the return type of a GCC
6283    builtin and then its argument prototype would still apply.  */
6284 #ifdef __cplusplus
6285 extern "C"
6286 #endif
6287 char shl_load ();
6288 int
6289 main ()
6290 {
6291 return shl_load ();
6292   ;
6293   return 0;
6294 }
6295 _ACEOF
6296 if ac_fn_c_try_link "$LINENO"; then :
6297   ac_cv_lib_dld_shl_load=yes
6298 else
6299   ac_cv_lib_dld_shl_load=no
6300 fi
6301 rm -f core conftest.err conftest.$ac_objext \
6302     conftest$ac_exeext conftest.$ac_ext
6303 LIBS=$ac_check_lib_save_LIBS
6304 fi
6305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
6306 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
6307 if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
6308   tcl_ok=yes
6309 else
6310   tcl_ok=no
6311 fi
6312
6313             if test "$tcl_ok" = yes; then :
6314
6315                 SHLIB_LD_LIBS='${LIBS}'
6316                 DL_OBJS="tclLoadShl.o"
6317                 DL_LIBS="-ldld"
6318                 LDFLAGS="$LDFLAGS -E"
6319                 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
6320                 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
6321                 LD_LIBRARY_PATH_VAR="SHLIB_PATH"
6322
6323 fi
6324             if test "$GCC" = yes; then :
6325
6326                 SHLIB_LD='${CC} -shared'
6327                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6328
6329 else
6330
6331                 CFLAGS="$CFLAGS -z"
6332                 # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
6333                 #CFLAGS="$CFLAGS +DAportable"
6334                 SHLIB_CFLAGS="+z"
6335                 SHLIB_LD="ld -b"
6336
6337 fi
6338
6339             # Check to enable 64-bit flags for compiler/linker
6340             if test "$do64bit" = "yes"; then :
6341
6342                 if test "$GCC" = yes; then :
6343
6344                     case `${CC} -dumpmachine` in
6345                         hppa64*)
6346                             # 64-bit gcc in use.  Fix flags for GNU ld.
6347                             do64bit_ok=yes
6348                             SHLIB_LD='${CC} -shared'
6349                             SHLIB_LD_LIBS='${LIBS}'
6350                             if test $doRpath = yes; then :
6351
6352                                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6353 fi
6354                             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6355                             ;;
6356                         *)
6357                             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
6358 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
6359                             ;;
6360                     esac
6361
6362 else
6363
6364                     do64bit_ok=yes
6365                     CFLAGS="$CFLAGS +DD64"
6366                     LDFLAGS_ARCH="+DD64"
6367
6368 fi
6369
6370 fi ;;
6371         HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
6372             SHLIB_SUFFIX=".sl"
6373             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
6374 $as_echo_n "checking for shl_load in -ldld... " >&6; }
6375 if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
6376   $as_echo_n "(cached) " >&6
6377 else
6378   ac_check_lib_save_LIBS=$LIBS
6379 LIBS="-ldld  $LIBS"
6380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6381 /* end confdefs.h.  */
6382
6383 /* Override any GCC internal prototype to avoid an error.
6384    Use char because int might match the return type of a GCC
6385    builtin and then its argument prototype would still apply.  */
6386 #ifdef __cplusplus
6387 extern "C"
6388 #endif
6389 char shl_load ();
6390 int
6391 main ()
6392 {
6393 return shl_load ();
6394   ;
6395   return 0;
6396 }
6397 _ACEOF
6398 if ac_fn_c_try_link "$LINENO"; then :
6399   ac_cv_lib_dld_shl_load=yes
6400 else
6401   ac_cv_lib_dld_shl_load=no
6402 fi
6403 rm -f core conftest.err conftest.$ac_objext \
6404     conftest$ac_exeext conftest.$ac_ext
6405 LIBS=$ac_check_lib_save_LIBS
6406 fi
6407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
6408 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
6409 if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
6410   tcl_ok=yes
6411 else
6412   tcl_ok=no
6413 fi
6414
6415             if test "$tcl_ok" = yes; then :
6416
6417                 SHLIB_CFLAGS="+z"
6418                 SHLIB_LD="ld -b"
6419                 SHLIB_LD_LIBS=""
6420                 DL_OBJS="tclLoadShl.o"
6421                 DL_LIBS="-ldld"
6422                 LDFLAGS="$LDFLAGS -Wl,-E"
6423                 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
6424                 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
6425                 LD_LIBRARY_PATH_VAR="SHLIB_PATH"
6426
6427 fi ;;
6428         IRIX-5.*)
6429             SHLIB_CFLAGS=""
6430             SHLIB_LD="ld -shared -rdata_shared"
6431             SHLIB_LD_LIBS='${LIBS}'
6432             SHLIB_SUFFIX=".so"
6433             DL_OBJS="tclLoadDl.o"
6434             DL_LIBS=""
6435             if test $doRpath = yes; then :
6436
6437                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6438                 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
6439 fi
6440             ;;
6441         IRIX-6.*)
6442             SHLIB_CFLAGS=""
6443             SHLIB_LD="ld -n32 -shared -rdata_shared"
6444             SHLIB_LD_LIBS='${LIBS}'
6445             SHLIB_SUFFIX=".so"
6446             DL_OBJS="tclLoadDl.o"
6447             DL_LIBS=""
6448             if test $doRpath = yes; then :
6449
6450                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6451                 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
6452 fi
6453             if test "$GCC" = yes; then :
6454
6455                 CFLAGS="$CFLAGS -mabi=n32"
6456                 LDFLAGS="$LDFLAGS -mabi=n32"
6457
6458 else
6459
6460                 case $system in
6461                     IRIX-6.3)
6462                         # Use to build 6.2 compatible binaries on 6.3.
6463                         CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
6464                         ;;
6465                     *)
6466                         CFLAGS="$CFLAGS -n32"
6467                         ;;
6468                 esac
6469                 LDFLAGS="$LDFLAGS -n32"
6470
6471 fi
6472             ;;
6473         IRIX64-6.*)
6474             SHLIB_CFLAGS=""
6475             SHLIB_LD="ld -n32 -shared -rdata_shared"
6476             SHLIB_LD_LIBS='${LIBS}'
6477             SHLIB_SUFFIX=".so"
6478             DL_OBJS="tclLoadDl.o"
6479             DL_LIBS=""
6480             if test $doRpath = yes; then :
6481
6482                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6483                 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
6484 fi
6485
6486             # Check to enable 64-bit flags for compiler/linker
6487
6488             if test "$do64bit" = yes; then :
6489
6490                 if test "$GCC" = yes; then :
6491
6492                     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5
6493 $as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
6494
6495 else
6496
6497                     do64bit_ok=yes
6498                     SHLIB_LD="ld -64 -shared -rdata_shared"
6499                     CFLAGS="$CFLAGS -64"
6500                     LDFLAGS_ARCH="-64"
6501
6502 fi
6503
6504 fi
6505             ;;
6506         Linux*)
6507             SHLIB_CFLAGS="-fPIC"
6508             SHLIB_LD_LIBS='${LIBS}'
6509             SHLIB_SUFFIX=".so"
6510
6511             # TEA specific:
6512             CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
6513             # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
6514             # when you inline the string and math operations.  Turn this off to
6515             # get rid of the warnings.
6516             #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
6517
6518             # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
6519             SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
6520             DL_OBJS="tclLoadDl.o"
6521             DL_LIBS="-ldl"
6522             LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
6523             if test $doRpath = yes; then :
6524
6525                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6526 fi
6527             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6528             if test "`uname -m`" = "alpha"; then :
6529   CFLAGS="$CFLAGS -mieee"
6530 fi
6531             if test $do64bit = yes; then :
6532
6533                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5
6534 $as_echo_n "checking if compiler accepts -m64 flag... " >&6; }
6535 if test "${tcl_cv_cc_m64+set}" = set; then :
6536   $as_echo_n "(cached) " >&6
6537 else
6538
6539                     hold_cflags=$CFLAGS
6540                     CFLAGS="$CFLAGS -m64"
6541                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6542 /* end confdefs.h.  */
6543
6544 int
6545 main ()
6546 {
6547
6548   ;
6549   return 0;
6550 }
6551 _ACEOF
6552 if ac_fn_c_try_link "$LINENO"; then :
6553   tcl_cv_cc_m64=yes
6554 else
6555   tcl_cv_cc_m64=no
6556 fi
6557 rm -f core conftest.err conftest.$ac_objext \
6558     conftest$ac_exeext conftest.$ac_ext
6559                     CFLAGS=$hold_cflags
6560 fi
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5
6562 $as_echo "$tcl_cv_cc_m64" >&6; }
6563                 if test $tcl_cv_cc_m64 = yes; then :
6564
6565                     CFLAGS="$CFLAGS -m64"
6566                     do64bit_ok=yes
6567
6568 fi
6569
6570 fi
6571
6572             # The combo of gcc + glibc has a bug related to inlining of
6573             # functions like strtod(). The -fno-builtin flag should address
6574             # this problem but it does not work. The -fno-inline flag is kind
6575             # of overkill but it works. Disable inlining only when one of the
6576             # files in compat/*.c is being linked in.
6577
6578             if test x"${USE_COMPAT}" != x; then :
6579   CFLAGS="$CFLAGS -fno-inline"
6580 fi
6581
6582             ;;
6583         GNU*)
6584             SHLIB_CFLAGS="-fPIC"
6585             SHLIB_LD_LIBS='${LIBS}'
6586             SHLIB_SUFFIX=".so"
6587
6588             SHLIB_LD='${CC} -shared'
6589             DL_OBJS=""
6590             DL_LIBS="-ldl"
6591             LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
6592             CC_SEARCH_FLAGS=""
6593             LD_SEARCH_FLAGS=""
6594             if test "`uname -m`" = "alpha"; then :
6595   CFLAGS="$CFLAGS -mieee"
6596 fi
6597             ;;
6598         Lynx*)
6599             SHLIB_CFLAGS="-fPIC"
6600             SHLIB_LD_LIBS='${LIBS}'
6601             SHLIB_SUFFIX=".so"
6602             CFLAGS_OPTIMIZE=-02
6603             SHLIB_LD='${CC} -shared'
6604             DL_OBJS="tclLoadDl.o"
6605             DL_LIBS="-mshared -ldl"
6606             LD_FLAGS="-Wl,--export-dynamic"
6607             if test $doRpath = yes; then :
6608
6609                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6610                 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6611 fi
6612             ;;
6613         MP-RAS-02*)
6614             SHLIB_CFLAGS="-K PIC"
6615             SHLIB_LD='${CC} -G'
6616             SHLIB_LD_LIBS=""
6617             SHLIB_SUFFIX=".so"
6618             DL_OBJS="tclLoadDl.o"
6619             DL_LIBS="-ldl"
6620             CC_SEARCH_FLAGS=""
6621             LD_SEARCH_FLAGS=""
6622             ;;
6623         MP-RAS-*)
6624             SHLIB_CFLAGS="-K PIC"
6625             SHLIB_LD='${CC} -G'
6626             SHLIB_LD_LIBS=""
6627             SHLIB_SUFFIX=".so"
6628             DL_OBJS="tclLoadDl.o"
6629             DL_LIBS="-ldl"
6630             LDFLAGS="$LDFLAGS -Wl,-Bexport"
6631             CC_SEARCH_FLAGS=""
6632             LD_SEARCH_FLAGS=""
6633             ;;
6634         NetBSD-1.*|FreeBSD-[1-2].*)
6635             SHLIB_CFLAGS="-fPIC"
6636             SHLIB_LD="ld -Bshareable -x"
6637             SHLIB_LD_LIBS='${LIBS}'
6638             SHLIB_SUFFIX=".so"
6639             DL_OBJS="tclLoadDl.o"
6640             DL_LIBS=""
6641             if test $doRpath = yes; then :
6642
6643                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6644                 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
6645 fi
6646             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
6647 $as_echo_n "checking for ELF... " >&6; }
6648 if test "${tcl_cv_ld_elf+set}" = set; then :
6649   $as_echo_n "(cached) " >&6
6650 else
6651
6652                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6653 /* end confdefs.h.  */
6654
6655 #ifdef __ELF__
6656         yes
6657 #endif
6658
6659 _ACEOF
6660 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6661   $EGREP "yes" >/dev/null 2>&1; then :
6662   tcl_cv_ld_elf=yes
6663 else
6664   tcl_cv_ld_elf=no
6665 fi
6666 rm -f conftest*
6667
6668 fi
6669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_elf" >&5
6670 $as_echo "$tcl_cv_ld_elf" >&6; }
6671             if test $tcl_cv_ld_elf = yes; then :
6672
6673                 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
6674
6675 else
6676
6677                 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
6678
6679 fi
6680
6681             # Ancient FreeBSD doesn't handle version numbers with dots.
6682
6683             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
6684             TCL_LIB_VERSIONS_OK=nodots
6685             ;;
6686         OpenBSD-*)
6687             SHLIB_CFLAGS="-fPIC"
6688             SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
6689             SHLIB_LD_LIBS='${LIBS}'
6690             SHLIB_SUFFIX=".so"
6691             DL_OBJS="tclLoadDl.o"
6692             DL_LIBS=""
6693             if test $doRpath = yes; then :
6694
6695                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6696 fi
6697             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6698             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
6699             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
6700 $as_echo_n "checking for ELF... " >&6; }
6701 if test "${tcl_cv_ld_elf+set}" = set; then :
6702   $as_echo_n "(cached) " >&6
6703 else
6704
6705                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6706 /* end confdefs.h.  */
6707
6708 #ifdef __ELF__
6709         yes
6710 #endif
6711
6712 _ACEOF
6713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6714   $EGREP "yes" >/dev/null 2>&1; then :
6715   tcl_cv_ld_elf=yes
6716 else
6717   tcl_cv_ld_elf=no
6718 fi
6719 rm -f conftest*
6720
6721 fi
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_elf" >&5
6723 $as_echo "$tcl_cv_ld_elf" >&6; }
6724             if test $tcl_cv_ld_elf = yes; then :
6725
6726                 LDFLAGS=-Wl,-export-dynamic
6727
6728 else
6729   LDFLAGS=""
6730 fi
6731
6732             # OpenBSD doesn't do version numbers with dots.
6733             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
6734             TCL_LIB_VERSIONS_OK=nodots
6735             ;;
6736         NetBSD-*|FreeBSD-*)
6737             # FreeBSD 3.* and greater have ELF.
6738             # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
6739             SHLIB_CFLAGS="-fPIC"
6740             SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
6741             SHLIB_LD_LIBS='${LIBS}'
6742             SHLIB_SUFFIX=".so"
6743             DL_OBJS="tclLoadDl.o"
6744             DL_LIBS=""
6745             LDFLAGS="$LDFLAGS -export-dynamic"
6746             if test $doRpath = yes; then :
6747
6748                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
6749 fi
6750             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6751             if test "${TCL_THREADS}" = "1"; then :
6752
6753                 # The -pthread needs to go in the CFLAGS, not LIBS
6754                 LIBS=`echo $LIBS | sed s/-pthread//`
6755                 CFLAGS="$CFLAGS -pthread"
6756                 LDFLAGS="$LDFLAGS -pthread"
6757
6758 fi
6759             case $system in
6760             FreeBSD-3.*)
6761                 # FreeBSD-3 doesn't handle version numbers with dots.
6762                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
6763                 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
6764                 TCL_LIB_VERSIONS_OK=nodots
6765                 ;;
6766             esac
6767             ;;
6768         Darwin-*)
6769             CFLAGS_OPTIMIZE="-Os"
6770             SHLIB_CFLAGS="-fno-common"
6771             # To avoid discrepancies between what headers configure sees during
6772             # preprocessing tests and compiling tests, move any -isysroot and
6773             # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
6774             CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
6775                 awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
6776                 if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
6777             CFLAGS="`echo " ${CFLAGS}" | \
6778                 awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
6779                 if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
6780             if test $do64bit = yes; then :
6781
6782                 case `arch` in
6783                     ppc)
6784                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5
6785 $as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; }
6786 if test "${tcl_cv_cc_arch_ppc64+set}" = set; then :
6787   $as_echo_n "(cached) " >&6
6788 else
6789
6790                             hold_cflags=$CFLAGS
6791                             CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
6792                             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6793 /* end confdefs.h.  */
6794
6795 int
6796 main ()
6797 {
6798
6799   ;
6800   return 0;
6801 }
6802 _ACEOF
6803 if ac_fn_c_try_link "$LINENO"; then :
6804   tcl_cv_cc_arch_ppc64=yes
6805 else
6806   tcl_cv_cc_arch_ppc64=no
6807 fi
6808 rm -f core conftest.err conftest.$ac_objext \
6809     conftest$ac_exeext conftest.$ac_ext
6810                             CFLAGS=$hold_cflags
6811 fi
6812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5
6813 $as_echo "$tcl_cv_cc_arch_ppc64" >&6; }
6814                         if test $tcl_cv_cc_arch_ppc64 = yes; then :
6815
6816                             CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
6817                             do64bit_ok=yes
6818
6819 fi;;
6820                     i386)
6821                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5
6822 $as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; }
6823 if test "${tcl_cv_cc_arch_x86_64+set}" = set; then :
6824   $as_echo_n "(cached) " >&6
6825 else
6826
6827                             hold_cflags=$CFLAGS
6828                             CFLAGS="$CFLAGS -arch x86_64"
6829                             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6830 /* end confdefs.h.  */
6831
6832 int
6833 main ()
6834 {
6835
6836   ;
6837   return 0;
6838 }
6839 _ACEOF
6840 if ac_fn_c_try_link "$LINENO"; then :
6841   tcl_cv_cc_arch_x86_64=yes
6842 else
6843   tcl_cv_cc_arch_x86_64=no
6844 fi
6845 rm -f core conftest.err conftest.$ac_objext \
6846     conftest$ac_exeext conftest.$ac_ext
6847                             CFLAGS=$hold_cflags
6848 fi
6849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5
6850 $as_echo "$tcl_cv_cc_arch_x86_64" >&6; }
6851                         if test $tcl_cv_cc_arch_x86_64 = yes; then :
6852
6853                             CFLAGS="$CFLAGS -arch x86_64"
6854                             do64bit_ok=yes
6855
6856 fi;;
6857                     *)
6858                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
6859 $as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
6860                 esac
6861
6862 else
6863
6864                 # Check for combined 32-bit and 64-bit fat build
6865                 if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
6866                     && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then :
6867
6868                     fat_32_64=yes
6869 fi
6870
6871 fi
6872             # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
6873             SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
6874             { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
6875 $as_echo_n "checking if ld accepts -single_module flag... " >&6; }
6876 if test "${tcl_cv_ld_single_module+set}" = set; then :
6877   $as_echo_n "(cached) " >&6
6878 else
6879
6880                 hold_ldflags=$LDFLAGS
6881                 LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
6882                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6883 /* end confdefs.h.  */
6884
6885 int
6886 main ()
6887 {
6888 int i;
6889   ;
6890   return 0;
6891 }
6892 _ACEOF
6893 if ac_fn_c_try_link "$LINENO"; then :
6894   tcl_cv_ld_single_module=yes
6895 else
6896   tcl_cv_ld_single_module=no
6897 fi
6898 rm -f core conftest.err conftest.$ac_objext \
6899     conftest$ac_exeext conftest.$ac_ext
6900                 LDFLAGS=$hold_ldflags
6901 fi
6902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5
6903 $as_echo "$tcl_cv_ld_single_module" >&6; }
6904             if test $tcl_cv_ld_single_module = yes; then :
6905
6906                 SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
6907
6908 fi
6909             # TEA specific: link shlib with current and compatiblity version flags
6910             vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
6911             SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
6912             SHLIB_LD_LIBS='${LIBS}'
6913             SHLIB_SUFFIX=".dylib"
6914             DL_OBJS="tclLoadDyld.o"
6915             DL_LIBS=""
6916             # Don't use -prebind when building for Mac OS X 10.4 or later only:
6917             if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
6918                 "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then :
6919
6920                 LDFLAGS="$LDFLAGS -prebind"
6921 fi
6922             LDFLAGS="$LDFLAGS -headerpad_max_install_names"
6923             { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5
6924 $as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; }
6925 if test "${tcl_cv_ld_search_paths_first+set}" = set; then :
6926   $as_echo_n "(cached) " >&6
6927 else
6928
6929                 hold_ldflags=$LDFLAGS
6930                 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6931                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6932 /* end confdefs.h.  */
6933
6934 int
6935 main ()
6936 {
6937 int i;
6938   ;
6939   return 0;
6940 }
6941 _ACEOF
6942 if ac_fn_c_try_link "$LINENO"; then :
6943   tcl_cv_ld_search_paths_first=yes
6944 else
6945   tcl_cv_ld_search_paths_first=no
6946 fi
6947 rm -f core conftest.err conftest.$ac_objext \
6948     conftest$ac_exeext conftest.$ac_ext
6949                 LDFLAGS=$hold_ldflags
6950 fi
6951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5
6952 $as_echo "$tcl_cv_ld_search_paths_first" >&6; }
6953             if test $tcl_cv_ld_search_paths_first = yes; then :
6954
6955                 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6956
6957 fi
6958             if test "$tcl_cv_cc_visibility_hidden" != yes; then :
6959
6960
6961 $as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h
6962
6963
6964 fi
6965             CC_SEARCH_FLAGS=""
6966             LD_SEARCH_FLAGS=""
6967             LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
6968             # TEA specific: for combined 32 & 64 bit fat builds of Tk
6969             # extensions, verify that 64-bit build is possible.
6970             if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then :
6971
6972                 if test "${TEA_WINDOWINGSYSTEM}" = x11; then :
6973
6974                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5
6975 $as_echo_n "checking for 64-bit X11... " >&6; }
6976 if test "${tcl_cv_lib_x11_64+set}" = set; then :
6977   $as_echo_n "(cached) " >&6
6978 else
6979
6980                         for v in CFLAGS CPPFLAGS LDFLAGS; do
6981                             eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
6982                         done
6983                         CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
6984                         LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
6985                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6986 /* end confdefs.h.  */
6987 #include <X11/Xlib.h>
6988 int
6989 main ()
6990 {
6991 XrmInitialize();
6992   ;
6993   return 0;
6994 }
6995 _ACEOF
6996 if ac_fn_c_try_link "$LINENO"; then :
6997   tcl_cv_lib_x11_64=yes
6998 else
6999   tcl_cv_lib_x11_64=no
7000 fi
7001 rm -f core conftest.err conftest.$ac_objext \
7002     conftest$ac_exeext conftest.$ac_ext
7003                         for v in CFLAGS CPPFLAGS LDFLAGS; do
7004                             eval $v'="$hold_'$v'"'
7005                         done
7006 fi
7007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5
7008 $as_echo "$tcl_cv_lib_x11_64" >&6; }
7009
7010 fi
7011                 if test "${TEA_WINDOWINGSYSTEM}" = aqua; then :
7012
7013                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit Tk" >&5
7014 $as_echo_n "checking for 64-bit Tk... " >&6; }
7015 if test "${tcl_cv_lib_tk_64+set}" = set; then :
7016   $as_echo_n "(cached) " >&6
7017 else
7018
7019                         for v in CFLAGS CPPFLAGS LDFLAGS; do
7020                             eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
7021                         done
7022                         CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
7023                         LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
7024                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7025 /* end confdefs.h.  */
7026 #include <tk.h>
7027 int
7028 main ()
7029 {
7030 Tk_InitStubs(NULL, "", 0);
7031   ;
7032   return 0;
7033 }
7034 _ACEOF
7035 if ac_fn_c_try_link "$LINENO"; then :
7036   tcl_cv_lib_tk_64=yes
7037 else
7038   tcl_cv_lib_tk_64=no
7039 fi
7040 rm -f core conftest.err conftest.$ac_objext \
7041     conftest$ac_exeext conftest.$ac_ext
7042                         for v in CFLAGS CPPFLAGS LDFLAGS; do
7043                             eval $v'="$hold_'$v'"'
7044                         done
7045 fi
7046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_tk_64" >&5
7047 $as_echo "$tcl_cv_lib_tk_64" >&6; }
7048
7049 fi
7050                 # remove 64-bit arch flags from CFLAGS et al. if configuration
7051                 # does not support 64-bit.
7052                 if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then :
7053
7054                     { $as_echo "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5
7055 $as_echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
7056                     for v in CFLAGS CPPFLAGS LDFLAGS; do
7057                         eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
7058                     done
7059 fi
7060
7061 fi
7062             ;;
7063         NEXTSTEP-*)
7064             SHLIB_CFLAGS=""
7065             SHLIB_LD='${CC} -nostdlib -r'
7066             SHLIB_LD_LIBS=""
7067             SHLIB_SUFFIX=".so"
7068             DL_OBJS="tclLoadNext.o"
7069             DL_LIBS=""
7070             CC_SEARCH_FLAGS=""
7071             LD_SEARCH_FLAGS=""
7072             ;;
7073         OS/390-*)
7074             CFLAGS_OPTIMIZE=""          # Optimizer is buggy
7075
7076 $as_echo "#define _OE_SOCKETS 1" >>confdefs.h
7077
7078             ;;
7079         OSF1-1.0|OSF1-1.1|OSF1-1.2)
7080             # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
7081             SHLIB_CFLAGS=""
7082             # Hack: make package name same as library name
7083             SHLIB_LD='ld -R -export :'
7084             SHLIB_LD_LIBS=""
7085             SHLIB_SUFFIX=".so"
7086             DL_OBJS="tclLoadOSF.o"
7087             DL_LIBS=""
7088             CC_SEARCH_FLAGS=""
7089             LD_SEARCH_FLAGS=""
7090             ;;
7091         OSF1-1.*)
7092             # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
7093             SHLIB_CFLAGS="-fPIC"
7094             if test "$SHARED_BUILD" = 1; then :
7095   SHLIB_LD="ld -shared"
7096 else
7097
7098                 SHLIB_LD="ld -non_shared"
7099
7100 fi
7101             SHLIB_LD_LIBS=""
7102             SHLIB_SUFFIX=".so"
7103             DL_OBJS="tclLoadDl.o"
7104             DL_LIBS=""
7105             CC_SEARCH_FLAGS=""
7106             LD_SEARCH_FLAGS=""
7107             ;;
7108         OSF1-V*)
7109             # Digital OSF/1
7110             SHLIB_CFLAGS=""
7111             if test "$SHARED_BUILD" = 1; then :
7112
7113                 SHLIB_LD='ld -shared -expect_unresolved "*"'
7114
7115 else
7116
7117                 SHLIB_LD='ld -non_shared -expect_unresolved "*"'
7118
7119 fi
7120             SHLIB_LD_LIBS=""
7121             SHLIB_SUFFIX=".so"
7122             DL_OBJS="tclLoadDl.o"
7123             DL_LIBS=""
7124             if test $doRpath = yes; then :
7125
7126                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7127                 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7128 fi
7129             if test "$GCC" = yes; then :
7130   CFLAGS="$CFLAGS -mieee"
7131 else
7132
7133                 CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
7134 fi
7135             # see pthread_intro(3) for pthread support on osf1, k.furukawa
7136             if test "${TCL_THREADS}" = 1; then :
7137
7138                 CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
7139                 CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
7140                 LIBS=`echo $LIBS | sed s/-lpthreads//`
7141                 if test "$GCC" = yes; then :
7142
7143                     LIBS="$LIBS -lpthread -lmach -lexc"
7144
7145 else
7146
7147                     CFLAGS="$CFLAGS -pthread"
7148                     LDFLAGS="$LDFLAGS -pthread"
7149
7150 fi
7151
7152 fi
7153             ;;
7154         QNX-6*)
7155             # QNX RTP
7156             # This may work for all QNX, but it was only reported for v6.
7157             SHLIB_CFLAGS="-fPIC"
7158             SHLIB_LD="ld -Bshareable -x"
7159             SHLIB_LD_LIBS=""
7160             SHLIB_SUFFIX=".so"
7161             DL_OBJS="tclLoadDl.o"
7162             # dlopen is in -lc on QNX
7163             DL_LIBS=""
7164             CC_SEARCH_FLAGS=""
7165             LD_SEARCH_FLAGS=""
7166             ;;
7167         SCO_SV-3.2*)
7168             # Note, dlopen is available only on SCO 3.2.5 and greater. However,
7169             # this test works, since "uname -s" was non-standard in 3.2.4 and
7170             # below.
7171             if test "$GCC" = yes; then :
7172
7173                 SHLIB_CFLAGS="-fPIC -melf"
7174                 LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
7175
7176 else
7177
7178                 SHLIB_CFLAGS="-Kpic -belf"
7179                 LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
7180
7181 fi
7182             SHLIB_LD="ld -G"
7183             SHLIB_LD_LIBS=""
7184             SHLIB_SUFFIX=".so"
7185             DL_OBJS="tclLoadDl.o"
7186             DL_LIBS=""
7187             CC_SEARCH_FLAGS=""
7188             LD_SEARCH_FLAGS=""
7189             ;;
7190         SINIX*5.4*)
7191             SHLIB_CFLAGS="-K PIC"
7192             SHLIB_LD='${CC} -G'
7193             SHLIB_LD_LIBS=""
7194             SHLIB_SUFFIX=".so"
7195             DL_OBJS="tclLoadDl.o"
7196             DL_LIBS="-ldl"
7197             CC_SEARCH_FLAGS=""
7198             LD_SEARCH_FLAGS=""
7199             ;;
7200         SunOS-4*)
7201             SHLIB_CFLAGS="-PIC"
7202             SHLIB_LD="ld"
7203             SHLIB_LD_LIBS=""
7204             SHLIB_SUFFIX=".so"
7205             DL_OBJS="tclLoadDl.o"
7206             DL_LIBS="-ldl"
7207             CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
7208             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7209
7210             # SunOS can't handle version numbers with dots in them in library
7211             # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
7212             # requires an extra version number at the end of .so file names.
7213             # So, the library has to have a name like libtcl75.so.1.0
7214
7215             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
7216             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7217             TCL_LIB_VERSIONS_OK=nodots
7218             ;;
7219         SunOS-5.[0-6])
7220             # Careful to not let 5.10+ fall into this case
7221
7222             # Note: If _REENTRANT isn't defined, then Solaris
7223             # won't define thread-safe library routines.
7224
7225
7226 $as_echo "#define _REENTRANT 1" >>confdefs.h
7227
7228
7229 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
7230
7231
7232             SHLIB_CFLAGS="-KPIC"
7233
7234             # Note: need the LIBS below, otherwise Tk won't find Tcl's
7235             # symbols when dynamically loaded into tclsh.
7236
7237             SHLIB_LD_LIBS='${LIBS}'
7238             SHLIB_SUFFIX=".so"
7239             DL_OBJS="tclLoadDl.o"
7240             DL_LIBS="-ldl"
7241             if test "$GCC" = yes; then :
7242
7243                 SHLIB_LD='${CC} -shared'
7244                 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7245                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7246
7247 else
7248
7249                 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
7250                 CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
7251                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7252
7253 fi
7254             ;;
7255         SunOS-5*)
7256             # Note: If _REENTRANT isn't defined, then Solaris
7257             # won't define thread-safe library routines.
7258
7259
7260 $as_echo "#define _REENTRANT 1" >>confdefs.h
7261
7262
7263 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
7264
7265
7266             SHLIB_CFLAGS="-KPIC"
7267
7268             # Check to enable 64-bit flags for compiler/linker
7269             if test "$do64bit" = yes; then :
7270
7271                 arch=`isainfo`
7272                 if test "$arch" = "sparcv9 sparc"; then :
7273
7274                     if test "$GCC" = yes; then :
7275
7276                         if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then :
7277
7278                             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
7279 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
7280
7281 else
7282
7283                             do64bit_ok=yes
7284                             CFLAGS="$CFLAGS -m64 -mcpu=v9"
7285                             LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
7286                             SHLIB_CFLAGS="-fPIC"
7287
7288 fi
7289
7290 else
7291
7292                         do64bit_ok=yes
7293                         if test "$do64bitVIS" = yes; then :
7294
7295                             CFLAGS="$CFLAGS -xarch=v9a"
7296                             LDFLAGS_ARCH="-xarch=v9a"
7297
7298 else
7299
7300                             CFLAGS="$CFLAGS -xarch=v9"
7301                             LDFLAGS_ARCH="-xarch=v9"
7302
7303 fi
7304                         # Solaris 64 uses this as well
7305                         #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
7306
7307 fi
7308
7309 else
7310   if test "$arch" = "amd64 i386"; then :
7311
7312                     if test "$GCC" = yes; then :
7313
7314                         case $system in
7315                             SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
7316                                 do64bit_ok=yes
7317                                 CFLAGS="$CFLAGS -m64"
7318                                 LDFLAGS="$LDFLAGS -m64";;
7319                             *)
7320                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
7321 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
7322                         esac
7323
7324 else
7325
7326                         do64bit_ok=yes
7327                         case $system in
7328                             SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
7329                                 CFLAGS="$CFLAGS -m64"
7330                                 LDFLAGS="$LDFLAGS -m64";;
7331                             *)
7332                                 CFLAGS="$CFLAGS -xarch=amd64"
7333                                 LDFLAGS="$LDFLAGS -xarch=amd64";;
7334                         esac
7335
7336 fi
7337
7338 else
7339   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5
7340 $as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
7341 fi
7342 fi
7343
7344 fi
7345
7346             # Note: need the LIBS below, otherwise Tk won't find Tcl's
7347             # symbols when dynamically loaded into tclsh.
7348
7349             SHLIB_LD_LIBS='${LIBS}'
7350             SHLIB_SUFFIX=".so"
7351             DL_OBJS="tclLoadDl.o"
7352             DL_LIBS="-ldl"
7353             if test "$GCC" = yes; then :
7354
7355                 SHLIB_LD='${CC} -shared'
7356                 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7357                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7358                 if test "$do64bit_ok" = yes; then :
7359
7360                     if test "$arch" = "sparcv9 sparc"; then :
7361
7362                         # We need to specify -static-libgcc or we need to
7363                         # add the path to the sparv9 libgcc.
7364                         # JH: static-libgcc is necessary for core Tcl, but may
7365                         # not be necessary for extensions.
7366                         SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
7367                         # for finding sparcv9 libgcc, get the regular libgcc
7368                         # path, remove so name and append 'sparcv9'
7369                         #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
7370                         #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
7371
7372 else
7373   if test "$arch" = "amd64 i386"; then :
7374
7375                         # JH: static-libgcc is necessary for core Tcl, but may
7376                         # not be necessary for extensions.
7377                         SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
7378
7379 fi
7380 fi
7381
7382 fi
7383
7384 else
7385
7386                 case $system in
7387                     SunOS-5.[1-9][0-9]*)
7388                         # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7389                         SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
7390                     *)
7391                         SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
7392                 esac
7393                 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7394                 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
7395
7396 fi
7397             ;;
7398         UNIX_SV* | UnixWare-5*)
7399             SHLIB_CFLAGS="-KPIC"
7400             SHLIB_LD='${CC} -G'
7401             SHLIB_LD_LIBS=""
7402             SHLIB_SUFFIX=".so"
7403             DL_OBJS="tclLoadDl.o"
7404             DL_LIBS="-ldl"
7405             # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
7406             # that don't grok the -Bexport option.  Test that it does.
7407             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5
7408 $as_echo_n "checking for ld accepts -Bexport flag... " >&6; }
7409 if test "${tcl_cv_ld_Bexport+set}" = set; then :
7410   $as_echo_n "(cached) " >&6
7411 else
7412
7413                 hold_ldflags=$LDFLAGS
7414                 LDFLAGS="$LDFLAGS -Wl,-Bexport"
7415                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7416 /* end confdefs.h.  */
7417
7418 int
7419 main ()
7420 {
7421 int i;
7422   ;
7423   return 0;
7424 }
7425 _ACEOF
7426 if ac_fn_c_try_link "$LINENO"; then :
7427   tcl_cv_ld_Bexport=yes
7428 else
7429   tcl_cv_ld_Bexport=no
7430 fi
7431 rm -f core conftest.err conftest.$ac_objext \
7432     conftest$ac_exeext conftest.$ac_ext
7433                 LDFLAGS=$hold_ldflags
7434 fi
7435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5
7436 $as_echo "$tcl_cv_ld_Bexport" >&6; }
7437             if test $tcl_cv_ld_Bexport = yes; then :
7438
7439                 LDFLAGS="$LDFLAGS -Wl,-Bexport"
7440
7441 fi
7442             CC_SEARCH_FLAGS=""
7443             LD_SEARCH_FLAGS=""
7444             ;;
7445     esac
7446
7447     if test "$do64bit" = yes -a "$do64bit_ok" = no; then :
7448
7449         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
7450 $as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
7451
7452 fi
7453
7454
7455
7456     # Step 4: disable dynamic loading if requested via a command-line switch.
7457
7458     # Check whether --enable-load was given.
7459 if test "${enable_load+set}" = set; then :
7460   enableval=$enable_load; tcl_ok=$enableval
7461 else
7462   tcl_ok=yes
7463 fi
7464
7465     if test "$tcl_ok" = no; then :
7466   DL_OBJS=""
7467 fi
7468
7469     if test "x$DL_OBJS" != x; then :
7470   BUILD_DLTEST="\$(DLTEST_TARGETS)"
7471 else
7472
7473         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&5
7474 $as_echo "$as_me: WARNING: Can't figure out how to do dynamic loading or shared libraries on this system." >&2;}
7475         SHLIB_CFLAGS=""
7476         SHLIB_LD=""
7477         SHLIB_SUFFIX=""
7478         DL_OBJS="tclLoadNone.o"
7479         DL_LIBS=""
7480         LDFLAGS="$LDFLAGS_ORIG"
7481         CC_SEARCH_FLAGS=""
7482         LD_SEARCH_FLAGS=""
7483         BUILD_DLTEST=""
7484
7485 fi
7486     LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
7487
7488     # If we're running gcc, then change the C flags for compiling shared
7489     # libraries to the right flags for gcc, instead of those for the
7490     # standard manufacturer compiler.
7491
7492     if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then :
7493
7494         case $system in
7495             AIX-*) ;;
7496             BSD/OS*) ;;
7497             IRIX*) ;;
7498             NetBSD-*|FreeBSD-*) ;;
7499             Darwin-*) ;;
7500             SCO_SV-3.2*) ;;
7501             windows) ;;
7502             *) SHLIB_CFLAGS="-fPIC" ;;
7503         esac
7504 fi
7505
7506     if test "$SHARED_LIB_SUFFIX" = ""; then :
7507
7508         # TEA specific: use PACKAGE_VERSION instead of VERSION
7509         SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
7510 fi
7511     if test "$UNSHARED_LIB_SUFFIX" = ""; then :
7512
7513         # TEA specific: use PACKAGE_VERSION instead of VERSION
7514         UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
7515 fi
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531     # These must be called after we do the basic CFLAGS checks and
7532     # verify any possible 64-bit or similar switches are necessary
7533
7534     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5
7535 $as_echo_n "checking for required early compiler flags... " >&6; }
7536     tcl_flags=""
7537
7538     if test "${tcl_cv_flag__isoc99_source+set}" = set; then :
7539   $as_echo_n "(cached) " >&6
7540 else
7541   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7542 /* end confdefs.h.  */
7543 #include <stdlib.h>
7544 int
7545 main ()
7546 {
7547 char *p = (char *)strtoll; char *q = (char *)strtoull;
7548   ;
7549   return 0;
7550 }
7551 _ACEOF
7552 if ac_fn_c_try_compile "$LINENO"; then :
7553   tcl_cv_flag__isoc99_source=no
7554 else
7555   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7556 /* end confdefs.h.  */
7557 #define _ISOC99_SOURCE 1
7558 #include <stdlib.h>
7559 int
7560 main ()
7561 {
7562 char *p = (char *)strtoll; char *q = (char *)strtoull;
7563   ;
7564   return 0;
7565 }
7566 _ACEOF
7567 if ac_fn_c_try_compile "$LINENO"; then :
7568   tcl_cv_flag__isoc99_source=yes
7569 else
7570   tcl_cv_flag__isoc99_source=no
7571 fi
7572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7573 fi
7574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7575 fi
7576
7577     if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
7578
7579 $as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h
7580
7581         tcl_flags="$tcl_flags _ISOC99_SOURCE"
7582     fi
7583
7584
7585     if test "${tcl_cv_flag__largefile64_source+set}" = set; then :
7586   $as_echo_n "(cached) " >&6
7587 else
7588   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7589 /* end confdefs.h.  */
7590 #include <sys/stat.h>
7591 int
7592 main ()
7593 {
7594 struct stat64 buf; int i = stat64("/", &buf);
7595   ;
7596   return 0;
7597 }
7598 _ACEOF
7599 if ac_fn_c_try_compile "$LINENO"; then :
7600   tcl_cv_flag__largefile64_source=no
7601 else
7602   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7603 /* end confdefs.h.  */
7604 #define _LARGEFILE64_SOURCE 1
7605 #include <sys/stat.h>
7606 int
7607 main ()
7608 {
7609 struct stat64 buf; int i = stat64("/", &buf);
7610   ;
7611   return 0;
7612 }
7613 _ACEOF
7614 if ac_fn_c_try_compile "$LINENO"; then :
7615   tcl_cv_flag__largefile64_source=yes
7616 else
7617   tcl_cv_flag__largefile64_source=no
7618 fi
7619 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7620 fi
7621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7622 fi
7623
7624     if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
7625
7626 $as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
7627
7628         tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
7629     fi
7630
7631
7632     if test "${tcl_cv_flag__largefile_source64+set}" = set; then :
7633   $as_echo_n "(cached) " >&6
7634 else
7635   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7636 /* end confdefs.h.  */
7637 #include <sys/stat.h>
7638 int
7639 main ()
7640 {
7641 char *p = (char *)open64;
7642   ;
7643   return 0;
7644 }
7645 _ACEOF
7646 if ac_fn_c_try_compile "$LINENO"; then :
7647   tcl_cv_flag__largefile_source64=no
7648 else
7649   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7650 /* end confdefs.h.  */
7651 #define _LARGEFILE_SOURCE64 1
7652 #include <sys/stat.h>
7653 int
7654 main ()
7655 {
7656 char *p = (char *)open64;
7657   ;
7658   return 0;
7659 }
7660 _ACEOF
7661 if ac_fn_c_try_compile "$LINENO"; then :
7662   tcl_cv_flag__largefile_source64=yes
7663 else
7664   tcl_cv_flag__largefile_source64=no
7665 fi
7666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7667 fi
7668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7669 fi
7670
7671     if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
7672
7673 $as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h
7674
7675         tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
7676     fi
7677
7678     if test "x${tcl_flags}" = "x" ; then
7679         { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7680 $as_echo "none" >&6; }
7681     else
7682         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5
7683 $as_echo "${tcl_flags}" >&6; }
7684     fi
7685
7686
7687     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5
7688 $as_echo_n "checking for 64-bit integer type... " >&6; }
7689     if test "${tcl_cv_type_64bit+set}" = set; then :
7690   $as_echo_n "(cached) " >&6
7691 else
7692
7693         tcl_cv_type_64bit=none
7694         # See if the compiler knows natively about __int64
7695         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7696 /* end confdefs.h.  */
7697
7698 int
7699 main ()
7700 {
7701 __int64 value = (__int64) 0;
7702   ;
7703   return 0;
7704 }
7705 _ACEOF
7706 if ac_fn_c_try_compile "$LINENO"; then :
7707   tcl_type_64bit=__int64
7708 else
7709   tcl_type_64bit="long long"
7710 fi
7711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7712         # See if we should use long anyway  Note that we substitute in the
7713         # type that is our current guess for a 64-bit type inside this check
7714         # program, so it should be modified only carefully...
7715         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7716 /* end confdefs.h.  */
7717
7718 int
7719 main ()
7720 {
7721 switch (0) {
7722             case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
7723         }
7724   ;
7725   return 0;
7726 }
7727 _ACEOF
7728 if ac_fn_c_try_compile "$LINENO"; then :
7729   tcl_cv_type_64bit=${tcl_type_64bit}
7730 fi
7731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7732 fi
7733
7734     if test "${tcl_cv_type_64bit}" = none ; then
7735
7736 $as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h
7737
7738         { $as_echo "$as_me:${as_lineno-$LINENO}: result: using long" >&5
7739 $as_echo "using long" >&6; }
7740     elif test "${tcl_cv_type_64bit}" = "__int64" \
7741                 -a "${TEA_PLATFORM}" = "windows" ; then
7742         # TEA specific: We actually want to use the default tcl.h checks in
7743         # this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
7744         { $as_echo "$as_me:${as_lineno-$LINENO}: result: using Tcl header defaults" >&5
7745 $as_echo "using Tcl header defaults" >&6; }
7746     else
7747
7748 cat >>confdefs.h <<_ACEOF
7749 #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
7750 _ACEOF
7751
7752         { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5
7753 $as_echo "${tcl_cv_type_64bit}" >&6; }
7754
7755         # Now check for auxiliary declarations
7756         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5
7757 $as_echo_n "checking for struct dirent64... " >&6; }
7758 if test "${tcl_cv_struct_dirent64+set}" = set; then :
7759   $as_echo_n "(cached) " >&6
7760 else
7761
7762             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7763 /* end confdefs.h.  */
7764 #include <sys/types.h>
7765 #include <sys/dirent.h>
7766 int
7767 main ()
7768 {
7769 struct dirent64 p;
7770   ;
7771   return 0;
7772 }
7773 _ACEOF
7774 if ac_fn_c_try_compile "$LINENO"; then :
7775   tcl_cv_struct_dirent64=yes
7776 else
7777   tcl_cv_struct_dirent64=no
7778 fi
7779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7780 fi
7781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5
7782 $as_echo "$tcl_cv_struct_dirent64" >&6; }
7783         if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
7784
7785 $as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h
7786
7787         fi
7788
7789         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5
7790 $as_echo_n "checking for struct stat64... " >&6; }
7791 if test "${tcl_cv_struct_stat64+set}" = set; then :
7792   $as_echo_n "(cached) " >&6
7793 else
7794
7795             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7796 /* end confdefs.h.  */
7797 #include <sys/stat.h>
7798 int
7799 main ()
7800 {
7801 struct stat64 p;
7802
7803   ;
7804   return 0;
7805 }
7806 _ACEOF
7807 if ac_fn_c_try_compile "$LINENO"; then :
7808   tcl_cv_struct_stat64=yes
7809 else
7810   tcl_cv_struct_stat64=no
7811 fi
7812 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7813 fi
7814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5
7815 $as_echo "$tcl_cv_struct_stat64" >&6; }
7816         if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
7817
7818 $as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h
7819
7820         fi
7821
7822         for ac_func in open64 lseek64
7823 do :
7824   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7825 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7826 eval as_val=\$$as_ac_var
7827    if test "x$as_val" = x""yes; then :
7828   cat >>confdefs.h <<_ACEOF
7829 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7830 _ACEOF
7831
7832 fi
7833 done
7834
7835         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5
7836 $as_echo_n "checking for off64_t... " >&6; }
7837         if test "${tcl_cv_type_off64_t+set}" = set; then :
7838   $as_echo_n "(cached) " >&6
7839 else
7840
7841             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7842 /* end confdefs.h.  */
7843 #include <sys/types.h>
7844 int
7845 main ()
7846 {
7847 off64_t offset;
7848
7849   ;
7850   return 0;
7851 }
7852 _ACEOF
7853 if ac_fn_c_try_compile "$LINENO"; then :
7854   tcl_cv_type_off64_t=yes
7855 else
7856   tcl_cv_type_off64_t=no
7857 fi
7858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7859 fi
7860
7861                         if test "x${tcl_cv_type_off64_t}" = "xyes" && \
7862                 test "x${ac_cv_func_lseek64}" = "xyes" && \
7863                 test "x${ac_cv_func_open64}" = "xyes" ; then
7864
7865 $as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h
7866
7867             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7868 $as_echo "yes" >&6; }
7869         else
7870             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7871 $as_echo "no" >&6; }
7872         fi
7873     fi
7874
7875
7876
7877 #--------------------------------------------------------------------
7878 # Set the default compiler switches based on the --enable-symbols option.
7879 #--------------------------------------------------------------------
7880
7881
7882
7883     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5
7884 $as_echo_n "checking for build with symbols... " >&6; }
7885     # Check whether --enable-symbols was given.
7886 if test "${enable_symbols+set}" = set; then :
7887   enableval=$enable_symbols; tcl_ok=$enableval
7888 else
7889   tcl_ok=no
7890 fi
7891
7892     DBGX=""
7893     if test "$tcl_ok" = "no"; then
7894         CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
7895         LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
7896         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7897 $as_echo "no" >&6; }
7898     else
7899         CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
7900         LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
7901         if test "$tcl_ok" = "yes"; then
7902             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5
7903 $as_echo "yes (standard debugging)" >&6; }
7904         fi
7905     fi
7906     # TEA specific:
7907     if test "${TEA_PLATFORM}" != "windows" ; then
7908         LDFLAGS_DEFAULT="${LDFLAGS}"
7909     fi
7910
7911
7912
7913
7914     if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
7915
7916 $as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h
7917
7918     fi
7919
7920     if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
7921         if test "$tcl_ok" = "all"; then
7922             { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem debugging" >&5
7923 $as_echo "enabled symbols mem debugging" >&6; }
7924         else
7925             { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5
7926 $as_echo "enabled $tcl_ok debugging" >&6; }
7927         fi
7928     fi
7929
7930
7931 #--------------------------------------------------------------------
7932 # Everyone should be linking against the Tcl stub library.  If you
7933 # can't for some reason, remove this definition.  If you aren't using
7934 # stubs, you also need to modify the SHLIB_LD_LIBS setting below to
7935 # link against the non-stubbed Tcl library.  Add Tk too if necessary.
7936 #--------------------------------------------------------------------
7937
7938
7939 $as_echo "#define USE_TCL_STUBS 1" >>confdefs.h
7940
7941 #AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
7942
7943 #--------------------------------------------------------------------
7944 # This macro generates a line to use when building a library.  It
7945 # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
7946 # and TEA_LOAD_TCLCONFIG macros above.
7947 #--------------------------------------------------------------------
7948
7949
7950     if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
7951         MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
7952         MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
7953         MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
7954     else
7955         MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
7956         MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
7957         MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
7958     fi
7959
7960     if test "${SHARED_BUILD}" = "1" ; then
7961         MAKE_LIB="${MAKE_SHARED_LIB} "
7962     else
7963         MAKE_LIB="${MAKE_STATIC_LIB} "
7964     fi
7965
7966     #--------------------------------------------------------------------
7967     # Shared libraries and static libraries have different names.
7968     # Use the double eval to make sure any variables in the suffix is
7969     # substituted. (@@@ Might not be necessary anymore)
7970     #--------------------------------------------------------------------
7971
7972     if test "${TEA_PLATFORM}" = "windows" ; then
7973         if test "${SHARED_BUILD}" = "1" ; then
7974             # We force the unresolved linking of symbols that are really in
7975             # the private libraries of Tcl and Tk.
7976             SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
7977             if test x"${TK_BIN_DIR}" != x ; then
7978                 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
7979             fi
7980             eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
7981         else
7982             eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
7983         fi
7984         # Some packages build their own stubs libraries
7985         eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
7986         if test "$GCC" = "yes"; then
7987             PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
7988         fi
7989         # These aren't needed on Windows (either MSVC or gcc)
7990         RANLIB=:
7991         RANLIB_STUB=:
7992     else
7993         RANLIB_STUB="${RANLIB}"
7994         if test "${SHARED_BUILD}" = "1" ; then
7995             SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
7996             if test x"${TK_BIN_DIR}" != x ; then
7997                 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
7998             fi
7999             eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
8000             RANLIB=:
8001         else
8002             eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
8003         fi
8004         # Some packages build their own stubs libraries
8005         eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
8006     fi
8007
8008     # These are escaped so that only CFLAGS is picked up at configure time.
8009     # The other values will be substituted at make time.
8010     CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
8011     if test "${SHARED_BUILD}" = "1" ; then
8012         CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
8013     fi
8014
8015
8016
8017
8018
8019
8020
8021
8022 #--------------------------------------------------------------------
8023 # Determine the name of the tclsh and/or wish executables in the
8024 # Tcl and Tk build directories or the location they were installed
8025 # into. These paths are used to support running test cases only,
8026 # the Makefile should not be making use of these paths to generate
8027 # a pkgIndex.tcl file or anything else at extension build time.
8028 #--------------------------------------------------------------------
8029
8030
8031     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5
8032 $as_echo_n "checking for tclsh... " >&6; }
8033     if test -f "${TCL_BIN_DIR}/Makefile" ; then
8034         # tclConfig.sh is in Tcl build directory
8035         if test "${TEA_PLATFORM}" = "windows"; then
8036             TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
8037         else
8038             TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
8039         fi
8040     else
8041         # tclConfig.sh is in install location
8042         if test "${TEA_PLATFORM}" = "windows"; then
8043             TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
8044         else
8045             TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
8046         fi
8047         list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
8048               `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
8049               `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
8050         for i in $list ; do
8051             if test -f "$i/${TCLSH_PROG}" ; then
8052                 REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
8053                 break
8054             fi
8055         done
8056         TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
8057     fi
8058     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${TCLSH_PROG}" >&5
8059 $as_echo "${TCLSH_PROG}" >&6; }
8060
8061
8062 #TEA_PROG_WISH
8063
8064 #--------------------------------------------------------------------
8065 # Finally, substitute all of the various values into the Makefile.
8066 # You may alternatively have a special pkgIndex.tcl.in or other files
8067 # which require substituting th AC variables in.  Include these here.
8068 #--------------------------------------------------------------------
8069
8070 ac_config_files="$ac_config_files Makefile pkgIndex.tcl"
8071
8072 cat >confcache <<\_ACEOF
8073 # This file is a shell script that caches the results of configure
8074 # tests run on this system so they can be shared between configure
8075 # scripts and configure runs, see configure's option --config-cache.
8076 # It is not useful on other systems.  If it contains results you don't
8077 # want to keep, you may remove or edit it.
8078 #
8079 # config.status only pays attention to the cache file if you give it
8080 # the --recheck option to rerun configure.
8081 #
8082 # `ac_cv_env_foo' variables (set or unset) will be overridden when
8083 # loading this file, other *unset* `ac_cv_foo' will be assigned the
8084 # following values.
8085
8086 _ACEOF
8087
8088 # The following way of writing the cache mishandles newlines in values,
8089 # but we know of no workaround that is simple, portable, and efficient.
8090 # So, we kill variables containing newlines.
8091 # Ultrix sh set writes to stderr and can't be redirected directly,
8092 # and sets the high bit in the cache file unless we assign to the vars.
8093 (
8094   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
8095     eval ac_val=\$$ac_var
8096     case $ac_val in #(
8097     *${as_nl}*)
8098       case $ac_var in #(
8099       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
8100 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
8101       esac
8102       case $ac_var in #(
8103       _ | IFS | as_nl) ;; #(
8104       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
8105       *) { eval $ac_var=; unset $ac_var;} ;;
8106       esac ;;
8107     esac
8108   done
8109
8110   (set) 2>&1 |
8111     case $as_nl`(ac_space=' '; set) 2>&1` in #(
8112     *${as_nl}ac_space=\ *)
8113       # `set' does not quote correctly, so add quotes: double-quote
8114       # substitution turns \\\\ into \\, and sed turns \\ into \.
8115       sed -n \
8116         "s/'/'\\\\''/g;
8117           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
8118       ;; #(
8119     *)
8120       # `set' quotes correctly as required by POSIX, so do not add quotes.
8121       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
8122       ;;
8123     esac |
8124     sort
8125 ) |
8126   sed '
8127      /^ac_cv_env_/b end
8128      t clear
8129      :clear
8130      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
8131      t end
8132      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
8133      :end' >>confcache
8134 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
8135   if test -w "$cache_file"; then
8136     test "x$cache_file" != "x/dev/null" &&
8137       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
8138 $as_echo "$as_me: updating cache $cache_file" >&6;}
8139     cat confcache >$cache_file
8140   else
8141     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
8142 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
8143   fi
8144 fi
8145 rm -f confcache
8146
8147 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8148 # Let make expand exec_prefix.
8149 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8150
8151 # Transform confdefs.h into DEFS.
8152 # Protect against shell expansion while executing Makefile rules.
8153 # Protect against Makefile macro expansion.
8154 #
8155 # If the first sed substitution is executed (which looks for macros that
8156 # take arguments), then branch to the quote section.  Otherwise,
8157 # look for a macro that doesn't take arguments.
8158 ac_script='
8159 :mline
8160 /\\$/{
8161  N
8162  s,\\\n,,
8163  b mline
8164 }
8165 t clear
8166 :clear
8167 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
8168 t quote
8169 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
8170 t quote
8171 b any
8172 :quote
8173 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
8174 s/\[/\\&/g
8175 s/\]/\\&/g
8176 s/\$/$$/g
8177 H
8178 :any
8179 ${
8180         g
8181         s/^\n//
8182         s/\n/ /g
8183         p
8184 }
8185 '
8186 DEFS=`sed -n "$ac_script" confdefs.h`
8187
8188
8189 ac_libobjs=
8190 ac_ltlibobjs=
8191 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
8192   # 1. Remove the extension, and $U if already installed.
8193   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
8194   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
8195   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
8196   #    will be set to the directory where LIBOBJS objects are built.
8197   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
8198   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
8199 done
8200 LIBOBJS=$ac_libobjs
8201
8202 LTLIBOBJS=$ac_ltlibobjs
8203
8204
8205
8206 CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
8207
8208 : ${CONFIG_STATUS=./config.status}
8209 ac_write_fail=0
8210 ac_clean_files_save=$ac_clean_files
8211 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
8212 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
8213 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
8214 as_write_fail=0
8215 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
8216 #! $SHELL
8217 # Generated by $as_me.
8218 # Run this file to recreate the current configuration.
8219 # Compiler output produced by configure, useful for debugging
8220 # configure, is in config.log if it exists.
8221
8222 debug=false
8223 ac_cs_recheck=false
8224 ac_cs_silent=false
8225
8226 SHELL=\${CONFIG_SHELL-$SHELL}
8227 export SHELL
8228 _ASEOF
8229 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
8230 ## -------------------- ##
8231 ## M4sh Initialization. ##
8232 ## -------------------- ##
8233
8234 # Be more Bourne compatible
8235 DUALCASE=1; export DUALCASE # for MKS sh
8236 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
8237   emulate sh
8238   NULLCMD=:
8239   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
8240   # is contrary to our usage.  Disable this feature.
8241   alias -g '${1+"$@"}'='"$@"'
8242   setopt NO_GLOB_SUBST
8243 else
8244   case `(set -o) 2>/dev/null` in #(
8245   *posix*) :
8246     set -o posix ;; #(
8247   *) :
8248      ;;
8249 esac
8250 fi
8251
8252
8253 as_nl='
8254 '
8255 export as_nl
8256 # Printing a long string crashes Solaris 7 /usr/bin/printf.
8257 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
8258 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
8259 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
8260 # Prefer a ksh shell builtin over an external printf program on Solaris,
8261 # but without wasting forks for bash or zsh.
8262 if test -z "$BASH_VERSION$ZSH_VERSION" \
8263     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
8264   as_echo='print -r --'
8265   as_echo_n='print -rn --'
8266 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
8267   as_echo='printf %s\n'
8268   as_echo_n='printf %s'
8269 else
8270   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
8271     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
8272     as_echo_n='/usr/ucb/echo -n'
8273   else
8274     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
8275     as_echo_n_body='eval
8276       arg=$1;
8277       case $arg in #(
8278       *"$as_nl"*)
8279         expr "X$arg" : "X\\(.*\\)$as_nl";
8280         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
8281       esac;
8282       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
8283     '
8284     export as_echo_n_body
8285     as_echo_n='sh -c $as_echo_n_body as_echo'
8286   fi
8287   export as_echo_body
8288   as_echo='sh -c $as_echo_body as_echo'
8289 fi
8290
8291 # The user is always right.
8292 if test "${PATH_SEPARATOR+set}" != set; then
8293   PATH_SEPARATOR=:
8294   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
8295     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
8296       PATH_SEPARATOR=';'
8297   }
8298 fi
8299
8300
8301 # IFS
8302 # We need space, tab and new line, in precisely that order.  Quoting is
8303 # there to prevent editors from complaining about space-tab.
8304 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
8305 # splitting by setting IFS to empty value.)
8306 IFS=" ""        $as_nl"
8307
8308 # Find who we are.  Look in the path if we contain no directory separator.
8309 case $0 in #((
8310   *[\\/]* ) as_myself=$0 ;;
8311   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8312 for as_dir in $PATH
8313 do
8314   IFS=$as_save_IFS
8315   test -z "$as_dir" && as_dir=.
8316     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
8317   done
8318 IFS=$as_save_IFS
8319
8320      ;;
8321 esac
8322 # We did not find ourselves, most probably we were run as `sh COMMAND'
8323 # in which case we are not to be found in the path.
8324 if test "x$as_myself" = x; then
8325   as_myself=$0
8326 fi
8327 if test ! -f "$as_myself"; then
8328   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
8329   exit 1
8330 fi
8331
8332 # Unset variables that we do not need and which cause bugs (e.g. in
8333 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
8334 # suppresses any "Segmentation fault" message there.  '((' could
8335 # trigger a bug in pdksh 5.2.14.
8336 for as_var in BASH_ENV ENV MAIL MAILPATH
8337 do eval test x\${$as_var+set} = xset \
8338   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
8339 done
8340 PS1='$ '
8341 PS2='> '
8342 PS4='+ '
8343
8344 # NLS nuisances.
8345 LC_ALL=C
8346 export LC_ALL
8347 LANGUAGE=C
8348 export LANGUAGE
8349
8350 # CDPATH.
8351 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
8352
8353
8354 # as_fn_error ERROR [LINENO LOG_FD]
8355 # ---------------------------------
8356 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
8357 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
8358 # script with status $?, using 1 if that was 0.
8359 as_fn_error ()
8360 {
8361   as_status=$?; test $as_status -eq 0 && as_status=1
8362   if test "$3"; then
8363     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
8364     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
8365   fi
8366   $as_echo "$as_me: error: $1" >&2
8367   as_fn_exit $as_status
8368 } # as_fn_error
8369
8370
8371 # as_fn_set_status STATUS
8372 # -----------------------
8373 # Set $? to STATUS, without forking.
8374 as_fn_set_status ()
8375 {
8376   return $1
8377 } # as_fn_set_status
8378
8379 # as_fn_exit STATUS
8380 # -----------------
8381 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
8382 as_fn_exit ()
8383 {
8384   set +e
8385   as_fn_set_status $1
8386   exit $1
8387 } # as_fn_exit
8388
8389 # as_fn_unset VAR
8390 # ---------------
8391 # Portably unset VAR.
8392 as_fn_unset ()
8393 {
8394   { eval $1=; unset $1;}
8395 }
8396 as_unset=as_fn_unset
8397 # as_fn_append VAR VALUE
8398 # ----------------------
8399 # Append the text in VALUE to the end of the definition contained in VAR. Take
8400 # advantage of any shell optimizations that allow amortized linear growth over
8401 # repeated appends, instead of the typical quadratic growth present in naive
8402 # implementations.
8403 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
8404   eval 'as_fn_append ()
8405   {
8406     eval $1+=\$2
8407   }'
8408 else
8409   as_fn_append ()
8410   {
8411     eval $1=\$$1\$2
8412   }
8413 fi # as_fn_append
8414
8415 # as_fn_arith ARG...
8416 # ------------------
8417 # Perform arithmetic evaluation on the ARGs, and store the result in the
8418 # global $as_val. Take advantage of shells that can avoid forks. The arguments
8419 # must be portable across $(()) and expr.
8420 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
8421   eval 'as_fn_arith ()
8422   {
8423     as_val=$(( $* ))
8424   }'
8425 else
8426   as_fn_arith ()
8427   {
8428     as_val=`expr "$@" || test $? -eq 1`
8429   }
8430 fi # as_fn_arith
8431
8432
8433 if expr a : '\(a\)' >/dev/null 2>&1 &&
8434    test "X`expr 00001 : '.*\(...\)'`" = X001; then
8435   as_expr=expr
8436 else
8437   as_expr=false
8438 fi
8439
8440 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
8441   as_basename=basename
8442 else
8443   as_basename=false
8444 fi
8445
8446 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
8447   as_dirname=dirname
8448 else
8449   as_dirname=false
8450 fi
8451
8452 as_me=`$as_basename -- "$0" ||
8453 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
8454          X"$0" : 'X\(//\)$' \| \
8455          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
8456 $as_echo X/"$0" |
8457     sed '/^.*\/\([^/][^/]*\)\/*$/{
8458             s//\1/
8459             q
8460           }
8461           /^X\/\(\/\/\)$/{
8462             s//\1/
8463             q
8464           }
8465           /^X\/\(\/\).*/{
8466             s//\1/
8467             q
8468           }
8469           s/.*/./; q'`
8470
8471 # Avoid depending upon Character Ranges.
8472 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
8473 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
8474 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
8475 as_cr_digits='0123456789'
8476 as_cr_alnum=$as_cr_Letters$as_cr_digits
8477
8478 ECHO_C= ECHO_N= ECHO_T=
8479 case `echo -n x` in #(((((
8480 -n*)
8481   case `echo 'xy\c'` in
8482   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
8483   xy)  ECHO_C='\c';;
8484   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
8485        ECHO_T=' ';;
8486   esac;;
8487 *)
8488   ECHO_N='-n';;
8489 esac
8490
8491 rm -f conf$$ conf$$.exe conf$$.file
8492 if test -d conf$$.dir; then
8493   rm -f conf$$.dir/conf$$.file
8494 else
8495   rm -f conf$$.dir
8496   mkdir conf$$.dir 2>/dev/null
8497 fi
8498 if (echo >conf$$.file) 2>/dev/null; then
8499   if ln -s conf$$.file conf$$ 2>/dev/null; then
8500     as_ln_s='ln -s'
8501     # ... but there are two gotchas:
8502     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
8503     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
8504     # In both cases, we have to default to `cp -p'.
8505     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
8506       as_ln_s='cp -p'
8507   elif ln conf$$.file conf$$ 2>/dev/null; then
8508     as_ln_s=ln
8509   else
8510     as_ln_s='cp -p'
8511   fi
8512 else
8513   as_ln_s='cp -p'
8514 fi
8515 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
8516 rmdir conf$$.dir 2>/dev/null
8517
8518
8519 # as_fn_mkdir_p
8520 # -------------
8521 # Create "$as_dir" as a directory, including parents if necessary.
8522 as_fn_mkdir_p ()
8523 {
8524
8525   case $as_dir in #(
8526   -*) as_dir=./$as_dir;;
8527   esac
8528   test -d "$as_dir" || eval $as_mkdir_p || {
8529     as_dirs=
8530     while :; do
8531       case $as_dir in #(
8532       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
8533       *) as_qdir=$as_dir;;
8534       esac
8535       as_dirs="'$as_qdir' $as_dirs"
8536       as_dir=`$as_dirname -- "$as_dir" ||
8537 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8538          X"$as_dir" : 'X\(//\)[^/]' \| \
8539          X"$as_dir" : 'X\(//\)$' \| \
8540          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
8541 $as_echo X"$as_dir" |
8542     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8543             s//\1/
8544             q
8545           }
8546           /^X\(\/\/\)[^/].*/{
8547             s//\1/
8548             q
8549           }
8550           /^X\(\/\/\)$/{
8551             s//\1/
8552             q
8553           }
8554           /^X\(\/\).*/{
8555             s//\1/
8556             q
8557           }
8558           s/.*/./; q'`
8559       test -d "$as_dir" && break
8560     done
8561     test -z "$as_dirs" || eval "mkdir $as_dirs"
8562   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
8563
8564
8565 } # as_fn_mkdir_p
8566 if mkdir -p . 2>/dev/null; then
8567   as_mkdir_p='mkdir -p "$as_dir"'
8568 else
8569   test -d ./-p && rmdir ./-p
8570   as_mkdir_p=false
8571 fi
8572
8573 if test -x / >/dev/null 2>&1; then
8574   as_test_x='test -x'
8575 else
8576   if ls -dL / >/dev/null 2>&1; then
8577     as_ls_L_option=L
8578   else
8579     as_ls_L_option=
8580   fi
8581   as_test_x='
8582     eval sh -c '\''
8583       if test -d "$1"; then
8584         test -d "$1/.";
8585       else
8586         case $1 in #(
8587         -*)set "./$1";;
8588         esac;
8589         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
8590         ???[sx]*):;;*)false;;esac;fi
8591     '\'' sh
8592   '
8593 fi
8594 as_executable_p=$as_test_x
8595
8596 # Sed expression to map a string onto a valid CPP name.
8597 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
8598
8599 # Sed expression to map a string onto a valid variable name.
8600 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
8601
8602
8603 exec 6>&1
8604 ## ----------------------------------- ##
8605 ## Main body of $CONFIG_STATUS script. ##
8606 ## ----------------------------------- ##
8607 _ASEOF
8608 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
8609
8610 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8611 # Save the log message, to keep $0 and so on meaningful, and to
8612 # report actual input values of CONFIG_FILES etc. instead of their
8613 # values after options handling.
8614 ac_log="
8615 This file was extended by TclCurl $as_me 7.22.0, which was
8616 generated by GNU Autoconf 2.64.  Invocation command line was
8617
8618   CONFIG_FILES    = $CONFIG_FILES
8619   CONFIG_HEADERS  = $CONFIG_HEADERS
8620   CONFIG_LINKS    = $CONFIG_LINKS
8621   CONFIG_COMMANDS = $CONFIG_COMMANDS
8622   $ $0 $@
8623
8624 on `(hostname || uname -n) 2>/dev/null | sed 1q`
8625 "
8626
8627 _ACEOF
8628
8629 case $ac_config_files in *"
8630 "*) set x $ac_config_files; shift; ac_config_files=$*;;
8631 esac
8632
8633
8634
8635 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8636 # Files that config.status was made for.
8637 config_files="`echo $ac_config_files`"
8638
8639 _ACEOF
8640
8641 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8642 ac_cs_usage="\
8643 \`$as_me' instantiates files and other configuration actions
8644 from templates according to the current configuration.  Unless the files
8645 and actions are specified as TAGs, all are instantiated by default.
8646
8647 Usage: $0 [OPTION]... [TAG]...
8648
8649   -h, --help       print this help, then exit
8650   -V, --version    print version number and configuration settings, then exit
8651   -q, --quiet, --silent
8652                    do not print progress messages
8653   -d, --debug      don't remove temporary files
8654       --recheck    update $as_me by reconfiguring in the same conditions
8655       --file=FILE[:TEMPLATE]
8656                    instantiate the configuration file FILE
8657
8658 Configuration files:
8659 $config_files
8660
8661 Report bugs to the package provider."
8662
8663 _ACEOF
8664 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8665 ac_cs_version="\\
8666 TclCurl config.status 7.22.0
8667 configured by $0, generated by GNU Autoconf 2.64,
8668   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
8669
8670 Copyright (C) 2009 Free Software Foundation, Inc.
8671 This config.status script is free software; the Free Software Foundation
8672 gives unlimited permission to copy, distribute and modify it."
8673
8674 ac_pwd='$ac_pwd'
8675 srcdir='$srcdir'
8676 INSTALL='$INSTALL'
8677 test -n "\$AWK" || AWK=awk
8678 _ACEOF
8679
8680 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8681 # The default lists apply if the user does not specify any file.
8682 ac_need_defaults=:
8683 while test $# != 0
8684 do
8685   case $1 in
8686   --*=*)
8687     ac_option=`expr "X$1" : 'X\([^=]*\)='`
8688     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
8689     ac_shift=:
8690     ;;
8691   *)
8692     ac_option=$1
8693     ac_optarg=$2
8694     ac_shift=shift
8695     ;;
8696   esac
8697
8698   case $ac_option in
8699   # Handling of the options.
8700   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8701     ac_cs_recheck=: ;;
8702   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
8703     $as_echo "$ac_cs_version"; exit ;;
8704   --debug | --debu | --deb | --de | --d | -d )
8705     debug=: ;;
8706   --file | --fil | --fi | --f )
8707     $ac_shift
8708     case $ac_optarg in
8709     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
8710     esac
8711     as_fn_append CONFIG_FILES " '$ac_optarg'"
8712     ac_need_defaults=false;;
8713   --he | --h |  --help | --hel | -h )
8714     $as_echo "$ac_cs_usage"; exit ;;
8715   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
8716   | -silent | --silent | --silen | --sile | --sil | --si | --s)
8717     ac_cs_silent=: ;;
8718
8719   # This is an error.
8720   -*) as_fn_error "unrecognized option: \`$1'
8721 Try \`$0 --help' for more information." ;;
8722
8723   *) as_fn_append ac_config_targets " $1"
8724      ac_need_defaults=false ;;
8725
8726   esac
8727   shift
8728 done
8729
8730 ac_configure_extra_args=
8731
8732 if $ac_cs_silent; then
8733   exec 6>/dev/null
8734   ac_configure_extra_args="$ac_configure_extra_args --silent"
8735 fi
8736
8737 _ACEOF
8738 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8739 if \$ac_cs_recheck; then
8740   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
8741   shift
8742   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
8743   CONFIG_SHELL='$SHELL'
8744   export CONFIG_SHELL
8745   exec "\$@"
8746 fi
8747
8748 _ACEOF
8749 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8750 exec 5>>config.log
8751 {
8752   echo
8753   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
8754 ## Running $as_me. ##
8755 _ASBOX
8756   $as_echo "$ac_log"
8757 } >&5
8758
8759 _ACEOF
8760 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8761 _ACEOF
8762
8763 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8764
8765 # Handling of arguments.
8766 for ac_config_target in $ac_config_targets
8767 do
8768   case $ac_config_target in
8769     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
8770     "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;;
8771
8772   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
8773   esac
8774 done
8775
8776
8777 # If the user did not use the arguments to specify the items to instantiate,
8778 # then the envvar interface is used.  Set only those that are not.
8779 # We use the long form for the default assignment because of an extremely
8780 # bizarre bug on SunOS 4.1.3.
8781 if $ac_need_defaults; then
8782   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
8783 fi
8784
8785 # Have a temporary directory for convenience.  Make it in the build tree
8786 # simply because there is no reason against having it here, and in addition,
8787 # creating and moving files from /tmp can sometimes cause problems.
8788 # Hook for its removal unless debugging.
8789 # Note that there is a small window in which the directory will not be cleaned:
8790 # after its creation but before its name has been assigned to `$tmp'.
8791 $debug ||
8792 {
8793   tmp=
8794   trap 'exit_status=$?
8795   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
8796 ' 0
8797   trap 'as_fn_exit 1' 1 2 13 15
8798 }
8799 # Create a (secure) tmp directory for tmp files.
8800
8801 {
8802   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
8803   test -n "$tmp" && test -d "$tmp"
8804 }  ||
8805 {
8806   tmp=./conf$$-$RANDOM
8807   (umask 077 && mkdir "$tmp")
8808 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
8809
8810 # Set up the scripts for CONFIG_FILES section.
8811 # No need to generate them if there are no CONFIG_FILES.
8812 # This happens for instance with `./config.status config.h'.
8813 if test -n "$CONFIG_FILES"; then
8814
8815
8816 ac_cr=`echo X | tr X '\015'`
8817 # On cygwin, bash can eat \r inside `` if the user requested igncr.
8818 # But we know of no other shell where ac_cr would be empty at this
8819 # point, so we can use a bashism as a fallback.
8820 if test "x$ac_cr" = x; then
8821   eval ac_cr=\$\'\\r\'
8822 fi
8823 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
8824 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
8825   ac_cs_awk_cr='\r'
8826 else
8827   ac_cs_awk_cr=$ac_cr
8828 fi
8829
8830 echo 'BEGIN {' >"$tmp/subs1.awk" &&
8831 _ACEOF
8832
8833
8834 {
8835   echo "cat >conf$$subs.awk <<_ACEOF" &&
8836   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
8837   echo "_ACEOF"
8838 } >conf$$subs.sh ||
8839   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
8840 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
8841 ac_delim='%!_!# '
8842 for ac_last_try in false false false false false :; do
8843   . ./conf$$subs.sh ||
8844     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
8845
8846   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
8847   if test $ac_delim_n = $ac_delim_num; then
8848     break
8849   elif $ac_last_try; then
8850     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
8851   else
8852     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8853   fi
8854 done
8855 rm -f conf$$subs.sh
8856
8857 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8858 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
8859 _ACEOF
8860 sed -n '
8861 h
8862 s/^/S["/; s/!.*/"]=/
8863 p
8864 g
8865 s/^[^!]*!//
8866 :repl
8867 t repl
8868 s/'"$ac_delim"'$//
8869 t delim
8870 :nl
8871 h
8872 s/\(.\{148\}\).*/\1/
8873 t more1
8874 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
8875 p
8876 n
8877 b repl
8878 :more1
8879 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
8880 p
8881 g
8882 s/.\{148\}//
8883 t nl
8884 :delim
8885 h
8886 s/\(.\{148\}\).*/\1/
8887 t more2
8888 s/["\\]/\\&/g; s/^/"/; s/$/"/
8889 p
8890 b
8891 :more2
8892 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
8893 p
8894 g
8895 s/.\{148\}//
8896 t delim
8897 ' <conf$$subs.awk | sed '
8898 /^[^""]/{
8899   N
8900   s/\n//
8901 }
8902 ' >>$CONFIG_STATUS || ac_write_fail=1
8903 rm -f conf$$subs.awk
8904 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8905 _ACAWK
8906 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
8907   for (key in S) S_is_set[key] = 1
8908   FS = "\a"
8909
8910 }
8911 {
8912   line = $ 0
8913   nfields = split(line, field, "@")
8914   substed = 0
8915   len = length(field[1])
8916   for (i = 2; i < nfields; i++) {
8917     key = field[i]
8918     keylen = length(key)
8919     if (S_is_set[key]) {
8920       value = S[key]
8921       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
8922       len += length(value) + length(field[++i])
8923       substed = 1
8924     } else
8925       len += 1 + keylen
8926   }
8927
8928   print line
8929 }
8930
8931 _ACAWK
8932 _ACEOF
8933 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8934 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
8935   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
8936 else
8937   cat
8938 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
8939   || as_fn_error "could not setup config files machinery" "$LINENO" 5
8940 _ACEOF
8941
8942 # VPATH may cause trouble with some makes, so we remove $(srcdir),
8943 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
8944 # trailing colons and then remove the whole line if VPATH becomes empty
8945 # (actually we leave an empty line to preserve line numbers).
8946 if test "x$srcdir" = x.; then
8947   ac_vpsub='/^[  ]*VPATH[        ]*=/{
8948 s/:*\$(srcdir):*/:/
8949 s/:*\${srcdir}:*/:/
8950 s/:*@srcdir@:*/:/
8951 s/^\([^=]*=[     ]*\):*/\1/
8952 s/:*$//
8953 s/^[^=]*=[       ]*$//
8954 }'
8955 fi
8956
8957 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8958 fi # test -n "$CONFIG_FILES"
8959
8960
8961 eval set X "  :F $CONFIG_FILES      "
8962 shift
8963 for ac_tag
8964 do
8965   case $ac_tag in
8966   :[FHLC]) ac_mode=$ac_tag; continue;;
8967   esac
8968   case $ac_mode$ac_tag in
8969   :[FHL]*:*);;
8970   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
8971   :[FH]-) ac_tag=-:-;;
8972   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
8973   esac
8974   ac_save_IFS=$IFS
8975   IFS=:
8976   set x $ac_tag
8977   IFS=$ac_save_IFS
8978   shift
8979   ac_file=$1
8980   shift
8981
8982   case $ac_mode in
8983   :L) ac_source=$1;;
8984   :[FH])
8985     ac_file_inputs=
8986     for ac_f
8987     do
8988       case $ac_f in
8989       -) ac_f="$tmp/stdin";;
8990       *) # Look for the file first in the build tree, then in the source tree
8991          # (if the path is not absolute).  The absolute path cannot be DOS-style,
8992          # because $ac_f cannot contain `:'.
8993          test -f "$ac_f" ||
8994            case $ac_f in
8995            [\\/$]*) false;;
8996            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
8997            esac ||
8998            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
8999       esac
9000       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
9001       as_fn_append ac_file_inputs " '$ac_f'"
9002     done
9003
9004     # Let's still pretend it is `configure' which instantiates (i.e., don't
9005     # use $as_me), people would be surprised to read:
9006     #    /* config.h.  Generated by config.status.  */
9007     configure_input='Generated from '`
9008           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
9009         `' by configure.'
9010     if test x"$ac_file" != x-; then
9011       configure_input="$ac_file.  $configure_input"
9012       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
9013 $as_echo "$as_me: creating $ac_file" >&6;}
9014     fi
9015     # Neutralize special characters interpreted by sed in replacement strings.
9016     case $configure_input in #(
9017     *\&* | *\|* | *\\* )
9018        ac_sed_conf_input=`$as_echo "$configure_input" |
9019        sed 's/[\\\\&|]/\\\\&/g'`;; #(
9020     *) ac_sed_conf_input=$configure_input;;
9021     esac
9022
9023     case $ac_tag in
9024     *:-:* | *:-) cat >"$tmp/stdin" \
9025       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
9026     esac
9027     ;;
9028   esac
9029
9030   ac_dir=`$as_dirname -- "$ac_file" ||
9031 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9032          X"$ac_file" : 'X\(//\)[^/]' \| \
9033          X"$ac_file" : 'X\(//\)$' \| \
9034          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
9035 $as_echo X"$ac_file" |
9036     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9037             s//\1/
9038             q
9039           }
9040           /^X\(\/\/\)[^/].*/{
9041             s//\1/
9042             q
9043           }
9044           /^X\(\/\/\)$/{
9045             s//\1/
9046             q
9047           }
9048           /^X\(\/\).*/{
9049             s//\1/
9050             q
9051           }
9052           s/.*/./; q'`
9053   as_dir="$ac_dir"; as_fn_mkdir_p
9054   ac_builddir=.
9055
9056 case "$ac_dir" in
9057 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
9058 *)
9059   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
9060   # A ".." for each directory in $ac_dir_suffix.
9061   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
9062   case $ac_top_builddir_sub in
9063   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
9064   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
9065   esac ;;
9066 esac
9067 ac_abs_top_builddir=$ac_pwd
9068 ac_abs_builddir=$ac_pwd$ac_dir_suffix
9069 # for backward compatibility:
9070 ac_top_builddir=$ac_top_build_prefix
9071
9072 case $srcdir in
9073   .)  # We are building in place.
9074     ac_srcdir=.
9075     ac_top_srcdir=$ac_top_builddir_sub
9076     ac_abs_top_srcdir=$ac_pwd ;;
9077   [\\/]* | ?:[\\/]* )  # Absolute name.
9078     ac_srcdir=$srcdir$ac_dir_suffix;
9079     ac_top_srcdir=$srcdir
9080     ac_abs_top_srcdir=$srcdir ;;
9081   *) # Relative name.
9082     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
9083     ac_top_srcdir=$ac_top_build_prefix$srcdir
9084     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
9085 esac
9086 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
9087
9088
9089   case $ac_mode in
9090   :F)
9091   #
9092   # CONFIG_FILE
9093   #
9094
9095   case $INSTALL in
9096   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
9097   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
9098   esac
9099 _ACEOF
9100
9101 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9102 # If the template does not know about datarootdir, expand it.
9103 # FIXME: This hack should be removed a few years after 2.60.
9104 ac_datarootdir_hack=; ac_datarootdir_seen=
9105 ac_sed_dataroot='
9106 /datarootdir/ {
9107   p
9108   q
9109 }
9110 /@datadir@/p
9111 /@docdir@/p
9112 /@infodir@/p
9113 /@localedir@/p
9114 /@mandir@/p'
9115 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
9116 *datarootdir*) ac_datarootdir_seen=yes;;
9117 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
9118   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
9119 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
9120 _ACEOF
9121 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9122   ac_datarootdir_hack='
9123   s&@datadir@&$datadir&g
9124   s&@docdir@&$docdir&g
9125   s&@infodir@&$infodir&g
9126   s&@localedir@&$localedir&g
9127   s&@mandir@&$mandir&g
9128   s&\\\${datarootdir}&$datarootdir&g' ;;
9129 esac
9130 _ACEOF
9131
9132 # Neutralize VPATH when `$srcdir' = `.'.
9133 # Shell code in configure.ac might set extrasub.
9134 # FIXME: do we really want to maintain this feature?
9135 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9136 ac_sed_extra="$ac_vpsub
9137 $extrasub
9138 _ACEOF
9139 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9140 :t
9141 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
9142 s|@configure_input@|$ac_sed_conf_input|;t t
9143 s&@top_builddir@&$ac_top_builddir_sub&;t t
9144 s&@top_build_prefix@&$ac_top_build_prefix&;t t
9145 s&@srcdir@&$ac_srcdir&;t t
9146 s&@abs_srcdir@&$ac_abs_srcdir&;t t
9147 s&@top_srcdir@&$ac_top_srcdir&;t t
9148 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
9149 s&@builddir@&$ac_builddir&;t t
9150 s&@abs_builddir@&$ac_abs_builddir&;t t
9151 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
9152 s&@INSTALL@&$ac_INSTALL&;t t
9153 $ac_datarootdir_hack
9154 "
9155 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
9156   || as_fn_error "could not create $ac_file" "$LINENO" 5
9157
9158 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
9159   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
9160   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
9161   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
9162 which seems to be undefined.  Please make sure it is defined." >&5
9163 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
9164 which seems to be undefined.  Please make sure it is defined." >&2;}
9165
9166   rm -f "$tmp/stdin"
9167   case $ac_file in
9168   -) cat "$tmp/out" && rm -f "$tmp/out";;
9169   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
9170   esac \
9171   || as_fn_error "could not create $ac_file" "$LINENO" 5
9172  ;;
9173
9174
9175
9176   esac
9177
9178 done # for ac_tag
9179
9180
9181 as_fn_exit 0
9182 _ACEOF
9183 ac_clean_files=$ac_clean_files_save
9184
9185 test $ac_write_fail = 0 ||
9186   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
9187
9188
9189 # configure is writing to config.log, and then calls config.status.
9190 # config.status does its own redirection, appending to config.log.
9191 # Unfortunately, on DOS this fails, as config.log is still kept open
9192 # by configure, so config.status won't be able to write to it; its
9193 # output is simply discarded.  So we exec the FD to /dev/null,
9194 # effectively closing config.log, so it can be properly (re)opened and
9195 # appended to by config.status.  When coming back to configure, we
9196 # need to make the FD available again.
9197 if test "$no_create" != yes; then
9198   ac_cs_success=:
9199   ac_config_status_args=
9200   test "$silent" = yes &&
9201     ac_config_status_args="$ac_config_status_args --quiet"
9202   exec 5>/dev/null
9203   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
9204   exec 5>>config.log
9205   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
9206   # would make configure fail if this is the last instruction.
9207   $ac_cs_success || as_fn_exit $?
9208 fi
9209 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
9210   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
9211 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
9212 fi
9213