blob: b02ebc63501990c9723e5e6dc54c91320d65f80c [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002# From configure.in Revision: 46753 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004# Generated by GNU Autoconf 2.59e for python 3.0.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Thomas Wouters477c8d52006-05-27 19:21:47 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
16# Be Bourne compatible
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18 emulate sh
19 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000020 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters477c8d52006-05-27 19:21:47 +000023 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
Martin v. Löwis11437992002-04-12 09:54:03 +000026fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000027BIN_SH=xpg4; export BIN_SH # for Tru64
Skip Montanarof0d5f792004-08-15 14:08:23 +000028DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000029
Martin v. Löwis11437992002-04-12 09:54:03 +000030
Thomas Wouters477c8d52006-05-27 19:21:47 +000031# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000032# Avoid depending upon Character Ranges.
33as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
35as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36as_cr_digits='0123456789'
37as_cr_alnum=$as_cr_Letters$as_cr_digits
38
39# The user is always right.
40if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000041 echo "#! /bin/sh" >conf$$.sh
42 echo "exit 0" >>conf$$.sh
43 chmod +x conf$$.sh
44 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000045 PATH_SEPARATOR=';'
46 else
47 PATH_SEPARATOR=:
48 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000049 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000050fi
51
Thomas Wouters477c8d52006-05-27 19:21:47 +000052# Support unset when possible.
53if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
54 as_unset=unset
55else
56 as_unset=false
57fi
Martin v. Löwis11437992002-04-12 09:54:03 +000058
Thomas Wouters477c8d52006-05-27 19:21:47 +000059
60# IFS
61# We need space, tab and new line, in precisely that order. Quoting is
62# there to prevent editors from complaining about space-tab.
63# (If _AS_PATH_WALK were called with IFS unset, it would disable word
64# splitting by setting IFS to empty value.)
65as_nl='
66'
67IFS=" "" $as_nl"
68
69# Find who we are. Look in the path if we contain no directory separator.
70case $0 in
71 *[\\/]* ) as_myself=$0 ;;
72 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000073for as_dir in $PATH
74do
75 IFS=$as_save_IFS
76 test -z "$as_dir" && as_dir=.
77 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
78done
Thomas Wouters477c8d52006-05-27 19:21:47 +000079IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000080
Thomas Wouters477c8d52006-05-27 19:21:47 +000081 ;;
82esac
83# We did not find ourselves, most probably we were run as `sh COMMAND'
84# in which case we are not to be found in the path.
85if test "x$as_myself" = x; then
86 as_myself=$0
87fi
88if test ! -f "$as_myself"; then
89 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
90 { (exit 1); exit 1; }
91fi
92
93# Work around bugs in pre-3.0 UWIN ksh.
94for as_var in ENV MAIL MAILPATH
95do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
96done
97PS1='$ '
98PS2='> '
99PS4='+ '
100
101# NLS nuisances.
102for as_var in \
103 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
104 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
105 LC_TELEPHONE LC_TIME
106do
107 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
108 eval $as_var=C; export $as_var
109 else
110 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
Martin v. Löwis11437992002-04-12 09:54:03 +0000111 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +0000112done
113
114# Required to use basename.
115if expr a : '\(a\)' >/dev/null 2>&1 &&
116 test "X`expr 00001 : '.*\(...\)'`" = X001; then
117 as_expr=expr
118else
119 as_expr=false
120fi
121
122if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
123 as_basename=basename
124else
125 as_basename=false
126fi
127
128
129# Name of the executable.
130as_me=`$as_basename -- "$0" ||
131$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
132 X"$0" : 'X\(//\)$' \| \
133 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
134echo X/"$0" |
135 sed '/^.*\/\([^/][^/]*\)\/*$/{
136 s//\1/
137 q
138 }
139 /^X\/\(\/\/\)$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\).*/{
144 s//\1/
145 q
146 }
147 s/.*/./; q'`
148
149# CDPATH.
150$as_unset CDPATH
151
152
153if test "x$CONFIG_SHELL" = x; then
154 if (eval ":") 2>/dev/null; then
155 as_have_required=yes
156else
157 as_have_required=no
158fi
159
160 if test $as_have_required = yes && (eval ":
161(as_func_return () {
162 (exit \$1)
163}
164as_func_success () {
165 as_func_return 0
166}
167as_func_failure () {
168 as_func_return 1
169}
170as_func_ret_success () {
171 return 0
172}
173as_func_ret_failure () {
174 return 1
175}
176
177exitcode=0
178if as_func_success; then
179 :
180else
181 exitcode=1
182 echo as_func_success failed.
183fi
184
185if as_func_failure; then
186 exitcode=1
187 echo as_func_failure succeeded.
188fi
189
190if as_func_ret_success; then
191 :
192else
193 exitcode=1
194 echo as_func_ret_success failed.
195fi
196
197if as_func_ret_failure; then
198 exitcode=1
199 echo as_func_ret_failure succeeded.
200fi
201
202if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
203 :
204else
205 exitcode=1
206 echo positional parameters were not saved.
207fi
208
209test \$exitcode = 0) || { (exit 1); exit 1; }
210
211(
212 as_lineno_1=\$LINENO
213 as_lineno_2=\$LINENO
214 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
215 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
216") 2> /dev/null; then
217 :
218else
219 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters477c8d52006-05-27 19:21:47 +0000221for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000222do
223 IFS=$as_save_IFS
224 test -z "$as_dir" && as_dir=.
Thomas Wouters477c8d52006-05-27 19:21:47 +0000225 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000226 /*)
Thomas Wouters477c8d52006-05-27 19:21:47 +0000227 for as_base in sh bash ksh sh5; do
228 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
229 done;;
230 esac
231done
232IFS=$as_save_IFS
233
234
235 for as_shell in $as_candidate_shells $SHELL; do
236 # Try only shells which exist, to save several forks.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +0000237 if test -f "$as_shell" &&
238 { ("$as_shell") 2> /dev/null <<\_ASEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +0000239# Be Bourne compatible
240if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241 emulate sh
242 NULLCMD=:
243 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244 # is contrary to our usage. Disable this feature.
245 alias -g '${1+"$@"}'='"$@"'
246 setopt NO_GLOB_SUBST
247else
248 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
249fi
250BIN_SH=xpg4; export BIN_SH # for Tru64
251DUALCASE=1; export DUALCASE # for MKS sh
252
253:
254_ASEOF
255}; then
256 CONFIG_SHELL=$as_shell
257 as_have_required=yes
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +0000258 if { "$as_shell" 2> /dev/null <<\_ASEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +0000259# Be Bourne compatible
260if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
261 emulate sh
262 NULLCMD=:
263 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
264 # is contrary to our usage. Disable this feature.
265 alias -g '${1+"$@"}'='"$@"'
266 setopt NO_GLOB_SUBST
267else
268 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
269fi
270BIN_SH=xpg4; export BIN_SH # for Tru64
271DUALCASE=1; export DUALCASE # for MKS sh
272
273:
274(as_func_return () {
275 (exit $1)
276}
277as_func_success () {
278 as_func_return 0
279}
280as_func_failure () {
281 as_func_return 1
282}
283as_func_ret_success () {
284 return 0
285}
286as_func_ret_failure () {
287 return 1
288}
289
290exitcode=0
291if as_func_success; then
292 :
293else
294 exitcode=1
295 echo as_func_success failed.
296fi
297
298if as_func_failure; then
299 exitcode=1
300 echo as_func_failure succeeded.
301fi
302
303if as_func_ret_success; then
304 :
305else
306 exitcode=1
307 echo as_func_ret_success failed.
308fi
309
310if as_func_ret_failure; then
311 exitcode=1
312 echo as_func_ret_failure succeeded.
313fi
314
315if ( set x; as_func_ret_success y && test x = "$1" ); then
316 :
317else
318 exitcode=1
319 echo positional parameters were not saved.
320fi
321
322test $exitcode = 0) || { (exit 1); exit 1; }
323
324(
Martin v. Löwis11437992002-04-12 09:54:03 +0000325 as_lineno_1=$LINENO
326 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +0000327 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters477c8d52006-05-27 19:21:47 +0000328 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
329
330_ASEOF
331}; then
332 break
333fi
334
335fi
336
337 done
338
339 if test "x$CONFIG_SHELL" != x; then
340 for as_var in BASH_ENV ENV
341 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
342 done
343 export CONFIG_SHELL
344 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
345fi
346
347
348 if test $as_have_required = no; then
349 echo This script requires a shell more modern than all the
350 echo shells that I found on your system. Please install a
351 echo modern shell, or manually run the script under such a
352 echo shell if you do have one.
353 { (exit 1); exit 1; }
354fi
355
356
357fi
358
359fi
360
361
362
363(eval "as_func_return () {
364 (exit \$1)
365}
366as_func_success () {
367 as_func_return 0
368}
369as_func_failure () {
370 as_func_return 1
371}
372as_func_ret_success () {
373 return 0
374}
375as_func_ret_failure () {
376 return 1
377}
378
379exitcode=0
380if as_func_success; then
381 :
382else
383 exitcode=1
384 echo as_func_success failed.
385fi
386
387if as_func_failure; then
388 exitcode=1
389 echo as_func_failure succeeded.
390fi
391
392if as_func_ret_success; then
393 :
394else
395 exitcode=1
396 echo as_func_ret_success failed.
397fi
398
399if as_func_ret_failure; then
400 exitcode=1
401 echo as_func_ret_failure succeeded.
402fi
403
404if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
405 :
406else
407 exitcode=1
408 echo positional parameters were not saved.
409fi
410
411test \$exitcode = 0") || {
412 echo No shell found that supports shell functions.
413 echo Please tell autoconf@gnu.org about your system,
414 echo including any error possibly output before this
415 echo message
416}
417
418
419
420 as_lineno_1=$LINENO
421 as_lineno_2=$LINENO
422 test "x$as_lineno_1" != "x$as_lineno_2" &&
423 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000424
425 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
426 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters477c8d52006-05-27 19:21:47 +0000427 # line-number line after each line using $LINENO; the second 'sed'
428 # does the real work. The second script uses 'N' to pair each
429 # line-number line with the line containing $LINENO, and appends
430 # trailing '-' during substitution so that $LINENO is not a special
431 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000432 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters477c8d52006-05-27 19:21:47 +0000433 # scripts with optimization help from Paolo Bonzini. Blame Lee
434 # E. McMahon (1931-1989) for sed's syntax. :-)
435 sed -n '
436 p
437 /[$]LINENO/=
438 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 sed '
Thomas Wouters477c8d52006-05-27 19:21:47 +0000440 s/[$]LINENO.*/&-/
441 t lineno
442 b
443 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000444 N
Thomas Wouters477c8d52006-05-27 19:21:47 +0000445 :loop
446 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 t loop
Thomas Wouters477c8d52006-05-27 19:21:47 +0000448 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000449 ' >$as_me.lineno &&
Thomas Wouters477c8d52006-05-27 19:21:47 +0000450 chmod +x "$as_me.lineno" ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
452 { (exit 1); exit 1; }; }
453
454 # Don't try to exec as it changes $[0], causing all sort of problems
455 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters477c8d52006-05-27 19:21:47 +0000456 # original and so on. Autoconf is especially sensitive to this).
457 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 # Exit status is that of the last command.
459 exit
460}
461
462
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +0000463if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
Thomas Wouters477c8d52006-05-27 19:21:47 +0000464 as_dirname=dirname
465else
466 as_dirname=false
467fi
468
469ECHO_C= ECHO_N= ECHO_T=
470case `echo -n x` in
471-n*)
472 case `echo 'x\c'` in
473 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
474 *) ECHO_C='\c';;
475 esac;;
476*)
477 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000478esac
479
Thomas Wouters477c8d52006-05-27 19:21:47 +0000480if expr a : '\(a\)' >/dev/null 2>&1 &&
481 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 as_expr=expr
483else
484 as_expr=false
485fi
486
487rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters477c8d52006-05-27 19:21:47 +0000488if test -d conf$$.dir; then
489 rm -f conf$$.dir/conf$$.file
490else
491 rm -f conf$$.dir
492 mkdir conf$$.dir
493fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000494echo >conf$$.file
495if ln -s conf$$.file conf$$ 2>/dev/null; then
Thomas Wouters477c8d52006-05-27 19:21:47 +0000496 as_ln_s='ln -s'
497 # ... but there are two gotchas:
498 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
499 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
500 # In both cases, we have to default to `cp -p'.
501 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000502 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000503elif ln conf$$.file conf$$ 2>/dev/null; then
504 as_ln_s=ln
505else
506 as_ln_s='cp -p'
507fi
Thomas Wouters477c8d52006-05-27 19:21:47 +0000508rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
509rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000510
Skip Montanaro6dead952003-09-25 14:50:04 +0000511if mkdir -p . 2>/dev/null; then
512 as_mkdir_p=:
513else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000514 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000515 as_mkdir_p=false
516fi
517
Thomas Wouters477c8d52006-05-27 19:21:47 +0000518# Find out whether ``test -x'' works. Don't use a zero-byte file, as
519# systems may use methods other than mode bits to determine executability.
520cat >conf$$.file <<_ASEOF
521#! /bin/sh
522exit 0
523_ASEOF
524chmod +x conf$$.file
525if test -x conf$$.file >/dev/null 2>&1; then
526 as_executable_p="test -x"
527else
528 as_executable_p=:
529fi
530rm -f conf$$.file
Martin v. Löwis11437992002-04-12 09:54:03 +0000531
532# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000533as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000534
535# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000536as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000537
538
Martin v. Löwis11437992002-04-12 09:54:03 +0000539
Thomas Wouters477c8d52006-05-27 19:21:47 +0000540exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000541
542# Name of the host.
543# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
544# so uname gets run too.
545ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
546
Martin v. Löwis11437992002-04-12 09:54:03 +0000547#
548# Initializations.
549#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000550ac_default_prefix=/usr/local
Thomas Wouters477c8d52006-05-27 19:21:47 +0000551ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000552ac_config_libobj_dir=.
Thomas Wouters477c8d52006-05-27 19:21:47 +0000553LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000554cross_compiling=no
555subdirs=
556MFLAGS=
557MAKEFLAGS=
558SHELL=${CONFIG_SHELL-/bin/sh}
559
Martin v. Löwis11437992002-04-12 09:54:03 +0000560# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000561PACKAGE_NAME='python'
562PACKAGE_TARNAME='python'
Guido van Rossum0c4eb622006-03-30 16:19:24 +0000563PACKAGE_VERSION='3.0'
564PACKAGE_STRING='python 3.0'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000565PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000566
567ac_unique_file="Include/object.h"
568# Factoring default headers for most tests.
569ac_includes_default="\
570#include <stdio.h>
571#if HAVE_SYS_TYPES_H
572# include <sys/types.h>
573#endif
574#if HAVE_SYS_STAT_H
575# include <sys/stat.h>
576#endif
577#if STDC_HEADERS
578# include <stdlib.h>
579# include <stddef.h>
580#else
581# if HAVE_STDLIB_H
582# include <stdlib.h>
583# endif
584#endif
585#if HAVE_STRING_H
586# if !STDC_HEADERS && HAVE_MEMORY_H
587# include <memory.h>
588# endif
589# include <string.h>
590#endif
591#if HAVE_STRINGS_H
592# include <strings.h>
593#endif
594#if HAVE_INTTYPES_H
595# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000596#endif
597#if HAVE_STDINT_H
598# include <stdint.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000599#endif
600#if HAVE_UNISTD_H
601# include <unistd.h>
602#endif"
603
Thomas Wouters477c8d52006-05-27 19:21:47 +0000604ac_subst_vars='SHELL
605PATH_SEPARATOR
606PACKAGE_NAME
607PACKAGE_TARNAME
608PACKAGE_VERSION
609PACKAGE_STRING
610PACKAGE_BUGREPORT
611exec_prefix
612prefix
613program_transform_name
614bindir
615sbindir
616libexecdir
617datarootdir
618datadir
619sysconfdir
620sharedstatedir
621localstatedir
622includedir
623oldincludedir
624docdir
625infodir
626htmldir
627dvidir
628pdfdir
629psdir
630libdir
631localedir
632mandir
633DEFS
634ECHO_C
635ECHO_N
636ECHO_T
637LIBS
638build_alias
639host_alias
640target_alias
641VERSION
642SOVERSION
643CONFIG_ARGS
644UNIVERSALSDK
645PYTHONFRAMEWORK
646PYTHONFRAMEWORKDIR
647PYTHONFRAMEWORKPREFIX
648PYTHONFRAMEWORKINSTALLDIR
649FRAMEWORKINSTALLFIRST
650FRAMEWORKINSTALLLAST
Thomas Wouters73e5a5b2006-06-08 15:35:45 +0000651FRAMEWORKALTINSTALLFIRST
652FRAMEWORKALTINSTALLLAST
653FRAMEWORKUNIXTOOLSPREFIX
Thomas Wouters477c8d52006-05-27 19:21:47 +0000654MACHDEP
655SGI_ABI
656EXTRAPLATDIR
657EXTRAMACHDEPPATH
658CONFIGURE_MACOSX_DEPLOYMENT_TARGET
659EXPORT_MACOSX_DEPLOYMENT_TARGET
660CC
661CFLAGS
662LDFLAGS
663CPPFLAGS
664ac_ct_CC
665EXEEXT
666OBJEXT
667CXX
668MAINCC
669CPP
670GREP
671EGREP
672BUILDEXEEXT
673LIBRARY
674LDLIBRARY
675DLLLIBRARY
676BLDLIBRARY
677LDLIBRARYDIR
678INSTSONAME
679RUNSHARED
680LINKCC
681RANLIB
682AR
683SVNVERSION
684INSTALL_PROGRAM
685INSTALL_SCRIPT
686INSTALL_DATA
687LN
688OPT
689BASECFLAGS
690OTHER_LIBTOOL_OPT
691LIBTOOL_CRUFT
692SO
693LDSHARED
694BLDSHARED
695CCSHARED
696LINKFORSHARED
697CFLAGSFORSHARED
698SHLIBS
699USE_SIGNAL_MODULE
700SIGNAL_OBJS
701USE_THREAD_MODULE
702LDLAST
703THREADOBJ
704DLINCLDIR
705DYNLOADFILE
706MACHDEP_OBJS
707TRUE
708LIBOBJS
709HAVE_GETHOSTBYNAME_R_6_ARG
710HAVE_GETHOSTBYNAME_R_5_ARG
711HAVE_GETHOSTBYNAME_R_3_ARG
712HAVE_GETHOSTBYNAME_R
713HAVE_GETHOSTBYNAME
714LIBM
715LIBC
716UNICODE_OBJS
717THREADHEADERS
718SRCDIRS
719LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000720ac_subst_files=''
Thomas Wouters477c8d52006-05-27 19:21:47 +0000721 ac_precious_vars='build_alias
722host_alias
723target_alias
724CC
725CFLAGS
726LDFLAGS
727CPPFLAGS
728CPP'
729
Guido van Rossum627b2d71993-12-24 10:39:16 +0000730
Guido van Rossum7f43da71994-08-01 12:15:30 +0000731# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000732ac_init_help=
733ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000734# The variables have the same names as the options, with
735# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000736cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000737exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000738no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000739no_recursion=
740prefix=NONE
741program_prefix=NONE
742program_suffix=NONE
743program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000744silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000745site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000746srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000747verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000748x_includes=NONE
749x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000750
751# Installation directory options.
752# These are left unexpanded so users can "make install exec_prefix=/foo"
753# and all the variables that are supposed to be based on exec_prefix
754# by default will actually change.
755# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters477c8d52006-05-27 19:21:47 +0000756# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000757bindir='${exec_prefix}/bin'
758sbindir='${exec_prefix}/sbin'
759libexecdir='${exec_prefix}/libexec'
Thomas Wouters477c8d52006-05-27 19:21:47 +0000760datarootdir='${prefix}/share'
761datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000762sysconfdir='${prefix}/etc'
763sharedstatedir='${prefix}/com'
764localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000765includedir='${prefix}/include'
766oldincludedir='/usr/include'
Thomas Wouters477c8d52006-05-27 19:21:47 +0000767docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
768infodir='${datarootdir}/info'
769htmldir='${docdir}'
770dvidir='${docdir}'
771pdfdir='${docdir}'
772psdir='${docdir}'
773libdir='${exec_prefix}/lib'
774localedir='${datarootdir}/locale'
775mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776
Guido van Rossum7f43da71994-08-01 12:15:30 +0000777ac_prev=
Thomas Wouters477c8d52006-05-27 19:21:47 +0000778ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000779for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000780do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000781 # If the previous option needs an argument, assign it.
782 if test -n "$ac_prev"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +0000783 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784 ac_prev=
785 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000786 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000787
Thomas Wouters477c8d52006-05-27 19:21:47 +0000788 case $ac_option in
789 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
790 *) ac_optarg=yes ;;
791 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793 # Accept the important Cygnus configure options, so we can diagnose typos.
794
Thomas Wouters477c8d52006-05-27 19:21:47 +0000795 case $ac_dashdash$ac_option in
796 --)
797 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000799 -bindir | --bindir | --bindi | --bind | --bin | --bi)
800 ac_prev=bindir ;;
801 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000802 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000803
804 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000805 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000806 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000807 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809 -cache-file | --cache-file | --cache-fil | --cache-fi \
810 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
811 ac_prev=cache_file ;;
812 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
813 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000814 cache_file=$ac_optarg ;;
815
816 --config-cache | -C)
817 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000818
Thomas Wouters477c8d52006-05-27 19:21:47 +0000819 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 ac_prev=datadir ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +0000821 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000822 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823
Thomas Wouters477c8d52006-05-27 19:21:47 +0000824 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
825 | --dataroo | --dataro | --datar)
826 ac_prev=datarootdir ;;
827 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
828 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
829 datarootdir=$ac_optarg ;;
830
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000833 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000834 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
835 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
836 { (exit 1); exit 1; }; }
837 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
Thomas Wouters477c8d52006-05-27 19:21:47 +0000838 eval enable_$ac_feature=no ;;
839
840 -docdir | --docdir | --docdi | --doc | --do)
841 ac_prev=docdir ;;
842 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
843 docdir=$ac_optarg ;;
844
845 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
846 ac_prev=dvidir ;;
847 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
848 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849
850 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
854 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
855 { (exit 1); exit 1; }; }
856 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
Thomas Wouters477c8d52006-05-27 19:21:47 +0000857 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
860 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
861 | --exec | --exe | --ex)
862 ac_prev=exec_prefix ;;
863 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
864 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
865 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000866 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
868 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869 # Obsolete; use --with-gas.
870 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871
Martin v. Löwis11437992002-04-12 09:54:03 +0000872 -help | --help | --hel | --he | -h)
873 ac_init_help=long ;;
874 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
875 ac_init_help=recursive ;;
876 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
877 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878
879 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000880 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000882 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883
Thomas Wouters477c8d52006-05-27 19:21:47 +0000884 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
885 ac_prev=htmldir ;;
886 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
887 | --ht=*)
888 htmldir=$ac_optarg ;;
889
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890 -includedir | --includedir | --includedi | --included | --include \
891 | --includ | --inclu | --incl | --inc)
892 ac_prev=includedir ;;
893 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
894 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000895 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896
897 -infodir | --infodir | --infodi | --infod | --info | --inf)
898 ac_prev=infodir ;;
899 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000901
902 -libdir | --libdir | --libdi | --libd)
903 ac_prev=libdir ;;
904 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000905 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906
907 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
908 | --libexe | --libex | --libe)
909 ac_prev=libexecdir ;;
910 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
911 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000912 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913
Thomas Wouters477c8d52006-05-27 19:21:47 +0000914 -localedir | --localedir | --localedi | --localed | --locale)
915 ac_prev=localedir ;;
916 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
917 localedir=$ac_optarg ;;
918
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters477c8d52006-05-27 19:21:47 +0000920 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921 ac_prev=localstatedir ;;
922 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters477c8d52006-05-27 19:21:47 +0000923 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
927 ac_prev=mandir ;;
928 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000932 # Obsolete; use --without-fp.
933 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
935 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937 no_create=yes ;;
938
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
940 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
941 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
944 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
945 | --oldin | --oldi | --old | --ol | --o)
946 ac_prev=oldincludedir ;;
947 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
948 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
949 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
953 ac_prev=prefix ;;
954 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956
957 -program-prefix | --program-prefix | --program-prefi | --program-pref \
958 | --program-pre | --program-pr | --program-p)
959 ac_prev=program_prefix ;;
960 -program-prefix=* | --program-prefix=* | --program-prefi=* \
961 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
964 -program-suffix | --program-suffix | --program-suffi | --program-suff \
965 | --program-suf | --program-su | --program-s)
966 ac_prev=program_suffix ;;
967 -program-suffix=* | --program-suffix=* | --program-suffi=* \
968 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970
971 -program-transform-name | --program-transform-name \
972 | --program-transform-nam | --program-transform-na \
973 | --program-transform-n | --program-transform- \
974 | --program-transform | --program-transfor \
975 | --program-transfo | --program-transf \
976 | --program-trans | --program-tran \
977 | --progr-tra | --program-tr | --program-t)
978 ac_prev=program_transform_name ;;
979 -program-transform-name=* | --program-transform-name=* \
980 | --program-transform-nam=* | --program-transform-na=* \
981 | --program-transform-n=* | --program-transform-=* \
982 | --program-transform=* | --program-transfor=* \
983 | --program-transfo=* | --program-transf=* \
984 | --program-trans=* | --program-tran=* \
985 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
Thomas Wouters477c8d52006-05-27 19:21:47 +0000988 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
989 ac_prev=pdfdir ;;
990 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
991 pdfdir=$ac_optarg ;;
992
993 -psdir | --psdir | --psdi | --psd | --ps)
994 ac_prev=psdir ;;
995 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
996 psdir=$ac_optarg ;;
997
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
999 | -silent | --silent | --silen | --sile | --sil)
1000 silent=yes ;;
1001
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1003 ac_prev=sbindir ;;
1004 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1005 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007
1008 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1009 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1010 | --sharedst | --shareds | --shared | --share | --shar \
1011 | --sha | --sh)
1012 ac_prev=sharedstatedir ;;
1013 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1014 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1015 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1016 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019 -site | --site | --sit)
1020 ac_prev=site ;;
1021 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001023
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1025 ac_prev=srcdir ;;
1026 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1030 | --syscon | --sysco | --sysc | --sys | --sy)
1031 ac_prev=sysconfdir ;;
1032 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1033 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
Guido van Rossum7f43da71994-08-01 12:15:30 +00001036 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
1041 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1042 verbose=yes ;;
1043
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 -version | --version | --versio | --versi | --vers | -V)
1045 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
1047 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001049 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1051 { echo "$as_me: error: invalid package name: $ac_package" >&2
1052 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053 ac_package=`echo $ac_package| sed 's/-/_/g'`
Thomas Wouters477c8d52006-05-27 19:21:47 +00001054 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055
1056 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001058 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
1060 { echo "$as_me: error: invalid package name: $ac_package" >&2
1061 { (exit 1); exit 1; }; }
1062 ac_package=`echo $ac_package | sed 's/-/_/g'`
Thomas Wouters477c8d52006-05-27 19:21:47 +00001063 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001065 --x)
1066 # Obsolete; use --with-x.
1067 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068
1069 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1070 | --x-incl | --x-inc | --x-in | --x-i)
1071 ac_prev=x_includes ;;
1072 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1073 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075
1076 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1077 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1078 ac_prev=x_libraries ;;
1079 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1080 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 -*) { echo "$as_me: error: unrecognized option: $ac_option
1084Try \`$0 --help' for more information." >&2
1085 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 ;;
1087
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 *=*)
1089 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1090 # Reject names that are not valid shell variable names.
1091 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1092 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1093 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001094 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 export $ac_envvar ;;
1096
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 # FIXME: should be removed in autoconf 3.0.
1099 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1100 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1101 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1102 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 ;;
1104
1105 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001106done
1107
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1110 { echo "$as_me: error: missing argument to $ac_option" >&2
1111 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112fi
1113
Thomas Wouters477c8d52006-05-27 19:21:47 +00001114# Be sure to have absolute directory names.
1115for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1116 datadir sysconfdir sharedstatedir localstatedir includedir \
1117 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1118 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119do
Thomas Wouters477c8d52006-05-27 19:21:47 +00001120 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 case $ac_val in
Thomas Wouters477c8d52006-05-27 19:21:47 +00001122 [\\/$]* | ?:[\\/]* ) continue;;
1123 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00001125 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1126 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001127done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001128
Martin v. Löwis11437992002-04-12 09:54:03 +00001129# There might be people who depend on the old broken behavior: `$host'
1130# used to hold the argument of --host etc.
1131# FIXME: To remove some day.
1132build=$build_alias
1133host=$host_alias
1134target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001135
Martin v. Löwis11437992002-04-12 09:54:03 +00001136# FIXME: To remove some day.
1137if test "x$host_alias" != x; then
1138 if test "x$build_alias" = x; then
1139 cross_compiling=maybe
1140 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1141 If a cross compiler is detected then cross compile mode will be used." >&2
1142 elif test "x$build_alias" != "x$host_alias"; then
1143 cross_compiling=yes
1144 fi
1145fi
1146
1147ac_tool_prefix=
1148test -n "$host_alias" && ac_tool_prefix=$host_alias-
1149
1150test "$silent" = yes && exec 6>/dev/null
1151
Guido van Rossum627b2d71993-12-24 10:39:16 +00001152
Thomas Wouters477c8d52006-05-27 19:21:47 +00001153ac_pwd=`pwd` && test -n "$ac_pwd" &&
1154ac_ls_di=`ls -di .` &&
1155ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1156 { echo "$as_me: error: Working directory cannot be determined" >&2
1157 { (exit 1); exit 1; }; }
1158test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1159 { echo "$as_me: error: pwd does not report name of working directory" >&2
1160 { (exit 1); exit 1; }; }
1161
1162
Guido van Rossum627b2d71993-12-24 10:39:16 +00001163# Find the source files, if location was not specified.
1164if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165 ac_srcdir_defaulted=yes
Thomas Wouters477c8d52006-05-27 19:21:47 +00001166 # Try the directory containing this script, then the parent directory.
1167 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001168$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001169 X"$0" : 'X\(//\)[^/]' \| \
1170 X"$0" : 'X\(//\)$' \| \
Thomas Wouters477c8d52006-05-27 19:21:47 +00001171 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001172echo X"$0" |
Thomas Wouters477c8d52006-05-27 19:21:47 +00001173 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1174 s//\1/
1175 q
1176 }
1177 /^X\(\/\/\)[^/].*/{
1178 s//\1/
1179 q
1180 }
1181 /^X\(\/\/\)$/{
1182 s//\1/
1183 q
1184 }
1185 /^X\(\/\).*/{
1186 s//\1/
1187 q
1188 }
1189 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 srcdir=$ac_confdir
Thomas Wouters477c8d52006-05-27 19:21:47 +00001191 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001192 srcdir=..
1193 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194else
1195 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001196fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001197if test ! -r "$srcdir/$ac_unique_file"; then
1198 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1199 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001201fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001202ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1203ac_abs_confdir=`(
1204 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00001205 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001206 pwd)`
1207# When building in place, set srcdir=.
1208if test "$ac_abs_confdir" = "$ac_pwd"; then
1209 srcdir=.
1210fi
1211# Remove unnecessary trailing slashes from srcdir.
1212# Double slashes in file names in object file debugging info
1213# mess up M-x gdb in Emacs.
1214case $srcdir in
1215*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1216esac
1217for ac_var in $ac_precious_vars; do
1218 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1219 eval ac_env_${ac_var}_value=\$${ac_var}
1220 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1221 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1222done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223
Martin v. Löwis11437992002-04-12 09:54:03 +00001224#
1225# Report the --help message.
1226#
1227if test "$ac_init_help" = "long"; then
1228 # Omit some internal or obsolete options to make the list less imposing.
1229 # This message is too long to be a string in the A/UX 3.1 sh.
1230 cat <<_ACEOF
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001231\`configure' configures python 3.0 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001232
1233Usage: $0 [OPTION]... [VAR=VALUE]...
1234
1235To assign environment variables (e.g., CC, CFLAGS...), specify them as
1236VAR=VALUE. See below for descriptions of some of the useful variables.
1237
1238Defaults for the options are specified in brackets.
1239
1240Configuration:
1241 -h, --help display this help and exit
1242 --help=short display options specific to this package
1243 --help=recursive display the short help of all the included packages
1244 -V, --version display version information and exit
1245 -q, --quiet, --silent do not print \`checking...' messages
1246 --cache-file=FILE cache test results in FILE [disabled]
1247 -C, --config-cache alias for \`--cache-file=config.cache'
1248 -n, --no-create do not create output files
1249 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1250
Martin v. Löwis11437992002-04-12 09:54:03 +00001251Installation directories:
1252 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001253 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001255 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001256
1257By default, \`make install' will install all the files in
1258\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1259an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1260for instance \`--prefix=\$HOME'.
1261
1262For better control, use the options below.
1263
1264Fine tuning of the installation directories:
1265 --bindir=DIR user executables [EPREFIX/bin]
1266 --sbindir=DIR system admin executables [EPREFIX/sbin]
1267 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1269 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1270 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1271 --libdir=DIR object code libraries [EPREFIX/lib]
1272 --includedir=DIR C header files [PREFIX/include]
1273 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Thomas Wouters477c8d52006-05-27 19:21:47 +00001274 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1275 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1276 --infodir=DIR info documentation [DATAROOTDIR/info]
1277 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1278 --mandir=DIR man documentation [DATAROOTDIR/man]
1279 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1280 --htmldir=DIR html documentation [DOCDIR]
1281 --dvidir=DIR dvi documentation [DOCDIR]
1282 --pdfdir=DIR pdf documentation [DOCDIR]
1283 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001284_ACEOF
1285
1286 cat <<\_ACEOF
1287_ACEOF
1288fi
1289
1290if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001291 case $ac_init_help in
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001292 short | recursive ) echo "Configuration of python 3.0:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001293 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001294 cat <<\_ACEOF
1295
1296Optional Features:
1297 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1298 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Thomas Wouters477c8d52006-05-27 19:21:47 +00001299 --enable-universalsdk[SDKDIR]
1300 Build agains Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001301 --enable-framework[=INSTALLDIR]
1302 Build (MacOSX|Darwin) framework
1303 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001304 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001305 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1306 --enable-ipv6 Enable ipv6 (with ipv4) support
1307 --disable-ipv6 Disable ipv6 support
1308 --enable-unicode[=ucs[24]]
1309 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001310
1311Optional Packages:
1312 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1313 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001314 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001315 --with-cxx-main=<compiler>
1316 compile main() and link python executable with C++
1317 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001318 --with-suffix=.exe set executable suffix
1319 --with-pydebug build with Py_DEBUG defined
1320 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001321 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --with-signal-module disable/enable signal module
1323 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1324 --with(out)-threads[=DIRECTORY]
1325 disable/enable thread support
1326 --with(out)-thread[=DIRECTORY]
1327 deprecated; use --with(out)-threads
1328 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001329 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001330 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001331 --with(out)-pymalloc disable/enable specialized mallocs
1332 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001333 --with-fpectl enable SIGFPE catching
1334 --with-libm=STRING math library
1335 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001336
1337Some influential environment variables:
1338 CC C compiler command
1339 CFLAGS C compiler flags
1340 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1341 nonstandard directory <lib dir>
Thomas Wouters477c8d52006-05-27 19:21:47 +00001342 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1343 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001344 CPP C preprocessor
1345
1346Use these variables to override the choices made by `configure' or to help
1347it to find libraries and programs with nonstandard names/locations.
1348
Martin v. Löwis1d459062005-03-14 21:23:33 +00001349Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001350_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00001351ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001352fi
1353
1354if test "$ac_init_help" = "recursive"; then
1355 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001356 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001357 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001358 ac_builddir=.
1359
Thomas Wouters477c8d52006-05-27 19:21:47 +00001360case "$ac_dir" in
1361.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1362*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001363 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters477c8d52006-05-27 19:21:47 +00001364 # A ".." for each directory in $ac_dir_suffix.
1365 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1366 case $ac_top_builddir_sub in
1367 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1368 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1369 esac ;;
1370esac
1371ac_abs_top_builddir=$ac_pwd
1372ac_abs_builddir=$ac_pwd$ac_dir_suffix
1373# for backward compatibility:
1374ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001375
1376case $srcdir in
Thomas Wouters477c8d52006-05-27 19:21:47 +00001377 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 ac_srcdir=.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001379 ac_top_srcdir=$ac_top_builddir_sub
1380 ac_abs_top_srcdir=$ac_pwd ;;
1381 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001383 ac_top_srcdir=$srcdir
1384 ac_abs_top_srcdir=$srcdir ;;
1385 *) # Relative name.
1386 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1387 ac_top_srcdir=$ac_top_build_prefix$srcdir
1388 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001389esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00001390ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001391
Thomas Wouters477c8d52006-05-27 19:21:47 +00001392 cd "$ac_dir" || { ac_status=$?; continue; }
1393 # Check for guested configure.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001394 if test -f "$ac_srcdir/configure.gnu"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00001395 echo &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001396 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1397 elif test -f "$ac_srcdir/configure"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00001398 echo &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001399 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001400 else
1401 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters477c8d52006-05-27 19:21:47 +00001402 fi || ac_status=$?
1403 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001404 done
1405fi
1406
Thomas Wouters477c8d52006-05-27 19:21:47 +00001407test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001408if $ac_init_version; then
1409 cat <<\_ACEOF
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001410python configure 3.0
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001411generated by GNU Autoconf 2.59e
Martin v. Löwis11437992002-04-12 09:54:03 +00001412
Thomas Wouters477c8d52006-05-27 19:21:47 +00001413Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14142002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001415This configure script is free software; the Free Software Foundation
1416gives unlimited permission to copy, distribute and modify it.
1417_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00001418 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001419fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001420cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001421This file contains any messages produced by compilers while
1422running configure, to aid debugging if configure makes a mistake.
1423
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001424It was created by python $as_me 3.0, which was
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001425generated by GNU Autoconf 2.59e. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427 $ $0 $@
1428
1429_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00001430exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001431{
1432cat <<_ASUNAME
1433## --------- ##
1434## Platform. ##
1435## --------- ##
1436
1437hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1438uname -m = `(uname -m) 2>/dev/null || echo unknown`
1439uname -r = `(uname -r) 2>/dev/null || echo unknown`
1440uname -s = `(uname -s) 2>/dev/null || echo unknown`
1441uname -v = `(uname -v) 2>/dev/null || echo unknown`
1442
1443/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1444/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1445
1446/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1447/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1448/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters477c8d52006-05-27 19:21:47 +00001449/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001450/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1451/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1452/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1453
1454_ASUNAME
1455
1456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1457for as_dir in $PATH
1458do
1459 IFS=$as_save_IFS
1460 test -z "$as_dir" && as_dir=.
1461 echo "PATH: $as_dir"
1462done
Thomas Wouters477c8d52006-05-27 19:21:47 +00001463IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001464
1465} >&5
1466
1467cat >&5 <<_ACEOF
1468
1469
1470## ----------- ##
1471## Core tests. ##
1472## ----------- ##
1473
1474_ACEOF
1475
1476
1477# Keep a trace of the command line.
1478# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001479# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001480# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001481# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001482ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001483ac_configure_args0=
1484ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001485ac_must_keep_next=false
1486for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001487do
Skip Montanaro6dead952003-09-25 14:50:04 +00001488 for ac_arg
1489 do
1490 case $ac_arg in
1491 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1492 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1493 | -silent | --silent | --silen | --sile | --sil)
1494 continue ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001495 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001496 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1497 esac
1498 case $ac_pass in
1499 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1500 2)
1501 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1502 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001503 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001504 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001505 case $ac_arg in
1506 *=* | --config-cache | -C | -disable-* | --disable-* \
1507 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1508 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1509 | -with-* | --with-* | -without-* | --without-* | --x)
1510 case "$ac_configure_args0 " in
1511 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1512 esac
1513 ;;
1514 -* ) ac_must_keep_next=true ;;
1515 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001516 fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001517 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001518 ;;
1519 esac
1520 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001521done
Skip Montanaro6dead952003-09-25 14:50:04 +00001522$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1523$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001524
1525# When interrupted or exit'd, cleanup temporary files, and complete
1526# config.log. We remove comments because anyway the quotes in there
1527# would cause problems or look ugly.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001528# WARNING: Use '\'' to represent an apostrophe within the trap.
1529# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001530trap 'exit_status=$?
1531 # Save into config.log some information that might help in debugging.
1532 {
1533 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001534
Martin v. Löwis11437992002-04-12 09:54:03 +00001535 cat <<\_ASBOX
1536## ---------------- ##
1537## Cache variables. ##
1538## ---------------- ##
1539_ASBOX
1540 echo
1541 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters477c8d52006-05-27 19:21:47 +00001542(
1543 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1544 eval ac_val=\$$ac_var
1545 case $ac_val in #(
1546 *${as_nl}*)
1547 case $ac_var in #(
1548 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1549echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1550 esac
1551 case $ac_var in #(
1552 _ | IFS | as_nl) ;; #(
1553 *) $as_unset $ac_var ;;
1554 esac ;;
1555 esac
1556 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001557 (set) 2>&1 |
Thomas Wouters477c8d52006-05-27 19:21:47 +00001558 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1559 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 sed -n \
Thomas Wouters477c8d52006-05-27 19:21:47 +00001561 "s/'\''/'\''\\\\'\'''\''/g;
1562 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1563 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +00001564 *)
Thomas Wouters477c8d52006-05-27 19:21:47 +00001565 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001567 esac |
1568 sort
1569)
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001571
1572 cat <<\_ASBOX
1573## ----------------- ##
1574## Output variables. ##
1575## ----------------- ##
1576_ASBOX
1577 echo
1578 for ac_var in $ac_subst_vars
1579 do
Thomas Wouters477c8d52006-05-27 19:21:47 +00001580 eval ac_val=\$$ac_var
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001581 case $ac_val in
1582 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1583 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00001584 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001585 done | sort
1586 echo
1587
1588 if test -n "$ac_subst_files"; then
1589 cat <<\_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +00001590## ------------------- ##
1591## File substitutions. ##
1592## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001593_ASBOX
1594 echo
1595 for ac_var in $ac_subst_files
1596 do
Thomas Wouters477c8d52006-05-27 19:21:47 +00001597 eval ac_val=\$$ac_var
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001598 case $ac_val in
1599 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1600 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00001601 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001602 done | sort
1603 echo
1604 fi
1605
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 if test -s confdefs.h; then
1607 cat <<\_ASBOX
1608## ----------- ##
1609## confdefs.h. ##
1610## ----------- ##
1611_ASBOX
1612 echo
Thomas Wouters477c8d52006-05-27 19:21:47 +00001613 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 echo
1615 fi
1616 test "$ac_signal" != 0 &&
1617 echo "$as_me: caught signal $ac_signal"
1618 echo "$as_me: exit $exit_status"
1619 } >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00001620 rm -f core *.core core.conftest.* &&
1621 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001622 exit $exit_status
Thomas Wouters477c8d52006-05-27 19:21:47 +00001623' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001624for ac_signal in 1 2 13 15; do
1625 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1626done
1627ac_signal=0
1628
1629# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001630rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001631
1632# Predefined preprocessor variables.
1633
1634cat >>confdefs.h <<_ACEOF
1635#define PACKAGE_NAME "$PACKAGE_NAME"
1636_ACEOF
1637
1638
1639cat >>confdefs.h <<_ACEOF
1640#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1641_ACEOF
1642
1643
1644cat >>confdefs.h <<_ACEOF
1645#define PACKAGE_VERSION "$PACKAGE_VERSION"
1646_ACEOF
1647
1648
1649cat >>confdefs.h <<_ACEOF
1650#define PACKAGE_STRING "$PACKAGE_STRING"
1651_ACEOF
1652
1653
1654cat >>confdefs.h <<_ACEOF
1655#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1656_ACEOF
1657
1658
1659# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001660# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001661if test -n "$CONFIG_SITE"; then
1662 set x "$CONFIG_SITE"
1663elif test "x$prefix" != xNONE; then
1664 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1665else
1666 set x "$ac_default_prefix/share/config.site" \
1667 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001668fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001669shift
1670for ac_site_file
1671do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001672 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001673 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1674echo "$as_me: loading site script $ac_site_file" >&6;}
1675 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001676 . "$ac_site_file"
1677 fi
1678done
1679
1680if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001681 # Some versions of bash will fail to source /dev/null (special
1682 # files actually), so we avoid doing that.
1683 if test -f "$cache_file"; then
1684 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1685echo "$as_me: loading cache $cache_file" >&6;}
1686 case $cache_file in
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001687 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1688 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001689 esac
1690 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001691else
Martin v. Löwis11437992002-04-12 09:54:03 +00001692 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1693echo "$as_me: creating cache $cache_file" >&6;}
1694 >$cache_file
1695fi
1696
1697# Check that the precious variables saved in the cache have kept the same
1698# value.
1699ac_cache_corrupted=false
Thomas Wouters477c8d52006-05-27 19:21:47 +00001700for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001701 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1702 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters477c8d52006-05-27 19:21:47 +00001703 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1704 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001705 case $ac_old_set,$ac_new_set in
1706 set,)
1707 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1708echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1709 ac_cache_corrupted=: ;;
1710 ,set)
1711 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1712echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1713 ac_cache_corrupted=: ;;
1714 ,);;
1715 *)
1716 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001717 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001718echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001719 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001720echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001721 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001722echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001723 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001724 fi;;
1725 esac
1726 # Pass precious variables to config.status.
1727 if test "$ac_new_set" = set; then
1728 case $ac_new_val in
Thomas Wouters477c8d52006-05-27 19:21:47 +00001729 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 *) ac_arg=$ac_var=$ac_new_val ;;
1731 esac
1732 case " $ac_configure_args " in
1733 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1734 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1735 esac
1736 fi
1737done
1738if $ac_cache_corrupted; then
1739 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1740echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1741 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1742echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1743 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001744fi
1745
Thomas Wouters477c8d52006-05-27 19:21:47 +00001746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
Guido van Rossum7f43da71994-08-01 12:15:30 +00001770ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001771ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001772ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1773ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1774ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001775
Guido van Rossum627b2d71993-12-24 10:39:16 +00001776
Michael W. Hudson54241132001-12-07 15:38:26 +00001777
Thomas Wouters477c8d52006-05-27 19:21:47 +00001778ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001779
1780
Martin v. Löwis11437992002-04-12 09:54:03 +00001781
1782
1783
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001784
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001785
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001786# We don't use PACKAGE_ variables, and they cause conflicts
1787# with other autoconf-based packages that include Python.h
1788grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1789rm confdefs.h
1790mv confdefs.h.new confdefs.h
1791
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001792
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001793VERSION=3.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001794
Martin v. Löwis1142de32002-03-29 16:28:31 +00001795
1796SOVERSION=1.0
1797
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001798# The later defininition of _XOPEN_SOURCE disables certain features
1799# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1800
1801cat >>confdefs.h <<\_ACEOF
1802#define _GNU_SOURCE 1
1803_ACEOF
1804
1805
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001806# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1807# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1808# them.
1809
1810cat >>confdefs.h <<\_ACEOF
1811#define _NETBSD_SOURCE 1
1812_ACEOF
1813
1814
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001815# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1816# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1817# them.
1818
1819cat >>confdefs.h <<\_ACEOF
1820#define __BSD_VISIBLE 1
1821_ACEOF
1822
1823
Martin v. Löwisd6320502004-08-12 13:45:08 +00001824# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1825# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1826
1827cat >>confdefs.h <<\_ACEOF
1828#define _BSD_TYPES 1
1829_ACEOF
1830
1831
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001832define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001833
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001834# Arguments passed to configure.
1835
1836CONFIG_ARGS="$ac_configure_args"
1837
Thomas Wouters477c8d52006-05-27 19:21:47 +00001838# Check whether --enable-universalsdk was given.
1839if test "${enable_universalsdk+set}" = set; then
1840 enableval=$enable_universalsdk;
1841 case $enableval in
1842 yes)
1843 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1844 ;;
1845 esac
1846 case $enableval in
1847 no)
1848 UNIVERSALSDK=
1849 enable_universalsdk=
1850 ;;
1851 *)
1852 UNIVERSALSDK=$enableval
1853 ;;
1854 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001855
Thomas Wouters477c8d52006-05-27 19:21:47 +00001856else
1857
1858 UNIVERSALSDK=
1859 enable_universalsdk=
1860
1861fi
1862
1863
1864
1865# Check whether --enable-framework was given.
1866if test "${enable_framework+set}" = set; then
1867 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001868 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001869 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001870 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001871 esac
1872 case $enableval in
1873 no)
1874 PYTHONFRAMEWORK=
1875 PYTHONFRAMEWORKDIR=no-framework
1876 PYTHONFRAMEWORKPREFIX=
1877 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001878 FRAMEWORKINSTALLFIRST=
1879 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001880 FRAMEWORKALTINSTALLFIRST=
1881 FRAMEWORKALTINSTALLLAST=
1882 if test "x${prefix}" = "xNONE"; then
1883 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1884 else
1885 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1886 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001887 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001888 ;;
1889 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001890 PYTHONFRAMEWORK=Python
1891 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001892 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001893 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001894 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1895 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001896 FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall"
1897 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1898 if test "x${prefix}" = "xNONE" ; then
1899 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1900 else
1901 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1902 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001903 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001904
1905 # Add makefiles for Mac specific code to the list of output
1906 # files:
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001907 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001908
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001909 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001910
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001911 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001912
Jack Jansene578a632001-08-15 01:27:14 +00001913 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001914
Guido van Rossum563e7081996-09-10 18:20:48 +00001915else
Martin v. Löwis11437992002-04-12 09:54:03 +00001916
Jack Jansene578a632001-08-15 01:27:14 +00001917 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001918 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001919 PYTHONFRAMEWORKPREFIX=
1920 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001921 FRAMEWORKINSTALLFIRST=
1922 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001923 FRAMEWORKALTINSTALLFIRST=
1924 FRAMEWORKALTINSTALLLAST=
1925 if test "x${prefix}" = "xNONE" ; then
1926 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1927 else
1928 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1929 fi
Jack Jansene578a632001-08-15 01:27:14 +00001930 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001931
Thomas Wouters477c8d52006-05-27 19:21:47 +00001932fi
1933
1934
1935
Michael W. Hudson54241132001-12-07 15:38:26 +00001936
1937
1938
1939
Jack Jansene578a632001-08-15 01:27:14 +00001940
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001941
1942
1943
Jack Jansene578a632001-08-15 01:27:14 +00001944##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001945## AC_HELP_STRING(--with-dyld,
1946## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001947##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001948# Set name for machine-dependent library files
1949
Thomas Wouters477c8d52006-05-27 19:21:47 +00001950{ echo "$as_me:$LINENO: checking MACHDEP" >&5
1951echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001952if test -z "$MACHDEP"
1953then
Guido van Rossum563e7081996-09-10 18:20:48 +00001954 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001955 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1956 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001957 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001958 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001959 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001960 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001961 ac_md_system=`echo $ac_sys_system |
1962 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1963 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001964 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001965 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001966
Guido van Rossum07397971997-04-29 21:49:50 +00001967 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001968 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001969 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001970 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001971 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001972 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001973 esac
1974fi
Guido van Rossum91922671997-10-09 20:24:13 +00001975
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001976# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1977# disable features if it is defined, without any means to access these
1978# features as extensions. For these systems, we skip the definition of
1979# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1980# some feature, make sure there is no alternative way to access this
1981# feature. Also, when using wildcards, make sure you have verified the
1982# need for not defining _XOPEN_SOURCE on all systems matching the
1983# wildcard, and that the wildcard does not include future systems
1984# (which may remove their limitations).
1985case $ac_sys_system/$ac_sys_release in
1986 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1987 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001988 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00001989 OpenBSD/2.* | OpenBSD/3.[0123456789])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001990 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001991 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1992 # of union __?sigval. Reported by Stuart Bishop.
1993 SunOS/5.6)
1994 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001995 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1996 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00001997 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001998 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001999 define_xopen_source=no;;
2000 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002001 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002002 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002003 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002004 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2005 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2006 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2007 # This should hopefully be fixed in FreeBSD 4.9
2008 FreeBSD/4.8* | Darwin/6* )
2009 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002010 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2011 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2012 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002013 AIX/4)
2014 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002015 AIX/5)
2016 if test `uname -r` -eq 1; then
2017 define_xopen_source=no
2018 fi
2019 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002020 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2021 # disables platform specific features beyond repair.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002022 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2023 # has no effect, don't bother defineing them
2024 Darwin/[78].*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002025 define_xopen_source=no
2026 ;;
2027
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002028esac
2029
2030if test $define_xopen_source = yes
2031then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002032 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2033 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002034 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2035 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002036 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002037 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002038
2039cat >>confdefs.h <<\_ACEOF
2040#define _XOPEN_SOURCE 500
2041_ACEOF
2042
2043 ;;
2044 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002045
2046cat >>confdefs.h <<\_ACEOF
2047#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002048_ACEOF
2049
Skip Montanarof0d5f792004-08-15 14:08:23 +00002050 ;;
2051 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002052
2053 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2054 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2055 # several APIs are not declared. Since this is also needed in some
2056 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002057 # except for Solaris 10, where it must not be defined,
2058 # as it implies XPG4.2
2059 case $ac_sys_system/$ac_sys_release in
2060 SunOS/5.10)
2061 ;;
2062 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002063
2064cat >>confdefs.h <<\_ACEOF
2065#define _XOPEN_SOURCE_EXTENDED 1
2066_ACEOF
2067
Martin v. Löwis7dece662005-11-26 11:38:24 +00002068 ;;
2069 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002070
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002071
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002072cat >>confdefs.h <<\_ACEOF
2073#define _POSIX_C_SOURCE 200112L
2074_ACEOF
2075
2076
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002077fi
2078
Guido van Rossum91922671997-10-09 20:24:13 +00002079#
2080# SGI compilers allow the specification of the both the ABI and the
2081# ISA on the command line. Depending on the values of these switches,
2082# different and often incompatable code will be generated.
2083#
2084# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2085# thus supply support for various ABI/ISA combinations. The MACHDEP
2086# variable is also adjusted.
2087#
2088
2089if test ! -z "$SGI_ABI"
2090then
2091 CC="cc $SGI_ABI"
2092 LDFLAGS="$SGI_ABI $LDFLAGS"
2093 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2094fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002095{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2096echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002097
Jack Jansen83f898c2002-12-30 22:23:40 +00002098# And add extra plat-mac for darwin
2099
Jack Jansen7b59b422003-03-17 15:44:10 +00002100
Thomas Wouters477c8d52006-05-27 19:21:47 +00002101{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2102echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002103if test -z "$EXTRAPLATDIR"
2104then
2105 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002106 darwin)
2107 EXTRAPLATDIR="\$(PLATMACDIRS)"
2108 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2109 ;;
2110 *)
2111 EXTRAPLATDIR=""
2112 EXTRAMACHDEPPATH=""
2113 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002114 esac
2115fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002116{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2117echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002118
Jack Jansen6b08a402004-06-03 12:41:45 +00002119# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2120# it may influence the way we can build extensions, so distutils
2121# needs to check it
2122
Thomas Wouters477c8d52006-05-27 19:21:47 +00002123
Jack Jansen6b08a402004-06-03 12:41:45 +00002124CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002125EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002126
Guido van Rossum627b2d71993-12-24 10:39:16 +00002127# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002128
2129# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2130# for debug/optimization stuff. BASECFLAGS is for flags that are required
2131# just to get things to compile and link. Users are free to override OPT
2132# when running configure or make. The build should not break if they do.
2133# BASECFLAGS should generally not be messed with, however.
2134
2135# XXX shouldn't some/most/all of this code be merged with the stuff later
2136# on that fiddles with OPT and BASECFLAGS?
Thomas Wouters477c8d52006-05-27 19:21:47 +00002137{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2138echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002139
Thomas Wouters477c8d52006-05-27 19:21:47 +00002140# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002141if test "${with_gcc+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002142 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002143 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002144 no) CC=cc
2145 without_gcc=yes;;
2146 yes) CC=gcc
2147 without_gcc=no;;
2148 *) CC=$withval
2149 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002150 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002151else
Martin v. Löwis11437992002-04-12 09:54:03 +00002152
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002153 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002154 AIX*) CC=cc_r
2155 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002156 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002157 case $BE_HOST_CPU in
2158 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002159 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002160 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002161 BASECFLAGS="$BASECFLAGS -export pragma"
2162 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002163 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002164 ;;
2165 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002166 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002167 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002168 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002169 ;;
2170 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002171 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2172echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2173 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002174 ;;
2175 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002176 AR="\$(srcdir)/Modules/ar_beos"
2177 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002178 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002179 Monterey*)
2180 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002181 without_gcc=;;
2182 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002183 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00002184fi
2185
2186{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2187echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002188
Guido van Rossum8b131c51995-03-09 14:10:13 +00002189# If the user switches compilers, we can't believe the cache
2190if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2191then
Martin v. Löwis11437992002-04-12 09:54:03 +00002192 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2193(it is also a good idea to do 'make clean' before compiling)" >&5
2194echo "$as_me: error: cached CC is different -- throw away $cache_file
2195(it is also a good idea to do 'make clean' before compiling)" >&2;}
2196 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002197fi
2198
Martin v. Löwis11437992002-04-12 09:54:03 +00002199ac_ext=c
2200ac_cpp='$CPP $CPPFLAGS'
2201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2203ac_compiler_gnu=$ac_cv_c_compiler_gnu
2204if test -n "$ac_tool_prefix"; then
2205 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2206set dummy ${ac_tool_prefix}gcc; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002207{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2208echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002209if test "${ac_cv_prog_CC+set}" = set; then
2210 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002211else
2212 if test -n "$CC"; then
2213 ac_cv_prog_CC="$CC" # Let the user override the test.
2214else
Martin v. Löwis11437992002-04-12 09:54:03 +00002215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2216for as_dir in $PATH
2217do
2218 IFS=$as_save_IFS
2219 test -z "$as_dir" && as_dir=.
2220 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002221 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002222 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2223 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2224 break 2
2225 fi
2226done
2227done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002228IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002229
Jack Jansendd19cf82001-12-06 22:36:17 +00002230fi
2231fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002232CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002233if test -n "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002234 { echo "$as_me:$LINENO: result: $CC" >&5
2235echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002236else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002237 { echo "$as_me:$LINENO: result: no" >&5
2238echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002239fi
2240
Thomas Wouters477c8d52006-05-27 19:21:47 +00002241
Martin v. Löwis11437992002-04-12 09:54:03 +00002242fi
2243if test -z "$ac_cv_prog_CC"; then
2244 ac_ct_CC=$CC
2245 # Extract the first word of "gcc", so it can be a program name with args.
2246set dummy gcc; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002247{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2248echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002249if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2250 echo $ECHO_N "(cached) $ECHO_C" >&6
2251else
2252 if test -n "$ac_ct_CC"; then
2253 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2254else
2255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2256for as_dir in $PATH
2257do
2258 IFS=$as_save_IFS
2259 test -z "$as_dir" && as_dir=.
2260 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002261 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002262 ac_cv_prog_ac_ct_CC="gcc"
2263 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2264 break 2
2265 fi
2266done
2267done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002268IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002269
2270fi
2271fi
2272ac_ct_CC=$ac_cv_prog_ac_ct_CC
2273if test -n "$ac_ct_CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002274 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2275echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002276else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002277 { echo "$as_me:$LINENO: result: no" >&5
2278echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002279fi
2280
Thomas Wouters477c8d52006-05-27 19:21:47 +00002281 if test "x$ac_ct_CC" = x; then
2282 CC=""
2283 else
2284 case $cross_compiling:$ac_tool_warned in
2285yes:)
2286{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2287whose name does not start with the host triplet. If you think this
2288configuration is useful to you, please write to autoconf@gnu.org." >&5
2289echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2290whose name does not start with the host triplet. If you think this
2291configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2292ac_tool_warned=yes ;;
2293esac
2294 CC=$ac_ct_CC
2295 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002296else
2297 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002298fi
2299
Jack Jansendd19cf82001-12-06 22:36:17 +00002300if test -z "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002301 if test -n "$ac_tool_prefix"; then
2302 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002303set dummy ${ac_tool_prefix}cc; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002304{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2305echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002306if test "${ac_cv_prog_CC+set}" = set; then
2307 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002308else
2309 if test -n "$CC"; then
2310 ac_cv_prog_CC="$CC" # Let the user override the test.
2311else
Martin v. Löwis11437992002-04-12 09:54:03 +00002312as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2313for as_dir in $PATH
2314do
2315 IFS=$as_save_IFS
2316 test -z "$as_dir" && as_dir=.
2317 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002318 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002319 ac_cv_prog_CC="${ac_tool_prefix}cc"
2320 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2321 break 2
2322 fi
2323done
2324done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002325IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002326
2327fi
2328fi
2329CC=$ac_cv_prog_CC
2330if test -n "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002331 { echo "$as_me:$LINENO: result: $CC" >&5
2332echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002333else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002334 { echo "$as_me:$LINENO: result: no" >&5
2335echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002336fi
2337
Thomas Wouters477c8d52006-05-27 19:21:47 +00002338
Martin v. Löwis11437992002-04-12 09:54:03 +00002339 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002340fi
2341if test -z "$CC"; then
2342 # Extract the first word of "cc", so it can be a program name with args.
2343set dummy cc; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002344{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2345echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002346if test "${ac_cv_prog_CC+set}" = set; then
2347 echo $ECHO_N "(cached) $ECHO_C" >&6
2348else
2349 if test -n "$CC"; then
2350 ac_cv_prog_CC="$CC" # Let the user override the test.
2351else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002352 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2354for as_dir in $PATH
2355do
2356 IFS=$as_save_IFS
2357 test -z "$as_dir" && as_dir=.
2358 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002359 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002360 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2361 ac_prog_rejected=yes
2362 continue
2363 fi
2364 ac_cv_prog_CC="cc"
2365 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2366 break 2
2367 fi
2368done
2369done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002370IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002371
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002372if test $ac_prog_rejected = yes; then
2373 # We found a bogon in the path, so make sure we never use it.
2374 set dummy $ac_cv_prog_CC
2375 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002376 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002377 # We chose a different compiler from the bogus one.
2378 # However, it has the same basename, so the bogon will be chosen
2379 # first if we set CC to just the basename; use the full file name.
2380 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002381 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002382 fi
2383fi
2384fi
2385fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002386CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002387if test -n "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002388 { echo "$as_me:$LINENO: result: $CC" >&5
2389echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002390else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002391 { echo "$as_me:$LINENO: result: no" >&5
2392echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002393fi
2394
Thomas Wouters477c8d52006-05-27 19:21:47 +00002395
Martin v. Löwis11437992002-04-12 09:54:03 +00002396fi
2397if test -z "$CC"; then
2398 if test -n "$ac_tool_prefix"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002399 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002400 do
2401 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2402set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002403{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2404echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002405if test "${ac_cv_prog_CC+set}" = set; then
2406 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002407else
2408 if test -n "$CC"; then
2409 ac_cv_prog_CC="$CC" # Let the user override the test.
2410else
Martin v. Löwis11437992002-04-12 09:54:03 +00002411as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2412for as_dir in $PATH
2413do
2414 IFS=$as_save_IFS
2415 test -z "$as_dir" && as_dir=.
2416 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002417 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002418 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2419 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2420 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002421 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002422done
2423done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002424IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002425
2426fi
2427fi
2428CC=$ac_cv_prog_CC
2429if test -n "$CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002430 { echo "$as_me:$LINENO: result: $CC" >&5
2431echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002432else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002433 { echo "$as_me:$LINENO: result: no" >&5
2434echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002435fi
2436
Thomas Wouters477c8d52006-05-27 19:21:47 +00002437
Martin v. Löwis11437992002-04-12 09:54:03 +00002438 test -n "$CC" && break
2439 done
2440fi
2441if test -z "$CC"; then
2442 ac_ct_CC=$CC
Thomas Wouters477c8d52006-05-27 19:21:47 +00002443 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002444do
2445 # Extract the first word of "$ac_prog", so it can be a program name with args.
2446set dummy $ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00002447{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2448echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002449if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2450 echo $ECHO_N "(cached) $ECHO_C" >&6
2451else
2452 if test -n "$ac_ct_CC"; then
2453 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2454else
2455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2456for as_dir in $PATH
2457do
2458 IFS=$as_save_IFS
2459 test -z "$as_dir" && as_dir=.
2460 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00002461 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002462 ac_cv_prog_ac_ct_CC="$ac_prog"
2463 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2464 break 2
2465 fi
2466done
2467done
Thomas Wouters477c8d52006-05-27 19:21:47 +00002468IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002469
Martin v. Löwis11437992002-04-12 09:54:03 +00002470fi
2471fi
2472ac_ct_CC=$ac_cv_prog_ac_ct_CC
2473if test -n "$ac_ct_CC"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002474 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2475echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002476else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002477 { echo "$as_me:$LINENO: result: no" >&5
2478echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002479fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002480
Thomas Wouters477c8d52006-05-27 19:21:47 +00002481
Martin v. Löwis11437992002-04-12 09:54:03 +00002482 test -n "$ac_ct_CC" && break
2483done
Michael W. Hudson54241132001-12-07 15:38:26 +00002484
Thomas Wouters477c8d52006-05-27 19:21:47 +00002485 if test "x$ac_ct_CC" = x; then
2486 CC=""
2487 else
2488 case $cross_compiling:$ac_tool_warned in
2489yes:)
2490{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2491whose name does not start with the host triplet. If you think this
2492configuration is useful to you, please write to autoconf@gnu.org." >&5
2493echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2494whose name does not start with the host triplet. If you think this
2495configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2496ac_tool_warned=yes ;;
2497esac
2498 CC=$ac_ct_CC
2499 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002500fi
2501
2502fi
2503
2504
Skip Montanaro6dead952003-09-25 14:50:04 +00002505test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2506See \`config.log' for more details." >&5
2507echo "$as_me: error: no acceptable C compiler found in \$PATH
2508See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 { (exit 1); exit 1; }; }
2510
2511# Provide some information about the compiler.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002512echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002513ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002514{ (ac_try="$ac_compiler --version >&5"
2515case "(($ac_try" in
2516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2517 *) ac_try_echo=$ac_try;;
2518esac
2519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2520 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 ac_status=$?
2522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2523 (exit $ac_status); }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002524{ (ac_try="$ac_compiler -v >&5"
2525case "(($ac_try" in
2526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2527 *) ac_try_echo=$ac_try;;
2528esac
2529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2530 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 ac_status=$?
2532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2533 (exit $ac_status); }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002534{ (ac_try="$ac_compiler -V >&5"
2535case "(($ac_try" in
2536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2537 *) ac_try_echo=$ac_try;;
2538esac
2539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2540 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 ac_status=$?
2542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2543 (exit $ac_status); }
2544
2545cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002546/* confdefs.h. */
2547_ACEOF
2548cat confdefs.h >>conftest.$ac_ext
2549cat >>conftest.$ac_ext <<_ACEOF
2550/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552int
2553main ()
2554{
2555
2556 ;
2557 return 0;
2558}
2559_ACEOF
2560ac_clean_files_save=$ac_clean_files
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002561ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002562# Try to create an executable without -o first, disregard a.out.
2563# It will help us diagnose broken compilers, and finding out an intuition
2564# of exeext.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002565{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2566echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002567ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002568#
2569# List of possible output files, starting from the most likely.
2570# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2571# only as a last resort. b.out is created by i960 compilers.
2572ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2573#
2574# The IRIX 6 linker writes into existing files which may not be
2575# executable, retaining their permissions. Remove them first so a
2576# subsequent execution test works.
2577ac_rmfiles=
2578for ac_file in $ac_files
2579do
2580 case $ac_file in
2581 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2582 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2583 esac
2584done
2585rm -f $ac_rmfiles
Thomas Wouters477c8d52006-05-27 19:21:47 +00002586
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002587if { (ac_try="$ac_link_default"
2588case "(($ac_try" in
2589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2590 *) ac_try_echo=$ac_try;;
2591esac
2592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2593 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 ac_status=$?
2595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2596 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002597 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2598# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2599# in a Makefile. We should not override ac_cv_exeext if it was cached,
2600# so that the user can short-circuit this test for compilers unknown to
2601# Autoconf.
2602for ac_file in $ac_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002603do
2604 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 case $ac_file in
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002606 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2607 ;;
2608 [ab].out )
2609 # We found the default executable, but exeext='' is most
2610 # certainly right.
2611 break;;
2612 *.* )
2613 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2614 then :; else
2615 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2616 fi
2617 # We set ac_cv_exeext here because the later test for it is not
2618 # safe: cross compilers may not add the suffix if given an `-o'
2619 # argument, so we may need to know it at that point already.
2620 # Even if this section looks crufty: it has the advantage of
2621 # actually working.
2622 break;;
2623 * )
2624 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 esac
2626done
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002627test "$ac_cv_exeext" = no && ac_cv_exeext=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002628
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002629else
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002631sed 's/^/| /' conftest.$ac_ext >&5
2632
2633{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2634See \`config.log' for more details." >&5
2635echo "$as_me: error: C compiler cannot create executables
2636See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002638fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002639
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002640ac_exeext=$ac_cv_exeext
Thomas Wouters477c8d52006-05-27 19:21:47 +00002641{ echo "$as_me:$LINENO: result: $ac_file" >&5
2642echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002643
Thomas Wouters477c8d52006-05-27 19:21:47 +00002644# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002645# the compiler is broken, or we cross compile.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002646{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2647echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002648# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2649# If not cross compiling, check that we can run a simple program.
2650if test "$cross_compiling" != yes; then
2651 if { ac_try='./$ac_file'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002652 { (case "(($ac_try" in
2653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2654 *) ac_try_echo=$ac_try;;
2655esac
2656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2657 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 ac_status=$?
2659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2660 (exit $ac_status); }; }; then
2661 cross_compiling=no
2662 else
2663 if test "$cross_compiling" = maybe; then
2664 cross_compiling=yes
2665 else
2666 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002667If you meant to cross compile, use \`--host'.
2668See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002669echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002670If you meant to cross compile, use \`--host'.
2671See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 { (exit 1); exit 1; }; }
2673 fi
2674 fi
2675fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002676{ echo "$as_me:$LINENO: result: yes" >&5
2677echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002678
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002679rm -f a.out a.exe conftest$ac_cv_exeext b.out
2680ac_clean_files=$ac_clean_files_save
2681# Check that the compiler produces executables we can run. If not, either
2682# the compiler is broken, or we cross compile.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002683{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2684echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2685{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2686echo "${ECHO_T}$cross_compiling" >&6; }
2687
2688{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2689echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002690if { (ac_try="$ac_link"
2691case "(($ac_try" in
2692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2693 *) ac_try_echo=$ac_try;;
2694esac
2695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2696 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002697 ac_status=$?
2698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2699 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002700 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2701# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2702# work properly (i.e., refer to `conftest.exe'), while it won't with
2703# `rm'.
2704for ac_file in conftest.exe conftest conftest.*; do
2705 test -f "$ac_file" || continue
2706 case $ac_file in
2707 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2708 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2709 break;;
2710 * ) break;;
2711 esac
2712done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002713else
Skip Montanaro6dead952003-09-25 14:50:04 +00002714 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2715See \`config.log' for more details." >&5
2716echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2717See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002719fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002720
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002721rm -f conftest$ac_cv_exeext
Thomas Wouters477c8d52006-05-27 19:21:47 +00002722{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2723echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002724
2725rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002726EXEEXT=$ac_cv_exeext
2727ac_exeext=$EXEEXT
Thomas Wouters477c8d52006-05-27 19:21:47 +00002728{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2729echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002730if test "${ac_cv_objext+set}" = set; then
2731 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002732else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002733 cat >conftest.$ac_ext <<_ACEOF
2734/* confdefs.h. */
2735_ACEOF
2736cat confdefs.h >>conftest.$ac_ext
2737cat >>conftest.$ac_ext <<_ACEOF
2738/* end confdefs.h. */
2739
2740int
2741main ()
2742{
2743
2744 ;
2745 return 0;
2746}
2747_ACEOF
2748rm -f conftest.o conftest.obj
2749if { (ac_try="$ac_compile"
2750case "(($ac_try" in
2751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2752 *) ac_try_echo=$ac_try;;
2753esac
2754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2755 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002756 ac_status=$?
2757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2758 (exit $ac_status); }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00002759 for ac_file in conftest.o conftest.obj conftest.*; do
2760 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 case $ac_file in
Thomas Wouters477c8d52006-05-27 19:21:47 +00002762 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002763 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2764 break;;
2765 esac
2766done
2767else
2768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002769sed 's/^/| /' conftest.$ac_ext >&5
2770
2771{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2772See \`config.log' for more details." >&5
2773echo "$as_me: error: cannot compute suffix of object files: cannot compile
2774See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002775 { (exit 1); exit 1; }; }
2776fi
2777
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002778rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002779fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002780{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2781echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002782OBJEXT=$ac_cv_objext
2783ac_objext=$OBJEXT
Thomas Wouters477c8d52006-05-27 19:21:47 +00002784{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2785echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002786if test "${ac_cv_c_compiler_gnu+set}" = set; then
2787 echo $ECHO_N "(cached) $ECHO_C" >&6
2788else
2789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002790/* confdefs.h. */
2791_ACEOF
2792cat confdefs.h >>conftest.$ac_ext
2793cat >>conftest.$ac_ext <<_ACEOF
2794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002795
Martin v. Löwis11437992002-04-12 09:54:03 +00002796int
2797main ()
2798{
2799#ifndef __GNUC__
2800 choke me
2801#endif
2802
2803 ;
2804 return 0;
2805}
2806_ACEOF
2807rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002808if { (ac_try="$ac_compile"
2809case "(($ac_try" in
2810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2811 *) ac_try_echo=$ac_try;;
2812esac
2813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2814 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002816 grep -v '^ *+' conftest.er1 >conftest.err
2817 rm -f conftest.er1
2818 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2820 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002821 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2822 { (case "(($ac_try" in
2823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2824 *) ac_try_echo=$ac_try;;
2825esac
2826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2827 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002828 ac_status=$?
2829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2830 (exit $ac_status); }; } &&
2831 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002832 { (case "(($ac_try" in
2833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2834 *) ac_try_echo=$ac_try;;
2835esac
2836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2837 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002838 ac_status=$?
2839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2840 (exit $ac_status); }; }; then
2841 ac_compiler_gnu=yes
2842else
2843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002844sed 's/^/| /' conftest.$ac_ext >&5
2845
Thomas Wouters477c8d52006-05-27 19:21:47 +00002846 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002847fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002848
Skip Montanarof0d5f792004-08-15 14:08:23 +00002849rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002850ac_cv_c_compiler_gnu=$ac_compiler_gnu
2851
2852fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002853{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2854echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002855GCC=`test $ac_compiler_gnu = yes && echo yes`
2856ac_test_CFLAGS=${CFLAGS+set}
2857ac_save_CFLAGS=$CFLAGS
Thomas Wouters477c8d52006-05-27 19:21:47 +00002858{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2859echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002860if test "${ac_cv_prog_cc_g+set}" = set; then
2861 echo $ECHO_N "(cached) $ECHO_C" >&6
2862else
Thomas Wouters477c8d52006-05-27 19:21:47 +00002863 ac_save_c_werror_flag=$ac_c_werror_flag
2864 ac_c_werror_flag=yes
2865 ac_cv_prog_cc_g=no
2866 CFLAGS="-g"
2867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002868/* confdefs.h. */
2869_ACEOF
2870cat confdefs.h >>conftest.$ac_ext
2871cat >>conftest.$ac_ext <<_ACEOF
2872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002873
Martin v. Löwis11437992002-04-12 09:54:03 +00002874int
2875main ()
2876{
2877
2878 ;
2879 return 0;
2880}
2881_ACEOF
2882rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002883if { (ac_try="$ac_compile"
2884case "(($ac_try" in
2885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2886 *) ac_try_echo=$ac_try;;
2887esac
2888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002891 grep -v '^ *+' conftest.er1 >conftest.err
2892 rm -f conftest.er1
2893 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2895 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002896 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2897 { (case "(($ac_try" in
2898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2899 *) ac_try_echo=$ac_try;;
2900esac
2901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2902 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002903 ac_status=$?
2904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2905 (exit $ac_status); }; } &&
2906 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002907 { (case "(($ac_try" in
2908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2909 *) ac_try_echo=$ac_try;;
2910esac
2911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2912 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002913 ac_status=$?
2914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2915 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002916 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002917else
Martin v. Löwis11437992002-04-12 09:54:03 +00002918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002919sed 's/^/| /' conftest.$ac_ext >&5
2920
Thomas Wouters477c8d52006-05-27 19:21:47 +00002921 CFLAGS=""
2922 cat >conftest.$ac_ext <<_ACEOF
2923/* confdefs.h. */
2924_ACEOF
2925cat confdefs.h >>conftest.$ac_ext
2926cat >>conftest.$ac_ext <<_ACEOF
2927/* end confdefs.h. */
2928
2929int
2930main ()
2931{
2932
2933 ;
2934 return 0;
2935}
2936_ACEOF
2937rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002938if { (ac_try="$ac_compile"
2939case "(($ac_try" in
2940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2941 *) ac_try_echo=$ac_try;;
2942esac
2943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2944 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters477c8d52006-05-27 19:21:47 +00002945 ac_status=$?
2946 grep -v '^ *+' conftest.er1 >conftest.err
2947 rm -f conftest.er1
2948 cat conftest.err >&5
2949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2950 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002951 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
2952 { (case "(($ac_try" in
2953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2954 *) ac_try_echo=$ac_try;;
2955esac
2956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2957 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00002958 ac_status=$?
2959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2960 (exit $ac_status); }; } &&
2961 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002962 { (case "(($ac_try" in
2963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2964 *) ac_try_echo=$ac_try;;
2965esac
2966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2967 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00002968 ac_status=$?
2969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2970 (exit $ac_status); }; }; then
2971 :
2972else
2973 echo "$as_me: failed program was:" >&5
2974sed 's/^/| /' conftest.$ac_ext >&5
2975
2976 ac_c_werror_flag=$ac_save_c_werror_flag
2977 CFLAGS="-g"
2978 cat >conftest.$ac_ext <<_ACEOF
2979/* confdefs.h. */
2980_ACEOF
2981cat confdefs.h >>conftest.$ac_ext
2982cat >>conftest.$ac_ext <<_ACEOF
2983/* end confdefs.h. */
2984
2985int
2986main ()
2987{
2988
2989 ;
2990 return 0;
2991}
2992_ACEOF
2993rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002994if { (ac_try="$ac_compile"
2995case "(($ac_try" in
2996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2997 *) ac_try_echo=$ac_try;;
2998esac
2999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3000 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters477c8d52006-05-27 19:21:47 +00003001 ac_status=$?
3002 grep -v '^ *+' conftest.er1 >conftest.err
3003 rm -f conftest.er1
3004 cat conftest.err >&5
3005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3006 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003007 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3008 { (case "(($ac_try" in
3009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3010 *) ac_try_echo=$ac_try;;
3011esac
3012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3013 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00003014 ac_status=$?
3015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3016 (exit $ac_status); }; } &&
3017 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003018 { (case "(($ac_try" in
3019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3020 *) ac_try_echo=$ac_try;;
3021esac
3022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3023 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00003024 ac_status=$?
3025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3026 (exit $ac_status); }; }; then
3027 ac_cv_prog_cc_g=yes
3028else
3029 echo "$as_me: failed program was:" >&5
3030sed 's/^/| /' conftest.$ac_ext >&5
3031
3032
Guido van Rossum627b2d71993-12-24 10:39:16 +00003033fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034
Skip Montanarof0d5f792004-08-15 14:08:23 +00003035rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003036fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003037
3038rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3039fi
3040
3041rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3042 ac_c_werror_flag=$ac_save_c_werror_flag
3043fi
3044{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3045echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003046if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003047 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003048elif test $ac_cv_prog_cc_g = yes; then
3049 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003050 CFLAGS="-g -O2"
3051 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003052 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003053 fi
3054else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003055 if test "$GCC" = yes; then
3056 CFLAGS="-O2"
3057 else
3058 CFLAGS=
3059 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003060fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3062echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3063if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003064 echo $ECHO_N "(cached) $ECHO_C" >&6
3065else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003066 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003067ac_save_CC=$CC
3068cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003069/* confdefs.h. */
3070_ACEOF
3071cat confdefs.h >>conftest.$ac_ext
3072cat >>conftest.$ac_ext <<_ACEOF
3073/* end confdefs.h. */
3074#include <stdarg.h>
3075#include <stdio.h>
3076#include <sys/types.h>
3077#include <sys/stat.h>
3078/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3079struct buf { int x; };
3080FILE * (*rcsopen) (struct buf *, struct stat *, int);
3081static char *e (p, i)
3082 char **p;
3083 int i;
3084{
3085 return p[i];
3086}
3087static char *f (char * (*g) (char **, int), char **p, ...)
3088{
3089 char *s;
3090 va_list v;
3091 va_start (v,p);
3092 s = g (p, va_arg (v,int));
3093 va_end (v);
3094 return s;
3095}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003096
3097/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3098 function prototypes and stuff, but not '\xHH' hex character constants.
3099 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters477c8d52006-05-27 19:21:47 +00003100 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003101 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3102 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters477c8d52006-05-27 19:21:47 +00003103 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003104int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3105
Skip Montanaro6dead952003-09-25 14:50:04 +00003106int test (int i, double x);
3107struct s1 {int (*f) (int a);};
3108struct s2 {int (*f) (double a);};
3109int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3110int argc;
3111char **argv;
3112int
3113main ()
3114{
3115return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3116 ;
3117 return 0;
3118}
3119_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00003120for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3121 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003122do
3123 CC="$ac_save_CC $ac_arg"
3124 rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003125if { (ac_try="$ac_compile"
3126case "(($ac_try" in
3127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3128 *) ac_try_echo=$ac_try;;
3129esac
3130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3131 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003133 grep -v '^ *+' conftest.er1 >conftest.err
3134 rm -f conftest.er1
3135 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3137 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003138 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
3139 { (case "(($ac_try" in
3140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3141 *) ac_try_echo=$ac_try;;
3142esac
3143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3144 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00003145 ac_status=$?
3146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3147 (exit $ac_status); }; } &&
3148 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003149 { (case "(($ac_try" in
3150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3151 *) ac_try_echo=$ac_try;;
3152esac
3153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3154 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003155 ac_status=$?
3156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3157 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003158 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003159else
3160 echo "$as_me: failed program was:" >&5
3161sed 's/^/| /' conftest.$ac_ext >&5
3162
Thomas Wouters477c8d52006-05-27 19:21:47 +00003163
Skip Montanaro6dead952003-09-25 14:50:04 +00003164fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003165
Skip Montanarof0d5f792004-08-15 14:08:23 +00003166rm -f conftest.err conftest.$ac_objext
Thomas Wouters477c8d52006-05-27 19:21:47 +00003167 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003168done
Thomas Wouters477c8d52006-05-27 19:21:47 +00003169rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003170CC=$ac_save_CC
3171
3172fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003173# AC_CACHE_VAL
3174case "x$ac_cv_prog_cc_c89" in
3175 x)
3176 { echo "$as_me:$LINENO: result: none needed" >&5
3177echo "${ECHO_T}none needed" >&6; } ;;
3178 xno)
3179 { echo "$as_me:$LINENO: result: unsupported" >&5
3180echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003181 *)
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182 CC="$CC $ac_cv_prog_cc_c89"
3183 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3184echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003185esac
3186
Skip Montanaro6dead952003-09-25 14:50:04 +00003187
Martin v. Löwis11437992002-04-12 09:54:03 +00003188ac_ext=c
3189ac_cpp='$CPP $CPPFLAGS'
3190ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3191ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3192ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003193
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003194
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003195
3196
Thomas Wouters477c8d52006-05-27 19:21:47 +00003197{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3198echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003199
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003201if test "${with_cxx_main+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003203
3204 case $withval in
3205 no) with_cxx_main=no
3206 MAINCC='$(CC)';;
3207 yes) with_cxx_main=yes
3208 MAINCC='$(CXX)';;
3209 *) with_cxx_main=yes
3210 MAINCC=$withval
3211 if test -z "$CXX"
3212 then
3213 CXX=$withval
3214 fi;;
3215 esac
3216else
3217
3218 with_cxx_main=no
3219 MAINCC='$(CC)'
3220
Thomas Wouters477c8d52006-05-27 19:21:47 +00003221fi
3222
3223{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3224echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003225
3226preset_cxx="$CXX"
3227if test -z "$CXX"
3228then
3229 case "$CC" in
3230 gcc) # Extract the first word of "g++", so it can be a program name with args.
3231set dummy g++; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3233echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003234if test "${ac_cv_path_CXX+set}" = set; then
3235 echo $ECHO_N "(cached) $ECHO_C" >&6
3236else
3237 case $CXX in
3238 [\\/]* | ?:[\\/]*)
3239 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3240 ;;
3241 *)
3242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3243for as_dir in notfound
3244do
3245 IFS=$as_save_IFS
3246 test -z "$as_dir" && as_dir=.
3247 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00003248 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003249 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3250 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3251 break 2
3252 fi
3253done
3254done
Thomas Wouters477c8d52006-05-27 19:21:47 +00003255IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003256
3257 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3258 ;;
3259esac
3260fi
3261CXX=$ac_cv_path_CXX
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003262if test -n "$CXX"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003263 { echo "$as_me:$LINENO: result: $CXX" >&5
3264echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003265else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003266 { echo "$as_me:$LINENO: result: no" >&5
3267echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003268fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003269
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003270 ;;
3271 cc) # Extract the first word of "c++", so it can be a program name with args.
3272set dummy c++; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00003273{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3274echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003275if test "${ac_cv_path_CXX+set}" = set; then
3276 echo $ECHO_N "(cached) $ECHO_C" >&6
3277else
3278 case $CXX in
3279 [\\/]* | ?:[\\/]*)
3280 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3281 ;;
3282 *)
3283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3284for as_dir in notfound
3285do
3286 IFS=$as_save_IFS
3287 test -z "$as_dir" && as_dir=.
3288 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00003289 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003290 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3291 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3292 break 2
3293 fi
3294done
3295done
Thomas Wouters477c8d52006-05-27 19:21:47 +00003296IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003297
3298 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3299 ;;
3300esac
3301fi
3302CXX=$ac_cv_path_CXX
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003303if test -n "$CXX"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003304 { echo "$as_me:$LINENO: result: $CXX" >&5
3305echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003306else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003307 { echo "$as_me:$LINENO: result: no" >&5
3308echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003309fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003310
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003311 ;;
3312 esac
3313 if test "$CXX" = "notfound"
3314 then
3315 CXX=""
3316 fi
3317fi
3318if test -z "$CXX"
3319then
3320 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3321do
3322 # Extract the first word of "$ac_prog", so it can be a program name with args.
3323set dummy $ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00003324{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003326if test "${ac_cv_prog_CXX+set}" = set; then
3327 echo $ECHO_N "(cached) $ECHO_C" >&6
3328else
3329 if test -n "$CXX"; then
3330 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3331else
3332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3333for as_dir in $PATH
3334do
3335 IFS=$as_save_IFS
3336 test -z "$as_dir" && as_dir=.
3337 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00003338 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003339 ac_cv_prog_CXX="$ac_prog"
3340 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3341 break 2
3342 fi
3343done
3344done
Thomas Wouters477c8d52006-05-27 19:21:47 +00003345IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003346
3347fi
3348fi
3349CXX=$ac_cv_prog_CXX
3350if test -n "$CXX"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003351 { echo "$as_me:$LINENO: result: $CXX" >&5
3352echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003353else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003354 { echo "$as_me:$LINENO: result: no" >&5
3355echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003356fi
3357
Thomas Wouters477c8d52006-05-27 19:21:47 +00003358
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003359 test -n "$CXX" && break
3360done
3361test -n "$CXX" || CXX="notfound"
3362
3363 if test "$CXX" = "notfound"
3364 then
3365 CXX=""
3366 fi
3367fi
3368if test "$preset_cxx" != "$CXX"
3369then
3370 { echo "$as_me:$LINENO: WARNING:
3371
3372 By default, distutils will build C++ extension modules with \"$CXX\".
3373 If this is not intended, then set CXX on the configure command line.
3374 " >&5
3375echo "$as_me: WARNING:
3376
3377 By default, distutils will build C++ extension modules with \"$CXX\".
3378 If this is not intended, then set CXX on the configure command line.
3379 " >&2;}
3380fi
3381
3382
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003383# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003384
3385ac_ext=c
3386ac_cpp='$CPP $CPPFLAGS'
3387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3389ac_compiler_gnu=$ac_cv_c_compiler_gnu
Thomas Wouters477c8d52006-05-27 19:21:47 +00003390{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3391echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003392# On Suns, sometimes $CPP names a directory.
3393if test -n "$CPP" && test -d "$CPP"; then
3394 CPP=
3395fi
3396if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003397 if test "${ac_cv_prog_CPP+set}" = set; then
3398 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003399else
Martin v. Löwis11437992002-04-12 09:54:03 +00003400 # Double quotes because CPP needs to be expanded
3401 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3402 do
3403 ac_preproc_ok=false
3404for ac_c_preproc_warn_flag in '' yes
3405do
3406 # Use a header file that comes with gcc, so configuring glibc
3407 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003408 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3409 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003410 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003411 # not just through cpp. "Syntax error" is here to catch this case.
3412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003413/* confdefs.h. */
3414_ACEOF
3415cat confdefs.h >>conftest.$ac_ext
3416cat >>conftest.$ac_ext <<_ACEOF
3417/* end confdefs.h. */
3418#ifdef __STDC__
3419# include <limits.h>
3420#else
3421# include <assert.h>
3422#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003423 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003424_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003425if { (ac_try="$ac_cpp conftest.$ac_ext"
3426case "(($ac_try" in
3427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3428 *) ac_try_echo=$ac_try;;
3429esac
3430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3431 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003432 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003433 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003434 rm -f conftest.er1
3435 cat conftest.err >&5
3436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3437 (exit $ac_status); } >/dev/null; then
3438 if test -s conftest.err; then
3439 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003440 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 else
3442 ac_cpp_err=
3443 fi
3444else
3445 ac_cpp_err=yes
3446fi
3447if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003448 :
3449else
Martin v. Löwis11437992002-04-12 09:54:03 +00003450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003451sed 's/^/| /' conftest.$ac_ext >&5
3452
Martin v. Löwis11437992002-04-12 09:54:03 +00003453 # Broken: fails on valid input.
3454continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003455fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003456
Martin v. Löwis11437992002-04-12 09:54:03 +00003457rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003458
Thomas Wouters477c8d52006-05-27 19:21:47 +00003459 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003460 # can be detected and how.
3461 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003462/* confdefs.h. */
3463_ACEOF
3464cat confdefs.h >>conftest.$ac_ext
3465cat >>conftest.$ac_ext <<_ACEOF
3466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003467#include <ac_nonexistent.h>
3468_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003469if { (ac_try="$ac_cpp conftest.$ac_ext"
3470case "(($ac_try" in
3471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3472 *) ac_try_echo=$ac_try;;
3473esac
3474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3475 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003477 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003478 rm -f conftest.er1
3479 cat conftest.err >&5
3480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3481 (exit $ac_status); } >/dev/null; then
3482 if test -s conftest.err; then
3483 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003484 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 else
3486 ac_cpp_err=
3487 fi
3488else
3489 ac_cpp_err=yes
3490fi
3491if test -z "$ac_cpp_err"; then
3492 # Broken: success on invalid input.
3493continue
3494else
3495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003496sed 's/^/| /' conftest.$ac_ext >&5
3497
Martin v. Löwis11437992002-04-12 09:54:03 +00003498 # Passes both tests.
3499ac_preproc_ok=:
3500break
3501fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003502
Martin v. Löwis11437992002-04-12 09:54:03 +00003503rm -f conftest.err conftest.$ac_ext
3504
3505done
3506# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3507rm -f conftest.err conftest.$ac_ext
3508if $ac_preproc_ok; then
3509 break
3510fi
3511
3512 done
3513 ac_cv_prog_CPP=$CPP
3514
3515fi
3516 CPP=$ac_cv_prog_CPP
3517else
3518 ac_cv_prog_CPP=$CPP
3519fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003520{ echo "$as_me:$LINENO: result: $CPP" >&5
3521echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003522ac_preproc_ok=false
3523for ac_c_preproc_warn_flag in '' yes
3524do
3525 # Use a header file that comes with gcc, so configuring glibc
3526 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003527 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3528 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 # On the NeXT, cc -E runs the code through the compiler's parser,
3530 # not just through cpp. "Syntax error" is here to catch this case.
3531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003532/* confdefs.h. */
3533_ACEOF
3534cat confdefs.h >>conftest.$ac_ext
3535cat >>conftest.$ac_ext <<_ACEOF
3536/* end confdefs.h. */
3537#ifdef __STDC__
3538# include <limits.h>
3539#else
3540# include <assert.h>
3541#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003542 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003543_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003544if { (ac_try="$ac_cpp conftest.$ac_ext"
3545case "(($ac_try" in
3546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3547 *) ac_try_echo=$ac_try;;
3548esac
3549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3550 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003552 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003553 rm -f conftest.er1
3554 cat conftest.err >&5
3555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3556 (exit $ac_status); } >/dev/null; then
3557 if test -s conftest.err; then
3558 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003559 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003560 else
3561 ac_cpp_err=
3562 fi
3563else
3564 ac_cpp_err=yes
3565fi
3566if test -z "$ac_cpp_err"; then
3567 :
3568else
3569 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003570sed 's/^/| /' conftest.$ac_ext >&5
3571
Martin v. Löwis11437992002-04-12 09:54:03 +00003572 # Broken: fails on valid input.
3573continue
3574fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003575
Martin v. Löwis11437992002-04-12 09:54:03 +00003576rm -f conftest.err conftest.$ac_ext
3577
Thomas Wouters477c8d52006-05-27 19:21:47 +00003578 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 # can be detected and how.
3580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003581/* confdefs.h. */
3582_ACEOF
3583cat confdefs.h >>conftest.$ac_ext
3584cat >>conftest.$ac_ext <<_ACEOF
3585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003586#include <ac_nonexistent.h>
3587_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003588if { (ac_try="$ac_cpp conftest.$ac_ext"
3589case "(($ac_try" in
3590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3591 *) ac_try_echo=$ac_try;;
3592esac
3593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3594 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003596 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 rm -f conftest.er1
3598 cat conftest.err >&5
3599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3600 (exit $ac_status); } >/dev/null; then
3601 if test -s conftest.err; then
3602 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003603 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003604 else
3605 ac_cpp_err=
3606 fi
3607else
3608 ac_cpp_err=yes
3609fi
3610if test -z "$ac_cpp_err"; then
3611 # Broken: success on invalid input.
3612continue
3613else
3614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003615sed 's/^/| /' conftest.$ac_ext >&5
3616
Martin v. Löwis11437992002-04-12 09:54:03 +00003617 # Passes both tests.
3618ac_preproc_ok=:
3619break
3620fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003621
Martin v. Löwis11437992002-04-12 09:54:03 +00003622rm -f conftest.err conftest.$ac_ext
3623
3624done
3625# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3626rm -f conftest.err conftest.$ac_ext
3627if $ac_preproc_ok; then
3628 :
3629else
Skip Montanaro6dead952003-09-25 14:50:04 +00003630 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3631See \`config.log' for more details." >&5
3632echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3633See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 { (exit 1); exit 1; }; }
3635fi
3636
3637ac_ext=c
3638ac_cpp='$CPP $CPPFLAGS'
3639ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3640ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3641ac_compiler_gnu=$ac_cv_c_compiler_gnu
3642
3643
Thomas Wouters477c8d52006-05-27 19:21:47 +00003644{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3645echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3646if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003647 echo $ECHO_N "(cached) $ECHO_C" >&6
3648else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003649 # Extract the first word of "grep ggrep" to use in msg output
3650if test -z "$GREP"; then
3651set dummy grep ggrep; ac_prog_name=$2
3652if test "${ac_cv_path_GREP+set}" = set; then
3653 echo $ECHO_N "(cached) $ECHO_C" >&6
3654else
3655 ac_path_GREP_found=false
3656# Loop through the user's path and test for each of PROGNAME-LIST
3657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3658for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3659do
3660 IFS=$as_save_IFS
3661 test -z "$as_dir" && as_dir=.
3662 for ac_prog in grep ggrep; do
3663 for ac_exec_ext in '' $ac_executable_extensions; do
3664 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3665 { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
3666 # Check for GNU ac_path_GREP and select it if it is found.
3667 # Check for GNU $ac_path_GREP
3668case `"$ac_path_GREP" --version 2>&1` in
3669*GNU*)
3670 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3671*)
3672 ac_count=0
3673 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3674 while :
3675 do
3676 cat "conftest.in" "conftest.in" >"conftest.tmp"
3677 mv "conftest.tmp" "conftest.in"
3678 cp "conftest.in" "conftest.nl"
3679 echo 'GREP' >> "conftest.nl"
3680 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3681 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3682 ac_count=`expr $ac_count + 1`
3683 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3684 # Best one so far, save it but keep looking for a better one
3685 ac_cv_path_GREP="$ac_path_GREP"
3686 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003687 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003688 # 10*(2^10) chars as input seems more than enough
3689 test $ac_count -gt 10 && break
3690 done
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003691 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003692esac
3693
3694
3695 $ac_path_GREP_found && break 3
3696 done
3697done
3698
3699done
3700IFS=$as_save_IFS
3701
3702
Skip Montanaro6dead952003-09-25 14:50:04 +00003703fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003704
3705GREP="$ac_cv_path_GREP"
3706if test -z "$GREP"; then
3707 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3708echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3709 { (exit 1); exit 1; }; }
3710fi
3711
3712else
3713 ac_cv_path_GREP=$GREP
3714fi
3715
3716
3717fi
3718{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3719echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3720 GREP="$ac_cv_path_GREP"
3721
3722
3723{ echo "$as_me:$LINENO: checking for egrep" >&5
3724echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3725if test "${ac_cv_path_EGREP+set}" = set; then
3726 echo $ECHO_N "(cached) $ECHO_C" >&6
3727else
3728 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3729 then ac_cv_path_EGREP="$GREP -E"
3730 else
3731 # Extract the first word of "egrep" to use in msg output
3732if test -z "$EGREP"; then
3733set dummy egrep; ac_prog_name=$2
3734if test "${ac_cv_path_EGREP+set}" = set; then
3735 echo $ECHO_N "(cached) $ECHO_C" >&6
3736else
3737 ac_path_EGREP_found=false
3738# Loop through the user's path and test for each of PROGNAME-LIST
3739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3740for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3741do
3742 IFS=$as_save_IFS
3743 test -z "$as_dir" && as_dir=.
3744 for ac_prog in egrep; do
3745 for ac_exec_ext in '' $ac_executable_extensions; do
3746 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3747 { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
3748 # Check for GNU ac_path_EGREP and select it if it is found.
3749 # Check for GNU $ac_path_EGREP
3750case `"$ac_path_EGREP" --version 2>&1` in
3751*GNU*)
3752 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3753*)
3754 ac_count=0
3755 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3756 while :
3757 do
3758 cat "conftest.in" "conftest.in" >"conftest.tmp"
3759 mv "conftest.tmp" "conftest.in"
3760 cp "conftest.in" "conftest.nl"
3761 echo 'EGREP' >> "conftest.nl"
3762 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3763 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3764 ac_count=`expr $ac_count + 1`
3765 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3766 # Best one so far, save it but keep looking for a better one
3767 ac_cv_path_EGREP="$ac_path_EGREP"
3768 ac_path_EGREP_max=$ac_count
3769 fi
3770 # 10*(2^10) chars as input seems more than enough
3771 test $ac_count -gt 10 && break
3772 done
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003773 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003774esac
3775
3776
3777 $ac_path_EGREP_found && break 3
3778 done
3779done
3780
3781done
3782IFS=$as_save_IFS
3783
3784
3785fi
3786
3787EGREP="$ac_cv_path_EGREP"
3788if test -z "$EGREP"; then
3789 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3790echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3791 { (exit 1); exit 1; }; }
3792fi
3793
3794else
3795 ac_cv_path_EGREP=$EGREP
3796fi
3797
3798
3799 fi
3800fi
3801{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3802echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3803 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003804
3805
Martin v. Löwis11437992002-04-12 09:54:03 +00003806
Thomas Wouters477c8d52006-05-27 19:21:47 +00003807{ echo "$as_me:$LINENO: checking for AIX" >&5
3808echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003809cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003810/* confdefs.h. */
3811_ACEOF
3812cat confdefs.h >>conftest.$ac_ext
3813cat >>conftest.$ac_ext <<_ACEOF
3814/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003815#ifdef _AIX
3816 yes
3817#endif
3818
Martin v. Löwis11437992002-04-12 09:54:03 +00003819_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003820if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003821 $EGREP "yes" >/dev/null 2>&1; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003822 { echo "$as_me:$LINENO: result: yes" >&5
3823echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003824cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003825#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003826_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003827
3828else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003829 { echo "$as_me:$LINENO: result: no" >&5
3830echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003831fi
3832rm -f conftest*
3833
Michael W. Hudson54241132001-12-07 15:38:26 +00003834
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003835
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003836# Check for unsupported systems
3837case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003838Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003839 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3840 echo See README for details.
3841 exit 1;;
3842esac
3843
Michael W. Hudson54241132001-12-07 15:38:26 +00003844
Thomas Wouters477c8d52006-05-27 19:21:47 +00003845{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3846echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003847
Thomas Wouters477c8d52006-05-27 19:21:47 +00003848# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003849if test "${with_suffix+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003850 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003851 case $withval in
3852 no) EXEEXT=;;
3853 yes) EXEEXT=.exe;;
3854 *) EXEEXT=$withval;;
3855 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00003856fi
3857
3858{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3859echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003860
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003861# Test whether we're running on a non-case-sensitive system, in which
3862# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003863
Thomas Wouters477c8d52006-05-27 19:21:47 +00003864{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3865echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003866if test ! -d CaseSensitiveTestDir; then
3867mkdir CaseSensitiveTestDir
3868fi
3869
3870if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003871then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003872 { echo "$as_me:$LINENO: result: yes" >&5
3873echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003874 BUILDEXEEXT=.exe
3875else
Thomas Wouters477c8d52006-05-27 19:21:47 +00003876 { echo "$as_me:$LINENO: result: no" >&5
3877echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003878 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003879fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003880rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003881
Guido van Rossumdd997f71998-10-07 19:58:26 +00003882case $MACHDEP in
3883bsdos*)
3884 case $CC in
3885 gcc) CC="$CC -D_HAVE_BSDI";;
3886 esac;;
3887esac
3888
Guido van Rossum24b1e751997-08-21 02:29:16 +00003889case $ac_sys_system in
3890hp*|HP*)
3891 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003892 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003893 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003894Monterey*)
3895 case $CC in
3896 cc) CC="$CC -Wl,-Bexport";;
3897 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003898SunOS*)
3899 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003900
3901cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003902#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003903_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003904
3905 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003906esac
3907
Michael W. Hudson54241132001-12-07 15:38:26 +00003908
3909
Thomas Wouters477c8d52006-05-27 19:21:47 +00003910{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3911echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003912if test -z "$LIBRARY"
3913then
3914 LIBRARY='libpython$(VERSION).a'
3915fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003916{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3917echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003918
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003919# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003920# name of the library into which to insert object files). BLDLIBRARY is also
3921# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3922# is blank as the main program is not linked directly against LDLIBRARY.
3923# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3924# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3925# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3926# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003927#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003928# RUNSHARED is used to run shared python without installed libraries
3929#
3930# INSTSONAME is the name of the shared library that will be use to install
3931# on the system - some systems like version suffix, others don't
3932
3933
Michael W. Hudson54241132001-12-07 15:38:26 +00003934
3935
3936
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003937
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003938LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003939BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003940INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003941DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003942LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003943RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003944
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003945# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003946# If CXX is set, and if it is needed to link a main function that was
3947# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3948# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003949# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003950# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003951
Thomas Wouters477c8d52006-05-27 19:21:47 +00003952{ echo "$as_me:$LINENO: checking LINKCC" >&5
3953echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003954if test -z "$LINKCC"
3955then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003956 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003957 case $ac_sys_system in
3958 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003959 exp_extra="\"\""
3960 if test $ac_sys_release -ge 5 -o \
3961 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3962 exp_extra="."
3963 fi
3964 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003965 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003966 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003967 esac
3968fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003969{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3970echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003971
Thomas Wouters477c8d52006-05-27 19:21:47 +00003972{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3973echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3974# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003975if test "${enable_shared+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003976 enableval=$enable_shared;
3977fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003978
Martin v. Löwis1142de32002-03-29 16:28:31 +00003979
3980if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003981then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003982 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003983 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003984 enable_shared="yes";;
3985 *)
3986 enable_shared="no";;
3987 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003988fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003989{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3990echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00003991
Thomas Wouters477c8d52006-05-27 19:21:47 +00003992{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3993echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
3994# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003995if test "${enable_profiling+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00003996 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003997 CC="$CC -pg"
3998 if test "$cross_compiling" = yes; then
3999 ac_enable_profiling="no"
4000else
4001 cat >conftest.$ac_ext <<_ACEOF
4002/* confdefs.h. */
4003_ACEOF
4004cat confdefs.h >>conftest.$ac_ext
4005cat >>conftest.$ac_ext <<_ACEOF
4006/* end confdefs.h. */
4007int main() { return 0; }
4008_ACEOF
4009rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004010if { (ac_try="$ac_link"
4011case "(($ac_try" in
4012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4013 *) ac_try_echo=$ac_try;;
4014esac
4015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4016 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004017 ac_status=$?
4018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4019 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020 { (case "(($ac_try" in
4021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4022 *) ac_try_echo=$ac_try;;
4023esac
4024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4025 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004026 ac_status=$?
4027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4028 (exit $ac_status); }; }; then
4029 ac_enable_profiling="yes"
4030else
4031 echo "$as_me: program exited with status $ac_status" >&5
4032echo "$as_me: failed program was:" >&5
4033sed 's/^/| /' conftest.$ac_ext >&5
4034
4035( exit $ac_status )
4036ac_enable_profiling="no"
4037fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004039fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004040
4041
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004042 CC="$ac_save_cc"
Thomas Wouters477c8d52006-05-27 19:21:47 +00004043fi
4044
4045{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4046echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004047
4048case "$ac_enable_profiling" in
4049 "yes")
4050 BASECFLAGS="-pg $BASECFLAGS"
4051 LDFLAGS="-pg $LDFLAGS"
4052 ;;
4053esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004054
Thomas Wouters477c8d52006-05-27 19:21:47 +00004055{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4056echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004057
Guido van Rossumb8552162001-09-05 14:58:11 +00004058# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4059# library that we build, but we do not want to link against it (we
4060# will find it with a -framework option). For this reason there is an
4061# extra variable BLDLIBRARY against which Python and the extension
4062# modules are linked, BLDLIBRARY. This is normally the same as
4063# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004064if test "$enable_framework"
4065then
4066 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004067 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004068 BLDLIBRARY=''
4069else
4070 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004071fi
Jack Jansene578a632001-08-15 01:27:14 +00004072
Martin v. Löwis1142de32002-03-29 16:28:31 +00004073# Other platforms follow
4074if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004075
4076cat >>confdefs.h <<\_ACEOF
4077#define Py_ENABLE_SHARED 1
4078_ACEOF
4079
Martin v. Löwis1142de32002-03-29 16:28:31 +00004080 case $ac_sys_system in
4081 BeOS*)
4082 LDLIBRARY='libpython$(VERSION).so'
4083 ;;
4084 CYGWIN*)
4085 LDLIBRARY='libpython$(VERSION).dll.a'
4086 DLLLIBRARY='libpython$(VERSION).dll'
4087 ;;
4088 SunOS*)
4089 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004090 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004091 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004092 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004093 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004094 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004095 LDLIBRARY='libpython$(VERSION).so'
4096 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004097 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004098 case $ac_sys_system in
4099 FreeBSD*)
4100 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4101 ;;
4102 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004103 INSTSONAME="$LDLIBRARY".$SOVERSION
4104 ;;
4105 hp*|HP*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00004106 case `uname -m` in
4107 ia64)
4108 LDLIBRARY='libpython$(VERSION).so'
4109 ;;
4110 *)
4111 LDLIBRARY='libpython$(VERSION).sl'
4112 ;;
4113 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004114 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004115 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004116 ;;
4117 OSF*)
4118 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004119 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004120 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004121 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004122 atheos*)
4123 LDLIBRARY='libpython$(VERSION).so'
4124 BLDLIBRARY='-L. -lpython$(VERSION)'
4125 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4126 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004127 esac
Jason Tishler30765592003-09-04 11:04:06 +00004128else # shared is disabled
4129 case $ac_sys_system in
4130 CYGWIN*)
4131 BLDLIBRARY='$(LIBRARY)'
4132 LDLIBRARY='libpython$(VERSION).dll.a'
4133 ;;
4134 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004135fi
4136
Thomas Wouters477c8d52006-05-27 19:21:47 +00004137{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4138echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004139
Martin v. Löwis11437992002-04-12 09:54:03 +00004140if test -n "$ac_tool_prefix"; then
4141 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4142set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00004143{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4144echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004145if test "${ac_cv_prog_RANLIB+set}" = set; then
4146 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004147else
4148 if test -n "$RANLIB"; then
4149 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4150else
Martin v. Löwis11437992002-04-12 09:54:03 +00004151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4152for as_dir in $PATH
4153do
4154 IFS=$as_save_IFS
4155 test -z "$as_dir" && as_dir=.
4156 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00004157 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004158 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4159 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4160 break 2
4161 fi
4162done
4163done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004164IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004165
Guido van Rossum627b2d71993-12-24 10:39:16 +00004166fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004168RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004169if test -n "$RANLIB"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004170 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4171echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004173 { echo "$as_me:$LINENO: result: no" >&5
4174echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004175fi
4176
Thomas Wouters477c8d52006-05-27 19:21:47 +00004177
Martin v. Löwis11437992002-04-12 09:54:03 +00004178fi
4179if test -z "$ac_cv_prog_RANLIB"; then
4180 ac_ct_RANLIB=$RANLIB
4181 # Extract the first word of "ranlib", so it can be a program name with args.
4182set dummy ranlib; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00004183{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4184echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004185if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4186 echo $ECHO_N "(cached) $ECHO_C" >&6
4187else
4188 if test -n "$ac_ct_RANLIB"; then
4189 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4190else
4191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4192for as_dir in $PATH
4193do
4194 IFS=$as_save_IFS
4195 test -z "$as_dir" && as_dir=.
4196 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00004197 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004198 ac_cv_prog_ac_ct_RANLIB="ranlib"
4199 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4200 break 2
4201 fi
4202done
4203done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004204IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004205
Martin v. Löwis11437992002-04-12 09:54:03 +00004206fi
4207fi
4208ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4209if test -n "$ac_ct_RANLIB"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004210 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4211echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004212else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004213 { echo "$as_me:$LINENO: result: no" >&5
4214echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004215fi
4216
Thomas Wouters477c8d52006-05-27 19:21:47 +00004217 if test "x$ac_ct_RANLIB" = x; then
4218 RANLIB=":"
4219 else
4220 case $cross_compiling:$ac_tool_warned in
4221yes:)
4222{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4223whose name does not start with the host triplet. If you think this
4224configuration is useful to you, please write to autoconf@gnu.org." >&5
4225echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4226whose name does not start with the host triplet. If you think this
4227configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4228ac_tool_warned=yes ;;
4229esac
4230 RANLIB=$ac_ct_RANLIB
4231 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004232else
4233 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004234fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004235
4236
Guido van Rossum7f43da71994-08-01 12:15:30 +00004237for ac_prog in ar aal
4238do
Martin v. Löwis11437992002-04-12 09:54:03 +00004239 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240set dummy $ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00004241{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4242echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004243if test "${ac_cv_prog_AR+set}" = set; then
4244 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004245else
4246 if test -n "$AR"; then
4247 ac_cv_prog_AR="$AR" # Let the user override the test.
4248else
Martin v. Löwis11437992002-04-12 09:54:03 +00004249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4250for as_dir in $PATH
4251do
4252 IFS=$as_save_IFS
4253 test -z "$as_dir" && as_dir=.
4254 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00004255 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004256 ac_cv_prog_AR="$ac_prog"
4257 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4258 break 2
4259 fi
4260done
4261done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004262IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004263
Guido van Rossum7f43da71994-08-01 12:15:30 +00004264fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004266AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004267if test -n "$AR"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004268 { echo "$as_me:$LINENO: result: $AR" >&5
4269echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004271 { echo "$as_me:$LINENO: result: no" >&5
4272echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004274
Thomas Wouters477c8d52006-05-27 19:21:47 +00004275
Martin v. Löwis11437992002-04-12 09:54:03 +00004276 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004277done
4278test -n "$AR" || AR="ar"
4279
Michael W. Hudson54241132001-12-07 15:38:26 +00004280
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004281
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004282# Extract the first word of "svnversion", so it can be a program name with args.
4283set dummy svnversion; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +00004284{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4285echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004286if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4287 echo $ECHO_N "(cached) $ECHO_C" >&6
4288else
4289 if test -n "$SVNVERSION"; then
4290 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4291else
4292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4293for as_dir in $PATH
4294do
4295 IFS=$as_save_IFS
4296 test -z "$as_dir" && as_dir=.
4297 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00004298 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004299 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004300 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4301 break 2
4302 fi
4303done
4304done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004305IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004306
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004307 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004308fi
4309fi
4310SVNVERSION=$ac_cv_prog_SVNVERSION
4311if test -n "$SVNVERSION"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004312 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4313echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004314else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004315 { echo "$as_me:$LINENO: result: no" >&5
4316echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004317fi
4318
Thomas Wouters477c8d52006-05-27 19:21:47 +00004319
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004320if test $SVNVERSION = found
4321then
4322 SVNVERSION="svnversion \$(srcdir)"
4323else
4324 SVNVERSION="echo exported"
4325fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004326
Neil Schemenauera42c8272001-03-31 00:01:55 +00004327case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004328bsdos*|hp*|HP*)
4329 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004330 if test -z "$INSTALL"
4331 then
4332 INSTALL="${srcdir}/install-sh -c"
4333 fi
4334esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004335ac_aux_dir=
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004336for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4337 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004338 ac_aux_dir=$ac_dir
4339 ac_install_sh="$ac_aux_dir/install-sh -c"
4340 break
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004341 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004342 ac_aux_dir=$ac_dir
4343 ac_install_sh="$ac_aux_dir/install.sh -c"
4344 break
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004345 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004346 ac_aux_dir=$ac_dir
4347 ac_install_sh="$ac_aux_dir/shtool install -c"
4348 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004349 fi
4350done
4351if test -z "$ac_aux_dir"; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004352 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4353echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004354 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004355fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004356
4357# These three variables are undocumented and unsupported,
4358# and are intended to be withdrawn in a future Autoconf release.
4359# They can cause serious problems if a builder's source tree is in a directory
4360# whose full name contains unusual characters.
4361ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4362ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4363ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4364
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004365
4366# Find a good install program. We prefer a C program (faster),
4367# so one script is as good as another. But avoid the broken or
4368# incompatible versions:
4369# SysV /etc/install, /usr/sbin/install
4370# SunOS /usr/etc/install
4371# IRIX /sbin/install
4372# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004373# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004374# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4375# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4376# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004377# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004378# ./install, which can be erroneously created by make from ./install.sh.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004379{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4380echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004381if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004382if test "${ac_cv_path_install+set}" = set; then
4383 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004384else
Martin v. Löwis11437992002-04-12 09:54:03 +00004385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4386for as_dir in $PATH
4387do
4388 IFS=$as_save_IFS
4389 test -z "$as_dir" && as_dir=.
4390 # Account for people who put trailing slashes in PATH elements.
4391case $as_dir/ in
4392 ./ | .// | /cC/* | \
4393 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004394 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004395 /usr/ucb/* ) ;;
4396 *)
4397 # OSF1 and SCO ODT 3.0 have their own names for install.
4398 # Don't use installbsd from OSF since it installs stuff as root
4399 # by default.
4400 for ac_prog in ginstall scoinst install; do
4401 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +00004402 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00004403 if test $ac_prog = install &&
4404 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4405 # AIX install. It has an incompatible calling convention.
4406 :
4407 elif test $ac_prog = install &&
4408 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4409 # program-specific install script used by HP pwplus--don't use.
4410 :
4411 else
4412 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4413 break 3
4414 fi
4415 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004416 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004417 done
4418 ;;
4419esac
4420done
Thomas Wouters477c8d52006-05-27 19:21:47 +00004421IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004422
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004423
4424fi
4425 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004426 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004427 else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004428 # As a last resort, use the slow shell script. Don't cache a
4429 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004430 # break other packages using the cache if that directory is
Thomas Wouters477c8d52006-05-27 19:21:47 +00004431 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004432 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004433 fi
4434fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004435{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4436echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004437
4438# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4439# It thinks the first close brace ends the variable substitution.
4440test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4441
Martin v. Löwis11437992002-04-12 09:54:03 +00004442test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004443
4444test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4445
Michael W. Hudson54241132001-12-07 15:38:26 +00004446
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004447# Not every filesystem supports hard links
4448
4449if test -z "$LN" ; then
4450 case $ac_sys_system in
4451 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004452 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004453 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004454 *) LN=ln;;
4455 esac
4456fi
4457
Fred Drake109d9862001-07-11 06:27:56 +00004458# Check for --with-pydebug
Thomas Wouters477c8d52006-05-27 19:21:47 +00004459{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4460echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004461
Thomas Wouters477c8d52006-05-27 19:21:47 +00004462# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004463if test "${with_pydebug+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00004464 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004465if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004466then
4467
4468cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004469#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004470_ACEOF
4471
Thomas Wouters477c8d52006-05-27 19:21:47 +00004472 { echo "$as_me:$LINENO: result: yes" >&5
4473echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004474 Py_DEBUG='true'
Thomas Wouters477c8d52006-05-27 19:21:47 +00004475else { echo "$as_me:$LINENO: result: no" >&5
4476echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004477fi
4478else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004479 { echo "$as_me:$LINENO: result: no" >&5
4480echo "${ECHO_T}no" >&6; }
4481fi
4482
Fred Drake109d9862001-07-11 06:27:56 +00004483
Skip Montanarodecc6a42003-01-01 20:07:49 +00004484# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4485# merged with this chunk of code?
4486
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004487# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004488# ------------------------
4489# (The following bit of code is complicated enough - please keep things
4490# indented properly. Just pretend you're editing Python code. ;-)
4491
4492# There are two parallel sets of case statements below, one that checks to
4493# see if OPT was set and one that does BASECFLAGS setting based upon
4494# compiler and platform. BASECFLAGS tweaks need to be made even if the
4495# user set OPT.
4496
4497# tweak OPT based on compiler and platform, only if the user didn't set
4498# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004499
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004500if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004501then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004502 case $GCC in
4503 yes)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004504 if test "$CC" != 'g++' ; then
4505 STRICT_PROTO="-Wstrict-prototypes"
4506 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004507 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004508 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004509 if test "$Py_DEBUG" = 'true' ; then
4510 # Optimization messes up debuggers, so turn it off for
4511 # debug builds.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004512 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004513 else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004514 OPT="-g -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004515 fi
4516 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004517 *)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004518 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004519 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004520 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004521 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004522 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4523 ;;
4524 esac
Fred Drake109d9862001-07-11 06:27:56 +00004525 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004526
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004527 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004528 OPT="-O"
4529 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004530 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004531
4532 # The current (beta) Monterey compiler dies with optimizations
4533 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004534 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004535 Monterey*)
4536 OPT=""
4537 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004538 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004539
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004540fi
4541
Skip Montanarodecc6a42003-01-01 20:07:49 +00004542
4543# tweak BASECFLAGS based on compiler and platform
4544case $GCC in
4545yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004546 # Python violates C99 rules, by casting between incompatible
4547 # pointer types. GCC may generate bad code as a result of that,
4548 # so use -fno-strict-aliasing if supported.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004549 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4550echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004551 ac_save_cc="$CC"
4552 CC="$CC -fno-strict-aliasing"
4553 if test "$cross_compiling" = yes; then
4554 ac_cv_no_strict_aliasing_ok=no
4555else
4556 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004557/* confdefs.h. */
4558_ACEOF
4559cat confdefs.h >>conftest.$ac_ext
4560cat >>conftest.$ac_ext <<_ACEOF
4561/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004562int main() { return 0; }
4563_ACEOF
4564rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004565if { (ac_try="$ac_link"
4566case "(($ac_try" in
4567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4568 *) ac_try_echo=$ac_try;;
4569esac
4570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4571 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004572 ac_status=$?
4573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4574 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004575 { (case "(($ac_try" in
4576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4577 *) ac_try_echo=$ac_try;;
4578esac
4579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4580 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004581 ac_status=$?
4582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4583 (exit $ac_status); }; }; then
4584 ac_cv_no_strict_aliasing_ok=yes
4585else
4586 echo "$as_me: program exited with status $ac_status" >&5
4587echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004588sed 's/^/| /' conftest.$ac_ext >&5
4589
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004590( exit $ac_status )
4591ac_cv_no_strict_aliasing_ok=no
4592fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004593rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004594fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004595
4596
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004597 CC="$ac_save_cc"
Thomas Wouters477c8d52006-05-27 19:21:47 +00004598 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4599echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004600 if test $ac_cv_no_strict_aliasing_ok = yes
4601 then
4602 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4603 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004604 case $ac_sys_system in
4605 SCO_SV*)
4606 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4607 ;;
4608 # is there any other compiler on Darwin besides gcc?
4609 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00004610 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Thomas Wouters477c8d52006-05-27 19:21:47 +00004611 if test "${enable_universalsdk}"; then
4612 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4613 fi
4614
Skip Montanarodecc6a42003-01-01 20:07:49 +00004615 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004616 OSF*)
4617 BASECFLAGS="$BASECFLAGS -mieee"
4618 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004619 esac
4620 ;;
4621
4622*)
4623 case $ac_sys_system in
4624 OpenUNIX*|UnixWare*)
4625 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4626 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004627 OSF*)
4628 BASECFLAGS="$BASECFLAGS -ieee -std"
4629 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004630 SCO_SV*)
4631 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4632 ;;
4633 esac
4634 ;;
4635esac
4636
Fred Drakee1ceaa02001-12-04 20:55:47 +00004637if test "$Py_DEBUG" = 'true'; then
4638 :
4639else
4640 OPT="-DNDEBUG $OPT"
4641fi
4642
Guido van Rossum563e7081996-09-10 18:20:48 +00004643if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004644then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004645 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004646fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004647
Neal Norwitz020c46a2006-01-07 21:39:28 +00004648# disable check for icc since it seems to pass, but generates a warning
4649if test "$CC" = icc
4650then
4651 ac_cv_opt_olimit_ok=no
4652fi
4653
Thomas Wouters477c8d52006-05-27 19:21:47 +00004654{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4655echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004656if test "${ac_cv_opt_olimit_ok+set}" = set; then
4657 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004658else
4659 ac_save_cc="$CC"
4660CC="$CC -OPT:Olimit=0"
4661if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004662 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004663else
Martin v. Löwis11437992002-04-12 09:54:03 +00004664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004665/* confdefs.h. */
4666_ACEOF
4667cat confdefs.h >>conftest.$ac_ext
4668cat >>conftest.$ac_ext <<_ACEOF
4669/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004670int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004671_ACEOF
4672rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004673if { (ac_try="$ac_link"
4674case "(($ac_try" in
4675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4676 *) ac_try_echo=$ac_try;;
4677esac
4678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4679 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004680 ac_status=$?
4681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4682 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004683 { (case "(($ac_try" in
4684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4685 *) ac_try_echo=$ac_try;;
4686esac
4687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4688 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004689 ac_status=$?
4690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4691 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004692 ac_cv_opt_olimit_ok=yes
4693else
Martin v. Löwis11437992002-04-12 09:54:03 +00004694 echo "$as_me: program exited with status $ac_status" >&5
4695echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004696sed 's/^/| /' conftest.$ac_ext >&5
4697
Martin v. Löwis11437992002-04-12 09:54:03 +00004698( exit $ac_status )
4699ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004700fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00004702fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004703
4704
Guido van Rossum91922671997-10-09 20:24:13 +00004705CC="$ac_save_cc"
4706fi
4707
Thomas Wouters477c8d52006-05-27 19:21:47 +00004708{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4709echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004710if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004711 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004712 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4713 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4714 # environment?
4715 Darwin*)
4716 ;;
4717 *)
4718 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4719 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004720 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004721else
Thomas Wouters477c8d52006-05-27 19:21:47 +00004722 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4723echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004724 if test "${ac_cv_olimit_ok+set}" = set; then
4725 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004726else
4727 ac_save_cc="$CC"
4728 CC="$CC -Olimit 1500"
4729 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004730 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004731else
Martin v. Löwis11437992002-04-12 09:54:03 +00004732 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004733/* confdefs.h. */
4734_ACEOF
4735cat confdefs.h >>conftest.$ac_ext
4736cat >>conftest.$ac_ext <<_ACEOF
4737/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004738int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004739_ACEOF
4740rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004741if { (ac_try="$ac_link"
4742case "(($ac_try" in
4743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4744 *) ac_try_echo=$ac_try;;
4745esac
4746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4747 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004748 ac_status=$?
4749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4750 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004751 { (case "(($ac_try" in
4752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4753 *) ac_try_echo=$ac_try;;
4754esac
4755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4756 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004757 ac_status=$?
4758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4759 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004760 ac_cv_olimit_ok=yes
4761else
Martin v. Löwis11437992002-04-12 09:54:03 +00004762 echo "$as_me: program exited with status $ac_status" >&5
4763echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004764sed 's/^/| /' conftest.$ac_ext >&5
4765
Martin v. Löwis11437992002-04-12 09:54:03 +00004766( exit $ac_status )
4767ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004768fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004770fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004771
4772
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004773 CC="$ac_save_cc"
4774fi
4775
Thomas Wouters477c8d52006-05-27 19:21:47 +00004776 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4777echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004778 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004779 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004780 fi
4781fi
4782
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004783# On some compilers, pthreads are available without further options
4784# (e.g. MacOS X). On some of these systems, the compiler will not
4785# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4786# So we have to see first whether pthreads are available without
4787# options before we can check whether -Kpthread improves anything.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004788{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4789echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004790if test "${ac_cv_pthread_is_default+set}" = set; then
4791 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004792else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004793 if test "$cross_compiling" = yes; then
4794 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004795else
Martin v. Löwis11437992002-04-12 09:54:03 +00004796 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004797/* confdefs.h. */
4798_ACEOF
4799cat confdefs.h >>conftest.$ac_ext
4800cat >>conftest.$ac_ext <<_ACEOF
4801/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004802
Martin v. Löwis130fb172001-07-19 11:00:41 +00004803#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004804
4805void* routine(void* p){return NULL;}
4806
4807int main(){
4808 pthread_t p;
4809 if(pthread_create(&p,NULL,routine,NULL)!=0)
4810 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004811 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004812 return 0;
4813}
4814
Martin v. Löwis11437992002-04-12 09:54:03 +00004815_ACEOF
4816rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004817if { (ac_try="$ac_link"
4818case "(($ac_try" in
4819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4820 *) ac_try_echo=$ac_try;;
4821esac
4822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4823 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004824 ac_status=$?
4825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4826 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004827 { (case "(($ac_try" in
4828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4829 *) ac_try_echo=$ac_try;;
4830esac
4831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4832 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004833 ac_status=$?
4834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4835 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004836
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004837 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004838 ac_cv_kthread=no
4839 ac_cv_pthread=no
4840
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004841else
Martin v. Löwis11437992002-04-12 09:54:03 +00004842 echo "$as_me: program exited with status $ac_status" >&5
4843echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004844sed 's/^/| /' conftest.$ac_ext >&5
4845
Martin v. Löwis11437992002-04-12 09:54:03 +00004846( exit $ac_status )
4847ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004848fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004850fi
4851
Thomas Wouters477c8d52006-05-27 19:21:47 +00004852
4853
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004854fi
4855
Thomas Wouters477c8d52006-05-27 19:21:47 +00004856{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4857echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004858
Michael W. Hudson54241132001-12-07 15:38:26 +00004859
Martin v. Löwis11437992002-04-12 09:54:03 +00004860if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004861then
4862 ac_cv_kpthread=no
4863else
4864# -Kpthread, if available, provides the right #defines
4865# and linker options to make pthread_create available
4866# Some compilers won't report that they do not support -Kpthread,
4867# so we need to run a program to see whether it really made the
4868# function available.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004869{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4870echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004871if test "${ac_cv_kpthread+set}" = set; then
4872 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004873else
4874 ac_save_cc="$CC"
4875CC="$CC -Kpthread"
4876if test "$cross_compiling" = yes; then
4877 ac_cv_kpthread=no
4878else
Martin v. Löwis11437992002-04-12 09:54:03 +00004879 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004880/* confdefs.h. */
4881_ACEOF
4882cat confdefs.h >>conftest.$ac_ext
4883cat >>conftest.$ac_ext <<_ACEOF
4884/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004885
4886#include <pthread.h>
4887
4888void* routine(void* p){return NULL;}
4889
4890int main(){
4891 pthread_t p;
4892 if(pthread_create(&p,NULL,routine,NULL)!=0)
4893 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004894 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004895 return 0;
4896}
4897
Martin v. Löwis11437992002-04-12 09:54:03 +00004898_ACEOF
4899rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004900if { (ac_try="$ac_link"
4901case "(($ac_try" in
4902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4903 *) ac_try_echo=$ac_try;;
4904esac
4905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4906 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004907 ac_status=$?
4908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4909 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004910 { (case "(($ac_try" in
4911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4912 *) ac_try_echo=$ac_try;;
4913esac
4914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4915 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004916 ac_status=$?
4917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4918 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004919 ac_cv_kpthread=yes
4920else
Martin v. Löwis11437992002-04-12 09:54:03 +00004921 echo "$as_me: program exited with status $ac_status" >&5
4922echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004923sed 's/^/| /' conftest.$ac_ext >&5
4924
Martin v. Löwis11437992002-04-12 09:54:03 +00004925( exit $ac_status )
4926ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004927fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004929fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00004930
4931
Martin v. Löwis130fb172001-07-19 11:00:41 +00004932CC="$ac_save_cc"
4933fi
4934
Thomas Wouters477c8d52006-05-27 19:21:47 +00004935{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4936echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004937fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004938
Skip Montanarod8d39a02003-07-10 20:44:10 +00004939if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004940then
4941# -Kthread, if available, provides the right #defines
4942# and linker options to make pthread_create available
4943# Some compilers won't report that they do not support -Kthread,
4944# so we need to run a program to see whether it really made the
4945# function available.
Thomas Wouters477c8d52006-05-27 19:21:47 +00004946{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4947echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004948if test "${ac_cv_kthread+set}" = set; then
4949 echo $ECHO_N "(cached) $ECHO_C" >&6
4950else
4951 ac_save_cc="$CC"
4952CC="$CC -Kthread"
4953if test "$cross_compiling" = yes; then
4954 ac_cv_kthread=no
4955else
4956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004957/* confdefs.h. */
4958_ACEOF
4959cat confdefs.h >>conftest.$ac_ext
4960cat >>conftest.$ac_ext <<_ACEOF
4961/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004962
4963#include <pthread.h>
4964
4965void* routine(void* p){return NULL;}
4966
4967int main(){
4968 pthread_t p;
4969 if(pthread_create(&p,NULL,routine,NULL)!=0)
4970 return 1;
4971 (void)pthread_detach(p);
4972 return 0;
4973}
4974
4975_ACEOF
4976rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004977if { (ac_try="$ac_link"
4978case "(($ac_try" in
4979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4980 *) ac_try_echo=$ac_try;;
4981esac
4982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4983 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004984 ac_status=$?
4985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4986 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004987 { (case "(($ac_try" in
4988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4989 *) ac_try_echo=$ac_try;;
4990esac
4991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4992 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004993 ac_status=$?
4994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4995 (exit $ac_status); }; }; then
4996 ac_cv_kthread=yes
4997else
4998 echo "$as_me: program exited with status $ac_status" >&5
4999echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005000sed 's/^/| /' conftest.$ac_ext >&5
5001
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005002( exit $ac_status )
5003ac_cv_kthread=no
5004fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005005rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005006fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005007
5008
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005009CC="$ac_save_cc"
5010fi
5011
Thomas Wouters477c8d52006-05-27 19:21:47 +00005012{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5013echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005014fi
5015
Skip Montanarod8d39a02003-07-10 20:44:10 +00005016if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005017then
5018# -pthread, if available, provides the right #defines
5019# and linker options to make pthread_create available
5020# Some compilers won't report that they do not support -pthread,
5021# so we need to run a program to see whether it really made the
5022# function available.
Thomas Wouters477c8d52006-05-27 19:21:47 +00005023{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5024echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005025if test "${ac_cv_thread+set}" = set; then
5026 echo $ECHO_N "(cached) $ECHO_C" >&6
5027else
5028 ac_save_cc="$CC"
5029CC="$CC -pthread"
5030if test "$cross_compiling" = yes; then
5031 ac_cv_pthread=no
5032else
5033 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005034/* confdefs.h. */
5035_ACEOF
5036cat confdefs.h >>conftest.$ac_ext
5037cat >>conftest.$ac_ext <<_ACEOF
5038/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005039
5040#include <pthread.h>
5041
5042void* routine(void* p){return NULL;}
5043
5044int main(){
5045 pthread_t p;
5046 if(pthread_create(&p,NULL,routine,NULL)!=0)
5047 return 1;
5048 (void)pthread_detach(p);
5049 return 0;
5050}
5051
5052_ACEOF
5053rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005054if { (ac_try="$ac_link"
5055case "(($ac_try" in
5056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5057 *) ac_try_echo=$ac_try;;
5058esac
5059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5060 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005061 ac_status=$?
5062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5063 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005064 { (case "(($ac_try" in
5065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5066 *) ac_try_echo=$ac_try;;
5067esac
5068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5069 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005070 ac_status=$?
5071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5072 (exit $ac_status); }; }; then
5073 ac_cv_pthread=yes
5074else
5075 echo "$as_me: program exited with status $ac_status" >&5
5076echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005077sed 's/^/| /' conftest.$ac_ext >&5
5078
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005079( exit $ac_status )
5080ac_cv_pthread=no
5081fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005083fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005084
5085
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005086CC="$ac_save_cc"
5087fi
5088
Thomas Wouters477c8d52006-05-27 19:21:47 +00005089{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5090echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005091fi
5092
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005093# If we have set a CC compiler flag for thread support then
5094# check if it works for CXX, too.
5095ac_cv_cxx_thread=no
5096if test ! -z "$CXX"
5097then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005098{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5099echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005100ac_save_cxx="$CXX"
5101
5102if test "$ac_cv_kpthread" = "yes"
5103then
5104 CXX="$CXX -Kpthread"
5105 ac_cv_cxx_thread=yes
5106elif test "$ac_cv_kthread" = "yes"
5107then
5108 CXX="$CXX -Kthread"
5109 ac_cv_cxx_thread=yes
5110elif test "$ac_cv_pthread" = "yes"
5111then
5112 CXX="$CXX -pthread"
5113 ac_cv_cxx_thread=yes
5114fi
5115
5116if test $ac_cv_cxx_thread = yes
5117then
5118 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5119 $CXX -c conftest.$ac_ext 2>&5
5120 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5121 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5122 then
5123 ac_cv_cxx_thread=yes
5124 else
5125 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005126 fi
5127 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005128fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005129{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5130echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005131fi
5132CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005133
Michael W. Hudson54241132001-12-07 15:38:26 +00005134
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005135# checks for header files
Thomas Wouters477c8d52006-05-27 19:21:47 +00005136{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5137echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005138if test "${ac_cv_header_stdc+set}" = set; then
5139 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005140else
Martin v. Löwis11437992002-04-12 09:54:03 +00005141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005142/* confdefs.h. */
5143_ACEOF
5144cat confdefs.h >>conftest.$ac_ext
5145cat >>conftest.$ac_ext <<_ACEOF
5146/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005147#include <stdlib.h>
5148#include <stdarg.h>
5149#include <string.h>
5150#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005151
Skip Montanaro6dead952003-09-25 14:50:04 +00005152int
5153main ()
5154{
5155
5156 ;
5157 return 0;
5158}
Martin v. Löwis11437992002-04-12 09:54:03 +00005159_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005160rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005161if { (ac_try="$ac_compile"
5162case "(($ac_try" in
5163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5164 *) ac_try_echo=$ac_try;;
5165esac
5166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5167 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005168 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005169 grep -v '^ *+' conftest.er1 >conftest.err
5170 rm -f conftest.er1
5171 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005173 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005174 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5175 { (case "(($ac_try" in
5176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5177 *) ac_try_echo=$ac_try;;
5178esac
5179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5180 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005181 ac_status=$?
5182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5183 (exit $ac_status); }; } &&
5184 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005185 { (case "(($ac_try" in
5186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5187 *) ac_try_echo=$ac_try;;
5188esac
5189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5190 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005191 ac_status=$?
5192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5193 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005194 ac_cv_header_stdc=yes
5195else
Martin v. Löwis11437992002-04-12 09:54:03 +00005196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005197sed 's/^/| /' conftest.$ac_ext >&5
5198
Thomas Wouters477c8d52006-05-27 19:21:47 +00005199 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005200fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005201
Skip Montanarof0d5f792004-08-15 14:08:23 +00005202rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005203
5204if test $ac_cv_header_stdc = yes; then
5205 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005207/* confdefs.h. */
5208_ACEOF
5209cat confdefs.h >>conftest.$ac_ext
5210cat >>conftest.$ac_ext <<_ACEOF
5211/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005212#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005213
5214_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005216 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005217 :
5218else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005219 ac_cv_header_stdc=no
5220fi
5221rm -f conftest*
5222
5223fi
5224
5225if test $ac_cv_header_stdc = yes; then
5226 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005228/* confdefs.h. */
5229_ACEOF
5230cat confdefs.h >>conftest.$ac_ext
5231cat >>conftest.$ac_ext <<_ACEOF
5232/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005233#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005234
5235_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005237 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005238 :
5239else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005240 ac_cv_header_stdc=no
5241fi
5242rm -f conftest*
5243
5244fi
5245
5246if test $ac_cv_header_stdc = yes; then
5247 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005248 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005249 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005250else
Martin v. Löwis11437992002-04-12 09:54:03 +00005251 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005252/* confdefs.h. */
5253_ACEOF
5254cat confdefs.h >>conftest.$ac_ext
5255cat >>conftest.$ac_ext <<_ACEOF
5256/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005257#include <ctype.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +00005258#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005259#if ((' ' & 0x0FF) == 0x020)
5260# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5261# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5262#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005263# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005264 (('a' <= (c) && (c) <= 'i') \
5265 || ('j' <= (c) && (c) <= 'r') \
5266 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005267# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5268#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005269
Martin v. Löwis11437992002-04-12 09:54:03 +00005270#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5271int
5272main ()
5273{
5274 int i;
5275 for (i = 0; i < 256; i++)
5276 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005277 || toupper (i) != TOUPPER (i))
Thomas Wouters477c8d52006-05-27 19:21:47 +00005278 return 2;
5279 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005280}
5281_ACEOF
5282rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005283if { (ac_try="$ac_link"
5284case "(($ac_try" in
5285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5286 *) ac_try_echo=$ac_try;;
5287esac
5288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5289 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005290 ac_status=$?
5291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5292 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005293 { (case "(($ac_try" in
5294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5295 *) ac_try_echo=$ac_try;;
5296esac
5297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5298 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005299 ac_status=$?
5300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5301 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005302 :
5303else
Martin v. Löwis11437992002-04-12 09:54:03 +00005304 echo "$as_me: program exited with status $ac_status" >&5
5305echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005306sed 's/^/| /' conftest.$ac_ext >&5
5307
Martin v. Löwis11437992002-04-12 09:54:03 +00005308( exit $ac_status )
5309ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005310fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5312fi
5313
5314
Michael W. Hudson54241132001-12-07 15:38:26 +00005315fi
5316fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005317{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5318echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005319if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005320
5321cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005322#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005323_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005324
5325fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005326
Skip Montanarob9820a32004-01-17 00:16:12 +00005327# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005338 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005339do
5340as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00005341{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5342echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5343if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005344 echo $ECHO_N "(cached) $ECHO_C" >&6
5345else
5346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005347/* confdefs.h. */
5348_ACEOF
5349cat confdefs.h >>conftest.$ac_ext
5350cat >>conftest.$ac_ext <<_ACEOF
5351/* end confdefs.h. */
5352$ac_includes_default
5353
5354#include <$ac_header>
5355_ACEOF
5356rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005357if { (ac_try="$ac_compile"
5358case "(($ac_try" in
5359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5360 *) ac_try_echo=$ac_try;;
5361esac
5362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5363 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005365 grep -v '^ *+' conftest.er1 >conftest.err
5366 rm -f conftest.er1
5367 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5369 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005370 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5371 { (case "(($ac_try" in
5372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5373 *) ac_try_echo=$ac_try;;
5374esac
5375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5376 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005377 ac_status=$?
5378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5379 (exit $ac_status); }; } &&
5380 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005381 { (case "(($ac_try" in
5382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5383 *) ac_try_echo=$ac_try;;
5384esac
5385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5386 (eval "$ac_try") 2>&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005387 ac_status=$?
5388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5389 (exit $ac_status); }; }; then
5390 eval "$as_ac_Header=yes"
5391else
5392 echo "$as_me: failed program was:" >&5
5393sed 's/^/| /' conftest.$ac_ext >&5
5394
Thomas Wouters477c8d52006-05-27 19:21:47 +00005395 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005396fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005397
Skip Montanarof0d5f792004-08-15 14:08:23 +00005398rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005399fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005400ac_res=`eval echo '${'$as_ac_Header'}'`
5401 { echo "$as_me:$LINENO: result: $ac_res" >&5
5402echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005403if test `eval echo '${'$as_ac_Header'}'` = yes; then
5404 cat >>confdefs.h <<_ACEOF
5405#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5406_ACEOF
5407
5408fi
5409
5410done
5411
5412
Martin v. Löwis11437992002-04-12 09:54:03 +00005413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
Anthony Baxter8a560de2004-10-13 15:30:56 +00005449
Martin v. Löwisc3001752005-01-23 09:27:24 +00005450
Martin v. Löwis11017b12006-01-14 18:12:57 +00005451
Thomas Wouters477c8d52006-05-27 19:21:47 +00005452
Martin v. Löwis11017b12006-01-14 18:12:57 +00005453for ac_header in asm/types.h curses.h dlfcn.h fcntl.h grp.h \
5454shadow.h langinfo.h libintl.h ncurses.h poll.h pthread.h \
Skip Montanaro7befb992004-02-10 16:50:21 +00005455stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005456unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00005457sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
5458sys/modem.h \
Thomas Wouters477c8d52006-05-27 19:21:47 +00005459sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/time.h \
5460sys/times.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00005461sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
5462bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005463do
Martin v. Löwis11437992002-04-12 09:54:03 +00005464as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00005465if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5466 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5467echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5468if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005469 echo $ECHO_N "(cached) $ECHO_C" >&6
5470fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005471ac_res=`eval echo '${'$as_ac_Header'}'`
5472 { echo "$as_me:$LINENO: result: $ac_res" >&5
5473echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005474else
Martin v. Löwis11437992002-04-12 09:54:03 +00005475 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +00005476{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5477echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005478cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005479/* confdefs.h. */
5480_ACEOF
5481cat confdefs.h >>conftest.$ac_ext
5482cat >>conftest.$ac_ext <<_ACEOF
5483/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005484$ac_includes_default
5485#include <$ac_header>
5486_ACEOF
5487rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005488if { (ac_try="$ac_compile"
5489case "(($ac_try" in
5490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5491 *) ac_try_echo=$ac_try;;
5492esac
5493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5494 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005495 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005496 grep -v '^ *+' conftest.er1 >conftest.err
5497 rm -f conftest.er1
5498 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5500 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005501 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5502 { (case "(($ac_try" in
5503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5504 *) ac_try_echo=$ac_try;;
5505esac
5506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5507 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005508 ac_status=$?
5509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5510 (exit $ac_status); }; } &&
5511 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005512 { (case "(($ac_try" in
5513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5514 *) ac_try_echo=$ac_try;;
5515esac
5516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5517 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005518 ac_status=$?
5519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5520 (exit $ac_status); }; }; then
5521 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005522else
Martin v. Löwis11437992002-04-12 09:54:03 +00005523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005524sed 's/^/| /' conftest.$ac_ext >&5
5525
Thomas Wouters477c8d52006-05-27 19:21:47 +00005526 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005527fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005528
Skip Montanarof0d5f792004-08-15 14:08:23 +00005529rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00005530{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5531echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005532
5533# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +00005534{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5535echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005536cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005537/* confdefs.h. */
5538_ACEOF
5539cat confdefs.h >>conftest.$ac_ext
5540cat >>conftest.$ac_ext <<_ACEOF
5541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005542#include <$ac_header>
5543_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005544if { (ac_try="$ac_cpp conftest.$ac_ext"
5545case "(($ac_try" in
5546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5547 *) ac_try_echo=$ac_try;;
5548esac
5549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5550 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005551 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005552 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005553 rm -f conftest.er1
5554 cat conftest.err >&5
5555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5556 (exit $ac_status); } >/dev/null; then
5557 if test -s conftest.err; then
5558 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005559 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00005560 else
5561 ac_cpp_err=
5562 fi
5563else
5564 ac_cpp_err=yes
5565fi
5566if test -z "$ac_cpp_err"; then
5567 ac_header_preproc=yes
5568else
5569 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005570sed 's/^/| /' conftest.$ac_ext >&5
5571
Martin v. Löwis11437992002-04-12 09:54:03 +00005572 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005573fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005574
Martin v. Löwis11437992002-04-12 09:54:03 +00005575rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00005576{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5577echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005578
5579# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005580case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5581 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005582 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5583echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005584 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5585echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5586 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005587 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005588 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005589 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5590echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005591 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5592echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5593 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5594echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5595 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5596echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005597 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5598echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005599 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5600echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00005601 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005602## ------------------------------------------------ ##
5603## Report this to http://www.python.org/python-bugs ##
5604## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005605_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +00005606 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005607 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005608esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00005609{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5610echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5611if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005612 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005613else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005614 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005615fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005616ac_res=`eval echo '${'$as_ac_Header'}'`
5617 { echo "$as_me:$LINENO: result: $ac_res" >&5
5618echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005619
5620fi
5621if test `eval echo '${'$as_ac_Header'}'` = yes; then
5622 cat >>confdefs.h <<_ACEOF
5623#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5624_ACEOF
5625
5626fi
5627
Guido van Rossum627b2d71993-12-24 10:39:16 +00005628done
5629
Martin v. Löwis11437992002-04-12 09:54:03 +00005630
5631
5632
5633
5634
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005635ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005636for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5637 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00005638{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5639echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5640if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005641 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005642else
Martin v. Löwis11437992002-04-12 09:54:03 +00005643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005644/* confdefs.h. */
5645_ACEOF
5646cat confdefs.h >>conftest.$ac_ext
5647cat >>conftest.$ac_ext <<_ACEOF
5648/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005649#include <sys/types.h>
5650#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005651
Martin v. Löwis11437992002-04-12 09:54:03 +00005652int
5653main ()
5654{
5655if ((DIR *) 0)
5656return 0;
5657 ;
5658 return 0;
5659}
5660_ACEOF
5661rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005662if { (ac_try="$ac_compile"
5663case "(($ac_try" in
5664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5665 *) ac_try_echo=$ac_try;;
5666esac
5667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5668 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005670 grep -v '^ *+' conftest.er1 >conftest.err
5671 rm -f conftest.er1
5672 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5674 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005675 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5676 { (case "(($ac_try" in
5677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5678 *) ac_try_echo=$ac_try;;
5679esac
5680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5681 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005682 ac_status=$?
5683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5684 (exit $ac_status); }; } &&
5685 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005686 { (case "(($ac_try" in
5687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5688 *) ac_try_echo=$ac_try;;
5689esac
5690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5691 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005692 ac_status=$?
5693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5694 (exit $ac_status); }; }; then
5695 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005696else
Martin v. Löwis11437992002-04-12 09:54:03 +00005697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005698sed 's/^/| /' conftest.$ac_ext >&5
5699
Thomas Wouters477c8d52006-05-27 19:21:47 +00005700 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005701fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005702
Skip Montanarof0d5f792004-08-15 14:08:23 +00005703rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005704fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005705ac_res=`eval echo '${'$as_ac_Header'}'`
5706 { echo "$as_me:$LINENO: result: $ac_res" >&5
5707echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005708if test `eval echo '${'$as_ac_Header'}'` = yes; then
5709 cat >>confdefs.h <<_ACEOF
5710#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5711_ACEOF
5712
5713ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005714fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005715
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005716done
5717# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5718if test $ac_header_dirent = dirent.h; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005719 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5720echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005721if test "${ac_cv_search_opendir+set}" = set; then
5722 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005723else
Martin v. Löwis11437992002-04-12 09:54:03 +00005724 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005725cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005726/* confdefs.h. */
5727_ACEOF
5728cat confdefs.h >>conftest.$ac_ext
5729cat >>conftest.$ac_ext <<_ACEOF
5730/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005731
Thomas Wouters477c8d52006-05-27 19:21:47 +00005732/* Override any GCC internal prototype to avoid an error.
5733 Use char because int might match the return type of a GCC
5734 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005735#ifdef __cplusplus
5736extern "C"
5737#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005738char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005739int
5740main ()
5741{
Thomas Wouters477c8d52006-05-27 19:21:47 +00005742return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005743 ;
5744 return 0;
5745}
5746_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00005747for ac_lib in '' dir; do
5748 if test -z "$ac_lib"; then
5749 ac_res="none required"
5750 else
5751 ac_res=-l$ac_lib
Martin v. Löwis11437992002-04-12 09:54:03 +00005752 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters477c8d52006-05-27 19:21:47 +00005753 fi
5754 rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005755if { (ac_try="$ac_link"
5756case "(($ac_try" in
5757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5758 *) ac_try_echo=$ac_try;;
5759esac
5760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5761 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005763 grep -v '^ *+' conftest.er1 >conftest.err
5764 rm -f conftest.er1
5765 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5767 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005768 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5769 { (case "(($ac_try" in
5770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5771 *) ac_try_echo=$ac_try;;
5772esac
5773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5774 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005775 ac_status=$?
5776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5777 (exit $ac_status); }; } &&
5778 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005779 { (case "(($ac_try" in
5780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5781 *) ac_try_echo=$ac_try;;
5782esac
5783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5784 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005785 ac_status=$?
5786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5787 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005788 ac_cv_search_opendir=$ac_res
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005789else
Martin v. Löwis11437992002-04-12 09:54:03 +00005790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005791sed 's/^/| /' conftest.$ac_ext >&5
5792
Thomas Wouters477c8d52006-05-27 19:21:47 +00005793
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005794fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005795
Skip Montanarof0d5f792004-08-15 14:08:23 +00005796rm -f conftest.err conftest.$ac_objext \
Thomas Wouters477c8d52006-05-27 19:21:47 +00005797 conftest$ac_exeext
5798 if test "${ac_cv_search_opendir+set}" = set; then
5799 break
Martin v. Löwis11437992002-04-12 09:54:03 +00005800fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005801done
5802if test "${ac_cv_search_opendir+set}" = set; then
5803 :
5804else
5805 ac_cv_search_opendir=no
5806fi
5807rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005808LIBS=$ac_func_search_save_LIBS
5809fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005810{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5811echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5812ac_res=$ac_cv_search_opendir
5813if test "$ac_res" != no; then
5814 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005815
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005816fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005817
Michael W. Hudson54241132001-12-07 15:38:26 +00005818else
Thomas Wouters477c8d52006-05-27 19:21:47 +00005819 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5820echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005821if test "${ac_cv_search_opendir+set}" = set; then
5822 echo $ECHO_N "(cached) $ECHO_C" >&6
5823else
5824 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005825cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005826/* confdefs.h. */
5827_ACEOF
5828cat confdefs.h >>conftest.$ac_ext
5829cat >>conftest.$ac_ext <<_ACEOF
5830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005831
Thomas Wouters477c8d52006-05-27 19:21:47 +00005832/* Override any GCC internal prototype to avoid an error.
5833 Use char because int might match the return type of a GCC
5834 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005835#ifdef __cplusplus
5836extern "C"
5837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005838char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005839int
5840main ()
5841{
Thomas Wouters477c8d52006-05-27 19:21:47 +00005842return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005843 ;
5844 return 0;
5845}
5846_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00005847for ac_lib in '' x; do
5848 if test -z "$ac_lib"; then
5849 ac_res="none required"
5850 else
5851 ac_res=-l$ac_lib
Martin v. Löwis11437992002-04-12 09:54:03 +00005852 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters477c8d52006-05-27 19:21:47 +00005853 fi
5854 rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005855if { (ac_try="$ac_link"
5856case "(($ac_try" in
5857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5858 *) ac_try_echo=$ac_try;;
5859esac
5860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5861 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005863 grep -v '^ *+' conftest.er1 >conftest.err
5864 rm -f conftest.er1
5865 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5867 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005868 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5869 { (case "(($ac_try" in
5870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5871 *) ac_try_echo=$ac_try;;
5872esac
5873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5874 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005875 ac_status=$?
5876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5877 (exit $ac_status); }; } &&
5878 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005879 { (case "(($ac_try" in
5880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5881 *) ac_try_echo=$ac_try;;
5882esac
5883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5884 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005885 ac_status=$?
5886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5887 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005888 ac_cv_search_opendir=$ac_res
Martin v. Löwis11437992002-04-12 09:54:03 +00005889else
5890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005891sed 's/^/| /' conftest.$ac_ext >&5
5892
Thomas Wouters477c8d52006-05-27 19:21:47 +00005893
Martin v. Löwis11437992002-04-12 09:54:03 +00005894fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005895
Skip Montanarof0d5f792004-08-15 14:08:23 +00005896rm -f conftest.err conftest.$ac_objext \
Thomas Wouters477c8d52006-05-27 19:21:47 +00005897 conftest$ac_exeext
5898 if test "${ac_cv_search_opendir+set}" = set; then
5899 break
Martin v. Löwis11437992002-04-12 09:54:03 +00005900fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005901done
5902if test "${ac_cv_search_opendir+set}" = set; then
5903 :
5904else
5905 ac_cv_search_opendir=no
5906fi
5907rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005908LIBS=$ac_func_search_save_LIBS
5909fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005910{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5911echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5912ac_res=$ac_cv_search_opendir
5913if test "$ac_res" != no; then
5914 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005915
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005916fi
5917
5918fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005919
Thomas Wouters477c8d52006-05-27 19:21:47 +00005920{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5921echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005922if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5923 echo $ECHO_N "(cached) $ECHO_C" >&6
5924else
5925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005926/* confdefs.h. */
5927_ACEOF
5928cat confdefs.h >>conftest.$ac_ext
5929cat >>conftest.$ac_ext <<_ACEOF
5930/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005931#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005932int
5933main ()
5934{
5935return makedev(0, 0);
5936 ;
5937 return 0;
5938}
5939_ACEOF
5940rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005941if { (ac_try="$ac_link"
5942case "(($ac_try" in
5943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5944 *) ac_try_echo=$ac_try;;
5945esac
5946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5947 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005949 grep -v '^ *+' conftest.er1 >conftest.err
5950 rm -f conftest.er1
5951 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5953 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005954 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
5955 { (case "(($ac_try" in
5956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5957 *) ac_try_echo=$ac_try;;
5958esac
5959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5960 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005961 ac_status=$?
5962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5963 (exit $ac_status); }; } &&
5964 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00005965 { (case "(($ac_try" in
5966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5967 *) ac_try_echo=$ac_try;;
5968esac
5969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5970 (eval "$ac_try") 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005971 ac_status=$?
5972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5973 (exit $ac_status); }; }; then
5974 ac_cv_header_sys_types_h_makedev=yes
5975else
5976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005977sed 's/^/| /' conftest.$ac_ext >&5
5978
Thomas Wouters477c8d52006-05-27 19:21:47 +00005979 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005980fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005981
Skip Montanarof0d5f792004-08-15 14:08:23 +00005982rm -f conftest.err conftest.$ac_objext \
5983 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005984
5985fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005986{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5987echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005988
5989if test $ac_cv_header_sys_types_h_makedev = no; then
5990if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00005991 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5992echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005993if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5994 echo $ECHO_N "(cached) $ECHO_C" >&6
5995fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00005996{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5997echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005998else
5999 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +00006000{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6001echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006002cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006003/* confdefs.h. */
6004_ACEOF
6005cat confdefs.h >>conftest.$ac_ext
6006cat >>conftest.$ac_ext <<_ACEOF
6007/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006008$ac_includes_default
6009#include <sys/mkdev.h>
6010_ACEOF
6011rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006012if { (ac_try="$ac_compile"
6013case "(($ac_try" in
6014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6015 *) ac_try_echo=$ac_try;;
6016esac
6017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6018 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006020 grep -v '^ *+' conftest.er1 >conftest.err
6021 rm -f conftest.er1
6022 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6024 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006025 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6026 { (case "(($ac_try" in
6027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6028 *) ac_try_echo=$ac_try;;
6029esac
6030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6031 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006032 ac_status=$?
6033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6034 (exit $ac_status); }; } &&
6035 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006036 { (case "(($ac_try" in
6037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6038 *) ac_try_echo=$ac_try;;
6039esac
6040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6041 (eval "$ac_try") 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006042 ac_status=$?
6043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6044 (exit $ac_status); }; }; then
6045 ac_header_compiler=yes
6046else
6047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006048sed 's/^/| /' conftest.$ac_ext >&5
6049
Thomas Wouters477c8d52006-05-27 19:21:47 +00006050 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006051fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006052
Skip Montanarof0d5f792004-08-15 14:08:23 +00006053rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006054{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6055echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006056
6057# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +00006058{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6059echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006060cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006061/* confdefs.h. */
6062_ACEOF
6063cat confdefs.h >>conftest.$ac_ext
6064cat >>conftest.$ac_ext <<_ACEOF
6065/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006066#include <sys/mkdev.h>
6067_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006068if { (ac_try="$ac_cpp conftest.$ac_ext"
6069case "(($ac_try" in
6070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6071 *) ac_try_echo=$ac_try;;
6072esac
6073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6074 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006075 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006076 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006077 rm -f conftest.er1
6078 cat conftest.err >&5
6079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6080 (exit $ac_status); } >/dev/null; then
6081 if test -s conftest.err; then
6082 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00006083 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084 else
6085 ac_cpp_err=
6086 fi
6087else
6088 ac_cpp_err=yes
6089fi
6090if test -z "$ac_cpp_err"; then
6091 ac_header_preproc=yes
6092else
6093 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006094sed 's/^/| /' conftest.$ac_ext >&5
6095
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006096 ac_header_preproc=no
6097fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006098
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006100{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6101echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102
6103# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006104case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6105 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006106 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6107echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006108 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6109echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6110 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006111 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006112 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006113 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6114echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006115 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6116echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6117 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6118echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6119 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6120echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006121 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6122echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006123 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6124echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00006125 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006126## ------------------------------------------------ ##
6127## Report this to http://www.python.org/python-bugs ##
6128## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006129_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +00006130 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006131 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006132esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00006133{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6134echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006135if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6136 echo $ECHO_N "(cached) $ECHO_C" >&6
6137else
6138 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6139fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006140{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6141echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006142
6143fi
6144if test $ac_cv_header_sys_mkdev_h = yes; then
6145
6146cat >>confdefs.h <<\_ACEOF
6147#define MAJOR_IN_MKDEV 1
6148_ACEOF
6149
6150fi
6151
6152
6153
6154 if test $ac_cv_header_sys_mkdev_h = no; then
6155 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00006156 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6157echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6159 echo $ECHO_N "(cached) $ECHO_C" >&6
6160fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006161{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6162echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163else
6164 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +00006165{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6166echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006168/* confdefs.h. */
6169_ACEOF
6170cat confdefs.h >>conftest.$ac_ext
6171cat >>conftest.$ac_ext <<_ACEOF
6172/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173$ac_includes_default
6174#include <sys/sysmacros.h>
6175_ACEOF
6176rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006177if { (ac_try="$ac_compile"
6178case "(($ac_try" in
6179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6180 *) ac_try_echo=$ac_try;;
6181esac
6182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6183 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006185 grep -v '^ *+' conftest.er1 >conftest.err
6186 rm -f conftest.er1
6187 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6189 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006190 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6191 { (case "(($ac_try" in
6192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6193 *) ac_try_echo=$ac_try;;
6194esac
6195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6196 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006197 ac_status=$?
6198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6199 (exit $ac_status); }; } &&
6200 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006201 { (case "(($ac_try" in
6202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6203 *) ac_try_echo=$ac_try;;
6204esac
6205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6206 (eval "$ac_try") 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207 ac_status=$?
6208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6209 (exit $ac_status); }; }; then
6210 ac_header_compiler=yes
6211else
6212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006213sed 's/^/| /' conftest.$ac_ext >&5
6214
Thomas Wouters477c8d52006-05-27 19:21:47 +00006215 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006217
Skip Montanarof0d5f792004-08-15 14:08:23 +00006218rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006219{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6220echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221
6222# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +00006223{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6224echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006226/* confdefs.h. */
6227_ACEOF
6228cat confdefs.h >>conftest.$ac_ext
6229cat >>conftest.$ac_ext <<_ACEOF
6230/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006231#include <sys/sysmacros.h>
6232_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006233if { (ac_try="$ac_cpp conftest.$ac_ext"
6234case "(($ac_try" in
6235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6236 *) ac_try_echo=$ac_try;;
6237esac
6238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6239 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006241 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006242 rm -f conftest.er1
6243 cat conftest.err >&5
6244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6245 (exit $ac_status); } >/dev/null; then
6246 if test -s conftest.err; then
6247 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00006248 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249 else
6250 ac_cpp_err=
6251 fi
6252else
6253 ac_cpp_err=yes
6254fi
6255if test -z "$ac_cpp_err"; then
6256 ac_header_preproc=yes
6257else
6258 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006259sed 's/^/| /' conftest.$ac_ext >&5
6260
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006261 ac_header_preproc=no
6262fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006263
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006265{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6266echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267
6268# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006269case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6270 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006271 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6272echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006273 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6274echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6275 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006276 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006277 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006278 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6279echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006280 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6281echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6282 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6283echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6284 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6285echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006286 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6287echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006288 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6289echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00006290 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006291## ------------------------------------------------ ##
6292## Report this to http://www.python.org/python-bugs ##
6293## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006294_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +00006295 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006296 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006297esac
Thomas Wouters477c8d52006-05-27 19:21:47 +00006298{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6299echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006300if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6301 echo $ECHO_N "(cached) $ECHO_C" >&6
6302else
6303 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6304fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006305{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6306echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006307
6308fi
6309if test $ac_cv_header_sys_sysmacros_h = yes; then
6310
6311cat >>confdefs.h <<\_ACEOF
6312#define MAJOR_IN_SYSMACROS 1
6313_ACEOF
6314
6315fi
6316
6317
6318 fi
6319fi
6320
Michael W. Hudson54241132001-12-07 15:38:26 +00006321
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006322# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006323
6324for ac_header in term.h
6325do
6326as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00006327{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6328echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6329if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006330 echo $ECHO_N "(cached) $ECHO_C" >&6
6331else
6332 cat >conftest.$ac_ext <<_ACEOF
6333/* confdefs.h. */
6334_ACEOF
6335cat confdefs.h >>conftest.$ac_ext
6336cat >>conftest.$ac_ext <<_ACEOF
6337/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006338
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006339#ifdef HAVE_CURSES_H
6340#include <curses.h>
6341#endif
6342
6343
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006344#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006345_ACEOF
6346rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006347if { (ac_try="$ac_compile"
6348case "(($ac_try" in
6349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6350 *) ac_try_echo=$ac_try;;
6351esac
6352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006354 ac_status=$?
6355 grep -v '^ *+' conftest.er1 >conftest.err
6356 rm -f conftest.er1
6357 cat conftest.err >&5
6358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6359 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006360 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6361 { (case "(($ac_try" in
6362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6363 *) ac_try_echo=$ac_try;;
6364esac
6365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6366 (eval "$ac_try") 2>&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006367 ac_status=$?
6368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6369 (exit $ac_status); }; } &&
6370 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006371 { (case "(($ac_try" in
6372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6373 *) ac_try_echo=$ac_try;;
6374esac
6375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6376 (eval "$ac_try") 2>&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006377 ac_status=$?
6378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6379 (exit $ac_status); }; }; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006380 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006381else
6382 echo "$as_me: failed program was:" >&5
6383sed 's/^/| /' conftest.$ac_ext >&5
6384
Thomas Wouters477c8d52006-05-27 19:21:47 +00006385 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006386fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006387
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006388rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6389fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006390ac_res=`eval echo '${'$as_ac_Header'}'`
6391 { echo "$as_me:$LINENO: result: $ac_res" >&5
6392echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006393if test `eval echo '${'$as_ac_Header'}'` = yes; then
6394 cat >>confdefs.h <<_ACEOF
6395#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6396_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006397
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006398fi
6399
6400done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006401
6402
Martin v. Löwis11017b12006-01-14 18:12:57 +00006403# On Linux, netlink.h requires asm/types.h
6404
6405for ac_header in linux/netlink.h
6406do
6407as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +00006408{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6409echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6410if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006411 echo $ECHO_N "(cached) $ECHO_C" >&6
6412else
6413 cat >conftest.$ac_ext <<_ACEOF
6414/* confdefs.h. */
6415_ACEOF
6416cat confdefs.h >>conftest.$ac_ext
6417cat >>conftest.$ac_ext <<_ACEOF
6418/* end confdefs.h. */
6419
6420#ifdef HAVE_ASM_TYPES_H
6421#include <asm/types.h>
6422#endif
6423#ifdef HAVE_SYS_SOCKET_H
6424#include <sys/socket.h>
6425#endif
6426
6427
6428#include <$ac_header>
6429_ACEOF
6430rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006431if { (ac_try="$ac_compile"
6432case "(($ac_try" in
6433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6434 *) ac_try_echo=$ac_try;;
6435esac
6436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006438 ac_status=$?
6439 grep -v '^ *+' conftest.er1 >conftest.err
6440 rm -f conftest.er1
6441 cat conftest.err >&5
6442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6443 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006444 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6445 { (case "(($ac_try" in
6446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6447 *) ac_try_echo=$ac_try;;
6448esac
6449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6450 (eval "$ac_try") 2>&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006451 ac_status=$?
6452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6453 (exit $ac_status); }; } &&
6454 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006455 { (case "(($ac_try" in
6456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6457 *) ac_try_echo=$ac_try;;
6458esac
6459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6460 (eval "$ac_try") 2>&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006461 ac_status=$?
6462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6463 (exit $ac_status); }; }; then
6464 eval "$as_ac_Header=yes"
6465else
6466 echo "$as_me: failed program was:" >&5
6467sed 's/^/| /' conftest.$ac_ext >&5
6468
Thomas Wouters477c8d52006-05-27 19:21:47 +00006469 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006470fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006471
Martin v. Löwis11017b12006-01-14 18:12:57 +00006472rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6473fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006474ac_res=`eval echo '${'$as_ac_Header'}'`
6475 { echo "$as_me:$LINENO: result: $ac_res" >&5
6476echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006477if test `eval echo '${'$as_ac_Header'}'` = yes; then
6478 cat >>confdefs.h <<_ACEOF
6479#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6480_ACEOF
6481
6482fi
6483
6484done
6485
6486
Guido van Rossum627b2d71993-12-24 10:39:16 +00006487# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006488was_it_defined=no
Thomas Wouters477c8d52006-05-27 19:21:47 +00006489{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6490echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006491cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006492/* confdefs.h. */
6493_ACEOF
6494cat confdefs.h >>conftest.$ac_ext
6495cat >>conftest.$ac_ext <<_ACEOF
6496/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006497#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006498
6499_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006500if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006501 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006502 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006503else
Martin v. Löwis11437992002-04-12 09:54:03 +00006504
6505
6506cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006507#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006508_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006509
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006510
Guido van Rossum627b2d71993-12-24 10:39:16 +00006511fi
6512rm -f conftest*
6513
Thomas Wouters477c8d52006-05-27 19:21:47 +00006514{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6515echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006516
Neal Norwitz11690112002-07-30 01:08:28 +00006517# Check whether using makedev requires defining _OSF_SOURCE
Thomas Wouters477c8d52006-05-27 19:21:47 +00006518{ echo "$as_me:$LINENO: checking for makedev" >&5
6519echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006520cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006521/* confdefs.h. */
6522_ACEOF
6523cat confdefs.h >>conftest.$ac_ext
6524cat >>conftest.$ac_ext <<_ACEOF
6525/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006526#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006527int
6528main ()
6529{
6530 makedev(0, 0)
6531 ;
6532 return 0;
6533}
6534_ACEOF
6535rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006536if { (ac_try="$ac_link"
6537case "(($ac_try" in
6538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6539 *) ac_try_echo=$ac_try;;
6540esac
6541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6542 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006544 grep -v '^ *+' conftest.er1 >conftest.err
6545 rm -f conftest.er1
6546 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6548 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006549 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6550 { (case "(($ac_try" in
6551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6552 *) ac_try_echo=$ac_try;;
6553esac
6554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6555 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006556 ac_status=$?
6557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6558 (exit $ac_status); }; } &&
6559 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006560 { (case "(($ac_try" in
6561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6562 *) ac_try_echo=$ac_try;;
6563esac
6564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6565 (eval "$ac_try") 2>&5
Neal Norwitz11690112002-07-30 01:08:28 +00006566 ac_status=$?
6567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6568 (exit $ac_status); }; }; then
6569 ac_cv_has_makedev=yes
6570else
6571 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006572sed 's/^/| /' conftest.$ac_ext >&5
6573
Thomas Wouters477c8d52006-05-27 19:21:47 +00006574 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006575fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006576
Skip Montanarof0d5f792004-08-15 14:08:23 +00006577rm -f conftest.err conftest.$ac_objext \
6578 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006579if test "$ac_cv_has_makedev" = "no"; then
6580 # we didn't link, try if _OSF_SOURCE will allow us to link
6581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006582/* confdefs.h. */
6583_ACEOF
6584cat confdefs.h >>conftest.$ac_ext
6585cat >>conftest.$ac_ext <<_ACEOF
6586/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006587
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006588#define _OSF_SOURCE 1
6589#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006590
Neal Norwitz11690112002-07-30 01:08:28 +00006591int
6592main ()
6593{
6594 makedev(0, 0)
6595 ;
6596 return 0;
6597}
6598_ACEOF
6599rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006600if { (ac_try="$ac_link"
6601case "(($ac_try" in
6602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6603 *) ac_try_echo=$ac_try;;
6604esac
6605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6606 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006608 grep -v '^ *+' conftest.er1 >conftest.err
6609 rm -f conftest.er1
6610 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6612 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006613 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6614 { (case "(($ac_try" in
6615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6616 *) ac_try_echo=$ac_try;;
6617esac
6618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6619 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006620 ac_status=$?
6621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6622 (exit $ac_status); }; } &&
6623 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006624 { (case "(($ac_try" in
6625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6626 *) ac_try_echo=$ac_try;;
6627esac
6628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6629 (eval "$ac_try") 2>&5
Neal Norwitz11690112002-07-30 01:08:28 +00006630 ac_status=$?
6631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6632 (exit $ac_status); }; }; then
6633 ac_cv_has_makedev=yes
6634else
6635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006636sed 's/^/| /' conftest.$ac_ext >&5
6637
Thomas Wouters477c8d52006-05-27 19:21:47 +00006638 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006639fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006640
Skip Montanarof0d5f792004-08-15 14:08:23 +00006641rm -f conftest.err conftest.$ac_objext \
6642 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006643 if test "$ac_cv_has_makedev" = "yes"; then
6644
6645cat >>confdefs.h <<\_ACEOF
6646#define _OSF_SOURCE 1
6647_ACEOF
6648
6649 fi
6650fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006651{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6652echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006653if test "$ac_cv_has_makedev" = "yes"; then
6654
6655cat >>confdefs.h <<\_ACEOF
6656#define HAVE_MAKEDEV 1
6657_ACEOF
6658
6659fi
6660
Martin v. Löwis399a6892002-10-04 10:22:02 +00006661# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6662# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6663# defined, but the compiler does not support pragma redefine_extname,
6664# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6665# structures (such as rlimit64) without declaring them. As a
6666# work-around, disable LFS on such configurations
6667
6668use_lfs=yes
Thomas Wouters477c8d52006-05-27 19:21:47 +00006669{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6670echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006671cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006672/* confdefs.h. */
6673_ACEOF
6674cat confdefs.h >>conftest.$ac_ext
6675cat >>conftest.$ac_ext <<_ACEOF
6676/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006677
6678#define _LARGEFILE_SOURCE 1
6679#define _FILE_OFFSET_BITS 64
6680#include <sys/resource.h>
6681
Martin v. Löwis399a6892002-10-04 10:22:02 +00006682int
6683main ()
6684{
6685struct rlimit foo;
6686 ;
6687 return 0;
6688}
6689_ACEOF
6690rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006691if { (ac_try="$ac_compile"
6692case "(($ac_try" in
6693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6694 *) ac_try_echo=$ac_try;;
6695esac
6696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006699 grep -v '^ *+' conftest.er1 >conftest.err
6700 rm -f conftest.er1
6701 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6703 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006704 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6705 { (case "(($ac_try" in
6706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6707 *) ac_try_echo=$ac_try;;
6708esac
6709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6710 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006711 ac_status=$?
6712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6713 (exit $ac_status); }; } &&
6714 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006715 { (case "(($ac_try" in
6716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6717 *) ac_try_echo=$ac_try;;
6718esac
6719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6720 (eval "$ac_try") 2>&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006721 ac_status=$?
6722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6723 (exit $ac_status); }; }; then
6724 sol_lfs_bug=no
6725else
6726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006727sed 's/^/| /' conftest.$ac_ext >&5
6728
Thomas Wouters477c8d52006-05-27 19:21:47 +00006729 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006730fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006731
Skip Montanarof0d5f792004-08-15 14:08:23 +00006732rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +00006733{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6734echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006735if test "$sol_lfs_bug" = "yes"; then
6736 use_lfs=no
6737fi
6738
6739if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006740# Two defines needed to enable largefile support on various platforms
6741# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006742
Martin v. Löwis11437992002-04-12 09:54:03 +00006743cat >>confdefs.h <<\_ACEOF
6744#define _LARGEFILE_SOURCE 1
6745_ACEOF
6746
6747
6748cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006749#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006750_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006751
Martin v. Löwis399a6892002-10-04 10:22:02 +00006752fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006753
Guido van Rossum84e7b241996-08-19 21:59:00 +00006754# Add some code to confdefs.h so that the test for off_t works on SCO
6755cat >> confdefs.h <<\EOF
6756#if defined(SCO_DS)
6757#undef _OFF_T
6758#endif
6759EOF
6760
Guido van Rossumef2255b2000-03-10 22:30:29 +00006761# Type availability checks
Thomas Wouters477c8d52006-05-27 19:21:47 +00006762{ echo "$as_me:$LINENO: checking for mode_t" >&5
6763echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006764if test "${ac_cv_type_mode_t+set}" = set; then
6765 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006766else
Martin v. Löwis11437992002-04-12 09:54:03 +00006767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006768/* confdefs.h. */
6769_ACEOF
6770cat confdefs.h >>conftest.$ac_ext
6771cat >>conftest.$ac_ext <<_ACEOF
6772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006773$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00006774typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006775int
6776main ()
6777{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006778if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006779 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00006780if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006781 return 0;
6782 ;
6783 return 0;
6784}
6785_ACEOF
6786rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006787if { (ac_try="$ac_compile"
6788case "(($ac_try" in
6789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6790 *) ac_try_echo=$ac_try;;
6791esac
6792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006795 grep -v '^ *+' conftest.er1 >conftest.err
6796 rm -f conftest.er1
6797 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6799 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006800 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6801 { (case "(($ac_try" in
6802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6803 *) ac_try_echo=$ac_try;;
6804esac
6805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6806 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006807 ac_status=$?
6808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6809 (exit $ac_status); }; } &&
6810 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006811 { (case "(($ac_try" in
6812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6813 *) ac_try_echo=$ac_try;;
6814esac
6815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6816 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006817 ac_status=$?
6818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6819 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006820 ac_cv_type_mode_t=yes
6821else
Martin v. Löwis11437992002-04-12 09:54:03 +00006822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006823sed 's/^/| /' conftest.$ac_ext >&5
6824
Thomas Wouters477c8d52006-05-27 19:21:47 +00006825 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006826fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006827
Skip Montanarof0d5f792004-08-15 14:08:23 +00006828rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006829fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006830{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6831echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006832if test $ac_cv_type_mode_t = yes; then
6833 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006834else
Martin v. Löwis11437992002-04-12 09:54:03 +00006835
6836cat >>confdefs.h <<_ACEOF
6837#define mode_t int
6838_ACEOF
6839
6840fi
6841
Thomas Wouters477c8d52006-05-27 19:21:47 +00006842{ echo "$as_me:$LINENO: checking for off_t" >&5
6843echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006844if test "${ac_cv_type_off_t+set}" = set; then
6845 echo $ECHO_N "(cached) $ECHO_C" >&6
6846else
6847 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006848/* confdefs.h. */
6849_ACEOF
6850cat confdefs.h >>conftest.$ac_ext
6851cat >>conftest.$ac_ext <<_ACEOF
6852/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006853$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00006854typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006855int
6856main ()
6857{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006858if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006859 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00006860if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006861 return 0;
6862 ;
6863 return 0;
6864}
6865_ACEOF
6866rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006867if { (ac_try="$ac_compile"
6868case "(($ac_try" in
6869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6870 *) ac_try_echo=$ac_try;;
6871esac
6872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6873 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006875 grep -v '^ *+' conftest.er1 >conftest.err
6876 rm -f conftest.er1
6877 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6879 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006880 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6881 { (case "(($ac_try" in
6882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6883 *) ac_try_echo=$ac_try;;
6884esac
6885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6886 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006887 ac_status=$?
6888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6889 (exit $ac_status); }; } &&
6890 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006891 { (case "(($ac_try" in
6892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6893 *) ac_try_echo=$ac_try;;
6894esac
6895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6896 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006897 ac_status=$?
6898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6899 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006900 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006901else
Martin v. Löwis11437992002-04-12 09:54:03 +00006902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006903sed 's/^/| /' conftest.$ac_ext >&5
6904
Thomas Wouters477c8d52006-05-27 19:21:47 +00006905 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006906fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006907
Skip Montanarof0d5f792004-08-15 14:08:23 +00006908rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006909fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006910{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6911echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006912if test $ac_cv_type_off_t = yes; then
6913 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006914else
Martin v. Löwis11437992002-04-12 09:54:03 +00006915
6916cat >>confdefs.h <<_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00006917#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006918_ACEOF
6919
6920fi
6921
Thomas Wouters477c8d52006-05-27 19:21:47 +00006922{ echo "$as_me:$LINENO: checking for pid_t" >&5
6923echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006924if test "${ac_cv_type_pid_t+set}" = set; then
6925 echo $ECHO_N "(cached) $ECHO_C" >&6
6926else
6927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006928/* confdefs.h. */
6929_ACEOF
6930cat confdefs.h >>conftest.$ac_ext
6931cat >>conftest.$ac_ext <<_ACEOF
6932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006933$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00006934typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006935int
6936main ()
6937{
Thomas Wouters477c8d52006-05-27 19:21:47 +00006938if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006939 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00006940if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006941 return 0;
6942 ;
6943 return 0;
6944}
6945_ACEOF
6946rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006947if { (ac_try="$ac_compile"
6948case "(($ac_try" in
6949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6950 *) ac_try_echo=$ac_try;;
6951esac
6952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006955 grep -v '^ *+' conftest.er1 >conftest.err
6956 rm -f conftest.er1
6957 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6959 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006960 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
6961 { (case "(($ac_try" in
6962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6963 *) ac_try_echo=$ac_try;;
6964esac
6965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6966 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006967 ac_status=$?
6968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6969 (exit $ac_status); }; } &&
6970 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00006971 { (case "(($ac_try" in
6972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6973 *) ac_try_echo=$ac_try;;
6974esac
6975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6976 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006977 ac_status=$?
6978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6979 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006980 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006981else
Martin v. Löwis11437992002-04-12 09:54:03 +00006982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006983sed 's/^/| /' conftest.$ac_ext >&5
6984
Thomas Wouters477c8d52006-05-27 19:21:47 +00006985 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006986fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006987
Skip Montanarof0d5f792004-08-15 14:08:23 +00006988rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006989fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00006990{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6991echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006992if test $ac_cv_type_pid_t = yes; then
6993 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006994else
Martin v. Löwis11437992002-04-12 09:54:03 +00006995
6996cat >>confdefs.h <<_ACEOF
6997#define pid_t int
6998_ACEOF
6999
7000fi
7001
Thomas Wouters477c8d52006-05-27 19:21:47 +00007002{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7003echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007004if test "${ac_cv_type_signal+set}" = set; then
7005 echo $ECHO_N "(cached) $ECHO_C" >&6
7006else
7007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007008/* confdefs.h. */
7009_ACEOF
7010cat confdefs.h >>conftest.$ac_ext
7011cat >>conftest.$ac_ext <<_ACEOF
7012/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00007013#include <sys/types.h>
7014#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007015
Martin v. Löwis11437992002-04-12 09:54:03 +00007016int
7017main ()
7018{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007019return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007020 ;
7021 return 0;
7022}
7023_ACEOF
7024rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007025if { (ac_try="$ac_compile"
7026case "(($ac_try" in
7027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7028 *) ac_try_echo=$ac_try;;
7029esac
7030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7031 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007033 grep -v '^ *+' conftest.er1 >conftest.err
7034 rm -f conftest.er1
7035 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7037 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007038 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7039 { (case "(($ac_try" in
7040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7041 *) ac_try_echo=$ac_try;;
7042esac
7043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7044 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007045 ac_status=$?
7046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7047 (exit $ac_status); }; } &&
7048 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007049 { (case "(($ac_try" in
7050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7051 *) ac_try_echo=$ac_try;;
7052esac
7053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7054 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007055 ac_status=$?
7056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7057 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007058 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007059else
Martin v. Löwis11437992002-04-12 09:54:03 +00007060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007061sed 's/^/| /' conftest.$ac_ext >&5
7062
Thomas Wouters477c8d52006-05-27 19:21:47 +00007063 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007064fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007065
Skip Montanarof0d5f792004-08-15 14:08:23 +00007066rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007067fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007068{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7069echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007070
Martin v. Löwis11437992002-04-12 09:54:03 +00007071cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007072#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007073_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007074
Michael W. Hudson54241132001-12-07 15:38:26 +00007075
Thomas Wouters477c8d52006-05-27 19:21:47 +00007076{ echo "$as_me:$LINENO: checking for size_t" >&5
7077echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007078if test "${ac_cv_type_size_t+set}" = set; then
7079 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007080else
Martin v. Löwis11437992002-04-12 09:54:03 +00007081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007082/* confdefs.h. */
7083_ACEOF
7084cat confdefs.h >>conftest.$ac_ext
7085cat >>conftest.$ac_ext <<_ACEOF
7086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007087$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007088typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007089int
7090main ()
7091{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007092if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007093 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007094if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007095 return 0;
7096 ;
7097 return 0;
7098}
7099_ACEOF
7100rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007101if { (ac_try="$ac_compile"
7102case "(($ac_try" in
7103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7104 *) ac_try_echo=$ac_try;;
7105esac
7106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7107 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007109 grep -v '^ *+' conftest.er1 >conftest.err
7110 rm -f conftest.er1
7111 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7113 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007114 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7115 { (case "(($ac_try" in
7116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7117 *) ac_try_echo=$ac_try;;
7118esac
7119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7120 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007121 ac_status=$?
7122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7123 (exit $ac_status); }; } &&
7124 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007125 { (case "(($ac_try" in
7126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7127 *) ac_try_echo=$ac_try;;
7128esac
7129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7130 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007131 ac_status=$?
7132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7133 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007134 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007135else
Martin v. Löwis11437992002-04-12 09:54:03 +00007136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007137sed 's/^/| /' conftest.$ac_ext >&5
7138
Thomas Wouters477c8d52006-05-27 19:21:47 +00007139 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007140fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007141
Skip Montanarof0d5f792004-08-15 14:08:23 +00007142rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007143fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007144{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7145echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007146if test $ac_cv_type_size_t = yes; then
7147 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007148else
Martin v. Löwis11437992002-04-12 09:54:03 +00007149
7150cat >>confdefs.h <<_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +00007151#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007152_ACEOF
7153
7154fi
7155
Thomas Wouters477c8d52006-05-27 19:21:47 +00007156{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7157echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007158if test "${ac_cv_type_uid_t+set}" = set; then
7159 echo $ECHO_N "(cached) $ECHO_C" >&6
7160else
7161 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007162/* confdefs.h. */
7163_ACEOF
7164cat confdefs.h >>conftest.$ac_ext
7165cat >>conftest.$ac_ext <<_ACEOF
7166/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007167#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007168
7169_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007171 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007172 ac_cv_type_uid_t=yes
7173else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007174 ac_cv_type_uid_t=no
7175fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007176rm -f conftest*
7177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007178fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007179{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7180echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007181if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007182
Martin v. Löwis11437992002-04-12 09:54:03 +00007183cat >>confdefs.h <<\_ACEOF
7184#define uid_t int
7185_ACEOF
7186
7187
7188cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007189#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007190_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007191
7192fi
7193
Thomas Wouters477c8d52006-05-27 19:21:47 +00007194{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7195echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007196if test "${ac_cv_type_ssize_t+set}" = set; then
7197 echo $ECHO_N "(cached) $ECHO_C" >&6
7198else
7199 cat >conftest.$ac_ext <<_ACEOF
7200/* confdefs.h. */
7201_ACEOF
7202cat confdefs.h >>conftest.$ac_ext
7203cat >>conftest.$ac_ext <<_ACEOF
7204/* end confdefs.h. */
7205$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007206typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007207int
7208main ()
7209{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007210if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00007211 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007212if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007213 return 0;
7214 ;
7215 return 0;
7216}
7217_ACEOF
7218rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007219if { (ac_try="$ac_compile"
7220case "(($ac_try" in
7221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7222 *) ac_try_echo=$ac_try;;
7223esac
7224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7225 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007226 ac_status=$?
7227 grep -v '^ *+' conftest.er1 >conftest.err
7228 rm -f conftest.er1
7229 cat conftest.err >&5
7230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7231 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007232 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7233 { (case "(($ac_try" in
7234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7235 *) ac_try_echo=$ac_try;;
7236esac
7237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7238 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007239 ac_status=$?
7240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7241 (exit $ac_status); }; } &&
7242 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007243 { (case "(($ac_try" in
7244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7245 *) ac_try_echo=$ac_try;;
7246esac
7247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7248 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007249 ac_status=$?
7250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7251 (exit $ac_status); }; }; then
7252 ac_cv_type_ssize_t=yes
7253else
7254 echo "$as_me: failed program was:" >&5
7255sed 's/^/| /' conftest.$ac_ext >&5
7256
Thomas Wouters477c8d52006-05-27 19:21:47 +00007257 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007258fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007259
Martin v. Löwis18e16552006-02-15 17:27:45 +00007260rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7261fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007262{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7263echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007264if test $ac_cv_type_ssize_t = yes; then
7265
7266cat >>confdefs.h <<\_ACEOF
7267#define HAVE_SSIZE_T 1
7268_ACEOF
7269
7270fi
7271
Jack Jansendd19cf82001-12-06 22:36:17 +00007272
Michael W. Hudson54241132001-12-07 15:38:26 +00007273# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007274# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters477c8d52006-05-27 19:21:47 +00007275{ echo "$as_me:$LINENO: checking for int" >&5
7276echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007277if test "${ac_cv_type_int+set}" = set; then
7278 echo $ECHO_N "(cached) $ECHO_C" >&6
7279else
7280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007281/* confdefs.h. */
7282_ACEOF
7283cat confdefs.h >>conftest.$ac_ext
7284cat >>conftest.$ac_ext <<_ACEOF
7285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007286$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007287typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007288int
7289main ()
7290{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007291if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007292 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007293if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007294 return 0;
7295 ;
7296 return 0;
7297}
7298_ACEOF
7299rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007300if { (ac_try="$ac_compile"
7301case "(($ac_try" in
7302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7303 *) ac_try_echo=$ac_try;;
7304esac
7305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7306 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007308 grep -v '^ *+' conftest.er1 >conftest.err
7309 rm -f conftest.er1
7310 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7312 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007313 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7314 { (case "(($ac_try" in
7315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7316 *) ac_try_echo=$ac_try;;
7317esac
7318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7319 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007320 ac_status=$?
7321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7322 (exit $ac_status); }; } &&
7323 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007324 { (case "(($ac_try" in
7325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7326 *) ac_try_echo=$ac_try;;
7327esac
7328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7329 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007330 ac_status=$?
7331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7332 (exit $ac_status); }; }; then
7333 ac_cv_type_int=yes
7334else
7335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007336sed 's/^/| /' conftest.$ac_ext >&5
7337
Thomas Wouters477c8d52006-05-27 19:21:47 +00007338 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007339fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007340
Skip Montanarof0d5f792004-08-15 14:08:23 +00007341rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007342fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007343{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7344echo "${ECHO_T}$ac_cv_type_int" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007345
Thomas Wouters477c8d52006-05-27 19:21:47 +00007346{ echo "$as_me:$LINENO: checking size of int" >&5
7347echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007348if test "${ac_cv_sizeof_int+set}" = set; then
7349 echo $ECHO_N "(cached) $ECHO_C" >&6
7350else
7351 if test "$ac_cv_type_int" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007352 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00007353 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7354 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7355 # This bug is HP SR number 8606223364.
7356 if test "$cross_compiling" = yes; then
7357 # Depending upon the size, compute the lo and hi bounds.
7358cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007359/* confdefs.h. */
7360_ACEOF
7361cat confdefs.h >>conftest.$ac_ext
7362cat >>conftest.$ac_ext <<_ACEOF
7363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007364$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007365 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007366int
7367main ()
7368{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007369static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007370test_array [0] = 0
7371
7372 ;
7373 return 0;
7374}
7375_ACEOF
7376rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007377if { (ac_try="$ac_compile"
7378case "(($ac_try" in
7379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7380 *) ac_try_echo=$ac_try;;
7381esac
7382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7383 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007385 grep -v '^ *+' conftest.er1 >conftest.err
7386 rm -f conftest.er1
7387 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7389 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007390 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7391 { (case "(($ac_try" in
7392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7393 *) ac_try_echo=$ac_try;;
7394esac
7395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7396 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007397 ac_status=$?
7398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7399 (exit $ac_status); }; } &&
7400 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007401 { (case "(($ac_try" in
7402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7403 *) ac_try_echo=$ac_try;;
7404esac
7405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7406 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007407 ac_status=$?
7408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7409 (exit $ac_status); }; }; then
7410 ac_lo=0 ac_mid=0
7411 while :; do
7412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007413/* confdefs.h. */
7414_ACEOF
7415cat confdefs.h >>conftest.$ac_ext
7416cat >>conftest.$ac_ext <<_ACEOF
7417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007418$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007419 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007420int
7421main ()
7422{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007423static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007424test_array [0] = 0
7425
7426 ;
7427 return 0;
7428}
7429_ACEOF
7430rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007431if { (ac_try="$ac_compile"
7432case "(($ac_try" in
7433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7434 *) ac_try_echo=$ac_try;;
7435esac
7436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007439 grep -v '^ *+' conftest.er1 >conftest.err
7440 rm -f conftest.er1
7441 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7443 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007444 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7445 { (case "(($ac_try" in
7446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7447 *) ac_try_echo=$ac_try;;
7448esac
7449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7450 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007451 ac_status=$?
7452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7453 (exit $ac_status); }; } &&
7454 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007455 { (case "(($ac_try" in
7456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7457 *) ac_try_echo=$ac_try;;
7458esac
7459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7460 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007461 ac_status=$?
7462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7463 (exit $ac_status); }; }; then
7464 ac_hi=$ac_mid; break
7465else
7466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007467sed 's/^/| /' conftest.$ac_ext >&5
7468
Thomas Wouters477c8d52006-05-27 19:21:47 +00007469 ac_lo=`expr $ac_mid + 1`
7470 if test $ac_lo -le $ac_mid; then
7471 ac_lo= ac_hi=
7472 break
7473 fi
7474 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007475fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007476
Skip Montanarof0d5f792004-08-15 14:08:23 +00007477rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007478 done
7479else
7480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007481sed 's/^/| /' conftest.$ac_ext >&5
7482
Thomas Wouters477c8d52006-05-27 19:21:47 +00007483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007484/* confdefs.h. */
7485_ACEOF
7486cat confdefs.h >>conftest.$ac_ext
7487cat >>conftest.$ac_ext <<_ACEOF
7488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007489$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007490 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007491int
7492main ()
7493{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007494static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007495test_array [0] = 0
7496
7497 ;
7498 return 0;
7499}
7500_ACEOF
7501rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007502if { (ac_try="$ac_compile"
7503case "(($ac_try" in
7504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7505 *) ac_try_echo=$ac_try;;
7506esac
7507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007510 grep -v '^ *+' conftest.er1 >conftest.err
7511 rm -f conftest.er1
7512 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7514 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007515 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7516 { (case "(($ac_try" in
7517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7518 *) ac_try_echo=$ac_try;;
7519esac
7520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7521 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007522 ac_status=$?
7523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7524 (exit $ac_status); }; } &&
7525 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007526 { (case "(($ac_try" in
7527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7528 *) ac_try_echo=$ac_try;;
7529esac
7530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7531 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007532 ac_status=$?
7533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7534 (exit $ac_status); }; }; then
7535 ac_hi=-1 ac_mid=-1
7536 while :; do
7537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007538/* confdefs.h. */
7539_ACEOF
7540cat confdefs.h >>conftest.$ac_ext
7541cat >>conftest.$ac_ext <<_ACEOF
7542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007543$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007544 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007545int
7546main ()
7547{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007548static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007549test_array [0] = 0
7550
7551 ;
7552 return 0;
7553}
7554_ACEOF
7555rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007556if { (ac_try="$ac_compile"
7557case "(($ac_try" in
7558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7559 *) ac_try_echo=$ac_try;;
7560esac
7561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007564 grep -v '^ *+' conftest.er1 >conftest.err
7565 rm -f conftest.er1
7566 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7568 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007569 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7570 { (case "(($ac_try" in
7571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7572 *) ac_try_echo=$ac_try;;
7573esac
7574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7575 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007576 ac_status=$?
7577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7578 (exit $ac_status); }; } &&
7579 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007580 { (case "(($ac_try" in
7581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7582 *) ac_try_echo=$ac_try;;
7583esac
7584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7585 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007586 ac_status=$?
7587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7588 (exit $ac_status); }; }; then
7589 ac_lo=$ac_mid; break
7590else
7591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007592sed 's/^/| /' conftest.$ac_ext >&5
7593
Thomas Wouters477c8d52006-05-27 19:21:47 +00007594 ac_hi=`expr '(' $ac_mid ')' - 1`
7595 if test $ac_mid -le $ac_hi; then
7596 ac_lo= ac_hi=
7597 break
7598 fi
7599 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007600fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007601
Skip Montanarof0d5f792004-08-15 14:08:23 +00007602rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007603 done
7604else
7605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007606sed 's/^/| /' conftest.$ac_ext >&5
7607
Thomas Wouters477c8d52006-05-27 19:21:47 +00007608 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007609fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007610
Skip Montanarof0d5f792004-08-15 14:08:23 +00007611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007612fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007613
Skip Montanarof0d5f792004-08-15 14:08:23 +00007614rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007615# Binary search between lo and hi bounds.
7616while test "x$ac_lo" != "x$ac_hi"; do
7617 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7618 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007619/* confdefs.h. */
7620_ACEOF
7621cat confdefs.h >>conftest.$ac_ext
7622cat >>conftest.$ac_ext <<_ACEOF
7623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007624$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007625 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007626int
7627main ()
7628{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007629static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007630test_array [0] = 0
7631
7632 ;
7633 return 0;
7634}
7635_ACEOF
7636rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007637if { (ac_try="$ac_compile"
7638case "(($ac_try" in
7639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7640 *) ac_try_echo=$ac_try;;
7641esac
7642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7643 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007645 grep -v '^ *+' conftest.er1 >conftest.err
7646 rm -f conftest.er1
7647 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7649 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007650 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7651 { (case "(($ac_try" in
7652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7653 *) ac_try_echo=$ac_try;;
7654esac
7655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7656 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007657 ac_status=$?
7658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7659 (exit $ac_status); }; } &&
7660 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007661 { (case "(($ac_try" in
7662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7663 *) ac_try_echo=$ac_try;;
7664esac
7665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7666 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007667 ac_status=$?
7668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7669 (exit $ac_status); }; }; then
7670 ac_hi=$ac_mid
7671else
7672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007673sed 's/^/| /' conftest.$ac_ext >&5
7674
Thomas Wouters477c8d52006-05-27 19:21:47 +00007675 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007676fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007677
Skip Montanarof0d5f792004-08-15 14:08:23 +00007678rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007679done
7680case $ac_lo in
7681?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007682'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007683See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00007684echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007685See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00007686 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007687esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007688else
Martin v. Löwis11437992002-04-12 09:54:03 +00007689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007690/* confdefs.h. */
7691_ACEOF
7692cat confdefs.h >>conftest.$ac_ext
7693cat >>conftest.$ac_ext <<_ACEOF
7694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007695$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007696 typedef int ac__type_sizeof_;
7697static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7698static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007699#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007700#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007701int
7702main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007703{
Martin v. Löwis11437992002-04-12 09:54:03 +00007704
7705 FILE *f = fopen ("conftest.val", "w");
7706 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007707 return 1;
7708 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00007710 long int i = longval ();
7711 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7712 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007713 fprintf (f, "%ld\n", i);
7714 }
7715 else
7716 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00007717 unsigned long int i = ulongval ();
7718 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7719 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007720 fprintf (f, "%lu\n", i);
7721 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007722 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007723
7724 ;
7725 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007726}
Martin v. Löwis11437992002-04-12 09:54:03 +00007727_ACEOF
7728rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007729if { (ac_try="$ac_link"
7730case "(($ac_try" in
7731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7732 *) ac_try_echo=$ac_try;;
7733esac
7734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7735 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007736 ac_status=$?
7737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7738 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007739 { (case "(($ac_try" in
7740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7741 *) ac_try_echo=$ac_try;;
7742esac
7743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7744 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 ac_status=$?
7746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7747 (exit $ac_status); }; }; then
7748 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007749else
Martin v. Löwis11437992002-04-12 09:54:03 +00007750 echo "$as_me: program exited with status $ac_status" >&5
7751echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007752sed 's/^/| /' conftest.$ac_ext >&5
7753
Martin v. Löwis11437992002-04-12 09:54:03 +00007754( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +00007755{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007756See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00007757echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007758See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00007759 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007760fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007762fi
7763rm -f conftest.val
7764else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007765 ac_cv_sizeof_int=0
7766fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007767fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007768{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7769echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007770cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007771#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007772_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007773
7774
Thomas Wouters477c8d52006-05-27 19:21:47 +00007775{ echo "$as_me:$LINENO: checking for long" >&5
7776echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007777if test "${ac_cv_type_long+set}" = set; then
7778 echo $ECHO_N "(cached) $ECHO_C" >&6
7779else
7780 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007781/* confdefs.h. */
7782_ACEOF
7783cat confdefs.h >>conftest.$ac_ext
7784cat >>conftest.$ac_ext <<_ACEOF
7785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007786$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007787typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007788int
7789main ()
7790{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007791if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00007793if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007794 return 0;
7795 ;
7796 return 0;
7797}
7798_ACEOF
7799rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007800if { (ac_try="$ac_compile"
7801case "(($ac_try" in
7802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7803 *) ac_try_echo=$ac_try;;
7804esac
7805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007808 grep -v '^ *+' conftest.er1 >conftest.err
7809 rm -f conftest.er1
7810 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7812 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007813 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7814 { (case "(($ac_try" in
7815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7816 *) ac_try_echo=$ac_try;;
7817esac
7818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7819 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007820 ac_status=$?
7821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7822 (exit $ac_status); }; } &&
7823 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007824 { (case "(($ac_try" in
7825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7826 *) ac_try_echo=$ac_try;;
7827esac
7828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7829 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007830 ac_status=$?
7831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7832 (exit $ac_status); }; }; then
7833 ac_cv_type_long=yes
7834else
7835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007836sed 's/^/| /' conftest.$ac_ext >&5
7837
Thomas Wouters477c8d52006-05-27 19:21:47 +00007838 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007839fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007840
Skip Montanarof0d5f792004-08-15 14:08:23 +00007841rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007842fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007843{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7844echo "${ECHO_T}$ac_cv_type_long" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007845
Thomas Wouters477c8d52006-05-27 19:21:47 +00007846{ echo "$as_me:$LINENO: checking size of long" >&5
7847echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007848if test "${ac_cv_sizeof_long+set}" = set; then
7849 echo $ECHO_N "(cached) $ECHO_C" >&6
7850else
7851 if test "$ac_cv_type_long" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007852 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00007853 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7854 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7855 # This bug is HP SR number 8606223364.
7856 if test "$cross_compiling" = yes; then
7857 # Depending upon the size, compute the lo and hi bounds.
7858cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007859/* confdefs.h. */
7860_ACEOF
7861cat confdefs.h >>conftest.$ac_ext
7862cat >>conftest.$ac_ext <<_ACEOF
7863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007864$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007865 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007866int
7867main ()
7868{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007869static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007870test_array [0] = 0
7871
7872 ;
7873 return 0;
7874}
7875_ACEOF
7876rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007877if { (ac_try="$ac_compile"
7878case "(($ac_try" in
7879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7880 *) ac_try_echo=$ac_try;;
7881esac
7882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7883 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007885 grep -v '^ *+' conftest.er1 >conftest.err
7886 rm -f conftest.er1
7887 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7889 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007890 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7891 { (case "(($ac_try" in
7892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7893 *) ac_try_echo=$ac_try;;
7894esac
7895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7896 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007897 ac_status=$?
7898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7899 (exit $ac_status); }; } &&
7900 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007901 { (case "(($ac_try" in
7902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7903 *) ac_try_echo=$ac_try;;
7904esac
7905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7906 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007907 ac_status=$?
7908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7909 (exit $ac_status); }; }; then
7910 ac_lo=0 ac_mid=0
7911 while :; do
7912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007913/* confdefs.h. */
7914_ACEOF
7915cat confdefs.h >>conftest.$ac_ext
7916cat >>conftest.$ac_ext <<_ACEOF
7917/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007918$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007919 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007920int
7921main ()
7922{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007923static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007924test_array [0] = 0
7925
7926 ;
7927 return 0;
7928}
7929_ACEOF
7930rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007931if { (ac_try="$ac_compile"
7932case "(($ac_try" in
7933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7934 *) ac_try_echo=$ac_try;;
7935esac
7936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7937 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007939 grep -v '^ *+' conftest.er1 >conftest.err
7940 rm -f conftest.er1
7941 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7943 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007944 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
7945 { (case "(($ac_try" in
7946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7947 *) ac_try_echo=$ac_try;;
7948esac
7949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7950 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007951 ac_status=$?
7952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7953 (exit $ac_status); }; } &&
7954 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007955 { (case "(($ac_try" in
7956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7957 *) ac_try_echo=$ac_try;;
7958esac
7959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7960 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007961 ac_status=$?
7962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7963 (exit $ac_status); }; }; then
7964 ac_hi=$ac_mid; break
7965else
7966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007967sed 's/^/| /' conftest.$ac_ext >&5
7968
Thomas Wouters477c8d52006-05-27 19:21:47 +00007969 ac_lo=`expr $ac_mid + 1`
7970 if test $ac_lo -le $ac_mid; then
7971 ac_lo= ac_hi=
7972 break
7973 fi
7974 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007975fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00007976
Skip Montanarof0d5f792004-08-15 14:08:23 +00007977rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007978 done
7979else
7980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007981sed 's/^/| /' conftest.$ac_ext >&5
7982
Thomas Wouters477c8d52006-05-27 19:21:47 +00007983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007984/* confdefs.h. */
7985_ACEOF
7986cat confdefs.h >>conftest.$ac_ext
7987cat >>conftest.$ac_ext <<_ACEOF
7988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007989$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00007990 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007991int
7992main ()
7993{
Thomas Wouters477c8d52006-05-27 19:21:47 +00007994static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007995test_array [0] = 0
7996
7997 ;
7998 return 0;
7999}
8000_ACEOF
8001rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008002if { (ac_try="$ac_compile"
8003case "(($ac_try" in
8004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8005 *) ac_try_echo=$ac_try;;
8006esac
8007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008010 grep -v '^ *+' conftest.er1 >conftest.err
8011 rm -f conftest.er1
8012 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8014 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008015 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8016 { (case "(($ac_try" in
8017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8018 *) ac_try_echo=$ac_try;;
8019esac
8020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8021 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008022 ac_status=$?
8023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8024 (exit $ac_status); }; } &&
8025 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008026 { (case "(($ac_try" in
8027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8028 *) ac_try_echo=$ac_try;;
8029esac
8030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8031 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008032 ac_status=$?
8033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8034 (exit $ac_status); }; }; then
8035 ac_hi=-1 ac_mid=-1
8036 while :; do
8037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008038/* confdefs.h. */
8039_ACEOF
8040cat confdefs.h >>conftest.$ac_ext
8041cat >>conftest.$ac_ext <<_ACEOF
8042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008043$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008044 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008045int
8046main ()
8047{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008048static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008049test_array [0] = 0
8050
8051 ;
8052 return 0;
8053}
8054_ACEOF
8055rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008056if { (ac_try="$ac_compile"
8057case "(($ac_try" in
8058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8059 *) ac_try_echo=$ac_try;;
8060esac
8061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008064 grep -v '^ *+' conftest.er1 >conftest.err
8065 rm -f conftest.er1
8066 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8068 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008069 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8070 { (case "(($ac_try" in
8071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8072 *) ac_try_echo=$ac_try;;
8073esac
8074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8075 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008076 ac_status=$?
8077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8078 (exit $ac_status); }; } &&
8079 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008080 { (case "(($ac_try" in
8081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8082 *) ac_try_echo=$ac_try;;
8083esac
8084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8085 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008086 ac_status=$?
8087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8088 (exit $ac_status); }; }; then
8089 ac_lo=$ac_mid; break
8090else
8091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008092sed 's/^/| /' conftest.$ac_ext >&5
8093
Thomas Wouters477c8d52006-05-27 19:21:47 +00008094 ac_hi=`expr '(' $ac_mid ')' - 1`
8095 if test $ac_mid -le $ac_hi; then
8096 ac_lo= ac_hi=
8097 break
8098 fi
8099 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008100fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008101
Skip Montanarof0d5f792004-08-15 14:08:23 +00008102rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008103 done
8104else
8105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008106sed 's/^/| /' conftest.$ac_ext >&5
8107
Thomas Wouters477c8d52006-05-27 19:21:47 +00008108 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008109fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008110
Skip Montanarof0d5f792004-08-15 14:08:23 +00008111rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008112fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008113
Skip Montanarof0d5f792004-08-15 14:08:23 +00008114rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008115# Binary search between lo and hi bounds.
8116while test "x$ac_lo" != "x$ac_hi"; do
8117 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008119/* confdefs.h. */
8120_ACEOF
8121cat confdefs.h >>conftest.$ac_ext
8122cat >>conftest.$ac_ext <<_ACEOF
8123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008124$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008125 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008126int
8127main ()
8128{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008129static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008130test_array [0] = 0
8131
8132 ;
8133 return 0;
8134}
8135_ACEOF
8136rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008137if { (ac_try="$ac_compile"
8138case "(($ac_try" in
8139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8140 *) ac_try_echo=$ac_try;;
8141esac
8142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008145 grep -v '^ *+' conftest.er1 >conftest.err
8146 rm -f conftest.er1
8147 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8149 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008150 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8151 { (case "(($ac_try" in
8152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8153 *) ac_try_echo=$ac_try;;
8154esac
8155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8156 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008157 ac_status=$?
8158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8159 (exit $ac_status); }; } &&
8160 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008161 { (case "(($ac_try" in
8162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8163 *) ac_try_echo=$ac_try;;
8164esac
8165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8166 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008167 ac_status=$?
8168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8169 (exit $ac_status); }; }; then
8170 ac_hi=$ac_mid
8171else
8172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008173sed 's/^/| /' conftest.$ac_ext >&5
8174
Thomas Wouters477c8d52006-05-27 19:21:47 +00008175 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008176fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008177
Skip Montanarof0d5f792004-08-15 14:08:23 +00008178rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008179done
8180case $ac_lo in
8181?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008182'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008183See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008184echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008185See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00008186 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008187esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008188else
Martin v. Löwis11437992002-04-12 09:54:03 +00008189 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008190/* confdefs.h. */
8191_ACEOF
8192cat confdefs.h >>conftest.$ac_ext
8193cat >>conftest.$ac_ext <<_ACEOF
8194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008195$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008196 typedef long ac__type_sizeof_;
8197static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8198static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008199#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008200#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008201int
8202main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008203{
Martin v. Löwis11437992002-04-12 09:54:03 +00008204
8205 FILE *f = fopen ("conftest.val", "w");
8206 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008207 return 1;
8208 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008209 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008210 long int i = longval ();
8211 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8212 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008213 fprintf (f, "%ld\n", i);
8214 }
8215 else
8216 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008217 unsigned long int i = ulongval ();
8218 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8219 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008220 fprintf (f, "%lu\n", i);
8221 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008222 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008223
8224 ;
8225 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008226}
Martin v. Löwis11437992002-04-12 09:54:03 +00008227_ACEOF
8228rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008229if { (ac_try="$ac_link"
8230case "(($ac_try" in
8231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8232 *) ac_try_echo=$ac_try;;
8233esac
8234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8235 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008236 ac_status=$?
8237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8238 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008239 { (case "(($ac_try" in
8240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8241 *) ac_try_echo=$ac_try;;
8242esac
8243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8244 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008245 ac_status=$?
8246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8247 (exit $ac_status); }; }; then
8248 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008249else
Martin v. Löwis11437992002-04-12 09:54:03 +00008250 echo "$as_me: program exited with status $ac_status" >&5
8251echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008252sed 's/^/| /' conftest.$ac_ext >&5
8253
Martin v. Löwis11437992002-04-12 09:54:03 +00008254( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +00008255{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008256See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008257echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008258See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00008259 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008260fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008262fi
8263rm -f conftest.val
8264else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008265 ac_cv_sizeof_long=0
8266fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008267fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008268{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8269echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008270cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008271#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008272_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008273
8274
Thomas Wouters477c8d52006-05-27 19:21:47 +00008275{ echo "$as_me:$LINENO: checking for void *" >&5
8276echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008277if test "${ac_cv_type_void_p+set}" = set; then
8278 echo $ECHO_N "(cached) $ECHO_C" >&6
8279else
8280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008281/* confdefs.h. */
8282_ACEOF
8283cat confdefs.h >>conftest.$ac_ext
8284cat >>conftest.$ac_ext <<_ACEOF
8285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008286$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008287typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008288int
8289main ()
8290{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008291if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008292 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008293if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008294 return 0;
8295 ;
8296 return 0;
8297}
8298_ACEOF
8299rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008300if { (ac_try="$ac_compile"
8301case "(($ac_try" in
8302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8303 *) ac_try_echo=$ac_try;;
8304esac
8305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8306 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008308 grep -v '^ *+' conftest.er1 >conftest.err
8309 rm -f conftest.er1
8310 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8312 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008313 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8314 { (case "(($ac_try" in
8315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8316 *) ac_try_echo=$ac_try;;
8317esac
8318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8319 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008320 ac_status=$?
8321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8322 (exit $ac_status); }; } &&
8323 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008324 { (case "(($ac_try" in
8325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8326 *) ac_try_echo=$ac_try;;
8327esac
8328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8329 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008330 ac_status=$?
8331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8332 (exit $ac_status); }; }; then
8333 ac_cv_type_void_p=yes
8334else
8335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008336sed 's/^/| /' conftest.$ac_ext >&5
8337
Thomas Wouters477c8d52006-05-27 19:21:47 +00008338 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008339fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008340
Skip Montanarof0d5f792004-08-15 14:08:23 +00008341rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008342fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008343{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8344echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008345
Thomas Wouters477c8d52006-05-27 19:21:47 +00008346{ echo "$as_me:$LINENO: checking size of void *" >&5
8347echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008348if test "${ac_cv_sizeof_void_p+set}" = set; then
8349 echo $ECHO_N "(cached) $ECHO_C" >&6
8350else
8351 if test "$ac_cv_type_void_p" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008352 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00008353 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8354 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8355 # This bug is HP SR number 8606223364.
8356 if test "$cross_compiling" = yes; then
8357 # Depending upon the size, compute the lo and hi bounds.
8358cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008359/* confdefs.h. */
8360_ACEOF
8361cat confdefs.h >>conftest.$ac_ext
8362cat >>conftest.$ac_ext <<_ACEOF
8363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008364$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008365 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008366int
8367main ()
8368{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008369static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008370test_array [0] = 0
8371
8372 ;
8373 return 0;
8374}
8375_ACEOF
8376rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008377if { (ac_try="$ac_compile"
8378case "(($ac_try" in
8379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8380 *) ac_try_echo=$ac_try;;
8381esac
8382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8383 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008385 grep -v '^ *+' conftest.er1 >conftest.err
8386 rm -f conftest.er1
8387 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8389 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008390 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8391 { (case "(($ac_try" in
8392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8393 *) ac_try_echo=$ac_try;;
8394esac
8395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8396 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008397 ac_status=$?
8398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8399 (exit $ac_status); }; } &&
8400 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008401 { (case "(($ac_try" in
8402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8403 *) ac_try_echo=$ac_try;;
8404esac
8405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8406 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008407 ac_status=$?
8408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8409 (exit $ac_status); }; }; then
8410 ac_lo=0 ac_mid=0
8411 while :; do
8412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008413/* confdefs.h. */
8414_ACEOF
8415cat confdefs.h >>conftest.$ac_ext
8416cat >>conftest.$ac_ext <<_ACEOF
8417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008418$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008419 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008420int
8421main ()
8422{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008423static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008424test_array [0] = 0
8425
8426 ;
8427 return 0;
8428}
8429_ACEOF
8430rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008431if { (ac_try="$ac_compile"
8432case "(($ac_try" in
8433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8434 *) ac_try_echo=$ac_try;;
8435esac
8436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008439 grep -v '^ *+' conftest.er1 >conftest.err
8440 rm -f conftest.er1
8441 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8443 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008444 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8445 { (case "(($ac_try" in
8446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8447 *) ac_try_echo=$ac_try;;
8448esac
8449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8450 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008451 ac_status=$?
8452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8453 (exit $ac_status); }; } &&
8454 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008455 { (case "(($ac_try" in
8456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8457 *) ac_try_echo=$ac_try;;
8458esac
8459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8460 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008461 ac_status=$?
8462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8463 (exit $ac_status); }; }; then
8464 ac_hi=$ac_mid; break
8465else
8466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008467sed 's/^/| /' conftest.$ac_ext >&5
8468
Thomas Wouters477c8d52006-05-27 19:21:47 +00008469 ac_lo=`expr $ac_mid + 1`
8470 if test $ac_lo -le $ac_mid; then
8471 ac_lo= ac_hi=
8472 break
8473 fi
8474 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008475fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008476
Skip Montanarof0d5f792004-08-15 14:08:23 +00008477rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008478 done
8479else
8480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008481sed 's/^/| /' conftest.$ac_ext >&5
8482
Thomas Wouters477c8d52006-05-27 19:21:47 +00008483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008484/* confdefs.h. */
8485_ACEOF
8486cat confdefs.h >>conftest.$ac_ext
8487cat >>conftest.$ac_ext <<_ACEOF
8488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008489$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008490 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008491int
8492main ()
8493{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008494static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008495test_array [0] = 0
8496
8497 ;
8498 return 0;
8499}
8500_ACEOF
8501rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008502if { (ac_try="$ac_compile"
8503case "(($ac_try" in
8504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8505 *) ac_try_echo=$ac_try;;
8506esac
8507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008510 grep -v '^ *+' conftest.er1 >conftest.err
8511 rm -f conftest.er1
8512 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8514 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008515 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8516 { (case "(($ac_try" in
8517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8518 *) ac_try_echo=$ac_try;;
8519esac
8520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8521 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008522 ac_status=$?
8523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8524 (exit $ac_status); }; } &&
8525 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008526 { (case "(($ac_try" in
8527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8528 *) ac_try_echo=$ac_try;;
8529esac
8530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8531 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008532 ac_status=$?
8533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8534 (exit $ac_status); }; }; then
8535 ac_hi=-1 ac_mid=-1
8536 while :; do
8537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008538/* confdefs.h. */
8539_ACEOF
8540cat confdefs.h >>conftest.$ac_ext
8541cat >>conftest.$ac_ext <<_ACEOF
8542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008543$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008544 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008545int
8546main ()
8547{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008548static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008549test_array [0] = 0
8550
8551 ;
8552 return 0;
8553}
8554_ACEOF
8555rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008556if { (ac_try="$ac_compile"
8557case "(($ac_try" in
8558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8559 *) ac_try_echo=$ac_try;;
8560esac
8561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008564 grep -v '^ *+' conftest.er1 >conftest.err
8565 rm -f conftest.er1
8566 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8568 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008569 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8570 { (case "(($ac_try" in
8571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8572 *) ac_try_echo=$ac_try;;
8573esac
8574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8575 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008576 ac_status=$?
8577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8578 (exit $ac_status); }; } &&
8579 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008580 { (case "(($ac_try" in
8581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8582 *) ac_try_echo=$ac_try;;
8583esac
8584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8585 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008586 ac_status=$?
8587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8588 (exit $ac_status); }; }; then
8589 ac_lo=$ac_mid; break
8590else
8591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008592sed 's/^/| /' conftest.$ac_ext >&5
8593
Thomas Wouters477c8d52006-05-27 19:21:47 +00008594 ac_hi=`expr '(' $ac_mid ')' - 1`
8595 if test $ac_mid -le $ac_hi; then
8596 ac_lo= ac_hi=
8597 break
8598 fi
8599 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008600fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008601
Skip Montanarof0d5f792004-08-15 14:08:23 +00008602rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 done
8604else
8605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008606sed 's/^/| /' conftest.$ac_ext >&5
8607
Thomas Wouters477c8d52006-05-27 19:21:47 +00008608 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008609fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008610
Skip Montanarof0d5f792004-08-15 14:08:23 +00008611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008612fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008613
Skip Montanarof0d5f792004-08-15 14:08:23 +00008614rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008615# Binary search between lo and hi bounds.
8616while test "x$ac_lo" != "x$ac_hi"; do
8617 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8618 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008619/* confdefs.h. */
8620_ACEOF
8621cat confdefs.h >>conftest.$ac_ext
8622cat >>conftest.$ac_ext <<_ACEOF
8623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008624$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008625 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008626int
8627main ()
8628{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008629static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008630test_array [0] = 0
8631
8632 ;
8633 return 0;
8634}
8635_ACEOF
8636rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008637if { (ac_try="$ac_compile"
8638case "(($ac_try" in
8639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8640 *) ac_try_echo=$ac_try;;
8641esac
8642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8643 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008645 grep -v '^ *+' conftest.er1 >conftest.err
8646 rm -f conftest.er1
8647 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8649 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008650 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8651 { (case "(($ac_try" in
8652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8653 *) ac_try_echo=$ac_try;;
8654esac
8655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8656 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008657 ac_status=$?
8658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8659 (exit $ac_status); }; } &&
8660 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008661 { (case "(($ac_try" in
8662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8663 *) ac_try_echo=$ac_try;;
8664esac
8665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8666 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 ac_status=$?
8668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8669 (exit $ac_status); }; }; then
8670 ac_hi=$ac_mid
8671else
8672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008673sed 's/^/| /' conftest.$ac_ext >&5
8674
Thomas Wouters477c8d52006-05-27 19:21:47 +00008675 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008676fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008677
Skip Montanarof0d5f792004-08-15 14:08:23 +00008678rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008679done
8680case $ac_lo in
8681?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008682'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008683See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008684echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008685See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00008686 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008687esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008688else
Martin v. Löwis11437992002-04-12 09:54:03 +00008689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008690/* confdefs.h. */
8691_ACEOF
8692cat confdefs.h >>conftest.$ac_ext
8693cat >>conftest.$ac_ext <<_ACEOF
8694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008695$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008696 typedef void * ac__type_sizeof_;
8697static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8698static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008699#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008700#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008701int
8702main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008703{
Martin v. Löwis11437992002-04-12 09:54:03 +00008704
8705 FILE *f = fopen ("conftest.val", "w");
8706 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008707 return 1;
8708 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008710 long int i = longval ();
8711 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8712 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008713 fprintf (f, "%ld\n", i);
8714 }
8715 else
8716 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00008717 unsigned long int i = ulongval ();
8718 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8719 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008720 fprintf (f, "%lu\n", i);
8721 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008722 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008723
8724 ;
8725 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008726}
Martin v. Löwis11437992002-04-12 09:54:03 +00008727_ACEOF
8728rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008729if { (ac_try="$ac_link"
8730case "(($ac_try" in
8731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8732 *) ac_try_echo=$ac_try;;
8733esac
8734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8735 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008736 ac_status=$?
8737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8738 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008739 { (case "(($ac_try" in
8740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8741 *) ac_try_echo=$ac_try;;
8742esac
8743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8744 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 ac_status=$?
8746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8747 (exit $ac_status); }; }; then
8748 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008749else
Martin v. Löwis11437992002-04-12 09:54:03 +00008750 echo "$as_me: program exited with status $ac_status" >&5
8751echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008752sed 's/^/| /' conftest.$ac_ext >&5
8753
Martin v. Löwis11437992002-04-12 09:54:03 +00008754( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +00008755{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008756See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00008757echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008758See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00008759 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008760fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008762fi
8763rm -f conftest.val
8764else
Guido van Rossumad678af1998-10-02 14:42:15 +00008765 ac_cv_sizeof_void_p=0
8766fi
Guido van Rossumad678af1998-10-02 14:42:15 +00008767fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008768{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8769echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008770cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008771#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008772_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008773
8774
Thomas Wouters477c8d52006-05-27 19:21:47 +00008775{ echo "$as_me:$LINENO: checking for short" >&5
8776echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008777if test "${ac_cv_type_short+set}" = set; then
8778 echo $ECHO_N "(cached) $ECHO_C" >&6
8779else
8780 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008781/* confdefs.h. */
8782_ACEOF
8783cat confdefs.h >>conftest.$ac_ext
8784cat >>conftest.$ac_ext <<_ACEOF
8785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008786$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008787typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008788int
8789main ()
8790{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008791if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008792 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00008793if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008794 return 0;
8795 ;
8796 return 0;
8797}
8798_ACEOF
8799rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008800if { (ac_try="$ac_compile"
8801case "(($ac_try" in
8802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8803 *) ac_try_echo=$ac_try;;
8804esac
8805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008808 grep -v '^ *+' conftest.er1 >conftest.err
8809 rm -f conftest.er1
8810 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8812 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008813 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8814 { (case "(($ac_try" in
8815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8816 *) ac_try_echo=$ac_try;;
8817esac
8818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8819 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008820 ac_status=$?
8821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8822 (exit $ac_status); }; } &&
8823 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008824 { (case "(($ac_try" in
8825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8826 *) ac_try_echo=$ac_try;;
8827esac
8828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8829 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 ac_status=$?
8831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8832 (exit $ac_status); }; }; then
8833 ac_cv_type_short=yes
8834else
8835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008836sed 's/^/| /' conftest.$ac_ext >&5
8837
Thomas Wouters477c8d52006-05-27 19:21:47 +00008838 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008839fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008840
Skip Montanarof0d5f792004-08-15 14:08:23 +00008841rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008842fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008843{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8844echo "${ECHO_T}$ac_cv_type_short" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008845
Thomas Wouters477c8d52006-05-27 19:21:47 +00008846{ echo "$as_me:$LINENO: checking size of short" >&5
8847echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008848if test "${ac_cv_sizeof_short+set}" = set; then
8849 echo $ECHO_N "(cached) $ECHO_C" >&6
8850else
8851 if test "$ac_cv_type_short" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008852 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00008853 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8854 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8855 # This bug is HP SR number 8606223364.
8856 if test "$cross_compiling" = yes; then
8857 # Depending upon the size, compute the lo and hi bounds.
8858cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008859/* confdefs.h. */
8860_ACEOF
8861cat confdefs.h >>conftest.$ac_ext
8862cat >>conftest.$ac_ext <<_ACEOF
8863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008864$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008865 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008866int
8867main ()
8868{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008869static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008870test_array [0] = 0
8871
8872 ;
8873 return 0;
8874}
8875_ACEOF
8876rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008877if { (ac_try="$ac_compile"
8878case "(($ac_try" in
8879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8880 *) ac_try_echo=$ac_try;;
8881esac
8882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8883 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008885 grep -v '^ *+' conftest.er1 >conftest.err
8886 rm -f conftest.er1
8887 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8889 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008890 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8891 { (case "(($ac_try" in
8892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8893 *) ac_try_echo=$ac_try;;
8894esac
8895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8896 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008897 ac_status=$?
8898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8899 (exit $ac_status); }; } &&
8900 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008901 { (case "(($ac_try" in
8902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8903 *) ac_try_echo=$ac_try;;
8904esac
8905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8906 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 ac_status=$?
8908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8909 (exit $ac_status); }; }; then
8910 ac_lo=0 ac_mid=0
8911 while :; do
8912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008913/* confdefs.h. */
8914_ACEOF
8915cat confdefs.h >>conftest.$ac_ext
8916cat >>conftest.$ac_ext <<_ACEOF
8917/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008918$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008919 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008920int
8921main ()
8922{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008923static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008924test_array [0] = 0
8925
8926 ;
8927 return 0;
8928}
8929_ACEOF
8930rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008931if { (ac_try="$ac_compile"
8932case "(($ac_try" in
8933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8934 *) ac_try_echo=$ac_try;;
8935esac
8936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8937 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008939 grep -v '^ *+' conftest.er1 >conftest.err
8940 rm -f conftest.er1
8941 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8943 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008944 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
8945 { (case "(($ac_try" in
8946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8947 *) ac_try_echo=$ac_try;;
8948esac
8949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8950 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008951 ac_status=$?
8952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8953 (exit $ac_status); }; } &&
8954 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008955 { (case "(($ac_try" in
8956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8957 *) ac_try_echo=$ac_try;;
8958esac
8959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8960 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008961 ac_status=$?
8962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8963 (exit $ac_status); }; }; then
8964 ac_hi=$ac_mid; break
8965else
8966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008967sed 's/^/| /' conftest.$ac_ext >&5
8968
Thomas Wouters477c8d52006-05-27 19:21:47 +00008969 ac_lo=`expr $ac_mid + 1`
8970 if test $ac_lo -le $ac_mid; then
8971 ac_lo= ac_hi=
8972 break
8973 fi
8974 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008975fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00008976
Skip Montanarof0d5f792004-08-15 14:08:23 +00008977rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008978 done
8979else
8980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008981sed 's/^/| /' conftest.$ac_ext >&5
8982
Thomas Wouters477c8d52006-05-27 19:21:47 +00008983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008984/* confdefs.h. */
8985_ACEOF
8986cat confdefs.h >>conftest.$ac_ext
8987cat >>conftest.$ac_ext <<_ACEOF
8988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008989$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00008990 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008991int
8992main ()
8993{
Thomas Wouters477c8d52006-05-27 19:21:47 +00008994static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008995test_array [0] = 0
8996
8997 ;
8998 return 0;
8999}
9000_ACEOF
9001rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009002if { (ac_try="$ac_compile"
9003case "(($ac_try" in
9004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9005 *) ac_try_echo=$ac_try;;
9006esac
9007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009010 grep -v '^ *+' conftest.er1 >conftest.err
9011 rm -f conftest.er1
9012 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9014 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009015 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9016 { (case "(($ac_try" in
9017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9018 *) ac_try_echo=$ac_try;;
9019esac
9020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9021 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009022 ac_status=$?
9023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9024 (exit $ac_status); }; } &&
9025 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009026 { (case "(($ac_try" in
9027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9028 *) ac_try_echo=$ac_try;;
9029esac
9030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9031 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 ac_status=$?
9033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9034 (exit $ac_status); }; }; then
9035 ac_hi=-1 ac_mid=-1
9036 while :; do
9037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009038/* confdefs.h. */
9039_ACEOF
9040cat confdefs.h >>conftest.$ac_ext
9041cat >>conftest.$ac_ext <<_ACEOF
9042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009043$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009044 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009045int
9046main ()
9047{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009048static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009049test_array [0] = 0
9050
9051 ;
9052 return 0;
9053}
9054_ACEOF
9055rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009056if { (ac_try="$ac_compile"
9057case "(($ac_try" in
9058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9059 *) ac_try_echo=$ac_try;;
9060esac
9061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009064 grep -v '^ *+' conftest.er1 >conftest.err
9065 rm -f conftest.er1
9066 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9068 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009069 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9070 { (case "(($ac_try" in
9071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9072 *) ac_try_echo=$ac_try;;
9073esac
9074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9075 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009076 ac_status=$?
9077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9078 (exit $ac_status); }; } &&
9079 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009080 { (case "(($ac_try" in
9081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9082 *) ac_try_echo=$ac_try;;
9083esac
9084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9085 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009086 ac_status=$?
9087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9088 (exit $ac_status); }; }; then
9089 ac_lo=$ac_mid; break
9090else
9091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009092sed 's/^/| /' conftest.$ac_ext >&5
9093
Thomas Wouters477c8d52006-05-27 19:21:47 +00009094 ac_hi=`expr '(' $ac_mid ')' - 1`
9095 if test $ac_mid -le $ac_hi; then
9096 ac_lo= ac_hi=
9097 break
9098 fi
9099 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009100fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009101
Skip Montanarof0d5f792004-08-15 14:08:23 +00009102rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009103 done
9104else
9105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009106sed 's/^/| /' conftest.$ac_ext >&5
9107
Thomas Wouters477c8d52006-05-27 19:21:47 +00009108 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009109fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009110
Skip Montanarof0d5f792004-08-15 14:08:23 +00009111rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009112fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009113
Skip Montanarof0d5f792004-08-15 14:08:23 +00009114rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009115# Binary search between lo and hi bounds.
9116while test "x$ac_lo" != "x$ac_hi"; do
9117 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009119/* confdefs.h. */
9120_ACEOF
9121cat confdefs.h >>conftest.$ac_ext
9122cat >>conftest.$ac_ext <<_ACEOF
9123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009124$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009125 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009126int
9127main ()
9128{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009129static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009130test_array [0] = 0
9131
9132 ;
9133 return 0;
9134}
9135_ACEOF
9136rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009137if { (ac_try="$ac_compile"
9138case "(($ac_try" in
9139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9140 *) ac_try_echo=$ac_try;;
9141esac
9142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009145 grep -v '^ *+' conftest.er1 >conftest.err
9146 rm -f conftest.er1
9147 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9149 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009150 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9151 { (case "(($ac_try" in
9152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9153 *) ac_try_echo=$ac_try;;
9154esac
9155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9156 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009157 ac_status=$?
9158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9159 (exit $ac_status); }; } &&
9160 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009161 { (case "(($ac_try" in
9162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9163 *) ac_try_echo=$ac_try;;
9164esac
9165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9166 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009167 ac_status=$?
9168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9169 (exit $ac_status); }; }; then
9170 ac_hi=$ac_mid
9171else
9172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009173sed 's/^/| /' conftest.$ac_ext >&5
9174
Thomas Wouters477c8d52006-05-27 19:21:47 +00009175 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009176fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009177
Skip Montanarof0d5f792004-08-15 14:08:23 +00009178rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009179done
9180case $ac_lo in
9181?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00009182'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009183See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00009184echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009185See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00009186 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009187esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009188else
Martin v. Löwis11437992002-04-12 09:54:03 +00009189 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009190/* confdefs.h. */
9191_ACEOF
9192cat confdefs.h >>conftest.$ac_ext
9193cat >>conftest.$ac_ext <<_ACEOF
9194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009195$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009196 typedef short ac__type_sizeof_;
9197static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9198static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009199#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009200#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009201int
9202main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009203{
Martin v. Löwis11437992002-04-12 09:54:03 +00009204
9205 FILE *f = fopen ("conftest.val", "w");
9206 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009207 return 1;
9208 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00009210 long int i = longval ();
9211 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9212 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009213 fprintf (f, "%ld\n", i);
9214 }
9215 else
9216 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00009217 unsigned long int i = ulongval ();
9218 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9219 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009220 fprintf (f, "%lu\n", i);
9221 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009222 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009223
9224 ;
9225 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009226}
Martin v. Löwis11437992002-04-12 09:54:03 +00009227_ACEOF
9228rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009229if { (ac_try="$ac_link"
9230case "(($ac_try" in
9231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9232 *) ac_try_echo=$ac_try;;
9233esac
9234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9235 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009236 ac_status=$?
9237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9238 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009239 { (case "(($ac_try" in
9240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9241 *) ac_try_echo=$ac_try;;
9242esac
9243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9244 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009245 ac_status=$?
9246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9247 (exit $ac_status); }; }; then
9248 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009249else
Martin v. Löwis11437992002-04-12 09:54:03 +00009250 echo "$as_me: program exited with status $ac_status" >&5
9251echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009252sed 's/^/| /' conftest.$ac_ext >&5
9253
Martin v. Löwis11437992002-04-12 09:54:03 +00009254( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +00009255{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009256See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00009257echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009258See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00009259 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009260fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009262fi
9263rm -f conftest.val
9264else
Guido van Rossumef2255b2000-03-10 22:30:29 +00009265 ac_cv_sizeof_short=0
9266fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00009267fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009268{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9269echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009270cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009271#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009272_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009273
9274
Thomas Wouters477c8d52006-05-27 19:21:47 +00009275{ echo "$as_me:$LINENO: checking for float" >&5
9276echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009277if test "${ac_cv_type_float+set}" = set; then
9278 echo $ECHO_N "(cached) $ECHO_C" >&6
9279else
9280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009281/* confdefs.h. */
9282_ACEOF
9283cat confdefs.h >>conftest.$ac_ext
9284cat >>conftest.$ac_ext <<_ACEOF
9285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009286$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009287typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009288int
9289main ()
9290{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009291if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009292 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00009293if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 return 0;
9295 ;
9296 return 0;
9297}
9298_ACEOF
9299rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009300if { (ac_try="$ac_compile"
9301case "(($ac_try" in
9302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9303 *) ac_try_echo=$ac_try;;
9304esac
9305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9306 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009308 grep -v '^ *+' conftest.er1 >conftest.err
9309 rm -f conftest.er1
9310 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9312 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009313 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9314 { (case "(($ac_try" in
9315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9316 *) ac_try_echo=$ac_try;;
9317esac
9318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9319 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009320 ac_status=$?
9321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9322 (exit $ac_status); }; } &&
9323 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009324 { (case "(($ac_try" in
9325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9326 *) ac_try_echo=$ac_try;;
9327esac
9328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9329 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009330 ac_status=$?
9331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9332 (exit $ac_status); }; }; then
9333 ac_cv_type_float=yes
9334else
9335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009336sed 's/^/| /' conftest.$ac_ext >&5
9337
Thomas Wouters477c8d52006-05-27 19:21:47 +00009338 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009339fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009340
Skip Montanarof0d5f792004-08-15 14:08:23 +00009341rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009342fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009343{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9344echo "${ECHO_T}$ac_cv_type_float" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009345
Thomas Wouters477c8d52006-05-27 19:21:47 +00009346{ echo "$as_me:$LINENO: checking size of float" >&5
9347echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009348if test "${ac_cv_sizeof_float+set}" = set; then
9349 echo $ECHO_N "(cached) $ECHO_C" >&6
9350else
9351 if test "$ac_cv_type_float" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00009352 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00009353 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9354 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9355 # This bug is HP SR number 8606223364.
9356 if test "$cross_compiling" = yes; then
9357 # Depending upon the size, compute the lo and hi bounds.
9358cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009359/* confdefs.h. */
9360_ACEOF
9361cat confdefs.h >>conftest.$ac_ext
9362cat >>conftest.$ac_ext <<_ACEOF
9363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009364$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009365 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009366int
9367main ()
9368{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009369static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009370test_array [0] = 0
9371
9372 ;
9373 return 0;
9374}
9375_ACEOF
9376rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009377if { (ac_try="$ac_compile"
9378case "(($ac_try" in
9379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9380 *) ac_try_echo=$ac_try;;
9381esac
9382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9383 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009385 grep -v '^ *+' conftest.er1 >conftest.err
9386 rm -f conftest.er1
9387 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9389 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009390 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9391 { (case "(($ac_try" in
9392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9393 *) ac_try_echo=$ac_try;;
9394esac
9395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9396 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009397 ac_status=$?
9398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9399 (exit $ac_status); }; } &&
9400 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009401 { (case "(($ac_try" in
9402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9403 *) ac_try_echo=$ac_try;;
9404esac
9405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9406 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009407 ac_status=$?
9408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9409 (exit $ac_status); }; }; then
9410 ac_lo=0 ac_mid=0
9411 while :; do
9412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009413/* confdefs.h. */
9414_ACEOF
9415cat confdefs.h >>conftest.$ac_ext
9416cat >>conftest.$ac_ext <<_ACEOF
9417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009418$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009419 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009420int
9421main ()
9422{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009423static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009424test_array [0] = 0
9425
9426 ;
9427 return 0;
9428}
9429_ACEOF
9430rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009431if { (ac_try="$ac_compile"
9432case "(($ac_try" in
9433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9434 *) ac_try_echo=$ac_try;;
9435esac
9436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009439 grep -v '^ *+' conftest.er1 >conftest.err
9440 rm -f conftest.er1
9441 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9443 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009444 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9445 { (case "(($ac_try" in
9446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9447 *) ac_try_echo=$ac_try;;
9448esac
9449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9450 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009451 ac_status=$?
9452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9453 (exit $ac_status); }; } &&
9454 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009455 { (case "(($ac_try" in
9456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9457 *) ac_try_echo=$ac_try;;
9458esac
9459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9460 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009461 ac_status=$?
9462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9463 (exit $ac_status); }; }; then
9464 ac_hi=$ac_mid; break
9465else
9466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009467sed 's/^/| /' conftest.$ac_ext >&5
9468
Thomas Wouters477c8d52006-05-27 19:21:47 +00009469 ac_lo=`expr $ac_mid + 1`
9470 if test $ac_lo -le $ac_mid; then
9471 ac_lo= ac_hi=
9472 break
9473 fi
9474 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009475fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009476
Skip Montanarof0d5f792004-08-15 14:08:23 +00009477rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 done
9479else
9480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009481sed 's/^/| /' conftest.$ac_ext >&5
9482
Thomas Wouters477c8d52006-05-27 19:21:47 +00009483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009484/* confdefs.h. */
9485_ACEOF
9486cat confdefs.h >>conftest.$ac_ext
9487cat >>conftest.$ac_ext <<_ACEOF
9488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009489$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009490 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009491int
9492main ()
9493{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009494static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009495test_array [0] = 0
9496
9497 ;
9498 return 0;
9499}
9500_ACEOF
9501rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009502if { (ac_try="$ac_compile"
9503case "(($ac_try" in
9504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9505 *) ac_try_echo=$ac_try;;
9506esac
9507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009510 grep -v '^ *+' conftest.er1 >conftest.err
9511 rm -f conftest.er1
9512 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9514 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009515 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9516 { (case "(($ac_try" in
9517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9518 *) ac_try_echo=$ac_try;;
9519esac
9520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9521 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009522 ac_status=$?
9523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9524 (exit $ac_status); }; } &&
9525 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009526 { (case "(($ac_try" in
9527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9528 *) ac_try_echo=$ac_try;;
9529esac
9530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9531 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009532 ac_status=$?
9533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9534 (exit $ac_status); }; }; then
9535 ac_hi=-1 ac_mid=-1
9536 while :; do
9537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009538/* confdefs.h. */
9539_ACEOF
9540cat confdefs.h >>conftest.$ac_ext
9541cat >>conftest.$ac_ext <<_ACEOF
9542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009543$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009544 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009545int
9546main ()
9547{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009548static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009549test_array [0] = 0
9550
9551 ;
9552 return 0;
9553}
9554_ACEOF
9555rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009556if { (ac_try="$ac_compile"
9557case "(($ac_try" in
9558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9559 *) ac_try_echo=$ac_try;;
9560esac
9561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009564 grep -v '^ *+' conftest.er1 >conftest.err
9565 rm -f conftest.er1
9566 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9568 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009569 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9570 { (case "(($ac_try" in
9571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9572 *) ac_try_echo=$ac_try;;
9573esac
9574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9575 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009576 ac_status=$?
9577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9578 (exit $ac_status); }; } &&
9579 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009580 { (case "(($ac_try" in
9581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9582 *) ac_try_echo=$ac_try;;
9583esac
9584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9585 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009586 ac_status=$?
9587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9588 (exit $ac_status); }; }; then
9589 ac_lo=$ac_mid; break
9590else
9591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009592sed 's/^/| /' conftest.$ac_ext >&5
9593
Thomas Wouters477c8d52006-05-27 19:21:47 +00009594 ac_hi=`expr '(' $ac_mid ')' - 1`
9595 if test $ac_mid -le $ac_hi; then
9596 ac_lo= ac_hi=
9597 break
9598 fi
9599 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009600fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009601
Skip Montanarof0d5f792004-08-15 14:08:23 +00009602rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009603 done
9604else
9605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009606sed 's/^/| /' conftest.$ac_ext >&5
9607
Thomas Wouters477c8d52006-05-27 19:21:47 +00009608 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009609fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009610
Skip Montanarof0d5f792004-08-15 14:08:23 +00009611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009612fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009613
Skip Montanarof0d5f792004-08-15 14:08:23 +00009614rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009615# Binary search between lo and hi bounds.
9616while test "x$ac_lo" != "x$ac_hi"; do
9617 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9618 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009619/* confdefs.h. */
9620_ACEOF
9621cat confdefs.h >>conftest.$ac_ext
9622cat >>conftest.$ac_ext <<_ACEOF
9623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009624$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009625 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009626int
9627main ()
9628{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009629static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009630test_array [0] = 0
9631
9632 ;
9633 return 0;
9634}
9635_ACEOF
9636rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009637if { (ac_try="$ac_compile"
9638case "(($ac_try" in
9639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9640 *) ac_try_echo=$ac_try;;
9641esac
9642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9643 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009645 grep -v '^ *+' conftest.er1 >conftest.err
9646 rm -f conftest.er1
9647 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9649 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009650 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9651 { (case "(($ac_try" in
9652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9653 *) ac_try_echo=$ac_try;;
9654esac
9655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9656 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009657 ac_status=$?
9658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9659 (exit $ac_status); }; } &&
9660 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009661 { (case "(($ac_try" in
9662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9663 *) ac_try_echo=$ac_try;;
9664esac
9665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9666 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009667 ac_status=$?
9668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9669 (exit $ac_status); }; }; then
9670 ac_hi=$ac_mid
9671else
9672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009673sed 's/^/| /' conftest.$ac_ext >&5
9674
Thomas Wouters477c8d52006-05-27 19:21:47 +00009675 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009676fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009677
Skip Montanarof0d5f792004-08-15 14:08:23 +00009678rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009679done
9680case $ac_lo in
9681?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +00009682'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009683See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00009684echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009685See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00009686 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009687esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009688else
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009690/* confdefs.h. */
9691_ACEOF
9692cat confdefs.h >>conftest.$ac_ext
9693cat >>conftest.$ac_ext <<_ACEOF
9694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009695$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009696 typedef float ac__type_sizeof_;
9697static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9698static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009699#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009700#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009701int
9702main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009703{
Martin v. Löwis11437992002-04-12 09:54:03 +00009704
9705 FILE *f = fopen ("conftest.val", "w");
9706 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009707 return 1;
9708 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00009710 long int i = longval ();
9711 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9712 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 fprintf (f, "%ld\n", i);
9714 }
9715 else
9716 {
Thomas Wouters477c8d52006-05-27 19:21:47 +00009717 unsigned long int i = ulongval ();
9718 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9719 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 fprintf (f, "%lu\n", i);
9721 }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009722 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009723
9724 ;
9725 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009726}
Martin v. Löwis11437992002-04-12 09:54:03 +00009727_ACEOF
9728rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009729if { (ac_try="$ac_link"
9730case "(($ac_try" in
9731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9732 *) ac_try_echo=$ac_try;;
9733esac
9734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9735 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 ac_status=$?
9737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9738 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009739 { (case "(($ac_try" in
9740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9741 *) ac_try_echo=$ac_try;;
9742esac
9743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9744 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 ac_status=$?
9746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9747 (exit $ac_status); }; }; then
9748 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009749else
Martin v. Löwis11437992002-04-12 09:54:03 +00009750 echo "$as_me: program exited with status $ac_status" >&5
9751echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009752sed 's/^/| /' conftest.$ac_ext >&5
9753
Martin v. Löwis11437992002-04-12 09:54:03 +00009754( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +00009755{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009756See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +00009757echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009758See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +00009759 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009760fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009762fi
9763rm -f conftest.val
9764else
Guido van Rossumef2255b2000-03-10 22:30:29 +00009765 ac_cv_sizeof_float=0
9766fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00009767fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009768{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9769echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009770cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009771#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009772_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009773
9774
Thomas Wouters477c8d52006-05-27 19:21:47 +00009775{ echo "$as_me:$LINENO: checking for double" >&5
9776echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009777if test "${ac_cv_type_double+set}" = set; then
9778 echo $ECHO_N "(cached) $ECHO_C" >&6
9779else
9780 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009781/* confdefs.h. */
9782_ACEOF
9783cat confdefs.h >>conftest.$ac_ext
9784cat >>conftest.$ac_ext <<_ACEOF
9785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009786$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009787typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009788int
9789main ()
9790{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009791if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009792 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +00009793if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 return 0;
9795 ;
9796 return 0;
9797}
9798_ACEOF
9799rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009800if { (ac_try="$ac_compile"
9801case "(($ac_try" in
9802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9803 *) ac_try_echo=$ac_try;;
9804esac
9805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009808 grep -v '^ *+' conftest.er1 >conftest.err
9809 rm -f conftest.er1
9810 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9812 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009813 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9814 { (case "(($ac_try" in
9815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9816 *) ac_try_echo=$ac_try;;
9817esac
9818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9819 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009820 ac_status=$?
9821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9822 (exit $ac_status); }; } &&
9823 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009824 { (case "(($ac_try" in
9825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9826 *) ac_try_echo=$ac_try;;
9827esac
9828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9829 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 ac_status=$?
9831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9832 (exit $ac_status); }; }; then
9833 ac_cv_type_double=yes
9834else
9835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009836sed 's/^/| /' conftest.$ac_ext >&5
9837
Thomas Wouters477c8d52006-05-27 19:21:47 +00009838 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009839fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009840
Skip Montanarof0d5f792004-08-15 14:08:23 +00009841rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009842fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009843{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9844echo "${ECHO_T}$ac_cv_type_double" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009845
Thomas Wouters477c8d52006-05-27 19:21:47 +00009846{ echo "$as_me:$LINENO: checking size of double" >&5
9847echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009848if test "${ac_cv_sizeof_double+set}" = set; then
9849 echo $ECHO_N "(cached) $ECHO_C" >&6
9850else
9851 if test "$ac_cv_type_double" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +00009852 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +00009853 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9854 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9855 # This bug is HP SR number 8606223364.
9856 if test "$cross_compiling" = yes; then
9857 # Depending upon the size, compute the lo and hi bounds.
9858cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009859/* confdefs.h. */
9860_ACEOF
9861cat confdefs.h >>conftest.$ac_ext
9862cat >>conftest.$ac_ext <<_ACEOF
9863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009864$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009865 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009866int
9867main ()
9868{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009869static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009870test_array [0] = 0
9871
9872 ;
9873 return 0;
9874}
9875_ACEOF
9876rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009877if { (ac_try="$ac_compile"
9878case "(($ac_try" in
9879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9880 *) ac_try_echo=$ac_try;;
9881esac
9882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9883 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009885 grep -v '^ *+' conftest.er1 >conftest.err
9886 rm -f conftest.er1
9887 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9889 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009890 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9891 { (case "(($ac_try" in
9892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9893 *) ac_try_echo=$ac_try;;
9894esac
9895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9896 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009897 ac_status=$?
9898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9899 (exit $ac_status); }; } &&
9900 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009901 { (case "(($ac_try" in
9902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9903 *) ac_try_echo=$ac_try;;
9904esac
9905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9906 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009907 ac_status=$?
9908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9909 (exit $ac_status); }; }; then
9910 ac_lo=0 ac_mid=0
9911 while :; do
9912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009913/* confdefs.h. */
9914_ACEOF
9915cat confdefs.h >>conftest.$ac_ext
9916cat >>conftest.$ac_ext <<_ACEOF
9917/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009918$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009919 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009920int
9921main ()
9922{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009923static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009924test_array [0] = 0
9925
9926 ;
9927 return 0;
9928}
9929_ACEOF
9930rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009931if { (ac_try="$ac_compile"
9932case "(($ac_try" in
9933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9934 *) ac_try_echo=$ac_try;;
9935esac
9936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9937 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009939 grep -v '^ *+' conftest.er1 >conftest.err
9940 rm -f conftest.er1
9941 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9943 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009944 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
9945 { (case "(($ac_try" in
9946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9947 *) ac_try_echo=$ac_try;;
9948esac
9949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9950 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009951 ac_status=$?
9952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9953 (exit $ac_status); }; } &&
9954 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009955 { (case "(($ac_try" in
9956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9957 *) ac_try_echo=$ac_try;;
9958esac
9959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9960 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009961 ac_status=$?
9962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9963 (exit $ac_status); }; }; then
9964 ac_hi=$ac_mid; break
9965else
9966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009967sed 's/^/| /' conftest.$ac_ext >&5
9968
Thomas Wouters477c8d52006-05-27 19:21:47 +00009969 ac_lo=`expr $ac_mid + 1`
9970 if test $ac_lo -le $ac_mid; then
9971 ac_lo= ac_hi=
9972 break
9973 fi
9974 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009975fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00009976
Skip Montanarof0d5f792004-08-15 14:08:23 +00009977rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009978 done
9979else
9980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009981sed 's/^/| /' conftest.$ac_ext >&5
9982
Thomas Wouters477c8d52006-05-27 19:21:47 +00009983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009984/* confdefs.h. */
9985_ACEOF
9986cat confdefs.h >>conftest.$ac_ext
9987cat >>conftest.$ac_ext <<_ACEOF
9988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009989$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +00009990 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009991int
9992main ()
9993{
Thomas Wouters477c8d52006-05-27 19:21:47 +00009994static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009995test_array [0] = 0
9996
9997 ;
9998 return 0;
9999}
10000_ACEOF
10001rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010002if { (ac_try="$ac_compile"
10003case "(($ac_try" in
10004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10005 *) ac_try_echo=$ac_try;;
10006esac
10007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010010 grep -v '^ *+' conftest.er1 >conftest.err
10011 rm -f conftest.er1
10012 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10014 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010015 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10016 { (case "(($ac_try" in
10017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10018 *) ac_try_echo=$ac_try;;
10019esac
10020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10021 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010022 ac_status=$?
10023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10024 (exit $ac_status); }; } &&
10025 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010026 { (case "(($ac_try" in
10027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10028 *) ac_try_echo=$ac_try;;
10029esac
10030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10031 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 ac_status=$?
10033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10034 (exit $ac_status); }; }; then
10035 ac_hi=-1 ac_mid=-1
10036 while :; do
10037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010038/* confdefs.h. */
10039_ACEOF
10040cat confdefs.h >>conftest.$ac_ext
10041cat >>conftest.$ac_ext <<_ACEOF
10042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010043$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010044 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010045int
10046main ()
10047{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010048static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010049test_array [0] = 0
10050
10051 ;
10052 return 0;
10053}
10054_ACEOF
10055rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010056if { (ac_try="$ac_compile"
10057case "(($ac_try" in
10058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10059 *) ac_try_echo=$ac_try;;
10060esac
10061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010064 grep -v '^ *+' conftest.er1 >conftest.err
10065 rm -f conftest.er1
10066 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10068 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010069 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10070 { (case "(($ac_try" in
10071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10072 *) ac_try_echo=$ac_try;;
10073esac
10074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10075 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010076 ac_status=$?
10077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10078 (exit $ac_status); }; } &&
10079 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010080 { (case "(($ac_try" in
10081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10082 *) ac_try_echo=$ac_try;;
10083esac
10084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10085 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010086 ac_status=$?
10087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10088 (exit $ac_status); }; }; then
10089 ac_lo=$ac_mid; break
10090else
10091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010092sed 's/^/| /' conftest.$ac_ext >&5
10093
Thomas Wouters477c8d52006-05-27 19:21:47 +000010094 ac_hi=`expr '(' $ac_mid ')' - 1`
10095 if test $ac_mid -le $ac_hi; then
10096 ac_lo= ac_hi=
10097 break
10098 fi
10099 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010100fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010101
Skip Montanarof0d5f792004-08-15 14:08:23 +000010102rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010103 done
10104else
10105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010106sed 's/^/| /' conftest.$ac_ext >&5
10107
Thomas Wouters477c8d52006-05-27 19:21:47 +000010108 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010109fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010110
Skip Montanarof0d5f792004-08-15 14:08:23 +000010111rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010112fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010113
Skip Montanarof0d5f792004-08-15 14:08:23 +000010114rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010115# Binary search between lo and hi bounds.
10116while test "x$ac_lo" != "x$ac_hi"; do
10117 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010119/* confdefs.h. */
10120_ACEOF
10121cat confdefs.h >>conftest.$ac_ext
10122cat >>conftest.$ac_ext <<_ACEOF
10123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010124$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010125 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010126int
10127main ()
10128{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010129static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010130test_array [0] = 0
10131
10132 ;
10133 return 0;
10134}
10135_ACEOF
10136rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010137if { (ac_try="$ac_compile"
10138case "(($ac_try" in
10139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10140 *) ac_try_echo=$ac_try;;
10141esac
10142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010145 grep -v '^ *+' conftest.er1 >conftest.err
10146 rm -f conftest.er1
10147 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10149 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010150 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10151 { (case "(($ac_try" in
10152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10153 *) ac_try_echo=$ac_try;;
10154esac
10155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10156 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010157 ac_status=$?
10158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10159 (exit $ac_status); }; } &&
10160 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010161 { (case "(($ac_try" in
10162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10163 *) ac_try_echo=$ac_try;;
10164esac
10165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10166 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 ac_status=$?
10168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10169 (exit $ac_status); }; }; then
10170 ac_hi=$ac_mid
10171else
10172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010173sed 's/^/| /' conftest.$ac_ext >&5
10174
Thomas Wouters477c8d52006-05-27 19:21:47 +000010175 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010176fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010177
Skip Montanarof0d5f792004-08-15 14:08:23 +000010178rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010179done
10180case $ac_lo in
10181?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000010182'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010183See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000010184echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010185See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000010186 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010187esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000010188else
Martin v. Löwis11437992002-04-12 09:54:03 +000010189 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010190/* confdefs.h. */
10191_ACEOF
10192cat confdefs.h >>conftest.$ac_ext
10193cat >>conftest.$ac_ext <<_ACEOF
10194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010195$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010196 typedef double ac__type_sizeof_;
10197static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10198static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010199#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010200#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010201int
10202main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +000010203{
Martin v. Löwis11437992002-04-12 09:54:03 +000010204
10205 FILE *f = fopen ("conftest.val", "w");
10206 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000010207 return 1;
10208 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010209 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000010210 long int i = longval ();
10211 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10212 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010213 fprintf (f, "%ld\n", i);
10214 }
10215 else
10216 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000010217 unsigned long int i = ulongval ();
10218 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10219 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010220 fprintf (f, "%lu\n", i);
10221 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000010222 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010223
10224 ;
10225 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000010226}
Martin v. Löwis11437992002-04-12 09:54:03 +000010227_ACEOF
10228rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010229if { (ac_try="$ac_link"
10230case "(($ac_try" in
10231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10232 *) ac_try_echo=$ac_try;;
10233esac
10234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10235 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010236 ac_status=$?
10237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10238 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010239 { (case "(($ac_try" in
10240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10241 *) ac_try_echo=$ac_try;;
10242esac
10243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10244 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_status=$?
10246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10247 (exit $ac_status); }; }; then
10248 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010249else
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 echo "$as_me: program exited with status $ac_status" >&5
10251echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010252sed 's/^/| /' conftest.$ac_ext >&5
10253
Martin v. Löwis11437992002-04-12 09:54:03 +000010254( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000010255{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010256See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000010257echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010258See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000010259 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010260fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010262fi
10263rm -f conftest.val
10264else
Guido van Rossumef2255b2000-03-10 22:30:29 +000010265 ac_cv_sizeof_double=0
10266fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000010267fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010268{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10269echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010270cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010271#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010272_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010273
10274
Thomas Wouters477c8d52006-05-27 19:21:47 +000010275{ echo "$as_me:$LINENO: checking for fpos_t" >&5
10276echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010277if test "${ac_cv_type_fpos_t+set}" = set; then
10278 echo $ECHO_N "(cached) $ECHO_C" >&6
10279else
10280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010281/* confdefs.h. */
10282_ACEOF
10283cat confdefs.h >>conftest.$ac_ext
10284cat >>conftest.$ac_ext <<_ACEOF
10285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010286$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010287typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010288int
10289main ()
10290{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010291if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000010293if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010294 return 0;
10295 ;
10296 return 0;
10297}
10298_ACEOF
10299rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010300if { (ac_try="$ac_compile"
10301case "(($ac_try" in
10302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10303 *) ac_try_echo=$ac_try;;
10304esac
10305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10306 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010308 grep -v '^ *+' conftest.er1 >conftest.err
10309 rm -f conftest.er1
10310 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10312 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010313 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10314 { (case "(($ac_try" in
10315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10316 *) ac_try_echo=$ac_try;;
10317esac
10318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10319 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010320 ac_status=$?
10321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10322 (exit $ac_status); }; } &&
10323 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010324 { (case "(($ac_try" in
10325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10326 *) ac_try_echo=$ac_try;;
10327esac
10328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10329 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 ac_status=$?
10331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10332 (exit $ac_status); }; }; then
10333 ac_cv_type_fpos_t=yes
10334else
10335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010336sed 's/^/| /' conftest.$ac_ext >&5
10337
Thomas Wouters477c8d52006-05-27 19:21:47 +000010338 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010339fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010340
Skip Montanarof0d5f792004-08-15 14:08:23 +000010341rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010342fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010343{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10344echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010345
Thomas Wouters477c8d52006-05-27 19:21:47 +000010346{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10347echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010348if test "${ac_cv_sizeof_fpos_t+set}" = set; then
10349 echo $ECHO_N "(cached) $ECHO_C" >&6
10350else
10351 if test "$ac_cv_type_fpos_t" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000010352 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +000010353 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10354 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10355 # This bug is HP SR number 8606223364.
10356 if test "$cross_compiling" = yes; then
10357 # Depending upon the size, compute the lo and hi bounds.
10358cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010359/* confdefs.h. */
10360_ACEOF
10361cat confdefs.h >>conftest.$ac_ext
10362cat >>conftest.$ac_ext <<_ACEOF
10363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010364$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010365 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010366int
10367main ()
10368{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010369static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010370test_array [0] = 0
10371
10372 ;
10373 return 0;
10374}
10375_ACEOF
10376rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010377if { (ac_try="$ac_compile"
10378case "(($ac_try" in
10379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10380 *) ac_try_echo=$ac_try;;
10381esac
10382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10383 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010385 grep -v '^ *+' conftest.er1 >conftest.err
10386 rm -f conftest.er1
10387 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10389 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010390 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10391 { (case "(($ac_try" in
10392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10393 *) ac_try_echo=$ac_try;;
10394esac
10395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10396 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010397 ac_status=$?
10398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10399 (exit $ac_status); }; } &&
10400 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010401 { (case "(($ac_try" in
10402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10403 *) ac_try_echo=$ac_try;;
10404esac
10405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10406 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 ac_status=$?
10408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10409 (exit $ac_status); }; }; then
10410 ac_lo=0 ac_mid=0
10411 while :; do
10412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010413/* confdefs.h. */
10414_ACEOF
10415cat confdefs.h >>conftest.$ac_ext
10416cat >>conftest.$ac_ext <<_ACEOF
10417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010418$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010419 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010420int
10421main ()
10422{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010423static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010424test_array [0] = 0
10425
10426 ;
10427 return 0;
10428}
10429_ACEOF
10430rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010431if { (ac_try="$ac_compile"
10432case "(($ac_try" in
10433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10434 *) ac_try_echo=$ac_try;;
10435esac
10436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010439 grep -v '^ *+' conftest.er1 >conftest.err
10440 rm -f conftest.er1
10441 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10443 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010444 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10445 { (case "(($ac_try" in
10446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10447 *) ac_try_echo=$ac_try;;
10448esac
10449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10450 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010451 ac_status=$?
10452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10453 (exit $ac_status); }; } &&
10454 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010455 { (case "(($ac_try" in
10456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10457 *) ac_try_echo=$ac_try;;
10458esac
10459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10460 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010461 ac_status=$?
10462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10463 (exit $ac_status); }; }; then
10464 ac_hi=$ac_mid; break
10465else
10466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010467sed 's/^/| /' conftest.$ac_ext >&5
10468
Thomas Wouters477c8d52006-05-27 19:21:47 +000010469 ac_lo=`expr $ac_mid + 1`
10470 if test $ac_lo -le $ac_mid; then
10471 ac_lo= ac_hi=
10472 break
10473 fi
10474 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010475fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010476
Skip Montanarof0d5f792004-08-15 14:08:23 +000010477rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010478 done
10479else
10480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010481sed 's/^/| /' conftest.$ac_ext >&5
10482
Thomas Wouters477c8d52006-05-27 19:21:47 +000010483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010484/* confdefs.h. */
10485_ACEOF
10486cat confdefs.h >>conftest.$ac_ext
10487cat >>conftest.$ac_ext <<_ACEOF
10488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010489$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010490 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010491int
10492main ()
10493{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010494static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010495test_array [0] = 0
10496
10497 ;
10498 return 0;
10499}
10500_ACEOF
10501rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010502if { (ac_try="$ac_compile"
10503case "(($ac_try" in
10504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10505 *) ac_try_echo=$ac_try;;
10506esac
10507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010510 grep -v '^ *+' conftest.er1 >conftest.err
10511 rm -f conftest.er1
10512 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10514 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010515 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10516 { (case "(($ac_try" in
10517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10518 *) ac_try_echo=$ac_try;;
10519esac
10520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10521 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010522 ac_status=$?
10523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10524 (exit $ac_status); }; } &&
10525 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010526 { (case "(($ac_try" in
10527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10528 *) ac_try_echo=$ac_try;;
10529esac
10530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10531 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010532 ac_status=$?
10533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10534 (exit $ac_status); }; }; then
10535 ac_hi=-1 ac_mid=-1
10536 while :; do
10537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010538/* confdefs.h. */
10539_ACEOF
10540cat confdefs.h >>conftest.$ac_ext
10541cat >>conftest.$ac_ext <<_ACEOF
10542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010543$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010544 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010545int
10546main ()
10547{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010548static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010549test_array [0] = 0
10550
10551 ;
10552 return 0;
10553}
10554_ACEOF
10555rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010556if { (ac_try="$ac_compile"
10557case "(($ac_try" in
10558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10559 *) ac_try_echo=$ac_try;;
10560esac
10561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010564 grep -v '^ *+' conftest.er1 >conftest.err
10565 rm -f conftest.er1
10566 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10568 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010569 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10570 { (case "(($ac_try" in
10571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10572 *) ac_try_echo=$ac_try;;
10573esac
10574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10575 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010576 ac_status=$?
10577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10578 (exit $ac_status); }; } &&
10579 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010580 { (case "(($ac_try" in
10581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10582 *) ac_try_echo=$ac_try;;
10583esac
10584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10585 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010586 ac_status=$?
10587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10588 (exit $ac_status); }; }; then
10589 ac_lo=$ac_mid; break
10590else
10591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010592sed 's/^/| /' conftest.$ac_ext >&5
10593
Thomas Wouters477c8d52006-05-27 19:21:47 +000010594 ac_hi=`expr '(' $ac_mid ')' - 1`
10595 if test $ac_mid -le $ac_hi; then
10596 ac_lo= ac_hi=
10597 break
10598 fi
10599 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010600fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010601
Skip Montanarof0d5f792004-08-15 14:08:23 +000010602rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010603 done
10604else
10605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010606sed 's/^/| /' conftest.$ac_ext >&5
10607
Thomas Wouters477c8d52006-05-27 19:21:47 +000010608 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010609fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010610
Skip Montanarof0d5f792004-08-15 14:08:23 +000010611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010612fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010613
Skip Montanarof0d5f792004-08-15 14:08:23 +000010614rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010615# Binary search between lo and hi bounds.
10616while test "x$ac_lo" != "x$ac_hi"; do
10617 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10618 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010619/* confdefs.h. */
10620_ACEOF
10621cat confdefs.h >>conftest.$ac_ext
10622cat >>conftest.$ac_ext <<_ACEOF
10623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010624$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010625 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010626int
10627main ()
10628{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010629static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010630test_array [0] = 0
10631
10632 ;
10633 return 0;
10634}
10635_ACEOF
10636rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010637if { (ac_try="$ac_compile"
10638case "(($ac_try" in
10639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10640 *) ac_try_echo=$ac_try;;
10641esac
10642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10643 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010645 grep -v '^ *+' conftest.er1 >conftest.err
10646 rm -f conftest.er1
10647 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10649 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010650 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10651 { (case "(($ac_try" in
10652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10653 *) ac_try_echo=$ac_try;;
10654esac
10655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10656 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010657 ac_status=$?
10658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10659 (exit $ac_status); }; } &&
10660 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010661 { (case "(($ac_try" in
10662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10663 *) ac_try_echo=$ac_try;;
10664esac
10665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10666 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010667 ac_status=$?
10668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10669 (exit $ac_status); }; }; then
10670 ac_hi=$ac_mid
10671else
10672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010673sed 's/^/| /' conftest.$ac_ext >&5
10674
Thomas Wouters477c8d52006-05-27 19:21:47 +000010675 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010676fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010677
Skip Montanarof0d5f792004-08-15 14:08:23 +000010678rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010679done
10680case $ac_lo in
10681?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000010682'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010683See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000010684echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010685See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000010686 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010687esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010688else
Martin v. Löwis11437992002-04-12 09:54:03 +000010689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010690/* confdefs.h. */
10691_ACEOF
10692cat confdefs.h >>conftest.$ac_ext
10693cat >>conftest.$ac_ext <<_ACEOF
10694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010695$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010696 typedef fpos_t ac__type_sizeof_;
10697static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10698static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010699#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010700#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010701int
10702main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010703{
Martin v. Löwis11437992002-04-12 09:54:03 +000010704
10705 FILE *f = fopen ("conftest.val", "w");
10706 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000010707 return 1;
10708 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010709 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000010710 long int i = longval ();
10711 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10712 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 fprintf (f, "%ld\n", i);
10714 }
10715 else
10716 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000010717 unsigned long int i = ulongval ();
10718 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10719 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010720 fprintf (f, "%lu\n", i);
10721 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000010722 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010723
10724 ;
10725 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010726}
Martin v. Löwis11437992002-04-12 09:54:03 +000010727_ACEOF
10728rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010729if { (ac_try="$ac_link"
10730case "(($ac_try" in
10731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10732 *) ac_try_echo=$ac_try;;
10733esac
10734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10735 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010736 ac_status=$?
10737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10738 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010739 { (case "(($ac_try" in
10740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10741 *) ac_try_echo=$ac_try;;
10742esac
10743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10744 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010745 ac_status=$?
10746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10747 (exit $ac_status); }; }; then
10748 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010749else
Martin v. Löwis11437992002-04-12 09:54:03 +000010750 echo "$as_me: program exited with status $ac_status" >&5
10751echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010752sed 's/^/| /' conftest.$ac_ext >&5
10753
Martin v. Löwis11437992002-04-12 09:54:03 +000010754( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000010755{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010756See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000010757echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010758See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000010759 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010760fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010762fi
10763rm -f conftest.val
10764else
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010765 ac_cv_sizeof_fpos_t=0
10766fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010767fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010768{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10769echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010770cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010771#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010772_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010773
Michael W. Hudson54241132001-12-07 15:38:26 +000010774
Thomas Wouters477c8d52006-05-27 19:21:47 +000010775{ echo "$as_me:$LINENO: checking for size_t" >&5
10776echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010777if test "${ac_cv_type_size_t+set}" = set; then
10778 echo $ECHO_N "(cached) $ECHO_C" >&6
10779else
10780 cat >conftest.$ac_ext <<_ACEOF
10781/* confdefs.h. */
10782_ACEOF
10783cat confdefs.h >>conftest.$ac_ext
10784cat >>conftest.$ac_ext <<_ACEOF
10785/* end confdefs.h. */
10786$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010787typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010788int
10789main ()
10790{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010791if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010792 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000010793if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +000010794 return 0;
10795 ;
10796 return 0;
10797}
10798_ACEOF
10799rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010800if { (ac_try="$ac_compile"
10801case "(($ac_try" in
10802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10803 *) ac_try_echo=$ac_try;;
10804esac
10805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010807 ac_status=$?
10808 grep -v '^ *+' conftest.er1 >conftest.err
10809 rm -f conftest.er1
10810 cat conftest.err >&5
10811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10812 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010813 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10814 { (case "(($ac_try" in
10815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10816 *) ac_try_echo=$ac_try;;
10817esac
10818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10819 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010820 ac_status=$?
10821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10822 (exit $ac_status); }; } &&
10823 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010824 { (case "(($ac_try" in
10825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10826 *) ac_try_echo=$ac_try;;
10827esac
10828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10829 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010830 ac_status=$?
10831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10832 (exit $ac_status); }; }; then
10833 ac_cv_type_size_t=yes
10834else
10835 echo "$as_me: failed program was:" >&5
10836sed 's/^/| /' conftest.$ac_ext >&5
10837
Thomas Wouters477c8d52006-05-27 19:21:47 +000010838 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +000010839fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010840
Martin v. Löwis18e16552006-02-15 17:27:45 +000010841rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10842fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010843{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10844echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010845
Thomas Wouters477c8d52006-05-27 19:21:47 +000010846{ echo "$as_me:$LINENO: checking size of size_t" >&5
10847echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010848if test "${ac_cv_sizeof_size_t+set}" = set; then
10849 echo $ECHO_N "(cached) $ECHO_C" >&6
10850else
10851 if test "$ac_cv_type_size_t" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000010852 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis18e16552006-02-15 17:27:45 +000010853 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10854 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10855 # This bug is HP SR number 8606223364.
10856 if test "$cross_compiling" = yes; then
10857 # Depending upon the size, compute the lo and hi bounds.
10858cat >conftest.$ac_ext <<_ACEOF
10859/* confdefs.h. */
10860_ACEOF
10861cat confdefs.h >>conftest.$ac_ext
10862cat >>conftest.$ac_ext <<_ACEOF
10863/* end confdefs.h. */
10864$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010865 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010866int
10867main ()
10868{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010869static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010870test_array [0] = 0
10871
10872 ;
10873 return 0;
10874}
10875_ACEOF
10876rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010877if { (ac_try="$ac_compile"
10878case "(($ac_try" in
10879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10880 *) ac_try_echo=$ac_try;;
10881esac
10882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10883 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010884 ac_status=$?
10885 grep -v '^ *+' conftest.er1 >conftest.err
10886 rm -f conftest.er1
10887 cat conftest.err >&5
10888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10889 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010890 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10891 { (case "(($ac_try" in
10892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10893 *) ac_try_echo=$ac_try;;
10894esac
10895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10896 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010897 ac_status=$?
10898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10899 (exit $ac_status); }; } &&
10900 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010901 { (case "(($ac_try" in
10902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10903 *) ac_try_echo=$ac_try;;
10904esac
10905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10906 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010907 ac_status=$?
10908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10909 (exit $ac_status); }; }; then
10910 ac_lo=0 ac_mid=0
10911 while :; do
10912 cat >conftest.$ac_ext <<_ACEOF
10913/* confdefs.h. */
10914_ACEOF
10915cat confdefs.h >>conftest.$ac_ext
10916cat >>conftest.$ac_ext <<_ACEOF
10917/* end confdefs.h. */
10918$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010919 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010920int
10921main ()
10922{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010923static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010924test_array [0] = 0
10925
10926 ;
10927 return 0;
10928}
10929_ACEOF
10930rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010931if { (ac_try="$ac_compile"
10932case "(($ac_try" in
10933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10934 *) ac_try_echo=$ac_try;;
10935esac
10936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10937 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010938 ac_status=$?
10939 grep -v '^ *+' conftest.er1 >conftest.err
10940 rm -f conftest.er1
10941 cat conftest.err >&5
10942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10943 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010944 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
10945 { (case "(($ac_try" in
10946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10947 *) ac_try_echo=$ac_try;;
10948esac
10949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10950 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010951 ac_status=$?
10952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10953 (exit $ac_status); }; } &&
10954 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000010955 { (case "(($ac_try" in
10956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10957 *) ac_try_echo=$ac_try;;
10958esac
10959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10960 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010961 ac_status=$?
10962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10963 (exit $ac_status); }; }; then
10964 ac_hi=$ac_mid; break
10965else
10966 echo "$as_me: failed program was:" >&5
10967sed 's/^/| /' conftest.$ac_ext >&5
10968
Thomas Wouters477c8d52006-05-27 19:21:47 +000010969 ac_lo=`expr $ac_mid + 1`
10970 if test $ac_lo -le $ac_mid; then
10971 ac_lo= ac_hi=
10972 break
10973 fi
10974 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010975fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000010976
Martin v. Löwis18e16552006-02-15 17:27:45 +000010977rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10978 done
10979else
10980 echo "$as_me: failed program was:" >&5
10981sed 's/^/| /' conftest.$ac_ext >&5
10982
Thomas Wouters477c8d52006-05-27 19:21:47 +000010983 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010984/* confdefs.h. */
10985_ACEOF
10986cat confdefs.h >>conftest.$ac_ext
10987cat >>conftest.$ac_ext <<_ACEOF
10988/* end confdefs.h. */
10989$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000010990 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010991int
10992main ()
10993{
Thomas Wouters477c8d52006-05-27 19:21:47 +000010994static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010995test_array [0] = 0
10996
10997 ;
10998 return 0;
10999}
11000_ACEOF
11001rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011002if { (ac_try="$ac_compile"
11003case "(($ac_try" in
11004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11005 *) ac_try_echo=$ac_try;;
11006esac
11007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000011009 ac_status=$?
11010 grep -v '^ *+' conftest.er1 >conftest.err
11011 rm -f conftest.er1
11012 cat conftest.err >&5
11013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11014 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011015 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11016 { (case "(($ac_try" in
11017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11018 *) ac_try_echo=$ac_try;;
11019esac
11020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11021 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011022 ac_status=$?
11023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11024 (exit $ac_status); }; } &&
11025 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011026 { (case "(($ac_try" in
11027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11028 *) ac_try_echo=$ac_try;;
11029esac
11030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11031 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011032 ac_status=$?
11033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11034 (exit $ac_status); }; }; then
11035 ac_hi=-1 ac_mid=-1
11036 while :; do
11037 cat >conftest.$ac_ext <<_ACEOF
11038/* confdefs.h. */
11039_ACEOF
11040cat confdefs.h >>conftest.$ac_ext
11041cat >>conftest.$ac_ext <<_ACEOF
11042/* end confdefs.h. */
11043$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011044 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011045int
11046main ()
11047{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011048static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000011049test_array [0] = 0
11050
11051 ;
11052 return 0;
11053}
11054_ACEOF
11055rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011056if { (ac_try="$ac_compile"
11057case "(($ac_try" in
11058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11059 *) ac_try_echo=$ac_try;;
11060esac
11061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000011063 ac_status=$?
11064 grep -v '^ *+' conftest.er1 >conftest.err
11065 rm -f conftest.er1
11066 cat conftest.err >&5
11067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11068 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011069 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11070 { (case "(($ac_try" in
11071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11072 *) ac_try_echo=$ac_try;;
11073esac
11074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11075 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011076 ac_status=$?
11077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11078 (exit $ac_status); }; } &&
11079 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011080 { (case "(($ac_try" in
11081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11082 *) ac_try_echo=$ac_try;;
11083esac
11084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11085 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011086 ac_status=$?
11087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11088 (exit $ac_status); }; }; then
11089 ac_lo=$ac_mid; break
11090else
11091 echo "$as_me: failed program was:" >&5
11092sed 's/^/| /' conftest.$ac_ext >&5
11093
Thomas Wouters477c8d52006-05-27 19:21:47 +000011094 ac_hi=`expr '(' $ac_mid ')' - 1`
11095 if test $ac_mid -le $ac_hi; then
11096 ac_lo= ac_hi=
11097 break
11098 fi
11099 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000011100fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011101
Martin v. Löwis18e16552006-02-15 17:27:45 +000011102rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11103 done
11104else
11105 echo "$as_me: failed program was:" >&5
11106sed 's/^/| /' conftest.$ac_ext >&5
11107
Thomas Wouters477c8d52006-05-27 19:21:47 +000011108 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000011109fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011110
Martin v. Löwis18e16552006-02-15 17:27:45 +000011111rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11112fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011113
Martin v. Löwis18e16552006-02-15 17:27:45 +000011114rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11115# Binary search between lo and hi bounds.
11116while test "x$ac_lo" != "x$ac_hi"; do
11117 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11118 cat >conftest.$ac_ext <<_ACEOF
11119/* confdefs.h. */
11120_ACEOF
11121cat confdefs.h >>conftest.$ac_ext
11122cat >>conftest.$ac_ext <<_ACEOF
11123/* end confdefs.h. */
11124$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011125 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011126int
11127main ()
11128{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011129static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000011130test_array [0] = 0
11131
11132 ;
11133 return 0;
11134}
11135_ACEOF
11136rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011137if { (ac_try="$ac_compile"
11138case "(($ac_try" in
11139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11140 *) ac_try_echo=$ac_try;;
11141esac
11142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000011144 ac_status=$?
11145 grep -v '^ *+' conftest.er1 >conftest.err
11146 rm -f conftest.er1
11147 cat conftest.err >&5
11148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11149 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011150 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11151 { (case "(($ac_try" in
11152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11153 *) ac_try_echo=$ac_try;;
11154esac
11155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11156 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011157 ac_status=$?
11158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11159 (exit $ac_status); }; } &&
11160 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011161 { (case "(($ac_try" in
11162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11163 *) ac_try_echo=$ac_try;;
11164esac
11165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11166 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011167 ac_status=$?
11168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11169 (exit $ac_status); }; }; then
11170 ac_hi=$ac_mid
11171else
11172 echo "$as_me: failed program was:" >&5
11173sed 's/^/| /' conftest.$ac_ext >&5
11174
Thomas Wouters477c8d52006-05-27 19:21:47 +000011175 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000011176fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011177
Martin v. Löwis18e16552006-02-15 17:27:45 +000011178rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11179done
11180case $ac_lo in
11181?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000011182'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011183See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000011184echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011185See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000011186 { (exit 77); exit 77; }; } ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011187esac
11188else
Martin v. Löwis18e16552006-02-15 17:27:45 +000011189 cat >conftest.$ac_ext <<_ACEOF
11190/* confdefs.h. */
11191_ACEOF
11192cat confdefs.h >>conftest.$ac_ext
11193cat >>conftest.$ac_ext <<_ACEOF
11194/* end confdefs.h. */
11195$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011196 typedef size_t ac__type_sizeof_;
11197static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11198static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000011199#include <stdio.h>
11200#include <stdlib.h>
11201int
11202main ()
11203{
11204
11205 FILE *f = fopen ("conftest.val", "w");
11206 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000011207 return 1;
11208 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011209 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000011210 long int i = longval ();
11211 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11212 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011213 fprintf (f, "%ld\n", i);
11214 }
11215 else
11216 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000011217 unsigned long int i = ulongval ();
11218 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11219 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011220 fprintf (f, "%lu\n", i);
11221 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000011222 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011223
11224 ;
11225 return 0;
11226}
11227_ACEOF
11228rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011229if { (ac_try="$ac_link"
11230case "(($ac_try" in
11231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11232 *) ac_try_echo=$ac_try;;
11233esac
11234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11235 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011236 ac_status=$?
11237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11238 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011239 { (case "(($ac_try" in
11240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11241 *) ac_try_echo=$ac_try;;
11242esac
11243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11244 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011245 ac_status=$?
11246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11247 (exit $ac_status); }; }; then
11248 ac_cv_sizeof_size_t=`cat conftest.val`
11249else
11250 echo "$as_me: program exited with status $ac_status" >&5
11251echo "$as_me: failed program was:" >&5
11252sed 's/^/| /' conftest.$ac_ext >&5
11253
11254( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000011255{ { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011256See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000011257echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011258See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000011259 { (exit 77); exit 77; }; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000011260fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000011262fi
11263rm -f conftest.val
11264else
11265 ac_cv_sizeof_size_t=0
11266fi
11267fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011268{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
11269echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000011270cat >>confdefs.h <<_ACEOF
11271#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
11272_ACEOF
11273
11274
Michael W. Hudson54241132001-12-07 15:38:26 +000011275
Thomas Wouters477c8d52006-05-27 19:21:47 +000011276{ echo "$as_me:$LINENO: checking for long long support" >&5
11277echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011278have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011279cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011280/* confdefs.h. */
11281_ACEOF
11282cat confdefs.h >>conftest.$ac_ext
11283cat >>conftest.$ac_ext <<_ACEOF
11284/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011285
Martin v. Löwis11437992002-04-12 09:54:03 +000011286int
11287main ()
11288{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011289long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 ;
11291 return 0;
11292}
11293_ACEOF
11294rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011295if { (ac_try="$ac_compile"
11296case "(($ac_try" in
11297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11298 *) ac_try_echo=$ac_try;;
11299esac
11300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11301 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011303 grep -v '^ *+' conftest.er1 >conftest.err
11304 rm -f conftest.er1
11305 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11307 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011308 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11309 { (case "(($ac_try" in
11310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11311 *) ac_try_echo=$ac_try;;
11312esac
11313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11314 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011315 ac_status=$?
11316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11317 (exit $ac_status); }; } &&
11318 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011319 { (case "(($ac_try" in
11320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11321 *) ac_try_echo=$ac_try;;
11322esac
11323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11324 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 ac_status=$?
11326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11327 (exit $ac_status); }; }; then
11328
11329
11330cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011331#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011332_ACEOF
11333
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011334 have_long_long=yes
11335
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011336else
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011338sed 's/^/| /' conftest.$ac_ext >&5
11339
Thomas Wouters477c8d52006-05-27 19:21:47 +000011340
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011341fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011342
Skip Montanarof0d5f792004-08-15 14:08:23 +000011343rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000011344{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11345echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011346if test "$have_long_long" = yes ; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000011347{ echo "$as_me:$LINENO: checking for long long" >&5
11348echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011349if test "${ac_cv_type_long_long+set}" = set; then
11350 echo $ECHO_N "(cached) $ECHO_C" >&6
11351else
11352 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011353/* confdefs.h. */
11354_ACEOF
11355cat confdefs.h >>conftest.$ac_ext
11356cat >>conftest.$ac_ext <<_ACEOF
11357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011358$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011359typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011360int
11361main ()
11362{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011363if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000011365if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011366 return 0;
11367 ;
11368 return 0;
11369}
11370_ACEOF
11371rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011372if { (ac_try="$ac_compile"
11373case "(($ac_try" in
11374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11375 *) ac_try_echo=$ac_try;;
11376esac
11377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011380 grep -v '^ *+' conftest.er1 >conftest.err
11381 rm -f conftest.er1
11382 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11384 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011385 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11386 { (case "(($ac_try" in
11387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11388 *) ac_try_echo=$ac_try;;
11389esac
11390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11391 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011392 ac_status=$?
11393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11394 (exit $ac_status); }; } &&
11395 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011396 { (case "(($ac_try" in
11397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11398 *) ac_try_echo=$ac_try;;
11399esac
11400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11401 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011402 ac_status=$?
11403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11404 (exit $ac_status); }; }; then
11405 ac_cv_type_long_long=yes
11406else
11407 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011408sed 's/^/| /' conftest.$ac_ext >&5
11409
Thomas Wouters477c8d52006-05-27 19:21:47 +000011410 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011411fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011412
Skip Montanarof0d5f792004-08-15 14:08:23 +000011413rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011414fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011415{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11416echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011417
Thomas Wouters477c8d52006-05-27 19:21:47 +000011418{ echo "$as_me:$LINENO: checking size of long long" >&5
11419echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011420if test "${ac_cv_sizeof_long_long+set}" = set; then
11421 echo $ECHO_N "(cached) $ECHO_C" >&6
11422else
11423 if test "$ac_cv_type_long_long" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000011424 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +000011425 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11426 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11427 # This bug is HP SR number 8606223364.
11428 if test "$cross_compiling" = yes; then
11429 # Depending upon the size, compute the lo and hi bounds.
11430cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011431/* confdefs.h. */
11432_ACEOF
11433cat confdefs.h >>conftest.$ac_ext
11434cat >>conftest.$ac_ext <<_ACEOF
11435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011436$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011437 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011438int
11439main ()
11440{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011441static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011442test_array [0] = 0
11443
11444 ;
11445 return 0;
11446}
11447_ACEOF
11448rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011449if { (ac_try="$ac_compile"
11450case "(($ac_try" in
11451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11452 *) ac_try_echo=$ac_try;;
11453esac
11454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011457 grep -v '^ *+' conftest.er1 >conftest.err
11458 rm -f conftest.er1
11459 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11461 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011462 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11463 { (case "(($ac_try" in
11464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11465 *) ac_try_echo=$ac_try;;
11466esac
11467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11468 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011469 ac_status=$?
11470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11471 (exit $ac_status); }; } &&
11472 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011473 { (case "(($ac_try" in
11474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11475 *) ac_try_echo=$ac_try;;
11476esac
11477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11478 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011479 ac_status=$?
11480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11481 (exit $ac_status); }; }; then
11482 ac_lo=0 ac_mid=0
11483 while :; do
11484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011485/* confdefs.h. */
11486_ACEOF
11487cat confdefs.h >>conftest.$ac_ext
11488cat >>conftest.$ac_ext <<_ACEOF
11489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011490$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011491 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011492int
11493main ()
11494{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011495static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011496test_array [0] = 0
11497
11498 ;
11499 return 0;
11500}
11501_ACEOF
11502rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011503if { (ac_try="$ac_compile"
11504case "(($ac_try" in
11505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11506 *) ac_try_echo=$ac_try;;
11507esac
11508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011511 grep -v '^ *+' conftest.er1 >conftest.err
11512 rm -f conftest.er1
11513 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11515 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011516 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11517 { (case "(($ac_try" in
11518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11519 *) ac_try_echo=$ac_try;;
11520esac
11521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11522 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011523 ac_status=$?
11524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11525 (exit $ac_status); }; } &&
11526 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011527 { (case "(($ac_try" in
11528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11529 *) ac_try_echo=$ac_try;;
11530esac
11531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11532 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011533 ac_status=$?
11534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11535 (exit $ac_status); }; }; then
11536 ac_hi=$ac_mid; break
11537else
11538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011539sed 's/^/| /' conftest.$ac_ext >&5
11540
Thomas Wouters477c8d52006-05-27 19:21:47 +000011541 ac_lo=`expr $ac_mid + 1`
11542 if test $ac_lo -le $ac_mid; then
11543 ac_lo= ac_hi=
11544 break
11545 fi
11546 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011547fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011548
Skip Montanarof0d5f792004-08-15 14:08:23 +000011549rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011550 done
11551else
11552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011553sed 's/^/| /' conftest.$ac_ext >&5
11554
Thomas Wouters477c8d52006-05-27 19:21:47 +000011555 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011556/* confdefs.h. */
11557_ACEOF
11558cat confdefs.h >>conftest.$ac_ext
11559cat >>conftest.$ac_ext <<_ACEOF
11560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011561$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011562 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011563int
11564main ()
11565{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011566static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011567test_array [0] = 0
11568
11569 ;
11570 return 0;
11571}
11572_ACEOF
11573rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011574if { (ac_try="$ac_compile"
11575case "(($ac_try" in
11576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11577 *) ac_try_echo=$ac_try;;
11578esac
11579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11580 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011582 grep -v '^ *+' conftest.er1 >conftest.err
11583 rm -f conftest.er1
11584 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11586 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011587 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11588 { (case "(($ac_try" in
11589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11590 *) ac_try_echo=$ac_try;;
11591esac
11592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11593 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011594 ac_status=$?
11595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11596 (exit $ac_status); }; } &&
11597 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011598 { (case "(($ac_try" in
11599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11600 *) ac_try_echo=$ac_try;;
11601esac
11602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11603 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011604 ac_status=$?
11605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11606 (exit $ac_status); }; }; then
11607 ac_hi=-1 ac_mid=-1
11608 while :; do
11609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011610/* confdefs.h. */
11611_ACEOF
11612cat confdefs.h >>conftest.$ac_ext
11613cat >>conftest.$ac_ext <<_ACEOF
11614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011615$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011616 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011617int
11618main ()
11619{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011620static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011621test_array [0] = 0
11622
11623 ;
11624 return 0;
11625}
11626_ACEOF
11627rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011628if { (ac_try="$ac_compile"
11629case "(($ac_try" in
11630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11631 *) ac_try_echo=$ac_try;;
11632esac
11633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11634 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011636 grep -v '^ *+' conftest.er1 >conftest.err
11637 rm -f conftest.er1
11638 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11640 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011641 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11642 { (case "(($ac_try" in
11643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11644 *) ac_try_echo=$ac_try;;
11645esac
11646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11647 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011648 ac_status=$?
11649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11650 (exit $ac_status); }; } &&
11651 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011652 { (case "(($ac_try" in
11653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11654 *) ac_try_echo=$ac_try;;
11655esac
11656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11657 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011658 ac_status=$?
11659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11660 (exit $ac_status); }; }; then
11661 ac_lo=$ac_mid; break
11662else
11663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011664sed 's/^/| /' conftest.$ac_ext >&5
11665
Thomas Wouters477c8d52006-05-27 19:21:47 +000011666 ac_hi=`expr '(' $ac_mid ')' - 1`
11667 if test $ac_mid -le $ac_hi; then
11668 ac_lo= ac_hi=
11669 break
11670 fi
11671 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011672fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011673
Skip Montanarof0d5f792004-08-15 14:08:23 +000011674rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011675 done
11676else
11677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011678sed 's/^/| /' conftest.$ac_ext >&5
11679
Thomas Wouters477c8d52006-05-27 19:21:47 +000011680 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011681fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011682
Skip Montanarof0d5f792004-08-15 14:08:23 +000011683rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011684fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011685
Skip Montanarof0d5f792004-08-15 14:08:23 +000011686rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011687# Binary search between lo and hi bounds.
11688while test "x$ac_lo" != "x$ac_hi"; do
11689 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11690 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011691/* confdefs.h. */
11692_ACEOF
11693cat confdefs.h >>conftest.$ac_ext
11694cat >>conftest.$ac_ext <<_ACEOF
11695/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011696$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011697 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011698int
11699main ()
11700{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011701static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011702test_array [0] = 0
11703
11704 ;
11705 return 0;
11706}
11707_ACEOF
11708rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011709if { (ac_try="$ac_compile"
11710case "(($ac_try" in
11711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11712 *) ac_try_echo=$ac_try;;
11713esac
11714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11715 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011717 grep -v '^ *+' conftest.er1 >conftest.err
11718 rm -f conftest.er1
11719 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11721 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011722 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11723 { (case "(($ac_try" in
11724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11725 *) ac_try_echo=$ac_try;;
11726esac
11727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11728 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011729 ac_status=$?
11730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11731 (exit $ac_status); }; } &&
11732 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011733 { (case "(($ac_try" in
11734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11735 *) ac_try_echo=$ac_try;;
11736esac
11737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11738 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011739 ac_status=$?
11740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11741 (exit $ac_status); }; }; then
11742 ac_hi=$ac_mid
11743else
11744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011745sed 's/^/| /' conftest.$ac_ext >&5
11746
Thomas Wouters477c8d52006-05-27 19:21:47 +000011747 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011748fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011749
Skip Montanarof0d5f792004-08-15 14:08:23 +000011750rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011751done
11752case $ac_lo in
11753?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000011754'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011755See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000011756echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011757See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000011758 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011759esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011760else
Martin v. Löwis11437992002-04-12 09:54:03 +000011761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011762/* confdefs.h. */
11763_ACEOF
11764cat confdefs.h >>conftest.$ac_ext
11765cat >>conftest.$ac_ext <<_ACEOF
11766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011767$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011768 typedef long long ac__type_sizeof_;
11769static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11770static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011771#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011772#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011773int
11774main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011775{
Martin v. Löwis11437992002-04-12 09:54:03 +000011776
11777 FILE *f = fopen ("conftest.val", "w");
11778 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000011779 return 1;
11780 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011781 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000011782 long int i = longval ();
11783 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11784 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011785 fprintf (f, "%ld\n", i);
11786 }
11787 else
11788 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000011789 unsigned long int i = ulongval ();
11790 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11791 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011792 fprintf (f, "%lu\n", i);
11793 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000011794 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011795
11796 ;
11797 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011798}
Martin v. Löwis11437992002-04-12 09:54:03 +000011799_ACEOF
11800rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011801if { (ac_try="$ac_link"
11802case "(($ac_try" in
11803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11804 *) ac_try_echo=$ac_try;;
11805esac
11806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11807 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011808 ac_status=$?
11809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11810 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011811 { (case "(($ac_try" in
11812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11813 *) ac_try_echo=$ac_try;;
11814esac
11815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11816 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011817 ac_status=$?
11818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11819 (exit $ac_status); }; }; then
11820 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011821else
Martin v. Löwis11437992002-04-12 09:54:03 +000011822 echo "$as_me: program exited with status $ac_status" >&5
11823echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011824sed 's/^/| /' conftest.$ac_ext >&5
11825
Martin v. Löwis11437992002-04-12 09:54:03 +000011826( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000011827{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011828See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000011829echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011830See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000011831 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011832fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011833rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011834fi
11835rm -f conftest.val
11836else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011837 ac_cv_sizeof_long_long=0
11838fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011839fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011840{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11841echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011842cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011843#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011844_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011845
Michael W. Hudson54241132001-12-07 15:38:26 +000011846
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011847fi
11848
Thomas Wouters477c8d52006-05-27 19:21:47 +000011849{ echo "$as_me:$LINENO: checking for uintptr_t support" >&5
11850echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011851have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011853/* confdefs.h. */
11854_ACEOF
11855cat confdefs.h >>conftest.$ac_ext
11856cat >>conftest.$ac_ext <<_ACEOF
11857/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011858
Martin v. Löwis11437992002-04-12 09:54:03 +000011859int
11860main ()
11861{
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011862uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011863 ;
11864 return 0;
11865}
11866_ACEOF
11867rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011868if { (ac_try="$ac_compile"
11869case "(($ac_try" in
11870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11871 *) ac_try_echo=$ac_try;;
11872esac
11873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11874 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011876 grep -v '^ *+' conftest.er1 >conftest.err
11877 rm -f conftest.er1
11878 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11880 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011881 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11882 { (case "(($ac_try" in
11883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11884 *) ac_try_echo=$ac_try;;
11885esac
11886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11887 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011888 ac_status=$?
11889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11890 (exit $ac_status); }; } &&
11891 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011892 { (case "(($ac_try" in
11893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11894 *) ac_try_echo=$ac_try;;
11895esac
11896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11897 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011898 ac_status=$?
11899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11900 (exit $ac_status); }; }; then
11901
11902
11903cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011904#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011905_ACEOF
11906
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011907 have_uintptr_t=yes
11908
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011909else
Martin v. Löwis11437992002-04-12 09:54:03 +000011910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011911sed 's/^/| /' conftest.$ac_ext >&5
11912
Thomas Wouters477c8d52006-05-27 19:21:47 +000011913
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011914fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011915
Skip Montanarof0d5f792004-08-15 14:08:23 +000011916rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000011917{ echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
11918echo "${ECHO_T}$have_uintptr_t" >&6; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011919if test "$have_uintptr_t" = yes ; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000011920{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11921echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011922if test "${ac_cv_type_uintptr_t+set}" = set; then
11923 echo $ECHO_N "(cached) $ECHO_C" >&6
11924else
11925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011926/* confdefs.h. */
11927_ACEOF
11928cat confdefs.h >>conftest.$ac_ext
11929cat >>conftest.$ac_ext <<_ACEOF
11930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011931$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000011932typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011933int
11934main ()
11935{
Thomas Wouters477c8d52006-05-27 19:21:47 +000011936if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011937 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000011938if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011939 return 0;
11940 ;
11941 return 0;
11942}
11943_ACEOF
11944rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011945if { (ac_try="$ac_compile"
11946case "(($ac_try" in
11947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11948 *) ac_try_echo=$ac_try;;
11949esac
11950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011953 grep -v '^ *+' conftest.er1 >conftest.err
11954 rm -f conftest.er1
11955 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11957 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011958 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
11959 { (case "(($ac_try" in
11960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11961 *) ac_try_echo=$ac_try;;
11962esac
11963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11964 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011965 ac_status=$?
11966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11967 (exit $ac_status); }; } &&
11968 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011969 { (case "(($ac_try" in
11970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11971 *) ac_try_echo=$ac_try;;
11972esac
11973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11974 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011975 ac_status=$?
11976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11977 (exit $ac_status); }; }; then
11978 ac_cv_type_uintptr_t=yes
11979else
11980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011981sed 's/^/| /' conftest.$ac_ext >&5
11982
Thomas Wouters477c8d52006-05-27 19:21:47 +000011983 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011984fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011985
Skip Montanarof0d5f792004-08-15 14:08:23 +000011986rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011987fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000011988{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11989echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011990
Thomas Wouters477c8d52006-05-27 19:21:47 +000011991{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11992echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011993if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11994 echo $ECHO_N "(cached) $ECHO_C" >&6
11995else
11996 if test "$ac_cv_type_uintptr_t" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000011997 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +000011998 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11999 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12000 # This bug is HP SR number 8606223364.
12001 if test "$cross_compiling" = yes; then
12002 # Depending upon the size, compute the lo and hi bounds.
12003cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012004/* confdefs.h. */
12005_ACEOF
12006cat confdefs.h >>conftest.$ac_ext
12007cat >>conftest.$ac_ext <<_ACEOF
12008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012009$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012010 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012011int
12012main ()
12013{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012014static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012015test_array [0] = 0
12016
12017 ;
12018 return 0;
12019}
12020_ACEOF
12021rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012022if { (ac_try="$ac_compile"
12023case "(($ac_try" in
12024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12025 *) ac_try_echo=$ac_try;;
12026esac
12027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12028 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012030 grep -v '^ *+' conftest.er1 >conftest.err
12031 rm -f conftest.er1
12032 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12034 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012035 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12036 { (case "(($ac_try" in
12037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12038 *) ac_try_echo=$ac_try;;
12039esac
12040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12041 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012042 ac_status=$?
12043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12044 (exit $ac_status); }; } &&
12045 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012046 { (case "(($ac_try" in
12047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12048 *) ac_try_echo=$ac_try;;
12049esac
12050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12051 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012052 ac_status=$?
12053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12054 (exit $ac_status); }; }; then
12055 ac_lo=0 ac_mid=0
12056 while :; do
12057 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012058/* confdefs.h. */
12059_ACEOF
12060cat confdefs.h >>conftest.$ac_ext
12061cat >>conftest.$ac_ext <<_ACEOF
12062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012063$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012064 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012065int
12066main ()
12067{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012068static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012069test_array [0] = 0
12070
12071 ;
12072 return 0;
12073}
12074_ACEOF
12075rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012076if { (ac_try="$ac_compile"
12077case "(($ac_try" in
12078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12079 *) ac_try_echo=$ac_try;;
12080esac
12081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12082 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012083 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012084 grep -v '^ *+' conftest.er1 >conftest.err
12085 rm -f conftest.er1
12086 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12088 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012089 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12090 { (case "(($ac_try" in
12091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12092 *) ac_try_echo=$ac_try;;
12093esac
12094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12095 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012096 ac_status=$?
12097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12098 (exit $ac_status); }; } &&
12099 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012100 { (case "(($ac_try" in
12101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12102 *) ac_try_echo=$ac_try;;
12103esac
12104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12105 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 ac_status=$?
12107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12108 (exit $ac_status); }; }; then
12109 ac_hi=$ac_mid; break
12110else
12111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012112sed 's/^/| /' conftest.$ac_ext >&5
12113
Thomas Wouters477c8d52006-05-27 19:21:47 +000012114 ac_lo=`expr $ac_mid + 1`
12115 if test $ac_lo -le $ac_mid; then
12116 ac_lo= ac_hi=
12117 break
12118 fi
12119 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012120fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012121
Skip Montanarof0d5f792004-08-15 14:08:23 +000012122rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012123 done
12124else
12125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012126sed 's/^/| /' conftest.$ac_ext >&5
12127
Thomas Wouters477c8d52006-05-27 19:21:47 +000012128 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012129/* confdefs.h. */
12130_ACEOF
12131cat confdefs.h >>conftest.$ac_ext
12132cat >>conftest.$ac_ext <<_ACEOF
12133/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012134$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012135 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012136int
12137main ()
12138{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012139static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012140test_array [0] = 0
12141
12142 ;
12143 return 0;
12144}
12145_ACEOF
12146rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012147if { (ac_try="$ac_compile"
12148case "(($ac_try" in
12149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12150 *) ac_try_echo=$ac_try;;
12151esac
12152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12153 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012155 grep -v '^ *+' conftest.er1 >conftest.err
12156 rm -f conftest.er1
12157 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12159 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012160 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12161 { (case "(($ac_try" in
12162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12163 *) ac_try_echo=$ac_try;;
12164esac
12165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12166 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012167 ac_status=$?
12168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12169 (exit $ac_status); }; } &&
12170 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012171 { (case "(($ac_try" in
12172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12173 *) ac_try_echo=$ac_try;;
12174esac
12175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12176 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012177 ac_status=$?
12178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12179 (exit $ac_status); }; }; then
12180 ac_hi=-1 ac_mid=-1
12181 while :; do
12182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012183/* confdefs.h. */
12184_ACEOF
12185cat confdefs.h >>conftest.$ac_ext
12186cat >>conftest.$ac_ext <<_ACEOF
12187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012188$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012189 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012190int
12191main ()
12192{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012193static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012194test_array [0] = 0
12195
12196 ;
12197 return 0;
12198}
12199_ACEOF
12200rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012201if { (ac_try="$ac_compile"
12202case "(($ac_try" in
12203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12204 *) ac_try_echo=$ac_try;;
12205esac
12206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012209 grep -v '^ *+' conftest.er1 >conftest.err
12210 rm -f conftest.er1
12211 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12213 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012214 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12215 { (case "(($ac_try" in
12216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12217 *) ac_try_echo=$ac_try;;
12218esac
12219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12220 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012221 ac_status=$?
12222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12223 (exit $ac_status); }; } &&
12224 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012225 { (case "(($ac_try" in
12226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12227 *) ac_try_echo=$ac_try;;
12228esac
12229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12230 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012231 ac_status=$?
12232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12233 (exit $ac_status); }; }; then
12234 ac_lo=$ac_mid; break
12235else
12236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012237sed 's/^/| /' conftest.$ac_ext >&5
12238
Thomas Wouters477c8d52006-05-27 19:21:47 +000012239 ac_hi=`expr '(' $ac_mid ')' - 1`
12240 if test $ac_mid -le $ac_hi; then
12241 ac_lo= ac_hi=
12242 break
12243 fi
12244 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012245fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012246
Skip Montanarof0d5f792004-08-15 14:08:23 +000012247rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012248 done
12249else
12250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012251sed 's/^/| /' conftest.$ac_ext >&5
12252
Thomas Wouters477c8d52006-05-27 19:21:47 +000012253 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012254fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012255
Skip Montanarof0d5f792004-08-15 14:08:23 +000012256rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012257fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012258
Skip Montanarof0d5f792004-08-15 14:08:23 +000012259rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012260# Binary search between lo and hi bounds.
12261while test "x$ac_lo" != "x$ac_hi"; do
12262 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012264/* confdefs.h. */
12265_ACEOF
12266cat confdefs.h >>conftest.$ac_ext
12267cat >>conftest.$ac_ext <<_ACEOF
12268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012269$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012270 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012271int
12272main ()
12273{
Thomas Wouters477c8d52006-05-27 19:21:47 +000012274static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012275test_array [0] = 0
12276
12277 ;
12278 return 0;
12279}
12280_ACEOF
12281rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012282if { (ac_try="$ac_compile"
12283case "(($ac_try" in
12284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12285 *) ac_try_echo=$ac_try;;
12286esac
12287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12288 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012289 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012290 grep -v '^ *+' conftest.er1 >conftest.err
12291 rm -f conftest.er1
12292 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12294 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012295 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12296 { (case "(($ac_try" in
12297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12298 *) ac_try_echo=$ac_try;;
12299esac
12300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12301 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012302 ac_status=$?
12303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12304 (exit $ac_status); }; } &&
12305 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012306 { (case "(($ac_try" in
12307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12308 *) ac_try_echo=$ac_try;;
12309esac
12310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12311 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012312 ac_status=$?
12313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12314 (exit $ac_status); }; }; then
12315 ac_hi=$ac_mid
12316else
12317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012318sed 's/^/| /' conftest.$ac_ext >&5
12319
Thomas Wouters477c8d52006-05-27 19:21:47 +000012320 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012321fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012322
Skip Montanarof0d5f792004-08-15 14:08:23 +000012323rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012324done
12325case $ac_lo in
12326?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000012327'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012328See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000012329echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012330See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000012331 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012332esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012333else
Martin v. Löwis11437992002-04-12 09:54:03 +000012334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012335/* confdefs.h. */
12336_ACEOF
12337cat confdefs.h >>conftest.$ac_ext
12338cat >>conftest.$ac_ext <<_ACEOF
12339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012340$ac_includes_default
Thomas Wouters477c8d52006-05-27 19:21:47 +000012341 typedef uintptr_t ac__type_sizeof_;
12342static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12343static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012344#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012345#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012346int
12347main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012348{
Martin v. Löwis11437992002-04-12 09:54:03 +000012349
12350 FILE *f = fopen ("conftest.val", "w");
12351 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000012352 return 1;
12353 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000012355 long int i = longval ();
12356 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12357 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012358 fprintf (f, "%ld\n", i);
12359 }
12360 else
12361 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000012362 unsigned long int i = ulongval ();
12363 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12364 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012365 fprintf (f, "%lu\n", i);
12366 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000012367 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012368
12369 ;
12370 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012371}
Martin v. Löwis11437992002-04-12 09:54:03 +000012372_ACEOF
12373rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012374if { (ac_try="$ac_link"
12375case "(($ac_try" in
12376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12377 *) ac_try_echo=$ac_try;;
12378esac
12379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12380 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 ac_status=$?
12382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12383 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012384 { (case "(($ac_try" in
12385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12386 *) ac_try_echo=$ac_try;;
12387esac
12388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12389 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012390 ac_status=$?
12391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12392 (exit $ac_status); }; }; then
12393 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012394else
Martin v. Löwis11437992002-04-12 09:54:03 +000012395 echo "$as_me: program exited with status $ac_status" >&5
12396echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012397sed 's/^/| /' conftest.$ac_ext >&5
12398
Martin v. Löwis11437992002-04-12 09:54:03 +000012399( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000012400{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012401See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000012402echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012403See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000012404 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012405fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012407fi
12408rm -f conftest.val
12409else
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012410 ac_cv_sizeof_uintptr_t=0
12411fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012412fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012413{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12414echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012415cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012416#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012417_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012418
Michael W. Hudson54241132001-12-07 15:38:26 +000012419
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012420fi
12421
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012422# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Thomas Wouters477c8d52006-05-27 19:21:47 +000012423{ echo "$as_me:$LINENO: checking size of off_t" >&5
12424echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012425if test "${ac_cv_sizeof_off_t+set}" = set; then
12426 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012427else
12428 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012429 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012430else
Martin v. Löwis11437992002-04-12 09:54:03 +000012431 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012432/* confdefs.h. */
12433_ACEOF
12434cat confdefs.h >>conftest.$ac_ext
12435cat >>conftest.$ac_ext <<_ACEOF
12436/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012437#include <stdio.h>
12438#include <sys/types.h>
12439main()
12440{
12441 FILE *f=fopen("conftestval", "w");
12442 if (!f) exit(1);
12443 fprintf(f, "%d\n", sizeof(off_t));
12444 exit(0);
12445}
Martin v. Löwis11437992002-04-12 09:54:03 +000012446_ACEOF
12447rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012448if { (ac_try="$ac_link"
12449case "(($ac_try" in
12450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12451 *) ac_try_echo=$ac_try;;
12452esac
12453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12454 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012455 ac_status=$?
12456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12457 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012458 { (case "(($ac_try" in
12459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12460 *) ac_try_echo=$ac_try;;
12461esac
12462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12463 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012464 ac_status=$?
12465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12466 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012467 ac_cv_sizeof_off_t=`cat conftestval`
12468else
Martin v. Löwis11437992002-04-12 09:54:03 +000012469 echo "$as_me: program exited with status $ac_status" >&5
12470echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012471sed 's/^/| /' conftest.$ac_ext >&5
12472
Martin v. Löwis11437992002-04-12 09:54:03 +000012473( exit $ac_status )
12474ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012475fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012477fi
12478
Thomas Wouters477c8d52006-05-27 19:21:47 +000012479
12480
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012481fi
12482
Thomas Wouters477c8d52006-05-27 19:21:47 +000012483{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12484echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012485
12486cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012487#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012488_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012489
Michael W. Hudson54241132001-12-07 15:38:26 +000012490
Thomas Wouters477c8d52006-05-27 19:21:47 +000012491{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12492echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012493if test "$have_long_long" = yes -a \
12494 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12495 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012496
Martin v. Löwis11437992002-04-12 09:54:03 +000012497cat >>confdefs.h <<\_ACEOF
12498#define HAVE_LARGEFILE_SUPPORT 1
12499_ACEOF
12500
Thomas Wouters477c8d52006-05-27 19:21:47 +000012501 { echo "$as_me:$LINENO: result: yes" >&5
12502echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012503else
Thomas Wouters477c8d52006-05-27 19:21:47 +000012504 { echo "$as_me:$LINENO: result: no" >&5
12505echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012506fi
12507
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012508# AC_CHECK_SIZEOF() doesn't include <time.h>.
Thomas Wouters477c8d52006-05-27 19:21:47 +000012509{ echo "$as_me:$LINENO: checking size of time_t" >&5
12510echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012511if test "${ac_cv_sizeof_time_t+set}" = set; then
12512 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012513else
12514 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012515 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012516else
Martin v. Löwis11437992002-04-12 09:54:03 +000012517 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012518/* confdefs.h. */
12519_ACEOF
12520cat confdefs.h >>conftest.$ac_ext
12521cat >>conftest.$ac_ext <<_ACEOF
12522/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012523#include <stdio.h>
12524#include <time.h>
12525main()
12526{
12527 FILE *f=fopen("conftestval", "w");
12528 if (!f) exit(1);
12529 fprintf(f, "%d\n", sizeof(time_t));
12530 exit(0);
12531}
Martin v. Löwis11437992002-04-12 09:54:03 +000012532_ACEOF
12533rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012534if { (ac_try="$ac_link"
12535case "(($ac_try" in
12536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12537 *) ac_try_echo=$ac_try;;
12538esac
12539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12540 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012541 ac_status=$?
12542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12543 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012544 { (case "(($ac_try" in
12545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12546 *) ac_try_echo=$ac_try;;
12547esac
12548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12549 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012550 ac_status=$?
12551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12552 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012553 ac_cv_sizeof_time_t=`cat conftestval`
12554else
Martin v. Löwis11437992002-04-12 09:54:03 +000012555 echo "$as_me: program exited with status $ac_status" >&5
12556echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012557sed 's/^/| /' conftest.$ac_ext >&5
12558
Martin v. Löwis11437992002-04-12 09:54:03 +000012559( exit $ac_status )
12560ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012561fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012563fi
12564
Thomas Wouters477c8d52006-05-27 19:21:47 +000012565
12566
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012567fi
12568
Thomas Wouters477c8d52006-05-27 19:21:47 +000012569{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12570echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012571
12572cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012573#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012574_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012575
Michael W. Hudson54241132001-12-07 15:38:26 +000012576
12577
Trent Mick635f6fb2000-08-23 21:33:05 +000012578# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012579ac_save_cc="$CC"
12580if test "$ac_cv_kpthread" = "yes"
12581then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012582elif test "$ac_cv_kthread" = "yes"
12583then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012584elif test "$ac_cv_pthread" = "yes"
12585then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012586fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012587{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12588echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012589have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012590cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012591/* confdefs.h. */
12592_ACEOF
12593cat confdefs.h >>conftest.$ac_ext
12594cat >>conftest.$ac_ext <<_ACEOF
12595/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012596#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012597int
12598main ()
12599{
Guido van Rossum12580492000-09-24 16:47:19 +000012600pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012601 ;
12602 return 0;
12603}
12604_ACEOF
12605rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012606if { (ac_try="$ac_compile"
12607case "(($ac_try" in
12608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12609 *) ac_try_echo=$ac_try;;
12610esac
12611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012614 grep -v '^ *+' conftest.er1 >conftest.err
12615 rm -f conftest.er1
12616 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12618 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012619 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
12620 { (case "(($ac_try" in
12621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12622 *) ac_try_echo=$ac_try;;
12623esac
12624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12625 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012626 ac_status=$?
12627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12628 (exit $ac_status); }; } &&
12629 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012630 { (case "(($ac_try" in
12631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12632 *) ac_try_echo=$ac_try;;
12633esac
12634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12635 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012636 ac_status=$?
12637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12638 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012639 have_pthread_t=yes
12640else
Martin v. Löwis11437992002-04-12 09:54:03 +000012641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012642sed 's/^/| /' conftest.$ac_ext >&5
12643
Thomas Wouters477c8d52006-05-27 19:21:47 +000012644
Trent Mick635f6fb2000-08-23 21:33:05 +000012645fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012646
Skip Montanarof0d5f792004-08-15 14:08:23 +000012647rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000012648{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12649echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012650if test "$have_pthread_t" = yes ; then
12651 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Thomas Wouters477c8d52006-05-27 19:21:47 +000012652 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12653echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012654 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12655 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012656else
12657 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012658 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012659else
Martin v. Löwis11437992002-04-12 09:54:03 +000012660 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012661/* confdefs.h. */
12662_ACEOF
12663cat confdefs.h >>conftest.$ac_ext
12664cat >>conftest.$ac_ext <<_ACEOF
12665/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012666#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012667#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012668 main()
12669 {
12670 FILE *f=fopen("conftestval", "w");
12671 if (!f) exit(1);
12672 fprintf(f, "%d\n", sizeof(pthread_t));
12673 exit(0);
12674 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012675_ACEOF
12676rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012677if { (ac_try="$ac_link"
12678case "(($ac_try" in
12679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12680 *) ac_try_echo=$ac_try;;
12681esac
12682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12683 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012684 ac_status=$?
12685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12686 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012687 { (case "(($ac_try" in
12688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12689 *) ac_try_echo=$ac_try;;
12690esac
12691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12692 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012693 ac_status=$?
12694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12695 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012696 ac_cv_sizeof_pthread_t=`cat conftestval`
12697else
Martin v. Löwis11437992002-04-12 09:54:03 +000012698 echo "$as_me: program exited with status $ac_status" >&5
12699echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012700sed 's/^/| /' conftest.$ac_ext >&5
12701
Martin v. Löwis11437992002-04-12 09:54:03 +000012702( exit $ac_status )
12703ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012704fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000012706fi
12707
Thomas Wouters477c8d52006-05-27 19:21:47 +000012708
12709
Trent Mick635f6fb2000-08-23 21:33:05 +000012710fi
12711
Thomas Wouters477c8d52006-05-27 19:21:47 +000012712 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12713echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012714
12715cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012716#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012717_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012718
12719fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012720CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012721
Thomas Wouters477c8d52006-05-27 19:21:47 +000012722{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12723echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12724# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012725if test "${enable_toolbox_glue+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012726 enableval=$enable_toolbox_glue;
12727fi
Jack Jansene578a632001-08-15 01:27:14 +000012728
12729
12730if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012731then
Jack Jansene578a632001-08-15 01:27:14 +000012732 case $ac_sys_system/$ac_sys_release in
12733 Darwin/*)
12734 enable_toolbox_glue="yes";;
12735 *)
12736 enable_toolbox_glue="no";;
12737 esac
12738fi
12739case "$enable_toolbox_glue" in
12740yes)
Jack Jansene578a632001-08-15 01:27:14 +000012741 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012742 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012743
12744cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012745#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012746_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012747
12748 ;;
12749*)
Jack Jansene578a632001-08-15 01:27:14 +000012750 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012751 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012752 ;;
12753esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000012754{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12755echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012756
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012757
12758case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012759 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012760 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12761 ;;
12762 Darwin/*)
12763 OTHER_LIBTOOL_OPT=""
12764 ;;
12765esac
12766
12767
12768case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012769 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000012770 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12771 if test "${enable_universalsdk}"; then
12772 :
12773 else
12774 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12775 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012776 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012777 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012778 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012779 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12780 if test ${gcc_version} '<' 4.0
12781 then
12782 LIBTOOL_CRUFT="-lcc_dynamic"
12783 else
12784 LIBTOOL_CRUFT=""
12785 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012786 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012787 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012788 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012789esac
12790
Thomas Wouters477c8d52006-05-27 19:21:47 +000012791{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12792echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012793if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012794then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012795 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012796 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012797 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012798
Martin v. Löwis11437992002-04-12 09:54:03 +000012799cat >>confdefs.h <<\_ACEOF
12800#define WITH_NEXT_FRAMEWORK 1
12801_ACEOF
12802
Thomas Wouters477c8d52006-05-27 19:21:47 +000012803 { echo "$as_me:$LINENO: result: yes" >&5
12804echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012805else
Thomas Wouters477c8d52006-05-27 19:21:47 +000012806 { echo "$as_me:$LINENO: result: no" >&5
12807echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012808fi
12809
Thomas Wouters477c8d52006-05-27 19:21:47 +000012810{ echo "$as_me:$LINENO: checking for dyld" >&5
12811echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012812case $ac_sys_system/$ac_sys_release in
12813 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012814
Martin v. Löwis11437992002-04-12 09:54:03 +000012815cat >>confdefs.h <<\_ACEOF
12816#define WITH_DYLD 1
12817_ACEOF
12818
Thomas Wouters477c8d52006-05-27 19:21:47 +000012819 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12820echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012821 ;;
12822 *)
Thomas Wouters477c8d52006-05-27 19:21:47 +000012823 { echo "$as_me:$LINENO: result: no" >&5
12824echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012825 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012826esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012827
Guido van Rossum0a516c91994-09-12 10:58:40 +000012828# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012829
Michael W. Hudson54241132001-12-07 15:38:26 +000012830
12831
12832
12833
Guido van Rossum0a516c91994-09-12 10:58:40 +000012834# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012835# -- usually .so, .sl on HP-UX, .dll on Cygwin
Thomas Wouters477c8d52006-05-27 19:21:47 +000012836{ echo "$as_me:$LINENO: checking SO" >&5
12837echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012838if test -z "$SO"
12839then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012840 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000012841 hp*|HP*)
12842 case `uname -m` in
12843 ia64) SO=.so;;
12844 *) SO=.sl;;
12845 esac
12846 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012847 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012848 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012849 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012850else
12851 # this might also be a termcap variable, see #610332
12852 echo
12853 echo '====================================================================='
12854 echo '+ +'
12855 echo '+ WARNING: You have set SO in your environment. +'
12856 echo '+ Do you really mean to change the extension for shared libraries? +'
12857 echo '+ Continuing in 10 seconds to let you to ponder. +'
12858 echo '+ +'
12859 echo '====================================================================='
12860 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012861fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012862{ echo "$as_me:$LINENO: result: $SO" >&5
12863echo "${ECHO_T}$SO" >&6; }
12864
12865cat >>confdefs.h <<_ACEOF
12866#define SHLIB_EXT "$SO"
12867_ACEOF
12868
Guido van Rossum0a516c91994-09-12 10:58:40 +000012869# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012870# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012871# (Shared libraries in this instance are shared modules to be loaded into
12872# Python, as opposed to building Python itself as a shared library.)
Thomas Wouters477c8d52006-05-27 19:21:47 +000012873{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12874echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012875if test -z "$LDSHARED"
12876then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012877 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012878 AIX*)
12879 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012880 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012881 ;;
12882 BeOS*)
12883 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012884 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012885 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012886 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012887 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012888 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000012889 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012890 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012891 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000012892 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012893 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012894 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012895 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012896 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12897 if test "$enable_framework" ; then
12898 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012899 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12900 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012901 else
12902 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012903 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012904 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012905 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012906 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12907 if test "$enable_framework" ; then
12908 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012909 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12910 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012911 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012912 # No framework, use the Python app as bundle-loader
12913 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012914 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012915 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012916 Darwin/*)
12917 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12918 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012919 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Thomas Wouters477c8d52006-05-27 19:21:47 +000012920 if test ${cur_target} '>' 10.2; then
12921 cur_target=10.3
12922 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012923 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Thomas Wouters477c8d52006-05-27 19:21:47 +000012924 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012925 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012926 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000012927 if test "${enable_universalsdk}"; then
12928 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12929 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012930 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12931 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012932 else
12933 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12934 if test "$enable_framework" ; then
12935 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012936 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12937 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012938 else
12939 # No framework, use the Python app as bundle-loader
12940 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12941 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12942 fi
12943 fi
12944 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000012945 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012946 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012947 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012948 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012949 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012950 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012951 else
12952 LDSHARED="ld -Bshareable ${LDFLAGS}"
12953 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000012954 OpenBSD*)
12955 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12956 then
12957 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12958 else
12959 case `uname -r` in
12960 [01].* | 2.[0-7] | 2.[0-7].*)
12961 LDSHARED="ld -Bshareable ${LDFLAGS}"
12962 ;;
12963 *)
12964 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12965 ;;
12966 esac
12967 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012968 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012969 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012970 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012971 then LDSHARED='$(CC) -shared'
12972 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012973 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012974 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012975 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012976 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012977 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012978 *) LDSHARED="ld";;
12979 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012980fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000012981{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12982echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012983BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012984# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012985# library (module) -- this is only needed for a few systems
Thomas Wouters477c8d52006-05-27 19:21:47 +000012986{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12987echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012988if test -z "$CCSHARED"
12989then
Guido van Rossum07397971997-04-29 21:49:50 +000012990 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012991 SunOS*) if test "$GCC" = yes;
12992 then CCSHARED="-fPIC";
Martin v. Löwisd5845ec2005-12-30 12:31:38 +000012993 else CCSHARED="-xcode=pic32";
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012994 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012995 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012996 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012997 else CCSHARED="+z";
12998 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012999 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013000 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013001 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013002 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013003 if test "$GCC" = "yes"
13004 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013005 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013006 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013007 SCO_SV*)
13008 if test "$GCC" = "yes"
13009 then CCSHARED="-fPIC"
13010 else CCSHARED="-Kpic -belf"
13011 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013012 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013013 IRIX*/6*) case $CC in
13014 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013015 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013016 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013017 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013018 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013019fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013020{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13021echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013022# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013023# the python executable -- this is only needed for a few systems
Thomas Wouters477c8d52006-05-27 19:21:47 +000013024{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13025echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013026if test -z "$LINKFORSHARED"
13027then
Guido van Rossum07397971997-04-29 21:49:50 +000013028 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013029 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013030 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013031 LINKFORSHARED="-Wl,-E -Wl,+s";;
13032# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013033 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013034 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013035 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013036 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013037 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13038 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013039 # not used by the core itself but which needs to be in the core so
13040 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013041 # -prebind is no longer used, because it actually seems to give a
13042 # slowdown in stead of a speedup, maybe due to the large number of
13043 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013044
13045 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013046 if test "$enable_framework"
13047 then
Jack Jansenda49e192005-01-07 13:08:22 +000013048 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013049 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013050 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013051 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013052 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013053 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013054 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013055 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13056 then
13057 LINKFORSHARED="-Wl,--export-dynamic"
13058 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013059 SunOS/5*) case $CC in
13060 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013061 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013062 then
13063 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013064 fi;;
13065 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013066 CYGWIN*)
13067 if test $enable_shared = "no"
13068 then
13069 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13070 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013071 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013072fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013073{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13074echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013075
Michael W. Hudson54241132001-12-07 15:38:26 +000013076
Thomas Wouters477c8d52006-05-27 19:21:47 +000013077{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13078echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013079if test ! "$LIBRARY" = "$LDLIBRARY"
13080then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013081 case $ac_sys_system in
13082 CYGWIN*)
13083 # Cygwin needs CCSHARED when building extension DLLs
13084 # but not when building the interpreter DLL.
13085 CFLAGSFORSHARED='';;
13086 *)
13087 CFLAGSFORSHARED='$(CCSHARED)'
13088 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013089fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013090{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13091echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013092
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013093# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13094# library (with --enable-shared).
13095# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013096# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13097# if it is not required, since it creates a dependency of the shared library
13098# to LIBS. This, in turn, means that applications linking the shared libpython
13099# don't need to link LIBS explicitly. The default should be only changed
13100# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013101
Thomas Wouters477c8d52006-05-27 19:21:47 +000013102{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13103echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013104case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013105 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013106 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013107esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000013108{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13109echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013110
13111
Guido van Rossum627b2d71993-12-24 10:39:16 +000013112# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013113
Thomas Wouters477c8d52006-05-27 19:21:47 +000013114{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13115echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013116if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13117 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013118else
Martin v. Löwis11437992002-04-12 09:54:03 +000013119 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013120LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013121cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013122/* confdefs.h. */
13123_ACEOF
13124cat confdefs.h >>conftest.$ac_ext
13125cat >>conftest.$ac_ext <<_ACEOF
13126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013127
Thomas Wouters477c8d52006-05-27 19:21:47 +000013128/* Override any GCC internal prototype to avoid an error.
13129 Use char because int might match the return type of a GCC
13130 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013131#ifdef __cplusplus
13132extern "C"
13133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013134char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013135int
13136main ()
13137{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013138return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013139 ;
13140 return 0;
13141}
13142_ACEOF
13143rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013144if { (ac_try="$ac_link"
13145case "(($ac_try" in
13146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13147 *) ac_try_echo=$ac_try;;
13148esac
13149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13150 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013151 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013152 grep -v '^ *+' conftest.er1 >conftest.err
13153 rm -f conftest.er1
13154 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13156 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013157 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13158 { (case "(($ac_try" in
13159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13160 *) ac_try_echo=$ac_try;;
13161esac
13162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13163 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013164 ac_status=$?
13165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13166 (exit $ac_status); }; } &&
13167 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013168 { (case "(($ac_try" in
13169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13170 *) ac_try_echo=$ac_try;;
13171esac
13172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13173 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013174 ac_status=$?
13175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13176 (exit $ac_status); }; }; then
13177 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013178else
Martin v. Löwis11437992002-04-12 09:54:03 +000013179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013180sed 's/^/| /' conftest.$ac_ext >&5
13181
Thomas Wouters477c8d52006-05-27 19:21:47 +000013182 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013183fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013184
Skip Montanarof0d5f792004-08-15 14:08:23 +000013185rm -f conftest.err conftest.$ac_objext \
13186 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013187LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013188fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013189{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13190echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013191if test $ac_cv_lib_dl_dlopen = yes; then
13192 cat >>confdefs.h <<_ACEOF
13193#define HAVE_LIBDL 1
13194_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013195
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013196 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013197
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013198fi
13199 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013200
Thomas Wouters477c8d52006-05-27 19:21:47 +000013201{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13202echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013203if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13204 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013205else
Martin v. Löwis11437992002-04-12 09:54:03 +000013206 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013207LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013209/* confdefs.h. */
13210_ACEOF
13211cat confdefs.h >>conftest.$ac_ext
13212cat >>conftest.$ac_ext <<_ACEOF
13213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013214
Thomas Wouters477c8d52006-05-27 19:21:47 +000013215/* Override any GCC internal prototype to avoid an error.
13216 Use char because int might match the return type of a GCC
13217 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013218#ifdef __cplusplus
13219extern "C"
13220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013221char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013222int
13223main ()
13224{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013225return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 ;
13227 return 0;
13228}
13229_ACEOF
13230rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013231if { (ac_try="$ac_link"
13232case "(($ac_try" in
13233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13234 *) ac_try_echo=$ac_try;;
13235esac
13236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13237 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013239 grep -v '^ *+' conftest.er1 >conftest.err
13240 rm -f conftest.er1
13241 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13243 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013244 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13245 { (case "(($ac_try" in
13246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13247 *) ac_try_echo=$ac_try;;
13248esac
13249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13250 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013251 ac_status=$?
13252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13253 (exit $ac_status); }; } &&
13254 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013255 { (case "(($ac_try" in
13256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13257 *) ac_try_echo=$ac_try;;
13258esac
13259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13260 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013261 ac_status=$?
13262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13263 (exit $ac_status); }; }; then
13264 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013265else
Martin v. Löwis11437992002-04-12 09:54:03 +000013266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013267sed 's/^/| /' conftest.$ac_ext >&5
13268
Thomas Wouters477c8d52006-05-27 19:21:47 +000013269 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013270fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013271
Skip Montanarof0d5f792004-08-15 14:08:23 +000013272rm -f conftest.err conftest.$ac_objext \
13273 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013274LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013275fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013276{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13277echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013278if test $ac_cv_lib_dld_shl_load = yes; then
13279 cat >>confdefs.h <<_ACEOF
13280#define HAVE_LIBDLD 1
13281_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013282
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013283 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013284
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013285fi
13286 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013287
13288# only check for sem_ini if thread support is requested
13289if test "$with_threads" = "yes" -o -z "$with_threads"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013290 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13291echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013292if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013293 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013294else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013295 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013296cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013297/* confdefs.h. */
13298_ACEOF
13299cat confdefs.h >>conftest.$ac_ext
13300cat >>conftest.$ac_ext <<_ACEOF
13301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013302
Thomas Wouters477c8d52006-05-27 19:21:47 +000013303/* Override any GCC internal prototype to avoid an error.
13304 Use char because int might match the return type of a GCC
13305 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013306#ifdef __cplusplus
13307extern "C"
13308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013309char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013310int
13311main ()
13312{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013313return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 ;
13315 return 0;
13316}
13317_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000013318for ac_lib in '' pthread rt posix4; do
13319 if test -z "$ac_lib"; then
13320 ac_res="none required"
13321 else
13322 ac_res=-l$ac_lib
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013323 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013324 fi
13325 rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013326if { (ac_try="$ac_link"
13327case "(($ac_try" in
13328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13329 *) ac_try_echo=$ac_try;;
13330esac
13331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13332 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013334 grep -v '^ *+' conftest.er1 >conftest.err
13335 rm -f conftest.er1
13336 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13338 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013339 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13340 { (case "(($ac_try" in
13341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13342 *) ac_try_echo=$ac_try;;
13343esac
13344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13345 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013346 ac_status=$?
13347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13348 (exit $ac_status); }; } &&
13349 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013350 { (case "(($ac_try" in
13351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13352 *) ac_try_echo=$ac_try;;
13353esac
13354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13355 (eval "$ac_try") 2>&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013356 ac_status=$?
13357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13358 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013359 ac_cv_search_sem_init=$ac_res
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013360else
13361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013362sed 's/^/| /' conftest.$ac_ext >&5
13363
Thomas Wouters477c8d52006-05-27 19:21:47 +000013364
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013365fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013366
Skip Montanarof0d5f792004-08-15 14:08:23 +000013367rm -f conftest.err conftest.$ac_objext \
Thomas Wouters477c8d52006-05-27 19:21:47 +000013368 conftest$ac_exeext
13369 if test "${ac_cv_search_sem_init+set}" = set; then
13370 break
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013371fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013372done
13373if test "${ac_cv_search_sem_init+set}" = set; then
13374 :
13375else
13376 ac_cv_search_sem_init=no
13377fi
13378rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013379LIBS=$ac_func_search_save_LIBS
13380fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013381{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13382echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13383ac_res=$ac_cv_search_sem_init
13384if test "$ac_res" != no; then
13385 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013386
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013387fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013388 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013389 # posix4 on Solaris 2.6
13390 # pthread (first!) on Linux
13391fi
13392
Martin v. Löwis19d17342003-06-14 21:03:05 +000013393# check if we need libintl for locale functions
Thomas Wouters477c8d52006-05-27 19:21:47 +000013394{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13395echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013396if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13397 echo $ECHO_N "(cached) $ECHO_C" >&6
13398else
13399 ac_check_lib_save_LIBS=$LIBS
13400LIBS="-lintl $LIBS"
13401cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013402/* confdefs.h. */
13403_ACEOF
13404cat confdefs.h >>conftest.$ac_ext
13405cat >>conftest.$ac_ext <<_ACEOF
13406/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013407
Thomas Wouters477c8d52006-05-27 19:21:47 +000013408/* Override any GCC internal prototype to avoid an error.
13409 Use char because int might match the return type of a GCC
13410 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013411#ifdef __cplusplus
13412extern "C"
13413#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013414char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013415int
13416main ()
13417{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013418return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013419 ;
13420 return 0;
13421}
13422_ACEOF
13423rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013424if { (ac_try="$ac_link"
13425case "(($ac_try" in
13426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13427 *) ac_try_echo=$ac_try;;
13428esac
13429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13430 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013431 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013432 grep -v '^ *+' conftest.er1 >conftest.err
13433 rm -f conftest.er1
13434 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13436 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013437 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13438 { (case "(($ac_try" in
13439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13440 *) ac_try_echo=$ac_try;;
13441esac
13442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13443 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013444 ac_status=$?
13445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13446 (exit $ac_status); }; } &&
13447 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013448 { (case "(($ac_try" in
13449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13450 *) ac_try_echo=$ac_try;;
13451esac
13452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13453 (eval "$ac_try") 2>&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013454 ac_status=$?
13455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13456 (exit $ac_status); }; }; then
13457 ac_cv_lib_intl_textdomain=yes
13458else
13459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013460sed 's/^/| /' conftest.$ac_ext >&5
13461
Thomas Wouters477c8d52006-05-27 19:21:47 +000013462 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013463fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013464
Skip Montanarof0d5f792004-08-15 14:08:23 +000013465rm -f conftest.err conftest.$ac_objext \
13466 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013467LIBS=$ac_check_lib_save_LIBS
13468fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013469{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13470echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013471if test $ac_cv_lib_intl_textdomain = yes; then
13472
13473cat >>confdefs.h <<\_ACEOF
13474#define WITH_LIBINTL 1
13475_ACEOF
13476
13477fi
13478
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013479
13480# checks for system dependent C++ extensions support
13481case "$ac_sys_system" in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013482 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13483echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013485/* confdefs.h. */
13486_ACEOF
13487cat confdefs.h >>conftest.$ac_ext
13488cat >>conftest.$ac_ext <<_ACEOF
13489/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013490#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013491int
13492main ()
13493{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013494loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013495 ;
13496 return 0;
13497}
13498_ACEOF
13499rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013500if { (ac_try="$ac_link"
13501case "(($ac_try" in
13502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13503 *) ac_try_echo=$ac_try;;
13504esac
13505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13506 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013508 grep -v '^ *+' conftest.er1 >conftest.err
13509 rm -f conftest.er1
13510 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13512 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013513 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13514 { (case "(($ac_try" in
13515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13516 *) ac_try_echo=$ac_try;;
13517esac
13518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13519 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013520 ac_status=$?
13521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13522 (exit $ac_status); }; } &&
13523 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013524 { (case "(($ac_try" in
13525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13526 *) ac_try_echo=$ac_try;;
13527esac
13528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13529 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013530 ac_status=$?
13531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13532 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013533
Martin v. Löwis11437992002-04-12 09:54:03 +000013534cat >>confdefs.h <<\_ACEOF
13535#define AIX_GENUINE_CPLUSPLUS 1
13536_ACEOF
13537
Thomas Wouters477c8d52006-05-27 19:21:47 +000013538 { echo "$as_me:$LINENO: result: yes" >&5
13539echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013540else
Martin v. Löwis11437992002-04-12 09:54:03 +000013541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013542sed 's/^/| /' conftest.$ac_ext >&5
13543
Thomas Wouters477c8d52006-05-27 19:21:47 +000013544 { echo "$as_me:$LINENO: result: no" >&5
13545echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013546fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013547
Skip Montanarof0d5f792004-08-15 14:08:23 +000013548rm -f conftest.err conftest.$ac_objext \
13549 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013550 *) ;;
13551esac
13552
Guido van Rossum70c7f481998-03-26 18:44:10 +000013553# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013554# BeOS' sockets are stashed in libnet.
Thomas Wouters477c8d52006-05-27 19:21:47 +000013555{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13556echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013557if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13558 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013559else
Martin v. Löwis11437992002-04-12 09:54:03 +000013560 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013561LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013562cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013563/* confdefs.h. */
13564_ACEOF
13565cat confdefs.h >>conftest.$ac_ext
13566cat >>conftest.$ac_ext <<_ACEOF
13567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013568
Thomas Wouters477c8d52006-05-27 19:21:47 +000013569/* Override any GCC internal prototype to avoid an error.
13570 Use char because int might match the return type of a GCC
13571 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013572#ifdef __cplusplus
13573extern "C"
13574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013575char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013576int
13577main ()
13578{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013579return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013580 ;
13581 return 0;
13582}
13583_ACEOF
13584rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013585if { (ac_try="$ac_link"
13586case "(($ac_try" in
13587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13588 *) ac_try_echo=$ac_try;;
13589esac
13590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13591 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013593 grep -v '^ *+' conftest.er1 >conftest.err
13594 rm -f conftest.er1
13595 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13597 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013598 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13599 { (case "(($ac_try" in
13600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13601 *) ac_try_echo=$ac_try;;
13602esac
13603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13604 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013605 ac_status=$?
13606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13607 (exit $ac_status); }; } &&
13608 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013609 { (case "(($ac_try" in
13610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13611 *) ac_try_echo=$ac_try;;
13612esac
13613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13614 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013615 ac_status=$?
13616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13617 (exit $ac_status); }; }; then
13618 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013619else
Martin v. Löwis11437992002-04-12 09:54:03 +000013620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013621sed 's/^/| /' conftest.$ac_ext >&5
13622
Thomas Wouters477c8d52006-05-27 19:21:47 +000013623 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013624fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013625
Skip Montanarof0d5f792004-08-15 14:08:23 +000013626rm -f conftest.err conftest.$ac_objext \
13627 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013628LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013629fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013630{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13631echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013632if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013633 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013634fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013635 # SVR4
Thomas Wouters477c8d52006-05-27 19:21:47 +000013636{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13637echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013638if test "${ac_cv_lib_socket_socket+set}" = set; then
13639 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013640else
Martin v. Löwis11437992002-04-12 09:54:03 +000013641 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013642LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013643cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013644/* confdefs.h. */
13645_ACEOF
13646cat confdefs.h >>conftest.$ac_ext
13647cat >>conftest.$ac_ext <<_ACEOF
13648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013649
Thomas Wouters477c8d52006-05-27 19:21:47 +000013650/* Override any GCC internal prototype to avoid an error.
13651 Use char because int might match the return type of a GCC
13652 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013653#ifdef __cplusplus
13654extern "C"
13655#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013656char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013657int
13658main ()
13659{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013660return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013661 ;
13662 return 0;
13663}
13664_ACEOF
13665rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013666if { (ac_try="$ac_link"
13667case "(($ac_try" in
13668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13669 *) ac_try_echo=$ac_try;;
13670esac
13671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13672 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013674 grep -v '^ *+' conftest.er1 >conftest.err
13675 rm -f conftest.er1
13676 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13678 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013679 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13680 { (case "(($ac_try" in
13681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13682 *) ac_try_echo=$ac_try;;
13683esac
13684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13685 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013686 ac_status=$?
13687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13688 (exit $ac_status); }; } &&
13689 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013690 { (case "(($ac_try" in
13691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13692 *) ac_try_echo=$ac_try;;
13693esac
13694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13695 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013696 ac_status=$?
13697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13698 (exit $ac_status); }; }; then
13699 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013700else
Martin v. Löwis11437992002-04-12 09:54:03 +000013701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013702sed 's/^/| /' conftest.$ac_ext >&5
13703
Thomas Wouters477c8d52006-05-27 19:21:47 +000013704 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013705fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013706
Skip Montanarof0d5f792004-08-15 14:08:23 +000013707rm -f conftest.err conftest.$ac_objext \
13708 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013709LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013710fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013711{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13712echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013713if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013714 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013715fi
13716 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013717
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013718case "$ac_sys_system" in
13719BeOS*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013720{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13721echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013722if test "${ac_cv_lib_net_socket+set}" = set; then
13723 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013724else
Martin v. Löwis11437992002-04-12 09:54:03 +000013725 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013726LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013727cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013728/* confdefs.h. */
13729_ACEOF
13730cat confdefs.h >>conftest.$ac_ext
13731cat >>conftest.$ac_ext <<_ACEOF
13732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013733
Thomas Wouters477c8d52006-05-27 19:21:47 +000013734/* Override any GCC internal prototype to avoid an error.
13735 Use char because int might match the return type of a GCC
13736 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013737#ifdef __cplusplus
13738extern "C"
13739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013740char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013741int
13742main ()
13743{
Thomas Wouters477c8d52006-05-27 19:21:47 +000013744return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 ;
13746 return 0;
13747}
13748_ACEOF
13749rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013750if { (ac_try="$ac_link"
13751case "(($ac_try" in
13752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13753 *) ac_try_echo=$ac_try;;
13754esac
13755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13756 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013758 grep -v '^ *+' conftest.er1 >conftest.err
13759 rm -f conftest.er1
13760 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13762 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013763 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
13764 { (case "(($ac_try" in
13765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13766 *) ac_try_echo=$ac_try;;
13767esac
13768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13769 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013770 ac_status=$?
13771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13772 (exit $ac_status); }; } &&
13773 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013774 { (case "(($ac_try" in
13775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13776 *) ac_try_echo=$ac_try;;
13777esac
13778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13779 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013780 ac_status=$?
13781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13782 (exit $ac_status); }; }; then
13783 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013784else
Martin v. Löwis11437992002-04-12 09:54:03 +000013785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013786sed 's/^/| /' conftest.$ac_ext >&5
13787
Thomas Wouters477c8d52006-05-27 19:21:47 +000013788 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013789fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013790
Skip Montanarof0d5f792004-08-15 14:08:23 +000013791rm -f conftest.err conftest.$ac_objext \
13792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013793LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013794fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013795{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13796echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013797if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013798 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013799fi
13800 # BeOS
13801;;
13802esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013803
Thomas Wouters477c8d52006-05-27 19:21:47 +000013804{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13805echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013806
Thomas Wouters477c8d52006-05-27 19:21:47 +000013807# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013808if test "${with_libs+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013809 withval=$with_libs;
13810{ echo "$as_me:$LINENO: result: $withval" >&5
13811echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013812LIBS="$withval $LIBS"
13813
13814else
Thomas Wouters477c8d52006-05-27 19:21:47 +000013815 { echo "$as_me:$LINENO: result: no" >&5
13816echo "${ECHO_T}no" >&6; }
13817fi
13818
Guido van Rossum7f43da71994-08-01 12:15:30 +000013819
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013820# Check for use of the system libffi library
Thomas Wouters477c8d52006-05-27 19:21:47 +000013821{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13822echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013823
Thomas Wouters477c8d52006-05-27 19:21:47 +000013824# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013825if test "${with_system_ffi+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013826 withval=$with_system_ffi;
13827fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013828
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013829
13830if test -z "$with_system_ffi"
13831then with_system_ffi="no"
13832fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013833{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13834echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013835
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013836# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013837
13838
Thomas Wouters477c8d52006-05-27 19:21:47 +000013839{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13840echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013841
Thomas Wouters477c8d52006-05-27 19:21:47 +000013842# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013843if test "${with_signal_module+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013844 withval=$with_signal_module;
13845fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013846
13847
13848if test -z "$with_signal_module"
13849then with_signal_module="yes"
13850fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013851{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13852echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013853
13854if test "${with_signal_module}" = "yes"; then
13855 USE_SIGNAL_MODULE=""
13856 SIGNAL_OBJS=""
13857else
13858 USE_SIGNAL_MODULE="#"
13859 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13860fi
13861
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013862# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013863
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000013864USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013865
Thomas Wouters477c8d52006-05-27 19:21:47 +000013866{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13867echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013868
Guido van Rossumec2f0731997-01-22 20:54:01 +000013869
Thomas Wouters477c8d52006-05-27 19:21:47 +000013870# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013871if test "${with_dec_threads+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013872 withval=$with_dec_threads;
13873{ echo "$as_me:$LINENO: result: $withval" >&5
13874echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013875LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013876if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013877 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013878fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013879else
Thomas Wouters477c8d52006-05-27 19:21:47 +000013880 { echo "$as_me:$LINENO: result: no" >&5
13881echo "${ECHO_T}no" >&6; }
13882fi
13883
Martin v. Löwis11437992002-04-12 09:54:03 +000013884
13885# Templates for things AC_DEFINEd more than once.
13886# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013887
13888
Martin v. Löwis11437992002-04-12 09:54:03 +000013889
13890
13891
13892
13893
Thomas Wouters477c8d52006-05-27 19:21:47 +000013894{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13895echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013896
Thomas Wouters477c8d52006-05-27 19:21:47 +000013897# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013898if test "${with_threads+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013899 withval=$with_threads;
13900fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013901
13902
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000013903# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013904
Thomas Wouters477c8d52006-05-27 19:21:47 +000013905# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013906if test "${with_thread+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013907 withval=$with_thread; with_threads=$with_thread
13908fi
13909
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000013910
13911if test -z "$with_threads"
13912then with_threads="yes"
13913fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000013914{ echo "$as_me:$LINENO: result: $with_threads" >&5
13915echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000013916
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013917
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000013918if test "$with_threads" = "no"
13919then
13920 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013921elif test "$ac_cv_pthread_is_default" = yes
13922then
Martin v. Löwis11437992002-04-12 09:54:03 +000013923 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013924#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013925_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013926
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013927 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013928 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013929#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013930_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013931
13932 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013934elif test "$ac_cv_kpthread" = "yes"
13935then
13936 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013937 if test "$ac_cv_cxx_thread" = "yes"; then
13938 CXX="$CXX -Kpthread"
13939 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013940 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013941#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013942_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013943
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013944 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013945 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013946elif test "$ac_cv_kthread" = "yes"
13947then
13948 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013949 if test "$ac_cv_cxx_thread" = "yes"; then
13950 CXX="$CXX -Kthread"
13951 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013952 cat >>confdefs.h <<\_ACEOF
13953#define WITH_THREAD 1
13954_ACEOF
13955
13956 posix_threads=yes
13957 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013958elif test "$ac_cv_pthread" = "yes"
13959then
13960 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013961 if test "$ac_cv_cxx_thread" = "yes"; then
13962 CXX="$CXX -pthread"
13963 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013964 cat >>confdefs.h <<\_ACEOF
13965#define WITH_THREAD 1
13966_ACEOF
13967
13968 posix_threads=yes
13969 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013970else
13971 if test ! -z "$with_threads" -a -d "$with_threads"
13972 then LDFLAGS="$LDFLAGS -L$with_threads"
13973 fi
13974 if test ! -z "$withval" -a -d "$withval"
13975 then LDFLAGS="$LDFLAGS -L$withval"
13976 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013977
13978 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013979 # define _POSIX_THREADS in unistd.h. Some apparently don't
13980 # (e.g. gnu pth with pthread emulation)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013981 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13982echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013984/* confdefs.h. */
13985_ACEOF
13986cat confdefs.h >>conftest.$ac_ext
13987cat >>conftest.$ac_ext <<_ACEOF
13988/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013989
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013990#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013991#ifdef _POSIX_THREADS
13992yes
13993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013994
13995_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013997 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013998 unistd_defines_pthreads=yes
13999else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014000 unistd_defines_pthreads=no
14001fi
14002rm -f conftest*
14003
Thomas Wouters477c8d52006-05-27 19:21:47 +000014004 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14005echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014006
Martin v. Löwis11437992002-04-12 09:54:03 +000014007 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014008#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014009_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014010
Martin v. Löwis11437992002-04-12 09:54:03 +000014011 if test "${ac_cv_header_cthreads_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014012 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14013echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014014if test "${ac_cv_header_cthreads_h+set}" = set; then
14015 echo $ECHO_N "(cached) $ECHO_C" >&6
14016fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014017{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14018echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014019else
Martin v. Löwis11437992002-04-12 09:54:03 +000014020 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014021{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14022echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014024/* confdefs.h. */
14025_ACEOF
14026cat confdefs.h >>conftest.$ac_ext
14027cat >>conftest.$ac_ext <<_ACEOF
14028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014029$ac_includes_default
14030#include <cthreads.h>
14031_ACEOF
14032rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014033if { (ac_try="$ac_compile"
14034case "(($ac_try" in
14035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14036 *) ac_try_echo=$ac_try;;
14037esac
14038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14039 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014040 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014041 grep -v '^ *+' conftest.er1 >conftest.err
14042 rm -f conftest.er1
14043 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14045 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014046 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14047 { (case "(($ac_try" in
14048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14049 *) ac_try_echo=$ac_try;;
14050esac
14051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14052 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014053 ac_status=$?
14054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14055 (exit $ac_status); }; } &&
14056 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014057 { (case "(($ac_try" in
14058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14059 *) ac_try_echo=$ac_try;;
14060esac
14061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14062 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014063 ac_status=$?
14064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14065 (exit $ac_status); }; }; then
14066 ac_header_compiler=yes
14067else
14068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014069sed 's/^/| /' conftest.$ac_ext >&5
14070
Thomas Wouters477c8d52006-05-27 19:21:47 +000014071 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014072fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014073
Skip Montanarof0d5f792004-08-15 14:08:23 +000014074rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014075{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14076echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014077
14078# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014079{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14080echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014081cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014082/* confdefs.h. */
14083_ACEOF
14084cat confdefs.h >>conftest.$ac_ext
14085cat >>conftest.$ac_ext <<_ACEOF
14086/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014087#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014088_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014089if { (ac_try="$ac_cpp conftest.$ac_ext"
14090case "(($ac_try" in
14091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14092 *) ac_try_echo=$ac_try;;
14093esac
14094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14095 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014096 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014097 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014098 rm -f conftest.er1
14099 cat conftest.err >&5
14100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14101 (exit $ac_status); } >/dev/null; then
14102 if test -s conftest.err; then
14103 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000014104 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000014105 else
14106 ac_cpp_err=
14107 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014108else
Martin v. Löwis11437992002-04-12 09:54:03 +000014109 ac_cpp_err=yes
14110fi
14111if test -z "$ac_cpp_err"; then
14112 ac_header_preproc=yes
14113else
14114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014115sed 's/^/| /' conftest.$ac_ext >&5
14116
Martin v. Löwis11437992002-04-12 09:54:03 +000014117 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014118fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014119
Martin v. Löwis11437992002-04-12 09:54:03 +000014120rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014121{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14122echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014123
14124# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014125case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14126 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014127 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14128echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014129 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14130echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14131 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014132 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014133 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014134 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14135echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014136 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14137echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14138 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14139echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14140 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14141echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014142 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14143echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014144 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14145echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000014146 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014147## ------------------------------------------------ ##
14148## Report this to http://www.python.org/python-bugs ##
14149## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014150_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000014151 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014152 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014153esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014154{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14155echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014156if test "${ac_cv_header_cthreads_h+set}" = set; then
14157 echo $ECHO_N "(cached) $ECHO_C" >&6
14158else
14159 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014160fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014161{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14162echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014163
14164fi
14165if test $ac_cv_header_cthreads_h = yes; then
14166 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014167#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014168_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014169
Martin v. Löwis11437992002-04-12 09:54:03 +000014170 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014171#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014172_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014173
Martin v. Löwis11437992002-04-12 09:54:03 +000014174
14175cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014176#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014177_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014178
14179 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014180 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014181else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014182
Martin v. Löwis11437992002-04-12 09:54:03 +000014183 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014184 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14185echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014186if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14187 echo $ECHO_N "(cached) $ECHO_C" >&6
14188fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014189{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14190echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014191else
Martin v. Löwis11437992002-04-12 09:54:03 +000014192 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014193{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14194echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014195cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014196/* confdefs.h. */
14197_ACEOF
14198cat confdefs.h >>conftest.$ac_ext
14199cat >>conftest.$ac_ext <<_ACEOF
14200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014201$ac_includes_default
14202#include <mach/cthreads.h>
14203_ACEOF
14204rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014205if { (ac_try="$ac_compile"
14206case "(($ac_try" in
14207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14208 *) ac_try_echo=$ac_try;;
14209esac
14210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14211 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014213 grep -v '^ *+' conftest.er1 >conftest.err
14214 rm -f conftest.er1
14215 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14217 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014218 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14219 { (case "(($ac_try" in
14220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14221 *) ac_try_echo=$ac_try;;
14222esac
14223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14224 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014225 ac_status=$?
14226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14227 (exit $ac_status); }; } &&
14228 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014229 { (case "(($ac_try" in
14230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14231 *) ac_try_echo=$ac_try;;
14232esac
14233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14234 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014235 ac_status=$?
14236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14237 (exit $ac_status); }; }; then
14238 ac_header_compiler=yes
14239else
14240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014241sed 's/^/| /' conftest.$ac_ext >&5
14242
Thomas Wouters477c8d52006-05-27 19:21:47 +000014243 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014244fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014245
Skip Montanarof0d5f792004-08-15 14:08:23 +000014246rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014247{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14248echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014249
14250# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014251{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14252echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014253cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014254/* confdefs.h. */
14255_ACEOF
14256cat confdefs.h >>conftest.$ac_ext
14257cat >>conftest.$ac_ext <<_ACEOF
14258/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014259#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014260_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014261if { (ac_try="$ac_cpp conftest.$ac_ext"
14262case "(($ac_try" in
14263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14264 *) ac_try_echo=$ac_try;;
14265esac
14266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14267 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014268 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014269 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014270 rm -f conftest.er1
14271 cat conftest.err >&5
14272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14273 (exit $ac_status); } >/dev/null; then
14274 if test -s conftest.err; then
14275 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000014276 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000014277 else
14278 ac_cpp_err=
14279 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014280else
Martin v. Löwis11437992002-04-12 09:54:03 +000014281 ac_cpp_err=yes
14282fi
14283if test -z "$ac_cpp_err"; then
14284 ac_header_preproc=yes
14285else
14286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014287sed 's/^/| /' conftest.$ac_ext >&5
14288
Martin v. Löwis11437992002-04-12 09:54:03 +000014289 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014290fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014291
Martin v. Löwis11437992002-04-12 09:54:03 +000014292rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014293{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14294echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014295
14296# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014297case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14298 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014299 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14300echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014301 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14302echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14303 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014304 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014305 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014306 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14307echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014308 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14309echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14310 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14311echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14312 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14313echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014314 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14315echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014316 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14317echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000014318 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014319## ------------------------------------------------ ##
14320## Report this to http://www.python.org/python-bugs ##
14321## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014322_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000014323 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014324 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014325esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014326{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14327echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014328if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14329 echo $ECHO_N "(cached) $ECHO_C" >&6
14330else
14331 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014332fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014333{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14334echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014335
14336fi
14337if test $ac_cv_header_mach_cthreads_h = yes; then
14338 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014339#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014340_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014341
Martin v. Löwis11437992002-04-12 09:54:03 +000014342 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014343#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014344_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014345
Martin v. Löwis11437992002-04-12 09:54:03 +000014346
14347cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014348#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014349_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014350
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014351 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014352else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014353
Thomas Wouters477c8d52006-05-27 19:21:47 +000014354 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14355echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014356
Thomas Wouters477c8d52006-05-27 19:21:47 +000014357# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014358if test "${with_pth+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014359 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14360echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014361 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014362#define WITH_THREAD 1
14363_ACEOF
14364
14365
14366cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014367#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014368_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014369
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014370 LIBS="-lpth $LIBS"
14371 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014372else
Thomas Wouters477c8d52006-05-27 19:21:47 +000014373 { echo "$as_me:$LINENO: result: no" >&5
14374echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014375
14376 # Just looking for pthread_create in libpthread is not enough:
14377 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14378 # So we really have to include pthread.h, and then link.
14379 _libs=$LIBS
14380 LIBS="$LIBS -lpthread"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014381 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14382echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014383 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014384/* confdefs.h. */
14385_ACEOF
14386cat confdefs.h >>conftest.$ac_ext
14387cat >>conftest.$ac_ext <<_ACEOF
14388/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014389#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014390
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014391void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014392int
14393main ()
14394{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014395
14396pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014397 ;
14398 return 0;
14399}
14400_ACEOF
14401rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014402if { (ac_try="$ac_link"
14403case "(($ac_try" in
14404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14405 *) ac_try_echo=$ac_try;;
14406esac
14407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14408 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014409 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014410 grep -v '^ *+' conftest.er1 >conftest.err
14411 rm -f conftest.er1
14412 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14414 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014415 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14416 { (case "(($ac_try" in
14417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14418 *) ac_try_echo=$ac_try;;
14419esac
14420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14421 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014422 ac_status=$?
14423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14424 (exit $ac_status); }; } &&
14425 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014426 { (case "(($ac_try" in
14427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14428 *) ac_try_echo=$ac_try;;
14429esac
14430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14431 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014432 ac_status=$?
14433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14434 (exit $ac_status); }; }; then
14435
Thomas Wouters477c8d52006-05-27 19:21:47 +000014436 { echo "$as_me:$LINENO: result: yes" >&5
14437echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014438 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014439#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014440_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014441
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014442 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014443 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014444else
Martin v. Löwis11437992002-04-12 09:54:03 +000014445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014446sed 's/^/| /' conftest.$ac_ext >&5
14447
Martin v. Löwis11437992002-04-12 09:54:03 +000014448
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014449 LIBS=$_libs
Thomas Wouters477c8d52006-05-27 19:21:47 +000014450 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14451echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014452if test "${ac_cv_func_pthread_detach+set}" = set; then
14453 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014454else
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014456/* confdefs.h. */
14457_ACEOF
14458cat confdefs.h >>conftest.$ac_ext
14459cat >>conftest.$ac_ext <<_ACEOF
14460/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014461/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14462 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14463#define pthread_detach innocuous_pthread_detach
14464
Guido van Rossumad678af1998-10-02 14:42:15 +000014465/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014466 which can conflict with char pthread_detach (); below.
14467 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014468 <limits.h> exists even on freestanding compilers. */
14469
14470#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014471# include <limits.h>
14472#else
14473# include <assert.h>
14474#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014475
14476#undef pthread_detach
14477
Thomas Wouters477c8d52006-05-27 19:21:47 +000014478/* Override any GCC internal prototype to avoid an error.
14479 Use char because int might match the return type of a GCC
14480 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014481#ifdef __cplusplus
14482extern "C"
14483#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014484char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014485/* The GNU C library defines this for functions which it implements
14486 to always fail with ENOSYS. Some functions are actually named
14487 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000014488#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014489choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014490#endif
14491
Skip Montanaro6dead952003-09-25 14:50:04 +000014492int
14493main ()
14494{
Thomas Wouters477c8d52006-05-27 19:21:47 +000014495return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014496 ;
14497 return 0;
14498}
14499_ACEOF
14500rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014501if { (ac_try="$ac_link"
14502case "(($ac_try" in
14503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14504 *) ac_try_echo=$ac_try;;
14505esac
14506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14507 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014509 grep -v '^ *+' conftest.er1 >conftest.err
14510 rm -f conftest.er1
14511 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14513 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014514 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14515 { (case "(($ac_try" in
14516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14517 *) ac_try_echo=$ac_try;;
14518esac
14519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14520 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014521 ac_status=$?
14522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14523 (exit $ac_status); }; } &&
14524 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014525 { (case "(($ac_try" in
14526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14527 *) ac_try_echo=$ac_try;;
14528esac
14529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14530 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014531 ac_status=$?
14532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14533 (exit $ac_status); }; }; then
14534 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014535else
Martin v. Löwis11437992002-04-12 09:54:03 +000014536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014537sed 's/^/| /' conftest.$ac_ext >&5
14538
Thomas Wouters477c8d52006-05-27 19:21:47 +000014539 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014540fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014541
Skip Montanarof0d5f792004-08-15 14:08:23 +000014542rm -f conftest.err conftest.$ac_objext \
14543 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014544fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014545{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14546echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014547if test $ac_cv_func_pthread_detach = yes; then
14548 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014549#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014550_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014551
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014552 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014553 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014554else
Guido van Rossumad678af1998-10-02 14:42:15 +000014555
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014556 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014557 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14558echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014559if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14560 echo $ECHO_N "(cached) $ECHO_C" >&6
14561fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014562{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14563echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014564else
14565 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014566{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14567echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014568cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014569/* confdefs.h. */
14570_ACEOF
14571cat confdefs.h >>conftest.$ac_ext
14572cat >>conftest.$ac_ext <<_ACEOF
14573/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014574$ac_includes_default
14575#include <atheos/threads.h>
14576_ACEOF
14577rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014578if { (ac_try="$ac_compile"
14579case "(($ac_try" in
14580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14581 *) ac_try_echo=$ac_try;;
14582esac
14583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14584 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014586 grep -v '^ *+' conftest.er1 >conftest.err
14587 rm -f conftest.er1
14588 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14590 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014591 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14592 { (case "(($ac_try" in
14593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14594 *) ac_try_echo=$ac_try;;
14595esac
14596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14597 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014598 ac_status=$?
14599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14600 (exit $ac_status); }; } &&
14601 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014602 { (case "(($ac_try" in
14603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14604 *) ac_try_echo=$ac_try;;
14605esac
14606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14607 (eval "$ac_try") 2>&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014608 ac_status=$?
14609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14610 (exit $ac_status); }; }; then
14611 ac_header_compiler=yes
14612else
14613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014614sed 's/^/| /' conftest.$ac_ext >&5
14615
Thomas Wouters477c8d52006-05-27 19:21:47 +000014616 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014617fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014618
Skip Montanarof0d5f792004-08-15 14:08:23 +000014619rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014620{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14621echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014622
14623# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014624{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14625echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014626cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014627/* confdefs.h. */
14628_ACEOF
14629cat confdefs.h >>conftest.$ac_ext
14630cat >>conftest.$ac_ext <<_ACEOF
14631/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014632#include <atheos/threads.h>
14633_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014634if { (ac_try="$ac_cpp conftest.$ac_ext"
14635case "(($ac_try" in
14636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14637 *) ac_try_echo=$ac_try;;
14638esac
14639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14640 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014641 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014642 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014643 rm -f conftest.er1
14644 cat conftest.err >&5
14645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14646 (exit $ac_status); } >/dev/null; then
14647 if test -s conftest.err; then
14648 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000014649 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014650 else
14651 ac_cpp_err=
14652 fi
14653else
14654 ac_cpp_err=yes
14655fi
14656if test -z "$ac_cpp_err"; then
14657 ac_header_preproc=yes
14658else
14659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014660sed 's/^/| /' conftest.$ac_ext >&5
14661
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014662 ac_header_preproc=no
14663fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014664
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014665rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014666{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14667echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014668
14669# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014670case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14671 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014672 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14673echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014674 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14675echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14676 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014677 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014678 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014679 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14680echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014681 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14682echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14683 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14684echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14685 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14686echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014687 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14688echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014689 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14690echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000014691 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014692## ------------------------------------------------ ##
14693## Report this to http://www.python.org/python-bugs ##
14694## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014695_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000014696 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014697 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014698esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014699{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14700echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014701if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14702 echo $ECHO_N "(cached) $ECHO_C" >&6
14703else
14704 ac_cv_header_atheos_threads_h=$ac_header_preproc
14705fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014706{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14707echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014708
14709fi
14710if test $ac_cv_header_atheos_threads_h = yes; then
14711 cat >>confdefs.h <<\_ACEOF
14712#define WITH_THREAD 1
14713_ACEOF
14714
14715
14716cat >>confdefs.h <<\_ACEOF
14717#define ATHEOS_THREADS 1
14718_ACEOF
14719
14720 THREADOBJ="Python/thread.o"
14721else
14722
Martin v. Löwis11437992002-04-12 09:54:03 +000014723 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014724 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14725echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014726if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14727 echo $ECHO_N "(cached) $ECHO_C" >&6
14728fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014729{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14730echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014731else
Martin v. Löwis11437992002-04-12 09:54:03 +000014732 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014733{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14734echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014735cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014736/* confdefs.h. */
14737_ACEOF
14738cat confdefs.h >>conftest.$ac_ext
14739cat >>conftest.$ac_ext <<_ACEOF
14740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014741$ac_includes_default
14742#include <kernel/OS.h>
14743_ACEOF
14744rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014745if { (ac_try="$ac_compile"
14746case "(($ac_try" in
14747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14748 *) ac_try_echo=$ac_try;;
14749esac
14750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14751 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014753 grep -v '^ *+' conftest.er1 >conftest.err
14754 rm -f conftest.er1
14755 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14757 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014758 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14759 { (case "(($ac_try" in
14760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14761 *) ac_try_echo=$ac_try;;
14762esac
14763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14764 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014765 ac_status=$?
14766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14767 (exit $ac_status); }; } &&
14768 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014769 { (case "(($ac_try" in
14770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14771 *) ac_try_echo=$ac_try;;
14772esac
14773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14774 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 ac_status=$?
14776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14777 (exit $ac_status); }; }; then
14778 ac_header_compiler=yes
14779else
14780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014781sed 's/^/| /' conftest.$ac_ext >&5
14782
Thomas Wouters477c8d52006-05-27 19:21:47 +000014783 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014784fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014785
Skip Montanarof0d5f792004-08-15 14:08:23 +000014786rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014787{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14788echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014789
14790# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000014791{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14792echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014793cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014794/* confdefs.h. */
14795_ACEOF
14796cat confdefs.h >>conftest.$ac_ext
14797cat >>conftest.$ac_ext <<_ACEOF
14798/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014799#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014800_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014801if { (ac_try="$ac_cpp conftest.$ac_ext"
14802case "(($ac_try" in
14803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14804 *) ac_try_echo=$ac_try;;
14805esac
14806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14807 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014808 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014809 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014810 rm -f conftest.er1
14811 cat conftest.err >&5
14812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14813 (exit $ac_status); } >/dev/null; then
14814 if test -s conftest.err; then
14815 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000014816 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000014817 else
14818 ac_cpp_err=
14819 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014820else
Martin v. Löwis11437992002-04-12 09:54:03 +000014821 ac_cpp_err=yes
14822fi
14823if test -z "$ac_cpp_err"; then
14824 ac_header_preproc=yes
14825else
14826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014827sed 's/^/| /' conftest.$ac_ext >&5
14828
Martin v. Löwis11437992002-04-12 09:54:03 +000014829 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014830fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014831
Martin v. Löwis11437992002-04-12 09:54:03 +000014832rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014833{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14834echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014835
Martin v. Löwis11437992002-04-12 09:54:03 +000014836# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014837case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14838 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014839 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14840echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014841 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14842echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14843 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014844 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014845 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014846 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14847echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014848 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14849echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14850 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14851echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14852 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14853echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014854 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14855echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014856 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14857echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000014858 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014859## ------------------------------------------------ ##
14860## Report this to http://www.python.org/python-bugs ##
14861## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014862_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000014863 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014864 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014865esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014866{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14867echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014868if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14869 echo $ECHO_N "(cached) $ECHO_C" >&6
14870else
14871 ac_cv_header_kernel_OS_h=$ac_header_preproc
14872fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014873{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14874echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014875
14876fi
14877if test $ac_cv_header_kernel_OS_h = yes; then
14878 cat >>confdefs.h <<\_ACEOF
14879#define WITH_THREAD 1
14880_ACEOF
14881
14882
14883cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014884#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014885_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014886
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014887 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014888else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014889
Thomas Wouters477c8d52006-05-27 19:21:47 +000014890 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14891echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014892if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14893 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014894else
Martin v. Löwis11437992002-04-12 09:54:03 +000014895 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014896LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014897cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014898/* confdefs.h. */
14899_ACEOF
14900cat confdefs.h >>conftest.$ac_ext
14901cat >>conftest.$ac_ext <<_ACEOF
14902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014903
Thomas Wouters477c8d52006-05-27 19:21:47 +000014904/* Override any GCC internal prototype to avoid an error.
14905 Use char because int might match the return type of a GCC
14906 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014907#ifdef __cplusplus
14908extern "C"
14909#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014910char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014911int
14912main ()
14913{
Thomas Wouters477c8d52006-05-27 19:21:47 +000014914return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014915 ;
14916 return 0;
14917}
14918_ACEOF
14919rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014920if { (ac_try="$ac_link"
14921case "(($ac_try" in
14922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14923 *) ac_try_echo=$ac_try;;
14924esac
14925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14926 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014927 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014928 grep -v '^ *+' conftest.er1 >conftest.err
14929 rm -f conftest.er1
14930 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14932 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014933 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
14934 { (case "(($ac_try" in
14935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14936 *) ac_try_echo=$ac_try;;
14937esac
14938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14939 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014940 ac_status=$?
14941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14942 (exit $ac_status); }; } &&
14943 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014944 { (case "(($ac_try" in
14945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14946 *) ac_try_echo=$ac_try;;
14947esac
14948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14949 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014950 ac_status=$?
14951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14952 (exit $ac_status); }; }; then
14953 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014954else
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014956sed 's/^/| /' conftest.$ac_ext >&5
14957
Thomas Wouters477c8d52006-05-27 19:21:47 +000014958 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014959fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014960
Skip Montanarof0d5f792004-08-15 14:08:23 +000014961rm -f conftest.err conftest.$ac_objext \
14962 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014963LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014964fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000014965{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14966echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014967if test $ac_cv_lib_pthreads_pthread_create = yes; then
14968 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014969#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014970_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014971
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014972 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014973 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014974 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014975else
Greg Steinadf63d62000-07-05 10:38:09 +000014976
Thomas Wouters477c8d52006-05-27 19:21:47 +000014977 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14978echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014979if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14980 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014981else
Martin v. Löwis11437992002-04-12 09:54:03 +000014982 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014983LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014984cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014985/* confdefs.h. */
14986_ACEOF
14987cat confdefs.h >>conftest.$ac_ext
14988cat >>conftest.$ac_ext <<_ACEOF
14989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014990
Thomas Wouters477c8d52006-05-27 19:21:47 +000014991/* Override any GCC internal prototype to avoid an error.
14992 Use char because int might match the return type of a GCC
14993 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014994#ifdef __cplusplus
14995extern "C"
14996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014997char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014998int
14999main ()
15000{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015001return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 ;
15003 return 0;
15004}
15005_ACEOF
15006rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015007if { (ac_try="$ac_link"
15008case "(($ac_try" in
15009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15010 *) ac_try_echo=$ac_try;;
15011esac
15012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15013 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015015 grep -v '^ *+' conftest.er1 >conftest.err
15016 rm -f conftest.er1
15017 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15019 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015020 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15021 { (case "(($ac_try" in
15022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15023 *) ac_try_echo=$ac_try;;
15024esac
15025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15026 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015027 ac_status=$?
15028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15029 (exit $ac_status); }; } &&
15030 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015031 { (case "(($ac_try" in
15032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15033 *) ac_try_echo=$ac_try;;
15034esac
15035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15036 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015037 ac_status=$?
15038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15039 (exit $ac_status); }; }; then
15040 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015041else
Martin v. Löwis11437992002-04-12 09:54:03 +000015042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015043sed 's/^/| /' conftest.$ac_ext >&5
15044
Thomas Wouters477c8d52006-05-27 19:21:47 +000015045 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015046fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015047
Skip Montanarof0d5f792004-08-15 14:08:23 +000015048rm -f conftest.err conftest.$ac_objext \
15049 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015050LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015051fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015052{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15053echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015054if test $ac_cv_lib_c_r_pthread_create = yes; then
15055 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015056#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015057_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015058
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015059 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015060 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015061 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015062else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015063
Thomas Wouters477c8d52006-05-27 19:21:47 +000015064 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15065echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015066if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
15067 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015068else
Martin v. Löwis11437992002-04-12 09:54:03 +000015069 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015070LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015071cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015072/* confdefs.h. */
15073_ACEOF
15074cat confdefs.h >>conftest.$ac_ext
15075cat >>conftest.$ac_ext <<_ACEOF
15076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015077
Thomas Wouters477c8d52006-05-27 19:21:47 +000015078/* Override any GCC internal prototype to avoid an error.
15079 Use char because int might match the return type of a GCC
15080 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015081#ifdef __cplusplus
15082extern "C"
15083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015084char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015085int
15086main ()
15087{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015088return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015089 ;
15090 return 0;
15091}
15092_ACEOF
15093rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015094if { (ac_try="$ac_link"
15095case "(($ac_try" in
15096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15097 *) ac_try_echo=$ac_try;;
15098esac
15099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15100 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015101 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015102 grep -v '^ *+' conftest.er1 >conftest.err
15103 rm -f conftest.er1
15104 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15106 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015107 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15108 { (case "(($ac_try" in
15109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15110 *) ac_try_echo=$ac_try;;
15111esac
15112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15113 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015114 ac_status=$?
15115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15116 (exit $ac_status); }; } &&
15117 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015118 { (case "(($ac_try" in
15119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15120 *) ac_try_echo=$ac_try;;
15121esac
15122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15123 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 ac_status=$?
15125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15126 (exit $ac_status); }; }; then
15127 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015128else
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015130sed 's/^/| /' conftest.$ac_ext >&5
15131
Thomas Wouters477c8d52006-05-27 19:21:47 +000015132 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015133fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015134
Skip Montanarof0d5f792004-08-15 14:08:23 +000015135rm -f conftest.err conftest.$ac_objext \
15136 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015137LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015138fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015139{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15140echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015141if test $ac_cv_lib_pthread___pthread_create_system = yes; then
15142 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015143#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015144_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015145
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015146 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015147 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015148 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015149else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015150
Thomas Wouters477c8d52006-05-27 19:21:47 +000015151 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15152echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015153if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
15154 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015155else
Martin v. Löwis11437992002-04-12 09:54:03 +000015156 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015157LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015158cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015159/* confdefs.h. */
15160_ACEOF
15161cat confdefs.h >>conftest.$ac_ext
15162cat >>conftest.$ac_ext <<_ACEOF
15163/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015164
Thomas Wouters477c8d52006-05-27 19:21:47 +000015165/* Override any GCC internal prototype to avoid an error.
15166 Use char because int might match the return type of a GCC
15167 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015168#ifdef __cplusplus
15169extern "C"
15170#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015171char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015172int
15173main ()
15174{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015175return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015176 ;
15177 return 0;
15178}
15179_ACEOF
15180rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015181if { (ac_try="$ac_link"
15182case "(($ac_try" in
15183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15184 *) ac_try_echo=$ac_try;;
15185esac
15186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15187 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015189 grep -v '^ *+' conftest.er1 >conftest.err
15190 rm -f conftest.er1
15191 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15193 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015194 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15195 { (case "(($ac_try" in
15196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15197 *) ac_try_echo=$ac_try;;
15198esac
15199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15200 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015201 ac_status=$?
15202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15203 (exit $ac_status); }; } &&
15204 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015205 { (case "(($ac_try" in
15206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15207 *) ac_try_echo=$ac_try;;
15208esac
15209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15210 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015211 ac_status=$?
15212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15213 (exit $ac_status); }; }; then
15214 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015215else
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015217sed 's/^/| /' conftest.$ac_ext >&5
15218
Thomas Wouters477c8d52006-05-27 19:21:47 +000015219 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015220fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015221
Skip Montanarof0d5f792004-08-15 14:08:23 +000015222rm -f conftest.err conftest.$ac_objext \
15223 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015224LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015225fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015226{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15227echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015228if test $ac_cv_lib_cma_pthread_create = yes; then
15229 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015230#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015231_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015232
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015233 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015234 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015235 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015236else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015237
Martin v. Löwis130fb172001-07-19 11:00:41 +000015238 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015239fi
15240
Guido van Rossum627b2d71993-12-24 10:39:16 +000015241
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015242fi
15243
Guido van Rossum0be3e491997-05-22 20:33:33 +000015244fi
15245
Guido van Rossum49545951997-12-02 19:28:29 +000015246fi
15247
Guido van Rossumb93a8621998-05-07 13:27:32 +000015248fi
15249
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015250
Michael W. Hudson54241132001-12-07 15:38:26 +000015251fi
15252
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015253
15254fi
15255
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015256fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015257
Skip Montanarof0d5f792004-08-15 14:08:23 +000015258rm -f conftest.err conftest.$ac_objext \
15259 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015260fi
15261
Martin v. Löwis11437992002-04-12 09:54:03 +000015262fi
15263
15264
15265fi
15266
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015267
Michael W. Hudson54241132001-12-07 15:38:26 +000015268
Thomas Wouters477c8d52006-05-27 19:21:47 +000015269 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15270echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015271if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15272 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015273else
Martin v. Löwis11437992002-04-12 09:54:03 +000015274 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015275LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015276cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015277/* confdefs.h. */
15278_ACEOF
15279cat confdefs.h >>conftest.$ac_ext
15280cat >>conftest.$ac_ext <<_ACEOF
15281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015282
Thomas Wouters477c8d52006-05-27 19:21:47 +000015283/* Override any GCC internal prototype to avoid an error.
15284 Use char because int might match the return type of a GCC
15285 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015286#ifdef __cplusplus
15287extern "C"
15288#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015289char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015290int
15291main ()
15292{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015293return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015294 ;
15295 return 0;
15296}
15297_ACEOF
15298rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015299if { (ac_try="$ac_link"
15300case "(($ac_try" in
15301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15302 *) ac_try_echo=$ac_try;;
15303esac
15304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15305 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015307 grep -v '^ *+' conftest.er1 >conftest.err
15308 rm -f conftest.er1
15309 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15311 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015312 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15313 { (case "(($ac_try" in
15314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15315 *) ac_try_echo=$ac_try;;
15316esac
15317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15318 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015319 ac_status=$?
15320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15321 (exit $ac_status); }; } &&
15322 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015323 { (case "(($ac_try" in
15324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15325 *) ac_try_echo=$ac_try;;
15326esac
15327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15328 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015329 ac_status=$?
15330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15331 (exit $ac_status); }; }; then
15332 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015333else
Martin v. Löwis11437992002-04-12 09:54:03 +000015334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015335sed 's/^/| /' conftest.$ac_ext >&5
15336
Thomas Wouters477c8d52006-05-27 19:21:47 +000015337 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015338fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015339
Skip Montanarof0d5f792004-08-15 14:08:23 +000015340rm -f conftest.err conftest.$ac_objext \
15341 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015342LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015343fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015344{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15345echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015346if test $ac_cv_lib_mpc_usconfig = yes; then
15347 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015348#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015349_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015350
Martin v. Löwis130fb172001-07-19 11:00:41 +000015351 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015352 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015353 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015354fi
15355
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015356
Neal Norwitza978ab02002-11-02 16:58:05 +000015357 if test "$posix_threads" != "yes"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015358 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15359echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015360if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15361 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015362else
Martin v. Löwis11437992002-04-12 09:54:03 +000015363 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015364LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015365cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015366/* confdefs.h. */
15367_ACEOF
15368cat confdefs.h >>conftest.$ac_ext
15369cat >>conftest.$ac_ext <<_ACEOF
15370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015371
Thomas Wouters477c8d52006-05-27 19:21:47 +000015372/* Override any GCC internal prototype to avoid an error.
15373 Use char because int might match the return type of a GCC
15374 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015375#ifdef __cplusplus
15376extern "C"
15377#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015378char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015379int
15380main ()
15381{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015382return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015383 ;
15384 return 0;
15385}
15386_ACEOF
15387rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015388if { (ac_try="$ac_link"
15389case "(($ac_try" in
15390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15391 *) ac_try_echo=$ac_try;;
15392esac
15393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15394 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015396 grep -v '^ *+' conftest.er1 >conftest.err
15397 rm -f conftest.er1
15398 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15400 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015401 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15402 { (case "(($ac_try" in
15403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15404 *) ac_try_echo=$ac_try;;
15405esac
15406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15407 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015408 ac_status=$?
15409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15410 (exit $ac_status); }; } &&
15411 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015412 { (case "(($ac_try" in
15413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15414 *) ac_try_echo=$ac_try;;
15415esac
15416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15417 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015418 ac_status=$?
15419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15420 (exit $ac_status); }; }; then
15421 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015422else
Martin v. Löwis11437992002-04-12 09:54:03 +000015423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015424sed 's/^/| /' conftest.$ac_ext >&5
15425
Thomas Wouters477c8d52006-05-27 19:21:47 +000015426 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015427fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015428
Skip Montanarof0d5f792004-08-15 14:08:23 +000015429rm -f conftest.err conftest.$ac_objext \
15430 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015431LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015432fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015433{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15434echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015435if test $ac_cv_lib_thread_thr_create = yes; then
15436 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015437#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015438_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015439
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015440 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015441 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015442 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015443fi
15444
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015445 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015446
Martin v. Löwis130fb172001-07-19 11:00:41 +000015447 if test "$USE_THREAD_MODULE" != "#"
15448 then
15449 # If the above checks didn't disable threads, (at least) OSF1
15450 # needs this '-threads' argument during linking.
15451 case $ac_sys_system in
15452 OSF1) LDLAST=-threads;;
15453 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015454 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015455fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015456
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015457if test "$posix_threads" = "yes"; then
15458 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015459
15460cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015461#define _POSIX_THREADS 1
15462_ACEOF
15463
15464 fi
15465
15466 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15467 case $ac_sys_system/$ac_sys_release in
15468 SunOS/5.6)
15469cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015470#define HAVE_PTHREAD_DESTRUCTOR 1
15471_ACEOF
15472
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015473 ;;
15474 SunOS/5.8)
15475cat >>confdefs.h <<\_ACEOF
15476#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15477_ACEOF
15478
15479 ;;
15480 esac
15481
Thomas Wouters477c8d52006-05-27 19:21:47 +000015482 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15483echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015484 if test "${ac_cv_pthread_system_supported+set}" = set; then
15485 echo $ECHO_N "(cached) $ECHO_C" >&6
15486else
15487 if test "$cross_compiling" = yes; then
15488 ac_cv_pthread_system_supported=no
15489else
15490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015491/* confdefs.h. */
15492_ACEOF
15493cat confdefs.h >>conftest.$ac_ext
15494cat >>conftest.$ac_ext <<_ACEOF
15495/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015496#include <pthread.h>
15497 void *foo(void *parm) {
15498 return NULL;
15499 }
15500 main() {
15501 pthread_attr_t attr;
15502 pthread_t id;
15503 if (pthread_attr_init(&attr)) exit(-1);
15504 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15505 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15506 exit(0);
15507 }
15508_ACEOF
15509rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015510if { (ac_try="$ac_link"
15511case "(($ac_try" in
15512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15513 *) ac_try_echo=$ac_try;;
15514esac
15515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15516 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015517 ac_status=$?
15518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015520 { (case "(($ac_try" in
15521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15522 *) ac_try_echo=$ac_try;;
15523esac
15524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15525 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015526 ac_status=$?
15527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15528 (exit $ac_status); }; }; then
15529 ac_cv_pthread_system_supported=yes
15530else
15531 echo "$as_me: program exited with status $ac_status" >&5
15532echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015533sed 's/^/| /' conftest.$ac_ext >&5
15534
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015535( exit $ac_status )
15536ac_cv_pthread_system_supported=no
15537fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015538rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015539fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015540
Thomas Wouters477c8d52006-05-27 19:21:47 +000015541
15542
Guido van Rossum627b2d71993-12-24 10:39:16 +000015543fi
15544
Thomas Wouters477c8d52006-05-27 19:21:47 +000015545 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15546echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015547 if test "$ac_cv_pthread_system_supported" = "yes"; then
15548
15549cat >>confdefs.h <<\_ACEOF
15550#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15551_ACEOF
15552
15553 fi
15554
15555for ac_func in pthread_sigmask
15556do
15557as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000015558{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15559echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15560if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015561 echo $ECHO_N "(cached) $ECHO_C" >&6
15562else
15563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015564/* confdefs.h. */
15565_ACEOF
15566cat confdefs.h >>conftest.$ac_ext
15567cat >>conftest.$ac_ext <<_ACEOF
15568/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015569/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15570 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15571#define $ac_func innocuous_$ac_func
15572
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015573/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015574 which can conflict with char $ac_func (); below.
15575 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015576 <limits.h> exists even on freestanding compilers. */
15577
15578#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015579# include <limits.h>
15580#else
15581# include <assert.h>
15582#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015583
15584#undef $ac_func
15585
Thomas Wouters477c8d52006-05-27 19:21:47 +000015586/* Override any GCC internal prototype to avoid an error.
15587 Use char because int might match the return type of a GCC
15588 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015589#ifdef __cplusplus
15590extern "C"
15591#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015592char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015593/* The GNU C library defines this for functions which it implements
15594 to always fail with ENOSYS. Some functions are actually named
15595 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000015596#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015597choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015598#endif
15599
Skip Montanaro6dead952003-09-25 14:50:04 +000015600int
15601main ()
15602{
Thomas Wouters477c8d52006-05-27 19:21:47 +000015603return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015604 ;
15605 return 0;
15606}
15607_ACEOF
15608rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015609if { (ac_try="$ac_link"
15610case "(($ac_try" in
15611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15612 *) ac_try_echo=$ac_try;;
15613esac
15614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15615 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015617 grep -v '^ *+' conftest.er1 >conftest.err
15618 rm -f conftest.er1
15619 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15621 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015622 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15623 { (case "(($ac_try" in
15624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15625 *) ac_try_echo=$ac_try;;
15626esac
15627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15628 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015629 ac_status=$?
15630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15631 (exit $ac_status); }; } &&
15632 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015633 { (case "(($ac_try" in
15634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15635 *) ac_try_echo=$ac_try;;
15636esac
15637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15638 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015639 ac_status=$?
15640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15641 (exit $ac_status); }; }; then
15642 eval "$as_ac_var=yes"
15643else
15644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015645sed 's/^/| /' conftest.$ac_ext >&5
15646
Thomas Wouters477c8d52006-05-27 19:21:47 +000015647 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015648fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015649
Skip Montanarof0d5f792004-08-15 14:08:23 +000015650rm -f conftest.err conftest.$ac_objext \
15651 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015652fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015653ac_res=`eval echo '${'$as_ac_var'}'`
15654 { echo "$as_me:$LINENO: result: $ac_res" >&5
15655echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015656if test `eval echo '${'$as_ac_var'}'` = yes; then
15657 cat >>confdefs.h <<_ACEOF
15658#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15659_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015660 case $ac_sys_system in
15661 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015662
Jason Tishlerfac083d2003-07-22 15:20:49 +000015663cat >>confdefs.h <<\_ACEOF
15664#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15665_ACEOF
15666
15667 ;;
15668 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015669fi
15670done
15671
15672fi
15673
15674
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015675# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015676
15677
Thomas Wouters477c8d52006-05-27 19:21:47 +000015678{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15679echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15680# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015681if test "${enable_ipv6+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015682 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015683 no)
Thomas Wouters477c8d52006-05-27 19:21:47 +000015684 { echo "$as_me:$LINENO: result: no" >&5
15685echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015686 ipv6=no
15687 ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000015688 *) { echo "$as_me:$LINENO: result: yes" >&5
15689echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015690 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015691#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015692_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015693
15694 ipv6=yes
15695 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015696 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015697else
Martin v. Löwis11437992002-04-12 09:54:03 +000015698
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015699 if test "$cross_compiling" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015700 { echo "$as_me:$LINENO: result: no" >&5
15701echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015702 ipv6=no
15703
15704else
Martin v. Löwis11437992002-04-12 09:54:03 +000015705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015706/* confdefs.h. */
15707_ACEOF
15708cat confdefs.h >>conftest.$ac_ext
15709cat >>conftest.$ac_ext <<_ACEOF
15710/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015711 /* AF_INET6 available check */
15712#include <sys/types.h>
15713#include <sys/socket.h>
15714main()
15715{
15716 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15717 exit(1);
15718 else
15719 exit(0);
15720}
15721
Martin v. Löwis11437992002-04-12 09:54:03 +000015722_ACEOF
15723rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015724if { (ac_try="$ac_link"
15725case "(($ac_try" in
15726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15727 *) ac_try_echo=$ac_try;;
15728esac
15729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15730 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015731 ac_status=$?
15732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15733 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015734 { (case "(($ac_try" in
15735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15736 *) ac_try_echo=$ac_try;;
15737esac
15738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15739 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015740 ac_status=$?
15741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15742 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015743 { echo "$as_me:$LINENO: result: yes" >&5
15744echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015745 ipv6=yes
15746else
Martin v. Löwis11437992002-04-12 09:54:03 +000015747 echo "$as_me: program exited with status $ac_status" >&5
15748echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015749sed 's/^/| /' conftest.$ac_ext >&5
15750
Martin v. Löwis11437992002-04-12 09:54:03 +000015751( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000015752{ echo "$as_me:$LINENO: result: no" >&5
15753echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015754 ipv6=no
15755fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015757fi
15758
Thomas Wouters477c8d52006-05-27 19:21:47 +000015759
15760
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015761if test "$ipv6" = "yes"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015762 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15763echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015765/* confdefs.h. */
15766_ACEOF
15767cat confdefs.h >>conftest.$ac_ext
15768cat >>conftest.$ac_ext <<_ACEOF
15769/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015770#include <sys/types.h>
15771#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015772int
15773main ()
15774{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015775struct sockaddr_in6 x;
15776x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015777 ;
15778 return 0;
15779}
15780_ACEOF
15781rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015782if { (ac_try="$ac_compile"
15783case "(($ac_try" in
15784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15785 *) ac_try_echo=$ac_try;;
15786esac
15787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15788 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015789 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015790 grep -v '^ *+' conftest.er1 >conftest.err
15791 rm -f conftest.er1
15792 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15794 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015795 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
15796 { (case "(($ac_try" in
15797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15798 *) ac_try_echo=$ac_try;;
15799esac
15800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15801 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015802 ac_status=$?
15803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15804 (exit $ac_status); }; } &&
15805 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015806 { (case "(($ac_try" in
15807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15808 *) ac_try_echo=$ac_try;;
15809esac
15810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15811 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015812 ac_status=$?
15813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15814 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015815 { echo "$as_me:$LINENO: result: yes" >&5
15816echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015817 ipv6=yes
15818else
Martin v. Löwis11437992002-04-12 09:54:03 +000015819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015820sed 's/^/| /' conftest.$ac_ext >&5
15821
Thomas Wouters477c8d52006-05-27 19:21:47 +000015822 { echo "$as_me:$LINENO: result: no" >&5
15823echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015824 ipv6=no
15825fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000015826
Skip Montanarof0d5f792004-08-15 14:08:23 +000015827rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015828fi
15829
15830if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015831 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015832#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015833_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015834
15835fi
15836
Thomas Wouters477c8d52006-05-27 19:21:47 +000015837fi
15838
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015839
15840ipv6type=unknown
15841ipv6lib=none
15842ipv6trylibc=no
15843
15844if test "$ipv6" = "yes"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000015845 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15846echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015847 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15848 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015849 case $i in
15850 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015852/* confdefs.h. */
15853_ACEOF
15854cat confdefs.h >>conftest.$ac_ext
15855cat >>conftest.$ac_ext <<_ACEOF
15856/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015857
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015858#include <netinet/in.h>
15859#ifdef IPV6_INRIA_VERSION
15860yes
15861#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015862_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015863if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015864 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015865 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015866fi
15867rm -f conftest*
15868
15869 ;;
15870 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015872/* confdefs.h. */
15873_ACEOF
15874cat confdefs.h >>conftest.$ac_ext
15875cat >>conftest.$ac_ext <<_ACEOF
15876/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015877
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015878#include <netinet/in.h>
15879#ifdef __KAME__
15880yes
15881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015882_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015883if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015884 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015885 ipv6type=$i;
15886 ipv6lib=inet6
15887 ipv6libdir=/usr/local/v6/lib
15888 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015889fi
15890rm -f conftest*
15891
15892 ;;
15893 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015895/* confdefs.h. */
15896_ACEOF
15897cat confdefs.h >>conftest.$ac_ext
15898cat >>conftest.$ac_ext <<_ACEOF
15899/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015901#include <features.h>
15902#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15903yes
15904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015905_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015907 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015908 ipv6type=$i;
15909 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015910fi
15911rm -f conftest*
15912
15913 ;;
15914 linux-inet6)
15915 if test -d /usr/inet6; then
15916 ipv6type=$i
15917 ipv6lib=inet6
15918 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015919 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015920 fi
15921 ;;
15922 solaris)
15923 if test -f /etc/netconfig; then
15924 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15925 ipv6type=$i
15926 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015927 fi
15928 fi
15929 ;;
15930 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015932/* confdefs.h. */
15933_ACEOF
15934cat confdefs.h >>conftest.$ac_ext
15935cat >>conftest.$ac_ext <<_ACEOF
15936/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015937
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015938#include <sys/param.h>
15939#ifdef _TOSHIBA_INET6
15940yes
15941#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015942_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015944 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015945 ipv6type=$i;
15946 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015947 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015948fi
15949rm -f conftest*
15950
15951 ;;
15952 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015954/* confdefs.h. */
15955_ACEOF
15956cat confdefs.h >>conftest.$ac_ext
15957cat >>conftest.$ac_ext <<_ACEOF
15958/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015959
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015960#include </usr/local/v6/include/sys/v6config.h>
15961#ifdef __V6D__
15962yes
15963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015964_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015965if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015966 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015967 ipv6type=$i;
15968 ipv6lib=v6;
15969 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015970 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015971fi
15972rm -f conftest*
15973
15974 ;;
15975 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015976 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015977/* confdefs.h. */
15978_ACEOF
15979cat confdefs.h >>conftest.$ac_ext
15980cat >>conftest.$ac_ext <<_ACEOF
15981/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015982
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015983#include <sys/param.h>
15984#ifdef _ZETA_MINAMI_INET6
15985yes
15986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015987_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015988if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015989 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015990 ipv6type=$i;
15991 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015992 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015993fi
15994rm -f conftest*
15995
15996 ;;
15997 esac
15998 if test "$ipv6type" != "unknown"; then
15999 break
16000 fi
16001 done
Thomas Wouters477c8d52006-05-27 19:21:47 +000016002 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16003echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016004fi
16005
16006if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16007 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16008 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16009 echo "using lib$ipv6lib"
16010 else
16011 if test $ipv6trylibc = "yes"; then
16012 echo "using libc"
16013 else
16014 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16015 echo "You need to fetch lib$ipv6lib.a from appropriate"
16016 echo 'ipv6 kit and compile beforehand.'
16017 exit 1
16018 fi
16019 fi
16020fi
16021
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016022# Check for --with-doc-strings
Thomas Wouters477c8d52006-05-27 19:21:47 +000016023{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16024echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016025
Thomas Wouters477c8d52006-05-27 19:21:47 +000016026# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016027if test "${with_doc_strings+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000016028 withval=$with_doc_strings;
16029fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016030
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016031
16032if test -z "$with_doc_strings"
16033then with_doc_strings="yes"
16034fi
16035if test "$with_doc_strings" != "no"
16036then
16037
16038cat >>confdefs.h <<\_ACEOF
16039#define WITH_DOC_STRINGS 1
16040_ACEOF
16041
16042fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016043{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16044echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016045
Neil Schemenauera35c6882001-02-27 04:45:05 +000016046# Check for Python-specific malloc support
Thomas Wouters477c8d52006-05-27 19:21:47 +000016047{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16048echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016049
Thomas Wouters477c8d52006-05-27 19:21:47 +000016050# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016051if test "${with_tsc+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000016052 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016053if test "$withval" != no
16054then
16055
16056cat >>confdefs.h <<\_ACEOF
16057#define WITH_TSC 1
16058_ACEOF
16059
Thomas Wouters477c8d52006-05-27 19:21:47 +000016060 { echo "$as_me:$LINENO: result: yes" >&5
16061echo "${ECHO_T}yes" >&6; }
16062else { echo "$as_me:$LINENO: result: no" >&5
16063echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016064fi
16065else
Thomas Wouters477c8d52006-05-27 19:21:47 +000016066 { echo "$as_me:$LINENO: result: no" >&5
16067echo "${ECHO_T}no" >&6; }
16068fi
16069
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016070
16071# Check for Python-specific malloc support
Thomas Wouters477c8d52006-05-27 19:21:47 +000016072{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16073echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016074
Thomas Wouters477c8d52006-05-27 19:21:47 +000016075# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016076if test "${with_pymalloc+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000016077 withval=$with_pymalloc;
16078fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016079
Neil Schemenauera35c6882001-02-27 04:45:05 +000016080
Neil Schemenauer16c22972002-03-22 15:34:49 +000016081if test -z "$with_pymalloc"
16082then with_pymalloc="yes"
16083fi
16084if test "$with_pymalloc" != "no"
16085then
Martin v. Löwis11437992002-04-12 09:54:03 +000016086
16087cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016088#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016089_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016090
16091fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016092{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16093echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016094
Barry Warsawef82cd72000-06-30 16:21:01 +000016095# Check for --with-wctype-functions
Thomas Wouters477c8d52006-05-27 19:21:47 +000016096{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16097echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016098
Thomas Wouters477c8d52006-05-27 19:21:47 +000016099# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016100if test "${with_wctype_functions+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000016101 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016102if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016103then
16104
16105cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016106#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016107_ACEOF
16108
Thomas Wouters477c8d52006-05-27 19:21:47 +000016109 { echo "$as_me:$LINENO: result: yes" >&5
16110echo "${ECHO_T}yes" >&6; }
16111else { echo "$as_me:$LINENO: result: no" >&5
16112echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016113fi
16114else
Thomas Wouters477c8d52006-05-27 19:21:47 +000016115 { echo "$as_me:$LINENO: result: no" >&5
16116echo "${ECHO_T}no" >&6; }
16117fi
16118
Barry Warsawef82cd72000-06-30 16:21:01 +000016119
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016120# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016121
Guido van Rossum98935bf2001-09-05 19:13:16 +000016122DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016123
Guido van Rossume97ee181999-12-20 21:27:22 +000016124# the dlopen() function means we might want to use dynload_shlib.o. some
16125# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016126
Thomas Wouters3a584202000-08-05 23:28:51 +000016127for ac_func in dlopen
16128do
Martin v. Löwis11437992002-04-12 09:54:03 +000016129as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000016130{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16131echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16132if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016133 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016134else
Martin v. Löwis11437992002-04-12 09:54:03 +000016135 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016136/* confdefs.h. */
16137_ACEOF
16138cat confdefs.h >>conftest.$ac_ext
16139cat >>conftest.$ac_ext <<_ACEOF
16140/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016141/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16142 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16143#define $ac_func innocuous_$ac_func
16144
Guido van Rossume97ee181999-12-20 21:27:22 +000016145/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016146 which can conflict with char $ac_func (); below.
16147 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016148 <limits.h> exists even on freestanding compilers. */
16149
16150#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016151# include <limits.h>
16152#else
16153# include <assert.h>
16154#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016155
16156#undef $ac_func
16157
Thomas Wouters477c8d52006-05-27 19:21:47 +000016158/* Override any GCC internal prototype to avoid an error.
16159 Use char because int might match the return type of a GCC
16160 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016161#ifdef __cplusplus
16162extern "C"
16163#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016164char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016165/* The GNU C library defines this for functions which it implements
16166 to always fail with ENOSYS. Some functions are actually named
16167 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000016168#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016169choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016170#endif
16171
Skip Montanaro6dead952003-09-25 14:50:04 +000016172int
16173main ()
16174{
Thomas Wouters477c8d52006-05-27 19:21:47 +000016175return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016176 ;
16177 return 0;
16178}
16179_ACEOF
16180rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016181if { (ac_try="$ac_link"
16182case "(($ac_try" in
16183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16184 *) ac_try_echo=$ac_try;;
16185esac
16186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16187 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016188 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016189 grep -v '^ *+' conftest.er1 >conftest.err
16190 rm -f conftest.er1
16191 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16193 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016194 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16195 { (case "(($ac_try" in
16196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16197 *) ac_try_echo=$ac_try;;
16198esac
16199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16200 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016201 ac_status=$?
16202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16203 (exit $ac_status); }; } &&
16204 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016205 { (case "(($ac_try" in
16206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16207 *) ac_try_echo=$ac_try;;
16208esac
16209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16210 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016211 ac_status=$?
16212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16213 (exit $ac_status); }; }; then
16214 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016215else
Martin v. Löwis11437992002-04-12 09:54:03 +000016216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016217sed 's/^/| /' conftest.$ac_ext >&5
16218
Thomas Wouters477c8d52006-05-27 19:21:47 +000016219 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016220fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016221
Skip Montanarof0d5f792004-08-15 14:08:23 +000016222rm -f conftest.err conftest.$ac_objext \
16223 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016224fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016225ac_res=`eval echo '${'$as_ac_var'}'`
16226 { echo "$as_me:$LINENO: result: $ac_res" >&5
16227echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016228if test `eval echo '${'$as_ac_var'}'` = yes; then
16229 cat >>confdefs.h <<_ACEOF
16230#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16231_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016232
Guido van Rossume97ee181999-12-20 21:27:22 +000016233fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016234done
Guido van Rossume97ee181999-12-20 21:27:22 +000016235
Michael W. Hudson54241132001-12-07 15:38:26 +000016236
Guido van Rossume97ee181999-12-20 21:27:22 +000016237# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16238# loading of modules.
16239
Thomas Wouters477c8d52006-05-27 19:21:47 +000016240{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16241echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016242if test -z "$DYNLOADFILE"
16243then
16244 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016245 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16246 if test "$ac_cv_func_dlopen" = yes
16247 then DYNLOADFILE="dynload_shlib.o"
16248 else DYNLOADFILE="dynload_aix.o"
16249 fi
16250 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016251 BeOS*) DYNLOADFILE="dynload_beos.o";;
16252 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016253 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16254 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016255 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016256 *)
16257 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16258 # out any dynamic loading
16259 if test "$ac_cv_func_dlopen" = yes
16260 then DYNLOADFILE="dynload_shlib.o"
16261 else DYNLOADFILE="dynload_stub.o"
16262 fi
16263 ;;
16264 esac
16265fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016266{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16267echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016268if test "$DYNLOADFILE" != "dynload_stub.o"
16269then
Martin v. Löwis11437992002-04-12 09:54:03 +000016270
16271cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016272#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016273_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016274
16275fi
16276
Neil Schemenauer4e425612001-06-19 15:44:15 +000016277# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16278
Michael W. Hudson54241132001-12-07 15:38:26 +000016279
Thomas Wouters477c8d52006-05-27 19:21:47 +000016280{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16281echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016282if test -z "$MACHDEP_OBJS"
16283then
Jack Jansene578a632001-08-15 01:27:14 +000016284 MACHDEP_OBJS=$extra_machdep_objs
16285else
16286 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016287fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016288{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16289echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016290
Guido van Rossum627b2d71993-12-24 10:39:16 +000016291# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
Martin v. Löwisd6320502004-08-12 13:45:08 +000016363
Martin v. Löwisc3001752005-01-23 09:27:24 +000016364
16365
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016366
16367
Martin v. Löwisd6320502004-08-12 13:45:08 +000016368for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
16369 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016370 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016371 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000016372 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016373 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016374 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016375 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016376 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016377 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016378 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016379 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016380do
Martin v. Löwis11437992002-04-12 09:54:03 +000016381as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000016382{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16383echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16384if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016385 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016386else
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016388/* confdefs.h. */
16389_ACEOF
16390cat confdefs.h >>conftest.$ac_ext
16391cat >>conftest.$ac_ext <<_ACEOF
16392/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016393/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16394 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16395#define $ac_func innocuous_$ac_func
16396
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016397/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016398 which can conflict with char $ac_func (); below.
16399 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016400 <limits.h> exists even on freestanding compilers. */
16401
16402#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016403# include <limits.h>
16404#else
16405# include <assert.h>
16406#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016407
16408#undef $ac_func
16409
Thomas Wouters477c8d52006-05-27 19:21:47 +000016410/* Override any GCC internal prototype to avoid an error.
16411 Use char because int might match the return type of a GCC
16412 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016413#ifdef __cplusplus
16414extern "C"
16415#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016416char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016417/* The GNU C library defines this for functions which it implements
16418 to always fail with ENOSYS. Some functions are actually named
16419 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000016420#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016421choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016422#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016423
Skip Montanaro6dead952003-09-25 14:50:04 +000016424int
16425main ()
16426{
Thomas Wouters477c8d52006-05-27 19:21:47 +000016427return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016428 ;
16429 return 0;
16430}
16431_ACEOF
16432rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016433if { (ac_try="$ac_link"
16434case "(($ac_try" in
16435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16436 *) ac_try_echo=$ac_try;;
16437esac
16438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16439 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016441 grep -v '^ *+' conftest.er1 >conftest.err
16442 rm -f conftest.er1
16443 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16445 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016446 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16447 { (case "(($ac_try" in
16448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16449 *) ac_try_echo=$ac_try;;
16450esac
16451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16452 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016453 ac_status=$?
16454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16455 (exit $ac_status); }; } &&
16456 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016457 { (case "(($ac_try" in
16458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16459 *) ac_try_echo=$ac_try;;
16460esac
16461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16462 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016463 ac_status=$?
16464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16465 (exit $ac_status); }; }; then
16466 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016467else
Martin v. Löwis11437992002-04-12 09:54:03 +000016468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016469sed 's/^/| /' conftest.$ac_ext >&5
16470
Thomas Wouters477c8d52006-05-27 19:21:47 +000016471 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016472fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016473
Skip Montanarof0d5f792004-08-15 14:08:23 +000016474rm -f conftest.err conftest.$ac_objext \
16475 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016476fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016477ac_res=`eval echo '${'$as_ac_var'}'`
16478 { echo "$as_me:$LINENO: result: $ac_res" >&5
16479echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016480if test `eval echo '${'$as_ac_var'}'` = yes; then
16481 cat >>confdefs.h <<_ACEOF
16482#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16483_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016484
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016485fi
16486done
16487
Michael W. Hudson54241132001-12-07 15:38:26 +000016488
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016489# For some functions, having a definition is not sufficient, since
16490# we want to take their address.
Thomas Wouters477c8d52006-05-27 19:21:47 +000016491{ echo "$as_me:$LINENO: checking for chroot" >&5
16492echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016493cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016494/* confdefs.h. */
16495_ACEOF
16496cat confdefs.h >>conftest.$ac_ext
16497cat >>conftest.$ac_ext <<_ACEOF
16498/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016499#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016500int
16501main ()
16502{
16503void *x=chroot
16504 ;
16505 return 0;
16506}
16507_ACEOF
16508rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016509if { (ac_try="$ac_compile"
16510case "(($ac_try" in
16511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16512 *) ac_try_echo=$ac_try;;
16513esac
16514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16515 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016517 grep -v '^ *+' conftest.er1 >conftest.err
16518 rm -f conftest.er1
16519 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16521 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016522 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16523 { (case "(($ac_try" in
16524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16525 *) ac_try_echo=$ac_try;;
16526esac
16527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16528 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016529 ac_status=$?
16530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16531 (exit $ac_status); }; } &&
16532 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016533 { (case "(($ac_try" in
16534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16535 *) ac_try_echo=$ac_try;;
16536esac
16537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16538 (eval "$ac_try") 2>&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016539 ac_status=$?
16540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16541 (exit $ac_status); }; }; then
16542
16543cat >>confdefs.h <<\_ACEOF
16544#define HAVE_CHROOT 1
16545_ACEOF
16546
Thomas Wouters477c8d52006-05-27 19:21:47 +000016547 { echo "$as_me:$LINENO: result: yes" >&5
16548echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016549else
16550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016551sed 's/^/| /' conftest.$ac_ext >&5
16552
Thomas Wouters477c8d52006-05-27 19:21:47 +000016553 { echo "$as_me:$LINENO: result: no" >&5
16554echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016555
16556fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016557
Skip Montanarof0d5f792004-08-15 14:08:23 +000016558rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016559{ echo "$as_me:$LINENO: checking for link" >&5
16560echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016561cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016562/* confdefs.h. */
16563_ACEOF
16564cat confdefs.h >>conftest.$ac_ext
16565cat >>conftest.$ac_ext <<_ACEOF
16566/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016567#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016568int
16569main ()
16570{
16571void *x=link
16572 ;
16573 return 0;
16574}
16575_ACEOF
16576rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016577if { (ac_try="$ac_compile"
16578case "(($ac_try" in
16579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16580 *) ac_try_echo=$ac_try;;
16581esac
16582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16583 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016584 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016585 grep -v '^ *+' conftest.er1 >conftest.err
16586 rm -f conftest.er1
16587 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16589 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016590 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16591 { (case "(($ac_try" in
16592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16593 *) ac_try_echo=$ac_try;;
16594esac
16595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16596 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016597 ac_status=$?
16598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16599 (exit $ac_status); }; } &&
16600 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016601 { (case "(($ac_try" in
16602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16603 *) ac_try_echo=$ac_try;;
16604esac
16605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16606 (eval "$ac_try") 2>&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016607 ac_status=$?
16608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16609 (exit $ac_status); }; }; then
16610
16611cat >>confdefs.h <<\_ACEOF
16612#define HAVE_LINK 1
16613_ACEOF
16614
Thomas Wouters477c8d52006-05-27 19:21:47 +000016615 { echo "$as_me:$LINENO: result: yes" >&5
16616echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016617else
16618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016619sed 's/^/| /' conftest.$ac_ext >&5
16620
Thomas Wouters477c8d52006-05-27 19:21:47 +000016621 { echo "$as_me:$LINENO: result: no" >&5
16622echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016623
16624fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016625
Skip Montanarof0d5f792004-08-15 14:08:23 +000016626rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016627{ echo "$as_me:$LINENO: checking for symlink" >&5
16628echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016629cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016630/* confdefs.h. */
16631_ACEOF
16632cat confdefs.h >>conftest.$ac_ext
16633cat >>conftest.$ac_ext <<_ACEOF
16634/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016635#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016636int
16637main ()
16638{
16639void *x=symlink
16640 ;
16641 return 0;
16642}
16643_ACEOF
16644rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016645if { (ac_try="$ac_compile"
16646case "(($ac_try" in
16647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16648 *) ac_try_echo=$ac_try;;
16649esac
16650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16651 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016653 grep -v '^ *+' conftest.er1 >conftest.err
16654 rm -f conftest.er1
16655 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16657 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016658 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16659 { (case "(($ac_try" in
16660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16661 *) ac_try_echo=$ac_try;;
16662esac
16663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16664 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016665 ac_status=$?
16666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16667 (exit $ac_status); }; } &&
16668 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016669 { (case "(($ac_try" in
16670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16671 *) ac_try_echo=$ac_try;;
16672esac
16673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16674 (eval "$ac_try") 2>&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016675 ac_status=$?
16676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16677 (exit $ac_status); }; }; then
16678
16679cat >>confdefs.h <<\_ACEOF
16680#define HAVE_SYMLINK 1
16681_ACEOF
16682
Thomas Wouters477c8d52006-05-27 19:21:47 +000016683 { echo "$as_me:$LINENO: result: yes" >&5
16684echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016685else
16686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016687sed 's/^/| /' conftest.$ac_ext >&5
16688
Thomas Wouters477c8d52006-05-27 19:21:47 +000016689 { echo "$as_me:$LINENO: result: no" >&5
16690echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016691
16692fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016693
Skip Montanarof0d5f792004-08-15 14:08:23 +000016694rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016695{ echo "$as_me:$LINENO: checking for fchdir" >&5
16696echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016697cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016698/* confdefs.h. */
16699_ACEOF
16700cat confdefs.h >>conftest.$ac_ext
16701cat >>conftest.$ac_ext <<_ACEOF
16702/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016703#include <unistd.h>
16704int
16705main ()
16706{
16707void *x=fchdir
16708 ;
16709 return 0;
16710}
16711_ACEOF
16712rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016713if { (ac_try="$ac_compile"
16714case "(($ac_try" in
16715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16716 *) ac_try_echo=$ac_try;;
16717esac
16718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16719 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016720 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016721 grep -v '^ *+' conftest.er1 >conftest.err
16722 rm -f conftest.er1
16723 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16725 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016726 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16727 { (case "(($ac_try" in
16728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16729 *) ac_try_echo=$ac_try;;
16730esac
16731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16732 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016733 ac_status=$?
16734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16735 (exit $ac_status); }; } &&
16736 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016737 { (case "(($ac_try" in
16738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16739 *) ac_try_echo=$ac_try;;
16740esac
16741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16742 (eval "$ac_try") 2>&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016743 ac_status=$?
16744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16745 (exit $ac_status); }; }; then
16746
16747cat >>confdefs.h <<\_ACEOF
16748#define HAVE_FCHDIR 1
16749_ACEOF
16750
Thomas Wouters477c8d52006-05-27 19:21:47 +000016751 { echo "$as_me:$LINENO: result: yes" >&5
16752echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016753else
16754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016755sed 's/^/| /' conftest.$ac_ext >&5
16756
Thomas Wouters477c8d52006-05-27 19:21:47 +000016757 { echo "$as_me:$LINENO: result: no" >&5
16758echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016759
16760fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016761
Skip Montanarof0d5f792004-08-15 14:08:23 +000016762rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016763{ echo "$as_me:$LINENO: checking for fsync" >&5
16764echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016765cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016766/* confdefs.h. */
16767_ACEOF
16768cat confdefs.h >>conftest.$ac_ext
16769cat >>conftest.$ac_ext <<_ACEOF
16770/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016771#include <unistd.h>
16772int
16773main ()
16774{
16775void *x=fsync
16776 ;
16777 return 0;
16778}
16779_ACEOF
16780rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016781if { (ac_try="$ac_compile"
16782case "(($ac_try" in
16783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16784 *) ac_try_echo=$ac_try;;
16785esac
16786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16787 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016789 grep -v '^ *+' conftest.er1 >conftest.err
16790 rm -f conftest.er1
16791 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16793 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016794 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16795 { (case "(($ac_try" in
16796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16797 *) ac_try_echo=$ac_try;;
16798esac
16799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16800 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016801 ac_status=$?
16802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16803 (exit $ac_status); }; } &&
16804 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016805 { (case "(($ac_try" in
16806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16807 *) ac_try_echo=$ac_try;;
16808esac
16809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16810 (eval "$ac_try") 2>&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016811 ac_status=$?
16812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16813 (exit $ac_status); }; }; then
16814
16815cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016816#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016817_ACEOF
16818
Thomas Wouters477c8d52006-05-27 19:21:47 +000016819 { echo "$as_me:$LINENO: result: yes" >&5
16820echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016821else
16822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016823sed 's/^/| /' conftest.$ac_ext >&5
16824
Thomas Wouters477c8d52006-05-27 19:21:47 +000016825 { echo "$as_me:$LINENO: result: no" >&5
16826echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016827
16828fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016829
Skip Montanarof0d5f792004-08-15 14:08:23 +000016830rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016831{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16832echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016833cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016834/* confdefs.h. */
16835_ACEOF
16836cat confdefs.h >>conftest.$ac_ext
16837cat >>conftest.$ac_ext <<_ACEOF
16838/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016839#include <unistd.h>
16840int
16841main ()
16842{
16843void *x=fdatasync
16844 ;
16845 return 0;
16846}
16847_ACEOF
16848rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016849if { (ac_try="$ac_compile"
16850case "(($ac_try" in
16851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16852 *) ac_try_echo=$ac_try;;
16853esac
16854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16855 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016856 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016857 grep -v '^ *+' conftest.er1 >conftest.err
16858 rm -f conftest.er1
16859 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16861 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016862 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16863 { (case "(($ac_try" in
16864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16865 *) ac_try_echo=$ac_try;;
16866esac
16867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16868 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016869 ac_status=$?
16870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16871 (exit $ac_status); }; } &&
16872 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016873 { (case "(($ac_try" in
16874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16875 *) ac_try_echo=$ac_try;;
16876esac
16877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16878 (eval "$ac_try") 2>&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016879 ac_status=$?
16880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16881 (exit $ac_status); }; }; then
16882
16883cat >>confdefs.h <<\_ACEOF
16884#define HAVE_FDATASYNC 1
16885_ACEOF
16886
Thomas Wouters477c8d52006-05-27 19:21:47 +000016887 { echo "$as_me:$LINENO: result: yes" >&5
16888echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016889else
16890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016891sed 's/^/| /' conftest.$ac_ext >&5
16892
Thomas Wouters477c8d52006-05-27 19:21:47 +000016893 { echo "$as_me:$LINENO: result: no" >&5
16894echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016895
16896fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016897
Skip Montanarof0d5f792004-08-15 14:08:23 +000016898rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016899
Martin v. Löwisd5843682002-11-21 20:41:28 +000016900# On some systems (eg. FreeBSD 5), we would find a definition of the
16901# functions ctermid_r, setgroups in the library, but no prototype
16902# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16903# address to avoid compiler warnings and potential miscompilations
16904# because of the missing prototypes.
16905
Thomas Wouters477c8d52006-05-27 19:21:47 +000016906{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16907echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016908cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016909/* confdefs.h. */
16910_ACEOF
16911cat confdefs.h >>conftest.$ac_ext
16912cat >>conftest.$ac_ext <<_ACEOF
16913/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016914
16915#include "confdefs.h"
16916#include <stdio.h>
16917
Martin v. Löwisd5843682002-11-21 20:41:28 +000016918int
16919main ()
16920{
16921void* p = ctermid_r
16922 ;
16923 return 0;
16924}
16925_ACEOF
16926rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016927if { (ac_try="$ac_compile"
16928case "(($ac_try" in
16929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16930 *) ac_try_echo=$ac_try;;
16931esac
16932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16933 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016934 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016935 grep -v '^ *+' conftest.er1 >conftest.err
16936 rm -f conftest.er1
16937 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16939 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016940 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
16941 { (case "(($ac_try" in
16942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16943 *) ac_try_echo=$ac_try;;
16944esac
16945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16946 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016947 ac_status=$?
16948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16949 (exit $ac_status); }; } &&
16950 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016951 { (case "(($ac_try" in
16952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16953 *) ac_try_echo=$ac_try;;
16954esac
16955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16956 (eval "$ac_try") 2>&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016957 ac_status=$?
16958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16959 (exit $ac_status); }; }; then
16960
16961cat >>confdefs.h <<\_ACEOF
16962#define HAVE_CTERMID_R 1
16963_ACEOF
16964
Thomas Wouters477c8d52006-05-27 19:21:47 +000016965 { echo "$as_me:$LINENO: result: yes" >&5
16966echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016967else
16968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016969sed 's/^/| /' conftest.$ac_ext >&5
16970
Thomas Wouters477c8d52006-05-27 19:21:47 +000016971 { echo "$as_me:$LINENO: result: no" >&5
16972echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016973
16974fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016975
Skip Montanarof0d5f792004-08-15 14:08:23 +000016976rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016977
Thomas Wouters477c8d52006-05-27 19:21:47 +000016978{ echo "$as_me:$LINENO: checking for flock" >&5
16979echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016980cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016981/* confdefs.h. */
16982_ACEOF
16983cat confdefs.h >>conftest.$ac_ext
16984cat >>conftest.$ac_ext <<_ACEOF
16985/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016986
16987#include "confdefs.h"
16988#include <sys/file.h>
16989
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016990int
16991main ()
16992{
16993void* p = flock
16994 ;
16995 return 0;
16996}
16997_ACEOF
16998rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016999if { (ac_try="$ac_compile"
17000case "(($ac_try" in
17001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17002 *) ac_try_echo=$ac_try;;
17003esac
17004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17005 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017007 grep -v '^ *+' conftest.er1 >conftest.err
17008 rm -f conftest.er1
17009 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17011 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017012 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17013 { (case "(($ac_try" in
17014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17015 *) ac_try_echo=$ac_try;;
17016esac
17017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17018 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017019 ac_status=$?
17020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17021 (exit $ac_status); }; } &&
17022 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017023 { (case "(($ac_try" in
17024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17025 *) ac_try_echo=$ac_try;;
17026esac
17027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17028 (eval "$ac_try") 2>&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017029 ac_status=$?
17030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17031 (exit $ac_status); }; }; then
17032
17033cat >>confdefs.h <<\_ACEOF
17034#define HAVE_FLOCK 1
17035_ACEOF
17036
Thomas Wouters477c8d52006-05-27 19:21:47 +000017037 { echo "$as_me:$LINENO: result: yes" >&5
17038echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017039else
17040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017041sed 's/^/| /' conftest.$ac_ext >&5
17042
Thomas Wouters477c8d52006-05-27 19:21:47 +000017043 { echo "$as_me:$LINENO: result: no" >&5
17044echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017045
17046fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017047
Skip Montanarof0d5f792004-08-15 14:08:23 +000017048rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017049
Thomas Wouters477c8d52006-05-27 19:21:47 +000017050{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17051echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017052cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017053/* confdefs.h. */
17054_ACEOF
17055cat confdefs.h >>conftest.$ac_ext
17056cat >>conftest.$ac_ext <<_ACEOF
17057/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017058
17059#include "confdefs.h"
17060#include <unistd.h>
17061
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017062int
17063main ()
17064{
17065void* p = getpagesize
17066 ;
17067 return 0;
17068}
17069_ACEOF
17070rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017071if { (ac_try="$ac_compile"
17072case "(($ac_try" in
17073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17074 *) ac_try_echo=$ac_try;;
17075esac
17076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17077 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017079 grep -v '^ *+' conftest.er1 >conftest.err
17080 rm -f conftest.er1
17081 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17083 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017084 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17085 { (case "(($ac_try" in
17086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17087 *) ac_try_echo=$ac_try;;
17088esac
17089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17090 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017091 ac_status=$?
17092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17093 (exit $ac_status); }; } &&
17094 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017095 { (case "(($ac_try" in
17096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17097 *) ac_try_echo=$ac_try;;
17098esac
17099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17100 (eval "$ac_try") 2>&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017101 ac_status=$?
17102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17103 (exit $ac_status); }; }; then
17104
17105cat >>confdefs.h <<\_ACEOF
17106#define HAVE_GETPAGESIZE 1
17107_ACEOF
17108
Thomas Wouters477c8d52006-05-27 19:21:47 +000017109 { echo "$as_me:$LINENO: result: yes" >&5
17110echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017111else
17112 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017113sed 's/^/| /' conftest.$ac_ext >&5
17114
Thomas Wouters477c8d52006-05-27 19:21:47 +000017115 { echo "$as_me:$LINENO: result: no" >&5
17116echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017117
17118fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017119
Skip Montanarof0d5f792004-08-15 14:08:23 +000017120rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017121
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017122for ac_prog in true
17123do
17124 # Extract the first word of "$ac_prog", so it can be a program name with args.
17125set dummy $ac_prog; ac_word=$2
Thomas Wouters477c8d52006-05-27 19:21:47 +000017126{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17127echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017128if test "${ac_cv_prog_TRUE+set}" = set; then
17129 echo $ECHO_N "(cached) $ECHO_C" >&6
17130else
17131 if test -n "$TRUE"; then
17132 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17133else
17134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17135for as_dir in $PATH
17136do
17137 IFS=$as_save_IFS
17138 test -z "$as_dir" && as_dir=.
17139 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters477c8d52006-05-27 19:21:47 +000017140 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017141 ac_cv_prog_TRUE="$ac_prog"
17142 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17143 break 2
17144 fi
17145done
17146done
Thomas Wouters477c8d52006-05-27 19:21:47 +000017147IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017148
17149fi
17150fi
17151TRUE=$ac_cv_prog_TRUE
17152if test -n "$TRUE"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000017153 { echo "$as_me:$LINENO: result: $TRUE" >&5
17154echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017155else
Thomas Wouters477c8d52006-05-27 19:21:47 +000017156 { echo "$as_me:$LINENO: result: no" >&5
17157echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017158fi
17159
Thomas Wouters477c8d52006-05-27 19:21:47 +000017160
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017161 test -n "$TRUE" && break
17162done
17163test -n "$TRUE" || TRUE="/bin/true"
17164
17165
Thomas Wouters477c8d52006-05-27 19:21:47 +000017166{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17167echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017168if test "${ac_cv_lib_c_inet_aton+set}" = set; then
17169 echo $ECHO_N "(cached) $ECHO_C" >&6
17170else
17171 ac_check_lib_save_LIBS=$LIBS
17172LIBS="-lc $LIBS"
17173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017174/* confdefs.h. */
17175_ACEOF
17176cat confdefs.h >>conftest.$ac_ext
17177cat >>conftest.$ac_ext <<_ACEOF
17178/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017179
Thomas Wouters477c8d52006-05-27 19:21:47 +000017180/* Override any GCC internal prototype to avoid an error.
17181 Use char because int might match the return type of a GCC
17182 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017183#ifdef __cplusplus
17184extern "C"
17185#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017186char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017187int
17188main ()
17189{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017190return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017191 ;
17192 return 0;
17193}
17194_ACEOF
17195rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017196if { (ac_try="$ac_link"
17197case "(($ac_try" in
17198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17199 *) ac_try_echo=$ac_try;;
17200esac
17201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17202 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017203 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017204 grep -v '^ *+' conftest.er1 >conftest.err
17205 rm -f conftest.er1
17206 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17208 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017209 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17210 { (case "(($ac_try" in
17211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17212 *) ac_try_echo=$ac_try;;
17213esac
17214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17215 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017216 ac_status=$?
17217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17218 (exit $ac_status); }; } &&
17219 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017220 { (case "(($ac_try" in
17221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17222 *) ac_try_echo=$ac_try;;
17223esac
17224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17225 (eval "$ac_try") 2>&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017226 ac_status=$?
17227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17228 (exit $ac_status); }; }; then
17229 ac_cv_lib_c_inet_aton=yes
17230else
17231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017232sed 's/^/| /' conftest.$ac_ext >&5
17233
Thomas Wouters477c8d52006-05-27 19:21:47 +000017234 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017235fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017236
Skip Montanarof0d5f792004-08-15 14:08:23 +000017237rm -f conftest.err conftest.$ac_objext \
17238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017239LIBS=$ac_check_lib_save_LIBS
17240fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017241{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17242echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017243if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017244 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017245else
17246
Thomas Wouters477c8d52006-05-27 19:21:47 +000017247{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17248echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017249if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
17250 echo $ECHO_N "(cached) $ECHO_C" >&6
17251else
17252 ac_check_lib_save_LIBS=$LIBS
17253LIBS="-lresolv $LIBS"
17254cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017255/* confdefs.h. */
17256_ACEOF
17257cat confdefs.h >>conftest.$ac_ext
17258cat >>conftest.$ac_ext <<_ACEOF
17259/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017260
Thomas Wouters477c8d52006-05-27 19:21:47 +000017261/* Override any GCC internal prototype to avoid an error.
17262 Use char because int might match the return type of a GCC
17263 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017264#ifdef __cplusplus
17265extern "C"
17266#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017267char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017268int
17269main ()
17270{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017271return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017272 ;
17273 return 0;
17274}
17275_ACEOF
17276rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017277if { (ac_try="$ac_link"
17278case "(($ac_try" in
17279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17280 *) ac_try_echo=$ac_try;;
17281esac
17282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17283 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017285 grep -v '^ *+' conftest.er1 >conftest.err
17286 rm -f conftest.er1
17287 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17289 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017290 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17291 { (case "(($ac_try" in
17292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17293 *) ac_try_echo=$ac_try;;
17294esac
17295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17296 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017297 ac_status=$?
17298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17299 (exit $ac_status); }; } &&
17300 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017301 { (case "(($ac_try" in
17302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17303 *) ac_try_echo=$ac_try;;
17304esac
17305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17306 (eval "$ac_try") 2>&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017307 ac_status=$?
17308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17309 (exit $ac_status); }; }; then
17310 ac_cv_lib_resolv_inet_aton=yes
17311else
17312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017313sed 's/^/| /' conftest.$ac_ext >&5
17314
Thomas Wouters477c8d52006-05-27 19:21:47 +000017315 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017316fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017317
Skip Montanarof0d5f792004-08-15 14:08:23 +000017318rm -f conftest.err conftest.$ac_objext \
17319 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017320LIBS=$ac_check_lib_save_LIBS
17321fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017322{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17323echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017324if test $ac_cv_lib_resolv_inet_aton = yes; then
17325 cat >>confdefs.h <<_ACEOF
17326#define HAVE_LIBRESOLV 1
17327_ACEOF
17328
17329 LIBS="-lresolv $LIBS"
17330
17331fi
17332
17333
17334fi
17335
17336
Thomas Wouters477c8d52006-05-27 19:21:47 +000017337{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17338echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017339cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017340/* confdefs.h. */
17341_ACEOF
17342cat confdefs.h >>conftest.$ac_ext
17343cat >>conftest.$ac_ext <<_ACEOF
17344/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017345
17346#include "confdefs.h"
17347#include <netdb.h>
17348
Martin v. Löwise9416172003-05-03 10:12:45 +000017349int
17350main ()
17351{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017352void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017353 ;
17354 return 0;
17355}
17356_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017357rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017358if { (ac_try="$ac_link"
17359case "(($ac_try" in
17360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17361 *) ac_try_echo=$ac_try;;
17362esac
17363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17364 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017366 grep -v '^ *+' conftest.er1 >conftest.err
17367 rm -f conftest.er1
17368 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17370 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017371 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17372 { (case "(($ac_try" in
17373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17374 *) ac_try_echo=$ac_try;;
17375esac
17376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17377 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017378 ac_status=$?
17379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17380 (exit $ac_status); }; } &&
17381 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017382 { (case "(($ac_try" in
17383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17384 *) ac_try_echo=$ac_try;;
17385esac
17386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17387 (eval "$ac_try") 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017388 ac_status=$?
17389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17390 (exit $ac_status); }; }; then
17391
17392cat >>confdefs.h <<\_ACEOF
17393#define HAVE_HSTRERROR 1
17394_ACEOF
17395
Thomas Wouters477c8d52006-05-27 19:21:47 +000017396 { echo "$as_me:$LINENO: result: yes" >&5
17397echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017398else
17399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017400sed 's/^/| /' conftest.$ac_ext >&5
17401
Thomas Wouters477c8d52006-05-27 19:21:47 +000017402 { echo "$as_me:$LINENO: result: no" >&5
17403echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017404
17405fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017406
Skip Montanarof0d5f792004-08-15 14:08:23 +000017407rm -f conftest.err conftest.$ac_objext \
17408 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017409
Thomas Wouters477c8d52006-05-27 19:21:47 +000017410{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17411echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017412cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017413/* confdefs.h. */
17414_ACEOF
17415cat confdefs.h >>conftest.$ac_ext
17416cat >>conftest.$ac_ext <<_ACEOF
17417/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017418
17419#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017420#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017421#include <sys/socket.h>
17422#include <netinet/in.h>
17423#include <arpa/inet.h>
17424
Martin v. Löwise9416172003-05-03 10:12:45 +000017425int
17426main ()
17427{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017428void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017429 ;
17430 return 0;
17431}
17432_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017433rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017434if { (ac_try="$ac_link"
17435case "(($ac_try" in
17436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17437 *) ac_try_echo=$ac_try;;
17438esac
17439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17440 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017442 grep -v '^ *+' conftest.er1 >conftest.err
17443 rm -f conftest.er1
17444 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17446 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017447 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17448 { (case "(($ac_try" in
17449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17450 *) ac_try_echo=$ac_try;;
17451esac
17452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17453 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017454 ac_status=$?
17455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17456 (exit $ac_status); }; } &&
17457 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017458 { (case "(($ac_try" in
17459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17460 *) ac_try_echo=$ac_try;;
17461esac
17462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17463 (eval "$ac_try") 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017464 ac_status=$?
17465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17466 (exit $ac_status); }; }; then
17467
17468cat >>confdefs.h <<\_ACEOF
17469#define HAVE_INET_ATON 1
17470_ACEOF
17471
Thomas Wouters477c8d52006-05-27 19:21:47 +000017472 { echo "$as_me:$LINENO: result: yes" >&5
17473echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017474else
17475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017476sed 's/^/| /' conftest.$ac_ext >&5
17477
Thomas Wouters477c8d52006-05-27 19:21:47 +000017478 { echo "$as_me:$LINENO: result: no" >&5
17479echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017480
17481fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017482
Skip Montanarof0d5f792004-08-15 14:08:23 +000017483rm -f conftest.err conftest.$ac_objext \
17484 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017485
Thomas Wouters477c8d52006-05-27 19:21:47 +000017486{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17487echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017488cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017489/* confdefs.h. */
17490_ACEOF
17491cat confdefs.h >>conftest.$ac_ext
17492cat >>conftest.$ac_ext <<_ACEOF
17493/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017494
17495#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017496#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017497#include <sys/socket.h>
17498#include <netinet/in.h>
17499#include <arpa/inet.h>
17500
Martin v. Löwise9416172003-05-03 10:12:45 +000017501int
17502main ()
17503{
17504void* p = inet_pton
17505 ;
17506 return 0;
17507}
17508_ACEOF
17509rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017510if { (ac_try="$ac_compile"
17511case "(($ac_try" in
17512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17513 *) ac_try_echo=$ac_try;;
17514esac
17515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17516 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017518 grep -v '^ *+' conftest.er1 >conftest.err
17519 rm -f conftest.er1
17520 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17522 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017523 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17524 { (case "(($ac_try" in
17525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17526 *) ac_try_echo=$ac_try;;
17527esac
17528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17529 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017530 ac_status=$?
17531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17532 (exit $ac_status); }; } &&
17533 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017534 { (case "(($ac_try" in
17535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17536 *) ac_try_echo=$ac_try;;
17537esac
17538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17539 (eval "$ac_try") 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017540 ac_status=$?
17541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17542 (exit $ac_status); }; }; then
17543
17544cat >>confdefs.h <<\_ACEOF
17545#define HAVE_INET_PTON 1
17546_ACEOF
17547
Thomas Wouters477c8d52006-05-27 19:21:47 +000017548 { echo "$as_me:$LINENO: result: yes" >&5
17549echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017550else
17551 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017552sed 's/^/| /' conftest.$ac_ext >&5
17553
Thomas Wouters477c8d52006-05-27 19:21:47 +000017554 { echo "$as_me:$LINENO: result: no" >&5
17555echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017556
17557fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017558
Skip Montanarof0d5f792004-08-15 14:08:23 +000017559rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017560
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017561# On some systems, setgroups is in unistd.h, on others, in grp.h
Thomas Wouters477c8d52006-05-27 19:21:47 +000017562{ echo "$as_me:$LINENO: checking for setgroups" >&5
17563echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017564cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017565/* confdefs.h. */
17566_ACEOF
17567cat confdefs.h >>conftest.$ac_ext
17568cat >>conftest.$ac_ext <<_ACEOF
17569/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017570
17571#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017572#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017573#ifdef HAVE_GRP_H
17574#include <grp.h>
17575#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017576
Martin v. Löwisd5843682002-11-21 20:41:28 +000017577int
17578main ()
17579{
17580void* p = setgroups
17581 ;
17582 return 0;
17583}
17584_ACEOF
17585rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017586if { (ac_try="$ac_compile"
17587case "(($ac_try" in
17588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17589 *) ac_try_echo=$ac_try;;
17590esac
17591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17592 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017594 grep -v '^ *+' conftest.er1 >conftest.err
17595 rm -f conftest.er1
17596 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17598 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017599 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17600 { (case "(($ac_try" in
17601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17602 *) ac_try_echo=$ac_try;;
17603esac
17604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17605 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017606 ac_status=$?
17607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17608 (exit $ac_status); }; } &&
17609 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017610 { (case "(($ac_try" in
17611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17612 *) ac_try_echo=$ac_try;;
17613esac
17614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17615 (eval "$ac_try") 2>&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017616 ac_status=$?
17617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17618 (exit $ac_status); }; }; then
17619
17620cat >>confdefs.h <<\_ACEOF
17621#define HAVE_SETGROUPS 1
17622_ACEOF
17623
Thomas Wouters477c8d52006-05-27 19:21:47 +000017624 { echo "$as_me:$LINENO: result: yes" >&5
17625echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017626else
17627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017628sed 's/^/| /' conftest.$ac_ext >&5
17629
Thomas Wouters477c8d52006-05-27 19:21:47 +000017630 { echo "$as_me:$LINENO: result: no" >&5
17631echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017632
17633fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017634
Skip Montanarof0d5f792004-08-15 14:08:23 +000017635rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017636
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017637# check for openpty and forkpty
17638
Martin v. Löwis11437992002-04-12 09:54:03 +000017639
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017640for ac_func in openpty
17641do
Martin v. Löwis11437992002-04-12 09:54:03 +000017642as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000017643{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17644echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17645if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017646 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017647else
Martin v. Löwis11437992002-04-12 09:54:03 +000017648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017649/* confdefs.h. */
17650_ACEOF
17651cat confdefs.h >>conftest.$ac_ext
17652cat >>conftest.$ac_ext <<_ACEOF
17653/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017654/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17655 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17656#define $ac_func innocuous_$ac_func
17657
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017658/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017659 which can conflict with char $ac_func (); below.
17660 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017661 <limits.h> exists even on freestanding compilers. */
17662
17663#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017664# include <limits.h>
17665#else
17666# include <assert.h>
17667#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017668
17669#undef $ac_func
17670
Thomas Wouters477c8d52006-05-27 19:21:47 +000017671/* Override any GCC internal prototype to avoid an error.
17672 Use char because int might match the return type of a GCC
17673 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017674#ifdef __cplusplus
17675extern "C"
17676#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017677char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017678/* The GNU C library defines this for functions which it implements
17679 to always fail with ENOSYS. Some functions are actually named
17680 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000017681#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017682choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017683#endif
17684
Skip Montanaro6dead952003-09-25 14:50:04 +000017685int
17686main ()
17687{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017688return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017689 ;
17690 return 0;
17691}
17692_ACEOF
17693rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017694if { (ac_try="$ac_link"
17695case "(($ac_try" in
17696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17697 *) ac_try_echo=$ac_try;;
17698esac
17699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17700 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017702 grep -v '^ *+' conftest.er1 >conftest.err
17703 rm -f conftest.er1
17704 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17706 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017707 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17708 { (case "(($ac_try" in
17709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17710 *) ac_try_echo=$ac_try;;
17711esac
17712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17713 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017714 ac_status=$?
17715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17716 (exit $ac_status); }; } &&
17717 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017718 { (case "(($ac_try" in
17719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17720 *) ac_try_echo=$ac_try;;
17721esac
17722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17723 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017724 ac_status=$?
17725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17726 (exit $ac_status); }; }; then
17727 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017728else
Martin v. Löwis11437992002-04-12 09:54:03 +000017729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017730sed 's/^/| /' conftest.$ac_ext >&5
17731
Thomas Wouters477c8d52006-05-27 19:21:47 +000017732 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017733fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017734
Skip Montanarof0d5f792004-08-15 14:08:23 +000017735rm -f conftest.err conftest.$ac_objext \
17736 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017737fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017738ac_res=`eval echo '${'$as_ac_var'}'`
17739 { echo "$as_me:$LINENO: result: $ac_res" >&5
17740echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017741if test `eval echo '${'$as_ac_var'}'` = yes; then
17742 cat >>confdefs.h <<_ACEOF
17743#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17744_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017745
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017746else
Thomas Wouters477c8d52006-05-27 19:21:47 +000017747 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17748echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017749if test "${ac_cv_lib_util_openpty+set}" = set; then
17750 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017751else
Martin v. Löwis11437992002-04-12 09:54:03 +000017752 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017753LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017754cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017755/* confdefs.h. */
17756_ACEOF
17757cat confdefs.h >>conftest.$ac_ext
17758cat >>conftest.$ac_ext <<_ACEOF
17759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017760
Thomas Wouters477c8d52006-05-27 19:21:47 +000017761/* Override any GCC internal prototype to avoid an error.
17762 Use char because int might match the return type of a GCC
17763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017764#ifdef __cplusplus
17765extern "C"
17766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017767char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017768int
17769main ()
17770{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017771return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017772 ;
17773 return 0;
17774}
17775_ACEOF
17776rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017777if { (ac_try="$ac_link"
17778case "(($ac_try" in
17779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17780 *) ac_try_echo=$ac_try;;
17781esac
17782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17783 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017785 grep -v '^ *+' conftest.er1 >conftest.err
17786 rm -f conftest.er1
17787 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17789 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017790 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17791 { (case "(($ac_try" in
17792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17793 *) ac_try_echo=$ac_try;;
17794esac
17795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17796 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017797 ac_status=$?
17798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17799 (exit $ac_status); }; } &&
17800 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017801 { (case "(($ac_try" in
17802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17803 *) ac_try_echo=$ac_try;;
17804esac
17805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17806 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017807 ac_status=$?
17808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17809 (exit $ac_status); }; }; then
17810 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017811else
Martin v. Löwis11437992002-04-12 09:54:03 +000017812 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017813sed 's/^/| /' conftest.$ac_ext >&5
17814
Thomas Wouters477c8d52006-05-27 19:21:47 +000017815 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017816fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017817
Skip Montanarof0d5f792004-08-15 14:08:23 +000017818rm -f conftest.err conftest.$ac_objext \
17819 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017820LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017821fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017822{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17823echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017824if test $ac_cv_lib_util_openpty = yes; then
17825 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017826#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017827_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017828 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017829else
Thomas Wouters477c8d52006-05-27 19:21:47 +000017830 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17831echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017832if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17833 echo $ECHO_N "(cached) $ECHO_C" >&6
17834else
17835 ac_check_lib_save_LIBS=$LIBS
17836LIBS="-lbsd $LIBS"
17837cat >conftest.$ac_ext <<_ACEOF
17838/* confdefs.h. */
17839_ACEOF
17840cat confdefs.h >>conftest.$ac_ext
17841cat >>conftest.$ac_ext <<_ACEOF
17842/* end confdefs.h. */
17843
Thomas Wouters477c8d52006-05-27 19:21:47 +000017844/* Override any GCC internal prototype to avoid an error.
17845 Use char because int might match the return type of a GCC
17846 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017847#ifdef __cplusplus
17848extern "C"
17849#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017850char openpty ();
17851int
17852main ()
17853{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017854return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017855 ;
17856 return 0;
17857}
17858_ACEOF
17859rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017860if { (ac_try="$ac_link"
17861case "(($ac_try" in
17862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17863 *) ac_try_echo=$ac_try;;
17864esac
17865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17866 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017867 ac_status=$?
17868 grep -v '^ *+' conftest.er1 >conftest.err
17869 rm -f conftest.er1
17870 cat conftest.err >&5
17871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17872 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017873 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17874 { (case "(($ac_try" in
17875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17876 *) ac_try_echo=$ac_try;;
17877esac
17878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17879 (eval "$ac_try") 2>&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017880 ac_status=$?
17881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17882 (exit $ac_status); }; } &&
17883 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017884 { (case "(($ac_try" in
17885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17886 *) ac_try_echo=$ac_try;;
17887esac
17888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17889 (eval "$ac_try") 2>&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017890 ac_status=$?
17891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17892 (exit $ac_status); }; }; then
17893 ac_cv_lib_bsd_openpty=yes
17894else
17895 echo "$as_me: failed program was:" >&5
17896sed 's/^/| /' conftest.$ac_ext >&5
17897
Thomas Wouters477c8d52006-05-27 19:21:47 +000017898 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017899fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017900
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017901rm -f conftest.err conftest.$ac_objext \
17902 conftest$ac_exeext conftest.$ac_ext
17903LIBS=$ac_check_lib_save_LIBS
17904fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017905{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17906echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017907if test $ac_cv_lib_bsd_openpty = yes; then
17908 cat >>confdefs.h <<\_ACEOF
17909#define HAVE_OPENPTY 1
17910_ACEOF
17911 LIBS="$LIBS -lbsd"
17912fi
17913
17914
17915fi
17916
Fred Drake8cef4cf2000-06-28 16:40:38 +000017917
17918fi
17919done
17920
Martin v. Löwis11437992002-04-12 09:54:03 +000017921
Fred Drake8cef4cf2000-06-28 16:40:38 +000017922for ac_func in forkpty
17923do
Martin v. Löwis11437992002-04-12 09:54:03 +000017924as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000017925{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17926echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17927if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017928 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017929else
Martin v. Löwis11437992002-04-12 09:54:03 +000017930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017931/* confdefs.h. */
17932_ACEOF
17933cat confdefs.h >>conftest.$ac_ext
17934cat >>conftest.$ac_ext <<_ACEOF
17935/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017936/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17937 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17938#define $ac_func innocuous_$ac_func
17939
Fred Drake8cef4cf2000-06-28 16:40:38 +000017940/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017941 which can conflict with char $ac_func (); below.
17942 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017943 <limits.h> exists even on freestanding compilers. */
17944
17945#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017946# include <limits.h>
17947#else
17948# include <assert.h>
17949#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017950
17951#undef $ac_func
17952
Thomas Wouters477c8d52006-05-27 19:21:47 +000017953/* Override any GCC internal prototype to avoid an error.
17954 Use char because int might match the return type of a GCC
17955 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017956#ifdef __cplusplus
17957extern "C"
17958#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017959char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017960/* The GNU C library defines this for functions which it implements
17961 to always fail with ENOSYS. Some functions are actually named
17962 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000017963#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017964choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017965#endif
17966
Skip Montanaro6dead952003-09-25 14:50:04 +000017967int
17968main ()
17969{
Thomas Wouters477c8d52006-05-27 19:21:47 +000017970return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017971 ;
17972 return 0;
17973}
17974_ACEOF
17975rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017976if { (ac_try="$ac_link"
17977case "(($ac_try" in
17978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17979 *) ac_try_echo=$ac_try;;
17980esac
17981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17982 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017984 grep -v '^ *+' conftest.er1 >conftest.err
17985 rm -f conftest.er1
17986 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17988 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017989 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
17990 { (case "(($ac_try" in
17991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17992 *) ac_try_echo=$ac_try;;
17993esac
17994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17995 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017996 ac_status=$?
17997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17998 (exit $ac_status); }; } &&
17999 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018000 { (case "(($ac_try" in
18001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18002 *) ac_try_echo=$ac_try;;
18003esac
18004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18005 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018006 ac_status=$?
18007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18008 (exit $ac_status); }; }; then
18009 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018010else
Martin v. Löwis11437992002-04-12 09:54:03 +000018011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018012sed 's/^/| /' conftest.$ac_ext >&5
18013
Thomas Wouters477c8d52006-05-27 19:21:47 +000018014 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018015fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018016
Skip Montanarof0d5f792004-08-15 14:08:23 +000018017rm -f conftest.err conftest.$ac_objext \
18018 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018019fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018020ac_res=`eval echo '${'$as_ac_var'}'`
18021 { echo "$as_me:$LINENO: result: $ac_res" >&5
18022echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018023if test `eval echo '${'$as_ac_var'}'` = yes; then
18024 cat >>confdefs.h <<_ACEOF
18025#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18026_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018027
Fred Drake8cef4cf2000-06-28 16:40:38 +000018028else
Thomas Wouters477c8d52006-05-27 19:21:47 +000018029 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18030echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018031if test "${ac_cv_lib_util_forkpty+set}" = set; then
18032 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018033else
Martin v. Löwis11437992002-04-12 09:54:03 +000018034 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018035LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018036cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018037/* confdefs.h. */
18038_ACEOF
18039cat confdefs.h >>conftest.$ac_ext
18040cat >>conftest.$ac_ext <<_ACEOF
18041/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018042
Thomas Wouters477c8d52006-05-27 19:21:47 +000018043/* Override any GCC internal prototype to avoid an error.
18044 Use char because int might match the return type of a GCC
18045 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018046#ifdef __cplusplus
18047extern "C"
18048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018049char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018050int
18051main ()
18052{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018053return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018054 ;
18055 return 0;
18056}
18057_ACEOF
18058rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018059if { (ac_try="$ac_link"
18060case "(($ac_try" in
18061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18062 *) ac_try_echo=$ac_try;;
18063esac
18064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18065 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018067 grep -v '^ *+' conftest.er1 >conftest.err
18068 rm -f conftest.er1
18069 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18071 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018072 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18073 { (case "(($ac_try" in
18074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18075 *) ac_try_echo=$ac_try;;
18076esac
18077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18078 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018079 ac_status=$?
18080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18081 (exit $ac_status); }; } &&
18082 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018083 { (case "(($ac_try" in
18084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18085 *) ac_try_echo=$ac_try;;
18086esac
18087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18088 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018089 ac_status=$?
18090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18091 (exit $ac_status); }; }; then
18092 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018093else
Martin v. Löwis11437992002-04-12 09:54:03 +000018094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018095sed 's/^/| /' conftest.$ac_ext >&5
18096
Thomas Wouters477c8d52006-05-27 19:21:47 +000018097 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018098fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018099
Skip Montanarof0d5f792004-08-15 14:08:23 +000018100rm -f conftest.err conftest.$ac_objext \
18101 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018102LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018103fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018104{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18105echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018106if test $ac_cv_lib_util_forkpty = yes; then
18107 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018108#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018109_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018110 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018111else
Thomas Wouters477c8d52006-05-27 19:21:47 +000018112 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18113echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018114if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
18115 echo $ECHO_N "(cached) $ECHO_C" >&6
18116else
18117 ac_check_lib_save_LIBS=$LIBS
18118LIBS="-lbsd $LIBS"
18119cat >conftest.$ac_ext <<_ACEOF
18120/* confdefs.h. */
18121_ACEOF
18122cat confdefs.h >>conftest.$ac_ext
18123cat >>conftest.$ac_ext <<_ACEOF
18124/* end confdefs.h. */
18125
Thomas Wouters477c8d52006-05-27 19:21:47 +000018126/* Override any GCC internal prototype to avoid an error.
18127 Use char because int might match the return type of a GCC
18128 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018129#ifdef __cplusplus
18130extern "C"
18131#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018132char forkpty ();
18133int
18134main ()
18135{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018136return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018137 ;
18138 return 0;
18139}
18140_ACEOF
18141rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018142if { (ac_try="$ac_link"
18143case "(($ac_try" in
18144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18145 *) ac_try_echo=$ac_try;;
18146esac
18147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18148 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018149 ac_status=$?
18150 grep -v '^ *+' conftest.er1 >conftest.err
18151 rm -f conftest.er1
18152 cat conftest.err >&5
18153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18154 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018155 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18156 { (case "(($ac_try" in
18157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18158 *) ac_try_echo=$ac_try;;
18159esac
18160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18161 (eval "$ac_try") 2>&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018162 ac_status=$?
18163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18164 (exit $ac_status); }; } &&
18165 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018166 { (case "(($ac_try" in
18167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18168 *) ac_try_echo=$ac_try;;
18169esac
18170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18171 (eval "$ac_try") 2>&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018172 ac_status=$?
18173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18174 (exit $ac_status); }; }; then
18175 ac_cv_lib_bsd_forkpty=yes
18176else
18177 echo "$as_me: failed program was:" >&5
18178sed 's/^/| /' conftest.$ac_ext >&5
18179
Thomas Wouters477c8d52006-05-27 19:21:47 +000018180 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018181fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018182
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018183rm -f conftest.err conftest.$ac_objext \
18184 conftest$ac_exeext conftest.$ac_ext
18185LIBS=$ac_check_lib_save_LIBS
18186fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018187{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18188echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018189if test $ac_cv_lib_bsd_forkpty = yes; then
18190 cat >>confdefs.h <<\_ACEOF
18191#define HAVE_FORKPTY 1
18192_ACEOF
18193 LIBS="$LIBS -lbsd"
18194fi
18195
18196
18197fi
18198
Fred Drake8cef4cf2000-06-28 16:40:38 +000018199
18200fi
18201done
18202
Jack Jansendd19cf82001-12-06 22:36:17 +000018203
Michael W. Hudson54241132001-12-07 15:38:26 +000018204# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018205
18206
18207
18208
18209
18210
Fred Drake8cef4cf2000-06-28 16:40:38 +000018211for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18212do
Martin v. Löwis11437992002-04-12 09:54:03 +000018213as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000018214{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18215echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18216if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018217 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018218else
Martin v. Löwis11437992002-04-12 09:54:03 +000018219 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018220/* confdefs.h. */
18221_ACEOF
18222cat confdefs.h >>conftest.$ac_ext
18223cat >>conftest.$ac_ext <<_ACEOF
18224/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018225/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18226 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18227#define $ac_func innocuous_$ac_func
18228
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018229/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018230 which can conflict with char $ac_func (); below.
18231 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018232 <limits.h> exists even on freestanding compilers. */
18233
18234#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018235# include <limits.h>
18236#else
18237# include <assert.h>
18238#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018239
18240#undef $ac_func
18241
Thomas Wouters477c8d52006-05-27 19:21:47 +000018242/* Override any GCC internal prototype to avoid an error.
18243 Use char because int might match the return type of a GCC
18244 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018245#ifdef __cplusplus
18246extern "C"
18247#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018248char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018249/* The GNU C library defines this for functions which it implements
18250 to always fail with ENOSYS. Some functions are actually named
18251 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000018252#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018253choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018254#endif
18255
Skip Montanaro6dead952003-09-25 14:50:04 +000018256int
18257main ()
18258{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018259return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018260 ;
18261 return 0;
18262}
18263_ACEOF
18264rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018265if { (ac_try="$ac_link"
18266case "(($ac_try" in
18267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18268 *) ac_try_echo=$ac_try;;
18269esac
18270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18271 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018272 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018273 grep -v '^ *+' conftest.er1 >conftest.err
18274 rm -f conftest.er1
18275 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18277 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018278 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18279 { (case "(($ac_try" in
18280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18281 *) ac_try_echo=$ac_try;;
18282esac
18283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18284 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018285 ac_status=$?
18286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18287 (exit $ac_status); }; } &&
18288 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018289 { (case "(($ac_try" in
18290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18291 *) ac_try_echo=$ac_try;;
18292esac
18293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18294 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018295 ac_status=$?
18296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18297 (exit $ac_status); }; }; then
18298 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018299else
Martin v. Löwis11437992002-04-12 09:54:03 +000018300 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018301sed 's/^/| /' conftest.$ac_ext >&5
18302
Thomas Wouters477c8d52006-05-27 19:21:47 +000018303 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018304fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018305
Skip Montanarof0d5f792004-08-15 14:08:23 +000018306rm -f conftest.err conftest.$ac_objext \
18307 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018308fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018309ac_res=`eval echo '${'$as_ac_var'}'`
18310 { echo "$as_me:$LINENO: result: $ac_res" >&5
18311echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018312if test `eval echo '${'$as_ac_var'}'` = yes; then
18313 cat >>confdefs.h <<_ACEOF
18314#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18315_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018316
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018317fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018318done
18319
Michael W. Hudson54241132001-12-07 15:38:26 +000018320
Martin v. Löwis11437992002-04-12 09:54:03 +000018321
18322
18323
18324
18325
Martin v. Löwis1142de32002-03-29 16:28:31 +000018326for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000018327do
Martin v. Löwis11437992002-04-12 09:54:03 +000018328as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000018329{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18330echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18331if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018332 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018333else
Martin v. Löwis11437992002-04-12 09:54:03 +000018334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018335/* confdefs.h. */
18336_ACEOF
18337cat confdefs.h >>conftest.$ac_ext
18338cat >>conftest.$ac_ext <<_ACEOF
18339/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018340/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18341 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18342#define $ac_func innocuous_$ac_func
18343
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018344/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018345 which can conflict with char $ac_func (); below.
18346 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018347 <limits.h> exists even on freestanding compilers. */
18348
18349#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018350# include <limits.h>
18351#else
18352# include <assert.h>
18353#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018354
18355#undef $ac_func
18356
Thomas Wouters477c8d52006-05-27 19:21:47 +000018357/* Override any GCC internal prototype to avoid an error.
18358 Use char because int might match the return type of a GCC
18359 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018360#ifdef __cplusplus
18361extern "C"
18362#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018363char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018364/* The GNU C library defines this for functions which it implements
18365 to always fail with ENOSYS. Some functions are actually named
18366 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000018367#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018368choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018369#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018370
Skip Montanaro6dead952003-09-25 14:50:04 +000018371int
18372main ()
18373{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018374return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018375 ;
18376 return 0;
18377}
18378_ACEOF
18379rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018380if { (ac_try="$ac_link"
18381case "(($ac_try" in
18382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18383 *) ac_try_echo=$ac_try;;
18384esac
18385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18386 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018388 grep -v '^ *+' conftest.er1 >conftest.err
18389 rm -f conftest.er1
18390 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18392 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018393 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18394 { (case "(($ac_try" in
18395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18396 *) ac_try_echo=$ac_try;;
18397esac
18398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18399 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018400 ac_status=$?
18401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18402 (exit $ac_status); }; } &&
18403 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018404 { (case "(($ac_try" in
18405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18406 *) ac_try_echo=$ac_try;;
18407esac
18408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18409 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018410 ac_status=$?
18411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18412 (exit $ac_status); }; }; then
18413 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018414else
Martin v. Löwis11437992002-04-12 09:54:03 +000018415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018416sed 's/^/| /' conftest.$ac_ext >&5
18417
Thomas Wouters477c8d52006-05-27 19:21:47 +000018418 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018419fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018420
Skip Montanarof0d5f792004-08-15 14:08:23 +000018421rm -f conftest.err conftest.$ac_objext \
18422 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018423fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018424ac_res=`eval echo '${'$as_ac_var'}'`
18425 { echo "$as_me:$LINENO: result: $ac_res" >&5
18426echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018427if test `eval echo '${'$as_ac_var'}'` = yes; then
18428 cat >>confdefs.h <<_ACEOF
18429#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18430_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018431
Martin v. Löwis1142de32002-03-29 16:28:31 +000018432else
Thomas Wouters477c8d52006-05-27 19:21:47 +000018433 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018434 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000018435 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18436 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018437esac
18438
Martin v. Löwis1142de32002-03-29 16:28:31 +000018439fi
18440done
18441
18442
Martin v. Löwis11437992002-04-12 09:54:03 +000018443
Martin v. Löwis1142de32002-03-29 16:28:31 +000018444for ac_func in getpgrp
18445do
Martin v. Löwis11437992002-04-12 09:54:03 +000018446as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000018447{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18448echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18449if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018450 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018451else
Martin v. Löwis11437992002-04-12 09:54:03 +000018452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018453/* confdefs.h. */
18454_ACEOF
18455cat confdefs.h >>conftest.$ac_ext
18456cat >>conftest.$ac_ext <<_ACEOF
18457/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018458/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18459 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18460#define $ac_func innocuous_$ac_func
18461
Martin v. Löwis1142de32002-03-29 16:28:31 +000018462/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018463 which can conflict with char $ac_func (); below.
18464 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018465 <limits.h> exists even on freestanding compilers. */
18466
18467#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018468# include <limits.h>
18469#else
18470# include <assert.h>
18471#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018472
18473#undef $ac_func
18474
Thomas Wouters477c8d52006-05-27 19:21:47 +000018475/* Override any GCC internal prototype to avoid an error.
18476 Use char because int might match the return type of a GCC
18477 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018478#ifdef __cplusplus
18479extern "C"
18480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018481char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018482/* The GNU C library defines this for functions which it implements
18483 to always fail with ENOSYS. Some functions are actually named
18484 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000018485#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018486choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018487#endif
18488
Skip Montanaro6dead952003-09-25 14:50:04 +000018489int
18490main ()
18491{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018492return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018493 ;
18494 return 0;
18495}
18496_ACEOF
18497rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018498if { (ac_try="$ac_link"
18499case "(($ac_try" in
18500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18501 *) ac_try_echo=$ac_try;;
18502esac
18503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18504 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018506 grep -v '^ *+' conftest.er1 >conftest.err
18507 rm -f conftest.er1
18508 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18510 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018511 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18512 { (case "(($ac_try" in
18513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18514 *) ac_try_echo=$ac_try;;
18515esac
18516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18517 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018518 ac_status=$?
18519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18520 (exit $ac_status); }; } &&
18521 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018522 { (case "(($ac_try" in
18523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18524 *) ac_try_echo=$ac_try;;
18525esac
18526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18527 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018528 ac_status=$?
18529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18530 (exit $ac_status); }; }; then
18531 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018532else
Martin v. Löwis11437992002-04-12 09:54:03 +000018533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018534sed 's/^/| /' conftest.$ac_ext >&5
18535
Thomas Wouters477c8d52006-05-27 19:21:47 +000018536 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018537fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018538
Skip Montanarof0d5f792004-08-15 14:08:23 +000018539rm -f conftest.err conftest.$ac_objext \
18540 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018541fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018542ac_res=`eval echo '${'$as_ac_var'}'`
18543 { echo "$as_me:$LINENO: result: $ac_res" >&5
18544echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018545if test `eval echo '${'$as_ac_var'}'` = yes; then
18546 cat >>confdefs.h <<_ACEOF
18547#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18548_ACEOF
18549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018550/* confdefs.h. */
18551_ACEOF
18552cat confdefs.h >>conftest.$ac_ext
18553cat >>conftest.$ac_ext <<_ACEOF
18554/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018555#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018556int
18557main ()
18558{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018559getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018560 ;
18561 return 0;
18562}
18563_ACEOF
18564rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018565if { (ac_try="$ac_compile"
18566case "(($ac_try" in
18567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18568 *) ac_try_echo=$ac_try;;
18569esac
18570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18571 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018573 grep -v '^ *+' conftest.er1 >conftest.err
18574 rm -f conftest.er1
18575 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18577 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018578 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18579 { (case "(($ac_try" in
18580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18581 *) ac_try_echo=$ac_try;;
18582esac
18583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18584 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018585 ac_status=$?
18586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18587 (exit $ac_status); }; } &&
18588 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018589 { (case "(($ac_try" in
18590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18591 *) ac_try_echo=$ac_try;;
18592esac
18593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18594 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018595 ac_status=$?
18596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18597 (exit $ac_status); }; }; then
18598
18599cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018600#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018601_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018602
Martin v. Löwis11437992002-04-12 09:54:03 +000018603
Guido van Rossumf78abae1997-01-21 22:02:36 +000018604else
Martin v. Löwis11437992002-04-12 09:54:03 +000018605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018606sed 's/^/| /' conftest.$ac_ext >&5
18607
Thomas Wouters477c8d52006-05-27 19:21:47 +000018608
Guido van Rossum627b2d71993-12-24 10:39:16 +000018609fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018610
Skip Montanarof0d5f792004-08-15 14:08:23 +000018611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018612
Guido van Rossum627b2d71993-12-24 10:39:16 +000018613fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018614done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018615
Jack Jansen150753c2003-03-29 22:07:47 +000018616
18617for ac_func in setpgrp
18618do
18619as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000018620{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18621echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18622if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018623 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018624else
Martin v. Löwis11437992002-04-12 09:54:03 +000018625 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018626/* confdefs.h. */
18627_ACEOF
18628cat confdefs.h >>conftest.$ac_ext
18629cat >>conftest.$ac_ext <<_ACEOF
18630/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018631/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18632 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18633#define $ac_func innocuous_$ac_func
18634
Jack Jansen150753c2003-03-29 22:07:47 +000018635/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018636 which can conflict with char $ac_func (); below.
18637 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018638 <limits.h> exists even on freestanding compilers. */
18639
18640#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018641# include <limits.h>
18642#else
18643# include <assert.h>
18644#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018645
18646#undef $ac_func
18647
Thomas Wouters477c8d52006-05-27 19:21:47 +000018648/* Override any GCC internal prototype to avoid an error.
18649 Use char because int might match the return type of a GCC
18650 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018651#ifdef __cplusplus
18652extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018653#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018654char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018655/* The GNU C library defines this for functions which it implements
18656 to always fail with ENOSYS. Some functions are actually named
18657 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000018658#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018659choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018660#endif
18661
Skip Montanaro6dead952003-09-25 14:50:04 +000018662int
18663main ()
18664{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018665return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018666 ;
18667 return 0;
18668}
18669_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018670rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018671if { (ac_try="$ac_link"
18672case "(($ac_try" in
18673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18674 *) ac_try_echo=$ac_try;;
18675esac
18676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18677 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018678 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018679 grep -v '^ *+' conftest.er1 >conftest.err
18680 rm -f conftest.er1
18681 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018683 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018684 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18685 { (case "(($ac_try" in
18686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18687 *) ac_try_echo=$ac_try;;
18688esac
18689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18690 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018691 ac_status=$?
18692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18693 (exit $ac_status); }; } &&
18694 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018695 { (case "(($ac_try" in
18696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18697 *) ac_try_echo=$ac_try;;
18698esac
18699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18700 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018701 ac_status=$?
18702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18703 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000018704 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018705else
Jack Jansen150753c2003-03-29 22:07:47 +000018706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018707sed 's/^/| /' conftest.$ac_ext >&5
18708
Thomas Wouters477c8d52006-05-27 19:21:47 +000018709 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018710fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018711
Skip Montanarof0d5f792004-08-15 14:08:23 +000018712rm -f conftest.err conftest.$ac_objext \
18713 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018714fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018715ac_res=`eval echo '${'$as_ac_var'}'`
18716 { echo "$as_me:$LINENO: result: $ac_res" >&5
18717echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018718if test `eval echo '${'$as_ac_var'}'` = yes; then
18719 cat >>confdefs.h <<_ACEOF
18720#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18721_ACEOF
18722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018723/* confdefs.h. */
18724_ACEOF
18725cat confdefs.h >>conftest.$ac_ext
18726cat >>conftest.$ac_ext <<_ACEOF
18727/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018728#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018729int
18730main ()
18731{
18732setpgrp(0,0);
18733 ;
18734 return 0;
18735}
18736_ACEOF
18737rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018738if { (ac_try="$ac_compile"
18739case "(($ac_try" in
18740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18741 *) ac_try_echo=$ac_try;;
18742esac
18743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18744 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018746 grep -v '^ *+' conftest.er1 >conftest.err
18747 rm -f conftest.er1
18748 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18750 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018751 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18752 { (case "(($ac_try" in
18753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18754 *) ac_try_echo=$ac_try;;
18755esac
18756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18757 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018758 ac_status=$?
18759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18760 (exit $ac_status); }; } &&
18761 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018762 { (case "(($ac_try" in
18763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18764 *) ac_try_echo=$ac_try;;
18765esac
18766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18767 (eval "$ac_try") 2>&5
Jack Jansen150753c2003-03-29 22:07:47 +000018768 ac_status=$?
18769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18770 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018771
18772cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018773#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018774_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018775
Jack Jansen150753c2003-03-29 22:07:47 +000018776
18777else
18778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018779sed 's/^/| /' conftest.$ac_ext >&5
18780
Thomas Wouters477c8d52006-05-27 19:21:47 +000018781
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018782fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018783
Skip Montanarof0d5f792004-08-15 14:08:23 +000018784rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018785
18786fi
18787done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018788
Martin v. Löwis11437992002-04-12 09:54:03 +000018789
Thomas Wouters3a584202000-08-05 23:28:51 +000018790for ac_func in gettimeofday
18791do
Martin v. Löwis11437992002-04-12 09:54:03 +000018792as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000018793{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18794echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18795if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018796 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018797else
Martin v. Löwis11437992002-04-12 09:54:03 +000018798 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018799/* confdefs.h. */
18800_ACEOF
18801cat confdefs.h >>conftest.$ac_ext
18802cat >>conftest.$ac_ext <<_ACEOF
18803/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018804/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18805 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18806#define $ac_func innocuous_$ac_func
18807
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018808/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018809 which can conflict with char $ac_func (); below.
18810 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018811 <limits.h> exists even on freestanding compilers. */
18812
18813#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018814# include <limits.h>
18815#else
18816# include <assert.h>
18817#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018818
18819#undef $ac_func
18820
Thomas Wouters477c8d52006-05-27 19:21:47 +000018821/* Override any GCC internal prototype to avoid an error.
18822 Use char because int might match the return type of a GCC
18823 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018824#ifdef __cplusplus
18825extern "C"
18826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018827char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018828/* The GNU C library defines this for functions which it implements
18829 to always fail with ENOSYS. Some functions are actually named
18830 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000018831#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018832choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018833#endif
18834
Skip Montanaro6dead952003-09-25 14:50:04 +000018835int
18836main ()
18837{
Thomas Wouters477c8d52006-05-27 19:21:47 +000018838return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018839 ;
18840 return 0;
18841}
18842_ACEOF
18843rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018844if { (ac_try="$ac_link"
18845case "(($ac_try" in
18846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18847 *) ac_try_echo=$ac_try;;
18848esac
18849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18850 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018851 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018852 grep -v '^ *+' conftest.er1 >conftest.err
18853 rm -f conftest.er1
18854 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18856 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018857 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18858 { (case "(($ac_try" in
18859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18860 *) ac_try_echo=$ac_try;;
18861esac
18862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18863 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018864 ac_status=$?
18865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18866 (exit $ac_status); }; } &&
18867 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018868 { (case "(($ac_try" in
18869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18870 *) ac_try_echo=$ac_try;;
18871esac
18872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18873 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018874 ac_status=$?
18875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18876 (exit $ac_status); }; }; then
18877 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018878else
Martin v. Löwis11437992002-04-12 09:54:03 +000018879 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018880sed 's/^/| /' conftest.$ac_ext >&5
18881
Thomas Wouters477c8d52006-05-27 19:21:47 +000018882 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018883fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018884
Skip Montanarof0d5f792004-08-15 14:08:23 +000018885rm -f conftest.err conftest.$ac_objext \
18886 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018887fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018888ac_res=`eval echo '${'$as_ac_var'}'`
18889 { echo "$as_me:$LINENO: result: $ac_res" >&5
18890echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018891if test `eval echo '${'$as_ac_var'}'` = yes; then
18892 cat >>confdefs.h <<_ACEOF
18893#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18894_ACEOF
18895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018896/* confdefs.h. */
18897_ACEOF
18898cat confdefs.h >>conftest.$ac_ext
18899cat >>conftest.$ac_ext <<_ACEOF
18900/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018901#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018902int
18903main ()
18904{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018905gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018906 ;
18907 return 0;
18908}
18909_ACEOF
18910rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018911if { (ac_try="$ac_compile"
18912case "(($ac_try" in
18913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18914 *) ac_try_echo=$ac_try;;
18915esac
18916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18917 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018919 grep -v '^ *+' conftest.er1 >conftest.err
18920 rm -f conftest.er1
18921 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18923 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018924 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
18925 { (case "(($ac_try" in
18926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18927 *) ac_try_echo=$ac_try;;
18928esac
18929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18930 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018931 ac_status=$?
18932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18933 (exit $ac_status); }; } &&
18934 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018935 { (case "(($ac_try" in
18936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18937 *) ac_try_echo=$ac_try;;
18938esac
18939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18940 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018941 ac_status=$?
18942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18943 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018944 :
18945else
Martin v. Löwis11437992002-04-12 09:54:03 +000018946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018947sed 's/^/| /' conftest.$ac_ext >&5
18948
Martin v. Löwis11437992002-04-12 09:54:03 +000018949
18950cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018951#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018952_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018953
Martin v. Löwis11437992002-04-12 09:54:03 +000018954
Guido van Rossum627b2d71993-12-24 10:39:16 +000018955fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018956
Skip Montanarof0d5f792004-08-15 14:08:23 +000018957rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018958
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018959fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018960done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018961
Michael W. Hudson54241132001-12-07 15:38:26 +000018962
Thomas Wouters477c8d52006-05-27 19:21:47 +000018963{ echo "$as_me:$LINENO: checking for major" >&5
18964echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018965cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018966/* confdefs.h. */
18967_ACEOF
18968cat confdefs.h >>conftest.$ac_ext
18969cat >>conftest.$ac_ext <<_ACEOF
18970/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018971
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018972#if defined(MAJOR_IN_MKDEV)
18973#include <sys/mkdev.h>
18974#elif defined(MAJOR_IN_SYSMACROS)
18975#include <sys/sysmacros.h>
18976#else
18977#include <sys/types.h>
18978#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018979
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018980int
18981main ()
18982{
18983
18984 makedev(major(0),minor(0));
18985
18986 ;
18987 return 0;
18988}
18989_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018990rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018991if { (ac_try="$ac_link"
18992case "(($ac_try" in
18993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18994 *) ac_try_echo=$ac_try;;
18995esac
18996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18997 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018998 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018999 grep -v '^ *+' conftest.er1 >conftest.err
19000 rm -f conftest.er1
19001 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19003 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019004 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19005 { (case "(($ac_try" in
19006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19007 *) ac_try_echo=$ac_try;;
19008esac
19009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19010 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019011 ac_status=$?
19012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19013 (exit $ac_status); }; } &&
19014 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019015 { (case "(($ac_try" in
19016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19017 *) ac_try_echo=$ac_try;;
19018esac
19019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19020 (eval "$ac_try") 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019021 ac_status=$?
19022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19023 (exit $ac_status); }; }; then
19024
19025
19026cat >>confdefs.h <<\_ACEOF
19027#define HAVE_DEVICE_MACROS 1
19028_ACEOF
19029
Thomas Wouters477c8d52006-05-27 19:21:47 +000019030 { echo "$as_me:$LINENO: result: yes" >&5
19031echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019032
19033else
19034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019035sed 's/^/| /' conftest.$ac_ext >&5
19036
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019037
Thomas Wouters477c8d52006-05-27 19:21:47 +000019038 { echo "$as_me:$LINENO: result: no" >&5
19039echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019040
19041fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019042
Skip Montanarof0d5f792004-08-15 14:08:23 +000019043rm -f conftest.err conftest.$ac_objext \
19044 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019045
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019046# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019047# for [no]getaddrinfo in netdb.h.
Thomas Wouters477c8d52006-05-27 19:21:47 +000019048{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19049echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019050cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019051/* confdefs.h. */
19052_ACEOF
19053cat confdefs.h >>conftest.$ac_ext
19054cat >>conftest.$ac_ext <<_ACEOF
19055/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019056
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019057#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019058#include <sys/socket.h>
19059#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019060#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019061
Martin v. Löwis11437992002-04-12 09:54:03 +000019062int
19063main ()
19064{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019065
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019066getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019067
Martin v. Löwis11437992002-04-12 09:54:03 +000019068 ;
19069 return 0;
19070}
19071_ACEOF
19072rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019073if { (ac_try="$ac_link"
19074case "(($ac_try" in
19075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19076 *) ac_try_echo=$ac_try;;
19077esac
19078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19079 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019081 grep -v '^ *+' conftest.er1 >conftest.err
19082 rm -f conftest.er1
19083 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19085 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019086 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19087 { (case "(($ac_try" in
19088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19089 *) ac_try_echo=$ac_try;;
19090esac
19091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19092 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019093 ac_status=$?
19094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19095 (exit $ac_status); }; } &&
19096 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019097 { (case "(($ac_try" in
19098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19099 *) ac_try_echo=$ac_try;;
19100esac
19101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19102 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019103 ac_status=$?
19104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19105 (exit $ac_status); }; }; then
19106
Thomas Wouters477c8d52006-05-27 19:21:47 +000019107{ echo "$as_me:$LINENO: result: yes" >&5
19108echo "${ECHO_T}yes" >&6; }
19109{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19110echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019111if test "$cross_compiling" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000019112 { echo "$as_me:$LINENO: result: buggy" >&5
19113echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019114buggygetaddrinfo=yes
19115else
Martin v. Löwis11437992002-04-12 09:54:03 +000019116 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019117/* confdefs.h. */
19118_ACEOF
19119cat confdefs.h >>conftest.$ac_ext
19120cat >>conftest.$ac_ext <<_ACEOF
19121/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019122
19123#include <sys/types.h>
19124#include <netdb.h>
19125#include <string.h>
19126#include <sys/socket.h>
19127#include <netinet/in.h>
19128
19129main()
19130{
19131 int passive, gaierr, inet4 = 0, inet6 = 0;
19132 struct addrinfo hints, *ai, *aitop;
19133 char straddr[INET6_ADDRSTRLEN], strport[16];
19134
19135 for (passive = 0; passive <= 1; passive++) {
19136 memset(&hints, 0, sizeof(hints));
19137 hints.ai_family = AF_UNSPEC;
19138 hints.ai_flags = passive ? AI_PASSIVE : 0;
19139 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019140 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019141 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19142 (void)gai_strerror(gaierr);
19143 goto bad;
19144 }
19145 for (ai = aitop; ai; ai = ai->ai_next) {
19146 if (ai->ai_addr == NULL ||
19147 ai->ai_addrlen == 0 ||
19148 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19149 straddr, sizeof(straddr), strport, sizeof(strport),
19150 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19151 goto bad;
19152 }
19153 switch (ai->ai_family) {
19154 case AF_INET:
19155 if (strcmp(strport, "54321") != 0) {
19156 goto bad;
19157 }
19158 if (passive) {
19159 if (strcmp(straddr, "0.0.0.0") != 0) {
19160 goto bad;
19161 }
19162 } else {
19163 if (strcmp(straddr, "127.0.0.1") != 0) {
19164 goto bad;
19165 }
19166 }
19167 inet4++;
19168 break;
19169 case AF_INET6:
19170 if (strcmp(strport, "54321") != 0) {
19171 goto bad;
19172 }
19173 if (passive) {
19174 if (strcmp(straddr, "::") != 0) {
19175 goto bad;
19176 }
19177 } else {
19178 if (strcmp(straddr, "::1") != 0) {
19179 goto bad;
19180 }
19181 }
19182 inet6++;
19183 break;
19184 case AF_UNSPEC:
19185 goto bad;
19186 break;
19187 default:
19188 /* another family support? */
19189 break;
19190 }
19191 }
19192 }
19193
19194 if (!(inet4 == 0 || inet4 == 2))
19195 goto bad;
19196 if (!(inet6 == 0 || inet6 == 2))
19197 goto bad;
19198
19199 if (aitop)
19200 freeaddrinfo(aitop);
19201 exit(0);
19202
19203 bad:
19204 if (aitop)
19205 freeaddrinfo(aitop);
19206 exit(1);
19207}
19208
Martin v. Löwis11437992002-04-12 09:54:03 +000019209_ACEOF
19210rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019211if { (ac_try="$ac_link"
19212case "(($ac_try" in
19213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19214 *) ac_try_echo=$ac_try;;
19215esac
19216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19217 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019218 ac_status=$?
19219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19220 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019221 { (case "(($ac_try" in
19222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19223 *) ac_try_echo=$ac_try;;
19224esac
19225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19226 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019227 ac_status=$?
19228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19229 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000019230 { echo "$as_me:$LINENO: result: good" >&5
19231echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019232buggygetaddrinfo=no
19233else
Martin v. Löwis11437992002-04-12 09:54:03 +000019234 echo "$as_me: program exited with status $ac_status" >&5
19235echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019236sed 's/^/| /' conftest.$ac_ext >&5
19237
Martin v. Löwis11437992002-04-12 09:54:03 +000019238( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000019239{ echo "$as_me:$LINENO: result: buggy" >&5
19240echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019241buggygetaddrinfo=yes
19242fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019244fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019245
19246
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019247else
Martin v. Löwis11437992002-04-12 09:54:03 +000019248 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019249sed 's/^/| /' conftest.$ac_ext >&5
19250
Martin v. Löwis11437992002-04-12 09:54:03 +000019251
Thomas Wouters477c8d52006-05-27 19:21:47 +000019252{ echo "$as_me:$LINENO: result: no" >&5
19253echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019254buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019255
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019256fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019257
Skip Montanarof0d5f792004-08-15 14:08:23 +000019258rm -f conftest.err conftest.$ac_objext \
19259 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019260
19261if test "$buggygetaddrinfo" = "yes"; then
19262 if test "$ipv6" = "yes"; then
19263 echo 'Fatal: You must get working getaddrinfo() function.'
19264 echo ' or you can specify "--disable-ipv6"'.
19265 exit 1
19266 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019267else
Martin v. Löwis11437992002-04-12 09:54:03 +000019268
19269cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019270#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019271_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019272
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019274
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019275for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019276do
Martin v. Löwis11437992002-04-12 09:54:03 +000019277as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000019278{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19279echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19280if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019281 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019282else
Martin v. Löwis11437992002-04-12 09:54:03 +000019283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019284/* confdefs.h. */
19285_ACEOF
19286cat confdefs.h >>conftest.$ac_ext
19287cat >>conftest.$ac_ext <<_ACEOF
19288/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019289/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19290 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19291#define $ac_func innocuous_$ac_func
19292
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019293/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019294 which can conflict with char $ac_func (); below.
19295 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019296 <limits.h> exists even on freestanding compilers. */
19297
19298#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019299# include <limits.h>
19300#else
19301# include <assert.h>
19302#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019303
19304#undef $ac_func
19305
Thomas Wouters477c8d52006-05-27 19:21:47 +000019306/* Override any GCC internal prototype to avoid an error.
19307 Use char because int might match the return type of a GCC
19308 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019309#ifdef __cplusplus
19310extern "C"
19311#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019312char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019313/* The GNU C library defines this for functions which it implements
19314 to always fail with ENOSYS. Some functions are actually named
19315 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000019316#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019317choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019318#endif
19319
Skip Montanaro6dead952003-09-25 14:50:04 +000019320int
19321main ()
19322{
Thomas Wouters477c8d52006-05-27 19:21:47 +000019323return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019324 ;
19325 return 0;
19326}
19327_ACEOF
19328rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019329if { (ac_try="$ac_link"
19330case "(($ac_try" in
19331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19332 *) ac_try_echo=$ac_try;;
19333esac
19334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19335 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019337 grep -v '^ *+' conftest.er1 >conftest.err
19338 rm -f conftest.er1
19339 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19341 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019342 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19343 { (case "(($ac_try" in
19344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19345 *) ac_try_echo=$ac_try;;
19346esac
19347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19348 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019349 ac_status=$?
19350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19351 (exit $ac_status); }; } &&
19352 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019353 { (case "(($ac_try" in
19354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19355 *) ac_try_echo=$ac_try;;
19356esac
19357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19358 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019359 ac_status=$?
19360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19361 (exit $ac_status); }; }; then
19362 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019363else
Martin v. Löwis11437992002-04-12 09:54:03 +000019364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019365sed 's/^/| /' conftest.$ac_ext >&5
19366
Thomas Wouters477c8d52006-05-27 19:21:47 +000019367 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019368fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019369
Skip Montanarof0d5f792004-08-15 14:08:23 +000019370rm -f conftest.err conftest.$ac_objext \
19371 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019372fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019373ac_res=`eval echo '${'$as_ac_var'}'`
19374 { echo "$as_me:$LINENO: result: $ac_res" >&5
19375echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019376if test `eval echo '${'$as_ac_var'}'` = yes; then
19377 cat >>confdefs.h <<_ACEOF
19378#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19379_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019380
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019381fi
19382done
19383
Michael W. Hudson54241132001-12-07 15:38:26 +000019384
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019385# checks for structures
Thomas Wouters477c8d52006-05-27 19:21:47 +000019386{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19387echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019388if test "${ac_cv_header_time+set}" = set; then
19389 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019390else
Martin v. Löwis11437992002-04-12 09:54:03 +000019391 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019392/* confdefs.h. */
19393_ACEOF
19394cat confdefs.h >>conftest.$ac_ext
19395cat >>conftest.$ac_ext <<_ACEOF
19396/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019397#include <sys/types.h>
19398#include <sys/time.h>
19399#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019400
Martin v. Löwis11437992002-04-12 09:54:03 +000019401int
19402main ()
19403{
19404if ((struct tm *) 0)
19405return 0;
19406 ;
19407 return 0;
19408}
19409_ACEOF
19410rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019411if { (ac_try="$ac_compile"
19412case "(($ac_try" in
19413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19414 *) ac_try_echo=$ac_try;;
19415esac
19416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19417 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019419 grep -v '^ *+' conftest.er1 >conftest.err
19420 rm -f conftest.er1
19421 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19423 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019424 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19425 { (case "(($ac_try" in
19426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19427 *) ac_try_echo=$ac_try;;
19428esac
19429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19430 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019431 ac_status=$?
19432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19433 (exit $ac_status); }; } &&
19434 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019435 { (case "(($ac_try" in
19436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19437 *) ac_try_echo=$ac_try;;
19438esac
19439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19440 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019441 ac_status=$?
19442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19443 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019444 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019445else
Martin v. Löwis11437992002-04-12 09:54:03 +000019446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019447sed 's/^/| /' conftest.$ac_ext >&5
19448
Thomas Wouters477c8d52006-05-27 19:21:47 +000019449 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019450fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019451
Skip Montanarof0d5f792004-08-15 14:08:23 +000019452rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019453fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019454{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19455echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019456if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019457
19458cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019459#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019460_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019461
19462fi
19463
Thomas Wouters477c8d52006-05-27 19:21:47 +000019464{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19465echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019466if test "${ac_cv_struct_tm+set}" = set; then
19467 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019468else
Martin v. Löwis11437992002-04-12 09:54:03 +000019469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019470/* confdefs.h. */
19471_ACEOF
19472cat confdefs.h >>conftest.$ac_ext
19473cat >>conftest.$ac_ext <<_ACEOF
19474/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019475#include <sys/types.h>
19476#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019477
Martin v. Löwis11437992002-04-12 09:54:03 +000019478int
19479main ()
19480{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019481struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000019482 ;
19483 return 0;
19484}
19485_ACEOF
19486rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019487if { (ac_try="$ac_compile"
19488case "(($ac_try" in
19489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19490 *) ac_try_echo=$ac_try;;
19491esac
19492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19493 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019494 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019495 grep -v '^ *+' conftest.er1 >conftest.err
19496 rm -f conftest.er1
19497 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19499 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019500 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19501 { (case "(($ac_try" in
19502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19503 *) ac_try_echo=$ac_try;;
19504esac
19505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19506 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019507 ac_status=$?
19508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19509 (exit $ac_status); }; } &&
19510 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019511 { (case "(($ac_try" in
19512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19513 *) ac_try_echo=$ac_try;;
19514esac
19515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19516 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019517 ac_status=$?
19518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19519 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019520 ac_cv_struct_tm=time.h
19521else
Martin v. Löwis11437992002-04-12 09:54:03 +000019522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019523sed 's/^/| /' conftest.$ac_ext >&5
19524
Thomas Wouters477c8d52006-05-27 19:21:47 +000019525 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019526fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019527
Skip Montanarof0d5f792004-08-15 14:08:23 +000019528rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019529fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019530{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19531echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019532if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019533
19534cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019535#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019536_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019537
19538fi
19539
Thomas Wouters477c8d52006-05-27 19:21:47 +000019540{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19541echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019542if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19543 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019544else
Martin v. Löwis11437992002-04-12 09:54:03 +000019545 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019546/* confdefs.h. */
19547_ACEOF
19548cat confdefs.h >>conftest.$ac_ext
19549cat >>conftest.$ac_ext <<_ACEOF
19550/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019551#include <sys/types.h>
19552#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019553
19554
Martin v. Löwis11437992002-04-12 09:54:03 +000019555int
19556main ()
19557{
19558static struct tm ac_aggr;
19559if (ac_aggr.tm_zone)
19560return 0;
19561 ;
19562 return 0;
19563}
19564_ACEOF
19565rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019566if { (ac_try="$ac_compile"
19567case "(($ac_try" in
19568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19569 *) ac_try_echo=$ac_try;;
19570esac
19571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19572 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019574 grep -v '^ *+' conftest.er1 >conftest.err
19575 rm -f conftest.er1
19576 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19578 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019579 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19580 { (case "(($ac_try" in
19581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19582 *) ac_try_echo=$ac_try;;
19583esac
19584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19585 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019586 ac_status=$?
19587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19588 (exit $ac_status); }; } &&
19589 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019590 { (case "(($ac_try" in
19591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19592 *) ac_try_echo=$ac_try;;
19593esac
19594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19595 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019596 ac_status=$?
19597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19598 (exit $ac_status); }; }; then
19599 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019600else
Martin v. Löwis11437992002-04-12 09:54:03 +000019601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019602sed 's/^/| /' conftest.$ac_ext >&5
19603
Thomas Wouters477c8d52006-05-27 19:21:47 +000019604 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019605/* confdefs.h. */
19606_ACEOF
19607cat confdefs.h >>conftest.$ac_ext
19608cat >>conftest.$ac_ext <<_ACEOF
19609/* end confdefs.h. */
19610#include <sys/types.h>
19611#include <$ac_cv_struct_tm>
19612
19613
19614int
19615main ()
19616{
19617static struct tm ac_aggr;
19618if (sizeof ac_aggr.tm_zone)
19619return 0;
19620 ;
19621 return 0;
19622}
19623_ACEOF
19624rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019625if { (ac_try="$ac_compile"
19626case "(($ac_try" in
19627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19628 *) ac_try_echo=$ac_try;;
19629esac
19630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19631 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019633 grep -v '^ *+' conftest.er1 >conftest.err
19634 rm -f conftest.er1
19635 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19637 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019638 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19639 { (case "(($ac_try" in
19640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19641 *) ac_try_echo=$ac_try;;
19642esac
19643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19644 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019645 ac_status=$?
19646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19647 (exit $ac_status); }; } &&
19648 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019649 { (case "(($ac_try" in
19650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19651 *) ac_try_echo=$ac_try;;
19652esac
19653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19654 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019655 ac_status=$?
19656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19657 (exit $ac_status); }; }; then
19658 ac_cv_member_struct_tm_tm_zone=yes
19659else
19660 echo "$as_me: failed program was:" >&5
19661sed 's/^/| /' conftest.$ac_ext >&5
19662
Thomas Wouters477c8d52006-05-27 19:21:47 +000019663 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019664fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019665
Skip Montanarof0d5f792004-08-15 14:08:23 +000019666rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019667fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019668
Skip Montanarof0d5f792004-08-15 14:08:23 +000019669rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019670fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019671{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19672echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019673if test $ac_cv_member_struct_tm_tm_zone = yes; then
19674
19675cat >>confdefs.h <<_ACEOF
19676#define HAVE_STRUCT_TM_TM_ZONE 1
19677_ACEOF
19678
19679
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019680fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019681
Martin v. Löwis11437992002-04-12 09:54:03 +000019682if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19683
19684cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019685#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019686_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019687
19688else
Thomas Wouters477c8d52006-05-27 19:21:47 +000019689 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19690echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19691if test "${ac_cv_have_decl_tzname+set}" = set; then
19692 echo $ECHO_N "(cached) $ECHO_C" >&6
19693else
19694 cat >conftest.$ac_ext <<_ACEOF
19695/* confdefs.h. */
19696_ACEOF
19697cat confdefs.h >>conftest.$ac_ext
19698cat >>conftest.$ac_ext <<_ACEOF
19699/* end confdefs.h. */
19700#include <time.h>
19701
19702int
19703main ()
19704{
19705#ifndef tzname
19706 char *p = (char *) tzname;
19707 return !p;
19708#endif
19709
19710 ;
19711 return 0;
19712}
19713_ACEOF
19714rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019715if { (ac_try="$ac_compile"
19716case "(($ac_try" in
19717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19718 *) ac_try_echo=$ac_try;;
19719esac
19720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19721 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters477c8d52006-05-27 19:21:47 +000019722 ac_status=$?
19723 grep -v '^ *+' conftest.er1 >conftest.err
19724 rm -f conftest.er1
19725 cat conftest.err >&5
19726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19727 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019728 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19729 { (case "(($ac_try" in
19730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19731 *) ac_try_echo=$ac_try;;
19732esac
19733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19734 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000019735 ac_status=$?
19736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19737 (exit $ac_status); }; } &&
19738 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019739 { (case "(($ac_try" in
19740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19741 *) ac_try_echo=$ac_try;;
19742esac
19743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19744 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000019745 ac_status=$?
19746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19747 (exit $ac_status); }; }; then
19748 ac_cv_have_decl_tzname=yes
19749else
19750 echo "$as_me: failed program was:" >&5
19751sed 's/^/| /' conftest.$ac_ext >&5
19752
19753 ac_cv_have_decl_tzname=no
19754fi
19755
19756rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19757fi
19758{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19759echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19760if test $ac_cv_have_decl_tzname = yes; then
19761
19762cat >>confdefs.h <<_ACEOF
19763#define HAVE_DECL_TZNAME 1
19764_ACEOF
19765
19766
19767else
19768 cat >>confdefs.h <<_ACEOF
19769#define HAVE_DECL_TZNAME 0
19770_ACEOF
19771
19772
19773fi
19774
19775
19776 { echo "$as_me:$LINENO: checking for tzname" >&5
19777echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019778if test "${ac_cv_var_tzname+set}" = set; then
19779 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019780else
Martin v. Löwis11437992002-04-12 09:54:03 +000019781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019782/* confdefs.h. */
19783_ACEOF
19784cat confdefs.h >>conftest.$ac_ext
19785cat >>conftest.$ac_ext <<_ACEOF
19786/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019787#include <time.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +000019788#if !HAVE_DECL_TZNAME
19789extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019790#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019791
Martin v. Löwis11437992002-04-12 09:54:03 +000019792int
19793main ()
19794{
Thomas Wouters477c8d52006-05-27 19:21:47 +000019795return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019796 ;
19797 return 0;
19798}
19799_ACEOF
19800rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019801if { (ac_try="$ac_link"
19802case "(($ac_try" in
19803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19804 *) ac_try_echo=$ac_try;;
19805esac
19806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19807 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019808 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019809 grep -v '^ *+' conftest.er1 >conftest.err
19810 rm -f conftest.er1
19811 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19813 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019814 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19815 { (case "(($ac_try" in
19816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19817 *) ac_try_echo=$ac_try;;
19818esac
19819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19820 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019821 ac_status=$?
19822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19823 (exit $ac_status); }; } &&
19824 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019825 { (case "(($ac_try" in
19826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19827 *) ac_try_echo=$ac_try;;
19828esac
19829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19830 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019831 ac_status=$?
19832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19833 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019834 ac_cv_var_tzname=yes
19835else
Martin v. Löwis11437992002-04-12 09:54:03 +000019836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019837sed 's/^/| /' conftest.$ac_ext >&5
19838
Thomas Wouters477c8d52006-05-27 19:21:47 +000019839 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019840fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019841
Skip Montanarof0d5f792004-08-15 14:08:23 +000019842rm -f conftest.err conftest.$ac_objext \
19843 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019844fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019845{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19846echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019847 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019848
19849cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019850#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019851_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019852
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019853 fi
19854fi
19855
Thomas Wouters477c8d52006-05-27 19:21:47 +000019856{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19857echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019858if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19859 echo $ECHO_N "(cached) $ECHO_C" >&6
19860else
19861 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019862/* confdefs.h. */
19863_ACEOF
19864cat confdefs.h >>conftest.$ac_ext
19865cat >>conftest.$ac_ext <<_ACEOF
19866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019867$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019868int
19869main ()
19870{
19871static struct stat ac_aggr;
19872if (ac_aggr.st_rdev)
19873return 0;
19874 ;
19875 return 0;
19876}
19877_ACEOF
19878rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019879if { (ac_try="$ac_compile"
19880case "(($ac_try" in
19881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19882 *) ac_try_echo=$ac_try;;
19883esac
19884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19885 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019887 grep -v '^ *+' conftest.er1 >conftest.err
19888 rm -f conftest.er1
19889 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19891 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019892 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19893 { (case "(($ac_try" in
19894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19895 *) ac_try_echo=$ac_try;;
19896esac
19897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19898 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019899 ac_status=$?
19900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19901 (exit $ac_status); }; } &&
19902 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019903 { (case "(($ac_try" in
19904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19905 *) ac_try_echo=$ac_try;;
19906esac
19907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19908 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019909 ac_status=$?
19910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19911 (exit $ac_status); }; }; then
19912 ac_cv_member_struct_stat_st_rdev=yes
19913else
19914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019915sed 's/^/| /' conftest.$ac_ext >&5
19916
Thomas Wouters477c8d52006-05-27 19:21:47 +000019917 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019918/* confdefs.h. */
19919_ACEOF
19920cat confdefs.h >>conftest.$ac_ext
19921cat >>conftest.$ac_ext <<_ACEOF
19922/* end confdefs.h. */
19923$ac_includes_default
19924int
19925main ()
19926{
19927static struct stat ac_aggr;
19928if (sizeof ac_aggr.st_rdev)
19929return 0;
19930 ;
19931 return 0;
19932}
19933_ACEOF
19934rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019935if { (ac_try="$ac_compile"
19936case "(($ac_try" in
19937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19938 *) ac_try_echo=$ac_try;;
19939esac
19940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19941 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019943 grep -v '^ *+' conftest.er1 >conftest.err
19944 rm -f conftest.er1
19945 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19947 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019948 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
19949 { (case "(($ac_try" in
19950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19951 *) ac_try_echo=$ac_try;;
19952esac
19953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19954 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019955 ac_status=$?
19956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19957 (exit $ac_status); }; } &&
19958 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000019959 { (case "(($ac_try" in
19960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19961 *) ac_try_echo=$ac_try;;
19962esac
19963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19964 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019965 ac_status=$?
19966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19967 (exit $ac_status); }; }; then
19968 ac_cv_member_struct_stat_st_rdev=yes
19969else
19970 echo "$as_me: failed program was:" >&5
19971sed 's/^/| /' conftest.$ac_ext >&5
19972
Thomas Wouters477c8d52006-05-27 19:21:47 +000019973 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019974fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019975
Skip Montanarof0d5f792004-08-15 14:08:23 +000019976rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019977fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019978
Skip Montanarof0d5f792004-08-15 14:08:23 +000019979rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019980fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000019981{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19982echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019983if test $ac_cv_member_struct_stat_st_rdev = yes; then
19984
19985cat >>confdefs.h <<_ACEOF
19986#define HAVE_STRUCT_STAT_ST_RDEV 1
19987_ACEOF
19988
19989
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019990fi
19991
Thomas Wouters477c8d52006-05-27 19:21:47 +000019992{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19993echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019994if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19995 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019996else
Martin v. Löwis11437992002-04-12 09:54:03 +000019997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019998/* confdefs.h. */
19999_ACEOF
20000cat confdefs.h >>conftest.$ac_ext
20001cat >>conftest.$ac_ext <<_ACEOF
20002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020003$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020004int
20005main ()
20006{
20007static struct stat ac_aggr;
20008if (ac_aggr.st_blksize)
20009return 0;
20010 ;
20011 return 0;
20012}
20013_ACEOF
20014rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020015if { (ac_try="$ac_compile"
20016case "(($ac_try" in
20017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20018 *) ac_try_echo=$ac_try;;
20019esac
20020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20021 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020023 grep -v '^ *+' conftest.er1 >conftest.err
20024 rm -f conftest.er1
20025 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20027 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020028 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20029 { (case "(($ac_try" in
20030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20031 *) ac_try_echo=$ac_try;;
20032esac
20033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20034 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020035 ac_status=$?
20036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20037 (exit $ac_status); }; } &&
20038 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020039 { (case "(($ac_try" in
20040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20041 *) ac_try_echo=$ac_try;;
20042esac
20043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20044 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020045 ac_status=$?
20046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20047 (exit $ac_status); }; }; then
20048 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020049else
Martin v. Löwis11437992002-04-12 09:54:03 +000020050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020051sed 's/^/| /' conftest.$ac_ext >&5
20052
Thomas Wouters477c8d52006-05-27 19:21:47 +000020053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020054/* confdefs.h. */
20055_ACEOF
20056cat confdefs.h >>conftest.$ac_ext
20057cat >>conftest.$ac_ext <<_ACEOF
20058/* end confdefs.h. */
20059$ac_includes_default
20060int
20061main ()
20062{
20063static struct stat ac_aggr;
20064if (sizeof ac_aggr.st_blksize)
20065return 0;
20066 ;
20067 return 0;
20068}
20069_ACEOF
20070rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020071if { (ac_try="$ac_compile"
20072case "(($ac_try" in
20073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20074 *) ac_try_echo=$ac_try;;
20075esac
20076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20077 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020079 grep -v '^ *+' conftest.er1 >conftest.err
20080 rm -f conftest.er1
20081 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20083 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020084 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20085 { (case "(($ac_try" in
20086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20087 *) ac_try_echo=$ac_try;;
20088esac
20089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20090 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020091 ac_status=$?
20092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20093 (exit $ac_status); }; } &&
20094 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020095 { (case "(($ac_try" in
20096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20097 *) ac_try_echo=$ac_try;;
20098esac
20099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20100 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020101 ac_status=$?
20102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20103 (exit $ac_status); }; }; then
20104 ac_cv_member_struct_stat_st_blksize=yes
20105else
20106 echo "$as_me: failed program was:" >&5
20107sed 's/^/| /' conftest.$ac_ext >&5
20108
Thomas Wouters477c8d52006-05-27 19:21:47 +000020109 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020110fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020111
Skip Montanarof0d5f792004-08-15 14:08:23 +000020112rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020113fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020114
Skip Montanarof0d5f792004-08-15 14:08:23 +000020115rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020116fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020117{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20118echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020119if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020120
Martin v. Löwis11437992002-04-12 09:54:03 +000020121cat >>confdefs.h <<_ACEOF
20122#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20123_ACEOF
20124
20125
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020126fi
20127
Thomas Wouters477c8d52006-05-27 19:21:47 +000020128{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20129echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020130if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
20131 echo $ECHO_N "(cached) $ECHO_C" >&6
20132else
20133 cat >conftest.$ac_ext <<_ACEOF
20134/* confdefs.h. */
20135_ACEOF
20136cat confdefs.h >>conftest.$ac_ext
20137cat >>conftest.$ac_ext <<_ACEOF
20138/* end confdefs.h. */
20139$ac_includes_default
20140int
20141main ()
20142{
20143static struct stat ac_aggr;
20144if (ac_aggr.st_flags)
20145return 0;
20146 ;
20147 return 0;
20148}
20149_ACEOF
20150rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020151if { (ac_try="$ac_compile"
20152case "(($ac_try" in
20153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20154 *) ac_try_echo=$ac_try;;
20155esac
20156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20157 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020158 ac_status=$?
20159 grep -v '^ *+' conftest.er1 >conftest.err
20160 rm -f conftest.er1
20161 cat conftest.err >&5
20162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20163 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020164 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20165 { (case "(($ac_try" in
20166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20167 *) ac_try_echo=$ac_try;;
20168esac
20169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20170 (eval "$ac_try") 2>&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020171 ac_status=$?
20172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20173 (exit $ac_status); }; } &&
20174 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020175 { (case "(($ac_try" in
20176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20177 *) ac_try_echo=$ac_try;;
20178esac
20179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20180 (eval "$ac_try") 2>&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020181 ac_status=$?
20182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20183 (exit $ac_status); }; }; then
20184 ac_cv_member_struct_stat_st_flags=yes
20185else
20186 echo "$as_me: failed program was:" >&5
20187sed 's/^/| /' conftest.$ac_ext >&5
20188
Thomas Wouters477c8d52006-05-27 19:21:47 +000020189 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020190/* confdefs.h. */
20191_ACEOF
20192cat confdefs.h >>conftest.$ac_ext
20193cat >>conftest.$ac_ext <<_ACEOF
20194/* end confdefs.h. */
20195$ac_includes_default
20196int
20197main ()
20198{
20199static struct stat ac_aggr;
20200if (sizeof ac_aggr.st_flags)
20201return 0;
20202 ;
20203 return 0;
20204}
20205_ACEOF
20206rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020207if { (ac_try="$ac_compile"
20208case "(($ac_try" in
20209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20210 *) ac_try_echo=$ac_try;;
20211esac
20212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20213 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020214 ac_status=$?
20215 grep -v '^ *+' conftest.er1 >conftest.err
20216 rm -f conftest.er1
20217 cat conftest.err >&5
20218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20219 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020220 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20221 { (case "(($ac_try" in
20222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20223 *) ac_try_echo=$ac_try;;
20224esac
20225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20226 (eval "$ac_try") 2>&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020227 ac_status=$?
20228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20229 (exit $ac_status); }; } &&
20230 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020231 { (case "(($ac_try" in
20232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20233 *) ac_try_echo=$ac_try;;
20234esac
20235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20236 (eval "$ac_try") 2>&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020237 ac_status=$?
20238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20239 (exit $ac_status); }; }; then
20240 ac_cv_member_struct_stat_st_flags=yes
20241else
20242 echo "$as_me: failed program was:" >&5
20243sed 's/^/| /' conftest.$ac_ext >&5
20244
Thomas Wouters477c8d52006-05-27 19:21:47 +000020245 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020246fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020247
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020248rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20249fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020250
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020251rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20252fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020253{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20254echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020255if test $ac_cv_member_struct_stat_st_flags = yes; then
20256
20257cat >>confdefs.h <<_ACEOF
20258#define HAVE_STRUCT_STAT_ST_FLAGS 1
20259_ACEOF
20260
20261
20262fi
20263
Thomas Wouters477c8d52006-05-27 19:21:47 +000020264{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20265echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020266if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
20267 echo $ECHO_N "(cached) $ECHO_C" >&6
20268else
20269 cat >conftest.$ac_ext <<_ACEOF
20270/* confdefs.h. */
20271_ACEOF
20272cat confdefs.h >>conftest.$ac_ext
20273cat >>conftest.$ac_ext <<_ACEOF
20274/* end confdefs.h. */
20275$ac_includes_default
20276int
20277main ()
20278{
20279static struct stat ac_aggr;
20280if (ac_aggr.st_gen)
20281return 0;
20282 ;
20283 return 0;
20284}
20285_ACEOF
20286rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020287if { (ac_try="$ac_compile"
20288case "(($ac_try" in
20289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20290 *) ac_try_echo=$ac_try;;
20291esac
20292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20293 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020294 ac_status=$?
20295 grep -v '^ *+' conftest.er1 >conftest.err
20296 rm -f conftest.er1
20297 cat conftest.err >&5
20298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20299 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020300 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20301 { (case "(($ac_try" in
20302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20303 *) ac_try_echo=$ac_try;;
20304esac
20305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20306 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020307 ac_status=$?
20308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20309 (exit $ac_status); }; } &&
20310 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020311 { (case "(($ac_try" in
20312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20313 *) ac_try_echo=$ac_try;;
20314esac
20315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20316 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020317 ac_status=$?
20318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20319 (exit $ac_status); }; }; then
20320 ac_cv_member_struct_stat_st_gen=yes
20321else
20322 echo "$as_me: failed program was:" >&5
20323sed 's/^/| /' conftest.$ac_ext >&5
20324
Thomas Wouters477c8d52006-05-27 19:21:47 +000020325 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020326/* confdefs.h. */
20327_ACEOF
20328cat confdefs.h >>conftest.$ac_ext
20329cat >>conftest.$ac_ext <<_ACEOF
20330/* end confdefs.h. */
20331$ac_includes_default
20332int
20333main ()
20334{
20335static struct stat ac_aggr;
20336if (sizeof ac_aggr.st_gen)
20337return 0;
20338 ;
20339 return 0;
20340}
20341_ACEOF
20342rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020343if { (ac_try="$ac_compile"
20344case "(($ac_try" in
20345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20346 *) ac_try_echo=$ac_try;;
20347esac
20348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20349 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020350 ac_status=$?
20351 grep -v '^ *+' conftest.er1 >conftest.err
20352 rm -f conftest.er1
20353 cat conftest.err >&5
20354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20355 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020356 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20357 { (case "(($ac_try" in
20358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20359 *) ac_try_echo=$ac_try;;
20360esac
20361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20362 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020363 ac_status=$?
20364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20365 (exit $ac_status); }; } &&
20366 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020367 { (case "(($ac_try" in
20368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20369 *) ac_try_echo=$ac_try;;
20370esac
20371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20372 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020373 ac_status=$?
20374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20375 (exit $ac_status); }; }; then
20376 ac_cv_member_struct_stat_st_gen=yes
20377else
20378 echo "$as_me: failed program was:" >&5
20379sed 's/^/| /' conftest.$ac_ext >&5
20380
Thomas Wouters477c8d52006-05-27 19:21:47 +000020381 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020382fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020383
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020384rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20385fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020386
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020387rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20388fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020389{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20390echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020391if test $ac_cv_member_struct_stat_st_gen = yes; then
20392
20393cat >>confdefs.h <<_ACEOF
20394#define HAVE_STRUCT_STAT_ST_GEN 1
20395_ACEOF
20396
20397
20398fi
20399
Thomas Wouters477c8d52006-05-27 19:21:47 +000020400{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20401echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020402if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
20403 echo $ECHO_N "(cached) $ECHO_C" >&6
20404else
20405 cat >conftest.$ac_ext <<_ACEOF
20406/* confdefs.h. */
20407_ACEOF
20408cat confdefs.h >>conftest.$ac_ext
20409cat >>conftest.$ac_ext <<_ACEOF
20410/* end confdefs.h. */
20411$ac_includes_default
20412int
20413main ()
20414{
20415static struct stat ac_aggr;
20416if (ac_aggr.st_birthtime)
20417return 0;
20418 ;
20419 return 0;
20420}
20421_ACEOF
20422rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020423if { (ac_try="$ac_compile"
20424case "(($ac_try" in
20425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20426 *) ac_try_echo=$ac_try;;
20427esac
20428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20429 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020430 ac_status=$?
20431 grep -v '^ *+' conftest.er1 >conftest.err
20432 rm -f conftest.er1
20433 cat conftest.err >&5
20434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20435 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020436 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20437 { (case "(($ac_try" in
20438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20439 *) ac_try_echo=$ac_try;;
20440esac
20441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20442 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020443 ac_status=$?
20444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20445 (exit $ac_status); }; } &&
20446 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020447 { (case "(($ac_try" in
20448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20449 *) ac_try_echo=$ac_try;;
20450esac
20451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20452 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020453 ac_status=$?
20454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20455 (exit $ac_status); }; }; then
20456 ac_cv_member_struct_stat_st_birthtime=yes
20457else
20458 echo "$as_me: failed program was:" >&5
20459sed 's/^/| /' conftest.$ac_ext >&5
20460
Thomas Wouters477c8d52006-05-27 19:21:47 +000020461 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020462/* confdefs.h. */
20463_ACEOF
20464cat confdefs.h >>conftest.$ac_ext
20465cat >>conftest.$ac_ext <<_ACEOF
20466/* end confdefs.h. */
20467$ac_includes_default
20468int
20469main ()
20470{
20471static struct stat ac_aggr;
20472if (sizeof ac_aggr.st_birthtime)
20473return 0;
20474 ;
20475 return 0;
20476}
20477_ACEOF
20478rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020479if { (ac_try="$ac_compile"
20480case "(($ac_try" in
20481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20482 *) ac_try_echo=$ac_try;;
20483esac
20484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20485 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020486 ac_status=$?
20487 grep -v '^ *+' conftest.er1 >conftest.err
20488 rm -f conftest.er1
20489 cat conftest.err >&5
20490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20491 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020492 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20493 { (case "(($ac_try" in
20494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20495 *) ac_try_echo=$ac_try;;
20496esac
20497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20498 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020499 ac_status=$?
20500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20501 (exit $ac_status); }; } &&
20502 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020503 { (case "(($ac_try" in
20504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20505 *) ac_try_echo=$ac_try;;
20506esac
20507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20508 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020509 ac_status=$?
20510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20511 (exit $ac_status); }; }; then
20512 ac_cv_member_struct_stat_st_birthtime=yes
20513else
20514 echo "$as_me: failed program was:" >&5
20515sed 's/^/| /' conftest.$ac_ext >&5
20516
Thomas Wouters477c8d52006-05-27 19:21:47 +000020517 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020518fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020519
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020520rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20521fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020522
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020523rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20524fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020525{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20526echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020527if test $ac_cv_member_struct_stat_st_birthtime = yes; then
20528
20529cat >>confdefs.h <<_ACEOF
20530#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20531_ACEOF
20532
20533
20534fi
20535
Thomas Wouters477c8d52006-05-27 19:21:47 +000020536{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20537echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020538if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
20539 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020540else
Martin v. Löwis11437992002-04-12 09:54:03 +000020541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020542/* confdefs.h. */
20543_ACEOF
20544cat confdefs.h >>conftest.$ac_ext
20545cat >>conftest.$ac_ext <<_ACEOF
20546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020547$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020548int
20549main ()
20550{
20551static struct stat ac_aggr;
20552if (ac_aggr.st_blocks)
20553return 0;
20554 ;
20555 return 0;
20556}
20557_ACEOF
20558rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020559if { (ac_try="$ac_compile"
20560case "(($ac_try" in
20561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20562 *) ac_try_echo=$ac_try;;
20563esac
20564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20565 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020567 grep -v '^ *+' conftest.er1 >conftest.err
20568 rm -f conftest.er1
20569 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20571 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020572 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20573 { (case "(($ac_try" in
20574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20575 *) ac_try_echo=$ac_try;;
20576esac
20577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20578 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020579 ac_status=$?
20580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20581 (exit $ac_status); }; } &&
20582 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020583 { (case "(($ac_try" in
20584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20585 *) ac_try_echo=$ac_try;;
20586esac
20587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20588 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020589 ac_status=$?
20590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20591 (exit $ac_status); }; }; then
20592 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020593else
Martin v. Löwis11437992002-04-12 09:54:03 +000020594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020595sed 's/^/| /' conftest.$ac_ext >&5
20596
Thomas Wouters477c8d52006-05-27 19:21:47 +000020597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020598/* confdefs.h. */
20599_ACEOF
20600cat confdefs.h >>conftest.$ac_ext
20601cat >>conftest.$ac_ext <<_ACEOF
20602/* end confdefs.h. */
20603$ac_includes_default
20604int
20605main ()
20606{
20607static struct stat ac_aggr;
20608if (sizeof ac_aggr.st_blocks)
20609return 0;
20610 ;
20611 return 0;
20612}
20613_ACEOF
20614rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020615if { (ac_try="$ac_compile"
20616case "(($ac_try" in
20617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20618 *) ac_try_echo=$ac_try;;
20619esac
20620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20621 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020623 grep -v '^ *+' conftest.er1 >conftest.err
20624 rm -f conftest.er1
20625 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20627 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020628 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20629 { (case "(($ac_try" in
20630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20631 *) ac_try_echo=$ac_try;;
20632esac
20633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20634 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020635 ac_status=$?
20636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20637 (exit $ac_status); }; } &&
20638 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020639 { (case "(($ac_try" in
20640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20641 *) ac_try_echo=$ac_try;;
20642esac
20643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20644 (eval "$ac_try") 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020645 ac_status=$?
20646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20647 (exit $ac_status); }; }; then
20648 ac_cv_member_struct_stat_st_blocks=yes
20649else
20650 echo "$as_me: failed program was:" >&5
20651sed 's/^/| /' conftest.$ac_ext >&5
20652
Thomas Wouters477c8d52006-05-27 19:21:47 +000020653 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020654fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020655
Skip Montanarof0d5f792004-08-15 14:08:23 +000020656rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020657fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020658
Skip Montanarof0d5f792004-08-15 14:08:23 +000020659rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020660fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020661{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20662echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020663if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020664
Martin v. Löwis11437992002-04-12 09:54:03 +000020665cat >>confdefs.h <<_ACEOF
20666#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20667_ACEOF
20668
20669
20670cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020671#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020672_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020673
20674else
Thomas Wouters477c8d52006-05-27 19:21:47 +000020675 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020676 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000020677 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20678 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020679esac
20680
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020681fi
20682
Michael W. Hudson54241132001-12-07 15:38:26 +000020683
Martin v. Löwis11437992002-04-12 09:54:03 +000020684
Thomas Wouters477c8d52006-05-27 19:21:47 +000020685{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20686echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020687if test "${ac_cv_header_time_altzone+set}" = set; then
20688 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020689else
Martin v. Löwis11437992002-04-12 09:54:03 +000020690 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020691/* confdefs.h. */
20692_ACEOF
20693cat confdefs.h >>conftest.$ac_ext
20694cat >>conftest.$ac_ext <<_ACEOF
20695/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020696#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020697int
20698main ()
20699{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020700return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020701 ;
20702 return 0;
20703}
20704_ACEOF
20705rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020706if { (ac_try="$ac_compile"
20707case "(($ac_try" in
20708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20709 *) ac_try_echo=$ac_try;;
20710esac
20711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20712 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020713 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020714 grep -v '^ *+' conftest.er1 >conftest.err
20715 rm -f conftest.er1
20716 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20718 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020719 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20720 { (case "(($ac_try" in
20721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20722 *) ac_try_echo=$ac_try;;
20723esac
20724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20725 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020726 ac_status=$?
20727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20728 (exit $ac_status); }; } &&
20729 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020730 { (case "(($ac_try" in
20731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20732 *) ac_try_echo=$ac_try;;
20733esac
20734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20735 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020736 ac_status=$?
20737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20738 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020739 ac_cv_header_time_altzone=yes
20740else
Martin v. Löwis11437992002-04-12 09:54:03 +000020741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020742sed 's/^/| /' conftest.$ac_ext >&5
20743
Thomas Wouters477c8d52006-05-27 19:21:47 +000020744 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020745fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020746
Skip Montanarof0d5f792004-08-15 14:08:23 +000020747rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020748fi
20749
Thomas Wouters477c8d52006-05-27 19:21:47 +000020750{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20751echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020752if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020753
20754cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020755#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020756_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020757
20758fi
20759
Guido van Rossumda88dad1995-01-26 00:46:29 +000020760was_it_defined=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000020761{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20762echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020763cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020764/* confdefs.h. */
20765_ACEOF
20766cat confdefs.h >>conftest.$ac_ext
20767cat >>conftest.$ac_ext <<_ACEOF
20768/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020769
20770#include <sys/types.h>
20771#include <sys/select.h>
20772#include <sys/time.h>
20773
Martin v. Löwis11437992002-04-12 09:54:03 +000020774int
20775main ()
20776{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020777;
Martin v. Löwis11437992002-04-12 09:54:03 +000020778 ;
20779 return 0;
20780}
20781_ACEOF
20782rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020783if { (ac_try="$ac_compile"
20784case "(($ac_try" in
20785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20786 *) ac_try_echo=$ac_try;;
20787esac
20788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020791 grep -v '^ *+' conftest.er1 >conftest.err
20792 rm -f conftest.er1
20793 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20795 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020796 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20797 { (case "(($ac_try" in
20798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20799 *) ac_try_echo=$ac_try;;
20800esac
20801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20802 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020803 ac_status=$?
20804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20805 (exit $ac_status); }; } &&
20806 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020807 { (case "(($ac_try" in
20808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20809 *) ac_try_echo=$ac_try;;
20810esac
20811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20812 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020813 ac_status=$?
20814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20815 (exit $ac_status); }; }; then
20816
20817
20818cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020819#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020820_ACEOF
20821
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020822 was_it_defined=yes
20823
Guido van Rossumf78abae1997-01-21 22:02:36 +000020824else
Martin v. Löwis11437992002-04-12 09:54:03 +000020825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020826sed 's/^/| /' conftest.$ac_ext >&5
20827
Guido van Rossum627b2d71993-12-24 10:39:16 +000020828
Thomas Wouters477c8d52006-05-27 19:21:47 +000020829fi
20830
20831rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20832{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20833echo "${ECHO_T}$was_it_defined" >&6; }
20834
20835{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20836echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020837if test "${ac_cv_struct_addrinfo+set}" = set; then
20838 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020839else
Martin v. Löwis11437992002-04-12 09:54:03 +000020840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020841/* confdefs.h. */
20842_ACEOF
20843cat confdefs.h >>conftest.$ac_ext
20844cat >>conftest.$ac_ext <<_ACEOF
20845/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020846
20847# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020848int
20849main ()
20850{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020851struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020852 ;
20853 return 0;
20854}
20855_ACEOF
20856rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020857if { (ac_try="$ac_compile"
20858case "(($ac_try" in
20859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20860 *) ac_try_echo=$ac_try;;
20861esac
20862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20863 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020865 grep -v '^ *+' conftest.er1 >conftest.err
20866 rm -f conftest.er1
20867 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20869 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020870 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20871 { (case "(($ac_try" in
20872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20873 *) ac_try_echo=$ac_try;;
20874esac
20875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20876 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020877 ac_status=$?
20878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20879 (exit $ac_status); }; } &&
20880 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020881 { (case "(($ac_try" in
20882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20883 *) ac_try_echo=$ac_try;;
20884esac
20885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20886 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020887 ac_status=$?
20888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20889 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020890 ac_cv_struct_addrinfo=yes
20891else
Martin v. Löwis11437992002-04-12 09:54:03 +000020892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020893sed 's/^/| /' conftest.$ac_ext >&5
20894
Thomas Wouters477c8d52006-05-27 19:21:47 +000020895 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020896fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020897
Skip Montanarof0d5f792004-08-15 14:08:23 +000020898rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020899fi
20900
Thomas Wouters477c8d52006-05-27 19:21:47 +000020901{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20902echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020903if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020904
20905cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020906#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020907_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020908
20909fi
20910
Thomas Wouters477c8d52006-05-27 19:21:47 +000020911{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20912echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020913if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20914 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020915else
Martin v. Löwis11437992002-04-12 09:54:03 +000020916 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020917/* confdefs.h. */
20918_ACEOF
20919cat confdefs.h >>conftest.$ac_ext
20920cat >>conftest.$ac_ext <<_ACEOF
20921/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020922
20923# include <sys/types.h>
20924# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020925int
20926main ()
20927{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020928struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020929 ;
20930 return 0;
20931}
20932_ACEOF
20933rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020934if { (ac_try="$ac_compile"
20935case "(($ac_try" in
20936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20937 *) ac_try_echo=$ac_try;;
20938esac
20939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20940 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020941 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020942 grep -v '^ *+' conftest.er1 >conftest.err
20943 rm -f conftest.er1
20944 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20946 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020947 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
20948 { (case "(($ac_try" in
20949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20950 *) ac_try_echo=$ac_try;;
20951esac
20952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20953 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020954 ac_status=$?
20955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20956 (exit $ac_status); }; } &&
20957 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000020958 { (case "(($ac_try" in
20959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20960 *) ac_try_echo=$ac_try;;
20961esac
20962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20963 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020964 ac_status=$?
20965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20966 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020967 ac_cv_struct_sockaddr_storage=yes
20968else
Martin v. Löwis11437992002-04-12 09:54:03 +000020969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020970sed 's/^/| /' conftest.$ac_ext >&5
20971
Thomas Wouters477c8d52006-05-27 19:21:47 +000020972 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020973fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020974
Skip Montanarof0d5f792004-08-15 14:08:23 +000020975rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020976fi
20977
Thomas Wouters477c8d52006-05-27 19:21:47 +000020978{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20979echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020980if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020981
20982cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020983#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020984_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020985
20986fi
20987
Guido van Rossum627b2d71993-12-24 10:39:16 +000020988# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020989
Michael W. Hudson54241132001-12-07 15:38:26 +000020990
Thomas Wouters477c8d52006-05-27 19:21:47 +000020991{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20992echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020993if test "${ac_cv_c_char_unsigned+set}" = set; then
20994 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020995else
Martin v. Löwis11437992002-04-12 09:54:03 +000020996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020997/* confdefs.h. */
20998_ACEOF
20999cat confdefs.h >>conftest.$ac_ext
21000cat >>conftest.$ac_ext <<_ACEOF
21001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021002$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021003int
21004main ()
21005{
21006static int test_array [1 - 2 * !(((char) -1) < 0)];
21007test_array [0] = 0
21008
21009 ;
21010 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021011}
Martin v. Löwis11437992002-04-12 09:54:03 +000021012_ACEOF
21013rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021014if { (ac_try="$ac_compile"
21015case "(($ac_try" in
21016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21017 *) ac_try_echo=$ac_try;;
21018esac
21019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21020 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021022 grep -v '^ *+' conftest.er1 >conftest.err
21023 rm -f conftest.er1
21024 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21026 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021027 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21028 { (case "(($ac_try" in
21029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21030 *) ac_try_echo=$ac_try;;
21031esac
21032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21033 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021034 ac_status=$?
21035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21036 (exit $ac_status); }; } &&
21037 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021038 { (case "(($ac_try" in
21039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21040 *) ac_try_echo=$ac_try;;
21041esac
21042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21043 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021044 ac_status=$?
21045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21046 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021047 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021048else
21049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021050sed 's/^/| /' conftest.$ac_ext >&5
21051
Thomas Wouters477c8d52006-05-27 19:21:47 +000021052 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021053fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021054
Skip Montanarof0d5f792004-08-15 14:08:23 +000021055rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021056fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021057{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21058echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021059if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021060 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021061#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021062_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021063
21064fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021065
Thomas Wouters477c8d52006-05-27 19:21:47 +000021066{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21067echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021068if test "${ac_cv_c_const+set}" = set; then
21069 echo $ECHO_N "(cached) $ECHO_C" >&6
21070else
21071 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021072/* confdefs.h. */
21073_ACEOF
21074cat confdefs.h >>conftest.$ac_ext
21075cat >>conftest.$ac_ext <<_ACEOF
21076/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021077
Martin v. Löwis11437992002-04-12 09:54:03 +000021078int
21079main ()
21080{
21081/* FIXME: Include the comments suggested by Paul. */
21082#ifndef __cplusplus
21083 /* Ultrix mips cc rejects this. */
21084 typedef int charset[2];
21085 const charset x;
21086 /* SunOS 4.1.1 cc rejects this. */
21087 char const *const *ccp;
21088 char **p;
21089 /* NEC SVR4.0.2 mips cc rejects this. */
21090 struct point {int x, y;};
21091 static struct point const zero = {0,0};
21092 /* AIX XL C 1.02.0.0 rejects this.
21093 It does not let you subtract one const X* pointer from another in
21094 an arm of an if-expression whose if-part is not a constant
21095 expression */
21096 const char *g = "string";
21097 ccp = &g + (g ? g-g : 0);
21098 /* HPUX 7.0 cc rejects these. */
21099 ++ccp;
21100 p = (char**) ccp;
21101 ccp = (char const *const *) p;
21102 { /* SCO 3.2v4 cc rejects this. */
21103 char *t;
21104 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021105
Martin v. Löwis11437992002-04-12 09:54:03 +000021106 *t++ = 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000021107 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021108 }
21109 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21110 int x[] = {25, 17};
21111 const int *foo = &x[0];
21112 ++foo;
21113 }
21114 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21115 typedef const int *iptr;
21116 iptr p = 0;
21117 ++p;
21118 }
21119 { /* AIX XL C 1.02.0.0 rejects this saying
21120 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21121 struct s { int j; const int *ap[3]; };
21122 struct s *b; b->j = 5;
21123 }
21124 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21125 const int foo = 10;
Thomas Wouters477c8d52006-05-27 19:21:47 +000021126 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021127 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000021128 return !x[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021129#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021130
Martin v. Löwis11437992002-04-12 09:54:03 +000021131 ;
21132 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021133}
Martin v. Löwis11437992002-04-12 09:54:03 +000021134_ACEOF
21135rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021136if { (ac_try="$ac_compile"
21137case "(($ac_try" in
21138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21139 *) ac_try_echo=$ac_try;;
21140esac
21141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21142 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021144 grep -v '^ *+' conftest.er1 >conftest.err
21145 rm -f conftest.er1
21146 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21148 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021149 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21150 { (case "(($ac_try" in
21151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21152 *) ac_try_echo=$ac_try;;
21153esac
21154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21155 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021156 ac_status=$?
21157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21158 (exit $ac_status); }; } &&
21159 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021160 { (case "(($ac_try" in
21161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21162 *) ac_try_echo=$ac_try;;
21163esac
21164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21165 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021166 ac_status=$?
21167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21168 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021169 ac_cv_c_const=yes
21170else
Martin v. Löwis11437992002-04-12 09:54:03 +000021171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021172sed 's/^/| /' conftest.$ac_ext >&5
21173
Thomas Wouters477c8d52006-05-27 19:21:47 +000021174 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021175fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021176
Skip Montanarof0d5f792004-08-15 14:08:23 +000021177rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021178fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021179{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21180echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021181if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021182
21183cat >>confdefs.h <<\_ACEOF
21184#define const
21185_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021186
21187fi
21188
Michael W. Hudson54241132001-12-07 15:38:26 +000021189
Guido van Rossumda88dad1995-01-26 00:46:29 +000021190works=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000021191{ echo "$as_me:$LINENO: checking for working volatile" >&5
21192echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021193cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021194/* confdefs.h. */
21195_ACEOF
21196cat confdefs.h >>conftest.$ac_ext
21197cat >>conftest.$ac_ext <<_ACEOF
21198/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021199
Martin v. Löwis11437992002-04-12 09:54:03 +000021200int
21201main ()
21202{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021203volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021204 ;
21205 return 0;
21206}
21207_ACEOF
21208rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021209if { (ac_try="$ac_compile"
21210case "(($ac_try" in
21211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21212 *) ac_try_echo=$ac_try;;
21213esac
21214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21215 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021217 grep -v '^ *+' conftest.er1 >conftest.err
21218 rm -f conftest.er1
21219 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21221 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021222 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21223 { (case "(($ac_try" in
21224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21225 *) ac_try_echo=$ac_try;;
21226esac
21227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21228 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021229 ac_status=$?
21230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21231 (exit $ac_status); }; } &&
21232 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021233 { (case "(($ac_try" in
21234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21235 *) ac_try_echo=$ac_try;;
21236esac
21237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21238 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021239 ac_status=$?
21240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21241 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021242 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021243else
Martin v. Löwis11437992002-04-12 09:54:03 +000021244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021245sed 's/^/| /' conftest.$ac_ext >&5
21246
Martin v. Löwis11437992002-04-12 09:54:03 +000021247
21248cat >>confdefs.h <<\_ACEOF
21249#define volatile
21250_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021251
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021252
Guido van Rossum627b2d71993-12-24 10:39:16 +000021253fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021254
Skip Montanarof0d5f792004-08-15 14:08:23 +000021255rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000021256{ echo "$as_me:$LINENO: result: $works" >&5
21257echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021258
Guido van Rossumda88dad1995-01-26 00:46:29 +000021259works=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000021260{ echo "$as_me:$LINENO: checking for working signed char" >&5
21261echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021262cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021263/* confdefs.h. */
21264_ACEOF
21265cat confdefs.h >>conftest.$ac_ext
21266cat >>conftest.$ac_ext <<_ACEOF
21267/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021268
Martin v. Löwis11437992002-04-12 09:54:03 +000021269int
21270main ()
21271{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021272signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021273 ;
21274 return 0;
21275}
21276_ACEOF
21277rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021278if { (ac_try="$ac_compile"
21279case "(($ac_try" in
21280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21281 *) ac_try_echo=$ac_try;;
21282esac
21283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21284 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021286 grep -v '^ *+' conftest.er1 >conftest.err
21287 rm -f conftest.er1
21288 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21290 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021291 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21292 { (case "(($ac_try" in
21293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21294 *) ac_try_echo=$ac_try;;
21295esac
21296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21297 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021298 ac_status=$?
21299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21300 (exit $ac_status); }; } &&
21301 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021302 { (case "(($ac_try" in
21303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21304 *) ac_try_echo=$ac_try;;
21305esac
21306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21307 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021308 ac_status=$?
21309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21310 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021311 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021312else
Martin v. Löwis11437992002-04-12 09:54:03 +000021313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021314sed 's/^/| /' conftest.$ac_ext >&5
21315
Martin v. Löwis11437992002-04-12 09:54:03 +000021316
21317cat >>confdefs.h <<\_ACEOF
21318#define signed
21319_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021320
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021321
Guido van Rossum7f43da71994-08-01 12:15:30 +000021322fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021323
Skip Montanarof0d5f792004-08-15 14:08:23 +000021324rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000021325{ echo "$as_me:$LINENO: result: $works" >&5
21326echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021327
Guido van Rossumda88dad1995-01-26 00:46:29 +000021328have_prototypes=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000021329{ echo "$as_me:$LINENO: checking for prototypes" >&5
21330echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021331cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021332/* confdefs.h. */
21333_ACEOF
21334cat confdefs.h >>conftest.$ac_ext
21335cat >>conftest.$ac_ext <<_ACEOF
21336/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021337int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021338int
21339main ()
21340{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021341return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021342 ;
21343 return 0;
21344}
21345_ACEOF
21346rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021347if { (ac_try="$ac_compile"
21348case "(($ac_try" in
21349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21350 *) ac_try_echo=$ac_try;;
21351esac
21352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021355 grep -v '^ *+' conftest.er1 >conftest.err
21356 rm -f conftest.er1
21357 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21359 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021360 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21361 { (case "(($ac_try" in
21362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21363 *) ac_try_echo=$ac_try;;
21364esac
21365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21366 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021367 ac_status=$?
21368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21369 (exit $ac_status); }; } &&
21370 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021371 { (case "(($ac_try" in
21372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21373 *) ac_try_echo=$ac_try;;
21374esac
21375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21376 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021377 ac_status=$?
21378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21379 (exit $ac_status); }; }; then
21380
21381
21382cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021383#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021384_ACEOF
21385
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021386 have_prototypes=yes
21387
Guido van Rossumf78abae1997-01-21 22:02:36 +000021388else
Martin v. Löwis11437992002-04-12 09:54:03 +000021389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021390sed 's/^/| /' conftest.$ac_ext >&5
21391
Thomas Wouters477c8d52006-05-27 19:21:47 +000021392
Guido van Rossum7f43da71994-08-01 12:15:30 +000021393fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021394
Skip Montanarof0d5f792004-08-15 14:08:23 +000021395rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000021396{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21397echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021398
Guido van Rossumda88dad1995-01-26 00:46:29 +000021399works=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000021400{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21401echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021402cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021403/* confdefs.h. */
21404_ACEOF
21405cat confdefs.h >>conftest.$ac_ext
21406cat >>conftest.$ac_ext <<_ACEOF
21407/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021408
21409#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021410int foo(int x, ...) {
21411 va_list va;
21412 va_start(va, x);
21413 va_arg(va, int);
21414 va_arg(va, char *);
21415 va_arg(va, double);
21416 return 0;
21417}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021418
Martin v. Löwis11437992002-04-12 09:54:03 +000021419int
21420main ()
21421{
Guido van Rossum90eea071996-08-30 20:58:57 +000021422return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021423 ;
21424 return 0;
21425}
21426_ACEOF
21427rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021428if { (ac_try="$ac_compile"
21429case "(($ac_try" in
21430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21431 *) ac_try_echo=$ac_try;;
21432esac
21433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21434 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021436 grep -v '^ *+' conftest.er1 >conftest.err
21437 rm -f conftest.er1
21438 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21440 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021441 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21442 { (case "(($ac_try" in
21443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21444 *) ac_try_echo=$ac_try;;
21445esac
21446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21447 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021448 ac_status=$?
21449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21450 (exit $ac_status); }; } &&
21451 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021452 { (case "(($ac_try" in
21453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21454 *) ac_try_echo=$ac_try;;
21455esac
21456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21457 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021458 ac_status=$?
21459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21460 (exit $ac_status); }; }; then
21461
21462
21463cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021464#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021465_ACEOF
21466
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021467 works=yes
21468
Guido van Rossumf78abae1997-01-21 22:02:36 +000021469else
Martin v. Löwis11437992002-04-12 09:54:03 +000021470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021471sed 's/^/| /' conftest.$ac_ext >&5
21472
Thomas Wouters477c8d52006-05-27 19:21:47 +000021473
Guido van Rossum627b2d71993-12-24 10:39:16 +000021474fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021475
Skip Montanarof0d5f792004-08-15 14:08:23 +000021476rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000021477{ echo "$as_me:$LINENO: result: $works" >&5
21478echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021479
Martin v. Löwisd6320502004-08-12 13:45:08 +000021480# check for socketpair
Thomas Wouters477c8d52006-05-27 19:21:47 +000021481{ echo "$as_me:$LINENO: checking for socketpair" >&5
21482echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021483cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021484/* confdefs.h. */
21485_ACEOF
21486cat confdefs.h >>conftest.$ac_ext
21487cat >>conftest.$ac_ext <<_ACEOF
21488/* end confdefs.h. */
21489
21490#include <sys/types.h>
21491#include <sys/socket.h>
21492
21493int
21494main ()
21495{
21496void *x=socketpair
21497 ;
21498 return 0;
21499}
21500_ACEOF
21501rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021502if { (ac_try="$ac_compile"
21503case "(($ac_try" in
21504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21505 *) ac_try_echo=$ac_try;;
21506esac
21507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021510 grep -v '^ *+' conftest.er1 >conftest.err
21511 rm -f conftest.er1
21512 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21514 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021515 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21516 { (case "(($ac_try" in
21517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21518 *) ac_try_echo=$ac_try;;
21519esac
21520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21521 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021522 ac_status=$?
21523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21524 (exit $ac_status); }; } &&
21525 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021526 { (case "(($ac_try" in
21527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21528 *) ac_try_echo=$ac_try;;
21529esac
21530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21531 (eval "$ac_try") 2>&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021532 ac_status=$?
21533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21534 (exit $ac_status); }; }; then
21535
21536cat >>confdefs.h <<\_ACEOF
21537#define HAVE_SOCKETPAIR 1
21538_ACEOF
21539
Thomas Wouters477c8d52006-05-27 19:21:47 +000021540 { echo "$as_me:$LINENO: result: yes" >&5
21541echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021542else
21543 echo "$as_me: failed program was:" >&5
21544sed 's/^/| /' conftest.$ac_ext >&5
21545
Thomas Wouters477c8d52006-05-27 19:21:47 +000021546 { echo "$as_me:$LINENO: result: no" >&5
21547echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021548
21549fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021550
Skip Montanarof0d5f792004-08-15 14:08:23 +000021551rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021552
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021553# check if sockaddr has sa_len member
Thomas Wouters477c8d52006-05-27 19:21:47 +000021554{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21555echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021556cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021557/* confdefs.h. */
21558_ACEOF
21559cat confdefs.h >>conftest.$ac_ext
21560cat >>conftest.$ac_ext <<_ACEOF
21561/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021562#include <sys/types.h>
21563#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021564int
21565main ()
21566{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021567struct sockaddr x;
21568x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021569 ;
21570 return 0;
21571}
21572_ACEOF
21573rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021574if { (ac_try="$ac_compile"
21575case "(($ac_try" in
21576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21577 *) ac_try_echo=$ac_try;;
21578esac
21579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21580 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021582 grep -v '^ *+' conftest.er1 >conftest.err
21583 rm -f conftest.er1
21584 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21586 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021587 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21588 { (case "(($ac_try" in
21589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21590 *) ac_try_echo=$ac_try;;
21591esac
21592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21593 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021594 ac_status=$?
21595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21596 (exit $ac_status); }; } &&
21597 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021598 { (case "(($ac_try" in
21599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21600 *) ac_try_echo=$ac_try;;
21601esac
21602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21603 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021604 ac_status=$?
21605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21606 (exit $ac_status); }; }; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000021607 { echo "$as_me:$LINENO: result: yes" >&5
21608echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021609
21610cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021611#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021612_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021613
21614else
Martin v. Löwis11437992002-04-12 09:54:03 +000021615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021616sed 's/^/| /' conftest.$ac_ext >&5
21617
Thomas Wouters477c8d52006-05-27 19:21:47 +000021618 { echo "$as_me:$LINENO: result: no" >&5
21619echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021620fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021621
Skip Montanarof0d5f792004-08-15 14:08:23 +000021622rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021623
Guido van Rossumda88dad1995-01-26 00:46:29 +000021624va_list_is_array=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000021625{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21626echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021627cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021628/* confdefs.h. */
21629_ACEOF
21630cat confdefs.h >>conftest.$ac_ext
21631cat >>conftest.$ac_ext <<_ACEOF
21632/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021633
21634#ifdef HAVE_STDARG_PROTOTYPES
21635#include <stdarg.h>
21636#else
21637#include <varargs.h>
21638#endif
21639
Martin v. Löwis11437992002-04-12 09:54:03 +000021640int
21641main ()
21642{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021643va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021644 ;
21645 return 0;
21646}
21647_ACEOF
21648rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021649if { (ac_try="$ac_compile"
21650case "(($ac_try" in
21651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21652 *) ac_try_echo=$ac_try;;
21653esac
21654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021657 grep -v '^ *+' conftest.er1 >conftest.err
21658 rm -f conftest.er1
21659 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21661 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021662 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21663 { (case "(($ac_try" in
21664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21665 *) ac_try_echo=$ac_try;;
21666esac
21667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21668 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021669 ac_status=$?
21670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21671 (exit $ac_status); }; } &&
21672 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021673 { (case "(($ac_try" in
21674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21675 *) ac_try_echo=$ac_try;;
21676esac
21677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21678 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021679 ac_status=$?
21680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21681 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021682 :
21683else
Martin v. Löwis11437992002-04-12 09:54:03 +000021684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021685sed 's/^/| /' conftest.$ac_ext >&5
21686
Martin v. Löwis11437992002-04-12 09:54:03 +000021687
21688
21689cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021690#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021691_ACEOF
21692
Guido van Rossumda88dad1995-01-26 00:46:29 +000021693 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021694
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021695fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021696
Skip Montanarof0d5f792004-08-15 14:08:23 +000021697rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000021698{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21699echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021700
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021701# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021702
21703
21704
Thomas Wouters477c8d52006-05-27 19:21:47 +000021705{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21706echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021707if test "${ac_cv_func_gethostbyname_r+set}" = set; then
21708 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021709else
Martin v. Löwis11437992002-04-12 09:54:03 +000021710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021711/* confdefs.h. */
21712_ACEOF
21713cat confdefs.h >>conftest.$ac_ext
21714cat >>conftest.$ac_ext <<_ACEOF
21715/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021716/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21717 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21718#define gethostbyname_r innocuous_gethostbyname_r
21719
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021720/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021721 which can conflict with char gethostbyname_r (); below.
21722 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021723 <limits.h> exists even on freestanding compilers. */
21724
21725#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021726# include <limits.h>
21727#else
21728# include <assert.h>
21729#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021730
21731#undef gethostbyname_r
21732
Thomas Wouters477c8d52006-05-27 19:21:47 +000021733/* Override any GCC internal prototype to avoid an error.
21734 Use char because int might match the return type of a GCC
21735 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021736#ifdef __cplusplus
21737extern "C"
21738#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021739char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021740/* The GNU C library defines this for functions which it implements
21741 to always fail with ENOSYS. Some functions are actually named
21742 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000021743#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021744choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021745#endif
21746
Skip Montanaro6dead952003-09-25 14:50:04 +000021747int
21748main ()
21749{
Thomas Wouters477c8d52006-05-27 19:21:47 +000021750return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021751 ;
21752 return 0;
21753}
21754_ACEOF
21755rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021756if { (ac_try="$ac_link"
21757case "(($ac_try" in
21758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21759 *) ac_try_echo=$ac_try;;
21760esac
21761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21762 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021764 grep -v '^ *+' conftest.er1 >conftest.err
21765 rm -f conftest.er1
21766 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21768 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021769 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21770 { (case "(($ac_try" in
21771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21772 *) ac_try_echo=$ac_try;;
21773esac
21774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21775 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021776 ac_status=$?
21777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21778 (exit $ac_status); }; } &&
21779 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021780 { (case "(($ac_try" in
21781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21782 *) ac_try_echo=$ac_try;;
21783esac
21784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21785 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021786 ac_status=$?
21787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21788 (exit $ac_status); }; }; then
21789 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021790else
Martin v. Löwis11437992002-04-12 09:54:03 +000021791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021792sed 's/^/| /' conftest.$ac_ext >&5
21793
Thomas Wouters477c8d52006-05-27 19:21:47 +000021794 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021795fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021796
Skip Montanarof0d5f792004-08-15 14:08:23 +000021797rm -f conftest.err conftest.$ac_objext \
21798 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021799fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021800{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21801echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021802if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021803
Martin v. Löwis11437992002-04-12 09:54:03 +000021804 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021805#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021806_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021807
Thomas Wouters477c8d52006-05-27 19:21:47 +000021808 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21809echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021810 OLD_CFLAGS=$CFLAGS
21811 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021813/* confdefs.h. */
21814_ACEOF
21815cat confdefs.h >>conftest.$ac_ext
21816cat >>conftest.$ac_ext <<_ACEOF
21817/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021818
21819# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021820
Martin v. Löwis11437992002-04-12 09:54:03 +000021821int
21822main ()
21823{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021824
21825 char *name;
21826 struct hostent *he, *res;
21827 char buffer[2048];
21828 int buflen = 2048;
21829 int h_errnop;
21830
21831 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021832
21833 ;
21834 return 0;
21835}
21836_ACEOF
21837rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021838if { (ac_try="$ac_compile"
21839case "(($ac_try" in
21840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21841 *) ac_try_echo=$ac_try;;
21842esac
21843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21844 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021846 grep -v '^ *+' conftest.er1 >conftest.err
21847 rm -f conftest.er1
21848 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21850 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021851 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21852 { (case "(($ac_try" in
21853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21854 *) ac_try_echo=$ac_try;;
21855esac
21856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21857 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021858 ac_status=$?
21859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21860 (exit $ac_status); }; } &&
21861 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021862 { (case "(($ac_try" in
21863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21864 *) ac_try_echo=$ac_try;;
21865esac
21866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21867 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021868 ac_status=$?
21869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21870 (exit $ac_status); }; }; then
21871
21872 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021873#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021874_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021875
Martin v. Löwis11437992002-04-12 09:54:03 +000021876
21877cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021878#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021879_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021880
Thomas Wouters477c8d52006-05-27 19:21:47 +000021881 { echo "$as_me:$LINENO: result: yes" >&5
21882echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021883
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021884else
Martin v. Löwis11437992002-04-12 09:54:03 +000021885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021886sed 's/^/| /' conftest.$ac_ext >&5
21887
Martin v. Löwis11437992002-04-12 09:54:03 +000021888
Thomas Wouters477c8d52006-05-27 19:21:47 +000021889 { echo "$as_me:$LINENO: result: no" >&5
21890echo "${ECHO_T}no" >&6; }
21891 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21892echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021893 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021894/* confdefs.h. */
21895_ACEOF
21896cat confdefs.h >>conftest.$ac_ext
21897cat >>conftest.$ac_ext <<_ACEOF
21898/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021899
21900# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021901
Martin v. Löwis11437992002-04-12 09:54:03 +000021902int
21903main ()
21904{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021905
21906 char *name;
21907 struct hostent *he;
21908 char buffer[2048];
21909 int buflen = 2048;
21910 int h_errnop;
21911
21912 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021913
21914 ;
21915 return 0;
21916}
21917_ACEOF
21918rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021919if { (ac_try="$ac_compile"
21920case "(($ac_try" in
21921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21922 *) ac_try_echo=$ac_try;;
21923esac
21924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021927 grep -v '^ *+' conftest.er1 >conftest.err
21928 rm -f conftest.er1
21929 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21931 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021932 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
21933 { (case "(($ac_try" in
21934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21935 *) ac_try_echo=$ac_try;;
21936esac
21937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21938 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021939 ac_status=$?
21940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21941 (exit $ac_status); }; } &&
21942 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021943 { (case "(($ac_try" in
21944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21945 *) ac_try_echo=$ac_try;;
21946esac
21947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21948 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021949 ac_status=$?
21950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21951 (exit $ac_status); }; }; then
21952
21953 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021954#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021955_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021956
Martin v. Löwis11437992002-04-12 09:54:03 +000021957
21958cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021959#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021960_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021961
Thomas Wouters477c8d52006-05-27 19:21:47 +000021962 { echo "$as_me:$LINENO: result: yes" >&5
21963echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021964
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021965else
Martin v. Löwis11437992002-04-12 09:54:03 +000021966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021967sed 's/^/| /' conftest.$ac_ext >&5
21968
Martin v. Löwis11437992002-04-12 09:54:03 +000021969
Thomas Wouters477c8d52006-05-27 19:21:47 +000021970 { echo "$as_me:$LINENO: result: no" >&5
21971echo "${ECHO_T}no" >&6; }
21972 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21973echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021975/* confdefs.h. */
21976_ACEOF
21977cat confdefs.h >>conftest.$ac_ext
21978cat >>conftest.$ac_ext <<_ACEOF
21979/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021980
21981# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021982
Martin v. Löwis11437992002-04-12 09:54:03 +000021983int
21984main ()
21985{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021986
21987 char *name;
21988 struct hostent *he;
21989 struct hostent_data data;
21990
21991 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021992
21993 ;
21994 return 0;
21995}
21996_ACEOF
21997rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000021998if { (ac_try="$ac_compile"
21999case "(($ac_try" in
22000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22001 *) ac_try_echo=$ac_try;;
22002esac
22003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22004 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022006 grep -v '^ *+' conftest.er1 >conftest.err
22007 rm -f conftest.er1
22008 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22010 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022011 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22012 { (case "(($ac_try" in
22013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22014 *) ac_try_echo=$ac_try;;
22015esac
22016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22017 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022018 ac_status=$?
22019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22020 (exit $ac_status); }; } &&
22021 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022022 { (case "(($ac_try" in
22023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22024 *) ac_try_echo=$ac_try;;
22025esac
22026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22027 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022028 ac_status=$?
22029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22030 (exit $ac_status); }; }; then
22031
22032 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022033#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022034_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022035
Martin v. Löwis11437992002-04-12 09:54:03 +000022036
22037cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022038#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022039_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022040
Thomas Wouters477c8d52006-05-27 19:21:47 +000022041 { echo "$as_me:$LINENO: result: yes" >&5
22042echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022043
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022044else
Martin v. Löwis11437992002-04-12 09:54:03 +000022045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022046sed 's/^/| /' conftest.$ac_ext >&5
22047
Martin v. Löwis11437992002-04-12 09:54:03 +000022048
Thomas Wouters477c8d52006-05-27 19:21:47 +000022049 { echo "$as_me:$LINENO: result: no" >&5
22050echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022051
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022052fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022053
Skip Montanarof0d5f792004-08-15 14:08:23 +000022054rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022055
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022056fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022057
Skip Montanarof0d5f792004-08-15 14:08:23 +000022058rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022059
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022060fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022061
Skip Montanarof0d5f792004-08-15 14:08:23 +000022062rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022063 CFLAGS=$OLD_CFLAGS
22064
22065else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022066
Martin v. Löwis11437992002-04-12 09:54:03 +000022067
22068for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022069do
Martin v. Löwis11437992002-04-12 09:54:03 +000022070as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000022071{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22072echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22073if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022074 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022075else
Martin v. Löwis11437992002-04-12 09:54:03 +000022076 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022077/* confdefs.h. */
22078_ACEOF
22079cat confdefs.h >>conftest.$ac_ext
22080cat >>conftest.$ac_ext <<_ACEOF
22081/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022082/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22083 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22084#define $ac_func innocuous_$ac_func
22085
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022086/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022087 which can conflict with char $ac_func (); below.
22088 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022089 <limits.h> exists even on freestanding compilers. */
22090
22091#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022092# include <limits.h>
22093#else
22094# include <assert.h>
22095#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022096
22097#undef $ac_func
22098
Thomas Wouters477c8d52006-05-27 19:21:47 +000022099/* Override any GCC internal prototype to avoid an error.
22100 Use char because int might match the return type of a GCC
22101 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022102#ifdef __cplusplus
22103extern "C"
22104#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022105char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022106/* The GNU C library defines this for functions which it implements
22107 to always fail with ENOSYS. Some functions are actually named
22108 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000022109#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022110choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022111#endif
22112
Skip Montanaro6dead952003-09-25 14:50:04 +000022113int
22114main ()
22115{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022116return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022117 ;
22118 return 0;
22119}
22120_ACEOF
22121rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022122if { (ac_try="$ac_link"
22123case "(($ac_try" in
22124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22125 *) ac_try_echo=$ac_try;;
22126esac
22127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22128 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022130 grep -v '^ *+' conftest.er1 >conftest.err
22131 rm -f conftest.er1
22132 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22134 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022135 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22136 { (case "(($ac_try" in
22137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22138 *) ac_try_echo=$ac_try;;
22139esac
22140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22141 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022142 ac_status=$?
22143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22144 (exit $ac_status); }; } &&
22145 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022146 { (case "(($ac_try" in
22147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22148 *) ac_try_echo=$ac_try;;
22149esac
22150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22151 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022152 ac_status=$?
22153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22154 (exit $ac_status); }; }; then
22155 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022156else
Martin v. Löwis11437992002-04-12 09:54:03 +000022157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022158sed 's/^/| /' conftest.$ac_ext >&5
22159
Thomas Wouters477c8d52006-05-27 19:21:47 +000022160 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022161fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022162
Skip Montanarof0d5f792004-08-15 14:08:23 +000022163rm -f conftest.err conftest.$ac_objext \
22164 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022165fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022166ac_res=`eval echo '${'$as_ac_var'}'`
22167 { echo "$as_me:$LINENO: result: $ac_res" >&5
22168echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022169if test `eval echo '${'$as_ac_var'}'` = yes; then
22170 cat >>confdefs.h <<_ACEOF
22171#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22172_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022173
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022174fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022175done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022176
Michael W. Hudson54241132001-12-07 15:38:26 +000022177
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022178fi
22179
Michael W. Hudson54241132001-12-07 15:38:26 +000022180
22181
22182
22183
22184
22185
Guido van Rossum627b2d71993-12-24 10:39:16 +000022186# checks for system services
22187# (none yet)
22188
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022189# Linux requires this for correct f.p. operations
Thomas Wouters477c8d52006-05-27 19:21:47 +000022190{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22191echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022192if test "${ac_cv_func___fpu_control+set}" = set; then
22193 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022194else
Martin v. Löwis11437992002-04-12 09:54:03 +000022195 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022196/* confdefs.h. */
22197_ACEOF
22198cat confdefs.h >>conftest.$ac_ext
22199cat >>conftest.$ac_ext <<_ACEOF
22200/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022201/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22202 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22203#define __fpu_control innocuous___fpu_control
22204
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022205/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022206 which can conflict with char __fpu_control (); below.
22207 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022208 <limits.h> exists even on freestanding compilers. */
22209
22210#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022211# include <limits.h>
22212#else
22213# include <assert.h>
22214#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022215
22216#undef __fpu_control
22217
Thomas Wouters477c8d52006-05-27 19:21:47 +000022218/* Override any GCC internal prototype to avoid an error.
22219 Use char because int might match the return type of a GCC
22220 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022221#ifdef __cplusplus
22222extern "C"
22223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022224char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022225/* The GNU C library defines this for functions which it implements
22226 to always fail with ENOSYS. Some functions are actually named
22227 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000022228#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022229choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022230#endif
22231
Skip Montanaro6dead952003-09-25 14:50:04 +000022232int
22233main ()
22234{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022235return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022236 ;
22237 return 0;
22238}
22239_ACEOF
22240rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022241if { (ac_try="$ac_link"
22242case "(($ac_try" in
22243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22244 *) ac_try_echo=$ac_try;;
22245esac
22246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22247 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022249 grep -v '^ *+' conftest.er1 >conftest.err
22250 rm -f conftest.er1
22251 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22253 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022254 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22255 { (case "(($ac_try" in
22256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22257 *) ac_try_echo=$ac_try;;
22258esac
22259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22260 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022261 ac_status=$?
22262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22263 (exit $ac_status); }; } &&
22264 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022265 { (case "(($ac_try" in
22266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22267 *) ac_try_echo=$ac_try;;
22268esac
22269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22270 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022271 ac_status=$?
22272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22273 (exit $ac_status); }; }; then
22274 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022275else
Martin v. Löwis11437992002-04-12 09:54:03 +000022276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022277sed 's/^/| /' conftest.$ac_ext >&5
22278
Thomas Wouters477c8d52006-05-27 19:21:47 +000022279 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022280fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022281
Skip Montanarof0d5f792004-08-15 14:08:23 +000022282rm -f conftest.err conftest.$ac_objext \
22283 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022284fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022285{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22286echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022287if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022288 :
22289else
Martin v. Löwis11437992002-04-12 09:54:03 +000022290
Thomas Wouters477c8d52006-05-27 19:21:47 +000022291{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22292echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022293if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
22294 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022295else
Martin v. Löwis11437992002-04-12 09:54:03 +000022296 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022297LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022298cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022299/* confdefs.h. */
22300_ACEOF
22301cat confdefs.h >>conftest.$ac_ext
22302cat >>conftest.$ac_ext <<_ACEOF
22303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022304
Thomas Wouters477c8d52006-05-27 19:21:47 +000022305/* Override any GCC internal prototype to avoid an error.
22306 Use char because int might match the return type of a GCC
22307 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022308#ifdef __cplusplus
22309extern "C"
22310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022311char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022312int
22313main ()
22314{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022315return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022316 ;
22317 return 0;
22318}
22319_ACEOF
22320rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022321if { (ac_try="$ac_link"
22322case "(($ac_try" in
22323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22324 *) ac_try_echo=$ac_try;;
22325esac
22326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22327 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022329 grep -v '^ *+' conftest.er1 >conftest.err
22330 rm -f conftest.er1
22331 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22333 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022334 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22335 { (case "(($ac_try" in
22336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22337 *) ac_try_echo=$ac_try;;
22338esac
22339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22340 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022341 ac_status=$?
22342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22343 (exit $ac_status); }; } &&
22344 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022345 { (case "(($ac_try" in
22346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22347 *) ac_try_echo=$ac_try;;
22348esac
22349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22350 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022351 ac_status=$?
22352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22353 (exit $ac_status); }; }; then
22354 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022355else
Martin v. Löwis11437992002-04-12 09:54:03 +000022356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022357sed 's/^/| /' conftest.$ac_ext >&5
22358
Thomas Wouters477c8d52006-05-27 19:21:47 +000022359 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022360fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022361
Skip Montanarof0d5f792004-08-15 14:08:23 +000022362rm -f conftest.err conftest.$ac_objext \
22363 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022364LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022365fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022366{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22367echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022368if test $ac_cv_lib_ieee___fpu_control = yes; then
22369 cat >>confdefs.h <<_ACEOF
22370#define HAVE_LIBIEEE 1
22371_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022372
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022373 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022374
Guido van Rossum627b2d71993-12-24 10:39:16 +000022375fi
22376
Michael W. Hudson54241132001-12-07 15:38:26 +000022377
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022378fi
22379
Michael W. Hudson54241132001-12-07 15:38:26 +000022380
Guido van Rossum7f253911997-05-09 02:42:48 +000022381# Check for --with-fpectl
Thomas Wouters477c8d52006-05-27 19:21:47 +000022382{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22383echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022384
Thomas Wouters477c8d52006-05-27 19:21:47 +000022385# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022386if test "${with_fpectl+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022387 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022388if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022389then
22390
22391cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022392#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022393_ACEOF
22394
Thomas Wouters477c8d52006-05-27 19:21:47 +000022395 { echo "$as_me:$LINENO: result: yes" >&5
22396echo "${ECHO_T}yes" >&6; }
22397else { echo "$as_me:$LINENO: result: no" >&5
22398echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022399fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022400else
Thomas Wouters477c8d52006-05-27 19:21:47 +000022401 { echo "$as_me:$LINENO: result: no" >&5
22402echo "${ECHO_T}no" >&6; }
22403fi
22404
Guido van Rossum7f253911997-05-09 02:42:48 +000022405
Guido van Rossum7f43da71994-08-01 12:15:30 +000022406# check for --with-libm=...
22407
Guido van Rossum563e7081996-09-10 18:20:48 +000022408case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022409Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000022410BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022411*) LIBM=-lm
22412esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000022413{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22414echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022415
Thomas Wouters477c8d52006-05-27 19:21:47 +000022416# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022417if test "${with_libm+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022418 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022419if test "$withval" = no
22420then LIBM=
Thomas Wouters477c8d52006-05-27 19:21:47 +000022421 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22422echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022423elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022424then LIBM=$withval
Thomas Wouters477c8d52006-05-27 19:21:47 +000022425 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22426echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022427else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22428echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
22429 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022430fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022431else
Thomas Wouters477c8d52006-05-27 19:21:47 +000022432 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22433echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
22434fi
22435
Guido van Rossum7f43da71994-08-01 12:15:30 +000022436
22437# check for --with-libc=...
22438
Thomas Wouters477c8d52006-05-27 19:21:47 +000022439{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22440echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022441
Thomas Wouters477c8d52006-05-27 19:21:47 +000022442# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022443if test "${with_libc+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022444 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022445if test "$withval" = no
22446then LIBC=
Thomas Wouters477c8d52006-05-27 19:21:47 +000022447 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22448echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022449elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022450then LIBC=$withval
Thomas Wouters477c8d52006-05-27 19:21:47 +000022451 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22452echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022453else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22454echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
22455 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022456fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022457else
Thomas Wouters477c8d52006-05-27 19:21:47 +000022458 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22459echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
22460fi
22461
Guido van Rossum7f43da71994-08-01 12:15:30 +000022462
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022463# check for hypot() in math library
22464LIBS_SAVE=$LIBS
22465LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000022466
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022467for ac_func in hypot
22468do
Martin v. Löwis11437992002-04-12 09:54:03 +000022469as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Thomas Wouters477c8d52006-05-27 19:21:47 +000022470{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22471echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22472if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022473 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022474else
Martin v. Löwis11437992002-04-12 09:54:03 +000022475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022476/* confdefs.h. */
22477_ACEOF
22478cat confdefs.h >>conftest.$ac_ext
22479cat >>conftest.$ac_ext <<_ACEOF
22480/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022481/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22482 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22483#define $ac_func innocuous_$ac_func
22484
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022485/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022486 which can conflict with char $ac_func (); below.
22487 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022488 <limits.h> exists even on freestanding compilers. */
22489
22490#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022491# include <limits.h>
22492#else
22493# include <assert.h>
22494#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022495
22496#undef $ac_func
22497
Thomas Wouters477c8d52006-05-27 19:21:47 +000022498/* Override any GCC internal prototype to avoid an error.
22499 Use char because int might match the return type of a GCC
22500 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022501#ifdef __cplusplus
22502extern "C"
22503#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022504char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022505/* The GNU C library defines this for functions which it implements
22506 to always fail with ENOSYS. Some functions are actually named
22507 something starting with __ and the normal name is an alias. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000022508#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022509choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022510#endif
22511
Skip Montanaro6dead952003-09-25 14:50:04 +000022512int
22513main ()
22514{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022515return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022516 ;
22517 return 0;
22518}
22519_ACEOF
22520rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022521if { (ac_try="$ac_link"
22522case "(($ac_try" in
22523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22524 *) ac_try_echo=$ac_try;;
22525esac
22526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22527 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022529 grep -v '^ *+' conftest.er1 >conftest.err
22530 rm -f conftest.er1
22531 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22533 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022534 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22535 { (case "(($ac_try" in
22536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22537 *) ac_try_echo=$ac_try;;
22538esac
22539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22540 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022541 ac_status=$?
22542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22543 (exit $ac_status); }; } &&
22544 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022545 { (case "(($ac_try" in
22546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22547 *) ac_try_echo=$ac_try;;
22548esac
22549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22550 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022551 ac_status=$?
22552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22553 (exit $ac_status); }; }; then
22554 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022555else
Martin v. Löwis11437992002-04-12 09:54:03 +000022556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022557sed 's/^/| /' conftest.$ac_ext >&5
22558
Thomas Wouters477c8d52006-05-27 19:21:47 +000022559 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022560fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022561
Skip Montanarof0d5f792004-08-15 14:08:23 +000022562rm -f conftest.err conftest.$ac_objext \
22563 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022564fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022565ac_res=`eval echo '${'$as_ac_var'}'`
22566 { echo "$as_me:$LINENO: result: $ac_res" >&5
22567echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022568if test `eval echo '${'$as_ac_var'}'` = yes; then
22569 cat >>confdefs.h <<_ACEOF
22570#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22571_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000022572
Michael W. Hudson54241132001-12-07 15:38:26 +000022573else
Thomas Wouters477c8d52006-05-27 19:21:47 +000022574 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022575 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000022576 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
22577 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022578esac
22579
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022580fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022581done
22582
Michael W. Hudson54241132001-12-07 15:38:26 +000022583
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022584LIBS=$LIBS_SAVE
22585
Guido van Rossumef2255b2000-03-10 22:30:29 +000022586# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022587if test "${ac_cv_header_wchar_h+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022588 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22589echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022590if test "${ac_cv_header_wchar_h+set}" = set; then
22591 echo $ECHO_N "(cached) $ECHO_C" >&6
22592fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022593{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22594echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022595else
Martin v. Löwis11437992002-04-12 09:54:03 +000022596 # Is the header compilable?
Thomas Wouters477c8d52006-05-27 19:21:47 +000022597{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22598echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022599cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022600/* confdefs.h. */
22601_ACEOF
22602cat confdefs.h >>conftest.$ac_ext
22603cat >>conftest.$ac_ext <<_ACEOF
22604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022605$ac_includes_default
22606#include <wchar.h>
22607_ACEOF
22608rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022609if { (ac_try="$ac_compile"
22610case "(($ac_try" in
22611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22612 *) ac_try_echo=$ac_try;;
22613esac
22614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22615 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022617 grep -v '^ *+' conftest.er1 >conftest.err
22618 rm -f conftest.er1
22619 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22621 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022622 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22623 { (case "(($ac_try" in
22624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22625 *) ac_try_echo=$ac_try;;
22626esac
22627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22628 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022629 ac_status=$?
22630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22631 (exit $ac_status); }; } &&
22632 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022633 { (case "(($ac_try" in
22634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22635 *) ac_try_echo=$ac_try;;
22636esac
22637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22638 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022639 ac_status=$?
22640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22641 (exit $ac_status); }; }; then
22642 ac_header_compiler=yes
22643else
22644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022645sed 's/^/| /' conftest.$ac_ext >&5
22646
Thomas Wouters477c8d52006-05-27 19:21:47 +000022647 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022648fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022649
Skip Montanarof0d5f792004-08-15 14:08:23 +000022650rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000022651{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22652echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022653
22654# Is the header present?
Thomas Wouters477c8d52006-05-27 19:21:47 +000022655{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22656echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022657cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022658/* confdefs.h. */
22659_ACEOF
22660cat confdefs.h >>conftest.$ac_ext
22661cat >>conftest.$ac_ext <<_ACEOF
22662/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022663#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022664_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022665if { (ac_try="$ac_cpp conftest.$ac_ext"
22666case "(($ac_try" in
22667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22668 *) ac_try_echo=$ac_try;;
22669esac
22670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22671 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022672 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022673 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022674 rm -f conftest.er1
22675 cat conftest.err >&5
22676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22677 (exit $ac_status); } >/dev/null; then
22678 if test -s conftest.err; then
22679 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000022680 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000022681 else
22682 ac_cpp_err=
22683 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022684else
Martin v. Löwis11437992002-04-12 09:54:03 +000022685 ac_cpp_err=yes
22686fi
22687if test -z "$ac_cpp_err"; then
22688 ac_header_preproc=yes
22689else
22690 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022691sed 's/^/| /' conftest.$ac_ext >&5
22692
Martin v. Löwis11437992002-04-12 09:54:03 +000022693 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022694fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022695
Martin v. Löwis11437992002-04-12 09:54:03 +000022696rm -f conftest.err conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000022697{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22698echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022699
22700# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022701case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22702 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000022703 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22704echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022705 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22706echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
22707 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022708 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022709 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022710 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22711echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022712 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22713echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22714 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22715echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22716 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22717echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022718 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22719echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022720 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22721echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000022722 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000022723## ------------------------------------------------ ##
22724## Report this to http://www.python.org/python-bugs ##
22725## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022726_ASBOX
Thomas Wouters477c8d52006-05-27 19:21:47 +000022727 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022728 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022729esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000022730{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22731echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022732if test "${ac_cv_header_wchar_h+set}" = set; then
22733 echo $ECHO_N "(cached) $ECHO_C" >&6
22734else
22735 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022736fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022737{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22738echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022739
22740fi
22741if test $ac_cv_header_wchar_h = yes; then
22742
22743
22744cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022745#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022746_ACEOF
22747
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022748 wchar_h="yes"
22749
Guido van Rossumef2255b2000-03-10 22:30:29 +000022750else
Martin v. Löwis11437992002-04-12 09:54:03 +000022751 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022752
22753fi
22754
Michael W. Hudson54241132001-12-07 15:38:26 +000022755
Martin v. Löwis11437992002-04-12 09:54:03 +000022756
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022757# determine wchar_t size
22758if test "$wchar_h" = yes
22759then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022760 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22761echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022762if test "${ac_cv_type_wchar_t+set}" = set; then
22763 echo $ECHO_N "(cached) $ECHO_C" >&6
22764else
22765 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022766/* confdefs.h. */
22767_ACEOF
22768cat confdefs.h >>conftest.$ac_ext
22769cat >>conftest.$ac_ext <<_ACEOF
22770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022771#include <wchar.h>
22772
Thomas Wouters477c8d52006-05-27 19:21:47 +000022773typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022774int
22775main ()
22776{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022777if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022778 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000022779if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000022780 return 0;
22781 ;
22782 return 0;
22783}
22784_ACEOF
22785rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022786if { (ac_try="$ac_compile"
22787case "(($ac_try" in
22788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22789 *) ac_try_echo=$ac_try;;
22790esac
22791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022794 grep -v '^ *+' conftest.er1 >conftest.err
22795 rm -f conftest.er1
22796 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22798 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022799 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22800 { (case "(($ac_try" in
22801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22802 *) ac_try_echo=$ac_try;;
22803esac
22804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22805 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022806 ac_status=$?
22807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22808 (exit $ac_status); }; } &&
22809 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022810 { (case "(($ac_try" in
22811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22812 *) ac_try_echo=$ac_try;;
22813esac
22814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22815 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022816 ac_status=$?
22817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22818 (exit $ac_status); }; }; then
22819 ac_cv_type_wchar_t=yes
22820else
22821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022822sed 's/^/| /' conftest.$ac_ext >&5
22823
Thomas Wouters477c8d52006-05-27 19:21:47 +000022824 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022825fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022826
Skip Montanarof0d5f792004-08-15 14:08:23 +000022827rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022828fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022829{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22830echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022831
Thomas Wouters477c8d52006-05-27 19:21:47 +000022832{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22833echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022834if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22835 echo $ECHO_N "(cached) $ECHO_C" >&6
22836else
22837 if test "$ac_cv_type_wchar_t" = yes; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000022838 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwis11437992002-04-12 09:54:03 +000022839 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22840 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22841 # This bug is HP SR number 8606223364.
22842 if test "$cross_compiling" = yes; then
22843 # Depending upon the size, compute the lo and hi bounds.
22844cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022845/* confdefs.h. */
22846_ACEOF
22847cat confdefs.h >>conftest.$ac_ext
22848cat >>conftest.$ac_ext <<_ACEOF
22849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022850#include <wchar.h>
22851
Thomas Wouters477c8d52006-05-27 19:21:47 +000022852 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022853int
22854main ()
22855{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022856static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022857test_array [0] = 0
22858
22859 ;
22860 return 0;
22861}
22862_ACEOF
22863rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022864if { (ac_try="$ac_compile"
22865case "(($ac_try" in
22866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22867 *) ac_try_echo=$ac_try;;
22868esac
22869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22870 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022872 grep -v '^ *+' conftest.er1 >conftest.err
22873 rm -f conftest.er1
22874 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22876 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022877 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22878 { (case "(($ac_try" in
22879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22880 *) ac_try_echo=$ac_try;;
22881esac
22882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22883 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022884 ac_status=$?
22885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22886 (exit $ac_status); }; } &&
22887 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022888 { (case "(($ac_try" in
22889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22890 *) ac_try_echo=$ac_try;;
22891esac
22892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22893 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022894 ac_status=$?
22895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22896 (exit $ac_status); }; }; then
22897 ac_lo=0 ac_mid=0
22898 while :; do
22899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022900/* confdefs.h. */
22901_ACEOF
22902cat confdefs.h >>conftest.$ac_ext
22903cat >>conftest.$ac_ext <<_ACEOF
22904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022905#include <wchar.h>
22906
Thomas Wouters477c8d52006-05-27 19:21:47 +000022907 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022908int
22909main ()
22910{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022911static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022912test_array [0] = 0
22913
22914 ;
22915 return 0;
22916}
22917_ACEOF
22918rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022919if { (ac_try="$ac_compile"
22920case "(($ac_try" in
22921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22922 *) ac_try_echo=$ac_try;;
22923esac
22924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022927 grep -v '^ *+' conftest.er1 >conftest.err
22928 rm -f conftest.er1
22929 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22931 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022932 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
22933 { (case "(($ac_try" in
22934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22935 *) ac_try_echo=$ac_try;;
22936esac
22937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22938 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022939 ac_status=$?
22940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22941 (exit $ac_status); }; } &&
22942 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022943 { (case "(($ac_try" in
22944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22945 *) ac_try_echo=$ac_try;;
22946esac
22947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22948 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022949 ac_status=$?
22950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22951 (exit $ac_status); }; }; then
22952 ac_hi=$ac_mid; break
22953else
22954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022955sed 's/^/| /' conftest.$ac_ext >&5
22956
Thomas Wouters477c8d52006-05-27 19:21:47 +000022957 ac_lo=`expr $ac_mid + 1`
22958 if test $ac_lo -le $ac_mid; then
22959 ac_lo= ac_hi=
22960 break
22961 fi
22962 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022963fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022964
Skip Montanarof0d5f792004-08-15 14:08:23 +000022965rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022966 done
22967else
22968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022969sed 's/^/| /' conftest.$ac_ext >&5
22970
Thomas Wouters477c8d52006-05-27 19:21:47 +000022971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022972/* confdefs.h. */
22973_ACEOF
22974cat confdefs.h >>conftest.$ac_ext
22975cat >>conftest.$ac_ext <<_ACEOF
22976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022977#include <wchar.h>
22978
Thomas Wouters477c8d52006-05-27 19:21:47 +000022979 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022980int
22981main ()
22982{
Thomas Wouters477c8d52006-05-27 19:21:47 +000022983static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022984test_array [0] = 0
22985
22986 ;
22987 return 0;
22988}
22989_ACEOF
22990rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000022991if { (ac_try="$ac_compile"
22992case "(($ac_try" in
22993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22994 *) ac_try_echo=$ac_try;;
22995esac
22996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22997 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022998 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022999 grep -v '^ *+' conftest.er1 >conftest.err
23000 rm -f conftest.er1
23001 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23003 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023004 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23005 { (case "(($ac_try" in
23006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23007 *) ac_try_echo=$ac_try;;
23008esac
23009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23010 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023011 ac_status=$?
23012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23013 (exit $ac_status); }; } &&
23014 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023015 { (case "(($ac_try" in
23016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23017 *) ac_try_echo=$ac_try;;
23018esac
23019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23020 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023021 ac_status=$?
23022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23023 (exit $ac_status); }; }; then
23024 ac_hi=-1 ac_mid=-1
23025 while :; do
23026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023027/* confdefs.h. */
23028_ACEOF
23029cat confdefs.h >>conftest.$ac_ext
23030cat >>conftest.$ac_ext <<_ACEOF
23031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023032#include <wchar.h>
23033
Thomas Wouters477c8d52006-05-27 19:21:47 +000023034 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023035int
23036main ()
23037{
Thomas Wouters477c8d52006-05-27 19:21:47 +000023038static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023039test_array [0] = 0
23040
23041 ;
23042 return 0;
23043}
23044_ACEOF
23045rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023046if { (ac_try="$ac_compile"
23047case "(($ac_try" in
23048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23049 *) ac_try_echo=$ac_try;;
23050esac
23051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023054 grep -v '^ *+' conftest.er1 >conftest.err
23055 rm -f conftest.er1
23056 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23058 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023059 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23060 { (case "(($ac_try" in
23061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23062 *) ac_try_echo=$ac_try;;
23063esac
23064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23065 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023066 ac_status=$?
23067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23068 (exit $ac_status); }; } &&
23069 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023070 { (case "(($ac_try" in
23071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23072 *) ac_try_echo=$ac_try;;
23073esac
23074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23075 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023076 ac_status=$?
23077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23078 (exit $ac_status); }; }; then
23079 ac_lo=$ac_mid; break
23080else
23081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023082sed 's/^/| /' conftest.$ac_ext >&5
23083
Thomas Wouters477c8d52006-05-27 19:21:47 +000023084 ac_hi=`expr '(' $ac_mid ')' - 1`
23085 if test $ac_mid -le $ac_hi; then
23086 ac_lo= ac_hi=
23087 break
23088 fi
23089 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000023090fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023091
Skip Montanarof0d5f792004-08-15 14:08:23 +000023092rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023093 done
23094else
23095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023096sed 's/^/| /' conftest.$ac_ext >&5
23097
Thomas Wouters477c8d52006-05-27 19:21:47 +000023098 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023099fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023100
Skip Montanarof0d5f792004-08-15 14:08:23 +000023101rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023102fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023103
Skip Montanarof0d5f792004-08-15 14:08:23 +000023104rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023105# Binary search between lo and hi bounds.
23106while test "x$ac_lo" != "x$ac_hi"; do
23107 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023109/* confdefs.h. */
23110_ACEOF
23111cat confdefs.h >>conftest.$ac_ext
23112cat >>conftest.$ac_ext <<_ACEOF
23113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023114#include <wchar.h>
23115
Thomas Wouters477c8d52006-05-27 19:21:47 +000023116 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023117int
23118main ()
23119{
Thomas Wouters477c8d52006-05-27 19:21:47 +000023120static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023121test_array [0] = 0
23122
23123 ;
23124 return 0;
23125}
23126_ACEOF
23127rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023128if { (ac_try="$ac_compile"
23129case "(($ac_try" in
23130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23131 *) ac_try_echo=$ac_try;;
23132esac
23133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23134 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023136 grep -v '^ *+' conftest.er1 >conftest.err
23137 rm -f conftest.er1
23138 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23140 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023141 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23142 { (case "(($ac_try" in
23143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23144 *) ac_try_echo=$ac_try;;
23145esac
23146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23147 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023148 ac_status=$?
23149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23150 (exit $ac_status); }; } &&
23151 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023152 { (case "(($ac_try" in
23153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23154 *) ac_try_echo=$ac_try;;
23155esac
23156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23157 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023158 ac_status=$?
23159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23160 (exit $ac_status); }; }; then
23161 ac_hi=$ac_mid
23162else
23163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023164sed 's/^/| /' conftest.$ac_ext >&5
23165
Thomas Wouters477c8d52006-05-27 19:21:47 +000023166 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023167fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023168
Skip Montanarof0d5f792004-08-15 14:08:23 +000023169rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023170done
23171case $ac_lo in
23172?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000023173'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023174See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000023175echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023176See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000023177 { (exit 77); exit 77; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023178esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023179else
Martin v. Löwis11437992002-04-12 09:54:03 +000023180 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023181/* confdefs.h. */
23182_ACEOF
23183cat confdefs.h >>conftest.$ac_ext
23184cat >>conftest.$ac_ext <<_ACEOF
23185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023186#include <wchar.h>
23187
Thomas Wouters477c8d52006-05-27 19:21:47 +000023188 typedef wchar_t ac__type_sizeof_;
23189static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
23190static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023191#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023192#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023193int
23194main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023195{
Martin v. Löwis11437992002-04-12 09:54:03 +000023196
23197 FILE *f = fopen ("conftest.val", "w");
23198 if (! f)
Thomas Wouters477c8d52006-05-27 19:21:47 +000023199 return 1;
23200 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023201 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000023202 long int i = longval ();
23203 if (i != ((long int) (sizeof (ac__type_sizeof_))))
23204 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000023205 fprintf (f, "%ld\n", i);
23206 }
23207 else
23208 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000023209 unsigned long int i = ulongval ();
23210 if (i != ((long int) (sizeof (ac__type_sizeof_))))
23211 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000023212 fprintf (f, "%lu\n", i);
23213 }
Thomas Wouters477c8d52006-05-27 19:21:47 +000023214 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023215
23216 ;
23217 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023218}
Martin v. Löwis11437992002-04-12 09:54:03 +000023219_ACEOF
23220rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023221if { (ac_try="$ac_link"
23222case "(($ac_try" in
23223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23224 *) ac_try_echo=$ac_try;;
23225esac
23226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23227 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023228 ac_status=$?
23229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23230 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023231 { (case "(($ac_try" in
23232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23233 *) ac_try_echo=$ac_try;;
23234esac
23235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23236 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023237 ac_status=$?
23238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23239 (exit $ac_status); }; }; then
23240 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023241else
Martin v. Löwis11437992002-04-12 09:54:03 +000023242 echo "$as_me: program exited with status $ac_status" >&5
23243echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023244sed 's/^/| /' conftest.$ac_ext >&5
23245
Martin v. Löwis11437992002-04-12 09:54:03 +000023246( exit $ac_status )
Thomas Wouters477c8d52006-05-27 19:21:47 +000023247{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023248See \`config.log' for more details." >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000023249echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023250See \`config.log' for more details." >&2;}
Thomas Wouters477c8d52006-05-27 19:21:47 +000023251 { (exit 77); exit 77; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023252fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023254fi
23255rm -f conftest.val
23256else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023257 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000023258fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023259fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023260{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23261echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023262cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023263#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023264_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023265
Michael W. Hudson54241132001-12-07 15:38:26 +000023266
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023267fi
23268
Thomas Wouters477c8d52006-05-27 19:21:47 +000023269{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23270echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023271have_ucs4_tcl=no
23272cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023273/* confdefs.h. */
23274_ACEOF
23275cat confdefs.h >>conftest.$ac_ext
23276cat >>conftest.$ac_ext <<_ACEOF
23277/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023278
23279#include <tcl.h>
23280#if TCL_UTF_MAX != 6
23281# error "NOT UCS4_TCL"
23282#endif
23283int
23284main ()
23285{
23286
23287 ;
23288 return 0;
23289}
23290_ACEOF
23291rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023292if { (ac_try="$ac_compile"
23293case "(($ac_try" in
23294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23295 *) ac_try_echo=$ac_try;;
23296esac
23297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23298 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023300 grep -v '^ *+' conftest.er1 >conftest.err
23301 rm -f conftest.er1
23302 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23304 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023305 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23306 { (case "(($ac_try" in
23307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23308 *) ac_try_echo=$ac_try;;
23309esac
23310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23311 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023312 ac_status=$?
23313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23314 (exit $ac_status); }; } &&
23315 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023316 { (case "(($ac_try" in
23317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23318 *) ac_try_echo=$ac_try;;
23319esac
23320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23321 (eval "$ac_try") 2>&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023322 ac_status=$?
23323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23324 (exit $ac_status); }; }; then
23325
23326
23327cat >>confdefs.h <<\_ACEOF
23328#define HAVE_UCS4_TCL 1
23329_ACEOF
23330
23331 have_ucs4_tcl=yes
23332
23333else
23334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023335sed 's/^/| /' conftest.$ac_ext >&5
23336
Thomas Wouters477c8d52006-05-27 19:21:47 +000023337
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023338fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023339
Skip Montanarof0d5f792004-08-15 14:08:23 +000023340rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000023341{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23342echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023343
Skip Montanaro6dead952003-09-25 14:50:04 +000023344# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023345if test "$wchar_h" = yes
23346then
23347 # check whether wchar_t is signed or not
Thomas Wouters477c8d52006-05-27 19:21:47 +000023348 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23349echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023350 if test "${ac_cv_wchar_t_signed+set}" = set; then
23351 echo $ECHO_N "(cached) $ECHO_C" >&6
23352else
23353
23354 if test "$cross_compiling" = yes; then
23355 ac_cv_wchar_t_signed=yes
23356else
23357 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023358/* confdefs.h. */
23359_ACEOF
23360cat confdefs.h >>conftest.$ac_ext
23361cat >>conftest.$ac_ext <<_ACEOF
23362/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023363
23364 #include <wchar.h>
23365 int main()
23366 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023367 /* Success: exit code 0 */
23368 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023369 }
23370
23371_ACEOF
23372rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023373if { (ac_try="$ac_link"
23374case "(($ac_try" in
23375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23376 *) ac_try_echo=$ac_try;;
23377esac
23378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23379 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023380 ac_status=$?
23381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23382 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023383 { (case "(($ac_try" in
23384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23385 *) ac_try_echo=$ac_try;;
23386esac
23387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23388 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023389 ac_status=$?
23390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23391 (exit $ac_status); }; }; then
23392 ac_cv_wchar_t_signed=yes
23393else
23394 echo "$as_me: program exited with status $ac_status" >&5
23395echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023396sed 's/^/| /' conftest.$ac_ext >&5
23397
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023398( exit $ac_status )
23399ac_cv_wchar_t_signed=no
23400fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023402fi
23403
Thomas Wouters477c8d52006-05-27 19:21:47 +000023404
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023405fi
23406
Thomas Wouters477c8d52006-05-27 19:21:47 +000023407 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23408echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
23409fi
23410
23411{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
23412echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
23413# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023414if test "${enable_unicode+set}" = set; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000023415 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023416else
23417 enable_unicode=yes
Thomas Wouters477c8d52006-05-27 19:21:47 +000023418fi
23419
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023420
23421if test $enable_unicode = yes
23422then
Martin v. Löwisfd917792001-06-27 20:22:04 +000023423 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023424 case "$have_ucs4_tcl" in
23425 yes) enable_unicode="ucs4"
23426 ;;
23427 *) enable_unicode="ucs2"
23428 ;;
23429 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023430fi
23431
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023432
23433
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023434case "$enable_unicode" in
23435ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000023436 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023437#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000023438_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023439
23440 ;;
23441ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000023442 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023443#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023444_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023445
23446 ;;
23447esac
23448
Michael W. Hudson54241132001-12-07 15:38:26 +000023449
Martin v. Löwis11437992002-04-12 09:54:03 +000023450
23451
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023452
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023453if test "$enable_unicode" = "no"
23454then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023455 UNICODE_OBJS=""
Thomas Wouters477c8d52006-05-27 19:21:47 +000023456 { echo "$as_me:$LINENO: result: not used" >&5
23457echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023458else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023459 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000023460
23461cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023462#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023463_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023464
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023465
23466 # wchar_t is only usable if it maps to an unsigned type
23467 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023468 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023469 then
23470 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023471
Martin v. Löwis11437992002-04-12 09:54:03 +000023472cat >>confdefs.h <<\_ACEOF
23473#define HAVE_USABLE_WCHAR_T 1
23474_ACEOF
23475
23476 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023477#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023478_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023479
23480 elif test "$ac_cv_sizeof_short" = "$unicode_size"
23481 then
23482 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000023483 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023484#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023485_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023486
23487 elif test "$ac_cv_sizeof_long" = "$unicode_size"
23488 then
23489 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000023490 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023491#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023492_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023493
23494 else
23495 PY_UNICODE_TYPE="no type found"
23496 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023497 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23498echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023499fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023500
23501# check for endianness
Thomas Wouters477c8d52006-05-27 19:21:47 +000023502{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23503echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023504if test "${ac_cv_c_bigendian+set}" = set; then
23505 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023506else
Martin v. Löwis11437992002-04-12 09:54:03 +000023507 # See if sys/param.h defines the BYTE_ORDER macro.
23508cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023509/* confdefs.h. */
23510_ACEOF
23511cat confdefs.h >>conftest.$ac_ext
23512cat >>conftest.$ac_ext <<_ACEOF
23513/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023514#include <sys/types.h>
23515#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023516
Martin v. Löwis11437992002-04-12 09:54:03 +000023517int
23518main ()
23519{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023520#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
23521 bogus endian macros
23522#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023523
23524 ;
23525 return 0;
23526}
23527_ACEOF
23528rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023529if { (ac_try="$ac_compile"
23530case "(($ac_try" in
23531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23532 *) ac_try_echo=$ac_try;;
23533esac
23534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23535 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023537 grep -v '^ *+' conftest.er1 >conftest.err
23538 rm -f conftest.er1
23539 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23541 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023542 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23543 { (case "(($ac_try" in
23544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23545 *) ac_try_echo=$ac_try;;
23546esac
23547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23548 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023549 ac_status=$?
23550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23551 (exit $ac_status); }; } &&
23552 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023553 { (case "(($ac_try" in
23554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23555 *) ac_try_echo=$ac_try;;
23556esac
23557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23558 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023559 ac_status=$?
23560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23561 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023562 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000023563cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023564/* confdefs.h. */
23565_ACEOF
23566cat confdefs.h >>conftest.$ac_ext
23567cat >>conftest.$ac_ext <<_ACEOF
23568/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023569#include <sys/types.h>
23570#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023571
Martin v. Löwis11437992002-04-12 09:54:03 +000023572int
23573main ()
23574{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023575#if BYTE_ORDER != BIG_ENDIAN
23576 not big endian
23577#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023578
23579 ;
23580 return 0;
23581}
23582_ACEOF
23583rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023584if { (ac_try="$ac_compile"
23585case "(($ac_try" in
23586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23587 *) ac_try_echo=$ac_try;;
23588esac
23589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23590 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023592 grep -v '^ *+' conftest.er1 >conftest.err
23593 rm -f conftest.er1
23594 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23596 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023597 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23598 { (case "(($ac_try" in
23599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23600 *) ac_try_echo=$ac_try;;
23601esac
23602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23603 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023604 ac_status=$?
23605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23606 (exit $ac_status); }; } &&
23607 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023608 { (case "(($ac_try" in
23609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23610 *) ac_try_echo=$ac_try;;
23611esac
23612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23613 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023614 ac_status=$?
23615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23616 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023617 ac_cv_c_bigendian=yes
23618else
Martin v. Löwis11437992002-04-12 09:54:03 +000023619 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023620sed 's/^/| /' conftest.$ac_ext >&5
23621
Thomas Wouters477c8d52006-05-27 19:21:47 +000023622 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023623fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023624
Skip Montanarof0d5f792004-08-15 14:08:23 +000023625rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023626else
Martin v. Löwis11437992002-04-12 09:54:03 +000023627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023628sed 's/^/| /' conftest.$ac_ext >&5
23629
Thomas Wouters477c8d52006-05-27 19:21:47 +000023630 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000023631if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023632 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000023633 ac_cv_c_bigendian=unknown
23634 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023635/* confdefs.h. */
23636_ACEOF
23637cat confdefs.h >>conftest.$ac_ext
23638cat >>conftest.$ac_ext <<_ACEOF
23639/* end confdefs.h. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000023640short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23641short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023642void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000023643short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23644short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023645void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023646int
23647main ()
23648{
23649 _ascii (); _ebcdic ();
23650 ;
23651 return 0;
23652}
23653_ACEOF
23654rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023655if { (ac_try="$ac_compile"
23656case "(($ac_try" in
23657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23658 *) ac_try_echo=$ac_try;;
23659esac
23660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23661 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023663 grep -v '^ *+' conftest.er1 >conftest.err
23664 rm -f conftest.er1
23665 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23667 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023668 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23669 { (case "(($ac_try" in
23670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23671 *) ac_try_echo=$ac_try;;
23672esac
23673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23674 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023675 ac_status=$?
23676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23677 (exit $ac_status); }; } &&
23678 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023679 { (case "(($ac_try" in
23680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23681 *) ac_try_echo=$ac_try;;
23682esac
23683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23684 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023685 ac_status=$?
23686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23687 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023688 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023689 ac_cv_c_bigendian=yes
23690fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023691if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023692 if test "$ac_cv_c_bigendian" = unknown; then
23693 ac_cv_c_bigendian=no
23694 else
23695 # finding both strings is unlikely to happen, but who knows?
23696 ac_cv_c_bigendian=unknown
23697 fi
23698fi
23699else
23700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023701sed 's/^/| /' conftest.$ac_ext >&5
23702
Thomas Wouters477c8d52006-05-27 19:21:47 +000023703
Martin v. Löwis11437992002-04-12 09:54:03 +000023704fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023705
Skip Montanarof0d5f792004-08-15 14:08:23 +000023706rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023707else
23708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023709/* confdefs.h. */
23710_ACEOF
23711cat confdefs.h >>conftest.$ac_ext
23712cat >>conftest.$ac_ext <<_ACEOF
23713/* end confdefs.h. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000023714$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023715int
23716main ()
23717{
Thomas Wouters477c8d52006-05-27 19:21:47 +000023718
Guido van Rossumef2255b2000-03-10 22:30:29 +000023719 /* Are we little or big endian? From Harbison&Steele. */
23720 union
23721 {
Thomas Wouters477c8d52006-05-27 19:21:47 +000023722 long int l;
23723 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000023724 } u;
23725 u.l = 1;
Thomas Wouters477c8d52006-05-27 19:21:47 +000023726 return u.c[sizeof (long int) - 1] == 1;
23727
23728 ;
23729 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023730}
Martin v. Löwis11437992002-04-12 09:54:03 +000023731_ACEOF
23732rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023733if { (ac_try="$ac_link"
23734case "(($ac_try" in
23735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23736 *) ac_try_echo=$ac_try;;
23737esac
23738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23739 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023740 ac_status=$?
23741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23742 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023743 { (case "(($ac_try" in
23744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23745 *) ac_try_echo=$ac_try;;
23746esac
23747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23748 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023749 ac_status=$?
23750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23751 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023752 ac_cv_c_bigendian=no
23753else
Martin v. Löwis11437992002-04-12 09:54:03 +000023754 echo "$as_me: program exited with status $ac_status" >&5
23755echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023756sed 's/^/| /' conftest.$ac_ext >&5
23757
Martin v. Löwis11437992002-04-12 09:54:03 +000023758( exit $ac_status )
23759ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023760fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023762fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023763
23764
Martin v. Löwis11437992002-04-12 09:54:03 +000023765fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023766
Skip Montanarof0d5f792004-08-15 14:08:23 +000023767rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023768fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023769{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23770echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023771case $ac_cv_c_bigendian in
23772 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000023773
Martin v. Löwis11437992002-04-12 09:54:03 +000023774cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023775#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023776_ACEOF
23777 ;;
23778 no)
23779 ;;
23780 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023781 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023782presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023783echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023784presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
23785 { (exit 1); exit 1; }; } ;;
23786esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023787
Michael W. Hudson54241132001-12-07 15:38:26 +000023788
Thomas Wouters477c8d52006-05-27 19:21:47 +000023789
23790
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023791# Check whether right shifting a negative integer extends the sign bit
23792# or fills with zeros (like the Cray J90, according to Tim Peters).
Thomas Wouters477c8d52006-05-27 19:21:47 +000023793{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23794echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023795if test "${ac_cv_rshift_extends_sign+set}" = set; then
23796 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023797else
Martin v. Löwis11437992002-04-12 09:54:03 +000023798
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023799if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023800 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023801else
Martin v. Löwis11437992002-04-12 09:54:03 +000023802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023803/* confdefs.h. */
23804_ACEOF
23805cat confdefs.h >>conftest.$ac_ext
23806cat >>conftest.$ac_ext <<_ACEOF
23807/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023808
23809int main()
23810{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023811 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023812}
23813
Martin v. Löwis11437992002-04-12 09:54:03 +000023814_ACEOF
23815rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023816if { (ac_try="$ac_link"
23817case "(($ac_try" in
23818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23819 *) ac_try_echo=$ac_try;;
23820esac
23821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23822 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023823 ac_status=$?
23824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23825 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023826 { (case "(($ac_try" in
23827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23828 *) ac_try_echo=$ac_try;;
23829esac
23830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23831 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023832 ac_status=$?
23833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23834 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023835 ac_cv_rshift_extends_sign=yes
23836else
Martin v. Löwis11437992002-04-12 09:54:03 +000023837 echo "$as_me: program exited with status $ac_status" >&5
23838echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023839sed 's/^/| /' conftest.$ac_ext >&5
23840
Martin v. Löwis11437992002-04-12 09:54:03 +000023841( exit $ac_status )
23842ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023843fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000023845fi
23846
Thomas Wouters477c8d52006-05-27 19:21:47 +000023847
23848fi
23849
23850{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23851echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023852if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023853then
Martin v. Löwis11437992002-04-12 09:54:03 +000023854
23855cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023856#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023857_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023858
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023859fi
23860
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023861# check for getc_unlocked and related locking functions
Thomas Wouters477c8d52006-05-27 19:21:47 +000023862{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23863echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023864if test "${ac_cv_have_getc_unlocked+set}" = set; then
23865 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023866else
Martin v. Löwis11437992002-04-12 09:54:03 +000023867
23868cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023869/* confdefs.h. */
23870_ACEOF
23871cat confdefs.h >>conftest.$ac_ext
23872cat >>conftest.$ac_ext <<_ACEOF
23873/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023874#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023875int
23876main ()
23877{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023878
23879 FILE *f = fopen("/dev/null", "r");
23880 flockfile(f);
23881 getc_unlocked(f);
23882 funlockfile(f);
23883
Martin v. Löwis11437992002-04-12 09:54:03 +000023884 ;
23885 return 0;
23886}
23887_ACEOF
23888rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023889if { (ac_try="$ac_link"
23890case "(($ac_try" in
23891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23892 *) ac_try_echo=$ac_try;;
23893esac
23894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23895 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023897 grep -v '^ *+' conftest.er1 >conftest.err
23898 rm -f conftest.er1
23899 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23901 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023902 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23903 { (case "(($ac_try" in
23904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23905 *) ac_try_echo=$ac_try;;
23906esac
23907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23908 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000023909 ac_status=$?
23910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23911 (exit $ac_status); }; } &&
23912 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023913 { (case "(($ac_try" in
23914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23915 *) ac_try_echo=$ac_try;;
23916esac
23917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23918 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023919 ac_status=$?
23920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23921 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023922 ac_cv_have_getc_unlocked=yes
23923else
Martin v. Löwis11437992002-04-12 09:54:03 +000023924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023925sed 's/^/| /' conftest.$ac_ext >&5
23926
Thomas Wouters477c8d52006-05-27 19:21:47 +000023927 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023928fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000023929
Skip Montanarof0d5f792004-08-15 14:08:23 +000023930rm -f conftest.err conftest.$ac_objext \
23931 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023932fi
23933
Thomas Wouters477c8d52006-05-27 19:21:47 +000023934{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23935echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023936if test "$ac_cv_have_getc_unlocked" = yes
23937then
Martin v. Löwis11437992002-04-12 09:54:03 +000023938
23939cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023940#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023941_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023942
23943fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023944
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023945# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023946# save the value of LIBS so we don't actually link Python with readline
23947LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023948
Thomas Wouters477c8d52006-05-27 19:21:47 +000023949{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
23950echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023951if test "${ac_cv_lib_readline_readline+set}" = set; then
23952 echo $ECHO_N "(cached) $ECHO_C" >&6
23953else
23954 ac_check_lib_save_LIBS=$LIBS
23955LIBS="-lreadline $LIBS"
23956cat >conftest.$ac_ext <<_ACEOF
23957/* confdefs.h. */
23958_ACEOF
23959cat confdefs.h >>conftest.$ac_ext
23960cat >>conftest.$ac_ext <<_ACEOF
23961/* end confdefs.h. */
23962
Thomas Wouters477c8d52006-05-27 19:21:47 +000023963/* Override any GCC internal prototype to avoid an error.
23964 Use char because int might match the return type of a GCC
23965 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023966#ifdef __cplusplus
23967extern "C"
23968#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023969char readline ();
23970int
23971main ()
23972{
Thomas Wouters477c8d52006-05-27 19:21:47 +000023973return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023974 ;
23975 return 0;
23976}
23977_ACEOF
23978rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023979if { (ac_try="$ac_link"
23980case "(($ac_try" in
23981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23982 *) ac_try_echo=$ac_try;;
23983esac
23984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23985 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023986 ac_status=$?
23987 grep -v '^ *+' conftest.er1 >conftest.err
23988 rm -f conftest.er1
23989 cat conftest.err >&5
23990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23991 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023992 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
23993 { (case "(($ac_try" in
23994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23995 *) ac_try_echo=$ac_try;;
23996esac
23997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23998 (eval "$ac_try") 2>&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023999 ac_status=$?
24000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24001 (exit $ac_status); }; } &&
24002 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024003 { (case "(($ac_try" in
24004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24005 *) ac_try_echo=$ac_try;;
24006esac
24007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24008 (eval "$ac_try") 2>&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024009 ac_status=$?
24010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24011 (exit $ac_status); }; }; then
24012 ac_cv_lib_readline_readline=yes
24013else
24014 echo "$as_me: failed program was:" >&5
24015sed 's/^/| /' conftest.$ac_ext >&5
24016
Thomas Wouters477c8d52006-05-27 19:21:47 +000024017 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024018fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024019
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024020rm -f conftest.err conftest.$ac_objext \
24021 conftest$ac_exeext conftest.$ac_ext
24022LIBS=$ac_check_lib_save_LIBS
24023fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024024{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
24025echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024026if test $ac_cv_lib_readline_readline = yes; then
24027 cat >>confdefs.h <<_ACEOF
24028#define HAVE_LIBREADLINE 1
24029_ACEOF
24030
24031 LIBS="-lreadline $LIBS"
24032
24033fi
24034
24035if test "$ac_cv_have_readline_readline" = no
24036then
24037
Thomas Wouters477c8d52006-05-27 19:21:47 +000024038{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
24039echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024040if test "${ac_cv_lib_termcap_readline+set}" = set; then
24041 echo $ECHO_N "(cached) $ECHO_C" >&6
24042else
24043 ac_check_lib_save_LIBS=$LIBS
24044LIBS="-ltermcap $LIBS"
24045cat >conftest.$ac_ext <<_ACEOF
24046/* confdefs.h. */
24047_ACEOF
24048cat confdefs.h >>conftest.$ac_ext
24049cat >>conftest.$ac_ext <<_ACEOF
24050/* end confdefs.h. */
24051
Thomas Wouters477c8d52006-05-27 19:21:47 +000024052/* Override any GCC internal prototype to avoid an error.
24053 Use char because int might match the return type of a GCC
24054 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024055#ifdef __cplusplus
24056extern "C"
24057#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024058char readline ();
24059int
24060main ()
24061{
Thomas Wouters477c8d52006-05-27 19:21:47 +000024062return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024063 ;
24064 return 0;
24065}
24066_ACEOF
24067rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024068if { (ac_try="$ac_link"
24069case "(($ac_try" in
24070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24071 *) ac_try_echo=$ac_try;;
24072esac
24073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24074 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024075 ac_status=$?
24076 grep -v '^ *+' conftest.er1 >conftest.err
24077 rm -f conftest.er1
24078 cat conftest.err >&5
24079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24080 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024081 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24082 { (case "(($ac_try" in
24083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24084 *) ac_try_echo=$ac_try;;
24085esac
24086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24087 (eval "$ac_try") 2>&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024088 ac_status=$?
24089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24090 (exit $ac_status); }; } &&
24091 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024092 { (case "(($ac_try" in
24093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24094 *) ac_try_echo=$ac_try;;
24095esac
24096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24097 (eval "$ac_try") 2>&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024098 ac_status=$?
24099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24100 (exit $ac_status); }; }; then
24101 ac_cv_lib_termcap_readline=yes
24102else
24103 echo "$as_me: failed program was:" >&5
24104sed 's/^/| /' conftest.$ac_ext >&5
24105
Thomas Wouters477c8d52006-05-27 19:21:47 +000024106 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024107fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024108
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024109rm -f conftest.err conftest.$ac_objext \
24110 conftest$ac_exeext conftest.$ac_ext
24111LIBS=$ac_check_lib_save_LIBS
24112fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024113{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
24114echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024115if test $ac_cv_lib_termcap_readline = yes; then
24116 cat >>confdefs.h <<_ACEOF
24117#define HAVE_LIBTERMCAP 1
24118_ACEOF
24119
24120 LIBS="-ltermcap $LIBS"
24121
24122fi
24123
24124fi
24125
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024126# check for readline 2.1
Thomas Wouters477c8d52006-05-27 19:21:47 +000024127{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24128echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024129if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
24130 echo $ECHO_N "(cached) $ECHO_C" >&6
24131else
24132 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024133LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024134cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024135/* confdefs.h. */
24136_ACEOF
24137cat confdefs.h >>conftest.$ac_ext
24138cat >>conftest.$ac_ext <<_ACEOF
24139/* end confdefs.h. */
24140
Thomas Wouters477c8d52006-05-27 19:21:47 +000024141/* Override any GCC internal prototype to avoid an error.
24142 Use char because int might match the return type of a GCC
24143 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024144#ifdef __cplusplus
24145extern "C"
24146#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024147char rl_callback_handler_install ();
24148int
24149main ()
24150{
Thomas Wouters477c8d52006-05-27 19:21:47 +000024151return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024152 ;
24153 return 0;
24154}
24155_ACEOF
24156rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024157if { (ac_try="$ac_link"
24158case "(($ac_try" in
24159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24160 *) ac_try_echo=$ac_try;;
24161esac
24162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24163 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024165 grep -v '^ *+' conftest.er1 >conftest.err
24166 rm -f conftest.er1
24167 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24169 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024170 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24171 { (case "(($ac_try" in
24172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24173 *) ac_try_echo=$ac_try;;
24174esac
24175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24176 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000024177 ac_status=$?
24178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24179 (exit $ac_status); }; } &&
24180 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024181 { (case "(($ac_try" in
24182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24183 *) ac_try_echo=$ac_try;;
24184esac
24185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24186 (eval "$ac_try") 2>&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024187 ac_status=$?
24188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24189 (exit $ac_status); }; }; then
24190 ac_cv_lib_readline_rl_callback_handler_install=yes
24191else
24192 echo "$as_me: failed program was:" >&5
24193sed 's/^/| /' conftest.$ac_ext >&5
24194
Thomas Wouters477c8d52006-05-27 19:21:47 +000024195 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024196fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024197
Skip Montanarof0d5f792004-08-15 14:08:23 +000024198rm -f conftest.err conftest.$ac_objext \
24199 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024200LIBS=$ac_check_lib_save_LIBS
24201fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024202{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24203echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024204if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
24205
24206cat >>confdefs.h <<\_ACEOF
24207#define HAVE_RL_CALLBACK 1
24208_ACEOF
24209
24210fi
24211
24212
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024213# check for readline 2.2
24214cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024215/* confdefs.h. */
24216_ACEOF
24217cat confdefs.h >>conftest.$ac_ext
24218cat >>conftest.$ac_ext <<_ACEOF
24219/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024220#include <readline/readline.h>
24221_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024222if { (ac_try="$ac_cpp conftest.$ac_ext"
24223case "(($ac_try" in
24224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24225 *) ac_try_echo=$ac_try;;
24226esac
24227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24228 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024229 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024230 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024231 rm -f conftest.er1
24232 cat conftest.err >&5
24233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24234 (exit $ac_status); } >/dev/null; then
24235 if test -s conftest.err; then
24236 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000024237 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024238 else
24239 ac_cpp_err=
24240 fi
24241else
24242 ac_cpp_err=yes
24243fi
24244if test -z "$ac_cpp_err"; then
24245 have_readline=yes
24246else
24247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024248sed 's/^/| /' conftest.$ac_ext >&5
24249
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024250 have_readline=no
24251fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024252
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024253rm -f conftest.err conftest.$ac_ext
24254if test $have_readline = yes
24255then
24256 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024257/* confdefs.h. */
24258_ACEOF
24259cat confdefs.h >>conftest.$ac_ext
24260cat >>conftest.$ac_ext <<_ACEOF
24261/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024262#include <readline/readline.h>
24263
24264_ACEOF
24265if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000024266 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024267
24268cat >>confdefs.h <<\_ACEOF
24269#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
24270_ACEOF
24271
24272fi
24273rm -f conftest*
24274
24275fi
24276
Martin v. Löwis0daad592001-09-30 21:09:59 +000024277# check for readline 4.0
Thomas Wouters477c8d52006-05-27 19:21:47 +000024278{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
24279echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024280if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
24281 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000024282else
Martin v. Löwis11437992002-04-12 09:54:03 +000024283 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024284LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024285cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024286/* confdefs.h. */
24287_ACEOF
24288cat confdefs.h >>conftest.$ac_ext
24289cat >>conftest.$ac_ext <<_ACEOF
24290/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024291
Thomas Wouters477c8d52006-05-27 19:21:47 +000024292/* Override any GCC internal prototype to avoid an error.
24293 Use char because int might match the return type of a GCC
24294 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024295#ifdef __cplusplus
24296extern "C"
24297#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024298char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024299int
24300main ()
24301{
Thomas Wouters477c8d52006-05-27 19:21:47 +000024302return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024303 ;
24304 return 0;
24305}
24306_ACEOF
24307rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024308if { (ac_try="$ac_link"
24309case "(($ac_try" in
24310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24311 *) ac_try_echo=$ac_try;;
24312esac
24313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24314 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024315 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024316 grep -v '^ *+' conftest.er1 >conftest.err
24317 rm -f conftest.er1
24318 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24320 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024321 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24322 { (case "(($ac_try" in
24323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24324 *) ac_try_echo=$ac_try;;
24325esac
24326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24327 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000024328 ac_status=$?
24329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24330 (exit $ac_status); }; } &&
24331 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024332 { (case "(($ac_try" in
24333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24334 *) ac_try_echo=$ac_try;;
24335esac
24336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24337 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024338 ac_status=$?
24339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24340 (exit $ac_status); }; }; then
24341 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000024342else
Martin v. Löwis11437992002-04-12 09:54:03 +000024343 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024344sed 's/^/| /' conftest.$ac_ext >&5
24345
Thomas Wouters477c8d52006-05-27 19:21:47 +000024346 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000024347fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024348
Skip Montanarof0d5f792004-08-15 14:08:23 +000024349rm -f conftest.err conftest.$ac_objext \
24350 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024351LIBS=$ac_check_lib_save_LIBS
24352fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024353{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
24354echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024355if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024356
Martin v. Löwis11437992002-04-12 09:54:03 +000024357cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024358#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024359_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024360
Martin v. Löwis0daad592001-09-30 21:09:59 +000024361fi
24362
Michael W. Hudson54241132001-12-07 15:38:26 +000024363
Martin v. Löwis0daad592001-09-30 21:09:59 +000024364# check for readline 4.2
Thomas Wouters477c8d52006-05-27 19:21:47 +000024365{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24366echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024367if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
24368 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024369else
Martin v. Löwis11437992002-04-12 09:54:03 +000024370 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024371LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024372cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024373/* confdefs.h. */
24374_ACEOF
24375cat confdefs.h >>conftest.$ac_ext
24376cat >>conftest.$ac_ext <<_ACEOF
24377/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024378
Thomas Wouters477c8d52006-05-27 19:21:47 +000024379/* Override any GCC internal prototype to avoid an error.
24380 Use char because int might match the return type of a GCC
24381 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024382#ifdef __cplusplus
24383extern "C"
24384#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024385char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024386int
24387main ()
24388{
Thomas Wouters477c8d52006-05-27 19:21:47 +000024389return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024390 ;
24391 return 0;
24392}
24393_ACEOF
24394rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024395if { (ac_try="$ac_link"
24396case "(($ac_try" in
24397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24398 *) ac_try_echo=$ac_try;;
24399esac
24400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24401 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024402 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024403 grep -v '^ *+' conftest.er1 >conftest.err
24404 rm -f conftest.er1
24405 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24407 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024408 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24409 { (case "(($ac_try" in
24410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24411 *) ac_try_echo=$ac_try;;
24412esac
24413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24414 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000024415 ac_status=$?
24416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24417 (exit $ac_status); }; } &&
24418 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024419 { (case "(($ac_try" in
24420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24421 *) ac_try_echo=$ac_try;;
24422esac
24423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24424 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024425 ac_status=$?
24426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24427 (exit $ac_status); }; }; then
24428 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024429else
Martin v. Löwis11437992002-04-12 09:54:03 +000024430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024431sed 's/^/| /' conftest.$ac_ext >&5
24432
Thomas Wouters477c8d52006-05-27 19:21:47 +000024433 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024434fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024435
Skip Montanarof0d5f792004-08-15 14:08:23 +000024436rm -f conftest.err conftest.$ac_objext \
24437 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024438LIBS=$ac_check_lib_save_LIBS
24439fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024440{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24441echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024442if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024443
Martin v. Löwis11437992002-04-12 09:54:03 +000024444cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024445#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024446_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024447
Guido van Rossum353ae582001-07-10 16:45:32 +000024448fi
24449
Jack Jansendd19cf82001-12-06 22:36:17 +000024450
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024451# also in readline 4.2
24452cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024453/* confdefs.h. */
24454_ACEOF
24455cat confdefs.h >>conftest.$ac_ext
24456cat >>conftest.$ac_ext <<_ACEOF
24457/* end confdefs.h. */
24458#include <readline/readline.h>
24459_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024460if { (ac_try="$ac_cpp conftest.$ac_ext"
24461case "(($ac_try" in
24462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24463 *) ac_try_echo=$ac_try;;
24464esac
24465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24466 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024467 ac_status=$?
24468 grep -v '^ *+' conftest.er1 >conftest.err
24469 rm -f conftest.er1
24470 cat conftest.err >&5
24471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24472 (exit $ac_status); } >/dev/null; then
24473 if test -s conftest.err; then
24474 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000024475 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024476 else
24477 ac_cpp_err=
24478 fi
24479else
24480 ac_cpp_err=yes
24481fi
24482if test -z "$ac_cpp_err"; then
24483 have_readline=yes
24484else
24485 echo "$as_me: failed program was:" >&5
24486sed 's/^/| /' conftest.$ac_ext >&5
24487
24488 have_readline=no
24489fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024490
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024491rm -f conftest.err conftest.$ac_ext
24492if test $have_readline = yes
24493then
24494 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024495/* confdefs.h. */
24496_ACEOF
24497cat confdefs.h >>conftest.$ac_ext
24498cat >>conftest.$ac_ext <<_ACEOF
24499/* end confdefs.h. */
24500#include <readline/readline.h>
24501
24502_ACEOF
24503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24504 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24505
24506cat >>confdefs.h <<\_ACEOF
24507#define HAVE_RL_CATCH_SIGNAL 1
24508_ACEOF
24509
24510fi
24511rm -f conftest*
24512
24513fi
24514
Martin v. Löwis82bca632006-02-10 20:49:30 +000024515# End of readline checks: restore LIBS
24516LIBS=$LIBS_no_readline
24517
Thomas Wouters477c8d52006-05-27 19:21:47 +000024518{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24519echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024520if test "${ac_cv_broken_nice+set}" = set; then
24521 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024522else
Martin v. Löwis11437992002-04-12 09:54:03 +000024523
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024524if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024525 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024526else
Martin v. Löwis11437992002-04-12 09:54:03 +000024527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024528/* confdefs.h. */
24529_ACEOF
24530cat confdefs.h >>conftest.$ac_ext
24531cat >>conftest.$ac_ext <<_ACEOF
24532/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024533
24534int main()
24535{
24536 int val1 = nice(1);
24537 if (val1 != -1 && val1 == nice(2))
24538 exit(0);
24539 exit(1);
24540}
24541
Martin v. Löwis11437992002-04-12 09:54:03 +000024542_ACEOF
24543rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024544if { (ac_try="$ac_link"
24545case "(($ac_try" in
24546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24547 *) ac_try_echo=$ac_try;;
24548esac
24549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24550 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024551 ac_status=$?
24552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24553 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024554 { (case "(($ac_try" in
24555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24556 *) ac_try_echo=$ac_try;;
24557esac
24558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24559 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024560 ac_status=$?
24561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24562 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024563 ac_cv_broken_nice=yes
24564else
Martin v. Löwis11437992002-04-12 09:54:03 +000024565 echo "$as_me: program exited with status $ac_status" >&5
24566echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024567sed 's/^/| /' conftest.$ac_ext >&5
24568
Martin v. Löwis11437992002-04-12 09:54:03 +000024569( exit $ac_status )
24570ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024571fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024572rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024573fi
24574
Thomas Wouters477c8d52006-05-27 19:21:47 +000024575
24576fi
24577
24578{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24579echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024580if test "$ac_cv_broken_nice" = yes
24581then
Martin v. Löwis11437992002-04-12 09:54:03 +000024582
24583cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024584#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024585_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024586
24587fi
24588
Thomas Wouters477c8d52006-05-27 19:21:47 +000024589{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24590echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024591if test "$cross_compiling" = yes; then
24592 ac_cv_broken_poll=no
24593else
24594 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024595/* confdefs.h. */
24596_ACEOF
24597cat confdefs.h >>conftest.$ac_ext
24598cat >>conftest.$ac_ext <<_ACEOF
24599/* end confdefs.h. */
24600
24601#include <poll.h>
24602
24603int main (void)
24604 {
24605 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24606
24607 close (42);
24608
24609 int poll_test = poll (&poll_struct, 1, 0);
24610
24611 if (poll_test < 0)
24612 {
24613 exit(0);
24614 }
24615 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24616 {
24617 exit(0);
24618 }
24619 else
24620 {
24621 exit(1);
24622 }
24623 }
24624
24625_ACEOF
24626rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024627if { (ac_try="$ac_link"
24628case "(($ac_try" in
24629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24630 *) ac_try_echo=$ac_try;;
24631esac
24632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24633 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024634 ac_status=$?
24635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24636 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024637 { (case "(($ac_try" in
24638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24639 *) ac_try_echo=$ac_try;;
24640esac
24641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24642 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024643 ac_status=$?
24644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24645 (exit $ac_status); }; }; then
24646 ac_cv_broken_poll=yes
24647else
24648 echo "$as_me: program exited with status $ac_status" >&5
24649echo "$as_me: failed program was:" >&5
24650sed 's/^/| /' conftest.$ac_ext >&5
24651
24652( exit $ac_status )
24653ac_cv_broken_poll=no
24654fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024655rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024656fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024657
24658
24659{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24660echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024661if test "$ac_cv_broken_poll" = yes
24662then
24663
24664cat >>confdefs.h <<\_ACEOF
24665#define HAVE_BROKEN_POLL 1
24666_ACEOF
24667
24668fi
24669
Brett Cannon43802422005-02-10 20:48:03 +000024670# Before we can test tzset, we need to check if struct tm has a tm_zone
Martin v. Löwis1d459062005-03-14 21:23:33 +000024671# (which is not required by ISO C or UNIX spec) and/or if we support
24672# tzname[]
Thomas Wouters477c8d52006-05-27 19:21:47 +000024673{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24674echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024675if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
24676 echo $ECHO_N "(cached) $ECHO_C" >&6
24677else
24678 cat >conftest.$ac_ext <<_ACEOF
24679/* confdefs.h. */
24680_ACEOF
24681cat confdefs.h >>conftest.$ac_ext
24682cat >>conftest.$ac_ext <<_ACEOF
24683/* end confdefs.h. */
24684#include <sys/types.h>
24685#include <$ac_cv_struct_tm>
24686
24687
24688int
24689main ()
24690{
24691static struct tm ac_aggr;
24692if (ac_aggr.tm_zone)
24693return 0;
24694 ;
24695 return 0;
24696}
24697_ACEOF
24698rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024699if { (ac_try="$ac_compile"
24700case "(($ac_try" in
24701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24702 *) ac_try_echo=$ac_try;;
24703esac
24704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24705 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024706 ac_status=$?
24707 grep -v '^ *+' conftest.er1 >conftest.err
24708 rm -f conftest.er1
24709 cat conftest.err >&5
24710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24711 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024712 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24713 { (case "(($ac_try" in
24714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24715 *) ac_try_echo=$ac_try;;
24716esac
24717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24718 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000024719 ac_status=$?
24720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24721 (exit $ac_status); }; } &&
24722 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024723 { (case "(($ac_try" in
24724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24725 *) ac_try_echo=$ac_try;;
24726esac
24727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24728 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000024729 ac_status=$?
24730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24731 (exit $ac_status); }; }; then
24732 ac_cv_member_struct_tm_tm_zone=yes
24733else
24734 echo "$as_me: failed program was:" >&5
24735sed 's/^/| /' conftest.$ac_ext >&5
24736
Thomas Wouters477c8d52006-05-27 19:21:47 +000024737 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024738/* confdefs.h. */
24739_ACEOF
24740cat confdefs.h >>conftest.$ac_ext
24741cat >>conftest.$ac_ext <<_ACEOF
24742/* end confdefs.h. */
24743#include <sys/types.h>
24744#include <$ac_cv_struct_tm>
24745
24746
24747int
24748main ()
24749{
24750static struct tm ac_aggr;
24751if (sizeof ac_aggr.tm_zone)
24752return 0;
24753 ;
24754 return 0;
24755}
24756_ACEOF
24757rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024758if { (ac_try="$ac_compile"
24759case "(($ac_try" in
24760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24761 *) ac_try_echo=$ac_try;;
24762esac
24763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24764 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024765 ac_status=$?
24766 grep -v '^ *+' conftest.er1 >conftest.err
24767 rm -f conftest.er1
24768 cat conftest.err >&5
24769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24770 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024771 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24772 { (case "(($ac_try" in
24773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24774 *) ac_try_echo=$ac_try;;
24775esac
24776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24777 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000024778 ac_status=$?
24779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24780 (exit $ac_status); }; } &&
24781 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024782 { (case "(($ac_try" in
24783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24784 *) ac_try_echo=$ac_try;;
24785esac
24786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24787 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000024788 ac_status=$?
24789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24790 (exit $ac_status); }; }; then
24791 ac_cv_member_struct_tm_tm_zone=yes
24792else
24793 echo "$as_me: failed program was:" >&5
24794sed 's/^/| /' conftest.$ac_ext >&5
24795
Thomas Wouters477c8d52006-05-27 19:21:47 +000024796 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024797fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024798
Brett Cannon43802422005-02-10 20:48:03 +000024799rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24800fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024801
Brett Cannon43802422005-02-10 20:48:03 +000024802rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24803fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024804{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24805echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024806if test $ac_cv_member_struct_tm_tm_zone = yes; then
24807
24808cat >>confdefs.h <<_ACEOF
24809#define HAVE_STRUCT_TM_TM_ZONE 1
24810_ACEOF
24811
24812
24813fi
24814
24815if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24816
24817cat >>confdefs.h <<\_ACEOF
24818#define HAVE_TM_ZONE 1
24819_ACEOF
24820
24821else
Thomas Wouters477c8d52006-05-27 19:21:47 +000024822 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24823echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
24824if test "${ac_cv_have_decl_tzname+set}" = set; then
24825 echo $ECHO_N "(cached) $ECHO_C" >&6
24826else
24827 cat >conftest.$ac_ext <<_ACEOF
24828/* confdefs.h. */
24829_ACEOF
24830cat confdefs.h >>conftest.$ac_ext
24831cat >>conftest.$ac_ext <<_ACEOF
24832/* end confdefs.h. */
24833#include <time.h>
24834
24835int
24836main ()
24837{
24838#ifndef tzname
24839 char *p = (char *) tzname;
24840 return !p;
24841#endif
24842
24843 ;
24844 return 0;
24845}
24846_ACEOF
24847rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024848if { (ac_try="$ac_compile"
24849case "(($ac_try" in
24850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24851 *) ac_try_echo=$ac_try;;
24852esac
24853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24854 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters477c8d52006-05-27 19:21:47 +000024855 ac_status=$?
24856 grep -v '^ *+' conftest.er1 >conftest.err
24857 rm -f conftest.er1
24858 cat conftest.err >&5
24859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24860 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024861 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24862 { (case "(($ac_try" in
24863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24864 *) ac_try_echo=$ac_try;;
24865esac
24866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24867 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000024868 ac_status=$?
24869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24870 (exit $ac_status); }; } &&
24871 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024872 { (case "(($ac_try" in
24873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24874 *) ac_try_echo=$ac_try;;
24875esac
24876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24877 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000024878 ac_status=$?
24879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24880 (exit $ac_status); }; }; then
24881 ac_cv_have_decl_tzname=yes
24882else
24883 echo "$as_me: failed program was:" >&5
24884sed 's/^/| /' conftest.$ac_ext >&5
24885
24886 ac_cv_have_decl_tzname=no
24887fi
24888
24889rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
24890fi
24891{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24892echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24893if test $ac_cv_have_decl_tzname = yes; then
24894
24895cat >>confdefs.h <<_ACEOF
24896#define HAVE_DECL_TZNAME 1
24897_ACEOF
24898
24899
24900else
24901 cat >>confdefs.h <<_ACEOF
24902#define HAVE_DECL_TZNAME 0
24903_ACEOF
24904
24905
24906fi
24907
24908
24909 { echo "$as_me:$LINENO: checking for tzname" >&5
24910echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024911if test "${ac_cv_var_tzname+set}" = set; then
24912 echo $ECHO_N "(cached) $ECHO_C" >&6
24913else
24914 cat >conftest.$ac_ext <<_ACEOF
24915/* confdefs.h. */
24916_ACEOF
24917cat confdefs.h >>conftest.$ac_ext
24918cat >>conftest.$ac_ext <<_ACEOF
24919/* end confdefs.h. */
24920#include <time.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +000024921#if !HAVE_DECL_TZNAME
24922extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024923#endif
24924
24925int
24926main ()
24927{
Thomas Wouters477c8d52006-05-27 19:21:47 +000024928return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024929 ;
24930 return 0;
24931}
24932_ACEOF
24933rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024934if { (ac_try="$ac_link"
24935case "(($ac_try" in
24936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24937 *) ac_try_echo=$ac_try;;
24938esac
24939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24940 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024941 ac_status=$?
24942 grep -v '^ *+' conftest.er1 >conftest.err
24943 rm -f conftest.er1
24944 cat conftest.err >&5
24945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24946 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024947 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
24948 { (case "(($ac_try" in
24949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24950 *) ac_try_echo=$ac_try;;
24951esac
24952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24953 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000024954 ac_status=$?
24955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24956 (exit $ac_status); }; } &&
24957 { ac_try='test -s conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000024958 { (case "(($ac_try" in
24959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24960 *) ac_try_echo=$ac_try;;
24961esac
24962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24963 (eval "$ac_try") 2>&5
Brett Cannon43802422005-02-10 20:48:03 +000024964 ac_status=$?
24965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24966 (exit $ac_status); }; }; then
24967 ac_cv_var_tzname=yes
24968else
24969 echo "$as_me: failed program was:" >&5
24970sed 's/^/| /' conftest.$ac_ext >&5
24971
Thomas Wouters477c8d52006-05-27 19:21:47 +000024972 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024973fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024974
Brett Cannon43802422005-02-10 20:48:03 +000024975rm -f conftest.err conftest.$ac_objext \
24976 conftest$ac_exeext conftest.$ac_ext
24977fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024978{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24979echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024980 if test $ac_cv_var_tzname = yes; then
24981
24982cat >>confdefs.h <<\_ACEOF
24983#define HAVE_TZNAME 1
24984_ACEOF
24985
24986 fi
24987fi
24988
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024989
Martin v. Löwis1d459062005-03-14 21:23:33 +000024990# check tzset(3) exists and works like we expect it to
Thomas Wouters477c8d52006-05-27 19:21:47 +000024991{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24992echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024993if test "${ac_cv_working_tzset+set}" = set; then
24994 echo $ECHO_N "(cached) $ECHO_C" >&6
24995else
24996
24997if test "$cross_compiling" = yes; then
24998 ac_cv_working_tzset=no
24999else
25000 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025001/* confdefs.h. */
25002_ACEOF
25003cat confdefs.h >>conftest.$ac_ext
25004cat >>conftest.$ac_ext <<_ACEOF
25005/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025006
25007#include <stdlib.h>
25008#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025009#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025010
25011#if HAVE_TZNAME
25012extern char *tzname[];
25013#endif
25014
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025015int main()
25016{
Brett Cannon18367812003-09-19 00:59:16 +000025017 /* Note that we need to ensure that not only does tzset(3)
25018 do 'something' with localtime, but it works as documented
25019 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025020 This includes making sure that tzname is set properly if
25021 tm->tm_zone does not exist since it is the alternative way
25022 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025023
25024 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025025 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025026 */
25027
Martin v. Löwis1d459062005-03-14 21:23:33 +000025028 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025029 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25030
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025031 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025032 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025033 if (localtime(&groundhogday)->tm_hour != 0)
25034 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025035#if HAVE_TZNAME
25036 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25037 if (strcmp(tzname[0], "UTC") ||
25038 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25039 exit(1);
25040#endif
Brett Cannon18367812003-09-19 00:59:16 +000025041
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025042 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025043 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025044 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025045 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025046#if HAVE_TZNAME
25047 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25048 exit(1);
25049#endif
Brett Cannon18367812003-09-19 00:59:16 +000025050
25051 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25052 tzset();
25053 if (localtime(&groundhogday)->tm_hour != 11)
25054 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025055#if HAVE_TZNAME
25056 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25057 exit(1);
25058#endif
25059
25060#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025061 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25062 exit(1);
25063 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25064 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025065#endif
Brett Cannon18367812003-09-19 00:59:16 +000025066
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025067 exit(0);
25068}
25069
25070_ACEOF
25071rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025072if { (ac_try="$ac_link"
25073case "(($ac_try" in
25074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25075 *) ac_try_echo=$ac_try;;
25076esac
25077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25078 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025079 ac_status=$?
25080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25081 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025082 { (case "(($ac_try" in
25083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25084 *) ac_try_echo=$ac_try;;
25085esac
25086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25087 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025088 ac_status=$?
25089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25090 (exit $ac_status); }; }; then
25091 ac_cv_working_tzset=yes
25092else
25093 echo "$as_me: program exited with status $ac_status" >&5
25094echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025095sed 's/^/| /' conftest.$ac_ext >&5
25096
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025097( exit $ac_status )
25098ac_cv_working_tzset=no
25099fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025101fi
25102
Thomas Wouters477c8d52006-05-27 19:21:47 +000025103
25104fi
25105
25106{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25107echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025108if test "$ac_cv_working_tzset" = yes
25109then
25110
25111cat >>confdefs.h <<\_ACEOF
25112#define HAVE_WORKING_TZSET 1
25113_ACEOF
25114
25115fi
25116
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025117# Look for subsecond timestamps in struct stat
Thomas Wouters477c8d52006-05-27 19:21:47 +000025118{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25119echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025120if test "${ac_cv_stat_tv_nsec+set}" = set; then
25121 echo $ECHO_N "(cached) $ECHO_C" >&6
25122else
25123 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025124/* confdefs.h. */
25125_ACEOF
25126cat confdefs.h >>conftest.$ac_ext
25127cat >>conftest.$ac_ext <<_ACEOF
25128/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025129#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025130int
25131main ()
25132{
25133
25134struct stat st;
25135st.st_mtim.tv_nsec = 1;
25136
25137 ;
25138 return 0;
25139}
25140_ACEOF
25141rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025142if { (ac_try="$ac_compile"
25143case "(($ac_try" in
25144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25145 *) ac_try_echo=$ac_try;;
25146esac
25147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25148 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025150 grep -v '^ *+' conftest.er1 >conftest.err
25151 rm -f conftest.er1
25152 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25154 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025155 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25156 { (case "(($ac_try" in
25157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25158 *) ac_try_echo=$ac_try;;
25159esac
25160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25161 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000025162 ac_status=$?
25163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25164 (exit $ac_status); }; } &&
25165 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025166 { (case "(($ac_try" in
25167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25168 *) ac_try_echo=$ac_try;;
25169esac
25170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25171 (eval "$ac_try") 2>&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025172 ac_status=$?
25173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25174 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025175 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025176else
25177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025178sed 's/^/| /' conftest.$ac_ext >&5
25179
Thomas Wouters477c8d52006-05-27 19:21:47 +000025180 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025181fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025182
Skip Montanarof0d5f792004-08-15 14:08:23 +000025183rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025184fi
25185
Thomas Wouters477c8d52006-05-27 19:21:47 +000025186{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25187echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025188if test "$ac_cv_stat_tv_nsec" = yes
25189then
25190
25191cat >>confdefs.h <<\_ACEOF
25192#define HAVE_STAT_TV_NSEC 1
25193_ACEOF
25194
25195fi
25196
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025197# Look for BSD style subsecond timestamps in struct stat
Thomas Wouters477c8d52006-05-27 19:21:47 +000025198{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25199echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025200if test "${ac_cv_stat_tv_nsec2+set}" = set; then
25201 echo $ECHO_N "(cached) $ECHO_C" >&6
25202else
25203 cat >conftest.$ac_ext <<_ACEOF
25204/* confdefs.h. */
25205_ACEOF
25206cat confdefs.h >>conftest.$ac_ext
25207cat >>conftest.$ac_ext <<_ACEOF
25208/* end confdefs.h. */
25209#include <sys/stat.h>
25210int
25211main ()
25212{
25213
25214struct stat st;
25215st.st_mtimespec.tv_nsec = 1;
25216
25217 ;
25218 return 0;
25219}
25220_ACEOF
25221rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025222if { (ac_try="$ac_compile"
25223case "(($ac_try" in
25224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25225 *) ac_try_echo=$ac_try;;
25226esac
25227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25228 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025229 ac_status=$?
25230 grep -v '^ *+' conftest.er1 >conftest.err
25231 rm -f conftest.er1
25232 cat conftest.err >&5
25233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25234 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025235 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25236 { (case "(($ac_try" in
25237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25238 *) ac_try_echo=$ac_try;;
25239esac
25240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25241 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025242 ac_status=$?
25243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25244 (exit $ac_status); }; } &&
25245 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025246 { (case "(($ac_try" in
25247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25248 *) ac_try_echo=$ac_try;;
25249esac
25250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25251 (eval "$ac_try") 2>&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025252 ac_status=$?
25253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25254 (exit $ac_status); }; }; then
25255 ac_cv_stat_tv_nsec2=yes
25256else
25257 echo "$as_me: failed program was:" >&5
25258sed 's/^/| /' conftest.$ac_ext >&5
25259
Thomas Wouters477c8d52006-05-27 19:21:47 +000025260 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025261fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025262
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025263rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
25264fi
25265
Thomas Wouters477c8d52006-05-27 19:21:47 +000025266{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25267echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025268if test "$ac_cv_stat_tv_nsec2" = yes
25269then
25270
25271cat >>confdefs.h <<\_ACEOF
25272#define HAVE_STAT_TV_NSEC2 1
25273_ACEOF
25274
25275fi
25276
Jack Jansen666b1e72001-10-31 12:11:48 +000025277# On HP/UX 11.0, mvwdelch is a block with a return statement
Thomas Wouters477c8d52006-05-27 19:21:47 +000025278{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25279echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025280if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
25281 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025282else
Martin v. Löwis11437992002-04-12 09:54:03 +000025283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025284/* confdefs.h. */
25285_ACEOF
25286cat confdefs.h >>conftest.$ac_ext
25287cat >>conftest.$ac_ext <<_ACEOF
25288/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025289#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025290int
25291main ()
25292{
Jack Jansen666b1e72001-10-31 12:11:48 +000025293
25294 int rtn;
25295 rtn = mvwdelch(0,0,0);
25296
Martin v. Löwis11437992002-04-12 09:54:03 +000025297 ;
25298 return 0;
25299}
25300_ACEOF
25301rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025302if { (ac_try="$ac_compile"
25303case "(($ac_try" in
25304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25305 *) ac_try_echo=$ac_try;;
25306esac
25307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25308 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025310 grep -v '^ *+' conftest.er1 >conftest.err
25311 rm -f conftest.er1
25312 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25314 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025315 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25316 { (case "(($ac_try" in
25317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25318 *) ac_try_echo=$ac_try;;
25319esac
25320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25321 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000025322 ac_status=$?
25323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25324 (exit $ac_status); }; } &&
25325 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025326 { (case "(($ac_try" in
25327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25328 *) ac_try_echo=$ac_try;;
25329esac
25330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25331 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025332 ac_status=$?
25333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25334 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025335 ac_cv_mvwdelch_is_expression=yes
25336else
Martin v. Löwis11437992002-04-12 09:54:03 +000025337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025338sed 's/^/| /' conftest.$ac_ext >&5
25339
Thomas Wouters477c8d52006-05-27 19:21:47 +000025340 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025341fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025342
Skip Montanarof0d5f792004-08-15 14:08:23 +000025343rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000025344fi
25345
Thomas Wouters477c8d52006-05-27 19:21:47 +000025346{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
25347echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000025348
25349if test "$ac_cv_mvwdelch_is_expression" = yes
25350then
Martin v. Löwis11437992002-04-12 09:54:03 +000025351
25352cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025353#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025354_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025355
25356fi
25357
Thomas Wouters477c8d52006-05-27 19:21:47 +000025358{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
25359echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025360if test "${ac_cv_window_has_flags+set}" = set; then
25361 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025362else
Martin v. Löwis11437992002-04-12 09:54:03 +000025363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025364/* confdefs.h. */
25365_ACEOF
25366cat confdefs.h >>conftest.$ac_ext
25367cat >>conftest.$ac_ext <<_ACEOF
25368/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025369#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025370int
25371main ()
25372{
Jack Jansen666b1e72001-10-31 12:11:48 +000025373
25374 WINDOW *w;
25375 w->_flags = 0;
25376
Martin v. Löwis11437992002-04-12 09:54:03 +000025377 ;
25378 return 0;
25379}
25380_ACEOF
25381rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025382if { (ac_try="$ac_compile"
25383case "(($ac_try" in
25384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25385 *) ac_try_echo=$ac_try;;
25386esac
25387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025390 grep -v '^ *+' conftest.er1 >conftest.err
25391 rm -f conftest.er1
25392 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25394 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025395 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25396 { (case "(($ac_try" in
25397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25398 *) ac_try_echo=$ac_try;;
25399esac
25400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25401 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000025402 ac_status=$?
25403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25404 (exit $ac_status); }; } &&
25405 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025406 { (case "(($ac_try" in
25407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25408 *) ac_try_echo=$ac_try;;
25409esac
25410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25411 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025412 ac_status=$?
25413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25414 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025415 ac_cv_window_has_flags=yes
25416else
Martin v. Löwis11437992002-04-12 09:54:03 +000025417 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025418sed 's/^/| /' conftest.$ac_ext >&5
25419
Thomas Wouters477c8d52006-05-27 19:21:47 +000025420 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025421fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025422
Skip Montanarof0d5f792004-08-15 14:08:23 +000025423rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000025424fi
25425
Thomas Wouters477c8d52006-05-27 19:21:47 +000025426{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
25427echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025428
Jack Jansen666b1e72001-10-31 12:11:48 +000025429
25430if test "$ac_cv_window_has_flags" = yes
25431then
Martin v. Löwis11437992002-04-12 09:54:03 +000025432
25433cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025434#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025435_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025436
25437fi
25438
Thomas Wouters477c8d52006-05-27 19:21:47 +000025439{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25440echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025441
25442if test -e /dev/ptmx
25443then
Thomas Wouters477c8d52006-05-27 19:21:47 +000025444 { echo "$as_me:$LINENO: result: yes" >&5
25445echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025446
25447cat >>confdefs.h <<\_ACEOF
25448#define HAVE_DEV_PTMX 1
25449_ACEOF
25450
25451else
Thomas Wouters477c8d52006-05-27 19:21:47 +000025452 { echo "$as_me:$LINENO: result: no" >&5
25453echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025454fi
25455
Thomas Wouters477c8d52006-05-27 19:21:47 +000025456{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25457echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025458
25459if test -e /dev/ptc
25460then
Thomas Wouters477c8d52006-05-27 19:21:47 +000025461 { echo "$as_me:$LINENO: result: yes" >&5
25462echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025463
25464cat >>confdefs.h <<\_ACEOF
25465#define HAVE_DEV_PTC 1
25466_ACEOF
25467
25468else
Thomas Wouters477c8d52006-05-27 19:21:47 +000025469 { echo "$as_me:$LINENO: result: no" >&5
25470echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025471fi
25472
Thomas Wouters477c8d52006-05-27 19:21:47 +000025473{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25474echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
25475if test "$cross_compiling" = yes; then
25476 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
25477See \`config.log' for more details." >&5
25478echo "$as_me: error: cannot run test program while cross compiling
25479See \`config.log' for more details." >&2;}
25480 { (exit 1); exit 1; }; }
25481else
25482 cat >conftest.$ac_ext <<_ACEOF
25483/* confdefs.h. */
25484_ACEOF
25485cat confdefs.h >>conftest.$ac_ext
25486cat >>conftest.$ac_ext <<_ACEOF
25487/* end confdefs.h. */
25488#include <stdio.h>
25489#include <stddef.h>
25490#include <string.h>
25491
25492int main()
25493{
25494 char buffer[4];
25495
25496 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25497 return 1;
25498
25499 if (strncmp(buffer, "123", 3))
25500 return 1;
25501
25502 return 0;
25503}
25504_ACEOF
25505rm -f conftest$ac_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025506if { (ac_try="$ac_link"
25507case "(($ac_try" in
25508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25509 *) ac_try_echo=$ac_try;;
25510esac
25511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25512 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025513 ac_status=$?
25514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25515 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025516 { (case "(($ac_try" in
25517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25518 *) ac_try_echo=$ac_try;;
25519esac
25520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25521 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025522 ac_status=$?
25523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25524 (exit $ac_status); }; }; then
25525 { echo "$as_me:$LINENO: result: yes" >&5
25526echo "${ECHO_T}yes" >&6; }
25527
25528cat >>confdefs.h <<\_ACEOF
25529#define PY_FORMAT_SIZE_T "z"
25530_ACEOF
25531
25532else
25533 echo "$as_me: program exited with status $ac_status" >&5
25534echo "$as_me: failed program was:" >&5
25535sed 's/^/| /' conftest.$ac_ext >&5
25536
25537( exit $ac_status )
25538{ echo "$as_me:$LINENO: result: no" >&5
25539echo "${ECHO_T}no" >&6; }
25540fi
25541rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25542fi
25543
25544
25545
25546{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25547echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025548if test "${ac_cv_type_socklen_t+set}" = set; then
25549 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025550else
Martin v. Löwis11437992002-04-12 09:54:03 +000025551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025552/* confdefs.h. */
25553_ACEOF
25554cat confdefs.h >>conftest.$ac_ext
25555cat >>conftest.$ac_ext <<_ACEOF
25556/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025557
25558#ifdef HAVE_SYS_TYPES_H
25559#include <sys/types.h>
25560#endif
25561#ifdef HAVE_SYS_SOCKET_H
25562#include <sys/socket.h>
25563#endif
25564
25565
Thomas Wouters477c8d52006-05-27 19:21:47 +000025566typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025567int
25568main ()
25569{
Thomas Wouters477c8d52006-05-27 19:21:47 +000025570if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025571 return 0;
Thomas Wouters477c8d52006-05-27 19:21:47 +000025572if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000025573 return 0;
25574 ;
25575 return 0;
25576}
25577_ACEOF
25578rm -f conftest.$ac_objext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025579if { (ac_try="$ac_compile"
25580case "(($ac_try" in
25581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25582 *) ac_try_echo=$ac_try;;
25583esac
25584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025587 grep -v '^ *+' conftest.er1 >conftest.err
25588 rm -f conftest.er1
25589 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25591 (exit $ac_status); } &&
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025592 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
25593 { (case "(($ac_try" in
25594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25595 *) ac_try_echo=$ac_try;;
25596esac
25597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25598 (eval "$ac_try") 2>&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000025599 ac_status=$?
25600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25601 (exit $ac_status); }; } &&
25602 { ac_try='test -s conftest.$ac_objext'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025603 { (case "(($ac_try" in
25604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25605 *) ac_try_echo=$ac_try;;
25606esac
25607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25608 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025609 ac_status=$?
25610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25611 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000025612 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025613else
Martin v. Löwis11437992002-04-12 09:54:03 +000025614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025615sed 's/^/| /' conftest.$ac_ext >&5
25616
Thomas Wouters477c8d52006-05-27 19:21:47 +000025617 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025618fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025619
Skip Montanarof0d5f792004-08-15 14:08:23 +000025620rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025621fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025622{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25623echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025624if test $ac_cv_type_socklen_t = yes; then
25625 :
25626else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025627
Martin v. Löwis01c04012002-11-11 14:58:44 +000025628cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025629#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025630_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025631
25632fi
25633
Michael W. Hudson54241132001-12-07 15:38:26 +000025634
Michael W. Hudson54241132001-12-07 15:38:26 +000025635
25636
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025637for h in `(cd $srcdir;echo Python/thread_*.h)`
25638do
25639 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25640done
25641
Michael W. Hudson54241132001-12-07 15:38:26 +000025642
Neal Norwitzd24499d2005-12-18 21:36:39 +000025643SRCDIRS="Parser Grammar Objects Python Modules Mac"
Thomas Wouters477c8d52006-05-27 19:21:47 +000025644{ echo "$as_me:$LINENO: checking for build directories" >&5
25645echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025646for dir in $SRCDIRS; do
25647 if test ! -d $dir; then
25648 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025649 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025650done
Thomas Wouters477c8d52006-05-27 19:21:47 +000025651{ echo "$as_me:$LINENO: result: done" >&5
25652echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025653
Guido van Rossum627b2d71993-12-24 10:39:16 +000025654# generate output files
Thomas Wouters477c8d52006-05-27 19:21:47 +000025655ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025656
Martin v. Löwis11437992002-04-12 09:54:03 +000025657cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025658# This file is a shell script that caches the results of configure
25659# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025660# scripts and configure runs, see configure's option --config-cache.
25661# It is not useful on other systems. If it contains results you don't
25662# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025663#
Martin v. Löwis11437992002-04-12 09:54:03 +000025664# config.status only pays attention to the cache file if you give it
25665# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025666#
Skip Montanaro6dead952003-09-25 14:50:04 +000025667# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025668# loading this file, other *unset* `ac_cv_foo' will be assigned the
25669# following values.
25670
25671_ACEOF
25672
Guido van Rossumf78abae1997-01-21 22:02:36 +000025673# The following way of writing the cache mishandles newlines in values,
25674# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters477c8d52006-05-27 19:21:47 +000025675# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025676# Ultrix sh set writes to stderr and can't be redirected directly,
25677# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters477c8d52006-05-27 19:21:47 +000025678(
25679 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25680 eval ac_val=\$$ac_var
25681 case $ac_val in #(
25682 *${as_nl}*)
25683 case $ac_var in #(
25684 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25685echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
25686 esac
25687 case $ac_var in #(
25688 _ | IFS | as_nl) ;; #(
25689 *) $as_unset $ac_var ;;
25690 esac ;;
25691 esac
25692 done
25693
Martin v. Löwis11437992002-04-12 09:54:03 +000025694 (set) 2>&1 |
Thomas Wouters477c8d52006-05-27 19:21:47 +000025695 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25696 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025697 # `set' does not quote correctly, so add quotes (double-quote
25698 # substitution turns \\\\ into \\, and sed turns \\ into \).
25699 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025700 "s/'/'\\\\''/g;
25701 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters477c8d52006-05-27 19:21:47 +000025702 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025703 *)
25704 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters477c8d52006-05-27 19:21:47 +000025705 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025706 ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000025707 esac |
25708 sort
25709) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025710 sed '
Thomas Wouters477c8d52006-05-27 19:21:47 +000025711 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025712 t clear
Thomas Wouters477c8d52006-05-27 19:21:47 +000025713 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025714 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25715 t end
Thomas Wouters477c8d52006-05-27 19:21:47 +000025716 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25717 :end' >>confcache
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025718if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25719 if test -w "$cache_file"; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000025720 test "x$cache_file" != "x/dev/null" &&
25721 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25722echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025723 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025724 else
Thomas Wouters477c8d52006-05-27 19:21:47 +000025725 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25726echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025727 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025728fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025729rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025730
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025731test "x$prefix" = xNONE && prefix=$ac_default_prefix
25732# Let make expand exec_prefix.
25733test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025734
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025735DEFS=-DHAVE_CONFIG_H
25736
Skip Montanaro6dead952003-09-25 14:50:04 +000025737ac_libobjs=
25738ac_ltlibobjs=
25739for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25740 # 1. Remove the extension, and $U if already installed.
Thomas Wouters477c8d52006-05-27 19:21:47 +000025741 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25742 ac_i=`echo "$ac_i" | sed "$ac_script"`
25743 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25744 # will be set to the directory where LIBOBJS objects are built.
25745 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25746 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025747done
25748LIBOBJS=$ac_libobjs
25749
25750LTLIBOBJS=$ac_ltlibobjs
25751
25752
Martin v. Löwis11437992002-04-12 09:54:03 +000025753
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025754: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025755ac_clean_files_save=$ac_clean_files
25756ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25757{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25758echo "$as_me: creating $CONFIG_STATUS" >&6;}
25759cat >$CONFIG_STATUS <<_ACEOF
25760#! $SHELL
25761# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025762# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025763# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025764# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025765
Martin v. Löwis11437992002-04-12 09:54:03 +000025766debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025767ac_cs_recheck=false
25768ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025769SHELL=\${CONFIG_SHELL-$SHELL}
25770_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025771
Martin v. Löwis11437992002-04-12 09:54:03 +000025772cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025773## --------------------- ##
25774## M4sh Initialization. ##
25775## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025776
Martin v. Löwis11437992002-04-12 09:54:03 +000025777# Be Bourne compatible
25778if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25779 emulate sh
25780 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025781 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
25782 # is contrary to our usage. Disable this feature.
25783 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters477c8d52006-05-27 19:21:47 +000025784 setopt NO_GLOB_SUBST
25785else
25786 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
Michael W. Hudson54241132001-12-07 15:38:26 +000025787fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025788BIN_SH=xpg4; export BIN_SH # for Tru64
Skip Montanarof0d5f792004-08-15 14:08:23 +000025789DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000025790
Michael W. Hudson54241132001-12-07 15:38:26 +000025791
Thomas Wouters477c8d52006-05-27 19:21:47 +000025792# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025793# Avoid depending upon Character Ranges.
25794as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25795as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25796as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25797as_cr_digits='0123456789'
25798as_cr_alnum=$as_cr_Letters$as_cr_digits
25799
25800# The user is always right.
25801if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000025802 echo "#! /bin/sh" >conf$$.sh
25803 echo "exit 0" >>conf$$.sh
25804 chmod +x conf$$.sh
25805 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025806 PATH_SEPARATOR=';'
25807 else
25808 PATH_SEPARATOR=:
25809 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000025810 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025811fi
25812
Thomas Wouters477c8d52006-05-27 19:21:47 +000025813# Support unset when possible.
25814if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25815 as_unset=unset
25816else
25817 as_unset=false
25818fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025819
Thomas Wouters477c8d52006-05-27 19:21:47 +000025820
25821# IFS
25822# We need space, tab and new line, in precisely that order. Quoting is
25823# there to prevent editors from complaining about space-tab.
25824# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25825# splitting by setting IFS to empty value.)
25826as_nl='
25827'
25828IFS=" "" $as_nl"
25829
25830# Find who we are. Look in the path if we contain no directory separator.
25831case $0 in
25832 *[\\/]* ) as_myself=$0 ;;
25833 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000025834for as_dir in $PATH
25835do
25836 IFS=$as_save_IFS
25837 test -z "$as_dir" && as_dir=.
25838 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25839done
Thomas Wouters477c8d52006-05-27 19:21:47 +000025840IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000025841
Thomas Wouters477c8d52006-05-27 19:21:47 +000025842 ;;
25843esac
25844# We did not find ourselves, most probably we were run as `sh COMMAND'
25845# in which case we are not to be found in the path.
25846if test "x$as_myself" = x; then
25847 as_myself=$0
25848fi
25849if test ! -f "$as_myself"; then
25850 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25851 { (exit 1); exit 1; }
25852fi
25853
25854# Work around bugs in pre-3.0 UWIN ksh.
25855for as_var in ENV MAIL MAILPATH
25856do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25857done
25858PS1='$ '
25859PS2='> '
25860PS4='+ '
25861
25862# NLS nuisances.
25863for as_var in \
25864 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25865 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25866 LC_TELEPHONE LC_TIME
Martin v. Löwis11437992002-04-12 09:54:03 +000025867do
Thomas Wouters477c8d52006-05-27 19:21:47 +000025868 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25869 eval $as_var=C; export $as_var
25870 else
25871 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25872 fi
25873done
25874
25875# Required to use basename.
25876if expr a : '\(a\)' >/dev/null 2>&1 &&
25877 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25878 as_expr=expr
25879else
25880 as_expr=false
25881fi
25882
25883if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25884 as_basename=basename
25885else
25886 as_basename=false
25887fi
25888
25889
25890# Name of the executable.
25891as_me=`$as_basename -- "$0" ||
25892$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25893 X"$0" : 'X\(//\)$' \| \
25894 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25895echo X/"$0" |
25896 sed '/^.*\/\([^/][^/]*\)\/*$/{
25897 s//\1/
25898 q
25899 }
25900 /^X\/\(\/\/\)$/{
25901 s//\1/
25902 q
25903 }
25904 /^X\/\(\/\).*/{
25905 s//\1/
25906 q
25907 }
25908 s/.*/./; q'`
25909
25910# CDPATH.
25911$as_unset CDPATH
25912
25913
25914
Martin v. Löwis11437992002-04-12 09:54:03 +000025915 as_lineno_1=$LINENO
25916 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025917 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters477c8d52006-05-27 19:21:47 +000025918 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025919
Martin v. Löwis11437992002-04-12 09:54:03 +000025920 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25921 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters477c8d52006-05-27 19:21:47 +000025922 # line-number line after each line using $LINENO; the second 'sed'
25923 # does the real work. The second script uses 'N' to pair each
25924 # line-number line with the line containing $LINENO, and appends
25925 # trailing '-' during substitution so that $LINENO is not a special
25926 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025927 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters477c8d52006-05-27 19:21:47 +000025928 # scripts with optimization help from Paolo Bonzini. Blame Lee
25929 # E. McMahon (1931-1989) for sed's syntax. :-)
25930 sed -n '
25931 p
25932 /[$]LINENO/=
25933 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025934 sed '
Thomas Wouters477c8d52006-05-27 19:21:47 +000025935 s/[$]LINENO.*/&-/
25936 t lineno
25937 b
25938 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025939 N
Thomas Wouters477c8d52006-05-27 19:21:47 +000025940 :loop
25941 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025942 t loop
Thomas Wouters477c8d52006-05-27 19:21:47 +000025943 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025944 ' >$as_me.lineno &&
Thomas Wouters477c8d52006-05-27 19:21:47 +000025945 chmod +x "$as_me.lineno" ||
25946 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025947 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025948
Martin v. Löwis11437992002-04-12 09:54:03 +000025949 # Don't try to exec as it changes $[0], causing all sort of problems
25950 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters477c8d52006-05-27 19:21:47 +000025951 # original and so on. Autoconf is especially sensitive to this).
25952 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025953 # Exit status is that of the last command.
25954 exit
25955}
25956
25957
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000025958if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000025959 as_dirname=dirname
25960else
25961 as_dirname=false
25962fi
25963
25964ECHO_C= ECHO_N= ECHO_T=
25965case `echo -n x` in
25966-n*)
25967 case `echo 'x\c'` in
25968 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25969 *) ECHO_C='\c';;
25970 esac;;
25971*)
25972 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025973esac
25974
Thomas Wouters477c8d52006-05-27 19:21:47 +000025975if expr a : '\(a\)' >/dev/null 2>&1 &&
25976 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025977 as_expr=expr
25978else
25979 as_expr=false
25980fi
25981
25982rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters477c8d52006-05-27 19:21:47 +000025983if test -d conf$$.dir; then
25984 rm -f conf$$.dir/conf$$.file
25985else
25986 rm -f conf$$.dir
25987 mkdir conf$$.dir
25988fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025989echo >conf$$.file
25990if ln -s conf$$.file conf$$ 2>/dev/null; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000025991 as_ln_s='ln -s'
25992 # ... but there are two gotchas:
25993 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25994 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25995 # In both cases, we have to default to `cp -p'.
25996 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025997 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000025998elif ln conf$$.file conf$$ 2>/dev/null; then
25999 as_ln_s=ln
26000else
26001 as_ln_s='cp -p'
26002fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026003rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26004rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026005
Skip Montanaro6dead952003-09-25 14:50:04 +000026006if mkdir -p . 2>/dev/null; then
26007 as_mkdir_p=:
26008else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026009 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026010 as_mkdir_p=false
26011fi
26012
Thomas Wouters477c8d52006-05-27 19:21:47 +000026013# Find out whether ``test -x'' works. Don't use a zero-byte file, as
26014# systems may use methods other than mode bits to determine executability.
26015cat >conf$$.file <<_ASEOF
26016#! /bin/sh
26017exit 0
26018_ASEOF
26019chmod +x conf$$.file
26020if test -x conf$$.file >/dev/null 2>&1; then
26021 as_executable_p="test -x"
26022else
26023 as_executable_p=:
26024fi
26025rm -f conf$$.file
Martin v. Löwis11437992002-04-12 09:54:03 +000026026
26027# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026028as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026029
26030# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026031as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026032
26033
Martin v. Löwis11437992002-04-12 09:54:03 +000026034exec 6>&1
26035
Thomas Wouters477c8d52006-05-27 19:21:47 +000026036# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026037# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters477c8d52006-05-27 19:21:47 +000026038# values after options handling.
26039ac_log="
Guido van Rossum0c4eb622006-03-30 16:19:24 +000026040This file was extended by python $as_me 3.0, which was
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026041generated by GNU Autoconf 2.59e. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026042
26043 CONFIG_FILES = $CONFIG_FILES
26044 CONFIG_HEADERS = $CONFIG_HEADERS
26045 CONFIG_LINKS = $CONFIG_LINKS
26046 CONFIG_COMMANDS = $CONFIG_COMMANDS
26047 $ $0 $@
26048
Thomas Wouters477c8d52006-05-27 19:21:47 +000026049on `(hostname || uname -n) 2>/dev/null | sed 1q`
26050"
26051
Martin v. Löwis11437992002-04-12 09:54:03 +000026052_ACEOF
26053
Thomas Wouters477c8d52006-05-27 19:21:47 +000026054cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026055# Files that config.status was made for.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026056config_files="$ac_config_files"
26057config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026058
Thomas Wouters477c8d52006-05-27 19:21:47 +000026059_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026060
26061cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026062ac_cs_usage="\
26063\`$as_me' instantiates files from templates according to the
26064current configuration.
26065
26066Usage: $0 [OPTIONS] [FILE]...
26067
26068 -h, --help print this help, then exit
26069 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000026070 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026071 -d, --debug don't remove temporary files
26072 --recheck update $as_me by reconfiguring in the same conditions
26073 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000026074 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026075 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000026076 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026077
26078Configuration files:
26079$config_files
26080
26081Configuration headers:
26082$config_headers
26083
26084Report bugs to <bug-autoconf@gnu.org>."
Martin v. Löwis11437992002-04-12 09:54:03 +000026085
Thomas Wouters477c8d52006-05-27 19:21:47 +000026086_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026087cat >>$CONFIG_STATUS <<_ACEOF
26088ac_cs_version="\\
Guido van Rossum0c4eb622006-03-30 16:19:24 +000026089python config.status 3.0
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026090configured by $0, generated by GNU Autoconf 2.59e,
26091 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026092
Thomas Wouters477c8d52006-05-27 19:21:47 +000026093Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026094This config.status script is free software; the Free Software Foundation
26095gives unlimited permission to copy, distribute and modify it."
Thomas Wouters477c8d52006-05-27 19:21:47 +000026096
26097ac_pwd='$ac_pwd'
26098srcdir='$srcdir'
26099INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000026100_ACEOF
26101
26102cat >>$CONFIG_STATUS <<\_ACEOF
26103# If no file are specified by the user, then we need to provide default
26104# value. By we need to know if files were specified by the user.
26105ac_need_defaults=:
26106while test $# != 0
26107do
26108 case $1 in
26109 --*=*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000026110 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26111 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026112 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026113 ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026114 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026115 ac_option=$1
26116 ac_optarg=$2
26117 ac_shift=shift
26118 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026119 esac
26120
Skip Montanaro6dead952003-09-25 14:50:04 +000026121 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026122 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026123 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26124 ac_cs_recheck=: ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026125 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
26126 echo "$ac_cs_version"; exit ;;
26127 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026128 debug=: ;;
26129 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026130 $ac_shift
26131 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026132 ac_need_defaults=false;;
26133 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026134 $ac_shift
26135 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000026136 ac_need_defaults=false;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026137 --he | --h)
26138 # Conflict between --help and --header
26139 { echo "$as_me: error: ambiguous option: $1
26140Try \`$0 --help' for more information." >&2
26141 { (exit 1); exit 1; }; };;
26142 --help | --hel | -h )
26143 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000026144 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26145 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26146 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026147
26148 # This is an error.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026149 -*) { echo "$as_me: error: unrecognized option: $1
26150Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026151 { (exit 1); exit 1; }; } ;;
26152
Thomas Wouters477c8d52006-05-27 19:21:47 +000026153 *) ac_config_targets="$ac_config_targets $1"
26154 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026155
26156 esac
26157 shift
26158done
26159
Skip Montanaro6dead952003-09-25 14:50:04 +000026160ac_configure_extra_args=
26161
26162if $ac_cs_silent; then
26163 exec 6>/dev/null
26164 ac_configure_extra_args="$ac_configure_extra_args --silent"
26165fi
26166
26167_ACEOF
26168cat >>$CONFIG_STATUS <<_ACEOF
26169if \$ac_cs_recheck; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026170 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
Thomas Wouters477c8d52006-05-27 19:21:47 +000026171 CONFIG_SHELL=$SHELL
26172 export CONFIG_SHELL
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026173 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000026174fi
26175
Martin v. Löwis11437992002-04-12 09:54:03 +000026176_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000026177cat >>$CONFIG_STATUS <<\_ACEOF
26178exec 5>>config.log
26179{
26180 echo
26181 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26182## Running $as_me. ##
26183_ASBOX
26184 echo "$ac_log"
26185} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026186
Thomas Wouters477c8d52006-05-27 19:21:47 +000026187_ACEOF
26188cat >>$CONFIG_STATUS <<_ACEOF
26189_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026190
26191cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000026192
26193# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000026194for ac_config_target in $ac_config_targets
26195do
Thomas Wouters477c8d52006-05-27 19:21:47 +000026196 case $ac_config_target in
26197 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
Thomas Wouters73e5a5b2006-06-08 15:35:45 +000026198 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
26199 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
26200 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026201 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
26202 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
26203
Martin v. Löwis11437992002-04-12 09:54:03 +000026204 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26205echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26206 { (exit 1); exit 1; }; };;
26207 esac
26208done
26209
Thomas Wouters477c8d52006-05-27 19:21:47 +000026210
Martin v. Löwis11437992002-04-12 09:54:03 +000026211# If the user did not use the arguments to specify the items to instantiate,
26212# then the envvar interface is used. Set only those that are not.
26213# We use the long form for the default assignment because of an extremely
26214# bizarre bug on SunOS 4.1.3.
26215if $ac_need_defaults; then
26216 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26217 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26218fi
26219
Skip Montanaro6dead952003-09-25 14:50:04 +000026220# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters477c8d52006-05-27 19:21:47 +000026221# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026222# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026223# Hook for its removal unless debugging.
26224# Note that there is a small window in which the directory will not be cleaned:
26225# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026226$debug ||
26227{
Thomas Wouters477c8d52006-05-27 19:21:47 +000026228 tmp=
26229 trap 'exit_status=$?
26230 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26231' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026232 trap '{ (exit 1); exit 1; }' 1 2 13 15
26233}
Martin v. Löwis11437992002-04-12 09:54:03 +000026234# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026235
Martin v. Löwis11437992002-04-12 09:54:03 +000026236{
Thomas Wouters477c8d52006-05-27 19:21:47 +000026237 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026238 test -n "$tmp" && test -d "$tmp"
26239} ||
26240{
Thomas Wouters477c8d52006-05-27 19:21:47 +000026241 tmp=./conf$$-$RANDOM
26242 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026243} ||
26244{
Skip Montanaro6dead952003-09-25 14:50:04 +000026245 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026246 { (exit 1); exit 1; }
26247}
26248
Martin v. Löwis11437992002-04-12 09:54:03 +000026249#
Thomas Wouters477c8d52006-05-27 19:21:47 +000026250# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000026251#
26252
26253# No need to generate the scripts if there are no CONFIG_FILES.
26254# This happens for instance when ./config.status config.h
Thomas Wouters477c8d52006-05-27 19:21:47 +000026255if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026256
26257_ACEOF
26258
Thomas Wouters477c8d52006-05-27 19:21:47 +000026259
26260
26261ac_delim='%!_!# '
26262for ac_last_try in false false false false false :; do
26263 cat >conf$$subs.sed <<_ACEOF
26264SHELL!$SHELL$ac_delim
26265PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26266PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26267PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26268PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26269PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26270PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26271exec_prefix!$exec_prefix$ac_delim
26272prefix!$prefix$ac_delim
26273program_transform_name!$program_transform_name$ac_delim
26274bindir!$bindir$ac_delim
26275sbindir!$sbindir$ac_delim
26276libexecdir!$libexecdir$ac_delim
26277datarootdir!$datarootdir$ac_delim
26278datadir!$datadir$ac_delim
26279sysconfdir!$sysconfdir$ac_delim
26280sharedstatedir!$sharedstatedir$ac_delim
26281localstatedir!$localstatedir$ac_delim
26282includedir!$includedir$ac_delim
26283oldincludedir!$oldincludedir$ac_delim
26284docdir!$docdir$ac_delim
26285infodir!$infodir$ac_delim
26286htmldir!$htmldir$ac_delim
26287dvidir!$dvidir$ac_delim
26288pdfdir!$pdfdir$ac_delim
26289psdir!$psdir$ac_delim
26290libdir!$libdir$ac_delim
26291localedir!$localedir$ac_delim
26292mandir!$mandir$ac_delim
26293DEFS!$DEFS$ac_delim
26294ECHO_C!$ECHO_C$ac_delim
26295ECHO_N!$ECHO_N$ac_delim
26296ECHO_T!$ECHO_T$ac_delim
26297LIBS!$LIBS$ac_delim
26298build_alias!$build_alias$ac_delim
26299host_alias!$host_alias$ac_delim
26300target_alias!$target_alias$ac_delim
26301VERSION!$VERSION$ac_delim
26302SOVERSION!$SOVERSION$ac_delim
26303CONFIG_ARGS!$CONFIG_ARGS$ac_delim
26304UNIVERSALSDK!$UNIVERSALSDK$ac_delim
26305PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
26306PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
26307PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
26308PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
26309FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
26310FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
Thomas Wouters73e5a5b2006-06-08 15:35:45 +000026311FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
26312FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
26313FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
Thomas Wouters477c8d52006-05-27 19:21:47 +000026314MACHDEP!$MACHDEP$ac_delim
26315SGI_ABI!$SGI_ABI$ac_delim
26316EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
26317EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
26318CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
26319EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
26320CC!$CC$ac_delim
26321CFLAGS!$CFLAGS$ac_delim
26322LDFLAGS!$LDFLAGS$ac_delim
26323CPPFLAGS!$CPPFLAGS$ac_delim
26324ac_ct_CC!$ac_ct_CC$ac_delim
26325EXEEXT!$EXEEXT$ac_delim
26326OBJEXT!$OBJEXT$ac_delim
26327CXX!$CXX$ac_delim
26328MAINCC!$MAINCC$ac_delim
26329CPP!$CPP$ac_delim
26330GREP!$GREP$ac_delim
26331EGREP!$EGREP$ac_delim
26332BUILDEXEEXT!$BUILDEXEEXT$ac_delim
26333LIBRARY!$LIBRARY$ac_delim
26334LDLIBRARY!$LDLIBRARY$ac_delim
26335DLLLIBRARY!$DLLLIBRARY$ac_delim
26336BLDLIBRARY!$BLDLIBRARY$ac_delim
26337LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26338INSTSONAME!$INSTSONAME$ac_delim
26339RUNSHARED!$RUNSHARED$ac_delim
26340LINKCC!$LINKCC$ac_delim
26341RANLIB!$RANLIB$ac_delim
26342AR!$AR$ac_delim
26343SVNVERSION!$SVNVERSION$ac_delim
26344INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26345INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26346INSTALL_DATA!$INSTALL_DATA$ac_delim
26347LN!$LN$ac_delim
26348OPT!$OPT$ac_delim
26349BASECFLAGS!$BASECFLAGS$ac_delim
26350OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26351LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26352SO!$SO$ac_delim
26353LDSHARED!$LDSHARED$ac_delim
26354BLDSHARED!$BLDSHARED$ac_delim
26355CCSHARED!$CCSHARED$ac_delim
26356LINKFORSHARED!$LINKFORSHARED$ac_delim
26357CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
26358SHLIBS!$SHLIBS$ac_delim
26359USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
26360SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Thomas Wouters477c8d52006-05-27 19:21:47 +000026361_ACEOF
26362
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026363 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000026364 break
26365 elif $ac_last_try; then
26366 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26367echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26368 { (exit 1); exit 1; }; }
26369 else
26370 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026371 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026372done
26373
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026374ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26375if test -n "$ac_eof"; then
26376 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26377 ac_eof=`expr $ac_eof + 1`
Thomas Wouters477c8d52006-05-27 19:21:47 +000026378fi
26379
26380cat >>$CONFIG_STATUS <<_ACEOF
26381cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26382/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26383_ACEOF
26384sed '
26385s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26386s/^/s,@/; s/!/@,|#_!!_#|/
26387:n
26388t n
26389s/'"$ac_delim"'$/,g/; t
26390s/$/\\/; p
26391N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26392' >>$CONFIG_STATUS <conf$$subs.sed
26393rm -f conf$$subs.sed
26394cat >>$CONFIG_STATUS <<_ACEOF
26395CEOF$ac_eof
26396_ACEOF
26397
26398
26399ac_delim='%!_!# '
26400for ac_last_try in false false false false false :; do
26401 cat >conf$$subs.sed <<_ACEOF
Thomas Wouters73e5a5b2006-06-08 15:35:45 +000026402USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26403LDLAST!$LDLAST$ac_delim
26404THREADOBJ!$THREADOBJ$ac_delim
Thomas Wouters477c8d52006-05-27 19:21:47 +000026405DLINCLDIR!$DLINCLDIR$ac_delim
26406DYNLOADFILE!$DYNLOADFILE$ac_delim
26407MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26408TRUE!$TRUE$ac_delim
26409LIBOBJS!$LIBOBJS$ac_delim
26410HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26411HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26412HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26413HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26414HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26415LIBM!$LIBM$ac_delim
26416LIBC!$LIBC$ac_delim
26417UNICODE_OBJS!$UNICODE_OBJS$ac_delim
26418THREADHEADERS!$THREADHEADERS$ac_delim
26419SRCDIRS!$SRCDIRS$ac_delim
26420LTLIBOBJS!$LTLIBOBJS$ac_delim
26421_ACEOF
26422
Thomas Wouters73e5a5b2006-06-08 15:35:45 +000026423 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000026424 break
26425 elif $ac_last_try; then
26426 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26427echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26428 { (exit 1); exit 1; }; }
26429 else
26430 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26431 fi
26432done
26433
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026434ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26435if test -n "$ac_eof"; then
26436 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26437 ac_eof=`expr $ac_eof + 1`
Thomas Wouters477c8d52006-05-27 19:21:47 +000026438fi
26439
26440cat >>$CONFIG_STATUS <<_ACEOF
26441cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26442/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
26443_ACEOF
26444sed '
26445s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26446s/^/s,@/; s/!/@,|#_!!_#|/
26447:n
26448t n
26449s/'"$ac_delim"'$/,g/; t
26450s/$/\\/; p
26451N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26452' >>$CONFIG_STATUS <conf$$subs.sed
26453rm -f conf$$subs.sed
26454cat >>$CONFIG_STATUS <<_ACEOF
26455:end
26456s/|#_!!_#|//g
26457CEOF$ac_eof
26458_ACEOF
26459
26460
26461# VPATH may cause trouble with some makes, so we remove $(srcdir),
26462# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26463# trailing colons and then remove the whole line if VPATH becomes empty
26464# (actually we leave an empty line to preserve line numbers).
26465if test "x$srcdir" = x.; then
26466 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26467s/:*\$(srcdir):*/:/
26468s/:*\${srcdir}:*/:/
26469s/:*@srcdir@:*/:/
26470s/^\([^=]*=[ ]*\):*/\1/
26471s/:*$//
26472s/^[^=]*=[ ]*$//
26473}'
26474fi
26475
26476cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026477fi # test -n "$CONFIG_FILES"
26478
Thomas Wouters477c8d52006-05-27 19:21:47 +000026479
26480for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
26481do
26482 case $ac_tag in
26483 :[FHLC]) ac_mode=$ac_tag; continue;;
26484 esac
26485 case $ac_mode$ac_tag in
26486 :[FHL]*:*);;
26487 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26488echo "$as_me: error: Invalid tag $ac_tag." >&2;}
26489 { (exit 1); exit 1; }; };;
26490 :[FH]-) ac_tag=-:-;;
26491 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26492 esac
26493 ac_save_IFS=$IFS
26494 IFS=:
26495 set x $ac_tag
26496 IFS=$ac_save_IFS
26497 shift
26498 ac_file=$1
26499 shift
26500
26501 case $ac_mode in
26502 :L) ac_source=$1;;
26503 :[FH])
26504 ac_file_inputs=
26505 for ac_f
26506 do
26507 case $ac_f in
26508 -) ac_f="$tmp/stdin";;
26509 *) # Look for the file first in the build tree, then in the source tree
26510 # (if the path is not absolute). The absolute path cannot be DOS-style,
26511 # because $ac_f cannot contain `:'.
26512 test -f "$ac_f" ||
26513 case $ac_f in
26514 [\\/$]*) false;;
26515 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26516 esac ||
26517 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26518echo "$as_me: error: cannot find input file: $ac_f" >&2;}
26519 { (exit 1); exit 1; }; };;
26520 esac
26521 ac_file_inputs="$ac_file_inputs $ac_f"
26522 done
26523
26524 # Let's still pretend it is `configure' which instantiates (i.e., don't
26525 # use $as_me), people would be surprised to read:
26526 # /* config.h. Generated by config.status. */
26527 configure_input="Generated from "`IFS=:
26528 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
26529 if test x"$ac_file" != x-; then
26530 configure_input="$ac_file. $configure_input"
26531 { echo "$as_me:$LINENO: creating $ac_file" >&5
26532echo "$as_me: creating $ac_file" >&6;}
26533 fi
26534
26535 case $ac_tag in
26536 *:-:* | *:-) cat >"$tmp/stdin";;
26537 esac
26538 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026539 esac
26540
Thomas Wouters477c8d52006-05-27 19:21:47 +000026541 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026542$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026543 X"$ac_file" : 'X\(//\)[^/]' \| \
26544 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters477c8d52006-05-27 19:21:47 +000026545 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026546echo X"$ac_file" |
Thomas Wouters477c8d52006-05-27 19:21:47 +000026547 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26548 s//\1/
26549 q
26550 }
26551 /^X\(\/\/\)[^/].*/{
26552 s//\1/
26553 q
26554 }
26555 /^X\(\/\/\)$/{
26556 s//\1/
26557 q
26558 }
26559 /^X\(\/\).*/{
26560 s//\1/
26561 q
26562 }
26563 s/.*/./; q'`
26564 { as_dir="$ac_dir"
26565 case $as_dir in #(
26566 -*) as_dir=./$as_dir;;
26567 esac
26568 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026569 as_dirs=
Thomas Wouters477c8d52006-05-27 19:21:47 +000026570 while :; do
26571 case $as_dir in #(
26572 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
26573 *) as_qdir=$as_dir;;
26574 esac
26575 as_dirs="'$as_qdir' $as_dirs"
26576 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026577$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026578 X"$as_dir" : 'X\(//\)[^/]' \| \
26579 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters477c8d52006-05-27 19:21:47 +000026580 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026581echo X"$as_dir" |
Thomas Wouters477c8d52006-05-27 19:21:47 +000026582 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26583 s//\1/
26584 q
26585 }
26586 /^X\(\/\/\)[^/].*/{
26587 s//\1/
26588 q
26589 }
26590 /^X\(\/\/\)$/{
26591 s//\1/
26592 q
26593 }
26594 /^X\(\/\).*/{
26595 s//\1/
26596 q
26597 }
26598 s/.*/./; q'`
26599 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026600 done
Thomas Wouters477c8d52006-05-27 19:21:47 +000026601 test -z "$as_dirs" || eval "mkdir $as_dirs"
26602 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26603echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026604 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026605 ac_builddir=.
26606
Thomas Wouters477c8d52006-05-27 19:21:47 +000026607case "$ac_dir" in
26608.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26609*)
Martin v. Löwis11437992002-04-12 09:54:03 +000026610 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters477c8d52006-05-27 19:21:47 +000026611 # A ".." for each directory in $ac_dir_suffix.
26612 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
26613 case $ac_top_builddir_sub in
26614 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26615 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26616 esac ;;
26617esac
26618ac_abs_top_builddir=$ac_pwd
26619ac_abs_builddir=$ac_pwd$ac_dir_suffix
26620# for backward compatibility:
26621ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026622
26623case $srcdir in
Thomas Wouters477c8d52006-05-27 19:21:47 +000026624 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026625 ac_srcdir=.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026626 ac_top_srcdir=$ac_top_builddir_sub
26627 ac_abs_top_srcdir=$ac_pwd ;;
26628 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026629 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026630 ac_top_srcdir=$srcdir
26631 ac_abs_top_srcdir=$srcdir ;;
26632 *) # Relative name.
26633 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26634 ac_top_srcdir=$ac_top_build_prefix$srcdir
26635 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026636esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026637ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026638
Martin v. Löwis11437992002-04-12 09:54:03 +000026639
Thomas Wouters477c8d52006-05-27 19:21:47 +000026640 case $ac_mode in
26641 :F)
26642 #
26643 # CONFIG_FILE
26644 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026645
26646 case $INSTALL in
26647 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026648 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026649 esac
Martin v. Löwis11437992002-04-12 09:54:03 +000026650_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000026651
26652cat >>$CONFIG_STATUS <<\_ACEOF
26653# If the template does not know about datarootdir, expand it.
26654# FIXME: This hack should be removed a few years after 2.60.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026655ac_datarootdir_hack=; ac_datarootdir_seen=
Thomas Wouters477c8d52006-05-27 19:21:47 +000026656
26657case `sed -n '/datarootdir/ {
26658 p
26659 q
26660}
26661/@datadir@/p
26662/@docdir@/p
26663/@infodir@/p
26664/@localedir@/p
26665/@mandir@/p
26666' $ac_file_inputs` in
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026667*datarootdir*) ac_datarootdir_seen=yes;;
Thomas Wouters477c8d52006-05-27 19:21:47 +000026668*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26669 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26670echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26671_ACEOF
26672cat >>$CONFIG_STATUS <<_ACEOF
26673 ac_datarootdir_hack='
26674 s&@datadir@&$datadir&g
26675 s&@docdir@&$docdir&g
26676 s&@infodir@&$infodir&g
26677 s&@localedir@&$localedir&g
26678 s&@mandir@&$mandir&g
26679 s&\\\${datarootdir}&$datarootdir&g' ;;
26680esac
26681_ACEOF
26682
26683# Neutralize VPATH when `$srcdir' = `.'.
26684# Shell code in configure.ac might set extrasub.
26685# FIXME: do we really want to maintain this feature?
Martin v. Löwis11437992002-04-12 09:54:03 +000026686cat >>$CONFIG_STATUS <<_ACEOF
26687 sed "$ac_vpsub
26688$extrasub
26689_ACEOF
26690cat >>$CONFIG_STATUS <<\_ACEOF
26691:t
26692/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters477c8d52006-05-27 19:21:47 +000026693s&@configure_input@&$configure_input&;t t
26694s&@top_builddir@&$ac_top_builddir_sub&;t t
26695s&@srcdir@&$ac_srcdir&;t t
26696s&@abs_srcdir@&$ac_abs_srcdir&;t t
26697s&@top_srcdir@&$ac_top_srcdir&;t t
26698s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26699s&@builddir@&$ac_builddir&;t t
26700s&@abs_builddir@&$ac_abs_builddir&;t t
26701s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26702s&@INSTALL@&$ac_INSTALL&;t t
26703$ac_datarootdir_hack
26704" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026705
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026706test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26707 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26708 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26709which seems to be undefined. Please make sure it is defined." >&5
26710echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26711which seems to be undefined. Please make sure it is defined." >&2;}
26712
Thomas Wouters477c8d52006-05-27 19:21:47 +000026713 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026714 case $ac_file in
Thomas Wouters477c8d52006-05-27 19:21:47 +000026715 -) cat "$tmp/out"; rm -f "$tmp/out";;
26716 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026717 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026718 ;;
26719 :H)
26720 #
26721 # CONFIG_HEADER
26722 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026723_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026724
Thomas Wouters477c8d52006-05-27 19:21:47 +000026725# Transform confdefs.h into a sed script `conftest.defines', that
26726# substitutes the proper values into config.h.in to produce config.h.
26727rm -f conftest.defines conftest.tail
26728# First, append a space to every undef/define line, to ease matching.
26729echo 's/$/ /' >conftest.defines
26730# Then, protect against being on the right side of a sed subst, or in
26731# an unquoted here document, in config.status. If some macros were
26732# called several times there might be several #defines for the same
26733# symbol, which is useless. But do not sort them, since the last
26734# AC_DEFINE must be honored.
26735ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026736# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26737# NAME is the cpp macro being defined, VALUE is the value it is being given.
26738# PARAMS is the parameter list in the macro definition--in most cases, it's
26739# just an empty string.
26740ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26741ac_dB='\\)[ (].*,\\1define\\2'
26742ac_dC=' '
26743ac_dD=' ,'
26744
Thomas Wouters477c8d52006-05-27 19:21:47 +000026745uniq confdefs.h |
26746 sed -n '
26747 t rset
26748 :rset
26749 s/^[ ]*#[ ]*define[ ][ ]*//
26750 t ok
26751 d
26752 :ok
26753 s/[\\&,]/\\&/g
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026754 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26755 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
Thomas Wouters477c8d52006-05-27 19:21:47 +000026756 ' >>conftest.defines
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026757
Thomas Wouters477c8d52006-05-27 19:21:47 +000026758# Remove the space that was appended to ease matching.
26759# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026760# example, in the case of _POSIX_SOURCE, which is predefined and required
26761# on some systems where configure will not decide to define it.
Thomas Wouters477c8d52006-05-27 19:21:47 +000026762# (The regexp can be short, since the line contains either #define or #undef.)
26763echo 's/ $//
26764s,^[ #]*u.*,/* & */,' >>conftest.defines
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026765
Thomas Wouters477c8d52006-05-27 19:21:47 +000026766# Break up conftest.defines:
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026767ac_max_sed_lines=50
Thomas Wouters477c8d52006-05-27 19:21:47 +000026768
26769# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26770# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26771# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26772# et cetera.
26773ac_in='$ac_file_inputs'
26774ac_out='"$tmp/out1"'
26775ac_nxt='"$tmp/out2"'
26776
26777while :
Jack Jansendd19cf82001-12-06 22:36:17 +000026778do
Thomas Wouters477c8d52006-05-27 19:21:47 +000026779 # Write a here document:
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026780 cat >>$CONFIG_STATUS <<_ACEOF
26781 # First, check the format of the line:
26782 cat >"\$tmp/defines.sed" <<\\CEOF
26783/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26784/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
Thomas Wouters477c8d52006-05-27 19:21:47 +000026785b
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026786:def
26787_ACEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000026788 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000026789 echo 'CEOF
Thomas Wouters477c8d52006-05-27 19:21:47 +000026790 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26791 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26792 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26793 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000026794 rm -f conftest.defines
26795 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000026796done
Thomas Wouters477c8d52006-05-27 19:21:47 +000026797rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000026798
Thomas Wouters477c8d52006-05-27 19:21:47 +000026799echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026800cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026801 if test x"$ac_file" != x-; then
Thomas Wouters477c8d52006-05-27 19:21:47 +000026802 echo "/* $configure_input */" >"$tmp/config.h"
26803 cat "$ac_result" >>"$tmp/config.h"
26804 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026805 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26806echo "$as_me: $ac_file is unchanged" >&6;}
26807 else
Martin v. Löwis11437992002-04-12 09:54:03 +000026808 rm -f $ac_file
Thomas Wouters477c8d52006-05-27 19:21:47 +000026809 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000026810 fi
26811 else
Thomas Wouters477c8d52006-05-27 19:21:47 +000026812 echo "/* $configure_input */"
26813 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000026814 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026815 rm -f "$tmp/out12"
26816 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000026817
Thomas Wouters477c8d52006-05-27 19:21:47 +000026818
26819 esac
26820
26821done # for ac_tag
26822
Guido van Rossum627b2d71993-12-24 10:39:16 +000026823
Martin v. Löwis11437992002-04-12 09:54:03 +000026824{ (exit 0); exit 0; }
26825_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026826chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026827ac_clean_files=$ac_clean_files_save
26828
26829
26830# configure is writing to config.log, and then calls config.status.
26831# config.status does its own redirection, appending to config.log.
26832# Unfortunately, on DOS this fails, as config.log is still kept open
26833# by configure, so config.status won't be able to write to it; its
26834# output is simply discarded. So we exec the FD to /dev/null,
26835# effectively closing config.log, so it can be properly (re)opened and
26836# appended to by config.status. When coming back to configure, we
26837# need to make the FD available again.
26838if test "$no_create" != yes; then
26839 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026840 ac_config_status_args=
26841 test "$silent" = yes &&
26842 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026843 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026844 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026845 exec 5>>config.log
26846 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26847 # would make configure fail if this is the last instruction.
26848 $ac_cs_success || { (exit 1); exit 1; }
26849fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026850
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026851
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000026852echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026853if test ! -f Modules/Setup
26854then
26855 cp $srcdir/Modules/Setup.dist Modules/Setup
26856fi
26857
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000026858echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026859if test ! -f Modules/Setup.local
26860then
26861 echo "# Edit this file for local setup changes" >Modules/Setup.local
26862fi
26863
26864echo "creating Makefile"
26865$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26866 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026867 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026868mv config.c Modules