Debian Codegraph @

configure

raw
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for itk 3.4.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
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 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
101
102 ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174 esac
175 fi
176 "
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191 exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell [email protected] about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509 *)
510 ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME='itk'
579 PACKAGE_TARNAME='itk'
580 PACKAGE_VERSION='3.4'
581 PACKAGE_STRING='itk 3.4'
582 PACKAGE_BUGREPORT=''
583 PACKAGE_URL=''
584
585 # Factoring default headers for most tests.
586 ac_includes_default="\
587 #include <stdio.h>
588 #ifdef HAVE_SYS_TYPES_H
589 # include <sys/types.h>
590 #endif
591 #ifdef HAVE_SYS_STAT_H
592 # include <sys/stat.h>
593 #endif
594 #ifdef STDC_HEADERS
595 # include <stdlib.h>
596 # include <stddef.h>
597 #else
598 # ifdef HAVE_STDLIB_H
599 # include <stdlib.h>
600 # endif
601 #endif
602 #ifdef HAVE_STRING_H
603 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
604 # include <memory.h>
605 # endif
606 # include <string.h>
607 #endif
608 #ifdef HAVE_STRINGS_H
609 # include <strings.h>
610 #endif
611 #ifdef HAVE_INTTYPES_H
612 # include <inttypes.h>
613 #endif
614 #ifdef HAVE_STDINT_H
615 # include <stdint.h>
616 #endif
617 #ifdef HAVE_UNISTD_H
618 # include <unistd.h>
619 #endif"
620
621 ac_subst_vars='LTLIBOBJS
622 LIBOBJS
623 WISH_PROG
624 TCLSH_PROG
625 itk_LIB_FILE
626 itkstub_LIB_FILE
627 VC_MANIFEST_EMBED_EXE
628 VC_MANIFEST_EMBED_DLL
629 RANLIB_STUB
630 MAKE_STUB_LIB
631 MAKE_STATIC_LIB
632 MAKE_SHARED_LIB
633 MAKE_LIB
634 TCL_DBGX
635 LDFLAGS_DEFAULT
636 CFLAGS_DEFAULT
637 LD_LIBRARY_PATH_VAR
638 SHLIB_CFLAGS
639 SHLIB_LD_LIBS
640 SHLIB_LD
641 STLIB_LD
642 CFLAGS_WARNING
643 CFLAGS_OPTIMIZE
644 CFLAGS_DEBUG
645 RC
646 CELIB_DIR
647 AR
648 SHARED_BUILD
649 XMKMF
650 TK_XLIB_DIR_NATIVE
651 TK_TOP_DIR_NATIVE
652 TK_INCLUDES
653 TCL_TOP_DIR_NATIVE
654 TCL_INCLUDES
655 PKG_OBJECTS
656 PKG_SOURCES
657 MATH_LIBS
658 EGREP
659 GREP
660 RANLIB
661 SET_MAKE
662 INSTALL_LIBRARY
663 INSTALL_SCRIPT
664 INSTALL_PROGRAM
665 INSTALL_DATA
666 INSTALL_DATA_DIR
667 INSTALL
668 CPP
669 itcl_STUB_LIB_PATH
670 itcl_STUB_LIB_SPEC
671 itcl_STUB_LIB_FILE
672 itcl_LIB_SPEC
673 itcl_LIB_FILE
674 itcl_SRC_DIR
675 itcl_BIN_DIR
676 itcl_VERSION
677 TK_XINCLUDES
678 TK_LIBS
679 TK_STUB_LIB_SPEC
680 TK_STUB_LIB_FLAG
681 TK_STUB_LIB_FILE
682 TK_LIB_SPEC
683 TK_LIB_FLAG
684 TK_LIB_FILE
685 TK_SRC_DIR
686 TK_BIN_DIR
687 TK_VERSION
688 TCL_SHLIB_LD_LIBS
689 TCL_LD_FLAGS
690 TCL_EXTRA_CFLAGS
691 TCL_DEFS
692 TCL_LIBS
693 CLEANFILES
694 OBJEXT
695 ac_ct_CC
696 CPPFLAGS
697 LDFLAGS
698 CFLAGS
699 CC
700 TCL_STUB_LIB_SPEC
701 TCL_STUB_LIB_FLAG
702 TCL_STUB_LIB_FILE
703 TCL_LIB_SPEC
704 TCL_LIB_FLAG
705 TCL_LIB_FILE
706 TCL_SRC_DIR
707 TCL_BIN_DIR
708 TCL_PATCH_LEVEL
709 TCL_VERSION
710 CONFIG_CLEAN_FILES
711 LN_S
712 PKG_CFLAGS
713 PKG_LIBS
714 PKG_INCLUDES
715 PKG_HEADERS
716 PKG_TCL_SOURCES
717 PKG_STUB_OBJECTS
718 PKG_STUB_SOURCES
719 PKG_STUB_LIB_FILE
720 PKG_LIB_FILE
721 EXEEXT
722 CYGPATH
723 target_alias
724 host_alias
725 build_alias
726 LIBS
727 ECHO_T
728 ECHO_N
729 ECHO_C
730 DEFS
731 mandir
732 localedir
733 libdir
734 psdir
735 pdfdir
736 dvidir
737 htmldir
738 infodir
739 docdir
740 oldincludedir
741 includedir
742 localstatedir
743 sharedstatedir
744 sysconfdir
745 datadir
746 datarootdir
747 libexecdir
748 sbindir
749 bindir
750 program_transform_name
751 prefix
752 exec_prefix
753 PACKAGE_URL
754 PACKAGE_BUGREPORT
755 PACKAGE_STRING
756 PACKAGE_VERSION
757 PACKAGE_TARNAME
758 PACKAGE_NAME
759 PATH_SEPARATOR
760 SHELL'
761 ac_subst_files=''
762 ac_user_opts='
763 enable_option_checking
764 with_tcl
765 with_tk
766 with_itcl
767 with_tclinclude
768 with_tkinclude
769 with_x
770 enable_shared
771 enable_64bit
772 enable_64bit_vis
773 enable_rpath
774 enable_wince
775 with_celib
776 enable_symbols
777 '
778 ac_precious_vars='build_alias
779 host_alias
780 target_alias
781 CC
782 CFLAGS
783 LDFLAGS
784 LIBS
785 CPPFLAGS
786 CPP
787 XMKMF'
788
789
790 # Initialize some variables set by options.
791 ac_init_help=
792 ac_init_version=false
793 ac_unrecognized_opts=
794 ac_unrecognized_sep=
795 # The variables have the same names as the options, with
796 # dashes changed to underlines.
797 cache_file=/dev/null
798 exec_prefix=NONE
799 no_create=
800 no_recursion=
801 prefix=NONE
802 program_prefix=NONE
803 program_suffix=NONE
804 program_transform_name=s,x,x,
805 silent=
806 site=
807 srcdir=
808 verbose=
809 x_includes=NONE
810 x_libraries=NONE
811
812 # Installation directory options.
813 # These are left unexpanded so users can "make install exec_prefix=/foo"
814 # and all the variables that are supposed to be based on exec_prefix
815 # by default will actually change.
816 # Use braces instead of parens because sh, perl, etc. also accept them.
817 # (The list follows the same order as the GNU Coding Standards.)
818 bindir='${exec_prefix}/bin'
819 sbindir='${exec_prefix}/sbin'
820 libexecdir='${exec_prefix}/libexec'
821 datarootdir='${prefix}/share'
822 datadir='${datarootdir}'
823 sysconfdir='${prefix}/etc'
824 sharedstatedir='${prefix}/com'
825 localstatedir='${prefix}/var'
826 includedir='${prefix}/include'
827 oldincludedir='/usr/include'
828 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
829 infodir='${datarootdir}/info'
830 htmldir='${docdir}'
831 dvidir='${docdir}'
832 pdfdir='${docdir}'
833 psdir='${docdir}'
834 libdir='${exec_prefix}/lib'
835 localedir='${datarootdir}/locale'
836 mandir='${datarootdir}/man'
837
838 ac_prev=
839 ac_dashdash=
840 for ac_option
841 do
842 # If the previous option needs an argument, assign it.
843 if test -n "$ac_prev"; then
844 eval $ac_prev=\$ac_option
845 ac_prev=
846 continue
847 fi
848
849 case $ac_option in
850 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
851 *=) ac_optarg= ;;
852 *) ac_optarg=yes ;;
853 esac
854
855 # Accept the important Cygnus configure options, so we can diagnose typos.
856
857 case $ac_dashdash$ac_option in
858 --)
859 ac_dashdash=yes ;;
860
861 -bindir | --bindir | --bindi | --bind | --bin | --bi)
862 ac_prev=bindir ;;
863 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
864 bindir=$ac_optarg ;;
865
866 -build | --build | --buil | --bui | --bu)
867 ac_prev=build_alias ;;
868 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
869 build_alias=$ac_optarg ;;
870
871 -cache-file | --cache-file | --cache-fil | --cache-fi \
872 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
873 ac_prev=cache_file ;;
874 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
875 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
876 cache_file=$ac_optarg ;;
877
878 --config-cache | -C)
879 cache_file=config.cache ;;
880
881 -datadir | --datadir | --datadi | --datad)
882 ac_prev=datadir ;;
883 -datadir=* | --datadir=* | --datadi=* | --datad=*)
884 datadir=$ac_optarg ;;
885
886 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
887 | --dataroo | --dataro | --datar)
888 ac_prev=datarootdir ;;
889 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
890 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
891 datarootdir=$ac_optarg ;;
892
893 -disable-* | --disable-*)
894 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
895 # Reject names that are not valid shell variable names.
896 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
897 as_fn_error $? "invalid feature name: $ac_useropt"
898 ac_useropt_orig=$ac_useropt
899 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
900 case $ac_user_opts in
901 *"
902 "enable_$ac_useropt"
903 "*) ;;
904 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
905 ac_unrecognized_sep=', ';;
906 esac
907 eval enable_$ac_useropt=no ;;
908
909 -docdir | --docdir | --docdi | --doc | --do)
910 ac_prev=docdir ;;
911 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
912 docdir=$ac_optarg ;;
913
914 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
915 ac_prev=dvidir ;;
916 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
917 dvidir=$ac_optarg ;;
918
919 -enable-* | --enable-*)
920 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
921 # Reject names that are not valid shell variable names.
922 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
923 as_fn_error $? "invalid feature name: $ac_useropt"
924 ac_useropt_orig=$ac_useropt
925 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
926 case $ac_user_opts in
927 *"
928 "enable_$ac_useropt"
929 "*) ;;
930 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
931 ac_unrecognized_sep=', ';;
932 esac
933 eval enable_$ac_useropt=\$ac_optarg ;;
934
935 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
936 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
937 | --exec | --exe | --ex)
938 ac_prev=exec_prefix ;;
939 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
940 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
941 | --exec=* | --exe=* | --ex=*)
942 exec_prefix=$ac_optarg ;;
943
944 -gas | --gas | --ga | --g)
945 # Obsolete; use --with-gas.
946 with_gas=yes ;;
947
948 -help | --help | --hel | --he | -h)
949 ac_init_help=long ;;
950 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
951 ac_init_help=recursive ;;
952 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
953 ac_init_help=short ;;
954
955 -host | --host | --hos | --ho)
956 ac_prev=host_alias ;;
957 -host=* | --host=* | --hos=* | --ho=*)
958 host_alias=$ac_optarg ;;
959
960 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
961 ac_prev=htmldir ;;
962 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
963 | --ht=*)
964 htmldir=$ac_optarg ;;
965
966 -includedir | --includedir | --includedi | --included | --include \
967 | --includ | --inclu | --incl | --inc)
968 ac_prev=includedir ;;
969 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
970 | --includ=* | --inclu=* | --incl=* | --inc=*)
971 includedir=$ac_optarg ;;
972
973 -infodir | --infodir | --infodi | --infod | --info | --inf)
974 ac_prev=infodir ;;
975 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
976 infodir=$ac_optarg ;;
977
978 -libdir | --libdir | --libdi | --libd)
979 ac_prev=libdir ;;
980 -libdir=* | --libdir=* | --libdi=* | --libd=*)
981 libdir=$ac_optarg ;;
982
983 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
984 | --libexe | --libex | --libe)
985 ac_prev=libexecdir ;;
986 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
987 | --libexe=* | --libex=* | --libe=*)
988 libexecdir=$ac_optarg ;;
989
990 -localedir | --localedir | --localedi | --localed | --locale)
991 ac_prev=localedir ;;
992 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
993 localedir=$ac_optarg ;;
994
995 -localstatedir | --localstatedir | --localstatedi | --localstated \
996 | --localstate | --localstat | --localsta | --localst | --locals)
997 ac_prev=localstatedir ;;
998 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
999 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1000 localstatedir=$ac_optarg ;;
1001
1002 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1003 ac_prev=mandir ;;
1004 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1005 mandir=$ac_optarg ;;
1006
1007 -nfp | --nfp | --nf)
1008 # Obsolete; use --without-fp.
1009 with_fp=no ;;
1010
1011 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1012 | --no-cr | --no-c | -n)
1013 no_create=yes ;;
1014
1015 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1016 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1017 no_recursion=yes ;;
1018
1019 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1020 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1021 | --oldin | --oldi | --old | --ol | --o)
1022 ac_prev=oldincludedir ;;
1023 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1024 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1025 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1026 oldincludedir=$ac_optarg ;;
1027
1028 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1029 ac_prev=prefix ;;
1030 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1031 prefix=$ac_optarg ;;
1032
1033 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1034 | --program-pre | --program-pr | --program-p)
1035 ac_prev=program_prefix ;;
1036 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1037 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1038 program_prefix=$ac_optarg ;;
1039
1040 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1041 | --program-suf | --program-su | --program-s)
1042 ac_prev=program_suffix ;;
1043 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1044 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1045 program_suffix=$ac_optarg ;;
1046
1047 -program-transform-name | --program-transform-name \
1048 | --program-transform-nam | --program-transform-na \
1049 | --program-transform-n | --program-transform- \
1050 | --program-transform | --program-transfor \
1051 | --program-transfo | --program-transf \
1052 | --program-trans | --program-tran \
1053 | --progr-tra | --program-tr | --program-t)
1054 ac_prev=program_transform_name ;;
1055 -program-transform-name=* | --program-transform-name=* \
1056 | --program-transform-nam=* | --program-transform-na=* \
1057 | --program-transform-n=* | --program-transform-=* \
1058 | --program-transform=* | --program-transfor=* \
1059 | --program-transfo=* | --program-transf=* \
1060 | --program-trans=* | --program-tran=* \
1061 | --progr-tra=* | --program-tr=* | --program-t=*)
1062 program_transform_name=$ac_optarg ;;
1063
1064 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1065 ac_prev=pdfdir ;;
1066 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1067 pdfdir=$ac_optarg ;;
1068
1069 -psdir | --psdir | --psdi | --psd | --ps)
1070 ac_prev=psdir ;;
1071 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1072 psdir=$ac_optarg ;;
1073
1074 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1075 | -silent | --silent | --silen | --sile | --sil)
1076 silent=yes ;;
1077
1078 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1079 ac_prev=sbindir ;;
1080 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1081 | --sbi=* | --sb=*)
1082 sbindir=$ac_optarg ;;
1083
1084 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1085 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1086 | --sharedst | --shareds | --shared | --share | --shar \
1087 | --sha | --sh)
1088 ac_prev=sharedstatedir ;;
1089 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1090 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1091 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1092 | --sha=* | --sh=*)
1093 sharedstatedir=$ac_optarg ;;
1094
1095 -site | --site | --sit)
1096 ac_prev=site ;;
1097 -site=* | --site=* | --sit=*)
1098 site=$ac_optarg ;;
1099
1100 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1101 ac_prev=srcdir ;;
1102 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1103 srcdir=$ac_optarg ;;
1104
1105 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1106 | --syscon | --sysco | --sysc | --sys | --sy)
1107 ac_prev=sysconfdir ;;
1108 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1109 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1110 sysconfdir=$ac_optarg ;;
1111
1112 -target | --target | --targe | --targ | --tar | --ta | --t)
1113 ac_prev=target_alias ;;
1114 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1115 target_alias=$ac_optarg ;;
1116
1117 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1118 verbose=yes ;;
1119
1120 -version | --version | --versio | --versi | --vers | -V)
1121 ac_init_version=: ;;
1122
1123 -with-* | --with-*)
1124 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1125 # Reject names that are not valid shell variable names.
1126 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1127 as_fn_error $? "invalid package name: $ac_useropt"
1128 ac_useropt_orig=$ac_useropt
1129 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1130 case $ac_user_opts in
1131 *"
1132 "with_$ac_useropt"
1133 "*) ;;
1134 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1135 ac_unrecognized_sep=', ';;
1136 esac
1137 eval with_$ac_useropt=\$ac_optarg ;;
1138
1139 -without-* | --without-*)
1140 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1141 # Reject names that are not valid shell variable names.
1142 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1143 as_fn_error $? "invalid package name: $ac_useropt"
1144 ac_useropt_orig=$ac_useropt
1145 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1146 case $ac_user_opts in
1147 *"
1148 "with_$ac_useropt"
1149 "*) ;;
1150 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1151 ac_unrecognized_sep=', ';;
1152 esac
1153 eval with_$ac_useropt=no ;;
1154
1155 --x)
1156 # Obsolete; use --with-x.
1157 with_x=yes ;;
1158
1159 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1160 | --x-incl | --x-inc | --x-in | --x-i)
1161 ac_prev=x_includes ;;
1162 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1163 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1164 x_includes=$ac_optarg ;;
1165
1166 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1167 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1168 ac_prev=x_libraries ;;
1169 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1170 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1171 x_libraries=$ac_optarg ;;
1172
1173 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1174 Try \`$0 --help' for more information"
1175 ;;
1176
1177 *=*)
1178 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1179 # Reject names that are not valid shell variable names.
1180 case $ac_envvar in #(
1181 '' | [0-9]* | *[!_$as_cr_alnum]* )
1182 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1183 esac
1184 eval $ac_envvar=\$ac_optarg
1185 export $ac_envvar ;;
1186
1187 *)
1188 # FIXME: should be removed in autoconf 3.0.
1189 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1190 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1191 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1192 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1193 ;;
1194
1195 esac
1196 done
1197
1198 if test -n "$ac_prev"; then
1199 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1200 as_fn_error $? "missing argument to $ac_option"
1201 fi
1202
1203 if test -n "$ac_unrecognized_opts"; then
1204 case $enable_option_checking in
1205 no) ;;
1206 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1207 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1208 esac
1209 fi
1210
1211 # Check all directory arguments for consistency.
1212 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1213 datadir sysconfdir sharedstatedir localstatedir includedir \
1214 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1215 libdir localedir mandir
1216 do
1217 eval ac_val=\$$ac_var
1218 # Remove trailing slashes.
1219 case $ac_val in
1220 */ )
1221 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1222 eval $ac_var=\$ac_val;;
1223 esac
1224 # Be sure to have absolute directory names.
1225 case $ac_val in
1226 [\\/$]* | ?:[\\/]* ) continue;;
1227 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1228 esac
1229 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1230 done
1231
1232 # There might be people who depend on the old broken behavior: `$host'
1233 # used to hold the argument of --host etc.
1234 # FIXME: To remove some day.
1235 build=$build_alias
1236 host=$host_alias
1237 target=$target_alias
1238
1239 # FIXME: To remove some day.
1240 if test "x$host_alias" != x; then
1241 if test "x$build_alias" = x; then
1242 cross_compiling=maybe
1243 elif test "x$build_alias" != "x$host_alias"; then
1244 cross_compiling=yes
1245 fi
1246 fi
1247
1248 ac_tool_prefix=
1249 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1250
1251 test "$silent" = yes && exec 6>/dev/null
1252
1253
1254 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1255 ac_ls_di=`ls -di .` &&
1256 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1257 as_fn_error $? "working directory cannot be determined"
1258 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1259 as_fn_error $? "pwd does not report name of working directory"
1260
1261
1262 # Find the source files, if location was not specified.
1263 if test -z "$srcdir"; then
1264 ac_srcdir_defaulted=yes
1265 # Try the directory containing this script, then the parent directory.
1266 ac_confdir=`$as_dirname -- "$as_myself" ||
1267 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1268 X"$as_myself" : 'X\(//\)[^/]' \| \
1269 X"$as_myself" : 'X\(//\)$' \| \
1270 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1271 $as_echo X"$as_myself" |
1272 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1273 s//\1/
1274 q
1275 }
1276 /^X\(\/\/\)[^/].*/{
1277 s//\1/
1278 q
1279 }
1280 /^X\(\/\/\)$/{
1281 s//\1/
1282 q
1283 }
1284 /^X\(\/\).*/{
1285 s//\1/
1286 q
1287 }
1288 s/.*/./; q'`
1289 srcdir=$ac_confdir
1290 if test ! -r "$srcdir/$ac_unique_file"; then
1291 srcdir=..
1292 fi
1293 else
1294 ac_srcdir_defaulted=no
1295 fi
1296 if test ! -r "$srcdir/$ac_unique_file"; then
1297 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1298 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1299 fi
1300 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1301 ac_abs_confdir=`(
1302 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1303 pwd)`
1304 # When building in place, set srcdir=.
1305 if test "$ac_abs_confdir" = "$ac_pwd"; then
1306 srcdir=.
1307 fi
1308 # Remove unnecessary trailing slashes from srcdir.
1309 # Double slashes in file names in object file debugging info
1310 # mess up M-x gdb in Emacs.
1311 case $srcdir in
1312 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1313 esac
1314 for ac_var in $ac_precious_vars; do
1315 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1316 eval ac_env_${ac_var}_value=\$${ac_var}
1317 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1318 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1319 done
1320
1321 #
1322 # Report the --help message.
1323 #
1324 if test "$ac_init_help" = "long"; then
1325 # Omit some internal or obsolete options to make the list less imposing.
1326 # This message is too long to be a string in the A/UX 3.1 sh.
1327 cat <<_ACEOF
1328 \`configure' configures itk 3.4 to adapt to many kinds of systems.
1329
1330 Usage: $0 [OPTION]... [VAR=VALUE]...
1331
1332 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1333 VAR=VALUE. See below for descriptions of some of the useful variables.
1334
1335 Defaults for the options are specified in brackets.
1336
1337 Configuration:
1338 -h, --help display this help and exit
1339 --help=short display options specific to this package
1340 --help=recursive display the short help of all the included packages
1341 -V, --version display version information and exit
1342 -q, --quiet, --silent do not print \`checking ...' messages
1343 --cache-file=FILE cache test results in FILE [disabled]
1344 -C, --config-cache alias for \`--cache-file=config.cache'
1345 -n, --no-create do not create output files
1346 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1347
1348 Installation directories:
1349 --prefix=PREFIX install architecture-independent files in PREFIX
1350 [$ac_default_prefix]
1351 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1352 [PREFIX]
1353
1354 By default, \`make install' will install all the files in
1355 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1356 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1357 for instance \`--prefix=\$HOME'.
1358
1359 For better control, use the options below.
1360
1361 Fine tuning of the installation directories:
1362 --bindir=DIR user executables [EPREFIX/bin]
1363 --sbindir=DIR system admin executables [EPREFIX/sbin]
1364 --libexecdir=DIR program executables [EPREFIX/libexec]
1365 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1366 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1367 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1368 --libdir=DIR object code libraries [EPREFIX/lib]
1369 --includedir=DIR C header files [PREFIX/include]
1370 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1371 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1372 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1373 --infodir=DIR info documentation [DATAROOTDIR/info]
1374 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1375 --mandir=DIR man documentation [DATAROOTDIR/man]
1376 --docdir=DIR documentation root [DATAROOTDIR/doc/itk]
1377 --htmldir=DIR html documentation [DOCDIR]
1378 --dvidir=DIR dvi documentation [DOCDIR]
1379 --pdfdir=DIR pdf documentation [DOCDIR]
1380 --psdir=DIR ps documentation [DOCDIR]
1381 _ACEOF
1382
1383 cat <<\_ACEOF
1384
1385 X features:
1386 --x-includes=DIR X include files are in DIR
1387 --x-libraries=DIR X library files are in DIR
1388 _ACEOF
1389 fi
1390
1391 if test -n "$ac_init_help"; then
1392 case $ac_init_help in
1393 short | recursive ) echo "Configuration of itk 3.4:";;
1394 esac
1395 cat <<\_ACEOF
1396
1397 Optional Features:
1398 --disable-option-checking ignore unrecognized --enable/--with options
1399 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1400 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1401 --enable-shared build and link with shared libraries (default: on)
1402 --enable-64bit enable 64bit support (default: off)
1403 --enable-64bit-vis enable 64bit Sparc VIS support (default: off)
1404 --disable-rpath disable rpath support (default: on)
1405 --enable-wince enable Win/CE support (where applicable)
1406 --enable-symbols build with debugging symbols (default: off)
1407
1408 Optional Packages:
1409 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1410 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1411 --with-tcl directory containing tcl configuration
1412 (tclConfig.sh)
1413 --with-tk directory containing tk configuration (tkConfig.sh)
1414 --with-itcl directory containing itcl configuration (itclConfig.sh)
1415 --with-tclinclude directory containing the public Tcl header files
1416 --with-tkinclude directory containing the public Tk header files
1417 --with-x use the X Window System
1418 --with-celib=DIR use Windows/CE support library from DIR
1419
1420 Some influential environment variables:
1421 CC C compiler command
1422 CFLAGS C compiler flags
1423 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1424 nonstandard directory <lib dir>
1425 LIBS libraries to pass to the linker, e.g. -l<library>
1426 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1427 you have headers in a nonstandard directory <include dir>
1428 CPP C preprocessor
1429 XMKMF Path to xmkmf, Makefile generator for X Window System
1430
1431 Use these variables to override the choices made by `configure' or to help
1432 it to find libraries and programs with nonstandard names/locations.
1433
1434 Report bugs to the package provider.
1435 _ACEOF
1436 ac_status=$?
1437 fi
1438
1439 if test "$ac_init_help" = "recursive"; then
1440 # If there are subdirs, report their specific --help.
1441 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1442 test -d "$ac_dir" ||
1443 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1444 continue
1445 ac_builddir=.
1446
1447 case "$ac_dir" in
1448 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1449 *)
1450 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1451 # A ".." for each directory in $ac_dir_suffix.
1452 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1453 case $ac_top_builddir_sub in
1454 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1455 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1456 esac ;;
1457 esac
1458 ac_abs_top_builddir=$ac_pwd
1459 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1460 # for backward compatibility:
1461 ac_top_builddir=$ac_top_build_prefix
1462
1463 case $srcdir in
1464 .) # We are building in place.
1465 ac_srcdir=.
1466 ac_top_srcdir=$ac_top_builddir_sub
1467 ac_abs_top_srcdir=$ac_pwd ;;
1468 [\\/]* | ?:[\\/]* ) # Absolute name.
1469 ac_srcdir=$srcdir$ac_dir_suffix;
1470 ac_top_srcdir=$srcdir
1471 ac_abs_top_srcdir=$srcdir ;;
1472 *) # Relative name.
1473 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1474 ac_top_srcdir=$ac_top_build_prefix$srcdir
1475 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1476 esac
1477 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1478
1479 cd "$ac_dir" || { ac_status=$?; continue; }
1480 # Check for guested configure.
1481 if test -f "$ac_srcdir/configure.gnu"; then
1482 echo &&
1483 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1484 elif test -f "$ac_srcdir/configure"; then
1485 echo &&
1486 $SHELL "$ac_srcdir/configure" --help=recursive
1487 else
1488 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1489 fi || ac_status=$?
1490 cd "$ac_pwd" || { ac_status=$?; break; }
1491 done
1492 fi
1493
1494 test -n "$ac_init_help" && exit $ac_status
1495 if $ac_init_version; then
1496 cat <<\_ACEOF
1497 itk configure 3.4
1498 generated by GNU Autoconf 2.69
1499
1500 Copyright (C) 2012 Free Software Foundation, Inc.
1501 This configure script is free software; the Free Software Foundation
1502 gives unlimited permission to copy, distribute and modify it.
1503 _ACEOF
1504 exit
1505 fi
1506
1507 ## ------------------------ ##
1508 ## Autoconf initialization. ##
1509 ## ------------------------ ##
1510
1511 # ac_fn_c_try_compile LINENO
1512 # --------------------------
1513 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1514 ac_fn_c_try_compile ()
1515 {
1516 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1517 rm -f conftest.$ac_objext
1518 if { { ac_try="$ac_compile"
1519 case "(($ac_try" in
1520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1521 *) ac_try_echo=$ac_try;;
1522 esac
1523 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1524 $as_echo "$ac_try_echo"; } >&5
1525 (eval "$ac_compile") 2>conftest.err
1526 ac_status=$?
1527 if test -s conftest.err; then
1528 grep -v '^ *+' conftest.err >conftest.er1
1529 cat conftest.er1 >&5
1530 mv -f conftest.er1 conftest.err
1531 fi
1532 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1533 test $ac_status = 0; } && {
1534 test -z "$ac_c_werror_flag" ||
1535 test ! -s conftest.err
1536 } && test -s conftest.$ac_objext; then :
1537 ac_retval=0
1538 else
1539 $as_echo "$as_me: failed program was:" >&5
1540 sed 's/^/| /' conftest.$ac_ext >&5
1541
1542 ac_retval=1
1543 fi
1544 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1545 as_fn_set_status $ac_retval
1546
1547 } # ac_fn_c_try_compile
1548
1549 # ac_fn_c_try_cpp LINENO
1550 # ----------------------
1551 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1552 ac_fn_c_try_cpp ()
1553 {
1554 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1555 if { { ac_try="$ac_cpp conftest.$ac_ext"
1556 case "(($ac_try" in
1557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1558 *) ac_try_echo=$ac_try;;
1559 esac
1560 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1561 $as_echo "$ac_try_echo"; } >&5
1562 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1563 ac_status=$?
1564 if test -s conftest.err; then
1565 grep -v '^ *+' conftest.err >conftest.er1
1566 cat conftest.er1 >&5
1567 mv -f conftest.er1 conftest.err
1568 fi
1569 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1570 test $ac_status = 0; } > conftest.i && {
1571 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1572 test ! -s conftest.err
1573 }; then :
1574 ac_retval=0
1575 else
1576 $as_echo "$as_me: failed program was:" >&5
1577 sed 's/^/| /' conftest.$ac_ext >&5
1578
1579 ac_retval=1
1580 fi
1581 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1582 as_fn_set_status $ac_retval
1583
1584 } # ac_fn_c_try_cpp
1585
1586 # ac_fn_c_try_run LINENO
1587 # ----------------------
1588 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1589 # that executables *can* be run.
1590 ac_fn_c_try_run ()
1591 {
1592 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1593 if { { ac_try="$ac_link"
1594 case "(($ac_try" in
1595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1596 *) ac_try_echo=$ac_try;;
1597 esac
1598 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1599 $as_echo "$ac_try_echo"; } >&5
1600 (eval "$ac_link") 2>&5
1601 ac_status=$?
1602 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1603 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1604 { { case "(($ac_try" in
1605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1606 *) ac_try_echo=$ac_try;;
1607 esac
1608 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1609 $as_echo "$ac_try_echo"; } >&5
1610 (eval "$ac_try") 2>&5
1611 ac_status=$?
1612 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1613 test $ac_status = 0; }; }; then :
1614 ac_retval=0
1615 else
1616 $as_echo "$as_me: program exited with status $ac_status" >&5
1617 $as_echo "$as_me: failed program was:" >&5
1618 sed 's/^/| /' conftest.$ac_ext >&5
1619
1620 ac_retval=$ac_status
1621 fi
1622 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1623 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1624 as_fn_set_status $ac_retval
1625
1626 } # ac_fn_c_try_run
1627
1628 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1629 # -------------------------------------------------------
1630 # Tests whether HEADER exists and can be compiled using the include files in
1631 # INCLUDES, setting the cache variable VAR accordingly.
1632 ac_fn_c_check_header_compile ()
1633 {
1634 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1636 $as_echo_n "checking for $2... " >&6; }
1637 if eval \${$3+:} false; then :
1638 $as_echo_n "(cached) " >&6
1639 else
1640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1641 /* end confdefs.h. */
1642 $4
1643 #include <$2>
1644 _ACEOF
1645 if ac_fn_c_try_compile "$LINENO"; then :
1646 eval "$3=yes"
1647 else
1648 eval "$3=no"
1649 fi
1650 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1651 fi
1652 eval ac_res=\$$3
1653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1654 $as_echo "$ac_res" >&6; }
1655 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1656
1657 } # ac_fn_c_check_header_compile
1658
1659 # ac_fn_c_try_link LINENO
1660 # -----------------------
1661 # Try to link conftest.$ac_ext, and return whether this succeeded.
1662 ac_fn_c_try_link ()
1663 {
1664 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1665 rm -f conftest.$ac_objext conftest$ac_exeext
1666 if { { ac_try="$ac_link"
1667 case "(($ac_try" in
1668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1669 *) ac_try_echo=$ac_try;;
1670 esac
1671 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1672 $as_echo "$ac_try_echo"; } >&5
1673 (eval "$ac_link") 2>conftest.err
1674 ac_status=$?
1675 if test -s conftest.err; then
1676 grep -v '^ *+' conftest.err >conftest.er1
1677 cat conftest.er1 >&5
1678 mv -f conftest.er1 conftest.err
1679 fi
1680 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1681 test $ac_status = 0; } && {
1682 test -z "$ac_c_werror_flag" ||
1683 test ! -s conftest.err
1684 } && test -s conftest$ac_exeext && {
1685 test "$cross_compiling" = yes ||
1686 test -x conftest$ac_exeext
1687 }; then :
1688 ac_retval=0
1689 else
1690 $as_echo "$as_me: failed program was:" >&5
1691 sed 's/^/| /' conftest.$ac_ext >&5
1692
1693 ac_retval=1
1694 fi
1695 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1696 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1697 # interfere with the next link command; also delete a directory that is
1698 # left behind by Apple's compiler. We do this before executing the actions.
1699 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1700 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1701 as_fn_set_status $ac_retval
1702
1703 } # ac_fn_c_try_link
1704
1705 # ac_fn_c_check_func LINENO FUNC VAR
1706 # ----------------------------------
1707 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1708 ac_fn_c_check_func ()
1709 {
1710 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1712 $as_echo_n "checking for $2... " >&6; }
1713 if eval \${$3+:} false; then :
1714 $as_echo_n "(cached) " >&6
1715 else
1716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1717 /* end confdefs.h. */
1718 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1719 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1720 #define $2 innocuous_$2
1721
1722 /* System header to define __stub macros and hopefully few prototypes,
1723 which can conflict with char $2 (); below.
1724 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1725 <limits.h> exists even on freestanding compilers. */
1726
1727 #ifdef __STDC__
1728 # include <limits.h>
1729 #else
1730 # include <assert.h>
1731 #endif
1732
1733 #undef $2
1734
1735 /* Override any GCC internal prototype to avoid an error.
1736 Use char because int might match the return type of a GCC
1737 builtin and then its argument prototype would still apply. */
1738 #ifdef __cplusplus
1739 extern "C"
1740 #endif
1741 char $2 ();
1742 /* The GNU C library defines this for functions which it implements
1743 to always fail with ENOSYS. Some functions are actually named
1744 something starting with __ and the normal name is an alias. */
1745 #if defined __stub_$2 || defined __stub___$2
1746 choke me
1747 #endif
1748
1749 int
1750 main ()
1751 {
1752 return $2 ();
1753 ;
1754 return 0;
1755 }
1756 _ACEOF
1757 if ac_fn_c_try_link "$LINENO"; then :
1758 eval "$3=yes"
1759 else
1760 eval "$3=no"
1761 fi
1762 rm -f core conftest.err conftest.$ac_objext \
1763 conftest$ac_exeext conftest.$ac_ext
1764 fi
1765 eval ac_res=\$$3
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1767 $as_echo "$ac_res" >&6; }
1768 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1769
1770 } # ac_fn_c_check_func
1771
1772 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1773 # -------------------------------------------------------
1774 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1775 # the include files in INCLUDES and setting the cache variable VAR
1776 # accordingly.
1777 ac_fn_c_check_header_mongrel ()
1778 {
1779 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1780 if eval \${$3+:} false; then :
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1782 $as_echo_n "checking for $2... " >&6; }
1783 if eval \${$3+:} false; then :
1784 $as_echo_n "(cached) " >&6
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 else
1790 # Is the header compilable?
1791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1792 $as_echo_n "checking $2 usability... " >&6; }
1793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1794 /* end confdefs.h. */
1795 $4
1796 #include <$2>
1797 _ACEOF
1798 if ac_fn_c_try_compile "$LINENO"; then :
1799 ac_header_compiler=yes
1800 else
1801 ac_header_compiler=no
1802 fi
1803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1805 $as_echo "$ac_header_compiler" >&6; }
1806
1807 # Is the header present?
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1809 $as_echo_n "checking $2 presence... " >&6; }
1810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1811 /* end confdefs.h. */
1812 #include <$2>
1813 _ACEOF
1814 if ac_fn_c_try_cpp "$LINENO"; then :
1815 ac_header_preproc=yes
1816 else
1817 ac_header_preproc=no
1818 fi
1819 rm -f conftest.err conftest.i conftest.$ac_ext
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1821 $as_echo "$ac_header_preproc" >&6; }
1822
1823 # So? What about this header?
1824 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1825 yes:no: )
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1827 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1829 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1830 ;;
1831 no:yes:* )
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1833 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1835 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1837 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1839 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1841 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1842 ;;
1843 esac
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1845 $as_echo_n "checking for $2... " >&6; }
1846 if eval \${$3+:} false; then :
1847 $as_echo_n "(cached) " >&6
1848 else
1849 eval "$3=\$ac_header_compiler"
1850 fi
1851 eval ac_res=\$$3
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1853 $as_echo "$ac_res" >&6; }
1854 fi
1855 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1856
1857 } # ac_fn_c_check_header_mongrel
1858 cat >config.log <<_ACEOF
1859 This file contains any messages produced by compilers while
1860 running configure, to aid debugging if configure makes a mistake.
1861
1862 It was created by itk $as_me 3.4, which was
1863 generated by GNU Autoconf 2.69. Invocation command line was
1864
1865 $ $0 $@
1866
1867 _ACEOF
1868 exec 5>>config.log
1869 {
1870 cat <<_ASUNAME
1871 ## --------- ##
1872 ## Platform. ##
1873 ## --------- ##
1874
1875 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1876 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1877 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1878 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1879 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1880
1881 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1882 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1883
1884 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1885 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1886 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1887 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1888 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1889 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1890 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1891
1892 _ASUNAME
1893
1894 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1895 for as_dir in $PATH
1896 do
1897 IFS=$as_save_IFS
1898 test -z "$as_dir" && as_dir=.
1899 $as_echo "PATH: $as_dir"
1900 done
1901 IFS=$as_save_IFS
1902
1903 } >&5
1904
1905 cat >&5 <<_ACEOF
1906
1907
1908 ## ----------- ##
1909 ## Core tests. ##
1910 ## ----------- ##
1911
1912 _ACEOF
1913
1914
1915 # Keep a trace of the command line.
1916 # Strip out --no-create and --no-recursion so they do not pile up.
1917 # Strip out --silent because we don't want to record it for future runs.
1918 # Also quote any args containing shell meta-characters.
1919 # Make two passes to allow for proper duplicate-argument suppression.
1920 ac_configure_args=
1921 ac_configure_args0=
1922 ac_configure_args1=
1923 ac_must_keep_next=false
1924 for ac_pass in 1 2
1925 do
1926 for ac_arg
1927 do
1928 case $ac_arg in
1929 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1930 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1931 | -silent | --silent | --silen | --sile | --sil)
1932 continue ;;
1933 *\'*)
1934 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1935 esac
1936 case $ac_pass in
1937 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1938 2)
1939 as_fn_append ac_configure_args1 " '$ac_arg'"
1940 if test $ac_must_keep_next = true; then
1941 ac_must_keep_next=false # Got value, back to normal.
1942 else
1943 case $ac_arg in
1944 *=* | --config-cache | -C | -disable-* | --disable-* \
1945 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1946 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1947 | -with-* | --with-* | -without-* | --without-* | --x)
1948 case "$ac_configure_args0 " in
1949 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1950 esac
1951 ;;
1952 -* ) ac_must_keep_next=true ;;
1953 esac
1954 fi
1955 as_fn_append ac_configure_args " '$ac_arg'"
1956 ;;
1957 esac
1958 done
1959 done
1960 { ac_configure_args0=; unset ac_configure_args0;}
1961 { ac_configure_args1=; unset ac_configure_args1;}
1962
1963 # When interrupted or exit'd, cleanup temporary files, and complete
1964 # config.log. We remove comments because anyway the quotes in there
1965 # would cause problems or look ugly.
1966 # WARNING: Use '\'' to represent an apostrophe within the trap.
1967 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1968 trap 'exit_status=$?
1969 # Save into config.log some information that might help in debugging.
1970 {
1971 echo
1972
1973 $as_echo "## ---------------- ##
1974 ## Cache variables. ##
1975 ## ---------------- ##"
1976 echo
1977 # The following way of writing the cache mishandles newlines in values,
1978 (
1979 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1980 eval ac_val=\$$ac_var
1981 case $ac_val in #(
1982 *${as_nl}*)
1983 case $ac_var in #(
1984 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
1985 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1986 esac
1987 case $ac_var in #(
1988 _ | IFS | as_nl) ;; #(
1989 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1990 *) { eval $ac_var=; unset $ac_var;} ;;
1991 esac ;;
1992 esac
1993 done
1994 (set) 2>&1 |
1995 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1996 *${as_nl}ac_space=\ *)
1997 sed -n \
1998 "s/'\''/'\''\\\\'\'''\''/g;
1999 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2000 ;; #(
2001 *)
2002 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2003 ;;
2004 esac |
2005 sort
2006 )
2007 echo
2008
2009 $as_echo "## ----------------- ##
2010 ## Output variables. ##
2011 ## ----------------- ##"
2012 echo
2013 for ac_var in $ac_subst_vars
2014 do
2015 eval ac_val=\$$ac_var
2016 case $ac_val in
2017 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2018 esac
2019 $as_echo "$ac_var='\''$ac_val'\''"
2020 done | sort
2021 echo
2022
2023 if test -n "$ac_subst_files"; then
2024 $as_echo "## ------------------- ##
2025 ## File substitutions. ##
2026 ## ------------------- ##"
2027 echo
2028 for ac_var in $ac_subst_files
2029 do
2030 eval ac_val=\$$ac_var
2031 case $ac_val in
2032 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2033 esac
2034 $as_echo "$ac_var='\''$ac_val'\''"
2035 done | sort
2036 echo
2037 fi
2038
2039 if test -s confdefs.h; then
2040 $as_echo "## ----------- ##
2041 ## confdefs.h. ##
2042 ## ----------- ##"
2043 echo
2044 cat confdefs.h
2045 echo
2046 fi
2047 test "$ac_signal" != 0 &&
2048 $as_echo "$as_me: caught signal $ac_signal"
2049 $as_echo "$as_me: exit $exit_status"
2050 } >&5
2051 rm -f core *.core core.conftest.* &&
2052 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2053 exit $exit_status
2054 ' 0
2055 for ac_signal in 1 2 13 15; do
2056 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2057 done
2058 ac_signal=0
2059
2060 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2061 rm -f -r conftest* confdefs.h
2062
2063 $as_echo "/* confdefs.h */" > confdefs.h
2064
2065 # Predefined preprocessor variables.
2066
2067 cat >>confdefs.h <<_ACEOF
2068 #define PACKAGE_NAME "$PACKAGE_NAME"
2069 _ACEOF
2070
2071 cat >>confdefs.h <<_ACEOF
2072 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2073 _ACEOF
2074
2075 cat >>confdefs.h <<_ACEOF
2076 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2077 _ACEOF
2078
2079 cat >>confdefs.h <<_ACEOF
2080 #define PACKAGE_STRING "$PACKAGE_STRING"
2081 _ACEOF
2082
2083 cat >>confdefs.h <<_ACEOF
2084 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2085 _ACEOF
2086
2087 cat >>confdefs.h <<_ACEOF
2088 #define PACKAGE_URL "$PACKAGE_URL"
2089 _ACEOF
2090
2091
2092 # Let the site file select an alternate cache file if it wants to.
2093 # Prefer an explicitly selected file to automatically selected ones.
2094 ac_site_file1=NONE
2095 ac_site_file2=NONE
2096 if test -n "$CONFIG_SITE"; then
2097 # We do not want a PATH search for config.site.
2098 case $CONFIG_SITE in #((
2099 -*) ac_site_file1=./$CONFIG_SITE;;
2100 */*) ac_site_file1=$CONFIG_SITE;;
2101 *) ac_site_file1=./$CONFIG_SITE;;
2102 esac
2103 elif test "x$prefix" != xNONE; then
2104 ac_site_file1=$prefix/share/config.site
2105 ac_site_file2=$prefix/etc/config.site
2106 else
2107 ac_site_file1=$ac_default_prefix/share/config.site
2108 ac_site_file2=$ac_default_prefix/etc/config.site
2109 fi
2110 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2111 do
2112 test "x$ac_site_file" = xNONE && continue
2113 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2114 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2115 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2116 sed 's/^/| /' "$ac_site_file" >&5
2117 . "$ac_site_file" \
2118 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2119 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2120 as_fn_error $? "failed to load site script $ac_site_file
2121 See \`config.log' for more details" "$LINENO" 5; }
2122 fi
2123 done
2124
2125 if test -r "$cache_file"; then
2126 # Some versions of bash will fail to source /dev/null (special files
2127 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2128 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2129 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2130 $as_echo "$as_me: loading cache $cache_file" >&6;}
2131 case $cache_file in
2132 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2133 *) . "./$cache_file";;
2134 esac
2135 fi
2136 else
2137 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2138 $as_echo "$as_me: creating cache $cache_file" >&6;}
2139 >$cache_file
2140 fi
2141
2142 # Check that the precious variables saved in the cache have kept the same
2143 # value.
2144 ac_cache_corrupted=false
2145 for ac_var in $ac_precious_vars; do
2146 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2147 eval ac_new_set=\$ac_env_${ac_var}_set
2148 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2149 eval ac_new_val=\$ac_env_${ac_var}_value
2150 case $ac_old_set,$ac_new_set in
2151 set,)
2152 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2153 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2154 ac_cache_corrupted=: ;;
2155 ,set)
2156 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2157 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2158 ac_cache_corrupted=: ;;
2159 ,);;
2160 *)
2161 if test "x$ac_old_val" != "x$ac_new_val"; then
2162 # differences in whitespace do not lead to failure.
2163 ac_old_val_w=`echo x $ac_old_val`
2164 ac_new_val_w=`echo x $ac_new_val`
2165 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2166 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2167 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2168 ac_cache_corrupted=:
2169 else
2170 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2171 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2172 eval $ac_var=\$ac_old_val
2173 fi
2174 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2175 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2176 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2177 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2178 fi;;
2179 esac
2180 # Pass precious variables to config.status.
2181 if test "$ac_new_set" = set; then
2182 case $ac_new_val in
2183 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2184 *) ac_arg=$ac_var=$ac_new_val ;;
2185 esac
2186 case " $ac_configure_args " in
2187 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2188 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2189 esac
2190 fi
2191 done
2192 if $ac_cache_corrupted; then
2193 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2194 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2195 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2196 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2197 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2198 fi
2199 ## -------------------- ##
2200 ## Main body of script. ##
2201 ## -------------------- ##
2202
2203 ac_ext=c
2204 ac_cpp='$CPP $CPPFLAGS'
2205 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2206 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2207 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2208
2209
2210
2211 #--------------------------------------------------------------------
2212 # Call TEA_INIT as the first TEA_ macro to set up initial vars.
2213 # This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
2214 # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
2215 #--------------------------------------------------------------------
2216
2217
2218 # TEA extensions pass this us the version of TEA they think they
2219 # are compatible with.
2220 TEA_VERSION="3.9"
2221
2222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct TEA configuration" >&5
2223 $as_echo_n "checking for correct TEA configuration... " >&6; }
2224 if test x"${PACKAGE_NAME}" = x ; then
2225 as_fn_error $? "
2226 The PACKAGE_NAME variable must be defined by your TEA configure.ac" "$LINENO" 5
2227 fi
2228 if test x"3.9" = x ; then
2229 as_fn_error $? "
2230 TEA version not specified." "$LINENO" 5
2231 elif test "3.9" != "${TEA_VERSION}" ; then
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
2233 $as_echo "warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6; }
2234 else
2235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5
2236 $as_echo "ok (TEA ${TEA_VERSION})" >&6; }
2237 fi
2238
2239 # If the user did not set CFLAGS, set it now to keep macros
2240 # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
2241 if test "${CFLAGS+set}" != "set" ; then
2242 CFLAGS=""
2243 fi
2244
2245 case "`uname -s`" in
2246 *win32*|*WIN32*|*MINGW32_*)
2247 # Extract the first word of "cygpath", so it can be a program name with args.
2248 set dummy cygpath; ac_word=$2
2249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2250 $as_echo_n "checking for $ac_word... " >&6; }
2251 if ${ac_cv_prog_CYGPATH+:} false; then :
2252 $as_echo_n "(cached) " >&6
2253 else
2254 if test -n "$CYGPATH"; then
2255 ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
2256 else
2257 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2258 for as_dir in $PATH
2259 do
2260 IFS=$as_save_IFS
2261 test -z "$as_dir" && as_dir=.
2262 for ac_exec_ext in '' $ac_executable_extensions; do
2263 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2264 ac_cv_prog_CYGPATH="cygpath -m"
2265 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2266 break 2
2267 fi
2268 done
2269 done
2270 IFS=$as_save_IFS
2271
2272 test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
2273 fi
2274 fi
2275 CYGPATH=$ac_cv_prog_CYGPATH
2276 if test -n "$CYGPATH"; then
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
2278 $as_echo "$CYGPATH" >&6; }
2279 else
2280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2281 $as_echo "no" >&6; }
2282 fi
2283
2284
2285 EXEEXT=".exe"
2286 TEA_PLATFORM="windows"
2287 ;;
2288 *CYGWIN_*)
2289 EXEEXT=".exe"
2290 # CYGPATH and TEA_PLATFORM are determined later in LOAD_TCLCONFIG
2291 ;;
2292 *)
2293 CYGPATH=echo
2294 # Maybe we are cross-compiling....
2295 case ${host_alias} in
2296 *mingw32*)
2297 EXEEXT=".exe"
2298 TEA_PLATFORM="windows"
2299 ;;
2300 *)
2301 EXEEXT=""
2302 TEA_PLATFORM="unix"
2303 ;;
2304 esac
2305 ;;
2306 esac
2307
2308 # Check if exec_prefix is set. If not use fall back to prefix.
2309 # Note when adjusted, so that TEA_PREFIX can correct for this.
2310 # This is needed for recursive configures, since autoconf propagates
2311 # $prefix, but not $exec_prefix (doh!).
2312 if test x$exec_prefix = xNONE ; then
2313 exec_prefix_default=yes
2314 exec_prefix=$prefix
2315 fi
2316
2317 { $as_echo "$as_me:${as_lineno-$LINENO}: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&5
2318 $as_echo "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;}
2319
2320
2321
2322
2323 # This package name must be replaced statically for AC_SUBST to work
2324
2325 # Substitute STUB_LIB_FILE in case package creates a stub library too.
2326
2327
2328 # We AC_SUBST these here to ensure they are subst'ed,
2329 # in case the user doesn't call TEA_ADD_...
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
2340 $as_echo_n "checking whether ln -s works... " >&6; }
2341 LN_S=$as_ln_s
2342 if test "$LN_S" = "ln -s"; then
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2344 $as_echo "yes" >&6; }
2345 else
2346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
2347 $as_echo "no, using $LN_S" >&6; }
2348 fi
2349
2350 CONFIG_CLEAN_FILES=
2351 if test ! -d $srcdir/tclconfig ; then
2352 if test -d $srcdir/../tclconfig ; then
2353 $LN_S $srcdir/../tclconfig tclconfig
2354 CONFIG_CLEAN_FILES=tclconfig
2355 fi
2356 fi
2357
2358
2359 ac_aux_dir=
2360 for ac_dir in tclconfig "$srcdir"/tclconfig; do
2361 if test -f "$ac_dir/install-sh"; then
2362 ac_aux_dir=$ac_dir
2363 ac_install_sh="$ac_aux_dir/install-sh -c"
2364 break
2365 elif test -f "$ac_dir/install.sh"; then
2366 ac_aux_dir=$ac_dir
2367 ac_install_sh="$ac_aux_dir/install.sh -c"
2368 break
2369 elif test -f "$ac_dir/shtool"; then
2370 ac_aux_dir=$ac_dir
2371 ac_install_sh="$ac_aux_dir/shtool install -c"
2372 break
2373 fi
2374 done
2375 if test -z "$ac_aux_dir"; then
2376 as_fn_error $? "cannot find install-sh, install.sh, or shtool in tclconfig \"$srcdir\"/tclconfig" "$LINENO" 5
2377 fi
2378
2379 # These three variables are undocumented and unsupported,
2380 # and are intended to be withdrawn in a future Autoconf release.
2381 # They can cause serious problems if a builder's source tree is in a directory
2382 # whose full name contains unusual characters.
2383 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2384 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2385 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2386
2387
2388
2389 #--------------------------------------------------------------------
2390 # Load the tclConfig.sh file
2391 #--------------------------------------------------------------------
2392
2393
2394
2395 #
2396 # Ok, lets find the tcl configuration
2397 # First, look for one uninstalled.
2398 # the alternative search directory is invoked by --with-tcl
2399 #
2400
2401 if test x"${no_tcl}" = x ; then
2402 # we reset no_tcl in case something fails here
2403 no_tcl=true
2404
2405 # Check whether --with-tcl was given.
2406 if test "${with_tcl+set}" = set; then :
2407 withval=$with_tcl; with_tclconfig="${withval}"
2408 fi
2409
2410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
2411 $as_echo_n "checking for Tcl configuration... " >&6; }
2412 if ${ac_cv_c_tclconfig+:} false; then :
2413 $as_echo_n "(cached) " >&6
2414 else
2415
2416
2417 # First check to see if --with-tcl was specified.
2418 if test x"${with_tclconfig}" != x ; then
2419 case "${with_tclconfig}" in
2420 */tclConfig.sh )
2421 if test -f "${with_tclconfig}"; then
2422 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
2423 $as_echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
2424 with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
2425 fi ;;
2426 esac
2427 if test -f "${with_tclconfig}/tclConfig.sh" ; then
2428 ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
2429 else
2430 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
2431 fi
2432 fi
2433
2434 # then check for a private Tcl installation
2435 if test x"${ac_cv_c_tclconfig}" = x ; then
2436 for i in \
2437 ../tcl \
2438 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2439 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
2440 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
2441 ../../tcl \
2442 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2443 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
2444 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
2445 ../../../tcl \
2446 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2447 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
2448 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
2449 if test "${TEA_PLATFORM}" = "windows" \
2450 -a -f "$i/win/tclConfig.sh" ; then
2451 ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2452 break
2453 fi
2454 if test -f "$i/unix/tclConfig.sh" ; then
2455 ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2456 break
2457 fi
2458 done
2459 fi
2460
2461 # on Darwin, check in Framework installation locations
2462 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
2463 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2464 `ls -d /Library/Frameworks 2>/dev/null` \
2465 `ls -d /Network/Library/Frameworks 2>/dev/null` \
2466 `ls -d /System/Library/Frameworks 2>/dev/null` \
2467 ; do
2468 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
2469 ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
2470 break
2471 fi
2472 done
2473 fi
2474
2475 # TEA specific: on Windows, check in common installation locations
2476 if test "${TEA_PLATFORM}" = "windows" \
2477 -a x"${ac_cv_c_tclconfig}" = x ; then
2478 for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2479 `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2480 ; do
2481 if test -f "$i/tclConfig.sh" ; then
2482 ac_cv_c_tclconfig="`(cd $i; pwd)`"
2483 break
2484 fi
2485 done
2486 fi
2487
2488 # check in a few common install locations
2489 if test x"${ac_cv_c_tclconfig}" = x ; then
2490 for i in `ls -d ${libdir} 2>/dev/null` \
2491 `ls -d ${exec_prefix}/lib 2>/dev/null` \
2492 `ls -d ${prefix}/lib 2>/dev/null` \
2493 `ls -d /usr/local/lib 2>/dev/null` \
2494 `ls -d /usr/contrib/lib 2>/dev/null` \
2495 `ls -d /usr/lib 2>/dev/null` \
2496 `ls -d /usr/lib64 2>/dev/null` \
2497 `ls -d /usr/lib/tcl8.6 2>/dev/null` \
2498 `ls -d /usr/lib/tcl8.5 2>/dev/null` \
2499 ; do
2500 if test -f "$i/tclConfig.sh" ; then
2501 ac_cv_c_tclconfig="`(cd $i; pwd)`"
2502 break
2503 fi
2504 done
2505 fi
2506
2507 # check in a few other private locations
2508 if test x"${ac_cv_c_tclconfig}" = x ; then
2509 for i in \
2510 ${srcdir}/../tcl \
2511 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2512 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2513 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2514 if test "${TEA_PLATFORM}" = "windows" \
2515 -a -f "$i/win/tclConfig.sh" ; then
2516 ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2517 break
2518 fi
2519 if test -f "$i/unix/tclConfig.sh" ; then
2520 ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2521 break
2522 fi
2523 done
2524 fi
2525
2526 fi
2527
2528
2529 if test x"${ac_cv_c_tclconfig}" = x ; then
2530 TCL_BIN_DIR="# no Tcl configs found"
2531 as_fn_error $? "Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" "$LINENO" 5
2532 else
2533 no_tcl=
2534 TCL_BIN_DIR="${ac_cv_c_tclconfig}"
2535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2536 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2537 fi
2538 fi
2539
2540 ac_ext=c
2541 ac_cpp='$CPP $CPPFLAGS'
2542 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2543 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2544 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2545 if test -n "$ac_tool_prefix"; then
2546 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2547 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2549 $as_echo_n "checking for $ac_word... " >&6; }
2550 if ${ac_cv_prog_CC+:} false; then :
2551 $as_echo_n "(cached) " >&6
2552 else
2553 if test -n "$CC"; then
2554 ac_cv_prog_CC="$CC" # Let the user override the test.
2555 else
2556 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2557 for as_dir in $PATH
2558 do
2559 IFS=$as_save_IFS
2560 test -z "$as_dir" && as_dir=.
2561 for ac_exec_ext in '' $ac_executable_extensions; do
2562 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2563 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2564 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2565 break 2
2566 fi
2567 done
2568 done
2569 IFS=$as_save_IFS
2570
2571 fi
2572 fi
2573 CC=$ac_cv_prog_CC
2574 if test -n "$CC"; then
2575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2576 $as_echo "$CC" >&6; }
2577 else
2578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2579 $as_echo "no" >&6; }
2580 fi
2581
2582
2583 fi
2584 if test -z "$ac_cv_prog_CC"; then
2585 ac_ct_CC=$CC
2586 # Extract the first word of "gcc", so it can be a program name with args.
2587 set dummy gcc; ac_word=$2
2588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2589 $as_echo_n "checking for $ac_word... " >&6; }
2590 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2591 $as_echo_n "(cached) " >&6
2592 else
2593 if test -n "$ac_ct_CC"; then
2594 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2595 else
2596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2597 for as_dir in $PATH
2598 do
2599 IFS=$as_save_IFS
2600 test -z "$as_dir" && as_dir=.
2601 for ac_exec_ext in '' $ac_executable_extensions; do
2602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2603 ac_cv_prog_ac_ct_CC="gcc"
2604 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2605 break 2
2606 fi
2607 done
2608 done
2609 IFS=$as_save_IFS
2610
2611 fi
2612 fi
2613 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2614 if test -n "$ac_ct_CC"; then
2615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2616 $as_echo "$ac_ct_CC" >&6; }
2617 else
2618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2619 $as_echo "no" >&6; }
2620 fi
2621
2622 if test "x$ac_ct_CC" = x; then
2623 CC=""
2624 else
2625 case $cross_compiling:$ac_tool_warned in
2626 yes:)
2627 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2628 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2629 ac_tool_warned=yes ;;
2630 esac
2631 CC=$ac_ct_CC
2632 fi
2633 else
2634 CC="$ac_cv_prog_CC"
2635 fi
2636
2637 if test -z "$CC"; then
2638 if test -n "$ac_tool_prefix"; then
2639 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2640 set dummy ${ac_tool_prefix}cc; ac_word=$2
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2642 $as_echo_n "checking for $ac_word... " >&6; }
2643 if ${ac_cv_prog_CC+:} false; then :
2644 $as_echo_n "(cached) " >&6
2645 else
2646 if test -n "$CC"; then
2647 ac_cv_prog_CC="$CC" # Let the user override the test.
2648 else
2649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2650 for as_dir in $PATH
2651 do
2652 IFS=$as_save_IFS
2653 test -z "$as_dir" && as_dir=.
2654 for ac_exec_ext in '' $ac_executable_extensions; do
2655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2656 ac_cv_prog_CC="${ac_tool_prefix}cc"
2657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2658 break 2
2659 fi
2660 done
2661 done
2662 IFS=$as_save_IFS
2663
2664 fi
2665 fi
2666 CC=$ac_cv_prog_CC
2667 if test -n "$CC"; then
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2669 $as_echo "$CC" >&6; }
2670 else
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2672 $as_echo "no" >&6; }
2673 fi
2674
2675
2676 fi
2677 fi
2678 if test -z "$CC"; then
2679 # Extract the first word of "cc", so it can be a program name with args.
2680 set dummy cc; ac_word=$2
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2682 $as_echo_n "checking for $ac_word... " >&6; }
2683 if ${ac_cv_prog_CC+:} false; then :
2684 $as_echo_n "(cached) " >&6
2685 else
2686 if test -n "$CC"; then
2687 ac_cv_prog_CC="$CC" # Let the user override the test.
2688 else
2689 ac_prog_rejected=no
2690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2691 for as_dir in $PATH
2692 do
2693 IFS=$as_save_IFS
2694 test -z "$as_dir" && as_dir=.
2695 for ac_exec_ext in '' $ac_executable_extensions; do
2696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2697 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2698 ac_prog_rejected=yes
2699 continue
2700 fi
2701 ac_cv_prog_CC="cc"
2702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2703 break 2
2704 fi
2705 done
2706 done
2707 IFS=$as_save_IFS
2708
2709 if test $ac_prog_rejected = yes; then
2710 # We found a bogon in the path, so make sure we never use it.
2711 set dummy $ac_cv_prog_CC
2712 shift
2713 if test $# != 0; then
2714 # We chose a different compiler from the bogus one.
2715 # However, it has the same basename, so the bogon will be chosen
2716 # first if we set CC to just the basename; use the full file name.
2717 shift
2718 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2719 fi
2720 fi
2721 fi
2722 fi
2723 CC=$ac_cv_prog_CC
2724 if test -n "$CC"; then
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2726 $as_echo "$CC" >&6; }
2727 else
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2729 $as_echo "no" >&6; }
2730 fi
2731
2732
2733 fi
2734 if test -z "$CC"; then
2735 if test -n "$ac_tool_prefix"; then
2736 for ac_prog in cl.exe
2737 do
2738 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2739 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2741 $as_echo_n "checking for $ac_word... " >&6; }
2742 if ${ac_cv_prog_CC+:} false; then :
2743 $as_echo_n "(cached) " >&6
2744 else
2745 if test -n "$CC"; then
2746 ac_cv_prog_CC="$CC" # Let the user override the test.
2747 else
2748 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2749 for as_dir in $PATH
2750 do
2751 IFS=$as_save_IFS
2752 test -z "$as_dir" && as_dir=.
2753 for ac_exec_ext in '' $ac_executable_extensions; do
2754 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2755 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2756 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2757 break 2
2758 fi
2759 done
2760 done
2761 IFS=$as_save_IFS
2762
2763 fi
2764 fi
2765 CC=$ac_cv_prog_CC
2766 if test -n "$CC"; then
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2768 $as_echo "$CC" >&6; }
2769 else
2770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2771 $as_echo "no" >&6; }
2772 fi
2773
2774
2775 test -n "$CC" && break
2776 done
2777 fi
2778 if test -z "$CC"; then
2779 ac_ct_CC=$CC
2780 for ac_prog in cl.exe
2781 do
2782 # Extract the first word of "$ac_prog", so it can be a program name with args.
2783 set dummy $ac_prog; ac_word=$2
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2785 $as_echo_n "checking for $ac_word... " >&6; }
2786 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2787 $as_echo_n "(cached) " >&6
2788 else
2789 if test -n "$ac_ct_CC"; then
2790 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2791 else
2792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2793 for as_dir in $PATH
2794 do
2795 IFS=$as_save_IFS
2796 test -z "$as_dir" && as_dir=.
2797 for ac_exec_ext in '' $ac_executable_extensions; do
2798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2799 ac_cv_prog_ac_ct_CC="$ac_prog"
2800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2801 break 2
2802 fi
2803 done
2804 done
2805 IFS=$as_save_IFS
2806
2807 fi
2808 fi
2809 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2810 if test -n "$ac_ct_CC"; then
2811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2812 $as_echo "$ac_ct_CC" >&6; }
2813 else
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2815 $as_echo "no" >&6; }
2816 fi
2817
2818
2819 test -n "$ac_ct_CC" && break
2820 done
2821
2822 if test "x$ac_ct_CC" = x; then
2823 CC=""
2824 else
2825 case $cross_compiling:$ac_tool_warned in
2826 yes:)
2827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2828 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2829 ac_tool_warned=yes ;;
2830 esac
2831 CC=$ac_ct_CC
2832 fi
2833 fi
2834
2835 fi
2836
2837
2838 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2839 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2840 as_fn_error $? "no acceptable C compiler found in \$PATH
2841 See \`config.log' for more details" "$LINENO" 5; }
2842
2843 # Provide some information about the compiler.
2844 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2845 set X $ac_compile
2846 ac_compiler=$2
2847 for ac_option in --version -v -V -qversion; do
2848 { { ac_try="$ac_compiler $ac_option >&5"
2849 case "(($ac_try" in
2850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2851 *) ac_try_echo=$ac_try;;
2852 esac
2853 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2854 $as_echo "$ac_try_echo"; } >&5
2855 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2856 ac_status=$?
2857 if test -s conftest.err; then
2858 sed '10a\
2859 ... rest of stderr output deleted ...
2860 10q' conftest.err >conftest.er1
2861 cat conftest.er1 >&5
2862 fi
2863 rm -f conftest.er1 conftest.err
2864 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2865 test $ac_status = 0; }
2866 done
2867
2868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2869 /* end confdefs.h. */
2870
2871 int
2872 main ()
2873 {
2874
2875 ;
2876 return 0;
2877 }
2878 _ACEOF
2879 ac_clean_files_save=$ac_clean_files
2880 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2881 # Try to create an executable without -o first, disregard a.out.
2882 # It will help us diagnose broken compilers, and finding out an intuition
2883 # of exeext.
2884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2885 $as_echo_n "checking whether the C compiler works... " >&6; }
2886 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2887
2888 # The possible output files:
2889 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2890
2891 ac_rmfiles=
2892 for ac_file in $ac_files
2893 do
2894 case $ac_file in
2895 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2896 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2897 esac
2898 done
2899 rm -f $ac_rmfiles
2900
2901 if { { ac_try="$ac_link_default"
2902 case "(($ac_try" in
2903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2904 *) ac_try_echo=$ac_try;;
2905 esac
2906 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2907 $as_echo "$ac_try_echo"; } >&5
2908 (eval "$ac_link_default") 2>&5
2909 ac_status=$?
2910 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2911 test $ac_status = 0; }; then :
2912 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2913 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2914 # in a Makefile. We should not override ac_cv_exeext if it was cached,
2915 # so that the user can short-circuit this test for compilers unknown to
2916 # Autoconf.
2917 for ac_file in $ac_files ''
2918 do
2919 test -f "$ac_file" || continue
2920 case $ac_file in
2921 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2922 ;;
2923 [ab].out )
2924 # We found the default executable, but exeext='' is most
2925 # certainly right.
2926 break;;
2927 *.* )
2928 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2929 then :; else
2930 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2931 fi
2932 # We set ac_cv_exeext here because the later test for it is not
2933 # safe: cross compilers may not add the suffix if given an `-o'
2934 # argument, so we may need to know it at that point already.
2935 # Even if this section looks crufty: it has the advantage of
2936 # actually working.
2937 break;;
2938 * )
2939 break;;
2940 esac
2941 done
2942 test "$ac_cv_exeext" = no && ac_cv_exeext=
2943
2944 else
2945 ac_file=''
2946 fi
2947 if test -z "$ac_file"; then :
2948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2949 $as_echo "no" >&6; }
2950 $as_echo "$as_me: failed program was:" >&5
2951 sed 's/^/| /' conftest.$ac_ext >&5
2952
2953 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2954 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2955 as_fn_error 77 "C compiler cannot create executables
2956 See \`config.log' for more details" "$LINENO" 5; }
2957 else
2958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2959 $as_echo "yes" >&6; }
2960 fi
2961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2962 $as_echo_n "checking for C compiler default output file name... " >&6; }
2963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2964 $as_echo "$ac_file" >&6; }
2965 ac_exeext=$ac_cv_exeext
2966
2967 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2968 ac_clean_files=$ac_clean_files_save
2969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2970 $as_echo_n "checking for suffix of executables... " >&6; }
2971 if { { ac_try="$ac_link"
2972 case "(($ac_try" in
2973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2974 *) ac_try_echo=$ac_try;;
2975 esac
2976 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2977 $as_echo "$ac_try_echo"; } >&5
2978 (eval "$ac_link") 2>&5
2979 ac_status=$?
2980 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2981 test $ac_status = 0; }; then :
2982 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2983 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2984 # work properly (i.e., refer to `conftest.exe'), while it won't with
2985 # `rm'.
2986 for ac_file in conftest.exe conftest conftest.*; do
2987 test -f "$ac_file" || continue
2988 case $ac_file in
2989 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2990 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2991 break;;
2992 * ) break;;
2993 esac
2994 done
2995 else
2996 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2997 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2998 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2999 See \`config.log' for more details" "$LINENO" 5; }
3000 fi
3001 rm -f conftest conftest$ac_cv_exeext
3002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3003 $as_echo "$ac_cv_exeext" >&6; }
3004
3005 rm -f conftest.$ac_ext
3006 EXEEXT=$ac_cv_exeext
3007 ac_exeext=$EXEEXT
3008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3009 /* end confdefs.h. */
3010 #include <stdio.h>
3011 int
3012 main ()
3013 {
3014 FILE *f = fopen ("conftest.out", "w");
3015 return ferror (f) || fclose (f) != 0;
3016
3017 ;
3018 return 0;
3019 }
3020 _ACEOF
3021 ac_clean_files="$ac_clean_files conftest.out"
3022 # Check that the compiler produces executables we can run. If not, either
3023 # the compiler is broken, or we cross compile.
3024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3025 $as_echo_n "checking whether we are cross compiling... " >&6; }
3026 if test "$cross_compiling" != yes; then
3027 { { ac_try="$ac_link"
3028 case "(($ac_try" in
3029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3030 *) ac_try_echo=$ac_try;;
3031 esac
3032 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3033 $as_echo "$ac_try_echo"; } >&5
3034 (eval "$ac_link") 2>&5
3035 ac_status=$?
3036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3037 test $ac_status = 0; }
3038 if { ac_try='./conftest$ac_cv_exeext'
3039 { { case "(($ac_try" in
3040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3041 *) ac_try_echo=$ac_try;;
3042 esac
3043 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3044 $as_echo "$ac_try_echo"; } >&5
3045 (eval "$ac_try") 2>&5
3046 ac_status=$?
3047 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3048 test $ac_status = 0; }; }; then
3049 cross_compiling=no
3050 else
3051 if test "$cross_compiling" = maybe; then
3052 cross_compiling=yes
3053 else
3054 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3055 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3056 as_fn_error $? "cannot run C compiled programs.
3057 If you meant to cross compile, use \`--host'.
3058 See \`config.log' for more details" "$LINENO" 5; }
3059 fi
3060 fi
3061 fi
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3063 $as_echo "$cross_compiling" >&6; }
3064
3065 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3066 ac_clean_files=$ac_clean_files_save
3067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3068 $as_echo_n "checking for suffix of object files... " >&6; }
3069 if ${ac_cv_objext+:} false; then :
3070 $as_echo_n "(cached) " >&6
3071 else
3072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3073 /* end confdefs.h. */
3074
3075 int
3076 main ()
3077 {
3078
3079 ;
3080 return 0;
3081 }
3082 _ACEOF
3083 rm -f conftest.o conftest.obj
3084 if { { ac_try="$ac_compile"
3085 case "(($ac_try" in
3086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3087 *) ac_try_echo=$ac_try;;
3088 esac
3089 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3090 $as_echo "$ac_try_echo"; } >&5
3091 (eval "$ac_compile") 2>&5
3092 ac_status=$?
3093 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3094 test $ac_status = 0; }; then :
3095 for ac_file in conftest.o conftest.obj conftest.*; do
3096 test -f "$ac_file" || continue;
3097 case $ac_file in
3098 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3099 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3100 break;;
3101 esac
3102 done
3103 else
3104 $as_echo "$as_me: failed program was:" >&5
3105 sed 's/^/| /' conftest.$ac_ext >&5
3106
3107 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3108 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3109 as_fn_error $? "cannot compute suffix of object files: cannot compile
3110 See \`config.log' for more details" "$LINENO" 5; }
3111 fi
3112 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3113 fi
3114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3115 $as_echo "$ac_cv_objext" >&6; }
3116 OBJEXT=$ac_cv_objext
3117 ac_objext=$OBJEXT
3118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3119 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3120 if ${ac_cv_c_compiler_gnu+:} false; then :
3121 $as_echo_n "(cached) " >&6
3122 else
3123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3124 /* end confdefs.h. */
3125
3126 int
3127 main ()
3128 {
3129 #ifndef __GNUC__
3130 choke me
3131 #endif
3132
3133 ;
3134 return 0;
3135 }
3136 _ACEOF
3137 if ac_fn_c_try_compile "$LINENO"; then :
3138 ac_compiler_gnu=yes
3139 else
3140 ac_compiler_gnu=no
3141 fi
3142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3143 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3144
3145 fi
3146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3147 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3148 if test $ac_compiler_gnu = yes; then
3149 GCC=yes
3150 else
3151 GCC=
3152 fi
3153 ac_test_CFLAGS=${CFLAGS+set}
3154 ac_save_CFLAGS=$CFLAGS
3155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3156 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3157 if ${ac_cv_prog_cc_g+:} false; then :
3158 $as_echo_n "(cached) " >&6
3159 else
3160 ac_save_c_werror_flag=$ac_c_werror_flag
3161 ac_c_werror_flag=yes
3162 ac_cv_prog_cc_g=no
3163 CFLAGS="-g"
3164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3165 /* end confdefs.h. */
3166
3167 int
3168 main ()
3169 {
3170
3171 ;
3172 return 0;
3173 }
3174 _ACEOF
3175 if ac_fn_c_try_compile "$LINENO"; then :
3176 ac_cv_prog_cc_g=yes
3177 else
3178 CFLAGS=""
3179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3180 /* end confdefs.h. */
3181
3182 int
3183 main ()
3184 {
3185
3186 ;
3187 return 0;
3188 }
3189 _ACEOF
3190 if ac_fn_c_try_compile "$LINENO"; then :
3191
3192 else
3193 ac_c_werror_flag=$ac_save_c_werror_flag
3194 CFLAGS="-g"
3195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3196 /* end confdefs.h. */
3197
3198 int
3199 main ()
3200 {
3201
3202 ;
3203 return 0;
3204 }
3205 _ACEOF
3206 if ac_fn_c_try_compile "$LINENO"; then :
3207 ac_cv_prog_cc_g=yes
3208 fi
3209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3210 fi
3211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3212 fi
3213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3214 ac_c_werror_flag=$ac_save_c_werror_flag
3215 fi
3216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3217 $as_echo "$ac_cv_prog_cc_g" >&6; }
3218 if test "$ac_test_CFLAGS" = set; then
3219 CFLAGS=$ac_save_CFLAGS
3220 elif test $ac_cv_prog_cc_g = yes; then
3221 if test "$GCC" = yes; then
3222 CFLAGS="-g -O2"
3223 else
3224 CFLAGS="-g"
3225 fi
3226 else
3227 if test "$GCC" = yes; then
3228 CFLAGS="-O2"
3229 else
3230 CFLAGS=
3231 fi
3232 fi
3233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3234 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3235 if ${ac_cv_prog_cc_c89+:} false; then :
3236 $as_echo_n "(cached) " >&6
3237 else
3238 ac_cv_prog_cc_c89=no
3239 ac_save_CC=$CC
3240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3241 /* end confdefs.h. */
3242 #include <stdarg.h>
3243 #include <stdio.h>
3244 struct stat;
3245 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3246 struct buf { int x; };
3247 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3248 static char *e (p, i)
3249 char **p;
3250 int i;
3251 {
3252 return p[i];
3253 }
3254 static char *f (char * (*g) (char **, int), char **p, ...)
3255 {
3256 char *s;
3257 va_list v;
3258 va_start (v,p);
3259 s = g (p, va_arg (v,int));
3260 va_end (v);
3261 return s;
3262 }
3263
3264 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3265 function prototypes and stuff, but not '\xHH' hex character constants.
3266 These don't provoke an error unfortunately, instead are silently treated
3267 as 'x'. The following induces an error, until -std is added to get
3268 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3269 array size at least. It's necessary to write '\x00'==0 to get something
3270 that's true only with -std. */
3271 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3272
3273 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3274 inside strings and character constants. */
3275 #define FOO(x) 'x'
3276 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3277
3278 int test (int i, double x);
3279 struct s1 {int (*f) (int a);};
3280 struct s2 {int (*f) (double a);};
3281 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3282 int argc;
3283 char **argv;
3284 int
3285 main ()
3286 {
3287 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3288 ;
3289 return 0;
3290 }
3291 _ACEOF
3292 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3293 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3294 do
3295 CC="$ac_save_CC $ac_arg"
3296 if ac_fn_c_try_compile "$LINENO"; then :
3297 ac_cv_prog_cc_c89=$ac_arg
3298 fi
3299 rm -f core conftest.err conftest.$ac_objext
3300 test "x$ac_cv_prog_cc_c89" != "xno" && break
3301 done
3302 rm -f conftest.$ac_ext
3303 CC=$ac_save_CC
3304
3305 fi
3306 # AC_CACHE_VAL
3307 case "x$ac_cv_prog_cc_c89" in
3308 x)
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3310 $as_echo "none needed" >&6; } ;;
3311 xno)
3312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3313 $as_echo "unsupported" >&6; } ;;
3314 *)
3315 CC="$CC $ac_cv_prog_cc_c89"
3316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3317 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3318 esac
3319 if test "x$ac_cv_prog_cc_c89" != xno; then :
3320
3321 fi
3322
3323 ac_ext=c
3324 ac_cpp='$CPP $CPPFLAGS'
3325 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3326 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3327 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3328
3329
3330
3331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
3332 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
3333
3334 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
3335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
3336 $as_echo "loading" >&6; }
3337 . "${TCL_BIN_DIR}/tclConfig.sh"
3338 else
3339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
3340 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
3341 fi
3342
3343 # eval is required to do the TCL_DBGX substitution
3344 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
3345 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
3346
3347 # If the TCL_BIN_DIR is the build directory (not the install directory),
3348 # then set the common variable name to the value of the build variables.
3349 # For example, the variable TCL_LIB_SPEC will be set to the value
3350 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
3351 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
3352 # installed and uninstalled version of Tcl.
3353 if test -f "${TCL_BIN_DIR}/Makefile" ; then
3354 TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
3355 TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
3356 TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
3357 elif test "`uname -s`" = "Darwin"; then
3358 # If Tcl was built as a framework, attempt to use the libraries
3359 # from the framework at the given location so that linking works
3360 # against Tcl.framework installed in an arbitrary location.
3361 case ${TCL_DEFS} in
3362 *TCL_FRAMEWORK*)
3363 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
3364 for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
3365 "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
3366 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
3367 TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
3368 break
3369 fi
3370 done
3371 fi
3372 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
3373 TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}" | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
3374 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
3375 fi
3376 ;;
3377 esac
3378 fi
3379
3380 # eval is required to do the TCL_DBGX substitution
3381 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
3382 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
3383 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
3384 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking platform" >&5
3400 $as_echo_n "checking platform... " >&6; }
3401 hold_cc=$CC; CC="$TCL_CC"
3402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3403 /* end confdefs.h. */
3404
3405 int
3406 main ()
3407 {
3408
3409 #ifdef _WIN32
3410 #error win32
3411 #endif
3412
3413 ;
3414 return 0;
3415 }
3416 _ACEOF
3417 if ac_fn_c_try_compile "$LINENO"; then :
3418
3419 TEA_PLATFORM="unix"
3420 CYGPATH=echo
3421
3422 else
3423
3424 TEA_PLATFORM="windows"
3425 # Extract the first word of "cygpath", so it can be a program name with args.
3426 set dummy cygpath; ac_word=$2
3427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3428 $as_echo_n "checking for $ac_word... " >&6; }
3429 if ${ac_cv_prog_CYGPATH+:} false; then :
3430 $as_echo_n "(cached) " >&6
3431 else
3432 if test -n "$CYGPATH"; then
3433 ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
3434 else
3435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3436 for as_dir in $PATH
3437 do
3438 IFS=$as_save_IFS
3439 test -z "$as_dir" && as_dir=.
3440 for ac_exec_ext in '' $ac_executable_extensions; do
3441 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3442 ac_cv_prog_CYGPATH="cygpath -m"
3443 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3444 break 2
3445 fi
3446 done
3447 done
3448 IFS=$as_save_IFS
3449
3450 test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
3451 fi
3452 fi
3453 CYGPATH=$ac_cv_prog_CYGPATH
3454 if test -n "$CYGPATH"; then
3455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
3456 $as_echo "$CYGPATH" >&6; }
3457 else
3458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3459 $as_echo "no" >&6; }
3460 fi
3461
3462
3463
3464 fi
3465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3466 CC=$hold_cc
3467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEA_PLATFORM" >&5
3468 $as_echo "$TEA_PLATFORM" >&6; }
3469
3470 # The BUILD_$pkg is to define the correct extern storage class
3471 # handling when making this package
3472
3473 cat >>confdefs.h <<_ACEOF
3474 #define BUILD_${PACKAGE_NAME} /**/
3475 _ACEOF
3476
3477 # Do this here as we have fully defined TEA_PLATFORM now
3478 if test "${TEA_PLATFORM}" = "windows" ; then
3479 EXEEXT=".exe"
3480 CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
3481 fi
3482
3483 # TEA specific:
3484
3485
3486
3487
3488
3489
3490
3491
3492 #--------------------------------------------------------------------
3493 # Load the tkConfig.sh file
3494 #--------------------------------------------------------------------
3495
3496
3497 #
3498 # Ok, lets find the tk configuration
3499 # First, look for one uninstalled.
3500 # the alternative search directory is invoked by --with-tk
3501 #
3502
3503 if test x"${no_tk}" = x ; then
3504 # we reset no_tk in case something fails here
3505 no_tk=true
3506
3507 # Check whether --with-tk was given.
3508 if test "${with_tk+set}" = set; then :
3509 withval=$with_tk; with_tkconfig="${withval}"
3510 fi
3511
3512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
3513 $as_echo_n "checking for Tk configuration... " >&6; }
3514 if ${ac_cv_c_tkconfig+:} false; then :
3515 $as_echo_n "(cached) " >&6
3516 else
3517
3518
3519 # First check to see if --with-tkconfig was specified.
3520 if test x"${with_tkconfig}" != x ; then
3521 case "${with_tkconfig}" in
3522 */tkConfig.sh )
3523 if test -f "${with_tkconfig}"; then
3524 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&5
3525 $as_echo "$as_me: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&2;}
3526 with_tkconfig="`echo "${with_tkconfig}" | sed 's!/tkConfig\.sh$!!'`"
3527 fi ;;
3528 esac
3529 if test -f "${with_tkconfig}/tkConfig.sh" ; then
3530 ac_cv_c_tkconfig="`(cd "${with_tkconfig}"; pwd)`"
3531 else
3532 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
3533 fi
3534 fi
3535
3536 # then check for a private Tk library
3537 if test x"${ac_cv_c_tkconfig}" = x ; then
3538 for i in \
3539 ../tk \
3540 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
3541 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
3542 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
3543 ../../tk \
3544 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
3545 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
3546 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
3547 ../../../tk \
3548 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
3549 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
3550 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
3551 if test "${TEA_PLATFORM}" = "windows" \
3552 -a -f "$i/win/tkConfig.sh" ; then
3553 ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
3554 break
3555 fi
3556 if test -f "$i/unix/tkConfig.sh" ; then
3557 ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
3558 break
3559 fi
3560 done
3561 fi
3562
3563 # on Darwin, check in Framework installation locations
3564 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
3565 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
3566 `ls -d /Library/Frameworks 2>/dev/null` \
3567 `ls -d /Network/Library/Frameworks 2>/dev/null` \
3568 `ls -d /System/Library/Frameworks 2>/dev/null` \
3569 ; do
3570 if test -f "$i/Tk.framework/tkConfig.sh" ; then
3571 ac_cv_c_tkconfig="`(cd $i/Tk.framework; pwd)`"
3572 break
3573 fi
3574 done
3575 fi
3576
3577 # check in a few common install locations
3578 if test x"${ac_cv_c_tkconfig}" = x ; then
3579 for i in `ls -d ${libdir} 2>/dev/null` \
3580 `ls -d ${exec_prefix}/lib 2>/dev/null` \
3581 `ls -d ${prefix}/lib 2>/dev/null` \
3582 `ls -d /usr/local/lib 2>/dev/null` \
3583 `ls -d /usr/contrib/lib 2>/dev/null` \
3584 `ls -d /usr/lib 2>/dev/null` \
3585 `ls -d /usr/lib64 2>/dev/null` \
3586 ; do
3587 if test -f "$i/tkConfig.sh" ; then
3588 ac_cv_c_tkconfig="`(cd $i; pwd)`"
3589 break
3590 fi
3591 done
3592 fi
3593
3594 # TEA specific: on Windows, check in common installation locations
3595 if test "${TEA_PLATFORM}" = "windows" \
3596 -a x"${ac_cv_c_tkconfig}" = x ; then
3597 for i in `ls -d C:/Tcl/lib 2>/dev/null` \
3598 `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
3599 ; do
3600 if test -f "$i/tkConfig.sh" ; then
3601 ac_cv_c_tkconfig="`(cd $i; pwd)`"
3602 break
3603 fi
3604 done
3605 fi
3606
3607 # check in a few other private locations
3608 if test x"${ac_cv_c_tkconfig}" = x ; then
3609 for i in \
3610 ${srcdir}/../tk \
3611 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
3612 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
3613 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
3614 if test "${TEA_PLATFORM}" = "windows" \
3615 -a -f "$i/win/tkConfig.sh" ; then
3616 ac_cv_c_tkconfig="`(cd $i/win; pwd)`"
3617 break
3618 fi
3619 if test -f "$i/unix/tkConfig.sh" ; then
3620 ac_cv_c_tkconfig="`(cd $i/unix; pwd)`"
3621 break
3622 fi
3623 done
3624 fi
3625
3626 fi
3627
3628
3629 if test x"${ac_cv_c_tkconfig}" = x ; then
3630 TK_BIN_DIR="# no Tk configs found"
3631 as_fn_error $? "Can't find Tk configuration definitions. Use --with-tk to specify a directory containing tkConfig.sh" "$LINENO" 5
3632 else
3633 no_tk=
3634 TK_BIN_DIR="${ac_cv_c_tkconfig}"
3635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
3636 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3637 fi
3638 fi
3639
3640
3641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
3642 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
3643
3644 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
3645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
3646 $as_echo "loading" >&6; }
3647 . "${TK_BIN_DIR}/tkConfig.sh"
3648 else
3649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
3650 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
3651 fi
3652
3653 # eval is required to do the TK_DBGX substitution
3654 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
3655 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
3656
3657 # If the TK_BIN_DIR is the build directory (not the install directory),
3658 # then set the common variable name to the value of the build variables.
3659 # For example, the variable TK_LIB_SPEC will be set to the value
3660 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
3661 # instead of TK_BUILD_LIB_SPEC since it will work with both an
3662 # installed and uninstalled version of Tcl.
3663 if test -f "${TK_BIN_DIR}/Makefile" ; then
3664 TK_LIB_SPEC="${TK_BUILD_LIB_SPEC}"
3665 TK_STUB_LIB_SPEC="${TK_BUILD_STUB_LIB_SPEC}"
3666 TK_STUB_LIB_PATH="${TK_BUILD_STUB_LIB_PATH}"
3667 elif test "`uname -s`" = "Darwin"; then
3668 # If Tk was built as a framework, attempt to use the libraries
3669 # from the framework at the given location so that linking works
3670 # against Tk.framework installed in an arbitrary location.
3671 case ${TK_DEFS} in
3672 *TK_FRAMEWORK*)
3673 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
3674 for i in "`cd "${TK_BIN_DIR}"; pwd`" \
3675 "`cd "${TK_BIN_DIR}"/../..; pwd`"; do
3676 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
3677 TK_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TK_LIB_FILE}"
3678 break
3679 fi
3680 done
3681 fi
3682 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
3683 TK_STUB_LIB_SPEC="-L` echo "${TK_BIN_DIR}" | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
3684 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
3685 fi
3686 ;;
3687 esac
3688 fi
3689
3690 # eval is required to do the TK_DBGX substitution
3691 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
3692 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
3693 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
3694 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
3695
3696 # TEA specific: Ensure windowingsystem is defined
3697 if test "${TEA_PLATFORM}" = "unix" ; then
3698 case ${TK_DEFS} in
3699 *MAC_OSX_TK*)
3700
3701 $as_echo "#define MAC_OSX_TK 1" >>confdefs.h
3702
3703 TEA_WINDOWINGSYSTEM="aqua"
3704 ;;
3705 *)
3706 TEA_WINDOWINGSYSTEM="x11"
3707 ;;
3708 esac
3709 elif test "${TEA_PLATFORM}" = "windows" ; then
3710 TEA_WINDOWINGSYSTEM="win32"
3711 fi
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725 # TEA specific:
3726
3727
3728
3729
3730
3731 #
3732 # Ok, lets find the itcl configuration
3733 # First, look for one uninstalled.
3734 # the alternative search directory is invoked by --with-itcl
3735 #
3736
3737 if test x"${no_itcl}" = x ; then
3738 # we reset no_itcl in case something fails here
3739 no_itcl=true
3740
3741 # Check whether --with-itcl was given.
3742 if test "${with_itcl+set}" = set; then :
3743 withval=$with_itcl; with_itclconfig=${withval}
3744 fi
3745
3746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for itcl configuration" >&5
3747 $as_echo_n "checking for itcl configuration... " >&6; }
3748 if ${ac_cv_c_itclconfig+:} false; then :
3749 $as_echo_n "(cached) " >&6
3750 else
3751
3752
3753 # First check to see if --with-itcl was specified.
3754 if test x"${with_itclconfig}" != x ; then
3755 case ${with_itclconfig} in
3756 */itclConfig.sh )
3757 if test -f ${with_itclconfig}; then
3758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-itcl argument should refer to directory containing itclConfig.sh, not to itclConfig.sh itself" >&5
3759 $as_echo "$as_me: WARNING: --with-itcl argument should refer to directory containing itclConfig.sh, not to itclConfig.sh itself" >&2;}
3760 with_itclconfig=`echo ${with_itclconfig} | sed 's!/itclConfig\.sh$!!'`
3761 fi;;
3762 esac
3763 if test -f "${with_itclconfig}/itclConfig.sh" ; then
3764 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
3765 else
3766 as_fn_error $? "${with_itclconfig} directory doesn't contain itclConfig.sh" "$LINENO" 5
3767 fi
3768 fi
3769
3770 # then check for a private itcl installation
3771 if test x"${ac_cv_c_itclconfig}" = x ; then
3772 for i in \
3773 ../itcl \
3774 `ls -dr ../itcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
3775 `ls -dr ../itcl*[0-9].[0-9][0-9] 2>/dev/null` \
3776 `ls -dr ../itcl*[0-9].[0-9] 2>/dev/null` \
3777 `ls -dr ../itcl*[0-9].[0-9]* 2>/dev/null` \
3778 ../../itcl \
3779 `ls -dr ../../itcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
3780 `ls -dr ../../itcl*[0-9].[0-9][0-9] 2>/dev/null` \
3781 `ls -dr ../../itcl*[0-9].[0-9] 2>/dev/null` \
3782 `ls -dr ../../itcl*[0-9].[0-9]* 2>/dev/null` \
3783 ../../../itcl \
3784 `ls -dr ../../../itcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
3785 `ls -dr ../../../itcl*[0-9].[0-9][0-9] 2>/dev/null` \
3786 `ls -dr ../../../itcl*[0-9].[0-9] 2>/dev/null` \
3787 `ls -dr ../../../itcl*[0-9].[0-9]* 2>/dev/null` \
3788 ${srcdir}/../itcl \
3789 `ls -dr ${srcdir}/../itcl*[0-9].[0-9]*.[0-9]* 2>/dev/null` \
3790 `ls -dr ${srcdir}/../itcl*[0-9].[0-9][0-9] 2>/dev/null` \
3791 `ls -dr ${srcdir}/../itcl*[0-9].[0-9] 2>/dev/null` \
3792 `ls -dr ${srcdir}/../itcl*[0-9].[0-9]* 2>/dev/null` \
3793 ; do
3794 if test -f "$i/itclConfig.sh" ; then
3795 ac_cv_c_itclconfig=`(cd $i; pwd)`
3796 break
3797 fi
3798 if test -f "$i/unix/itclConfig.sh" ; then
3799 ac_cv_c_itclconfig=`(cd $i/unix; pwd)`
3800 break
3801 fi
3802 done
3803 fi
3804
3805 # check in a few common install locations
3806 if test x"${ac_cv_c_itclconfig}" = x ; then
3807 for i in `ls -d ${libdir} 2>/dev/null` \
3808 `ls -d ${exec_prefix}/lib 2>/dev/null` \
3809 `ls -d ${prefix}/lib 2>/dev/null` \
3810 `ls -d /usr/local/lib 2>/dev/null` \
3811 `ls -d /usr/contrib/lib 2>/dev/null` \
3812 `ls -d /usr/lib 2>/dev/null` \
3813 `ls -d /usr/lib64 2>/dev/null` \
3814 ; do
3815 if test -f "$i/itclConfig.sh" ; then
3816 ac_cv_c_itclconfig=`(cd $i; pwd)`
3817 break
3818 fi
3819 done
3820 fi
3821
3822 fi
3823
3824
3825 if test x"${ac_cv_c_itclconfig}" = x ; then
3826 itcl_BIN_DIR="# no itcl configs found"
3827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find itcl configuration definitions" >&5
3828 $as_echo "$as_me: WARNING: Cannot find itcl configuration definitions" >&2;}
3829 exit 0
3830 else
3831 no_itcl=
3832 itcl_BIN_DIR=${ac_cv_c_itclconfig}
3833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $itcl_BIN_DIR/itclConfig.sh" >&5
3834 $as_echo "found $itcl_BIN_DIR/itclConfig.sh" >&6; }
3835 fi
3836 fi
3837
3838
3839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${itcl_BIN_DIR}/itclConfig.sh" >&5
3840 $as_echo_n "checking for existence of ${itcl_BIN_DIR}/itclConfig.sh... " >&6; }
3841
3842 if test -f "${itcl_BIN_DIR}/itclConfig.sh" ; then
3843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
3844 $as_echo "loading" >&6; }
3845 . "${itcl_BIN_DIR}/itclConfig.sh"
3846 else
3847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
3848 $as_echo "file not found" >&6; }
3849 fi
3850
3851 #
3852 # If the itcl_BIN_DIR is the build directory (not the install directory),
3853 # then set the common variable name to the value of the build variables.
3854 # For example, the variable itcl_LIB_SPEC will be set to the value
3855 # of itcl_BUILD_LIB_SPEC. An extension should make use of itcl_LIB_SPEC
3856 # instead of itcl_BUILD_LIB_SPEC since it will work with both an
3857 # installed and uninstalled version of Tcl.
3858 #
3859
3860 if test -f "${itcl_BIN_DIR}/Makefile" ; then
3861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found Makefile - using build library specs for itcl" >&5
3862 $as_echo "$as_me: WARNING: Found Makefile - using build library specs for itcl" >&2;}
3863 itcl_LIB_SPEC=${itcl_BUILD_LIB_SPEC}
3864 itcl_STUB_LIB_SPEC=${itcl_BUILD_STUB_LIB_SPEC}
3865 itcl_STUB_LIB_PATH=${itcl_BUILD_STUB_LIB_PATH}
3866 itcl_INCLUDE_SPEC=${itcl_BUILD_INCLUDE_SPEC}
3867 itcl_LIBRARY_PATH=${itcl_LIBRARY_PATH}
3868 fi
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881 # Allow the caller to prevent this auto-check by specifying any 2nd arg
3882 if test "x" = x; then :
3883
3884 # Check both upper and lower-case variants
3885 # If a dev wanted non-stubs libs, this function could take an option
3886 # to not use _STUB in the paths below
3887 if test "x${itcl_STUB_LIB_SPEC}" = x; then :
3888
3889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking For ITCL_STUB library for LIBS" >&5
3890 $as_echo_n "checking For ITCL_STUB library for LIBS... " >&6; }
3891 # This simplifies the use of stub libraries by automatically adding
3892 # the stub lib to your path. Normally this would add to SHLIB_LD_LIBS,
3893 # but this is called before CONFIG_CFLAGS. More importantly, this adds
3894 # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
3895 if test "x${ITCL_STUB_LIB_SPEC}" != "x" ; then
3896 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
3897
3898 vars="\"`${CYGPATH} ${ITCL_STUB_LIB_PATH}`\""
3899 for i in $vars; do
3900 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
3901 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
3902 i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
3903 fi
3904 PKG_LIBS="$PKG_LIBS $i"
3905 done
3906
3907
3908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ITCL_STUB_LIB_PATH ${ITCL_STUB_LIB_PATH}" >&5
3909 $as_echo "using ITCL_STUB_LIB_PATH ${ITCL_STUB_LIB_PATH}" >&6; }
3910 else
3911
3912 vars="${ITCL_STUB_LIB_SPEC}"
3913 for i in $vars; do
3914 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
3915 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
3916 i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
3917 fi
3918 PKG_LIBS="$PKG_LIBS $i"
3919 done
3920
3921
3922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ITCL_STUB_LIB_SPEC ${ITCL_STUB_LIB_SPEC}" >&5
3923 $as_echo "using ITCL_STUB_LIB_SPEC ${ITCL_STUB_LIB_SPEC}" >&6; }
3924 fi
3925 else
3926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
3927 $as_echo "file not found" >&6; }
3928 fi
3929
3930 else
3931
3932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking For itcl_STUB library for LIBS" >&5
3933 $as_echo_n "checking For itcl_STUB library for LIBS... " >&6; }
3934 # This simplifies the use of stub libraries by automatically adding
3935 # the stub lib to your path. Normally this would add to SHLIB_LD_LIBS,
3936 # but this is called before CONFIG_CFLAGS. More importantly, this adds
3937 # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD.
3938 if test "x${itcl_STUB_LIB_SPEC}" != "x" ; then
3939 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
3940
3941 vars="\"`${CYGPATH} ${itcl_STUB_LIB_PATH}`\""
3942 for i in $vars; do
3943 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
3944 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
3945 i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
3946 fi
3947 PKG_LIBS="$PKG_LIBS $i"
3948 done
3949
3950
3951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: using itcl_STUB_LIB_PATH ${itcl_STUB_LIB_PATH}" >&5
3952 $as_echo "using itcl_STUB_LIB_PATH ${itcl_STUB_LIB_PATH}" >&6; }
3953 else
3954
3955 vars="${itcl_STUB_LIB_SPEC}"
3956 for i in $vars; do
3957 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
3958 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
3959 i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
3960 fi
3961 PKG_LIBS="$PKG_LIBS $i"
3962 done
3963
3964
3965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: using itcl_STUB_LIB_SPEC ${itcl_STUB_LIB_SPEC}" >&5
3966 $as_echo "using itcl_STUB_LIB_SPEC ${itcl_STUB_LIB_SPEC}" >&6; }
3967 fi
3968 else
3969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5
3970 $as_echo "file not found" >&6; }
3971 fi
3972
3973 fi
3974
3975 fi
3976
3977
3978 ITCL_INCLUDES="-I\"`${CYGPATH} ${itcl_SRC_DIR}/generic`\""
3979
3980 #--------------------------------------------------------------------
3981 # Handle the --prefix=... option by defaulting to what Tcl gave.
3982 # Must be called after TEA_LOAD_TCLCONFIG and before $prefix is used.
3983 #--------------------------------------------------------------------
3984
3985
3986 if test "${prefix}" = "NONE"; then
3987 prefix_default=yes
3988 if test x"${TCL_PREFIX}" != x; then
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
3990 $as_echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
3991 prefix=${TCL_PREFIX}
3992 else
3993 { $as_echo "$as_me:${as_lineno-$LINENO}: --prefix defaulting to /usr/local" >&5
3994 $as_echo "$as_me: --prefix defaulting to /usr/local" >&6;}
3995 prefix=/usr/local
3996 fi
3997 fi
3998 if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
3999 -o x"${exec_prefix_default}" = x"yes" ; then
4000 if test x"${TCL_EXEC_PREFIX}" != x; then
4001 { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
4002 $as_echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
4003 exec_prefix=${TCL_EXEC_PREFIX}
4004 else
4005 { $as_echo "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to ${prefix}" >&5
4006 $as_echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
4007 exec_prefix=$prefix
4008 fi
4009 fi
4010
4011
4012 #------------------------------------------------------------------------
4013 # Standard compiler checks.
4014 # This sets up CC by using the CC env var, or looks for gcc otherwise.
4015 # This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
4016 # the basic setup necessary to compile executables.
4017 #------------------------------------------------------------------------
4018
4019
4020 # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
4021 # in this macro, they need to go into TEA_SETUP_COMPILER instead.
4022
4023 ac_ext=c
4024 ac_cpp='$CPP $CPPFLAGS'
4025 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4026 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4027 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4028 if test -n "$ac_tool_prefix"; then
4029 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4030 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4032 $as_echo_n "checking for $ac_word... " >&6; }
4033 if ${ac_cv_prog_CC+:} false; then :
4034 $as_echo_n "(cached) " >&6
4035 else
4036 if test -n "$CC"; then
4037 ac_cv_prog_CC="$CC" # Let the user override the test.
4038 else
4039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4040 for as_dir in $PATH
4041 do
4042 IFS=$as_save_IFS
4043 test -z "$as_dir" && as_dir=.
4044 for ac_exec_ext in '' $ac_executable_extensions; do
4045 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4046 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4048 break 2
4049 fi
4050 done
4051 done
4052 IFS=$as_save_IFS
4053
4054 fi
4055 fi
4056 CC=$ac_cv_prog_CC
4057 if test -n "$CC"; then
4058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4059 $as_echo "$CC" >&6; }
4060 else
4061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4062 $as_echo "no" >&6; }
4063 fi
4064
4065
4066 fi
4067 if test -z "$ac_cv_prog_CC"; then
4068 ac_ct_CC=$CC
4069 # Extract the first word of "gcc", so it can be a program name with args.
4070 set dummy gcc; ac_word=$2
4071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4072 $as_echo_n "checking for $ac_word... " >&6; }
4073 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4074 $as_echo_n "(cached) " >&6
4075 else
4076 if test -n "$ac_ct_CC"; then
4077 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4078 else
4079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4080 for as_dir in $PATH
4081 do
4082 IFS=$as_save_IFS
4083 test -z "$as_dir" && as_dir=.
4084 for ac_exec_ext in '' $ac_executable_extensions; do
4085 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4086 ac_cv_prog_ac_ct_CC="gcc"
4087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4088 break 2
4089 fi
4090 done
4091 done
4092 IFS=$as_save_IFS
4093
4094 fi
4095 fi
4096 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4097 if test -n "$ac_ct_CC"; then
4098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4099 $as_echo "$ac_ct_CC" >&6; }
4100 else
4101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4102 $as_echo "no" >&6; }
4103 fi
4104
4105 if test "x$ac_ct_CC" = x; then
4106 CC=""
4107 else
4108 case $cross_compiling:$ac_tool_warned in
4109 yes:)
4110 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4111 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4112 ac_tool_warned=yes ;;
4113 esac
4114 CC=$ac_ct_CC
4115 fi
4116 else
4117 CC="$ac_cv_prog_CC"
4118 fi
4119
4120 if test -z "$CC"; then
4121 if test -n "$ac_tool_prefix"; then
4122 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4123 set dummy ${ac_tool_prefix}cc; ac_word=$2
4124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4125 $as_echo_n "checking for $ac_word... " >&6; }
4126 if ${ac_cv_prog_CC+:} false; then :
4127 $as_echo_n "(cached) " >&6
4128 else
4129 if test -n "$CC"; then
4130 ac_cv_prog_CC="$CC" # Let the user override the test.
4131 else
4132 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4133 for as_dir in $PATH
4134 do
4135 IFS=$as_save_IFS
4136 test -z "$as_dir" && as_dir=.
4137 for ac_exec_ext in '' $ac_executable_extensions; do
4138 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4139 ac_cv_prog_CC="${ac_tool_prefix}cc"
4140 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4141 break 2
4142 fi
4143 done
4144 done
4145 IFS=$as_save_IFS
4146
4147 fi
4148 fi
4149 CC=$ac_cv_prog_CC
4150 if test -n "$CC"; then
4151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4152 $as_echo "$CC" >&6; }
4153 else
4154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4155 $as_echo "no" >&6; }
4156 fi
4157
4158
4159 fi
4160 fi
4161 if test -z "$CC"; then
4162 # Extract the first word of "cc", so it can be a program name with args.
4163 set dummy cc; ac_word=$2
4164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4165 $as_echo_n "checking for $ac_word... " >&6; }
4166 if ${ac_cv_prog_CC+:} false; then :
4167 $as_echo_n "(cached) " >&6
4168 else
4169 if test -n "$CC"; then
4170 ac_cv_prog_CC="$CC" # Let the user override the test.
4171 else
4172 ac_prog_rejected=no
4173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4174 for as_dir in $PATH
4175 do
4176 IFS=$as_save_IFS
4177 test -z "$as_dir" && as_dir=.
4178 for ac_exec_ext in '' $ac_executable_extensions; do
4179 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4180 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4181 ac_prog_rejected=yes
4182 continue
4183 fi
4184 ac_cv_prog_CC="cc"
4185 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4186 break 2
4187 fi
4188 done
4189 done
4190 IFS=$as_save_IFS
4191
4192 if test $ac_prog_rejected = yes; then
4193 # We found a bogon in the path, so make sure we never use it.
4194 set dummy $ac_cv_prog_CC
4195 shift
4196 if test $# != 0; then
4197 # We chose a different compiler from the bogus one.
4198 # However, it has the same basename, so the bogon will be chosen
4199 # first if we set CC to just the basename; use the full file name.
4200 shift
4201 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4202 fi
4203 fi
4204 fi
4205 fi
4206 CC=$ac_cv_prog_CC
4207 if test -n "$CC"; then
4208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4209 $as_echo "$CC" >&6; }
4210 else
4211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4212 $as_echo "no" >&6; }
4213 fi
4214
4215
4216 fi
4217 if test -z "$CC"; then
4218 if test -n "$ac_tool_prefix"; then
4219 for ac_prog in cl.exe
4220 do
4221 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4222 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4224 $as_echo_n "checking for $ac_word... " >&6; }
4225 if ${ac_cv_prog_CC+:} false; then :
4226 $as_echo_n "(cached) " >&6
4227 else
4228 if test -n "$CC"; then
4229 ac_cv_prog_CC="$CC" # Let the user override the test.
4230 else
4231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4232 for as_dir in $PATH
4233 do
4234 IFS=$as_save_IFS
4235 test -z "$as_dir" && as_dir=.
4236 for ac_exec_ext in '' $ac_executable_extensions; do
4237 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4238 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4239 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4240 break 2
4241 fi
4242 done
4243 done
4244 IFS=$as_save_IFS
4245
4246 fi
4247 fi
4248 CC=$ac_cv_prog_CC
4249 if test -n "$CC"; then
4250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4251 $as_echo "$CC" >&6; }
4252 else
4253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4254 $as_echo "no" >&6; }
4255 fi
4256
4257
4258 test -n "$CC" && break
4259 done
4260 fi
4261 if test -z "$CC"; then
4262 ac_ct_CC=$CC
4263 for ac_prog in cl.exe
4264 do
4265 # Extract the first word of "$ac_prog", so it can be a program name with args.
4266 set dummy $ac_prog; ac_word=$2
4267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4268 $as_echo_n "checking for $ac_word... " >&6; }
4269 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4270 $as_echo_n "(cached) " >&6
4271 else
4272 if test -n "$ac_ct_CC"; then
4273 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4274 else
4275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4276 for as_dir in $PATH
4277 do
4278 IFS=$as_save_IFS
4279 test -z "$as_dir" && as_dir=.
4280 for ac_exec_ext in '' $ac_executable_extensions; do
4281 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4282 ac_cv_prog_ac_ct_CC="$ac_prog"
4283 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4284 break 2
4285 fi
4286 done
4287 done
4288 IFS=$as_save_IFS
4289
4290 fi
4291 fi
4292 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4293 if test -n "$ac_ct_CC"; then
4294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4295 $as_echo "$ac_ct_CC" >&6; }
4296 else
4297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4298 $as_echo "no" >&6; }
4299 fi
4300
4301
4302 test -n "$ac_ct_CC" && break
4303 done
4304
4305 if test "x$ac_ct_CC" = x; then
4306 CC=""
4307 else
4308 case $cross_compiling:$ac_tool_warned in
4309 yes:)
4310 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4311 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4312 ac_tool_warned=yes ;;
4313 esac
4314 CC=$ac_ct_CC
4315 fi
4316 fi
4317
4318 fi
4319
4320
4321 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4322 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4323 as_fn_error $? "no acceptable C compiler found in \$PATH
4324 See \`config.log' for more details" "$LINENO" 5; }
4325
4326 # Provide some information about the compiler.
4327 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4328 set X $ac_compile
4329 ac_compiler=$2
4330 for ac_option in --version -v -V -qversion; do
4331 { { ac_try="$ac_compiler $ac_option >&5"
4332 case "(($ac_try" in
4333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4334 *) ac_try_echo=$ac_try;;
4335 esac
4336 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4337 $as_echo "$ac_try_echo"; } >&5
4338 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4339 ac_status=$?
4340 if test -s conftest.err; then
4341 sed '10a\
4342 ... rest of stderr output deleted ...
4343 10q' conftest.err >conftest.er1
4344 cat conftest.er1 >&5
4345 fi
4346 rm -f conftest.er1 conftest.err
4347 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4348 test $ac_status = 0; }
4349 done
4350
4351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4352 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4353 if ${ac_cv_c_compiler_gnu+:} false; then :
4354 $as_echo_n "(cached) " >&6
4355 else
4356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4357 /* end confdefs.h. */
4358
4359 int
4360 main ()
4361 {
4362 #ifndef __GNUC__
4363 choke me
4364 #endif
4365
4366 ;
4367 return 0;
4368 }
4369 _ACEOF
4370 if ac_fn_c_try_compile "$LINENO"; then :
4371 ac_compiler_gnu=yes
4372 else
4373 ac_compiler_gnu=no
4374 fi
4375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4376 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4377
4378 fi
4379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4380 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4381 if test $ac_compiler_gnu = yes; then
4382 GCC=yes
4383 else
4384 GCC=
4385 fi
4386 ac_test_CFLAGS=${CFLAGS+set}
4387 ac_save_CFLAGS=$CFLAGS
4388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4389 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4390 if ${ac_cv_prog_cc_g+:} false; then :
4391 $as_echo_n "(cached) " >&6
4392 else
4393 ac_save_c_werror_flag=$ac_c_werror_flag
4394 ac_c_werror_flag=yes
4395 ac_cv_prog_cc_g=no
4396 CFLAGS="-g"
4397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4398 /* end confdefs.h. */
4399
4400 int
4401 main ()
4402 {
4403
4404 ;
4405 return 0;
4406 }
4407 _ACEOF
4408 if ac_fn_c_try_compile "$LINENO"; then :
4409 ac_cv_prog_cc_g=yes
4410 else
4411 CFLAGS=""
4412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4413 /* end confdefs.h. */
4414
4415 int
4416 main ()
4417 {
4418
4419 ;
4420 return 0;
4421 }
4422 _ACEOF
4423 if ac_fn_c_try_compile "$LINENO"; then :
4424
4425 else
4426 ac_c_werror_flag=$ac_save_c_werror_flag
4427 CFLAGS="-g"
4428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4429 /* end confdefs.h. */
4430
4431 int
4432 main ()
4433 {
4434
4435 ;
4436 return 0;
4437 }
4438 _ACEOF
4439 if ac_fn_c_try_compile "$LINENO"; then :
4440 ac_cv_prog_cc_g=yes
4441 fi
4442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4443 fi
4444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4445 fi
4446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4447 ac_c_werror_flag=$ac_save_c_werror_flag
4448 fi
4449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4450 $as_echo "$ac_cv_prog_cc_g" >&6; }
4451 if test "$ac_test_CFLAGS" = set; then
4452 CFLAGS=$ac_save_CFLAGS
4453 elif test $ac_cv_prog_cc_g = yes; then
4454 if test "$GCC" = yes; then
4455 CFLAGS="-g -O2"
4456 else
4457 CFLAGS="-g"
4458 fi
4459 else
4460 if test "$GCC" = yes; then
4461 CFLAGS="-O2"
4462 else
4463 CFLAGS=
4464 fi
4465 fi
4466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4467 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4468 if ${ac_cv_prog_cc_c89+:} false; then :
4469 $as_echo_n "(cached) " >&6
4470 else
4471 ac_cv_prog_cc_c89=no
4472 ac_save_CC=$CC
4473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4474 /* end confdefs.h. */
4475 #include <stdarg.h>
4476 #include <stdio.h>
4477 struct stat;
4478 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4479 struct buf { int x; };
4480 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4481 static char *e (p, i)
4482 char **p;
4483 int i;
4484 {
4485 return p[i];
4486 }
4487 static char *f (char * (*g) (char **, int), char **p, ...)
4488 {
4489 char *s;
4490 va_list v;
4491 va_start (v,p);
4492 s = g (p, va_arg (v,int));
4493 va_end (v);
4494 return s;
4495 }
4496
4497 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4498 function prototypes and stuff, but not '\xHH' hex character constants.
4499 These don't provoke an error unfortunately, instead are silently treated
4500 as 'x'. The following induces an error, until -std is added to get
4501 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4502 array size at least. It's necessary to write '\x00'==0 to get something
4503 that's true only with -std. */
4504 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4505
4506 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4507 inside strings and character constants. */
4508 #define FOO(x) 'x'
4509 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4510
4511 int test (int i, double x);
4512 struct s1 {int (*f) (int a);};
4513 struct s2 {int (*f) (double a);};
4514 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4515 int argc;
4516 char **argv;
4517 int
4518 main ()
4519 {
4520 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4521 ;
4522 return 0;
4523 }
4524 _ACEOF
4525 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4526 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4527 do
4528 CC="$ac_save_CC $ac_arg"
4529 if ac_fn_c_try_compile "$LINENO"; then :
4530 ac_cv_prog_cc_c89=$ac_arg
4531 fi
4532 rm -f core conftest.err conftest.$ac_objext
4533 test "x$ac_cv_prog_cc_c89" != "xno" && break
4534 done
4535 rm -f conftest.$ac_ext
4536 CC=$ac_save_CC
4537
4538 fi
4539 # AC_CACHE_VAL
4540 case "x$ac_cv_prog_cc_c89" in
4541 x)
4542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4543 $as_echo "none needed" >&6; } ;;
4544 xno)
4545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4546 $as_echo "unsupported" >&6; } ;;
4547 *)
4548 CC="$CC $ac_cv_prog_cc_c89"
4549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4550 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4551 esac
4552 if test "x$ac_cv_prog_cc_c89" != xno; then :
4553
4554 fi
4555
4556 ac_ext=c
4557 ac_cpp='$CPP $CPPFLAGS'
4558 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4559 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4560 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4561
4562 ac_ext=c
4563 ac_cpp='$CPP $CPPFLAGS'
4564 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4565 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4566 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4568 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4569 # On Suns, sometimes $CPP names a directory.
4570 if test -n "$CPP" && test -d "$CPP"; then
4571 CPP=
4572 fi
4573 if test -z "$CPP"; then
4574 if ${ac_cv_prog_CPP+:} false; then :
4575 $as_echo_n "(cached) " >&6
4576 else
4577 # Double quotes because CPP needs to be expanded
4578 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4579 do
4580 ac_preproc_ok=false
4581 for ac_c_preproc_warn_flag in '' yes
4582 do
4583 # Use a header file that comes with gcc, so configuring glibc
4584 # with a fresh cross-compiler works.
4585 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4586 # <limits.h> exists even on freestanding compilers.
4587 # On the NeXT, cc -E runs the code through the compiler's parser,
4588 # not just through cpp. "Syntax error" is here to catch this case.
4589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4590 /* end confdefs.h. */
4591 #ifdef __STDC__
4592 # include <limits.h>
4593 #else
4594 # include <assert.h>
4595 #endif
4596 Syntax error
4597 _ACEOF
4598 if ac_fn_c_try_cpp "$LINENO"; then :
4599
4600 else
4601 # Broken: fails on valid input.
4602 continue
4603 fi
4604 rm -f conftest.err conftest.i conftest.$ac_ext
4605
4606 # OK, works on sane cases. Now check whether nonexistent headers
4607 # can be detected and how.
4608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4609 /* end confdefs.h. */
4610 #include <ac_nonexistent.h>
4611 _ACEOF
4612 if ac_fn_c_try_cpp "$LINENO"; then :
4613 # Broken: success on invalid input.
4614 continue
4615 else
4616 # Passes both tests.
4617 ac_preproc_ok=:
4618 break
4619 fi
4620 rm -f conftest.err conftest.i conftest.$ac_ext
4621
4622 done
4623 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4624 rm -f conftest.i conftest.err conftest.$ac_ext
4625 if $ac_preproc_ok; then :
4626 break
4627 fi
4628
4629 done
4630 ac_cv_prog_CPP=$CPP
4631
4632 fi
4633 CPP=$ac_cv_prog_CPP
4634 else
4635 ac_cv_prog_CPP=$CPP
4636 fi
4637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4638 $as_echo "$CPP" >&6; }
4639 ac_preproc_ok=false
4640 for ac_c_preproc_warn_flag in '' yes
4641 do
4642 # Use a header file that comes with gcc, so configuring glibc
4643 # with a fresh cross-compiler works.
4644 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4645 # <limits.h> exists even on freestanding compilers.
4646 # On the NeXT, cc -E runs the code through the compiler's parser,
4647 # not just through cpp. "Syntax error" is here to catch this case.
4648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4649 /* end confdefs.h. */
4650 #ifdef __STDC__
4651 # include <limits.h>
4652 #else
4653 # include <assert.h>
4654 #endif
4655 Syntax error
4656 _ACEOF
4657 if ac_fn_c_try_cpp "$LINENO"; then :
4658
4659 else
4660 # Broken: fails on valid input.
4661 continue
4662 fi
4663 rm -f conftest.err conftest.i conftest.$ac_ext
4664
4665 # OK, works on sane cases. Now check whether nonexistent headers
4666 # can be detected and how.
4667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4668 /* end confdefs.h. */
4669 #include <ac_nonexistent.h>
4670 _ACEOF
4671 if ac_fn_c_try_cpp "$LINENO"; then :
4672 # Broken: success on invalid input.
4673 continue
4674 else
4675 # Passes both tests.
4676 ac_preproc_ok=:
4677 break
4678 fi
4679 rm -f conftest.err conftest.i conftest.$ac_ext
4680
4681 done
4682 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4683 rm -f conftest.i conftest.err conftest.$ac_ext
4684 if $ac_preproc_ok; then :
4685
4686 else
4687 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4688 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4689 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4690 See \`config.log' for more details" "$LINENO" 5; }
4691 fi
4692
4693 ac_ext=c
4694 ac_cpp='$CPP $CPPFLAGS'
4695 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4696 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4697 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4698
4699
4700 INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
4701 INSTALL_DATA_DIR='${INSTALL} -d -m 755'
4702 INSTALL_DATA='${INSTALL} -m 644'
4703 INSTALL_PROGRAM='${INSTALL}'
4704 INSTALL_SCRIPT='${INSTALL}'
4705 INSTALL_LIBRARY='${INSTALL_DATA}'
4706
4707
4708
4709
4710
4711
4712
4713
4714 #--------------------------------------------------------------------
4715 # Checks to see if the make program sets the $MAKE variable.
4716 #--------------------------------------------------------------------
4717
4718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4719 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4720 set x ${MAKE-make}
4721 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4722 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4723 $as_echo_n "(cached) " >&6
4724 else
4725 cat >conftest.make <<\_ACEOF
4726 SHELL = /bin/sh
4727 all:
4728 @echo '@@@%%%=$(MAKE)=@@@%%%'
4729 _ACEOF
4730 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4731 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4732 *@@@%%%=?*=@@@%%%*)
4733 eval ac_cv_prog_make_${ac_make}_set=yes;;
4734 *)
4735 eval ac_cv_prog_make_${ac_make}_set=no;;
4736 esac
4737 rm -f conftest.make
4738 fi
4739 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4741 $as_echo "yes" >&6; }
4742 SET_MAKE=
4743 else
4744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4745 $as_echo "no" >&6; }
4746 SET_MAKE="MAKE=${MAKE-make}"
4747 fi
4748
4749
4750 #--------------------------------------------------------------------
4751 # Find ranlib
4752 #--------------------------------------------------------------------
4753
4754 if test -n "$ac_tool_prefix"; then
4755 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4756 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4758 $as_echo_n "checking for $ac_word... " >&6; }
4759 if ${ac_cv_prog_RANLIB+:} false; then :
4760 $as_echo_n "(cached) " >&6
4761 else
4762 if test -n "$RANLIB"; then
4763 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4764 else
4765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4766 for as_dir in $PATH
4767 do
4768 IFS=$as_save_IFS
4769 test -z "$as_dir" && as_dir=.
4770 for ac_exec_ext in '' $ac_executable_extensions; do
4771 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4772 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4773 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4774 break 2
4775 fi
4776 done
4777 done
4778 IFS=$as_save_IFS
4779
4780 fi
4781 fi
4782 RANLIB=$ac_cv_prog_RANLIB
4783 if test -n "$RANLIB"; then
4784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4785 $as_echo "$RANLIB" >&6; }
4786 else
4787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4788 $as_echo "no" >&6; }
4789 fi
4790
4791
4792 fi
4793 if test -z "$ac_cv_prog_RANLIB"; then
4794 ac_ct_RANLIB=$RANLIB
4795 # Extract the first word of "ranlib", so it can be a program name with args.
4796 set dummy ranlib; ac_word=$2
4797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4798 $as_echo_n "checking for $ac_word... " >&6; }
4799 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4800 $as_echo_n "(cached) " >&6
4801 else
4802 if test -n "$ac_ct_RANLIB"; then
4803 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4804 else
4805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4806 for as_dir in $PATH
4807 do
4808 IFS=$as_save_IFS
4809 test -z "$as_dir" && as_dir=.
4810 for ac_exec_ext in '' $ac_executable_extensions; do
4811 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4812 ac_cv_prog_ac_ct_RANLIB="ranlib"
4813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4814 break 2
4815 fi
4816 done
4817 done
4818 IFS=$as_save_IFS
4819
4820 fi
4821 fi
4822 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4823 if test -n "$ac_ct_RANLIB"; then
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4825 $as_echo "$ac_ct_RANLIB" >&6; }
4826 else
4827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4828 $as_echo "no" >&6; }
4829 fi
4830
4831 if test "x$ac_ct_RANLIB" = x; then
4832 RANLIB=""
4833 else
4834 case $cross_compiling:$ac_tool_warned in
4835 yes:)
4836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4837 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4838 ac_tool_warned=yes ;;
4839 esac
4840 RANLIB=$ac_ct_RANLIB
4841 fi
4842 else
4843 RANLIB="$ac_cv_prog_RANLIB"
4844 fi
4845
4846
4847 #--------------------------------------------------------------------
4848 # Determines the correct binary file extension (.o, .obj, .exe etc.)
4849 #--------------------------------------------------------------------
4850
4851
4852
4853
4854
4855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4856 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4857 if ${ac_cv_path_GREP+:} false; then :
4858 $as_echo_n "(cached) " >&6
4859 else
4860 if test -z "$GREP"; then
4861 ac_path_GREP_found=false
4862 # Loop through the user's path and test for each of PROGNAME-LIST
4863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4864 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4865 do
4866 IFS=$as_save_IFS
4867 test -z "$as_dir" && as_dir=.
4868 for ac_prog in grep ggrep; do
4869 for ac_exec_ext in '' $ac_executable_extensions; do
4870 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4871 as_fn_executable_p "$ac_path_GREP" || continue
4872 # Check for GNU ac_path_GREP and select it if it is found.
4873 # Check for GNU $ac_path_GREP
4874 case `"$ac_path_GREP" --version 2>&1` in
4875 *GNU*)
4876 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4877 *)
4878 ac_count=0
4879 $as_echo_n 0123456789 >"conftest.in"
4880 while :
4881 do
4882 cat "conftest.in" "conftest.in" >"conftest.tmp"
4883 mv "conftest.tmp" "conftest.in"
4884 cp "conftest.in" "conftest.nl"
4885 $as_echo 'GREP' >> "conftest.nl"
4886 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4887 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4888 as_fn_arith $ac_count + 1 && ac_count=$as_val
4889 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4890 # Best one so far, save it but keep looking for a better one
4891 ac_cv_path_GREP="$ac_path_GREP"
4892 ac_path_GREP_max=$ac_count
4893 fi
4894 # 10*(2^10) chars as input seems more than enough
4895 test $ac_count -gt 10 && break
4896 done
4897 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4898 esac
4899
4900 $ac_path_GREP_found && break 3
4901 done
4902 done
4903 done
4904 IFS=$as_save_IFS
4905 if test -z "$ac_cv_path_GREP"; then
4906 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4907 fi
4908 else
4909 ac_cv_path_GREP=$GREP
4910 fi
4911
4912 fi
4913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4914 $as_echo "$ac_cv_path_GREP" >&6; }
4915 GREP="$ac_cv_path_GREP"
4916
4917
4918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4919 $as_echo_n "checking for egrep... " >&6; }
4920 if ${ac_cv_path_EGREP+:} false; then :
4921 $as_echo_n "(cached) " >&6
4922 else
4923 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4924 then ac_cv_path_EGREP="$GREP -E"
4925 else
4926 if test -z "$EGREP"; then
4927 ac_path_EGREP_found=false
4928 # Loop through the user's path and test for each of PROGNAME-LIST
4929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4930 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4931 do
4932 IFS=$as_save_IFS
4933 test -z "$as_dir" && as_dir=.
4934 for ac_prog in egrep; do
4935 for ac_exec_ext in '' $ac_executable_extensions; do
4936 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4937 as_fn_executable_p "$ac_path_EGREP" || continue
4938 # Check for GNU ac_path_EGREP and select it if it is found.
4939 # Check for GNU $ac_path_EGREP
4940 case `"$ac_path_EGREP" --version 2>&1` in
4941 *GNU*)
4942 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4943 *)
4944 ac_count=0
4945 $as_echo_n 0123456789 >"conftest.in"
4946 while :
4947 do
4948 cat "conftest.in" "conftest.in" >"conftest.tmp"
4949 mv "conftest.tmp" "conftest.in"
4950 cp "conftest.in" "conftest.nl"
4951 $as_echo 'EGREP' >> "conftest.nl"
4952 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4953 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4954 as_fn_arith $ac_count + 1 && ac_count=$as_val
4955 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4956 # Best one so far, save it but keep looking for a better one
4957 ac_cv_path_EGREP="$ac_path_EGREP"
4958 ac_path_EGREP_max=$ac_count
4959 fi
4960 # 10*(2^10) chars as input seems more than enough
4961 test $ac_count -gt 10 && break
4962 done
4963 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4964 esac
4965
4966 $ac_path_EGREP_found && break 3
4967 done
4968 done
4969 done
4970 IFS=$as_save_IFS
4971 if test -z "$ac_cv_path_EGREP"; then
4972 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4973 fi
4974 else
4975 ac_cv_path_EGREP=$EGREP
4976 fi
4977
4978 fi
4979 fi
4980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4981 $as_echo "$ac_cv_path_EGREP" >&6; }
4982 EGREP="$ac_cv_path_EGREP"
4983
4984
4985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4986 $as_echo_n "checking for ANSI C header files... " >&6; }
4987 if ${ac_cv_header_stdc+:} false; then :
4988 $as_echo_n "(cached) " >&6
4989 else
4990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4991 /* end confdefs.h. */
4992 #include <stdlib.h>
4993 #include <stdarg.h>
4994 #include <string.h>
4995 #include <float.h>
4996
4997 int
4998 main ()
4999 {
5000
5001 ;
5002 return 0;
5003 }
5004 _ACEOF
5005 if ac_fn_c_try_compile "$LINENO"; then :
5006 ac_cv_header_stdc=yes
5007 else
5008 ac_cv_header_stdc=no
5009 fi
5010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5011
5012 if test $ac_cv_header_stdc = yes; then
5013 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5015 /* end confdefs.h. */
5016 #include <string.h>
5017
5018 _ACEOF
5019 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5020 $EGREP "memchr" >/dev/null 2>&1; then :
5021
5022 else
5023 ac_cv_header_stdc=no
5024 fi
5025 rm -f conftest*
5026
5027 fi
5028
5029 if test $ac_cv_header_stdc = yes; then
5030 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5032 /* end confdefs.h. */
5033 #include <stdlib.h>
5034
5035 _ACEOF
5036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5037 $EGREP "free" >/dev/null 2>&1; then :
5038
5039 else
5040 ac_cv_header_stdc=no
5041 fi
5042 rm -f conftest*
5043
5044 fi
5045
5046 if test $ac_cv_header_stdc = yes; then
5047 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5048 if test "$cross_compiling" = yes; then :
5049 :
5050 else
5051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5052 /* end confdefs.h. */
5053 #include <ctype.h>
5054 #include <stdlib.h>
5055 #if ((' ' & 0x0FF) == 0x020)
5056 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5057 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5058 #else
5059 # define ISLOWER(c) \
5060 (('a' <= (c) && (c) <= 'i') \
5061 || ('j' <= (c) && (c) <= 'r') \
5062 || ('s' <= (c) && (c) <= 'z'))
5063 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5064 #endif
5065
5066 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5067 int
5068 main ()
5069 {
5070 int i;
5071 for (i = 0; i < 256; i++)
5072 if (XOR (islower (i), ISLOWER (i))
5073 || toupper (i) != TOUPPER (i))
5074 return 2;
5075 return 0;
5076 }
5077 _ACEOF
5078 if ac_fn_c_try_run "$LINENO"; then :
5079
5080 else
5081 ac_cv_header_stdc=no
5082 fi
5083 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5084 conftest.$ac_objext conftest.beam conftest.$ac_ext
5085 fi
5086
5087 fi
5088 fi
5089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5090 $as_echo "$ac_cv_header_stdc" >&6; }
5091 if test $ac_cv_header_stdc = yes; then
5092
5093 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5094
5095 fi
5096
5097 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5098 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5099 inttypes.h stdint.h unistd.h
5100 do :
5101 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5102 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5103 "
5104 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5105 cat >>confdefs.h <<_ACEOF
5106 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5107 _ACEOF
5108
5109 fi
5110
5111 done
5112
5113
5114
5115 # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
5116
5117
5118 #------------------------------------------------------------------------
5119 # If we're using GCC, see if the compiler understands -pipe. If so, use it.
5120 # It makes compiling go faster. (This is only a performance feature.)
5121 #------------------------------------------------------------------------
5122
5123 if test -z "$no_pipe" -a -n "$GCC"; then
5124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5
5125 $as_echo_n "checking if the compiler understands -pipe... " >&6; }
5126 if ${tcl_cv_cc_pipe+:} false; then :
5127 $as_echo_n "(cached) " >&6
5128 else
5129
5130 hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
5131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5132 /* end confdefs.h. */
5133
5134 int
5135 main ()
5136 {
5137
5138 ;
5139 return 0;
5140 }
5141 _ACEOF
5142 if ac_fn_c_try_compile "$LINENO"; then :
5143 tcl_cv_cc_pipe=yes
5144 else
5145 tcl_cv_cc_pipe=no
5146 fi
5147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5148 CFLAGS=$hold_cflags
5149 fi
5150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5
5151 $as_echo "$tcl_cv_cc_pipe" >&6; }
5152 if test $tcl_cv_cc_pipe = yes; then
5153 CFLAGS="$CFLAGS -pipe"
5154 fi
5155 fi
5156
5157 #--------------------------------------------------------------------
5158 # Common compiler flag setup
5159 #--------------------------------------------------------------------
5160
5161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
5162 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
5163 if ${ac_cv_c_bigendian+:} false; then :
5164 $as_echo_n "(cached) " >&6
5165 else
5166 ac_cv_c_bigendian=unknown
5167 # See if we're dealing with a universal compiler.
5168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5169 /* end confdefs.h. */
5170 #ifndef __APPLE_CC__
5171 not a universal capable compiler
5172 #endif
5173 typedef int dummy;
5174
5175 _ACEOF
5176 if ac_fn_c_try_compile "$LINENO"; then :
5177
5178 # Check for potential -arch flags. It is not universal unless
5179 # there are at least two -arch flags with different values.
5180 ac_arch=
5181 ac_prev=
5182 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
5183 if test -n "$ac_prev"; then
5184 case $ac_word in
5185 i?86 | x86_64 | ppc | ppc64)
5186 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
5187 ac_arch=$ac_word
5188 else
5189 ac_cv_c_bigendian=universal
5190 break
5191 fi
5192 ;;
5193 esac
5194 ac_prev=
5195 elif test "x$ac_word" = "x-arch"; then
5196 ac_prev=arch
5197 fi
5198 done
5199 fi
5200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5201 if test $ac_cv_c_bigendian = unknown; then
5202 # See if sys/param.h defines the BYTE_ORDER macro.
5203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5204 /* end confdefs.h. */
5205 #include <sys/types.h>
5206 #include <sys/param.h>
5207
5208 int
5209 main ()
5210 {
5211 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
5212 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
5213 && LITTLE_ENDIAN)
5214 bogus endian macros
5215 #endif
5216
5217 ;
5218 return 0;
5219 }
5220 _ACEOF
5221 if ac_fn_c_try_compile "$LINENO"; then :
5222 # It does; now see whether it defined to BIG_ENDIAN or not.
5223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5224 /* end confdefs.h. */
5225 #include <sys/types.h>
5226 #include <sys/param.h>
5227
5228 int
5229 main ()
5230 {
5231 #if BYTE_ORDER != BIG_ENDIAN
5232 not big endian
5233 #endif
5234
5235 ;
5236 return 0;
5237 }
5238 _ACEOF
5239 if ac_fn_c_try_compile "$LINENO"; then :
5240 ac_cv_c_bigendian=yes
5241 else
5242 ac_cv_c_bigendian=no
5243 fi
5244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5245 fi
5246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5247 fi
5248 if test $ac_cv_c_bigendian = unknown; then
5249 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
5250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5251 /* end confdefs.h. */
5252 #include <limits.h>
5253
5254 int
5255 main ()
5256 {
5257 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
5258 bogus endian macros
5259 #endif
5260
5261 ;
5262 return 0;
5263 }
5264 _ACEOF
5265 if ac_fn_c_try_compile "$LINENO"; then :
5266 # It does; now see whether it defined to _BIG_ENDIAN or not.
5267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5268 /* end confdefs.h. */
5269 #include <limits.h>
5270
5271 int
5272 main ()
5273 {
5274 #ifndef _BIG_ENDIAN
5275 not big endian
5276 #endif
5277
5278 ;
5279 return 0;
5280 }
5281 _ACEOF
5282 if ac_fn_c_try_compile "$LINENO"; then :
5283 ac_cv_c_bigendian=yes
5284 else
5285 ac_cv_c_bigendian=no
5286 fi
5287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5288 fi
5289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5290 fi
5291 if test $ac_cv_c_bigendian = unknown; then
5292 # Compile a test program.
5293 if test "$cross_compiling" = yes; then :
5294 # Try to guess by grepping values from an object file.
5295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5296 /* end confdefs.h. */
5297 short int ascii_mm[] =
5298 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
5299 short int ascii_ii[] =
5300 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
5301 int use_ascii (int i) {
5302 return ascii_mm[i] + ascii_ii[i];
5303 }
5304 short int ebcdic_ii[] =
5305 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
5306 short int ebcdic_mm[] =
5307 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
5308 int use_ebcdic (int i) {
5309 return ebcdic_mm[i] + ebcdic_ii[i];
5310 }
5311 extern int foo;
5312
5313 int
5314 main ()
5315 {
5316 return use_ascii (foo) == use_ebcdic (foo);
5317 ;
5318 return 0;
5319 }
5320 _ACEOF
5321 if ac_fn_c_try_compile "$LINENO"; then :
5322 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
5323 ac_cv_c_bigendian=yes
5324 fi
5325 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
5326 if test "$ac_cv_c_bigendian" = unknown; then
5327 ac_cv_c_bigendian=no
5328 else
5329 # finding both strings is unlikely to happen, but who knows?
5330 ac_cv_c_bigendian=unknown
5331 fi
5332 fi
5333 fi
5334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5335 else
5336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5337 /* end confdefs.h. */
5338 $ac_includes_default
5339 int
5340 main ()
5341 {
5342
5343 /* Are we little or big endian? From Harbison&Steele. */
5344 union
5345 {
5346 long int l;
5347 char c[sizeof (long int)];
5348 } u;
5349 u.l = 1;
5350 return u.c[sizeof (long int) - 1] == 1;
5351
5352 ;
5353 return 0;
5354 }
5355 _ACEOF
5356 if ac_fn_c_try_run "$LINENO"; then :
5357 ac_cv_c_bigendian=no
5358 else
5359 ac_cv_c_bigendian=yes
5360 fi
5361 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5362 conftest.$ac_objext conftest.beam conftest.$ac_ext
5363 fi
5364
5365 fi
5366 fi
5367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
5368 $as_echo "$ac_cv_c_bigendian" >&6; }
5369 case $ac_cv_c_bigendian in #(
5370 yes)
5371 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
5372 ;; #(
5373 no)
5374 ;; #(
5375 universal)
5376
5377 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5378
5379 ;; #(
5380 *)
5381 as_fn_error $? "unknown endianness
5382 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
5383 esac
5384
5385 if test "${TEA_PLATFORM}" = "unix" ; then
5386
5387 #--------------------------------------------------------------------
5388 # On a few very rare systems, all of the libm.a stuff is
5389 # already in libc.a. Set compiler flags accordingly.
5390 # Also, Linux requires the "ieee" library for math to work
5391 # right (and it must appear before "-lm").
5392 #--------------------------------------------------------------------
5393
5394 ac_fn_c_check_func "$LINENO" "sin" "ac_cv_func_sin"
5395 if test "x$ac_cv_func_sin" = xyes; then :
5396 MATH_LIBS=""
5397 else
5398 MATH_LIBS="-lm"
5399 fi
5400
5401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lieee" >&5
5402 $as_echo_n "checking for main in -lieee... " >&6; }
5403 if ${ac_cv_lib_ieee_main+:} false; then :
5404 $as_echo_n "(cached) " >&6
5405 else
5406 ac_check_lib_save_LIBS=$LIBS
5407 LIBS="-lieee $LIBS"
5408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5409 /* end confdefs.h. */
5410
5411
5412 int
5413 main ()
5414 {
5415 return main ();
5416 ;
5417 return 0;
5418 }
5419 _ACEOF
5420 if ac_fn_c_try_link "$LINENO"; then :
5421 ac_cv_lib_ieee_main=yes
5422 else
5423 ac_cv_lib_ieee_main=no
5424 fi
5425 rm -f core conftest.err conftest.$ac_objext \
5426 conftest$ac_exeext conftest.$ac_ext
5427 LIBS=$ac_check_lib_save_LIBS
5428 fi
5429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee_main" >&5
5430 $as_echo "$ac_cv_lib_ieee_main" >&6; }
5431 if test "x$ac_cv_lib_ieee_main" = xyes; then :
5432 MATH_LIBS="-lieee $MATH_LIBS"
5433 fi
5434
5435
5436 #--------------------------------------------------------------------
5437 # Interactive UNIX requires -linet instead of -lsocket, plus it
5438 # needs net/errno.h to define the socket-related error codes.
5439 #--------------------------------------------------------------------
5440
5441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -linet" >&5
5442 $as_echo_n "checking for main in -linet... " >&6; }
5443 if ${ac_cv_lib_inet_main+:} false; then :
5444 $as_echo_n "(cached) " >&6
5445 else
5446 ac_check_lib_save_LIBS=$LIBS
5447 LIBS="-linet $LIBS"
5448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5449 /* end confdefs.h. */
5450
5451
5452 int
5453 main ()
5454 {
5455 return main ();
5456 ;
5457 return 0;
5458 }
5459 _ACEOF
5460 if ac_fn_c_try_link "$LINENO"; then :
5461 ac_cv_lib_inet_main=yes
5462 else
5463 ac_cv_lib_inet_main=no
5464 fi
5465 rm -f core conftest.err conftest.$ac_objext \
5466 conftest$ac_exeext conftest.$ac_ext
5467 LIBS=$ac_check_lib_save_LIBS
5468 fi
5469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_main" >&5
5470 $as_echo "$ac_cv_lib_inet_main" >&6; }
5471 if test "x$ac_cv_lib_inet_main" = xyes; then :
5472 LIBS="$LIBS -linet"
5473 fi
5474
5475 ac_fn_c_check_header_mongrel "$LINENO" "net/errno.h" "ac_cv_header_net_errno_h" "$ac_includes_default"
5476 if test "x$ac_cv_header_net_errno_h" = xyes; then :
5477
5478
5479 $as_echo "#define HAVE_NET_ERRNO_H 1" >>confdefs.h
5480
5481 fi
5482
5483
5484
5485 #--------------------------------------------------------------------
5486 # Check for the existence of the -lsocket and -lnsl libraries.
5487 # The order here is important, so that they end up in the right
5488 # order in the command line generated by make. Here are some
5489 # special considerations:
5490 # 1. Use "connect" and "accept" to check for -lsocket, and
5491 # "gethostbyname" to check for -lnsl.
5492 # 2. Use each function name only once: can't redo a check because
5493 # autoconf caches the results of the last check and won't redo it.
5494 # 3. Use -lnsl and -lsocket only if they supply procedures that
5495 # aren't already present in the normal libraries. This is because
5496 # IRIX 5.2 has libraries, but they aren't needed and they're
5497 # bogus: they goof up name resolution if used.
5498 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
5499 # To get around this problem, check for both libraries together
5500 # if -lsocket doesn't work by itself.
5501 #--------------------------------------------------------------------
5502
5503 tcl_checkBoth=0
5504 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
5505 if test "x$ac_cv_func_connect" = xyes; then :
5506 tcl_checkSocket=0
5507 else
5508 tcl_checkSocket=1
5509 fi
5510
5511 if test "$tcl_checkSocket" = 1; then
5512 ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt"
5513 if test "x$ac_cv_func_setsockopt" = xyes; then :
5514
5515 else
5516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5
5517 $as_echo_n "checking for setsockopt in -lsocket... " >&6; }
5518 if ${ac_cv_lib_socket_setsockopt+:} false; then :
5519 $as_echo_n "(cached) " >&6
5520 else
5521 ac_check_lib_save_LIBS=$LIBS
5522 LIBS="-lsocket $LIBS"
5523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5524 /* end confdefs.h. */
5525
5526 /* Override any GCC internal prototype to avoid an error.
5527 Use char because int might match the return type of a GCC
5528 builtin and then its argument prototype would still apply. */
5529 #ifdef __cplusplus
5530 extern "C"
5531 #endif
5532 char setsockopt ();
5533 int
5534 main ()
5535 {
5536 return setsockopt ();
5537 ;
5538 return 0;
5539 }
5540 _ACEOF
5541 if ac_fn_c_try_link "$LINENO"; then :
5542 ac_cv_lib_socket_setsockopt=yes
5543 else
5544 ac_cv_lib_socket_setsockopt=no
5545 fi
5546 rm -f core conftest.err conftest.$ac_objext \
5547 conftest$ac_exeext conftest.$ac_ext
5548 LIBS=$ac_check_lib_save_LIBS
5549 fi
5550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5
5551 $as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
5552 if test "x$ac_cv_lib_socket_setsockopt" = xyes; then :
5553 LIBS="$LIBS -lsocket"
5554 else
5555 tcl_checkBoth=1
5556 fi
5557
5558 fi
5559
5560 fi
5561 if test "$tcl_checkBoth" = 1; then
5562 tk_oldLibs=$LIBS
5563 LIBS="$LIBS -lsocket -lnsl"
5564 ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept"
5565 if test "x$ac_cv_func_accept" = xyes; then :
5566 tcl_checkNsl=0
5567 else
5568 LIBS=$tk_oldLibs
5569 fi
5570
5571 fi
5572 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
5573 if test "x$ac_cv_func_gethostbyname" = xyes; then :
5574
5575 else
5576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
5577 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
5578 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
5579 $as_echo_n "(cached) " >&6
5580 else
5581 ac_check_lib_save_LIBS=$LIBS
5582 LIBS="-lnsl $LIBS"
5583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5584 /* end confdefs.h. */
5585
5586 /* Override any GCC internal prototype to avoid an error.
5587 Use char because int might match the return type of a GCC
5588 builtin and then its argument prototype would still apply. */
5589 #ifdef __cplusplus
5590 extern "C"
5591 #endif
5592 char gethostbyname ();
5593 int
5594 main ()
5595 {
5596 return gethostbyname ();
5597 ;
5598 return 0;
5599 }
5600 _ACEOF
5601 if ac_fn_c_try_link "$LINENO"; then :
5602 ac_cv_lib_nsl_gethostbyname=yes
5603 else
5604 ac_cv_lib_nsl_gethostbyname=no
5605 fi
5606 rm -f core conftest.err conftest.$ac_objext \
5607 conftest$ac_exeext conftest.$ac_ext
5608 LIBS=$ac_check_lib_save_LIBS
5609 fi
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
5611 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
5612 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
5613 LIBS="$LIBS -lnsl"
5614 fi
5615
5616 fi
5617
5618
5619 # TEA specific: Don't perform the eval of the libraries here because
5620 # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
5621
5622 TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
5623
5624
5625
5626
5627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dirent.h" >&5
5628 $as_echo_n "checking dirent.h... " >&6; }
5629 if ${tcl_cv_dirent_h+:} false; then :
5630 $as_echo_n "(cached) " >&6
5631 else
5632
5633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5634 /* end confdefs.h. */
5635 #include <sys/types.h>
5636 #include <dirent.h>
5637 int
5638 main ()
5639 {
5640
5641 #ifndef _POSIX_SOURCE
5642 # ifdef __Lynx__
5643 /*
5644 * Generate compilation error to make the test fail: Lynx headers
5645 * are only valid if really in the POSIX environment.
5646 */
5647
5648 missing_procedure();
5649 # endif
5650 #endif
5651 DIR *d;
5652 struct dirent *entryPtr;
5653 char *p;
5654 d = opendir("foobar");
5655 entryPtr = readdir(d);
5656 p = entryPtr->d_name;
5657 closedir(d);
5658
5659 ;
5660 return 0;
5661 }
5662 _ACEOF
5663 if ac_fn_c_try_link "$LINENO"; then :
5664 tcl_cv_dirent_h=yes
5665 else
5666 tcl_cv_dirent_h=no
5667 fi
5668 rm -f core conftest.err conftest.$ac_objext \
5669 conftest$ac_exeext conftest.$ac_ext
5670 fi
5671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_dirent_h" >&5
5672 $as_echo "$tcl_cv_dirent_h" >&6; }
5673
5674 if test $tcl_cv_dirent_h = no; then
5675
5676 $as_echo "#define NO_DIRENT_H 1" >>confdefs.h
5677
5678 fi
5679
5680 # TEA specific:
5681 ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
5682 if test "x$ac_cv_header_errno_h" = xyes; then :
5683
5684 else
5685
5686 $as_echo "#define NO_ERRNO_H 1" >>confdefs.h
5687
5688 fi
5689
5690
5691 ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default"
5692 if test "x$ac_cv_header_float_h" = xyes; then :
5693
5694 else
5695
5696 $as_echo "#define NO_FLOAT_H 1" >>confdefs.h
5697
5698 fi
5699
5700
5701 ac_fn_c_check_header_mongrel "$LINENO" "values.h" "ac_cv_header_values_h" "$ac_includes_default"
5702 if test "x$ac_cv_header_values_h" = xyes; then :
5703
5704 else
5705
5706 $as_echo "#define NO_VALUES_H 1" >>confdefs.h
5707
5708 fi
5709
5710
5711 ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default"
5712 if test "x$ac_cv_header_limits_h" = xyes; then :
5713
5714 $as_echo "#define HAVE_LIMITS_H 1" >>confdefs.h
5715
5716 else
5717
5718 $as_echo "#define NO_LIMITS_H 1" >>confdefs.h
5719
5720 fi
5721
5722
5723 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
5724 if test "x$ac_cv_header_stdlib_h" = xyes; then :
5725 tcl_ok=1
5726 else
5727 tcl_ok=0
5728 fi
5729
5730
5731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5732 /* end confdefs.h. */
5733 #include <stdlib.h>
5734
5735 _ACEOF
5736 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5737 $EGREP "strtol" >/dev/null 2>&1; then :
5738
5739 else
5740 tcl_ok=0
5741 fi
5742 rm -f conftest*
5743
5744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5745 /* end confdefs.h. */
5746 #include <stdlib.h>
5747
5748 _ACEOF
5749 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5750 $EGREP "strtoul" >/dev/null 2>&1; then :
5751
5752 else
5753 tcl_ok=0
5754 fi
5755 rm -f conftest*
5756
5757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5758 /* end confdefs.h. */
5759 #include <stdlib.h>
5760
5761 _ACEOF
5762 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5763 $EGREP "strtod" >/dev/null 2>&1; then :
5764
5765 else
5766 tcl_ok=0
5767 fi
5768 rm -f conftest*
5769
5770 if test $tcl_ok = 0; then
5771
5772 $as_echo "#define NO_STDLIB_H 1" >>confdefs.h
5773
5774 fi
5775 ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
5776 if test "x$ac_cv_header_string_h" = xyes; then :
5777 tcl_ok=1
5778 else
5779 tcl_ok=0
5780 fi
5781
5782
5783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5784 /* end confdefs.h. */
5785 #include <string.h>
5786
5787 _ACEOF
5788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5789 $EGREP "strstr" >/dev/null 2>&1; then :
5790
5791 else
5792 tcl_ok=0
5793 fi
5794 rm -f conftest*
5795
5796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5797 /* end confdefs.h. */
5798 #include <string.h>
5799
5800 _ACEOF
5801 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5802 $EGREP "strerror" >/dev/null 2>&1; then :
5803
5804 else
5805 tcl_ok=0
5806 fi
5807 rm -f conftest*
5808
5809
5810 # See also memmove check below for a place where NO_STRING_H can be
5811 # set and why.
5812
5813 if test $tcl_ok = 0; then
5814
5815 $as_echo "#define NO_STRING_H 1" >>confdefs.h
5816
5817 fi
5818
5819 ac_fn_c_check_header_mongrel "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
5820 if test "x$ac_cv_header_sys_wait_h" = xyes; then :
5821
5822 else
5823
5824 $as_echo "#define NO_SYS_WAIT_H 1" >>confdefs.h
5825
5826 fi
5827
5828
5829 ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
5830 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
5831
5832 else
5833
5834 $as_echo "#define NO_DLFCN_H 1" >>confdefs.h
5835
5836 fi
5837
5838
5839
5840 # OS/390 lacks sys/param.h (and doesn't need it, by chance).
5841 for ac_header in sys/param.h
5842 do :
5843 ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
5844 if test "x$ac_cv_header_sys_param_h" = xyes; then :
5845 cat >>confdefs.h <<_ACEOF
5846 #define HAVE_SYS_PARAM_H 1
5847 _ACEOF
5848
5849 fi
5850
5851 done
5852
5853
5854 # Let the user call this, because if it triggers, they will
5855 # need a compat/strtod.c that is correct. Users can also
5856 # use Tcl_GetDouble(FromObj) instead.
5857 #TEA_BUGGY_STRTOD
5858 fi
5859
5860
5861 #-----------------------------------------------------------------------
5862 # __CHANGE__
5863 # Specify the C source files to compile in TEA_ADD_SOURCES,
5864 # public headers that need to be installed in TEA_ADD_HEADERS,
5865 # stub library C source files to compile in TEA_ADD_STUB_SOURCES,
5866 # and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
5867 # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
5868 # and PKG_TCL_SOURCES.
5869 #-----------------------------------------------------------------------
5870
5871
5872 vars="itk_cmds.c
5873 itk_option.c
5874 itk_archetype.c
5875 itk_util.c
5876 itkStubInit.c"
5877 for i in $vars; do
5878 case $i in
5879 \$*)
5880 # allow $-var names
5881 PKG_SOURCES="$PKG_SOURCES $i"
5882 PKG_OBJECTS="$PKG_OBJECTS $i"
5883 ;;
5884 *)
5885 # check for existence - allows for generic/win/unix VPATH
5886 # To add more dirs here (like 'src'), you have to update VPATH
5887 # in Makefile.in as well
5888 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
5889 -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
5890 -a ! -f "${srcdir}/macosx/$i" \
5891 ; then
5892 as_fn_error $? "could not find source file '$i'" "$LINENO" 5
5893 fi
5894 PKG_SOURCES="$PKG_SOURCES $i"
5895 # this assumes it is in a VPATH dir
5896 i=`basename $i`
5897 # handle user calling this before or after TEA_SETUP_COMPILER
5898 if test x"${OBJEXT}" != x ; then
5899 j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
5900 else
5901 j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
5902 fi
5903 PKG_OBJECTS="$PKG_OBJECTS $j"
5904 ;;
5905 esac
5906 done
5907
5908
5909
5910
5911 vars="generic/itk.h generic/itkDecls.h"
5912 for i in $vars; do
5913 # check for existence, be strict because it is installed
5914 if test ! -f "${srcdir}/$i" ; then
5915 as_fn_error $? "could not find header file '${srcdir}/$i'" "$LINENO" 5
5916 fi
5917 PKG_HEADERS="$PKG_HEADERS $i"
5918 done
5919
5920
5921
5922 vars="${ITCL_INCLUDES} -I\"`${CYGPATH} ${srcdir}/generic`\""
5923 for i in $vars; do
5924 PKG_INCLUDES="$PKG_INCLUDES $i"
5925 done
5926
5927
5928
5929 vars=""
5930 for i in $vars; do
5931 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5932 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
5933 i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
5934 fi
5935 PKG_LIBS="$PKG_LIBS $i"
5936 done
5937
5938
5939
5940 PKG_CFLAGS="$PKG_CFLAGS "
5941
5942
5943
5944 vars="itkStubLib.c"
5945 for i in $vars; do
5946 # check for existence - allows for generic/win/unix VPATH
5947 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
5948 -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
5949 ; then
5950 { { echo "$as_me:$LINENO: error: could not find stub source file '$i'" >&5
5951 echo "$as_me: error: could not find stub source file '$i'" >&2;}
5952 { (exit 1); exit 1; }; }
5953 fi
5954 PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
5955 # this assumes it is in a VPATH dir
5956 i=`basename $i`
5957 # handle user calling this before or after TEA_SETUP_COMPILER
5958 if test x"${OBJEXT}" != x ; then
5959 j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
5960 else
5961 j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
5962 fi
5963 PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
5964 done
5965
5966
5967
5968
5969 vars="library/Archetype.itk
5970 library/Toplevel.itk
5971 library/Widget.itk
5972 library/itk.tcl
5973 library/tclIndex"
5974 for i in $vars; do
5975 # check for existence, be strict because it is installed
5976 if test ! -f "${srcdir}/$i" ; then
5977 as_fn_error $? "could not find tcl source file '${srcdir}/$i'" "$LINENO" 5
5978 fi
5979 PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
5980 done
5981
5982
5983
5984 #--------------------------------------------------------------------
5985 # __CHANGE__
5986 # A few miscellaneous platform-specific items:
5987 #
5988 # Windows creates a few extra files that need to be cleaned up.
5989 # You can add more files to clean if your extension creates any extra
5990 # files by extending CLEANFILES.
5991 #--------------------------------------------------------------------
5992
5993 if test "${TEA_PLATFORM}" = "windows" ; then
5994
5995 vars="dllEntryPoint.c"
5996 for i in $vars; do
5997 case $i in
5998 \$*)
5999 # allow $-var names
6000 PKG_SOURCES="$PKG_SOURCES $i"
6001 PKG_OBJECTS="$PKG_OBJECTS $i"
6002 ;;
6003 *)
6004 # check for existence - allows for generic/win/unix VPATH
6005 # To add more dirs here (like 'src'), you have to update VPATH
6006 # in Makefile.in as well
6007 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
6008 -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
6009 -a ! -f "${srcdir}/macosx/$i" \
6010 ; then
6011 as_fn_error $? "could not find source file '$i'" "$LINENO" 5
6012 fi
6013 PKG_SOURCES="$PKG_SOURCES $i"
6014 # this assumes it is in a VPATH dir
6015 i=`basename $i`
6016 # handle user calling this before or after TEA_SETUP_COMPILER
6017 if test x"${OBJEXT}" != x ; then
6018 j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
6019 else
6020 j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
6021 fi
6022 PKG_OBJECTS="$PKG_OBJECTS $j"
6023 ;;
6024 esac
6025 done
6026
6027
6028
6029 fi
6030 #CLEANFILES="$CLEANFILES *.ext"
6031
6032 #--------------------------------------------------------------------
6033 # __CHANGE__
6034 # Choose which headers you need. Extension authors should try very
6035 # hard to only rely on the Tcl public header files. Internal headers
6036 # contain private data structures and are subject to change without
6037 # notice.
6038 # This must be done AFTER calling TEA_PATH_TCLCONFIG/TEA_LOAD_TCLCONFIG
6039 # so that we can extract TCL_SRC_DIR from the config file (in the case
6040 # of private headers
6041 #--------------------------------------------------------------------
6042
6043 #TEA_PUBLIC_TCL_HEADERS
6044
6045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl public headers" >&5
6046 $as_echo_n "checking for Tcl public headers... " >&6; }
6047
6048
6049 # Check whether --with-tclinclude was given.
6050 if test "${with_tclinclude+set}" = set; then :
6051 withval=$with_tclinclude; with_tclinclude=${withval}
6052 fi
6053
6054
6055 if ${ac_cv_c_tclh+:} false; then :
6056 $as_echo_n "(cached) " >&6
6057 else
6058
6059 # Use the value from --with-tclinclude, if it was given
6060
6061 if test x"${with_tclinclude}" != x ; then
6062 if test -f "${with_tclinclude}/tcl.h" ; then
6063 ac_cv_c_tclh=${with_tclinclude}
6064 else
6065 as_fn_error $? "${with_tclinclude} directory does not contain tcl.h" "$LINENO" 5
6066 fi
6067 else
6068 list=""
6069 if test "`uname -s`" = "Darwin"; then
6070 # If Tcl was built as a framework, attempt to use
6071 # the framework's Headers directory
6072 case ${TCL_DEFS} in
6073 *TCL_FRAMEWORK*)
6074 list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
6075 ;;
6076 esac
6077 fi
6078
6079 # Look in the source dir only if Tcl is not installed,
6080 # and in that situation, look there before installed locations.
6081 if test -f "${TCL_BIN_DIR}/Makefile" ; then
6082 list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
6083 fi
6084
6085 # Check order: pkg --prefix location, Tcl's --prefix location,
6086 # relative to directory of tclConfig.sh.
6087
6088 eval "temp_includedir=${includedir}"
6089 list="$list \
6090 `ls -d ${temp_includedir} 2>/dev/null` \
6091 `ls -d ${TCL_PREFIX}/include 2>/dev/null` \
6092 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
6093 if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
6094 list="$list /usr/local/include /usr/include"
6095 if test x"${TCL_INCLUDE_SPEC}" != x ; then
6096 d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
6097 list="$list `ls -d ${d} 2>/dev/null`"
6098 fi
6099 fi
6100 for i in $list ; do
6101 if test -f "$i/tcl.h" ; then
6102 ac_cv_c_tclh=$i
6103 break
6104 fi
6105 done
6106 fi
6107
6108 fi
6109
6110
6111 # Print a message based on how we determined the include path
6112
6113 if test x"${ac_cv_c_tclh}" = x ; then
6114 as_fn_error $? "tcl.h not found. Please specify its location with --with-tclinclude" "$LINENO" 5
6115 else
6116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5
6117 $as_echo "${ac_cv_c_tclh}" >&6; }
6118 fi
6119
6120 # Convert to a native path and substitute into the output files.
6121
6122 INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
6123
6124 TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
6125
6126
6127
6128
6129 # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
6130
6131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private include files" >&5
6132 $as_echo_n "checking for Tcl private include files... " >&6; }
6133
6134 TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
6135 TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
6136
6137 # Check to see if tcl<Plat>Port.h isn't already with the public headers
6138 # Don't look for tclInt.h because that resides with tcl.h in the core
6139 # sources, but the <plat>Port headers are in a different directory
6140 if test "${TEA_PLATFORM}" = "windows" -a \
6141 -f "${ac_cv_c_tclh}/tclWinPort.h"; then
6142 result="private headers found with public headers"
6143 elif test "${TEA_PLATFORM}" = "unix" -a \
6144 -f "${ac_cv_c_tclh}/tclUnixPort.h"; then
6145 result="private headers found with public headers"
6146 else
6147 TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
6148 if test "${TEA_PLATFORM}" = "windows"; then
6149 TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
6150 else
6151 TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
6152 fi
6153 # Overwrite the previous TCL_INCLUDES as this should capture both
6154 # public and private headers in the same set.
6155 # We want to ensure these are substituted so as not to require
6156 # any *_NATIVE vars be defined in the Makefile
6157 TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
6158 if test "`uname -s`" = "Darwin"; then
6159 # If Tcl was built as a framework, attempt to use
6160 # the framework's Headers and PrivateHeaders directories
6161 case ${TCL_DEFS} in
6162 *TCL_FRAMEWORK*)
6163 if test -d "${TCL_BIN_DIR}/Headers" -a \
6164 -d "${TCL_BIN_DIR}/PrivateHeaders"; then
6165 TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
6166 else
6167 TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
6168 fi
6169 ;;
6170 esac
6171 result="Using ${TCL_INCLUDES}"
6172 else
6173 if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
6174 as_fn_error $? "Cannot find private header tclInt.h in ${TCL_SRC_DIR}" "$LINENO" 5
6175 fi
6176 result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}"
6177 fi
6178 fi
6179
6180
6181
6182
6183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${result}" >&5
6184 $as_echo "${result}" >&6; }
6185
6186
6187 #TEA_PUBLIC_TK_HEADERS
6188
6189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk public headers" >&5
6190 $as_echo_n "checking for Tk public headers... " >&6; }
6191
6192
6193 # Check whether --with-tkinclude was given.
6194 if test "${with_tkinclude+set}" = set; then :
6195 withval=$with_tkinclude; with_tkinclude=${withval}
6196 fi
6197
6198
6199 if ${ac_cv_c_tkh+:} false; then :
6200 $as_echo_n "(cached) " >&6
6201 else
6202
6203 # Use the value from --with-tkinclude, if it was given
6204
6205 if test x"${with_tkinclude}" != x ; then
6206 if test -f "${with_tkinclude}/tk.h" ; then
6207 ac_cv_c_tkh=${with_tkinclude}
6208 else
6209 as_fn_error $? "${with_tkinclude} directory does not contain tk.h" "$LINENO" 5
6210 fi
6211 else
6212 list=""
6213 if test "`uname -s`" = "Darwin"; then
6214 # If Tk was built as a framework, attempt to use
6215 # the framework's Headers directory.
6216 case ${TK_DEFS} in
6217 *TK_FRAMEWORK*)
6218 list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
6219 ;;
6220 esac
6221 fi
6222
6223 # Look in the source dir only if Tk is not installed,
6224 # and in that situation, look there before installed locations.
6225 if test -f "${TK_BIN_DIR}/Makefile" ; then
6226 list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
6227 fi
6228
6229 # Check order: pkg --prefix location, Tk's --prefix location,
6230 # relative to directory of tkConfig.sh, Tcl's --prefix location,
6231 # relative to directory of tclConfig.sh.
6232
6233 eval "temp_includedir=${includedir}"
6234 list="$list \
6235 `ls -d ${temp_includedir} 2>/dev/null` \
6236 `ls -d ${TK_PREFIX}/include 2>/dev/null` \
6237 `ls -d ${TK_BIN_DIR}/../include 2>/dev/null` \
6238 `ls -d ${TCL_PREFIX}/include 2>/dev/null` \
6239 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
6240 if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
6241 list="$list /usr/local/include /usr/include"
6242 if test x"${TK_INCLUDE_SPEC}" != x ; then
6243 d=`echo "${TK_INCLUDE_SPEC}" | sed -e 's/^-I//'`
6244 list="$list `ls -d ${d} 2>/dev/null`"
6245 fi
6246 fi
6247 for i in $list ; do
6248 if test -f "$i/tk.h" ; then
6249 ac_cv_c_tkh=$i
6250 break
6251 fi
6252 done
6253 fi
6254
6255 fi
6256
6257
6258 # Print a message based on how we determined the include path
6259
6260 if test x"${ac_cv_c_tkh}" = x ; then
6261 as_fn_error $? "tk.h not found. Please specify its location with --with-tkinclude" "$LINENO" 5
6262 else
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tkh}" >&5
6264 $as_echo "${ac_cv_c_tkh}" >&6; }
6265 fi
6266
6267 # Convert to a native path and substitute into the output files.
6268
6269 INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
6270
6271 TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
6272
6273
6274
6275 if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
6276 # On Windows and Aqua, we need the X compat headers
6277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 header files" >&5
6278 $as_echo_n "checking for X11 header files... " >&6; }
6279 if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
6280 INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
6281 TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
6282
6283 fi
6284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${INCLUDE_DIR_NATIVE}" >&5
6285 $as_echo "${INCLUDE_DIR_NATIVE}" >&6; }
6286 fi
6287
6288
6289 # Allow for --with-tkinclude to take effect and define ${ac_cv_c_tkh}
6290
6291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private include files" >&5
6292 $as_echo_n "checking for Tk private include files... " >&6; }
6293
6294 TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
6295 TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
6296
6297 # Check to see if tk<Plat>Port.h isn't already with the public headers
6298 # Don't look for tkInt.h because that resides with tk.h in the core
6299 # sources, but the <plat>Port headers are in a different directory
6300 if test "${TEA_PLATFORM}" = "windows" -a \
6301 -f "${ac_cv_c_tkh}/tkWinPort.h"; then
6302 result="private headers found with public headers"
6303 elif test "${TEA_PLATFORM}" = "unix" -a \
6304 -f "${ac_cv_c_tkh}/tkUnixPort.h"; then
6305 result="private headers found with public headers"
6306 else
6307 TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
6308 TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
6309 if test "${TEA_PLATFORM}" = "windows"; then
6310 TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
6311 else
6312 TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
6313 fi
6314 # Overwrite the previous TK_INCLUDES as this should capture both
6315 # public and private headers in the same set.
6316 # We want to ensure these are substituted so as not to require
6317 # any *_NATIVE vars be defined in the Makefile
6318 TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
6319 # Detect and add ttk subdir
6320 if test -d "${TK_SRC_DIR}/generic/ttk"; then
6321 TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/generic/ttk\""
6322 fi
6323 if test "${TEA_WINDOWINGSYSTEM}" != "x11"; then
6324 TK_INCLUDES="${TK_INCLUDES} -I\"${TK_XLIB_DIR_NATIVE}\""
6325 fi
6326 if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
6327 TK_INCLUDES="${TK_INCLUDES} -I\"${TK_SRC_DIR_NATIVE}/macosx\""
6328 fi
6329 if test "`uname -s`" = "Darwin"; then
6330 # If Tk was built as a framework, attempt to use
6331 # the framework's Headers and PrivateHeaders directories
6332 case ${TK_DEFS} in
6333 *TK_FRAMEWORK*)
6334 if test -d "${TK_BIN_DIR}/Headers" -a \
6335 -d "${TK_BIN_DIR}/PrivateHeaders"; then
6336 TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"
6337 else
6338 TK_INCLUDES="${TK_INCLUDES} ${TK_INCLUDE_SPEC} `echo "${TK_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
6339 fi
6340 ;;
6341 esac
6342 result="Using ${TK_INCLUDES}"
6343 else
6344 if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
6345 as_fn_error $? "Cannot find private header tkInt.h in ${TK_SRC_DIR}" "$LINENO" 5
6346 fi
6347 result="Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}"
6348 fi
6349 fi
6350
6351
6352
6353
6354
6355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${result}" >&5
6356 $as_echo "${result}" >&6; }
6357
6358
6359 #--------------------------------------------------------------------
6360 # For Unix/Tk builds, make sure that the X libraries/headers are found.
6361 #--------------------------------------------------------------------
6362
6363
6364 if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
6365
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
6367 $as_echo_n "checking for X... " >&6; }
6368
6369
6370 # Check whether --with-x was given.
6371 if test "${with_x+set}" = set; then :
6372 withval=$with_x;
6373 fi
6374
6375 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6376 if test "x$with_x" = xno; then
6377 # The user explicitly disabled X.
6378 have_x=disabled
6379 else
6380 case $x_includes,$x_libraries in #(
6381 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
6382 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
6383 $as_echo_n "(cached) " >&6
6384 else
6385 # One or both of the vars are not set, and there is no cached value.
6386 ac_x_includes=no ac_x_libraries=no
6387 rm -f -r conftest.dir
6388 if mkdir conftest.dir; then
6389 cd conftest.dir
6390 cat >Imakefile <<'_ACEOF'
6391 incroot:
6392 @echo incroot='${INCROOT}'
6393 usrlibdir:
6394 @echo usrlibdir='${USRLIBDIR}'
6395 libdir:
6396 @echo libdir='${LIBDIR}'
6397 _ACEOF
6398 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6399 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
6400 for ac_var in incroot usrlibdir libdir; do
6401 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6402 done
6403 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6404 for ac_extension in a so sl dylib la dll; do
6405 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6406 test -f "$ac_im_libdir/libX11.$ac_extension"; then
6407 ac_im_usrlibdir=$ac_im_libdir; break
6408 fi
6409 done
6410 # Screen out bogus values from the imake configuration. They are
6411 # bogus both because they are the default anyway, and because
6412 # using them would break gcc on systems where it needs fixed includes.
6413 case $ac_im_incroot in
6414 /usr/include) ac_x_includes= ;;
6415 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6416 esac
6417 case $ac_im_usrlibdir in
6418 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
6419 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6420 esac
6421 fi
6422 cd ..
6423 rm -f -r conftest.dir
6424 fi
6425
6426 # Standard set of common directories for X headers.
6427 # Check X11 before X11Rn because it is often a symlink to the current release.
6428 ac_x_header_dirs='
6429 /usr/X11/include
6430 /usr/X11R7/include
6431 /usr/X11R6/include
6432 /usr/X11R5/include
6433 /usr/X11R4/include
6434
6435 /usr/include/X11
6436 /usr/include/X11R7
6437 /usr/include/X11R6
6438 /usr/include/X11R5
6439 /usr/include/X11R4
6440
6441 /usr/local/X11/include
6442 /usr/local/X11R7/include
6443 /usr/local/X11R6/include
6444 /usr/local/X11R5/include
6445 /usr/local/X11R4/include
6446
6447 /usr/local/include/X11
6448 /usr/local/include/X11R7
6449 /usr/local/include/X11R6
6450 /usr/local/include/X11R5
6451 /usr/local/include/X11R4
6452
6453 /usr/X386/include
6454 /usr/x386/include
6455 /usr/XFree86/include/X11
6456
6457 /usr/include
6458 /usr/local/include
6459 /usr/unsupported/include
6460 /usr/athena/include
6461 /usr/local/x11r5/include
6462 /usr/lpp/Xamples/include
6463
6464 /usr/openwin/include
6465 /usr/openwin/share/include'
6466
6467 if test "$ac_x_includes" = no; then
6468 # Guess where to find include files, by looking for Xlib.h.
6469 # First, try using that file with no special directory specified.
6470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6471 /* end confdefs.h. */
6472 #include <X11/Xlib.h>
6473 _ACEOF
6474 if ac_fn_c_try_cpp "$LINENO"; then :
6475 # We can compile using X headers with no special include directory.
6476 ac_x_includes=
6477 else
6478 for ac_dir in $ac_x_header_dirs; do
6479 if test -r "$ac_dir/X11/Xlib.h"; then
6480 ac_x_includes=$ac_dir
6481 break
6482 fi
6483 done
6484 fi
6485 rm -f conftest.err conftest.i conftest.$ac_ext
6486 fi # $ac_x_includes = no
6487
6488 if test "$ac_x_libraries" = no; then
6489 # Check for the libraries.
6490 # See if we find them without any special options.
6491 # Don't add to $LIBS permanently.
6492 ac_save_LIBS=$LIBS
6493 LIBS="-lX11 $LIBS"
6494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6495 /* end confdefs.h. */
6496 #include <X11/Xlib.h>
6497 int
6498 main ()
6499 {
6500 XrmInitialize ()
6501 ;
6502 return 0;
6503 }
6504 _ACEOF
6505 if ac_fn_c_try_link "$LINENO"; then :
6506 LIBS=$ac_save_LIBS
6507 # We can link X programs with no special library path.
6508 ac_x_libraries=
6509 else
6510 LIBS=$ac_save_LIBS
6511 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6512 do
6513 # Don't even attempt the hair of trying to link an X program!
6514 for ac_extension in a so sl dylib la dll; do
6515 if test -r "$ac_dir/libX11.$ac_extension"; then
6516 ac_x_libraries=$ac_dir
6517 break 2
6518 fi
6519 done
6520 done
6521 fi
6522 rm -f core conftest.err conftest.$ac_objext \
6523 conftest$ac_exeext conftest.$ac_ext
6524 fi # $ac_x_libraries = no
6525
6526 case $ac_x_includes,$ac_x_libraries in #(
6527 no,* | *,no | *\'*)
6528 # Didn't find X, or a directory has "'" in its name.
6529 ac_cv_have_x="have_x=no";; #(
6530 *)
6531 # Record where we found X for the cache.
6532 ac_cv_have_x="have_x=yes\
6533 ac_x_includes='$ac_x_includes'\
6534 ac_x_libraries='$ac_x_libraries'"
6535 esac
6536 fi
6537 ;; #(
6538 *) have_x=yes;;
6539 esac
6540 eval "$ac_cv_have_x"
6541 fi # $with_x != no
6542
6543 if test "$have_x" != yes; then
6544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
6545 $as_echo "$have_x" >&6; }
6546 no_x=yes
6547 else
6548 # If each of the values was on the command line, it overrides each guess.
6549 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6550 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6551 # Update the cache value to reflect the command line values.
6552 ac_cv_have_x="have_x=yes\
6553 ac_x_includes='$x_includes'\
6554 ac_x_libraries='$x_libraries'"
6555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
6556 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
6557 fi
6558
6559 not_really_there=""
6560 if test "$no_x" = ""; then
6561 if test "$x_includes" = ""; then
6562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6563 /* end confdefs.h. */
6564 #include <X11/Xlib.h>
6565 _ACEOF
6566 if ac_fn_c_try_cpp "$LINENO"; then :
6567
6568 else
6569 not_really_there="yes"
6570 fi
6571 rm -f conftest.err conftest.i conftest.$ac_ext
6572 else
6573 if test ! -r $x_includes/X11/Xlib.h; then
6574 not_really_there="yes"
6575 fi
6576 fi
6577 fi
6578 if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
6579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 header files" >&5
6580 $as_echo_n "checking for X11 header files... " >&6; }
6581 found_xincludes="no"
6582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6583 /* end confdefs.h. */
6584 #include <X11/Xlib.h>
6585 _ACEOF
6586 if ac_fn_c_try_cpp "$LINENO"; then :
6587 found_xincludes="yes"
6588 else
6589 found_xincludes="no"
6590 fi
6591 rm -f conftest.err conftest.i conftest.$ac_ext
6592 if test "$found_xincludes" = "no"; then
6593 dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
6594 for i in $dirs ; do
6595 if test -r $i/X11/Xlib.h; then
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i" >&5
6597 $as_echo "$i" >&6; }
6598 XINCLUDES=" -I$i"
6599 found_xincludes="yes"
6600 break
6601 fi
6602 done
6603 fi
6604 else
6605 if test "$x_includes" != ""; then
6606 XINCLUDES="-I$x_includes"
6607 found_xincludes="yes"
6608 fi
6609 fi
6610 if test "$found_xincludes" = "no"; then
6611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: couldn't find any!" >&5
6612 $as_echo "couldn't find any!" >&6; }
6613 fi
6614
6615 if test "$no_x" = yes; then
6616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11 libraries" >&5
6617 $as_echo_n "checking for X11 libraries... " >&6; }
6618 XLIBSW=nope
6619 dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
6620 for i in $dirs ; do
6621 if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl -o -r $i/libX11.dylib; then
6622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i" >&5
6623 $as_echo "$i" >&6; }
6624 XLIBSW="-L$i -lX11"
6625 x_libraries="$i"
6626 break
6627 fi
6628 done
6629 else
6630 if test "$x_libraries" = ""; then
6631 XLIBSW=-lX11
6632 else
6633 XLIBSW="-L$x_libraries -lX11"
6634 fi
6635 fi
6636 if test "$XLIBSW" = nope ; then
6637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCreateWindow in -lXwindow" >&5
6638 $as_echo_n "checking for XCreateWindow in -lXwindow... " >&6; }
6639 if ${ac_cv_lib_Xwindow_XCreateWindow+:} false; then :
6640 $as_echo_n "(cached) " >&6
6641 else
6642 ac_check_lib_save_LIBS=$LIBS
6643 LIBS="-lXwindow $LIBS"
6644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6645 /* end confdefs.h. */
6646
6647 /* Override any GCC internal prototype to avoid an error.
6648 Use char because int might match the return type of a GCC
6649 builtin and then its argument prototype would still apply. */
6650 #ifdef __cplusplus
6651 extern "C"
6652 #endif
6653 char XCreateWindow ();
6654 int
6655 main ()
6656 {
6657 return XCreateWindow ();
6658 ;
6659 return 0;
6660 }
6661 _ACEOF
6662 if ac_fn_c_try_link "$LINENO"; then :
6663 ac_cv_lib_Xwindow_XCreateWindow=yes
6664 else
6665 ac_cv_lib_Xwindow_XCreateWindow=no
6666 fi
6667 rm -f core conftest.err conftest.$ac_objext \
6668 conftest$ac_exeext conftest.$ac_ext
6669 LIBS=$ac_check_lib_save_LIBS
6670 fi
6671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xwindow_XCreateWindow" >&5
6672 $as_echo "$ac_cv_lib_Xwindow_XCreateWindow" >&6; }
6673 if test "x$ac_cv_lib_Xwindow_XCreateWindow" = xyes; then :
6674 XLIBSW=-lXwindow
6675 fi
6676
6677 fi
6678 if test "$XLIBSW" = nope ; then
6679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find any! Using -lX11." >&5
6680 $as_echo "could not find any! Using -lX11." >&6; }
6681 XLIBSW=-lX11
6682 fi
6683 # TEA specific:
6684 if test x"${XLIBSW}" != x ; then
6685 PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
6686 fi
6687
6688 fi
6689
6690
6691 #--------------------------------------------------------------------
6692 # We need to enable the threading macros found in tcl.h and tclInt.h.
6693 # The use of the threading features is determined by the core the
6694 # extension is loaded into, but we need to compile with these macros
6695 # turned on.
6696 #--------------------------------------------------------------------
6697
6698 $as_echo "#define TCL_THREADS 1" >>confdefs.h
6699
6700 #--------------------------------------------------------------------
6701 # Check whether --enable-threads or --disable-threads was given.
6702 # This auto-enables if Tcl was compiled threaded.
6703 #--------------------------------------------------------------------
6704
6705 #TEA_ENABLE_THREADS
6706
6707 #--------------------------------------------------------------------
6708 # The statement below defines a collection of symbols related to
6709 # building as a shared library instead of a static library.
6710 #--------------------------------------------------------------------
6711
6712
6713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
6714 $as_echo_n "checking how to build libraries... " >&6; }
6715 # Check whether --enable-shared was given.
6716 if test "${enable_shared+set}" = set; then :
6717 enableval=$enable_shared; tcl_ok=$enableval
6718 else
6719 tcl_ok=yes
6720 fi
6721
6722
6723 if test "${enable_shared+set}" = set; then
6724 enableval="$enable_shared"
6725 tcl_ok=$enableval
6726 else
6727 tcl_ok=yes
6728 fi
6729
6730 if test "$tcl_ok" = "yes" ; then
6731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5
6732 $as_echo "shared" >&6; }
6733 SHARED_BUILD=1
6734 else
6735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
6736 $as_echo "static" >&6; }
6737 SHARED_BUILD=0
6738
6739 $as_echo "#define STATIC_BUILD 1" >>confdefs.h
6740
6741 fi
6742
6743
6744
6745 #--------------------------------------------------------------------
6746 # This macro figures out what flags to use with the compiler/linker
6747 # when building shared/static debug/optimized objects. This information
6748 # can be taken from the tclConfig.sh file, but this figures it all out.
6749 #--------------------------------------------------------------------
6750
6751 if test -n "$ac_tool_prefix"; then
6752 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6753 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6755 $as_echo_n "checking for $ac_word... " >&6; }
6756 if ${ac_cv_prog_RANLIB+:} false; then :
6757 $as_echo_n "(cached) " >&6
6758 else
6759 if test -n "$RANLIB"; then
6760 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6761 else
6762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6763 for as_dir in $PATH
6764 do
6765 IFS=$as_save_IFS
6766 test -z "$as_dir" && as_dir=.
6767 for ac_exec_ext in '' $ac_executable_extensions; do
6768 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6769 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6771 break 2
6772 fi
6773 done
6774 done
6775 IFS=$as_save_IFS
6776
6777 fi
6778 fi
6779 RANLIB=$ac_cv_prog_RANLIB
6780 if test -n "$RANLIB"; then
6781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6782 $as_echo "$RANLIB" >&6; }
6783 else
6784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6785 $as_echo "no" >&6; }
6786 fi
6787
6788
6789 fi
6790 if test -z "$ac_cv_prog_RANLIB"; then
6791 ac_ct_RANLIB=$RANLIB
6792 # Extract the first word of "ranlib", so it can be a program name with args.
6793 set dummy ranlib; ac_word=$2
6794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6795 $as_echo_n "checking for $ac_word... " >&6; }
6796 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6797 $as_echo_n "(cached) " >&6
6798 else
6799 if test -n "$ac_ct_RANLIB"; then
6800 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6801 else
6802 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6803 for as_dir in $PATH
6804 do
6805 IFS=$as_save_IFS
6806 test -z "$as_dir" && as_dir=.
6807 for ac_exec_ext in '' $ac_executable_extensions; do
6808 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6809 ac_cv_prog_ac_ct_RANLIB="ranlib"
6810 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6811 break 2
6812 fi
6813 done
6814 done
6815 IFS=$as_save_IFS
6816
6817 fi
6818 fi
6819 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6820 if test -n "$ac_ct_RANLIB"; then
6821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6822 $as_echo "$ac_ct_RANLIB" >&6; }
6823 else
6824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6825 $as_echo "no" >&6; }
6826 fi
6827
6828 if test "x$ac_ct_RANLIB" = x; then
6829 RANLIB=":"
6830 else
6831 case $cross_compiling:$ac_tool_warned in
6832 yes:)
6833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6834 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6835 ac_tool_warned=yes ;;
6836 esac
6837 RANLIB=$ac_ct_RANLIB
6838 fi
6839 else
6840 RANLIB="$ac_cv_prog_RANLIB"
6841 fi
6842
6843
6844
6845
6846 # Step 0.a: Enable 64 bit support?
6847
6848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5
6849 $as_echo_n "checking if 64bit support is requested... " >&6; }
6850 # Check whether --enable-64bit was given.
6851 if test "${enable_64bit+set}" = set; then :
6852 enableval=$enable_64bit; do64bit=$enableval
6853 else
6854 do64bit=no
6855 fi
6856
6857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5
6858 $as_echo "$do64bit" >&6; }
6859
6860 # Step 0.b: Enable Solaris 64 bit VIS support?
6861
6862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5
6863 $as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; }
6864 # Check whether --enable-64bit-vis was given.
6865 if test "${enable_64bit_vis+set}" = set; then :
6866 enableval=$enable_64bit_vis; do64bitVIS=$enableval
6867 else
6868 do64bitVIS=no
6869 fi
6870
6871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5
6872 $as_echo "$do64bitVIS" >&6; }
6873 # Force 64bit on with VIS
6874 if test "$do64bitVIS" = "yes"; then :
6875 do64bit=yes
6876 fi
6877
6878 # Step 0.c: Check if visibility support is available. Do this here so
6879 # that platform specific alternatives can be used below if this fails.
6880
6881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5
6882 $as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; }
6883 if ${tcl_cv_cc_visibility_hidden+:} false; then :
6884 $as_echo_n "(cached) " >&6
6885 else
6886
6887 hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
6888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6889 /* end confdefs.h. */
6890
6891 extern __attribute__((__visibility__("hidden"))) void f(void);
6892 void f(void) {}
6893 int
6894 main ()
6895 {
6896 f();
6897 ;
6898 return 0;
6899 }
6900 _ACEOF
6901 if ac_fn_c_try_link "$LINENO"; then :
6902 tcl_cv_cc_visibility_hidden=yes
6903 else
6904 tcl_cv_cc_visibility_hidden=no
6905 fi
6906 rm -f core conftest.err conftest.$ac_objext \
6907 conftest$ac_exeext conftest.$ac_ext
6908 CFLAGS=$hold_cflags
6909 fi
6910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5
6911 $as_echo "$tcl_cv_cc_visibility_hidden" >&6; }
6912 if test $tcl_cv_cc_visibility_hidden = yes; then :
6913
6914
6915 $as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h
6916
6917
6918 $as_echo "#define HAVE_HIDDEN 1" >>confdefs.h
6919
6920
6921 fi
6922
6923 # Step 0.d: Disable -rpath support?
6924
6925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5
6926 $as_echo_n "checking if rpath support is requested... " >&6; }
6927 # Check whether --enable-rpath was given.
6928 if test "${enable_rpath+set}" = set; then :
6929 enableval=$enable_rpath; doRpath=$enableval
6930 else
6931 doRpath=yes
6932 fi
6933
6934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5
6935 $as_echo "$doRpath" >&6; }
6936
6937 # TEA specific: Cross-compiling options for Windows/CE builds?
6938
6939 if test "${TEA_PLATFORM}" = windows; then :
6940
6941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Windows/CE build is requested" >&5
6942 $as_echo_n "checking if Windows/CE build is requested... " >&6; }
6943 # Check whether --enable-wince was given.
6944 if test "${enable_wince+set}" = set; then :
6945 enableval=$enable_wince; doWince=$enableval
6946 else
6947 doWince=no
6948 fi
6949
6950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doWince" >&5
6951 $as_echo "$doWince" >&6; }
6952
6953 fi
6954
6955 # Set the variable "system" to hold the name and version number
6956 # for the system.
6957
6958
6959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5
6960 $as_echo_n "checking system version... " >&6; }
6961 if ${tcl_cv_sys_version+:} false; then :
6962 $as_echo_n "(cached) " >&6
6963 else
6964
6965 # TEA specific:
6966 if test "${TEA_PLATFORM}" = "windows" ; then
6967 tcl_cv_sys_version=windows
6968 else
6969 tcl_cv_sys_version=`uname -s`-`uname -r`
6970 if test "$?" -ne 0 ; then
6971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
6972 $as_echo "$as_me: WARNING: can't find uname command" >&2;}
6973 tcl_cv_sys_version=unknown
6974 else
6975 if test "`uname -s`" = "AIX" ; then
6976 tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
6977 fi
6978 fi
6979 fi
6980
6981 fi
6982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
6983 $as_echo "$tcl_cv_sys_version" >&6; }
6984 system=$tcl_cv_sys_version
6985
6986
6987 # Require ranlib early so we can override it in special cases below.
6988
6989
6990
6991 # Set configuration options based on system name and version.
6992 # This is similar to Tcl's unix/tcl.m4 except that we've added a
6993 # "windows" case and removed some core-only vars.
6994
6995 do64bit_ok=no
6996 # default to '{$LIBS}' and set to "" on per-platform necessary basis
6997 SHLIB_LD_LIBS='${LIBS}'
6998 # When ld needs options to work in 64-bit mode, put them in
6999 # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
7000 # is disabled by the user. [Bug 1016796]
7001 LDFLAGS_ARCH=""
7002 UNSHARED_LIB_SUFFIX=""
7003 # TEA specific: use PACKAGE_VERSION instead of VERSION
7004 TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
7005 ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
7006 TCL_LIB_VERSIONS_OK=ok
7007 CFLAGS_DEBUG=-g
7008 if test "$GCC" = yes; then :
7009
7010 CFLAGS_OPTIMIZE=-O2
7011 CFLAGS_WARNING="-Wall"
7012
7013 else
7014
7015 CFLAGS_OPTIMIZE=-O
7016 CFLAGS_WARNING=""
7017
7018 fi
7019 if test -n "$ac_tool_prefix"; then
7020 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7021 set dummy ${ac_tool_prefix}ar; ac_word=$2
7022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7023 $as_echo_n "checking for $ac_word... " >&6; }
7024 if ${ac_cv_prog_AR+:} false; then :
7025 $as_echo_n "(cached) " >&6
7026 else
7027 if test -n "$AR"; then
7028 ac_cv_prog_AR="$AR" # Let the user override the test.
7029 else
7030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7031 for as_dir in $PATH
7032 do
7033 IFS=$as_save_IFS
7034 test -z "$as_dir" && as_dir=.
7035 for ac_exec_ext in '' $ac_executable_extensions; do
7036 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7037 ac_cv_prog_AR="${ac_tool_prefix}ar"
7038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7039 break 2
7040 fi
7041 done
7042 done
7043 IFS=$as_save_IFS
7044
7045 fi
7046 fi
7047 AR=$ac_cv_prog_AR
7048 if test -n "$AR"; then
7049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7050 $as_echo "$AR" >&6; }
7051 else
7052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7053 $as_echo "no" >&6; }
7054 fi
7055
7056
7057 fi
7058 if test -z "$ac_cv_prog_AR"; then
7059 ac_ct_AR=$AR
7060 # Extract the first word of "ar", so it can be a program name with args.
7061 set dummy ar; ac_word=$2
7062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7063 $as_echo_n "checking for $ac_word... " >&6; }
7064 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7065 $as_echo_n "(cached) " >&6
7066 else
7067 if test -n "$ac_ct_AR"; then
7068 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7069 else
7070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7071 for as_dir in $PATH
7072 do
7073 IFS=$as_save_IFS
7074 test -z "$as_dir" && as_dir=.
7075 for ac_exec_ext in '' $ac_executable_extensions; do
7076 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7077 ac_cv_prog_ac_ct_AR="ar"
7078 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7079 break 2
7080 fi
7081 done
7082 done
7083 IFS=$as_save_IFS
7084
7085 fi
7086 fi
7087 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7088 if test -n "$ac_ct_AR"; then
7089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7090 $as_echo "$ac_ct_AR" >&6; }
7091 else
7092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7093 $as_echo "no" >&6; }
7094 fi
7095
7096 if test "x$ac_ct_AR" = x; then
7097 AR=""
7098 else
7099 case $cross_compiling:$ac_tool_warned in
7100 yes:)
7101 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7102 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7103 ac_tool_warned=yes ;;
7104 esac
7105 AR=$ac_ct_AR
7106 fi
7107 else
7108 AR="$ac_cv_prog_AR"
7109 fi
7110
7111 STLIB_LD='${AR} cr'
7112 LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
7113 if test "x$SHLIB_VERSION" = x; then :
7114 SHLIB_VERSION=""
7115 else
7116 SHLIB_VERSION=".$SHLIB_VERSION"
7117 fi
7118 case $system in
7119 # TEA specific:
7120 windows)
7121 # This is a 2-stage check to make sure we have the 64-bit SDK
7122 # We have to know where the SDK is installed.
7123 # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
7124 # MACHINE is IX86 for LINK, but this is used by the manifest,
7125 # which requires x86|amd64|ia64.
7126 MACHINE="X86"
7127 if test "$do64bit" != "no" ; then
7128 if test "x${MSSDK}x" = "xx" ; then
7129 MSSDK="C:/Progra~1/Microsoft Platform SDK"
7130 fi
7131 MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'`
7132 PATH64=""
7133 case "$do64bit" in
7134 amd64|x64|yes)
7135 MACHINE="AMD64" ; # default to AMD64 64-bit build
7136 PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
7137 ;;
7138 ia64)
7139 MACHINE="IA64"
7140 PATH64="${MSSDK}/Bin/Win64"
7141 ;;
7142 esac
7143 if test "$GCC" != "yes" -a ! -d "${PATH64}" ; then
7144 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
7145 $as_echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
7146 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ensure latest Platform SDK is installed" >&5
7147 $as_echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
7148 do64bit="no"
7149 else
7150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using 64-bit $MACHINE mode" >&5
7151 $as_echo " Using 64-bit $MACHINE mode" >&6; }
7152 do64bit_ok="yes"
7153 fi
7154 fi
7155
7156 if test "$doWince" != "no" ; then
7157 if test "$do64bit" != "no" ; then
7158 as_fn_error $? "Windows/CE and 64-bit builds incompatible" "$LINENO" 5
7159 fi
7160 if test "$GCC" = "yes" ; then
7161 as_fn_error $? "Windows/CE and GCC builds incompatible" "$LINENO" 5
7162 fi
7163
7164 # First, look for one uninstalled.
7165 # the alternative search directory is invoked by --with-celib
7166
7167 if test x"${no_celib}" = x ; then
7168 # we reset no_celib in case something fails here
7169 no_celib=true
7170
7171 # Check whether --with-celib was given.
7172 if test "${with_celib+set}" = set; then :
7173 withval=$with_celib; with_celibconfig=${withval}
7174 fi
7175
7176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows/CE celib directory" >&5
7177 $as_echo_n "checking for Windows/CE celib directory... " >&6; }
7178 if ${ac_cv_c_celibconfig+:} false; then :
7179 $as_echo_n "(cached) " >&6
7180 else
7181
7182 # First check to see if --with-celibconfig was specified.
7183 if test x"${with_celibconfig}" != x ; then
7184 if test -d "${with_celibconfig}/inc" ; then
7185 ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
7186 else
7187 as_fn_error $? "${with_celibconfig} directory doesn't contain inc directory" "$LINENO" 5
7188 fi
7189 fi
7190
7191 # then check for a celib library
7192 if test x"${ac_cv_c_celibconfig}" = x ; then
7193 for i in \
7194 ../celib-palm-3.0 \
7195 ../celib \
7196 ../../celib-palm-3.0 \
7197 ../../celib \
7198 `ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
7199 ${srcdir}/../celib-palm-3.0 \
7200 ${srcdir}/../celib \
7201 `ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
7202 ; do
7203 if test -d "$i/inc" ; then
7204 ac_cv_c_celibconfig=`(cd $i; pwd)`
7205 break
7206 fi
7207 done
7208 fi
7209
7210 fi
7211
7212 if test x"${ac_cv_c_celibconfig}" = x ; then
7213 as_fn_error $? "Cannot find celib support library directory" "$LINENO" 5
7214 else
7215 no_celib=
7216 CELIB_DIR=${ac_cv_c_celibconfig}
7217 CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $CELIB_DIR" >&5
7219 $as_echo "found $CELIB_DIR" >&6; }
7220 fi
7221 fi
7222
7223 # Set defaults for common evc4/PPC2003 setup
7224 # Currently Tcl requires 300+, possibly 420+ for sockets
7225 CEVERSION=420; # could be 211 300 301 400 420 ...
7226 TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ...
7227 ARCH=ARM; # could be ARM MIPS X86EM ...
7228 PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
7229 if test "$doWince" != "yes"; then
7230 # If !yes then the user specified something
7231 # Reset ARCH to allow user to skip specifying it
7232 ARCH=
7233 eval `echo $doWince | awk -F, '{ \
7234 if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
7235 if ($1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
7236 if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
7237 if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
7238 if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
7239 }'`
7240 if test "x${ARCH}" = "x" ; then
7241 ARCH=$TARGETCPU;
7242 fi
7243 fi
7244 OSVERSION=WCE$CEVERSION;
7245 if test "x${WCEROOT}" = "x" ; then
7246 WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
7247 if test ! -d "${WCEROOT}" ; then
7248 WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
7249 fi
7250 fi
7251 if test "x${SDKROOT}" = "x" ; then
7252 SDKROOT="C:/Program Files/Windows CE Tools"
7253 if test ! -d "${SDKROOT}" ; then
7254 SDKROOT="C:/Windows CE Tools"
7255 fi
7256 fi
7257 WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
7258 SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
7259 if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
7260 -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
7261 as_fn_error $? "could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" "$LINENO" 5
7262 doWince="no"
7263 else
7264 # We could PATH_NOSPACE these, but that's not important,
7265 # as long as we quote them when used.
7266 CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
7267 if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
7268 CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
7269 fi
7270 CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
7271 fi
7272 fi
7273
7274 if test "$GCC" != "yes" ; then
7275 if test "${SHARED_BUILD}" = "0" ; then
7276 runtime=-MT
7277 else
7278 runtime=-MD
7279 fi
7280 case "x`echo \${VisualStudioVersion}`" in
7281 x1[4-9]*)
7282 lflags="${lflags} -nodefaultlib:libucrt.lib"
7283
7284 vars="ucrt.lib"
7285 for i in $vars; do
7286 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7287 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
7288 i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7289 fi
7290 PKG_LIBS="$PKG_LIBS $i"
7291 done
7292
7293
7294 ;;
7295 *)
7296 ;;
7297 esac
7298
7299 if test "$do64bit" != "no" ; then
7300 # All this magic is necessary for the Win64 SDK RC1 - hobbs
7301 CC="\"${PATH64}/cl.exe\""
7302 CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
7303 RC="\"${MSSDK}/bin/rc.exe\""
7304 lflags="${lflags} -nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
7305 LINKBIN="\"${PATH64}/link.exe\""
7306 CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
7307 CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
7308 # Avoid 'unresolved external symbol __security_cookie'
7309 # errors, c.f. http://support.microsoft.com/?id=894573
7310
7311 vars="bufferoverflowU.lib"
7312 for i in $vars; do
7313 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7314 # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
7315 i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7316 fi
7317 PKG_LIBS="$PKG_LIBS $i"
7318 done
7319
7320
7321 elif test "$doWince" != "no" ; then
7322 CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
7323 if test "${TARGETCPU}" = "X86"; then
7324 CC="\"${CEBINROOT}/cl.exe\""
7325 else
7326 CC="\"${CEBINROOT}/cl${ARCH}.exe\""
7327 fi
7328 CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
7329 RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
7330 arch=`echo ${ARCH} | awk '{print tolower($0)}'`
7331 defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
7332 if test "${SHARED_BUILD}" = "1" ; then
7333 # Static CE builds require static celib as well
7334 defs="${defs} _DLL"
7335 fi
7336 for i in $defs ; do
7337
7338 cat >>confdefs.h <<_ACEOF
7339 #define $i 1
7340 _ACEOF
7341
7342 done
7343
7344 cat >>confdefs.h <<_ACEOF
7345 #define _WIN32_WCE $CEVERSION
7346 _ACEOF
7347
7348
7349 cat >>confdefs.h <<_ACEOF
7350 #define UNDER_CE $CEVERSION
7351 _ACEOF
7352
7353 CFLAGS_DEBUG="-nologo -Zi -Od"
7354 CFLAGS_OPTIMIZE="-nologo -Ox"
7355 lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
7356 lflags="${lflags} -MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
7357 LINKBIN="\"${CEBINROOT}/link.exe\""
7358
7359 else
7360 RC="rc"
7361 lflags="${lflags} -nologo"
7362 LINKBIN="link"
7363 CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
7364 CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
7365 fi
7366 fi
7367
7368 if test "$GCC" = "yes"; then
7369 # mingw gcc mode
7370 if test -n "$ac_tool_prefix"; then
7371 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7372 set dummy ${ac_tool_prefix}windres; ac_word=$2
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7374 $as_echo_n "checking for $ac_word... " >&6; }
7375 if ${ac_cv_prog_RC+:} false; then :
7376 $as_echo_n "(cached) " >&6
7377 else
7378 if test -n "$RC"; then
7379 ac_cv_prog_RC="$RC" # Let the user override the test.
7380 else
7381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7382 for as_dir in $PATH
7383 do
7384 IFS=$as_save_IFS
7385 test -z "$as_dir" && as_dir=.
7386 for ac_exec_ext in '' $ac_executable_extensions; do
7387 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7388 ac_cv_prog_RC="${ac_tool_prefix}windres"
7389 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7390 break 2
7391 fi
7392 done
7393 done
7394 IFS=$as_save_IFS
7395
7396 fi
7397 fi
7398 RC=$ac_cv_prog_RC
7399 if test -n "$RC"; then
7400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
7401 $as_echo "$RC" >&6; }
7402 else
7403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7404 $as_echo "no" >&6; }
7405 fi
7406
7407
7408 fi
7409 if test -z "$ac_cv_prog_RC"; then
7410 ac_ct_RC=$RC
7411 # Extract the first word of "windres", so it can be a program name with args.
7412 set dummy windres; ac_word=$2
7413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7414 $as_echo_n "checking for $ac_word... " >&6; }
7415 if ${ac_cv_prog_ac_ct_RC+:} false; then :
7416 $as_echo_n "(cached) " >&6
7417 else
7418 if test -n "$ac_ct_RC"; then
7419 ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test.
7420 else
7421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7422 for as_dir in $PATH
7423 do
7424 IFS=$as_save_IFS
7425 test -z "$as_dir" && as_dir=.
7426 for ac_exec_ext in '' $ac_executable_extensions; do
7427 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7428 ac_cv_prog_ac_ct_RC="windres"
7429 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7430 break 2
7431 fi
7432 done
7433 done
7434 IFS=$as_save_IFS
7435
7436 fi
7437 fi
7438 ac_ct_RC=$ac_cv_prog_ac_ct_RC
7439 if test -n "$ac_ct_RC"; then
7440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
7441 $as_echo "$ac_ct_RC" >&6; }
7442 else
7443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7444 $as_echo "no" >&6; }
7445 fi
7446
7447 if test "x$ac_ct_RC" = x; then
7448 RC=""
7449 else
7450 case $cross_compiling:$ac_tool_warned in
7451 yes:)
7452 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7453 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7454 ac_tool_warned=yes ;;
7455 esac
7456 RC=$ac_ct_RC
7457 fi
7458 else
7459 RC="$ac_cv_prog_RC"
7460 fi
7461
7462 CFLAGS_DEBUG="-g"
7463 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
7464 SHLIB_LD='${CC} -shared'
7465 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7466 LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
7467 LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
7468
7469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cross-compile version of gcc" >&5
7470 $as_echo_n "checking for cross-compile version of gcc... " >&6; }
7471 if ${ac_cv_cross+:} false; then :
7472 $as_echo_n "(cached) " >&6
7473 else
7474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7475 /* end confdefs.h. */
7476
7477 #ifdef _WIN32
7478 #error cross-compiler
7479 #endif
7480
7481 int
7482 main ()
7483 {
7484
7485 ;
7486 return 0;
7487 }
7488 _ACEOF
7489 if ac_fn_c_try_compile "$LINENO"; then :
7490 ac_cv_cross=yes
7491 else
7492 ac_cv_cross=no
7493 fi
7494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7495
7496 fi
7497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cross" >&5
7498 $as_echo "$ac_cv_cross" >&6; }
7499 if test "$ac_cv_cross" = "yes"; then
7500 case "$do64bit" in
7501 amd64|x64|yes)
7502 CC="x86_64-w64-mingw32-gcc"
7503 LD="x86_64-w64-mingw32-ld"
7504 AR="x86_64-w64-mingw32-ar"
7505 RANLIB="x86_64-w64-mingw32-ranlib"
7506 RC="x86_64-w64-mingw32-windres"
7507 ;;
7508 *)
7509 CC="i686-w64-mingw32-gcc"
7510 LD="i686-w64-mingw32-ld"
7511 AR="i686-w64-mingw32-ar"
7512 RANLIB="i686-w64-mingw32-ranlib"
7513 RC="i686-w64-mingw32-windres"
7514 ;;
7515 esac
7516 fi
7517
7518 else
7519 SHLIB_LD="${LINKBIN} -dll ${lflags}"
7520 # link -lib only works when -lib is the first arg
7521 STLIB_LD="${LINKBIN} -lib ${lflags}"
7522 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
7523 PATHTYPE=-w
7524 # For information on what debugtype is most useful, see:
7525 # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
7526 # and also
7527 # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
7528 # This essentially turns it all on.
7529 LDFLAGS_DEBUG="-debug -debugtype:cv"
7530 LDFLAGS_OPTIMIZE="-release"
7531 if test "$doWince" != "no" ; then
7532 LDFLAGS_CONSOLE="-link ${lflags}"
7533 LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
7534 else
7535 LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
7536 LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
7537 fi
7538 fi
7539
7540 SHLIB_SUFFIX=".dll"
7541 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
7542
7543 TCL_LIB_VERSIONS_OK=nodots
7544 ;;
7545 AIX-*)
7546 if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then :
7547
7548 # AIX requires the _r compiler when gcc isn't being used
7549 case "${CC}" in
7550 *_r|*_r\ *)
7551 # ok ...
7552 ;;
7553 *)
7554 # Make sure only first arg gets _r
7555 CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
7556 ;;
7557 esac
7558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5
7559 $as_echo "Using $CC for compiling with threads" >&6; }
7560
7561 fi
7562 LIBS="$LIBS -lc"
7563 SHLIB_CFLAGS=""
7564 SHLIB_SUFFIX=".so"
7565
7566 LD_LIBRARY_PATH_VAR="LIBPATH"
7567
7568 # Check to enable 64-bit flags for compiler/linker
7569 if test "$do64bit" = yes; then :
7570
7571 if test "$GCC" = yes; then :
7572
7573 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
7574 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7575
7576 else
7577
7578 do64bit_ok=yes
7579 CFLAGS="$CFLAGS -q64"
7580 LDFLAGS_ARCH="-q64"
7581 RANLIB="${RANLIB} -X64"
7582 AR="${AR} -X64"
7583 SHLIB_LD_FLAGS="-b64"
7584
7585 fi
7586
7587 fi
7588
7589 if test "`uname -m`" = ia64; then :
7590
7591 # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
7592 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
7593 if test "$GCC" = yes; then :
7594
7595 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7596
7597 else
7598
7599 CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
7600
7601 fi
7602 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
7603
7604 else
7605
7606 if test "$GCC" = yes; then :
7607
7608 SHLIB_LD='${CC} -shared -Wl,-bexpall'
7609
7610 else
7611
7612 SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
7613 LDFLAGS="$LDFLAGS -brtl"
7614
7615 fi
7616 SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
7617 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
7618 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7619
7620 fi
7621 ;;
7622 BeOS*)
7623 SHLIB_CFLAGS="-fPIC"
7624 SHLIB_LD='${CC} -nostart'
7625 SHLIB_SUFFIX=".so"
7626
7627 #-----------------------------------------------------------
7628 # Check for inet_ntoa in -lbind, for BeOS (which also needs
7629 # -lsocket, even if the network functions are in -lnet which
7630 # is always linked to, for compatibility.
7631 #-----------------------------------------------------------
7632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5
7633 $as_echo_n "checking for inet_ntoa in -lbind... " >&6; }
7634 if ${ac_cv_lib_bind_inet_ntoa+:} false; then :
7635 $as_echo_n "(cached) " >&6
7636 else
7637 ac_check_lib_save_LIBS=$LIBS
7638 LIBS="-lbind $LIBS"
7639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7640 /* end confdefs.h. */
7641
7642 /* Override any GCC internal prototype to avoid an error.
7643 Use char because int might match the return type of a GCC
7644 builtin and then its argument prototype would still apply. */
7645 #ifdef __cplusplus
7646 extern "C"
7647 #endif
7648 char inet_ntoa ();
7649 int
7650 main ()
7651 {
7652 return inet_ntoa ();
7653 ;
7654 return 0;
7655 }
7656 _ACEOF
7657 if ac_fn_c_try_link "$LINENO"; then :
7658 ac_cv_lib_bind_inet_ntoa=yes
7659 else
7660 ac_cv_lib_bind_inet_ntoa=no
7661 fi
7662 rm -f core conftest.err conftest.$ac_objext \
7663 conftest$ac_exeext conftest.$ac_ext
7664 LIBS=$ac_check_lib_save_LIBS
7665 fi
7666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5
7667 $as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; }
7668 if test "x$ac_cv_lib_bind_inet_ntoa" = xyes; then :
7669 LIBS="$LIBS -lbind -lsocket"
7670 fi
7671
7672 ;;
7673 BSD/OS-4.*)
7674 SHLIB_CFLAGS="-export-dynamic -fPIC"
7675 SHLIB_LD='${CC} -shared'
7676 SHLIB_SUFFIX=".so"
7677 LDFLAGS="$LDFLAGS -export-dynamic"
7678 CC_SEARCH_FLAGS=""
7679 LD_SEARCH_FLAGS=""
7680 ;;
7681 CYGWIN_*)
7682 SHLIB_CFLAGS=""
7683 SHLIB_LD='${CC} -shared'
7684 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\[email protected]"
7685 SHLIB_SUFFIX=".dll"
7686 EXEEXT=".exe"
7687 do64bit_ok=yes
7688 CC_SEARCH_FLAGS=""
7689 LD_SEARCH_FLAGS=""
7690 ;;
7691 Haiku*)
7692 LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7693 SHLIB_CFLAGS="-fPIC"
7694 SHLIB_SUFFIX=".so"
7695 SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5
7697 $as_echo_n "checking for inet_ntoa in -lnetwork... " >&6; }
7698 if ${ac_cv_lib_network_inet_ntoa+:} false; then :
7699 $as_echo_n "(cached) " >&6
7700 else
7701 ac_check_lib_save_LIBS=$LIBS
7702 LIBS="-lnetwork $LIBS"
7703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7704 /* end confdefs.h. */
7705
7706 /* Override any GCC internal prototype to avoid an error.
7707 Use char because int might match the return type of a GCC
7708 builtin and then its argument prototype would still apply. */
7709 #ifdef __cplusplus
7710 extern "C"
7711 #endif
7712 char inet_ntoa ();
7713 int
7714 main ()
7715 {
7716 return inet_ntoa ();
7717 ;
7718 return 0;
7719 }
7720 _ACEOF
7721 if ac_fn_c_try_link "$LINENO"; then :
7722 ac_cv_lib_network_inet_ntoa=yes
7723 else
7724 ac_cv_lib_network_inet_ntoa=no
7725 fi
7726 rm -f core conftest.err conftest.$ac_objext \
7727 conftest$ac_exeext conftest.$ac_ext
7728 LIBS=$ac_check_lib_save_LIBS
7729 fi
7730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5
7731 $as_echo "$ac_cv_lib_network_inet_ntoa" >&6; }
7732 if test "x$ac_cv_lib_network_inet_ntoa" = xyes; then :
7733 LIBS="$LIBS -lnetwork"
7734 fi
7735
7736 ;;
7737 HP-UX-*.11.*)
7738 # Use updated header definitions where possible
7739
7740 $as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
7741
7742 # TEA specific: Needed by Tcl, but not most extensions
7743 #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
7744 #LIBS="$LIBS -lxnet" # Use the XOPEN network library
7745
7746 if test "`uname -m`" = ia64; then :
7747
7748 SHLIB_SUFFIX=".so"
7749 # Use newer C++ library for C++ extensions
7750 #if test "$GCC" != "yes" ; then
7751 # CPPFLAGS="-AA"
7752 #fi
7753
7754 else
7755
7756 SHLIB_SUFFIX=".sl"
7757
7758 fi
7759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7760 $as_echo_n "checking for shl_load in -ldld... " >&6; }
7761 if ${ac_cv_lib_dld_shl_load+:} false; then :
7762 $as_echo_n "(cached) " >&6
7763 else
7764 ac_check_lib_save_LIBS=$LIBS
7765 LIBS="-ldld $LIBS"
7766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7767 /* end confdefs.h. */
7768
7769 /* Override any GCC internal prototype to avoid an error.
7770 Use char because int might match the return type of a GCC
7771 builtin and then its argument prototype would still apply. */
7772 #ifdef __cplusplus
7773 extern "C"
7774 #endif
7775 char shl_load ();
7776 int
7777 main ()
7778 {
7779 return shl_load ();
7780 ;
7781 return 0;
7782 }
7783 _ACEOF
7784 if ac_fn_c_try_link "$LINENO"; then :
7785 ac_cv_lib_dld_shl_load=yes
7786 else
7787 ac_cv_lib_dld_shl_load=no
7788 fi
7789 rm -f core conftest.err conftest.$ac_objext \
7790 conftest$ac_exeext conftest.$ac_ext
7791 LIBS=$ac_check_lib_save_LIBS
7792 fi
7793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7794 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7795 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
7796 tcl_ok=yes
7797 else
7798 tcl_ok=no
7799 fi
7800
7801 if test "$tcl_ok" = yes; then :
7802
7803 LDFLAGS="$LDFLAGS -Wl,-E"
7804 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
7805 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
7806 LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7807
7808 fi
7809 if test "$GCC" = yes; then :
7810
7811 SHLIB_LD='${CC} -shared'
7812 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7813
7814 else
7815
7816 CFLAGS="$CFLAGS -z"
7817 # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
7818 #CFLAGS="$CFLAGS +DAportable"
7819 SHLIB_CFLAGS="+z"
7820 SHLIB_LD="ld -b"
7821
7822 fi
7823
7824 # Check to enable 64-bit flags for compiler/linker
7825 if test "$do64bit" = "yes"; then :
7826
7827 if test "$GCC" = yes; then :
7828
7829 case `${CC} -dumpmachine` in
7830 hppa64*)
7831 # 64-bit gcc in use. Fix flags for GNU ld.
7832 do64bit_ok=yes
7833 SHLIB_LD='${CC} -shared'
7834 if test $doRpath = yes; then :
7835
7836 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7837 fi
7838 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7839 ;;
7840 *)
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
7842 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7843 ;;
7844 esac
7845
7846 else
7847
7848 do64bit_ok=yes
7849 CFLAGS="$CFLAGS +DD64"
7850 LDFLAGS_ARCH="+DD64"
7851
7852 fi
7853
7854 fi ;;
7855 IRIX-6.*)
7856 SHLIB_CFLAGS=""
7857 SHLIB_LD="ld -n32 -shared -rdata_shared"
7858 SHLIB_SUFFIX=".so"
7859 if test $doRpath = yes; then :
7860
7861 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7862 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7863 fi
7864 if test "$GCC" = yes; then :
7865
7866 CFLAGS="$CFLAGS -mabi=n32"
7867 LDFLAGS="$LDFLAGS -mabi=n32"
7868
7869 else
7870
7871 case $system in
7872 IRIX-6.3)
7873 # Use to build 6.2 compatible binaries on 6.3.
7874 CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
7875 ;;
7876 *)
7877 CFLAGS="$CFLAGS -n32"
7878 ;;
7879 esac
7880 LDFLAGS="$LDFLAGS -n32"
7881
7882 fi
7883 ;;
7884 IRIX64-6.*)
7885 SHLIB_CFLAGS=""
7886 SHLIB_LD="ld -n32 -shared -rdata_shared"
7887 SHLIB_SUFFIX=".so"
7888 if test $doRpath = yes; then :
7889
7890 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7891 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7892 fi
7893
7894 # Check to enable 64-bit flags for compiler/linker
7895
7896 if test "$do64bit" = yes; then :
7897
7898 if test "$GCC" = yes; then :
7899
7900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5
7901 $as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
7902
7903 else
7904
7905 do64bit_ok=yes
7906 SHLIB_LD="ld -64 -shared -rdata_shared"
7907 CFLAGS="$CFLAGS -64"
7908 LDFLAGS_ARCH="-64"
7909
7910 fi
7911
7912 fi
7913 ;;
7914 Linux*|GNU*|NetBSD-Debian)
7915 SHLIB_CFLAGS="-fPIC"
7916 SHLIB_SUFFIX=".so"
7917
7918 # TEA specific:
7919 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
7920
7921 # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7922 SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
7923 LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7924 if test $doRpath = yes; then :
7925
7926 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7927 fi
7928 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7929 if test "`uname -m`" = "alpha"; then :
7930 CFLAGS="$CFLAGS -mieee"
7931 fi
7932 if test $do64bit = yes; then :
7933
7934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5
7935 $as_echo_n "checking if compiler accepts -m64 flag... " >&6; }
7936 if ${tcl_cv_cc_m64+:} false; then :
7937 $as_echo_n "(cached) " >&6
7938 else
7939
7940 hold_cflags=$CFLAGS
7941 CFLAGS="$CFLAGS -m64"
7942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7943 /* end confdefs.h. */
7944
7945 int
7946 main ()
7947 {
7948
7949 ;
7950 return 0;
7951 }
7952 _ACEOF
7953 if ac_fn_c_try_link "$LINENO"; then :
7954 tcl_cv_cc_m64=yes
7955 else
7956 tcl_cv_cc_m64=no
7957 fi
7958 rm -f core conftest.err conftest.$ac_objext \
7959 conftest$ac_exeext conftest.$ac_ext
7960 CFLAGS=$hold_cflags
7961 fi
7962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5
7963 $as_echo "$tcl_cv_cc_m64" >&6; }
7964 if test $tcl_cv_cc_m64 = yes; then :
7965
7966 CFLAGS="$CFLAGS -m64"
7967 do64bit_ok=yes
7968
7969 fi
7970
7971 fi
7972
7973 # The combo of gcc + glibc has a bug related to inlining of
7974 # functions like strtod(). The -fno-builtin flag should address
7975 # this problem but it does not work. The -fno-inline flag is kind
7976 # of overkill but it works. Disable inlining only when one of the
7977 # files in compat/*.c is being linked in.
7978
7979 if test x"${USE_COMPAT}" != x; then :
7980 CFLAGS="$CFLAGS -fno-inline"
7981 fi
7982 ;;
7983 Lynx*)
7984 SHLIB_CFLAGS="-fPIC"
7985 SHLIB_SUFFIX=".so"
7986 CFLAGS_OPTIMIZE=-02
7987 SHLIB_LD='${CC} -shared'
7988 LD_FLAGS="-Wl,--export-dynamic"
7989 if test $doRpath = yes; then :
7990
7991 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7992 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7993 fi
7994 ;;
7995 OpenBSD-*)
7996 arch=`arch -s`
7997 case "$arch" in
7998 vax)
7999 SHLIB_SUFFIX=""
8000 SHARED_LIB_SUFFIX=""
8001 LDFLAGS=""
8002 ;;
8003 *)
8004 case "$arch" in
8005 alpha|sparc64)
8006 SHLIB_CFLAGS="-fPIC"
8007 ;;
8008 *)
8009 SHLIB_CFLAGS="-fpic"
8010 ;;
8011 esac
8012 SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8013 SHLIB_SUFFIX=".so"
8014 if test $doRpath = yes; then :
8015
8016 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8017 fi
8018 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8019 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
8020 LDFLAGS="-Wl,-export-dynamic"
8021 ;;
8022 esac
8023 case "$arch" in
8024 vax)
8025 CFLAGS_OPTIMIZE="-O1"
8026 ;;
8027 *)
8028 CFLAGS_OPTIMIZE="-O2"
8029 ;;
8030 esac
8031 if test "${TCL_THREADS}" = "1"; then :
8032
8033 # On OpenBSD: Compile with -pthread
8034 # Don't link with -lpthread
8035 LIBS=`echo $LIBS | sed s/-lpthread//`
8036 CFLAGS="$CFLAGS -pthread"
8037
8038 fi
8039 # OpenBSD doesn't do version numbers with dots.
8040 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8041 TCL_LIB_VERSIONS_OK=nodots
8042 ;;
8043 NetBSD-*)
8044 # NetBSD has ELF and can use 'cc -shared' to build shared libs
8045 SHLIB_CFLAGS="-fPIC"
8046 SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8047 SHLIB_SUFFIX=".so"
8048 LDFLAGS="$LDFLAGS -export-dynamic"
8049 if test $doRpath = yes; then :
8050
8051 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8052 fi
8053 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8054 if test "${TCL_THREADS}" = "1"; then :
8055
8056 # The -pthread needs to go in the CFLAGS, not LIBS
8057 LIBS=`echo $LIBS | sed s/-pthread//`
8058 CFLAGS="$CFLAGS -pthread"
8059 LDFLAGS="$LDFLAGS -pthread"
8060
8061 fi
8062 ;;
8063 FreeBSD-*)
8064 # This configuration from FreeBSD Ports.
8065 SHLIB_CFLAGS="-fPIC"
8066 SHLIB_LD="${CC} -shared"
8067 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,-soname,\$@"
8068 SHLIB_SUFFIX=".so"
8069 LDFLAGS=""
8070 if test $doRpath = yes; then :
8071
8072 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8073 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8074 fi
8075 if test "${TCL_THREADS}" = "1"; then :
8076
8077 # The -pthread needs to go in the LDFLAGS, not LIBS
8078 LIBS=`echo $LIBS | sed s/-pthread//`
8079 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8080 LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
8081 fi
8082 case $system in
8083 FreeBSD-3.*)
8084 # Version numbers are dot-stripped by system policy.
8085 TCL_TRIM_DOTS=`echo ${PACKAGE_VERSION} | tr -d .`
8086 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8087 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
8088 TCL_LIB_VERSIONS_OK=nodots
8089 ;;
8090 esac
8091 ;;
8092 Darwin-*)
8093 CFLAGS_OPTIMIZE="-Os"
8094 SHLIB_CFLAGS="-fno-common"
8095 # To avoid discrepancies between what headers configure sees during
8096 # preprocessing tests and compiling tests, move any -isysroot and
8097 # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
8098 CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
8099 awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8100 if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
8101 CFLAGS="`echo " ${CFLAGS}" | \
8102 awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8103 if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
8104 if test $do64bit = yes; then :
8105
8106 case `arch` in
8107 ppc)
8108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5
8109 $as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; }
8110 if ${tcl_cv_cc_arch_ppc64+:} false; then :
8111 $as_echo_n "(cached) " >&6
8112 else
8113
8114 hold_cflags=$CFLAGS
8115 CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8117 /* end confdefs.h. */
8118
8119 int
8120 main ()
8121 {
8122
8123 ;
8124 return 0;
8125 }
8126 _ACEOF
8127 if ac_fn_c_try_link "$LINENO"; then :
8128 tcl_cv_cc_arch_ppc64=yes
8129 else
8130 tcl_cv_cc_arch_ppc64=no
8131 fi
8132 rm -f core conftest.err conftest.$ac_objext \
8133 conftest$ac_exeext conftest.$ac_ext
8134 CFLAGS=$hold_cflags
8135 fi
8136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5
8137 $as_echo "$tcl_cv_cc_arch_ppc64" >&6; }
8138 if test $tcl_cv_cc_arch_ppc64 = yes; then :
8139
8140 CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8141 do64bit_ok=yes
8142
8143 fi;;
8144 i386)
8145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5
8146 $as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; }
8147 if ${tcl_cv_cc_arch_x86_64+:} false; then :
8148 $as_echo_n "(cached) " >&6
8149 else
8150
8151 hold_cflags=$CFLAGS
8152 CFLAGS="$CFLAGS -arch x86_64"
8153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8154 /* end confdefs.h. */
8155
8156 int
8157 main ()
8158 {
8159
8160 ;
8161 return 0;
8162 }
8163 _ACEOF
8164 if ac_fn_c_try_link "$LINENO"; then :
8165 tcl_cv_cc_arch_x86_64=yes
8166 else
8167 tcl_cv_cc_arch_x86_64=no
8168 fi
8169 rm -f core conftest.err conftest.$ac_objext \
8170 conftest$ac_exeext conftest.$ac_ext
8171 CFLAGS=$hold_cflags
8172 fi
8173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5
8174 $as_echo "$tcl_cv_cc_arch_x86_64" >&6; }
8175 if test $tcl_cv_cc_arch_x86_64 = yes; then :
8176
8177 CFLAGS="$CFLAGS -arch x86_64"
8178 do64bit_ok=yes
8179
8180 fi;;
8181 *)
8182 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
8183 $as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
8184 esac
8185
8186 else
8187
8188 # Check for combined 32-bit and 64-bit fat build
8189 if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
8190 && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then :
8191
8192 fat_32_64=yes
8193 fi
8194
8195 fi
8196 # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8197 SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
8198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
8199 $as_echo_n "checking if ld accepts -single_module flag... " >&6; }
8200 if ${tcl_cv_ld_single_module+:} false; then :
8201 $as_echo_n "(cached) " >&6
8202 else
8203
8204 hold_ldflags=$LDFLAGS
8205 LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
8206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8207 /* end confdefs.h. */
8208
8209 int
8210 main ()
8211 {
8212 int i;
8213 ;
8214 return 0;
8215 }
8216 _ACEOF
8217 if ac_fn_c_try_link "$LINENO"; then :
8218 tcl_cv_ld_single_module=yes
8219 else
8220 tcl_cv_ld_single_module=no
8221 fi
8222 rm -f core conftest.err conftest.$ac_objext \
8223 conftest$ac_exeext conftest.$ac_ext
8224 LDFLAGS=$hold_ldflags
8225 fi
8226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5
8227 $as_echo "$tcl_cv_ld_single_module" >&6; }
8228 if test $tcl_cv_ld_single_module = yes; then :
8229
8230 SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
8231
8232 fi
8233 # TEA specific: link shlib with current and compatibility version flags
8234 vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
8235 SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
8236 SHLIB_SUFFIX=".dylib"
8237 # Don't use -prebind when building for Mac OS X 10.4 or later only:
8238 if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
8239 "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then :
8240
8241 LDFLAGS="$LDFLAGS -prebind"
8242 fi
8243 LDFLAGS="$LDFLAGS -headerpad_max_install_names"
8244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5
8245 $as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; }
8246 if ${tcl_cv_ld_search_paths_first+:} false; then :
8247 $as_echo_n "(cached) " >&6
8248 else
8249
8250 hold_ldflags=$LDFLAGS
8251 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
8252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8253 /* end confdefs.h. */
8254
8255 int
8256 main ()
8257 {
8258 int i;
8259 ;
8260 return 0;
8261 }
8262 _ACEOF
8263 if ac_fn_c_try_link "$LINENO"; then :
8264 tcl_cv_ld_search_paths_first=yes
8265 else
8266 tcl_cv_ld_search_paths_first=no
8267 fi
8268 rm -f core conftest.err conftest.$ac_objext \
8269 conftest$ac_exeext conftest.$ac_ext
8270 LDFLAGS=$hold_ldflags
8271 fi
8272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5
8273 $as_echo "$tcl_cv_ld_search_paths_first" >&6; }
8274 if test $tcl_cv_ld_search_paths_first = yes; then :
8275
8276 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
8277
8278 fi
8279 if test "$tcl_cv_cc_visibility_hidden" != yes; then :
8280
8281
8282 $as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h
8283
8284 tcl_cv_cc_visibility_hidden=yes
8285
8286 fi
8287 CC_SEARCH_FLAGS=""
8288 LD_SEARCH_FLAGS=""
8289 LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
8290 # TEA specific: for combined 32 & 64 bit fat builds of Tk
8291 # extensions, verify that 64-bit build is possible.
8292 if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then :
8293
8294 if test "${TEA_WINDOWINGSYSTEM}" = x11; then :
8295
8296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5
8297 $as_echo_n "checking for 64-bit X11... " >&6; }
8298 if ${tcl_cv_lib_x11_64+:} false; then :
8299 $as_echo_n "(cached) " >&6
8300 else
8301
8302 for v in CFLAGS CPPFLAGS LDFLAGS; do
8303 eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
8304 done
8305 CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
8306 LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
8307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8308 /* end confdefs.h. */
8309 #include <X11/Xlib.h>
8310 int
8311 main ()
8312 {
8313 XrmInitialize();
8314 ;
8315 return 0;
8316 }
8317 _ACEOF
8318 if ac_fn_c_try_link "$LINENO"; then :
8319 tcl_cv_lib_x11_64=yes
8320 else
8321 tcl_cv_lib_x11_64=no
8322 fi
8323 rm -f core conftest.err conftest.$ac_objext \
8324 conftest$ac_exeext conftest.$ac_ext
8325 for v in CFLAGS CPPFLAGS LDFLAGS; do
8326 eval $v'="$hold_'$v'"'
8327 done
8328 fi
8329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5
8330 $as_echo "$tcl_cv_lib_x11_64" >&6; }
8331
8332 fi
8333 if test "${TEA_WINDOWINGSYSTEM}" = aqua; then :
8334
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit Tk" >&5
8336 $as_echo_n "checking for 64-bit Tk... " >&6; }
8337 if ${tcl_cv_lib_tk_64+:} false; then :
8338 $as_echo_n "(cached) " >&6
8339 else
8340
8341 for v in CFLAGS CPPFLAGS LDFLAGS; do
8342 eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
8343 done
8344 CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
8345 LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
8346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8347 /* end confdefs.h. */
8348 #include <tk.h>
8349 int
8350 main ()
8351 {
8352 Tk_InitStubs(NULL, "", 0);
8353 ;
8354 return 0;
8355 }
8356 _ACEOF
8357 if ac_fn_c_try_link "$LINENO"; then :
8358 tcl_cv_lib_tk_64=yes
8359 else
8360 tcl_cv_lib_tk_64=no
8361 fi
8362 rm -f core conftest.err conftest.$ac_objext \
8363 conftest$ac_exeext conftest.$ac_ext
8364 for v in CFLAGS CPPFLAGS LDFLAGS; do
8365 eval $v'="$hold_'$v'"'
8366 done
8367 fi
8368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_tk_64" >&5
8369 $as_echo "$tcl_cv_lib_tk_64" >&6; }
8370
8371 fi
8372 # remove 64-bit arch flags from CFLAGS et al. if configuration
8373 # does not support 64-bit.
8374 if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then :
8375
8376 { $as_echo "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5
8377 $as_echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
8378 for v in CFLAGS CPPFLAGS LDFLAGS; do
8379 eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
8380 done
8381 fi
8382
8383 fi
8384 ;;
8385 OS/390-*)
8386 CFLAGS_OPTIMIZE="" # Optimizer is buggy
8387
8388 $as_echo "#define _OE_SOCKETS 1" >>confdefs.h
8389
8390 ;;
8391 OSF1-V*)
8392 # Digital OSF/1
8393 SHLIB_CFLAGS=""
8394 if test "$SHARED_BUILD" = 1; then :
8395
8396 SHLIB_LD='ld -shared -expect_unresolved "*"'
8397
8398 else
8399
8400 SHLIB_LD='ld -non_shared -expect_unresolved "*"'
8401
8402 fi
8403 SHLIB_SUFFIX=".so"
8404 if test $doRpath = yes; then :
8405
8406 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8407 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8408 fi
8409 if test "$GCC" = yes; then :
8410 CFLAGS="$CFLAGS -mieee"
8411 else
8412
8413 CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
8414 fi
8415 # see pthread_intro(3) for pthread support on osf1, k.furukawa
8416 if test "${TCL_THREADS}" = 1; then :
8417
8418 CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
8419 CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
8420 LIBS=`echo $LIBS | sed s/-lpthreads//`
8421 if test "$GCC" = yes; then :
8422
8423 LIBS="$LIBS -lpthread -lmach -lexc"
8424
8425 else
8426
8427 CFLAGS="$CFLAGS -pthread"
8428 LDFLAGS="$LDFLAGS -pthread"
8429
8430 fi
8431
8432 fi
8433 ;;
8434 QNX-6*)
8435 # QNX RTP
8436 # This may work for all QNX, but it was only reported for v6.
8437 SHLIB_CFLAGS="-fPIC"
8438 SHLIB_LD="ld -Bshareable -x"
8439 SHLIB_LD_LIBS=""
8440 SHLIB_SUFFIX=".so"
8441 CC_SEARCH_FLAGS=""
8442 LD_SEARCH_FLAGS=""
8443 ;;
8444 SCO_SV-3.2*)
8445 if test "$GCC" = yes; then :
8446
8447 SHLIB_CFLAGS="-fPIC -melf"
8448 LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
8449
8450 else
8451
8452 SHLIB_CFLAGS="-Kpic -belf"
8453 LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
8454
8455 fi
8456 SHLIB_LD="ld -G"
8457 SHLIB_LD_LIBS=""
8458 SHLIB_SUFFIX=".so"
8459 CC_SEARCH_FLAGS=""
8460 LD_SEARCH_FLAGS=""
8461 ;;
8462 SunOS-5.[0-6])
8463 # Careful to not let 5.10+ fall into this case
8464
8465 # Note: If _REENTRANT isn't defined, then Solaris
8466 # won't define thread-safe library routines.
8467
8468
8469 $as_echo "#define _REENTRANT 1" >>confdefs.h
8470
8471
8472 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
8473
8474
8475 SHLIB_CFLAGS="-KPIC"
8476 SHLIB_SUFFIX=".so"
8477 if test "$GCC" = yes; then :
8478
8479 SHLIB_LD='${CC} -shared'
8480 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8481 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8482
8483 else
8484
8485 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8486 CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8487 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8488
8489 fi
8490 ;;
8491 SunOS-5*)
8492 # Note: If _REENTRANT isn't defined, then Solaris
8493 # won't define thread-safe library routines.
8494
8495
8496 $as_echo "#define _REENTRANT 1" >>confdefs.h
8497
8498
8499 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
8500
8501
8502 SHLIB_CFLAGS="-KPIC"
8503
8504 # Check to enable 64-bit flags for compiler/linker
8505 if test "$do64bit" = yes; then :
8506
8507 arch=`isainfo`
8508 if test "$arch" = "sparcv9 sparc"; then :
8509
8510 if test "$GCC" = yes; then :
8511
8512 if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then :
8513
8514 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
8515 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
8516
8517 else
8518
8519 do64bit_ok=yes
8520 CFLAGS="$CFLAGS -m64 -mcpu=v9"
8521 LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
8522 SHLIB_CFLAGS="-fPIC"
8523
8524 fi
8525
8526 else
8527
8528 do64bit_ok=yes
8529 if test "$do64bitVIS" = yes; then :
8530
8531 CFLAGS="$CFLAGS -xarch=v9a"
8532 LDFLAGS_ARCH="-xarch=v9a"
8533
8534 else
8535
8536 CFLAGS="$CFLAGS -xarch=v9"
8537 LDFLAGS_ARCH="-xarch=v9"
8538
8539 fi
8540 # Solaris 64 uses this as well
8541 #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
8542
8543 fi
8544
8545 else
8546 if test "$arch" = "amd64 i386"; then :
8547
8548 if test "$GCC" = yes; then :
8549
8550 case $system in
8551 SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
8552 do64bit_ok=yes
8553 CFLAGS="$CFLAGS -m64"
8554 LDFLAGS="$LDFLAGS -m64";;
8555 *)
8556 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
8557 $as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
8558 esac
8559
8560 else
8561
8562 do64bit_ok=yes
8563 case $system in
8564 SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
8565 CFLAGS="$CFLAGS -m64"
8566 LDFLAGS="$LDFLAGS -m64";;
8567 *)
8568 CFLAGS="$CFLAGS -xarch=amd64"
8569 LDFLAGS="$LDFLAGS -xarch=amd64";;
8570 esac
8571
8572 fi
8573
8574 else
8575 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5
8576 $as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
8577 fi
8578 fi
8579
8580 fi
8581
8582 SHLIB_SUFFIX=".so"
8583 if test "$GCC" = yes; then :
8584
8585 SHLIB_LD='${CC} -shared'
8586 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8587 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8588 if test "$do64bit_ok" = yes; then :
8589
8590 if test "$arch" = "sparcv9 sparc"; then :
8591
8592 # We need to specify -static-libgcc or we need to
8593 # add the path to the sparv9 libgcc.
8594 # JH: static-libgcc is necessary for core Tcl, but may
8595 # not be necessary for extensions.
8596 SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
8597 # for finding sparcv9 libgcc, get the regular libgcc
8598 # path, remove so name and append 'sparcv9'
8599 #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
8600 #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
8601
8602 else
8603 if test "$arch" = "amd64 i386"; then :
8604
8605 # JH: static-libgcc is necessary for core Tcl, but may
8606 # not be necessary for extensions.
8607 SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
8608
8609 fi
8610 fi
8611
8612 fi
8613
8614 else
8615
8616 case $system in
8617 SunOS-5.[1-9][0-9]*)
8618 # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8619 SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
8620 *)
8621 SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
8622 esac
8623 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8624 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8625
8626 fi
8627 ;;
8628 UNIX_SV* | UnixWare-5*)
8629 SHLIB_CFLAGS="-KPIC"
8630 SHLIB_LD='${CC} -G'
8631 SHLIB_LD_LIBS=""
8632 SHLIB_SUFFIX=".so"
8633 # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
8634 # that don't grok the -Bexport option. Test that it does.
8635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5
8636 $as_echo_n "checking for ld accepts -Bexport flag... " >&6; }
8637 if ${tcl_cv_ld_Bexport+:} false; then :
8638 $as_echo_n "(cached) " >&6
8639 else
8640
8641 hold_ldflags=$LDFLAGS
8642 LDFLAGS="$LDFLAGS -Wl,-Bexport"
8643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8644 /* end confdefs.h. */
8645
8646 int
8647 main ()
8648 {
8649 int i;
8650 ;
8651 return 0;
8652 }
8653 _ACEOF
8654 if ac_fn_c_try_link "$LINENO"; then :
8655 tcl_cv_ld_Bexport=yes
8656 else
8657 tcl_cv_ld_Bexport=no
8658 fi
8659 rm -f core conftest.err conftest.$ac_objext \
8660 conftest$ac_exeext conftest.$ac_ext
8661 LDFLAGS=$hold_ldflags
8662 fi
8663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5
8664 $as_echo "$tcl_cv_ld_Bexport" >&6; }
8665 if test $tcl_cv_ld_Bexport = yes; then :
8666
8667 LDFLAGS="$LDFLAGS -Wl,-Bexport"
8668
8669 fi
8670 CC_SEARCH_FLAGS=""
8671 LD_SEARCH_FLAGS=""
8672 ;;
8673 esac
8674
8675 if test "$do64bit" = yes -a "$do64bit_ok" = no; then :
8676
8677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
8678 $as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
8679
8680 fi
8681
8682
8683
8684 # Add in the arch flags late to ensure it wasn't removed.
8685 # Not necessary in TEA, but this is aligned with core
8686 LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
8687
8688 # If we're running gcc, then change the C flags for compiling shared
8689 # libraries to the right flags for gcc, instead of those for the
8690 # standard manufacturer compiler.
8691
8692 if test "$GCC" = yes; then :
8693
8694 case $system in
8695 AIX-*) ;;
8696 BSD/OS*) ;;
8697 CYGWIN_*|MINGW32_*) ;;
8698 IRIX*) ;;
8699 NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
8700 Darwin-*) ;;
8701 SCO_SV-3.2*) ;;
8702 windows) ;;
8703 *) SHLIB_CFLAGS="-fPIC" ;;
8704 esac
8705 fi
8706
8707 if test "$tcl_cv_cc_visibility_hidden" != yes; then :
8708
8709
8710 $as_echo "#define MODULE_SCOPE extern" >>confdefs.h
8711
8712
8713 fi
8714
8715 if test "$SHARED_LIB_SUFFIX" = ""; then :
8716
8717 # TEA specific: use PACKAGE_VERSION instead of VERSION
8718 SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
8719 fi
8720 if test "$UNSHARED_LIB_SUFFIX" = ""; then :
8721
8722 # TEA specific: use PACKAGE_VERSION instead of VERSION
8723 UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
8724 fi
8725
8726 if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
8727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5
8728 $as_echo_n "checking for SEH support in compiler... " >&6; }
8729 if ${tcl_cv_seh+:} false; then :
8730 $as_echo_n "(cached) " >&6
8731 else
8732 if test "$cross_compiling" = yes; then :
8733 tcl_cv_seh=no
8734 else
8735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8736 /* end confdefs.h. */
8737
8738 #define WIN32_LEAN_AND_MEAN
8739 #include <windows.h>
8740 #undef WIN32_LEAN_AND_MEAN
8741
8742 int main(int argc, char** argv) {
8743 int a, b = 0;
8744 __try {
8745 a = 666 / b;
8746 }
8747 __except (EXCEPTION_EXECUTE_HANDLER) {
8748 return 0;
8749 }
8750 return 1;
8751 }
8752
8753 _ACEOF
8754 if ac_fn_c_try_run "$LINENO"; then :
8755 tcl_cv_seh=yes
8756 else
8757 tcl_cv_seh=no
8758 fi
8759 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8760 conftest.$ac_objext conftest.beam conftest.$ac_ext
8761 fi
8762
8763
8764 fi
8765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5
8766 $as_echo "$tcl_cv_seh" >&6; }
8767 if test "$tcl_cv_seh" = "no" ; then
8768
8769 $as_echo "#define HAVE_NO_SEH 1" >>confdefs.h
8770
8771 fi
8772
8773 #
8774 # Check to see if the excpt.h include file provided contains the
8775 # definition for EXCEPTION_DISPOSITION; if not, which is the case
8776 # with Cygwin's version as of 2002-04-10, define it to be int,
8777 # sufficient for getting the current code to work.
8778 #
8779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5
8780 $as_echo_n "checking for EXCEPTION_DISPOSITION support in include files... " >&6; }
8781 if ${tcl_cv_eh_disposition+:} false; then :
8782 $as_echo_n "(cached) " >&6
8783 else
8784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8785 /* end confdefs.h. */
8786
8787 # define WIN32_LEAN_AND_MEAN
8788 # include <windows.h>
8789 # undef WIN32_LEAN_AND_MEAN
8790
8791 int
8792 main ()
8793 {
8794
8795 EXCEPTION_DISPOSITION x;
8796
8797 ;
8798 return 0;
8799 }
8800 _ACEOF
8801 if ac_fn_c_try_compile "$LINENO"; then :
8802 tcl_cv_eh_disposition=yes
8803 else
8804 tcl_cv_eh_disposition=no
8805 fi
8806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8807
8808 fi
8809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5
8810 $as_echo "$tcl_cv_eh_disposition" >&6; }
8811 if test "$tcl_cv_eh_disposition" = "no" ; then
8812
8813 $as_echo "#define EXCEPTION_DISPOSITION int" >>confdefs.h
8814
8815 fi
8816
8817 # Check to see if winnt.h defines CHAR, SHORT, and LONG
8818 # even if VOID has already been #defined. The win32api
8819 # used by mingw and cygwin is known to do this.
8820
8821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5
8822 $as_echo_n "checking for winnt.h that ignores VOID define... " >&6; }
8823 if ${tcl_cv_winnt_ignore_void+:} false; then :
8824 $as_echo_n "(cached) " >&6
8825 else
8826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8827 /* end confdefs.h. */
8828
8829 #define VOID void
8830 #define WIN32_LEAN_AND_MEAN
8831 #include <windows.h>
8832 #undef WIN32_LEAN_AND_MEAN
8833
8834 int
8835 main ()
8836 {
8837
8838 CHAR c;
8839 SHORT s;
8840 LONG l;
8841
8842 ;
8843 return 0;
8844 }
8845 _ACEOF
8846 if ac_fn_c_try_compile "$LINENO"; then :
8847 tcl_cv_winnt_ignore_void=yes
8848 else
8849 tcl_cv_winnt_ignore_void=no
8850 fi
8851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8852
8853 fi
8854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5
8855 $as_echo "$tcl_cv_winnt_ignore_void" >&6; }
8856 if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
8857
8858 $as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h
8859
8860 fi
8861 fi
8862
8863 # See if the compiler supports casting to a union type.
8864 # This is used to stop gcc from printing a compiler
8865 # warning when initializing a union member.
8866
8867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
8868 $as_echo_n "checking for cast to union support... " >&6; }
8869 if ${tcl_cv_cast_to_union+:} false; then :
8870 $as_echo_n "(cached) " >&6
8871 else
8872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8873 /* end confdefs.h. */
8874
8875 int
8876 main ()
8877 {
8878
8879 union foo { int i; double d; };
8880 union foo f = (union foo) (int) 0;
8881
8882 ;
8883 return 0;
8884 }
8885 _ACEOF
8886 if ac_fn_c_try_compile "$LINENO"; then :
8887 tcl_cv_cast_to_union=yes
8888 else
8889 tcl_cv_cast_to_union=no
8890 fi
8891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8892
8893 fi
8894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
8895 $as_echo "$tcl_cv_cast_to_union" >&6; }
8896 if test "$tcl_cv_cast_to_union" = "yes"; then
8897
8898 $as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h
8899
8900 fi
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914 # These must be called after we do the basic CFLAGS checks and
8915 # verify any possible 64-bit or similar switches are necessary
8916
8917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5
8918 $as_echo_n "checking for required early compiler flags... " >&6; }
8919 tcl_flags=""
8920
8921 if ${tcl_cv_flag__isoc99_source+:} false; then :
8922 $as_echo_n "(cached) " >&6
8923 else
8924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8925 /* end confdefs.h. */
8926 #include <stdlib.h>
8927 int
8928 main ()
8929 {
8930 char *p = (char *)strtoll; char *q = (char *)strtoull;
8931 ;
8932 return 0;
8933 }
8934 _ACEOF
8935 if ac_fn_c_try_compile "$LINENO"; then :
8936 tcl_cv_flag__isoc99_source=no
8937 else
8938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8939 /* end confdefs.h. */
8940 #define _ISOC99_SOURCE 1
8941 #include <stdlib.h>
8942 int
8943 main ()
8944 {
8945 char *p = (char *)strtoll; char *q = (char *)strtoull;
8946 ;
8947 return 0;
8948 }
8949 _ACEOF
8950 if ac_fn_c_try_compile "$LINENO"; then :
8951 tcl_cv_flag__isoc99_source=yes
8952 else
8953 tcl_cv_flag__isoc99_source=no
8954 fi
8955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8956 fi
8957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8958 fi
8959
8960 if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
8961
8962 $as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h
8963
8964 tcl_flags="$tcl_flags _ISOC99_SOURCE"
8965 fi
8966
8967
8968 if ${tcl_cv_flag__largefile64_source+:} false; then :
8969 $as_echo_n "(cached) " >&6
8970 else
8971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8972 /* end confdefs.h. */
8973 #include <sys/stat.h>
8974 int
8975 main ()
8976 {
8977 struct stat64 buf; int i = stat64("/", &buf);
8978 ;
8979 return 0;
8980 }
8981 _ACEOF
8982 if ac_fn_c_try_compile "$LINENO"; then :
8983 tcl_cv_flag__largefile64_source=no
8984 else
8985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8986 /* end confdefs.h. */
8987 #define _LARGEFILE64_SOURCE 1
8988 #include <sys/stat.h>
8989 int
8990 main ()
8991 {
8992 struct stat64 buf; int i = stat64("/", &buf);
8993 ;
8994 return 0;
8995 }
8996 _ACEOF
8997 if ac_fn_c_try_compile "$LINENO"; then :
8998 tcl_cv_flag__largefile64_source=yes
8999 else
9000 tcl_cv_flag__largefile64_source=no
9001 fi
9002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9003 fi
9004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9005 fi
9006
9007 if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
9008
9009 $as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
9010
9011 tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
9012 fi
9013
9014
9015 if ${tcl_cv_flag__largefile_source64+:} false; then :
9016 $as_echo_n "(cached) " >&6
9017 else
9018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9019 /* end confdefs.h. */
9020 #include <sys/stat.h>
9021 int
9022 main ()
9023 {
9024 char *p = (char *)open64;
9025 ;
9026 return 0;
9027 }
9028 _ACEOF
9029 if ac_fn_c_try_compile "$LINENO"; then :
9030 tcl_cv_flag__largefile_source64=no
9031 else
9032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9033 /* end confdefs.h. */
9034 #define _LARGEFILE_SOURCE64 1
9035 #include <sys/stat.h>
9036 int
9037 main ()
9038 {
9039 char *p = (char *)open64;
9040 ;
9041 return 0;
9042 }
9043 _ACEOF
9044 if ac_fn_c_try_compile "$LINENO"; then :
9045 tcl_cv_flag__largefile_source64=yes
9046 else
9047 tcl_cv_flag__largefile_source64=no
9048 fi
9049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9050 fi
9051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9052 fi
9053
9054 if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
9055
9056 $as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h
9057
9058 tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
9059 fi
9060
9061 if test "x${tcl_flags}" = "x" ; then
9062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
9063 $as_echo "none" >&6; }
9064 else
9065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5
9066 $as_echo "${tcl_flags}" >&6; }
9067 fi
9068
9069
9070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5
9071 $as_echo_n "checking for 64-bit integer type... " >&6; }
9072 if ${tcl_cv_type_64bit+:} false; then :
9073 $as_echo_n "(cached) " >&6
9074 else
9075
9076 tcl_cv_type_64bit=none
9077 # See if the compiler knows natively about __int64
9078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9079 /* end confdefs.h. */
9080
9081 int
9082 main ()
9083 {
9084 __int64 value = (__int64) 0;
9085 ;
9086 return 0;
9087 }
9088 _ACEOF
9089 if ac_fn_c_try_compile "$LINENO"; then :
9090 tcl_type_64bit=__int64
9091 else
9092 tcl_type_64bit="long long"
9093 fi
9094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9095 # See if we should use long anyway Note that we substitute in the
9096 # type that is our current guess for a 64-bit type inside this check
9097 # program, so it should be modified only carefully...
9098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9099 /* end confdefs.h. */
9100
9101 int
9102 main ()
9103 {
9104 switch (0) {
9105 case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
9106 }
9107 ;
9108 return 0;
9109 }
9110 _ACEOF
9111 if ac_fn_c_try_compile "$LINENO"; then :
9112 tcl_cv_type_64bit=${tcl_type_64bit}
9113 fi
9114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9115 fi
9116
9117 if test "${tcl_cv_type_64bit}" = none ; then
9118
9119 $as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h
9120
9121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: using long" >&5
9122 $as_echo "using long" >&6; }
9123 elif test "${tcl_cv_type_64bit}" = "__int64" \
9124 -a "${TEA_PLATFORM}" = "windows" ; then
9125 # TEA specific: We actually want to use the default tcl.h checks in
9126 # this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
9127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: using Tcl header defaults" >&5
9128 $as_echo "using Tcl header defaults" >&6; }
9129 else
9130
9131 cat >>confdefs.h <<_ACEOF
9132 #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
9133 _ACEOF
9134
9135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5
9136 $as_echo "${tcl_cv_type_64bit}" >&6; }
9137
9138 # Now check for auxiliary declarations
9139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5
9140 $as_echo_n "checking for struct dirent64... " >&6; }
9141 if ${tcl_cv_struct_dirent64+:} false; then :
9142 $as_echo_n "(cached) " >&6
9143 else
9144
9145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9146 /* end confdefs.h. */
9147 #include <sys/types.h>
9148 #include <dirent.h>
9149 int
9150 main ()
9151 {
9152 struct dirent64 p;
9153 ;
9154 return 0;
9155 }
9156 _ACEOF
9157 if ac_fn_c_try_compile "$LINENO"; then :
9158 tcl_cv_struct_dirent64=yes
9159 else
9160 tcl_cv_struct_dirent64=no
9161 fi
9162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9163 fi
9164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5
9165 $as_echo "$tcl_cv_struct_dirent64" >&6; }
9166 if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
9167
9168 $as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h
9169
9170 fi
9171
9172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5
9173 $as_echo_n "checking for struct stat64... " >&6; }
9174 if ${tcl_cv_struct_stat64+:} false; then :
9175 $as_echo_n "(cached) " >&6
9176 else
9177
9178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9179 /* end confdefs.h. */
9180 #include <sys/stat.h>
9181 int
9182 main ()
9183 {
9184 struct stat64 p;
9185
9186 ;
9187 return 0;
9188 }
9189 _ACEOF
9190 if ac_fn_c_try_compile "$LINENO"; then :
9191 tcl_cv_struct_stat64=yes
9192 else
9193 tcl_cv_struct_stat64=no
9194 fi
9195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9196 fi
9197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5
9198 $as_echo "$tcl_cv_struct_stat64" >&6; }
9199 if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
9200
9201 $as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h
9202
9203 fi
9204
9205 for ac_func in open64 lseek64
9206 do :
9207 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9208 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9209 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9210 cat >>confdefs.h <<_ACEOF
9211 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9212 _ACEOF
9213
9214 fi
9215 done
9216
9217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5
9218 $as_echo_n "checking for off64_t... " >&6; }
9219 if ${tcl_cv_type_off64_t+:} false; then :
9220 $as_echo_n "(cached) " >&6
9221 else
9222
9223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9224 /* end confdefs.h. */
9225 #include <sys/types.h>
9226 int
9227 main ()
9228 {
9229 off64_t offset;
9230
9231 ;
9232 return 0;
9233 }
9234 _ACEOF
9235 if ac_fn_c_try_compile "$LINENO"; then :
9236 tcl_cv_type_off64_t=yes
9237 else
9238 tcl_cv_type_off64_t=no
9239 fi
9240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9241 fi
9242
9243 if test "x${tcl_cv_type_off64_t}" = "xyes" && \
9244 test "x${ac_cv_func_lseek64}" = "xyes" && \
9245 test "x${ac_cv_func_open64}" = "xyes" ; then
9246
9247 $as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h
9248
9249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9250 $as_echo "yes" >&6; }
9251 else
9252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9253 $as_echo "no" >&6; }
9254 fi
9255 fi
9256
9257
9258
9259 #--------------------------------------------------------------------
9260 # Set the default compiler switches based on the --enable-symbols
9261 # option.
9262 #--------------------------------------------------------------------
9263
9264
9265
9266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5
9267 $as_echo_n "checking for build with symbols... " >&6; }
9268 # Check whether --enable-symbols was given.
9269 if test "${enable_symbols+set}" = set; then :
9270 enableval=$enable_symbols; tcl_ok=$enableval
9271 else
9272 tcl_ok=no
9273 fi
9274
9275 DBGX=""
9276 if test "$tcl_ok" = "no"; then
9277 CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
9278 LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
9279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9280 $as_echo "no" >&6; }
9281 else
9282 CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
9283 LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
9284 if test "$tcl_ok" = "yes"; then
9285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5
9286 $as_echo "yes (standard debugging)" >&6; }
9287 fi
9288 fi
9289 # TEA specific:
9290 if test "${TEA_PLATFORM}" != "windows" ; then
9291 LDFLAGS_DEFAULT="${LDFLAGS}"
9292 fi
9293
9294
9295
9296
9297 if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
9298
9299 $as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h
9300
9301 fi
9302
9303 if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
9304 if test "$tcl_ok" = "all"; then
9305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem debugging" >&5
9306 $as_echo "enabled symbols mem debugging" >&6; }
9307 else
9308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5
9309 $as_echo "enabled $tcl_ok debugging" >&6; }
9310 fi
9311 fi
9312
9313
9314 #--------------------------------------------------------------------
9315 # Everyone should be linking against the Tcl stub library. If you
9316 # can't for some reason, remove this definition. If you aren't using
9317 # stubs, you also need to modify the SHLIB_LD_LIBS setting below to
9318 # link against the non-stubbed Tcl library.
9319 #--------------------------------------------------------------------
9320
9321 if test "${SHARED_BUILD}" = "1" ; then
9322 $as_echo "#define USE_TCL_STUBS 1" >>confdefs.h
9323
9324 $as_echo "#define USE_TK_STUBS 1" >>confdefs.h
9325
9326 $as_echo "#define USE_ITCL_STUBS 1" >>confdefs.h
9327
9328 fi
9329
9330 #--------------------------------------------------------------------
9331 # This macro generates a line to use when building a library. It
9332 # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
9333 # and TEA_LOAD_TCLCONFIG macros above.
9334 #--------------------------------------------------------------------
9335
9336
9337 if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
9338 MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
9339 MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
9340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9341 /* end confdefs.h. */
9342
9343 #if defined(_MSC_VER) && _MSC_VER >= 1400
9344 print("manifest needed")
9345 #endif
9346
9347 _ACEOF
9348 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9349 $EGREP "manifest needed" >/dev/null 2>&1; then :
9350
9351 # Could do a CHECK_PROG for mt, but should always be with MSVC8+
9352 VC_MANIFEST_EMBED_DLL="if test -f \[email protected] ; then mt.exe -nologo -manifest \[email protected] -outputresource:\$@\;2 ; fi"
9353 VC_MANIFEST_EMBED_EXE="if test -f \[email protected] ; then mt.exe -nologo -manifest \[email protected] -outputresource:\$@\;1 ; fi"
9354 MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
9355
9356 CLEANFILES="$CLEANFILES *.manifest"
9357
9358
9359 fi
9360 rm -f conftest*
9361
9362 MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\$@ \$(PKG_STUB_OBJECTS)"
9363 else
9364 MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
9365 MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
9366 MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
9367 fi
9368
9369 if test "${SHARED_BUILD}" = "1" ; then
9370 MAKE_LIB="${MAKE_SHARED_LIB} "
9371 else
9372 MAKE_LIB="${MAKE_STATIC_LIB} "
9373 fi
9374
9375 #--------------------------------------------------------------------
9376 # Shared libraries and static libraries have different names.
9377 # Use the double eval to make sure any variables in the suffix is
9378 # substituted. (@@@ Might not be necessary anymore)
9379 #--------------------------------------------------------------------
9380
9381 if test "${TEA_PLATFORM}" = "windows" ; then
9382 if test "${SHARED_BUILD}" = "1" ; then
9383 # We force the unresolved linking of symbols that are really in
9384 # the private libraries of Tcl and Tk.
9385 if test x"${TK_BIN_DIR}" != x ; then
9386 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
9387 fi
9388 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
9389 if test "$GCC" = "yes"; then
9390 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
9391 fi
9392 eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
9393 else
9394 eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
9395 if test "$GCC" = "yes"; then
9396 PKG_LIB_FILE=lib${PKG_LIB_FILE}
9397 fi
9398 fi
9399 # Some packages build their own stubs libraries
9400 eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
9401 if test "$GCC" = "yes"; then
9402 PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
9403 fi
9404 # These aren't needed on Windows (either MSVC or gcc)
9405 RANLIB=:
9406 RANLIB_STUB=:
9407 else
9408 RANLIB_STUB="${RANLIB}"
9409 if test "${SHARED_BUILD}" = "1" ; then
9410 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
9411 if test x"${TK_BIN_DIR}" != x ; then
9412 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
9413 fi
9414 eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
9415 RANLIB=:
9416 else
9417 eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
9418 fi
9419 # Some packages build their own stubs libraries
9420 eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
9421 fi
9422
9423 # These are escaped so that only CFLAGS is picked up at configure time.
9424 # The other values will be substituted at make time.
9425 CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
9426 if test "${SHARED_BUILD}" = "1" ; then
9427 CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
9428 fi
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439 #--------------------------------------------------------------------
9440 # __CHANGE__
9441 # Change the name from exampeA_LIB_FILE to match your package name.
9442 # Use the stub_LIB_FILE substitution if your package creates a stub
9443 # library.
9444 #--------------------------------------------------------------------
9445
9446
9447
9448
9449 #--------------------------------------------------------------------
9450 # Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
9451 # file during the install process. Don't run the TCLSH_PROG through
9452 # ${CYGPATH} because it's being used directly by make.
9453 # Require that we use a tclsh shell version 8.2 or later since earlier
9454 # versions have bugs in the pkg_mkIndex routine.
9455 #--------------------------------------------------------------------
9456
9457
9458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5
9459 $as_echo_n "checking for tclsh... " >&6; }
9460 if test -f "${TCL_BIN_DIR}/Makefile" ; then
9461 # tclConfig.sh is in Tcl build directory
9462 if test "${TEA_PLATFORM}" = "windows"; then
9463 TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
9464 else
9465 TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
9466 fi
9467 else
9468 # tclConfig.sh is in install location
9469 if test "${TEA_PLATFORM}" = "windows"; then
9470 TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
9471 else
9472 TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
9473 fi
9474 list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
9475 `ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \
9476 `ls -d ${TCL_PREFIX}/bin 2>/dev/null`"
9477 for i in $list ; do
9478 if test -f "$i/${TCLSH_PROG}" ; then
9479 REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
9480 break
9481 fi
9482 done
9483 TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
9484 fi
9485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${TCLSH_PROG}" >&5
9486 $as_echo "${TCLSH_PROG}" >&6; }
9487
9488
9489
9490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wish" >&5
9491 $as_echo_n "checking for wish... " >&6; }
9492 if test -f "${TK_BIN_DIR}/Makefile" ; then
9493 # tkConfig.sh is in Tk build directory
9494 if test "${TEA_PLATFORM}" = "windows"; then
9495 WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
9496 else
9497 WISH_PROG="${TK_BIN_DIR}/wish"
9498 fi
9499 else
9500 # tkConfig.sh is in install location
9501 if test "${TEA_PLATFORM}" = "windows"; then
9502 WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
9503 else
9504 WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
9505 fi
9506 list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
9507 `ls -d ${TK_BIN_DIR}/.. 2>/dev/null` \
9508 `ls -d ${TK_PREFIX}/bin 2>/dev/null`"
9509 for i in $list ; do
9510 if test -f "$i/${WISH_PROG}" ; then
9511 REAL_TK_BIN_DIR="`cd "$i"; pwd`/"
9512 break
9513 fi
9514 done
9515 WISH_PROG="${REAL_TK_BIN_DIR}${WISH_PROG}"
9516 fi
9517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WISH_PROG}" >&5
9518 $as_echo "${WISH_PROG}" >&6; }
9519
9520
9521
9522 #--------------------------------------------------------------------
9523 # Finally, substitute all of the various values into the Makefile.
9524 #--------------------------------------------------------------------
9525
9526 ac_config_files="$ac_config_files Makefile pkgIndex.tcl itkConfig.sh"
9527
9528 cat >confcache <<\_ACEOF
9529 # This file is a shell script that caches the results of configure
9530 # tests run on this system so they can be shared between configure
9531 # scripts and configure runs, see configure's option --config-cache.
9532 # It is not useful on other systems. If it contains results you don't
9533 # want to keep, you may remove or edit it.
9534 #
9535 # config.status only pays attention to the cache file if you give it
9536 # the --recheck option to rerun configure.
9537 #
9538 # `ac_cv_env_foo' variables (set or unset) will be overridden when
9539 # loading this file, other *unset* `ac_cv_foo' will be assigned the
9540 # following values.
9541
9542 _ACEOF
9543
9544 # The following way of writing the cache mishandles newlines in values,
9545 # but we know of no workaround that is simple, portable, and efficient.
9546 # So, we kill variables containing newlines.
9547 # Ultrix sh set writes to stderr and can't be redirected directly,
9548 # and sets the high bit in the cache file unless we assign to the vars.
9549 (
9550 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
9551 eval ac_val=\$$ac_var
9552 case $ac_val in #(
9553 *${as_nl}*)
9554 case $ac_var in #(
9555 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
9556 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
9557 esac
9558 case $ac_var in #(
9559 _ | IFS | as_nl) ;; #(
9560 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
9561 *) { eval $ac_var=; unset $ac_var;} ;;
9562 esac ;;
9563 esac
9564 done
9565
9566 (set) 2>&1 |
9567 case $as_nl`(ac_space=' '; set) 2>&1` in #(
9568 *${as_nl}ac_space=\ *)
9569 # `set' does not quote correctly, so add quotes: double-quote
9570 # substitution turns \\\\ into \\, and sed turns \\ into \.
9571 sed -n \
9572 "s/'/'\\\\''/g;
9573 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
9574 ;; #(
9575 *)
9576 # `set' quotes correctly as required by POSIX, so do not add quotes.
9577 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
9578 ;;
9579 esac |
9580 sort
9581 ) |
9582 sed '
9583 /^ac_cv_env_/b end
9584 t clear
9585 :clear
9586 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
9587 t end
9588 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
9589 :end' >>confcache
9590 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
9591 if test -w "$cache_file"; then
9592 if test "x$cache_file" != "x/dev/null"; then
9593 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
9594 $as_echo "$as_me: updating cache $cache_file" >&6;}
9595 if test ! -f "$cache_file" || test -h "$cache_file"; then
9596 cat confcache >"$cache_file"
9597 else
9598 case $cache_file in #(
9599 */* | ?:*)
9600 mv -f confcache "$cache_file"$$ &&
9601 mv -f "$cache_file"$$ "$cache_file" ;; #(
9602 *)
9603 mv -f confcache "$cache_file" ;;
9604 esac
9605 fi
9606 fi
9607 else
9608 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
9609 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
9610 fi
9611 fi
9612 rm -f confcache
9613
9614 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9615 # Let make expand exec_prefix.
9616 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9617
9618 # Transform confdefs.h into DEFS.
9619 # Protect against shell expansion while executing Makefile rules.
9620 # Protect against Makefile macro expansion.
9621 #
9622 # If the first sed substitution is executed (which looks for macros that
9623 # take arguments), then branch to the quote section. Otherwise,
9624 # look for a macro that doesn't take arguments.
9625 ac_script='
9626 :mline
9627 /\\$/{
9628 N
9629 s,\\\n,,
9630 b mline
9631 }
9632 t clear
9633 :clear
9634 s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
9635 t quote
9636 s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
9637 t quote
9638 b any
9639 :quote
9640 s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
9641 s/\[/\\&/g
9642 s/\]/\\&/g
9643 s/\$/$$/g
9644 H
9645 :any
9646 ${
9647 g
9648 s/^\n//
9649 s/\n/ /g
9650 p
9651 }
9652 '
9653 DEFS=`sed -n "$ac_script" confdefs.h`
9654
9655
9656 ac_libobjs=
9657 ac_ltlibobjs=
9658 U=
9659 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
9660 # 1. Remove the extension, and $U if already installed.
9661 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
9662 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
9663 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
9664 # will be set to the directory where LIBOBJS objects are built.
9665 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
9666 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
9667 done
9668 LIBOBJS=$ac_libobjs
9669
9670 LTLIBOBJS=$ac_ltlibobjs
9671
9672
9673
9674 CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
9675
9676 : "${CONFIG_STATUS=./config.status}"
9677 ac_write_fail=0
9678 ac_clean_files_save=$ac_clean_files
9679 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
9680 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
9681 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
9682 as_write_fail=0
9683 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
9684 #! $SHELL
9685 # Generated by $as_me.
9686 # Run this file to recreate the current configuration.
9687 # Compiler output produced by configure, useful for debugging
9688 # configure, is in config.log if it exists.
9689
9690 debug=false
9691 ac_cs_recheck=false
9692 ac_cs_silent=false
9693
9694 SHELL=\${CONFIG_SHELL-$SHELL}
9695 export SHELL
9696 _ASEOF
9697 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
9698 ## -------------------- ##
9699 ## M4sh Initialization. ##
9700 ## -------------------- ##
9701
9702 # Be more Bourne compatible
9703 DUALCASE=1; export DUALCASE # for MKS sh
9704 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
9705 emulate sh
9706 NULLCMD=:
9707 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
9708 # is contrary to our usage. Disable this feature.
9709 alias -g '${1+"$@"}'='"$@"'
9710 setopt NO_GLOB_SUBST
9711 else
9712 case `(set -o) 2>/dev/null` in #(
9713 *posix*) :
9714 set -o posix ;; #(
9715 *) :
9716 ;;
9717 esac
9718 fi
9719
9720
9721 as_nl='
9722 '
9723 export as_nl
9724 # Printing a long string crashes Solaris 7 /usr/bin/printf.
9725 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
9726 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
9727 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
9728 # Prefer a ksh shell builtin over an external printf program on Solaris,
9729 # but without wasting forks for bash or zsh.
9730 if test -z "$BASH_VERSION$ZSH_VERSION" \
9731 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
9732 as_echo='print -r --'
9733 as_echo_n='print -rn --'
9734 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
9735 as_echo='printf %s\n'
9736 as_echo_n='printf %s'
9737 else
9738 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
9739 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
9740 as_echo_n='/usr/ucb/echo -n'
9741 else
9742 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
9743 as_echo_n_body='eval
9744 arg=$1;
9745 case $arg in #(
9746 *"$as_nl"*)
9747 expr "X$arg" : "X\\(.*\\)$as_nl";
9748 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
9749 esac;
9750 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
9751 '
9752 export as_echo_n_body
9753 as_echo_n='sh -c $as_echo_n_body as_echo'
9754 fi
9755 export as_echo_body
9756 as_echo='sh -c $as_echo_body as_echo'
9757 fi
9758
9759 # The user is always right.
9760 if test "${PATH_SEPARATOR+set}" != set; then
9761 PATH_SEPARATOR=:
9762 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
9763 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
9764 PATH_SEPARATOR=';'
9765 }
9766 fi
9767
9768
9769 # IFS
9770 # We need space, tab and new line, in precisely that order. Quoting is
9771 # there to prevent editors from complaining about space-tab.
9772 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
9773 # splitting by setting IFS to empty value.)
9774 IFS=" "" $as_nl"
9775
9776 # Find who we are. Look in the path if we contain no directory separator.
9777 as_myself=
9778 case $0 in #((
9779 *[\\/]* ) as_myself=$0 ;;
9780 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9781 for as_dir in $PATH
9782 do
9783 IFS=$as_save_IFS
9784 test -z "$as_dir" && as_dir=.
9785 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
9786 done
9787 IFS=$as_save_IFS
9788
9789 ;;
9790 esac
9791 # We did not find ourselves, most probably we were run as `sh COMMAND'
9792 # in which case we are not to be found in the path.
9793 if test "x$as_myself" = x; then
9794 as_myself=$0
9795 fi
9796 if test ! -f "$as_myself"; then
9797 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
9798 exit 1
9799 fi
9800
9801 # Unset variables that we do not need and which cause bugs (e.g. in
9802 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
9803 # suppresses any "Segmentation fault" message there. '((' could
9804 # trigger a bug in pdksh 5.2.14.
9805 for as_var in BASH_ENV ENV MAIL MAILPATH
9806 do eval test x\${$as_var+set} = xset \
9807 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
9808 done
9809 PS1='$ '
9810 PS2='> '
9811 PS4='+ '
9812
9813 # NLS nuisances.
9814 LC_ALL=C
9815 export LC_ALL
9816 LANGUAGE=C
9817 export LANGUAGE
9818
9819 # CDPATH.
9820 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
9821
9822
9823 # as_fn_error STATUS ERROR [LINENO LOG_FD]
9824 # ----------------------------------------
9825 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
9826 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
9827 # script with STATUS, using 1 if that was 0.
9828 as_fn_error ()
9829 {
9830 as_status=$1; test $as_status -eq 0 && as_status=1
9831 if test "$4"; then
9832 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
9833 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
9834 fi
9835 $as_echo "$as_me: error: $2" >&2
9836 as_fn_exit $as_status
9837 } # as_fn_error
9838
9839
9840 # as_fn_set_status STATUS
9841 # -----------------------
9842 # Set $? to STATUS, without forking.
9843 as_fn_set_status ()
9844 {
9845 return $1
9846 } # as_fn_set_status
9847
9848 # as_fn_exit STATUS
9849 # -----------------
9850 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
9851 as_fn_exit ()
9852 {
9853 set +e
9854 as_fn_set_status $1
9855 exit $1
9856 } # as_fn_exit
9857
9858 # as_fn_unset VAR
9859 # ---------------
9860 # Portably unset VAR.
9861 as_fn_unset ()
9862 {
9863 { eval $1=; unset $1;}
9864 }
9865 as_unset=as_fn_unset
9866 # as_fn_append VAR VALUE
9867 # ----------------------
9868 # Append the text in VALUE to the end of the definition contained in VAR. Take
9869 # advantage of any shell optimizations that allow amortized linear growth over
9870 # repeated appends, instead of the typical quadratic growth present in naive
9871 # implementations.
9872 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
9873 eval 'as_fn_append ()
9874 {
9875 eval $1+=\$2
9876 }'
9877 else
9878 as_fn_append ()
9879 {
9880 eval $1=\$$1\$2
9881 }
9882 fi # as_fn_append
9883
9884 # as_fn_arith ARG...
9885 # ------------------
9886 # Perform arithmetic evaluation on the ARGs, and store the result in the
9887 # global $as_val. Take advantage of shells that can avoid forks. The arguments
9888 # must be portable across $(()) and expr.
9889 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
9890 eval 'as_fn_arith ()
9891 {
9892 as_val=$(( $* ))
9893 }'
9894 else
9895 as_fn_arith ()
9896 {
9897 as_val=`expr "$@" || test $? -eq 1`
9898 }
9899 fi # as_fn_arith
9900
9901
9902 if expr a : '\(a\)' >/dev/null 2>&1 &&
9903 test "X`expr 00001 : '.*\(...\)'`" = X001; then
9904 as_expr=expr
9905 else
9906 as_expr=false
9907 fi
9908
9909 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
9910 as_basename=basename
9911 else
9912 as_basename=false
9913 fi
9914
9915 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
9916 as_dirname=dirname
9917 else
9918 as_dirname=false
9919 fi
9920
9921 as_me=`$as_basename -- "$0" ||
9922 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
9923 X"$0" : 'X\(//\)$' \| \
9924 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
9925 $as_echo X/"$0" |
9926 sed '/^.*\/\([^/][^/]*\)\/*$/{
9927 s//\1/
9928 q
9929 }
9930 /^X\/\(\/\/\)$/{
9931 s//\1/
9932 q
9933 }
9934 /^X\/\(\/\).*/{
9935 s//\1/
9936 q
9937 }
9938 s/.*/./; q'`
9939
9940 # Avoid depending upon Character Ranges.
9941 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
9942 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
9943 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
9944 as_cr_digits='0123456789'
9945 as_cr_alnum=$as_cr_Letters$as_cr_digits
9946
9947 ECHO_C= ECHO_N= ECHO_T=
9948 case `echo -n x` in #(((((
9949 -n*)
9950 case `echo 'xy\c'` in
9951 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
9952 xy) ECHO_C='\c';;
9953 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
9954 ECHO_T=' ';;
9955 esac;;
9956 *)
9957 ECHO_N='-n';;
9958 esac
9959
9960 rm -f conf$$ conf$$.exe conf$$.file
9961 if test -d conf$$.dir; then
9962 rm -f conf$$.dir/conf$$.file
9963 else
9964 rm -f conf$$.dir
9965 mkdir conf$$.dir 2>/dev/null
9966 fi
9967 if (echo >conf$$.file) 2>/dev/null; then
9968 if ln -s conf$$.file conf$$ 2>/dev/null; then
9969 as_ln_s='ln -s'
9970 # ... but there are two gotchas:
9971 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
9972 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
9973 # In both cases, we have to default to `cp -pR'.
9974 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
9975 as_ln_s='cp -pR'
9976 elif ln conf$$.file conf$$ 2>/dev/null; then
9977 as_ln_s=ln
9978 else
9979 as_ln_s='cp -pR'
9980 fi
9981 else
9982 as_ln_s='cp -pR'
9983 fi
9984 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
9985 rmdir conf$$.dir 2>/dev/null
9986
9987
9988 # as_fn_mkdir_p
9989 # -------------
9990 # Create "$as_dir" as a directory, including parents if necessary.
9991 as_fn_mkdir_p ()
9992 {
9993
9994 case $as_dir in #(
9995 -*) as_dir=./$as_dir;;
9996 esac
9997 test -d "$as_dir" || eval $as_mkdir_p || {
9998 as_dirs=
9999 while :; do
10000 case $as_dir in #(
10001 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
10002 *) as_qdir=$as_dir;;
10003 esac
10004 as_dirs="'$as_qdir' $as_dirs"
10005 as_dir=`$as_dirname -- "$as_dir" ||
10006 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10007 X"$as_dir" : 'X\(//\)[^/]' \| \
10008 X"$as_dir" : 'X\(//\)$' \| \
10009 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
10010 $as_echo X"$as_dir" |
10011 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
10012 s//\1/
10013 q
10014 }
10015 /^X\(\/\/\)[^/].*/{
10016 s//\1/
10017 q
10018 }
10019 /^X\(\/\/\)$/{
10020 s//\1/
10021 q
10022 }
10023 /^X\(\/\).*/{
10024 s//\1/
10025 q
10026 }
10027 s/.*/./; q'`
10028 test -d "$as_dir" && break
10029 done
10030 test -z "$as_dirs" || eval "mkdir $as_dirs"
10031 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
10032
10033
10034 } # as_fn_mkdir_p
10035 if mkdir -p . 2>/dev/null; then
10036 as_mkdir_p='mkdir -p "$as_dir"'
10037 else
10038 test -d ./-p && rmdir ./-p
10039 as_mkdir_p=false
10040 fi
10041
10042
10043 # as_fn_executable_p FILE
10044 # -----------------------
10045 # Test if FILE is an executable regular file.
10046 as_fn_executable_p ()
10047 {
10048 test -f "$1" && test -x "$1"
10049 } # as_fn_executable_p
10050 as_test_x='test -x'
10051 as_executable_p=as_fn_executable_p
10052
10053 # Sed expression to map a string onto a valid CPP name.
10054 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
10055
10056 # Sed expression to map a string onto a valid variable name.
10057 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
10058
10059
10060 exec 6>&1
10061 ## ----------------------------------- ##
10062 ## Main body of $CONFIG_STATUS script. ##
10063 ## ----------------------------------- ##
10064 _ASEOF
10065 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
10066
10067 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10068 # Save the log message, to keep $0 and so on meaningful, and to
10069 # report actual input values of CONFIG_FILES etc. instead of their
10070 # values after options handling.
10071 ac_log="
10072 This file was extended by itk $as_me 3.4, which was
10073 generated by GNU Autoconf 2.69. Invocation command line was
10074
10075 CONFIG_FILES = $CONFIG_FILES
10076 CONFIG_HEADERS = $CONFIG_HEADERS
10077 CONFIG_LINKS = $CONFIG_LINKS
10078 CONFIG_COMMANDS = $CONFIG_COMMANDS
10079 $ $0 $@
10080
10081 on `(hostname || uname -n) 2>/dev/null | sed 1q`
10082 "
10083
10084 _ACEOF
10085
10086 case $ac_config_files in *"
10087 "*) set x $ac_config_files; shift; ac_config_files=$*;;
10088 esac
10089
10090
10091
10092 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10093 # Files that config.status was made for.
10094 config_files="$ac_config_files"
10095
10096 _ACEOF
10097
10098 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10099 ac_cs_usage="\
10100 \`$as_me' instantiates files and other configuration actions
10101 from templates according to the current configuration. Unless the files
10102 and actions are specified as TAGs, all are instantiated by default.
10103
10104 Usage: $0 [OPTION]... [TAG]...
10105
10106 -h, --help print this help, then exit
10107 -V, --version print version number and configuration settings, then exit
10108 --config print configuration, then exit
10109 -q, --quiet, --silent
10110 do not print progress messages
10111 -d, --debug don't remove temporary files
10112 --recheck update $as_me by reconfiguring in the same conditions
10113 --file=FILE[:TEMPLATE]
10114 instantiate the configuration file FILE
10115
10116 Configuration files:
10117 $config_files
10118
10119 Report bugs to the package provider."
10120
10121 _ACEOF
10122 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10123 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
10124 ac_cs_version="\\
10125 itk config.status 3.4
10126 configured by $0, generated by GNU Autoconf 2.69,
10127 with options \\"\$ac_cs_config\\"
10128
10129 Copyright (C) 2012 Free Software Foundation, Inc.
10130 This config.status script is free software; the Free Software Foundation
10131 gives unlimited permission to copy, distribute and modify it."
10132
10133 ac_pwd='$ac_pwd'
10134 srcdir='$srcdir'
10135 test -n "\$AWK" || AWK=awk
10136 _ACEOF
10137
10138 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10139 # The default lists apply if the user does not specify any file.
10140 ac_need_defaults=:
10141 while test $# != 0
10142 do
10143 case $1 in
10144 --*=?*)
10145 ac_option=`expr "X$1" : 'X\([^=]*\)='`
10146 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
10147 ac_shift=:
10148 ;;
10149 --*=)
10150 ac_option=`expr "X$1" : 'X\([^=]*\)='`
10151 ac_optarg=
10152 ac_shift=:
10153 ;;
10154 *)
10155 ac_option=$1
10156 ac_optarg=$2
10157 ac_shift=shift
10158 ;;
10159 esac
10160
10161 case $ac_option in
10162 # Handling of the options.
10163 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10164 ac_cs_recheck=: ;;
10165 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
10166 $as_echo "$ac_cs_version"; exit ;;
10167 --config | --confi | --conf | --con | --co | --c )
10168 $as_echo "$ac_cs_config"; exit ;;
10169 --debug | --debu | --deb | --de | --d | -d )
10170 debug=: ;;
10171 --file | --fil | --fi | --f )
10172 $ac_shift
10173 case $ac_optarg in
10174 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
10175 '') as_fn_error $? "missing file argument" ;;
10176 esac
10177 as_fn_append CONFIG_FILES " '$ac_optarg'"
10178 ac_need_defaults=false;;
10179 --he | --h | --help | --hel | -h )
10180 $as_echo "$ac_cs_usage"; exit ;;
10181 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
10182 | -silent | --silent | --silen | --sile | --sil | --si | --s)
10183 ac_cs_silent=: ;;
10184
10185 # This is an error.
10186 -*) as_fn_error $? "unrecognized option: \`$1'
10187 Try \`$0 --help' for more information." ;;
10188
10189 *) as_fn_append ac_config_targets " $1"
10190 ac_need_defaults=false ;;
10191
10192 esac
10193 shift
10194 done
10195
10196 ac_configure_extra_args=
10197
10198 if $ac_cs_silent; then
10199 exec 6>/dev/null
10200 ac_configure_extra_args="$ac_configure_extra_args --silent"
10201 fi
10202
10203 _ACEOF
10204 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10205 if \$ac_cs_recheck; then
10206 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
10207 shift
10208 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
10209 CONFIG_SHELL='$SHELL'
10210 export CONFIG_SHELL
10211 exec "\$@"
10212 fi
10213
10214 _ACEOF
10215 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10216 exec 5>>config.log
10217 {
10218 echo
10219 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
10220 ## Running $as_me. ##
10221 _ASBOX
10222 $as_echo "$ac_log"
10223 } >&5
10224
10225 _ACEOF
10226 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10227 _ACEOF
10228
10229 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10230
10231 # Handling of arguments.
10232 for ac_config_target in $ac_config_targets
10233 do
10234 case $ac_config_target in
10235 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
10236 "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;;
10237 "itkConfig.sh") CONFIG_FILES="$CONFIG_FILES itkConfig.sh" ;;
10238
10239 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
10240 esac
10241 done
10242
10243
10244 # If the user did not use the arguments to specify the items to instantiate,
10245 # then the envvar interface is used. Set only those that are not.
10246 # We use the long form for the default assignment because of an extremely
10247 # bizarre bug on SunOS 4.1.3.
10248 if $ac_need_defaults; then
10249 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
10250 fi
10251
10252 # Have a temporary directory for convenience. Make it in the build tree
10253 # simply because there is no reason against having it here, and in addition,
10254 # creating and moving files from /tmp can sometimes cause problems.
10255 # Hook for its removal unless debugging.
10256 # Note that there is a small window in which the directory will not be cleaned:
10257 # after its creation but before its name has been assigned to `$tmp'.
10258 $debug ||
10259 {
10260 tmp= ac_tmp=
10261 trap 'exit_status=$?
10262 : "${ac_tmp:=$tmp}"
10263 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
10264 ' 0
10265 trap 'as_fn_exit 1' 1 2 13 15
10266 }
10267 # Create a (secure) tmp directory for tmp files.
10268
10269 {
10270 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
10271 test -d "$tmp"
10272 } ||
10273 {
10274 tmp=./conf$$-$RANDOM
10275 (umask 077 && mkdir "$tmp")
10276 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
10277 ac_tmp=$tmp
10278
10279 # Set up the scripts for CONFIG_FILES section.
10280 # No need to generate them if there are no CONFIG_FILES.
10281 # This happens for instance with `./config.status config.h'.
10282 if test -n "$CONFIG_FILES"; then
10283
10284
10285 ac_cr=`echo X | tr X '\015'`
10286 # On cygwin, bash can eat \r inside `` if the user requested igncr.
10287 # But we know of no other shell where ac_cr would be empty at this
10288 # point, so we can use a bashism as a fallback.
10289 if test "x$ac_cr" = x; then
10290 eval ac_cr=\$\'\\r\'
10291 fi
10292 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
10293 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
10294 ac_cs_awk_cr='\\r'
10295 else
10296 ac_cs_awk_cr=$ac_cr
10297 fi
10298
10299 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
10300 _ACEOF
10301
10302
10303 {
10304 echo "cat >conf$$subs.awk <<_ACEOF" &&
10305 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
10306 echo "_ACEOF"
10307 } >conf$$subs.sh ||
10308 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
10309 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
10310 ac_delim='%!_!# '
10311 for ac_last_try in false false false false false :; do
10312 . ./conf$$subs.sh ||
10313 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
10314
10315 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
10316 if test $ac_delim_n = $ac_delim_num; then
10317 break
10318 elif $ac_last_try; then
10319 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
10320 else
10321 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
10322 fi
10323 done
10324 rm -f conf$$subs.sh
10325
10326 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10327 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
10328 _ACEOF
10329 sed -n '
10330 h
10331 s/^/S["/; s/!.*/"]=/
10332 p
10333 g
10334 s/^[^!]*!//
10335 :repl
10336 t repl
10337 s/'"$ac_delim"'$//
10338 t delim
10339 :nl
10340 h
10341 s/\(.\{148\}\)..*/\1/
10342 t more1
10343 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
10344 p
10345 n
10346 b repl
10347 :more1
10348 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
10349 p
10350 g
10351 s/.\{148\}//
10352 t nl
10353 :delim
10354 h
10355 s/\(.\{148\}\)..*/\1/
10356 t more2
10357 s/["\\]/\\&/g; s/^/"/; s/$/"/
10358 p
10359 b
10360 :more2
10361 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
10362 p
10363 g
10364 s/.\{148\}//
10365 t delim
10366 ' <conf$$subs.awk | sed '
10367 /^[^""]/{
10368 N
10369 s/\n//
10370 }
10371 ' >>$CONFIG_STATUS || ac_write_fail=1
10372 rm -f conf$$subs.awk
10373 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10374 _ACAWK
10375 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
10376 for (key in S) S_is_set[key] = 1
10377 FS = ""
10378
10379 }
10380 {
10381 line = $ 0
10382 nfields = split(line, field, "@")
10383 substed = 0
10384 len = length(field[1])
10385 for (i = 2; i < nfields; i++) {
10386 key = field[i]
10387 keylen = length(key)
10388 if (S_is_set[key]) {
10389 value = S[key]
10390 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
10391 len += length(value) + length(field[++i])
10392 substed = 1
10393 } else
10394 len += 1 + keylen
10395 }
10396
10397 print line
10398 }
10399
10400 _ACAWK
10401 _ACEOF
10402 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10403 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
10404 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
10405 else
10406 cat
10407 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
10408 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
10409 _ACEOF
10410
10411 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
10412 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
10413 # trailing colons and then remove the whole line if VPATH becomes empty
10414 # (actually we leave an empty line to preserve line numbers).
10415 if test "x$srcdir" = x.; then
10416 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
10417 h
10418 s///
10419 s/^/:/
10420 s/[ ]*$/:/
10421 s/:\$(srcdir):/:/g
10422 s/:\${srcdir}:/:/g
10423 s/:@srcdir@:/:/g
10424 s/^:*//
10425 s/:*$//
10426 x
10427 s/\(=[ ]*\).*/\1/
10428 G
10429 s/\n//
10430 s/^[^=]*=[ ]*$//
10431 }'
10432 fi
10433
10434 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10435 fi # test -n "$CONFIG_FILES"
10436
10437
10438 eval set X " :F $CONFIG_FILES "
10439 shift
10440 for ac_tag
10441 do
10442 case $ac_tag in
10443 :[FHLC]) ac_mode=$ac_tag; continue;;
10444 esac
10445 case $ac_mode$ac_tag in
10446 :[FHL]*:*);;
10447 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
10448 :[FH]-) ac_tag=-:-;;
10449 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
10450 esac
10451 ac_save_IFS=$IFS
10452 IFS=:
10453 set x $ac_tag
10454 IFS=$ac_save_IFS
10455 shift
10456 ac_file=$1
10457 shift
10458
10459 case $ac_mode in
10460 :L) ac_source=$1;;
10461 :[FH])
10462 ac_file_inputs=
10463 for ac_f
10464 do
10465 case $ac_f in
10466 -) ac_f="$ac_tmp/stdin";;
10467 *) # Look for the file first in the build tree, then in the source tree
10468 # (if the path is not absolute). The absolute path cannot be DOS-style,
10469 # because $ac_f cannot contain `:'.
10470 test -f "$ac_f" ||
10471 case $ac_f in
10472 [\\/$]*) false;;
10473 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
10474 esac ||
10475 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
10476 esac
10477 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
10478 as_fn_append ac_file_inputs " '$ac_f'"
10479 done
10480
10481 # Let's still pretend it is `configure' which instantiates (i.e., don't
10482 # use $as_me), people would be surprised to read:
10483 # /* config.h. Generated by config.status. */
10484 configure_input='Generated from '`
10485 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
10486 `' by configure.'
10487 if test x"$ac_file" != x-; then
10488 configure_input="$ac_file. $configure_input"
10489 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
10490 $as_echo "$as_me: creating $ac_file" >&6;}
10491 fi
10492 # Neutralize special characters interpreted by sed in replacement strings.
10493 case $configure_input in #(
10494 *\&* | *\|* | *\\* )
10495 ac_sed_conf_input=`$as_echo "$configure_input" |
10496 sed 's/[\\\\&|]/\\\\&/g'`;; #(
10497 *) ac_sed_conf_input=$configure_input;;
10498 esac
10499
10500 case $ac_tag in
10501 *:-:* | *:-) cat >"$ac_tmp/stdin" \
10502 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
10503 esac
10504 ;;
10505 esac
10506
10507 ac_dir=`$as_dirname -- "$ac_file" ||
10508 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10509 X"$ac_file" : 'X\(//\)[^/]' \| \
10510 X"$ac_file" : 'X\(//\)$' \| \
10511 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
10512 $as_echo X"$ac_file" |
10513 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
10514 s//\1/
10515 q
10516 }
10517 /^X\(\/\/\)[^/].*/{
10518 s//\1/
10519 q
10520 }
10521 /^X\(\/\/\)$/{
10522 s//\1/
10523 q
10524 }
10525 /^X\(\/\).*/{
10526 s//\1/
10527 q
10528 }
10529 s/.*/./; q'`
10530 as_dir="$ac_dir"; as_fn_mkdir_p
10531 ac_builddir=.
10532
10533 case "$ac_dir" in
10534 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
10535 *)
10536 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
10537 # A ".." for each directory in $ac_dir_suffix.
10538 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
10539 case $ac_top_builddir_sub in
10540 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
10541 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
10542 esac ;;
10543 esac
10544 ac_abs_top_builddir=$ac_pwd
10545 ac_abs_builddir=$ac_pwd$ac_dir_suffix
10546 # for backward compatibility:
10547 ac_top_builddir=$ac_top_build_prefix
10548
10549 case $srcdir in
10550 .) # We are building in place.
10551 ac_srcdir=.
10552 ac_top_srcdir=$ac_top_builddir_sub
10553 ac_abs_top_srcdir=$ac_pwd ;;
10554 [\\/]* | ?:[\\/]* ) # Absolute name.
10555 ac_srcdir=$srcdir$ac_dir_suffix;
10556 ac_top_srcdir=$srcdir
10557 ac_abs_top_srcdir=$srcdir ;;
10558 *) # Relative name.
10559 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
10560 ac_top_srcdir=$ac_top_build_prefix$srcdir
10561 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
10562 esac
10563 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
10564
10565
10566 case $ac_mode in
10567 :F)
10568 #
10569 # CONFIG_FILE
10570 #
10571
10572 _ACEOF
10573
10574 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10575 # If the template does not know about datarootdir, expand it.
10576 # FIXME: This hack should be removed a few years after 2.60.
10577 ac_datarootdir_hack=; ac_datarootdir_seen=
10578 ac_sed_dataroot='
10579 /datarootdir/ {
10580 p
10581 q
10582 }
10583 /@datadir@/p
10584 /@docdir@/p
10585 /@infodir@/p
10586 /@localedir@/p
10587 /@mandir@/p'
10588 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
10589 *datarootdir*) ac_datarootdir_seen=yes;;
10590 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
10591 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
10592 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
10593 _ACEOF
10594 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10595 ac_datarootdir_hack='
10596 s&@datadir@&$datadir&g
10597 s&@docdir@&$docdir&g
10598 s&@infodir@&$infodir&g
10599 s&@localedir@&$localedir&g
10600 s&@mandir@&$mandir&g
10601 s&\\\${datarootdir}&$datarootdir&g' ;;
10602 esac
10603 _ACEOF
10604
10605 # Neutralize VPATH when `$srcdir' = `.'.
10606 # Shell code in configure.ac might set extrasub.
10607 # FIXME: do we really want to maintain this feature?
10608 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10609 ac_sed_extra="$ac_vpsub
10610 $extrasub
10611 _ACEOF
10612 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10613 :t
10614 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
10615 s|@configure_input@|$ac_sed_conf_input|;t t
10616 s&@top_builddir@&$ac_top_builddir_sub&;t t
10617 s&@top_build_prefix@&$ac_top_build_prefix&;t t
10618 s&@srcdir@&$ac_srcdir&;t t
10619 s&@abs_srcdir@&$ac_abs_srcdir&;t t
10620 s&@top_srcdir@&$ac_top_srcdir&;t t
10621 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
10622 s&@builddir@&$ac_builddir&;t t
10623 s&@abs_builddir@&$ac_abs_builddir&;t t
10624 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
10625 $ac_datarootdir_hack
10626 "
10627 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
10628 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10629
10630 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
10631 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
10632 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
10633 "$ac_tmp/out"`; test -z "$ac_out"; } &&
10634 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
10635 which seems to be undefined. Please make sure it is defined" >&5
10636 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
10637 which seems to be undefined. Please make sure it is defined" >&2;}
10638
10639 rm -f "$ac_tmp/stdin"
10640 case $ac_file in
10641 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
10642 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
10643 esac \
10644 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10645 ;;
10646
10647
10648
10649 esac
10650
10651 done # for ac_tag
10652
10653
10654 as_fn_exit 0
10655 _ACEOF
10656 ac_clean_files=$ac_clean_files_save
10657
10658 test $ac_write_fail = 0 ||
10659 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
10660
10661
10662 # configure is writing to config.log, and then calls config.status.
10663 # config.status does its own redirection, appending to config.log.
10664 # Unfortunately, on DOS this fails, as config.log is still kept open
10665 # by configure, so config.status won't be able to write to it; its
10666 # output is simply discarded. So we exec the FD to /dev/null,
10667 # effectively closing config.log, so it can be properly (re)opened and
10668 # appended to by config.status. When coming back to configure, we
10669 # need to make the FD available again.
10670 if test "$no_create" != yes; then
10671 ac_cs_success=:
10672 ac_config_status_args=
10673 test "$silent" = yes &&
10674 ac_config_status_args="$ac_config_status_args --quiet"
10675 exec 5>/dev/null
10676 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
10677 exec 5>>config.log
10678 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
10679 # would make configure fail if this is the last instruction.
10680 $ac_cs_success || as_fn_exit 1
10681 fi
10682 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
10683 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
10684 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
10685 fi
10686