xref: /freebsd/contrib/sqlite3/tea/configure (revision de9468837c92cab304c658480bd32dbe4e022d01)
1076b9443SCy Schubert#! /bin/sh
2076b9443SCy Schubert# Guess values for system-dependent variables and create Makefiles.
3*de946883SCy Schubert# Generated by GNU Autoconf 2.71 for sqlite 3.46.1.
4076b9443SCy Schubert#
5076b9443SCy Schubert#
670b56f4bSCy Schubert# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
770b56f4bSCy Schubert# Inc.
8076b9443SCy Schubert#
9076b9443SCy Schubert#
10076b9443SCy Schubert# This configure script is free software; the Free Software Foundation
11076b9443SCy Schubert# gives unlimited permission to copy, distribute and modify it.
12076b9443SCy Schubert## -------------------- ##
13076b9443SCy Schubert## M4sh Initialization. ##
14076b9443SCy Schubert## -------------------- ##
15076b9443SCy Schubert
16076b9443SCy Schubert# Be more Bourne compatible
17076b9443SCy SchubertDUALCASE=1; export DUALCASE # for MKS sh
1870b56f4bSCy Schubertas_nop=:
1970b56f4bSCy Schubertif test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
2070b56f4bSCy Schubertthen :
21076b9443SCy Schubert  emulate sh
22076b9443SCy Schubert  NULLCMD=:
23076b9443SCy Schubert  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24076b9443SCy Schubert  # is contrary to our usage.  Disable this feature.
25076b9443SCy Schubert  alias -g '${1+"$@"}'='"$@"'
26076b9443SCy Schubert  setopt NO_GLOB_SUBST
2770b56f4bSCy Schubertelse $as_nop
28076b9443SCy Schubert  case `(set -o) 2>/dev/null` in #(
29076b9443SCy Schubert  *posix*) :
30076b9443SCy Schubert    set -o posix ;; #(
31076b9443SCy Schubert  *) :
32076b9443SCy Schubert     ;;
33076b9443SCy Schubertesac
34076b9443SCy Schubertfi
35076b9443SCy Schubert
36076b9443SCy Schubert
3770b56f4bSCy Schubert
3870b56f4bSCy Schubert# Reset variables that may have inherited troublesome values from
3970b56f4bSCy Schubert# the environment.
4070b56f4bSCy Schubert
4170b56f4bSCy Schubert# IFS needs to be set, to space, tab, and newline, in precisely that order.
4270b56f4bSCy Schubert# (If _AS_PATH_WALK were called with IFS unset, it would have the
4370b56f4bSCy Schubert# side effect of setting IFS to empty, thus disabling word splitting.)
4470b56f4bSCy Schubert# Quoting is to prevent editors from complaining about space-tab.
45076b9443SCy Schubertas_nl='
46076b9443SCy Schubert'
47076b9443SCy Schubertexport as_nl
4870b56f4bSCy SchubertIFS=" ""	$as_nl"
4970b56f4bSCy Schubert
5070b56f4bSCy SchubertPS1='$ '
5170b56f4bSCy SchubertPS2='> '
5270b56f4bSCy SchubertPS4='+ '
5370b56f4bSCy Schubert
5470b56f4bSCy Schubert# Ensure predictable behavior from utilities with locale-dependent output.
5570b56f4bSCy SchubertLC_ALL=C
5670b56f4bSCy Schubertexport LC_ALL
5770b56f4bSCy SchubertLANGUAGE=C
5870b56f4bSCy Schubertexport LANGUAGE
5970b56f4bSCy Schubert
6070b56f4bSCy Schubert# We cannot yet rely on "unset" to work, but we need these variables
6170b56f4bSCy Schubert# to be unset--not just set to an empty or harmless value--now, to
6270b56f4bSCy Schubert# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
6370b56f4bSCy Schubert# also avoids known problems related to "unset" and subshell syntax
6470b56f4bSCy Schubert# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
6570b56f4bSCy Schubertfor as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
6670b56f4bSCy Schubertdo eval test \${$as_var+y} \
6770b56f4bSCy Schubert  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
6870b56f4bSCy Schubertdone
6970b56f4bSCy Schubert
7070b56f4bSCy Schubert# Ensure that fds 0, 1, and 2 are open.
7170b56f4bSCy Schubertif (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
7270b56f4bSCy Schubertif (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
7370b56f4bSCy Schubertif (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
74076b9443SCy Schubert
75076b9443SCy Schubert# The user is always right.
7670b56f4bSCy Schubertif ${PATH_SEPARATOR+false} :; then
77076b9443SCy Schubert  PATH_SEPARATOR=:
78076b9443SCy Schubert  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79076b9443SCy Schubert    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80076b9443SCy Schubert      PATH_SEPARATOR=';'
81076b9443SCy Schubert  }
82076b9443SCy Schubertfi
83076b9443SCy Schubert
84076b9443SCy Schubert
85076b9443SCy Schubert# Find who we are.  Look in the path if we contain no directory separator.
86076b9443SCy Schubertas_myself=
87076b9443SCy Schubertcase $0 in #((
88076b9443SCy Schubert  *[\\/]* ) as_myself=$0 ;;
89076b9443SCy Schubert  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
90076b9443SCy Schubertfor as_dir in $PATH
91076b9443SCy Schubertdo
92076b9443SCy Schubert  IFS=$as_save_IFS
9370b56f4bSCy Schubert  case $as_dir in #(((
9470b56f4bSCy Schubert    '') as_dir=./ ;;
9570b56f4bSCy Schubert    */) ;;
9670b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
9770b56f4bSCy Schubert  esac
9870b56f4bSCy Schubert    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
99076b9443SCy Schubert  done
100076b9443SCy SchubertIFS=$as_save_IFS
101076b9443SCy Schubert
102076b9443SCy Schubert     ;;
103076b9443SCy Schubertesac
104076b9443SCy Schubert# We did not find ourselves, most probably we were run as `sh COMMAND'
105076b9443SCy Schubert# in which case we are not to be found in the path.
106076b9443SCy Schubertif test "x$as_myself" = x; then
107076b9443SCy Schubert  as_myself=$0
108076b9443SCy Schubertfi
109076b9443SCy Schubertif test ! -f "$as_myself"; then
11070b56f4bSCy Schubert  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111076b9443SCy Schubert  exit 1
112076b9443SCy Schubertfi
113076b9443SCy Schubert
114076b9443SCy Schubert
115076b9443SCy Schubert# Use a proper internal environment variable to ensure we don't fall
116076b9443SCy Schubert  # into an infinite loop, continuously re-executing ourselves.
117076b9443SCy Schubert  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
118076b9443SCy Schubert    _as_can_reexec=no; export _as_can_reexec;
119076b9443SCy Schubert    # We cannot yet assume a decent shell, so we have to provide a
120076b9443SCy Schubert# neutralization value for shells without unset; and this also
121076b9443SCy Schubert# works around shells that cannot unset nonexistent variables.
122076b9443SCy Schubert# Preserve -v and -x to the replacement shell.
123076b9443SCy SchubertBASH_ENV=/dev/null
124076b9443SCy SchubertENV=/dev/null
125076b9443SCy Schubert(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
126076b9443SCy Schubertcase $- in # ((((
127076b9443SCy Schubert  *v*x* | *x*v* ) as_opts=-vx ;;
128076b9443SCy Schubert  *v* ) as_opts=-v ;;
129076b9443SCy Schubert  *x* ) as_opts=-x ;;
130076b9443SCy Schubert  * ) as_opts= ;;
131076b9443SCy Schubertesac
132076b9443SCy Schubertexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
133076b9443SCy Schubert# Admittedly, this is quite paranoid, since all the known shells bail
134076b9443SCy Schubert# out after a failed `exec'.
13570b56f4bSCy Schubertprintf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
13670b56f4bSCy Schubertexit 255
137076b9443SCy Schubert  fi
138076b9443SCy Schubert  # We don't want this to propagate to other subprocesses.
139076b9443SCy Schubert          { _as_can_reexec=; unset _as_can_reexec;}
140076b9443SCy Schubertif test "x$CONFIG_SHELL" = x; then
14170b56f4bSCy Schubert  as_bourne_compatible="as_nop=:
14270b56f4bSCy Schubertif test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
14370b56f4bSCy Schubertthen :
144076b9443SCy Schubert  emulate sh
145076b9443SCy Schubert  NULLCMD=:
146076b9443SCy Schubert  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
147076b9443SCy Schubert  # is contrary to our usage.  Disable this feature.
148076b9443SCy Schubert  alias -g '\${1+\"\$@\"}'='\"\$@\"'
149076b9443SCy Schubert  setopt NO_GLOB_SUBST
15070b56f4bSCy Schubertelse \$as_nop
151076b9443SCy Schubert  case \`(set -o) 2>/dev/null\` in #(
152076b9443SCy Schubert  *posix*) :
153076b9443SCy Schubert    set -o posix ;; #(
154076b9443SCy Schubert  *) :
155076b9443SCy Schubert     ;;
156076b9443SCy Schubertesac
157076b9443SCy Schubertfi
158076b9443SCy Schubert"
159076b9443SCy Schubert  as_required="as_fn_return () { (exit \$1); }
160076b9443SCy Schubertas_fn_success () { as_fn_return 0; }
161076b9443SCy Schubertas_fn_failure () { as_fn_return 1; }
162076b9443SCy Schubertas_fn_ret_success () { return 0; }
163076b9443SCy Schubertas_fn_ret_failure () { return 1; }
164076b9443SCy Schubert
165076b9443SCy Schubertexitcode=0
166076b9443SCy Schubertas_fn_success || { exitcode=1; echo as_fn_success failed.; }
167076b9443SCy Schubertas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
168076b9443SCy Schubertas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
169076b9443SCy Schubertas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
17070b56f4bSCy Schubertif ( set x; as_fn_ret_success y && test x = \"\$1\" )
17170b56f4bSCy Schubertthen :
172076b9443SCy Schubert
17370b56f4bSCy Schubertelse \$as_nop
174076b9443SCy Schubert  exitcode=1; echo positional parameters were not saved.
175076b9443SCy Schubertfi
176076b9443SCy Schuberttest x\$exitcode = x0 || exit 1
17770b56f4bSCy Schubertblah=\$(echo \$(echo blah))
17870b56f4bSCy Schuberttest x\"\$blah\" = xblah || exit 1
179076b9443SCy Schuberttest -x / || exit 1"
180076b9443SCy Schubert  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
181076b9443SCy Schubert  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
182076b9443SCy Schubert  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
183076b9443SCy Schubert  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
184076b9443SCy Schuberttest \$(( 1 + 1 )) = 2 || exit 1"
18570b56f4bSCy Schubert  if (eval "$as_required") 2>/dev/null
18670b56f4bSCy Schubertthen :
187076b9443SCy Schubert  as_have_required=yes
18870b56f4bSCy Schubertelse $as_nop
189076b9443SCy Schubert  as_have_required=no
190076b9443SCy Schubertfi
19170b56f4bSCy Schubert  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
19270b56f4bSCy Schubertthen :
193076b9443SCy Schubert
19470b56f4bSCy Schubertelse $as_nop
195076b9443SCy Schubert  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
196076b9443SCy Schubertas_found=false
197076b9443SCy Schubertfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
198076b9443SCy Schubertdo
199076b9443SCy Schubert  IFS=$as_save_IFS
20070b56f4bSCy Schubert  case $as_dir in #(((
20170b56f4bSCy Schubert    '') as_dir=./ ;;
20270b56f4bSCy Schubert    */) ;;
20370b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
20470b56f4bSCy Schubert  esac
205076b9443SCy Schubert  as_found=:
206076b9443SCy Schubert  case $as_dir in #(
207076b9443SCy Schubert	 /*)
208076b9443SCy Schubert	   for as_base in sh bash ksh sh5; do
209076b9443SCy Schubert	     # Try only shells that exist, to save several forks.
21070b56f4bSCy Schubert	     as_shell=$as_dir$as_base
211076b9443SCy Schubert	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
21270b56f4bSCy Schubert		    as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
21370b56f4bSCy Schubertthen :
214076b9443SCy Schubert  CONFIG_SHELL=$as_shell as_have_required=yes
21570b56f4bSCy Schubert		   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
21670b56f4bSCy Schubertthen :
217076b9443SCy Schubert  break 2
218076b9443SCy Schubertfi
219076b9443SCy Schubertfi
220076b9443SCy Schubert	   done;;
221076b9443SCy Schubert       esac
222076b9443SCy Schubert  as_found=false
223076b9443SCy Schubertdone
224076b9443SCy SchubertIFS=$as_save_IFS
22570b56f4bSCy Schubertif $as_found
22670b56f4bSCy Schubertthen :
22770b56f4bSCy Schubert
22870b56f4bSCy Schubertelse $as_nop
22970b56f4bSCy Schubert  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
23070b56f4bSCy Schubert	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
23170b56f4bSCy Schubertthen :
23270b56f4bSCy Schubert  CONFIG_SHELL=$SHELL as_have_required=yes
23370b56f4bSCy Schubertfi
23470b56f4bSCy Schubertfi
235076b9443SCy Schubert
236076b9443SCy Schubert
23770b56f4bSCy Schubert      if test "x$CONFIG_SHELL" != x
23870b56f4bSCy Schubertthen :
239076b9443SCy Schubert  export CONFIG_SHELL
240076b9443SCy Schubert             # We cannot yet assume a decent shell, so we have to provide a
241076b9443SCy Schubert# neutralization value for shells without unset; and this also
242076b9443SCy Schubert# works around shells that cannot unset nonexistent variables.
243076b9443SCy Schubert# Preserve -v and -x to the replacement shell.
244076b9443SCy SchubertBASH_ENV=/dev/null
245076b9443SCy SchubertENV=/dev/null
246076b9443SCy Schubert(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247076b9443SCy Schubertcase $- in # ((((
248076b9443SCy Schubert  *v*x* | *x*v* ) as_opts=-vx ;;
249076b9443SCy Schubert  *v* ) as_opts=-v ;;
250076b9443SCy Schubert  *x* ) as_opts=-x ;;
251076b9443SCy Schubert  * ) as_opts= ;;
252076b9443SCy Schubertesac
253076b9443SCy Schubertexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254076b9443SCy Schubert# Admittedly, this is quite paranoid, since all the known shells bail
255076b9443SCy Schubert# out after a failed `exec'.
25670b56f4bSCy Schubertprintf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
257076b9443SCy Schubertexit 255
258076b9443SCy Schubertfi
259076b9443SCy Schubert
26070b56f4bSCy Schubert    if test x$as_have_required = xno
26170b56f4bSCy Schubertthen :
26270b56f4bSCy Schubert  printf "%s\n" "$0: This script requires a shell more modern than all"
26370b56f4bSCy Schubert  printf "%s\n" "$0: the shells that I found on your system."
26470b56f4bSCy Schubert  if test ${ZSH_VERSION+y} ; then
26570b56f4bSCy Schubert    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
26670b56f4bSCy Schubert    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
267076b9443SCy Schubert  else
26870b56f4bSCy Schubert    printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system,
269076b9443SCy Schubert$0: including any error possibly output before this
270076b9443SCy Schubert$0: message. Then install a modern shell, or manually run
271076b9443SCy Schubert$0: the script under such a shell if you do have one."
272076b9443SCy Schubert  fi
273076b9443SCy Schubert  exit 1
274076b9443SCy Schubertfi
275076b9443SCy Schubertfi
276076b9443SCy Schubertfi
277076b9443SCy SchubertSHELL=${CONFIG_SHELL-/bin/sh}
278076b9443SCy Schubertexport SHELL
279076b9443SCy Schubert# Unset more variables known to interfere with behavior of common tools.
280076b9443SCy SchubertCLICOLOR_FORCE= GREP_OPTIONS=
281076b9443SCy Schubertunset CLICOLOR_FORCE GREP_OPTIONS
282076b9443SCy Schubert
283076b9443SCy Schubert## --------------------- ##
284076b9443SCy Schubert## M4sh Shell Functions. ##
285076b9443SCy Schubert## --------------------- ##
286076b9443SCy Schubert# as_fn_unset VAR
287076b9443SCy Schubert# ---------------
288076b9443SCy Schubert# Portably unset VAR.
289076b9443SCy Schubertas_fn_unset ()
290076b9443SCy Schubert{
291076b9443SCy Schubert  { eval $1=; unset $1;}
292076b9443SCy Schubert}
293076b9443SCy Schubertas_unset=as_fn_unset
294076b9443SCy Schubert
29570b56f4bSCy Schubert
296076b9443SCy Schubert# as_fn_set_status STATUS
297076b9443SCy Schubert# -----------------------
298076b9443SCy Schubert# Set $? to STATUS, without forking.
299076b9443SCy Schubertas_fn_set_status ()
300076b9443SCy Schubert{
301076b9443SCy Schubert  return $1
302076b9443SCy Schubert} # as_fn_set_status
303076b9443SCy Schubert
304076b9443SCy Schubert# as_fn_exit STATUS
305076b9443SCy Schubert# -----------------
306076b9443SCy Schubert# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
307076b9443SCy Schubertas_fn_exit ()
308076b9443SCy Schubert{
309076b9443SCy Schubert  set +e
310076b9443SCy Schubert  as_fn_set_status $1
311076b9443SCy Schubert  exit $1
312076b9443SCy Schubert} # as_fn_exit
31370b56f4bSCy Schubert# as_fn_nop
31470b56f4bSCy Schubert# ---------
31570b56f4bSCy Schubert# Do nothing but, unlike ":", preserve the value of $?.
31670b56f4bSCy Schubertas_fn_nop ()
31770b56f4bSCy Schubert{
31870b56f4bSCy Schubert  return $?
31970b56f4bSCy Schubert}
32070b56f4bSCy Schubertas_nop=as_fn_nop
321076b9443SCy Schubert
322076b9443SCy Schubert# as_fn_mkdir_p
323076b9443SCy Schubert# -------------
324076b9443SCy Schubert# Create "$as_dir" as a directory, including parents if necessary.
325076b9443SCy Schubertas_fn_mkdir_p ()
326076b9443SCy Schubert{
327076b9443SCy Schubert
328076b9443SCy Schubert  case $as_dir in #(
329076b9443SCy Schubert  -*) as_dir=./$as_dir;;
330076b9443SCy Schubert  esac
331076b9443SCy Schubert  test -d "$as_dir" || eval $as_mkdir_p || {
332076b9443SCy Schubert    as_dirs=
333076b9443SCy Schubert    while :; do
334076b9443SCy Schubert      case $as_dir in #(
33570b56f4bSCy Schubert      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
336076b9443SCy Schubert      *) as_qdir=$as_dir;;
337076b9443SCy Schubert      esac
338076b9443SCy Schubert      as_dirs="'$as_qdir' $as_dirs"
339076b9443SCy Schubert      as_dir=`$as_dirname -- "$as_dir" ||
340076b9443SCy Schubert$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
341076b9443SCy Schubert	 X"$as_dir" : 'X\(//\)[^/]' \| \
342076b9443SCy Schubert	 X"$as_dir" : 'X\(//\)$' \| \
343076b9443SCy Schubert	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34470b56f4bSCy Schubertprintf "%s\n" X"$as_dir" |
345076b9443SCy Schubert    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
346076b9443SCy Schubert	    s//\1/
347076b9443SCy Schubert	    q
348076b9443SCy Schubert	  }
349076b9443SCy Schubert	  /^X\(\/\/\)[^/].*/{
350076b9443SCy Schubert	    s//\1/
351076b9443SCy Schubert	    q
352076b9443SCy Schubert	  }
353076b9443SCy Schubert	  /^X\(\/\/\)$/{
354076b9443SCy Schubert	    s//\1/
355076b9443SCy Schubert	    q
356076b9443SCy Schubert	  }
357076b9443SCy Schubert	  /^X\(\/\).*/{
358076b9443SCy Schubert	    s//\1/
359076b9443SCy Schubert	    q
360076b9443SCy Schubert	  }
361076b9443SCy Schubert	  s/.*/./; q'`
362076b9443SCy Schubert      test -d "$as_dir" && break
363076b9443SCy Schubert    done
364076b9443SCy Schubert    test -z "$as_dirs" || eval "mkdir $as_dirs"
365076b9443SCy Schubert  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
366076b9443SCy Schubert
367076b9443SCy Schubert
368076b9443SCy Schubert} # as_fn_mkdir_p
369076b9443SCy Schubert
370076b9443SCy Schubert# as_fn_executable_p FILE
371076b9443SCy Schubert# -----------------------
372076b9443SCy Schubert# Test if FILE is an executable regular file.
373076b9443SCy Schubertas_fn_executable_p ()
374076b9443SCy Schubert{
375076b9443SCy Schubert  test -f "$1" && test -x "$1"
376076b9443SCy Schubert} # as_fn_executable_p
377076b9443SCy Schubert# as_fn_append VAR VALUE
378076b9443SCy Schubert# ----------------------
379076b9443SCy Schubert# Append the text in VALUE to the end of the definition contained in VAR. Take
380076b9443SCy Schubert# advantage of any shell optimizations that allow amortized linear growth over
381076b9443SCy Schubert# repeated appends, instead of the typical quadratic growth present in naive
382076b9443SCy Schubert# implementations.
38370b56f4bSCy Schubertif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
38470b56f4bSCy Schubertthen :
385076b9443SCy Schubert  eval 'as_fn_append ()
386076b9443SCy Schubert  {
387076b9443SCy Schubert    eval $1+=\$2
388076b9443SCy Schubert  }'
38970b56f4bSCy Schubertelse $as_nop
390076b9443SCy Schubert  as_fn_append ()
391076b9443SCy Schubert  {
392076b9443SCy Schubert    eval $1=\$$1\$2
393076b9443SCy Schubert  }
394076b9443SCy Schubertfi # as_fn_append
395076b9443SCy Schubert
396076b9443SCy Schubert# as_fn_arith ARG...
397076b9443SCy Schubert# ------------------
398076b9443SCy Schubert# Perform arithmetic evaluation on the ARGs, and store the result in the
399076b9443SCy Schubert# global $as_val. Take advantage of shells that can avoid forks. The arguments
400076b9443SCy Schubert# must be portable across $(()) and expr.
40170b56f4bSCy Schubertif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
40270b56f4bSCy Schubertthen :
403076b9443SCy Schubert  eval 'as_fn_arith ()
404076b9443SCy Schubert  {
405076b9443SCy Schubert    as_val=$(( $* ))
406076b9443SCy Schubert  }'
40770b56f4bSCy Schubertelse $as_nop
408076b9443SCy Schubert  as_fn_arith ()
409076b9443SCy Schubert  {
410076b9443SCy Schubert    as_val=`expr "$@" || test $? -eq 1`
411076b9443SCy Schubert  }
412076b9443SCy Schubertfi # as_fn_arith
413076b9443SCy Schubert
41470b56f4bSCy Schubert# as_fn_nop
41570b56f4bSCy Schubert# ---------
41670b56f4bSCy Schubert# Do nothing but, unlike ":", preserve the value of $?.
41770b56f4bSCy Schubertas_fn_nop ()
41870b56f4bSCy Schubert{
41970b56f4bSCy Schubert  return $?
42070b56f4bSCy Schubert}
42170b56f4bSCy Schubertas_nop=as_fn_nop
422076b9443SCy Schubert
423076b9443SCy Schubert# as_fn_error STATUS ERROR [LINENO LOG_FD]
424076b9443SCy Schubert# ----------------------------------------
425076b9443SCy Schubert# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
426076b9443SCy Schubert# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
427076b9443SCy Schubert# script with STATUS, using 1 if that was 0.
428076b9443SCy Schubertas_fn_error ()
429076b9443SCy Schubert{
430076b9443SCy Schubert  as_status=$1; test $as_status -eq 0 && as_status=1
431076b9443SCy Schubert  if test "$4"; then
432076b9443SCy Schubert    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
43370b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
434076b9443SCy Schubert  fi
43570b56f4bSCy Schubert  printf "%s\n" "$as_me: error: $2" >&2
436076b9443SCy Schubert  as_fn_exit $as_status
437076b9443SCy Schubert} # as_fn_error
438076b9443SCy Schubert
439076b9443SCy Schubertif expr a : '\(a\)' >/dev/null 2>&1 &&
440076b9443SCy Schubert   test "X`expr 00001 : '.*\(...\)'`" = X001; then
441076b9443SCy Schubert  as_expr=expr
442076b9443SCy Schubertelse
443076b9443SCy Schubert  as_expr=false
444076b9443SCy Schubertfi
445076b9443SCy Schubert
446076b9443SCy Schubertif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
447076b9443SCy Schubert  as_basename=basename
448076b9443SCy Schubertelse
449076b9443SCy Schubert  as_basename=false
450076b9443SCy Schubertfi
451076b9443SCy Schubert
452076b9443SCy Schubertif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
453076b9443SCy Schubert  as_dirname=dirname
454076b9443SCy Schubertelse
455076b9443SCy Schubert  as_dirname=false
456076b9443SCy Schubertfi
457076b9443SCy Schubert
458076b9443SCy Schubertas_me=`$as_basename -- "$0" ||
459076b9443SCy Schubert$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
460076b9443SCy Schubert	 X"$0" : 'X\(//\)$' \| \
461076b9443SCy Schubert	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
46270b56f4bSCy Schubertprintf "%s\n" X/"$0" |
463076b9443SCy Schubert    sed '/^.*\/\([^/][^/]*\)\/*$/{
464076b9443SCy Schubert	    s//\1/
465076b9443SCy Schubert	    q
466076b9443SCy Schubert	  }
467076b9443SCy Schubert	  /^X\/\(\/\/\)$/{
468076b9443SCy Schubert	    s//\1/
469076b9443SCy Schubert	    q
470076b9443SCy Schubert	  }
471076b9443SCy Schubert	  /^X\/\(\/\).*/{
472076b9443SCy Schubert	    s//\1/
473076b9443SCy Schubert	    q
474076b9443SCy Schubert	  }
475076b9443SCy Schubert	  s/.*/./; q'`
476076b9443SCy Schubert
477076b9443SCy Schubert# Avoid depending upon Character Ranges.
478076b9443SCy Schubertas_cr_letters='abcdefghijklmnopqrstuvwxyz'
479076b9443SCy Schubertas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
480076b9443SCy Schubertas_cr_Letters=$as_cr_letters$as_cr_LETTERS
481076b9443SCy Schubertas_cr_digits='0123456789'
482076b9443SCy Schubertas_cr_alnum=$as_cr_Letters$as_cr_digits
483076b9443SCy Schubert
484076b9443SCy Schubert
485076b9443SCy Schubert  as_lineno_1=$LINENO as_lineno_1a=$LINENO
486076b9443SCy Schubert  as_lineno_2=$LINENO as_lineno_2a=$LINENO
487076b9443SCy Schubert  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
488076b9443SCy Schubert  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
489076b9443SCy Schubert  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
490076b9443SCy Schubert  sed -n '
491076b9443SCy Schubert    p
492076b9443SCy Schubert    /[$]LINENO/=
493076b9443SCy Schubert  ' <$as_myself |
494076b9443SCy Schubert    sed '
495076b9443SCy Schubert      s/[$]LINENO.*/&-/
496076b9443SCy Schubert      t lineno
497076b9443SCy Schubert      b
498076b9443SCy Schubert      :lineno
499076b9443SCy Schubert      N
500076b9443SCy Schubert      :loop
501076b9443SCy Schubert      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
502076b9443SCy Schubert      t loop
503076b9443SCy Schubert      s/-\n.*//
504076b9443SCy Schubert    ' >$as_me.lineno &&
505076b9443SCy Schubert  chmod +x "$as_me.lineno" ||
50670b56f4bSCy Schubert    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
507076b9443SCy Schubert
508076b9443SCy Schubert  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
509076b9443SCy Schubert  # already done that, so ensure we don't try to do so again and fall
510076b9443SCy Schubert  # in an infinite loop.  This has already happened in practice.
511076b9443SCy Schubert  _as_can_reexec=no; export _as_can_reexec
512076b9443SCy Schubert  # Don't try to exec as it changes $[0], causing all sort of problems
513076b9443SCy Schubert  # (the dirname of $[0] is not the place where we might find the
514076b9443SCy Schubert  # original and so on.  Autoconf is especially sensitive to this).
515076b9443SCy Schubert  . "./$as_me.lineno"
516076b9443SCy Schubert  # Exit status is that of the last command.
517076b9443SCy Schubert  exit
518076b9443SCy Schubert}
519076b9443SCy Schubert
52070b56f4bSCy Schubert
52170b56f4bSCy Schubert# Determine whether it's possible to make 'echo' print without a newline.
52270b56f4bSCy Schubert# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
52370b56f4bSCy Schubert# for compatibility with existing Makefiles.
524076b9443SCy SchubertECHO_C= ECHO_N= ECHO_T=
525076b9443SCy Schubertcase `echo -n x` in #(((((
526076b9443SCy Schubert-n*)
527076b9443SCy Schubert  case `echo 'xy\c'` in
528076b9443SCy Schubert  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
529076b9443SCy Schubert  xy)  ECHO_C='\c';;
530076b9443SCy Schubert  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
531076b9443SCy Schubert       ECHO_T='	';;
532076b9443SCy Schubert  esac;;
533076b9443SCy Schubert*)
534076b9443SCy Schubert  ECHO_N='-n';;
535076b9443SCy Schubertesac
536076b9443SCy Schubert
53770b56f4bSCy Schubert# For backward compatibility with old third-party macros, we provide
53870b56f4bSCy Schubert# the shell variables $as_echo and $as_echo_n.  New code should use
53970b56f4bSCy Schubert# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
54070b56f4bSCy Schubertas_echo='printf %s\n'
54170b56f4bSCy Schubertas_echo_n='printf %s'
54270b56f4bSCy Schubert
54370b56f4bSCy Schubert
544076b9443SCy Schubertrm -f conf$$ conf$$.exe conf$$.file
545076b9443SCy Schubertif test -d conf$$.dir; then
546076b9443SCy Schubert  rm -f conf$$.dir/conf$$.file
547076b9443SCy Schubertelse
548076b9443SCy Schubert  rm -f conf$$.dir
549076b9443SCy Schubert  mkdir conf$$.dir 2>/dev/null
550076b9443SCy Schubertfi
551076b9443SCy Schubertif (echo >conf$$.file) 2>/dev/null; then
552076b9443SCy Schubert  if ln -s conf$$.file conf$$ 2>/dev/null; then
553076b9443SCy Schubert    as_ln_s='ln -s'
554076b9443SCy Schubert    # ... but there are two gotchas:
555076b9443SCy Schubert    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
556076b9443SCy Schubert    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
557076b9443SCy Schubert    # In both cases, we have to default to `cp -pR'.
558076b9443SCy Schubert    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
559076b9443SCy Schubert      as_ln_s='cp -pR'
560076b9443SCy Schubert  elif ln conf$$.file conf$$ 2>/dev/null; then
561076b9443SCy Schubert    as_ln_s=ln
562076b9443SCy Schubert  else
563076b9443SCy Schubert    as_ln_s='cp -pR'
564076b9443SCy Schubert  fi
565076b9443SCy Schubertelse
566076b9443SCy Schubert  as_ln_s='cp -pR'
567076b9443SCy Schubertfi
568076b9443SCy Schubertrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
569076b9443SCy Schubertrmdir conf$$.dir 2>/dev/null
570076b9443SCy Schubert
571076b9443SCy Schubertif mkdir -p . 2>/dev/null; then
572076b9443SCy Schubert  as_mkdir_p='mkdir -p "$as_dir"'
573076b9443SCy Schubertelse
574076b9443SCy Schubert  test -d ./-p && rmdir ./-p
575076b9443SCy Schubert  as_mkdir_p=false
576076b9443SCy Schubertfi
577076b9443SCy Schubert
578076b9443SCy Schubertas_test_x='test -x'
579076b9443SCy Schubertas_executable_p=as_fn_executable_p
580076b9443SCy Schubert
581076b9443SCy Schubert# Sed expression to map a string onto a valid CPP name.
582076b9443SCy Schubertas_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
583076b9443SCy Schubert
584076b9443SCy Schubert# Sed expression to map a string onto a valid variable name.
585076b9443SCy Schubertas_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
586076b9443SCy Schubert
587076b9443SCy Schubert
588076b9443SCy Schuberttest -n "$DJDIR" || exec 7<&0 </dev/null
589076b9443SCy Schubertexec 6>&1
590076b9443SCy Schubert
591076b9443SCy Schubert# Name of the host.
592076b9443SCy Schubert# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
593076b9443SCy Schubert# so uname gets run too.
594076b9443SCy Schubertac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
595076b9443SCy Schubert
596076b9443SCy Schubert#
597076b9443SCy Schubert# Initializations.
598076b9443SCy Schubert#
599076b9443SCy Schubertac_default_prefix=/usr/local
600076b9443SCy Schubertac_clean_files=
601076b9443SCy Schubertac_config_libobj_dir=.
602076b9443SCy SchubertLIBOBJS=
603076b9443SCy Schubertcross_compiling=no
604076b9443SCy Schubertsubdirs=
605076b9443SCy SchubertMFLAGS=
606076b9443SCy SchubertMAKEFLAGS=
607076b9443SCy Schubert
608076b9443SCy Schubert# Identity of this package.
609076b9443SCy SchubertPACKAGE_NAME='sqlite'
610076b9443SCy SchubertPACKAGE_TARNAME='sqlite'
611*de946883SCy SchubertPACKAGE_VERSION='3.46.1'
612*de946883SCy SchubertPACKAGE_STRING='sqlite 3.46.1'
613076b9443SCy SchubertPACKAGE_BUGREPORT=''
614076b9443SCy SchubertPACKAGE_URL=''
615076b9443SCy Schubert
616076b9443SCy Schubert# Factoring default headers for most tests.
617076b9443SCy Schubertac_includes_default="\
618076b9443SCy Schubert#include <stddef.h>
61970b56f4bSCy Schubert#ifdef HAVE_STDIO_H
62070b56f4bSCy Schubert# include <stdio.h>
62170b56f4bSCy Schubert#endif
622076b9443SCy Schubert#ifdef HAVE_STDLIB_H
623076b9443SCy Schubert# include <stdlib.h>
624076b9443SCy Schubert#endif
625076b9443SCy Schubert#ifdef HAVE_STRING_H
626076b9443SCy Schubert# include <string.h>
627076b9443SCy Schubert#endif
628076b9443SCy Schubert#ifdef HAVE_INTTYPES_H
629076b9443SCy Schubert# include <inttypes.h>
630076b9443SCy Schubert#endif
631076b9443SCy Schubert#ifdef HAVE_STDINT_H
632076b9443SCy Schubert# include <stdint.h>
633076b9443SCy Schubert#endif
63470b56f4bSCy Schubert#ifdef HAVE_STRINGS_H
63570b56f4bSCy Schubert# include <strings.h>
63670b56f4bSCy Schubert#endif
63770b56f4bSCy Schubert#ifdef HAVE_SYS_TYPES_H
63870b56f4bSCy Schubert# include <sys/types.h>
63970b56f4bSCy Schubert#endif
64070b56f4bSCy Schubert#ifdef HAVE_SYS_STAT_H
64170b56f4bSCy Schubert# include <sys/stat.h>
64270b56f4bSCy Schubert#endif
643076b9443SCy Schubert#ifdef HAVE_UNISTD_H
644076b9443SCy Schubert# include <unistd.h>
645076b9443SCy Schubert#endif"
646076b9443SCy Schubert
64770b56f4bSCy Schubertac_header_c_list=
648076b9443SCy Schubertac_subst_vars='LTLIBOBJS
649076b9443SCy SchubertTCLSH_PROG
650076b9443SCy SchubertVC_MANIFEST_EMBED_EXE
651076b9443SCy SchubertVC_MANIFEST_EMBED_DLL
652076b9443SCy SchubertRANLIB_STUB
653076b9443SCy SchubertMAKE_STUB_LIB
654076b9443SCy SchubertMAKE_STATIC_LIB
655076b9443SCy SchubertMAKE_SHARED_LIB
656076b9443SCy SchubertMAKE_LIB
65700787218SCy SchubertEGREP
65800787218SCy SchubertGREP
659076b9443SCy SchubertLDFLAGS_DEFAULT
660076b9443SCy SchubertCFLAGS_DEFAULT
661076b9443SCy SchubertLD_LIBRARY_PATH_VAR
662076b9443SCy SchubertSHLIB_CFLAGS
663076b9443SCy SchubertSHLIB_LD_LIBS
664076b9443SCy SchubertSHLIB_LD
665076b9443SCy SchubertSTLIB_LD
66600787218SCy SchubertLDFLAGS_OPTIMIZE
66700787218SCy SchubertLDFLAGS_DEBUG
668076b9443SCy SchubertCFLAGS_WARNING
669076b9443SCy SchubertCFLAGS_OPTIMIZE
670076b9443SCy SchubertCFLAGS_DEBUG
67100787218SCy SchubertLIBOBJS
672076b9443SCy SchubertRC
673076b9443SCy SchubertAR
67400787218SCy SchubertSTUBS_BUILD
675076b9443SCy SchubertSHARED_BUILD
676076b9443SCy SchubertTCL_THREADS
677076b9443SCy SchubertTCL_INCLUDES
678076b9443SCy SchubertPKG_OBJECTS
679076b9443SCy SchubertPKG_SOURCES
680076b9443SCy SchubertRANLIB
681076b9443SCy SchubertSET_MAKE
682076b9443SCy SchubertCPP
683076b9443SCy SchubertTCL_SHLIB_LD_LIBS
684076b9443SCy SchubertTCL_LD_FLAGS
685076b9443SCy SchubertTCL_EXTRA_CFLAGS
686076b9443SCy SchubertTCL_DEFS
687076b9443SCy SchubertTCL_LIBS
688076b9443SCy SchubertCLEANFILES
689076b9443SCy SchubertOBJEXT
690076b9443SCy Schubertac_ct_CC
691076b9443SCy SchubertCPPFLAGS
692076b9443SCy SchubertLDFLAGS
693076b9443SCy SchubertCFLAGS
694076b9443SCy SchubertCC
695076b9443SCy SchubertTCL_STUB_LIB_SPEC
696076b9443SCy SchubertTCL_STUB_LIB_FLAG
697076b9443SCy SchubertTCL_STUB_LIB_FILE
698076b9443SCy SchubertTCL_LIB_SPEC
699076b9443SCy SchubertTCL_LIB_FLAG
700076b9443SCy SchubertTCL_LIB_FILE
701076b9443SCy SchubertTCL_SRC_DIR
702076b9443SCy SchubertTCL_BIN_DIR
703076b9443SCy SchubertTCL_PATCH_LEVEL
704076b9443SCy SchubertTCL_VERSION
70500787218SCy SchubertINSTALL_LIBRARY
70600787218SCy SchubertINSTALL_SCRIPT
70700787218SCy SchubertINSTALL_PROGRAM
70800787218SCy SchubertINSTALL_DATA
70900787218SCy SchubertINSTALL_DATA_DIR
71000787218SCy SchubertINSTALL
711076b9443SCy SchubertPKG_CFLAGS
712076b9443SCy SchubertPKG_LIBS
713076b9443SCy SchubertPKG_INCLUDES
714076b9443SCy SchubertPKG_HEADERS
715076b9443SCy SchubertPKG_TCL_SOURCES
716076b9443SCy SchubertPKG_STUB_OBJECTS
717076b9443SCy SchubertPKG_STUB_SOURCES
718076b9443SCy SchubertPKG_STUB_LIB_FILE
71900787218SCy SchubertPKG_LIB_FILE9
72000787218SCy SchubertPKG_LIB_FILE8
721076b9443SCy SchubertPKG_LIB_FILE
722076b9443SCy SchubertEXEEXT
723076b9443SCy SchubertCYGPATH
724076b9443SCy Schuberttarget_alias
725076b9443SCy Schuberthost_alias
726076b9443SCy Schubertbuild_alias
727076b9443SCy SchubertLIBS
728076b9443SCy SchubertECHO_T
729076b9443SCy SchubertECHO_N
730076b9443SCy SchubertECHO_C
731076b9443SCy SchubertDEFS
732076b9443SCy Schubertmandir
733076b9443SCy Schubertlocaledir
734076b9443SCy Schubertlibdir
735076b9443SCy Schubertpsdir
736076b9443SCy Schubertpdfdir
737076b9443SCy Schubertdvidir
738076b9443SCy Schuberthtmldir
739076b9443SCy Schubertinfodir
740076b9443SCy Schubertdocdir
741076b9443SCy Schubertoldincludedir
742076b9443SCy Schubertincludedir
743bca4681bSCy Schubertrunstatedir
744076b9443SCy Schubertlocalstatedir
745076b9443SCy Schubertsharedstatedir
746076b9443SCy Schubertsysconfdir
747076b9443SCy Schubertdatadir
748076b9443SCy Schubertdatarootdir
749076b9443SCy Schubertlibexecdir
750076b9443SCy Schubertsbindir
751076b9443SCy Schubertbindir
752076b9443SCy Schubertprogram_transform_name
753076b9443SCy Schubertprefix
754076b9443SCy Schubertexec_prefix
755076b9443SCy SchubertPACKAGE_URL
756076b9443SCy SchubertPACKAGE_BUGREPORT
757076b9443SCy SchubertPACKAGE_STRING
758076b9443SCy SchubertPACKAGE_VERSION
759076b9443SCy SchubertPACKAGE_TARNAME
760076b9443SCy SchubertPACKAGE_NAME
761076b9443SCy SchubertPATH_SEPARATOR
762076b9443SCy SchubertSHELL'
763076b9443SCy Schubertac_subst_files=''
764076b9443SCy Schubertac_user_opts='
765076b9443SCy Schubertenable_option_checking
766076b9443SCy Schubertwith_tcl
767076b9443SCy Schubertwith_system_sqlite
768076b9443SCy Schubertwith_tclinclude
769076b9443SCy Schubertenable_threads
770076b9443SCy Schubertenable_shared
77100787218SCy Schubertenable_stubs
772076b9443SCy Schubertenable_64bit
773076b9443SCy Schubertenable_64bit_vis
774076b9443SCy Schubertenable_rpath
775076b9443SCy Schubertenable_symbols
776076b9443SCy Schubert'
777076b9443SCy Schubert      ac_precious_vars='build_alias
778076b9443SCy Schuberthost_alias
779076b9443SCy Schuberttarget_alias
780076b9443SCy SchubertCC
781076b9443SCy SchubertCFLAGS
782076b9443SCy SchubertLDFLAGS
783076b9443SCy SchubertLIBS
784076b9443SCy SchubertCPPFLAGS
785076b9443SCy SchubertCPP'
786076b9443SCy Schubert
787076b9443SCy Schubert
788076b9443SCy Schubert# Initialize some variables set by options.
789076b9443SCy Schubertac_init_help=
790076b9443SCy Schubertac_init_version=false
791076b9443SCy Schubertac_unrecognized_opts=
792076b9443SCy Schubertac_unrecognized_sep=
793076b9443SCy Schubert# The variables have the same names as the options, with
794076b9443SCy Schubert# dashes changed to underlines.
795076b9443SCy Schubertcache_file=/dev/null
796076b9443SCy Schubertexec_prefix=NONE
797076b9443SCy Schubertno_create=
798076b9443SCy Schubertno_recursion=
799076b9443SCy Schubertprefix=NONE
800076b9443SCy Schubertprogram_prefix=NONE
801076b9443SCy Schubertprogram_suffix=NONE
802076b9443SCy Schubertprogram_transform_name=s,x,x,
803076b9443SCy Schubertsilent=
804076b9443SCy Schubertsite=
805076b9443SCy Schubertsrcdir=
806076b9443SCy Schubertverbose=
807076b9443SCy Schubertx_includes=NONE
808076b9443SCy Schubertx_libraries=NONE
809076b9443SCy Schubert
810076b9443SCy Schubert# Installation directory options.
811076b9443SCy Schubert# These are left unexpanded so users can "make install exec_prefix=/foo"
812076b9443SCy Schubert# and all the variables that are supposed to be based on exec_prefix
813076b9443SCy Schubert# by default will actually change.
814076b9443SCy Schubert# Use braces instead of parens because sh, perl, etc. also accept them.
815076b9443SCy Schubert# (The list follows the same order as the GNU Coding Standards.)
816076b9443SCy Schubertbindir='${exec_prefix}/bin'
817076b9443SCy Schubertsbindir='${exec_prefix}/sbin'
818076b9443SCy Schubertlibexecdir='${exec_prefix}/libexec'
819076b9443SCy Schubertdatarootdir='${prefix}/share'
820076b9443SCy Schubertdatadir='${datarootdir}'
821076b9443SCy Schubertsysconfdir='${prefix}/etc'
822076b9443SCy Schubertsharedstatedir='${prefix}/com'
823076b9443SCy Schubertlocalstatedir='${prefix}/var'
824bca4681bSCy Schubertrunstatedir='${localstatedir}/run'
825076b9443SCy Schubertincludedir='${prefix}/include'
826076b9443SCy Schubertoldincludedir='/usr/include'
827076b9443SCy Schubertdocdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
828076b9443SCy Schubertinfodir='${datarootdir}/info'
829076b9443SCy Schuberthtmldir='${docdir}'
830076b9443SCy Schubertdvidir='${docdir}'
831076b9443SCy Schubertpdfdir='${docdir}'
832076b9443SCy Schubertpsdir='${docdir}'
833076b9443SCy Schubertlibdir='${exec_prefix}/lib'
834076b9443SCy Schubertlocaledir='${datarootdir}/locale'
835076b9443SCy Schubertmandir='${datarootdir}/man'
836076b9443SCy Schubert
837076b9443SCy Schubertac_prev=
838076b9443SCy Schubertac_dashdash=
839076b9443SCy Schubertfor ac_option
840076b9443SCy Schubertdo
841076b9443SCy Schubert  # If the previous option needs an argument, assign it.
842076b9443SCy Schubert  if test -n "$ac_prev"; then
843076b9443SCy Schubert    eval $ac_prev=\$ac_option
844076b9443SCy Schubert    ac_prev=
845076b9443SCy Schubert    continue
846076b9443SCy Schubert  fi
847076b9443SCy Schubert
848076b9443SCy Schubert  case $ac_option in
849076b9443SCy Schubert  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
850076b9443SCy Schubert  *=)   ac_optarg= ;;
851076b9443SCy Schubert  *)    ac_optarg=yes ;;
852076b9443SCy Schubert  esac
853076b9443SCy Schubert
854076b9443SCy Schubert  case $ac_dashdash$ac_option in
855076b9443SCy Schubert  --)
856076b9443SCy Schubert    ac_dashdash=yes ;;
857076b9443SCy Schubert
858076b9443SCy Schubert  -bindir | --bindir | --bindi | --bind | --bin | --bi)
859076b9443SCy Schubert    ac_prev=bindir ;;
860076b9443SCy Schubert  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
861076b9443SCy Schubert    bindir=$ac_optarg ;;
862076b9443SCy Schubert
863076b9443SCy Schubert  -build | --build | --buil | --bui | --bu)
864076b9443SCy Schubert    ac_prev=build_alias ;;
865076b9443SCy Schubert  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
866076b9443SCy Schubert    build_alias=$ac_optarg ;;
867076b9443SCy Schubert
868076b9443SCy Schubert  -cache-file | --cache-file | --cache-fil | --cache-fi \
869076b9443SCy Schubert  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
870076b9443SCy Schubert    ac_prev=cache_file ;;
871076b9443SCy Schubert  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
872076b9443SCy Schubert  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
873076b9443SCy Schubert    cache_file=$ac_optarg ;;
874076b9443SCy Schubert
875076b9443SCy Schubert  --config-cache | -C)
876076b9443SCy Schubert    cache_file=config.cache ;;
877076b9443SCy Schubert
878076b9443SCy Schubert  -datadir | --datadir | --datadi | --datad)
879076b9443SCy Schubert    ac_prev=datadir ;;
880076b9443SCy Schubert  -datadir=* | --datadir=* | --datadi=* | --datad=*)
881076b9443SCy Schubert    datadir=$ac_optarg ;;
882076b9443SCy Schubert
883076b9443SCy Schubert  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
884076b9443SCy Schubert  | --dataroo | --dataro | --datar)
885076b9443SCy Schubert    ac_prev=datarootdir ;;
886076b9443SCy Schubert  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
887076b9443SCy Schubert  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
888076b9443SCy Schubert    datarootdir=$ac_optarg ;;
889076b9443SCy Schubert
890076b9443SCy Schubert  -disable-* | --disable-*)
891076b9443SCy Schubert    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
892076b9443SCy Schubert    # Reject names that are not valid shell variable names.
893076b9443SCy Schubert    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
89470b56f4bSCy Schubert      as_fn_error $? "invalid feature name: \`$ac_useropt'"
895076b9443SCy Schubert    ac_useropt_orig=$ac_useropt
89670b56f4bSCy Schubert    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
897076b9443SCy Schubert    case $ac_user_opts in
898076b9443SCy Schubert      *"
899076b9443SCy Schubert"enable_$ac_useropt"
900076b9443SCy Schubert"*) ;;
901076b9443SCy Schubert      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
902076b9443SCy Schubert	 ac_unrecognized_sep=', ';;
903076b9443SCy Schubert    esac
904076b9443SCy Schubert    eval enable_$ac_useropt=no ;;
905076b9443SCy Schubert
906076b9443SCy Schubert  -docdir | --docdir | --docdi | --doc | --do)
907076b9443SCy Schubert    ac_prev=docdir ;;
908076b9443SCy Schubert  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
909076b9443SCy Schubert    docdir=$ac_optarg ;;
910076b9443SCy Schubert
911076b9443SCy Schubert  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
912076b9443SCy Schubert    ac_prev=dvidir ;;
913076b9443SCy Schubert  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
914076b9443SCy Schubert    dvidir=$ac_optarg ;;
915076b9443SCy Schubert
916076b9443SCy Schubert  -enable-* | --enable-*)
917076b9443SCy Schubert    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
918076b9443SCy Schubert    # Reject names that are not valid shell variable names.
919076b9443SCy Schubert    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
92070b56f4bSCy Schubert      as_fn_error $? "invalid feature name: \`$ac_useropt'"
921076b9443SCy Schubert    ac_useropt_orig=$ac_useropt
92270b56f4bSCy Schubert    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
923076b9443SCy Schubert    case $ac_user_opts in
924076b9443SCy Schubert      *"
925076b9443SCy Schubert"enable_$ac_useropt"
926076b9443SCy Schubert"*) ;;
927076b9443SCy Schubert      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
928076b9443SCy Schubert	 ac_unrecognized_sep=', ';;
929076b9443SCy Schubert    esac
930076b9443SCy Schubert    eval enable_$ac_useropt=\$ac_optarg ;;
931076b9443SCy Schubert
932076b9443SCy Schubert  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
933076b9443SCy Schubert  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
934076b9443SCy Schubert  | --exec | --exe | --ex)
935076b9443SCy Schubert    ac_prev=exec_prefix ;;
936076b9443SCy Schubert  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
937076b9443SCy Schubert  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
938076b9443SCy Schubert  | --exec=* | --exe=* | --ex=*)
939076b9443SCy Schubert    exec_prefix=$ac_optarg ;;
940076b9443SCy Schubert
941076b9443SCy Schubert  -gas | --gas | --ga | --g)
942076b9443SCy Schubert    # Obsolete; use --with-gas.
943076b9443SCy Schubert    with_gas=yes ;;
944076b9443SCy Schubert
945076b9443SCy Schubert  -help | --help | --hel | --he | -h)
946076b9443SCy Schubert    ac_init_help=long ;;
947076b9443SCy Schubert  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
948076b9443SCy Schubert    ac_init_help=recursive ;;
949076b9443SCy Schubert  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
950076b9443SCy Schubert    ac_init_help=short ;;
951076b9443SCy Schubert
952076b9443SCy Schubert  -host | --host | --hos | --ho)
953076b9443SCy Schubert    ac_prev=host_alias ;;
954076b9443SCy Schubert  -host=* | --host=* | --hos=* | --ho=*)
955076b9443SCy Schubert    host_alias=$ac_optarg ;;
956076b9443SCy Schubert
957076b9443SCy Schubert  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
958076b9443SCy Schubert    ac_prev=htmldir ;;
959076b9443SCy Schubert  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
960076b9443SCy Schubert  | --ht=*)
961076b9443SCy Schubert    htmldir=$ac_optarg ;;
962076b9443SCy Schubert
963076b9443SCy Schubert  -includedir | --includedir | --includedi | --included | --include \
964076b9443SCy Schubert  | --includ | --inclu | --incl | --inc)
965076b9443SCy Schubert    ac_prev=includedir ;;
966076b9443SCy Schubert  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
967076b9443SCy Schubert  | --includ=* | --inclu=* | --incl=* | --inc=*)
968076b9443SCy Schubert    includedir=$ac_optarg ;;
969076b9443SCy Schubert
970076b9443SCy Schubert  -infodir | --infodir | --infodi | --infod | --info | --inf)
971076b9443SCy Schubert    ac_prev=infodir ;;
972076b9443SCy Schubert  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
973076b9443SCy Schubert    infodir=$ac_optarg ;;
974076b9443SCy Schubert
975076b9443SCy Schubert  -libdir | --libdir | --libdi | --libd)
976076b9443SCy Schubert    ac_prev=libdir ;;
977076b9443SCy Schubert  -libdir=* | --libdir=* | --libdi=* | --libd=*)
978076b9443SCy Schubert    libdir=$ac_optarg ;;
979076b9443SCy Schubert
980076b9443SCy Schubert  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
981076b9443SCy Schubert  | --libexe | --libex | --libe)
982076b9443SCy Schubert    ac_prev=libexecdir ;;
983076b9443SCy Schubert  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
984076b9443SCy Schubert  | --libexe=* | --libex=* | --libe=*)
985076b9443SCy Schubert    libexecdir=$ac_optarg ;;
986076b9443SCy Schubert
987076b9443SCy Schubert  -localedir | --localedir | --localedi | --localed | --locale)
988076b9443SCy Schubert    ac_prev=localedir ;;
989076b9443SCy Schubert  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
990076b9443SCy Schubert    localedir=$ac_optarg ;;
991076b9443SCy Schubert
992076b9443SCy Schubert  -localstatedir | --localstatedir | --localstatedi | --localstated \
993076b9443SCy Schubert  | --localstate | --localstat | --localsta | --localst | --locals)
994076b9443SCy Schubert    ac_prev=localstatedir ;;
995076b9443SCy Schubert  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
996076b9443SCy Schubert  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
997076b9443SCy Schubert    localstatedir=$ac_optarg ;;
998076b9443SCy Schubert
999076b9443SCy Schubert  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1000076b9443SCy Schubert    ac_prev=mandir ;;
1001076b9443SCy Schubert  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1002076b9443SCy Schubert    mandir=$ac_optarg ;;
1003076b9443SCy Schubert
1004076b9443SCy Schubert  -nfp | --nfp | --nf)
1005076b9443SCy Schubert    # Obsolete; use --without-fp.
1006076b9443SCy Schubert    with_fp=no ;;
1007076b9443SCy Schubert
1008076b9443SCy Schubert  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1009076b9443SCy Schubert  | --no-cr | --no-c | -n)
1010076b9443SCy Schubert    no_create=yes ;;
1011076b9443SCy Schubert
1012076b9443SCy Schubert  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1013076b9443SCy Schubert  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1014076b9443SCy Schubert    no_recursion=yes ;;
1015076b9443SCy Schubert
1016076b9443SCy Schubert  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1017076b9443SCy Schubert  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1018076b9443SCy Schubert  | --oldin | --oldi | --old | --ol | --o)
1019076b9443SCy Schubert    ac_prev=oldincludedir ;;
1020076b9443SCy Schubert  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1021076b9443SCy Schubert  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1022076b9443SCy Schubert  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1023076b9443SCy Schubert    oldincludedir=$ac_optarg ;;
1024076b9443SCy Schubert
1025076b9443SCy Schubert  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1026076b9443SCy Schubert    ac_prev=prefix ;;
1027076b9443SCy Schubert  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1028076b9443SCy Schubert    prefix=$ac_optarg ;;
1029076b9443SCy Schubert
1030076b9443SCy Schubert  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1031076b9443SCy Schubert  | --program-pre | --program-pr | --program-p)
1032076b9443SCy Schubert    ac_prev=program_prefix ;;
1033076b9443SCy Schubert  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1034076b9443SCy Schubert  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1035076b9443SCy Schubert    program_prefix=$ac_optarg ;;
1036076b9443SCy Schubert
1037076b9443SCy Schubert  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1038076b9443SCy Schubert  | --program-suf | --program-su | --program-s)
1039076b9443SCy Schubert    ac_prev=program_suffix ;;
1040076b9443SCy Schubert  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1041076b9443SCy Schubert  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1042076b9443SCy Schubert    program_suffix=$ac_optarg ;;
1043076b9443SCy Schubert
1044076b9443SCy Schubert  -program-transform-name | --program-transform-name \
1045076b9443SCy Schubert  | --program-transform-nam | --program-transform-na \
1046076b9443SCy Schubert  | --program-transform-n | --program-transform- \
1047076b9443SCy Schubert  | --program-transform | --program-transfor \
1048076b9443SCy Schubert  | --program-transfo | --program-transf \
1049076b9443SCy Schubert  | --program-trans | --program-tran \
1050076b9443SCy Schubert  | --progr-tra | --program-tr | --program-t)
1051076b9443SCy Schubert    ac_prev=program_transform_name ;;
1052076b9443SCy Schubert  -program-transform-name=* | --program-transform-name=* \
1053076b9443SCy Schubert  | --program-transform-nam=* | --program-transform-na=* \
1054076b9443SCy Schubert  | --program-transform-n=* | --program-transform-=* \
1055076b9443SCy Schubert  | --program-transform=* | --program-transfor=* \
1056076b9443SCy Schubert  | --program-transfo=* | --program-transf=* \
1057076b9443SCy Schubert  | --program-trans=* | --program-tran=* \
1058076b9443SCy Schubert  | --progr-tra=* | --program-tr=* | --program-t=*)
1059076b9443SCy Schubert    program_transform_name=$ac_optarg ;;
1060076b9443SCy Schubert
1061076b9443SCy Schubert  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1062076b9443SCy Schubert    ac_prev=pdfdir ;;
1063076b9443SCy Schubert  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1064076b9443SCy Schubert    pdfdir=$ac_optarg ;;
1065076b9443SCy Schubert
1066076b9443SCy Schubert  -psdir | --psdir | --psdi | --psd | --ps)
1067076b9443SCy Schubert    ac_prev=psdir ;;
1068076b9443SCy Schubert  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1069076b9443SCy Schubert    psdir=$ac_optarg ;;
1070076b9443SCy Schubert
1071076b9443SCy Schubert  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1072076b9443SCy Schubert  | -silent | --silent | --silen | --sile | --sil)
1073076b9443SCy Schubert    silent=yes ;;
1074076b9443SCy Schubert
1075bca4681bSCy Schubert  -runstatedir | --runstatedir | --runstatedi | --runstated \
1076bca4681bSCy Schubert  | --runstate | --runstat | --runsta | --runst | --runs \
1077bca4681bSCy Schubert  | --run | --ru | --r)
1078bca4681bSCy Schubert    ac_prev=runstatedir ;;
1079bca4681bSCy Schubert  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1080bca4681bSCy Schubert  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1081bca4681bSCy Schubert  | --run=* | --ru=* | --r=*)
1082bca4681bSCy Schubert    runstatedir=$ac_optarg ;;
1083bca4681bSCy Schubert
1084076b9443SCy Schubert  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1085076b9443SCy Schubert    ac_prev=sbindir ;;
1086076b9443SCy Schubert  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1087076b9443SCy Schubert  | --sbi=* | --sb=*)
1088076b9443SCy Schubert    sbindir=$ac_optarg ;;
1089076b9443SCy Schubert
1090076b9443SCy Schubert  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1091076b9443SCy Schubert  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1092076b9443SCy Schubert  | --sharedst | --shareds | --shared | --share | --shar \
1093076b9443SCy Schubert  | --sha | --sh)
1094076b9443SCy Schubert    ac_prev=sharedstatedir ;;
1095076b9443SCy Schubert  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1096076b9443SCy Schubert  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1097076b9443SCy Schubert  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1098076b9443SCy Schubert  | --sha=* | --sh=*)
1099076b9443SCy Schubert    sharedstatedir=$ac_optarg ;;
1100076b9443SCy Schubert
1101076b9443SCy Schubert  -site | --site | --sit)
1102076b9443SCy Schubert    ac_prev=site ;;
1103076b9443SCy Schubert  -site=* | --site=* | --sit=*)
1104076b9443SCy Schubert    site=$ac_optarg ;;
1105076b9443SCy Schubert
1106076b9443SCy Schubert  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1107076b9443SCy Schubert    ac_prev=srcdir ;;
1108076b9443SCy Schubert  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1109076b9443SCy Schubert    srcdir=$ac_optarg ;;
1110076b9443SCy Schubert
1111076b9443SCy Schubert  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1112076b9443SCy Schubert  | --syscon | --sysco | --sysc | --sys | --sy)
1113076b9443SCy Schubert    ac_prev=sysconfdir ;;
1114076b9443SCy Schubert  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1115076b9443SCy Schubert  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1116076b9443SCy Schubert    sysconfdir=$ac_optarg ;;
1117076b9443SCy Schubert
1118076b9443SCy Schubert  -target | --target | --targe | --targ | --tar | --ta | --t)
1119076b9443SCy Schubert    ac_prev=target_alias ;;
1120076b9443SCy Schubert  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1121076b9443SCy Schubert    target_alias=$ac_optarg ;;
1122076b9443SCy Schubert
1123076b9443SCy Schubert  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1124076b9443SCy Schubert    verbose=yes ;;
1125076b9443SCy Schubert
1126076b9443SCy Schubert  -version | --version | --versio | --versi | --vers | -V)
1127076b9443SCy Schubert    ac_init_version=: ;;
1128076b9443SCy Schubert
1129076b9443SCy Schubert  -with-* | --with-*)
1130076b9443SCy Schubert    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1131076b9443SCy Schubert    # Reject names that are not valid shell variable names.
1132076b9443SCy Schubert    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
113370b56f4bSCy Schubert      as_fn_error $? "invalid package name: \`$ac_useropt'"
1134076b9443SCy Schubert    ac_useropt_orig=$ac_useropt
113570b56f4bSCy Schubert    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1136076b9443SCy Schubert    case $ac_user_opts in
1137076b9443SCy Schubert      *"
1138076b9443SCy Schubert"with_$ac_useropt"
1139076b9443SCy Schubert"*) ;;
1140076b9443SCy Schubert      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1141076b9443SCy Schubert	 ac_unrecognized_sep=', ';;
1142076b9443SCy Schubert    esac
1143076b9443SCy Schubert    eval with_$ac_useropt=\$ac_optarg ;;
1144076b9443SCy Schubert
1145076b9443SCy Schubert  -without-* | --without-*)
1146076b9443SCy Schubert    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1147076b9443SCy Schubert    # Reject names that are not valid shell variable names.
1148076b9443SCy Schubert    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
114970b56f4bSCy Schubert      as_fn_error $? "invalid package name: \`$ac_useropt'"
1150076b9443SCy Schubert    ac_useropt_orig=$ac_useropt
115170b56f4bSCy Schubert    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1152076b9443SCy Schubert    case $ac_user_opts in
1153076b9443SCy Schubert      *"
1154076b9443SCy Schubert"with_$ac_useropt"
1155076b9443SCy Schubert"*) ;;
1156076b9443SCy Schubert      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1157076b9443SCy Schubert	 ac_unrecognized_sep=', ';;
1158076b9443SCy Schubert    esac
1159076b9443SCy Schubert    eval with_$ac_useropt=no ;;
1160076b9443SCy Schubert
1161076b9443SCy Schubert  --x)
1162076b9443SCy Schubert    # Obsolete; use --with-x.
1163076b9443SCy Schubert    with_x=yes ;;
1164076b9443SCy Schubert
1165076b9443SCy Schubert  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1166076b9443SCy Schubert  | --x-incl | --x-inc | --x-in | --x-i)
1167076b9443SCy Schubert    ac_prev=x_includes ;;
1168076b9443SCy Schubert  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1169076b9443SCy Schubert  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1170076b9443SCy Schubert    x_includes=$ac_optarg ;;
1171076b9443SCy Schubert
1172076b9443SCy Schubert  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1173076b9443SCy Schubert  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1174076b9443SCy Schubert    ac_prev=x_libraries ;;
1175076b9443SCy Schubert  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1176076b9443SCy Schubert  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1177076b9443SCy Schubert    x_libraries=$ac_optarg ;;
1178076b9443SCy Schubert
1179076b9443SCy Schubert  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1180076b9443SCy SchubertTry \`$0 --help' for more information"
1181076b9443SCy Schubert    ;;
1182076b9443SCy Schubert
1183076b9443SCy Schubert  *=*)
1184076b9443SCy Schubert    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1185076b9443SCy Schubert    # Reject names that are not valid shell variable names.
1186076b9443SCy Schubert    case $ac_envvar in #(
1187076b9443SCy Schubert      '' | [0-9]* | *[!_$as_cr_alnum]* )
1188076b9443SCy Schubert      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1189076b9443SCy Schubert    esac
1190076b9443SCy Schubert    eval $ac_envvar=\$ac_optarg
1191076b9443SCy Schubert    export $ac_envvar ;;
1192076b9443SCy Schubert
1193076b9443SCy Schubert  *)
1194076b9443SCy Schubert    # FIXME: should be removed in autoconf 3.0.
119570b56f4bSCy Schubert    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1196076b9443SCy Schubert    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
119770b56f4bSCy Schubert      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1198076b9443SCy Schubert    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1199076b9443SCy Schubert    ;;
1200076b9443SCy Schubert
1201076b9443SCy Schubert  esac
1202076b9443SCy Schubertdone
1203076b9443SCy Schubert
1204076b9443SCy Schubertif test -n "$ac_prev"; then
1205076b9443SCy Schubert  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1206076b9443SCy Schubert  as_fn_error $? "missing argument to $ac_option"
1207076b9443SCy Schubertfi
1208076b9443SCy Schubert
1209076b9443SCy Schubertif test -n "$ac_unrecognized_opts"; then
1210076b9443SCy Schubert  case $enable_option_checking in
1211076b9443SCy Schubert    no) ;;
1212076b9443SCy Schubert    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
121370b56f4bSCy Schubert    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1214076b9443SCy Schubert  esac
1215076b9443SCy Schubertfi
1216076b9443SCy Schubert
1217076b9443SCy Schubert# Check all directory arguments for consistency.
1218076b9443SCy Schubertfor ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1219076b9443SCy Schubert		datadir sysconfdir sharedstatedir localstatedir includedir \
1220076b9443SCy Schubert		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1221bca4681bSCy Schubert		libdir localedir mandir runstatedir
1222076b9443SCy Schubertdo
1223076b9443SCy Schubert  eval ac_val=\$$ac_var
1224076b9443SCy Schubert  # Remove trailing slashes.
1225076b9443SCy Schubert  case $ac_val in
1226076b9443SCy Schubert    */ )
1227076b9443SCy Schubert      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1228076b9443SCy Schubert      eval $ac_var=\$ac_val;;
1229076b9443SCy Schubert  esac
1230076b9443SCy Schubert  # Be sure to have absolute directory names.
1231076b9443SCy Schubert  case $ac_val in
1232076b9443SCy Schubert    [\\/$]* | ?:[\\/]* )  continue;;
1233076b9443SCy Schubert    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1234076b9443SCy Schubert  esac
1235076b9443SCy Schubert  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1236076b9443SCy Schubertdone
1237076b9443SCy Schubert
1238076b9443SCy Schubert# There might be people who depend on the old broken behavior: `$host'
1239076b9443SCy Schubert# used to hold the argument of --host etc.
1240076b9443SCy Schubert# FIXME: To remove some day.
1241076b9443SCy Schubertbuild=$build_alias
1242076b9443SCy Schuberthost=$host_alias
1243076b9443SCy Schuberttarget=$target_alias
1244076b9443SCy Schubert
1245076b9443SCy Schubert# FIXME: To remove some day.
1246076b9443SCy Schubertif test "x$host_alias" != x; then
1247076b9443SCy Schubert  if test "x$build_alias" = x; then
1248076b9443SCy Schubert    cross_compiling=maybe
1249076b9443SCy Schubert  elif test "x$build_alias" != "x$host_alias"; then
1250076b9443SCy Schubert    cross_compiling=yes
1251076b9443SCy Schubert  fi
1252076b9443SCy Schubertfi
1253076b9443SCy Schubert
1254076b9443SCy Schubertac_tool_prefix=
1255076b9443SCy Schuberttest -n "$host_alias" && ac_tool_prefix=$host_alias-
1256076b9443SCy Schubert
1257076b9443SCy Schuberttest "$silent" = yes && exec 6>/dev/null
1258076b9443SCy Schubert
1259076b9443SCy Schubert
1260076b9443SCy Schubertac_pwd=`pwd` && test -n "$ac_pwd" &&
1261076b9443SCy Schubertac_ls_di=`ls -di .` &&
1262076b9443SCy Schubertac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1263076b9443SCy Schubert  as_fn_error $? "working directory cannot be determined"
1264076b9443SCy Schuberttest "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1265076b9443SCy Schubert  as_fn_error $? "pwd does not report name of working directory"
1266076b9443SCy Schubert
1267076b9443SCy Schubert
1268076b9443SCy Schubert# Find the source files, if location was not specified.
1269076b9443SCy Schubertif test -z "$srcdir"; then
1270076b9443SCy Schubert  ac_srcdir_defaulted=yes
1271076b9443SCy Schubert  # Try the directory containing this script, then the parent directory.
1272076b9443SCy Schubert  ac_confdir=`$as_dirname -- "$as_myself" ||
1273076b9443SCy Schubert$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1274076b9443SCy Schubert	 X"$as_myself" : 'X\(//\)[^/]' \| \
1275076b9443SCy Schubert	 X"$as_myself" : 'X\(//\)$' \| \
1276076b9443SCy Schubert	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
127770b56f4bSCy Schubertprintf "%s\n" X"$as_myself" |
1278076b9443SCy Schubert    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1279076b9443SCy Schubert	    s//\1/
1280076b9443SCy Schubert	    q
1281076b9443SCy Schubert	  }
1282076b9443SCy Schubert	  /^X\(\/\/\)[^/].*/{
1283076b9443SCy Schubert	    s//\1/
1284076b9443SCy Schubert	    q
1285076b9443SCy Schubert	  }
1286076b9443SCy Schubert	  /^X\(\/\/\)$/{
1287076b9443SCy Schubert	    s//\1/
1288076b9443SCy Schubert	    q
1289076b9443SCy Schubert	  }
1290076b9443SCy Schubert	  /^X\(\/\).*/{
1291076b9443SCy Schubert	    s//\1/
1292076b9443SCy Schubert	    q
1293076b9443SCy Schubert	  }
1294076b9443SCy Schubert	  s/.*/./; q'`
1295076b9443SCy Schubert  srcdir=$ac_confdir
1296076b9443SCy Schubert  if test ! -r "$srcdir/$ac_unique_file"; then
1297076b9443SCy Schubert    srcdir=..
1298076b9443SCy Schubert  fi
1299076b9443SCy Schubertelse
1300076b9443SCy Schubert  ac_srcdir_defaulted=no
1301076b9443SCy Schubertfi
1302076b9443SCy Schubertif test ! -r "$srcdir/$ac_unique_file"; then
1303076b9443SCy Schubert  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1304076b9443SCy Schubert  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1305076b9443SCy Schubertfi
1306076b9443SCy Schubertac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1307076b9443SCy Schubertac_abs_confdir=`(
1308076b9443SCy Schubert	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1309076b9443SCy Schubert	pwd)`
1310076b9443SCy Schubert# When building in place, set srcdir=.
1311076b9443SCy Schubertif test "$ac_abs_confdir" = "$ac_pwd"; then
1312076b9443SCy Schubert  srcdir=.
1313076b9443SCy Schubertfi
1314076b9443SCy Schubert# Remove unnecessary trailing slashes from srcdir.
1315076b9443SCy Schubert# Double slashes in file names in object file debugging info
1316076b9443SCy Schubert# mess up M-x gdb in Emacs.
1317076b9443SCy Schubertcase $srcdir in
1318076b9443SCy Schubert*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1319076b9443SCy Schubertesac
1320076b9443SCy Schubertfor ac_var in $ac_precious_vars; do
1321076b9443SCy Schubert  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1322076b9443SCy Schubert  eval ac_env_${ac_var}_value=\$${ac_var}
1323076b9443SCy Schubert  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1324076b9443SCy Schubert  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1325076b9443SCy Schubertdone
1326076b9443SCy Schubert
1327076b9443SCy Schubert#
1328076b9443SCy Schubert# Report the --help message.
1329076b9443SCy Schubert#
1330076b9443SCy Schubertif test "$ac_init_help" = "long"; then
1331076b9443SCy Schubert  # Omit some internal or obsolete options to make the list less imposing.
1332076b9443SCy Schubert  # This message is too long to be a string in the A/UX 3.1 sh.
1333076b9443SCy Schubert  cat <<_ACEOF
1334*de946883SCy Schubert\`configure' configures sqlite 3.46.1 to adapt to many kinds of systems.
1335076b9443SCy Schubert
1336076b9443SCy SchubertUsage: $0 [OPTION]... [VAR=VALUE]...
1337076b9443SCy Schubert
1338076b9443SCy SchubertTo assign environment variables (e.g., CC, CFLAGS...), specify them as
1339076b9443SCy SchubertVAR=VALUE.  See below for descriptions of some of the useful variables.
1340076b9443SCy Schubert
1341076b9443SCy SchubertDefaults for the options are specified in brackets.
1342076b9443SCy Schubert
1343076b9443SCy SchubertConfiguration:
1344076b9443SCy Schubert  -h, --help              display this help and exit
1345076b9443SCy Schubert      --help=short        display options specific to this package
1346076b9443SCy Schubert      --help=recursive    display the short help of all the included packages
1347076b9443SCy Schubert  -V, --version           display version information and exit
1348076b9443SCy Schubert  -q, --quiet, --silent   do not print \`checking ...' messages
1349076b9443SCy Schubert      --cache-file=FILE   cache test results in FILE [disabled]
1350076b9443SCy Schubert  -C, --config-cache      alias for \`--cache-file=config.cache'
1351076b9443SCy Schubert  -n, --no-create         do not create output files
1352076b9443SCy Schubert      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1353076b9443SCy Schubert
1354076b9443SCy SchubertInstallation directories:
1355076b9443SCy Schubert  --prefix=PREFIX         install architecture-independent files in PREFIX
1356076b9443SCy Schubert                          [$ac_default_prefix]
1357076b9443SCy Schubert  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1358076b9443SCy Schubert                          [PREFIX]
1359076b9443SCy Schubert
1360076b9443SCy SchubertBy default, \`make install' will install all the files in
1361076b9443SCy Schubert\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1362076b9443SCy Schubertan installation prefix other than \`$ac_default_prefix' using \`--prefix',
1363076b9443SCy Schubertfor instance \`--prefix=\$HOME'.
1364076b9443SCy Schubert
1365076b9443SCy SchubertFor better control, use the options below.
1366076b9443SCy Schubert
1367076b9443SCy SchubertFine tuning of the installation directories:
1368076b9443SCy Schubert  --bindir=DIR            user executables [EPREFIX/bin]
1369076b9443SCy Schubert  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1370076b9443SCy Schubert  --libexecdir=DIR        program executables [EPREFIX/libexec]
1371076b9443SCy Schubert  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1372076b9443SCy Schubert  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1373076b9443SCy Schubert  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1374bca4681bSCy Schubert  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1375076b9443SCy Schubert  --libdir=DIR            object code libraries [EPREFIX/lib]
1376076b9443SCy Schubert  --includedir=DIR        C header files [PREFIX/include]
1377076b9443SCy Schubert  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1378076b9443SCy Schubert  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1379076b9443SCy Schubert  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1380076b9443SCy Schubert  --infodir=DIR           info documentation [DATAROOTDIR/info]
1381076b9443SCy Schubert  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1382076b9443SCy Schubert  --mandir=DIR            man documentation [DATAROOTDIR/man]
1383076b9443SCy Schubert  --docdir=DIR            documentation root [DATAROOTDIR/doc/sqlite]
1384076b9443SCy Schubert  --htmldir=DIR           html documentation [DOCDIR]
1385076b9443SCy Schubert  --dvidir=DIR            dvi documentation [DOCDIR]
1386076b9443SCy Schubert  --pdfdir=DIR            pdf documentation [DOCDIR]
1387076b9443SCy Schubert  --psdir=DIR             ps documentation [DOCDIR]
1388076b9443SCy Schubert_ACEOF
1389076b9443SCy Schubert
1390076b9443SCy Schubert  cat <<\_ACEOF
1391076b9443SCy Schubert_ACEOF
1392076b9443SCy Schubertfi
1393076b9443SCy Schubert
1394076b9443SCy Schubertif test -n "$ac_init_help"; then
1395076b9443SCy Schubert  case $ac_init_help in
1396*de946883SCy Schubert     short | recursive ) echo "Configuration of sqlite 3.46.1:";;
1397076b9443SCy Schubert   esac
1398076b9443SCy Schubert  cat <<\_ACEOF
1399076b9443SCy Schubert
1400076b9443SCy SchubertOptional Features:
1401076b9443SCy Schubert  --disable-option-checking  ignore unrecognized --enable/--with options
1402076b9443SCy Schubert  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1403076b9443SCy Schubert  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
140400787218SCy Schubert  --enable-threads        build with threads (default: on)
1405076b9443SCy Schubert  --enable-shared         build and link with shared libraries (default: on)
140600787218SCy Schubert  --enable-stubs          build and link with stub libraries. Always true for
140700787218SCy Schubert                          shared builds (default: on)
1408076b9443SCy Schubert  --enable-64bit          enable 64bit support (default: off)
1409076b9443SCy Schubert  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1410076b9443SCy Schubert  --disable-rpath         disable rpath support (default: on)
1411076b9443SCy Schubert  --enable-symbols        build with debugging symbols (default: off)
1412076b9443SCy Schubert
1413076b9443SCy SchubertOptional Packages:
1414076b9443SCy Schubert  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1415076b9443SCy Schubert  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1416076b9443SCy Schubert  --with-tcl              directory containing tcl configuration
1417076b9443SCy Schubert                          (tclConfig.sh)
1418076b9443SCy Schubert  --with-system-sqlite    use a system-supplied libsqlite3 instead of the
1419076b9443SCy Schubert                          bundled one
1420076b9443SCy Schubert  --with-tclinclude       directory containing the public Tcl header files
1421076b9443SCy Schubert
1422076b9443SCy SchubertSome influential environment variables:
1423076b9443SCy Schubert  CC          C compiler command
1424076b9443SCy Schubert  CFLAGS      C compiler flags
1425076b9443SCy Schubert  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1426076b9443SCy Schubert              nonstandard directory <lib dir>
1427076b9443SCy Schubert  LIBS        libraries to pass to the linker, e.g. -l<library>
1428076b9443SCy Schubert  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1429076b9443SCy Schubert              you have headers in a nonstandard directory <include dir>
1430076b9443SCy Schubert  CPP         C preprocessor
1431076b9443SCy Schubert
1432076b9443SCy SchubertUse these variables to override the choices made by `configure' or to help
1433076b9443SCy Schubertit to find libraries and programs with nonstandard names/locations.
1434076b9443SCy Schubert
1435076b9443SCy SchubertReport bugs to the package provider.
1436076b9443SCy Schubert_ACEOF
1437076b9443SCy Schubertac_status=$?
1438076b9443SCy Schubertfi
1439076b9443SCy Schubert
1440076b9443SCy Schubertif test "$ac_init_help" = "recursive"; then
1441076b9443SCy Schubert  # If there are subdirs, report their specific --help.
1442076b9443SCy Schubert  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1443076b9443SCy Schubert    test -d "$ac_dir" ||
1444076b9443SCy Schubert      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1445076b9443SCy Schubert      continue
1446076b9443SCy Schubert    ac_builddir=.
1447076b9443SCy Schubert
1448076b9443SCy Schubertcase "$ac_dir" in
1449076b9443SCy Schubert.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1450076b9443SCy Schubert*)
145170b56f4bSCy Schubert  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1452076b9443SCy Schubert  # A ".." for each directory in $ac_dir_suffix.
145370b56f4bSCy Schubert  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1454076b9443SCy Schubert  case $ac_top_builddir_sub in
1455076b9443SCy Schubert  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1456076b9443SCy Schubert  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1457076b9443SCy Schubert  esac ;;
1458076b9443SCy Schubertesac
1459076b9443SCy Schubertac_abs_top_builddir=$ac_pwd
1460076b9443SCy Schubertac_abs_builddir=$ac_pwd$ac_dir_suffix
1461076b9443SCy Schubert# for backward compatibility:
1462076b9443SCy Schubertac_top_builddir=$ac_top_build_prefix
1463076b9443SCy Schubert
1464076b9443SCy Schubertcase $srcdir in
1465076b9443SCy Schubert  .)  # We are building in place.
1466076b9443SCy Schubert    ac_srcdir=.
1467076b9443SCy Schubert    ac_top_srcdir=$ac_top_builddir_sub
1468076b9443SCy Schubert    ac_abs_top_srcdir=$ac_pwd ;;
1469076b9443SCy Schubert  [\\/]* | ?:[\\/]* )  # Absolute name.
1470076b9443SCy Schubert    ac_srcdir=$srcdir$ac_dir_suffix;
1471076b9443SCy Schubert    ac_top_srcdir=$srcdir
1472076b9443SCy Schubert    ac_abs_top_srcdir=$srcdir ;;
1473076b9443SCy Schubert  *) # Relative name.
1474076b9443SCy Schubert    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1475076b9443SCy Schubert    ac_top_srcdir=$ac_top_build_prefix$srcdir
1476076b9443SCy Schubert    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1477076b9443SCy Schubertesac
1478076b9443SCy Schubertac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1479076b9443SCy Schubert
1480076b9443SCy Schubert    cd "$ac_dir" || { ac_status=$?; continue; }
148170b56f4bSCy Schubert    # Check for configure.gnu first; this name is used for a wrapper for
148270b56f4bSCy Schubert    # Metaconfig's "Configure" on case-insensitive file systems.
1483076b9443SCy Schubert    if test -f "$ac_srcdir/configure.gnu"; then
1484076b9443SCy Schubert      echo &&
1485076b9443SCy Schubert      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1486076b9443SCy Schubert    elif test -f "$ac_srcdir/configure"; then
1487076b9443SCy Schubert      echo &&
1488076b9443SCy Schubert      $SHELL "$ac_srcdir/configure" --help=recursive
1489076b9443SCy Schubert    else
149070b56f4bSCy Schubert      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1491076b9443SCy Schubert    fi || ac_status=$?
1492076b9443SCy Schubert    cd "$ac_pwd" || { ac_status=$?; break; }
1493076b9443SCy Schubert  done
1494076b9443SCy Schubertfi
1495076b9443SCy Schubert
1496076b9443SCy Schuberttest -n "$ac_init_help" && exit $ac_status
1497076b9443SCy Schubertif $ac_init_version; then
1498076b9443SCy Schubert  cat <<\_ACEOF
1499*de946883SCy Schubertsqlite configure 3.46.1
150070b56f4bSCy Schubertgenerated by GNU Autoconf 2.71
1501076b9443SCy Schubert
150270b56f4bSCy SchubertCopyright (C) 2021 Free Software Foundation, Inc.
1503076b9443SCy SchubertThis configure script is free software; the Free Software Foundation
1504076b9443SCy Schubertgives unlimited permission to copy, distribute and modify it.
1505076b9443SCy Schubert_ACEOF
1506076b9443SCy Schubert  exit
1507076b9443SCy Schubertfi
1508076b9443SCy Schubert
1509076b9443SCy Schubert## ------------------------ ##
1510076b9443SCy Schubert## Autoconf initialization. ##
1511076b9443SCy Schubert## ------------------------ ##
1512076b9443SCy Schubert
1513076b9443SCy Schubert# ac_fn_c_try_compile LINENO
1514076b9443SCy Schubert# --------------------------
1515076b9443SCy Schubert# Try to compile conftest.$ac_ext, and return whether this succeeded.
1516076b9443SCy Schubertac_fn_c_try_compile ()
1517076b9443SCy Schubert{
1518076b9443SCy Schubert  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
151970b56f4bSCy Schubert  rm -f conftest.$ac_objext conftest.beam
1520076b9443SCy Schubert  if { { ac_try="$ac_compile"
1521076b9443SCy Schubertcase "(($ac_try" in
1522076b9443SCy Schubert  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1523076b9443SCy Schubert  *) ac_try_echo=$ac_try;;
1524076b9443SCy Schubertesac
1525076b9443SCy Schuberteval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
152670b56f4bSCy Schubertprintf "%s\n" "$ac_try_echo"; } >&5
1527076b9443SCy Schubert  (eval "$ac_compile") 2>conftest.err
1528076b9443SCy Schubert  ac_status=$?
1529076b9443SCy Schubert  if test -s conftest.err; then
1530076b9443SCy Schubert    grep -v '^ *+' conftest.err >conftest.er1
1531076b9443SCy Schubert    cat conftest.er1 >&5
1532076b9443SCy Schubert    mv -f conftest.er1 conftest.err
1533076b9443SCy Schubert  fi
153470b56f4bSCy Schubert  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1535076b9443SCy Schubert  test $ac_status = 0; } && {
1536076b9443SCy Schubert	 test -z "$ac_c_werror_flag" ||
1537076b9443SCy Schubert	 test ! -s conftest.err
153870b56f4bSCy Schubert       } && test -s conftest.$ac_objext
153970b56f4bSCy Schubertthen :
1540076b9443SCy Schubert  ac_retval=0
154170b56f4bSCy Schubertelse $as_nop
154270b56f4bSCy Schubert  printf "%s\n" "$as_me: failed program was:" >&5
1543076b9443SCy Schubertsed 's/^/| /' conftest.$ac_ext >&5
1544076b9443SCy Schubert
1545076b9443SCy Schubert	ac_retval=1
1546076b9443SCy Schubertfi
1547076b9443SCy Schubert  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1548076b9443SCy Schubert  as_fn_set_status $ac_retval
1549076b9443SCy Schubert
1550076b9443SCy Schubert} # ac_fn_c_try_compile
1551076b9443SCy Schubert
1552076b9443SCy Schubert# ac_fn_c_try_cpp LINENO
1553076b9443SCy Schubert# ----------------------
1554076b9443SCy Schubert# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1555076b9443SCy Schubertac_fn_c_try_cpp ()
1556076b9443SCy Schubert{
1557076b9443SCy Schubert  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1558076b9443SCy Schubert  if { { ac_try="$ac_cpp conftest.$ac_ext"
1559076b9443SCy Schubertcase "(($ac_try" in
1560076b9443SCy Schubert  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1561076b9443SCy Schubert  *) ac_try_echo=$ac_try;;
1562076b9443SCy Schubertesac
1563076b9443SCy Schuberteval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
156470b56f4bSCy Schubertprintf "%s\n" "$ac_try_echo"; } >&5
1565076b9443SCy Schubert  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1566076b9443SCy Schubert  ac_status=$?
1567076b9443SCy Schubert  if test -s conftest.err; then
1568076b9443SCy Schubert    grep -v '^ *+' conftest.err >conftest.er1
1569076b9443SCy Schubert    cat conftest.er1 >&5
1570076b9443SCy Schubert    mv -f conftest.er1 conftest.err
1571076b9443SCy Schubert  fi
157270b56f4bSCy Schubert  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1573076b9443SCy Schubert  test $ac_status = 0; } > conftest.i && {
1574076b9443SCy Schubert	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1575076b9443SCy Schubert	 test ! -s conftest.err
157670b56f4bSCy Schubert       }
157770b56f4bSCy Schubertthen :
1578076b9443SCy Schubert  ac_retval=0
157970b56f4bSCy Schubertelse $as_nop
158070b56f4bSCy Schubert  printf "%s\n" "$as_me: failed program was:" >&5
1581076b9443SCy Schubertsed 's/^/| /' conftest.$ac_ext >&5
1582076b9443SCy Schubert
1583076b9443SCy Schubert    ac_retval=1
1584076b9443SCy Schubertfi
1585076b9443SCy Schubert  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1586076b9443SCy Schubert  as_fn_set_status $ac_retval
1587076b9443SCy Schubert
1588076b9443SCy Schubert} # ac_fn_c_try_cpp
1589076b9443SCy Schubert
1590076b9443SCy Schubert# ac_fn_c_try_run LINENO
1591076b9443SCy Schubert# ----------------------
159270b56f4bSCy Schubert# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
159370b56f4bSCy Schubert# executables *can* be run.
1594076b9443SCy Schubertac_fn_c_try_run ()
1595076b9443SCy Schubert{
1596076b9443SCy Schubert  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1597076b9443SCy Schubert  if { { ac_try="$ac_link"
1598076b9443SCy Schubertcase "(($ac_try" in
1599076b9443SCy Schubert  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1600076b9443SCy Schubert  *) ac_try_echo=$ac_try;;
1601076b9443SCy Schubertesac
1602076b9443SCy Schuberteval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
160370b56f4bSCy Schubertprintf "%s\n" "$ac_try_echo"; } >&5
1604076b9443SCy Schubert  (eval "$ac_link") 2>&5
1605076b9443SCy Schubert  ac_status=$?
160670b56f4bSCy Schubert  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1607076b9443SCy Schubert  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1608076b9443SCy Schubert  { { case "(($ac_try" in
1609076b9443SCy Schubert  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1610076b9443SCy Schubert  *) ac_try_echo=$ac_try;;
1611076b9443SCy Schubertesac
1612076b9443SCy Schuberteval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
161370b56f4bSCy Schubertprintf "%s\n" "$ac_try_echo"; } >&5
1614076b9443SCy Schubert  (eval "$ac_try") 2>&5
1615076b9443SCy Schubert  ac_status=$?
161670b56f4bSCy Schubert  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
161770b56f4bSCy Schubert  test $ac_status = 0; }; }
161870b56f4bSCy Schubertthen :
1619076b9443SCy Schubert  ac_retval=0
162070b56f4bSCy Schubertelse $as_nop
162170b56f4bSCy Schubert  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
162270b56f4bSCy Schubert       printf "%s\n" "$as_me: failed program was:" >&5
1623076b9443SCy Schubertsed 's/^/| /' conftest.$ac_ext >&5
1624076b9443SCy Schubert
1625076b9443SCy Schubert       ac_retval=$ac_status
1626076b9443SCy Schubertfi
1627076b9443SCy Schubert  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1628076b9443SCy Schubert  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1629076b9443SCy Schubert  as_fn_set_status $ac_retval
1630076b9443SCy Schubert
1631076b9443SCy Schubert} # ac_fn_c_try_run
1632076b9443SCy Schubert
1633076b9443SCy Schubert# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1634076b9443SCy Schubert# -------------------------------------------------------
1635076b9443SCy Schubert# Tests whether HEADER exists and can be compiled using the include files in
1636076b9443SCy Schubert# INCLUDES, setting the cache variable VAR accordingly.
1637076b9443SCy Schubertac_fn_c_check_header_compile ()
1638076b9443SCy Schubert{
1639076b9443SCy Schubert  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
164070b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
164170b56f4bSCy Schubertprintf %s "checking for $2... " >&6; }
164270b56f4bSCy Schubertif eval test \${$3+y}
164370b56f4bSCy Schubertthen :
164470b56f4bSCy Schubert  printf %s "(cached) " >&6
164570b56f4bSCy Schubertelse $as_nop
1646076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1647076b9443SCy Schubert/* end confdefs.h.  */
1648076b9443SCy Schubert$4
1649076b9443SCy Schubert#include <$2>
1650076b9443SCy Schubert_ACEOF
165170b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
165270b56f4bSCy Schubertthen :
1653076b9443SCy Schubert  eval "$3=yes"
165470b56f4bSCy Schubertelse $as_nop
1655076b9443SCy Schubert  eval "$3=no"
1656076b9443SCy Schubertfi
165770b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1658076b9443SCy Schubertfi
1659076b9443SCy Schuberteval ac_res=\$$3
166070b56f4bSCy Schubert	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
166170b56f4bSCy Schubertprintf "%s\n" "$ac_res" >&6; }
1662076b9443SCy Schubert  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1663076b9443SCy Schubert
1664076b9443SCy Schubert} # ac_fn_c_check_header_compile
1665076b9443SCy Schubert
1666076b9443SCy Schubert# ac_fn_c_try_link LINENO
1667076b9443SCy Schubert# -----------------------
1668076b9443SCy Schubert# Try to link conftest.$ac_ext, and return whether this succeeded.
1669076b9443SCy Schubertac_fn_c_try_link ()
1670076b9443SCy Schubert{
1671076b9443SCy Schubert  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
167270b56f4bSCy Schubert  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1673076b9443SCy Schubert  if { { ac_try="$ac_link"
1674076b9443SCy Schubertcase "(($ac_try" in
1675076b9443SCy Schubert  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1676076b9443SCy Schubert  *) ac_try_echo=$ac_try;;
1677076b9443SCy Schubertesac
1678076b9443SCy Schuberteval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
167970b56f4bSCy Schubertprintf "%s\n" "$ac_try_echo"; } >&5
1680076b9443SCy Schubert  (eval "$ac_link") 2>conftest.err
1681076b9443SCy Schubert  ac_status=$?
1682076b9443SCy Schubert  if test -s conftest.err; then
1683076b9443SCy Schubert    grep -v '^ *+' conftest.err >conftest.er1
1684076b9443SCy Schubert    cat conftest.er1 >&5
1685076b9443SCy Schubert    mv -f conftest.er1 conftest.err
1686076b9443SCy Schubert  fi
168770b56f4bSCy Schubert  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1688076b9443SCy Schubert  test $ac_status = 0; } && {
1689076b9443SCy Schubert	 test -z "$ac_c_werror_flag" ||
1690076b9443SCy Schubert	 test ! -s conftest.err
1691076b9443SCy Schubert       } && test -s conftest$ac_exeext && {
1692076b9443SCy Schubert	 test "$cross_compiling" = yes ||
1693076b9443SCy Schubert	 test -x conftest$ac_exeext
169470b56f4bSCy Schubert       }
169570b56f4bSCy Schubertthen :
1696076b9443SCy Schubert  ac_retval=0
169770b56f4bSCy Schubertelse $as_nop
169870b56f4bSCy Schubert  printf "%s\n" "$as_me: failed program was:" >&5
1699076b9443SCy Schubertsed 's/^/| /' conftest.$ac_ext >&5
1700076b9443SCy Schubert
1701076b9443SCy Schubert	ac_retval=1
1702076b9443SCy Schubertfi
1703076b9443SCy Schubert  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1704076b9443SCy Schubert  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1705076b9443SCy Schubert  # interfere with the next link command; also delete a directory that is
1706076b9443SCy Schubert  # left behind by Apple's compiler.  We do this before executing the actions.
1707076b9443SCy Schubert  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1708076b9443SCy Schubert  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709076b9443SCy Schubert  as_fn_set_status $ac_retval
1710076b9443SCy Schubert
1711076b9443SCy Schubert} # ac_fn_c_try_link
1712076b9443SCy Schubert
1713076b9443SCy Schubert# ac_fn_c_check_func LINENO FUNC VAR
1714076b9443SCy Schubert# ----------------------------------
1715076b9443SCy Schubert# Tests whether FUNC exists, setting the cache variable VAR accordingly
1716076b9443SCy Schubertac_fn_c_check_func ()
1717076b9443SCy Schubert{
1718076b9443SCy Schubert  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
171970b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
172070b56f4bSCy Schubertprintf %s "checking for $2... " >&6; }
172170b56f4bSCy Schubertif eval test \${$3+y}
172270b56f4bSCy Schubertthen :
172370b56f4bSCy Schubert  printf %s "(cached) " >&6
172470b56f4bSCy Schubertelse $as_nop
1725076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1726076b9443SCy Schubert/* end confdefs.h.  */
1727076b9443SCy Schubert/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1728076b9443SCy Schubert   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1729076b9443SCy Schubert#define $2 innocuous_$2
1730076b9443SCy Schubert
1731076b9443SCy Schubert/* System header to define __stub macros and hopefully few prototypes,
173270b56f4bSCy Schubert   which can conflict with char $2 (); below.  */
1733076b9443SCy Schubert
1734076b9443SCy Schubert#include <limits.h>
1735076b9443SCy Schubert#undef $2
1736076b9443SCy Schubert
1737076b9443SCy Schubert/* Override any GCC internal prototype to avoid an error.
1738076b9443SCy Schubert   Use char because int might match the return type of a GCC
1739076b9443SCy Schubert   builtin and then its argument prototype would still apply.  */
1740076b9443SCy Schubert#ifdef __cplusplus
1741076b9443SCy Schubertextern "C"
1742076b9443SCy Schubert#endif
1743076b9443SCy Schubertchar $2 ();
1744076b9443SCy Schubert/* The GNU C library defines this for functions which it implements
1745076b9443SCy Schubert    to always fail with ENOSYS.  Some functions are actually named
1746076b9443SCy Schubert    something starting with __ and the normal name is an alias.  */
1747076b9443SCy Schubert#if defined __stub_$2 || defined __stub___$2
1748076b9443SCy Schubertchoke me
1749076b9443SCy Schubert#endif
1750076b9443SCy Schubert
1751076b9443SCy Schubertint
175270b56f4bSCy Schubertmain (void)
1753076b9443SCy Schubert{
1754076b9443SCy Schubertreturn $2 ();
1755076b9443SCy Schubert  ;
1756076b9443SCy Schubert  return 0;
1757076b9443SCy Schubert}
1758076b9443SCy Schubert_ACEOF
175970b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
176070b56f4bSCy Schubertthen :
1761076b9443SCy Schubert  eval "$3=yes"
176270b56f4bSCy Schubertelse $as_nop
1763076b9443SCy Schubert  eval "$3=no"
1764076b9443SCy Schubertfi
176570b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
1766076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
1767076b9443SCy Schubertfi
1768076b9443SCy Schuberteval ac_res=\$$3
176970b56f4bSCy Schubert	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
177070b56f4bSCy Schubertprintf "%s\n" "$ac_res" >&6; }
1771076b9443SCy Schubert  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1772076b9443SCy Schubert
1773076b9443SCy Schubert} # ac_fn_c_check_func
177470b56f4bSCy Schubertac_configure_args_raw=
177570b56f4bSCy Schubertfor ac_arg
177670b56f4bSCy Schubertdo
177770b56f4bSCy Schubert  case $ac_arg in
177870b56f4bSCy Schubert  *\'*)
177970b56f4bSCy Schubert    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
178070b56f4bSCy Schubert  esac
178170b56f4bSCy Schubert  as_fn_append ac_configure_args_raw " '$ac_arg'"
178270b56f4bSCy Schubertdone
178370b56f4bSCy Schubert
178470b56f4bSCy Schubertcase $ac_configure_args_raw in
178570b56f4bSCy Schubert  *$as_nl*)
178670b56f4bSCy Schubert    ac_safe_unquote= ;;
178770b56f4bSCy Schubert  *)
178870b56f4bSCy Schubert    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
178970b56f4bSCy Schubert    ac_unsafe_a="$ac_unsafe_z#~"
179070b56f4bSCy Schubert    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
179170b56f4bSCy Schubert    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
179270b56f4bSCy Schubertesac
179370b56f4bSCy Schubert
1794076b9443SCy Schubertcat >config.log <<_ACEOF
1795076b9443SCy SchubertThis file contains any messages produced by compilers while
1796076b9443SCy Schubertrunning configure, to aid debugging if configure makes a mistake.
1797076b9443SCy Schubert
1798*de946883SCy SchubertIt was created by sqlite $as_me 3.46.1, which was
179970b56f4bSCy Schubertgenerated by GNU Autoconf 2.71.  Invocation command line was
1800076b9443SCy Schubert
180170b56f4bSCy Schubert  $ $0$ac_configure_args_raw
1802076b9443SCy Schubert
1803076b9443SCy Schubert_ACEOF
1804076b9443SCy Schubertexec 5>>config.log
1805076b9443SCy Schubert{
1806076b9443SCy Schubertcat <<_ASUNAME
1807076b9443SCy Schubert## --------- ##
1808076b9443SCy Schubert## Platform. ##
1809076b9443SCy Schubert## --------- ##
1810076b9443SCy Schubert
1811076b9443SCy Schuberthostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1812076b9443SCy Schubertuname -m = `(uname -m) 2>/dev/null || echo unknown`
1813076b9443SCy Schubertuname -r = `(uname -r) 2>/dev/null || echo unknown`
1814076b9443SCy Schubertuname -s = `(uname -s) 2>/dev/null || echo unknown`
1815076b9443SCy Schubertuname -v = `(uname -v) 2>/dev/null || echo unknown`
1816076b9443SCy Schubert
1817076b9443SCy Schubert/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1818076b9443SCy Schubert/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1819076b9443SCy Schubert
1820076b9443SCy Schubert/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1821076b9443SCy Schubert/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1822076b9443SCy Schubert/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1823076b9443SCy Schubert/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1824076b9443SCy Schubert/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1825076b9443SCy Schubert/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1826076b9443SCy Schubert/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1827076b9443SCy Schubert
1828076b9443SCy Schubert_ASUNAME
1829076b9443SCy Schubert
1830076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1831076b9443SCy Schubertfor as_dir in $PATH
1832076b9443SCy Schubertdo
1833076b9443SCy Schubert  IFS=$as_save_IFS
183470b56f4bSCy Schubert  case $as_dir in #(((
183570b56f4bSCy Schubert    '') as_dir=./ ;;
183670b56f4bSCy Schubert    */) ;;
183770b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
183870b56f4bSCy Schubert  esac
183970b56f4bSCy Schubert    printf "%s\n" "PATH: $as_dir"
1840076b9443SCy Schubert  done
1841076b9443SCy SchubertIFS=$as_save_IFS
1842076b9443SCy Schubert
1843076b9443SCy Schubert} >&5
1844076b9443SCy Schubert
1845076b9443SCy Schubertcat >&5 <<_ACEOF
1846076b9443SCy Schubert
1847076b9443SCy Schubert
1848076b9443SCy Schubert## ----------- ##
1849076b9443SCy Schubert## Core tests. ##
1850076b9443SCy Schubert## ----------- ##
1851076b9443SCy Schubert
1852076b9443SCy Schubert_ACEOF
1853076b9443SCy Schubert
1854076b9443SCy Schubert
1855076b9443SCy Schubert# Keep a trace of the command line.
1856076b9443SCy Schubert# Strip out --no-create and --no-recursion so they do not pile up.
1857076b9443SCy Schubert# Strip out --silent because we don't want to record it for future runs.
1858076b9443SCy Schubert# Also quote any args containing shell meta-characters.
1859076b9443SCy Schubert# Make two passes to allow for proper duplicate-argument suppression.
1860076b9443SCy Schubertac_configure_args=
1861076b9443SCy Schubertac_configure_args0=
1862076b9443SCy Schubertac_configure_args1=
1863076b9443SCy Schubertac_must_keep_next=false
1864076b9443SCy Schubertfor ac_pass in 1 2
1865076b9443SCy Schubertdo
1866076b9443SCy Schubert  for ac_arg
1867076b9443SCy Schubert  do
1868076b9443SCy Schubert    case $ac_arg in
1869076b9443SCy Schubert    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1870076b9443SCy Schubert    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1871076b9443SCy Schubert    | -silent | --silent | --silen | --sile | --sil)
1872076b9443SCy Schubert      continue ;;
1873076b9443SCy Schubert    *\'*)
187470b56f4bSCy Schubert      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1875076b9443SCy Schubert    esac
1876076b9443SCy Schubert    case $ac_pass in
1877076b9443SCy Schubert    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1878076b9443SCy Schubert    2)
1879076b9443SCy Schubert      as_fn_append ac_configure_args1 " '$ac_arg'"
1880076b9443SCy Schubert      if test $ac_must_keep_next = true; then
1881076b9443SCy Schubert	ac_must_keep_next=false # Got value, back to normal.
1882076b9443SCy Schubert      else
1883076b9443SCy Schubert	case $ac_arg in
1884076b9443SCy Schubert	  *=* | --config-cache | -C | -disable-* | --disable-* \
1885076b9443SCy Schubert	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1886076b9443SCy Schubert	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1887076b9443SCy Schubert	  | -with-* | --with-* | -without-* | --without-* | --x)
1888076b9443SCy Schubert	    case "$ac_configure_args0 " in
1889076b9443SCy Schubert	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1890076b9443SCy Schubert	    esac
1891076b9443SCy Schubert	    ;;
1892076b9443SCy Schubert	  -* ) ac_must_keep_next=true ;;
1893076b9443SCy Schubert	esac
1894076b9443SCy Schubert      fi
1895076b9443SCy Schubert      as_fn_append ac_configure_args " '$ac_arg'"
1896076b9443SCy Schubert      ;;
1897076b9443SCy Schubert    esac
1898076b9443SCy Schubert  done
1899076b9443SCy Schubertdone
1900076b9443SCy Schubert{ ac_configure_args0=; unset ac_configure_args0;}
1901076b9443SCy Schubert{ ac_configure_args1=; unset ac_configure_args1;}
1902076b9443SCy Schubert
1903076b9443SCy Schubert# When interrupted or exit'd, cleanup temporary files, and complete
1904076b9443SCy Schubert# config.log.  We remove comments because anyway the quotes in there
1905076b9443SCy Schubert# would cause problems or look ugly.
1906076b9443SCy Schubert# WARNING: Use '\'' to represent an apostrophe within the trap.
1907076b9443SCy Schubert# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1908076b9443SCy Schuberttrap 'exit_status=$?
190970b56f4bSCy Schubert  # Sanitize IFS.
191070b56f4bSCy Schubert  IFS=" ""	$as_nl"
1911076b9443SCy Schubert  # Save into config.log some information that might help in debugging.
1912076b9443SCy Schubert  {
1913076b9443SCy Schubert    echo
1914076b9443SCy Schubert
191570b56f4bSCy Schubert    printf "%s\n" "## ---------------- ##
1916076b9443SCy Schubert## Cache variables. ##
1917076b9443SCy Schubert## ---------------- ##"
1918076b9443SCy Schubert    echo
1919076b9443SCy Schubert    # The following way of writing the cache mishandles newlines in values,
1920076b9443SCy Schubert(
1921076b9443SCy Schubert  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1922076b9443SCy Schubert    eval ac_val=\$$ac_var
1923076b9443SCy Schubert    case $ac_val in #(
1924076b9443SCy Schubert    *${as_nl}*)
1925076b9443SCy Schubert      case $ac_var in #(
192670b56f4bSCy Schubert      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
192770b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1928076b9443SCy Schubert      esac
1929076b9443SCy Schubert      case $ac_var in #(
1930076b9443SCy Schubert      _ | IFS | as_nl) ;; #(
1931076b9443SCy Schubert      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1932076b9443SCy Schubert      *) { eval $ac_var=; unset $ac_var;} ;;
1933076b9443SCy Schubert      esac ;;
1934076b9443SCy Schubert    esac
1935076b9443SCy Schubert  done
1936076b9443SCy Schubert  (set) 2>&1 |
1937076b9443SCy Schubert    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1938076b9443SCy Schubert    *${as_nl}ac_space=\ *)
1939076b9443SCy Schubert      sed -n \
1940076b9443SCy Schubert	"s/'\''/'\''\\\\'\'''\''/g;
1941076b9443SCy Schubert	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1942076b9443SCy Schubert      ;; #(
1943076b9443SCy Schubert    *)
1944076b9443SCy Schubert      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1945076b9443SCy Schubert      ;;
1946076b9443SCy Schubert    esac |
1947076b9443SCy Schubert    sort
1948076b9443SCy Schubert)
1949076b9443SCy Schubert    echo
1950076b9443SCy Schubert
195170b56f4bSCy Schubert    printf "%s\n" "## ----------------- ##
1952076b9443SCy Schubert## Output variables. ##
1953076b9443SCy Schubert## ----------------- ##"
1954076b9443SCy Schubert    echo
1955076b9443SCy Schubert    for ac_var in $ac_subst_vars
1956076b9443SCy Schubert    do
1957076b9443SCy Schubert      eval ac_val=\$$ac_var
1958076b9443SCy Schubert      case $ac_val in
195970b56f4bSCy Schubert      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1960076b9443SCy Schubert      esac
196170b56f4bSCy Schubert      printf "%s\n" "$ac_var='\''$ac_val'\''"
1962076b9443SCy Schubert    done | sort
1963076b9443SCy Schubert    echo
1964076b9443SCy Schubert
1965076b9443SCy Schubert    if test -n "$ac_subst_files"; then
196670b56f4bSCy Schubert      printf "%s\n" "## ------------------- ##
1967076b9443SCy Schubert## File substitutions. ##
1968076b9443SCy Schubert## ------------------- ##"
1969076b9443SCy Schubert      echo
1970076b9443SCy Schubert      for ac_var in $ac_subst_files
1971076b9443SCy Schubert      do
1972076b9443SCy Schubert	eval ac_val=\$$ac_var
1973076b9443SCy Schubert	case $ac_val in
197470b56f4bSCy Schubert	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1975076b9443SCy Schubert	esac
197670b56f4bSCy Schubert	printf "%s\n" "$ac_var='\''$ac_val'\''"
1977076b9443SCy Schubert      done | sort
1978076b9443SCy Schubert      echo
1979076b9443SCy Schubert    fi
1980076b9443SCy Schubert
1981076b9443SCy Schubert    if test -s confdefs.h; then
198270b56f4bSCy Schubert      printf "%s\n" "## ----------- ##
1983076b9443SCy Schubert## confdefs.h. ##
1984076b9443SCy Schubert## ----------- ##"
1985076b9443SCy Schubert      echo
1986076b9443SCy Schubert      cat confdefs.h
1987076b9443SCy Schubert      echo
1988076b9443SCy Schubert    fi
1989076b9443SCy Schubert    test "$ac_signal" != 0 &&
199070b56f4bSCy Schubert      printf "%s\n" "$as_me: caught signal $ac_signal"
199170b56f4bSCy Schubert    printf "%s\n" "$as_me: exit $exit_status"
1992076b9443SCy Schubert  } >&5
1993076b9443SCy Schubert  rm -f core *.core core.conftest.* &&
1994076b9443SCy Schubert    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1995076b9443SCy Schubert    exit $exit_status
1996076b9443SCy Schubert' 0
1997076b9443SCy Schubertfor ac_signal in 1 2 13 15; do
1998076b9443SCy Schubert  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
1999076b9443SCy Schubertdone
2000076b9443SCy Schubertac_signal=0
2001076b9443SCy Schubert
2002076b9443SCy Schubert# confdefs.h avoids OS command line length limits that DEFS can exceed.
2003076b9443SCy Schubertrm -f -r conftest* confdefs.h
2004076b9443SCy Schubert
200570b56f4bSCy Schubertprintf "%s\n" "/* confdefs.h */" > confdefs.h
2006076b9443SCy Schubert
2007076b9443SCy Schubert# Predefined preprocessor variables.
2008076b9443SCy Schubert
200970b56f4bSCy Schubertprintf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2010076b9443SCy Schubert
201170b56f4bSCy Schubertprintf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2012076b9443SCy Schubert
201370b56f4bSCy Schubertprintf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2014076b9443SCy Schubert
201570b56f4bSCy Schubertprintf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2016076b9443SCy Schubert
201770b56f4bSCy Schubertprintf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2018076b9443SCy Schubert
201970b56f4bSCy Schubertprintf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2020076b9443SCy Schubert
2021076b9443SCy Schubert
2022076b9443SCy Schubert# Let the site file select an alternate cache file if it wants to.
2023076b9443SCy Schubert# Prefer an explicitly selected file to automatically selected ones.
2024076b9443SCy Schubertif test -n "$CONFIG_SITE"; then
202570b56f4bSCy Schubert  ac_site_files="$CONFIG_SITE"
2026076b9443SCy Schubertelif test "x$prefix" != xNONE; then
202770b56f4bSCy Schubert  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2028076b9443SCy Schubertelse
202970b56f4bSCy Schubert  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2030076b9443SCy Schubertfi
203170b56f4bSCy Schubert
203270b56f4bSCy Schubertfor ac_site_file in $ac_site_files
2033076b9443SCy Schubertdo
203470b56f4bSCy Schubert  case $ac_site_file in #(
203570b56f4bSCy Schubert  */*) :
203670b56f4bSCy Schubert     ;; #(
203770b56f4bSCy Schubert  *) :
203870b56f4bSCy Schubert    ac_site_file=./$ac_site_file ;;
203970b56f4bSCy Schubertesac
204070b56f4bSCy Schubert  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
204170b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
204270b56f4bSCy Schubertprintf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2043076b9443SCy Schubert    sed 's/^/| /' "$ac_site_file" >&5
2044076b9443SCy Schubert    . "$ac_site_file" \
204570b56f4bSCy Schubert      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
204670b56f4bSCy Schubertprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2047076b9443SCy Schubertas_fn_error $? "failed to load site script $ac_site_file
2048076b9443SCy SchubertSee \`config.log' for more details" "$LINENO" 5; }
2049076b9443SCy Schubert  fi
2050076b9443SCy Schubertdone
2051076b9443SCy Schubert
2052076b9443SCy Schubertif test -r "$cache_file"; then
2053076b9443SCy Schubert  # Some versions of bash will fail to source /dev/null (special files
2054076b9443SCy Schubert  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2055076b9443SCy Schubert  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
205670b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
205770b56f4bSCy Schubertprintf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2058076b9443SCy Schubert    case $cache_file in
2059076b9443SCy Schubert      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2060076b9443SCy Schubert      *)                      . "./$cache_file";;
2061076b9443SCy Schubert    esac
2062076b9443SCy Schubert  fi
2063076b9443SCy Schubertelse
206470b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
206570b56f4bSCy Schubertprintf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2066076b9443SCy Schubert  >$cache_file
2067076b9443SCy Schubertfi
2068076b9443SCy Schubert
206970b56f4bSCy Schubert# Test code for whether the C compiler supports C89 (global declarations)
207070b56f4bSCy Schubertac_c_conftest_c89_globals='
207170b56f4bSCy Schubert/* Does the compiler advertise C89 conformance?
207270b56f4bSCy Schubert   Do not test the value of __STDC__, because some compilers set it to 0
207370b56f4bSCy Schubert   while being otherwise adequately conformant. */
207470b56f4bSCy Schubert#if !defined __STDC__
207570b56f4bSCy Schubert# error "Compiler does not advertise C89 conformance"
207670b56f4bSCy Schubert#endif
207770b56f4bSCy Schubert
207870b56f4bSCy Schubert#include <stddef.h>
207970b56f4bSCy Schubert#include <stdarg.h>
208070b56f4bSCy Schubertstruct stat;
208170b56f4bSCy Schubert/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
208270b56f4bSCy Schubertstruct buf { int x; };
208370b56f4bSCy Schubertstruct buf * (*rcsopen) (struct buf *, struct stat *, int);
208470b56f4bSCy Schubertstatic char *e (p, i)
208570b56f4bSCy Schubert     char **p;
208670b56f4bSCy Schubert     int i;
208770b56f4bSCy Schubert{
208870b56f4bSCy Schubert  return p[i];
208970b56f4bSCy Schubert}
209070b56f4bSCy Schubertstatic char *f (char * (*g) (char **, int), char **p, ...)
209170b56f4bSCy Schubert{
209270b56f4bSCy Schubert  char *s;
209370b56f4bSCy Schubert  va_list v;
209470b56f4bSCy Schubert  va_start (v,p);
209570b56f4bSCy Schubert  s = g (p, va_arg (v,int));
209670b56f4bSCy Schubert  va_end (v);
209770b56f4bSCy Schubert  return s;
209870b56f4bSCy Schubert}
209970b56f4bSCy Schubert
210070b56f4bSCy Schubert/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
210170b56f4bSCy Schubert   function prototypes and stuff, but not \xHH hex character constants.
210270b56f4bSCy Schubert   These do not provoke an error unfortunately, instead are silently treated
210370b56f4bSCy Schubert   as an "x".  The following induces an error, until -std is added to get
210470b56f4bSCy Schubert   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
210570b56f4bSCy Schubert   array size at least.  It is necessary to write \x00 == 0 to get something
210670b56f4bSCy Schubert   that is true only with -std.  */
210770b56f4bSCy Schubertint osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
210870b56f4bSCy Schubert
210970b56f4bSCy Schubert/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
211070b56f4bSCy Schubert   inside strings and character constants.  */
211170b56f4bSCy Schubert#define FOO(x) '\''x'\''
211270b56f4bSCy Schubertint xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
211370b56f4bSCy Schubert
211470b56f4bSCy Schubertint test (int i, double x);
211570b56f4bSCy Schubertstruct s1 {int (*f) (int a);};
211670b56f4bSCy Schubertstruct s2 {int (*f) (double a);};
211770b56f4bSCy Schubertint pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
211870b56f4bSCy Schubert               int, int);'
211970b56f4bSCy Schubert
212070b56f4bSCy Schubert# Test code for whether the C compiler supports C89 (body of main).
212170b56f4bSCy Schubertac_c_conftest_c89_main='
212270b56f4bSCy Schubertok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
212370b56f4bSCy Schubert'
212470b56f4bSCy Schubert
212570b56f4bSCy Schubert# Test code for whether the C compiler supports C99 (global declarations)
212670b56f4bSCy Schubertac_c_conftest_c99_globals='
212770b56f4bSCy Schubert// Does the compiler advertise C99 conformance?
212870b56f4bSCy Schubert#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
212970b56f4bSCy Schubert# error "Compiler does not advertise C99 conformance"
213070b56f4bSCy Schubert#endif
213170b56f4bSCy Schubert
213270b56f4bSCy Schubert#include <stdbool.h>
213370b56f4bSCy Schubertextern int puts (const char *);
213470b56f4bSCy Schubertextern int printf (const char *, ...);
213570b56f4bSCy Schubertextern int dprintf (int, const char *, ...);
213670b56f4bSCy Schubertextern void *malloc (size_t);
213770b56f4bSCy Schubert
213870b56f4bSCy Schubert// Check varargs macros.  These examples are taken from C99 6.10.3.5.
213970b56f4bSCy Schubert// dprintf is used instead of fprintf to avoid needing to declare
214070b56f4bSCy Schubert// FILE and stderr.
214170b56f4bSCy Schubert#define debug(...) dprintf (2, __VA_ARGS__)
214270b56f4bSCy Schubert#define showlist(...) puts (#__VA_ARGS__)
214370b56f4bSCy Schubert#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
214470b56f4bSCy Schubertstatic void
214570b56f4bSCy Schuberttest_varargs_macros (void)
214670b56f4bSCy Schubert{
214770b56f4bSCy Schubert  int x = 1234;
214870b56f4bSCy Schubert  int y = 5678;
214970b56f4bSCy Schubert  debug ("Flag");
215070b56f4bSCy Schubert  debug ("X = %d\n", x);
215170b56f4bSCy Schubert  showlist (The first, second, and third items.);
215270b56f4bSCy Schubert  report (x>y, "x is %d but y is %d", x, y);
215370b56f4bSCy Schubert}
215470b56f4bSCy Schubert
215570b56f4bSCy Schubert// Check long long types.
215670b56f4bSCy Schubert#define BIG64 18446744073709551615ull
215770b56f4bSCy Schubert#define BIG32 4294967295ul
215870b56f4bSCy Schubert#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
215970b56f4bSCy Schubert#if !BIG_OK
216070b56f4bSCy Schubert  #error "your preprocessor is broken"
216170b56f4bSCy Schubert#endif
216270b56f4bSCy Schubert#if BIG_OK
216370b56f4bSCy Schubert#else
216470b56f4bSCy Schubert  #error "your preprocessor is broken"
216570b56f4bSCy Schubert#endif
216670b56f4bSCy Schubertstatic long long int bignum = -9223372036854775807LL;
216770b56f4bSCy Schubertstatic unsigned long long int ubignum = BIG64;
216870b56f4bSCy Schubert
216970b56f4bSCy Schubertstruct incomplete_array
217070b56f4bSCy Schubert{
217170b56f4bSCy Schubert  int datasize;
217270b56f4bSCy Schubert  double data[];
217370b56f4bSCy Schubert};
217470b56f4bSCy Schubert
217570b56f4bSCy Schubertstruct named_init {
217670b56f4bSCy Schubert  int number;
217770b56f4bSCy Schubert  const wchar_t *name;
217870b56f4bSCy Schubert  double average;
217970b56f4bSCy Schubert};
218070b56f4bSCy Schubert
218170b56f4bSCy Schuberttypedef const char *ccp;
218270b56f4bSCy Schubert
218370b56f4bSCy Schubertstatic inline int
218470b56f4bSCy Schuberttest_restrict (ccp restrict text)
218570b56f4bSCy Schubert{
218670b56f4bSCy Schubert  // See if C++-style comments work.
218770b56f4bSCy Schubert  // Iterate through items via the restricted pointer.
218870b56f4bSCy Schubert  // Also check for declarations in for loops.
218970b56f4bSCy Schubert  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
219070b56f4bSCy Schubert    continue;
219170b56f4bSCy Schubert  return 0;
219270b56f4bSCy Schubert}
219370b56f4bSCy Schubert
219470b56f4bSCy Schubert// Check varargs and va_copy.
219570b56f4bSCy Schubertstatic bool
219670b56f4bSCy Schuberttest_varargs (const char *format, ...)
219770b56f4bSCy Schubert{
219870b56f4bSCy Schubert  va_list args;
219970b56f4bSCy Schubert  va_start (args, format);
220070b56f4bSCy Schubert  va_list args_copy;
220170b56f4bSCy Schubert  va_copy (args_copy, args);
220270b56f4bSCy Schubert
220370b56f4bSCy Schubert  const char *str = "";
220470b56f4bSCy Schubert  int number = 0;
220570b56f4bSCy Schubert  float fnumber = 0;
220670b56f4bSCy Schubert
220770b56f4bSCy Schubert  while (*format)
220870b56f4bSCy Schubert    {
220970b56f4bSCy Schubert      switch (*format++)
221070b56f4bSCy Schubert	{
221170b56f4bSCy Schubert	case '\''s'\'': // string
221270b56f4bSCy Schubert	  str = va_arg (args_copy, const char *);
221370b56f4bSCy Schubert	  break;
221470b56f4bSCy Schubert	case '\''d'\'': // int
221570b56f4bSCy Schubert	  number = va_arg (args_copy, int);
221670b56f4bSCy Schubert	  break;
221770b56f4bSCy Schubert	case '\''f'\'': // float
221870b56f4bSCy Schubert	  fnumber = va_arg (args_copy, double);
221970b56f4bSCy Schubert	  break;
222070b56f4bSCy Schubert	default:
222170b56f4bSCy Schubert	  break;
222270b56f4bSCy Schubert	}
222370b56f4bSCy Schubert    }
222470b56f4bSCy Schubert  va_end (args_copy);
222570b56f4bSCy Schubert  va_end (args);
222670b56f4bSCy Schubert
222770b56f4bSCy Schubert  return *str && number && fnumber;
222870b56f4bSCy Schubert}
222970b56f4bSCy Schubert'
223070b56f4bSCy Schubert
223170b56f4bSCy Schubert# Test code for whether the C compiler supports C99 (body of main).
223270b56f4bSCy Schubertac_c_conftest_c99_main='
223370b56f4bSCy Schubert  // Check bool.
223470b56f4bSCy Schubert  _Bool success = false;
223570b56f4bSCy Schubert  success |= (argc != 0);
223670b56f4bSCy Schubert
223770b56f4bSCy Schubert  // Check restrict.
223870b56f4bSCy Schubert  if (test_restrict ("String literal") == 0)
223970b56f4bSCy Schubert    success = true;
224070b56f4bSCy Schubert  char *restrict newvar = "Another string";
224170b56f4bSCy Schubert
224270b56f4bSCy Schubert  // Check varargs.
224370b56f4bSCy Schubert  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
224470b56f4bSCy Schubert  test_varargs_macros ();
224570b56f4bSCy Schubert
224670b56f4bSCy Schubert  // Check flexible array members.
224770b56f4bSCy Schubert  struct incomplete_array *ia =
224870b56f4bSCy Schubert    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
224970b56f4bSCy Schubert  ia->datasize = 10;
225070b56f4bSCy Schubert  for (int i = 0; i < ia->datasize; ++i)
225170b56f4bSCy Schubert    ia->data[i] = i * 1.234;
225270b56f4bSCy Schubert
225370b56f4bSCy Schubert  // Check named initializers.
225470b56f4bSCy Schubert  struct named_init ni = {
225570b56f4bSCy Schubert    .number = 34,
225670b56f4bSCy Schubert    .name = L"Test wide string",
225770b56f4bSCy Schubert    .average = 543.34343,
225870b56f4bSCy Schubert  };
225970b56f4bSCy Schubert
226070b56f4bSCy Schubert  ni.number = 58;
226170b56f4bSCy Schubert
226270b56f4bSCy Schubert  int dynamic_array[ni.number];
226370b56f4bSCy Schubert  dynamic_array[0] = argv[0][0];
226470b56f4bSCy Schubert  dynamic_array[ni.number - 1] = 543;
226570b56f4bSCy Schubert
226670b56f4bSCy Schubert  // work around unused variable warnings
226770b56f4bSCy Schubert  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
226870b56f4bSCy Schubert	 || dynamic_array[ni.number - 1] != 543);
226970b56f4bSCy Schubert'
227070b56f4bSCy Schubert
227170b56f4bSCy Schubert# Test code for whether the C compiler supports C11 (global declarations)
227270b56f4bSCy Schubertac_c_conftest_c11_globals='
227370b56f4bSCy Schubert// Does the compiler advertise C11 conformance?
227470b56f4bSCy Schubert#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
227570b56f4bSCy Schubert# error "Compiler does not advertise C11 conformance"
227670b56f4bSCy Schubert#endif
227770b56f4bSCy Schubert
227870b56f4bSCy Schubert// Check _Alignas.
227970b56f4bSCy Schubertchar _Alignas (double) aligned_as_double;
228070b56f4bSCy Schubertchar _Alignas (0) no_special_alignment;
228170b56f4bSCy Schubertextern char aligned_as_int;
228270b56f4bSCy Schubertchar _Alignas (0) _Alignas (int) aligned_as_int;
228370b56f4bSCy Schubert
228470b56f4bSCy Schubert// Check _Alignof.
228570b56f4bSCy Schubertenum
228670b56f4bSCy Schubert{
228770b56f4bSCy Schubert  int_alignment = _Alignof (int),
228870b56f4bSCy Schubert  int_array_alignment = _Alignof (int[100]),
228970b56f4bSCy Schubert  char_alignment = _Alignof (char)
229070b56f4bSCy Schubert};
229170b56f4bSCy Schubert_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
229270b56f4bSCy Schubert
229370b56f4bSCy Schubert// Check _Noreturn.
229470b56f4bSCy Schubertint _Noreturn does_not_return (void) { for (;;) continue; }
229570b56f4bSCy Schubert
229670b56f4bSCy Schubert// Check _Static_assert.
229770b56f4bSCy Schubertstruct test_static_assert
229870b56f4bSCy Schubert{
229970b56f4bSCy Schubert  int x;
230070b56f4bSCy Schubert  _Static_assert (sizeof (int) <= sizeof (long int),
230170b56f4bSCy Schubert                  "_Static_assert does not work in struct");
230270b56f4bSCy Schubert  long int y;
230370b56f4bSCy Schubert};
230470b56f4bSCy Schubert
230570b56f4bSCy Schubert// Check UTF-8 literals.
230670b56f4bSCy Schubert#define u8 syntax error!
230770b56f4bSCy Schubertchar const utf8_literal[] = u8"happens to be ASCII" "another string";
230870b56f4bSCy Schubert
230970b56f4bSCy Schubert// Check duplicate typedefs.
231070b56f4bSCy Schuberttypedef long *long_ptr;
231170b56f4bSCy Schuberttypedef long int *long_ptr;
231270b56f4bSCy Schuberttypedef long_ptr long_ptr;
231370b56f4bSCy Schubert
231470b56f4bSCy Schubert// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
231570b56f4bSCy Schubertstruct anonymous
231670b56f4bSCy Schubert{
231770b56f4bSCy Schubert  union {
231870b56f4bSCy Schubert    struct { int i; int j; };
231970b56f4bSCy Schubert    struct { int k; long int l; } w;
232070b56f4bSCy Schubert  };
232170b56f4bSCy Schubert  int m;
232270b56f4bSCy Schubert} v1;
232370b56f4bSCy Schubert'
232470b56f4bSCy Schubert
232570b56f4bSCy Schubert# Test code for whether the C compiler supports C11 (body of main).
232670b56f4bSCy Schubertac_c_conftest_c11_main='
232770b56f4bSCy Schubert  _Static_assert ((offsetof (struct anonymous, i)
232870b56f4bSCy Schubert		   == offsetof (struct anonymous, w.k)),
232970b56f4bSCy Schubert		  "Anonymous union alignment botch");
233070b56f4bSCy Schubert  v1.i = 2;
233170b56f4bSCy Schubert  v1.w.k = 5;
233270b56f4bSCy Schubert  ok |= v1.i != 5;
233370b56f4bSCy Schubert'
233470b56f4bSCy Schubert
233570b56f4bSCy Schubert# Test code for whether the C compiler supports C11 (complete).
233670b56f4bSCy Schubertac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
233770b56f4bSCy Schubert${ac_c_conftest_c99_globals}
233870b56f4bSCy Schubert${ac_c_conftest_c11_globals}
233970b56f4bSCy Schubert
234070b56f4bSCy Schubertint
234170b56f4bSCy Schubertmain (int argc, char **argv)
234270b56f4bSCy Schubert{
234370b56f4bSCy Schubert  int ok = 0;
234470b56f4bSCy Schubert  ${ac_c_conftest_c89_main}
234570b56f4bSCy Schubert  ${ac_c_conftest_c99_main}
234670b56f4bSCy Schubert  ${ac_c_conftest_c11_main}
234770b56f4bSCy Schubert  return ok;
234870b56f4bSCy Schubert}
234970b56f4bSCy Schubert"
235070b56f4bSCy Schubert
235170b56f4bSCy Schubert# Test code for whether the C compiler supports C99 (complete).
235270b56f4bSCy Schubertac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
235370b56f4bSCy Schubert${ac_c_conftest_c99_globals}
235470b56f4bSCy Schubert
235570b56f4bSCy Schubertint
235670b56f4bSCy Schubertmain (int argc, char **argv)
235770b56f4bSCy Schubert{
235870b56f4bSCy Schubert  int ok = 0;
235970b56f4bSCy Schubert  ${ac_c_conftest_c89_main}
236070b56f4bSCy Schubert  ${ac_c_conftest_c99_main}
236170b56f4bSCy Schubert  return ok;
236270b56f4bSCy Schubert}
236370b56f4bSCy Schubert"
236470b56f4bSCy Schubert
236570b56f4bSCy Schubert# Test code for whether the C compiler supports C89 (complete).
236670b56f4bSCy Schubertac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
236770b56f4bSCy Schubert
236870b56f4bSCy Schubertint
236970b56f4bSCy Schubertmain (int argc, char **argv)
237070b56f4bSCy Schubert{
237170b56f4bSCy Schubert  int ok = 0;
237270b56f4bSCy Schubert  ${ac_c_conftest_c89_main}
237370b56f4bSCy Schubert  return ok;
237470b56f4bSCy Schubert}
237570b56f4bSCy Schubert"
237670b56f4bSCy Schubert
237770b56f4bSCy Schubertas_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
237870b56f4bSCy Schubertas_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
237970b56f4bSCy Schubertas_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
238070b56f4bSCy Schubertas_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
238170b56f4bSCy Schubertas_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
238270b56f4bSCy Schubertas_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
238370b56f4bSCy Schubertas_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
238470b56f4bSCy Schubertas_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
238570b56f4bSCy Schubertas_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2386076b9443SCy Schubert# Check that the precious variables saved in the cache have kept the same
2387076b9443SCy Schubert# value.
2388076b9443SCy Schubertac_cache_corrupted=false
2389076b9443SCy Schubertfor ac_var in $ac_precious_vars; do
2390076b9443SCy Schubert  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2391076b9443SCy Schubert  eval ac_new_set=\$ac_env_${ac_var}_set
2392076b9443SCy Schubert  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2393076b9443SCy Schubert  eval ac_new_val=\$ac_env_${ac_var}_value
2394076b9443SCy Schubert  case $ac_old_set,$ac_new_set in
2395076b9443SCy Schubert    set,)
239670b56f4bSCy Schubert      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
239770b56f4bSCy Schubertprintf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2398076b9443SCy Schubert      ac_cache_corrupted=: ;;
2399076b9443SCy Schubert    ,set)
240070b56f4bSCy Schubert      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
240170b56f4bSCy Schubertprintf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2402076b9443SCy Schubert      ac_cache_corrupted=: ;;
2403076b9443SCy Schubert    ,);;
2404076b9443SCy Schubert    *)
2405076b9443SCy Schubert      if test "x$ac_old_val" != "x$ac_new_val"; then
2406076b9443SCy Schubert	# differences in whitespace do not lead to failure.
2407076b9443SCy Schubert	ac_old_val_w=`echo x $ac_old_val`
2408076b9443SCy Schubert	ac_new_val_w=`echo x $ac_new_val`
2409076b9443SCy Schubert	if test "$ac_old_val_w" != "$ac_new_val_w"; then
241070b56f4bSCy Schubert	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
241170b56f4bSCy Schubertprintf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2412076b9443SCy Schubert	  ac_cache_corrupted=:
2413076b9443SCy Schubert	else
241470b56f4bSCy Schubert	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
241570b56f4bSCy Schubertprintf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2416076b9443SCy Schubert	  eval $ac_var=\$ac_old_val
2417076b9443SCy Schubert	fi
241870b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
241970b56f4bSCy Schubertprintf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
242070b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
242170b56f4bSCy Schubertprintf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
2422076b9443SCy Schubert      fi;;
2423076b9443SCy Schubert  esac
2424076b9443SCy Schubert  # Pass precious variables to config.status.
2425076b9443SCy Schubert  if test "$ac_new_set" = set; then
2426076b9443SCy Schubert    case $ac_new_val in
242770b56f4bSCy Schubert    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2428076b9443SCy Schubert    *) ac_arg=$ac_var=$ac_new_val ;;
2429076b9443SCy Schubert    esac
2430076b9443SCy Schubert    case " $ac_configure_args " in
2431076b9443SCy Schubert      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2432076b9443SCy Schubert      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2433076b9443SCy Schubert    esac
2434076b9443SCy Schubert  fi
2435076b9443SCy Schubertdone
2436076b9443SCy Schubertif $ac_cache_corrupted; then
243770b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
243870b56f4bSCy Schubertprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
243970b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
244070b56f4bSCy Schubertprintf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
244170b56f4bSCy Schubert  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
244270b56f4bSCy Schubert	    and start over" "$LINENO" 5
2443076b9443SCy Schubertfi
2444076b9443SCy Schubert## -------------------- ##
2445076b9443SCy Schubert## Main body of script. ##
2446076b9443SCy Schubert## -------------------- ##
2447076b9443SCy Schubert
2448076b9443SCy Schubertac_ext=c
2449076b9443SCy Schubertac_cpp='$CPP $CPPFLAGS'
2450076b9443SCy Schubertac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2451076b9443SCy Schubertac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2452076b9443SCy Schubertac_compiler_gnu=$ac_cv_c_compiler_gnu
2453076b9443SCy Schubert
2454076b9443SCy Schubert
2455076b9443SCy Schubert
2456076b9443SCy Schubert#--------------------------------------------------------------------
2457076b9443SCy Schubert# Call TEA_INIT as the first TEA_ macro to set up initial vars.
2458076b9443SCy Schubert# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
2459076b9443SCy Schubert# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
2460076b9443SCy Schubert#--------------------------------------------------------------------
2461076b9443SCy Schubert
2462076b9443SCy Schubert
246300787218SCy Schubert    TEA_VERSION="3.13"
2464076b9443SCy Schubert
246500787218SCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking TEA configuration" >&5
246600787218SCy Schubertprintf %s "checking TEA configuration... " >&6; }
2467076b9443SCy Schubert    if test x"${PACKAGE_NAME}" = x ; then
2468076b9443SCy Schubert	as_fn_error $? "
246900787218SCy SchubertThe PACKAGE_NAME variable must be defined by your TEA configure.ac" "$LINENO" 5
2470076b9443SCy Schubert    fi
247170b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5
247270b56f4bSCy Schubertprintf "%s\n" "ok (TEA ${TEA_VERSION})" >&6; }
2473076b9443SCy Schubert
2474076b9443SCy Schubert    # If the user did not set CFLAGS, set it now to keep macros
2475076b9443SCy Schubert    # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2".
2476076b9443SCy Schubert    if test "${CFLAGS+set}" != "set" ; then
2477076b9443SCy Schubert	CFLAGS=""
2478076b9443SCy Schubert    fi
2479076b9443SCy Schubert
2480076b9443SCy Schubert    case "`uname -s`" in
248100787218SCy Schubert	*win32*|*WIN32*|*MINGW32_*|*MINGW64_*|*MSYS_*)
2482076b9443SCy Schubert	    # Extract the first word of "cygpath", so it can be a program name with args.
2483076b9443SCy Schubertset dummy cygpath; ac_word=$2
248470b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
248570b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
248670b56f4bSCy Schubertif test ${ac_cv_prog_CYGPATH+y}
248770b56f4bSCy Schubertthen :
248870b56f4bSCy Schubert  printf %s "(cached) " >&6
248970b56f4bSCy Schubertelse $as_nop
2490076b9443SCy Schubert  if test -n "$CYGPATH"; then
2491076b9443SCy Schubert  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
2492076b9443SCy Schubertelse
2493076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2494076b9443SCy Schubertfor as_dir in $PATH
2495076b9443SCy Schubertdo
2496076b9443SCy Schubert  IFS=$as_save_IFS
249770b56f4bSCy Schubert  case $as_dir in #(((
249870b56f4bSCy Schubert    '') as_dir=./ ;;
249970b56f4bSCy Schubert    */) ;;
250070b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
250170b56f4bSCy Schubert  esac
2502076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
250370b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
250400787218SCy Schubert    ac_cv_prog_CYGPATH="cygpath -m"
250570b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
2506076b9443SCy Schubert    break 2
2507076b9443SCy Schubert  fi
2508076b9443SCy Schubertdone
2509076b9443SCy Schubert  done
2510076b9443SCy SchubertIFS=$as_save_IFS
2511076b9443SCy Schubert
2512076b9443SCy Schubert  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
2513076b9443SCy Schubertfi
2514076b9443SCy Schubertfi
2515076b9443SCy SchubertCYGPATH=$ac_cv_prog_CYGPATH
2516076b9443SCy Schubertif test -n "$CYGPATH"; then
251770b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
251870b56f4bSCy Schubertprintf "%s\n" "$CYGPATH" >&6; }
2519076b9443SCy Schubertelse
252070b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
252170b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
2522076b9443SCy Schubertfi
2523076b9443SCy Schubert
2524076b9443SCy Schubert
2525076b9443SCy Schubert	    EXEEXT=".exe"
2526076b9443SCy Schubert	    TEA_PLATFORM="windows"
2527076b9443SCy Schubert	    ;;
2528076b9443SCy Schubert	*CYGWIN_*)
2529076b9443SCy Schubert	    EXEEXT=".exe"
253000787218SCy Schubert	    # CYGPATH and TEA_PLATFORM are determined later in LOAD_TCLCONFIG
2531076b9443SCy Schubert	    ;;
2532076b9443SCy Schubert	*)
2533076b9443SCy Schubert	    CYGPATH=echo
2534076b9443SCy Schubert	    # Maybe we are cross-compiling....
2535076b9443SCy Schubert	    case ${host_alias} in
2536076b9443SCy Schubert		*mingw32*)
2537076b9443SCy Schubert		EXEEXT=".exe"
2538076b9443SCy Schubert		TEA_PLATFORM="windows"
2539076b9443SCy Schubert		;;
2540076b9443SCy Schubert	    *)
2541076b9443SCy Schubert		EXEEXT=""
2542076b9443SCy Schubert		TEA_PLATFORM="unix"
2543076b9443SCy Schubert		;;
2544076b9443SCy Schubert	    esac
2545076b9443SCy Schubert	    ;;
2546076b9443SCy Schubert    esac
2547076b9443SCy Schubert
2548076b9443SCy Schubert    # Check if exec_prefix is set. If not use fall back to prefix.
2549076b9443SCy Schubert    # Note when adjusted, so that TEA_PREFIX can correct for this.
2550076b9443SCy Schubert    # This is needed for recursive configures, since autoconf propagates
2551076b9443SCy Schubert    # $prefix, but not $exec_prefix (doh!).
2552076b9443SCy Schubert    if test x$exec_prefix = xNONE ; then
2553076b9443SCy Schubert	exec_prefix_default=yes
2554076b9443SCy Schubert	exec_prefix=$prefix
2555076b9443SCy Schubert    fi
2556076b9443SCy Schubert
255770b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&5
255870b56f4bSCy Schubertprintf "%s\n" "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;}
2559076b9443SCy Schubert
2560076b9443SCy Schubert
2561076b9443SCy Schubert
2562076b9443SCy Schubert
2563076b9443SCy Schubert    # This package name must be replaced statically for AC_SUBST to work
2564076b9443SCy Schubert
256500787218SCy Schubert
256600787218SCy Schubert
2567076b9443SCy Schubert    # Substitute STUB_LIB_FILE in case package creates a stub library too.
2568076b9443SCy Schubert
2569076b9443SCy Schubert
2570076b9443SCy Schubert    # We AC_SUBST these here to ensure they are subst'ed,
2571076b9443SCy Schubert    # in case the user doesn't call TEA_ADD_...
2572076b9443SCy Schubert
2573076b9443SCy Schubert
2574076b9443SCy Schubert
2575076b9443SCy Schubert
2576076b9443SCy Schubert
2577076b9443SCy Schubert
2578076b9443SCy Schubert
2579076b9443SCy Schubert
258000787218SCy Schubert    # Configure the installer.
258100787218SCy Schubert
258200787218SCy Schubert    INSTALL='$(SHELL) $(srcdir)/tclconfig/install-sh -c'
258300787218SCy Schubert    INSTALL_DATA_DIR='${INSTALL} -d -m 755'
258400787218SCy Schubert    INSTALL_DATA='${INSTALL} -m 644'
258500787218SCy Schubert    INSTALL_PROGRAM='${INSTALL} -m 755'
258600787218SCy Schubert    INSTALL_SCRIPT='${INSTALL} -m 755'
258700787218SCy Schubert
258800787218SCy Schubert
258900787218SCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking system version" >&5
259000787218SCy Schubertprintf %s "checking system version... " >&6; }
259100787218SCy Schubertif test ${tcl_cv_sys_version+y}
259200787218SCy Schubertthen :
259300787218SCy Schubert  printf %s "(cached) " >&6
259400787218SCy Schubertelse $as_nop
259500787218SCy Schubert
259600787218SCy Schubert	# TEA specific:
259700787218SCy Schubert	if test "${TEA_PLATFORM}" = "windows" ; then
259800787218SCy Schubert	    tcl_cv_sys_version=windows
259900787218SCy Schubert	else
260000787218SCy Schubert	    tcl_cv_sys_version=`uname -s`-`uname -r`
260100787218SCy Schubert	    if test "$?" -ne 0 ; then
260200787218SCy Schubert		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
260300787218SCy Schubertprintf "%s\n" "$as_me: WARNING: can't find uname command" >&2;}
260400787218SCy Schubert		tcl_cv_sys_version=unknown
260500787218SCy Schubert	    else
260600787218SCy Schubert		if test "`uname -s`" = "AIX" ; then
260700787218SCy Schubert		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
260800787218SCy Schubert		fi
260900787218SCy Schubert		if test "`uname -s`" = "NetBSD" -a -f /etc/debian_version ; then
261000787218SCy Schubert		    tcl_cv_sys_version=NetBSD-Debian
261100787218SCy Schubert		fi
261200787218SCy Schubert	    fi
261300787218SCy Schubert	fi
261400787218SCy Schubert
261500787218SCy Schubertfi
261600787218SCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
261700787218SCy Schubertprintf "%s\n" "$tcl_cv_sys_version" >&6; }
261800787218SCy Schubert    system=$tcl_cv_sys_version
261900787218SCy Schubert
262000787218SCy Schubert    case $system in
262100787218SCy Schubert	HP-UX-*) INSTALL_LIBRARY='${INSTALL} -m 755' ;;
262200787218SCy Schubert	      *) INSTALL_LIBRARY='${INSTALL} -m 644' ;;
262300787218SCy Schubert    esac
262400787218SCy Schubert
262500787218SCy Schubert
262600787218SCy Schubert
262700787218SCy Schubert
262800787218SCy Schubert
262900787218SCy Schubert
263000787218SCy Schubert
263100787218SCy Schubert
263200787218SCy Schubert
2633076b9443SCy Schubert
2634076b9443SCy Schubert
2635076b9443SCy Schubert
2636076b9443SCy Schubert#--------------------------------------------------------------------
2637076b9443SCy Schubert# Load the tclConfig.sh file
2638076b9443SCy Schubert#--------------------------------------------------------------------
2639076b9443SCy Schubert
2640076b9443SCy Schubert
2641076b9443SCy Schubert
2642076b9443SCy Schubert    #
2643076b9443SCy Schubert    # Ok, lets find the tcl configuration
2644076b9443SCy Schubert    # First, look for one uninstalled.
2645076b9443SCy Schubert    # the alternative search directory is invoked by --with-tcl
2646076b9443SCy Schubert    #
2647076b9443SCy Schubert
2648076b9443SCy Schubert    if test x"${no_tcl}" = x ; then
2649076b9443SCy Schubert	# we reset no_tcl in case something fails here
2650076b9443SCy Schubert	no_tcl=true
2651076b9443SCy Schubert
2652076b9443SCy Schubert# Check whether --with-tcl was given.
265370b56f4bSCy Schubertif test ${with_tcl+y}
265470b56f4bSCy Schubertthen :
2655076b9443SCy Schubert  withval=$with_tcl; with_tclconfig="${withval}"
2656076b9443SCy Schubertfi
2657076b9443SCy Schubert
265870b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
265970b56f4bSCy Schubertprintf %s "checking for Tcl configuration... " >&6; }
266070b56f4bSCy Schubert	if test ${ac_cv_c_tclconfig+y}
266170b56f4bSCy Schubertthen :
266270b56f4bSCy Schubert  printf %s "(cached) " >&6
266370b56f4bSCy Schubertelse $as_nop
2664076b9443SCy Schubert
2665076b9443SCy Schubert
2666076b9443SCy Schubert	    # First check to see if --with-tcl was specified.
2667076b9443SCy Schubert	    if test x"${with_tclconfig}" != x ; then
2668076b9443SCy Schubert		case "${with_tclconfig}" in
2669076b9443SCy Schubert		    */tclConfig.sh )
2670076b9443SCy Schubert			if test -f "${with_tclconfig}"; then
267170b56f4bSCy Schubert			    { 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
267270b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
2673076b9443SCy Schubert			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
2674076b9443SCy Schubert			fi ;;
2675076b9443SCy Schubert		esac
2676076b9443SCy Schubert		if test -f "${with_tclconfig}/tclConfig.sh" ; then
2677076b9443SCy Schubert		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
2678076b9443SCy Schubert		else
2679076b9443SCy Schubert		    as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
2680076b9443SCy Schubert		fi
2681076b9443SCy Schubert	    fi
2682076b9443SCy Schubert
2683076b9443SCy Schubert	    # then check for a private Tcl installation
2684076b9443SCy Schubert	    if test x"${ac_cv_c_tclconfig}" = x ; then
2685076b9443SCy Schubert		for i in \
2686076b9443SCy Schubert			../tcl \
2687076b9443SCy Schubert			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2688076b9443SCy Schubert			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
2689076b9443SCy Schubert			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
2690076b9443SCy Schubert			../../tcl \
2691076b9443SCy Schubert			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2692076b9443SCy Schubert			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
2693076b9443SCy Schubert			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
2694076b9443SCy Schubert			../../../tcl \
2695076b9443SCy Schubert			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2696076b9443SCy Schubert			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
2697076b9443SCy Schubert			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
2698076b9443SCy Schubert		    if test "${TEA_PLATFORM}" = "windows" \
2699076b9443SCy Schubert			    -a -f "$i/win/tclConfig.sh" ; then
2700076b9443SCy Schubert			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2701076b9443SCy Schubert			break
2702076b9443SCy Schubert		    fi
2703076b9443SCy Schubert		    if test -f "$i/unix/tclConfig.sh" ; then
2704076b9443SCy Schubert			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2705076b9443SCy Schubert			break
2706076b9443SCy Schubert		    fi
2707076b9443SCy Schubert		done
2708076b9443SCy Schubert	    fi
2709076b9443SCy Schubert
2710076b9443SCy Schubert	    # on Darwin, check in Framework installation locations
2711076b9443SCy Schubert	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
2712076b9443SCy Schubert		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2713076b9443SCy Schubert			`ls -d /Library/Frameworks 2>/dev/null` \
2714076b9443SCy Schubert			`ls -d /Network/Library/Frameworks 2>/dev/null` \
271500787218SCy Schubert			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Library/Frameworks/Tcl.framework 2>/dev/null` \
271600787218SCy Schubert			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Network/Library/Frameworks/Tcl.framework 2>/dev/null` \
271700787218SCy Schubert			`ls -d /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tcl.framework 2>/dev/null` \
2718076b9443SCy Schubert			; do
2719076b9443SCy Schubert		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
2720076b9443SCy Schubert			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
2721076b9443SCy Schubert			break
2722076b9443SCy Schubert		    fi
2723076b9443SCy Schubert		done
2724076b9443SCy Schubert	    fi
2725076b9443SCy Schubert
2726076b9443SCy Schubert	    # TEA specific: on Windows, check in common installation locations
2727076b9443SCy Schubert	    if test "${TEA_PLATFORM}" = "windows" \
2728076b9443SCy Schubert		-a x"${ac_cv_c_tclconfig}" = x ; then
2729076b9443SCy Schubert		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2730076b9443SCy Schubert			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2731076b9443SCy Schubert			; do
2732076b9443SCy Schubert		    if test -f "$i/tclConfig.sh" ; then
2733076b9443SCy Schubert			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2734076b9443SCy Schubert			break
2735076b9443SCy Schubert		    fi
2736076b9443SCy Schubert		done
2737076b9443SCy Schubert	    fi
2738076b9443SCy Schubert
2739076b9443SCy Schubert	    # check in a few common install locations
2740076b9443SCy Schubert	    if test x"${ac_cv_c_tclconfig}" = x ; then
2741076b9443SCy Schubert		for i in `ls -d ${libdir} 2>/dev/null` \
2742076b9443SCy Schubert			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2743076b9443SCy Schubert			`ls -d ${prefix}/lib 2>/dev/null` \
2744076b9443SCy Schubert			`ls -d /usr/local/lib 2>/dev/null` \
2745076b9443SCy Schubert			`ls -d /usr/contrib/lib 2>/dev/null` \
274600787218SCy Schubert			`ls -d /usr/pkg/lib 2>/dev/null` \
2747076b9443SCy Schubert			`ls -d /usr/lib 2>/dev/null` \
2748076b9443SCy Schubert			`ls -d /usr/lib64 2>/dev/null` \
2749076b9443SCy Schubert			`ls -d /usr/lib/tcl8.6 2>/dev/null` \
2750076b9443SCy Schubert			`ls -d /usr/lib/tcl8.5 2>/dev/null` \
275100787218SCy Schubert			`ls -d /usr/local/lib/tcl8.6 2>/dev/null` \
275200787218SCy Schubert			`ls -d /usr/local/lib/tcl8.5 2>/dev/null` \
275300787218SCy Schubert			`ls -d /usr/local/lib/tcl/tcl8.6 2>/dev/null` \
275400787218SCy Schubert			`ls -d /usr/local/lib/tcl/tcl8.5 2>/dev/null` \
2755076b9443SCy Schubert			; do
2756076b9443SCy Schubert		    if test -f "$i/tclConfig.sh" ; then
2757076b9443SCy Schubert			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2758076b9443SCy Schubert			break
2759076b9443SCy Schubert		    fi
2760076b9443SCy Schubert		done
2761076b9443SCy Schubert	    fi
2762076b9443SCy Schubert
2763076b9443SCy Schubert	    # check in a few other private locations
2764076b9443SCy Schubert	    if test x"${ac_cv_c_tclconfig}" = x ; then
2765076b9443SCy Schubert		for i in \
2766076b9443SCy Schubert			${srcdir}/../tcl \
2767076b9443SCy Schubert			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2768076b9443SCy Schubert			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2769076b9443SCy Schubert			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2770076b9443SCy Schubert		    if test "${TEA_PLATFORM}" = "windows" \
2771076b9443SCy Schubert			    -a -f "$i/win/tclConfig.sh" ; then
2772076b9443SCy Schubert			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2773076b9443SCy Schubert			break
2774076b9443SCy Schubert		    fi
2775076b9443SCy Schubert		    if test -f "$i/unix/tclConfig.sh" ; then
2776076b9443SCy Schubert			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2777076b9443SCy Schubert			break
2778076b9443SCy Schubert		    fi
2779076b9443SCy Schubert		done
2780076b9443SCy Schubert	    fi
2781076b9443SCy Schubert
2782076b9443SCy Schubertfi
2783076b9443SCy Schubert
2784076b9443SCy Schubert
2785076b9443SCy Schubert	if test x"${ac_cv_c_tclconfig}" = x ; then
2786076b9443SCy Schubert	    TCL_BIN_DIR="# no Tcl configs found"
2787076b9443SCy Schubert	    as_fn_error $? "Can't find Tcl configuration definitions. Use --with-tcl to specify a directory containing tclConfig.sh" "$LINENO" 5
2788076b9443SCy Schubert	else
2789076b9443SCy Schubert	    no_tcl=
2790076b9443SCy Schubert	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
279170b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
279270b56f4bSCy Schubertprintf "%s\n" "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2793076b9443SCy Schubert	fi
2794076b9443SCy Schubert    fi
2795076b9443SCy Schubert
279670b56f4bSCy Schubert
279770b56f4bSCy Schubert
279870b56f4bSCy Schubert
279970b56f4bSCy Schubert
280070b56f4bSCy Schubert
280170b56f4bSCy Schubert
280270b56f4bSCy Schubert
280370b56f4bSCy Schubert
280470b56f4bSCy Schubert
2805076b9443SCy Schubertac_ext=c
2806076b9443SCy Schubertac_cpp='$CPP $CPPFLAGS'
2807076b9443SCy Schubertac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2808076b9443SCy Schubertac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2809076b9443SCy Schubertac_compiler_gnu=$ac_cv_c_compiler_gnu
2810076b9443SCy Schubertif test -n "$ac_tool_prefix"; then
2811076b9443SCy Schubert  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2812076b9443SCy Schubertset dummy ${ac_tool_prefix}gcc; ac_word=$2
281370b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
281470b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
281570b56f4bSCy Schubertif test ${ac_cv_prog_CC+y}
281670b56f4bSCy Schubertthen :
281770b56f4bSCy Schubert  printf %s "(cached) " >&6
281870b56f4bSCy Schubertelse $as_nop
2819076b9443SCy Schubert  if test -n "$CC"; then
2820076b9443SCy Schubert  ac_cv_prog_CC="$CC" # Let the user override the test.
2821076b9443SCy Schubertelse
2822076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2823076b9443SCy Schubertfor as_dir in $PATH
2824076b9443SCy Schubertdo
2825076b9443SCy Schubert  IFS=$as_save_IFS
282670b56f4bSCy Schubert  case $as_dir in #(((
282770b56f4bSCy Schubert    '') as_dir=./ ;;
282870b56f4bSCy Schubert    */) ;;
282970b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
283070b56f4bSCy Schubert  esac
2831076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
283270b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
2833076b9443SCy Schubert    ac_cv_prog_CC="${ac_tool_prefix}gcc"
283470b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
2835076b9443SCy Schubert    break 2
2836076b9443SCy Schubert  fi
2837076b9443SCy Schubertdone
2838076b9443SCy Schubert  done
2839076b9443SCy SchubertIFS=$as_save_IFS
2840076b9443SCy Schubert
2841076b9443SCy Schubertfi
2842076b9443SCy Schubertfi
2843076b9443SCy SchubertCC=$ac_cv_prog_CC
2844076b9443SCy Schubertif test -n "$CC"; then
284570b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
284670b56f4bSCy Schubertprintf "%s\n" "$CC" >&6; }
2847076b9443SCy Schubertelse
284870b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
284970b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
2850076b9443SCy Schubertfi
2851076b9443SCy Schubert
2852076b9443SCy Schubert
2853076b9443SCy Schubertfi
2854076b9443SCy Schubertif test -z "$ac_cv_prog_CC"; then
2855076b9443SCy Schubert  ac_ct_CC=$CC
2856076b9443SCy Schubert  # Extract the first word of "gcc", so it can be a program name with args.
2857076b9443SCy Schubertset dummy gcc; ac_word=$2
285870b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
285970b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
286070b56f4bSCy Schubertif test ${ac_cv_prog_ac_ct_CC+y}
286170b56f4bSCy Schubertthen :
286270b56f4bSCy Schubert  printf %s "(cached) " >&6
286370b56f4bSCy Schubertelse $as_nop
2864076b9443SCy Schubert  if test -n "$ac_ct_CC"; then
2865076b9443SCy Schubert  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2866076b9443SCy Schubertelse
2867076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2868076b9443SCy Schubertfor as_dir in $PATH
2869076b9443SCy Schubertdo
2870076b9443SCy Schubert  IFS=$as_save_IFS
287170b56f4bSCy Schubert  case $as_dir in #(((
287270b56f4bSCy Schubert    '') as_dir=./ ;;
287370b56f4bSCy Schubert    */) ;;
287470b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
287570b56f4bSCy Schubert  esac
2876076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
287770b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
2878076b9443SCy Schubert    ac_cv_prog_ac_ct_CC="gcc"
287970b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
2880076b9443SCy Schubert    break 2
2881076b9443SCy Schubert  fi
2882076b9443SCy Schubertdone
2883076b9443SCy Schubert  done
2884076b9443SCy SchubertIFS=$as_save_IFS
2885076b9443SCy Schubert
2886076b9443SCy Schubertfi
2887076b9443SCy Schubertfi
2888076b9443SCy Schubertac_ct_CC=$ac_cv_prog_ac_ct_CC
2889076b9443SCy Schubertif test -n "$ac_ct_CC"; then
289070b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
289170b56f4bSCy Schubertprintf "%s\n" "$ac_ct_CC" >&6; }
2892076b9443SCy Schubertelse
289370b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
289470b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
2895076b9443SCy Schubertfi
2896076b9443SCy Schubert
2897076b9443SCy Schubert  if test "x$ac_ct_CC" = x; then
2898076b9443SCy Schubert    CC=""
2899076b9443SCy Schubert  else
2900076b9443SCy Schubert    case $cross_compiling:$ac_tool_warned in
2901076b9443SCy Schubertyes:)
290270b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
290370b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2904076b9443SCy Schubertac_tool_warned=yes ;;
2905076b9443SCy Schubertesac
2906076b9443SCy Schubert    CC=$ac_ct_CC
2907076b9443SCy Schubert  fi
2908076b9443SCy Schubertelse
2909076b9443SCy Schubert  CC="$ac_cv_prog_CC"
2910076b9443SCy Schubertfi
2911076b9443SCy Schubert
2912076b9443SCy Schubertif test -z "$CC"; then
2913076b9443SCy Schubert          if test -n "$ac_tool_prefix"; then
2914076b9443SCy Schubert    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2915076b9443SCy Schubertset dummy ${ac_tool_prefix}cc; ac_word=$2
291670b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
291770b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
291870b56f4bSCy Schubertif test ${ac_cv_prog_CC+y}
291970b56f4bSCy Schubertthen :
292070b56f4bSCy Schubert  printf %s "(cached) " >&6
292170b56f4bSCy Schubertelse $as_nop
2922076b9443SCy Schubert  if test -n "$CC"; then
2923076b9443SCy Schubert  ac_cv_prog_CC="$CC" # Let the user override the test.
2924076b9443SCy Schubertelse
2925076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2926076b9443SCy Schubertfor as_dir in $PATH
2927076b9443SCy Schubertdo
2928076b9443SCy Schubert  IFS=$as_save_IFS
292970b56f4bSCy Schubert  case $as_dir in #(((
293070b56f4bSCy Schubert    '') as_dir=./ ;;
293170b56f4bSCy Schubert    */) ;;
293270b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
293370b56f4bSCy Schubert  esac
2934076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
293570b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
2936076b9443SCy Schubert    ac_cv_prog_CC="${ac_tool_prefix}cc"
293770b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
2938076b9443SCy Schubert    break 2
2939076b9443SCy Schubert  fi
2940076b9443SCy Schubertdone
2941076b9443SCy Schubert  done
2942076b9443SCy SchubertIFS=$as_save_IFS
2943076b9443SCy Schubert
2944076b9443SCy Schubertfi
2945076b9443SCy Schubertfi
2946076b9443SCy SchubertCC=$ac_cv_prog_CC
2947076b9443SCy Schubertif test -n "$CC"; then
294870b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
294970b56f4bSCy Schubertprintf "%s\n" "$CC" >&6; }
2950076b9443SCy Schubertelse
295170b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
295270b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
2953076b9443SCy Schubertfi
2954076b9443SCy Schubert
2955076b9443SCy Schubert
2956076b9443SCy Schubert  fi
2957076b9443SCy Schubertfi
2958076b9443SCy Schubertif test -z "$CC"; then
2959076b9443SCy Schubert  # Extract the first word of "cc", so it can be a program name with args.
2960076b9443SCy Schubertset dummy cc; ac_word=$2
296170b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
296270b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
296370b56f4bSCy Schubertif test ${ac_cv_prog_CC+y}
296470b56f4bSCy Schubertthen :
296570b56f4bSCy Schubert  printf %s "(cached) " >&6
296670b56f4bSCy Schubertelse $as_nop
2967076b9443SCy Schubert  if test -n "$CC"; then
2968076b9443SCy Schubert  ac_cv_prog_CC="$CC" # Let the user override the test.
2969076b9443SCy Schubertelse
2970076b9443SCy Schubert  ac_prog_rejected=no
2971076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2972076b9443SCy Schubertfor as_dir in $PATH
2973076b9443SCy Schubertdo
2974076b9443SCy Schubert  IFS=$as_save_IFS
297570b56f4bSCy Schubert  case $as_dir in #(((
297670b56f4bSCy Schubert    '') as_dir=./ ;;
297770b56f4bSCy Schubert    */) ;;
297870b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
297970b56f4bSCy Schubert  esac
2980076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
298170b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
298270b56f4bSCy Schubert    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2983076b9443SCy Schubert       ac_prog_rejected=yes
2984076b9443SCy Schubert       continue
2985076b9443SCy Schubert     fi
2986076b9443SCy Schubert    ac_cv_prog_CC="cc"
298770b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
2988076b9443SCy Schubert    break 2
2989076b9443SCy Schubert  fi
2990076b9443SCy Schubertdone
2991076b9443SCy Schubert  done
2992076b9443SCy SchubertIFS=$as_save_IFS
2993076b9443SCy Schubert
2994076b9443SCy Schubertif test $ac_prog_rejected = yes; then
2995076b9443SCy Schubert  # We found a bogon in the path, so make sure we never use it.
2996076b9443SCy Schubert  set dummy $ac_cv_prog_CC
2997076b9443SCy Schubert  shift
2998076b9443SCy Schubert  if test $# != 0; then
2999076b9443SCy Schubert    # We chose a different compiler from the bogus one.
3000076b9443SCy Schubert    # However, it has the same basename, so the bogon will be chosen
3001076b9443SCy Schubert    # first if we set CC to just the basename; use the full file name.
3002076b9443SCy Schubert    shift
300370b56f4bSCy Schubert    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3004076b9443SCy Schubert  fi
3005076b9443SCy Schubertfi
3006076b9443SCy Schubertfi
3007076b9443SCy Schubertfi
3008076b9443SCy SchubertCC=$ac_cv_prog_CC
3009076b9443SCy Schubertif test -n "$CC"; then
301070b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
301170b56f4bSCy Schubertprintf "%s\n" "$CC" >&6; }
3012076b9443SCy Schubertelse
301370b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
301470b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
3015076b9443SCy Schubertfi
3016076b9443SCy Schubert
3017076b9443SCy Schubert
3018076b9443SCy Schubertfi
3019076b9443SCy Schubertif test -z "$CC"; then
3020076b9443SCy Schubert  if test -n "$ac_tool_prefix"; then
3021076b9443SCy Schubert  for ac_prog in cl.exe
3022076b9443SCy Schubert  do
3023076b9443SCy Schubert    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3024076b9443SCy Schubertset dummy $ac_tool_prefix$ac_prog; ac_word=$2
302570b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
302670b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
302770b56f4bSCy Schubertif test ${ac_cv_prog_CC+y}
302870b56f4bSCy Schubertthen :
302970b56f4bSCy Schubert  printf %s "(cached) " >&6
303070b56f4bSCy Schubertelse $as_nop
3031076b9443SCy Schubert  if test -n "$CC"; then
3032076b9443SCy Schubert  ac_cv_prog_CC="$CC" # Let the user override the test.
3033076b9443SCy Schubertelse
3034076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3035076b9443SCy Schubertfor as_dir in $PATH
3036076b9443SCy Schubertdo
3037076b9443SCy Schubert  IFS=$as_save_IFS
303870b56f4bSCy Schubert  case $as_dir in #(((
303970b56f4bSCy Schubert    '') as_dir=./ ;;
304070b56f4bSCy Schubert    */) ;;
304170b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
304270b56f4bSCy Schubert  esac
3043076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
304470b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3045076b9443SCy Schubert    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
304670b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3047076b9443SCy Schubert    break 2
3048076b9443SCy Schubert  fi
3049076b9443SCy Schubertdone
3050076b9443SCy Schubert  done
3051076b9443SCy SchubertIFS=$as_save_IFS
3052076b9443SCy Schubert
3053076b9443SCy Schubertfi
3054076b9443SCy Schubertfi
3055076b9443SCy SchubertCC=$ac_cv_prog_CC
3056076b9443SCy Schubertif test -n "$CC"; then
305770b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
305870b56f4bSCy Schubertprintf "%s\n" "$CC" >&6; }
3059076b9443SCy Schubertelse
306070b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
306170b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
3062076b9443SCy Schubertfi
3063076b9443SCy Schubert
3064076b9443SCy Schubert
3065076b9443SCy Schubert    test -n "$CC" && break
3066076b9443SCy Schubert  done
3067076b9443SCy Schubertfi
3068076b9443SCy Schubertif test -z "$CC"; then
3069076b9443SCy Schubert  ac_ct_CC=$CC
3070076b9443SCy Schubert  for ac_prog in cl.exe
3071076b9443SCy Schubertdo
3072076b9443SCy Schubert  # Extract the first word of "$ac_prog", so it can be a program name with args.
3073076b9443SCy Schubertset dummy $ac_prog; ac_word=$2
307470b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
307570b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
307670b56f4bSCy Schubertif test ${ac_cv_prog_ac_ct_CC+y}
307770b56f4bSCy Schubertthen :
307870b56f4bSCy Schubert  printf %s "(cached) " >&6
307970b56f4bSCy Schubertelse $as_nop
3080076b9443SCy Schubert  if test -n "$ac_ct_CC"; then
3081076b9443SCy Schubert  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3082076b9443SCy Schubertelse
3083076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3084076b9443SCy Schubertfor as_dir in $PATH
3085076b9443SCy Schubertdo
3086076b9443SCy Schubert  IFS=$as_save_IFS
308770b56f4bSCy Schubert  case $as_dir in #(((
308870b56f4bSCy Schubert    '') as_dir=./ ;;
308970b56f4bSCy Schubert    */) ;;
309070b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
309170b56f4bSCy Schubert  esac
3092076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
309370b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3094076b9443SCy Schubert    ac_cv_prog_ac_ct_CC="$ac_prog"
309570b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3096076b9443SCy Schubert    break 2
3097076b9443SCy Schubert  fi
3098076b9443SCy Schubertdone
3099076b9443SCy Schubert  done
3100076b9443SCy SchubertIFS=$as_save_IFS
3101076b9443SCy Schubert
3102076b9443SCy Schubertfi
3103076b9443SCy Schubertfi
3104076b9443SCy Schubertac_ct_CC=$ac_cv_prog_ac_ct_CC
3105076b9443SCy Schubertif test -n "$ac_ct_CC"; then
310670b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
310770b56f4bSCy Schubertprintf "%s\n" "$ac_ct_CC" >&6; }
3108076b9443SCy Schubertelse
310970b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
311070b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
3111076b9443SCy Schubertfi
3112076b9443SCy Schubert
3113076b9443SCy Schubert
3114076b9443SCy Schubert  test -n "$ac_ct_CC" && break
3115076b9443SCy Schubertdone
3116076b9443SCy Schubert
3117076b9443SCy Schubert  if test "x$ac_ct_CC" = x; then
3118076b9443SCy Schubert    CC=""
3119076b9443SCy Schubert  else
3120076b9443SCy Schubert    case $cross_compiling:$ac_tool_warned in
3121076b9443SCy Schubertyes:)
312270b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
312370b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3124076b9443SCy Schubertac_tool_warned=yes ;;
3125076b9443SCy Schubertesac
3126076b9443SCy Schubert    CC=$ac_ct_CC
3127076b9443SCy Schubert  fi
3128076b9443SCy Schubertfi
3129076b9443SCy Schubert
3130076b9443SCy Schubertfi
313170b56f4bSCy Schubertif test -z "$CC"; then
313270b56f4bSCy Schubert  if test -n "$ac_tool_prefix"; then
313370b56f4bSCy Schubert  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
313470b56f4bSCy Schubertset dummy ${ac_tool_prefix}clang; ac_word=$2
313570b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
313670b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
313770b56f4bSCy Schubertif test ${ac_cv_prog_CC+y}
313870b56f4bSCy Schubertthen :
313970b56f4bSCy Schubert  printf %s "(cached) " >&6
314070b56f4bSCy Schubertelse $as_nop
314170b56f4bSCy Schubert  if test -n "$CC"; then
314270b56f4bSCy Schubert  ac_cv_prog_CC="$CC" # Let the user override the test.
314370b56f4bSCy Schubertelse
314470b56f4bSCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
314570b56f4bSCy Schubertfor as_dir in $PATH
314670b56f4bSCy Schubertdo
314770b56f4bSCy Schubert  IFS=$as_save_IFS
314870b56f4bSCy Schubert  case $as_dir in #(((
314970b56f4bSCy Schubert    '') as_dir=./ ;;
315070b56f4bSCy Schubert    */) ;;
315170b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
315270b56f4bSCy Schubert  esac
315370b56f4bSCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
315470b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
315570b56f4bSCy Schubert    ac_cv_prog_CC="${ac_tool_prefix}clang"
315670b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
315770b56f4bSCy Schubert    break 2
315870b56f4bSCy Schubert  fi
315970b56f4bSCy Schubertdone
316070b56f4bSCy Schubert  done
316170b56f4bSCy SchubertIFS=$as_save_IFS
316270b56f4bSCy Schubert
316370b56f4bSCy Schubertfi
316470b56f4bSCy Schubertfi
316570b56f4bSCy SchubertCC=$ac_cv_prog_CC
316670b56f4bSCy Schubertif test -n "$CC"; then
316770b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
316870b56f4bSCy Schubertprintf "%s\n" "$CC" >&6; }
316970b56f4bSCy Schubertelse
317070b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
317170b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
317270b56f4bSCy Schubertfi
3173076b9443SCy Schubert
3174076b9443SCy Schubert
317570b56f4bSCy Schubertfi
317670b56f4bSCy Schubertif test -z "$ac_cv_prog_CC"; then
317770b56f4bSCy Schubert  ac_ct_CC=$CC
317870b56f4bSCy Schubert  # Extract the first word of "clang", so it can be a program name with args.
317970b56f4bSCy Schubertset dummy clang; ac_word=$2
318070b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
318170b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
318270b56f4bSCy Schubertif test ${ac_cv_prog_ac_ct_CC+y}
318370b56f4bSCy Schubertthen :
318470b56f4bSCy Schubert  printf %s "(cached) " >&6
318570b56f4bSCy Schubertelse $as_nop
318670b56f4bSCy Schubert  if test -n "$ac_ct_CC"; then
318770b56f4bSCy Schubert  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
318870b56f4bSCy Schubertelse
318970b56f4bSCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
319070b56f4bSCy Schubertfor as_dir in $PATH
319170b56f4bSCy Schubertdo
319270b56f4bSCy Schubert  IFS=$as_save_IFS
319370b56f4bSCy Schubert  case $as_dir in #(((
319470b56f4bSCy Schubert    '') as_dir=./ ;;
319570b56f4bSCy Schubert    */) ;;
319670b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
319770b56f4bSCy Schubert  esac
319870b56f4bSCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
319970b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
320070b56f4bSCy Schubert    ac_cv_prog_ac_ct_CC="clang"
320170b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
320270b56f4bSCy Schubert    break 2
320370b56f4bSCy Schubert  fi
320470b56f4bSCy Schubertdone
320570b56f4bSCy Schubert  done
320670b56f4bSCy SchubertIFS=$as_save_IFS
320770b56f4bSCy Schubert
320870b56f4bSCy Schubertfi
320970b56f4bSCy Schubertfi
321070b56f4bSCy Schubertac_ct_CC=$ac_cv_prog_ac_ct_CC
321170b56f4bSCy Schubertif test -n "$ac_ct_CC"; then
321270b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
321370b56f4bSCy Schubertprintf "%s\n" "$ac_ct_CC" >&6; }
321470b56f4bSCy Schubertelse
321570b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
321670b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
321770b56f4bSCy Schubertfi
321870b56f4bSCy Schubert
321970b56f4bSCy Schubert  if test "x$ac_ct_CC" = x; then
322070b56f4bSCy Schubert    CC=""
322170b56f4bSCy Schubert  else
322270b56f4bSCy Schubert    case $cross_compiling:$ac_tool_warned in
322370b56f4bSCy Schubertyes:)
322470b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
322570b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
322670b56f4bSCy Schubertac_tool_warned=yes ;;
322770b56f4bSCy Schubertesac
322870b56f4bSCy Schubert    CC=$ac_ct_CC
322970b56f4bSCy Schubert  fi
323070b56f4bSCy Schubertelse
323170b56f4bSCy Schubert  CC="$ac_cv_prog_CC"
323270b56f4bSCy Schubertfi
323370b56f4bSCy Schubert
323470b56f4bSCy Schubertfi
323570b56f4bSCy Schubert
323670b56f4bSCy Schubert
323770b56f4bSCy Schuberttest -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
323870b56f4bSCy Schubertprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3239076b9443SCy Schubertas_fn_error $? "no acceptable C compiler found in \$PATH
3240076b9443SCy SchubertSee \`config.log' for more details" "$LINENO" 5; }
3241076b9443SCy Schubert
3242076b9443SCy Schubert# Provide some information about the compiler.
324370b56f4bSCy Schubertprintf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3244076b9443SCy Schubertset X $ac_compile
3245076b9443SCy Schubertac_compiler=$2
324670b56f4bSCy Schubertfor ac_option in --version -v -V -qversion -version; do
3247076b9443SCy Schubert  { { ac_try="$ac_compiler $ac_option >&5"
3248076b9443SCy Schubertcase "(($ac_try" in
3249076b9443SCy Schubert  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3250076b9443SCy Schubert  *) ac_try_echo=$ac_try;;
3251076b9443SCy Schubertesac
3252076b9443SCy Schuberteval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
325370b56f4bSCy Schubertprintf "%s\n" "$ac_try_echo"; } >&5
3254076b9443SCy Schubert  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3255076b9443SCy Schubert  ac_status=$?
3256076b9443SCy Schubert  if test -s conftest.err; then
3257076b9443SCy Schubert    sed '10a\
3258076b9443SCy Schubert... rest of stderr output deleted ...
3259076b9443SCy Schubert         10q' conftest.err >conftest.er1
3260076b9443SCy Schubert    cat conftest.er1 >&5
3261076b9443SCy Schubert  fi
3262076b9443SCy Schubert  rm -f conftest.er1 conftest.err
326370b56f4bSCy Schubert  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3264076b9443SCy Schubert  test $ac_status = 0; }
3265076b9443SCy Schubertdone
3266076b9443SCy Schubert
3267076b9443SCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
3268076b9443SCy Schubert/* end confdefs.h.  */
3269076b9443SCy Schubert
3270076b9443SCy Schubertint
327170b56f4bSCy Schubertmain (void)
3272076b9443SCy Schubert{
3273076b9443SCy Schubert
3274076b9443SCy Schubert  ;
3275076b9443SCy Schubert  return 0;
3276076b9443SCy Schubert}
3277076b9443SCy Schubert_ACEOF
3278076b9443SCy Schubertac_clean_files_save=$ac_clean_files
3279076b9443SCy Schubertac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3280076b9443SCy Schubert# Try to create an executable without -o first, disregard a.out.
3281076b9443SCy Schubert# It will help us diagnose broken compilers, and finding out an intuition
3282076b9443SCy Schubert# of exeext.
328370b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
328470b56f4bSCy Schubertprintf %s "checking whether the C compiler works... " >&6; }
328570b56f4bSCy Schubertac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3286076b9443SCy Schubert
3287076b9443SCy Schubert# The possible output files:
3288076b9443SCy Schubertac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3289076b9443SCy Schubert
3290076b9443SCy Schubertac_rmfiles=
3291076b9443SCy Schubertfor ac_file in $ac_files
3292076b9443SCy Schubertdo
3293076b9443SCy Schubert  case $ac_file in
3294076b9443SCy Schubert    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3295076b9443SCy Schubert    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3296076b9443SCy Schubert  esac
3297076b9443SCy Schubertdone
3298076b9443SCy Schubertrm -f $ac_rmfiles
3299076b9443SCy Schubert
3300076b9443SCy Schubertif { { ac_try="$ac_link_default"
3301076b9443SCy Schubertcase "(($ac_try" in
3302076b9443SCy Schubert  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3303076b9443SCy Schubert  *) ac_try_echo=$ac_try;;
3304076b9443SCy Schubertesac
3305076b9443SCy Schuberteval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
330670b56f4bSCy Schubertprintf "%s\n" "$ac_try_echo"; } >&5
3307076b9443SCy Schubert  (eval "$ac_link_default") 2>&5
3308076b9443SCy Schubert  ac_status=$?
330970b56f4bSCy Schubert  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
331070b56f4bSCy Schubert  test $ac_status = 0; }
331170b56f4bSCy Schubertthen :
3312076b9443SCy Schubert  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3313076b9443SCy Schubert# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3314076b9443SCy Schubert# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3315076b9443SCy Schubert# so that the user can short-circuit this test for compilers unknown to
3316076b9443SCy Schubert# Autoconf.
3317076b9443SCy Schubertfor ac_file in $ac_files ''
3318076b9443SCy Schubertdo
3319076b9443SCy Schubert  test -f "$ac_file" || continue
3320076b9443SCy Schubert  case $ac_file in
3321076b9443SCy Schubert    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3322076b9443SCy Schubert	;;
3323076b9443SCy Schubert    [ab].out )
3324076b9443SCy Schubert	# We found the default executable, but exeext='' is most
3325076b9443SCy Schubert	# certainly right.
3326076b9443SCy Schubert	break;;
3327076b9443SCy Schubert    *.* )
332870b56f4bSCy Schubert	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3329076b9443SCy Schubert	then :; else
3330076b9443SCy Schubert	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3331076b9443SCy Schubert	fi
3332076b9443SCy Schubert	# We set ac_cv_exeext here because the later test for it is not
3333076b9443SCy Schubert	# safe: cross compilers may not add the suffix if given an `-o'
3334076b9443SCy Schubert	# argument, so we may need to know it at that point already.
3335076b9443SCy Schubert	# Even if this section looks crufty: it has the advantage of
3336076b9443SCy Schubert	# actually working.
3337076b9443SCy Schubert	break;;
3338076b9443SCy Schubert    * )
3339076b9443SCy Schubert	break;;
3340076b9443SCy Schubert  esac
3341076b9443SCy Schubertdone
3342076b9443SCy Schuberttest "$ac_cv_exeext" = no && ac_cv_exeext=
3343076b9443SCy Schubert
334470b56f4bSCy Schubertelse $as_nop
3345076b9443SCy Schubert  ac_file=''
3346076b9443SCy Schubertfi
334770b56f4bSCy Schubertif test -z "$ac_file"
334870b56f4bSCy Schubertthen :
334970b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
335070b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
335170b56f4bSCy Schubertprintf "%s\n" "$as_me: failed program was:" >&5
3352076b9443SCy Schubertsed 's/^/| /' conftest.$ac_ext >&5
3353076b9443SCy Schubert
335470b56f4bSCy Schubert{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
335570b56f4bSCy Schubertprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3356076b9443SCy Schubertas_fn_error 77 "C compiler cannot create executables
3357076b9443SCy SchubertSee \`config.log' for more details" "$LINENO" 5; }
335870b56f4bSCy Schubertelse $as_nop
335970b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
336070b56f4bSCy Schubertprintf "%s\n" "yes" >&6; }
3361076b9443SCy Schubertfi
336270b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
336370b56f4bSCy Schubertprintf %s "checking for C compiler default output file name... " >&6; }
336470b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
336570b56f4bSCy Schubertprintf "%s\n" "$ac_file" >&6; }
3366076b9443SCy Schubertac_exeext=$ac_cv_exeext
3367076b9443SCy Schubert
3368076b9443SCy Schubertrm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3369076b9443SCy Schubertac_clean_files=$ac_clean_files_save
337070b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
337170b56f4bSCy Schubertprintf %s "checking for suffix of executables... " >&6; }
3372076b9443SCy Schubertif { { ac_try="$ac_link"
3373076b9443SCy Schubertcase "(($ac_try" in
3374076b9443SCy Schubert  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3375076b9443SCy Schubert  *) ac_try_echo=$ac_try;;
3376076b9443SCy Schubertesac
3377076b9443SCy Schuberteval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
337870b56f4bSCy Schubertprintf "%s\n" "$ac_try_echo"; } >&5
3379076b9443SCy Schubert  (eval "$ac_link") 2>&5
3380076b9443SCy Schubert  ac_status=$?
338170b56f4bSCy Schubert  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
338270b56f4bSCy Schubert  test $ac_status = 0; }
338370b56f4bSCy Schubertthen :
3384076b9443SCy Schubert  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3385076b9443SCy Schubert# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3386076b9443SCy Schubert# work properly (i.e., refer to `conftest.exe'), while it won't with
3387076b9443SCy Schubert# `rm'.
3388076b9443SCy Schubertfor ac_file in conftest.exe conftest conftest.*; do
3389076b9443SCy Schubert  test -f "$ac_file" || continue
3390076b9443SCy Schubert  case $ac_file in
3391076b9443SCy Schubert    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3392076b9443SCy Schubert    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3393076b9443SCy Schubert	  break;;
3394076b9443SCy Schubert    * ) break;;
3395076b9443SCy Schubert  esac
3396076b9443SCy Schubertdone
339770b56f4bSCy Schubertelse $as_nop
339870b56f4bSCy Schubert  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
339970b56f4bSCy Schubertprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3400076b9443SCy Schubertas_fn_error $? "cannot compute suffix of executables: cannot compile and link
3401076b9443SCy SchubertSee \`config.log' for more details" "$LINENO" 5; }
3402076b9443SCy Schubertfi
3403076b9443SCy Schubertrm -f conftest conftest$ac_cv_exeext
340470b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
340570b56f4bSCy Schubertprintf "%s\n" "$ac_cv_exeext" >&6; }
3406076b9443SCy Schubert
3407076b9443SCy Schubertrm -f conftest.$ac_ext
3408076b9443SCy SchubertEXEEXT=$ac_cv_exeext
3409076b9443SCy Schubertac_exeext=$EXEEXT
3410076b9443SCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
3411076b9443SCy Schubert/* end confdefs.h.  */
3412076b9443SCy Schubert#include <stdio.h>
3413076b9443SCy Schubertint
341470b56f4bSCy Schubertmain (void)
3415076b9443SCy Schubert{
3416076b9443SCy SchubertFILE *f = fopen ("conftest.out", "w");
3417076b9443SCy Schubert return ferror (f) || fclose (f) != 0;
3418076b9443SCy Schubert
3419076b9443SCy Schubert  ;
3420076b9443SCy Schubert  return 0;
3421076b9443SCy Schubert}
3422076b9443SCy Schubert_ACEOF
3423076b9443SCy Schubertac_clean_files="$ac_clean_files conftest.out"
3424076b9443SCy Schubert# Check that the compiler produces executables we can run.  If not, either
3425076b9443SCy Schubert# the compiler is broken, or we cross compile.
342670b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
342770b56f4bSCy Schubertprintf %s "checking whether we are cross compiling... " >&6; }
3428076b9443SCy Schubertif test "$cross_compiling" != yes; then
3429076b9443SCy Schubert  { { ac_try="$ac_link"
3430076b9443SCy Schubertcase "(($ac_try" in
3431076b9443SCy Schubert  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3432076b9443SCy Schubert  *) ac_try_echo=$ac_try;;
3433076b9443SCy Schubertesac
3434076b9443SCy Schuberteval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
343570b56f4bSCy Schubertprintf "%s\n" "$ac_try_echo"; } >&5
3436076b9443SCy Schubert  (eval "$ac_link") 2>&5
3437076b9443SCy Schubert  ac_status=$?
343870b56f4bSCy Schubert  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3439076b9443SCy Schubert  test $ac_status = 0; }
3440076b9443SCy Schubert  if { ac_try='./conftest$ac_cv_exeext'
3441076b9443SCy Schubert  { { case "(($ac_try" in
3442076b9443SCy Schubert  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3443076b9443SCy Schubert  *) ac_try_echo=$ac_try;;
3444076b9443SCy Schubertesac
3445076b9443SCy Schuberteval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
344670b56f4bSCy Schubertprintf "%s\n" "$ac_try_echo"; } >&5
3447076b9443SCy Schubert  (eval "$ac_try") 2>&5
3448076b9443SCy Schubert  ac_status=$?
344970b56f4bSCy Schubert  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3450076b9443SCy Schubert  test $ac_status = 0; }; }; then
3451076b9443SCy Schubert    cross_compiling=no
3452076b9443SCy Schubert  else
3453076b9443SCy Schubert    if test "$cross_compiling" = maybe; then
3454076b9443SCy Schubert	cross_compiling=yes
3455076b9443SCy Schubert    else
345670b56f4bSCy Schubert	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
345770b56f4bSCy Schubertprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
345870b56f4bSCy Schubertas_fn_error 77 "cannot run C compiled programs.
3459076b9443SCy SchubertIf you meant to cross compile, use \`--host'.
3460076b9443SCy SchubertSee \`config.log' for more details" "$LINENO" 5; }
3461076b9443SCy Schubert    fi
3462076b9443SCy Schubert  fi
3463076b9443SCy Schubertfi
346470b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
346570b56f4bSCy Schubertprintf "%s\n" "$cross_compiling" >&6; }
3466076b9443SCy Schubert
3467076b9443SCy Schubertrm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3468076b9443SCy Schubertac_clean_files=$ac_clean_files_save
346970b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
347070b56f4bSCy Schubertprintf %s "checking for suffix of object files... " >&6; }
347170b56f4bSCy Schubertif test ${ac_cv_objext+y}
347270b56f4bSCy Schubertthen :
347370b56f4bSCy Schubert  printf %s "(cached) " >&6
347470b56f4bSCy Schubertelse $as_nop
3475076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3476076b9443SCy Schubert/* end confdefs.h.  */
3477076b9443SCy Schubert
3478076b9443SCy Schubertint
347970b56f4bSCy Schubertmain (void)
3480076b9443SCy Schubert{
3481076b9443SCy Schubert
3482076b9443SCy Schubert  ;
3483076b9443SCy Schubert  return 0;
3484076b9443SCy Schubert}
3485076b9443SCy Schubert_ACEOF
3486076b9443SCy Schubertrm -f conftest.o conftest.obj
3487076b9443SCy Schubertif { { ac_try="$ac_compile"
3488076b9443SCy Schubertcase "(($ac_try" in
3489076b9443SCy Schubert  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3490076b9443SCy Schubert  *) ac_try_echo=$ac_try;;
3491076b9443SCy Schubertesac
3492076b9443SCy Schuberteval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
349370b56f4bSCy Schubertprintf "%s\n" "$ac_try_echo"; } >&5
3494076b9443SCy Schubert  (eval "$ac_compile") 2>&5
3495076b9443SCy Schubert  ac_status=$?
349670b56f4bSCy Schubert  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
349770b56f4bSCy Schubert  test $ac_status = 0; }
349870b56f4bSCy Schubertthen :
3499076b9443SCy Schubert  for ac_file in conftest.o conftest.obj conftest.*; do
3500076b9443SCy Schubert  test -f "$ac_file" || continue;
3501076b9443SCy Schubert  case $ac_file in
3502076b9443SCy Schubert    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3503076b9443SCy Schubert    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3504076b9443SCy Schubert       break;;
3505076b9443SCy Schubert  esac
3506076b9443SCy Schubertdone
350770b56f4bSCy Schubertelse $as_nop
350870b56f4bSCy Schubert  printf "%s\n" "$as_me: failed program was:" >&5
3509076b9443SCy Schubertsed 's/^/| /' conftest.$ac_ext >&5
3510076b9443SCy Schubert
351170b56f4bSCy Schubert{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
351270b56f4bSCy Schubertprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3513076b9443SCy Schubertas_fn_error $? "cannot compute suffix of object files: cannot compile
3514076b9443SCy SchubertSee \`config.log' for more details" "$LINENO" 5; }
3515076b9443SCy Schubertfi
3516076b9443SCy Schubertrm -f conftest.$ac_cv_objext conftest.$ac_ext
3517076b9443SCy Schubertfi
351870b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
351970b56f4bSCy Schubertprintf "%s\n" "$ac_cv_objext" >&6; }
3520076b9443SCy SchubertOBJEXT=$ac_cv_objext
3521076b9443SCy Schubertac_objext=$OBJEXT
352270b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
352370b56f4bSCy Schubertprintf %s "checking whether the compiler supports GNU C... " >&6; }
352470b56f4bSCy Schubertif test ${ac_cv_c_compiler_gnu+y}
352570b56f4bSCy Schubertthen :
352670b56f4bSCy Schubert  printf %s "(cached) " >&6
352770b56f4bSCy Schubertelse $as_nop
3528076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3529076b9443SCy Schubert/* end confdefs.h.  */
3530076b9443SCy Schubert
3531076b9443SCy Schubertint
353270b56f4bSCy Schubertmain (void)
3533076b9443SCy Schubert{
3534076b9443SCy Schubert#ifndef __GNUC__
3535076b9443SCy Schubert       choke me
3536076b9443SCy Schubert#endif
3537076b9443SCy Schubert
3538076b9443SCy Schubert  ;
3539076b9443SCy Schubert  return 0;
3540076b9443SCy Schubert}
3541076b9443SCy Schubert_ACEOF
354270b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
354370b56f4bSCy Schubertthen :
3544076b9443SCy Schubert  ac_compiler_gnu=yes
354570b56f4bSCy Schubertelse $as_nop
3546076b9443SCy Schubert  ac_compiler_gnu=no
3547076b9443SCy Schubertfi
354870b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3549076b9443SCy Schubertac_cv_c_compiler_gnu=$ac_compiler_gnu
3550076b9443SCy Schubert
3551076b9443SCy Schubertfi
355270b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
355370b56f4bSCy Schubertprintf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
355470b56f4bSCy Schubertac_compiler_gnu=$ac_cv_c_compiler_gnu
355570b56f4bSCy Schubert
3556076b9443SCy Schubertif test $ac_compiler_gnu = yes; then
3557076b9443SCy Schubert  GCC=yes
3558076b9443SCy Schubertelse
3559076b9443SCy Schubert  GCC=
3560076b9443SCy Schubertfi
356170b56f4bSCy Schubertac_test_CFLAGS=${CFLAGS+y}
3562076b9443SCy Schubertac_save_CFLAGS=$CFLAGS
356370b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
356470b56f4bSCy Schubertprintf %s "checking whether $CC accepts -g... " >&6; }
356570b56f4bSCy Schubertif test ${ac_cv_prog_cc_g+y}
356670b56f4bSCy Schubertthen :
356770b56f4bSCy Schubert  printf %s "(cached) " >&6
356870b56f4bSCy Schubertelse $as_nop
3569076b9443SCy Schubert  ac_save_c_werror_flag=$ac_c_werror_flag
3570076b9443SCy Schubert   ac_c_werror_flag=yes
3571076b9443SCy Schubert   ac_cv_prog_cc_g=no
3572076b9443SCy Schubert   CFLAGS="-g"
3573076b9443SCy Schubert   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3574076b9443SCy Schubert/* end confdefs.h.  */
3575076b9443SCy Schubert
3576076b9443SCy Schubertint
357770b56f4bSCy Schubertmain (void)
3578076b9443SCy Schubert{
3579076b9443SCy Schubert
3580076b9443SCy Schubert  ;
3581076b9443SCy Schubert  return 0;
3582076b9443SCy Schubert}
3583076b9443SCy Schubert_ACEOF
358470b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
358570b56f4bSCy Schubertthen :
3586076b9443SCy Schubert  ac_cv_prog_cc_g=yes
358770b56f4bSCy Schubertelse $as_nop
3588076b9443SCy Schubert  CFLAGS=""
3589076b9443SCy Schubert      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3590076b9443SCy Schubert/* end confdefs.h.  */
3591076b9443SCy Schubert
3592076b9443SCy Schubertint
359370b56f4bSCy Schubertmain (void)
3594076b9443SCy Schubert{
3595076b9443SCy Schubert
3596076b9443SCy Schubert  ;
3597076b9443SCy Schubert  return 0;
3598076b9443SCy Schubert}
3599076b9443SCy Schubert_ACEOF
360070b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
360170b56f4bSCy Schubertthen :
3602076b9443SCy Schubert
360370b56f4bSCy Schubertelse $as_nop
3604076b9443SCy Schubert  ac_c_werror_flag=$ac_save_c_werror_flag
3605076b9443SCy Schubert	 CFLAGS="-g"
3606076b9443SCy Schubert	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3607076b9443SCy Schubert/* end confdefs.h.  */
3608076b9443SCy Schubert
3609076b9443SCy Schubertint
361070b56f4bSCy Schubertmain (void)
3611076b9443SCy Schubert{
3612076b9443SCy Schubert
3613076b9443SCy Schubert  ;
3614076b9443SCy Schubert  return 0;
3615076b9443SCy Schubert}
3616076b9443SCy Schubert_ACEOF
361770b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
361870b56f4bSCy Schubertthen :
3619076b9443SCy Schubert  ac_cv_prog_cc_g=yes
3620076b9443SCy Schubertfi
362170b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3622076b9443SCy Schubertfi
362370b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3624076b9443SCy Schubertfi
362570b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3626076b9443SCy Schubert   ac_c_werror_flag=$ac_save_c_werror_flag
3627076b9443SCy Schubertfi
362870b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
362970b56f4bSCy Schubertprintf "%s\n" "$ac_cv_prog_cc_g" >&6; }
363070b56f4bSCy Schubertif test $ac_test_CFLAGS; then
3631076b9443SCy Schubert  CFLAGS=$ac_save_CFLAGS
3632076b9443SCy Schubertelif test $ac_cv_prog_cc_g = yes; then
3633076b9443SCy Schubert  if test "$GCC" = yes; then
3634076b9443SCy Schubert    CFLAGS="-g -O2"
3635076b9443SCy Schubert  else
3636076b9443SCy Schubert    CFLAGS="-g"
3637076b9443SCy Schubert  fi
3638076b9443SCy Schubertelse
3639076b9443SCy Schubert  if test "$GCC" = yes; then
3640076b9443SCy Schubert    CFLAGS="-O2"
3641076b9443SCy Schubert  else
3642076b9443SCy Schubert    CFLAGS=
3643076b9443SCy Schubert  fi
3644076b9443SCy Schubertfi
364570b56f4bSCy Schubertac_prog_cc_stdc=no
364670b56f4bSCy Schubertif test x$ac_prog_cc_stdc = xno
364770b56f4bSCy Schubertthen :
364870b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
364970b56f4bSCy Schubertprintf %s "checking for $CC option to enable C11 features... " >&6; }
365070b56f4bSCy Schubertif test ${ac_cv_prog_cc_c11+y}
365170b56f4bSCy Schubertthen :
365270b56f4bSCy Schubert  printf %s "(cached) " >&6
365370b56f4bSCy Schubertelse $as_nop
365470b56f4bSCy Schubert  ac_cv_prog_cc_c11=no
365570b56f4bSCy Schubertac_save_CC=$CC
365670b56f4bSCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
365770b56f4bSCy Schubert/* end confdefs.h.  */
365870b56f4bSCy Schubert$ac_c_conftest_c11_program
365970b56f4bSCy Schubert_ACEOF
366070b56f4bSCy Schubertfor ac_arg in '' -std=gnu11
366170b56f4bSCy Schubertdo
366270b56f4bSCy Schubert  CC="$ac_save_CC $ac_arg"
366370b56f4bSCy Schubert  if ac_fn_c_try_compile "$LINENO"
366470b56f4bSCy Schubertthen :
366570b56f4bSCy Schubert  ac_cv_prog_cc_c11=$ac_arg
366670b56f4bSCy Schubertfi
366770b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam
366870b56f4bSCy Schubert  test "x$ac_cv_prog_cc_c11" != "xno" && break
366970b56f4bSCy Schubertdone
367070b56f4bSCy Schubertrm -f conftest.$ac_ext
367170b56f4bSCy SchubertCC=$ac_save_CC
367270b56f4bSCy Schubertfi
367370b56f4bSCy Schubert
367470b56f4bSCy Schubertif test "x$ac_cv_prog_cc_c11" = xno
367570b56f4bSCy Schubertthen :
367670b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
367770b56f4bSCy Schubertprintf "%s\n" "unsupported" >&6; }
367870b56f4bSCy Schubertelse $as_nop
367970b56f4bSCy Schubert  if test "x$ac_cv_prog_cc_c11" = x
368070b56f4bSCy Schubertthen :
368170b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
368270b56f4bSCy Schubertprintf "%s\n" "none needed" >&6; }
368370b56f4bSCy Schubertelse $as_nop
368470b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
368570b56f4bSCy Schubertprintf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
368670b56f4bSCy Schubert     CC="$CC $ac_cv_prog_cc_c11"
368770b56f4bSCy Schubertfi
368870b56f4bSCy Schubert  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
368970b56f4bSCy Schubert  ac_prog_cc_stdc=c11
369070b56f4bSCy Schubertfi
369170b56f4bSCy Schubertfi
369270b56f4bSCy Schubertif test x$ac_prog_cc_stdc = xno
369370b56f4bSCy Schubertthen :
369470b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
369570b56f4bSCy Schubertprintf %s "checking for $CC option to enable C99 features... " >&6; }
369670b56f4bSCy Schubertif test ${ac_cv_prog_cc_c99+y}
369770b56f4bSCy Schubertthen :
369870b56f4bSCy Schubert  printf %s "(cached) " >&6
369970b56f4bSCy Schubertelse $as_nop
370070b56f4bSCy Schubert  ac_cv_prog_cc_c99=no
370170b56f4bSCy Schubertac_save_CC=$CC
370270b56f4bSCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
370370b56f4bSCy Schubert/* end confdefs.h.  */
370470b56f4bSCy Schubert$ac_c_conftest_c99_program
370570b56f4bSCy Schubert_ACEOF
370670b56f4bSCy Schubertfor ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
370770b56f4bSCy Schubertdo
370870b56f4bSCy Schubert  CC="$ac_save_CC $ac_arg"
370970b56f4bSCy Schubert  if ac_fn_c_try_compile "$LINENO"
371070b56f4bSCy Schubertthen :
371170b56f4bSCy Schubert  ac_cv_prog_cc_c99=$ac_arg
371270b56f4bSCy Schubertfi
371370b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam
371470b56f4bSCy Schubert  test "x$ac_cv_prog_cc_c99" != "xno" && break
371570b56f4bSCy Schubertdone
371670b56f4bSCy Schubertrm -f conftest.$ac_ext
371770b56f4bSCy SchubertCC=$ac_save_CC
371870b56f4bSCy Schubertfi
371970b56f4bSCy Schubert
372070b56f4bSCy Schubertif test "x$ac_cv_prog_cc_c99" = xno
372170b56f4bSCy Schubertthen :
372270b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
372370b56f4bSCy Schubertprintf "%s\n" "unsupported" >&6; }
372470b56f4bSCy Schubertelse $as_nop
372570b56f4bSCy Schubert  if test "x$ac_cv_prog_cc_c99" = x
372670b56f4bSCy Schubertthen :
372770b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
372870b56f4bSCy Schubertprintf "%s\n" "none needed" >&6; }
372970b56f4bSCy Schubertelse $as_nop
373070b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
373170b56f4bSCy Schubertprintf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
373270b56f4bSCy Schubert     CC="$CC $ac_cv_prog_cc_c99"
373370b56f4bSCy Schubertfi
373470b56f4bSCy Schubert  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
373570b56f4bSCy Schubert  ac_prog_cc_stdc=c99
373670b56f4bSCy Schubertfi
373770b56f4bSCy Schubertfi
373870b56f4bSCy Schubertif test x$ac_prog_cc_stdc = xno
373970b56f4bSCy Schubertthen :
374070b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
374170b56f4bSCy Schubertprintf %s "checking for $CC option to enable C89 features... " >&6; }
374270b56f4bSCy Schubertif test ${ac_cv_prog_cc_c89+y}
374370b56f4bSCy Schubertthen :
374470b56f4bSCy Schubert  printf %s "(cached) " >&6
374570b56f4bSCy Schubertelse $as_nop
3746076b9443SCy Schubert  ac_cv_prog_cc_c89=no
3747076b9443SCy Schubertac_save_CC=$CC
3748076b9443SCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
3749076b9443SCy Schubert/* end confdefs.h.  */
375070b56f4bSCy Schubert$ac_c_conftest_c89_program
3751076b9443SCy Schubert_ACEOF
375270b56f4bSCy Schubertfor ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3753076b9443SCy Schubertdo
3754076b9443SCy Schubert  CC="$ac_save_CC $ac_arg"
375570b56f4bSCy Schubert  if ac_fn_c_try_compile "$LINENO"
375670b56f4bSCy Schubertthen :
3757076b9443SCy Schubert  ac_cv_prog_cc_c89=$ac_arg
3758076b9443SCy Schubertfi
375970b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam
3760076b9443SCy Schubert  test "x$ac_cv_prog_cc_c89" != "xno" && break
3761076b9443SCy Schubertdone
3762076b9443SCy Schubertrm -f conftest.$ac_ext
3763076b9443SCy SchubertCC=$ac_save_CC
3764076b9443SCy Schubertfi
3765076b9443SCy Schubert
376670b56f4bSCy Schubertif test "x$ac_cv_prog_cc_c89" = xno
376770b56f4bSCy Schubertthen :
376870b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
376970b56f4bSCy Schubertprintf "%s\n" "unsupported" >&6; }
377070b56f4bSCy Schubertelse $as_nop
377170b56f4bSCy Schubert  if test "x$ac_cv_prog_cc_c89" = x
377270b56f4bSCy Schubertthen :
377370b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
377470b56f4bSCy Schubertprintf "%s\n" "none needed" >&6; }
377570b56f4bSCy Schubertelse $as_nop
377670b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
377770b56f4bSCy Schubertprintf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
377870b56f4bSCy Schubert     CC="$CC $ac_cv_prog_cc_c89"
377970b56f4bSCy Schubertfi
378070b56f4bSCy Schubert  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
378170b56f4bSCy Schubert  ac_prog_cc_stdc=c89
378270b56f4bSCy Schubertfi
3783076b9443SCy Schubertfi
3784076b9443SCy Schubert
3785076b9443SCy Schubertac_ext=c
3786076b9443SCy Schubertac_cpp='$CPP $CPPFLAGS'
3787076b9443SCy Schubertac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3788076b9443SCy Schubertac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3789076b9443SCy Schubertac_compiler_gnu=$ac_cv_c_compiler_gnu
3790076b9443SCy Schubert
3791076b9443SCy Schubert
3792076b9443SCy Schubert
379370b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
379470b56f4bSCy Schubertprintf %s "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
3795076b9443SCy Schubert
3796076b9443SCy Schubert    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
379770b56f4bSCy Schubert        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: loading" >&5
379870b56f4bSCy Schubertprintf "%s\n" "loading" >&6; }
3799076b9443SCy Schubert	. "${TCL_BIN_DIR}/tclConfig.sh"
3800076b9443SCy Schubert    else
380170b56f4bSCy Schubert        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
380270b56f4bSCy Schubertprintf "%s\n" "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
3803076b9443SCy Schubert    fi
3804076b9443SCy Schubert
3805076b9443SCy Schubert    # If the TCL_BIN_DIR is the build directory (not the install directory),
3806076b9443SCy Schubert    # then set the common variable name to the value of the build variables.
3807076b9443SCy Schubert    # For example, the variable TCL_LIB_SPEC will be set to the value
3808076b9443SCy Schubert    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
3809076b9443SCy Schubert    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
3810076b9443SCy Schubert    # installed and uninstalled version of Tcl.
3811076b9443SCy Schubert    if test -f "${TCL_BIN_DIR}/Makefile" ; then
3812076b9443SCy Schubert        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
3813076b9443SCy Schubert        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
3814076b9443SCy Schubert        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
3815076b9443SCy Schubert    elif test "`uname -s`" = "Darwin"; then
3816076b9443SCy Schubert	# If Tcl was built as a framework, attempt to use the libraries
3817076b9443SCy Schubert	# from the framework at the given location so that linking works
3818076b9443SCy Schubert	# against Tcl.framework installed in an arbitrary location.
3819076b9443SCy Schubert	case ${TCL_DEFS} in
3820076b9443SCy Schubert	    *TCL_FRAMEWORK*)
3821076b9443SCy Schubert		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
3822076b9443SCy Schubert		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
3823076b9443SCy Schubert			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
3824076b9443SCy Schubert			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
3825076b9443SCy Schubert			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
3826076b9443SCy Schubert			    break
3827076b9443SCy Schubert			fi
3828076b9443SCy Schubert		    done
3829076b9443SCy Schubert		fi
3830076b9443SCy Schubert		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
3831076b9443SCy Schubert		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
3832076b9443SCy Schubert		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
3833076b9443SCy Schubert		fi
3834076b9443SCy Schubert		;;
3835076b9443SCy Schubert	esac
3836076b9443SCy Schubert    fi
3837076b9443SCy Schubert
3838076b9443SCy Schubert
3839076b9443SCy Schubert
3840076b9443SCy Schubert
3841076b9443SCy Schubert
3842076b9443SCy Schubert
3843076b9443SCy Schubert
3844076b9443SCy Schubert
3845076b9443SCy Schubert
3846076b9443SCy Schubert
3847076b9443SCy Schubert
3848076b9443SCy Schubert
3849076b9443SCy Schubert
3850076b9443SCy Schubert
385170b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking platform" >&5
385270b56f4bSCy Schubertprintf %s "checking platform... " >&6; }
3853076b9443SCy Schubert    hold_cc=$CC; CC="$TCL_CC"
3854076b9443SCy Schubert    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3855076b9443SCy Schubert/* end confdefs.h.  */
3856076b9443SCy Schubert
3857076b9443SCy Schubertint
385870b56f4bSCy Schubertmain (void)
3859076b9443SCy Schubert{
3860076b9443SCy Schubert
3861076b9443SCy Schubert	    #ifdef _WIN32
3862076b9443SCy Schubert		#error win32
3863076b9443SCy Schubert	    #endif
3864076b9443SCy Schubert
3865076b9443SCy Schubert  ;
3866076b9443SCy Schubert  return 0;
3867076b9443SCy Schubert}
3868076b9443SCy Schubert_ACEOF
386970b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
387070b56f4bSCy Schubertthen :
387100787218SCy Schubert
387200787218SCy Schubert	    # first test we've already retrieved platform (cross-compile), fallback to unix otherwise:
387300787218SCy Schubert	    TEA_PLATFORM="${TEA_PLATFORM-unix}"
387400787218SCy Schubert	    CYGPATH=echo
387500787218SCy Schubert
387670b56f4bSCy Schubertelse $as_nop
387700787218SCy Schubert
3878076b9443SCy Schubert	    TEA_PLATFORM="windows"
387900787218SCy Schubert	    # Extract the first word of "cygpath", so it can be a program name with args.
388000787218SCy Schubertset dummy cygpath; ac_word=$2
388100787218SCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
388200787218SCy Schubertprintf %s "checking for $ac_word... " >&6; }
388300787218SCy Schubertif test ${ac_cv_prog_CYGPATH+y}
388400787218SCy Schubertthen :
388500787218SCy Schubert  printf %s "(cached) " >&6
388600787218SCy Schubertelse $as_nop
388700787218SCy Schubert  if test -n "$CYGPATH"; then
388800787218SCy Schubert  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
388900787218SCy Schubertelse
389000787218SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
389100787218SCy Schubertfor as_dir in $PATH
389200787218SCy Schubertdo
389300787218SCy Schubert  IFS=$as_save_IFS
389400787218SCy Schubert  case $as_dir in #(((
389500787218SCy Schubert    '') as_dir=./ ;;
389600787218SCy Schubert    */) ;;
389700787218SCy Schubert    *) as_dir=$as_dir/ ;;
389800787218SCy Schubert  esac
389900787218SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
390000787218SCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
390100787218SCy Schubert    ac_cv_prog_CYGPATH="cygpath -m"
390200787218SCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
390300787218SCy Schubert    break 2
390400787218SCy Schubert  fi
390500787218SCy Schubertdone
390600787218SCy Schubert  done
390700787218SCy SchubertIFS=$as_save_IFS
390800787218SCy Schubert
390900787218SCy Schubert  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
391000787218SCy Schubertfi
391100787218SCy Schubertfi
391200787218SCy SchubertCYGPATH=$ac_cv_prog_CYGPATH
391300787218SCy Schubertif test -n "$CYGPATH"; then
391400787218SCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
391500787218SCy Schubertprintf "%s\n" "$CYGPATH" >&6; }
391600787218SCy Schubertelse
391700787218SCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
391800787218SCy Schubertprintf "%s\n" "no" >&6; }
391900787218SCy Schubertfi
392000787218SCy Schubert
392100787218SCy Schubert
3922076b9443SCy Schubert
3923076b9443SCy Schubertfi
392470b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3925076b9443SCy Schubert    CC=$hold_cc
392670b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TEA_PLATFORM" >&5
392770b56f4bSCy Schubertprintf "%s\n" "$TEA_PLATFORM" >&6; }
3928076b9443SCy Schubert
3929076b9443SCy Schubert    # The BUILD_$pkg is to define the correct extern storage class
3930076b9443SCy Schubert    # handling when making this package
3931076b9443SCy Schubert
393270b56f4bSCy Schubertprintf "%s\n" "#define BUILD_${PACKAGE_NAME} /**/" >>confdefs.h
3933076b9443SCy Schubert
3934076b9443SCy Schubert    # Do this here as we have fully defined TEA_PLATFORM now
3935076b9443SCy Schubert    if test "${TEA_PLATFORM}" = "windows" ; then
3936076b9443SCy Schubert	EXEEXT=".exe"
3937076b9443SCy Schubert	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
3938076b9443SCy Schubert    fi
3939076b9443SCy Schubert
3940076b9443SCy Schubert    # TEA specific:
3941076b9443SCy Schubert
3942076b9443SCy Schubert
3943076b9443SCy Schubert
3944076b9443SCy Schubert
3945076b9443SCy Schubert
3946076b9443SCy Schubert
3947076b9443SCy Schubert
3948076b9443SCy Schubert
3949076b9443SCy Schubert#--------------------------------------------------------------------
3950076b9443SCy Schubert# Load the tkConfig.sh file if necessary (Tk extension)
3951076b9443SCy Schubert#--------------------------------------------------------------------
3952076b9443SCy Schubert
3953076b9443SCy Schubert#TEA_PATH_TKCONFIG
3954076b9443SCy Schubert#TEA_LOAD_TKCONFIG
3955076b9443SCy Schubert
3956076b9443SCy Schubert#-----------------------------------------------------------------------
3957076b9443SCy Schubert# Handle the --prefix=... option by defaulting to what Tcl gave.
3958076b9443SCy Schubert# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
3959076b9443SCy Schubert#-----------------------------------------------------------------------
3960076b9443SCy Schubert
3961076b9443SCy Schubert
3962076b9443SCy Schubert    if test "${prefix}" = "NONE"; then
3963076b9443SCy Schubert	prefix_default=yes
3964076b9443SCy Schubert	if test x"${TCL_PREFIX}" != x; then
396570b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
396670b56f4bSCy Schubertprintf "%s\n" "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
3967076b9443SCy Schubert	    prefix=${TCL_PREFIX}
3968076b9443SCy Schubert	else
396970b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: --prefix defaulting to /usr/local" >&5
397070b56f4bSCy Schubertprintf "%s\n" "$as_me: --prefix defaulting to /usr/local" >&6;}
3971076b9443SCy Schubert	    prefix=/usr/local
3972076b9443SCy Schubert	fi
3973076b9443SCy Schubert    fi
3974076b9443SCy Schubert    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
3975076b9443SCy Schubert	-o x"${exec_prefix_default}" = x"yes" ; then
3976076b9443SCy Schubert	if test x"${TCL_EXEC_PREFIX}" != x; then
397770b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
397870b56f4bSCy Schubertprintf "%s\n" "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
3979076b9443SCy Schubert	    exec_prefix=${TCL_EXEC_PREFIX}
3980076b9443SCy Schubert	else
398170b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: --exec-prefix defaulting to ${prefix}" >&5
398270b56f4bSCy Schubertprintf "%s\n" "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
3983076b9443SCy Schubert	    exec_prefix=$prefix
3984076b9443SCy Schubert	fi
3985076b9443SCy Schubert    fi
3986076b9443SCy Schubert
3987076b9443SCy Schubert
3988076b9443SCy Schubert#-----------------------------------------------------------------------
3989076b9443SCy Schubert# Standard compiler checks.
3990076b9443SCy Schubert# This sets up CC by using the CC env var, or looks for gcc otherwise.
399100787218SCy Schubert# This also calls AC_PROG_CC and a few others to create the basic setup
399200787218SCy Schubert# necessary to compile executables.
3993076b9443SCy Schubert#-----------------------------------------------------------------------
3994076b9443SCy Schubert
3995076b9443SCy Schubert
3996076b9443SCy Schubert    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
3997076b9443SCy Schubert    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
3998076b9443SCy Schubert
3999076b9443SCy Schubert    ac_ext=c
4000076b9443SCy Schubertac_cpp='$CPP $CPPFLAGS'
4001076b9443SCy Schubertac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4002076b9443SCy Schubertac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4003076b9443SCy Schubertac_compiler_gnu=$ac_cv_c_compiler_gnu
4004076b9443SCy Schubertif test -n "$ac_tool_prefix"; then
4005076b9443SCy Schubert  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4006076b9443SCy Schubertset dummy ${ac_tool_prefix}gcc; ac_word=$2
400770b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
400870b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
400970b56f4bSCy Schubertif test ${ac_cv_prog_CC+y}
401070b56f4bSCy Schubertthen :
401170b56f4bSCy Schubert  printf %s "(cached) " >&6
401270b56f4bSCy Schubertelse $as_nop
4013076b9443SCy Schubert  if test -n "$CC"; then
4014076b9443SCy Schubert  ac_cv_prog_CC="$CC" # Let the user override the test.
4015076b9443SCy Schubertelse
4016076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4017076b9443SCy Schubertfor as_dir in $PATH
4018076b9443SCy Schubertdo
4019076b9443SCy Schubert  IFS=$as_save_IFS
402070b56f4bSCy Schubert  case $as_dir in #(((
402170b56f4bSCy Schubert    '') as_dir=./ ;;
402270b56f4bSCy Schubert    */) ;;
402370b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
402470b56f4bSCy Schubert  esac
4025076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
402670b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4027076b9443SCy Schubert    ac_cv_prog_CC="${ac_tool_prefix}gcc"
402870b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4029076b9443SCy Schubert    break 2
4030076b9443SCy Schubert  fi
4031076b9443SCy Schubertdone
4032076b9443SCy Schubert  done
4033076b9443SCy SchubertIFS=$as_save_IFS
4034076b9443SCy Schubert
4035076b9443SCy Schubertfi
4036076b9443SCy Schubertfi
4037076b9443SCy SchubertCC=$ac_cv_prog_CC
4038076b9443SCy Schubertif test -n "$CC"; then
403970b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
404070b56f4bSCy Schubertprintf "%s\n" "$CC" >&6; }
4041076b9443SCy Schubertelse
404270b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
404370b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
4044076b9443SCy Schubertfi
4045076b9443SCy Schubert
4046076b9443SCy Schubert
4047076b9443SCy Schubertfi
4048076b9443SCy Schubertif test -z "$ac_cv_prog_CC"; then
4049076b9443SCy Schubert  ac_ct_CC=$CC
4050076b9443SCy Schubert  # Extract the first word of "gcc", so it can be a program name with args.
4051076b9443SCy Schubertset dummy gcc; ac_word=$2
405270b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
405370b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
405470b56f4bSCy Schubertif test ${ac_cv_prog_ac_ct_CC+y}
405570b56f4bSCy Schubertthen :
405670b56f4bSCy Schubert  printf %s "(cached) " >&6
405770b56f4bSCy Schubertelse $as_nop
4058076b9443SCy Schubert  if test -n "$ac_ct_CC"; then
4059076b9443SCy Schubert  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4060076b9443SCy Schubertelse
4061076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4062076b9443SCy Schubertfor as_dir in $PATH
4063076b9443SCy Schubertdo
4064076b9443SCy Schubert  IFS=$as_save_IFS
406570b56f4bSCy Schubert  case $as_dir in #(((
406670b56f4bSCy Schubert    '') as_dir=./ ;;
406770b56f4bSCy Schubert    */) ;;
406870b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
406970b56f4bSCy Schubert  esac
4070076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
407170b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4072076b9443SCy Schubert    ac_cv_prog_ac_ct_CC="gcc"
407370b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4074076b9443SCy Schubert    break 2
4075076b9443SCy Schubert  fi
4076076b9443SCy Schubertdone
4077076b9443SCy Schubert  done
4078076b9443SCy SchubertIFS=$as_save_IFS
4079076b9443SCy Schubert
4080076b9443SCy Schubertfi
4081076b9443SCy Schubertfi
4082076b9443SCy Schubertac_ct_CC=$ac_cv_prog_ac_ct_CC
4083076b9443SCy Schubertif test -n "$ac_ct_CC"; then
408470b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
408570b56f4bSCy Schubertprintf "%s\n" "$ac_ct_CC" >&6; }
4086076b9443SCy Schubertelse
408770b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
408870b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
4089076b9443SCy Schubertfi
4090076b9443SCy Schubert
4091076b9443SCy Schubert  if test "x$ac_ct_CC" = x; then
4092076b9443SCy Schubert    CC=""
4093076b9443SCy Schubert  else
4094076b9443SCy Schubert    case $cross_compiling:$ac_tool_warned in
4095076b9443SCy Schubertyes:)
409670b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
409770b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4098076b9443SCy Schubertac_tool_warned=yes ;;
4099076b9443SCy Schubertesac
4100076b9443SCy Schubert    CC=$ac_ct_CC
4101076b9443SCy Schubert  fi
4102076b9443SCy Schubertelse
4103076b9443SCy Schubert  CC="$ac_cv_prog_CC"
4104076b9443SCy Schubertfi
4105076b9443SCy Schubert
4106076b9443SCy Schubertif test -z "$CC"; then
4107076b9443SCy Schubert          if test -n "$ac_tool_prefix"; then
4108076b9443SCy Schubert    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4109076b9443SCy Schubertset dummy ${ac_tool_prefix}cc; ac_word=$2
411070b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
411170b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
411270b56f4bSCy Schubertif test ${ac_cv_prog_CC+y}
411370b56f4bSCy Schubertthen :
411470b56f4bSCy Schubert  printf %s "(cached) " >&6
411570b56f4bSCy Schubertelse $as_nop
4116076b9443SCy Schubert  if test -n "$CC"; then
4117076b9443SCy Schubert  ac_cv_prog_CC="$CC" # Let the user override the test.
4118076b9443SCy Schubertelse
4119076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4120076b9443SCy Schubertfor as_dir in $PATH
4121076b9443SCy Schubertdo
4122076b9443SCy Schubert  IFS=$as_save_IFS
412370b56f4bSCy Schubert  case $as_dir in #(((
412470b56f4bSCy Schubert    '') as_dir=./ ;;
412570b56f4bSCy Schubert    */) ;;
412670b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
412770b56f4bSCy Schubert  esac
4128076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
412970b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4130076b9443SCy Schubert    ac_cv_prog_CC="${ac_tool_prefix}cc"
413170b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4132076b9443SCy Schubert    break 2
4133076b9443SCy Schubert  fi
4134076b9443SCy Schubertdone
4135076b9443SCy Schubert  done
4136076b9443SCy SchubertIFS=$as_save_IFS
4137076b9443SCy Schubert
4138076b9443SCy Schubertfi
4139076b9443SCy Schubertfi
4140076b9443SCy SchubertCC=$ac_cv_prog_CC
4141076b9443SCy Schubertif test -n "$CC"; then
414270b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
414370b56f4bSCy Schubertprintf "%s\n" "$CC" >&6; }
4144076b9443SCy Schubertelse
414570b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
414670b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
4147076b9443SCy Schubertfi
4148076b9443SCy Schubert
4149076b9443SCy Schubert
4150076b9443SCy Schubert  fi
4151076b9443SCy Schubertfi
4152076b9443SCy Schubertif test -z "$CC"; then
4153076b9443SCy Schubert  # Extract the first word of "cc", so it can be a program name with args.
4154076b9443SCy Schubertset dummy cc; ac_word=$2
415570b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
415670b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
415770b56f4bSCy Schubertif test ${ac_cv_prog_CC+y}
415870b56f4bSCy Schubertthen :
415970b56f4bSCy Schubert  printf %s "(cached) " >&6
416070b56f4bSCy Schubertelse $as_nop
4161076b9443SCy Schubert  if test -n "$CC"; then
4162076b9443SCy Schubert  ac_cv_prog_CC="$CC" # Let the user override the test.
4163076b9443SCy Schubertelse
4164076b9443SCy Schubert  ac_prog_rejected=no
4165076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4166076b9443SCy Schubertfor as_dir in $PATH
4167076b9443SCy Schubertdo
4168076b9443SCy Schubert  IFS=$as_save_IFS
416970b56f4bSCy Schubert  case $as_dir in #(((
417070b56f4bSCy Schubert    '') as_dir=./ ;;
417170b56f4bSCy Schubert    */) ;;
417270b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
417370b56f4bSCy Schubert  esac
4174076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
417570b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
417670b56f4bSCy Schubert    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4177076b9443SCy Schubert       ac_prog_rejected=yes
4178076b9443SCy Schubert       continue
4179076b9443SCy Schubert     fi
4180076b9443SCy Schubert    ac_cv_prog_CC="cc"
418170b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4182076b9443SCy Schubert    break 2
4183076b9443SCy Schubert  fi
4184076b9443SCy Schubertdone
4185076b9443SCy Schubert  done
4186076b9443SCy SchubertIFS=$as_save_IFS
4187076b9443SCy Schubert
4188076b9443SCy Schubertif test $ac_prog_rejected = yes; then
4189076b9443SCy Schubert  # We found a bogon in the path, so make sure we never use it.
4190076b9443SCy Schubert  set dummy $ac_cv_prog_CC
4191076b9443SCy Schubert  shift
4192076b9443SCy Schubert  if test $# != 0; then
4193076b9443SCy Schubert    # We chose a different compiler from the bogus one.
4194076b9443SCy Schubert    # However, it has the same basename, so the bogon will be chosen
4195076b9443SCy Schubert    # first if we set CC to just the basename; use the full file name.
4196076b9443SCy Schubert    shift
419770b56f4bSCy Schubert    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
4198076b9443SCy Schubert  fi
4199076b9443SCy Schubertfi
4200076b9443SCy Schubertfi
4201076b9443SCy Schubertfi
4202076b9443SCy SchubertCC=$ac_cv_prog_CC
4203076b9443SCy Schubertif test -n "$CC"; then
420470b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
420570b56f4bSCy Schubertprintf "%s\n" "$CC" >&6; }
4206076b9443SCy Schubertelse
420770b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
420870b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
4209076b9443SCy Schubertfi
4210076b9443SCy Schubert
4211076b9443SCy Schubert
4212076b9443SCy Schubertfi
4213076b9443SCy Schubertif test -z "$CC"; then
4214076b9443SCy Schubert  if test -n "$ac_tool_prefix"; then
4215076b9443SCy Schubert  for ac_prog in cl.exe
4216076b9443SCy Schubert  do
4217076b9443SCy Schubert    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4218076b9443SCy Schubertset dummy $ac_tool_prefix$ac_prog; ac_word=$2
421970b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
422070b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
422170b56f4bSCy Schubertif test ${ac_cv_prog_CC+y}
422270b56f4bSCy Schubertthen :
422370b56f4bSCy Schubert  printf %s "(cached) " >&6
422470b56f4bSCy Schubertelse $as_nop
4225076b9443SCy Schubert  if test -n "$CC"; then
4226076b9443SCy Schubert  ac_cv_prog_CC="$CC" # Let the user override the test.
4227076b9443SCy Schubertelse
4228076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4229076b9443SCy Schubertfor as_dir in $PATH
4230076b9443SCy Schubertdo
4231076b9443SCy Schubert  IFS=$as_save_IFS
423270b56f4bSCy Schubert  case $as_dir in #(((
423370b56f4bSCy Schubert    '') as_dir=./ ;;
423470b56f4bSCy Schubert    */) ;;
423570b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
423670b56f4bSCy Schubert  esac
4237076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
423870b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4239076b9443SCy Schubert    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
424070b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4241076b9443SCy Schubert    break 2
4242076b9443SCy Schubert  fi
4243076b9443SCy Schubertdone
4244076b9443SCy Schubert  done
4245076b9443SCy SchubertIFS=$as_save_IFS
4246076b9443SCy Schubert
4247076b9443SCy Schubertfi
4248076b9443SCy Schubertfi
4249076b9443SCy SchubertCC=$ac_cv_prog_CC
4250076b9443SCy Schubertif test -n "$CC"; then
425170b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
425270b56f4bSCy Schubertprintf "%s\n" "$CC" >&6; }
4253076b9443SCy Schubertelse
425470b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
425570b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
4256076b9443SCy Schubertfi
4257076b9443SCy Schubert
4258076b9443SCy Schubert
4259076b9443SCy Schubert    test -n "$CC" && break
4260076b9443SCy Schubert  done
4261076b9443SCy Schubertfi
4262076b9443SCy Schubertif test -z "$CC"; then
4263076b9443SCy Schubert  ac_ct_CC=$CC
4264076b9443SCy Schubert  for ac_prog in cl.exe
4265076b9443SCy Schubertdo
4266076b9443SCy Schubert  # Extract the first word of "$ac_prog", so it can be a program name with args.
4267076b9443SCy Schubertset dummy $ac_prog; ac_word=$2
426870b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
426970b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
427070b56f4bSCy Schubertif test ${ac_cv_prog_ac_ct_CC+y}
427170b56f4bSCy Schubertthen :
427270b56f4bSCy Schubert  printf %s "(cached) " >&6
427370b56f4bSCy Schubertelse $as_nop
4274076b9443SCy Schubert  if test -n "$ac_ct_CC"; then
4275076b9443SCy Schubert  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4276076b9443SCy Schubertelse
4277076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4278076b9443SCy Schubertfor as_dir in $PATH
4279076b9443SCy Schubertdo
4280076b9443SCy Schubert  IFS=$as_save_IFS
428170b56f4bSCy Schubert  case $as_dir in #(((
428270b56f4bSCy Schubert    '') as_dir=./ ;;
428370b56f4bSCy Schubert    */) ;;
428470b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
428570b56f4bSCy Schubert  esac
4286076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
428770b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4288076b9443SCy Schubert    ac_cv_prog_ac_ct_CC="$ac_prog"
428970b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4290076b9443SCy Schubert    break 2
4291076b9443SCy Schubert  fi
4292076b9443SCy Schubertdone
4293076b9443SCy Schubert  done
4294076b9443SCy SchubertIFS=$as_save_IFS
4295076b9443SCy Schubert
4296076b9443SCy Schubertfi
4297076b9443SCy Schubertfi
4298076b9443SCy Schubertac_ct_CC=$ac_cv_prog_ac_ct_CC
4299076b9443SCy Schubertif test -n "$ac_ct_CC"; then
430070b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
430170b56f4bSCy Schubertprintf "%s\n" "$ac_ct_CC" >&6; }
4302076b9443SCy Schubertelse
430370b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
430470b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
4305076b9443SCy Schubertfi
4306076b9443SCy Schubert
4307076b9443SCy Schubert
4308076b9443SCy Schubert  test -n "$ac_ct_CC" && break
4309076b9443SCy Schubertdone
4310076b9443SCy Schubert
4311076b9443SCy Schubert  if test "x$ac_ct_CC" = x; then
4312076b9443SCy Schubert    CC=""
4313076b9443SCy Schubert  else
4314076b9443SCy Schubert    case $cross_compiling:$ac_tool_warned in
4315076b9443SCy Schubertyes:)
431670b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
431770b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4318076b9443SCy Schubertac_tool_warned=yes ;;
4319076b9443SCy Schubertesac
4320076b9443SCy Schubert    CC=$ac_ct_CC
4321076b9443SCy Schubert  fi
4322076b9443SCy Schubertfi
4323076b9443SCy Schubert
4324076b9443SCy Schubertfi
432570b56f4bSCy Schubertif test -z "$CC"; then
432670b56f4bSCy Schubert  if test -n "$ac_tool_prefix"; then
432770b56f4bSCy Schubert  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
432870b56f4bSCy Schubertset dummy ${ac_tool_prefix}clang; ac_word=$2
432970b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
433070b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
433170b56f4bSCy Schubertif test ${ac_cv_prog_CC+y}
433270b56f4bSCy Schubertthen :
433370b56f4bSCy Schubert  printf %s "(cached) " >&6
433470b56f4bSCy Schubertelse $as_nop
433570b56f4bSCy Schubert  if test -n "$CC"; then
433670b56f4bSCy Schubert  ac_cv_prog_CC="$CC" # Let the user override the test.
433770b56f4bSCy Schubertelse
433870b56f4bSCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
433970b56f4bSCy Schubertfor as_dir in $PATH
434070b56f4bSCy Schubertdo
434170b56f4bSCy Schubert  IFS=$as_save_IFS
434270b56f4bSCy Schubert  case $as_dir in #(((
434370b56f4bSCy Schubert    '') as_dir=./ ;;
434470b56f4bSCy Schubert    */) ;;
434570b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
434670b56f4bSCy Schubert  esac
434770b56f4bSCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
434870b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
434970b56f4bSCy Schubert    ac_cv_prog_CC="${ac_tool_prefix}clang"
435070b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
435170b56f4bSCy Schubert    break 2
435270b56f4bSCy Schubert  fi
435370b56f4bSCy Schubertdone
435470b56f4bSCy Schubert  done
435570b56f4bSCy SchubertIFS=$as_save_IFS
435670b56f4bSCy Schubert
435770b56f4bSCy Schubertfi
435870b56f4bSCy Schubertfi
435970b56f4bSCy SchubertCC=$ac_cv_prog_CC
436070b56f4bSCy Schubertif test -n "$CC"; then
436170b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
436270b56f4bSCy Schubertprintf "%s\n" "$CC" >&6; }
436370b56f4bSCy Schubertelse
436470b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
436570b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
436670b56f4bSCy Schubertfi
4367076b9443SCy Schubert
4368076b9443SCy Schubert
436970b56f4bSCy Schubertfi
437070b56f4bSCy Schubertif test -z "$ac_cv_prog_CC"; then
437170b56f4bSCy Schubert  ac_ct_CC=$CC
437270b56f4bSCy Schubert  # Extract the first word of "clang", so it can be a program name with args.
437370b56f4bSCy Schubertset dummy clang; ac_word=$2
437470b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
437570b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
437670b56f4bSCy Schubertif test ${ac_cv_prog_ac_ct_CC+y}
437770b56f4bSCy Schubertthen :
437870b56f4bSCy Schubert  printf %s "(cached) " >&6
437970b56f4bSCy Schubertelse $as_nop
438070b56f4bSCy Schubert  if test -n "$ac_ct_CC"; then
438170b56f4bSCy Schubert  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
438270b56f4bSCy Schubertelse
438370b56f4bSCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
438470b56f4bSCy Schubertfor as_dir in $PATH
438570b56f4bSCy Schubertdo
438670b56f4bSCy Schubert  IFS=$as_save_IFS
438770b56f4bSCy Schubert  case $as_dir in #(((
438870b56f4bSCy Schubert    '') as_dir=./ ;;
438970b56f4bSCy Schubert    */) ;;
439070b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
439170b56f4bSCy Schubert  esac
439270b56f4bSCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
439370b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
439470b56f4bSCy Schubert    ac_cv_prog_ac_ct_CC="clang"
439570b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
439670b56f4bSCy Schubert    break 2
439770b56f4bSCy Schubert  fi
439870b56f4bSCy Schubertdone
439970b56f4bSCy Schubert  done
440070b56f4bSCy SchubertIFS=$as_save_IFS
440170b56f4bSCy Schubert
440270b56f4bSCy Schubertfi
440370b56f4bSCy Schubertfi
440470b56f4bSCy Schubertac_ct_CC=$ac_cv_prog_ac_ct_CC
440570b56f4bSCy Schubertif test -n "$ac_ct_CC"; then
440670b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
440770b56f4bSCy Schubertprintf "%s\n" "$ac_ct_CC" >&6; }
440870b56f4bSCy Schubertelse
440970b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
441070b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
441170b56f4bSCy Schubertfi
441270b56f4bSCy Schubert
441370b56f4bSCy Schubert  if test "x$ac_ct_CC" = x; then
441470b56f4bSCy Schubert    CC=""
441570b56f4bSCy Schubert  else
441670b56f4bSCy Schubert    case $cross_compiling:$ac_tool_warned in
441770b56f4bSCy Schubertyes:)
441870b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
441970b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
442070b56f4bSCy Schubertac_tool_warned=yes ;;
442170b56f4bSCy Schubertesac
442270b56f4bSCy Schubert    CC=$ac_ct_CC
442370b56f4bSCy Schubert  fi
442470b56f4bSCy Schubertelse
442570b56f4bSCy Schubert  CC="$ac_cv_prog_CC"
442670b56f4bSCy Schubertfi
442770b56f4bSCy Schubert
442870b56f4bSCy Schubertfi
442970b56f4bSCy Schubert
443070b56f4bSCy Schubert
443170b56f4bSCy Schuberttest -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
443270b56f4bSCy Schubertprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4433076b9443SCy Schubertas_fn_error $? "no acceptable C compiler found in \$PATH
4434076b9443SCy SchubertSee \`config.log' for more details" "$LINENO" 5; }
4435076b9443SCy Schubert
4436076b9443SCy Schubert# Provide some information about the compiler.
443770b56f4bSCy Schubertprintf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4438076b9443SCy Schubertset X $ac_compile
4439076b9443SCy Schubertac_compiler=$2
444070b56f4bSCy Schubertfor ac_option in --version -v -V -qversion -version; do
4441076b9443SCy Schubert  { { ac_try="$ac_compiler $ac_option >&5"
4442076b9443SCy Schubertcase "(($ac_try" in
4443076b9443SCy Schubert  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4444076b9443SCy Schubert  *) ac_try_echo=$ac_try;;
4445076b9443SCy Schubertesac
4446076b9443SCy Schuberteval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
444770b56f4bSCy Schubertprintf "%s\n" "$ac_try_echo"; } >&5
4448076b9443SCy Schubert  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4449076b9443SCy Schubert  ac_status=$?
4450076b9443SCy Schubert  if test -s conftest.err; then
4451076b9443SCy Schubert    sed '10a\
4452076b9443SCy Schubert... rest of stderr output deleted ...
4453076b9443SCy Schubert         10q' conftest.err >conftest.er1
4454076b9443SCy Schubert    cat conftest.er1 >&5
4455076b9443SCy Schubert  fi
4456076b9443SCy Schubert  rm -f conftest.er1 conftest.err
445770b56f4bSCy Schubert  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4458076b9443SCy Schubert  test $ac_status = 0; }
4459076b9443SCy Schubertdone
4460076b9443SCy Schubert
446170b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
446270b56f4bSCy Schubertprintf %s "checking whether the compiler supports GNU C... " >&6; }
446370b56f4bSCy Schubertif test ${ac_cv_c_compiler_gnu+y}
446470b56f4bSCy Schubertthen :
446570b56f4bSCy Schubert  printf %s "(cached) " >&6
446670b56f4bSCy Schubertelse $as_nop
4467076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4468076b9443SCy Schubert/* end confdefs.h.  */
4469076b9443SCy Schubert
4470076b9443SCy Schubertint
447170b56f4bSCy Schubertmain (void)
4472076b9443SCy Schubert{
4473076b9443SCy Schubert#ifndef __GNUC__
4474076b9443SCy Schubert       choke me
4475076b9443SCy Schubert#endif
4476076b9443SCy Schubert
4477076b9443SCy Schubert  ;
4478076b9443SCy Schubert  return 0;
4479076b9443SCy Schubert}
4480076b9443SCy Schubert_ACEOF
448170b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
448270b56f4bSCy Schubertthen :
4483076b9443SCy Schubert  ac_compiler_gnu=yes
448470b56f4bSCy Schubertelse $as_nop
4485076b9443SCy Schubert  ac_compiler_gnu=no
4486076b9443SCy Schubertfi
448770b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4488076b9443SCy Schubertac_cv_c_compiler_gnu=$ac_compiler_gnu
4489076b9443SCy Schubert
4490076b9443SCy Schubertfi
449170b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
449270b56f4bSCy Schubertprintf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
449370b56f4bSCy Schubertac_compiler_gnu=$ac_cv_c_compiler_gnu
449470b56f4bSCy Schubert
4495076b9443SCy Schubertif test $ac_compiler_gnu = yes; then
4496076b9443SCy Schubert  GCC=yes
4497076b9443SCy Schubertelse
4498076b9443SCy Schubert  GCC=
4499076b9443SCy Schubertfi
450070b56f4bSCy Schubertac_test_CFLAGS=${CFLAGS+y}
4501076b9443SCy Schubertac_save_CFLAGS=$CFLAGS
450270b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
450370b56f4bSCy Schubertprintf %s "checking whether $CC accepts -g... " >&6; }
450470b56f4bSCy Schubertif test ${ac_cv_prog_cc_g+y}
450570b56f4bSCy Schubertthen :
450670b56f4bSCy Schubert  printf %s "(cached) " >&6
450770b56f4bSCy Schubertelse $as_nop
4508076b9443SCy Schubert  ac_save_c_werror_flag=$ac_c_werror_flag
4509076b9443SCy Schubert   ac_c_werror_flag=yes
4510076b9443SCy Schubert   ac_cv_prog_cc_g=no
4511076b9443SCy Schubert   CFLAGS="-g"
4512076b9443SCy Schubert   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4513076b9443SCy Schubert/* end confdefs.h.  */
4514076b9443SCy Schubert
4515076b9443SCy Schubertint
451670b56f4bSCy Schubertmain (void)
4517076b9443SCy Schubert{
4518076b9443SCy Schubert
4519076b9443SCy Schubert  ;
4520076b9443SCy Schubert  return 0;
4521076b9443SCy Schubert}
4522076b9443SCy Schubert_ACEOF
452370b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
452470b56f4bSCy Schubertthen :
4525076b9443SCy Schubert  ac_cv_prog_cc_g=yes
452670b56f4bSCy Schubertelse $as_nop
4527076b9443SCy Schubert  CFLAGS=""
4528076b9443SCy Schubert      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4529076b9443SCy Schubert/* end confdefs.h.  */
4530076b9443SCy Schubert
4531076b9443SCy Schubertint
453270b56f4bSCy Schubertmain (void)
4533076b9443SCy Schubert{
4534076b9443SCy Schubert
4535076b9443SCy Schubert  ;
4536076b9443SCy Schubert  return 0;
4537076b9443SCy Schubert}
4538076b9443SCy Schubert_ACEOF
453970b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
454070b56f4bSCy Schubertthen :
4541076b9443SCy Schubert
454270b56f4bSCy Schubertelse $as_nop
4543076b9443SCy Schubert  ac_c_werror_flag=$ac_save_c_werror_flag
4544076b9443SCy Schubert	 CFLAGS="-g"
4545076b9443SCy Schubert	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4546076b9443SCy Schubert/* end confdefs.h.  */
4547076b9443SCy Schubert
4548076b9443SCy Schubertint
454970b56f4bSCy Schubertmain (void)
4550076b9443SCy Schubert{
4551076b9443SCy Schubert
4552076b9443SCy Schubert  ;
4553076b9443SCy Schubert  return 0;
4554076b9443SCy Schubert}
4555076b9443SCy Schubert_ACEOF
455670b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
455770b56f4bSCy Schubertthen :
4558076b9443SCy Schubert  ac_cv_prog_cc_g=yes
4559076b9443SCy Schubertfi
456070b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4561076b9443SCy Schubertfi
456270b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4563076b9443SCy Schubertfi
456470b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4565076b9443SCy Schubert   ac_c_werror_flag=$ac_save_c_werror_flag
4566076b9443SCy Schubertfi
456770b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
456870b56f4bSCy Schubertprintf "%s\n" "$ac_cv_prog_cc_g" >&6; }
456970b56f4bSCy Schubertif test $ac_test_CFLAGS; then
4570076b9443SCy Schubert  CFLAGS=$ac_save_CFLAGS
4571076b9443SCy Schubertelif test $ac_cv_prog_cc_g = yes; then
4572076b9443SCy Schubert  if test "$GCC" = yes; then
4573076b9443SCy Schubert    CFLAGS="-g -O2"
4574076b9443SCy Schubert  else
4575076b9443SCy Schubert    CFLAGS="-g"
4576076b9443SCy Schubert  fi
4577076b9443SCy Schubertelse
4578076b9443SCy Schubert  if test "$GCC" = yes; then
4579076b9443SCy Schubert    CFLAGS="-O2"
4580076b9443SCy Schubert  else
4581076b9443SCy Schubert    CFLAGS=
4582076b9443SCy Schubert  fi
4583076b9443SCy Schubertfi
458470b56f4bSCy Schubertac_prog_cc_stdc=no
458570b56f4bSCy Schubertif test x$ac_prog_cc_stdc = xno
458670b56f4bSCy Schubertthen :
458770b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
458870b56f4bSCy Schubertprintf %s "checking for $CC option to enable C11 features... " >&6; }
458970b56f4bSCy Schubertif test ${ac_cv_prog_cc_c11+y}
459070b56f4bSCy Schubertthen :
459170b56f4bSCy Schubert  printf %s "(cached) " >&6
459270b56f4bSCy Schubertelse $as_nop
459370b56f4bSCy Schubert  ac_cv_prog_cc_c11=no
459470b56f4bSCy Schubertac_save_CC=$CC
459570b56f4bSCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
459670b56f4bSCy Schubert/* end confdefs.h.  */
459770b56f4bSCy Schubert$ac_c_conftest_c11_program
459870b56f4bSCy Schubert_ACEOF
459970b56f4bSCy Schubertfor ac_arg in '' -std=gnu11
460070b56f4bSCy Schubertdo
460170b56f4bSCy Schubert  CC="$ac_save_CC $ac_arg"
460270b56f4bSCy Schubert  if ac_fn_c_try_compile "$LINENO"
460370b56f4bSCy Schubertthen :
460470b56f4bSCy Schubert  ac_cv_prog_cc_c11=$ac_arg
460570b56f4bSCy Schubertfi
460670b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam
460770b56f4bSCy Schubert  test "x$ac_cv_prog_cc_c11" != "xno" && break
460870b56f4bSCy Schubertdone
460970b56f4bSCy Schubertrm -f conftest.$ac_ext
461070b56f4bSCy SchubertCC=$ac_save_CC
461170b56f4bSCy Schubertfi
461270b56f4bSCy Schubert
461370b56f4bSCy Schubertif test "x$ac_cv_prog_cc_c11" = xno
461470b56f4bSCy Schubertthen :
461570b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
461670b56f4bSCy Schubertprintf "%s\n" "unsupported" >&6; }
461770b56f4bSCy Schubertelse $as_nop
461870b56f4bSCy Schubert  if test "x$ac_cv_prog_cc_c11" = x
461970b56f4bSCy Schubertthen :
462070b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
462170b56f4bSCy Schubertprintf "%s\n" "none needed" >&6; }
462270b56f4bSCy Schubertelse $as_nop
462370b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
462470b56f4bSCy Schubertprintf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
462570b56f4bSCy Schubert     CC="$CC $ac_cv_prog_cc_c11"
462670b56f4bSCy Schubertfi
462770b56f4bSCy Schubert  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
462870b56f4bSCy Schubert  ac_prog_cc_stdc=c11
462970b56f4bSCy Schubertfi
463070b56f4bSCy Schubertfi
463170b56f4bSCy Schubertif test x$ac_prog_cc_stdc = xno
463270b56f4bSCy Schubertthen :
463370b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
463470b56f4bSCy Schubertprintf %s "checking for $CC option to enable C99 features... " >&6; }
463570b56f4bSCy Schubertif test ${ac_cv_prog_cc_c99+y}
463670b56f4bSCy Schubertthen :
463770b56f4bSCy Schubert  printf %s "(cached) " >&6
463870b56f4bSCy Schubertelse $as_nop
463970b56f4bSCy Schubert  ac_cv_prog_cc_c99=no
464070b56f4bSCy Schubertac_save_CC=$CC
464170b56f4bSCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
464270b56f4bSCy Schubert/* end confdefs.h.  */
464370b56f4bSCy Schubert$ac_c_conftest_c99_program
464470b56f4bSCy Schubert_ACEOF
464570b56f4bSCy Schubertfor ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
464670b56f4bSCy Schubertdo
464770b56f4bSCy Schubert  CC="$ac_save_CC $ac_arg"
464870b56f4bSCy Schubert  if ac_fn_c_try_compile "$LINENO"
464970b56f4bSCy Schubertthen :
465070b56f4bSCy Schubert  ac_cv_prog_cc_c99=$ac_arg
465170b56f4bSCy Schubertfi
465270b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam
465370b56f4bSCy Schubert  test "x$ac_cv_prog_cc_c99" != "xno" && break
465470b56f4bSCy Schubertdone
465570b56f4bSCy Schubertrm -f conftest.$ac_ext
465670b56f4bSCy SchubertCC=$ac_save_CC
465770b56f4bSCy Schubertfi
465870b56f4bSCy Schubert
465970b56f4bSCy Schubertif test "x$ac_cv_prog_cc_c99" = xno
466070b56f4bSCy Schubertthen :
466170b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
466270b56f4bSCy Schubertprintf "%s\n" "unsupported" >&6; }
466370b56f4bSCy Schubertelse $as_nop
466470b56f4bSCy Schubert  if test "x$ac_cv_prog_cc_c99" = x
466570b56f4bSCy Schubertthen :
466670b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
466770b56f4bSCy Schubertprintf "%s\n" "none needed" >&6; }
466870b56f4bSCy Schubertelse $as_nop
466970b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
467070b56f4bSCy Schubertprintf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
467170b56f4bSCy Schubert     CC="$CC $ac_cv_prog_cc_c99"
467270b56f4bSCy Schubertfi
467370b56f4bSCy Schubert  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
467470b56f4bSCy Schubert  ac_prog_cc_stdc=c99
467570b56f4bSCy Schubertfi
467670b56f4bSCy Schubertfi
467770b56f4bSCy Schubertif test x$ac_prog_cc_stdc = xno
467870b56f4bSCy Schubertthen :
467970b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
468070b56f4bSCy Schubertprintf %s "checking for $CC option to enable C89 features... " >&6; }
468170b56f4bSCy Schubertif test ${ac_cv_prog_cc_c89+y}
468270b56f4bSCy Schubertthen :
468370b56f4bSCy Schubert  printf %s "(cached) " >&6
468470b56f4bSCy Schubertelse $as_nop
4685076b9443SCy Schubert  ac_cv_prog_cc_c89=no
4686076b9443SCy Schubertac_save_CC=$CC
4687076b9443SCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
4688076b9443SCy Schubert/* end confdefs.h.  */
468970b56f4bSCy Schubert$ac_c_conftest_c89_program
4690076b9443SCy Schubert_ACEOF
469170b56f4bSCy Schubertfor ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4692076b9443SCy Schubertdo
4693076b9443SCy Schubert  CC="$ac_save_CC $ac_arg"
469470b56f4bSCy Schubert  if ac_fn_c_try_compile "$LINENO"
469570b56f4bSCy Schubertthen :
4696076b9443SCy Schubert  ac_cv_prog_cc_c89=$ac_arg
4697076b9443SCy Schubertfi
469870b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam
4699076b9443SCy Schubert  test "x$ac_cv_prog_cc_c89" != "xno" && break
4700076b9443SCy Schubertdone
4701076b9443SCy Schubertrm -f conftest.$ac_ext
4702076b9443SCy SchubertCC=$ac_save_CC
4703076b9443SCy Schubertfi
470470b56f4bSCy Schubert
470570b56f4bSCy Schubertif test "x$ac_cv_prog_cc_c89" = xno
470670b56f4bSCy Schubertthen :
470770b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
470870b56f4bSCy Schubertprintf "%s\n" "unsupported" >&6; }
470970b56f4bSCy Schubertelse $as_nop
471070b56f4bSCy Schubert  if test "x$ac_cv_prog_cc_c89" = x
471170b56f4bSCy Schubertthen :
471270b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
471370b56f4bSCy Schubertprintf "%s\n" "none needed" >&6; }
471470b56f4bSCy Schubertelse $as_nop
471570b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
471670b56f4bSCy Schubertprintf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4717076b9443SCy Schubert     CC="$CC $ac_cv_prog_cc_c89"
471870b56f4bSCy Schubertfi
471970b56f4bSCy Schubert  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
472070b56f4bSCy Schubert  ac_prog_cc_stdc=c89
472170b56f4bSCy Schubertfi
4722076b9443SCy Schubertfi
4723076b9443SCy Schubert
4724076b9443SCy Schubertac_ext=c
4725076b9443SCy Schubertac_cpp='$CPP $CPPFLAGS'
4726076b9443SCy Schubertac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4727076b9443SCy Schubertac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4728076b9443SCy Schubertac_compiler_gnu=$ac_cv_c_compiler_gnu
4729076b9443SCy Schubert
4730076b9443SCy Schubert    ac_ext=c
4731076b9443SCy Schubertac_cpp='$CPP $CPPFLAGS'
4732076b9443SCy Schubertac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4733076b9443SCy Schubertac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4734076b9443SCy Schubertac_compiler_gnu=$ac_cv_c_compiler_gnu
473570b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
473670b56f4bSCy Schubertprintf %s "checking how to run the C preprocessor... " >&6; }
4737076b9443SCy Schubert# On Suns, sometimes $CPP names a directory.
4738076b9443SCy Schubertif test -n "$CPP" && test -d "$CPP"; then
4739076b9443SCy Schubert  CPP=
4740076b9443SCy Schubertfi
4741076b9443SCy Schubertif test -z "$CPP"; then
474270b56f4bSCy Schubert  if test ${ac_cv_prog_CPP+y}
474370b56f4bSCy Schubertthen :
474470b56f4bSCy Schubert  printf %s "(cached) " >&6
474570b56f4bSCy Schubertelse $as_nop
474670b56f4bSCy Schubert      # Double quotes because $CC needs to be expanded
474770b56f4bSCy Schubert    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
4748076b9443SCy Schubert    do
4749076b9443SCy Schubert      ac_preproc_ok=false
4750076b9443SCy Schubertfor ac_c_preproc_warn_flag in '' yes
4751076b9443SCy Schubertdo
4752076b9443SCy Schubert  # Use a header file that comes with gcc, so configuring glibc
4753076b9443SCy Schubert  # with a fresh cross-compiler works.
4754076b9443SCy Schubert  # On the NeXT, cc -E runs the code through the compiler's parser,
4755076b9443SCy Schubert  # not just through cpp. "Syntax error" is here to catch this case.
4756076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4757076b9443SCy Schubert/* end confdefs.h.  */
4758076b9443SCy Schubert#include <limits.h>
4759076b9443SCy Schubert		     Syntax error
4760076b9443SCy Schubert_ACEOF
476170b56f4bSCy Schubertif ac_fn_c_try_cpp "$LINENO"
476270b56f4bSCy Schubertthen :
4763076b9443SCy Schubert
476470b56f4bSCy Schubertelse $as_nop
4765076b9443SCy Schubert  # Broken: fails on valid input.
4766076b9443SCy Schubertcontinue
4767076b9443SCy Schubertfi
4768076b9443SCy Schubertrm -f conftest.err conftest.i conftest.$ac_ext
4769076b9443SCy Schubert
4770076b9443SCy Schubert  # OK, works on sane cases.  Now check whether nonexistent headers
4771076b9443SCy Schubert  # can be detected and how.
4772076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4773076b9443SCy Schubert/* end confdefs.h.  */
4774076b9443SCy Schubert#include <ac_nonexistent.h>
4775076b9443SCy Schubert_ACEOF
477670b56f4bSCy Schubertif ac_fn_c_try_cpp "$LINENO"
477770b56f4bSCy Schubertthen :
4778076b9443SCy Schubert  # Broken: success on invalid input.
4779076b9443SCy Schubertcontinue
478070b56f4bSCy Schubertelse $as_nop
4781076b9443SCy Schubert  # Passes both tests.
4782076b9443SCy Schubertac_preproc_ok=:
4783076b9443SCy Schubertbreak
4784076b9443SCy Schubertfi
4785076b9443SCy Schubertrm -f conftest.err conftest.i conftest.$ac_ext
4786076b9443SCy Schubert
4787076b9443SCy Schubertdone
4788076b9443SCy Schubert# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4789076b9443SCy Schubertrm -f conftest.i conftest.err conftest.$ac_ext
479070b56f4bSCy Schubertif $ac_preproc_ok
479170b56f4bSCy Schubertthen :
4792076b9443SCy Schubert  break
4793076b9443SCy Schubertfi
4794076b9443SCy Schubert
4795076b9443SCy Schubert    done
4796076b9443SCy Schubert    ac_cv_prog_CPP=$CPP
4797076b9443SCy Schubert
4798076b9443SCy Schubertfi
4799076b9443SCy Schubert  CPP=$ac_cv_prog_CPP
4800076b9443SCy Schubertelse
4801076b9443SCy Schubert  ac_cv_prog_CPP=$CPP
4802076b9443SCy Schubertfi
480370b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
480470b56f4bSCy Schubertprintf "%s\n" "$CPP" >&6; }
4805076b9443SCy Schubertac_preproc_ok=false
4806076b9443SCy Schubertfor ac_c_preproc_warn_flag in '' yes
4807076b9443SCy Schubertdo
4808076b9443SCy Schubert  # Use a header file that comes with gcc, so configuring glibc
4809076b9443SCy Schubert  # with a fresh cross-compiler works.
4810076b9443SCy Schubert  # On the NeXT, cc -E runs the code through the compiler's parser,
4811076b9443SCy Schubert  # not just through cpp. "Syntax error" is here to catch this case.
4812076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4813076b9443SCy Schubert/* end confdefs.h.  */
4814076b9443SCy Schubert#include <limits.h>
4815076b9443SCy Schubert		     Syntax error
4816076b9443SCy Schubert_ACEOF
481770b56f4bSCy Schubertif ac_fn_c_try_cpp "$LINENO"
481870b56f4bSCy Schubertthen :
4819076b9443SCy Schubert
482070b56f4bSCy Schubertelse $as_nop
4821076b9443SCy Schubert  # Broken: fails on valid input.
4822076b9443SCy Schubertcontinue
4823076b9443SCy Schubertfi
4824076b9443SCy Schubertrm -f conftest.err conftest.i conftest.$ac_ext
4825076b9443SCy Schubert
4826076b9443SCy Schubert  # OK, works on sane cases.  Now check whether nonexistent headers
4827076b9443SCy Schubert  # can be detected and how.
4828076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4829076b9443SCy Schubert/* end confdefs.h.  */
4830076b9443SCy Schubert#include <ac_nonexistent.h>
4831076b9443SCy Schubert_ACEOF
483270b56f4bSCy Schubertif ac_fn_c_try_cpp "$LINENO"
483370b56f4bSCy Schubertthen :
4834076b9443SCy Schubert  # Broken: success on invalid input.
4835076b9443SCy Schubertcontinue
483670b56f4bSCy Schubertelse $as_nop
4837076b9443SCy Schubert  # Passes both tests.
4838076b9443SCy Schubertac_preproc_ok=:
4839076b9443SCy Schubertbreak
4840076b9443SCy Schubertfi
4841076b9443SCy Schubertrm -f conftest.err conftest.i conftest.$ac_ext
4842076b9443SCy Schubert
4843076b9443SCy Schubertdone
4844076b9443SCy Schubert# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4845076b9443SCy Schubertrm -f conftest.i conftest.err conftest.$ac_ext
484670b56f4bSCy Schubertif $ac_preproc_ok
484770b56f4bSCy Schubertthen :
4848076b9443SCy Schubert
484970b56f4bSCy Schubertelse $as_nop
485070b56f4bSCy Schubert  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
485170b56f4bSCy Schubertprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4852076b9443SCy Schubertas_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4853076b9443SCy SchubertSee \`config.log' for more details" "$LINENO" 5; }
4854076b9443SCy Schubertfi
4855076b9443SCy Schubert
4856076b9443SCy Schubertac_ext=c
4857076b9443SCy Schubertac_cpp='$CPP $CPPFLAGS'
4858076b9443SCy Schubertac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4859076b9443SCy Schubertac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4860076b9443SCy Schubertac_compiler_gnu=$ac_cv_c_compiler_gnu
4861076b9443SCy Schubert
4862076b9443SCy Schubert
4863076b9443SCy Schubert    #--------------------------------------------------------------------
4864076b9443SCy Schubert    # Checks to see if the make program sets the $MAKE variable.
4865076b9443SCy Schubert    #--------------------------------------------------------------------
4866076b9443SCy Schubert
486770b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
486870b56f4bSCy Schubertprintf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4869076b9443SCy Schubertset x ${MAKE-make}
487070b56f4bSCy Schubertac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
487170b56f4bSCy Schubertif eval test \${ac_cv_prog_make_${ac_make}_set+y}
487270b56f4bSCy Schubertthen :
487370b56f4bSCy Schubert  printf %s "(cached) " >&6
487470b56f4bSCy Schubertelse $as_nop
4875076b9443SCy Schubert  cat >conftest.make <<\_ACEOF
4876076b9443SCy SchubertSHELL = /bin/sh
4877076b9443SCy Schubertall:
4878076b9443SCy Schubert	@echo '@@@%%%=$(MAKE)=@@@%%%'
4879076b9443SCy Schubert_ACEOF
4880076b9443SCy Schubert# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4881076b9443SCy Schubertcase `${MAKE-make} -f conftest.make 2>/dev/null` in
4882076b9443SCy Schubert  *@@@%%%=?*=@@@%%%*)
4883076b9443SCy Schubert    eval ac_cv_prog_make_${ac_make}_set=yes;;
4884076b9443SCy Schubert  *)
4885076b9443SCy Schubert    eval ac_cv_prog_make_${ac_make}_set=no;;
4886076b9443SCy Schubertesac
4887076b9443SCy Schubertrm -f conftest.make
4888076b9443SCy Schubertfi
4889076b9443SCy Schubertif eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
489070b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
489170b56f4bSCy Schubertprintf "%s\n" "yes" >&6; }
4892076b9443SCy Schubert  SET_MAKE=
4893076b9443SCy Schubertelse
489470b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
489570b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
4896076b9443SCy Schubert  SET_MAKE="MAKE=${MAKE-make}"
4897076b9443SCy Schubertfi
4898076b9443SCy Schubert
4899076b9443SCy Schubert
4900076b9443SCy Schubert    #--------------------------------------------------------------------
4901076b9443SCy Schubert    # Find ranlib
4902076b9443SCy Schubert    #--------------------------------------------------------------------
4903076b9443SCy Schubert
4904076b9443SCy Schubert    if test -n "$ac_tool_prefix"; then
4905076b9443SCy Schubert  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4906076b9443SCy Schubertset dummy ${ac_tool_prefix}ranlib; ac_word=$2
490770b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
490870b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
490970b56f4bSCy Schubertif test ${ac_cv_prog_RANLIB+y}
491070b56f4bSCy Schubertthen :
491170b56f4bSCy Schubert  printf %s "(cached) " >&6
491270b56f4bSCy Schubertelse $as_nop
4913076b9443SCy Schubert  if test -n "$RANLIB"; then
4914076b9443SCy Schubert  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4915076b9443SCy Schubertelse
4916076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4917076b9443SCy Schubertfor as_dir in $PATH
4918076b9443SCy Schubertdo
4919076b9443SCy Schubert  IFS=$as_save_IFS
492070b56f4bSCy Schubert  case $as_dir in #(((
492170b56f4bSCy Schubert    '') as_dir=./ ;;
492270b56f4bSCy Schubert    */) ;;
492370b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
492470b56f4bSCy Schubert  esac
4925076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
492670b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4927076b9443SCy Schubert    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
492870b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4929076b9443SCy Schubert    break 2
4930076b9443SCy Schubert  fi
4931076b9443SCy Schubertdone
4932076b9443SCy Schubert  done
4933076b9443SCy SchubertIFS=$as_save_IFS
4934076b9443SCy Schubert
4935076b9443SCy Schubertfi
4936076b9443SCy Schubertfi
4937076b9443SCy SchubertRANLIB=$ac_cv_prog_RANLIB
4938076b9443SCy Schubertif test -n "$RANLIB"; then
493970b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
494070b56f4bSCy Schubertprintf "%s\n" "$RANLIB" >&6; }
4941076b9443SCy Schubertelse
494270b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
494370b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
4944076b9443SCy Schubertfi
4945076b9443SCy Schubert
4946076b9443SCy Schubert
4947076b9443SCy Schubertfi
4948076b9443SCy Schubertif test -z "$ac_cv_prog_RANLIB"; then
4949076b9443SCy Schubert  ac_ct_RANLIB=$RANLIB
4950076b9443SCy Schubert  # Extract the first word of "ranlib", so it can be a program name with args.
4951076b9443SCy Schubertset dummy ranlib; ac_word=$2
495270b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
495370b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
495470b56f4bSCy Schubertif test ${ac_cv_prog_ac_ct_RANLIB+y}
495570b56f4bSCy Schubertthen :
495670b56f4bSCy Schubert  printf %s "(cached) " >&6
495770b56f4bSCy Schubertelse $as_nop
4958076b9443SCy Schubert  if test -n "$ac_ct_RANLIB"; then
4959076b9443SCy Schubert  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4960076b9443SCy Schubertelse
4961076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4962076b9443SCy Schubertfor as_dir in $PATH
4963076b9443SCy Schubertdo
4964076b9443SCy Schubert  IFS=$as_save_IFS
496570b56f4bSCy Schubert  case $as_dir in #(((
496670b56f4bSCy Schubert    '') as_dir=./ ;;
496770b56f4bSCy Schubert    */) ;;
496870b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
496970b56f4bSCy Schubert  esac
4970076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
497170b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4972076b9443SCy Schubert    ac_cv_prog_ac_ct_RANLIB="ranlib"
497370b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4974076b9443SCy Schubert    break 2
4975076b9443SCy Schubert  fi
4976076b9443SCy Schubertdone
4977076b9443SCy Schubert  done
4978076b9443SCy SchubertIFS=$as_save_IFS
4979076b9443SCy Schubert
4980076b9443SCy Schubertfi
4981076b9443SCy Schubertfi
4982076b9443SCy Schubertac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4983076b9443SCy Schubertif test -n "$ac_ct_RANLIB"; then
498470b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
498570b56f4bSCy Schubertprintf "%s\n" "$ac_ct_RANLIB" >&6; }
4986076b9443SCy Schubertelse
498770b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
498870b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
4989076b9443SCy Schubertfi
4990076b9443SCy Schubert
4991076b9443SCy Schubert  if test "x$ac_ct_RANLIB" = x; then
4992076b9443SCy Schubert    RANLIB=""
4993076b9443SCy Schubert  else
4994076b9443SCy Schubert    case $cross_compiling:$ac_tool_warned in
4995076b9443SCy Schubertyes:)
499670b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
499770b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4998076b9443SCy Schubertac_tool_warned=yes ;;
4999076b9443SCy Schubertesac
5000076b9443SCy Schubert    RANLIB=$ac_ct_RANLIB
5001076b9443SCy Schubert  fi
5002076b9443SCy Schubertelse
5003076b9443SCy Schubert  RANLIB="$ac_cv_prog_RANLIB"
5004076b9443SCy Schubertfi
5005076b9443SCy Schubert
5006076b9443SCy Schubert
5007076b9443SCy Schubert    #--------------------------------------------------------------------
5008076b9443SCy Schubert    # Determines the correct binary file extension (.o, .obj, .exe etc.)
5009076b9443SCy Schubert    #--------------------------------------------------------------------
5010076b9443SCy Schubert
5011076b9443SCy Schubert
5012076b9443SCy Schubert
5013076b9443SCy Schubert
501470b56f4bSCy Schubertac_header= ac_cache=
501570b56f4bSCy Schubertfor ac_item in $ac_header_c_list
501670b56f4bSCy Schubertdo
501770b56f4bSCy Schubert  if test $ac_cache; then
501870b56f4bSCy Schubert    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
501970b56f4bSCy Schubert    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
502070b56f4bSCy Schubert      printf "%s\n" "#define $ac_item 1" >> confdefs.h
502170b56f4bSCy Schubert    fi
502270b56f4bSCy Schubert    ac_header= ac_cache=
502370b56f4bSCy Schubert  elif test $ac_header; then
502470b56f4bSCy Schubert    ac_cache=$ac_item
5025076b9443SCy Schubert  else
502670b56f4bSCy Schubert    ac_header=$ac_item
502770b56f4bSCy Schubert  fi
502870b56f4bSCy Schubertdone
502970b56f4bSCy Schubert
503070b56f4bSCy Schubert
503170b56f4bSCy Schubert
503270b56f4bSCy Schubert
503370b56f4bSCy Schubert
503470b56f4bSCy Schubert
503570b56f4bSCy Schubert
503670b56f4bSCy Schubert
503770b56f4bSCy Schubertif test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
503870b56f4bSCy Schubertthen :
503970b56f4bSCy Schubert
504070b56f4bSCy Schubertprintf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
504170b56f4bSCy Schubert
504270b56f4bSCy Schubertfi
504370b56f4bSCy Schubert
5044076b9443SCy Schubert    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
5045076b9443SCy Schubert
5046076b9443SCy Schubert
5047076b9443SCy Schubert    #------------------------------------------------------------------------
5048076b9443SCy Schubert    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
5049076b9443SCy Schubert    # It makes compiling go faster.  (This is only a performance feature.)
5050076b9443SCy Schubert    #------------------------------------------------------------------------
5051076b9443SCy Schubert
5052076b9443SCy Schubert    if test -z "$no_pipe" -a -n "$GCC"; then
505370b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5
505470b56f4bSCy Schubertprintf %s "checking if the compiler understands -pipe... " >&6; }
505570b56f4bSCy Schubertif test ${tcl_cv_cc_pipe+y}
505670b56f4bSCy Schubertthen :
505770b56f4bSCy Schubert  printf %s "(cached) " >&6
505870b56f4bSCy Schubertelse $as_nop
5059076b9443SCy Schubert
5060076b9443SCy Schubert	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
5061076b9443SCy Schubert	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5062076b9443SCy Schubert/* end confdefs.h.  */
5063076b9443SCy Schubert
5064076b9443SCy Schubertint
506570b56f4bSCy Schubertmain (void)
5066076b9443SCy Schubert{
5067076b9443SCy Schubert
5068076b9443SCy Schubert  ;
5069076b9443SCy Schubert  return 0;
5070076b9443SCy Schubert}
5071076b9443SCy Schubert_ACEOF
507270b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
507370b56f4bSCy Schubertthen :
5074076b9443SCy Schubert  tcl_cv_cc_pipe=yes
507570b56f4bSCy Schubertelse $as_nop
5076076b9443SCy Schubert  tcl_cv_cc_pipe=no
5077076b9443SCy Schubertfi
507870b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5079076b9443SCy Schubert	    CFLAGS=$hold_cflags
5080076b9443SCy Schubertfi
508170b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5
508270b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_cc_pipe" >&6; }
5083076b9443SCy Schubert	if test $tcl_cv_cc_pipe = yes; then
5084076b9443SCy Schubert	    CFLAGS="$CFLAGS -pipe"
5085076b9443SCy Schubert	fi
5086076b9443SCy Schubert    fi
5087076b9443SCy Schubert
5088076b9443SCy Schubert    #--------------------------------------------------------------------
5089076b9443SCy Schubert    # Common compiler flag setup
5090076b9443SCy Schubert    #--------------------------------------------------------------------
5091076b9443SCy Schubert
509270b56f4bSCy Schubert     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
509370b56f4bSCy Schubertprintf %s "checking whether byte ordering is bigendian... " >&6; }
509470b56f4bSCy Schubertif test ${ac_cv_c_bigendian+y}
509570b56f4bSCy Schubertthen :
509670b56f4bSCy Schubert  printf %s "(cached) " >&6
509770b56f4bSCy Schubertelse $as_nop
5098076b9443SCy Schubert  ac_cv_c_bigendian=unknown
5099076b9443SCy Schubert    # See if we're dealing with a universal compiler.
5100076b9443SCy Schubert    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5101076b9443SCy Schubert/* end confdefs.h.  */
5102076b9443SCy Schubert#ifndef __APPLE_CC__
5103076b9443SCy Schubert	       not a universal capable compiler
5104076b9443SCy Schubert	     #endif
5105076b9443SCy Schubert	     typedef int dummy;
5106076b9443SCy Schubert
5107076b9443SCy Schubert_ACEOF
510870b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
510970b56f4bSCy Schubertthen :
5110076b9443SCy Schubert
5111076b9443SCy Schubert	# Check for potential -arch flags.  It is not universal unless
5112076b9443SCy Schubert	# there are at least two -arch flags with different values.
5113076b9443SCy Schubert	ac_arch=
5114076b9443SCy Schubert	ac_prev=
5115076b9443SCy Schubert	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
5116076b9443SCy Schubert	 if test -n "$ac_prev"; then
5117076b9443SCy Schubert	   case $ac_word in
5118076b9443SCy Schubert	     i?86 | x86_64 | ppc | ppc64)
5119076b9443SCy Schubert	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
5120076b9443SCy Schubert		 ac_arch=$ac_word
5121076b9443SCy Schubert	       else
5122076b9443SCy Schubert		 ac_cv_c_bigendian=universal
5123076b9443SCy Schubert		 break
5124076b9443SCy Schubert	       fi
5125076b9443SCy Schubert	       ;;
5126076b9443SCy Schubert	   esac
5127076b9443SCy Schubert	   ac_prev=
5128076b9443SCy Schubert	 elif test "x$ac_word" = "x-arch"; then
5129076b9443SCy Schubert	   ac_prev=arch
5130076b9443SCy Schubert	 fi
5131076b9443SCy Schubert       done
5132076b9443SCy Schubertfi
513370b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5134076b9443SCy Schubert    if test $ac_cv_c_bigendian = unknown; then
5135076b9443SCy Schubert      # See if sys/param.h defines the BYTE_ORDER macro.
5136076b9443SCy Schubert      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5137076b9443SCy Schubert/* end confdefs.h.  */
5138076b9443SCy Schubert#include <sys/types.h>
5139076b9443SCy Schubert	     #include <sys/param.h>
5140076b9443SCy Schubert
5141076b9443SCy Schubertint
514270b56f4bSCy Schubertmain (void)
5143076b9443SCy Schubert{
5144076b9443SCy Schubert#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
5145076b9443SCy Schubert		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
5146076b9443SCy Schubert		     && LITTLE_ENDIAN)
5147076b9443SCy Schubert	      bogus endian macros
5148076b9443SCy Schubert	     #endif
5149076b9443SCy Schubert
5150076b9443SCy Schubert  ;
5151076b9443SCy Schubert  return 0;
5152076b9443SCy Schubert}
5153076b9443SCy Schubert_ACEOF
515470b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
515570b56f4bSCy Schubertthen :
5156076b9443SCy Schubert  # It does; now see whether it defined to BIG_ENDIAN or not.
5157076b9443SCy Schubert	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5158076b9443SCy Schubert/* end confdefs.h.  */
5159076b9443SCy Schubert#include <sys/types.h>
5160076b9443SCy Schubert		#include <sys/param.h>
5161076b9443SCy Schubert
5162076b9443SCy Schubertint
516370b56f4bSCy Schubertmain (void)
5164076b9443SCy Schubert{
5165076b9443SCy Schubert#if BYTE_ORDER != BIG_ENDIAN
5166076b9443SCy Schubert		 not big endian
5167076b9443SCy Schubert		#endif
5168076b9443SCy Schubert
5169076b9443SCy Schubert  ;
5170076b9443SCy Schubert  return 0;
5171076b9443SCy Schubert}
5172076b9443SCy Schubert_ACEOF
517370b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
517470b56f4bSCy Schubertthen :
5175076b9443SCy Schubert  ac_cv_c_bigendian=yes
517670b56f4bSCy Schubertelse $as_nop
5177076b9443SCy Schubert  ac_cv_c_bigendian=no
5178076b9443SCy Schubertfi
517970b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5180076b9443SCy Schubertfi
518170b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5182076b9443SCy Schubert    fi
5183076b9443SCy Schubert    if test $ac_cv_c_bigendian = unknown; then
5184076b9443SCy Schubert      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
5185076b9443SCy Schubert      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5186076b9443SCy Schubert/* end confdefs.h.  */
5187076b9443SCy Schubert#include <limits.h>
5188076b9443SCy Schubert
5189076b9443SCy Schubertint
519070b56f4bSCy Schubertmain (void)
5191076b9443SCy Schubert{
5192076b9443SCy Schubert#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
5193076b9443SCy Schubert	      bogus endian macros
5194076b9443SCy Schubert	     #endif
5195076b9443SCy Schubert
5196076b9443SCy Schubert  ;
5197076b9443SCy Schubert  return 0;
5198076b9443SCy Schubert}
5199076b9443SCy Schubert_ACEOF
520070b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
520170b56f4bSCy Schubertthen :
5202076b9443SCy Schubert  # It does; now see whether it defined to _BIG_ENDIAN or not.
5203076b9443SCy Schubert	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5204076b9443SCy Schubert/* end confdefs.h.  */
5205076b9443SCy Schubert#include <limits.h>
5206076b9443SCy Schubert
5207076b9443SCy Schubertint
520870b56f4bSCy Schubertmain (void)
5209076b9443SCy Schubert{
5210076b9443SCy Schubert#ifndef _BIG_ENDIAN
5211076b9443SCy Schubert		 not big endian
5212076b9443SCy Schubert		#endif
5213076b9443SCy Schubert
5214076b9443SCy Schubert  ;
5215076b9443SCy Schubert  return 0;
5216076b9443SCy Schubert}
5217076b9443SCy Schubert_ACEOF
521870b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
521970b56f4bSCy Schubertthen :
5220076b9443SCy Schubert  ac_cv_c_bigendian=yes
522170b56f4bSCy Schubertelse $as_nop
5222076b9443SCy Schubert  ac_cv_c_bigendian=no
5223076b9443SCy Schubertfi
522470b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5225076b9443SCy Schubertfi
522670b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5227076b9443SCy Schubert    fi
5228076b9443SCy Schubert    if test $ac_cv_c_bigendian = unknown; then
5229076b9443SCy Schubert      # Compile a test program.
523070b56f4bSCy Schubert      if test "$cross_compiling" = yes
523170b56f4bSCy Schubertthen :
5232076b9443SCy Schubert  # Try to guess by grepping values from an object file.
5233076b9443SCy Schubert	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5234076b9443SCy Schubert/* end confdefs.h.  */
523570b56f4bSCy Schubertunsigned short int ascii_mm[] =
5236076b9443SCy Schubert		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
523770b56f4bSCy Schubert		unsigned short int ascii_ii[] =
5238076b9443SCy Schubert		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
5239076b9443SCy Schubert		int use_ascii (int i) {
5240076b9443SCy Schubert		  return ascii_mm[i] + ascii_ii[i];
5241076b9443SCy Schubert		}
524270b56f4bSCy Schubert		unsigned short int ebcdic_ii[] =
5243076b9443SCy Schubert		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
524470b56f4bSCy Schubert		unsigned short int ebcdic_mm[] =
5245076b9443SCy Schubert		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
5246076b9443SCy Schubert		int use_ebcdic (int i) {
5247076b9443SCy Schubert		  return ebcdic_mm[i] + ebcdic_ii[i];
5248076b9443SCy Schubert		}
5249076b9443SCy Schubert		extern int foo;
5250076b9443SCy Schubert
5251076b9443SCy Schubertint
525270b56f4bSCy Schubertmain (void)
5253076b9443SCy Schubert{
5254076b9443SCy Schubertreturn use_ascii (foo) == use_ebcdic (foo);
5255076b9443SCy Schubert  ;
5256076b9443SCy Schubert  return 0;
5257076b9443SCy Schubert}
5258076b9443SCy Schubert_ACEOF
525970b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
526070b56f4bSCy Schubertthen :
5261076b9443SCy Schubert  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
5262076b9443SCy Schubert	      ac_cv_c_bigendian=yes
5263076b9443SCy Schubert	    fi
5264076b9443SCy Schubert	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
5265076b9443SCy Schubert	      if test "$ac_cv_c_bigendian" = unknown; then
5266076b9443SCy Schubert		ac_cv_c_bigendian=no
5267076b9443SCy Schubert	      else
5268076b9443SCy Schubert		# finding both strings is unlikely to happen, but who knows?
5269076b9443SCy Schubert		ac_cv_c_bigendian=unknown
5270076b9443SCy Schubert	      fi
5271076b9443SCy Schubert	    fi
5272076b9443SCy Schubertfi
527370b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
527470b56f4bSCy Schubertelse $as_nop
5275076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5276076b9443SCy Schubert/* end confdefs.h.  */
5277076b9443SCy Schubert$ac_includes_default
5278076b9443SCy Schubertint
527970b56f4bSCy Schubertmain (void)
5280076b9443SCy Schubert{
5281076b9443SCy Schubert
5282076b9443SCy Schubert	     /* Are we little or big endian?  From Harbison&Steele.  */
5283076b9443SCy Schubert	     union
5284076b9443SCy Schubert	     {
5285076b9443SCy Schubert	       long int l;
5286076b9443SCy Schubert	       char c[sizeof (long int)];
5287076b9443SCy Schubert	     } u;
5288076b9443SCy Schubert	     u.l = 1;
5289076b9443SCy Schubert	     return u.c[sizeof (long int) - 1] == 1;
5290076b9443SCy Schubert
5291076b9443SCy Schubert  ;
5292076b9443SCy Schubert  return 0;
5293076b9443SCy Schubert}
5294076b9443SCy Schubert_ACEOF
529570b56f4bSCy Schubertif ac_fn_c_try_run "$LINENO"
529670b56f4bSCy Schubertthen :
5297076b9443SCy Schubert  ac_cv_c_bigendian=no
529870b56f4bSCy Schubertelse $as_nop
5299076b9443SCy Schubert  ac_cv_c_bigendian=yes
5300076b9443SCy Schubertfi
5301076b9443SCy Schubertrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5302076b9443SCy Schubert  conftest.$ac_objext conftest.beam conftest.$ac_ext
5303076b9443SCy Schubertfi
5304076b9443SCy Schubert
5305076b9443SCy Schubert    fi
5306076b9443SCy Schubertfi
530770b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
530870b56f4bSCy Schubertprintf "%s\n" "$ac_cv_c_bigendian" >&6; }
5309076b9443SCy Schubert case $ac_cv_c_bigendian in #(
5310076b9443SCy Schubert   yes)
531170b56f4bSCy Schubert     printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
5312076b9443SCy Schubert;; #(
5313076b9443SCy Schubert   no)
5314076b9443SCy Schubert      ;; #(
5315076b9443SCy Schubert   universal)
5316076b9443SCy Schubert
531770b56f4bSCy Schubertprintf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5318076b9443SCy Schubert
5319076b9443SCy Schubert     ;; #(
5320076b9443SCy Schubert   *)
5321076b9443SCy Schubert     as_fn_error $? "unknown endianness
5322076b9443SCy Schubert presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
5323076b9443SCy Schubert esac
5324076b9443SCy Schubert
5325076b9443SCy Schubert
5326076b9443SCy Schubert
5327076b9443SCy Schubert#-----------------------------------------------------------------------
5328076b9443SCy Schubert# __CHANGE__
5329076b9443SCy Schubert# Specify the C source files to compile in TEA_ADD_SOURCES,
5330076b9443SCy Schubert# public headers that need to be installed in TEA_ADD_HEADERS,
5331076b9443SCy Schubert# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
5332076b9443SCy Schubert# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
5333076b9443SCy Schubert# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
5334076b9443SCy Schubert# and PKG_TCL_SOURCES.
5335076b9443SCy Schubert#-----------------------------------------------------------------------
5336076b9443SCy Schubert
5337076b9443SCy Schubert
5338076b9443SCy Schubert    vars="tclsqlite3.c"
5339076b9443SCy Schubert    for i in $vars; do
5340076b9443SCy Schubert	case $i in
5341076b9443SCy Schubert	    \$*)
5342076b9443SCy Schubert		# allow $-var names
5343076b9443SCy Schubert		PKG_SOURCES="$PKG_SOURCES $i"
5344076b9443SCy Schubert		PKG_OBJECTS="$PKG_OBJECTS $i"
5345076b9443SCy Schubert		;;
5346076b9443SCy Schubert	    *)
5347076b9443SCy Schubert		# check for existence - allows for generic/win/unix VPATH
5348076b9443SCy Schubert		# To add more dirs here (like 'src'), you have to update VPATH
5349076b9443SCy Schubert		# in Makefile.in as well
5350076b9443SCy Schubert		if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
5351076b9443SCy Schubert		    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
5352076b9443SCy Schubert		    -a ! -f "${srcdir}/macosx/$i" \
5353076b9443SCy Schubert		    ; then
5354076b9443SCy Schubert		    as_fn_error $? "could not find source file '$i'" "$LINENO" 5
5355076b9443SCy Schubert		fi
5356076b9443SCy Schubert		PKG_SOURCES="$PKG_SOURCES $i"
5357076b9443SCy Schubert		# this assumes it is in a VPATH dir
5358076b9443SCy Schubert		i=`basename $i`
5359076b9443SCy Schubert		# handle user calling this before or after TEA_SETUP_COMPILER
5360076b9443SCy Schubert		if test x"${OBJEXT}" != x ; then
5361076b9443SCy Schubert		    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
5362076b9443SCy Schubert		else
5363076b9443SCy Schubert		    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
5364076b9443SCy Schubert		fi
5365076b9443SCy Schubert		PKG_OBJECTS="$PKG_OBJECTS $j"
5366076b9443SCy Schubert		;;
5367076b9443SCy Schubert	esac
5368076b9443SCy Schubert    done
5369076b9443SCy Schubert
5370076b9443SCy Schubert
5371076b9443SCy Schubert
5372076b9443SCy Schubert
5373076b9443SCy Schubert    vars=""
5374076b9443SCy Schubert    for i in $vars; do
5375076b9443SCy Schubert	# check for existence, be strict because it is installed
5376076b9443SCy Schubert	if test ! -f "${srcdir}/$i" ; then
5377076b9443SCy Schubert	    as_fn_error $? "could not find header file '${srcdir}/$i'" "$LINENO" 5
5378076b9443SCy Schubert	fi
5379076b9443SCy Schubert	PKG_HEADERS="$PKG_HEADERS $i"
5380076b9443SCy Schubert    done
5381076b9443SCy Schubert
5382076b9443SCy Schubert
5383076b9443SCy Schubert
538400787218SCy Schubert    vars=""
5385076b9443SCy Schubert    for i in $vars; do
5386076b9443SCy Schubert	PKG_INCLUDES="$PKG_INCLUDES $i"
5387076b9443SCy Schubert    done
5388076b9443SCy Schubert
5389076b9443SCy Schubert
5390076b9443SCy Schubert
5391076b9443SCy Schubert    vars=""
5392076b9443SCy Schubert    for i in $vars; do
5393076b9443SCy Schubert	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5394076b9443SCy Schubert	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
539500787218SCy Schubert	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
5396076b9443SCy Schubert	fi
5397076b9443SCy Schubert	PKG_LIBS="$PKG_LIBS $i"
5398076b9443SCy Schubert    done
5399076b9443SCy Schubert
5400076b9443SCy Schubert
5401076b9443SCy Schubert
5402076b9443SCy Schubert    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_ENABLE_FTS3=1"
5403076b9443SCy Schubert
5404076b9443SCy Schubert
5405076b9443SCy Schubert
540600787218SCy Schubert    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_ENABLE_FTS4=1"
540700787218SCy Schubert
540800787218SCy Schubert
540900787218SCy Schubert
541000787218SCy Schubert    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_ENABLE_FTS5=1"
541100787218SCy Schubert
541200787218SCy Schubert
541300787218SCy Schubert
5414076b9443SCy Schubert    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_3_SUFFIX_ONLY=1"
5415076b9443SCy Schubert
5416076b9443SCy Schubert
5417076b9443SCy Schubert
5418076b9443SCy Schubert    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_ENABLE_RTREE=1"
5419076b9443SCy Schubert
5420076b9443SCy Schubert
5421076b9443SCy Schubert
542200787218SCy Schubert    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_ENABLE_GEOPOLY=1"
542300787218SCy Schubert
542400787218SCy Schubert
542500787218SCy Schubert
542600787218SCy Schubert    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_ENABLE_MATH_FUNCTIONS=1"
542700787218SCy Schubert
542800787218SCy Schubert
542900787218SCy Schubert
543000787218SCy Schubert    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_ENABLE_DESERIALIZE=1"
543100787218SCy Schubert
543200787218SCy Schubert
543300787218SCy Schubert
543400787218SCy Schubert    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_ENABLE_DBPAGE_VTAB=1"
543500787218SCy Schubert
543600787218SCy Schubert
543700787218SCy Schubert
543800787218SCy Schubert    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_ENABLE_BYTECODE_VTAB=1"
543900787218SCy Schubert
544000787218SCy Schubert
544100787218SCy Schubert
544200787218SCy Schubert    PKG_CFLAGS="$PKG_CFLAGS -DSQLITE_ENABLE_DBSTAT_VTAB=1"
544300787218SCy Schubert
544400787218SCy Schubert
544500787218SCy Schubert
5446076b9443SCy Schubert    vars=""
5447076b9443SCy Schubert    for i in $vars; do
5448076b9443SCy Schubert	# check for existence - allows for generic/win/unix VPATH
5449076b9443SCy Schubert	if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
5450076b9443SCy Schubert	    -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
5451076b9443SCy Schubert	    -a ! -f "${srcdir}/macosx/$i" \
5452076b9443SCy Schubert	    ; then
5453076b9443SCy Schubert	    as_fn_error $? "could not find stub source file '$i'" "$LINENO" 5
5454076b9443SCy Schubert	fi
5455076b9443SCy Schubert	PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
5456076b9443SCy Schubert	# this assumes it is in a VPATH dir
5457076b9443SCy Schubert	i=`basename $i`
5458076b9443SCy Schubert	# handle user calling this before or after TEA_SETUP_COMPILER
5459076b9443SCy Schubert	if test x"${OBJEXT}" != x ; then
5460076b9443SCy Schubert	    j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
5461076b9443SCy Schubert	else
5462076b9443SCy Schubert	    j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
5463076b9443SCy Schubert	fi
5464076b9443SCy Schubert	PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
5465076b9443SCy Schubert    done
5466076b9443SCy Schubert
5467076b9443SCy Schubert
5468076b9443SCy Schubert
5469076b9443SCy Schubert
5470076b9443SCy Schubert    vars=""
5471076b9443SCy Schubert    for i in $vars; do
5472076b9443SCy Schubert	# check for existence, be strict because it is installed
5473076b9443SCy Schubert	if test ! -f "${srcdir}/$i" ; then
5474076b9443SCy Schubert	    as_fn_error $? "could not find tcl source file '${srcdir}/$i'" "$LINENO" 5
5475076b9443SCy Schubert	fi
5476076b9443SCy Schubert	PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
5477076b9443SCy Schubert    done
5478076b9443SCy Schubert
5479076b9443SCy Schubert
5480076b9443SCy Schubert
5481076b9443SCy Schubert#--------------------------------------------------------------------
5482076b9443SCy Schubert# The --with-system-sqlite causes the TCL bindings to SQLite to use
5483076b9443SCy Schubert# the system shared library for SQLite rather than statically linking
5484076b9443SCy Schubert# against its own private copy.  This is dangerous and leads to
5485076b9443SCy Schubert# undersirable dependences and is not recommended.
5486076b9443SCy Schubert# Patchs from rmax.
5487076b9443SCy Schubert#--------------------------------------------------------------------
5488076b9443SCy Schubert
5489076b9443SCy Schubert# Check whether --with-system-sqlite was given.
549070b56f4bSCy Schubertif test ${with_system_sqlite+y}
549170b56f4bSCy Schubertthen :
5492076b9443SCy Schubert  withval=$with_system_sqlite;
549370b56f4bSCy Schubertelse $as_nop
5494076b9443SCy Schubert  with_system_sqlite=no
5495076b9443SCy Schubertfi
5496076b9443SCy Schubert
5497076b9443SCy Schubertif test x$with_system_sqlite != xno; then
549870b56f4bSCy Schubert ac_fn_c_check_header_compile "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
549970b56f4bSCy Schubertif test "x$ac_cv_header_sqlite3_h" = xyes
550070b56f4bSCy Schubertthen :
550170b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3_initialize in -lsqlite3" >&5
550270b56f4bSCy Schubertprintf %s "checking for sqlite3_initialize in -lsqlite3... " >&6; }
550370b56f4bSCy Schubertif test ${ac_cv_lib_sqlite3_sqlite3_initialize+y}
550470b56f4bSCy Schubertthen :
550570b56f4bSCy Schubert  printf %s "(cached) " >&6
550670b56f4bSCy Schubertelse $as_nop
5507076b9443SCy Schubert  ac_check_lib_save_LIBS=$LIBS
5508076b9443SCy SchubertLIBS="-lsqlite3  $LIBS"
5509076b9443SCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
5510076b9443SCy Schubert/* end confdefs.h.  */
5511076b9443SCy Schubert
5512076b9443SCy Schubert/* Override any GCC internal prototype to avoid an error.
5513076b9443SCy Schubert   Use char because int might match the return type of a GCC
5514076b9443SCy Schubert   builtin and then its argument prototype would still apply.  */
5515076b9443SCy Schubertchar sqlite3_initialize ();
5516076b9443SCy Schubertint
551770b56f4bSCy Schubertmain (void)
5518076b9443SCy Schubert{
5519076b9443SCy Schubertreturn sqlite3_initialize ();
5520076b9443SCy Schubert  ;
5521076b9443SCy Schubert  return 0;
5522076b9443SCy Schubert}
5523076b9443SCy Schubert_ACEOF
552470b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
552570b56f4bSCy Schubertthen :
5526076b9443SCy Schubert  ac_cv_lib_sqlite3_sqlite3_initialize=yes
552770b56f4bSCy Schubertelse $as_nop
5528076b9443SCy Schubert  ac_cv_lib_sqlite3_sqlite3_initialize=no
5529076b9443SCy Schubertfi
553070b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
5531076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
5532076b9443SCy SchubertLIBS=$ac_check_lib_save_LIBS
5533076b9443SCy Schubertfi
553470b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_initialize" >&5
553570b56f4bSCy Schubertprintf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_initialize" >&6; }
553670b56f4bSCy Schubertif test "x$ac_cv_lib_sqlite3_sqlite3_initialize" = xyes
553770b56f4bSCy Schubertthen :
553870b56f4bSCy Schubert  printf "%s\n" "#define USE_SYSTEM_SQLITE 1" >>confdefs.h
5539076b9443SCy Schubert
5540076b9443SCy Schubert      LIBS="$LIBS -lsqlite3"
5541076b9443SCy Schubertfi
5542076b9443SCy Schubert
5543076b9443SCy Schubertfi
5544076b9443SCy Schubert
5545076b9443SCy Schubertfi
5546076b9443SCy Schubert
5547076b9443SCy Schubert#--------------------------------------------------------------------
5548076b9443SCy Schubert# __CHANGE__
554900787218SCy Schubert#
555000787218SCy Schubert# You can add more files to clean if your extension creates any extra
555100787218SCy Schubert# files by extending CLEANFILES.
555200787218SCy Schubert# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
555300787218SCy Schubert# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
555400787218SCy Schubert#
555500787218SCy Schubert# A few miscellaneous platform-specific items:
555600787218SCy Schubert# TEA_ADD_* any platform specific compiler/build info here.
555700787218SCy Schubert#--------------------------------------------------------------------
555800787218SCy Schubert
555900787218SCy Schubert#CLEANFILES="$CLEANFILES pkgIndex.tcl"
556000787218SCy Schubertif test "${TEA_PLATFORM}" = "windows" ; then
556100787218SCy Schubert    # Ensure no empty if clauses
556200787218SCy Schubert    :
556300787218SCy Schubert    #TEA_ADD_SOURCES([win/winFile.c])
556400787218SCy Schubert    #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
556500787218SCy Schubertelse
556600787218SCy Schubert    # Ensure no empty else clauses
556700787218SCy Schubert    :
556800787218SCy Schubert    #TEA_ADD_SOURCES([unix/unixFile.c])
556900787218SCy Schubert    #TEA_ADD_LIBS([-lsuperfly])
557000787218SCy Schubertfi
557100787218SCy Schubert
557200787218SCy Schubert#--------------------------------------------------------------------
557300787218SCy Schubert# __CHANGE__
5574076b9443SCy Schubert# Choose which headers you need.  Extension authors should try very
5575076b9443SCy Schubert# hard to only rely on the Tcl public header files.  Internal headers
5576076b9443SCy Schubert# contain private data structures and are subject to change without
5577076b9443SCy Schubert# notice.
5578076b9443SCy Schubert# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
5579076b9443SCy Schubert#--------------------------------------------------------------------
5580076b9443SCy Schubert
5581076b9443SCy Schubert
558270b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl public headers" >&5
558370b56f4bSCy Schubertprintf %s "checking for Tcl public headers... " >&6; }
5584076b9443SCy Schubert
5585076b9443SCy Schubert
5586076b9443SCy Schubert# Check whether --with-tclinclude was given.
558770b56f4bSCy Schubertif test ${with_tclinclude+y}
558870b56f4bSCy Schubertthen :
5589076b9443SCy Schubert  withval=$with_tclinclude; with_tclinclude=${withval}
5590076b9443SCy Schubertfi
5591076b9443SCy Schubert
5592076b9443SCy Schubert
559370b56f4bSCy Schubert    if test ${ac_cv_c_tclh+y}
559470b56f4bSCy Schubertthen :
559570b56f4bSCy Schubert  printf %s "(cached) " >&6
559670b56f4bSCy Schubertelse $as_nop
5597076b9443SCy Schubert
5598076b9443SCy Schubert	# Use the value from --with-tclinclude, if it was given
5599076b9443SCy Schubert
5600076b9443SCy Schubert	if test x"${with_tclinclude}" != x ; then
5601076b9443SCy Schubert	    if test -f "${with_tclinclude}/tcl.h" ; then
5602076b9443SCy Schubert		ac_cv_c_tclh=${with_tclinclude}
5603076b9443SCy Schubert	    else
5604076b9443SCy Schubert		as_fn_error $? "${with_tclinclude} directory does not contain tcl.h" "$LINENO" 5
5605076b9443SCy Schubert	    fi
5606076b9443SCy Schubert	else
5607076b9443SCy Schubert	    list=""
5608076b9443SCy Schubert	    if test "`uname -s`" = "Darwin"; then
5609076b9443SCy Schubert		# If Tcl was built as a framework, attempt to use
5610076b9443SCy Schubert		# the framework's Headers directory
5611076b9443SCy Schubert		case ${TCL_DEFS} in
5612076b9443SCy Schubert		    *TCL_FRAMEWORK*)
5613076b9443SCy Schubert			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
5614076b9443SCy Schubert			;;
5615076b9443SCy Schubert		esac
5616076b9443SCy Schubert	    fi
5617076b9443SCy Schubert
5618076b9443SCy Schubert	    # Look in the source dir only if Tcl is not installed,
5619076b9443SCy Schubert	    # and in that situation, look there before installed locations.
5620076b9443SCy Schubert	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
5621076b9443SCy Schubert		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
5622076b9443SCy Schubert	    fi
5623076b9443SCy Schubert
5624076b9443SCy Schubert	    # Check order: pkg --prefix location, Tcl's --prefix location,
5625076b9443SCy Schubert	    # relative to directory of tclConfig.sh.
5626076b9443SCy Schubert
5627076b9443SCy Schubert	    eval "temp_includedir=${includedir}"
5628076b9443SCy Schubert	    list="$list \
5629076b9443SCy Schubert		`ls -d ${temp_includedir}        2>/dev/null` \
5630076b9443SCy Schubert		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
5631076b9443SCy Schubert		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
5632076b9443SCy Schubert	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
5633076b9443SCy Schubert		list="$list /usr/local/include /usr/include"
5634076b9443SCy Schubert		if test x"${TCL_INCLUDE_SPEC}" != x ; then
5635076b9443SCy Schubert		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
5636076b9443SCy Schubert		    list="$list `ls -d ${d} 2>/dev/null`"
5637076b9443SCy Schubert		fi
5638076b9443SCy Schubert	    fi
5639076b9443SCy Schubert	    for i in $list ; do
5640076b9443SCy Schubert		if test -f "$i/tcl.h" ; then
5641076b9443SCy Schubert		    ac_cv_c_tclh=$i
5642076b9443SCy Schubert		    break
5643076b9443SCy Schubert		fi
5644076b9443SCy Schubert	    done
5645076b9443SCy Schubert	fi
5646076b9443SCy Schubert
5647076b9443SCy Schubertfi
5648076b9443SCy Schubert
5649076b9443SCy Schubert
5650076b9443SCy Schubert    # Print a message based on how we determined the include path
5651076b9443SCy Schubert
5652076b9443SCy Schubert    if test x"${ac_cv_c_tclh}" = x ; then
5653076b9443SCy Schubert	as_fn_error $? "tcl.h not found.  Please specify its location with --with-tclinclude" "$LINENO" 5
5654076b9443SCy Schubert    else
565570b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5
565670b56f4bSCy Schubertprintf "%s\n" "${ac_cv_c_tclh}" >&6; }
5657076b9443SCy Schubert    fi
5658076b9443SCy Schubert
5659076b9443SCy Schubert    # Convert to a native path and substitute into the output files.
5660076b9443SCy Schubert
5661076b9443SCy Schubert    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
5662076b9443SCy Schubert
5663076b9443SCy Schubert    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
5664076b9443SCy Schubert
5665076b9443SCy Schubert
5666076b9443SCy Schubert
5667076b9443SCy Schubert#TEA_PRIVATE_TCL_HEADERS
5668076b9443SCy Schubert
5669076b9443SCy Schubert#TEA_PUBLIC_TK_HEADERS
5670076b9443SCy Schubert#TEA_PRIVATE_TK_HEADERS
5671076b9443SCy Schubert#TEA_PATH_X
5672076b9443SCy Schubert
5673076b9443SCy Schubert#--------------------------------------------------------------------
5674076b9443SCy Schubert# Check whether --enable-threads or --disable-threads was given.
5675076b9443SCy Schubert# This auto-enables if Tcl was compiled threaded.
5676076b9443SCy Schubert#--------------------------------------------------------------------
5677076b9443SCy Schubert
5678076b9443SCy Schubert
5679076b9443SCy Schubert    # Check whether --enable-threads was given.
568070b56f4bSCy Schubertif test ${enable_threads+y}
568170b56f4bSCy Schubertthen :
5682076b9443SCy Schubert  enableval=$enable_threads; tcl_ok=$enableval
568370b56f4bSCy Schubertelse $as_nop
5684076b9443SCy Schubert  tcl_ok=yes
5685076b9443SCy Schubertfi
5686076b9443SCy Schubert
5687076b9443SCy Schubert
5688076b9443SCy Schubert    if test "${enable_threads+set}" = set; then
5689076b9443SCy Schubert	enableval="$enable_threads"
5690076b9443SCy Schubert	tcl_ok=$enableval
5691076b9443SCy Schubert    else
5692076b9443SCy Schubert	tcl_ok=yes
5693076b9443SCy Schubert    fi
5694076b9443SCy Schubert
5695076b9443SCy Schubert    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
5696076b9443SCy Schubert	TCL_THREADS=1
5697076b9443SCy Schubert
5698076b9443SCy Schubert	if test "${TEA_PLATFORM}" != "windows" ; then
5699076b9443SCy Schubert	    # We are always OK on Windows, so check what this platform wants:
5700076b9443SCy Schubert
5701076b9443SCy Schubert	    # USE_THREAD_ALLOC tells us to try the special thread-based
5702076b9443SCy Schubert	    # allocator that significantly reduces lock contention
5703076b9443SCy Schubert
570470b56f4bSCy Schubertprintf "%s\n" "#define USE_THREAD_ALLOC 1" >>confdefs.h
5705076b9443SCy Schubert
5706076b9443SCy Schubert
570770b56f4bSCy Schubertprintf "%s\n" "#define _REENTRANT 1" >>confdefs.h
5708076b9443SCy Schubert
5709076b9443SCy Schubert	    if test "`uname -s`" = "SunOS" ; then
5710076b9443SCy Schubert
571170b56f4bSCy Schubertprintf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5712076b9443SCy Schubert
5713076b9443SCy Schubert	    fi
5714076b9443SCy Schubert
571570b56f4bSCy Schubertprintf "%s\n" "#define _THREAD_SAFE 1" >>confdefs.h
5716076b9443SCy Schubert
571770b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5
571870b56f4bSCy Schubertprintf %s "checking for pthread_mutex_init in -lpthread... " >&6; }
571970b56f4bSCy Schubertif test ${ac_cv_lib_pthread_pthread_mutex_init+y}
572070b56f4bSCy Schubertthen :
572170b56f4bSCy Schubert  printf %s "(cached) " >&6
572270b56f4bSCy Schubertelse $as_nop
5723076b9443SCy Schubert  ac_check_lib_save_LIBS=$LIBS
5724076b9443SCy SchubertLIBS="-lpthread  $LIBS"
5725076b9443SCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
5726076b9443SCy Schubert/* end confdefs.h.  */
5727076b9443SCy Schubert
5728076b9443SCy Schubert/* Override any GCC internal prototype to avoid an error.
5729076b9443SCy Schubert   Use char because int might match the return type of a GCC
5730076b9443SCy Schubert   builtin and then its argument prototype would still apply.  */
5731076b9443SCy Schubertchar pthread_mutex_init ();
5732076b9443SCy Schubertint
573370b56f4bSCy Schubertmain (void)
5734076b9443SCy Schubert{
5735076b9443SCy Schubertreturn pthread_mutex_init ();
5736076b9443SCy Schubert  ;
5737076b9443SCy Schubert  return 0;
5738076b9443SCy Schubert}
5739076b9443SCy Schubert_ACEOF
574070b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
574170b56f4bSCy Schubertthen :
5742076b9443SCy Schubert  ac_cv_lib_pthread_pthread_mutex_init=yes
574370b56f4bSCy Schubertelse $as_nop
5744076b9443SCy Schubert  ac_cv_lib_pthread_pthread_mutex_init=no
5745076b9443SCy Schubertfi
574670b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
5747076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
5748076b9443SCy SchubertLIBS=$ac_check_lib_save_LIBS
5749076b9443SCy Schubertfi
575070b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
575170b56f4bSCy Schubertprintf "%s\n" "$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
575270b56f4bSCy Schubertif test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes
575370b56f4bSCy Schubertthen :
5754076b9443SCy Schubert  tcl_ok=yes
575570b56f4bSCy Schubertelse $as_nop
5756076b9443SCy Schubert  tcl_ok=no
5757076b9443SCy Schubertfi
5758076b9443SCy Schubert
5759076b9443SCy Schubert	    if test "$tcl_ok" = "no"; then
5760076b9443SCy Schubert		# Check a little harder for __pthread_mutex_init in the same
5761076b9443SCy Schubert		# library, as some systems hide it there until pthread.h is
5762076b9443SCy Schubert		# defined.  We could alternatively do an AC_TRY_COMPILE with
5763076b9443SCy Schubert		# pthread.h, but that will work with libpthread really doesn't
5764076b9443SCy Schubert		# exist, like AIX 4.2.  [Bug: 4359]
576570b56f4bSCy Schubert		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __pthread_mutex_init in -lpthread" >&5
576670b56f4bSCy Schubertprintf %s "checking for __pthread_mutex_init in -lpthread... " >&6; }
576770b56f4bSCy Schubertif test ${ac_cv_lib_pthread___pthread_mutex_init+y}
576870b56f4bSCy Schubertthen :
576970b56f4bSCy Schubert  printf %s "(cached) " >&6
577070b56f4bSCy Schubertelse $as_nop
5771076b9443SCy Schubert  ac_check_lib_save_LIBS=$LIBS
5772076b9443SCy SchubertLIBS="-lpthread  $LIBS"
5773076b9443SCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
5774076b9443SCy Schubert/* end confdefs.h.  */
5775076b9443SCy Schubert
5776076b9443SCy Schubert/* Override any GCC internal prototype to avoid an error.
5777076b9443SCy Schubert   Use char because int might match the return type of a GCC
5778076b9443SCy Schubert   builtin and then its argument prototype would still apply.  */
5779076b9443SCy Schubertchar __pthread_mutex_init ();
5780076b9443SCy Schubertint
578170b56f4bSCy Schubertmain (void)
5782076b9443SCy Schubert{
5783076b9443SCy Schubertreturn __pthread_mutex_init ();
5784076b9443SCy Schubert  ;
5785076b9443SCy Schubert  return 0;
5786076b9443SCy Schubert}
5787076b9443SCy Schubert_ACEOF
578870b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
578970b56f4bSCy Schubertthen :
5790076b9443SCy Schubert  ac_cv_lib_pthread___pthread_mutex_init=yes
579170b56f4bSCy Schubertelse $as_nop
5792076b9443SCy Schubert  ac_cv_lib_pthread___pthread_mutex_init=no
5793076b9443SCy Schubertfi
579470b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
5795076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
5796076b9443SCy SchubertLIBS=$ac_check_lib_save_LIBS
5797076b9443SCy Schubertfi
579870b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
579970b56f4bSCy Schubertprintf "%s\n" "$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
580070b56f4bSCy Schubertif test "x$ac_cv_lib_pthread___pthread_mutex_init" = xyes
580170b56f4bSCy Schubertthen :
5802076b9443SCy Schubert  tcl_ok=yes
580370b56f4bSCy Schubertelse $as_nop
5804076b9443SCy Schubert  tcl_ok=no
5805076b9443SCy Schubertfi
5806076b9443SCy Schubert
5807076b9443SCy Schubert	    fi
5808076b9443SCy Schubert
5809076b9443SCy Schubert	    if test "$tcl_ok" = "yes"; then
5810076b9443SCy Schubert		# The space is needed
5811076b9443SCy Schubert		THREADS_LIBS=" -lpthread"
5812076b9443SCy Schubert	    else
581370b56f4bSCy Schubert		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthreads" >&5
581470b56f4bSCy Schubertprintf %s "checking for pthread_mutex_init in -lpthreads... " >&6; }
581570b56f4bSCy Schubertif test ${ac_cv_lib_pthreads_pthread_mutex_init+y}
581670b56f4bSCy Schubertthen :
581770b56f4bSCy Schubert  printf %s "(cached) " >&6
581870b56f4bSCy Schubertelse $as_nop
5819076b9443SCy Schubert  ac_check_lib_save_LIBS=$LIBS
5820076b9443SCy SchubertLIBS="-lpthreads  $LIBS"
5821076b9443SCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
5822076b9443SCy Schubert/* end confdefs.h.  */
5823076b9443SCy Schubert
5824076b9443SCy Schubert/* Override any GCC internal prototype to avoid an error.
5825076b9443SCy Schubert   Use char because int might match the return type of a GCC
5826076b9443SCy Schubert   builtin and then its argument prototype would still apply.  */
5827076b9443SCy Schubertchar pthread_mutex_init ();
5828076b9443SCy Schubertint
582970b56f4bSCy Schubertmain (void)
5830076b9443SCy Schubert{
5831076b9443SCy Schubertreturn pthread_mutex_init ();
5832076b9443SCy Schubert  ;
5833076b9443SCy Schubert  return 0;
5834076b9443SCy Schubert}
5835076b9443SCy Schubert_ACEOF
583670b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
583770b56f4bSCy Schubertthen :
5838076b9443SCy Schubert  ac_cv_lib_pthreads_pthread_mutex_init=yes
583970b56f4bSCy Schubertelse $as_nop
5840076b9443SCy Schubert  ac_cv_lib_pthreads_pthread_mutex_init=no
5841076b9443SCy Schubertfi
584270b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
5843076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
5844076b9443SCy SchubertLIBS=$ac_check_lib_save_LIBS
5845076b9443SCy Schubertfi
584670b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
584770b56f4bSCy Schubertprintf "%s\n" "$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
584870b56f4bSCy Schubertif test "x$ac_cv_lib_pthreads_pthread_mutex_init" = xyes
584970b56f4bSCy Schubertthen :
5850076b9443SCy Schubert  tcl_ok=yes
585170b56f4bSCy Schubertelse $as_nop
5852076b9443SCy Schubert  tcl_ok=no
5853076b9443SCy Schubertfi
5854076b9443SCy Schubert
5855076b9443SCy Schubert		if test "$tcl_ok" = "yes"; then
5856076b9443SCy Schubert		    # The space is needed
5857076b9443SCy Schubert		    THREADS_LIBS=" -lpthreads"
5858076b9443SCy Schubert		else
585970b56f4bSCy Schubert		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc" >&5
586070b56f4bSCy Schubertprintf %s "checking for pthread_mutex_init in -lc... " >&6; }
586170b56f4bSCy Schubertif test ${ac_cv_lib_c_pthread_mutex_init+y}
586270b56f4bSCy Schubertthen :
586370b56f4bSCy Schubert  printf %s "(cached) " >&6
586470b56f4bSCy Schubertelse $as_nop
5865076b9443SCy Schubert  ac_check_lib_save_LIBS=$LIBS
5866076b9443SCy SchubertLIBS="-lc  $LIBS"
5867076b9443SCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
5868076b9443SCy Schubert/* end confdefs.h.  */
5869076b9443SCy Schubert
5870076b9443SCy Schubert/* Override any GCC internal prototype to avoid an error.
5871076b9443SCy Schubert   Use char because int might match the return type of a GCC
5872076b9443SCy Schubert   builtin and then its argument prototype would still apply.  */
5873076b9443SCy Schubertchar pthread_mutex_init ();
5874076b9443SCy Schubertint
587570b56f4bSCy Schubertmain (void)
5876076b9443SCy Schubert{
5877076b9443SCy Schubertreturn pthread_mutex_init ();
5878076b9443SCy Schubert  ;
5879076b9443SCy Schubert  return 0;
5880076b9443SCy Schubert}
5881076b9443SCy Schubert_ACEOF
588270b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
588370b56f4bSCy Schubertthen :
5884076b9443SCy Schubert  ac_cv_lib_c_pthread_mutex_init=yes
588570b56f4bSCy Schubertelse $as_nop
5886076b9443SCy Schubert  ac_cv_lib_c_pthread_mutex_init=no
5887076b9443SCy Schubertfi
588870b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
5889076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
5890076b9443SCy SchubertLIBS=$ac_check_lib_save_LIBS
5891076b9443SCy Schubertfi
589270b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_pthread_mutex_init" >&5
589370b56f4bSCy Schubertprintf "%s\n" "$ac_cv_lib_c_pthread_mutex_init" >&6; }
589470b56f4bSCy Schubertif test "x$ac_cv_lib_c_pthread_mutex_init" = xyes
589570b56f4bSCy Schubertthen :
5896076b9443SCy Schubert  tcl_ok=yes
589770b56f4bSCy Schubertelse $as_nop
5898076b9443SCy Schubert  tcl_ok=no
5899076b9443SCy Schubertfi
5900076b9443SCy Schubert
5901076b9443SCy Schubert		    if test "$tcl_ok" = "no"; then
590270b56f4bSCy Schubert			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lc_r" >&5
590370b56f4bSCy Schubertprintf %s "checking for pthread_mutex_init in -lc_r... " >&6; }
590470b56f4bSCy Schubertif test ${ac_cv_lib_c_r_pthread_mutex_init+y}
590570b56f4bSCy Schubertthen :
590670b56f4bSCy Schubert  printf %s "(cached) " >&6
590770b56f4bSCy Schubertelse $as_nop
5908076b9443SCy Schubert  ac_check_lib_save_LIBS=$LIBS
5909076b9443SCy SchubertLIBS="-lc_r  $LIBS"
5910076b9443SCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
5911076b9443SCy Schubert/* end confdefs.h.  */
5912076b9443SCy Schubert
5913076b9443SCy Schubert/* Override any GCC internal prototype to avoid an error.
5914076b9443SCy Schubert   Use char because int might match the return type of a GCC
5915076b9443SCy Schubert   builtin and then its argument prototype would still apply.  */
5916076b9443SCy Schubertchar pthread_mutex_init ();
5917076b9443SCy Schubertint
591870b56f4bSCy Schubertmain (void)
5919076b9443SCy Schubert{
5920076b9443SCy Schubertreturn pthread_mutex_init ();
5921076b9443SCy Schubert  ;
5922076b9443SCy Schubert  return 0;
5923076b9443SCy Schubert}
5924076b9443SCy Schubert_ACEOF
592570b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
592670b56f4bSCy Schubertthen :
5927076b9443SCy Schubert  ac_cv_lib_c_r_pthread_mutex_init=yes
592870b56f4bSCy Schubertelse $as_nop
5929076b9443SCy Schubert  ac_cv_lib_c_r_pthread_mutex_init=no
5930076b9443SCy Schubertfi
593170b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
5932076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
5933076b9443SCy SchubertLIBS=$ac_check_lib_save_LIBS
5934076b9443SCy Schubertfi
593570b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
593670b56f4bSCy Schubertprintf "%s\n" "$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
593770b56f4bSCy Schubertif test "x$ac_cv_lib_c_r_pthread_mutex_init" = xyes
593870b56f4bSCy Schubertthen :
5939076b9443SCy Schubert  tcl_ok=yes
594070b56f4bSCy Schubertelse $as_nop
5941076b9443SCy Schubert  tcl_ok=no
5942076b9443SCy Schubertfi
5943076b9443SCy Schubert
5944076b9443SCy Schubert			if test "$tcl_ok" = "yes"; then
5945076b9443SCy Schubert			    # The space is needed
5946076b9443SCy Schubert			    THREADS_LIBS=" -pthread"
5947076b9443SCy Schubert			else
5948076b9443SCy Schubert			    TCL_THREADS=0
594970b56f4bSCy Schubert			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
595070b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
5951076b9443SCy Schubert			fi
5952076b9443SCy Schubert		    fi
5953076b9443SCy Schubert		fi
5954076b9443SCy Schubert	    fi
5955076b9443SCy Schubert	fi
5956076b9443SCy Schubert    else
5957076b9443SCy Schubert	TCL_THREADS=0
5958076b9443SCy Schubert    fi
5959076b9443SCy Schubert    # Do checking message here to not mess up interleaved configure output
596070b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for building with threads" >&5
596170b56f4bSCy Schubertprintf %s "checking for building with threads... " >&6; }
5962076b9443SCy Schubert    if test "${TCL_THREADS}" = 1; then
5963076b9443SCy Schubert
596470b56f4bSCy Schubertprintf "%s\n" "#define TCL_THREADS 1" >>confdefs.h
5965076b9443SCy Schubert
596670b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
596770b56f4bSCy Schubertprintf "%s\n" "yes (default)" >&6; }
5968076b9443SCy Schubert    else
596970b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
597070b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
5971076b9443SCy Schubert    fi
5972076b9443SCy Schubert    # TCL_THREADS sanity checking.  See if our request for building with
5973076b9443SCy Schubert    # threads is the same as the way Tcl was built.  If not, warn the user.
5974076b9443SCy Schubert    case ${TCL_DEFS} in
5975076b9443SCy Schubert	*THREADS=1*)
5976076b9443SCy Schubert	    if test "${TCL_THREADS}" = "0"; then
597770b56f4bSCy Schubert		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING:
5978076b9443SCy Schubert    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
5979076b9443SCy Schubert    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
598070b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING:
5981076b9443SCy Schubert    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
5982076b9443SCy Schubert    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
5983076b9443SCy Schubert	    fi
5984076b9443SCy Schubert	    ;;
5985076b9443SCy Schubert    esac
5986076b9443SCy Schubert
5987076b9443SCy Schubert
5988076b9443SCy Schubertif test "${TCL_THREADS}" = "1" ; then
5989076b9443SCy Schubert
599070b56f4bSCy Schubertprintf "%s\n" "#define SQLITE_THREADSAFE 1" >>confdefs.h
5991076b9443SCy Schubert
5992076b9443SCy Schubert    # Not automatically added by Tcl because its assumed Tcl links to them,
5993076b9443SCy Schubert    # but it may not if it isn't really a threaded build.
5994076b9443SCy Schubert
5995076b9443SCy Schubert    vars="$THREADS_LIBS"
5996076b9443SCy Schubert    for i in $vars; do
5997076b9443SCy Schubert	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
5998076b9443SCy Schubert	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
599900787218SCy Schubert	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
6000076b9443SCy Schubert	fi
6001076b9443SCy Schubert	PKG_LIBS="$PKG_LIBS $i"
6002076b9443SCy Schubert    done
6003076b9443SCy Schubert
6004076b9443SCy Schubert
6005076b9443SCy Schubertelse
6006076b9443SCy Schubert
600770b56f4bSCy Schubertprintf "%s\n" "#define SQLITE_THREADSAFE 0" >>confdefs.h
6008076b9443SCy Schubert
6009076b9443SCy Schubertfi
6010076b9443SCy Schubert
6011076b9443SCy Schubert#--------------------------------------------------------------------
6012076b9443SCy Schubert# The statement below defines a collection of symbols related to
6013076b9443SCy Schubert# building as a shared library instead of a static library.
6014076b9443SCy Schubert#--------------------------------------------------------------------
6015076b9443SCy Schubert
6016076b9443SCy Schubert
601770b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5
601870b56f4bSCy Schubertprintf %s "checking how to build libraries... " >&6; }
6019076b9443SCy Schubert    # Check whether --enable-shared was given.
602070b56f4bSCy Schubertif test ${enable_shared+y}
602170b56f4bSCy Schubertthen :
602200787218SCy Schubert  enableval=$enable_shared; shared_ok=$enableval
602370b56f4bSCy Schubertelse $as_nop
602400787218SCy Schubert  shared_ok=yes
6025076b9443SCy Schubertfi
6026076b9443SCy Schubert
6027076b9443SCy Schubert
6028076b9443SCy Schubert    if test "${enable_shared+set}" = set; then
6029076b9443SCy Schubert	enableval="$enable_shared"
603000787218SCy Schubert	shared_ok=$enableval
6031076b9443SCy Schubert    else
603200787218SCy Schubert	shared_ok=yes
6033076b9443SCy Schubert    fi
6034076b9443SCy Schubert
603500787218SCy Schubert    # Check whether --enable-stubs was given.
603600787218SCy Schubertif test ${enable_stubs+y}
603700787218SCy Schubertthen :
603800787218SCy Schubert  enableval=$enable_stubs; stubs_ok=$enableval
603900787218SCy Schubertelse $as_nop
604000787218SCy Schubert  stubs_ok=yes
604100787218SCy Schubertfi
604200787218SCy Schubert
604300787218SCy Schubert
604400787218SCy Schubert    if test "${enable_stubs+set}" = set; then
604500787218SCy Schubert	enableval="$enable_stubs"
604600787218SCy Schubert	stubs_ok=$enableval
604700787218SCy Schubert    else
604800787218SCy Schubert	stubs_ok=yes
604900787218SCy Schubert    fi
605000787218SCy Schubert
605100787218SCy Schubert    # Stubs are always enabled for shared builds
605200787218SCy Schubert    if test "$shared_ok" = "yes" ; then
605370b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: shared" >&5
605470b56f4bSCy Schubertprintf "%s\n" "shared" >&6; }
6055076b9443SCy Schubert	SHARED_BUILD=1
605600787218SCy Schubert        STUBS_BUILD=1
6057076b9443SCy Schubert    else
605870b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static" >&5
605970b56f4bSCy Schubertprintf "%s\n" "static" >&6; }
6060076b9443SCy Schubert	SHARED_BUILD=0
6061076b9443SCy Schubert
606270b56f4bSCy Schubertprintf "%s\n" "#define STATIC_BUILD 1" >>confdefs.h
6063076b9443SCy Schubert
606400787218SCy Schubert        if test "$stubs_ok" = "yes" ; then
606500787218SCy Schubert          STUBS_BUILD=1
606600787218SCy Schubert        else
606700787218SCy Schubert          STUBS_BUILD=0
6068076b9443SCy Schubert        fi
606900787218SCy Schubert    fi
607000787218SCy Schubert    if test "${STUBS_BUILD}" = "1" ; then
607100787218SCy Schubert
607200787218SCy Schubertprintf "%s\n" "#define USE_TCL_STUBS 1" >>confdefs.h
607300787218SCy Schubert
607400787218SCy Schubert
607500787218SCy Schubertprintf "%s\n" "#define USE_TCLOO_STUBS 1" >>confdefs.h
607600787218SCy Schubert
607700787218SCy Schubert      if test "${TEA_WINDOWINGSYSTEM}" != ""; then
607800787218SCy Schubert
607900787218SCy Schubertprintf "%s\n" "#define USE_TK_STUBS 1" >>confdefs.h
608000787218SCy Schubert
608100787218SCy Schubert      fi
608200787218SCy Schubert    fi
608300787218SCy Schubert
608400787218SCy Schubert
6085076b9443SCy Schubert
6086076b9443SCy Schubert
6087076b9443SCy Schubert
6088076b9443SCy Schubert#--------------------------------------------------------------------
6089076b9443SCy Schubert# This macro figures out what flags to use with the compiler/linker
6090076b9443SCy Schubert# when building shared/static debug/optimized objects.  This information
6091076b9443SCy Schubert# can be taken from the tclConfig.sh file, but this figures it all out.
6092076b9443SCy Schubert#--------------------------------------------------------------------
6093076b9443SCy Schubert
6094076b9443SCy Schubertif test -n "$ac_tool_prefix"; then
6095076b9443SCy Schubert  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6096076b9443SCy Schubertset dummy ${ac_tool_prefix}ranlib; ac_word=$2
609770b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
609870b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
609970b56f4bSCy Schubertif test ${ac_cv_prog_RANLIB+y}
610070b56f4bSCy Schubertthen :
610170b56f4bSCy Schubert  printf %s "(cached) " >&6
610270b56f4bSCy Schubertelse $as_nop
6103076b9443SCy Schubert  if test -n "$RANLIB"; then
6104076b9443SCy Schubert  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6105076b9443SCy Schubertelse
6106076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6107076b9443SCy Schubertfor as_dir in $PATH
6108076b9443SCy Schubertdo
6109076b9443SCy Schubert  IFS=$as_save_IFS
611070b56f4bSCy Schubert  case $as_dir in #(((
611170b56f4bSCy Schubert    '') as_dir=./ ;;
611270b56f4bSCy Schubert    */) ;;
611370b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
611470b56f4bSCy Schubert  esac
6115076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
611670b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6117076b9443SCy Schubert    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
611870b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6119076b9443SCy Schubert    break 2
6120076b9443SCy Schubert  fi
6121076b9443SCy Schubertdone
6122076b9443SCy Schubert  done
6123076b9443SCy SchubertIFS=$as_save_IFS
6124076b9443SCy Schubert
6125076b9443SCy Schubertfi
6126076b9443SCy Schubertfi
6127076b9443SCy SchubertRANLIB=$ac_cv_prog_RANLIB
6128076b9443SCy Schubertif test -n "$RANLIB"; then
612970b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
613070b56f4bSCy Schubertprintf "%s\n" "$RANLIB" >&6; }
6131076b9443SCy Schubertelse
613270b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
613370b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
6134076b9443SCy Schubertfi
6135076b9443SCy Schubert
6136076b9443SCy Schubert
6137076b9443SCy Schubertfi
6138076b9443SCy Schubertif test -z "$ac_cv_prog_RANLIB"; then
6139076b9443SCy Schubert  ac_ct_RANLIB=$RANLIB
6140076b9443SCy Schubert  # Extract the first word of "ranlib", so it can be a program name with args.
6141076b9443SCy Schubertset dummy ranlib; ac_word=$2
614270b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
614370b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
614470b56f4bSCy Schubertif test ${ac_cv_prog_ac_ct_RANLIB+y}
614570b56f4bSCy Schubertthen :
614670b56f4bSCy Schubert  printf %s "(cached) " >&6
614770b56f4bSCy Schubertelse $as_nop
6148076b9443SCy Schubert  if test -n "$ac_ct_RANLIB"; then
6149076b9443SCy Schubert  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6150076b9443SCy Schubertelse
6151076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6152076b9443SCy Schubertfor as_dir in $PATH
6153076b9443SCy Schubertdo
6154076b9443SCy Schubert  IFS=$as_save_IFS
615570b56f4bSCy Schubert  case $as_dir in #(((
615670b56f4bSCy Schubert    '') as_dir=./ ;;
615770b56f4bSCy Schubert    */) ;;
615870b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
615970b56f4bSCy Schubert  esac
6160076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
616170b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6162076b9443SCy Schubert    ac_cv_prog_ac_ct_RANLIB="ranlib"
616370b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6164076b9443SCy Schubert    break 2
6165076b9443SCy Schubert  fi
6166076b9443SCy Schubertdone
6167076b9443SCy Schubert  done
6168076b9443SCy SchubertIFS=$as_save_IFS
6169076b9443SCy Schubert
6170076b9443SCy Schubertfi
6171076b9443SCy Schubertfi
6172076b9443SCy Schubertac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6173076b9443SCy Schubertif test -n "$ac_ct_RANLIB"; then
617470b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
617570b56f4bSCy Schubertprintf "%s\n" "$ac_ct_RANLIB" >&6; }
6176076b9443SCy Schubertelse
617770b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
617870b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
6179076b9443SCy Schubertfi
6180076b9443SCy Schubert
6181076b9443SCy Schubert  if test "x$ac_ct_RANLIB" = x; then
6182076b9443SCy Schubert    RANLIB=":"
6183076b9443SCy Schubert  else
6184076b9443SCy Schubert    case $cross_compiling:$ac_tool_warned in
6185076b9443SCy Schubertyes:)
618670b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
618770b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6188076b9443SCy Schubertac_tool_warned=yes ;;
6189076b9443SCy Schubertesac
6190076b9443SCy Schubert    RANLIB=$ac_ct_RANLIB
6191076b9443SCy Schubert  fi
6192076b9443SCy Schubertelse
6193076b9443SCy Schubert  RANLIB="$ac_cv_prog_RANLIB"
6194076b9443SCy Schubertfi
6195076b9443SCy Schubert
6196076b9443SCy Schubert
6197076b9443SCy Schubert
6198076b9443SCy Schubert
6199076b9443SCy Schubert    # Step 0.a: Enable 64 bit support?
6200076b9443SCy Schubert
620170b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5
620270b56f4bSCy Schubertprintf %s "checking if 64bit support is requested... " >&6; }
6203076b9443SCy Schubert    # Check whether --enable-64bit was given.
620470b56f4bSCy Schubertif test ${enable_64bit+y}
620570b56f4bSCy Schubertthen :
6206076b9443SCy Schubert  enableval=$enable_64bit; do64bit=$enableval
620770b56f4bSCy Schubertelse $as_nop
6208076b9443SCy Schubert  do64bit=no
6209076b9443SCy Schubertfi
6210076b9443SCy Schubert
621170b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5
621270b56f4bSCy Schubertprintf "%s\n" "$do64bit" >&6; }
6213076b9443SCy Schubert
6214076b9443SCy Schubert    # Step 0.b: Enable Solaris 64 bit VIS support?
6215076b9443SCy Schubert
621670b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5
621770b56f4bSCy Schubertprintf %s "checking if 64bit Sparc VIS support is requested... " >&6; }
6218076b9443SCy Schubert    # Check whether --enable-64bit-vis was given.
621970b56f4bSCy Schubertif test ${enable_64bit_vis+y}
622070b56f4bSCy Schubertthen :
6221076b9443SCy Schubert  enableval=$enable_64bit_vis; do64bitVIS=$enableval
622270b56f4bSCy Schubertelse $as_nop
6223076b9443SCy Schubert  do64bitVIS=no
6224076b9443SCy Schubertfi
6225076b9443SCy Schubert
622670b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5
622770b56f4bSCy Schubertprintf "%s\n" "$do64bitVIS" >&6; }
6228076b9443SCy Schubert    # Force 64bit on with VIS
622970b56f4bSCy Schubert    if test "$do64bitVIS" = "yes"
623070b56f4bSCy Schubertthen :
6231076b9443SCy Schubert  do64bit=yes
6232076b9443SCy Schubertfi
6233076b9443SCy Schubert
6234076b9443SCy Schubert    # Step 0.c: Check if visibility support is available. Do this here so
6235076b9443SCy Schubert    # that platform specific alternatives can be used below if this fails.
6236076b9443SCy Schubert
623770b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5
623870b56f4bSCy Schubertprintf %s "checking if compiler supports visibility \"hidden\"... " >&6; }
623970b56f4bSCy Schubertif test ${tcl_cv_cc_visibility_hidden+y}
624070b56f4bSCy Schubertthen :
624170b56f4bSCy Schubert  printf %s "(cached) " >&6
624270b56f4bSCy Schubertelse $as_nop
6243076b9443SCy Schubert
6244076b9443SCy Schubert	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
6245076b9443SCy Schubert	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6246076b9443SCy Schubert/* end confdefs.h.  */
6247076b9443SCy Schubert
6248076b9443SCy Schubert	    extern __attribute__((__visibility__("hidden"))) void f(void);
6249076b9443SCy Schubert	    void f(void) {}
6250076b9443SCy Schubertint
625170b56f4bSCy Schubertmain (void)
6252076b9443SCy Schubert{
6253076b9443SCy Schubertf();
6254076b9443SCy Schubert  ;
6255076b9443SCy Schubert  return 0;
6256076b9443SCy Schubert}
6257076b9443SCy Schubert_ACEOF
625870b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
625970b56f4bSCy Schubertthen :
6260076b9443SCy Schubert  tcl_cv_cc_visibility_hidden=yes
626170b56f4bSCy Schubertelse $as_nop
6262076b9443SCy Schubert  tcl_cv_cc_visibility_hidden=no
6263076b9443SCy Schubertfi
626470b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
6265076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
6266076b9443SCy Schubert	CFLAGS=$hold_cflags
6267076b9443SCy Schubertfi
626870b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5
626970b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_cc_visibility_hidden" >&6; }
627070b56f4bSCy Schubert    if test $tcl_cv_cc_visibility_hidden = yes
627170b56f4bSCy Schubertthen :
6272076b9443SCy Schubert
6273076b9443SCy Schubert
627470b56f4bSCy Schubertprintf "%s\n" "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h
6275076b9443SCy Schubert
6276076b9443SCy Schubert
627770b56f4bSCy Schubertprintf "%s\n" "#define HAVE_HIDDEN 1" >>confdefs.h
6278076b9443SCy Schubert
6279076b9443SCy Schubert
6280076b9443SCy Schubertfi
6281076b9443SCy Schubert
6282076b9443SCy Schubert    # Step 0.d: Disable -rpath support?
6283076b9443SCy Schubert
628470b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5
628570b56f4bSCy Schubertprintf %s "checking if rpath support is requested... " >&6; }
6286076b9443SCy Schubert    # Check whether --enable-rpath was given.
628770b56f4bSCy Schubertif test ${enable_rpath+y}
628870b56f4bSCy Schubertthen :
6289076b9443SCy Schubert  enableval=$enable_rpath; doRpath=$enableval
629070b56f4bSCy Schubertelse $as_nop
6291076b9443SCy Schubert  doRpath=yes
6292076b9443SCy Schubertfi
6293076b9443SCy Schubert
629470b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5
629570b56f4bSCy Schubertprintf "%s\n" "$doRpath" >&6; }
6296076b9443SCy Schubert
6297076b9443SCy Schubert    # Set the variable "system" to hold the name and version number
6298076b9443SCy Schubert    # for the system.
6299076b9443SCy Schubert
6300076b9443SCy Schubert
630170b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking system version" >&5
630270b56f4bSCy Schubertprintf %s "checking system version... " >&6; }
630370b56f4bSCy Schubertif test ${tcl_cv_sys_version+y}
630470b56f4bSCy Schubertthen :
630570b56f4bSCy Schubert  printf %s "(cached) " >&6
630670b56f4bSCy Schubertelse $as_nop
6307076b9443SCy Schubert
6308076b9443SCy Schubert	# TEA specific:
6309076b9443SCy Schubert	if test "${TEA_PLATFORM}" = "windows" ; then
6310076b9443SCy Schubert	    tcl_cv_sys_version=windows
6311076b9443SCy Schubert	else
6312076b9443SCy Schubert	    tcl_cv_sys_version=`uname -s`-`uname -r`
6313076b9443SCy Schubert	    if test "$?" -ne 0 ; then
631470b56f4bSCy Schubert		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5
631570b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: can't find uname command" >&2;}
6316076b9443SCy Schubert		tcl_cv_sys_version=unknown
6317076b9443SCy Schubert	    else
6318076b9443SCy Schubert		if test "`uname -s`" = "AIX" ; then
6319076b9443SCy Schubert		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
6320076b9443SCy Schubert		fi
632100787218SCy Schubert		if test "`uname -s`" = "NetBSD" -a -f /etc/debian_version ; then
632200787218SCy Schubert		    tcl_cv_sys_version=NetBSD-Debian
632300787218SCy Schubert		fi
6324076b9443SCy Schubert	    fi
6325076b9443SCy Schubert	fi
6326076b9443SCy Schubert
6327076b9443SCy Schubertfi
632870b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5
632970b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_sys_version" >&6; }
6330076b9443SCy Schubert    system=$tcl_cv_sys_version
6331076b9443SCy Schubert
6332076b9443SCy Schubert
6333076b9443SCy Schubert    # Require ranlib early so we can override it in special cases below.
6334076b9443SCy Schubert
6335076b9443SCy Schubert
6336076b9443SCy Schubert
6337076b9443SCy Schubert    # Set configuration options based on system name and version.
6338076b9443SCy Schubert    # This is similar to Tcl's unix/tcl.m4 except that we've added a
6339076b9443SCy Schubert    # "windows" case and removed some core-only vars.
6340076b9443SCy Schubert
6341076b9443SCy Schubert    do64bit_ok=no
6342076b9443SCy Schubert    # default to '{$LIBS}' and set to "" on per-platform necessary basis
6343076b9443SCy Schubert    SHLIB_LD_LIBS='${LIBS}'
6344076b9443SCy Schubert    # When ld needs options to work in 64-bit mode, put them in
6345076b9443SCy Schubert    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
6346076b9443SCy Schubert    # is disabled by the user. [Bug 1016796]
6347076b9443SCy Schubert    LDFLAGS_ARCH=""
6348076b9443SCy Schubert    UNSHARED_LIB_SUFFIX=""
6349076b9443SCy Schubert    # TEA specific: use PACKAGE_VERSION instead of VERSION
6350076b9443SCy Schubert    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
6351076b9443SCy Schubert    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
6352076b9443SCy Schubert    TCL_LIB_VERSIONS_OK=ok
6353076b9443SCy Schubert    CFLAGS_DEBUG=-g
635470b56f4bSCy Schubert    if test "$GCC" = yes
635570b56f4bSCy Schubertthen :
6356076b9443SCy Schubert
6357076b9443SCy Schubert	CFLAGS_OPTIMIZE=-O2
6358076b9443SCy Schubert	CFLAGS_WARNING="-Wall"
6359076b9443SCy Schubert
636070b56f4bSCy Schubertelse $as_nop
6361076b9443SCy Schubert
6362076b9443SCy Schubert	CFLAGS_OPTIMIZE=-O
6363076b9443SCy Schubert	CFLAGS_WARNING=""
6364076b9443SCy Schubert
6365076b9443SCy Schubertfi
6366076b9443SCy Schubert    if test -n "$ac_tool_prefix"; then
6367076b9443SCy Schubert  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6368076b9443SCy Schubertset dummy ${ac_tool_prefix}ar; ac_word=$2
636970b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
637070b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
637170b56f4bSCy Schubertif test ${ac_cv_prog_AR+y}
637270b56f4bSCy Schubertthen :
637370b56f4bSCy Schubert  printf %s "(cached) " >&6
637470b56f4bSCy Schubertelse $as_nop
6375076b9443SCy Schubert  if test -n "$AR"; then
6376076b9443SCy Schubert  ac_cv_prog_AR="$AR" # Let the user override the test.
6377076b9443SCy Schubertelse
6378076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6379076b9443SCy Schubertfor as_dir in $PATH
6380076b9443SCy Schubertdo
6381076b9443SCy Schubert  IFS=$as_save_IFS
638270b56f4bSCy Schubert  case $as_dir in #(((
638370b56f4bSCy Schubert    '') as_dir=./ ;;
638470b56f4bSCy Schubert    */) ;;
638570b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
638670b56f4bSCy Schubert  esac
6387076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
638870b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6389076b9443SCy Schubert    ac_cv_prog_AR="${ac_tool_prefix}ar"
639070b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6391076b9443SCy Schubert    break 2
6392076b9443SCy Schubert  fi
6393076b9443SCy Schubertdone
6394076b9443SCy Schubert  done
6395076b9443SCy SchubertIFS=$as_save_IFS
6396076b9443SCy Schubert
6397076b9443SCy Schubertfi
6398076b9443SCy Schubertfi
6399076b9443SCy SchubertAR=$ac_cv_prog_AR
6400076b9443SCy Schubertif test -n "$AR"; then
640170b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
640270b56f4bSCy Schubertprintf "%s\n" "$AR" >&6; }
6403076b9443SCy Schubertelse
640470b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
640570b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
6406076b9443SCy Schubertfi
6407076b9443SCy Schubert
6408076b9443SCy Schubert
6409076b9443SCy Schubertfi
6410076b9443SCy Schubertif test -z "$ac_cv_prog_AR"; then
6411076b9443SCy Schubert  ac_ct_AR=$AR
6412076b9443SCy Schubert  # Extract the first word of "ar", so it can be a program name with args.
6413076b9443SCy Schubertset dummy ar; ac_word=$2
641470b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
641570b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
641670b56f4bSCy Schubertif test ${ac_cv_prog_ac_ct_AR+y}
641770b56f4bSCy Schubertthen :
641870b56f4bSCy Schubert  printf %s "(cached) " >&6
641970b56f4bSCy Schubertelse $as_nop
6420076b9443SCy Schubert  if test -n "$ac_ct_AR"; then
6421076b9443SCy Schubert  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6422076b9443SCy Schubertelse
6423076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6424076b9443SCy Schubertfor as_dir in $PATH
6425076b9443SCy Schubertdo
6426076b9443SCy Schubert  IFS=$as_save_IFS
642770b56f4bSCy Schubert  case $as_dir in #(((
642870b56f4bSCy Schubert    '') as_dir=./ ;;
642970b56f4bSCy Schubert    */) ;;
643070b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
643170b56f4bSCy Schubert  esac
6432076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
643370b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6434076b9443SCy Schubert    ac_cv_prog_ac_ct_AR="ar"
643570b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6436076b9443SCy Schubert    break 2
6437076b9443SCy Schubert  fi
6438076b9443SCy Schubertdone
6439076b9443SCy Schubert  done
6440076b9443SCy SchubertIFS=$as_save_IFS
6441076b9443SCy Schubert
6442076b9443SCy Schubertfi
6443076b9443SCy Schubertfi
6444076b9443SCy Schubertac_ct_AR=$ac_cv_prog_ac_ct_AR
6445076b9443SCy Schubertif test -n "$ac_ct_AR"; then
644670b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
644770b56f4bSCy Schubertprintf "%s\n" "$ac_ct_AR" >&6; }
6448076b9443SCy Schubertelse
644970b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
645070b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
6451076b9443SCy Schubertfi
6452076b9443SCy Schubert
6453076b9443SCy Schubert  if test "x$ac_ct_AR" = x; then
6454076b9443SCy Schubert    AR=""
6455076b9443SCy Schubert  else
6456076b9443SCy Schubert    case $cross_compiling:$ac_tool_warned in
6457076b9443SCy Schubertyes:)
645870b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
645970b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6460076b9443SCy Schubertac_tool_warned=yes ;;
6461076b9443SCy Schubertesac
6462076b9443SCy Schubert    AR=$ac_ct_AR
6463076b9443SCy Schubert  fi
6464076b9443SCy Schubertelse
6465076b9443SCy Schubert  AR="$ac_cv_prog_AR"
6466076b9443SCy Schubertfi
6467076b9443SCy Schubert
6468076b9443SCy Schubert    STLIB_LD='${AR} cr'
6469076b9443SCy Schubert    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
647070b56f4bSCy Schubert    if test "x$SHLIB_VERSION" = x
647170b56f4bSCy Schubertthen :
647200787218SCy Schubert  SHLIB_VERSION=""
647300787218SCy Schubertelse $as_nop
647400787218SCy Schubert  SHLIB_VERSION=".$SHLIB_VERSION"
6475076b9443SCy Schubertfi
6476076b9443SCy Schubert    case $system in
6477076b9443SCy Schubert	# TEA specific:
6478076b9443SCy Schubert	windows)
6479076b9443SCy Schubert	    MACHINE="X86"
6480076b9443SCy Schubert	    if test "$do64bit" != "no" ; then
6481076b9443SCy Schubert		case "$do64bit" in
6482076b9443SCy Schubert		    amd64|x64|yes)
6483076b9443SCy Schubert			MACHINE="AMD64" ; # default to AMD64 64-bit build
648400787218SCy Schubert			;;
648500787218SCy Schubert		    arm64|aarch64)
648600787218SCy Schubert			MACHINE="ARM64"
6487076b9443SCy Schubert			;;
6488076b9443SCy Schubert		    ia64)
6489076b9443SCy Schubert			MACHINE="IA64"
6490076b9443SCy Schubert			;;
6491076b9443SCy Schubert		esac
6492076b9443SCy Schubert	    fi
6493076b9443SCy Schubert
6494076b9443SCy Schubert	    if test "$GCC" != "yes" ; then
6495076b9443SCy Schubert	        if test "${SHARED_BUILD}" = "0" ; then
6496076b9443SCy Schubert		    runtime=-MT
6497076b9443SCy Schubert	        else
6498076b9443SCy Schubert		    runtime=-MD
6499076b9443SCy Schubert	        fi
650000787218SCy Schubert	        case "x`echo \${VisualStudioVersion}`" in
650100787218SCy Schubert	            x1[4-9]*)
650200787218SCy Schubert		        lflags="${lflags} -nodefaultlib:libucrt.lib"
650300787218SCy Schubert
650400787218SCy Schubert    vars="ucrt.lib"
650500787218SCy Schubert    for i in $vars; do
650600787218SCy Schubert	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
650700787218SCy Schubert	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
650800787218SCy Schubert	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
650900787218SCy Schubert	fi
651000787218SCy Schubert	PKG_LIBS="$PKG_LIBS $i"
651100787218SCy Schubert    done
651200787218SCy Schubert
651300787218SCy Schubert
651400787218SCy Schubert	            ;;
651500787218SCy Schubert	            *)
651600787218SCy Schubert	            ;;
651700787218SCy Schubert	        esac
6518076b9443SCy Schubert
6519076b9443SCy Schubert                if test "$do64bit" != "no" ; then
652000787218SCy Schubert		    CC="cl.exe"
652100787218SCy Schubert		    RC="rc.exe"
652200787218SCy Schubert		    lflags="${lflags} -nologo -MACHINE:${MACHINE} "
652300787218SCy Schubert		    LINKBIN="link.exe"
6524076b9443SCy Schubert		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
6525076b9443SCy Schubert		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
6526076b9443SCy Schubert		    # Avoid 'unresolved external symbol __security_cookie'
6527076b9443SCy Schubert		    # errors, c.f. http://support.microsoft.com/?id=894573
6528076b9443SCy Schubert
6529076b9443SCy Schubert    vars="bufferoverflowU.lib"
6530076b9443SCy Schubert    for i in $vars; do
6531076b9443SCy Schubert	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
6532076b9443SCy Schubert	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
653300787218SCy Schubert	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.[lL][iI][bB]$/-l\1/'`
6534076b9443SCy Schubert	fi
6535076b9443SCy Schubert	PKG_LIBS="$PKG_LIBS $i"
6536076b9443SCy Schubert    done
6537076b9443SCy Schubert
6538076b9443SCy Schubert
6539076b9443SCy Schubert		else
6540076b9443SCy Schubert		    RC="rc"
654100787218SCy Schubert		    lflags="${lflags} -nologo"
6542076b9443SCy Schubert		    LINKBIN="link"
6543076b9443SCy Schubert		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
6544076b9443SCy Schubert		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
6545076b9443SCy Schubert		fi
6546076b9443SCy Schubert	    fi
6547076b9443SCy Schubert
6548076b9443SCy Schubert	    if test "$GCC" = "yes"; then
6549076b9443SCy Schubert		# mingw gcc mode
6550076b9443SCy Schubert		if test -n "$ac_tool_prefix"; then
6551076b9443SCy Schubert  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
6552076b9443SCy Schubertset dummy ${ac_tool_prefix}windres; ac_word=$2
655370b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
655470b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
655570b56f4bSCy Schubertif test ${ac_cv_prog_RC+y}
655670b56f4bSCy Schubertthen :
655770b56f4bSCy Schubert  printf %s "(cached) " >&6
655870b56f4bSCy Schubertelse $as_nop
6559076b9443SCy Schubert  if test -n "$RC"; then
6560076b9443SCy Schubert  ac_cv_prog_RC="$RC" # Let the user override the test.
6561076b9443SCy Schubertelse
6562076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6563076b9443SCy Schubertfor as_dir in $PATH
6564076b9443SCy Schubertdo
6565076b9443SCy Schubert  IFS=$as_save_IFS
656670b56f4bSCy Schubert  case $as_dir in #(((
656770b56f4bSCy Schubert    '') as_dir=./ ;;
656870b56f4bSCy Schubert    */) ;;
656970b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
657070b56f4bSCy Schubert  esac
6571076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
657270b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6573076b9443SCy Schubert    ac_cv_prog_RC="${ac_tool_prefix}windres"
657470b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6575076b9443SCy Schubert    break 2
6576076b9443SCy Schubert  fi
6577076b9443SCy Schubertdone
6578076b9443SCy Schubert  done
6579076b9443SCy SchubertIFS=$as_save_IFS
6580076b9443SCy Schubert
6581076b9443SCy Schubertfi
6582076b9443SCy Schubertfi
6583076b9443SCy SchubertRC=$ac_cv_prog_RC
6584076b9443SCy Schubertif test -n "$RC"; then
658570b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
658670b56f4bSCy Schubertprintf "%s\n" "$RC" >&6; }
6587076b9443SCy Schubertelse
658870b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
658970b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
6590076b9443SCy Schubertfi
6591076b9443SCy Schubert
6592076b9443SCy Schubert
6593076b9443SCy Schubertfi
6594076b9443SCy Schubertif test -z "$ac_cv_prog_RC"; then
6595076b9443SCy Schubert  ac_ct_RC=$RC
6596076b9443SCy Schubert  # Extract the first word of "windres", so it can be a program name with args.
6597076b9443SCy Schubertset dummy windres; ac_word=$2
659870b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
659970b56f4bSCy Schubertprintf %s "checking for $ac_word... " >&6; }
660070b56f4bSCy Schubertif test ${ac_cv_prog_ac_ct_RC+y}
660170b56f4bSCy Schubertthen :
660270b56f4bSCy Schubert  printf %s "(cached) " >&6
660370b56f4bSCy Schubertelse $as_nop
6604076b9443SCy Schubert  if test -n "$ac_ct_RC"; then
6605076b9443SCy Schubert  ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test.
6606076b9443SCy Schubertelse
6607076b9443SCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6608076b9443SCy Schubertfor as_dir in $PATH
6609076b9443SCy Schubertdo
6610076b9443SCy Schubert  IFS=$as_save_IFS
661170b56f4bSCy Schubert  case $as_dir in #(((
661270b56f4bSCy Schubert    '') as_dir=./ ;;
661370b56f4bSCy Schubert    */) ;;
661470b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
661570b56f4bSCy Schubert  esac
6616076b9443SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
661770b56f4bSCy Schubert  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6618076b9443SCy Schubert    ac_cv_prog_ac_ct_RC="windres"
661970b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6620076b9443SCy Schubert    break 2
6621076b9443SCy Schubert  fi
6622076b9443SCy Schubertdone
6623076b9443SCy Schubert  done
6624076b9443SCy SchubertIFS=$as_save_IFS
6625076b9443SCy Schubert
6626076b9443SCy Schubertfi
6627076b9443SCy Schubertfi
6628076b9443SCy Schubertac_ct_RC=$ac_cv_prog_ac_ct_RC
6629076b9443SCy Schubertif test -n "$ac_ct_RC"; then
663070b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
663170b56f4bSCy Schubertprintf "%s\n" "$ac_ct_RC" >&6; }
6632076b9443SCy Schubertelse
663370b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
663470b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
6635076b9443SCy Schubertfi
6636076b9443SCy Schubert
6637076b9443SCy Schubert  if test "x$ac_ct_RC" = x; then
6638076b9443SCy Schubert    RC=""
6639076b9443SCy Schubert  else
6640076b9443SCy Schubert    case $cross_compiling:$ac_tool_warned in
6641076b9443SCy Schubertyes:)
664270b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
664370b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6644076b9443SCy Schubertac_tool_warned=yes ;;
6645076b9443SCy Schubertesac
6646076b9443SCy Schubert    RC=$ac_ct_RC
6647076b9443SCy Schubert  fi
6648076b9443SCy Schubertelse
6649076b9443SCy Schubert  RC="$ac_cv_prog_RC"
6650076b9443SCy Schubertfi
6651076b9443SCy Schubert
6652076b9443SCy Schubert		CFLAGS_DEBUG="-g"
6653076b9443SCy Schubert		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
6654076b9443SCy Schubert		SHLIB_LD='${CC} -shared'
6655076b9443SCy Schubert		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
6656076b9443SCy Schubert		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
6657076b9443SCy Schubert		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
6658076b9443SCy Schubert
665970b56f4bSCy Schubert		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cross-compile version of gcc" >&5
666070b56f4bSCy Schubertprintf %s "checking for cross-compile version of gcc... " >&6; }
666170b56f4bSCy Schubertif test ${ac_cv_cross+y}
666270b56f4bSCy Schubertthen :
666370b56f4bSCy Schubert  printf %s "(cached) " >&6
666470b56f4bSCy Schubertelse $as_nop
6665076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6666076b9443SCy Schubert/* end confdefs.h.  */
6667076b9443SCy Schubert
6668076b9443SCy Schubert			    #ifdef _WIN32
6669076b9443SCy Schubert				#error cross-compiler
6670076b9443SCy Schubert			    #endif
6671076b9443SCy Schubert
6672076b9443SCy Schubertint
667370b56f4bSCy Schubertmain (void)
6674076b9443SCy Schubert{
6675076b9443SCy Schubert
6676076b9443SCy Schubert  ;
6677076b9443SCy Schubert  return 0;
6678076b9443SCy Schubert}
6679076b9443SCy Schubert_ACEOF
668070b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
668170b56f4bSCy Schubertthen :
6682076b9443SCy Schubert  ac_cv_cross=yes
668370b56f4bSCy Schubertelse $as_nop
6684076b9443SCy Schubert  ac_cv_cross=no
6685076b9443SCy Schubertfi
668670b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6687076b9443SCy Schubert
6688076b9443SCy Schubertfi
668970b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cross" >&5
669070b56f4bSCy Schubertprintf "%s\n" "$ac_cv_cross" >&6; }
6691076b9443SCy Schubert		      if test "$ac_cv_cross" = "yes"; then
6692076b9443SCy Schubert			case "$do64bit" in
6693076b9443SCy Schubert			    amd64|x64|yes)
669400787218SCy Schubert				CC="x86_64-w64-mingw32-${CC}"
6695076b9443SCy Schubert				LD="x86_64-w64-mingw32-ld"
6696076b9443SCy Schubert				AR="x86_64-w64-mingw32-ar"
6697076b9443SCy Schubert				RANLIB="x86_64-w64-mingw32-ranlib"
6698076b9443SCy Schubert				RC="x86_64-w64-mingw32-windres"
6699076b9443SCy Schubert			    ;;
670000787218SCy Schubert			    arm64|aarch64)
670100787218SCy Schubert				CC="aarch64-w64-mingw32-clang"
670200787218SCy Schubert				LD="aarch64-w64-mingw32-ld"
670300787218SCy Schubert				AR="aarch64-w64-mingw32-ar"
670400787218SCy Schubert				RANLIB="aarch64-w64-mingw32-ranlib"
670500787218SCy Schubert				RC="aarch64-w64-mingw32-windres"
670600787218SCy Schubert			    ;;
6707076b9443SCy Schubert			    *)
670800787218SCy Schubert				CC="i686-w64-mingw32-${CC}"
6709076b9443SCy Schubert				LD="i686-w64-mingw32-ld"
6710076b9443SCy Schubert				AR="i686-w64-mingw32-ar"
6711076b9443SCy Schubert				RANLIB="i686-w64-mingw32-ranlib"
6712076b9443SCy Schubert				RC="i686-w64-mingw32-windres"
6713076b9443SCy Schubert			    ;;
6714076b9443SCy Schubert			esac
6715076b9443SCy Schubert		fi
6716076b9443SCy Schubert
6717076b9443SCy Schubert	    else
6718076b9443SCy Schubert		SHLIB_LD="${LINKBIN} -dll ${lflags}"
6719076b9443SCy Schubert		# link -lib only works when -lib is the first arg
6720076b9443SCy Schubert		STLIB_LD="${LINKBIN} -lib ${lflags}"
6721076b9443SCy Schubert		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
6722076b9443SCy Schubert		PATHTYPE=-w
6723076b9443SCy Schubert		# For information on what debugtype is most useful, see:
6724076b9443SCy Schubert		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
6725076b9443SCy Schubert		# and also
6726076b9443SCy Schubert		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
6727076b9443SCy Schubert		# This essentially turns it all on.
6728076b9443SCy Schubert		LDFLAGS_DEBUG="-debug -debugtype:cv"
6729076b9443SCy Schubert		LDFLAGS_OPTIMIZE="-release"
6730076b9443SCy Schubert		LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
6731076b9443SCy Schubert		LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
6732076b9443SCy Schubert	    fi
6733076b9443SCy Schubert
6734076b9443SCy Schubert	    SHLIB_SUFFIX=".dll"
6735076b9443SCy Schubert	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
6736076b9443SCy Schubert
6737076b9443SCy Schubert	    TCL_LIB_VERSIONS_OK=nodots
6738076b9443SCy Schubert    	    ;;
6739076b9443SCy Schubert	AIX-*)
674000787218SCy Schubert	    if test "$GCC" != "yes"
674170b56f4bSCy Schubertthen :
6742076b9443SCy Schubert
6743076b9443SCy Schubert		# AIX requires the _r compiler when gcc isn't being used
6744076b9443SCy Schubert		case "${CC}" in
6745076b9443SCy Schubert		    *_r|*_r\ *)
6746076b9443SCy Schubert			# ok ...
6747076b9443SCy Schubert			;;
6748076b9443SCy Schubert		    *)
6749076b9443SCy Schubert			# Make sure only first arg gets _r
6750076b9443SCy Schubert		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
6751076b9443SCy Schubert			;;
6752076b9443SCy Schubert		esac
675370b56f4bSCy Schubert		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5
675470b56f4bSCy Schubertprintf "%s\n" "Using $CC for compiling with threads" >&6; }
6755076b9443SCy Schubert
6756076b9443SCy Schubertfi
6757076b9443SCy Schubert	    LIBS="$LIBS -lc"
6758076b9443SCy Schubert	    SHLIB_CFLAGS=""
6759076b9443SCy Schubert	    SHLIB_SUFFIX=".so"
6760076b9443SCy Schubert
6761076b9443SCy Schubert	    LD_LIBRARY_PATH_VAR="LIBPATH"
6762076b9443SCy Schubert
6763076b9443SCy Schubert	    # Check to enable 64-bit flags for compiler/linker
676470b56f4bSCy Schubert	    if test "$do64bit" = yes
676570b56f4bSCy Schubertthen :
6766076b9443SCy Schubert
676770b56f4bSCy Schubert		if test "$GCC" = yes
676870b56f4bSCy Schubertthen :
6769076b9443SCy Schubert
677070b56f4bSCy Schubert		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
677170b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
6772076b9443SCy Schubert
677370b56f4bSCy Schubertelse $as_nop
6774076b9443SCy Schubert
6775076b9443SCy Schubert		    do64bit_ok=yes
6776076b9443SCy Schubert		    CFLAGS="$CFLAGS -q64"
6777076b9443SCy Schubert		    LDFLAGS_ARCH="-q64"
6778076b9443SCy Schubert		    RANLIB="${RANLIB} -X64"
6779076b9443SCy Schubert		    AR="${AR} -X64"
6780076b9443SCy Schubert		    SHLIB_LD_FLAGS="-b64"
6781076b9443SCy Schubert
6782076b9443SCy Schubertfi
6783076b9443SCy Schubert
6784076b9443SCy Schubertfi
6785076b9443SCy Schubert
678670b56f4bSCy Schubert	    if test "`uname -m`" = ia64
678770b56f4bSCy Schubertthen :
6788076b9443SCy Schubert
6789076b9443SCy Schubert		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
6790076b9443SCy Schubert		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
679170b56f4bSCy Schubert		if test "$GCC" = yes
679270b56f4bSCy Schubertthen :
6793076b9443SCy Schubert
679400787218SCy Schubert		    CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
6795076b9443SCy Schubert
679670b56f4bSCy Schubertelse $as_nop
6797076b9443SCy Schubert
679800787218SCy Schubert		    CC_SEARCH_FLAGS='"-R${LIB_RUNTIME_DIR}"'
6799076b9443SCy Schubert
6800076b9443SCy Schubertfi
680100787218SCy Schubert		LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
6802076b9443SCy Schubert
680370b56f4bSCy Schubertelse $as_nop
6804076b9443SCy Schubert
680570b56f4bSCy Schubert		if test "$GCC" = yes
680670b56f4bSCy Schubertthen :
6807076b9443SCy Schubert
6808076b9443SCy Schubert		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
6809076b9443SCy Schubert
681070b56f4bSCy Schubertelse $as_nop
6811076b9443SCy Schubert
6812076b9443SCy Schubert		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
6813076b9443SCy Schubert		    LDFLAGS="$LDFLAGS -brtl"
6814076b9443SCy Schubert
6815076b9443SCy Schubertfi
6816076b9443SCy Schubert		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
681700787218SCy Schubert		CC_SEARCH_FLAGS='"-L${LIB_RUNTIME_DIR}"'
6818076b9443SCy Schubert		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
6819076b9443SCy Schubert
6820076b9443SCy Schubertfi
6821076b9443SCy Schubert	    ;;
6822076b9443SCy Schubert	BeOS*)
6823076b9443SCy Schubert	    SHLIB_CFLAGS="-fPIC"
6824076b9443SCy Schubert	    SHLIB_LD='${CC} -nostart'
6825076b9443SCy Schubert	    SHLIB_SUFFIX=".so"
6826076b9443SCy Schubert
6827076b9443SCy Schubert	    #-----------------------------------------------------------
6828076b9443SCy Schubert	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
6829076b9443SCy Schubert	    # -lsocket, even if the network functions are in -lnet which
6830076b9443SCy Schubert	    # is always linked to, for compatibility.
6831076b9443SCy Schubert	    #-----------------------------------------------------------
683270b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5
683370b56f4bSCy Schubertprintf %s "checking for inet_ntoa in -lbind... " >&6; }
683470b56f4bSCy Schubertif test ${ac_cv_lib_bind_inet_ntoa+y}
683570b56f4bSCy Schubertthen :
683670b56f4bSCy Schubert  printf %s "(cached) " >&6
683770b56f4bSCy Schubertelse $as_nop
6838076b9443SCy Schubert  ac_check_lib_save_LIBS=$LIBS
6839076b9443SCy SchubertLIBS="-lbind  $LIBS"
6840076b9443SCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
6841076b9443SCy Schubert/* end confdefs.h.  */
6842076b9443SCy Schubert
6843076b9443SCy Schubert/* Override any GCC internal prototype to avoid an error.
6844076b9443SCy Schubert   Use char because int might match the return type of a GCC
6845076b9443SCy Schubert   builtin and then its argument prototype would still apply.  */
6846076b9443SCy Schubertchar inet_ntoa ();
6847076b9443SCy Schubertint
684870b56f4bSCy Schubertmain (void)
6849076b9443SCy Schubert{
6850076b9443SCy Schubertreturn inet_ntoa ();
6851076b9443SCy Schubert  ;
6852076b9443SCy Schubert  return 0;
6853076b9443SCy Schubert}
6854076b9443SCy Schubert_ACEOF
685570b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
685670b56f4bSCy Schubertthen :
6857076b9443SCy Schubert  ac_cv_lib_bind_inet_ntoa=yes
685870b56f4bSCy Schubertelse $as_nop
6859076b9443SCy Schubert  ac_cv_lib_bind_inet_ntoa=no
6860076b9443SCy Schubertfi
686170b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
6862076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
6863076b9443SCy SchubertLIBS=$ac_check_lib_save_LIBS
6864076b9443SCy Schubertfi
686570b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5
686670b56f4bSCy Schubertprintf "%s\n" "$ac_cv_lib_bind_inet_ntoa" >&6; }
686770b56f4bSCy Schubertif test "x$ac_cv_lib_bind_inet_ntoa" = xyes
686870b56f4bSCy Schubertthen :
6869076b9443SCy Schubert  LIBS="$LIBS -lbind -lsocket"
6870076b9443SCy Schubertfi
6871076b9443SCy Schubert
6872076b9443SCy Schubert	    ;;
687300787218SCy Schubert	BSD/OS-2.1*|BSD/OS-3*)
687400787218SCy Schubert	    SHLIB_CFLAGS=""
687500787218SCy Schubert	    SHLIB_LD="shlicc -r"
687600787218SCy Schubert	    SHLIB_SUFFIX=".so"
687700787218SCy Schubert	    CC_SEARCH_FLAGS=""
687800787218SCy Schubert	    LD_SEARCH_FLAGS=""
687900787218SCy Schubert	    ;;
6880076b9443SCy Schubert	BSD/OS-4.*)
6881076b9443SCy Schubert	    SHLIB_CFLAGS="-export-dynamic -fPIC"
6882076b9443SCy Schubert	    SHLIB_LD='${CC} -shared'
6883076b9443SCy Schubert	    SHLIB_SUFFIX=".so"
6884076b9443SCy Schubert	    LDFLAGS="$LDFLAGS -export-dynamic"
6885076b9443SCy Schubert	    CC_SEARCH_FLAGS=""
6886076b9443SCy Schubert	    LD_SEARCH_FLAGS=""
6887076b9443SCy Schubert	    ;;
6888076b9443SCy Schubert	CYGWIN_*)
6889076b9443SCy Schubert	    SHLIB_CFLAGS=""
6890076b9443SCy Schubert	    SHLIB_LD='${CC} -shared'
6891076b9443SCy Schubert	    SHLIB_SUFFIX=".dll"
689200787218SCy Schubert	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--out-implib,\$@.a"
6893076b9443SCy Schubert	    EXEEXT=".exe"
6894076b9443SCy Schubert	    do64bit_ok=yes
6895076b9443SCy Schubert	    CC_SEARCH_FLAGS=""
6896076b9443SCy Schubert	    LD_SEARCH_FLAGS=""
6897076b9443SCy Schubert	    ;;
689800787218SCy Schubert	dgux*)
689900787218SCy Schubert	    SHLIB_CFLAGS="-K PIC"
690000787218SCy Schubert	    SHLIB_LD='${CC} -G'
690100787218SCy Schubert	    SHLIB_LD_LIBS=""
690200787218SCy Schubert	    SHLIB_SUFFIX=".so"
690300787218SCy Schubert	    CC_SEARCH_FLAGS=""
690400787218SCy Schubert	    LD_SEARCH_FLAGS=""
690500787218SCy Schubert	    ;;
6906076b9443SCy Schubert	Haiku*)
6907076b9443SCy Schubert	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
6908076b9443SCy Schubert	    SHLIB_CFLAGS="-fPIC"
6909076b9443SCy Schubert	    SHLIB_SUFFIX=".so"
691000787218SCy Schubert	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared'
691170b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5
691270b56f4bSCy Schubertprintf %s "checking for inet_ntoa in -lnetwork... " >&6; }
691370b56f4bSCy Schubertif test ${ac_cv_lib_network_inet_ntoa+y}
691470b56f4bSCy Schubertthen :
691570b56f4bSCy Schubert  printf %s "(cached) " >&6
691670b56f4bSCy Schubertelse $as_nop
6917076b9443SCy Schubert  ac_check_lib_save_LIBS=$LIBS
6918076b9443SCy SchubertLIBS="-lnetwork  $LIBS"
6919076b9443SCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
6920076b9443SCy Schubert/* end confdefs.h.  */
6921076b9443SCy Schubert
6922076b9443SCy Schubert/* Override any GCC internal prototype to avoid an error.
6923076b9443SCy Schubert   Use char because int might match the return type of a GCC
6924076b9443SCy Schubert   builtin and then its argument prototype would still apply.  */
6925076b9443SCy Schubertchar inet_ntoa ();
6926076b9443SCy Schubertint
692770b56f4bSCy Schubertmain (void)
6928076b9443SCy Schubert{
6929076b9443SCy Schubertreturn inet_ntoa ();
6930076b9443SCy Schubert  ;
6931076b9443SCy Schubert  return 0;
6932076b9443SCy Schubert}
6933076b9443SCy Schubert_ACEOF
693470b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
693570b56f4bSCy Schubertthen :
6936076b9443SCy Schubert  ac_cv_lib_network_inet_ntoa=yes
693770b56f4bSCy Schubertelse $as_nop
6938076b9443SCy Schubert  ac_cv_lib_network_inet_ntoa=no
6939076b9443SCy Schubertfi
694070b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
6941076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
6942076b9443SCy SchubertLIBS=$ac_check_lib_save_LIBS
6943076b9443SCy Schubertfi
694470b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5
694570b56f4bSCy Schubertprintf "%s\n" "$ac_cv_lib_network_inet_ntoa" >&6; }
694670b56f4bSCy Schubertif test "x$ac_cv_lib_network_inet_ntoa" = xyes
694770b56f4bSCy Schubertthen :
6948076b9443SCy Schubert  LIBS="$LIBS -lnetwork"
6949076b9443SCy Schubertfi
6950076b9443SCy Schubert
6951076b9443SCy Schubert	    ;;
6952076b9443SCy Schubert	HP-UX-*.11.*)
6953076b9443SCy Schubert	    # Use updated header definitions where possible
6954076b9443SCy Schubert
695570b56f4bSCy Schubertprintf "%s\n" "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
6956076b9443SCy Schubert
6957076b9443SCy Schubert	    # TEA specific: Needed by Tcl, but not most extensions
6958076b9443SCy Schubert	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
6959076b9443SCy Schubert	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
6960076b9443SCy Schubert
696170b56f4bSCy Schubert	    if test "`uname -m`" = ia64
696270b56f4bSCy Schubertthen :
6963076b9443SCy Schubert
6964076b9443SCy Schubert		SHLIB_SUFFIX=".so"
6965076b9443SCy Schubert
696670b56f4bSCy Schubertelse $as_nop
6967076b9443SCy Schubert
6968076b9443SCy Schubert		SHLIB_SUFFIX=".sl"
6969076b9443SCy Schubert
6970076b9443SCy Schubertfi
697170b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
697270b56f4bSCy Schubertprintf %s "checking for shl_load in -ldld... " >&6; }
697370b56f4bSCy Schubertif test ${ac_cv_lib_dld_shl_load+y}
697470b56f4bSCy Schubertthen :
697570b56f4bSCy Schubert  printf %s "(cached) " >&6
697670b56f4bSCy Schubertelse $as_nop
6977076b9443SCy Schubert  ac_check_lib_save_LIBS=$LIBS
6978076b9443SCy SchubertLIBS="-ldld  $LIBS"
6979076b9443SCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
6980076b9443SCy Schubert/* end confdefs.h.  */
6981076b9443SCy Schubert
6982076b9443SCy Schubert/* Override any GCC internal prototype to avoid an error.
6983076b9443SCy Schubert   Use char because int might match the return type of a GCC
6984076b9443SCy Schubert   builtin and then its argument prototype would still apply.  */
6985076b9443SCy Schubertchar shl_load ();
6986076b9443SCy Schubertint
698770b56f4bSCy Schubertmain (void)
6988076b9443SCy Schubert{
6989076b9443SCy Schubertreturn shl_load ();
6990076b9443SCy Schubert  ;
6991076b9443SCy Schubert  return 0;
6992076b9443SCy Schubert}
6993076b9443SCy Schubert_ACEOF
699470b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
699570b56f4bSCy Schubertthen :
6996076b9443SCy Schubert  ac_cv_lib_dld_shl_load=yes
699770b56f4bSCy Schubertelse $as_nop
6998076b9443SCy Schubert  ac_cv_lib_dld_shl_load=no
6999076b9443SCy Schubertfi
700070b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
7001076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
7002076b9443SCy SchubertLIBS=$ac_check_lib_save_LIBS
7003076b9443SCy Schubertfi
700470b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
700570b56f4bSCy Schubertprintf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
700670b56f4bSCy Schubertif test "x$ac_cv_lib_dld_shl_load" = xyes
700770b56f4bSCy Schubertthen :
7008076b9443SCy Schubert  tcl_ok=yes
700970b56f4bSCy Schubertelse $as_nop
7010076b9443SCy Schubert  tcl_ok=no
7011076b9443SCy Schubertfi
7012076b9443SCy Schubert
701370b56f4bSCy Schubert	    if test "$tcl_ok" = yes
701470b56f4bSCy Schubertthen :
7015076b9443SCy Schubert
701600787218SCy Schubert		SHLIB_CFLAGS="+z"
701700787218SCy Schubert		SHLIB_LD="ld -b"
7018076b9443SCy Schubert		LDFLAGS="$LDFLAGS -Wl,-E"
701900787218SCy Schubert		CC_SEARCH_FLAGS='"-Wl,+s,+b,${LIB_RUNTIME_DIR}:."'
702000787218SCy Schubert		LD_SEARCH_FLAGS='+s +b "${LIB_RUNTIME_DIR}:."'
7021076b9443SCy Schubert		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7022076b9443SCy Schubert
7023076b9443SCy Schubertfi
702470b56f4bSCy Schubert	    if test "$GCC" = yes
702570b56f4bSCy Schubertthen :
7026076b9443SCy Schubert
7027076b9443SCy Schubert		SHLIB_LD='${CC} -shared'
7028076b9443SCy Schubert		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7029076b9443SCy Schubert
703070b56f4bSCy Schubertelse $as_nop
7031076b9443SCy Schubert
7032076b9443SCy Schubert		CFLAGS="$CFLAGS -z"
7033076b9443SCy Schubert
7034076b9443SCy Schubertfi
7035076b9443SCy Schubert
7036076b9443SCy Schubert	    # Check to enable 64-bit flags for compiler/linker
703770b56f4bSCy Schubert	    if test "$do64bit" = "yes"
703870b56f4bSCy Schubertthen :
7039076b9443SCy Schubert
704070b56f4bSCy Schubert		if test "$GCC" = yes
704170b56f4bSCy Schubertthen :
7042076b9443SCy Schubert
7043076b9443SCy Schubert		    case `${CC} -dumpmachine` in
7044076b9443SCy Schubert			hppa64*)
7045076b9443SCy Schubert			    # 64-bit gcc in use.  Fix flags for GNU ld.
7046076b9443SCy Schubert			    do64bit_ok=yes
7047076b9443SCy Schubert			    SHLIB_LD='${CC} -shared'
704870b56f4bSCy Schubert			    if test $doRpath = yes
704970b56f4bSCy Schubertthen :
7050076b9443SCy Schubert
705100787218SCy Schubert				CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7052076b9443SCy Schubertfi
7053076b9443SCy Schubert			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7054076b9443SCy Schubert			    ;;
7055076b9443SCy Schubert			*)
705670b56f4bSCy Schubert			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
705770b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7058076b9443SCy Schubert			    ;;
7059076b9443SCy Schubert		    esac
7060076b9443SCy Schubert
706170b56f4bSCy Schubertelse $as_nop
7062076b9443SCy Schubert
7063076b9443SCy Schubert		    do64bit_ok=yes
7064076b9443SCy Schubert		    CFLAGS="$CFLAGS +DD64"
7065076b9443SCy Schubert		    LDFLAGS_ARCH="+DD64"
7066076b9443SCy Schubert
7067076b9443SCy Schubertfi
7068076b9443SCy Schubert
7069076b9443SCy Schubertfi ;;
707000787218SCy Schubert	HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
707100787218SCy Schubert	    SHLIB_SUFFIX=".sl"
707200787218SCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
707300787218SCy Schubertprintf %s "checking for shl_load in -ldld... " >&6; }
707400787218SCy Schubertif test ${ac_cv_lib_dld_shl_load+y}
707500787218SCy Schubertthen :
707600787218SCy Schubert  printf %s "(cached) " >&6
707700787218SCy Schubertelse $as_nop
707800787218SCy Schubert  ac_check_lib_save_LIBS=$LIBS
707900787218SCy SchubertLIBS="-ldld  $LIBS"
708000787218SCy Schubertcat confdefs.h - <<_ACEOF >conftest.$ac_ext
708100787218SCy Schubert/* end confdefs.h.  */
708200787218SCy Schubert
708300787218SCy Schubert/* Override any GCC internal prototype to avoid an error.
708400787218SCy Schubert   Use char because int might match the return type of a GCC
708500787218SCy Schubert   builtin and then its argument prototype would still apply.  */
708600787218SCy Schubertchar shl_load ();
708700787218SCy Schubertint
708800787218SCy Schubertmain (void)
708900787218SCy Schubert{
709000787218SCy Schubertreturn shl_load ();
709100787218SCy Schubert  ;
709200787218SCy Schubert  return 0;
709300787218SCy Schubert}
709400787218SCy Schubert_ACEOF
709500787218SCy Schubertif ac_fn_c_try_link "$LINENO"
709600787218SCy Schubertthen :
709700787218SCy Schubert  ac_cv_lib_dld_shl_load=yes
709800787218SCy Schubertelse $as_nop
709900787218SCy Schubert  ac_cv_lib_dld_shl_load=no
710000787218SCy Schubertfi
710100787218SCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
710200787218SCy Schubert    conftest$ac_exeext conftest.$ac_ext
710300787218SCy SchubertLIBS=$ac_check_lib_save_LIBS
710400787218SCy Schubertfi
710500787218SCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
710600787218SCy Schubertprintf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
710700787218SCy Schubertif test "x$ac_cv_lib_dld_shl_load" = xyes
710800787218SCy Schubertthen :
710900787218SCy Schubert  tcl_ok=yes
711000787218SCy Schubertelse $as_nop
711100787218SCy Schubert  tcl_ok=no
711200787218SCy Schubertfi
711300787218SCy Schubert
711400787218SCy Schubert	    if test "$tcl_ok" = yes
711500787218SCy Schubertthen :
711600787218SCy Schubert
711700787218SCy Schubert		SHLIB_CFLAGS="+z"
711800787218SCy Schubert		SHLIB_LD="ld -b"
711900787218SCy Schubert		SHLIB_LD_LIBS=""
712000787218SCy Schubert		LDFLAGS="$LDFLAGS -Wl,-E"
712100787218SCy Schubert		CC_SEARCH_FLAGS='"-Wl,+s,+b,${LIB_RUNTIME_DIR}:."'
712200787218SCy Schubert		LD_SEARCH_FLAGS='+s +b "${LIB_RUNTIME_DIR}:."'
712300787218SCy Schubert		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
712400787218SCy Schubert
712500787218SCy Schubertfi ;;
712600787218SCy Schubert	IRIX-5.*)
712700787218SCy Schubert	    SHLIB_CFLAGS=""
712800787218SCy Schubert	    SHLIB_LD="ld -shared -rdata_shared"
712900787218SCy Schubert	    SHLIB_SUFFIX=".so"
713000787218SCy Schubert	    case " $LIBOBJS " in
713100787218SCy Schubert  *" mkstemp.$ac_objext "* ) ;;
713200787218SCy Schubert  *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext"
713300787218SCy Schubert ;;
713400787218SCy Schubertesac
713500787218SCy Schubert
713600787218SCy Schubert	    if test $doRpath = yes
713700787218SCy Schubertthen :
713800787218SCy Schubert
713900787218SCy Schubert		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
714000787218SCy Schubert		LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'
714100787218SCy Schubertfi
714200787218SCy Schubert	    ;;
7143076b9443SCy Schubert	IRIX-6.*)
7144076b9443SCy Schubert	    SHLIB_CFLAGS=""
7145076b9443SCy Schubert	    SHLIB_LD="ld -n32 -shared -rdata_shared"
7146076b9443SCy Schubert	    SHLIB_SUFFIX=".so"
714770b56f4bSCy Schubert	    if test $doRpath = yes
714870b56f4bSCy Schubertthen :
7149076b9443SCy Schubert
715000787218SCy Schubert		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
715100787218SCy Schubert		LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'
7152076b9443SCy Schubertfi
715370b56f4bSCy Schubert	    if test "$GCC" = yes
715470b56f4bSCy Schubertthen :
7155076b9443SCy Schubert
7156076b9443SCy Schubert		CFLAGS="$CFLAGS -mabi=n32"
7157076b9443SCy Schubert		LDFLAGS="$LDFLAGS -mabi=n32"
7158076b9443SCy Schubert
715970b56f4bSCy Schubertelse $as_nop
7160076b9443SCy Schubert
7161076b9443SCy Schubert		case $system in
7162076b9443SCy Schubert		    IRIX-6.3)
7163076b9443SCy Schubert			# Use to build 6.2 compatible binaries on 6.3.
7164076b9443SCy Schubert			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
7165076b9443SCy Schubert			;;
7166076b9443SCy Schubert		    *)
7167076b9443SCy Schubert			CFLAGS="$CFLAGS -n32"
7168076b9443SCy Schubert			;;
7169076b9443SCy Schubert		esac
7170076b9443SCy Schubert		LDFLAGS="$LDFLAGS -n32"
7171076b9443SCy Schubert
7172076b9443SCy Schubertfi
7173076b9443SCy Schubert	    ;;
7174076b9443SCy Schubert	IRIX64-6.*)
7175076b9443SCy Schubert	    SHLIB_CFLAGS=""
7176076b9443SCy Schubert	    SHLIB_LD="ld -n32 -shared -rdata_shared"
7177076b9443SCy Schubert	    SHLIB_SUFFIX=".so"
717870b56f4bSCy Schubert	    if test $doRpath = yes
717970b56f4bSCy Schubertthen :
7180076b9443SCy Schubert
718100787218SCy Schubert		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
718200787218SCy Schubert		LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"'
7183076b9443SCy Schubertfi
7184076b9443SCy Schubert
7185076b9443SCy Schubert	    # Check to enable 64-bit flags for compiler/linker
7186076b9443SCy Schubert
718770b56f4bSCy Schubert	    if test "$do64bit" = yes
718870b56f4bSCy Schubertthen :
7189076b9443SCy Schubert
719070b56f4bSCy Schubert	        if test "$GCC" = yes
719170b56f4bSCy Schubertthen :
7192076b9443SCy Schubert
719370b56f4bSCy Schubert	            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5
719470b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
7195076b9443SCy Schubert
719670b56f4bSCy Schubertelse $as_nop
7197076b9443SCy Schubert
7198076b9443SCy Schubert	            do64bit_ok=yes
7199076b9443SCy Schubert	            SHLIB_LD="ld -64 -shared -rdata_shared"
7200076b9443SCy Schubert	            CFLAGS="$CFLAGS -64"
7201076b9443SCy Schubert	            LDFLAGS_ARCH="-64"
7202076b9443SCy Schubert
7203076b9443SCy Schubertfi
7204076b9443SCy Schubert
7205076b9443SCy Schubertfi
7206076b9443SCy Schubert	    ;;
720700787218SCy Schubert	Linux*|GNU*|NetBSD-Debian|DragonFly-*|FreeBSD-*)
7208076b9443SCy Schubert	    SHLIB_CFLAGS="-fPIC"
7209076b9443SCy Schubert	    SHLIB_SUFFIX=".so"
7210076b9443SCy Schubert
7211076b9443SCy Schubert	    # TEA specific:
7212076b9443SCy Schubert	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
7213076b9443SCy Schubert
7214076b9443SCy Schubert	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
721500787218SCy Schubert	    SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS_DEFAULT} -shared'
7216076b9443SCy Schubert	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
721700787218SCy Schubert
721800787218SCy Schubert	    case $system in
721900787218SCy Schubert	    DragonFly-*|FreeBSD-*)
722000787218SCy Schubert		if test "${TCL_THREADS}" = "1"
722100787218SCy Schubertthen :
722200787218SCy Schubert
722300787218SCy Schubert		    # The -pthread needs to go in the LDFLAGS, not LIBS
722400787218SCy Schubert		    LIBS=`echo $LIBS | sed s/-pthread//`
722500787218SCy Schubert		    CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
722600787218SCy Schubert		    LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
722700787218SCy Schubertfi
722800787218SCy Schubert	    ;;
722900787218SCy Schubert            esac
723000787218SCy Schubert
723170b56f4bSCy Schubert	    if test $doRpath = yes
723270b56f4bSCy Schubertthen :
7233076b9443SCy Schubert
723400787218SCy Schubert		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7235076b9443SCy Schubertfi
7236076b9443SCy Schubert	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
723770b56f4bSCy Schubert	    if test "`uname -m`" = "alpha"
723870b56f4bSCy Schubertthen :
7239076b9443SCy Schubert  CFLAGS="$CFLAGS -mieee"
7240076b9443SCy Schubertfi
724170b56f4bSCy Schubert	    if test $do64bit = yes
724270b56f4bSCy Schubertthen :
7243076b9443SCy Schubert
724470b56f4bSCy Schubert		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5
724570b56f4bSCy Schubertprintf %s "checking if compiler accepts -m64 flag... " >&6; }
724670b56f4bSCy Schubertif test ${tcl_cv_cc_m64+y}
724770b56f4bSCy Schubertthen :
724870b56f4bSCy Schubert  printf %s "(cached) " >&6
724970b56f4bSCy Schubertelse $as_nop
7250076b9443SCy Schubert
7251076b9443SCy Schubert		    hold_cflags=$CFLAGS
7252076b9443SCy Schubert		    CFLAGS="$CFLAGS -m64"
7253076b9443SCy Schubert		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7254076b9443SCy Schubert/* end confdefs.h.  */
7255076b9443SCy Schubert
7256076b9443SCy Schubertint
725770b56f4bSCy Schubertmain (void)
7258076b9443SCy Schubert{
7259076b9443SCy Schubert
7260076b9443SCy Schubert  ;
7261076b9443SCy Schubert  return 0;
7262076b9443SCy Schubert}
7263076b9443SCy Schubert_ACEOF
726470b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
726570b56f4bSCy Schubertthen :
7266076b9443SCy Schubert  tcl_cv_cc_m64=yes
726770b56f4bSCy Schubertelse $as_nop
7268076b9443SCy Schubert  tcl_cv_cc_m64=no
7269076b9443SCy Schubertfi
727070b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
7271076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
7272076b9443SCy Schubert		    CFLAGS=$hold_cflags
7273076b9443SCy Schubertfi
727470b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5
727570b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_cc_m64" >&6; }
727670b56f4bSCy Schubert		if test $tcl_cv_cc_m64 = yes
727770b56f4bSCy Schubertthen :
7278076b9443SCy Schubert
7279076b9443SCy Schubert		    CFLAGS="$CFLAGS -m64"
7280076b9443SCy Schubert		    do64bit_ok=yes
7281076b9443SCy Schubert
7282076b9443SCy Schubertfi
7283076b9443SCy Schubert
7284076b9443SCy Schubertfi
7285076b9443SCy Schubert
7286076b9443SCy Schubert	    # The combo of gcc + glibc has a bug related to inlining of
7287076b9443SCy Schubert	    # functions like strtod(). The -fno-builtin flag should address
7288076b9443SCy Schubert	    # this problem but it does not work. The -fno-inline flag is kind
7289076b9443SCy Schubert	    # of overkill but it works. Disable inlining only when one of the
7290076b9443SCy Schubert	    # files in compat/*.c is being linked in.
7291076b9443SCy Schubert
729270b56f4bSCy Schubert	    if test x"${USE_COMPAT}" != x
729370b56f4bSCy Schubertthen :
7294076b9443SCy Schubert  CFLAGS="$CFLAGS -fno-inline"
7295076b9443SCy Schubertfi
7296076b9443SCy Schubert	    ;;
7297076b9443SCy Schubert	Lynx*)
7298076b9443SCy Schubert	    SHLIB_CFLAGS="-fPIC"
7299076b9443SCy Schubert	    SHLIB_SUFFIX=".so"
7300076b9443SCy Schubert	    CFLAGS_OPTIMIZE=-02
7301076b9443SCy Schubert	    SHLIB_LD='${CC} -shared'
7302076b9443SCy Schubert	    LD_FLAGS="-Wl,--export-dynamic"
730370b56f4bSCy Schubert	    if test $doRpath = yes
730470b56f4bSCy Schubertthen :
7305076b9443SCy Schubert
730600787218SCy Schubert		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
730700787218SCy Schubert		LD_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7308076b9443SCy Schubertfi
7309076b9443SCy Schubert	    ;;
7310076b9443SCy Schubert	OpenBSD-*)
7311076b9443SCy Schubert	    arch=`arch -s`
7312076b9443SCy Schubert	    case "$arch" in
731300787218SCy Schubert	    alpha|sparc64)
731400787218SCy Schubert		SHLIB_CFLAGS="-fPIC"
7315076b9443SCy Schubert		;;
7316076b9443SCy Schubert	    *)
731700787218SCy Schubert		SHLIB_CFLAGS="-fpic"
731800787218SCy Schubert		;;
731900787218SCy Schubert	    esac
732000787218SCy Schubert	    SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared'
7321076b9443SCy Schubert	    SHLIB_SUFFIX=".so"
732270b56f4bSCy Schubert	    if test $doRpath = yes
732370b56f4bSCy Schubertthen :
7324076b9443SCy Schubert
732500787218SCy Schubert		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7326076b9443SCy Schubertfi
7327076b9443SCy Schubert	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
732800787218SCy Schubert	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
732900787218SCy Schubert	    LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
7330076b9443SCy Schubert	    CFLAGS_OPTIMIZE="-O2"
7331076b9443SCy Schubert	    # On OpenBSD:	Compile with -pthread
7332076b9443SCy Schubert	    #		Don't link with -lpthread
7333076b9443SCy Schubert	    LIBS=`echo $LIBS | sed s/-lpthread//`
7334076b9443SCy Schubert	    CFLAGS="$CFLAGS -pthread"
7335076b9443SCy Schubert	    # OpenBSD doesn't do version numbers with dots.
7336076b9443SCy Schubert	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7337076b9443SCy Schubert	    TCL_LIB_VERSIONS_OK=nodots
7338076b9443SCy Schubert	    ;;
7339076b9443SCy Schubert	NetBSD-*)
7340076b9443SCy Schubert	    # NetBSD has ELF and can use 'cc -shared' to build shared libs
7341076b9443SCy Schubert	    SHLIB_CFLAGS="-fPIC"
734200787218SCy Schubert	    SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared'
7343076b9443SCy Schubert	    SHLIB_SUFFIX=".so"
7344076b9443SCy Schubert	    LDFLAGS="$LDFLAGS -export-dynamic"
734570b56f4bSCy Schubert	    if test $doRpath = yes
734670b56f4bSCy Schubertthen :
7347076b9443SCy Schubert
734800787218SCy Schubert		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7349076b9443SCy Schubertfi
7350076b9443SCy Schubert	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7351076b9443SCy Schubert	    # The -pthread needs to go in the CFLAGS, not LIBS
7352076b9443SCy Schubert	    LIBS=`echo $LIBS | sed s/-pthread//`
7353076b9443SCy Schubert	    CFLAGS="$CFLAGS -pthread"
7354076b9443SCy Schubert	    LDFLAGS="$LDFLAGS -pthread"
7355076b9443SCy Schubert	    ;;
7356076b9443SCy Schubert	Darwin-*)
7357076b9443SCy Schubert	    CFLAGS_OPTIMIZE="-Os"
7358076b9443SCy Schubert	    SHLIB_CFLAGS="-fno-common"
7359076b9443SCy Schubert	    # To avoid discrepancies between what headers configure sees during
7360076b9443SCy Schubert	    # preprocessing tests and compiling tests, move any -isysroot and
7361076b9443SCy Schubert	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
7362076b9443SCy Schubert	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
7363076b9443SCy Schubert		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7364076b9443SCy Schubert		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
7365076b9443SCy Schubert	    CFLAGS="`echo " ${CFLAGS}" | \
7366076b9443SCy Schubert		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
7367076b9443SCy Schubert		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
736870b56f4bSCy Schubert	    if test $do64bit = yes
736970b56f4bSCy Schubertthen :
7370076b9443SCy Schubert
7371076b9443SCy Schubert		case `arch` in
7372076b9443SCy Schubert		    ppc)
737370b56f4bSCy Schubert			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5
737470b56f4bSCy Schubertprintf %s "checking if compiler accepts -arch ppc64 flag... " >&6; }
737570b56f4bSCy Schubertif test ${tcl_cv_cc_arch_ppc64+y}
737670b56f4bSCy Schubertthen :
737770b56f4bSCy Schubert  printf %s "(cached) " >&6
737870b56f4bSCy Schubertelse $as_nop
7379076b9443SCy Schubert
7380076b9443SCy Schubert			    hold_cflags=$CFLAGS
7381076b9443SCy Schubert			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7382076b9443SCy Schubert			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7383076b9443SCy Schubert/* end confdefs.h.  */
7384076b9443SCy Schubert
7385076b9443SCy Schubertint
738670b56f4bSCy Schubertmain (void)
7387076b9443SCy Schubert{
7388076b9443SCy Schubert
7389076b9443SCy Schubert  ;
7390076b9443SCy Schubert  return 0;
7391076b9443SCy Schubert}
7392076b9443SCy Schubert_ACEOF
739370b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
739470b56f4bSCy Schubertthen :
7395076b9443SCy Schubert  tcl_cv_cc_arch_ppc64=yes
739670b56f4bSCy Schubertelse $as_nop
7397076b9443SCy Schubert  tcl_cv_cc_arch_ppc64=no
7398076b9443SCy Schubertfi
739970b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
7400076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
7401076b9443SCy Schubert			    CFLAGS=$hold_cflags
7402076b9443SCy Schubertfi
740370b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5
740470b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_cc_arch_ppc64" >&6; }
740570b56f4bSCy Schubert			if test $tcl_cv_cc_arch_ppc64 = yes
740670b56f4bSCy Schubertthen :
7407076b9443SCy Schubert
7408076b9443SCy Schubert			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
7409076b9443SCy Schubert			    do64bit_ok=yes
7410076b9443SCy Schubert
7411076b9443SCy Schubertfi;;
7412076b9443SCy Schubert		    i386)
741370b56f4bSCy Schubert			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5
741470b56f4bSCy Schubertprintf %s "checking if compiler accepts -arch x86_64 flag... " >&6; }
741570b56f4bSCy Schubertif test ${tcl_cv_cc_arch_x86_64+y}
741670b56f4bSCy Schubertthen :
741770b56f4bSCy Schubert  printf %s "(cached) " >&6
741870b56f4bSCy Schubertelse $as_nop
7419076b9443SCy Schubert
7420076b9443SCy Schubert			    hold_cflags=$CFLAGS
7421076b9443SCy Schubert			    CFLAGS="$CFLAGS -arch x86_64"
7422076b9443SCy Schubert			    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7423076b9443SCy Schubert/* end confdefs.h.  */
7424076b9443SCy Schubert
7425076b9443SCy Schubertint
742670b56f4bSCy Schubertmain (void)
7427076b9443SCy Schubert{
7428076b9443SCy Schubert
7429076b9443SCy Schubert  ;
7430076b9443SCy Schubert  return 0;
7431076b9443SCy Schubert}
7432076b9443SCy Schubert_ACEOF
743370b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
743470b56f4bSCy Schubertthen :
7435076b9443SCy Schubert  tcl_cv_cc_arch_x86_64=yes
743670b56f4bSCy Schubertelse $as_nop
7437076b9443SCy Schubert  tcl_cv_cc_arch_x86_64=no
7438076b9443SCy Schubertfi
743970b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
7440076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
7441076b9443SCy Schubert			    CFLAGS=$hold_cflags
7442076b9443SCy Schubertfi
744370b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5
744470b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_cc_arch_x86_64" >&6; }
744570b56f4bSCy Schubert			if test $tcl_cv_cc_arch_x86_64 = yes
744670b56f4bSCy Schubertthen :
7447076b9443SCy Schubert
7448076b9443SCy Schubert			    CFLAGS="$CFLAGS -arch x86_64"
7449076b9443SCy Schubert			    do64bit_ok=yes
7450076b9443SCy Schubert
7451076b9443SCy Schubertfi;;
7452076b9443SCy Schubert		    *)
745370b56f4bSCy Schubert			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
745470b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
7455076b9443SCy Schubert		esac
7456076b9443SCy Schubert
745770b56f4bSCy Schubertelse $as_nop
7458076b9443SCy Schubert
7459076b9443SCy Schubert		# Check for combined 32-bit and 64-bit fat build
7460076b9443SCy Schubert		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
746170b56f4bSCy Schubert		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '
746270b56f4bSCy Schubertthen :
7463076b9443SCy Schubert
7464076b9443SCy Schubert		    fat_32_64=yes
7465076b9443SCy Schubertfi
7466076b9443SCy Schubert
7467076b9443SCy Schubertfi
7468076b9443SCy Schubert	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7469076b9443SCy Schubert	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
747070b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5
747170b56f4bSCy Schubertprintf %s "checking if ld accepts -single_module flag... " >&6; }
747270b56f4bSCy Schubertif test ${tcl_cv_ld_single_module+y}
747370b56f4bSCy Schubertthen :
747470b56f4bSCy Schubert  printf %s "(cached) " >&6
747570b56f4bSCy Schubertelse $as_nop
7476076b9443SCy Schubert
7477076b9443SCy Schubert		hold_ldflags=$LDFLAGS
7478076b9443SCy Schubert		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
7479076b9443SCy Schubert		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7480076b9443SCy Schubert/* end confdefs.h.  */
7481076b9443SCy Schubert
7482076b9443SCy Schubertint
748370b56f4bSCy Schubertmain (void)
7484076b9443SCy Schubert{
7485076b9443SCy Schubertint i;
7486076b9443SCy Schubert  ;
7487076b9443SCy Schubert  return 0;
7488076b9443SCy Schubert}
7489076b9443SCy Schubert_ACEOF
749070b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
749170b56f4bSCy Schubertthen :
7492076b9443SCy Schubert  tcl_cv_ld_single_module=yes
749370b56f4bSCy Schubertelse $as_nop
7494076b9443SCy Schubert  tcl_cv_ld_single_module=no
7495076b9443SCy Schubertfi
749670b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
7497076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
7498076b9443SCy Schubert		LDFLAGS=$hold_ldflags
7499076b9443SCy Schubertfi
750070b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5
750170b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_ld_single_module" >&6; }
750270b56f4bSCy Schubert	    if test $tcl_cv_ld_single_module = yes
750370b56f4bSCy Schubertthen :
7504076b9443SCy Schubert
7505076b9443SCy Schubert		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
7506076b9443SCy Schubert
7507076b9443SCy Schubertfi
7508076b9443SCy Schubert	    # TEA specific: link shlib with current and compatibility version flags
7509076b9443SCy Schubert	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
7510076b9443SCy Schubert	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
7511076b9443SCy Schubert	    SHLIB_SUFFIX=".dylib"
7512076b9443SCy Schubert	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
751370b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5
751470b56f4bSCy Schubertprintf %s "checking if ld accepts -search_paths_first flag... " >&6; }
751570b56f4bSCy Schubertif test ${tcl_cv_ld_search_paths_first+y}
751670b56f4bSCy Schubertthen :
751770b56f4bSCy Schubert  printf %s "(cached) " >&6
751870b56f4bSCy Schubertelse $as_nop
7519076b9443SCy Schubert
7520076b9443SCy Schubert		hold_ldflags=$LDFLAGS
7521076b9443SCy Schubert		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7522076b9443SCy Schubert		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7523076b9443SCy Schubert/* end confdefs.h.  */
7524076b9443SCy Schubert
7525076b9443SCy Schubertint
752670b56f4bSCy Schubertmain (void)
7527076b9443SCy Schubert{
7528076b9443SCy Schubertint i;
7529076b9443SCy Schubert  ;
7530076b9443SCy Schubert  return 0;
7531076b9443SCy Schubert}
7532076b9443SCy Schubert_ACEOF
753370b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
753470b56f4bSCy Schubertthen :
7535076b9443SCy Schubert  tcl_cv_ld_search_paths_first=yes
753670b56f4bSCy Schubertelse $as_nop
7537076b9443SCy Schubert  tcl_cv_ld_search_paths_first=no
7538076b9443SCy Schubertfi
753970b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
7540076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
7541076b9443SCy Schubert		LDFLAGS=$hold_ldflags
7542076b9443SCy Schubertfi
754370b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5
754470b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_ld_search_paths_first" >&6; }
754570b56f4bSCy Schubert	    if test $tcl_cv_ld_search_paths_first = yes
754670b56f4bSCy Schubertthen :
7547076b9443SCy Schubert
7548076b9443SCy Schubert		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7549076b9443SCy Schubert
7550076b9443SCy Schubertfi
755170b56f4bSCy Schubert	    if test "$tcl_cv_cc_visibility_hidden" != yes
755270b56f4bSCy Schubertthen :
7553076b9443SCy Schubert
7554076b9443SCy Schubert
755570b56f4bSCy Schubertprintf "%s\n" "#define MODULE_SCOPE __private_extern__" >>confdefs.h
7556076b9443SCy Schubert
7557076b9443SCy Schubert		tcl_cv_cc_visibility_hidden=yes
7558076b9443SCy Schubert
7559076b9443SCy Schubertfi
7560076b9443SCy Schubert	    CC_SEARCH_FLAGS=""
7561076b9443SCy Schubert	    LD_SEARCH_FLAGS=""
7562076b9443SCy Schubert	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
7563076b9443SCy Schubert	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
7564076b9443SCy Schubert	    # extensions, verify that 64-bit build is possible.
756570b56f4bSCy Schubert	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"
756670b56f4bSCy Schubertthen :
7567076b9443SCy Schubert
756870b56f4bSCy Schubert		if test "${TEA_WINDOWINGSYSTEM}" = x11
756970b56f4bSCy Schubertthen :
7570076b9443SCy Schubert
757170b56f4bSCy Schubert		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5
757270b56f4bSCy Schubertprintf %s "checking for 64-bit X11... " >&6; }
757370b56f4bSCy Schubertif test ${tcl_cv_lib_x11_64+y}
757470b56f4bSCy Schubertthen :
757570b56f4bSCy Schubert  printf %s "(cached) " >&6
757670b56f4bSCy Schubertelse $as_nop
7577076b9443SCy Schubert
7578076b9443SCy Schubert			for v in CFLAGS CPPFLAGS LDFLAGS; do
7579076b9443SCy Schubert			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
7580076b9443SCy Schubert			done
7581076b9443SCy Schubert			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
7582076b9443SCy Schubert			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
7583076b9443SCy Schubert			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7584076b9443SCy Schubert/* end confdefs.h.  */
7585076b9443SCy Schubert#include <X11/Xlib.h>
7586076b9443SCy Schubertint
758770b56f4bSCy Schubertmain (void)
7588076b9443SCy Schubert{
7589076b9443SCy SchubertXrmInitialize();
7590076b9443SCy Schubert  ;
7591076b9443SCy Schubert  return 0;
7592076b9443SCy Schubert}
7593076b9443SCy Schubert_ACEOF
759470b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
759570b56f4bSCy Schubertthen :
7596076b9443SCy Schubert  tcl_cv_lib_x11_64=yes
759770b56f4bSCy Schubertelse $as_nop
7598076b9443SCy Schubert  tcl_cv_lib_x11_64=no
7599076b9443SCy Schubertfi
760070b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
7601076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
7602076b9443SCy Schubert			for v in CFLAGS CPPFLAGS LDFLAGS; do
7603076b9443SCy Schubert			    eval $v'="$hold_'$v'"'
7604076b9443SCy Schubert			done
7605076b9443SCy Schubertfi
760670b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5
760770b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_lib_x11_64" >&6; }
7608076b9443SCy Schubert
7609076b9443SCy Schubertfi
761070b56f4bSCy Schubert		if test "${TEA_WINDOWINGSYSTEM}" = aqua
761170b56f4bSCy Schubertthen :
7612076b9443SCy Schubert
761370b56f4bSCy Schubert		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit Tk" >&5
761470b56f4bSCy Schubertprintf %s "checking for 64-bit Tk... " >&6; }
761570b56f4bSCy Schubertif test ${tcl_cv_lib_tk_64+y}
761670b56f4bSCy Schubertthen :
761770b56f4bSCy Schubert  printf %s "(cached) " >&6
761870b56f4bSCy Schubertelse $as_nop
7619076b9443SCy Schubert
7620076b9443SCy Schubert			for v in CFLAGS CPPFLAGS LDFLAGS; do
7621076b9443SCy Schubert			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
7622076b9443SCy Schubert			done
7623076b9443SCy Schubert			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
7624076b9443SCy Schubert			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
7625076b9443SCy Schubert			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7626076b9443SCy Schubert/* end confdefs.h.  */
7627076b9443SCy Schubert#include <tk.h>
7628076b9443SCy Schubertint
762970b56f4bSCy Schubertmain (void)
7630076b9443SCy Schubert{
7631076b9443SCy SchubertTk_InitStubs(NULL, "", 0);
7632076b9443SCy Schubert  ;
7633076b9443SCy Schubert  return 0;
7634076b9443SCy Schubert}
7635076b9443SCy Schubert_ACEOF
763670b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
763770b56f4bSCy Schubertthen :
7638076b9443SCy Schubert  tcl_cv_lib_tk_64=yes
763970b56f4bSCy Schubertelse $as_nop
7640076b9443SCy Schubert  tcl_cv_lib_tk_64=no
7641076b9443SCy Schubertfi
764270b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
7643076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
7644076b9443SCy Schubert			for v in CFLAGS CPPFLAGS LDFLAGS; do
7645076b9443SCy Schubert			    eval $v'="$hold_'$v'"'
7646076b9443SCy Schubert			done
7647076b9443SCy Schubertfi
764870b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_tk_64" >&5
764970b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_lib_tk_64" >&6; }
7650076b9443SCy Schubert
7651076b9443SCy Schubertfi
7652076b9443SCy Schubert		# remove 64-bit arch flags from CFLAGS et al. if configuration
7653076b9443SCy Schubert		# does not support 64-bit.
765470b56f4bSCy Schubert		if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no
765570b56f4bSCy Schubertthen :
7656076b9443SCy Schubert
765770b56f4bSCy Schubert		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5
765870b56f4bSCy Schubertprintf "%s\n" "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
7659076b9443SCy Schubert		    for v in CFLAGS CPPFLAGS LDFLAGS; do
7660076b9443SCy Schubert			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
7661076b9443SCy Schubert		    done
7662076b9443SCy Schubertfi
7663076b9443SCy Schubert
7664076b9443SCy Schubertfi
7665076b9443SCy Schubert	    ;;
7666076b9443SCy Schubert	OS/390-*)
7667076b9443SCy Schubert	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
7668076b9443SCy Schubert
766970b56f4bSCy Schubertprintf "%s\n" "#define _OE_SOCKETS 1" >>confdefs.h
7670076b9443SCy Schubert
7671076b9443SCy Schubert	    ;;
7672076b9443SCy Schubert	OSF1-V*)
7673076b9443SCy Schubert	    # Digital OSF/1
7674076b9443SCy Schubert	    SHLIB_CFLAGS=""
767570b56f4bSCy Schubert	    if test "$SHARED_BUILD" = 1
767670b56f4bSCy Schubertthen :
7677076b9443SCy Schubert
7678076b9443SCy Schubert	        SHLIB_LD='ld -shared -expect_unresolved "*"'
7679076b9443SCy Schubert
768070b56f4bSCy Schubertelse $as_nop
7681076b9443SCy Schubert
7682076b9443SCy Schubert	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
7683076b9443SCy Schubert
7684076b9443SCy Schubertfi
7685076b9443SCy Schubert	    SHLIB_SUFFIX=".so"
768670b56f4bSCy Schubert	    if test $doRpath = yes
768770b56f4bSCy Schubertthen :
7688076b9443SCy Schubert
768900787218SCy Schubert		CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"'
7690076b9443SCy Schubert		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7691076b9443SCy Schubertfi
769270b56f4bSCy Schubert	    if test "$GCC" = yes
769370b56f4bSCy Schubertthen :
7694076b9443SCy Schubert  CFLAGS="$CFLAGS -mieee"
769570b56f4bSCy Schubertelse $as_nop
7696076b9443SCy Schubert
7697076b9443SCy Schubert		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
7698076b9443SCy Schubertfi
7699076b9443SCy Schubert	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
7700076b9443SCy Schubert	    CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
7701076b9443SCy Schubert	    CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
7702076b9443SCy Schubert	    LIBS=`echo $LIBS | sed s/-lpthreads//`
770370b56f4bSCy Schubert	    if test "$GCC" = yes
770470b56f4bSCy Schubertthen :
7705076b9443SCy Schubert
7706076b9443SCy Schubert		LIBS="$LIBS -lpthread -lmach -lexc"
7707076b9443SCy Schubert
770870b56f4bSCy Schubertelse $as_nop
7709076b9443SCy Schubert
7710076b9443SCy Schubert		CFLAGS="$CFLAGS -pthread"
7711076b9443SCy Schubert		LDFLAGS="$LDFLAGS -pthread"
7712076b9443SCy Schubert
7713076b9443SCy Schubertfi
7714076b9443SCy Schubert	    ;;
7715076b9443SCy Schubert	QNX-6*)
7716076b9443SCy Schubert	    # QNX RTP
7717076b9443SCy Schubert	    # This may work for all QNX, but it was only reported for v6.
7718076b9443SCy Schubert	    SHLIB_CFLAGS="-fPIC"
7719076b9443SCy Schubert	    SHLIB_LD="ld -Bshareable -x"
7720076b9443SCy Schubert	    SHLIB_LD_LIBS=""
7721076b9443SCy Schubert	    SHLIB_SUFFIX=".so"
7722076b9443SCy Schubert	    CC_SEARCH_FLAGS=""
7723076b9443SCy Schubert	    LD_SEARCH_FLAGS=""
7724076b9443SCy Schubert	    ;;
7725076b9443SCy Schubert	SCO_SV-3.2*)
772670b56f4bSCy Schubert	    if test "$GCC" = yes
772770b56f4bSCy Schubertthen :
7728076b9443SCy Schubert
7729076b9443SCy Schubert		SHLIB_CFLAGS="-fPIC -melf"
7730076b9443SCy Schubert		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
7731076b9443SCy Schubert
773270b56f4bSCy Schubertelse $as_nop
7733076b9443SCy Schubert
7734076b9443SCy Schubert		SHLIB_CFLAGS="-Kpic -belf"
7735076b9443SCy Schubert		LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
7736076b9443SCy Schubert
7737076b9443SCy Schubertfi
7738076b9443SCy Schubert	    SHLIB_LD="ld -G"
7739076b9443SCy Schubert	    SHLIB_LD_LIBS=""
7740076b9443SCy Schubert	    SHLIB_SUFFIX=".so"
7741076b9443SCy Schubert	    CC_SEARCH_FLAGS=""
7742076b9443SCy Schubert	    LD_SEARCH_FLAGS=""
7743076b9443SCy Schubert	    ;;
7744076b9443SCy Schubert	SunOS-5.[0-6])
7745076b9443SCy Schubert	    # Careful to not let 5.10+ fall into this case
7746076b9443SCy Schubert
7747076b9443SCy Schubert	    # Note: If _REENTRANT isn't defined, then Solaris
7748076b9443SCy Schubert	    # won't define thread-safe library routines.
7749076b9443SCy Schubert
7750076b9443SCy Schubert
775170b56f4bSCy Schubertprintf "%s\n" "#define _REENTRANT 1" >>confdefs.h
7752076b9443SCy Schubert
7753076b9443SCy Schubert
775470b56f4bSCy Schubertprintf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
7755076b9443SCy Schubert
7756076b9443SCy Schubert
7757076b9443SCy Schubert	    SHLIB_CFLAGS="-KPIC"
7758076b9443SCy Schubert	    SHLIB_SUFFIX=".so"
775970b56f4bSCy Schubert	    if test "$GCC" = yes
776070b56f4bSCy Schubertthen :
7761076b9443SCy Schubert
7762076b9443SCy Schubert		SHLIB_LD='${CC} -shared'
776300787218SCy Schubert		CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
7764076b9443SCy Schubert		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7765076b9443SCy Schubert
776670b56f4bSCy Schubertelse $as_nop
7767076b9443SCy Schubert
7768076b9443SCy Schubert		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
776900787218SCy Schubert		CC_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
7770076b9443SCy Schubert		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7771076b9443SCy Schubert
7772076b9443SCy Schubertfi
7773076b9443SCy Schubert	    ;;
7774076b9443SCy Schubert	SunOS-5*)
7775076b9443SCy Schubert	    # Note: If _REENTRANT isn't defined, then Solaris
7776076b9443SCy Schubert	    # won't define thread-safe library routines.
7777076b9443SCy Schubert
7778076b9443SCy Schubert
777970b56f4bSCy Schubertprintf "%s\n" "#define _REENTRANT 1" >>confdefs.h
7780076b9443SCy Schubert
7781076b9443SCy Schubert
778270b56f4bSCy Schubertprintf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
7783076b9443SCy Schubert
7784076b9443SCy Schubert
7785076b9443SCy Schubert	    SHLIB_CFLAGS="-KPIC"
7786076b9443SCy Schubert
7787076b9443SCy Schubert	    # Check to enable 64-bit flags for compiler/linker
778870b56f4bSCy Schubert	    if test "$do64bit" = yes
778970b56f4bSCy Schubertthen :
7790076b9443SCy Schubert
7791076b9443SCy Schubert		arch=`isainfo`
779270b56f4bSCy Schubert		if test "$arch" = "sparcv9 sparc"
779370b56f4bSCy Schubertthen :
7794076b9443SCy Schubert
779570b56f4bSCy Schubert		    if test "$GCC" = yes
779670b56f4bSCy Schubertthen :
7797076b9443SCy Schubert
779870b56f4bSCy Schubert			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3
779970b56f4bSCy Schubertthen :
7800076b9443SCy Schubert
780170b56f4bSCy Schubert			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
780270b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
7803076b9443SCy Schubert
780470b56f4bSCy Schubertelse $as_nop
7805076b9443SCy Schubert
7806076b9443SCy Schubert			    do64bit_ok=yes
7807076b9443SCy Schubert			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
7808076b9443SCy Schubert			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
7809076b9443SCy Schubert			    SHLIB_CFLAGS="-fPIC"
7810076b9443SCy Schubert
7811076b9443SCy Schubertfi
7812076b9443SCy Schubert
781370b56f4bSCy Schubertelse $as_nop
7814076b9443SCy Schubert
7815076b9443SCy Schubert			do64bit_ok=yes
781670b56f4bSCy Schubert			if test "$do64bitVIS" = yes
781770b56f4bSCy Schubertthen :
7818076b9443SCy Schubert
7819076b9443SCy Schubert			    CFLAGS="$CFLAGS -xarch=v9a"
7820076b9443SCy Schubert			    LDFLAGS_ARCH="-xarch=v9a"
7821076b9443SCy Schubert
782270b56f4bSCy Schubertelse $as_nop
7823076b9443SCy Schubert
7824076b9443SCy Schubert			    CFLAGS="$CFLAGS -xarch=v9"
7825076b9443SCy Schubert			    LDFLAGS_ARCH="-xarch=v9"
7826076b9443SCy Schubert
7827076b9443SCy Schubertfi
7828076b9443SCy Schubert			# Solaris 64 uses this as well
7829076b9443SCy Schubert			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
7830076b9443SCy Schubert
7831076b9443SCy Schubertfi
7832076b9443SCy Schubert
783370b56f4bSCy Schubertelse $as_nop
783470b56f4bSCy Schubert  if test "$arch" = "amd64 i386"
783570b56f4bSCy Schubertthen :
7836076b9443SCy Schubert
783770b56f4bSCy Schubert		    if test "$GCC" = yes
783870b56f4bSCy Schubertthen :
7839076b9443SCy Schubert
7840076b9443SCy Schubert			case $system in
7841076b9443SCy Schubert			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
7842076b9443SCy Schubert				do64bit_ok=yes
7843076b9443SCy Schubert				CFLAGS="$CFLAGS -m64"
7844076b9443SCy Schubert				LDFLAGS="$LDFLAGS -m64";;
7845076b9443SCy Schubert			    *)
784670b56f4bSCy Schubert				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5
784770b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
7848076b9443SCy Schubert			esac
7849076b9443SCy Schubert
785070b56f4bSCy Schubertelse $as_nop
7851076b9443SCy Schubert
7852076b9443SCy Schubert			do64bit_ok=yes
7853076b9443SCy Schubert			case $system in
7854076b9443SCy Schubert			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
7855076b9443SCy Schubert				CFLAGS="$CFLAGS -m64"
7856076b9443SCy Schubert				LDFLAGS="$LDFLAGS -m64";;
7857076b9443SCy Schubert			    *)
7858076b9443SCy Schubert				CFLAGS="$CFLAGS -xarch=amd64"
7859076b9443SCy Schubert				LDFLAGS="$LDFLAGS -xarch=amd64";;
7860076b9443SCy Schubert			esac
7861076b9443SCy Schubert
7862076b9443SCy Schubertfi
7863076b9443SCy Schubert
786470b56f4bSCy Schubertelse $as_nop
786570b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5
786670b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
7867076b9443SCy Schubertfi
7868076b9443SCy Schubertfi
7869076b9443SCy Schubert
7870076b9443SCy Schubertfi
7871076b9443SCy Schubert
7872076b9443SCy Schubert	    SHLIB_SUFFIX=".so"
787370b56f4bSCy Schubert	    if test "$GCC" = yes
787470b56f4bSCy Schubertthen :
7875076b9443SCy Schubert
7876076b9443SCy Schubert		SHLIB_LD='${CC} -shared'
787700787218SCy Schubert		CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
7878076b9443SCy Schubert		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
787970b56f4bSCy Schubert		if test "$do64bit_ok" = yes
788070b56f4bSCy Schubertthen :
7881076b9443SCy Schubert
788270b56f4bSCy Schubert		    if test "$arch" = "sparcv9 sparc"
788370b56f4bSCy Schubertthen :
7884076b9443SCy Schubert
7885076b9443SCy Schubert			# We need to specify -static-libgcc or we need to
7886076b9443SCy Schubert			# add the path to the sparv9 libgcc.
7887076b9443SCy Schubert			# JH: static-libgcc is necessary for core Tcl, but may
7888076b9443SCy Schubert			# not be necessary for extensions.
7889076b9443SCy Schubert			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
7890076b9443SCy Schubert			# for finding sparcv9 libgcc, get the regular libgcc
7891076b9443SCy Schubert			# path, remove so name and append 'sparcv9'
7892076b9443SCy Schubert			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
7893076b9443SCy Schubert			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
7894076b9443SCy Schubert
789570b56f4bSCy Schubertelse $as_nop
789670b56f4bSCy Schubert  if test "$arch" = "amd64 i386"
789770b56f4bSCy Schubertthen :
7898076b9443SCy Schubert
7899076b9443SCy Schubert			# JH: static-libgcc is necessary for core Tcl, but may
7900076b9443SCy Schubert			# not be necessary for extensions.
7901076b9443SCy Schubert			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
7902076b9443SCy Schubert
7903076b9443SCy Schubertfi
7904076b9443SCy Schubertfi
7905076b9443SCy Schubert
7906076b9443SCy Schubertfi
7907076b9443SCy Schubert
790870b56f4bSCy Schubertelse $as_nop
7909076b9443SCy Schubert
7910076b9443SCy Schubert		case $system in
7911076b9443SCy Schubert		    SunOS-5.[1-9][0-9]*)
7912076b9443SCy Schubert			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7913076b9443SCy Schubert			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
7914076b9443SCy Schubert		    *)
7915076b9443SCy Schubert			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
7916076b9443SCy Schubert		esac
791700787218SCy Schubert		CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"'
791800787218SCy Schubert		LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"'
7919076b9443SCy Schubert
7920076b9443SCy Schubertfi
7921076b9443SCy Schubert	    ;;
7922076b9443SCy Schubert	UNIX_SV* | UnixWare-5*)
7923076b9443SCy Schubert	    SHLIB_CFLAGS="-KPIC"
7924076b9443SCy Schubert	    SHLIB_LD='${CC} -G'
7925076b9443SCy Schubert	    SHLIB_LD_LIBS=""
7926076b9443SCy Schubert	    SHLIB_SUFFIX=".so"
7927076b9443SCy Schubert	    # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
7928076b9443SCy Schubert	    # that don't grok the -Bexport option.  Test that it does.
792970b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5
793070b56f4bSCy Schubertprintf %s "checking for ld accepts -Bexport flag... " >&6; }
793170b56f4bSCy Schubertif test ${tcl_cv_ld_Bexport+y}
793270b56f4bSCy Schubertthen :
793370b56f4bSCy Schubert  printf %s "(cached) " >&6
793470b56f4bSCy Schubertelse $as_nop
7935076b9443SCy Schubert
7936076b9443SCy Schubert		hold_ldflags=$LDFLAGS
7937076b9443SCy Schubert		LDFLAGS="$LDFLAGS -Wl,-Bexport"
7938076b9443SCy Schubert		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7939076b9443SCy Schubert/* end confdefs.h.  */
7940076b9443SCy Schubert
7941076b9443SCy Schubertint
794270b56f4bSCy Schubertmain (void)
7943076b9443SCy Schubert{
7944076b9443SCy Schubertint i;
7945076b9443SCy Schubert  ;
7946076b9443SCy Schubert  return 0;
7947076b9443SCy Schubert}
7948076b9443SCy Schubert_ACEOF
794970b56f4bSCy Schubertif ac_fn_c_try_link "$LINENO"
795070b56f4bSCy Schubertthen :
7951076b9443SCy Schubert  tcl_cv_ld_Bexport=yes
795270b56f4bSCy Schubertelse $as_nop
7953076b9443SCy Schubert  tcl_cv_ld_Bexport=no
7954076b9443SCy Schubertfi
795570b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam \
7956076b9443SCy Schubert    conftest$ac_exeext conftest.$ac_ext
7957076b9443SCy Schubert	        LDFLAGS=$hold_ldflags
7958076b9443SCy Schubertfi
795970b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5
796070b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_ld_Bexport" >&6; }
796170b56f4bSCy Schubert	    if test $tcl_cv_ld_Bexport = yes
796270b56f4bSCy Schubertthen :
7963076b9443SCy Schubert
7964076b9443SCy Schubert		LDFLAGS="$LDFLAGS -Wl,-Bexport"
7965076b9443SCy Schubert
7966076b9443SCy Schubertfi
7967076b9443SCy Schubert	    CC_SEARCH_FLAGS=""
7968076b9443SCy Schubert	    LD_SEARCH_FLAGS=""
7969076b9443SCy Schubert	    ;;
7970076b9443SCy Schubert    esac
7971076b9443SCy Schubert
797270b56f4bSCy Schubert    if test "$do64bit" = yes -a "$do64bit_ok" = no
797370b56f4bSCy Schubertthen :
7974076b9443SCy Schubert
797570b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
797670b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
7977076b9443SCy Schubert
7978076b9443SCy Schubertfi
7979076b9443SCy Schubert
7980076b9443SCy Schubert
7981076b9443SCy Schubert
7982076b9443SCy Schubert    # Add in the arch flags late to ensure it wasn't removed.
7983076b9443SCy Schubert    # Not necessary in TEA, but this is aligned with core
7984076b9443SCy Schubert    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
7985076b9443SCy Schubert
7986076b9443SCy Schubert    # If we're running gcc, then change the C flags for compiling shared
7987076b9443SCy Schubert    # libraries to the right flags for gcc, instead of those for the
7988076b9443SCy Schubert    # standard manufacturer compiler.
7989076b9443SCy Schubert
799070b56f4bSCy Schubert    if test "$GCC" = yes
799170b56f4bSCy Schubertthen :
7992076b9443SCy Schubert
7993076b9443SCy Schubert	case $system in
7994076b9443SCy Schubert	    AIX-*) ;;
7995076b9443SCy Schubert	    BSD/OS*) ;;
799600787218SCy Schubert	    CYGWIN_*|MINGW32_*|MINGW64_*|MSYS_*) ;;
7997076b9443SCy Schubert	    IRIX*) ;;
799800787218SCy Schubert	    NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;;
7999076b9443SCy Schubert	    Darwin-*) ;;
8000076b9443SCy Schubert	    SCO_SV-3.2*) ;;
8001076b9443SCy Schubert	    windows) ;;
8002076b9443SCy Schubert	    *) SHLIB_CFLAGS="-fPIC" ;;
8003076b9443SCy Schubert	esac
8004076b9443SCy Schubertfi
8005076b9443SCy Schubert
800670b56f4bSCy Schubert    if test "$tcl_cv_cc_visibility_hidden" != yes
800770b56f4bSCy Schubertthen :
8008076b9443SCy Schubert
8009076b9443SCy Schubert
801070b56f4bSCy Schubertprintf "%s\n" "#define MODULE_SCOPE extern" >>confdefs.h
8011076b9443SCy Schubert
8012076b9443SCy Schubert
8013076b9443SCy Schubertfi
8014076b9443SCy Schubert
801570b56f4bSCy Schubert    if test "$SHARED_LIB_SUFFIX" = ""
801670b56f4bSCy Schubertthen :
8017076b9443SCy Schubert
8018076b9443SCy Schubert    # TEA specific: use PACKAGE_VERSION instead of VERSION
8019076b9443SCy Schubert    SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
8020076b9443SCy Schubertfi
802170b56f4bSCy Schubert    if test "$UNSHARED_LIB_SUFFIX" = ""
802270b56f4bSCy Schubertthen :
8023076b9443SCy Schubert
8024076b9443SCy Schubert    # TEA specific: use PACKAGE_VERSION instead of VERSION
8025076b9443SCy Schubert    UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
8026076b9443SCy Schubertfi
8027076b9443SCy Schubert
8028076b9443SCy Schubert    if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then
802970b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5
803070b56f4bSCy Schubertprintf %s "checking for SEH support in compiler... " >&6; }
803170b56f4bSCy Schubertif test ${tcl_cv_seh+y}
803270b56f4bSCy Schubertthen :
803370b56f4bSCy Schubert  printf %s "(cached) " >&6
803470b56f4bSCy Schubertelse $as_nop
803570b56f4bSCy Schubert  if test "$cross_compiling" = yes
803670b56f4bSCy Schubertthen :
8037076b9443SCy Schubert  tcl_cv_seh=no
803870b56f4bSCy Schubertelse $as_nop
8039076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8040076b9443SCy Schubert/* end confdefs.h.  */
8041076b9443SCy Schubert
8042076b9443SCy Schubert#define WIN32_LEAN_AND_MEAN
8043076b9443SCy Schubert#include <windows.h>
8044076b9443SCy Schubert#undef WIN32_LEAN_AND_MEAN
8045076b9443SCy Schubert
8046076b9443SCy Schubert	    int main(int argc, char** argv) {
8047076b9443SCy Schubert		int a, b = 0;
8048076b9443SCy Schubert		__try {
8049076b9443SCy Schubert		    a = 666 / b;
8050076b9443SCy Schubert		}
8051076b9443SCy Schubert		__except (EXCEPTION_EXECUTE_HANDLER) {
8052076b9443SCy Schubert		    return 0;
8053076b9443SCy Schubert		}
8054076b9443SCy Schubert		return 1;
8055076b9443SCy Schubert	    }
8056076b9443SCy Schubert
8057076b9443SCy Schubert_ACEOF
805870b56f4bSCy Schubertif ac_fn_c_try_run "$LINENO"
805970b56f4bSCy Schubertthen :
8060076b9443SCy Schubert  tcl_cv_seh=yes
806170b56f4bSCy Schubertelse $as_nop
8062076b9443SCy Schubert  tcl_cv_seh=no
8063076b9443SCy Schubertfi
8064076b9443SCy Schubertrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8065076b9443SCy Schubert  conftest.$ac_objext conftest.beam conftest.$ac_ext
8066076b9443SCy Schubertfi
8067076b9443SCy Schubert
8068076b9443SCy Schubert
8069076b9443SCy Schubertfi
807070b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5
807170b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_seh" >&6; }
8072076b9443SCy Schubert	if test "$tcl_cv_seh" = "no" ; then
8073076b9443SCy Schubert
807470b56f4bSCy Schubertprintf "%s\n" "#define HAVE_NO_SEH 1" >>confdefs.h
8075076b9443SCy Schubert
8076076b9443SCy Schubert	fi
8077076b9443SCy Schubert
8078076b9443SCy Schubert	#
8079076b9443SCy Schubert	# Check to see if the excpt.h include file provided contains the
8080076b9443SCy Schubert	# definition for EXCEPTION_DISPOSITION; if not, which is the case
8081076b9443SCy Schubert	# with Cygwin's version as of 2002-04-10, define it to be int,
8082076b9443SCy Schubert	# sufficient for getting the current code to work.
8083076b9443SCy Schubert	#
808470b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5
808570b56f4bSCy Schubertprintf %s "checking for EXCEPTION_DISPOSITION support in include files... " >&6; }
808670b56f4bSCy Schubertif test ${tcl_cv_eh_disposition+y}
808770b56f4bSCy Schubertthen :
808870b56f4bSCy Schubert  printf %s "(cached) " >&6
808970b56f4bSCy Schubertelse $as_nop
8090076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8091076b9443SCy Schubert/* end confdefs.h.  */
8092076b9443SCy Schubert
8093076b9443SCy Schubert#	    define WIN32_LEAN_AND_MEAN
8094076b9443SCy Schubert#	    include <windows.h>
8095076b9443SCy Schubert#	    undef WIN32_LEAN_AND_MEAN
8096076b9443SCy Schubert
8097076b9443SCy Schubertint
809870b56f4bSCy Schubertmain (void)
8099076b9443SCy Schubert{
8100076b9443SCy Schubert
8101076b9443SCy Schubert		EXCEPTION_DISPOSITION x;
8102076b9443SCy Schubert
8103076b9443SCy Schubert  ;
8104076b9443SCy Schubert  return 0;
8105076b9443SCy Schubert}
8106076b9443SCy Schubert_ACEOF
810770b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
810870b56f4bSCy Schubertthen :
8109076b9443SCy Schubert  tcl_cv_eh_disposition=yes
811070b56f4bSCy Schubertelse $as_nop
8111076b9443SCy Schubert  tcl_cv_eh_disposition=no
8112076b9443SCy Schubertfi
811370b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8114076b9443SCy Schubert
8115076b9443SCy Schubertfi
811670b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5
811770b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_eh_disposition" >&6; }
8118076b9443SCy Schubert	if test "$tcl_cv_eh_disposition" = "no" ; then
8119076b9443SCy Schubert
812070b56f4bSCy Schubertprintf "%s\n" "#define EXCEPTION_DISPOSITION int" >>confdefs.h
8121076b9443SCy Schubert
8122076b9443SCy Schubert	fi
8123076b9443SCy Schubert
8124076b9443SCy Schubert	# Check to see if winnt.h defines CHAR, SHORT, and LONG
8125076b9443SCy Schubert	# even if VOID has already been #defined. The win32api
8126076b9443SCy Schubert	# used by mingw and cygwin is known to do this.
8127076b9443SCy Schubert
812870b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5
812970b56f4bSCy Schubertprintf %s "checking for winnt.h that ignores VOID define... " >&6; }
813070b56f4bSCy Schubertif test ${tcl_cv_winnt_ignore_void+y}
813170b56f4bSCy Schubertthen :
813270b56f4bSCy Schubert  printf %s "(cached) " >&6
813370b56f4bSCy Schubertelse $as_nop
8134076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8135076b9443SCy Schubert/* end confdefs.h.  */
8136076b9443SCy Schubert
8137076b9443SCy Schubert#define VOID void
8138076b9443SCy Schubert#define WIN32_LEAN_AND_MEAN
8139076b9443SCy Schubert#include <windows.h>
8140076b9443SCy Schubert#undef WIN32_LEAN_AND_MEAN
8141076b9443SCy Schubert
8142076b9443SCy Schubertint
814370b56f4bSCy Schubertmain (void)
8144076b9443SCy Schubert{
8145076b9443SCy Schubert
8146076b9443SCy Schubert		CHAR c;
8147076b9443SCy Schubert		SHORT s;
8148076b9443SCy Schubert		LONG l;
8149076b9443SCy Schubert
8150076b9443SCy Schubert  ;
8151076b9443SCy Schubert  return 0;
8152076b9443SCy Schubert}
8153076b9443SCy Schubert_ACEOF
815470b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
815570b56f4bSCy Schubertthen :
8156076b9443SCy Schubert  tcl_cv_winnt_ignore_void=yes
815770b56f4bSCy Schubertelse $as_nop
8158076b9443SCy Schubert  tcl_cv_winnt_ignore_void=no
8159076b9443SCy Schubertfi
816070b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8161076b9443SCy Schubert
8162076b9443SCy Schubertfi
816370b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5
816470b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_winnt_ignore_void" >&6; }
8165076b9443SCy Schubert	if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
8166076b9443SCy Schubert
816770b56f4bSCy Schubertprintf "%s\n" "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h
8168076b9443SCy Schubert
8169076b9443SCy Schubert	fi
8170076b9443SCy Schubert    fi
8171076b9443SCy Schubert
8172076b9443SCy Schubert	# See if the compiler supports casting to a union type.
8173076b9443SCy Schubert	# This is used to stop gcc from printing a compiler
8174076b9443SCy Schubert	# warning when initializing a union member.
8175076b9443SCy Schubert
817670b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5
817770b56f4bSCy Schubertprintf %s "checking for cast to union support... " >&6; }
817870b56f4bSCy Schubertif test ${tcl_cv_cast_to_union+y}
817970b56f4bSCy Schubertthen :
818070b56f4bSCy Schubert  printf %s "(cached) " >&6
818170b56f4bSCy Schubertelse $as_nop
8182076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8183076b9443SCy Schubert/* end confdefs.h.  */
8184076b9443SCy Schubert
8185076b9443SCy Schubertint
818670b56f4bSCy Schubertmain (void)
8187076b9443SCy Schubert{
8188076b9443SCy Schubert
8189076b9443SCy Schubert		  union foo { int i; double d; };
8190076b9443SCy Schubert		  union foo f = (union foo) (int) 0;
8191076b9443SCy Schubert
8192076b9443SCy Schubert  ;
8193076b9443SCy Schubert  return 0;
8194076b9443SCy Schubert}
8195076b9443SCy Schubert_ACEOF
819670b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
819770b56f4bSCy Schubertthen :
8198076b9443SCy Schubert  tcl_cv_cast_to_union=yes
819970b56f4bSCy Schubertelse $as_nop
8200076b9443SCy Schubert  tcl_cv_cast_to_union=no
8201076b9443SCy Schubertfi
820270b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8203076b9443SCy Schubert
8204076b9443SCy Schubertfi
820570b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5
820670b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_cast_to_union" >&6; }
8207076b9443SCy Schubert	if test "$tcl_cv_cast_to_union" = "yes"; then
8208076b9443SCy Schubert
820970b56f4bSCy Schubertprintf "%s\n" "#define HAVE_CAST_TO_UNION 1" >>confdefs.h
8210076b9443SCy Schubert
8211076b9443SCy Schubert	fi
8212076b9443SCy Schubert
821300787218SCy Schubert	ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
821400787218SCy Schubertif test "x$ac_cv_header_stdbool_h" = xyes
821500787218SCy Schubertthen :
821600787218SCy Schubert
821700787218SCy Schubertprintf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
821800787218SCy Schubert
821900787218SCy Schubertfi
822000787218SCy Schubert
822100787218SCy Schubert
822200787218SCy Schubert
822300787218SCy Schubert
8224076b9443SCy Schubert
8225076b9443SCy Schubert
8226076b9443SCy Schubert
8227076b9443SCy Schubert
8228076b9443SCy Schubert
8229076b9443SCy Schubert
8230076b9443SCy Schubert
8231076b9443SCy Schubert
8232076b9443SCy Schubert
8233076b9443SCy Schubert
8234076b9443SCy Schubert
8235076b9443SCy Schubert
8236076b9443SCy Schubert    # These must be called after we do the basic CFLAGS checks and
8237076b9443SCy Schubert    # verify any possible 64-bit or similar switches are necessary
8238076b9443SCy Schubert
823970b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5
824070b56f4bSCy Schubertprintf %s "checking for required early compiler flags... " >&6; }
8241076b9443SCy Schubert    tcl_flags=""
8242076b9443SCy Schubert
824370b56f4bSCy Schubert    if test ${tcl_cv_flag__isoc99_source+y}
824470b56f4bSCy Schubertthen :
824570b56f4bSCy Schubert  printf %s "(cached) " >&6
824670b56f4bSCy Schubertelse $as_nop
8247076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8248076b9443SCy Schubert/* end confdefs.h.  */
8249076b9443SCy Schubert#include <stdlib.h>
8250076b9443SCy Schubertint
825170b56f4bSCy Schubertmain (void)
8252076b9443SCy Schubert{
8253076b9443SCy Schubertchar *p = (char *)strtoll; char *q = (char *)strtoull;
8254076b9443SCy Schubert  ;
8255076b9443SCy Schubert  return 0;
8256076b9443SCy Schubert}
8257076b9443SCy Schubert_ACEOF
825870b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
825970b56f4bSCy Schubertthen :
8260076b9443SCy Schubert  tcl_cv_flag__isoc99_source=no
826170b56f4bSCy Schubertelse $as_nop
8262076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8263076b9443SCy Schubert/* end confdefs.h.  */
8264076b9443SCy Schubert#define _ISOC99_SOURCE 1
8265076b9443SCy Schubert#include <stdlib.h>
8266076b9443SCy Schubertint
826770b56f4bSCy Schubertmain (void)
8268076b9443SCy Schubert{
8269076b9443SCy Schubertchar *p = (char *)strtoll; char *q = (char *)strtoull;
8270076b9443SCy Schubert  ;
8271076b9443SCy Schubert  return 0;
8272076b9443SCy Schubert}
8273076b9443SCy Schubert_ACEOF
827470b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
827570b56f4bSCy Schubertthen :
8276076b9443SCy Schubert  tcl_cv_flag__isoc99_source=yes
827770b56f4bSCy Schubertelse $as_nop
8278076b9443SCy Schubert  tcl_cv_flag__isoc99_source=no
8279076b9443SCy Schubertfi
828070b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8281076b9443SCy Schubertfi
828270b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8283076b9443SCy Schubertfi
8284076b9443SCy Schubert
8285076b9443SCy Schubert    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
8286076b9443SCy Schubert
828770b56f4bSCy Schubertprintf "%s\n" "#define _ISOC99_SOURCE 1" >>confdefs.h
8288076b9443SCy Schubert
8289076b9443SCy Schubert	tcl_flags="$tcl_flags _ISOC99_SOURCE"
8290076b9443SCy Schubert    fi
8291076b9443SCy Schubert
8292076b9443SCy Schubert
829370b56f4bSCy Schubert    if test ${tcl_cv_flag__largefile64_source+y}
829470b56f4bSCy Schubertthen :
829570b56f4bSCy Schubert  printf %s "(cached) " >&6
829670b56f4bSCy Schubertelse $as_nop
8297076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8298076b9443SCy Schubert/* end confdefs.h.  */
8299076b9443SCy Schubert#include <sys/stat.h>
8300076b9443SCy Schubertint
830170b56f4bSCy Schubertmain (void)
8302076b9443SCy Schubert{
8303076b9443SCy Schubertstruct stat64 buf; int i = stat64("/", &buf);
8304076b9443SCy Schubert  ;
8305076b9443SCy Schubert  return 0;
8306076b9443SCy Schubert}
8307076b9443SCy Schubert_ACEOF
830870b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
830970b56f4bSCy Schubertthen :
8310076b9443SCy Schubert  tcl_cv_flag__largefile64_source=no
831170b56f4bSCy Schubertelse $as_nop
8312076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8313076b9443SCy Schubert/* end confdefs.h.  */
8314076b9443SCy Schubert#define _LARGEFILE64_SOURCE 1
8315076b9443SCy Schubert#include <sys/stat.h>
8316076b9443SCy Schubertint
831770b56f4bSCy Schubertmain (void)
8318076b9443SCy Schubert{
8319076b9443SCy Schubertstruct stat64 buf; int i = stat64("/", &buf);
8320076b9443SCy Schubert  ;
8321076b9443SCy Schubert  return 0;
8322076b9443SCy Schubert}
8323076b9443SCy Schubert_ACEOF
832470b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
832570b56f4bSCy Schubertthen :
8326076b9443SCy Schubert  tcl_cv_flag__largefile64_source=yes
832770b56f4bSCy Schubertelse $as_nop
8328076b9443SCy Schubert  tcl_cv_flag__largefile64_source=no
8329076b9443SCy Schubertfi
833070b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8331076b9443SCy Schubertfi
833270b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8333076b9443SCy Schubertfi
8334076b9443SCy Schubert
8335076b9443SCy Schubert    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
8336076b9443SCy Schubert
833770b56f4bSCy Schubertprintf "%s\n" "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
8338076b9443SCy Schubert
8339076b9443SCy Schubert	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
8340076b9443SCy Schubert    fi
8341076b9443SCy Schubert
8342076b9443SCy Schubert
834370b56f4bSCy Schubert    if test ${tcl_cv_flag__largefile_source64+y}
834470b56f4bSCy Schubertthen :
834570b56f4bSCy Schubert  printf %s "(cached) " >&6
834670b56f4bSCy Schubertelse $as_nop
8347076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8348076b9443SCy Schubert/* end confdefs.h.  */
8349076b9443SCy Schubert#include <sys/stat.h>
8350076b9443SCy Schubertint
835170b56f4bSCy Schubertmain (void)
8352076b9443SCy Schubert{
8353076b9443SCy Schubertchar *p = (char *)open64;
8354076b9443SCy Schubert  ;
8355076b9443SCy Schubert  return 0;
8356076b9443SCy Schubert}
8357076b9443SCy Schubert_ACEOF
835870b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
835970b56f4bSCy Schubertthen :
8360076b9443SCy Schubert  tcl_cv_flag__largefile_source64=no
836170b56f4bSCy Schubertelse $as_nop
8362076b9443SCy Schubert  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8363076b9443SCy Schubert/* end confdefs.h.  */
8364076b9443SCy Schubert#define _LARGEFILE_SOURCE64 1
8365076b9443SCy Schubert#include <sys/stat.h>
8366076b9443SCy Schubertint
836770b56f4bSCy Schubertmain (void)
8368076b9443SCy Schubert{
8369076b9443SCy Schubertchar *p = (char *)open64;
8370076b9443SCy Schubert  ;
8371076b9443SCy Schubert  return 0;
8372076b9443SCy Schubert}
8373076b9443SCy Schubert_ACEOF
837470b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
837570b56f4bSCy Schubertthen :
8376076b9443SCy Schubert  tcl_cv_flag__largefile_source64=yes
837770b56f4bSCy Schubertelse $as_nop
8378076b9443SCy Schubert  tcl_cv_flag__largefile_source64=no
8379076b9443SCy Schubertfi
838070b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8381076b9443SCy Schubertfi
838270b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8383076b9443SCy Schubertfi
8384076b9443SCy Schubert
8385076b9443SCy Schubert    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
8386076b9443SCy Schubert
838770b56f4bSCy Schubertprintf "%s\n" "#define _LARGEFILE_SOURCE64 1" >>confdefs.h
8388076b9443SCy Schubert
8389076b9443SCy Schubert	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
8390076b9443SCy Schubert    fi
8391076b9443SCy Schubert
8392076b9443SCy Schubert    if test "x${tcl_flags}" = "x" ; then
839370b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
839470b56f4bSCy Schubertprintf "%s\n" "none" >&6; }
8395076b9443SCy Schubert    else
839670b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5
839770b56f4bSCy Schubertprintf "%s\n" "${tcl_flags}" >&6; }
8398076b9443SCy Schubert    fi
8399076b9443SCy Schubert
8400076b9443SCy Schubert
840170b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5
840270b56f4bSCy Schubertprintf %s "checking for 64-bit integer type... " >&6; }
840370b56f4bSCy Schubert    if test ${tcl_cv_type_64bit+y}
840470b56f4bSCy Schubertthen :
840570b56f4bSCy Schubert  printf %s "(cached) " >&6
840670b56f4bSCy Schubertelse $as_nop
8407076b9443SCy Schubert
8408076b9443SCy Schubert	tcl_cv_type_64bit=none
8409076b9443SCy Schubert	# See if the compiler knows natively about __int64
8410076b9443SCy Schubert	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8411076b9443SCy Schubert/* end confdefs.h.  */
8412076b9443SCy Schubert
8413076b9443SCy Schubertint
841470b56f4bSCy Schubertmain (void)
8415076b9443SCy Schubert{
8416076b9443SCy Schubert__int64 value = (__int64) 0;
8417076b9443SCy Schubert  ;
8418076b9443SCy Schubert  return 0;
8419076b9443SCy Schubert}
8420076b9443SCy Schubert_ACEOF
842170b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
842270b56f4bSCy Schubertthen :
8423076b9443SCy Schubert  tcl_type_64bit=__int64
842470b56f4bSCy Schubertelse $as_nop
8425076b9443SCy Schubert  tcl_type_64bit="long long"
8426076b9443SCy Schubertfi
842770b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
842800787218SCy Schubert	# See if we could use long anyway  Note that we substitute in the
8429076b9443SCy Schubert	# type that is our current guess for a 64-bit type inside this check
8430076b9443SCy Schubert	# program, so it should be modified only carefully...
8431076b9443SCy Schubert        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8432076b9443SCy Schubert/* end confdefs.h.  */
8433076b9443SCy Schubert
8434076b9443SCy Schubertint
843570b56f4bSCy Schubertmain (void)
8436076b9443SCy Schubert{
8437076b9443SCy Schubertswitch (0) {
8438076b9443SCy Schubert            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
8439076b9443SCy Schubert        }
8440076b9443SCy Schubert  ;
8441076b9443SCy Schubert  return 0;
8442076b9443SCy Schubert}
8443076b9443SCy Schubert_ACEOF
844470b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
844570b56f4bSCy Schubertthen :
8446076b9443SCy Schubert  tcl_cv_type_64bit=${tcl_type_64bit}
8447076b9443SCy Schubertfi
844870b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8449076b9443SCy Schubertfi
8450076b9443SCy Schubert
8451076b9443SCy Schubert    if test "${tcl_cv_type_64bit}" = none ; then
8452076b9443SCy Schubert
845370b56f4bSCy Schubertprintf "%s\n" "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h
8454076b9443SCy Schubert
845500787218SCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
845600787218SCy Schubertprintf "%s\n" "yes" >&6; }
8457076b9443SCy Schubert    elif test "${tcl_cv_type_64bit}" = "__int64" \
8458076b9443SCy Schubert		-a "${TEA_PLATFORM}" = "windows" ; then
8459076b9443SCy Schubert	# TEA specific: We actually want to use the default tcl.h checks in
8460076b9443SCy Schubert	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
846170b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using Tcl header defaults" >&5
846270b56f4bSCy Schubertprintf "%s\n" "using Tcl header defaults" >&6; }
8463076b9443SCy Schubert    else
8464076b9443SCy Schubert
846570b56f4bSCy Schubertprintf "%s\n" "#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}" >>confdefs.h
8466076b9443SCy Schubert
846770b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5
846870b56f4bSCy Schubertprintf "%s\n" "${tcl_cv_type_64bit}" >&6; }
8469076b9443SCy Schubert
8470076b9443SCy Schubert	# Now check for auxiliary declarations
847170b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5
847270b56f4bSCy Schubertprintf %s "checking for struct dirent64... " >&6; }
847370b56f4bSCy Schubertif test ${tcl_cv_struct_dirent64+y}
847470b56f4bSCy Schubertthen :
847570b56f4bSCy Schubert  printf %s "(cached) " >&6
847670b56f4bSCy Schubertelse $as_nop
8477076b9443SCy Schubert
8478076b9443SCy Schubert	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8479076b9443SCy Schubert/* end confdefs.h.  */
8480076b9443SCy Schubert#include <sys/types.h>
8481076b9443SCy Schubert#include <dirent.h>
8482076b9443SCy Schubertint
848370b56f4bSCy Schubertmain (void)
8484076b9443SCy Schubert{
8485076b9443SCy Schubertstruct dirent64 p;
8486076b9443SCy Schubert  ;
8487076b9443SCy Schubert  return 0;
8488076b9443SCy Schubert}
8489076b9443SCy Schubert_ACEOF
849070b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
849170b56f4bSCy Schubertthen :
8492076b9443SCy Schubert  tcl_cv_struct_dirent64=yes
849370b56f4bSCy Schubertelse $as_nop
8494076b9443SCy Schubert  tcl_cv_struct_dirent64=no
8495076b9443SCy Schubertfi
849670b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8497076b9443SCy Schubertfi
849870b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5
849970b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_struct_dirent64" >&6; }
8500076b9443SCy Schubert	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
8501076b9443SCy Schubert
850270b56f4bSCy Schubertprintf "%s\n" "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h
8503076b9443SCy Schubert
8504076b9443SCy Schubert	fi
8505076b9443SCy Schubert
850600787218SCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DIR64" >&5
850700787218SCy Schubertprintf %s "checking for DIR64... " >&6; }
850800787218SCy Schubertif test ${tcl_cv_DIR64+y}
850900787218SCy Schubertthen :
851000787218SCy Schubert  printf %s "(cached) " >&6
851100787218SCy Schubertelse $as_nop
851200787218SCy Schubert
851300787218SCy Schubert	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
851400787218SCy Schubert/* end confdefs.h.  */
851500787218SCy Schubert#include <sys/types.h>
851600787218SCy Schubert#include <dirent.h>
851700787218SCy Schubertint
851800787218SCy Schubertmain (void)
851900787218SCy Schubert{
852000787218SCy Schubertstruct dirent64 *p; DIR64 d = opendir64(".");
852100787218SCy Schubert            p = readdir64(d); rewinddir64(d); closedir64(d);
852200787218SCy Schubert  ;
852300787218SCy Schubert  return 0;
852400787218SCy Schubert}
852500787218SCy Schubert_ACEOF
852600787218SCy Schubertif ac_fn_c_try_compile "$LINENO"
852700787218SCy Schubertthen :
852800787218SCy Schubert  tcl_cv_DIR64=yes
852900787218SCy Schubertelse $as_nop
853000787218SCy Schubert  tcl_cv_DIR64=no
853100787218SCy Schubertfi
853200787218SCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
853300787218SCy Schubertfi
853400787218SCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_DIR64" >&5
853500787218SCy Schubertprintf "%s\n" "$tcl_cv_DIR64" >&6; }
853600787218SCy Schubert	if test "x${tcl_cv_DIR64}" = "xyes" ; then
853700787218SCy Schubert
853800787218SCy Schubertprintf "%s\n" "#define HAVE_DIR64 1" >>confdefs.h
853900787218SCy Schubert
854000787218SCy Schubert	fi
854100787218SCy Schubert
854270b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5
854370b56f4bSCy Schubertprintf %s "checking for struct stat64... " >&6; }
854470b56f4bSCy Schubertif test ${tcl_cv_struct_stat64+y}
854570b56f4bSCy Schubertthen :
854670b56f4bSCy Schubert  printf %s "(cached) " >&6
854770b56f4bSCy Schubertelse $as_nop
8548076b9443SCy Schubert
8549076b9443SCy Schubert	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8550076b9443SCy Schubert/* end confdefs.h.  */
8551076b9443SCy Schubert#include <sys/stat.h>
8552076b9443SCy Schubertint
855370b56f4bSCy Schubertmain (void)
8554076b9443SCy Schubert{
8555076b9443SCy Schubertstruct stat64 p;
8556076b9443SCy Schubert
8557076b9443SCy Schubert  ;
8558076b9443SCy Schubert  return 0;
8559076b9443SCy Schubert}
8560076b9443SCy Schubert_ACEOF
856170b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
856270b56f4bSCy Schubertthen :
8563076b9443SCy Schubert  tcl_cv_struct_stat64=yes
856470b56f4bSCy Schubertelse $as_nop
8565076b9443SCy Schubert  tcl_cv_struct_stat64=no
8566076b9443SCy Schubertfi
856770b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8568076b9443SCy Schubertfi
856970b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5
857070b56f4bSCy Schubertprintf "%s\n" "$tcl_cv_struct_stat64" >&6; }
8571076b9443SCy Schubert	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
8572076b9443SCy Schubert
857370b56f4bSCy Schubertprintf "%s\n" "#define HAVE_STRUCT_STAT64 1" >>confdefs.h
8574076b9443SCy Schubert
8575076b9443SCy Schubert	fi
8576076b9443SCy Schubert
857770b56f4bSCy Schubert	ac_fn_c_check_func "$LINENO" "open64" "ac_cv_func_open64"
857870b56f4bSCy Schubertif test "x$ac_cv_func_open64" = xyes
857970b56f4bSCy Schubertthen :
858070b56f4bSCy Schubert  printf "%s\n" "#define HAVE_OPEN64 1" >>confdefs.h
8581076b9443SCy Schubert
8582076b9443SCy Schubertfi
858370b56f4bSCy Schubertac_fn_c_check_func "$LINENO" "lseek64" "ac_cv_func_lseek64"
858470b56f4bSCy Schubertif test "x$ac_cv_func_lseek64" = xyes
858570b56f4bSCy Schubertthen :
858670b56f4bSCy Schubert  printf "%s\n" "#define HAVE_LSEEK64 1" >>confdefs.h
8587076b9443SCy Schubert
858870b56f4bSCy Schubertfi
858970b56f4bSCy Schubert
859070b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5
859170b56f4bSCy Schubertprintf %s "checking for off64_t... " >&6; }
859270b56f4bSCy Schubert	if test ${tcl_cv_type_off64_t+y}
859370b56f4bSCy Schubertthen :
859470b56f4bSCy Schubert  printf %s "(cached) " >&6
859570b56f4bSCy Schubertelse $as_nop
8596076b9443SCy Schubert
8597076b9443SCy Schubert	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8598076b9443SCy Schubert/* end confdefs.h.  */
8599076b9443SCy Schubert#include <sys/types.h>
8600076b9443SCy Schubertint
860170b56f4bSCy Schubertmain (void)
8602076b9443SCy Schubert{
8603076b9443SCy Schubertoff64_t offset;
8604076b9443SCy Schubert
8605076b9443SCy Schubert  ;
8606076b9443SCy Schubert  return 0;
8607076b9443SCy Schubert}
8608076b9443SCy Schubert_ACEOF
860970b56f4bSCy Schubertif ac_fn_c_try_compile "$LINENO"
861070b56f4bSCy Schubertthen :
8611076b9443SCy Schubert  tcl_cv_type_off64_t=yes
861270b56f4bSCy Schubertelse $as_nop
8613076b9443SCy Schubert  tcl_cv_type_off64_t=no
8614076b9443SCy Schubertfi
861570b56f4bSCy Schubertrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8616076b9443SCy Schubertfi
8617076b9443SCy Schubert
8618076b9443SCy Schubert			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
8619076b9443SCy Schubert	        test "x${ac_cv_func_lseek64}" = "xyes" && \
8620076b9443SCy Schubert	        test "x${ac_cv_func_open64}" = "xyes" ; then
8621076b9443SCy Schubert
862270b56f4bSCy Schubertprintf "%s\n" "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h
8623076b9443SCy Schubert
862470b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
862570b56f4bSCy Schubertprintf "%s\n" "yes" >&6; }
8626076b9443SCy Schubert	else
862770b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
862870b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
8629076b9443SCy Schubert	fi
8630076b9443SCy Schubert    fi
8631076b9443SCy Schubert
8632076b9443SCy Schubert
8633076b9443SCy Schubert
8634076b9443SCy Schubert#--------------------------------------------------------------------
8635076b9443SCy Schubert# Set the default compiler switches based on the --enable-symbols option.
8636076b9443SCy Schubert#--------------------------------------------------------------------
8637076b9443SCy Schubert
8638076b9443SCy Schubert
8639076b9443SCy Schubert
864070b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5
864170b56f4bSCy Schubertprintf %s "checking for build with symbols... " >&6; }
8642076b9443SCy Schubert    # Check whether --enable-symbols was given.
864370b56f4bSCy Schubertif test ${enable_symbols+y}
864470b56f4bSCy Schubertthen :
8645076b9443SCy Schubert  enableval=$enable_symbols; tcl_ok=$enableval
864670b56f4bSCy Schubertelse $as_nop
8647076b9443SCy Schubert  tcl_ok=no
8648076b9443SCy Schubertfi
8649076b9443SCy Schubert
8650076b9443SCy Schubert    if test "$tcl_ok" = "no"; then
8651076b9443SCy Schubert	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG"
8652076b9443SCy Schubert	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
865370b56f4bSCy Schubert	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
865470b56f4bSCy Schubertprintf "%s\n" "no" >&6; }
865500787218SCy Schubert
865600787218SCy Schubertprintf "%s\n" "#define TCL_CFG_OPTIMIZED 1" >>confdefs.h
865700787218SCy Schubert
8658076b9443SCy Schubert    else
8659076b9443SCy Schubert	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
8660076b9443SCy Schubert	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
8661076b9443SCy Schubert	if test "$tcl_ok" = "yes"; then
866270b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5
866370b56f4bSCy Schubertprintf "%s\n" "yes (standard debugging)" >&6; }
8664076b9443SCy Schubert	fi
8665076b9443SCy Schubert    fi
8666076b9443SCy Schubert
8667076b9443SCy Schubert
8668076b9443SCy Schubert
8669076b9443SCy Schubert    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
8670076b9443SCy Schubert
867170b56f4bSCy Schubertprintf "%s\n" "#define TCL_MEM_DEBUG 1" >>confdefs.h
8672076b9443SCy Schubert
8673076b9443SCy Schubert    fi
8674076b9443SCy Schubert
8675076b9443SCy Schubert    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
8676076b9443SCy Schubert	if test "$tcl_ok" = "all"; then
867770b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem debugging" >&5
867870b56f4bSCy Schubertprintf "%s\n" "enabled symbols mem debugging" >&6; }
8679076b9443SCy Schubert	else
868070b56f4bSCy Schubert	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5
868170b56f4bSCy Schubertprintf "%s\n" "enabled $tcl_ok debugging" >&6; }
8682076b9443SCy Schubert	fi
8683076b9443SCy Schubert    fi
8684076b9443SCy Schubert
8685076b9443SCy Schubert
8686076b9443SCy Schubert#--------------------------------------------------------------------
8687076b9443SCy Schubert# This macro generates a line to use when building a library.  It
8688076b9443SCy Schubert# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
8689076b9443SCy Schubert# and TEA_LOAD_TCLCONFIG macros above.
8690076b9443SCy Schubert#--------------------------------------------------------------------
8691076b9443SCy Schubert
8692076b9443SCy Schubert
869300787218SCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
869400787218SCy Schubertprintf %s "checking for grep that handles long lines and -e... " >&6; }
869500787218SCy Schubertif test ${ac_cv_path_GREP+y}
869600787218SCy Schubertthen :
869700787218SCy Schubert  printf %s "(cached) " >&6
869800787218SCy Schubertelse $as_nop
869900787218SCy Schubert  if test -z "$GREP"; then
870000787218SCy Schubert  ac_path_GREP_found=false
870100787218SCy Schubert  # Loop through the user's path and test for each of PROGNAME-LIST
870200787218SCy Schubert  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
870300787218SCy Schubertfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
870400787218SCy Schubertdo
870500787218SCy Schubert  IFS=$as_save_IFS
870600787218SCy Schubert  case $as_dir in #(((
870700787218SCy Schubert    '') as_dir=./ ;;
870800787218SCy Schubert    */) ;;
870900787218SCy Schubert    *) as_dir=$as_dir/ ;;
871000787218SCy Schubert  esac
871100787218SCy Schubert    for ac_prog in grep ggrep
871200787218SCy Schubert   do
871300787218SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
871400787218SCy Schubert      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
871500787218SCy Schubert      as_fn_executable_p "$ac_path_GREP" || continue
871600787218SCy Schubert# Check for GNU ac_path_GREP and select it if it is found.
871700787218SCy Schubert  # Check for GNU $ac_path_GREP
871800787218SCy Schubertcase `"$ac_path_GREP" --version 2>&1` in
871900787218SCy Schubert*GNU*)
872000787218SCy Schubert  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
872100787218SCy Schubert*)
872200787218SCy Schubert  ac_count=0
872300787218SCy Schubert  printf %s 0123456789 >"conftest.in"
872400787218SCy Schubert  while :
872500787218SCy Schubert  do
872600787218SCy Schubert    cat "conftest.in" "conftest.in" >"conftest.tmp"
872700787218SCy Schubert    mv "conftest.tmp" "conftest.in"
872800787218SCy Schubert    cp "conftest.in" "conftest.nl"
872900787218SCy Schubert    printf "%s\n" 'GREP' >> "conftest.nl"
873000787218SCy Schubert    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
873100787218SCy Schubert    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
873200787218SCy Schubert    as_fn_arith $ac_count + 1 && ac_count=$as_val
873300787218SCy Schubert    if test $ac_count -gt ${ac_path_GREP_max-0}; then
873400787218SCy Schubert      # Best one so far, save it but keep looking for a better one
873500787218SCy Schubert      ac_cv_path_GREP="$ac_path_GREP"
873600787218SCy Schubert      ac_path_GREP_max=$ac_count
873700787218SCy Schubert    fi
873800787218SCy Schubert    # 10*(2^10) chars as input seems more than enough
873900787218SCy Schubert    test $ac_count -gt 10 && break
874000787218SCy Schubert  done
874100787218SCy Schubert  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
874200787218SCy Schubertesac
874300787218SCy Schubert
874400787218SCy Schubert      $ac_path_GREP_found && break 3
874500787218SCy Schubert    done
874600787218SCy Schubert  done
874700787218SCy Schubert  done
874800787218SCy SchubertIFS=$as_save_IFS
874900787218SCy Schubert  if test -z "$ac_cv_path_GREP"; then
875000787218SCy Schubert    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
875100787218SCy Schubert  fi
875200787218SCy Schubertelse
875300787218SCy Schubert  ac_cv_path_GREP=$GREP
875400787218SCy Schubertfi
875500787218SCy Schubert
875600787218SCy Schubertfi
875700787218SCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
875800787218SCy Schubertprintf "%s\n" "$ac_cv_path_GREP" >&6; }
875900787218SCy Schubert GREP="$ac_cv_path_GREP"
876000787218SCy Schubert
876100787218SCy Schubert
876200787218SCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
876300787218SCy Schubertprintf %s "checking for egrep... " >&6; }
876400787218SCy Schubertif test ${ac_cv_path_EGREP+y}
876500787218SCy Schubertthen :
876600787218SCy Schubert  printf %s "(cached) " >&6
876700787218SCy Schubertelse $as_nop
876800787218SCy Schubert  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
876900787218SCy Schubert   then ac_cv_path_EGREP="$GREP -E"
877000787218SCy Schubert   else
877100787218SCy Schubert     if test -z "$EGREP"; then
877200787218SCy Schubert  ac_path_EGREP_found=false
877300787218SCy Schubert  # Loop through the user's path and test for each of PROGNAME-LIST
877400787218SCy Schubert  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
877500787218SCy Schubertfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
877600787218SCy Schubertdo
877700787218SCy Schubert  IFS=$as_save_IFS
877800787218SCy Schubert  case $as_dir in #(((
877900787218SCy Schubert    '') as_dir=./ ;;
878000787218SCy Schubert    */) ;;
878100787218SCy Schubert    *) as_dir=$as_dir/ ;;
878200787218SCy Schubert  esac
878300787218SCy Schubert    for ac_prog in egrep
878400787218SCy Schubert   do
878500787218SCy Schubert    for ac_exec_ext in '' $ac_executable_extensions; do
878600787218SCy Schubert      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
878700787218SCy Schubert      as_fn_executable_p "$ac_path_EGREP" || continue
878800787218SCy Schubert# Check for GNU ac_path_EGREP and select it if it is found.
878900787218SCy Schubert  # Check for GNU $ac_path_EGREP
879000787218SCy Schubertcase `"$ac_path_EGREP" --version 2>&1` in
879100787218SCy Schubert*GNU*)
879200787218SCy Schubert  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
879300787218SCy Schubert*)
879400787218SCy Schubert  ac_count=0
879500787218SCy Schubert  printf %s 0123456789 >"conftest.in"
879600787218SCy Schubert  while :
879700787218SCy Schubert  do
879800787218SCy Schubert    cat "conftest.in" "conftest.in" >"conftest.tmp"
879900787218SCy Schubert    mv "conftest.tmp" "conftest.in"
880000787218SCy Schubert    cp "conftest.in" "conftest.nl"
880100787218SCy Schubert    printf "%s\n" 'EGREP' >> "conftest.nl"
880200787218SCy Schubert    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
880300787218SCy Schubert    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
880400787218SCy Schubert    as_fn_arith $ac_count + 1 && ac_count=$as_val
880500787218SCy Schubert    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
880600787218SCy Schubert      # Best one so far, save it but keep looking for a better one
880700787218SCy Schubert      ac_cv_path_EGREP="$ac_path_EGREP"
880800787218SCy Schubert      ac_path_EGREP_max=$ac_count
880900787218SCy Schubert    fi
881000787218SCy Schubert    # 10*(2^10) chars as input seems more than enough
881100787218SCy Schubert    test $ac_count -gt 10 && break
881200787218SCy Schubert  done
881300787218SCy Schubert  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
881400787218SCy Schubertesac
881500787218SCy Schubert
881600787218SCy Schubert      $ac_path_EGREP_found && break 3
881700787218SCy Schubert    done
881800787218SCy Schubert  done
881900787218SCy Schubert  done
882000787218SCy SchubertIFS=$as_save_IFS
882100787218SCy Schubert  if test -z "$ac_cv_path_EGREP"; then
882200787218SCy Schubert    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
882300787218SCy Schubert  fi
882400787218SCy Schubertelse
882500787218SCy Schubert  ac_cv_path_EGREP=$EGREP
882600787218SCy Schubertfi
882700787218SCy Schubert
882800787218SCy Schubert   fi
882900787218SCy Schubertfi
883000787218SCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
883100787218SCy Schubertprintf "%s\n" "$ac_cv_path_EGREP" >&6; }
883200787218SCy Schubert EGREP="$ac_cv_path_EGREP"
883300787218SCy Schubert
883400787218SCy Schubert
883500787218SCy Schubert
8836076b9443SCy Schubert    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
8837076b9443SCy Schubert	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
883800787218SCy Schubert	MAKE_SHARED_LIB="\${SHLIB_LD} \${LDFLAGS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
8839076b9443SCy Schubert	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8840076b9443SCy Schubert/* end confdefs.h.  */
8841076b9443SCy Schubert
8842076b9443SCy Schubert#if defined(_MSC_VER) && _MSC_VER >= 1400
8843076b9443SCy Schubertprint("manifest needed")
8844076b9443SCy Schubert#endif
8845076b9443SCy Schubert
8846076b9443SCy Schubert_ACEOF
8847076b9443SCy Schubertif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
884870b56f4bSCy Schubert  $EGREP "manifest needed" >/dev/null 2>&1
884970b56f4bSCy Schubertthen :
8850076b9443SCy Schubert
8851076b9443SCy Schubert	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
8852076b9443SCy Schubert	VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi"
8853076b9443SCy Schubert	VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1 ; fi"
8854076b9443SCy Schubert	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
8855076b9443SCy Schubert
8856076b9443SCy Schubert    CLEANFILES="$CLEANFILES *.manifest"
8857076b9443SCy Schubert
8858076b9443SCy Schubert
8859076b9443SCy Schubertfi
886070b56f4bSCy Schubertrm -rf conftest*
8861076b9443SCy Schubert
8862076b9443SCy Schubert	MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\$@ \$(PKG_STUB_OBJECTS)"
8863076b9443SCy Schubert    else
8864076b9443SCy Schubert	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
886500787218SCy Schubert	MAKE_SHARED_LIB="\${SHLIB_LD} \${LDFLAGS} \${LDFLAGS_DEFAULT} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
8866076b9443SCy Schubert	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
8867076b9443SCy Schubert    fi
8868076b9443SCy Schubert
8869076b9443SCy Schubert    if test "${SHARED_BUILD}" = "1" ; then
8870076b9443SCy Schubert	MAKE_LIB="${MAKE_SHARED_LIB} "
8871076b9443SCy Schubert    else
8872076b9443SCy Schubert	MAKE_LIB="${MAKE_STATIC_LIB} "
8873076b9443SCy Schubert    fi
8874076b9443SCy Schubert
8875076b9443SCy Schubert    #--------------------------------------------------------------------
8876076b9443SCy Schubert    # Shared libraries and static libraries have different names.
8877076b9443SCy Schubert    # Use the double eval to make sure any variables in the suffix is
8878076b9443SCy Schubert    # substituted. (@@@ Might not be necessary anymore)
8879076b9443SCy Schubert    #--------------------------------------------------------------------
8880076b9443SCy Schubert
888100787218SCy Schubert    PACKAGE_LIB_PREFIX8="${PACKAGE_LIB_PREFIX}"
888200787218SCy Schubert    PACKAGE_LIB_PREFIX9="${PACKAGE_LIB_PREFIX}tcl9"
888300787218SCy Schubert    if test "${TCL_MAJOR_VERSION}" -gt 8 ; then
888400787218SCy Schubert	PACKAGE_LIB_PREFIX="${PACKAGE_LIB_PREFIX9}"
888500787218SCy Schubert    else
888600787218SCy Schubert	PACKAGE_LIB_PREFIX="${PACKAGE_LIB_PREFIX8}"
888700787218SCy Schubert    fi
8888076b9443SCy Schubert    if test "${TEA_PLATFORM}" = "windows" ; then
8889076b9443SCy Schubert	if test "${SHARED_BUILD}" = "1" ; then
8890076b9443SCy Schubert	    # We force the unresolved linking of symbols that are really in
8891076b9443SCy Schubert	    # the private libraries of Tcl and Tk.
8892076b9443SCy Schubert	    if test x"${TK_BIN_DIR}" != x ; then
8893076b9443SCy Schubert		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
8894076b9443SCy Schubert	    fi
8895076b9443SCy Schubert	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
8896076b9443SCy Schubert	    if test "$GCC" = "yes"; then
8897076b9443SCy Schubert		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
8898076b9443SCy Schubert	    fi
889900787218SCy Schubert	    eval eval "PKG_LIB_FILE8=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
890000787218SCy Schubert	    eval eval "PKG_LIB_FILE9=${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
890100787218SCy Schubert	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
8902076b9443SCy Schubert	else
8903076b9443SCy Schubert	    if test "$GCC" = "yes"; then
890400787218SCy Schubert		PACKAGE_LIB_PREFIX=lib${PACKAGE_LIB_PREFIX}
8905076b9443SCy Schubert	    fi
890600787218SCy Schubert	    eval eval "PKG_LIB_FILE8=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
890700787218SCy Schubert	    eval eval "PKG_LIB_FILE9=${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
890800787218SCy Schubert	    eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
8909076b9443SCy Schubert	fi
8910076b9443SCy Schubert	# Some packages build their own stubs libraries
891100787218SCy Schubert	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
8912076b9443SCy Schubert	if test "$GCC" = "yes"; then
8913076b9443SCy Schubert	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
8914076b9443SCy Schubert	fi
8915076b9443SCy Schubert	# These aren't needed on Windows (either MSVC or gcc)
8916076b9443SCy Schubert	RANLIB=:
8917076b9443SCy Schubert	RANLIB_STUB=:
8918076b9443SCy Schubert    else
8919076b9443SCy Schubert	RANLIB_STUB="${RANLIB}"
8920076b9443SCy Schubert	if test "${SHARED_BUILD}" = "1" ; then
8921076b9443SCy Schubert	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
8922076b9443SCy Schubert	    if test x"${TK_BIN_DIR}" != x ; then
8923076b9443SCy Schubert		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
8924076b9443SCy Schubert	    fi
892500787218SCy Schubert	    eval eval "PKG_LIB_FILE8=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
892600787218SCy Schubert	    eval eval "PKG_LIB_FILE9=lib${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
892700787218SCy Schubert	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
8928076b9443SCy Schubert	    RANLIB=:
8929076b9443SCy Schubert	else
893000787218SCy Schubert	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
893100787218SCy Schubert	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
893200787218SCy Schubert	    eval eval "PKG_LIB_FILE=lib${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
8933076b9443SCy Schubert	fi
8934076b9443SCy Schubert	# Some packages build their own stubs libraries
893500787218SCy Schubert	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
8936076b9443SCy Schubert    fi
8937076b9443SCy Schubert
8938076b9443SCy Schubert    # These are escaped so that only CFLAGS is picked up at configure time.
8939076b9443SCy Schubert    # The other values will be substituted at make time.
8940076b9443SCy Schubert    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
8941076b9443SCy Schubert    if test "${SHARED_BUILD}" = "1" ; then
8942076b9443SCy Schubert	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
8943076b9443SCy Schubert    fi
8944076b9443SCy Schubert
8945076b9443SCy Schubert
8946076b9443SCy Schubert
8947076b9443SCy Schubert
8948076b9443SCy Schubert
8949076b9443SCy Schubert
8950076b9443SCy Schubert
8951076b9443SCy Schubert
8952076b9443SCy Schubert
8953076b9443SCy Schubert
8954076b9443SCy Schubert#--------------------------------------------------------------------
8955076b9443SCy Schubert# Determine the name of the tclsh and/or wish executables in the
8956076b9443SCy Schubert# Tcl and Tk build directories or the location they were installed
8957076b9443SCy Schubert# into. These paths are used to support running test cases only,
8958076b9443SCy Schubert# the Makefile should not be making use of these paths to generate
8959076b9443SCy Schubert# a pkgIndex.tcl file or anything else at extension build time.
8960076b9443SCy Schubert#--------------------------------------------------------------------
8961076b9443SCy Schubert
8962076b9443SCy Schubert
896370b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tclsh" >&5
896470b56f4bSCy Schubertprintf %s "checking for tclsh... " >&6; }
8965076b9443SCy Schubert    if test -f "${TCL_BIN_DIR}/Makefile" ; then
8966076b9443SCy Schubert        # tclConfig.sh is in Tcl build directory
8967076b9443SCy Schubert        if test "${TEA_PLATFORM}" = "windows"; then
896800787218SCy Schubert          if test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}" ; then
896900787218SCy Schubert            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}"
897000787218SCy Schubert          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}" ; then
897100787218SCy Schubert            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}s${EXEEXT}"
897200787218SCy Schubert          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}" ; then
897300787218SCy Schubert            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}t${EXEEXT}"
897400787218SCy Schubert          elif test -f "${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}" ; then
897500787218SCy Schubert            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}st${EXEEXT}"
897600787218SCy Schubert          fi
8977076b9443SCy Schubert        else
8978076b9443SCy Schubert            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
8979076b9443SCy Schubert        fi
8980076b9443SCy Schubert    else
8981076b9443SCy Schubert        # tclConfig.sh is in install location
8982076b9443SCy Schubert        if test "${TEA_PLATFORM}" = "windows"; then
898300787218SCy Schubert            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}"
8984076b9443SCy Schubert        else
898500787218SCy Schubert            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}"
8986076b9443SCy Schubert        fi
8987076b9443SCy Schubert        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
8988076b9443SCy Schubert              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
8989076b9443SCy Schubert              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
8990076b9443SCy Schubert        for i in $list ; do
8991076b9443SCy Schubert            if test -f "$i/${TCLSH_PROG}" ; then
8992076b9443SCy Schubert                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
8993076b9443SCy Schubert                break
8994076b9443SCy Schubert            fi
8995076b9443SCy Schubert        done
8996076b9443SCy Schubert        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
8997076b9443SCy Schubert    fi
899870b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${TCLSH_PROG}" >&5
899970b56f4bSCy Schubertprintf "%s\n" "${TCLSH_PROG}" >&6; }
9000076b9443SCy Schubert
9001076b9443SCy Schubert
9002076b9443SCy Schubert#TEA_PROG_WISH
9003076b9443SCy Schubert
9004076b9443SCy Schubert#--------------------------------------------------------------------
900500787218SCy Schubert# Setup a *Config.sh.in configuration file.
900600787218SCy Schubert#--------------------------------------------------------------------
900700787218SCy Schubert
900800787218SCy Schubert#TEA_EXPORT_CONFIG([sample])
900900787218SCy Schubert#AC_SUBST(SAMPLE_VAR)
901000787218SCy Schubert
901100787218SCy Schubert#--------------------------------------------------------------------
901200787218SCy Schubert# Specify files to substitute AC variables in. You may alternatively
901300787218SCy Schubert# have a special pkgIndex.tcl.in or other files which require
901400787218SCy Schubert# substituting the AC variables in. Include these here.
9015076b9443SCy Schubert#--------------------------------------------------------------------
9016076b9443SCy Schubert
9017076b9443SCy Schubertac_config_files="$ac_config_files Makefile pkgIndex.tcl"
9018076b9443SCy Schubert
901900787218SCy Schubert#AC_CONFIG_FILES([sampleConfig.sh])
902000787218SCy Schubert
902100787218SCy Schubert#--------------------------------------------------------------------
902200787218SCy Schubert# Finally, substitute all of the various values into the files
902300787218SCy Schubert# specified with AC_CONFIG_FILES.
902400787218SCy Schubert#--------------------------------------------------------------------
902500787218SCy Schubert
9026076b9443SCy Schubertcat >confcache <<\_ACEOF
9027076b9443SCy Schubert# This file is a shell script that caches the results of configure
9028076b9443SCy Schubert# tests run on this system so they can be shared between configure
9029076b9443SCy Schubert# scripts and configure runs, see configure's option --config-cache.
9030076b9443SCy Schubert# It is not useful on other systems.  If it contains results you don't
9031076b9443SCy Schubert# want to keep, you may remove or edit it.
9032076b9443SCy Schubert#
9033076b9443SCy Schubert# config.status only pays attention to the cache file if you give it
9034076b9443SCy Schubert# the --recheck option to rerun configure.
9035076b9443SCy Schubert#
9036076b9443SCy Schubert# `ac_cv_env_foo' variables (set or unset) will be overridden when
9037076b9443SCy Schubert# loading this file, other *unset* `ac_cv_foo' will be assigned the
9038076b9443SCy Schubert# following values.
9039076b9443SCy Schubert
9040076b9443SCy Schubert_ACEOF
9041076b9443SCy Schubert
9042076b9443SCy Schubert# The following way of writing the cache mishandles newlines in values,
9043076b9443SCy Schubert# but we know of no workaround that is simple, portable, and efficient.
9044076b9443SCy Schubert# So, we kill variables containing newlines.
9045076b9443SCy Schubert# Ultrix sh set writes to stderr and can't be redirected directly,
9046076b9443SCy Schubert# and sets the high bit in the cache file unless we assign to the vars.
9047076b9443SCy Schubert(
9048076b9443SCy Schubert  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
9049076b9443SCy Schubert    eval ac_val=\$$ac_var
9050076b9443SCy Schubert    case $ac_val in #(
9051076b9443SCy Schubert    *${as_nl}*)
9052076b9443SCy Schubert      case $ac_var in #(
905370b56f4bSCy Schubert      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
905470b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
9055076b9443SCy Schubert      esac
9056076b9443SCy Schubert      case $ac_var in #(
9057076b9443SCy Schubert      _ | IFS | as_nl) ;; #(
9058076b9443SCy Schubert      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
9059076b9443SCy Schubert      *) { eval $ac_var=; unset $ac_var;} ;;
9060076b9443SCy Schubert      esac ;;
9061076b9443SCy Schubert    esac
9062076b9443SCy Schubert  done
9063076b9443SCy Schubert
9064076b9443SCy Schubert  (set) 2>&1 |
9065076b9443SCy Schubert    case $as_nl`(ac_space=' '; set) 2>&1` in #(
9066076b9443SCy Schubert    *${as_nl}ac_space=\ *)
9067076b9443SCy Schubert      # `set' does not quote correctly, so add quotes: double-quote
9068076b9443SCy Schubert      # substitution turns \\\\ into \\, and sed turns \\ into \.
9069076b9443SCy Schubert      sed -n \
9070076b9443SCy Schubert	"s/'/'\\\\''/g;
9071076b9443SCy Schubert	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
9072076b9443SCy Schubert      ;; #(
9073076b9443SCy Schubert    *)
9074076b9443SCy Schubert      # `set' quotes correctly as required by POSIX, so do not add quotes.
9075076b9443SCy Schubert      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
9076076b9443SCy Schubert      ;;
9077076b9443SCy Schubert    esac |
9078076b9443SCy Schubert    sort
9079076b9443SCy Schubert) |
9080076b9443SCy Schubert  sed '
9081076b9443SCy Schubert     /^ac_cv_env_/b end
9082076b9443SCy Schubert     t clear
9083076b9443SCy Schubert     :clear
908470b56f4bSCy Schubert     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
9085076b9443SCy Schubert     t end
9086076b9443SCy Schubert     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
9087076b9443SCy Schubert     :end' >>confcache
9088076b9443SCy Schubertif diff "$cache_file" confcache >/dev/null 2>&1; then :; else
9089076b9443SCy Schubert  if test -w "$cache_file"; then
9090076b9443SCy Schubert    if test "x$cache_file" != "x/dev/null"; then
909170b56f4bSCy Schubert      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
909270b56f4bSCy Schubertprintf "%s\n" "$as_me: updating cache $cache_file" >&6;}
9093076b9443SCy Schubert      if test ! -f "$cache_file" || test -h "$cache_file"; then
9094076b9443SCy Schubert	cat confcache >"$cache_file"
9095076b9443SCy Schubert      else
9096076b9443SCy Schubert        case $cache_file in #(
9097076b9443SCy Schubert        */* | ?:*)
9098076b9443SCy Schubert	  mv -f confcache "$cache_file"$$ &&
9099076b9443SCy Schubert	  mv -f "$cache_file"$$ "$cache_file" ;; #(
9100076b9443SCy Schubert        *)
9101076b9443SCy Schubert	  mv -f confcache "$cache_file" ;;
9102076b9443SCy Schubert	esac
9103076b9443SCy Schubert      fi
9104076b9443SCy Schubert    fi
9105076b9443SCy Schubert  else
910670b56f4bSCy Schubert    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
910770b56f4bSCy Schubertprintf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
9108076b9443SCy Schubert  fi
9109076b9443SCy Schubertfi
9110076b9443SCy Schubertrm -f confcache
9111076b9443SCy Schubert
9112076b9443SCy Schuberttest "x$prefix" = xNONE && prefix=$ac_default_prefix
9113076b9443SCy Schubert# Let make expand exec_prefix.
9114076b9443SCy Schuberttest "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9115076b9443SCy Schubert
9116076b9443SCy Schubert# Transform confdefs.h into DEFS.
9117076b9443SCy Schubert# Protect against shell expansion while executing Makefile rules.
9118076b9443SCy Schubert# Protect against Makefile macro expansion.
9119076b9443SCy Schubert#
9120076b9443SCy Schubert# If the first sed substitution is executed (which looks for macros that
9121076b9443SCy Schubert# take arguments), then branch to the quote section.  Otherwise,
9122076b9443SCy Schubert# look for a macro that doesn't take arguments.
9123076b9443SCy Schubertac_script='
9124076b9443SCy Schubert:mline
9125076b9443SCy Schubert/\\$/{
9126076b9443SCy Schubert N
9127076b9443SCy Schubert s,\\\n,,
9128076b9443SCy Schubert b mline
9129076b9443SCy Schubert}
9130076b9443SCy Schubertt clear
9131076b9443SCy Schubert:clear
9132076b9443SCy Schuberts/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
9133076b9443SCy Schubertt quote
9134076b9443SCy Schuberts/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
9135076b9443SCy Schubertt quote
9136076b9443SCy Schubertb any
9137076b9443SCy Schubert:quote
9138076b9443SCy Schuberts/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
9139076b9443SCy Schuberts/\[/\\&/g
9140076b9443SCy Schuberts/\]/\\&/g
9141076b9443SCy Schuberts/\$/$$/g
9142076b9443SCy SchubertH
9143076b9443SCy Schubert:any
9144076b9443SCy Schubert${
9145076b9443SCy Schubert	g
9146076b9443SCy Schubert	s/^\n//
9147076b9443SCy Schubert	s/\n/ /g
9148076b9443SCy Schubert	p
9149076b9443SCy Schubert}
9150076b9443SCy Schubert'
9151076b9443SCy SchubertDEFS=`sed -n "$ac_script" confdefs.h`
9152076b9443SCy Schubert
9153076b9443SCy Schubert
9154076b9443SCy Schubertac_libobjs=
9155076b9443SCy Schubertac_ltlibobjs=
9156076b9443SCy SchubertU=
9157076b9443SCy Schubertfor ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
9158076b9443SCy Schubert  # 1. Remove the extension, and $U if already installed.
9159076b9443SCy Schubert  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
916070b56f4bSCy Schubert  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
9161076b9443SCy Schubert  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
9162076b9443SCy Schubert  #    will be set to the directory where LIBOBJS objects are built.
9163076b9443SCy Schubert  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
9164076b9443SCy Schubert  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
9165076b9443SCy Schubertdone
9166076b9443SCy SchubertLIBOBJS=$ac_libobjs
9167076b9443SCy Schubert
9168076b9443SCy SchubertLTLIBOBJS=$ac_ltlibobjs
9169076b9443SCy Schubert
9170076b9443SCy Schubert
9171076b9443SCy Schubert
9172076b9443SCy SchubertCFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
9173076b9443SCy Schubert
9174076b9443SCy Schubert: "${CONFIG_STATUS=./config.status}"
9175076b9443SCy Schubertac_write_fail=0
9176076b9443SCy Schubertac_clean_files_save=$ac_clean_files
9177076b9443SCy Schubertac_clean_files="$ac_clean_files $CONFIG_STATUS"
917870b56f4bSCy Schubert{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
917970b56f4bSCy Schubertprintf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
9180076b9443SCy Schubertas_write_fail=0
9181076b9443SCy Schubertcat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
9182076b9443SCy Schubert#! $SHELL
9183076b9443SCy Schubert# Generated by $as_me.
9184076b9443SCy Schubert# Run this file to recreate the current configuration.
9185076b9443SCy Schubert# Compiler output produced by configure, useful for debugging
9186076b9443SCy Schubert# configure, is in config.log if it exists.
9187076b9443SCy Schubert
9188076b9443SCy Schubertdebug=false
9189076b9443SCy Schubertac_cs_recheck=false
9190076b9443SCy Schubertac_cs_silent=false
9191076b9443SCy Schubert
9192076b9443SCy SchubertSHELL=\${CONFIG_SHELL-$SHELL}
9193076b9443SCy Schubertexport SHELL
9194076b9443SCy Schubert_ASEOF
9195076b9443SCy Schubertcat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
9196076b9443SCy Schubert## -------------------- ##
9197076b9443SCy Schubert## M4sh Initialization. ##
9198076b9443SCy Schubert## -------------------- ##
9199076b9443SCy Schubert
9200076b9443SCy Schubert# Be more Bourne compatible
9201076b9443SCy SchubertDUALCASE=1; export DUALCASE # for MKS sh
920270b56f4bSCy Schubertas_nop=:
920370b56f4bSCy Schubertif test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
920470b56f4bSCy Schubertthen :
9205076b9443SCy Schubert  emulate sh
9206076b9443SCy Schubert  NULLCMD=:
9207076b9443SCy Schubert  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
9208076b9443SCy Schubert  # is contrary to our usage.  Disable this feature.
9209076b9443SCy Schubert  alias -g '${1+"$@"}'='"$@"'
9210076b9443SCy Schubert  setopt NO_GLOB_SUBST
921170b56f4bSCy Schubertelse $as_nop
9212076b9443SCy Schubert  case `(set -o) 2>/dev/null` in #(
9213076b9443SCy Schubert  *posix*) :
9214076b9443SCy Schubert    set -o posix ;; #(
9215076b9443SCy Schubert  *) :
9216076b9443SCy Schubert     ;;
9217076b9443SCy Schubertesac
9218076b9443SCy Schubertfi
9219076b9443SCy Schubert
9220076b9443SCy Schubert
922170b56f4bSCy Schubert
922270b56f4bSCy Schubert# Reset variables that may have inherited troublesome values from
922370b56f4bSCy Schubert# the environment.
922470b56f4bSCy Schubert
922570b56f4bSCy Schubert# IFS needs to be set, to space, tab, and newline, in precisely that order.
922670b56f4bSCy Schubert# (If _AS_PATH_WALK were called with IFS unset, it would have the
922770b56f4bSCy Schubert# side effect of setting IFS to empty, thus disabling word splitting.)
922870b56f4bSCy Schubert# Quoting is to prevent editors from complaining about space-tab.
9229076b9443SCy Schubertas_nl='
9230076b9443SCy Schubert'
9231076b9443SCy Schubertexport as_nl
923270b56f4bSCy SchubertIFS=" ""	$as_nl"
923370b56f4bSCy Schubert
923470b56f4bSCy SchubertPS1='$ '
923570b56f4bSCy SchubertPS2='> '
923670b56f4bSCy SchubertPS4='+ '
923770b56f4bSCy Schubert
923870b56f4bSCy Schubert# Ensure predictable behavior from utilities with locale-dependent output.
923970b56f4bSCy SchubertLC_ALL=C
924070b56f4bSCy Schubertexport LC_ALL
924170b56f4bSCy SchubertLANGUAGE=C
924270b56f4bSCy Schubertexport LANGUAGE
924370b56f4bSCy Schubert
924470b56f4bSCy Schubert# We cannot yet rely on "unset" to work, but we need these variables
924570b56f4bSCy Schubert# to be unset--not just set to an empty or harmless value--now, to
924670b56f4bSCy Schubert# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
924770b56f4bSCy Schubert# also avoids known problems related to "unset" and subshell syntax
924870b56f4bSCy Schubert# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
924970b56f4bSCy Schubertfor as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
925070b56f4bSCy Schubertdo eval test \${$as_var+y} \
925170b56f4bSCy Schubert  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
925270b56f4bSCy Schubertdone
925370b56f4bSCy Schubert
925470b56f4bSCy Schubert# Ensure that fds 0, 1, and 2 are open.
925570b56f4bSCy Schubertif (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
925670b56f4bSCy Schubertif (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
925770b56f4bSCy Schubertif (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
9258076b9443SCy Schubert
9259076b9443SCy Schubert# The user is always right.
926070b56f4bSCy Schubertif ${PATH_SEPARATOR+false} :; then
9261076b9443SCy Schubert  PATH_SEPARATOR=:
9262076b9443SCy Schubert  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
9263076b9443SCy Schubert    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
9264076b9443SCy Schubert      PATH_SEPARATOR=';'
9265076b9443SCy Schubert  }
9266076b9443SCy Schubertfi
9267076b9443SCy Schubert
9268076b9443SCy Schubert
9269076b9443SCy Schubert# Find who we are.  Look in the path if we contain no directory separator.
9270076b9443SCy Schubertas_myself=
9271076b9443SCy Schubertcase $0 in #((
9272076b9443SCy Schubert  *[\\/]* ) as_myself=$0 ;;
9273076b9443SCy Schubert  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9274076b9443SCy Schubertfor as_dir in $PATH
9275076b9443SCy Schubertdo
9276076b9443SCy Schubert  IFS=$as_save_IFS
927770b56f4bSCy Schubert  case $as_dir in #(((
927870b56f4bSCy Schubert    '') as_dir=./ ;;
927970b56f4bSCy Schubert    */) ;;
928070b56f4bSCy Schubert    *) as_dir=$as_dir/ ;;
928170b56f4bSCy Schubert  esac
928270b56f4bSCy Schubert    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
9283076b9443SCy Schubert  done
9284076b9443SCy SchubertIFS=$as_save_IFS
9285076b9443SCy Schubert
9286076b9443SCy Schubert     ;;
9287076b9443SCy Schubertesac
9288076b9443SCy Schubert# We did not find ourselves, most probably we were run as `sh COMMAND'
9289076b9443SCy Schubert# in which case we are not to be found in the path.
9290076b9443SCy Schubertif test "x$as_myself" = x; then
9291076b9443SCy Schubert  as_myself=$0
9292076b9443SCy Schubertfi
9293076b9443SCy Schubertif test ! -f "$as_myself"; then
929470b56f4bSCy Schubert  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
9295076b9443SCy Schubert  exit 1
9296076b9443SCy Schubertfi
9297076b9443SCy Schubert
9298076b9443SCy Schubert
9299076b9443SCy Schubert
9300076b9443SCy Schubert# as_fn_error STATUS ERROR [LINENO LOG_FD]
9301076b9443SCy Schubert# ----------------------------------------
9302076b9443SCy Schubert# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
9303076b9443SCy Schubert# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
9304076b9443SCy Schubert# script with STATUS, using 1 if that was 0.
9305076b9443SCy Schubertas_fn_error ()
9306076b9443SCy Schubert{
9307076b9443SCy Schubert  as_status=$1; test $as_status -eq 0 && as_status=1
9308076b9443SCy Schubert  if test "$4"; then
9309076b9443SCy Schubert    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
931070b56f4bSCy Schubert    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
9311076b9443SCy Schubert  fi
931270b56f4bSCy Schubert  printf "%s\n" "$as_me: error: $2" >&2
9313076b9443SCy Schubert  as_fn_exit $as_status
9314076b9443SCy Schubert} # as_fn_error
9315076b9443SCy Schubert
9316076b9443SCy Schubert
931770b56f4bSCy Schubert
9318076b9443SCy Schubert# as_fn_set_status STATUS
9319076b9443SCy Schubert# -----------------------
9320076b9443SCy Schubert# Set $? to STATUS, without forking.
9321076b9443SCy Schubertas_fn_set_status ()
9322076b9443SCy Schubert{
9323076b9443SCy Schubert  return $1
9324076b9443SCy Schubert} # as_fn_set_status
9325076b9443SCy Schubert
9326076b9443SCy Schubert# as_fn_exit STATUS
9327076b9443SCy Schubert# -----------------
9328076b9443SCy Schubert# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
9329076b9443SCy Schubertas_fn_exit ()
9330076b9443SCy Schubert{
9331076b9443SCy Schubert  set +e
9332076b9443SCy Schubert  as_fn_set_status $1
9333076b9443SCy Schubert  exit $1
9334076b9443SCy Schubert} # as_fn_exit
9335076b9443SCy Schubert
9336076b9443SCy Schubert# as_fn_unset VAR
9337076b9443SCy Schubert# ---------------
9338076b9443SCy Schubert# Portably unset VAR.
9339076b9443SCy Schubertas_fn_unset ()
9340076b9443SCy Schubert{
9341076b9443SCy Schubert  { eval $1=; unset $1;}
9342076b9443SCy Schubert}
9343076b9443SCy Schubertas_unset=as_fn_unset
934470b56f4bSCy Schubert
9345076b9443SCy Schubert# as_fn_append VAR VALUE
9346076b9443SCy Schubert# ----------------------
9347076b9443SCy Schubert# Append the text in VALUE to the end of the definition contained in VAR. Take
9348076b9443SCy Schubert# advantage of any shell optimizations that allow amortized linear growth over
9349076b9443SCy Schubert# repeated appends, instead of the typical quadratic growth present in naive
9350076b9443SCy Schubert# implementations.
935170b56f4bSCy Schubertif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
935270b56f4bSCy Schubertthen :
9353076b9443SCy Schubert  eval 'as_fn_append ()
9354076b9443SCy Schubert  {
9355076b9443SCy Schubert    eval $1+=\$2
9356076b9443SCy Schubert  }'
935770b56f4bSCy Schubertelse $as_nop
9358076b9443SCy Schubert  as_fn_append ()
9359076b9443SCy Schubert  {
9360076b9443SCy Schubert    eval $1=\$$1\$2
9361076b9443SCy Schubert  }
9362076b9443SCy Schubertfi # as_fn_append
9363076b9443SCy Schubert
9364076b9443SCy Schubert# as_fn_arith ARG...
9365076b9443SCy Schubert# ------------------
9366076b9443SCy Schubert# Perform arithmetic evaluation on the ARGs, and store the result in the
9367076b9443SCy Schubert# global $as_val. Take advantage of shells that can avoid forks. The arguments
9368076b9443SCy Schubert# must be portable across $(()) and expr.
936970b56f4bSCy Schubertif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
937070b56f4bSCy Schubertthen :
9371076b9443SCy Schubert  eval 'as_fn_arith ()
9372076b9443SCy Schubert  {
9373076b9443SCy Schubert    as_val=$(( $* ))
9374076b9443SCy Schubert  }'
937570b56f4bSCy Schubertelse $as_nop
9376076b9443SCy Schubert  as_fn_arith ()
9377076b9443SCy Schubert  {
9378076b9443SCy Schubert    as_val=`expr "$@" || test $? -eq 1`
9379076b9443SCy Schubert  }
9380076b9443SCy Schubertfi # as_fn_arith
9381076b9443SCy Schubert
9382076b9443SCy Schubert
9383076b9443SCy Schubertif expr a : '\(a\)' >/dev/null 2>&1 &&
9384076b9443SCy Schubert   test "X`expr 00001 : '.*\(...\)'`" = X001; then
9385076b9443SCy Schubert  as_expr=expr
9386076b9443SCy Schubertelse
9387076b9443SCy Schubert  as_expr=false
9388076b9443SCy Schubertfi
9389076b9443SCy Schubert
9390076b9443SCy Schubertif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
9391076b9443SCy Schubert  as_basename=basename
9392076b9443SCy Schubertelse
9393076b9443SCy Schubert  as_basename=false
9394076b9443SCy Schubertfi
9395076b9443SCy Schubert
9396076b9443SCy Schubertif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
9397076b9443SCy Schubert  as_dirname=dirname
9398076b9443SCy Schubertelse
9399076b9443SCy Schubert  as_dirname=false
9400076b9443SCy Schubertfi
9401076b9443SCy Schubert
9402076b9443SCy Schubertas_me=`$as_basename -- "$0" ||
9403076b9443SCy Schubert$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
9404076b9443SCy Schubert	 X"$0" : 'X\(//\)$' \| \
9405076b9443SCy Schubert	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
940670b56f4bSCy Schubertprintf "%s\n" X/"$0" |
9407076b9443SCy Schubert    sed '/^.*\/\([^/][^/]*\)\/*$/{
9408076b9443SCy Schubert	    s//\1/
9409076b9443SCy Schubert	    q
9410076b9443SCy Schubert	  }
9411076b9443SCy Schubert	  /^X\/\(\/\/\)$/{
9412076b9443SCy Schubert	    s//\1/
9413076b9443SCy Schubert	    q
9414076b9443SCy Schubert	  }
9415076b9443SCy Schubert	  /^X\/\(\/\).*/{
9416076b9443SCy Schubert	    s//\1/
9417076b9443SCy Schubert	    q
9418076b9443SCy Schubert	  }
9419076b9443SCy Schubert	  s/.*/./; q'`
9420076b9443SCy Schubert
9421076b9443SCy Schubert# Avoid depending upon Character Ranges.
9422076b9443SCy Schubertas_cr_letters='abcdefghijklmnopqrstuvwxyz'
9423076b9443SCy Schubertas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
9424076b9443SCy Schubertas_cr_Letters=$as_cr_letters$as_cr_LETTERS
9425076b9443SCy Schubertas_cr_digits='0123456789'
9426076b9443SCy Schubertas_cr_alnum=$as_cr_Letters$as_cr_digits
9427076b9443SCy Schubert
942870b56f4bSCy Schubert
942970b56f4bSCy Schubert# Determine whether it's possible to make 'echo' print without a newline.
943070b56f4bSCy Schubert# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
943170b56f4bSCy Schubert# for compatibility with existing Makefiles.
9432076b9443SCy SchubertECHO_C= ECHO_N= ECHO_T=
9433076b9443SCy Schubertcase `echo -n x` in #(((((
9434076b9443SCy Schubert-n*)
9435076b9443SCy Schubert  case `echo 'xy\c'` in
9436076b9443SCy Schubert  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
9437076b9443SCy Schubert  xy)  ECHO_C='\c';;
9438076b9443SCy Schubert  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
9439076b9443SCy Schubert       ECHO_T='	';;
9440076b9443SCy Schubert  esac;;
9441076b9443SCy Schubert*)
9442076b9443SCy Schubert  ECHO_N='-n';;
9443076b9443SCy Schubertesac
9444076b9443SCy Schubert
944570b56f4bSCy Schubert# For backward compatibility with old third-party macros, we provide
944670b56f4bSCy Schubert# the shell variables $as_echo and $as_echo_n.  New code should use
944770b56f4bSCy Schubert# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
944870b56f4bSCy Schubertas_echo='printf %s\n'
944970b56f4bSCy Schubertas_echo_n='printf %s'
945070b56f4bSCy Schubert
9451076b9443SCy Schubertrm -f conf$$ conf$$.exe conf$$.file
9452076b9443SCy Schubertif test -d conf$$.dir; then
9453076b9443SCy Schubert  rm -f conf$$.dir/conf$$.file
9454076b9443SCy Schubertelse
9455076b9443SCy Schubert  rm -f conf$$.dir
9456076b9443SCy Schubert  mkdir conf$$.dir 2>/dev/null
9457076b9443SCy Schubertfi
9458076b9443SCy Schubertif (echo >conf$$.file) 2>/dev/null; then
9459076b9443SCy Schubert  if ln -s conf$$.file conf$$ 2>/dev/null; then
9460076b9443SCy Schubert    as_ln_s='ln -s'
9461076b9443SCy Schubert    # ... but there are two gotchas:
9462076b9443SCy Schubert    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
9463076b9443SCy Schubert    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
9464076b9443SCy Schubert    # In both cases, we have to default to `cp -pR'.
9465076b9443SCy Schubert    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
9466076b9443SCy Schubert      as_ln_s='cp -pR'
9467076b9443SCy Schubert  elif ln conf$$.file conf$$ 2>/dev/null; then
9468076b9443SCy Schubert    as_ln_s=ln
9469076b9443SCy Schubert  else
9470076b9443SCy Schubert    as_ln_s='cp -pR'
9471076b9443SCy Schubert  fi
9472076b9443SCy Schubertelse
9473076b9443SCy Schubert  as_ln_s='cp -pR'
9474076b9443SCy Schubertfi
9475076b9443SCy Schubertrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
9476076b9443SCy Schubertrmdir conf$$.dir 2>/dev/null
9477076b9443SCy Schubert
9478076b9443SCy Schubert
9479076b9443SCy Schubert# as_fn_mkdir_p
9480076b9443SCy Schubert# -------------
9481076b9443SCy Schubert# Create "$as_dir" as a directory, including parents if necessary.
9482076b9443SCy Schubertas_fn_mkdir_p ()
9483076b9443SCy Schubert{
9484076b9443SCy Schubert
9485076b9443SCy Schubert  case $as_dir in #(
9486076b9443SCy Schubert  -*) as_dir=./$as_dir;;
9487076b9443SCy Schubert  esac
9488076b9443SCy Schubert  test -d "$as_dir" || eval $as_mkdir_p || {
9489076b9443SCy Schubert    as_dirs=
9490076b9443SCy Schubert    while :; do
9491076b9443SCy Schubert      case $as_dir in #(
949270b56f4bSCy Schubert      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
9493076b9443SCy Schubert      *) as_qdir=$as_dir;;
9494076b9443SCy Schubert      esac
9495076b9443SCy Schubert      as_dirs="'$as_qdir' $as_dirs"
9496076b9443SCy Schubert      as_dir=`$as_dirname -- "$as_dir" ||
9497076b9443SCy Schubert$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9498076b9443SCy Schubert	 X"$as_dir" : 'X\(//\)[^/]' \| \
9499076b9443SCy Schubert	 X"$as_dir" : 'X\(//\)$' \| \
9500076b9443SCy Schubert	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
950170b56f4bSCy Schubertprintf "%s\n" X"$as_dir" |
9502076b9443SCy Schubert    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9503076b9443SCy Schubert	    s//\1/
9504076b9443SCy Schubert	    q
9505076b9443SCy Schubert	  }
9506076b9443SCy Schubert	  /^X\(\/\/\)[^/].*/{
9507076b9443SCy Schubert	    s//\1/
9508076b9443SCy Schubert	    q
9509076b9443SCy Schubert	  }
9510076b9443SCy Schubert	  /^X\(\/\/\)$/{
9511076b9443SCy Schubert	    s//\1/
9512076b9443SCy Schubert	    q
9513076b9443SCy Schubert	  }
9514076b9443SCy Schubert	  /^X\(\/\).*/{
9515076b9443SCy Schubert	    s//\1/
9516076b9443SCy Schubert	    q
9517076b9443SCy Schubert	  }
9518076b9443SCy Schubert	  s/.*/./; q'`
9519076b9443SCy Schubert      test -d "$as_dir" && break
9520076b9443SCy Schubert    done
9521076b9443SCy Schubert    test -z "$as_dirs" || eval "mkdir $as_dirs"
9522076b9443SCy Schubert  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
9523076b9443SCy Schubert
9524076b9443SCy Schubert
9525076b9443SCy Schubert} # as_fn_mkdir_p
9526076b9443SCy Schubertif mkdir -p . 2>/dev/null; then
9527076b9443SCy Schubert  as_mkdir_p='mkdir -p "$as_dir"'
9528076b9443SCy Schubertelse
9529076b9443SCy Schubert  test -d ./-p && rmdir ./-p
9530076b9443SCy Schubert  as_mkdir_p=false
9531076b9443SCy Schubertfi
9532076b9443SCy Schubert
9533076b9443SCy Schubert
9534076b9443SCy Schubert# as_fn_executable_p FILE
9535076b9443SCy Schubert# -----------------------
9536076b9443SCy Schubert# Test if FILE is an executable regular file.
9537076b9443SCy Schubertas_fn_executable_p ()
9538076b9443SCy Schubert{
9539076b9443SCy Schubert  test -f "$1" && test -x "$1"
9540076b9443SCy Schubert} # as_fn_executable_p
9541076b9443SCy Schubertas_test_x='test -x'
9542076b9443SCy Schubertas_executable_p=as_fn_executable_p
9543076b9443SCy Schubert
9544076b9443SCy Schubert# Sed expression to map a string onto a valid CPP name.
9545076b9443SCy Schubertas_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
9546076b9443SCy Schubert
9547076b9443SCy Schubert# Sed expression to map a string onto a valid variable name.
9548076b9443SCy Schubertas_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
9549076b9443SCy Schubert
9550076b9443SCy Schubert
9551076b9443SCy Schubertexec 6>&1
9552076b9443SCy Schubert## ----------------------------------- ##
9553076b9443SCy Schubert## Main body of $CONFIG_STATUS script. ##
9554076b9443SCy Schubert## ----------------------------------- ##
9555076b9443SCy Schubert_ASEOF
9556076b9443SCy Schuberttest $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
9557076b9443SCy Schubert
9558076b9443SCy Schubertcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9559076b9443SCy Schubert# Save the log message, to keep $0 and so on meaningful, and to
9560076b9443SCy Schubert# report actual input values of CONFIG_FILES etc. instead of their
9561076b9443SCy Schubert# values after options handling.
9562076b9443SCy Schubertac_log="
9563*de946883SCy SchubertThis file was extended by sqlite $as_me 3.46.1, which was
956470b56f4bSCy Schubertgenerated by GNU Autoconf 2.71.  Invocation command line was
9565076b9443SCy Schubert
9566076b9443SCy Schubert  CONFIG_FILES    = $CONFIG_FILES
9567076b9443SCy Schubert  CONFIG_HEADERS  = $CONFIG_HEADERS
9568076b9443SCy Schubert  CONFIG_LINKS    = $CONFIG_LINKS
9569076b9443SCy Schubert  CONFIG_COMMANDS = $CONFIG_COMMANDS
9570076b9443SCy Schubert  $ $0 $@
9571076b9443SCy Schubert
9572076b9443SCy Schuberton `(hostname || uname -n) 2>/dev/null | sed 1q`
9573076b9443SCy Schubert"
9574076b9443SCy Schubert
9575076b9443SCy Schubert_ACEOF
9576076b9443SCy Schubert
9577076b9443SCy Schubertcase $ac_config_files in *"
9578076b9443SCy Schubert"*) set x $ac_config_files; shift; ac_config_files=$*;;
9579076b9443SCy Schubertesac
9580076b9443SCy Schubert
9581076b9443SCy Schubert
9582076b9443SCy Schubert
9583076b9443SCy Schubertcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9584076b9443SCy Schubert# Files that config.status was made for.
9585076b9443SCy Schubertconfig_files="$ac_config_files"
9586076b9443SCy Schubert
9587076b9443SCy Schubert_ACEOF
9588076b9443SCy Schubert
9589076b9443SCy Schubertcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9590076b9443SCy Schubertac_cs_usage="\
9591076b9443SCy Schubert\`$as_me' instantiates files and other configuration actions
9592076b9443SCy Schubertfrom templates according to the current configuration.  Unless the files
9593076b9443SCy Schubertand actions are specified as TAGs, all are instantiated by default.
9594076b9443SCy Schubert
9595076b9443SCy SchubertUsage: $0 [OPTION]... [TAG]...
9596076b9443SCy Schubert
9597076b9443SCy Schubert  -h, --help       print this help, then exit
9598076b9443SCy Schubert  -V, --version    print version number and configuration settings, then exit
9599076b9443SCy Schubert      --config     print configuration, then exit
9600076b9443SCy Schubert  -q, --quiet, --silent
9601076b9443SCy Schubert                   do not print progress messages
9602076b9443SCy Schubert  -d, --debug      don't remove temporary files
9603076b9443SCy Schubert      --recheck    update $as_me by reconfiguring in the same conditions
9604076b9443SCy Schubert      --file=FILE[:TEMPLATE]
9605076b9443SCy Schubert                   instantiate the configuration file FILE
9606076b9443SCy Schubert
9607076b9443SCy SchubertConfiguration files:
9608076b9443SCy Schubert$config_files
9609076b9443SCy Schubert
9610076b9443SCy SchubertReport bugs to the package provider."
9611076b9443SCy Schubert
9612076b9443SCy Schubert_ACEOF
961370b56f4bSCy Schubertac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
961470b56f4bSCy Schubertac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
9615076b9443SCy Schubertcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
961670b56f4bSCy Schubertac_cs_config='$ac_cs_config_escaped'
9617076b9443SCy Schubertac_cs_version="\\
9618*de946883SCy Schubertsqlite config.status 3.46.1
961970b56f4bSCy Schubertconfigured by $0, generated by GNU Autoconf 2.71,
9620076b9443SCy Schubert  with options \\"\$ac_cs_config\\"
9621076b9443SCy Schubert
962270b56f4bSCy SchubertCopyright (C) 2021 Free Software Foundation, Inc.
9623076b9443SCy SchubertThis config.status script is free software; the Free Software Foundation
9624076b9443SCy Schubertgives unlimited permission to copy, distribute and modify it."
9625076b9443SCy Schubert
9626076b9443SCy Schubertac_pwd='$ac_pwd'
9627076b9443SCy Schubertsrcdir='$srcdir'
9628076b9443SCy Schuberttest -n "\$AWK" || AWK=awk
9629076b9443SCy Schubert_ACEOF
9630076b9443SCy Schubert
9631076b9443SCy Schubertcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9632076b9443SCy Schubert# The default lists apply if the user does not specify any file.
9633076b9443SCy Schubertac_need_defaults=:
9634076b9443SCy Schubertwhile test $# != 0
9635076b9443SCy Schubertdo
9636076b9443SCy Schubert  case $1 in
9637076b9443SCy Schubert  --*=?*)
9638076b9443SCy Schubert    ac_option=`expr "X$1" : 'X\([^=]*\)='`
9639076b9443SCy Schubert    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
9640076b9443SCy Schubert    ac_shift=:
9641076b9443SCy Schubert    ;;
9642076b9443SCy Schubert  --*=)
9643076b9443SCy Schubert    ac_option=`expr "X$1" : 'X\([^=]*\)='`
9644076b9443SCy Schubert    ac_optarg=
9645076b9443SCy Schubert    ac_shift=:
9646076b9443SCy Schubert    ;;
9647076b9443SCy Schubert  *)
9648076b9443SCy Schubert    ac_option=$1
9649076b9443SCy Schubert    ac_optarg=$2
9650076b9443SCy Schubert    ac_shift=shift
9651076b9443SCy Schubert    ;;
9652076b9443SCy Schubert  esac
9653076b9443SCy Schubert
9654076b9443SCy Schubert  case $ac_option in
9655076b9443SCy Schubert  # Handling of the options.
9656076b9443SCy Schubert  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9657076b9443SCy Schubert    ac_cs_recheck=: ;;
9658076b9443SCy Schubert  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
965970b56f4bSCy Schubert    printf "%s\n" "$ac_cs_version"; exit ;;
9660076b9443SCy Schubert  --config | --confi | --conf | --con | --co | --c )
966170b56f4bSCy Schubert    printf "%s\n" "$ac_cs_config"; exit ;;
9662076b9443SCy Schubert  --debug | --debu | --deb | --de | --d | -d )
9663076b9443SCy Schubert    debug=: ;;
9664076b9443SCy Schubert  --file | --fil | --fi | --f )
9665076b9443SCy Schubert    $ac_shift
9666076b9443SCy Schubert    case $ac_optarg in
966770b56f4bSCy Schubert    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
9668076b9443SCy Schubert    '') as_fn_error $? "missing file argument" ;;
9669076b9443SCy Schubert    esac
9670076b9443SCy Schubert    as_fn_append CONFIG_FILES " '$ac_optarg'"
9671076b9443SCy Schubert    ac_need_defaults=false;;
9672076b9443SCy Schubert  --he | --h |  --help | --hel | -h )
967370b56f4bSCy Schubert    printf "%s\n" "$ac_cs_usage"; exit ;;
9674076b9443SCy Schubert  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
9675076b9443SCy Schubert  | -silent | --silent | --silen | --sile | --sil | --si | --s)
9676076b9443SCy Schubert    ac_cs_silent=: ;;
9677076b9443SCy Schubert
9678076b9443SCy Schubert  # This is an error.
9679076b9443SCy Schubert  -*) as_fn_error $? "unrecognized option: \`$1'
9680076b9443SCy SchubertTry \`$0 --help' for more information." ;;
9681076b9443SCy Schubert
9682076b9443SCy Schubert  *) as_fn_append ac_config_targets " $1"
9683076b9443SCy Schubert     ac_need_defaults=false ;;
9684076b9443SCy Schubert
9685076b9443SCy Schubert  esac
9686076b9443SCy Schubert  shift
9687076b9443SCy Schubertdone
9688076b9443SCy Schubert
9689076b9443SCy Schubertac_configure_extra_args=
9690076b9443SCy Schubert
9691076b9443SCy Schubertif $ac_cs_silent; then
9692076b9443SCy Schubert  exec 6>/dev/null
9693076b9443SCy Schubert  ac_configure_extra_args="$ac_configure_extra_args --silent"
9694076b9443SCy Schubertfi
9695076b9443SCy Schubert
9696076b9443SCy Schubert_ACEOF
9697076b9443SCy Schubertcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9698076b9443SCy Schubertif \$ac_cs_recheck; then
9699076b9443SCy Schubert  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
9700076b9443SCy Schubert  shift
970170b56f4bSCy Schubert  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
9702076b9443SCy Schubert  CONFIG_SHELL='$SHELL'
9703076b9443SCy Schubert  export CONFIG_SHELL
9704076b9443SCy Schubert  exec "\$@"
9705076b9443SCy Schubertfi
9706076b9443SCy Schubert
9707076b9443SCy Schubert_ACEOF
9708076b9443SCy Schubertcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9709076b9443SCy Schubertexec 5>>config.log
9710076b9443SCy Schubert{
9711076b9443SCy Schubert  echo
9712076b9443SCy Schubert  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
9713076b9443SCy Schubert## Running $as_me. ##
9714076b9443SCy Schubert_ASBOX
971570b56f4bSCy Schubert  printf "%s\n" "$ac_log"
9716076b9443SCy Schubert} >&5
9717076b9443SCy Schubert
9718076b9443SCy Schubert_ACEOF
9719076b9443SCy Schubertcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9720076b9443SCy Schubert_ACEOF
9721076b9443SCy Schubert
9722076b9443SCy Schubertcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9723076b9443SCy Schubert
9724076b9443SCy Schubert# Handling of arguments.
9725076b9443SCy Schubertfor ac_config_target in $ac_config_targets
9726076b9443SCy Schubertdo
9727076b9443SCy Schubert  case $ac_config_target in
9728076b9443SCy Schubert    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
9729076b9443SCy Schubert    "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.tcl" ;;
9730076b9443SCy Schubert
9731076b9443SCy Schubert  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
9732076b9443SCy Schubert  esac
9733076b9443SCy Schubertdone
9734076b9443SCy Schubert
9735076b9443SCy Schubert
9736076b9443SCy Schubert# If the user did not use the arguments to specify the items to instantiate,
9737076b9443SCy Schubert# then the envvar interface is used.  Set only those that are not.
9738076b9443SCy Schubert# We use the long form for the default assignment because of an extremely
9739076b9443SCy Schubert# bizarre bug on SunOS 4.1.3.
9740076b9443SCy Schubertif $ac_need_defaults; then
974170b56f4bSCy Schubert  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
9742076b9443SCy Schubertfi
9743076b9443SCy Schubert
9744076b9443SCy Schubert# Have a temporary directory for convenience.  Make it in the build tree
9745076b9443SCy Schubert# simply because there is no reason against having it here, and in addition,
9746076b9443SCy Schubert# creating and moving files from /tmp can sometimes cause problems.
9747076b9443SCy Schubert# Hook for its removal unless debugging.
9748076b9443SCy Schubert# Note that there is a small window in which the directory will not be cleaned:
9749076b9443SCy Schubert# after its creation but before its name has been assigned to `$tmp'.
9750076b9443SCy Schubert$debug ||
9751076b9443SCy Schubert{
9752076b9443SCy Schubert  tmp= ac_tmp=
9753076b9443SCy Schubert  trap 'exit_status=$?
9754076b9443SCy Schubert  : "${ac_tmp:=$tmp}"
9755076b9443SCy Schubert  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
9756076b9443SCy Schubert' 0
9757076b9443SCy Schubert  trap 'as_fn_exit 1' 1 2 13 15
9758076b9443SCy Schubert}
9759076b9443SCy Schubert# Create a (secure) tmp directory for tmp files.
9760076b9443SCy Schubert
9761076b9443SCy Schubert{
9762076b9443SCy Schubert  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
9763076b9443SCy Schubert  test -d "$tmp"
9764076b9443SCy Schubert}  ||
9765076b9443SCy Schubert{
9766076b9443SCy Schubert  tmp=./conf$$-$RANDOM
9767076b9443SCy Schubert  (umask 077 && mkdir "$tmp")
9768076b9443SCy Schubert} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
9769076b9443SCy Schubertac_tmp=$tmp
9770076b9443SCy Schubert
9771076b9443SCy Schubert# Set up the scripts for CONFIG_FILES section.
9772076b9443SCy Schubert# No need to generate them if there are no CONFIG_FILES.
9773076b9443SCy Schubert# This happens for instance with `./config.status config.h'.
9774076b9443SCy Schubertif test -n "$CONFIG_FILES"; then
9775076b9443SCy Schubert
9776076b9443SCy Schubert
9777076b9443SCy Schubertac_cr=`echo X | tr X '\015'`
9778076b9443SCy Schubert# On cygwin, bash can eat \r inside `` if the user requested igncr.
9779076b9443SCy Schubert# But we know of no other shell where ac_cr would be empty at this
9780076b9443SCy Schubert# point, so we can use a bashism as a fallback.
9781076b9443SCy Schubertif test "x$ac_cr" = x; then
9782076b9443SCy Schubert  eval ac_cr=\$\'\\r\'
9783076b9443SCy Schubertfi
9784076b9443SCy Schubertac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
9785076b9443SCy Schubertif test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
9786076b9443SCy Schubert  ac_cs_awk_cr='\\r'
9787076b9443SCy Schubertelse
9788076b9443SCy Schubert  ac_cs_awk_cr=$ac_cr
9789076b9443SCy Schubertfi
9790076b9443SCy Schubert
9791076b9443SCy Schubertecho 'BEGIN {' >"$ac_tmp/subs1.awk" &&
9792076b9443SCy Schubert_ACEOF
9793076b9443SCy Schubert
9794076b9443SCy Schubert
9795076b9443SCy Schubert{
9796076b9443SCy Schubert  echo "cat >conf$$subs.awk <<_ACEOF" &&
9797076b9443SCy Schubert  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
9798076b9443SCy Schubert  echo "_ACEOF"
9799076b9443SCy Schubert} >conf$$subs.sh ||
9800076b9443SCy Schubert  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9801076b9443SCy Schubertac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
9802076b9443SCy Schubertac_delim='%!_!# '
9803076b9443SCy Schubertfor ac_last_try in false false false false false :; do
9804076b9443SCy Schubert  . ./conf$$subs.sh ||
9805076b9443SCy Schubert    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9806076b9443SCy Schubert
9807076b9443SCy Schubert  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
9808076b9443SCy Schubert  if test $ac_delim_n = $ac_delim_num; then
9809076b9443SCy Schubert    break
9810076b9443SCy Schubert  elif $ac_last_try; then
9811076b9443SCy Schubert    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9812076b9443SCy Schubert  else
9813076b9443SCy Schubert    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
9814076b9443SCy Schubert  fi
9815076b9443SCy Schubertdone
9816076b9443SCy Schubertrm -f conf$$subs.sh
9817076b9443SCy Schubert
9818076b9443SCy Schubertcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9819076b9443SCy Schubertcat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
9820076b9443SCy Schubert_ACEOF
9821076b9443SCy Schubertsed -n '
9822076b9443SCy Schuberth
9823076b9443SCy Schuberts/^/S["/; s/!.*/"]=/
9824076b9443SCy Schubertp
9825076b9443SCy Schubertg
9826076b9443SCy Schuberts/^[^!]*!//
9827076b9443SCy Schubert:repl
9828076b9443SCy Schubertt repl
9829076b9443SCy Schuberts/'"$ac_delim"'$//
9830076b9443SCy Schubertt delim
9831076b9443SCy Schubert:nl
9832076b9443SCy Schuberth
9833076b9443SCy Schuberts/\(.\{148\}\)..*/\1/
9834076b9443SCy Schubertt more1
9835076b9443SCy Schuberts/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
9836076b9443SCy Schubertp
9837076b9443SCy Schubertn
9838076b9443SCy Schubertb repl
9839076b9443SCy Schubert:more1
9840076b9443SCy Schuberts/["\\]/\\&/g; s/^/"/; s/$/"\\/
9841076b9443SCy Schubertp
9842076b9443SCy Schubertg
9843076b9443SCy Schuberts/.\{148\}//
9844076b9443SCy Schubertt nl
9845076b9443SCy Schubert:delim
9846076b9443SCy Schuberth
9847076b9443SCy Schuberts/\(.\{148\}\)..*/\1/
9848076b9443SCy Schubertt more2
9849076b9443SCy Schuberts/["\\]/\\&/g; s/^/"/; s/$/"/
9850076b9443SCy Schubertp
9851076b9443SCy Schubertb
9852076b9443SCy Schubert:more2
9853076b9443SCy Schuberts/["\\]/\\&/g; s/^/"/; s/$/"\\/
9854076b9443SCy Schubertp
9855076b9443SCy Schubertg
9856076b9443SCy Schuberts/.\{148\}//
9857076b9443SCy Schubertt delim
9858076b9443SCy Schubert' <conf$$subs.awk | sed '
9859076b9443SCy Schubert/^[^""]/{
9860076b9443SCy Schubert  N
9861076b9443SCy Schubert  s/\n//
9862076b9443SCy Schubert}
9863076b9443SCy Schubert' >>$CONFIG_STATUS || ac_write_fail=1
9864076b9443SCy Schubertrm -f conf$$subs.awk
9865076b9443SCy Schubertcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9866076b9443SCy Schubert_ACAWK
9867076b9443SCy Schubertcat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
9868076b9443SCy Schubert  for (key in S) S_is_set[key] = 1
9869076b9443SCy Schubert  FS = ""
9870076b9443SCy Schubert
9871076b9443SCy Schubert}
9872076b9443SCy Schubert{
9873076b9443SCy Schubert  line = $ 0
9874076b9443SCy Schubert  nfields = split(line, field, "@")
9875076b9443SCy Schubert  substed = 0
9876076b9443SCy Schubert  len = length(field[1])
9877076b9443SCy Schubert  for (i = 2; i < nfields; i++) {
9878076b9443SCy Schubert    key = field[i]
9879076b9443SCy Schubert    keylen = length(key)
9880076b9443SCy Schubert    if (S_is_set[key]) {
9881076b9443SCy Schubert      value = S[key]
9882076b9443SCy Schubert      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
9883076b9443SCy Schubert      len += length(value) + length(field[++i])
9884076b9443SCy Schubert      substed = 1
9885076b9443SCy Schubert    } else
9886076b9443SCy Schubert      len += 1 + keylen
9887076b9443SCy Schubert  }
9888076b9443SCy Schubert
9889076b9443SCy Schubert  print line
9890076b9443SCy Schubert}
9891076b9443SCy Schubert
9892076b9443SCy Schubert_ACAWK
9893076b9443SCy Schubert_ACEOF
9894076b9443SCy Schubertcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9895076b9443SCy Schubertif sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
9896076b9443SCy Schubert  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
9897076b9443SCy Schubertelse
9898076b9443SCy Schubert  cat
9899076b9443SCy Schubertfi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
9900076b9443SCy Schubert  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
9901076b9443SCy Schubert_ACEOF
9902076b9443SCy Schubert
9903076b9443SCy Schubert# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
9904076b9443SCy Schubert# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
9905076b9443SCy Schubert# trailing colons and then remove the whole line if VPATH becomes empty
9906076b9443SCy Schubert# (actually we leave an empty line to preserve line numbers).
9907076b9443SCy Schubertif test "x$srcdir" = x.; then
9908076b9443SCy Schubert  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
9909076b9443SCy Schuberth
9910076b9443SCy Schuberts///
9911076b9443SCy Schuberts/^/:/
9912076b9443SCy Schuberts/[	 ]*$/:/
9913076b9443SCy Schuberts/:\$(srcdir):/:/g
9914076b9443SCy Schuberts/:\${srcdir}:/:/g
9915076b9443SCy Schuberts/:@srcdir@:/:/g
9916076b9443SCy Schuberts/^:*//
9917076b9443SCy Schuberts/:*$//
9918076b9443SCy Schubertx
9919076b9443SCy Schuberts/\(=[	 ]*\).*/\1/
9920076b9443SCy SchubertG
9921076b9443SCy Schuberts/\n//
9922076b9443SCy Schuberts/^[^=]*=[	 ]*$//
9923076b9443SCy Schubert}'
9924076b9443SCy Schubertfi
9925076b9443SCy Schubert
9926076b9443SCy Schubertcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9927076b9443SCy Schubertfi # test -n "$CONFIG_FILES"
9928076b9443SCy Schubert
9929076b9443SCy Schubert
9930076b9443SCy Schuberteval set X "  :F $CONFIG_FILES      "
9931076b9443SCy Schubertshift
9932076b9443SCy Schubertfor ac_tag
9933076b9443SCy Schubertdo
9934076b9443SCy Schubert  case $ac_tag in
9935076b9443SCy Schubert  :[FHLC]) ac_mode=$ac_tag; continue;;
9936076b9443SCy Schubert  esac
9937076b9443SCy Schubert  case $ac_mode$ac_tag in
9938076b9443SCy Schubert  :[FHL]*:*);;
9939076b9443SCy Schubert  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
9940076b9443SCy Schubert  :[FH]-) ac_tag=-:-;;
9941076b9443SCy Schubert  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
9942076b9443SCy Schubert  esac
9943076b9443SCy Schubert  ac_save_IFS=$IFS
9944076b9443SCy Schubert  IFS=:
9945076b9443SCy Schubert  set x $ac_tag
9946076b9443SCy Schubert  IFS=$ac_save_IFS
9947076b9443SCy Schubert  shift
9948076b9443SCy Schubert  ac_file=$1
9949076b9443SCy Schubert  shift
9950076b9443SCy Schubert
9951076b9443SCy Schubert  case $ac_mode in
9952076b9443SCy Schubert  :L) ac_source=$1;;
9953076b9443SCy Schubert  :[FH])
9954076b9443SCy Schubert    ac_file_inputs=
9955076b9443SCy Schubert    for ac_f
9956076b9443SCy Schubert    do
9957076b9443SCy Schubert      case $ac_f in
9958076b9443SCy Schubert      -) ac_f="$ac_tmp/stdin";;
9959076b9443SCy Schubert      *) # Look for the file first in the build tree, then in the source tree
9960076b9443SCy Schubert	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
9961076b9443SCy Schubert	 # because $ac_f cannot contain `:'.
9962076b9443SCy Schubert	 test -f "$ac_f" ||
9963076b9443SCy Schubert	   case $ac_f in
9964076b9443SCy Schubert	   [\\/$]*) false;;
9965076b9443SCy Schubert	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
9966076b9443SCy Schubert	   esac ||
9967076b9443SCy Schubert	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
9968076b9443SCy Schubert      esac
996970b56f4bSCy Schubert      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
9970076b9443SCy Schubert      as_fn_append ac_file_inputs " '$ac_f'"
9971076b9443SCy Schubert    done
9972076b9443SCy Schubert
9973076b9443SCy Schubert    # Let's still pretend it is `configure' which instantiates (i.e., don't
9974076b9443SCy Schubert    # use $as_me), people would be surprised to read:
9975076b9443SCy Schubert    #    /* config.h.  Generated by config.status.  */
9976076b9443SCy Schubert    configure_input='Generated from '`
997770b56f4bSCy Schubert	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
9978076b9443SCy Schubert	`' by configure.'
9979076b9443SCy Schubert    if test x"$ac_file" != x-; then
9980076b9443SCy Schubert      configure_input="$ac_file.  $configure_input"
998170b56f4bSCy Schubert      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
998270b56f4bSCy Schubertprintf "%s\n" "$as_me: creating $ac_file" >&6;}
9983076b9443SCy Schubert    fi
9984076b9443SCy Schubert    # Neutralize special characters interpreted by sed in replacement strings.
9985076b9443SCy Schubert    case $configure_input in #(
9986076b9443SCy Schubert    *\&* | *\|* | *\\* )
998770b56f4bSCy Schubert       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
9988076b9443SCy Schubert       sed 's/[\\\\&|]/\\\\&/g'`;; #(
9989076b9443SCy Schubert    *) ac_sed_conf_input=$configure_input;;
9990076b9443SCy Schubert    esac
9991076b9443SCy Schubert
9992076b9443SCy Schubert    case $ac_tag in
9993076b9443SCy Schubert    *:-:* | *:-) cat >"$ac_tmp/stdin" \
9994076b9443SCy Schubert      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
9995076b9443SCy Schubert    esac
9996076b9443SCy Schubert    ;;
9997076b9443SCy Schubert  esac
9998076b9443SCy Schubert
9999076b9443SCy Schubert  ac_dir=`$as_dirname -- "$ac_file" ||
10000076b9443SCy Schubert$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10001076b9443SCy Schubert	 X"$ac_file" : 'X\(//\)[^/]' \| \
10002076b9443SCy Schubert	 X"$ac_file" : 'X\(//\)$' \| \
10003076b9443SCy Schubert	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
1000470b56f4bSCy Schubertprintf "%s\n" X"$ac_file" |
10005076b9443SCy Schubert    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
10006076b9443SCy Schubert	    s//\1/
10007076b9443SCy Schubert	    q
10008076b9443SCy Schubert	  }
10009076b9443SCy Schubert	  /^X\(\/\/\)[^/].*/{
10010076b9443SCy Schubert	    s//\1/
10011076b9443SCy Schubert	    q
10012076b9443SCy Schubert	  }
10013076b9443SCy Schubert	  /^X\(\/\/\)$/{
10014076b9443SCy Schubert	    s//\1/
10015076b9443SCy Schubert	    q
10016076b9443SCy Schubert	  }
10017076b9443SCy Schubert	  /^X\(\/\).*/{
10018076b9443SCy Schubert	    s//\1/
10019076b9443SCy Schubert	    q
10020076b9443SCy Schubert	  }
10021076b9443SCy Schubert	  s/.*/./; q'`
10022076b9443SCy Schubert  as_dir="$ac_dir"; as_fn_mkdir_p
10023076b9443SCy Schubert  ac_builddir=.
10024076b9443SCy Schubert
10025076b9443SCy Schubertcase "$ac_dir" in
10026076b9443SCy Schubert.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
10027076b9443SCy Schubert*)
1002870b56f4bSCy Schubert  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
10029076b9443SCy Schubert  # A ".." for each directory in $ac_dir_suffix.
1003070b56f4bSCy Schubert  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
10031076b9443SCy Schubert  case $ac_top_builddir_sub in
10032076b9443SCy Schubert  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
10033076b9443SCy Schubert  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
10034076b9443SCy Schubert  esac ;;
10035076b9443SCy Schubertesac
10036076b9443SCy Schubertac_abs_top_builddir=$ac_pwd
10037076b9443SCy Schubertac_abs_builddir=$ac_pwd$ac_dir_suffix
10038076b9443SCy Schubert# for backward compatibility:
10039076b9443SCy Schubertac_top_builddir=$ac_top_build_prefix
10040076b9443SCy Schubert
10041076b9443SCy Schubertcase $srcdir in
10042076b9443SCy Schubert  .)  # We are building in place.
10043076b9443SCy Schubert    ac_srcdir=.
10044076b9443SCy Schubert    ac_top_srcdir=$ac_top_builddir_sub
10045076b9443SCy Schubert    ac_abs_top_srcdir=$ac_pwd ;;
10046076b9443SCy Schubert  [\\/]* | ?:[\\/]* )  # Absolute name.
10047076b9443SCy Schubert    ac_srcdir=$srcdir$ac_dir_suffix;
10048076b9443SCy Schubert    ac_top_srcdir=$srcdir
10049076b9443SCy Schubert    ac_abs_top_srcdir=$srcdir ;;
10050076b9443SCy Schubert  *) # Relative name.
10051076b9443SCy Schubert    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
10052076b9443SCy Schubert    ac_top_srcdir=$ac_top_build_prefix$srcdir
10053076b9443SCy Schubert    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
10054076b9443SCy Schubertesac
10055076b9443SCy Schubertac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
10056076b9443SCy Schubert
10057076b9443SCy Schubert
10058076b9443SCy Schubert  case $ac_mode in
10059076b9443SCy Schubert  :F)
10060076b9443SCy Schubert  #
10061076b9443SCy Schubert  # CONFIG_FILE
10062076b9443SCy Schubert  #
10063076b9443SCy Schubert
10064076b9443SCy Schubert_ACEOF
10065076b9443SCy Schubert
10066076b9443SCy Schubertcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10067076b9443SCy Schubert# If the template does not know about datarootdir, expand it.
10068076b9443SCy Schubert# FIXME: This hack should be removed a few years after 2.60.
10069076b9443SCy Schubertac_datarootdir_hack=; ac_datarootdir_seen=
10070076b9443SCy Schubertac_sed_dataroot='
10071076b9443SCy Schubert/datarootdir/ {
10072076b9443SCy Schubert  p
10073076b9443SCy Schubert  q
10074076b9443SCy Schubert}
10075076b9443SCy Schubert/@datadir@/p
10076076b9443SCy Schubert/@docdir@/p
10077076b9443SCy Schubert/@infodir@/p
10078076b9443SCy Schubert/@localedir@/p
10079076b9443SCy Schubert/@mandir@/p'
10080076b9443SCy Schubertcase `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
10081076b9443SCy Schubert*datarootdir*) ac_datarootdir_seen=yes;;
10082076b9443SCy Schubert*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
1008370b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
1008470b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
10085076b9443SCy Schubert_ACEOF
10086076b9443SCy Schubertcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10087076b9443SCy Schubert  ac_datarootdir_hack='
10088076b9443SCy Schubert  s&@datadir@&$datadir&g
10089076b9443SCy Schubert  s&@docdir@&$docdir&g
10090076b9443SCy Schubert  s&@infodir@&$infodir&g
10091076b9443SCy Schubert  s&@localedir@&$localedir&g
10092076b9443SCy Schubert  s&@mandir@&$mandir&g
10093076b9443SCy Schubert  s&\\\${datarootdir}&$datarootdir&g' ;;
10094076b9443SCy Schubertesac
10095076b9443SCy Schubert_ACEOF
10096076b9443SCy Schubert
10097076b9443SCy Schubert# Neutralize VPATH when `$srcdir' = `.'.
10098076b9443SCy Schubert# Shell code in configure.ac might set extrasub.
10099076b9443SCy Schubert# FIXME: do we really want to maintain this feature?
10100076b9443SCy Schubertcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10101076b9443SCy Schubertac_sed_extra="$ac_vpsub
10102076b9443SCy Schubert$extrasub
10103076b9443SCy Schubert_ACEOF
10104076b9443SCy Schubertcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10105076b9443SCy Schubert:t
10106076b9443SCy Schubert/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
10107076b9443SCy Schuberts|@configure_input@|$ac_sed_conf_input|;t t
10108076b9443SCy Schuberts&@top_builddir@&$ac_top_builddir_sub&;t t
10109076b9443SCy Schuberts&@top_build_prefix@&$ac_top_build_prefix&;t t
10110076b9443SCy Schuberts&@srcdir@&$ac_srcdir&;t t
10111076b9443SCy Schuberts&@abs_srcdir@&$ac_abs_srcdir&;t t
10112076b9443SCy Schuberts&@top_srcdir@&$ac_top_srcdir&;t t
10113076b9443SCy Schuberts&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
10114076b9443SCy Schuberts&@builddir@&$ac_builddir&;t t
10115076b9443SCy Schuberts&@abs_builddir@&$ac_abs_builddir&;t t
10116076b9443SCy Schuberts&@abs_top_builddir@&$ac_abs_top_builddir&;t t
10117076b9443SCy Schubert$ac_datarootdir_hack
10118076b9443SCy Schubert"
10119076b9443SCy Schuberteval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
10120076b9443SCy Schubert  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10121076b9443SCy Schubert
10122076b9443SCy Schuberttest -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
10123076b9443SCy Schubert  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
10124076b9443SCy Schubert  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
10125076b9443SCy Schubert      "$ac_tmp/out"`; test -z "$ac_out"; } &&
1012670b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
10127076b9443SCy Schubertwhich seems to be undefined.  Please make sure it is defined" >&5
1012870b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
10129076b9443SCy Schubertwhich seems to be undefined.  Please make sure it is defined" >&2;}
10130076b9443SCy Schubert
10131076b9443SCy Schubert  rm -f "$ac_tmp/stdin"
10132076b9443SCy Schubert  case $ac_file in
10133076b9443SCy Schubert  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
10134076b9443SCy Schubert  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
10135076b9443SCy Schubert  esac \
10136076b9443SCy Schubert  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10137076b9443SCy Schubert ;;
10138076b9443SCy Schubert
10139076b9443SCy Schubert
10140076b9443SCy Schubert
10141076b9443SCy Schubert  esac
10142076b9443SCy Schubert
10143076b9443SCy Schubertdone # for ac_tag
10144076b9443SCy Schubert
10145076b9443SCy Schubert
10146076b9443SCy Schubertas_fn_exit 0
10147076b9443SCy Schubert_ACEOF
10148076b9443SCy Schubertac_clean_files=$ac_clean_files_save
10149076b9443SCy Schubert
10150076b9443SCy Schuberttest $ac_write_fail = 0 ||
10151076b9443SCy Schubert  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
10152076b9443SCy Schubert
10153076b9443SCy Schubert
10154076b9443SCy Schubert# configure is writing to config.log, and then calls config.status.
10155076b9443SCy Schubert# config.status does its own redirection, appending to config.log.
10156076b9443SCy Schubert# Unfortunately, on DOS this fails, as config.log is still kept open
10157076b9443SCy Schubert# by configure, so config.status won't be able to write to it; its
10158076b9443SCy Schubert# output is simply discarded.  So we exec the FD to /dev/null,
10159076b9443SCy Schubert# effectively closing config.log, so it can be properly (re)opened and
10160076b9443SCy Schubert# appended to by config.status.  When coming back to configure, we
10161076b9443SCy Schubert# need to make the FD available again.
10162076b9443SCy Schubertif test "$no_create" != yes; then
10163076b9443SCy Schubert  ac_cs_success=:
10164076b9443SCy Schubert  ac_config_status_args=
10165076b9443SCy Schubert  test "$silent" = yes &&
10166076b9443SCy Schubert    ac_config_status_args="$ac_config_status_args --quiet"
10167076b9443SCy Schubert  exec 5>/dev/null
10168076b9443SCy Schubert  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
10169076b9443SCy Schubert  exec 5>>config.log
10170076b9443SCy Schubert  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
10171076b9443SCy Schubert  # would make configure fail if this is the last instruction.
10172076b9443SCy Schubert  $ac_cs_success || as_fn_exit 1
10173076b9443SCy Schubertfi
10174076b9443SCy Schubertif test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
1017570b56f4bSCy Schubert  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
1017670b56f4bSCy Schubertprintf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
10177076b9443SCy Schubertfi
101787963e411SCy Schubert
101797963e411SCy Schubert
10180