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